@arcgis/portal-components 6.0.0-next.13 → 6.0.0-next.14
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/{ICZNMBOV.js → 2W4ZEY3I.js} +1 -1
- package/dist/cdn/{Z6R3C4AK.js → 2XIDYV73.js} +1 -1
- package/dist/cdn/{WGCNE5CY.js → 36WCJDSE.js} +1 -1
- package/dist/cdn/{IHB4RIMJ.js → 3K3BYENR.js} +1 -1
- package/dist/cdn/{F6WFLI25.js → 3MLYU2YK.js} +1 -1
- package/dist/cdn/{4CCM74YA.js → 3QJWPWLY.js} +1 -1
- package/dist/cdn/3ZC26CT6.js +4 -0
- package/dist/cdn/{2WN6YUY5.js → 4AJW7TXX.js} +1 -1
- package/dist/cdn/4B2URSFO.js +2 -0
- package/dist/cdn/565U4WSN.js +2 -0
- package/dist/cdn/{TWCJJCPC.js → 57MT7FOI.js} +1 -1
- package/dist/cdn/{G6V653H2.js → 5CBLAWTC.js} +1 -1
- package/dist/cdn/5RHV5HXF.js +2 -0
- package/dist/cdn/{RHCRPJWS.js → 5SKCVK2P.js} +1 -1
- package/dist/cdn/5TY55CJN.js +2 -0
- package/dist/cdn/{2JAJY2VO.js → 5VAV267L.js} +1 -1
- package/dist/cdn/63C5KHJE.js +2 -0
- package/dist/cdn/{E3NOMS5M.js → 66PLI3XK.js} +1 -1
- package/dist/cdn/6MVERAK7.js +2 -0
- package/dist/cdn/{2YZWRFCI.js → 6XAFP5OI.js} +1 -1
- package/dist/cdn/{4NW3MEKV.js → 7GOPVQZP.js} +1 -1
- package/dist/cdn/{A2Z4NCPQ.js → 7HOK3ICE.js} +1 -1
- package/dist/cdn/{6U626CTA.js → 7M6OSITT.js} +1 -1
- package/dist/cdn/{Z2XXKHIS.js → AEPP4WJM.js} +1 -1
- package/dist/cdn/{G2C2DUPW.js → AJ5H2JMU.js} +1 -1
- package/dist/cdn/{BKD7JSV2.js → AXKMKCEW.js} +1 -1
- package/dist/cdn/{FJ3I3AJE.js → AYHYABMC.js} +1 -1
- package/dist/cdn/BGPQQ2RK.js +2 -0
- package/dist/cdn/{5HZNBMW6.js → C5FTQSU6.js} +1 -1
- package/dist/cdn/CB5XUOOF.js +2 -0
- package/dist/cdn/{XQE23XTL.js → CHZFGIWM.js} +1 -1
- package/dist/cdn/DCIJJNO3.js +2 -0
- package/dist/cdn/{CSRZ3UYP.js → EHHFEPC2.js} +1 -1
- package/dist/cdn/EJZ4LX4Z.js +2 -0
- package/dist/cdn/{MFLYO7PJ.js → FF2IT35O.js} +1 -1
- package/dist/cdn/{IO6RGF5S.js → FTT33ZZJ.js} +1 -1
- package/dist/cdn/{4BPXIHDF.js → HA35MMMF.js} +1 -1
- package/dist/cdn/{XQFUL7N2.js → HOOOFVRH.js} +1 -1
- package/dist/cdn/{OR6T5SB3.js → HXFKOELM.js} +1 -1
- package/dist/cdn/{K2XSYDAP.js → I57CRKF7.js} +1 -1
- package/dist/cdn/JOQEFKCE.js +2 -0
- package/dist/cdn/JRRPPRMV.js +2 -0
- package/dist/cdn/{VKMH5MIX.js → K5Q4ZROX.js} +1 -1
- package/dist/cdn/{ZC5KXI4B.js → KGTBXDD2.js} +1 -1
- package/dist/cdn/{L4Y2HIOC.js → LFRULIBL.js} +1 -1
- package/dist/cdn/{TT6IOLZG.js → LMFWH7YP.js} +1 -1
- package/dist/cdn/{OFWQLRQE.js → LVUKORME.js} +1 -1
- package/dist/cdn/{HNJ4WG6S.js → MSP6STQ7.js} +1 -1
- package/dist/cdn/{ZKY5WVYH.js → NBEOY6GP.js} +1 -1
- package/dist/cdn/{I27LRUII.js → NOI7ZXEF.js} +1 -1
- package/dist/cdn/{XSEZCHSU.js → O3YZLC7G.js} +1 -1
- package/dist/cdn/OQ3OHDEB.js +2 -0
- package/dist/cdn/{Z26C36RJ.js → P3GNUA6J.js} +1 -1
- package/dist/cdn/P7ZCCDSD.js +2 -0
- package/dist/cdn/{XKNKWC5Z.js → Q3VELMMC.js} +1 -1
- package/dist/cdn/{ATQT25TR.js → QKGHH3FS.js} +1 -1
- package/dist/cdn/{W2UVKYOW.js → QPPMRBBW.js} +1 -1
- package/dist/cdn/R5DXQCCJ.js +2 -0
- package/dist/cdn/{O24CJZKB.js → R7XRTDY6.js} +1 -1
- package/dist/cdn/RA75BDVB.js +2 -0
- package/dist/cdn/{BKKSIY4O.js → REWOUYVV.js} +1 -1
- package/dist/cdn/{NBJIISZZ.js → RLI7T32U.js} +1 -1
- package/dist/cdn/{6K4H4EN2.js → SQCDEL42.js} +1 -1
- package/dist/cdn/T333LJ4L.js +2 -0
- package/dist/cdn/{3S6ORDJI.js → T7NY3ZIG.js} +1 -1
- package/dist/cdn/{44QEELTO.js → TKTMO2NO.js} +1 -1
- package/dist/cdn/{7BHYNG4B.js → TNRHHR67.js} +1 -1
- package/dist/cdn/{5WGAYGZM.js → TVFDFN6V.js} +1 -1
- package/dist/cdn/{I6IRHXWR.js → ULTSLT4L.js} +1 -1
- package/dist/cdn/VLUI423B.js +2 -0
- package/dist/cdn/{6NENX7Z3.js → VRGGPMVR.js} +1 -1
- package/dist/cdn/{IN4JPZTY.js → VXDDXPD7.js} +1 -1
- package/dist/cdn/{KAPXKRSU.js → WFU6WGTW.js} +1 -1
- package/dist/cdn/{TIHS6NZD.js → WH54CSSU.js} +1 -1
- package/dist/cdn/YO3CD3O5.js +2 -0
- package/dist/cdn/{MTY3QVCM.js → YRLNSQ23.js} +1 -1
- package/dist/cdn/{YZTBAUIO.js → YTVLEHJT.js} +1 -1
- package/dist/cdn/{BTWTESBF.js → Z44I2CVX.js} +1 -1
- package/dist/cdn/ZACZJ2SR.js +2 -0
- package/dist/cdn/{M5PPX4ZX.js → ZJCG6JI7.js} +1 -1
- package/dist/cdn/ZMVW64CR.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/loadClassificationData.js +10 -11
- package/dist/components/arcgis-portal-navigation/index.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +150 -16
- package/dist/utils/generateEmbeddings.d.ts +7 -0
- package/dist/utils/semanticSearch.d.ts +60 -0
- package/package.json +7 -7
- package/dist/cdn/23CP74IB.js +0 -2
- package/dist/cdn/5DVLAKTA.js +0 -2
- package/dist/cdn/6ZKYBUII.js +0 -2
- package/dist/cdn/7XBAKSHJ.js +0 -2
- package/dist/cdn/AC63PIGJ.js +0 -2
- package/dist/cdn/AICPYLWE.js +0 -4
- package/dist/cdn/BQFVNCSA.js +0 -2
- package/dist/cdn/DG6ZTIXN.js +0 -2
- package/dist/cdn/DWGYWUVJ.js +0 -2
- package/dist/cdn/E5VN6XPP.js +0 -2
- package/dist/cdn/FNWM2SRX.js +0 -2
- package/dist/cdn/I6WGLIEC.js +0 -2
- package/dist/cdn/IM7DWCQW.js +0 -2
- package/dist/cdn/ISHV5HNX.js +0 -2
- package/dist/cdn/JQWP52DP.js +0 -2
- package/dist/cdn/OVQQO7DF.js +0 -2
- package/dist/cdn/Q2CR4M4G.js +0 -2
- package/dist/cdn/QXBFIAOL.js +0 -2
- package/dist/cdn/RQTLNBI2.js +0 -2
- package/dist/cdn/RW2EKBM4.js +0 -2
- package/dist/cdn/XRMYRNQY.js +0 -2
- package/dist/cdn/YEQE6MNG.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { canAddField, canDeleteField } from "./utils/fieldAddDelete.js";
|
|
2
|
+
export { generateEmbeddings } from "./utils/generateEmbeddings.js";
|
|
3
|
+
export { searchCatalog } from "./utils/semanticSearch.js";
|
|
4
|
+
export { type SemanticSearchEmbedding, type SemanticSearchItem, type SemanticSearchMatch, type SemanticSearchOptions, type SemanticSearchResult } from "./utils/semanticSearch.js";
|
|
2
5
|
export { type FieldDeleteOptions, type UserItemInfo } from "./utils/types.js";
|
|
3
6
|
export { type PortalAssistantTools } from "./components/arcgis-portal-ai-assistant/types/assistantTools.js";
|
|
4
7
|
export { type PortalAssistantEntityToolPresets } from "./components/arcgis-portal-ai-assistant/types/portalEntityTools.js";
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,158 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { g as
|
|
3
|
-
import { e as
|
|
4
|
-
import { FunctionTool as
|
|
5
|
-
import
|
|
6
|
-
import { a as
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { g as L, s as $ } from "./chunks/runtime.js";
|
|
3
|
+
import { e as G, c as V } from "./chunks/fieldAddDelete.js";
|
|
4
|
+
import { FunctionTool as S } from "@arcgis/ai-components/agent-utils/tools/FunctionTool.js";
|
|
5
|
+
import g from "zod";
|
|
6
|
+
import { a as E } from "./chunks/item.js";
|
|
7
|
+
async function M(e) {
|
|
8
|
+
if (e.length === 0)
|
|
9
|
+
return [];
|
|
10
|
+
const [{ getEmbeddings: t }, { default: r }] = await Promise.all([
|
|
11
|
+
import("@arcgis/ai-components/orchestrator/embeddings/getEmbeddings.js"),
|
|
12
|
+
import("@arcgis/core/portal/Portal.js")
|
|
13
|
+
]);
|
|
14
|
+
return await r.getDefault().load(), await t(e);
|
|
15
|
+
}
|
|
16
|
+
const h = 1.2, w = 0.75, v = 60, I = 0.65, b = /* @__PURE__ */ new WeakMap();
|
|
17
|
+
async function K(e, t, r = {}) {
|
|
18
|
+
if (r.topN !== void 0 && !Number.isFinite(r.topN))
|
|
19
|
+
throw new Error("topN must be a finite number.");
|
|
20
|
+
const i = new Map(t.map((a) => [a.id, a])), o = F(y(e), x(t));
|
|
21
|
+
let s = [], n;
|
|
22
|
+
if (e.trim() && t.length)
|
|
23
|
+
if (!r.loadEmbeddings && !r.embeddings)
|
|
24
|
+
n = "Catalog embeddings are unavailable.";
|
|
25
|
+
else
|
|
26
|
+
try {
|
|
27
|
+
const [a, c] = await Promise.all([
|
|
28
|
+
(r.embedQuery ?? C)(e),
|
|
29
|
+
r.loadEmbeddings ? r.loadEmbeddings() : r.embeddings
|
|
30
|
+
]);
|
|
31
|
+
if (!c)
|
|
32
|
+
throw new Error("Catalog embeddings are unavailable.");
|
|
33
|
+
s = q(a, c, i);
|
|
34
|
+
} catch (a) {
|
|
35
|
+
n = `Semantic search is unavailable: ${a instanceof Error ? a.message : String(a)}`;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
degraded: n !== void 0,
|
|
39
|
+
...n ? { degradedReason: n } : {},
|
|
40
|
+
matches: D(o, s, i, r.topN ?? 5)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function x(e) {
|
|
44
|
+
const t = b.get(e);
|
|
45
|
+
if (t)
|
|
46
|
+
return t;
|
|
47
|
+
const r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), o = e.map((n) => {
|
|
48
|
+
if (r.has(n.id))
|
|
49
|
+
throw new Error(`Duplicate item id "${n.id}" in search catalog.`);
|
|
50
|
+
r.add(n.id);
|
|
51
|
+
const a = /* @__PURE__ */ new Map();
|
|
52
|
+
f(a, n.title, 3), f(a, n.description, 1);
|
|
53
|
+
for (const c of n.hints ?? [])
|
|
54
|
+
f(a, c, 2);
|
|
55
|
+
for (const c of a.keys())
|
|
56
|
+
i.set(c, (i.get(c) ?? 0) + 1);
|
|
57
|
+
return {
|
|
58
|
+
id: n.id,
|
|
59
|
+
length: [...a.values()].reduce((c, d) => c + d, 0),
|
|
60
|
+
termFrequencies: a
|
|
61
|
+
};
|
|
62
|
+
}), s = {
|
|
63
|
+
averageDocumentLength: o.length ? o.reduce((n, a) => n + a.length, 0) / o.length : 0,
|
|
64
|
+
documentFrequency: i,
|
|
65
|
+
documents: o
|
|
66
|
+
};
|
|
67
|
+
return b.set(e, s), s;
|
|
68
|
+
}
|
|
69
|
+
function f(e, t, r) {
|
|
70
|
+
for (const i of y(t))
|
|
71
|
+
e.set(i, (e.get(i) ?? 0) + r);
|
|
72
|
+
}
|
|
73
|
+
function y(e) {
|
|
74
|
+
return e.toLowerCase().split(/[^a-z0-9]+/u).filter(Boolean);
|
|
75
|
+
}
|
|
76
|
+
function F(e, t) {
|
|
77
|
+
const r = new Set(e), i = t.documents.length;
|
|
78
|
+
return t.documents.map(({ id: o, length: s, termFrequencies: n }) => {
|
|
79
|
+
let a = 0;
|
|
80
|
+
for (const c of r) {
|
|
81
|
+
const d = n.get(c), u = t.documentFrequency.get(c);
|
|
82
|
+
if (!d || !u)
|
|
83
|
+
continue;
|
|
84
|
+
const l = Math.log(1 + (i - u + 0.5) / (u + 0.5)), m = h * (1 - w + w * (s / t.averageDocumentLength));
|
|
85
|
+
a += l * (d * (h + 1) / (d + m));
|
|
86
|
+
}
|
|
87
|
+
return { id: o, score: a };
|
|
88
|
+
}).filter(({ score: o }) => o > 0).sort(k);
|
|
89
|
+
}
|
|
90
|
+
function q(e, t, r) {
|
|
91
|
+
const i = /* @__PURE__ */ new Map();
|
|
92
|
+
p(e);
|
|
93
|
+
for (const { itemId: o, vector: s } of t) {
|
|
94
|
+
if (!r.has(o))
|
|
95
|
+
continue;
|
|
96
|
+
const n = P(e, s);
|
|
97
|
+
n > (i.get(o) ?? -1 / 0) && i.set(o, n);
|
|
98
|
+
}
|
|
99
|
+
return [...i.entries()].filter(([, o]) => o >= I).map(([o, s]) => ({ id: o, score: s })).sort(k);
|
|
100
|
+
}
|
|
101
|
+
function p(e) {
|
|
102
|
+
if (!e.length || e.some((t) => !Number.isFinite(t)) || e.every((t) => t === 0))
|
|
103
|
+
throw new Error("Embedding vectors must be non-empty, finite, and have non-zero magnitude.");
|
|
104
|
+
}
|
|
105
|
+
function P(e, t) {
|
|
106
|
+
if (p(t), e.length !== t.length)
|
|
107
|
+
throw new Error("Query and catalog embedding dimensions must match.");
|
|
108
|
+
let r = 0, i = 0, o = 0;
|
|
109
|
+
for (let n = 0; n < e.length; n += 1)
|
|
110
|
+
r += e[n] * t[n], i += e[n] ** 2, o += t[n] ** 2;
|
|
111
|
+
const s = r / (Math.sqrt(i) * Math.sqrt(o));
|
|
112
|
+
if (!Number.isFinite(s))
|
|
113
|
+
throw new Error("Embedding vector magnitudes are outside the supported numeric range.");
|
|
114
|
+
return s;
|
|
115
|
+
}
|
|
116
|
+
async function C(e) {
|
|
117
|
+
const t = await M([e]);
|
|
118
|
+
if (t.length !== 1)
|
|
119
|
+
throw new Error("Expected one query embedding.");
|
|
120
|
+
return t[0];
|
|
121
|
+
}
|
|
122
|
+
function D(e, t, r, i) {
|
|
123
|
+
const o = /* @__PURE__ */ new Map();
|
|
124
|
+
for (const [s, n] of [
|
|
125
|
+
["keyword", e],
|
|
126
|
+
["semantic", t]
|
|
127
|
+
])
|
|
128
|
+
for (const [a, { id: c, score: d }] of n.entries()) {
|
|
129
|
+
const u = a + 1, l = r.get(c), m = o.get(c) ?? { item: l, score: 0 };
|
|
130
|
+
m.score += 1 / (v + u), s === "keyword" ? (m.keywordRank = u, m.keywordScore = d) : (m.semanticRank = u, m.semanticScore = d), o.set(c, m);
|
|
131
|
+
}
|
|
132
|
+
return [...o.values()].sort(
|
|
133
|
+
(s, n) => n.score - s.score || (n.semanticScore ?? 0) - (s.semanticScore ?? 0) || (n.keywordScore ?? 0) - (s.keywordScore ?? 0) || s.item.id.localeCompare(n.item.id)
|
|
134
|
+
).slice(0, Math.max(0, i));
|
|
135
|
+
}
|
|
136
|
+
function k(e, t) {
|
|
137
|
+
return t.score - e.score || e.id.localeCompare(t.id);
|
|
138
|
+
}
|
|
139
|
+
const N = g.object({
|
|
140
|
+
itemId: g.string().trim().regex(/^[a-f0-9]{32}$/iu).describe("The 32-character hexadecimal Portal item ID.")
|
|
9
141
|
});
|
|
10
|
-
function
|
|
11
|
-
return new
|
|
142
|
+
function Q(e) {
|
|
143
|
+
return new S({
|
|
12
144
|
name: "getItem",
|
|
13
145
|
description: "Retrieves current metadata for a Portal item by ID. Returns result metadata or an error; an error does not mean the item is private or missing. This tool is read-only.",
|
|
14
|
-
inputSchema:
|
|
15
|
-
execute: async ({ itemId:
|
|
146
|
+
inputSchema: N,
|
|
147
|
+
execute: async ({ itemId: t }) => await E(e, t)
|
|
16
148
|
});
|
|
17
149
|
}
|
|
18
150
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
151
|
+
G as canAddField,
|
|
152
|
+
V as canDeleteField,
|
|
153
|
+
Q as createGetItemTool,
|
|
154
|
+
M as generateEmbeddings,
|
|
155
|
+
L as getAssetPath,
|
|
156
|
+
K as searchCatalog,
|
|
157
|
+
$ as setAssetPath
|
|
24
158
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Searchable catalog fields. Additional consumer fields are preserved in matches. */
|
|
2
|
+
export interface SemanticSearchItem {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
hints?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Multiple vectors may refer to one item; its strongest similarity is used. */
|
|
10
|
+
export interface SemanticSearchEmbedding {
|
|
11
|
+
itemId: string;
|
|
12
|
+
vector: readonly number[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface SemanticSearchMatch<T extends SemanticSearchItem> {
|
|
16
|
+
item: T;
|
|
17
|
+
/** Reciprocal Rank Fusion ordering score, not a confidence or probability. */
|
|
18
|
+
score: number;
|
|
19
|
+
keywordRank?: number;
|
|
20
|
+
keywordScore?: number;
|
|
21
|
+
semanticRank?: number;
|
|
22
|
+
semanticScore?: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface SemanticSearchResult<T extends SemanticSearchItem> {
|
|
26
|
+
/** True when semantic ranking is unavailable and only keywords were used. */
|
|
27
|
+
degraded: boolean;
|
|
28
|
+
degradedReason?: string;
|
|
29
|
+
matches: SemanticSearchMatch<T>[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface SemanticSearchOptions {
|
|
33
|
+
/** Ready-to-use catalog vectors. Without vectors or a loader, search is keyword-only. */
|
|
34
|
+
embeddings?: readonly SemanticSearchEmbedding[];
|
|
35
|
+
/** Optional loader for callers that want to wait for catalog vectors. Takes precedence over embeddings. */
|
|
36
|
+
loadEmbeddings?: () => Promise<readonly SemanticSearchEmbedding[]>;
|
|
37
|
+
/** Defaults to the SDK's signed-in default Portal session. */
|
|
38
|
+
embedQuery?: (query: string) => Promise<readonly number[]>;
|
|
39
|
+
/** Maximum distinct matches. Defaults to 5; non-positive values return no matches. */
|
|
40
|
+
topN?: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Searches a consumer-supplied catalog with weighted BM25 keywords and cosine
|
|
45
|
+
* similarity, combining both rankings with Reciprocal Rank Fusion.
|
|
46
|
+
*
|
|
47
|
+
* Titles, hints, and descriptions have keyword weights of 3, 2, and 1.
|
|
48
|
+
* Semantic matches require a cosine similarity of at least 0.65. Ties are
|
|
49
|
+
* resolved by semantic score, keyword score, then item ID.
|
|
50
|
+
*
|
|
51
|
+
* Catalogs must have unique IDs. Treat the catalog as immutable and pass a new
|
|
52
|
+
* array when its searchable fields change; keyword indexes are cached by array.
|
|
53
|
+
* Embedding failures return keyword matches with explicit degraded diagnostics.
|
|
54
|
+
* Catalog embedding generation and caching are owned by the caller.
|
|
55
|
+
*
|
|
56
|
+
* @param query
|
|
57
|
+
* @param catalog
|
|
58
|
+
* @param options
|
|
59
|
+
*/
|
|
60
|
+
export function searchCatalog<T extends SemanticSearchItem>(query: string, catalog: readonly T[], options?: SemanticSearchOptions): Promise<SemanticSearchResult<T>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/portal-components",
|
|
3
|
-
"version": "6.0.0-next.
|
|
3
|
+
"version": "6.0.0-next.14",
|
|
4
4
|
"description": "ArcGIS Portal Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
],
|
|
39
39
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@arcgis/ai-components": "6.0.0-next.
|
|
42
|
-
"@arcgis/lumina": "6.0.0-next.
|
|
43
|
-
"@arcgis/lumina-toolkit": "6.0.0-next.
|
|
44
|
-
"@arcgis/map-components": "6.0.0-next.
|
|
45
|
-
"@arcgis/toolkit": "6.0.0-next.
|
|
41
|
+
"@arcgis/ai-components": "6.0.0-next.14",
|
|
42
|
+
"@arcgis/lumina": "6.0.0-next.14",
|
|
43
|
+
"@arcgis/lumina-toolkit": "6.0.0-next.14",
|
|
44
|
+
"@arcgis/map-components": "6.0.0-next.14",
|
|
45
|
+
"@arcgis/toolkit": "6.0.0-next.14",
|
|
46
46
|
"@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
|
|
47
47
|
"@langchain/core": "^1.2.9",
|
|
48
48
|
"@langchain/langgraph": "^1.4.14",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"zod": "^4.4.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@arcgis/core": "6.0.0-next.
|
|
56
|
+
"@arcgis/core": "6.0.0-next.14",
|
|
57
57
|
"@esri/calcite-components": "^5.2.0-next.89"
|
|
58
58
|
},
|
|
59
59
|
"css.customData": [
|
package/dist/cdn/23CP74IB.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as P}from"./YG6ZGQ46.js";import c from"./TZ6HFMZZ.js";import b from"./TIPQ2ZWK.js";import{a as K}from"./TWCJJCPC.js";import{a as R}from"./4XIHI6AF.js";import{a as M}from"./Z6R3C4AK.js";import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import{b as N}from"./2FKNF2ZK.js";import{a as J}from"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{L as _,M as L,O as x,R as T,j as d,k as O,w as A}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([p,{substitute:w},,,{f:E,g:H,h:W,i:B}])=>{var C=1260*1e3,q=2500;function D(o,t="_blank",i=582,e=670){let s=window.screenLeft??0,n=window.screenTop??0,a=window.innerWidth||document.documentElement.clientWidth||window.screen.width,r=window.innerHeight||document.documentElement.clientHeight||window.screen.height,c=a/2-i/2+s,l=r/2-e/2+n,u=window.open(o,t,`scrollbars=no, width=${i}, height=${e}, top=${l}, left=${c}`);return u?.focus(),u}function z(o){let t=p.findOAuthInfo(o.url),{locale:i="en",expiration:e=C}=t??{},s=new URLSearchParams({locale:i,client_id:"arcgisonline",response_type:"token",expiration:`${e}`,linkUserRequest:"true",showSocialLogins:"true",hideEnterpriseLogins:"false",force_login:"true",parent:window.location.origin,redirect_uri:`https://${o.portalHostname}/home/link_account_callback.html`,state:JSON.stringify({useMessage:!0})}),n=`https://${o.portalHostname}/sharing/oauth2/authorize?${s.toString()}`;D(n)}function y(o){let{config:t,token:i,clientId:e="arcgisonline",redirectToClientUri:s=!1,displaySignoutComplete:n=!1,clientUri:a}=o,r=new URLSearchParams({display:"iframe",client_id:e,...i&&{token:i},parent:window.location.origin,redirect_uri:`${t.baseUrl}/home/check_sign_in_status.html`,state:JSON.stringify({signout:!0,origin:window.location.origin,accountOrigin:`${t.restBaseUrl}/`,redirectToClientUri:s,displaySignoutComplete:n,...a&&{redirectUri:a}})}),c=`${t.restBaseUrl}/oauth2/signout?${r.toString()}`,l=document.createElement("iframe");l.src=c,l.style.display="none",document.body.appendChild(l)}function F(o,t,i){let e=h(o.orgUrlKey,t),s=p.findOAuthInfo(e),{appId:n,locale:a="en",expiration:r=C}=s??{},c=v(o.provider),l=new URLSearchParams({locale:a,client_id:i??n??"arcgisonline",response_type:"token",expiration:`${r}`,parent:window.location.origin,...c==="social"&&{socialLoginProviderName:o.provider},...c==="default"&&{prepopulatedusername:o.username},force_login:"true",redirect_uri:`${e}/home/sign_in_callback.html`,state:JSON.stringify({user:o.username,server:e,portalUrl:e,origin:window.location.origin})}),u=`${I(o,t)}?${l.toString()}`;D(u)}function G({accounts:o,clientId:t="arcgisonline",usersToFilter:i=[],accountsToFilter:e=""}){let s={};return o.reduce((n,a)=>{let r={disabled:a.disabled??!1,allowed:a.clientAppAccessAllowed??!0};return n[a.username]=r,(i.includes(a.username)||i.includes(a.username.toLowerCase())||e==="org"&&a.orgUrlKey||t==="esriapps"&&a.userType!=="both")&&(r.allowed=!1),n},s),s}function Q({account:o,credential:t,clientId:i,portal:e,redirectUri:s}){let n=v(o.provider),a=I(o,e),r=s||j(o,e),c=new URLSearchParams({client_id:i,redirect_uri:r,parent:window.location.origin,response_type:"token",force_login:"false",...t.userId&&{prepopulatedusername:t.userId},...n==="social"&&{socialLoginProviderName:o.provider},expiration:`${(t?.expires??Date.now()+C)-Date.now()}`});return`${a}?${c.toString()}`}function v(o){return V(o)?"social":o==="enterprise"?"enterprise":o.includes("oidc")?"oidc":"default"}function V(o){return["apple","facebook","github","google"].includes(o)}function I(o,t){let i=h(o.orgUrlKey,t).toLowerCase(),e=v(o.provider),s="";switch(e){case"social":s="social/";break;case"enterprise":s="saml/";break;case"oidc":s=`oidc/${o.provider.split("_")[1]}/`;break}return`${i}/sharing/rest/oauth2/${s}authorize`}function h(o,t){return o?.startsWith("https://")?o:o&&t.customBaseUrl?`https://${o}.${t.customBaseUrl}`:`https://${t.portalHostname}`}function j(o,t){return`${h(o.orgUrlKey,t)}/home/accountswitcher-callback.html`}function X(o,t){return p.findCredential(h(o.orgUrlKey,t),o.username)}function Y(o,t){let i=X(o,t);if(i)return i;let e=h(o.orgUrlKey,t),s=`${e}/home/check_sign_in_status.html#state=${JSON.stringify({origin:window.location.origin,server:e,orgKey:e})}`;Z(s,`iframe__for-${e}`)}function Z(o,t){let i=document.createElement("iframe");i.src=o,i.id=t,i.style.display="none",document.body.appendChild(i)}var S=100,b=class extends _{constructor(){super(),this.messages=J({blocking:!0}),this.targetUser="",this.targetToken="",this.accountAccess={},this.remainingSignouts=0,this.signoutHandle=0,this.linkedAccounts=[],this.loading=!1,this.signedInStatus={},this.showAssociatedAccountsWarning=!1,this.signedInAccounts=[],this.clientId="arcgisonline",this.signout=!1,this.signoutOptions={redirectToClientUri:!1,displaySignoutComplete:!1},this.arcgisAccountSwitch=A(),this.arcgisClose=A(),this.arcgisSignoutComplete=A(),this.listenOn(window,"message",this.handleMessageEvent)}static{this.properties={linkedAccounts:16,userAccounts:16,user:16,credential:16,alertOptions:16,loading:16,signedInStatus:16,showAssociatedAccountsWarning:16,signedInAccounts:16,portal:0,clientId:1,redirectUri:1,signout:5,signoutOptions:0}}static{this.styles=M}willUpdate(t){if(t.has("portal")&&(this.user=this.portal?.user),(t.has("portal")||t.has("user"))&&this.portal&&this.user){this.findLinkedUsers();return}if(t.has("linkedAccounts")||t.has("signedInStatus")){if(this.signout){let{signedInStatus:i,linkedAccounts:e,portal:s,signoutOptions:n,clientId:a,user:r,redirectUri:c}=this,l=Object.keys(i).filter(k=>i[k]!==null).map(k=>e.find(U=>U.username===k));this.remainingSignouts=l.length+1;let u=h(s.urlKey??"",s),f=`${u}/sharing/rest`,{displaySignoutComplete:m=!0,redirectToClientUri:g=!0}=n;l.length>0&&(m=!1,g=!1),this.loading=!0;let $=p.findCredential(u,r?.id||r?.username);y({displaySignoutComplete:m,redirectToClientUri:g,clientId:a,config:{baseUrl:u,restBaseUrl:f},token:$?.token,clientUri:g?c:void 0}),this.signoutHandle=window.setTimeout(()=>{this.remainingSignouts-=1,this.finishSignout({accountOrigin:u,redirectToClientUri:g,displaySignoutComplete:m})},q)}return}}handleMessageEvent(t){if(new URL(t.origin).hostname!=="localhost"&&(t.origin.endsWith(".arcgis.com")||t.origin===window.location.origin)){if(typeof t.data=="string"){JSON.parse(t.data).type==="token_exchange"&&this.handleExchangeTokenMessage(t);return}if("type"in t.data)switch(t.data.type){case"signin":this.handleSigninMessage(t);return;case"signout":this.handleSignoutMessage(t);return;case"linkUser":this.handleLinkUserMessage(t);return;case"token_exchange":this.handleExchangeTokenMessage(t);return}if("credential"in t.data){this.handleSigninMessage(t);return}this.handleCheckSignInStatusMessage(t)}}handleSignoutMessage(t){let{error:i,signout:e,accountOrigin:s,redirectToClientUri:n,displaySignoutComplete:a}=t.data;if(this.remainingSignouts-=1,i&&i!=="unknown"){console.error(i),this.showAlert("danger",this.messages.errors.signout);return}e&&(this.user=void 0,this.credential=void 0,this.finishSignout({accountOrigin:s,redirectToClientUri:n,displaySignoutComplete:a}))}handleSigninMessage(t){let{messages:i,clientId:e}=this,{error:s,status:n,state:a,access_token:r,ssl:c,expires_in:l}=t.data;if(s){console.error(s),this.showAlert("danger",i.errors.signin);return}if(n==="success"){let{portal:u,user:f,redirectUri:m}=this,g=this.linkedAccounts.find(U=>U.username===a.user);g?.orgUrlKey===this.portal.urlKey&&p.findCredential(`https://${u.portalHostname}`,f?.username)?.destroy();let $={server:a.portalUrl,userId:a.user,token:r,expires:Number(l)+Date.now(),ssl:c===void 0||c!=="false"};p.registerToken($);let k=Q({account:g,credential:$,clientId:e,portal:u,redirectUri:m});window.self!==window.top?window.top?.postMessage({type:"navigate",url:k}):this.arcgisAccountSwitch.emit({account:g,finishUrl:k})}}handleCheckSignInStatusMessage(t){let{success:i,orgKey:e,server:s,userId:n,token:a,expires:r,ssl:c}=t.data;e&&s&&i&&n&&a&&r&&c!==void 0&&(this.signedInStatus[n]={token:a,expires:r,ssl:c})}async handleLinkUserMessage(t){let{error:i,username:e,access_token:s}=t.data,{portal:n,user:a,linkedAccounts:r,messages:c}=this;if(i){if(i.toString().toLowerCase().includes("user denied your request"))return;this.showAlert("danger",c.errors.accessAccount);return}if(e===a?.username){this.showAlert("danger",c.errors.selfLink);return}if(r.find(u=>u.username===e)){this.showAlert("danger",w(c.errors.alreadyLinked,{username:e}));return}let l=await H(n,e,s);if(l?.length){this.userAccounts=l,this.targetUser=e??"",this.targetToken=s??"",this.showAssociatedAccountsWarning=!0;return}this.linkAccount(e,s)}handleExchangeTokenMessage(t){let i=typeof t.data=="string"?JSON.parse(t.data):t.data;if(!(i.type&&i.type!=="token_exchange")){if(i.error)console.error(i);else if(i.status==="success"&&this.targetUser){let{portal:e,linkedAccounts:s,targetUser:n,clientId:a}=this,r=s.find(m=>m.username===n);if(!r)return;let c=j(r,e),l=h(r.orgUrlKey,e),u=new URLSearchParams({response_type:"token",client_id:a,redirect_uri:c,state:JSON.stringify({user:r.username,portalUrl:l})}),f=`${I(r,e)}?${u.toString()}`;window.opener?(window.opener.location.href=f,window.close()):window.location.href=f}}}finishSignout({accountOrigin:t,redirectToClientUri:i,displaySignoutComplete:e}){this.signoutHandle&&window.clearTimeout(this.signoutHandle),t===window.location.origin&&p.destroyCredentials(),console.info("Signout complete",t,i,e),this.remainingSignouts<=0&&this.arcgisSignoutComplete.emit({accountOrigin:t,redirectToClientUri:i,displaySignoutComplete:e})}async findLinkedUsers(){if(this.loading=!0,!this.portal||!this.user){this.linkedAccounts=[],this.loading=!1;return}this.linkedAccounts=await E(this.portal,this.user),this.linkedAccounts.length&&(this.signedInStatus=this.linkedAccounts.filter(t=>t.orgUrlKey!==this.portal.urlKey).reduce((t,i)=>(t[i.username]=Y(i,this.portal)??null,t),{}),this.accountAccess=G({accounts:this.linkedAccounts,clientId:this.clientId})),this.loading=!1}async linkAccount(t,i){let{portal:e,user:s}=this;if(!e||!s)return;let n=await W({portal:e,user:s,targetUser:t,targetToken:i}),{messages:a}=this;if(n.error){this.showAlert("danger",w(a.errors.linkAccount,{username:t})),this.targetUser="",this.userAccounts=[];return}let r=this.userAccounts?.length?a.success.linkAccountMultiple:a.success.linkAccount;this.showAlert("success",w(r,{username:t})),this.targetUser="",this.userAccounts=[],await N(350),this.findLinkedUsers()}async unlinkAccount(t){if(!this.portal||!this.user)return;let{messages:i,portal:e,user:s}=this,{success:n}=await B({portal:e,user:s,linkedUsername:t.username});n?this.showAlert("success",w(i.success.unlinkAccount,{username:t.username})):this.showAlert("danger",w(i.errors.unlinkAccount,{username:t.username})),await this.findLinkedUsers()}startAccountLink(){z(this.portal)}switchAccount(t){let{portal:i,user:e,clientId:s}=this;if(!i||!e||!t)return;let n=h(e.sourceJSON.orgUrlKey??"",i),a=p.findCredential(n,e.id||e.username);a&&y({config:{baseUrl:n,restBaseUrl:`${n}/sharing/rest`},token:a?.token,clientId:s}),F(t,i,s)}signoutAll(t){let{portal:i,signedInStatus:e,clientId:s}=this;t.forEach(n=>{let a=h(n.orgUrlKey,i),r=`${a}/sharing/rest`,c=e[n.username];y({config:{baseUrl:a,restBaseUrl:r},token:c?.token,clientId:s})})}showAlert(t,i,e){this.alertOptions={kind:t,title:e,message:i}}showUnlinkConfirmation(t){let{messages:i}=this;this.alertOptions={kind:"danger",icon:"exclamation-mark-triangle-f",title:i.unlinkAccount,message:i.unlinkWarning,actions:[{text:i.unlink,kind:"danger",clickHandler:()=>{this.alertOptions=void 0,this.unlinkAccount(t)}}]}}render(){let{linkedAccounts:t,accountAccess:i,user:e,portal:s,messages:n,signout:a}=this;if(!s||!e)return null;if(a){let{signedInAccounts:r}=this;return r.length===0?d`<calcite-loader .label=${n.signingOut} .text=${n.signingOut}></calcite-loader>`:d`<arcgis-portal-account-switcher-signout .portal=${s} .signedInAccounts=${r} @arcgisSignOutSwitchAccount=${c=>{this.switchAccount(c.detail.account)}} @arcgisSignOutAll=${()=>{this.signoutAll(r)}} @arcgisSignOutCloseDialog=${()=>{this.arcgisClose.emit()}}></arcgis-portal-account-switcher-signout>`}return d`<calcite-dialog .heading=${n.switchAccounts} heading-level=2 scale=m width=s open modal .loading=${this.loading} outside-close-disabled @calciteDialogClose=${()=>{this.arcgisClose.emit()}}><calcite-block .heading=${n.currentAccount} heading-level=3 .description=${n.signedInAs} expanded class="current-account-block" tabindex=-1>${K(e.id??e.username,d`<calcite-block class="current-account" .label=${s.urlKey?`${e.username}, ${s.name}`:e.username} heading-level=4 .heading=${e.username} .description=${s.urlKey?`${e.fullName??e.username}, ${s.name}`:e.fullName??e.username}><calcite-avatar slot=content-start inert .fullName=${e.fullName??void 0} .username=${e.username} .userId=${e.id} .thumbnail=${R(e,s)??void 0}></calcite-avatar></calcite-block>`)}</calcite-block>${t.length>0?d`<calcite-block .heading=${n.linkedAccounts} heading-level=3 .description=${n.linkedAccountActions} expanded class="linked-accounts-block"><calcite-button slot=content-end icon-start=plus class="link-account-button" @click=${()=>this.startAccountLink()} .disabled=${t.length>=S}>${n.addAccount}</calcite-button><arcgis-portal-account-switcher-list .portal=${s} .linkedAccounts=${t} .accountAccess=${i} .signedInUsers=${Object.keys(this.signedInStatus).filter(r=>this.signedInStatus[r]!==null)} interactive @arcgisAccountListSwitch=${r=>{this.switchAccount(r.detail.account)}} @arcgisAccountListUnlink=${r=>{this.showUnlinkConfirmation(r.detail.account)}}></arcgis-portal-account-switcher-list></calcite-block>`:d`<calcite-block .heading=${n.linkedAccounts} heading-level=3 expanded class="empty-accounts-block"><div class="empty-accounts-info"><svg class="empty-accounts-icon" width=48 height=48 viewBox="0 0 48 48" fill=none xmlns=http://www.w3.org/2000/svg>${O`<path d=${P.couple??x} fill=currentColor />`}</svg><h4>${n.emptyListTitle}</h4><p>${n.emptyList}</p><calcite-button icon-start=plus class="link-account-button" @click=${()=>this.startAccountLink()} .disabled=${t.length>=S}>${n.linkAccount}</calcite-button></div></calcite-block>`}<calcite-notice kind=info .open=${t.length>=S}><div slot=message>${n.maxAccounts}</div></calcite-notice><calcite-alert .label=${n.alertLabel} slot=alerts .autoClose=${this.alertOptions?.kind!=="danger"} auto-close-duration=fast placement=bottom .kind=${this.alertOptions?.kind} .icon=${this.alertOptions?.icon} .open=${!!this.alertOptions} @calciteAlertClose=${()=>{this.alertOptions=void 0}}>${this.alertOptions?.title&&d`<h4 slot=title class="alert-title">${this.alertOptions.title}</h4>`||""}${this.alertOptions?.message&&d`<p slot=message class=${L({"alert-message":!0,"short-message":!!this.alertOptions?.actions?.length})}>${this.alertOptions.message}</p>`||""}${this.alertOptions?.actions?.map(r=>d`<calcite-button slot=actions-end .kind=${r.kind} .appearance=${r.appearance} @click=${r.clickHandler}>${r.text}</calcite-button>`)}</calcite-alert></calcite-dialog>${this.showAssociatedAccountsWarning&&d`<arcgis-portal-account-switcher-accounts .portal=${s} .targetUser=${this.targetUser} .accounts=${this.userAccounts??[]} @arcgisAccountsLinkAll=${()=>{this.linkAccount(this.targetUser,this.targetToken)}} @arcgisAccountsCloseDialog=${()=>{this.showAssociatedAccountsWarning=!1}}></arcgis-portal-account-switcher-accounts>`||""}`}};T("arcgis-portal-account-switcher",b);return b},"identity/IdentityManager","intl",a,b,c)
|
package/dist/cdn/5DVLAKTA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import h from"./O24CJZKB.js";import"./SRWFOV5W.js";import"./JOUR2FB2.js";import g from"./A2Z4NCPQ.js";import"./4QYVBXZT.js";import f from"./WGCNE5CY.js";import"./4KTRAA2J.js";import d from"./IHB4RIMJ.js";import"./PKA745KL.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./TZ6HFMZZ.js";import b from"./TIPQ2ZWK.js";import"./TWCJJCPC.js";import"./4XIHI6AF.js";import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{R as e}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,r])=>{var t=class extends r{constructor(){super(...arguments),this.entityType="user",this.selected=null}static{this.properties={entityType:32,selected:0}}};e("arcgis-portal-user-picker",t);return t},a,b,c,d,f,g,h)
|
package/dist/cdn/6ZKYBUII.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import h from"./O24CJZKB.js";import"./SRWFOV5W.js";import"./JOUR2FB2.js";import g from"./A2Z4NCPQ.js";import"./4QYVBXZT.js";import f from"./WGCNE5CY.js";import"./4KTRAA2J.js";import d from"./IHB4RIMJ.js";import"./PKA745KL.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./TZ6HFMZZ.js";import b from"./TIPQ2ZWK.js";import"./TWCJJCPC.js";import"./4XIHI6AF.js";import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{R as e}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,r])=>{var t=class extends r{constructor(){super(...arguments),this.entityType="item",this.selected=null}static{this.properties={entityType:32,selected:0}}};e("arcgis-portal-item-picker",t);return t},a,b,c,d,f,g,h)
|
package/dist/cdn/7XBAKSHJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import b from"./6K4H4EN2.js";import a from"./ATQT25TR.js";import"./PKA745KL.js";import"./KV4ZZSNW.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{b:r}])=>{return r},a,b)
|
package/dist/cdn/AC63PIGJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import a from"./Z26C36RJ.js";import"./MTY3QVCM.js";import"./4KTRAA2J.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([a])=>{return a},a)
|
package/dist/cdn/AICPYLWE.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as Y}from"./OUMTV5H5.js";var X=globalThis,Z=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),kt=new WeakMap,I=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&kt.set(e,t))}return t}toString(){return this.cssText}},jt=s=>new I(typeof s=="string"?s:s+"",void 0,Et),Ce=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,r,n)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[n+1],s[0]);return new I(e,s,Et)},Ht=(s,t)=>{if(Z)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),r=X.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=e.cssText,s.appendChild(o)}},$t=Z?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return jt(e)})(s):s;var{is:we,defineProperty:Oe,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Se,getOwnPropertySymbols:Pe,getPrototypeOf:Ne}=Object,et=globalThis,Vt=et.trustedTypes,De=Vt?Vt.emptyScript:"",xe=et.reactiveElementPolyfillSupport,k=(s,t)=>s,tt={toAttribute(s,t){switch(t){case Boolean:s=s?De:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},j=(s,t)=>!we(s,t),zt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),et.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(t,o,e);r!==void 0&&Oe(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){let{get:r,set:n}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:r,set(i){let a=r?.call(this);n?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,o=[...Se(e),...Pe(e)];for(let r of o)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,r]of e)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let r=this._$Eu(e,o);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let r of o)e.unshift($t(r))}else t!==void 0&&e.push($t(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ht(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(r!==void 0&&o.reflect===!0){let n=(o.converter?.toAttribute!==void 0?o.converter:tt).toAttribute(e,o.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){let o=this.constructor,r=o._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let n=o.getPropertyOptions(r),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:tt;this._$Em=r;let a=i.fromAttribute(e,n.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,o,r=!1,n){if(t!==void 0){let i=this.constructor;if(r===!1&&(n=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??j)(n,e)||o.useDefault&&o.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:r,wrapped:n},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),n!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,n]of o){let{wrapped:i}=n,a=this[r];i!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[k("elementProperties")]=new Map,_[k("finalized")]=new Map,xe?.({ReactiveElement:_}),(et.reactiveElementVersions??=[]).push("2.1.2");var _t=globalThis,Bt=s=>s,st=_t.trustedTypes,Wt=st?st.createPolicy("lit-html",{createHTML:s=>s}):void 0,At="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,Ct="?"+A,Le=`<${Ct}>`,T=document,V=()=>T.createComment(""),z=s=>s===null||typeof s!="object"&&typeof s!="function",wt=Array.isArray,Qt=s=>wt(s)||typeof s?.[Symbol.iterator]=="function",bt=`[
|
|
3
|
-
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ft=/-->/g,qt=/>/g,w=RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,Kt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Ot=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),fs=Ot(1),ms=Ot(2),ys=Ot(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Jt=new WeakMap,O=T.createTreeWalker(T,129);function Xt(s,t){if(!wt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wt!==void 0?Wt.createHTML(t):t}var Zt=(s,t)=>{let e=s.length-1,o=[],r,n=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let l=s[a],c,u,h=-1,m=0;for(;m<l.length&&(i.lastIndex=m,u=i.exec(l),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Ft:u[1]!==void 0?i=qt:u[2]!==void 0?(Yt.test(u[2])&&(r=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=r??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,c=u[1],i=u[3]===void 0?w:u[3]==='"'?Kt:Gt):i===Kt||i===Gt?i=w:i===Ft||i===qt?i=H:(i=w,r=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";n+=i===H?l+Le:h>=0?(o.push(c),l.slice(0,h)+At+l.slice(h)+A+v):l+A+(h===-2?a:v)}return[Xt(s,n+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let n=0,i=0,a=t.length-1,l=this.parts,[c,u]=Zt(t,e);if(this.el=s.createElement(c,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=O.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith(At)){let m=u[i++],v=r.getAttribute(h).split(A),C=/([.?@])?(.*)/.exec(m);l.push({type:1,index:n,name:C[2],strings:v,ctor:C[1]==="."?rt:C[1]==="?"?nt:C[1]==="@"?it:P}),r.removeAttribute(h)}else h.startsWith(A)&&(l.push({type:6,index:n}),r.removeAttribute(h));if(Yt.test(r.tagName)){let h=r.textContent.split(A),m=h.length-1;if(m>0){r.textContent=st?st.emptyScript:"";for(let v=0;v<m;v++)r.append(h[v],V()),O.nextNode(),l.push({type:2,index:++n});r.append(h[m],V())}}}else if(r.nodeType===8)if(r.data===Ct)l.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(A,h+1))!==-1;)l.push({type:7,index:n}),h+=A.length-1}n++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let r=o!==void 0?e._$Co?.[o]:e._$Cl,n=z(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=r:e._$Cl=r),r!==void 0&&(t=S(s,r._$AS(s,t.values),r,o)),t}var ot=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,r=(t?.creationScope??T).importNode(e,!0);O.currentNode=r;let n=O.nextNode(),i=0,a=0,l=o[0];for(;l!==void 0;){if(i===l.index){let c;l.type===2?c=new L(n,n.nextSibling,this,t):l.type===1?c=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(c=new at(n,this,t)),this._$AV.push(c),l=o[++a]}i!==l?.index&&(n=O.nextNode(),i++)}return O.currentNode=T,r}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),z(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&z(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Xt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new ot(r,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=Jt.get(t.strings);return e===void 0&&Jt.set(t.strings,e=new B(t)),e}k(t){wt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,r=0;for(let n of t)r===e.length?e.push(o=new s(this.O(V()),this.O(V()),this,this.options)):o=e[r],o._$AI(n),r++;r<e.length&&(this._$AR(o&&o._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Bt(t).nextSibling;Bt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,r){let n=this.strings,i=!1;if(n===void 0)t=S(this,t,e,0),i=!z(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,l,c;for(t=n[0],l=0;l<n.length-1;l++)c=S(this,a[o+l],e,l),c===f&&(c=this._$AH[l]),i||=!z(c)||c!==this._$AH[l],c===d?t=d:t!==d&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}i&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},rt=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends P{constructor(t,e,o,r,n){super(t,e,o,r,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,r=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==d&&(o===d||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},te={M:At,P:A,A:Ct,C:1,L:Zt,R:ot,D:Qt,V:S,I:L,H:P,N:nt,U:it,B:rt,F:at},Re=_t.litHtmlPolyfillSupport;Re?.(B,L),(_t.litHtmlVersions??=[]).push("3.3.2");var lt=(s,t,e)=>{let o=e?.renderBefore??t,r=o._$litPart$;if(r===void 0){let n=e?.renderBefore??null;o._$litPart$=r=new L(t.insertBefore(V(),n),n,void 0,e??{})}return r._$AI(s),r};var Tt=globalThis,E=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Tt.litElementHydrateSupport?.({LitElement:E});var Ue=Tt.litElementPolyfillSupport;Ue?.({LitElement:E});(Tt.litElementVersions??=[]).push("4.2.2");var ee=new Set,se;var oe=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ps=(s,t,e,o)=>{let r=oe(t);if(o?.once){let i=`${s}${r}${e}`;if(ee.has(i))return;ee.add(i)}let n;if(o?.detail){n={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let l=new WeakRef(a);Object.defineProperty(n,i,{enumerable:!0,get(){return l.deref()}})}else n[i]=a;se?.log.interceptors?.forEach(i=>i(s,r,e,n)),console[s](`[${r}]: ${e}`,n)}else se?.log.interceptors?.forEach(i=>i(s,r,e)),console[s](`[${r}]: ${e}`)},re=s=>{let t=`[${oe(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},Ns=s=>`The property \`${s.toString()}\` is required but missing.`,Ds=s=>`The property \`${s.toString()}\` is empty but must have at least one element.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Me=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Rs=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],ht=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},ne=()=>N,R,Us=s=>{R!==s&&(R=s,queueMicrotask(()=>R===s?R=void 0:0))},Ie=()=>{let s=R;return R=void 0,s},ie=async(s,t)=>{let e=dt(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(r=>t(r,o))}return e.exports},ae=async s=>{let t=dt(s);return await t.ready,t},dt=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Me(s))return s;let o=Ie();if(o!==void 0)return o},ct=!1,Ms=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var le=(s,t)=>{let e=t>ke?je:t/He,o=0,r=setInterval(()=>{o+=e,o>=t&&(clearInterval(r),s())},e);return r},ke=4e3,je=2e3,He=4;var Ve=(s,t,e)=>{let o=Object.keys(s),r=o.length;U===void 0&&queueMicrotask(M),U??=new Map;let n=U.get(s);return n===void 0&&(n={callbacks:[],keyCount:r},U.set(s,n)),n.keyCount!==r&&(n.callbacks.forEach(i=>i(o)),n.callbacks=[],n.keyCount=r),n.callbacks.push(i=>{let a=c=>p(t,null,c),l=i[r];l===void 0?a(void 0):s[l]===e?a(l):a(void 0)}),e},U,M=()=>{U?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),U=void 0},ze=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((r,n)=>p(t,void 0,e===n?r:void 0)),e},Be=(s=[G(),...ne()],t,e)=>{let o=Array.isArray(s)?s:[s],r=o.length+1,n=i=>{r-=1,i!==void 0&&(r=Math.min(r,0)),r===0&&t(i)};o.forEach(i=>Ve(i,a=>n(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){ze(i,a=>n(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:r=>{s===""&&M();let n=new CustomEvent(s,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return s===""&&Be(void 0,r=>s=r.key,o),o},Fe=We.bind(null,""),de;de=q;var St=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#r=[],this.#n=[],this.#l=[],this.#c=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ht(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#r;#n;#l;#c;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(re(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),dt}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#r.push(t)}onUpdate(t){this.#n.push(t)}onUpdated(t){this.#l.push(t)}onDestroy(t){this.#c.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#r.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#n.forEach(ce,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#l.forEach(ce,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#c.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#i.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#i.push(r.remove)})}};function ce(s){p(s,void 0,this)}var he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,r,n){if(!((r==="exports"||r==="_exports")&&r in o&&o[r]===e)&&(r in o||r in Promise.prototype||typeof r=="symbol"))return typeof o=="function"?o[r]:Reflect.get(o,r,n)}},e=new Proxy(s,t);return e};var pe=St;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:qe}=te,ue=s=>s;var pt=s=>s.strings===void 0,fe=()=>document.createComment(""),Ks=(s,t,e)=>{let o=s._$AA.parentNode,r=t===void 0?s._$AB:t._$AA;if(e===void 0){let n=o.insertBefore(fe(),r),i=o.insertBefore(fe(),r);e=new qe(n,i,s,s.options)}else{let n=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let l;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(l=s._$AU)!==i._$AU&&e._$AP(l)}if(n!==r||a){let l=e._$AA;for(;l!==n;){let c=ue(l).nextSibling;ue(o).insertBefore(l,r),l=c}}}return e},Js=(s,t,e=s)=>(s._$AI(t,e),s),Ge={},me=(s,t=Ge)=>s._$AH=t,Qs=s=>s._$AH,Ys=s=>{s._$AR(),s._$AA.remove()};var Ke=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!pt(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return me(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},ut=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ye=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),Ye(t)}};function Je(s){this._$AN!==void 0?(ut(this),this._$AM=s,ye(this)):this._$AM=s}function Qe(s,t=!1,e=0){let o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(o))for(let n=e;n<o.length;n++)K(o[n],!1),ut(o[n]);else o!=null&&(K(o,!1),ut(o));else K(this,s)}var Ye=s=>{s.type==y.CHILD&&(s._$AP??=Qe,s._$AQ??=Je)},ft=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),ut(this))}setValue(t){if(pt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var fo=()=>new Nt,Nt=class{},Pt=new WeakMap,Dt=$(class extends ft{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Pt.get(t);e===void 0&&(e=new WeakMap,Pt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?Pt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Lt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Rt={};function Ut(){}function Mt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var Ze=(s,t)=>function(o,r){if(!globalThis.customElements)return;let i=(r??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[l,c="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=c.split(";"),C=h?h?.split(",").map(ts):void 0,vt=C?.map(([x])=>x),Q=class extends xt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=vt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!Q.B&&(Q.B=l(),Q.F()),super()}};customElements.define(a,Q)}},mt=Object.defineProperty,ts=s=>{let t=s.split(":");return t.length===1?[t[0],Y(t[0])]:t},es=globalThis.HTMLElement??Ut,xt=class extends es{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#r({a:e.A}):e.B.then(async o=>{await e.K.p,t.#r(await(o.default?.then(r=>typeof r=="function"?{a:r}:r)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])mt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])mt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])mt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Mt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Lt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#r(t){let e=this.constructor,o=e.L,r=this.#e,n=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);os(a),!e.A&&(e.A=n,customElements.define(i,n)),n.N=this;let c=document.createElement(i);n.N=void 0,this.#t=c,this.#e=c,this.#s.forEach(h=>c.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(r).forEach(ss,c);let u=this.isConnected;(u||this.G)&&(c.connectedCallback?.(),u||c.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ss([s,t]){this[s]=t}var os=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,n){e.setAttribute.call(this.el,r,n)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},t.hasAttribute=function(r){return e.hasAttribute.call(this.el,r)},mt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var yt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=gt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${gt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),M();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),ht(void 0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=le(t,rs)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},rs=1e3,gt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let r=!!t[o];r===this.st.has(o)||this.nt?.has(o)||(r?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",ns=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let r=t[o];if(r!=null){this.ft.add(o);let n=typeof r=="string"&&r.endsWith(ns);o.includes("-")||n?e.setProperty(o,n?r.slice(0,-11):r,n?Ee:""):e[o]=r}}return f}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new yt(this);let t=this,e=t.constructor,o=e.N,r=e.K.o,n=s.prototype.shouldUpdate;t.#r=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Ut,t.shouldUpdate!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),r&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Rt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,n=r?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?Y(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...r,hasChanged(a,l){let c=n(a,l);return i.c=c,c}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let r=this.K,n=super.getPropertyDescriptor(t,e,o);return o.d=n,{...n,get(){return r.t?.(this.#t.get(t)),n.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);n.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(M(),a?.S(t,i))}}}static{this.lumina=!0}static{Mt(this)}#t;#e;#s;#r;#n;#l;get elementInternals(){return this.#l??=this.el.attachInternals(),this.#l}connectedCallback(){this.hasAttribute("defer-hydration")||this.#c(!0)}#c(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#n=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(r=>{this.#r.reject(r),setTimeout(()=>{throw r})})):e&&this.requestUpdate()}#d(t){try{this.#n.clear(),this.constructor.K.r(this.#n,()=>super.update(t))}catch(e){throw this.#n.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#n?.destroy(),this.#n=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,n=t??(o===Rt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#c(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=n.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#i(){let t=this.el.G??Lt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(W(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(gt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(r=>!r.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#r.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#n?this.#d(t):super.update(t)}listen(t,e,o){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,o),()=>this.el.removeEventListener(t,r,o)))}listenOn(t,e,o,r){let n=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)))}async componentOnReady(){return await this.#r.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var Ae=s=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},o={...s,getAssetPath(r){let n=new URL(r,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(r,n){n.K=o,n.L=r,customElements.get(r)||customElements.define(r,n)}};return e(s.defaultAssetPath),o};var Sr=s=>typeof s=="object"&&s!=null?ve(s):s,Pr=s=>typeof s=="object"&&s!=null?$e(s):s;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Dt(this.#e)):Dt(t)}},Nr=$(It);var Dr=d;var xr=s=>{let t=document.createElement("div");return lt(s,t),t.firstElementChild};var J=Ae({defaultAssetPath:"https://jsdev.arcgis.com/6.0.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:Ir,getAssetPath:kr,setAssetPath:jr}=J;J.t=void 0;J.o=void 0;J.c=void 0;J.r=void 0;export{Rs as a,D as b,G as c,ht as d,ne as e,Us as f,Ms as g,Ce as h,j as i,fs as j,ms as k,f as l,d as m,lt as n,b as o,Ps as p,re as q,Ns as r,Ds as s,ze as t,Be as u,We as v,Fe as w,St as x,pe as y,Ze as z,y as A,$ as B,g as C,Ks as D,Js as E,me as F,Qs as G,Ys as H,Ke as I,fo as J,Dt as K,be as L,Sr as M,Pr as N,Dr as O,xr as P,J as Q,Ir as R,kr as S};
|
package/dist/cdn/BQFVNCSA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import c from"./L4Y2HIOC.js";import b from"./RHCRPJWS.js";import a from"./5HZNBMW6.js";import"./XQE23XTL.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import"./TWCJJCPC.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,{c:r}])=>{return r},"core/reactiveUtils","intl",a,b,c)
|
package/dist/cdn/DG6ZTIXN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as V}from"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{J as c,K as m,L as R,M as A,N as w,R as I,h as F,j as l,w as v}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([T,P,u,p,{intersectionExecute:O},g,d,E,x,y,L,b,z,G,j,U,B,W,D,M,J,$,_])=>{var q=F`.extent-picker-modal{z-index:1001}.extent-picker-content{display:flex;min-height:100%;height:100%}.side-panel{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;overflow-y:auto;max-height:100%;width:420px}.extent-button{margin-top:var(--calcite-spacing-lg)}.use-location-header{margin-top:var(--calcite-spacing-xxxl);margin-bottom:var(--calcite-spacing-lg)}.search-container{width:100%}.search-container .esri-search,.search-container arcgis-search{width:100%}.search-container calcite-autocomplete{width:100%}.map-panel{flex:1 1 0%;position:relative;display:flex}.map-loader{position:absolute;z-index:var(--calcite-z-index-1);top:50%;left:50%;transform:translate(-50%,-50%)}.map-container{flex:1 1 0%;opacity:0;transition:opacity .3s ease}.loader-container{flex:1 1 0%}.map-container--loaded{opacity:1}.coordinates-section{margin-top:var(--calcite-spacing-lg)}`,C=class{constructor(t){this.outerRing=[[180,-90],[-180,-90],[-180,90],[180,90],[180,-90]],this.map=t}init(){this.maskSymbol=new $({color:[0,0,0,.5],outline:{color:[128,128,128,.5],width:"0px"}}),this.maskLayer=new b({id:"maskLayer "}),this.overlapLayer=new b({id:"overlapLayer"}),this.map?.add(this.maskLayer),this.map?.add(this.overlapLayer)}hide(){this.maskLayer.visible=!1}show(){this.maskLayer.visible=!0}add(t,e){let i=this.buildGraphic(t,e);if(i)return i.graphic&&this.maskLayer?.add(i.graphic),i}update(t,e,i){i?this.remove(null,i):this.clear();let s=this.buildGraphic(t,e);if(s)return s.graphic&&this.maskLayer?.add(s.graphic),s}clear(){this.maskLayer?.removeAll()}remove(t,e){!t&&!e||(e&&!t&&(t=this.maskLayer?.graphics.getItemAt(e)),t&&this.maskLayer?.remove(t))}buildGraphic(t,e=this.maskSymbol){let i={};if(!t)return i;if(t.type==="extent"&&t.xmax===t.xmin){let o=new d({rings:[this.outerRing]});return i.graphic=new y({geometry:o,symbol:e}),i}t=this.toWGS84(t);let s,a;if(t.type==="extent"){let o=this.checkPolyOverlap(t);o?(s=o?.ring?.reverse(),a=o?.oring?.reverse()):s=[[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin],[t.xmin,t.ymax]]}let r=[];t.xmin===t.xmax?r=[this.outerRing]:r=[this.outerRing,s?.reverse()||[[]]];let n=new d({rings:r});return a&&(i.overlap=a),i.graphic=new y({geometry:n,symbol:e}),i}checkPolyOverlap(t){let e={};if(t.xmax<=t.xmin){let i=[[t.xmin,t.ymin],[180,t.ymin],[180,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]],s=[[-180,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[-180,t.ymax],[-180,t.ymin]],a=180-Math.abs(t.xmax),r=180-Math.abs(t.xmin);return a>r?(e.ring=s,e.oring=i):(e.ring=i,e.oring=s),e}else return}toWGS84(t){let e=new E({wkid:4326});return x.canProject(t,e)?x.project(t,e):t}};function H(f){if(!f)return;let t=u.assetsPath;t.endsWith("/")||(t+="/"),f?.firstElementChild?.insertAdjacentHTML("beforebegin",`<link rel="stylesheet" href="${t}esri/themes/light/main.css" />`)}var S=class extends R{constructor(){super(...arguments),this.polygonSymbol=new $({style:"solid",color:new P([227,139,79,0]),outline:{color:new P([65,105,255]),width:0}}),this.dlOverlapSymbol=new $({style:"solid",color:[255,0,0,.5],outline:{color:[65,105,255],width:0}}),this.messages=V(),this.searchComponent=c(),this.sketchComponent=c(),this.mapContainer=c(),this.sketchListenersAdded=!1,this.searchInitialized=!1,this.topCoordField=c(),this.bottomCoordField=c(),this.leftCoordField=c(),this.rightCoordField=c(),this.minLatLabel="",this.maxLatLabel="",this.minLngLabel="",this.maxLngLabel="",this.firstLoad=!0,this.ymax="0",this.ymin="0",this.xmin="0",this.xmax="0",this.isDrawStart=!1,this.loading=!0,this.active=!1,this.contentOnly=!1,this.isArea=!1,this.arcgisExtentPickerChange=v(),this.arcgisExtentPickerClose=v(),this.arcgisExtentPickerSave=v()}static{this.properties={ymax:16,ymin:16,xmin:16,xmax:16,isDrawStart:16,loading:16,featureExtent:16,initialValue:16,active:5,extentValue:0,itemId:1,portal:0,extentService:1,contentOnly:5,isArea:5}}static{this.styles=q}getExtent(){return this.getExtentValue()}async load(){if(this.minLatLabel=this.formatAxisLabel(-90),this.maxLatLabel=this.formatAxisLabel(90),this.minLngLabel=this.formatAxisLabel(-180),this.maxLngLabel=this.formatAxisLabel(180),this.portal){let t=this.portal.url.replace("/sharing/rest/","");t!==u.portalUrl&&(u.portalUrl=t)}if(this.itemId&&(this.item=new W({id:this.itemId,portal:this.portal}),await this.item.load()),this.portal&&(this.orgExtent=this.portal.defaultExtent?.toJSON()),this.portal?.region){let t=this.portal.region,e=(await D(`${this.portal.url.replace("/sharing/rest/","")}/sharing/rest/portals/self?region=${t}&default=true&f=pjson`,{responseType:"json"})).data;this.orgRegionExtent=e.defaultExtent}}async loaded(){H(this.el.shadowRoot),await this.initMap()}convertToNumber(t){return this.parseNumber(t)}setFeatureExtent(t){let e;if(t.spatialReference.isGeographic)e=new p({xmax:t.xmax,xmin:t.xmin,ymax:t.ymax,ymin:t.ymin,spatialReference:{wkid:4326}});else if(e=this.toWGS84(t),e===t){this.tryAsyncProjection(t);return}this.featureExtent?(this.featureExtent.xmin=Math.min(e.xmin,this.featureExtent.xmin),this.featureExtent.ymin=Math.min(e.ymin,this.featureExtent.ymin),this.featureExtent.xmax=Math.max(e.xmax,this.featureExtent.xmax),this.featureExtent.ymax=Math.max(e.ymax,this.featureExtent.ymax)):this.featureExtent=e}async tryAsyncProjection(t){let e=new J;if(e.geometries=[t],e.outSpatialReference=new E({wkid:4326}),!u.geometryServiceUrl)return;let i=(await M.project(u.geometryServiceUrl,e))?.[0];i&&this.setFeatureExtent(i)}async initMap(){let t=this.portal?.useVectorBasemaps?this.portal?.defaultVectorBasemap:this.portal?.defaultBasemap,e=new B({basemap:t||"streets-vector"});if(this.extentService)try{let i=this.extentService.trim(),s;if(/\/VectorTileServer\/?$/iu.test(i))s=new j({url:i});else{let r=(await D(`${i}?f=pjson`,{responseType:"json"})).data;s=r.singleFusedMapCache===!0&&r.tileInfo?new G({url:i}):new U({url:i})}await s.load();let a=new T({baseLayers:[s],id:"org_basemap"});e.basemap=a}catch(i){console.warn("[arcgis-portal-extent-picker] extentService basemap failed to load, using default basemap",i)}if(this.mask=new C(e),this.mask.init(),this.dateLineLayer=new b({id:"dateLineLayer"}),e.add(this.dateLineLayer),this.areasLayer=new b({id:"areaGraphics"}),e.add(this.areasLayer),this.item?.type==="Feature Service"||this.item?.type==="Map Service"){let i=await z.fromPortalItem({portalItem:this.item});i.visible=!1,e.add(i),i.when(s=>{if("layers"in s)for(let a=0;a<s.layers.length;a++)s.layers.getItemAt(a).queryExtent().then(r=>{r.extent&&this.setFeatureExtent(r.extent)});else s.queryExtent().then(a=>{a.extent&&this.setFeatureExtent(a.extent)})})}if(this.view=new _({map:e,popup:{dockEnabled:!0,dockOptions:{buttonEnabled:!1,breakpoint:!1,position:"bottom-center"}},zoom:2,center:[0,0],container:this.mapContainer.value}),await this.view.when(),this.basemapExtent=this.getBasemapExtent(),this.itemExtent=this.item?.extent,this.extentValue?.xmax!==void 0&&this.extentValue?.xmin!==void 0&&this.extentValue?.ymax!==void 0&&this.extentValue?.ymin!==void 0)this.ymin=this.extentValue?.ymin||"0",this.ymax=this.extentValue?.ymax||"0",this.xmax=this.extentValue?.xmax||"0",this.xmin=this.extentValue?.xmin||"0",await this.handleInputChange(),this.initialValue=this.currentExtent;else if(this.itemExtent)await this.drawExtent(this.itemExtent),this.initialValue=this.itemExtent;else if(this.featureExtent)await this.drawExtent(this.featureExtent),this.initialValue=this.featureExtent;else if(this.portal?.defaultExtent){let i=this.portal.defaultExtent.toJSON();await this.drawExtent(i),this.initialValue=i}await this.initSearchWidget(),this.loading=!1}getBasemapExtent(){try{let t,e,i,s;if(this.view?.map?.basemap?.hasOwnProperty("baseLayers")){let a=this.view.map.basemap.baseLayers;if(a.length>0){for(let r of a){let n=r.fullExtent||{xmin:0,ymin:0,xmax:0,ymax:0};t=t!==void 0&&t>n?.xmin?t:n.xmin,i=i!==void 0&&i>n?.ymin?i:n.ymin,e=e!==void 0&&e<n.xmax?e:n.xmax,s=s!==void 0&&s<n.ymax?s:n.ymax}return new p({xmin:t,xmax:e,ymin:i,ymax:s,spatialReference:this.view.spatialReference})}}return new p({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}catch{return new p({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}}async drawExtent(t){if(this.isDrawStart=!1,!t||!t.xmin&&t.xmin!==0||!t.xmax&&t.xmax!==0||!t.ymin&&t.ymin!==0||!t.ymax&&t.ymax!==0)return;let e=new d;e.spatialReference=t.spatialReference,e.addRing([new g({x:t.xmin,y:t.ymin}),new g({x:t.xmin,y:t.ymax}),new g({x:t.xmax,y:t.ymax}),new g({x:t.xmax,y:t.ymin}),new g({x:t.xmin,y:t.ymin})]),await this.addInitialExtentPicker({geometry:e})}toWGS84(t){let e=new E({wkid:4326});return x.canProject(t,e)?x.project(t,e):t}formatNum(t){return L.formatNumber(t,{minimumFractionDigits:6,maximumFractionDigits:6})}formatAxisLabel(t){return L.formatNumber(t,{minimumFractionDigits:1,maximumFractionDigits:1})}strippedInvalidChars(t){let e=Array.from({length:10},(i,s)=>s.toString()).join("");return Array.from(t).filter(i=>e.includes(i)||i==="."||i==="-").join("")}parseNumber(t){let e=t.replace(",",".");return e=this.strippedInvalidChars(e),parseFloat(e)}async startupSketching(t,e){if(t&&(t=this.toMap(t)),await this.initSketchComponent(),this.clearAllGraphics(),!e)if(t){t.type==="extent"&&(t=d.fromExtent(t)),this.currentExtent=this.toWGS84(t?.extent?.toJSON()),this.ymax=this.formatNum(this.currentExtent.ymax),this.ymin=this.formatNum(this.currentExtent.ymin),this.xmin=this.formatNum(this.currentExtent.xmin),this.xmax=this.formatNum(this.currentExtent.xmax),this.firstLoad?this.firstLoad=!1:this.arcgisExtentPickerChange.emit(this.getExtentValue()),t=O(t,this.basemapExtent);let i=new y({symbol:this.polygonSymbol,geometry:t});i.geometry&&(this.fallbackExtent=i.geometry.extent,this.areasLayer?.add(i),this.mask?.clear(),this.mask?.update(i.geometry.extent),await this.zoomTo(),await this.activateGraphicUpdate(i))}else await this.sketchComponent.value?.create("rectangle")}async activateGraphicUpdate(t){try{let e=this.sketchComponent.value;if(!e||!this.view||!this.areasLayer)return;await e.componentOnReady(),await this.view.whenLayerView(this.areasLayer),await e.triggerUpdate(t,{tool:"transform",enableRotation:!1,toggleToolOnClick:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!1}})}catch{}}async initSketchComponent(){let t=this.sketchComponent.value;t&&(t.defaultGraphicsLayerDisabled=!0,t.updateOnGraphicClickDisabled=!1,t.layer=this.areasLayer,t.polygonSymbol=this.polygonSymbol,t.view=this.view,this.sketchListenersAdded||(t.addEventListener("arcgisUpdate",e=>{this.handleSketchUpdate(e)}),t.addEventListener("arcgisCreate",e=>{this.handleSketchCreate(e)}),this.sketchListenersAdded=!0),await t.componentOnReady())}async handleSketchUpdate(t){let e=t.detail;if(e.state==="cancel"){let a=this.areasLayer?.graphics?.getItemAt(0)?.geometry;a&&await this.startupSketching(a);return}if(!e.toolEventInfo)return;let i=e?.graphics?.[0]?.geometry?.extent,s=i&&this.mask?.update(i);if(e.toolEventInfo.type==="scale-stop"||e.toolEventInfo.type==="move-stop"){let a,r=parseFloat(`${i?.xmax??"0"}`).toFixed(6),n=parseFloat(`${i?.xmin??"0"}`).toFixed(6),o=parseFloat(`${i?.ymax??"0"}`).toFixed(6),h=parseFloat(`${i?.ymin??"0"}`).toFixed(6);if(r===n||o===h?(a=i,r===n&&(a.xmax+=1),o===h&&(a.ymax+=1)):a=e?.graphics?.[0]?.geometry?.extent,s?.overlap){let k=s.graphic?.geometry,N=new d({rings:[k?.rings[1]]});await this.addInitialExtentPicker({geometry:N.extent})}else await this.startupSketching(a);this.isDrawStart=!1}else if(this.dateLineLayer?.removeAll(),s?.overlap){let a=new y({geometry:new d({rings:[s.overlap]}),symbol:this.dlOverlapSymbol});this.dateLineLayer?.add(a)}}async handleSketchCreate(t){let e=t.detail;if(this.dateLineLayer?.removeAll(),!e.graphic)return;this.mask?.clear();let i=e?.graphic?.geometry?.extent,s=this.mask?.add(i);if(s?.overlap?(this.remainderPoly=new y({geometry:new d({rings:[s.overlap]}),symbol:this.dlOverlapSymbol}),this.dateLineLayer?.add(this.remainderPoly)):this.remainderPoly=null,e.state==="complete"){let a,r=e.graphic?.geometry?.extent?.xmin||0,n=e.graphic?.geometry?.extent?.xmax||0,o=e.graphic?.geometry?.extent?.ymin||0,h=e.graphic?.geometry?.extent?.ymax||0;if(r===n||o===h)r===n&&(n=n+1),o===h&&(h=h+1),a=new p({xmin:r,xmax:n,ymin:o,ymax:h,spatialReference:e.graphic?.geometry?.extent?.spatialReference});else{let k=s?.graphic?.geometry;a=new d({rings:[k?.rings[1]]}).extent}this.remainderPoly?await this.addInitialExtentPicker({geometry:a}):await this.startupSketching(a),this.isDrawStart=!1,this.mapContainer.value.focus()}}async addInitialExtentPicker(t){if(!t.geometry){await this.startupSketching(null,!0);return}let e=this.toMap(t.geometry);await this.startupSketching(e)}async zoomTo(){if(this.areasLayer?.graphics){let t;if(this.areasLayer.graphics.forEach(i=>{let s=i?.geometry?.extent;t=t?t.union(s):s}),!t)return;let e=this.toMap(t.clone().expand(1.35));e&&await this.view?.goTo(e)}}clearAllGraphics(){this.sketchComponent.value?.cancel(),this.view?.map?.layers?.forEach(t=>{t.type==="graphics"&&t.removeAll()})}toMap(t){return this.view&&x.canProject(t,this.view)?x.project(t,this.view.spatialReference):t}async initSearchWidget(){let t=this.searchComponent.value;if(!t||this.searchInitialized)return;t.view=this.view,t.popupDisabled=!0,t.resultGraphicDisabled=!0,await t.componentOnReady();let e=()=>{t.allSources.forEach(i=>{i.zoomScale=null})};e(),t.allSources.on("change",e),t.addEventListener("arcgisSelectResult",i=>{let s=i.detail?.result;this.startupSketching(s?.extent)}),this.searchInitialized=!0}getExtentValue(){return{extent:{ymin:this.normalizeDecimal(this.ymin),ymax:this.normalizeDecimal(this.ymax),xmin:this.normalizeDecimal(this.xmin),xmax:this.normalizeDecimal(this.xmax)}}}async handleInputChange(){let t=this.parseNumber(this.ymin),e=this.parseNumber(this.ymax),i=this.parseNumber(this.xmin),s=this.parseNumber(this.xmax),a=new p({spatialReference:{wkid:4326},xmin:i,xmax:s,ymin:t,ymax:e});this.currentExtent=a,await this.drawExtent(a)}handleSave(){if(!this.topCoordField.value.isValid()){this.topCoordField.value.setFocus();return}if(!this.bottomCoordField.value.isValid()){this.bottomCoordField.value.setFocus();return}if(!this.leftCoordField.value.isValid()){this.leftCoordField.value.setFocus();return}if(!this.rightCoordField.value.isValid()){this.rightCoordField.value.setFocus();return}this.arcgisExtentPickerSave.emit(this.getExtentValue())}normalizeDecimal(t){return t.replace(",",".")}formatLongitudeError(t){return t.replace("${minLng}",this.minLngLabel).replace("${maxLng}",this.maxLngLabel)}formatLatitudeError(t){return t.replace("${minLat}",this.minLatLabel).replace("${maxLat}",this.maxLatLabel)}async timeout(t){return await new Promise(e=>setTimeout(e,t))}renderModal(){return l`<calcite-dialog class="extent-picker-modal" role=dialog scale=l outside-close-disabled .open=${this.active} placement=cover @calciteDialogClose=${()=>{this.arcgisExtentPickerClose.emit()}} style=${w({"--calcite-dialog-content-space":"0"})} .heading=${this.isArea?this.messages.setArea:this.messages.setExtent} heading-level=3><div class="extent-picker-content">${this.renderContent()}</div>${this.initialValue&&l`<calcite-button appearance=outline slot=footer-start icon-start=reset @click=${async()=>{this.initialValue&&(this.isDrawStart&&(this.isDrawStart=!1,await this.sketchComponent.value?.cancel(),this.startupSketching(this.fallbackExtent)),this.ymin="0",this.ymax="0",this.xmin="0",this.xmax="0",await this.timeout(100),await this.drawExtent(this.initialValue))}}>${this.messages.revert}</calcite-button>`||""}<calcite-button appearance=outline slot=footer-end @click=${()=>this.arcgisExtentPickerClose.emit()}>${this.messages.cancel}</calcite-button><calcite-button slot=footer-end @click=${async()=>this.handleSave()}>${this.messages.save}</calcite-button></calcite-dialog>`}renderContent(){let t=!!(this.portal&&!this.portal.id),e=!!(this.orgExtent&&!t),i=!!(this.orgRegionExtent&&!t),s=!!this.featureExtent;return l`<div class="side-panel">${!(!e&&!i&&!s)&&l`<div>${this.isArea?this.messages.areaBasedOn:this.messages.extentBasedOn}</div>${e&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgExtent)}}>${this.messages.orgExtent}</calcite-button>`||""}${i&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgRegionExtent)}}>${this.messages.orgRegion}</calcite-button>`||""}${s&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=feature-layer @click=${()=>{this.drawExtent(this.featureExtent)}}>${this.messages.currentFeatures}</calcite-button>`||""}`||""}<div class="use-location-header">${this.messages.useLocation}</div><div class="search-container"><arcgis-search popup-disabled result-graphic-disabled ${m(this.searchComponent)}></arcgis-search></div><div><div class="use-location-header">${this.isArea?this.messages.drawAreaTitle:this.messages.drawExtentTitle}</div><calcite-action .text=${(this.isArea?this.messages.drawArea:this.messages.drawExtent)||""} text-enabled icon=rectangle-plus .active=${this.isDrawStart} .indicator=${this.isDrawStart} @click=${async()=>{this.isDrawStart=!this.isDrawStart,this.isDrawStart?(this.sketchComponent.value||await this.startupSketching(),this.clearAllGraphics(),await this.sketchComponent.value?.create("rectangle")):(await this.sketchComponent.value?.cancel(),this.startupSketching(this.fallbackExtent))}}></calcite-action></div><div class="coordinates-section"><calcite-accordion appearance=transparent icon-position=start scale=l><calcite-accordion-item .heading=${this.messages.coordinates}><p>${this.messages.coordinatesDescription}</p><arcgis-portal-extent-picker-coord-field input-id=top-coord .label=${this.messages.top} .value=${this.strippedInvalidChars(this.ymax)} .errorMessage=${this.formatLatitudeError(this.messages.invalidTop||"")} min=-90 max=90 @arcgisCoordChange=${a=>{this.ymax=a.detail;let r=this.bottomCoordField.value.checkRelatedField();r&&(this.ymin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.topGreaterThanBottom} .validateRelated=${a=>a>this.convertToNumber(this.ymin)} ${m(this.topCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=bottom-coord .label=${this.messages.bottom} .value=${this.strippedInvalidChars(this.ymin)} .errorMessage=${this.formatLatitudeError(this.messages.invalidBottom||"")} min=-90 max=90 @arcgisCoordChange=${a=>{this.ymin=a.detail;let r=this.topCoordField.value.checkRelatedField();r&&(this.ymax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.bottomLessThanTop} .validateRelated=${a=>a<this.convertToNumber(this.ymax)} ${m(this.bottomCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=left-coord .label=${this.messages.left} .value=${this.strippedInvalidChars(this.xmin)} .errorMessage=${this.formatLongitudeError(this.messages.invalidLeft||"")} min=-180 max=180 @arcgisCoordChange=${a=>{this.xmin=a.detail;let r=this.rightCoordField.value.checkRelatedField();r&&(this.xmax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.leftLessThanRight} .validateRelated=${a=>a<this.convertToNumber(this.xmax)} ${m(this.leftCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=right-coord .label=${this.messages.right} .value=${this.strippedInvalidChars(this.xmax)} .errorMessage=${this.formatLongitudeError(this.messages.invalidRight||"")} min=-180 max=180 @arcgisCoordChange=${a=>{this.xmax=a.detail;let r=this.leftCoordField.value.checkRelatedField();r&&(this.xmin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.rightGreaterThanLeft} .validateRelated=${a=>a>this.convertToNumber(this.xmin)} ${m(this.rightCoordField)}></arcgis-portal-extent-picker-coord-field></calcite-accordion-item></calcite-accordion></div></div><div class="map-panel">${this.loading&&l`<calcite-loader class="map-loader" label="Loading the application"></calcite-loader>`||""}<arcgis-zoom .view=${this.view} visual-scale=s style=${w({zIndex:"1"})}></arcgis-zoom><arcgis-sketch hidden default-graphics-layer-disabled style=${w({display:"none"})} ${m(this.sketchComponent)}></arcgis-sketch><div class=${A({"map-container":!0,"map-container--loaded":!this.loading})} ${m(this.mapContainer)}></div></div>`}render(){return this.contentOnly?l`<div class="extent-picker-content">${this.renderContent()}</div>`:this.renderModal()}};I("arcgis-portal-extent-picker",S);return S},"Basemap","Color","config","geometry/Extent","geometry/operators/intersectionOperator","geometry/Point","geometry/Polygon","geometry/SpatialReference","geometry/support/webMercatorUtils","Graphic","intl","layers/GraphicsLayer","layers/Layer","layers/TileLayer","layers/VectorTileLayer","layers/MapImageLayer","Map","portal/PortalItem","request","rest/geometryService","rest/support/ProjectParameters","symbols/SimpleFillSymbol","views/MapView")
|
package/dist/cdn/DWGYWUVJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as h}from"./OR6T5SB3.js";import b from"./5HZNBMW6.js";import a from"./TIPQ2ZWK.js";import{o as f}from"./AICPYLWE.js";export default $arcgis.t(([g,{property:n,subclass:P},{a:p,b:m},{a:d}])=>{var u=d;var y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,i=(t,r,o,s)=>{for(var a=s>1?void 0:s?w(r,o):r,l=t.length-1,c;l>=0;l--)(c=t[l])&&(a=(s?c(r,o,a):c(a))||a);return s&&a&&y(r,o,a),a},e=class extends g{constructor(){super(...arguments),this.fetching=!1,this.status="idle",this.error=void 0,this.portalUrl=void 0,this._itemClassificationValidationErrors=new Map,this.fetchingPromise=new f}get primaryAttribute(){return this.portalClassificationSchema?.classificationMetadata.primaryAttribute}setPortalClassificationData({portalUrl:t,schema:r}){this.portalUrl=t,this.portalClassificationSchema=r,this.status="loaded",this.fetchingPromise.resolve(!0)}setFetching(t){this.fetching=t}async loadPortalClassificationData(t,{signal:r}){this.status="loading";let{result:o,error:s}=await p(t,r);if(s){s.name==="AbortError"?console.log("Request aborted."):(this.error=s,this.status="error",this.fetchingPromise.reject(s));return}else this.setPortalClassificationData({schema:o,portalUrl:t})}async validateClassification(t,r,o,s){if(!r)return"";let a=t?this._itemClassificationValidationErrors.get(t):void 0;if(a)return await a;let l=(async()=>{let{error:c}=await m(o,r,s??{});return c?c?.details.raw.messages.join(", "):""})();return t&&this._itemClassificationValidationErrors.set(t,l),t?await this._itemClassificationValidationErrors.get(t):await l}};i([n()],e.prototype,"portalClassificationSchema",2);i([n()],e.prototype,"fetching",2);i([n()],e.prototype,"status",2);i([n()],e.prototype,"error",2);i([n()],e.prototype,"portalUrl",2);i([n()],e.prototype,"_itemClassificationValidationErrors",2);e=i([P("custom.ClassificationModel")],e);var C;function A(t){return C??=new e(t),C}var $=u(A),j=t=>new h(t,{task:async([r],{signal:o})=>{if(!r)throw new Error("Portal item is required to load classification data");if(r.loaded||await r.load({signal:o}),t.itemClassification=r.classification,t.classificationModel.status==="loading"&&await t.classificationModel.fetchingPromise.promise,!t.portalItem?.portal.hasClassificationSchema){t.classificationModel.setPortalClassificationData({portalUrl:r.portal.restUrl,schema:void 0});return}(t.classificationModel.status==="idle"||t.classificationModel.status==="loaded"&&t.classificationModel.portalUrl!==r.portal.restUrl)&&await t.classificationModel.loadPortalClassificationData(r.portal.restUrl,{signal:o})},args:()=>[t.portalItem]});return{a:$,b:j}},"core/Accessor","core/accessorSupport/decorators",a,b)
|
package/dist/cdn/E5VN6XPP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import f from"./XRMYRNQY.js";import e from"./PMV65NI5.js";import d from"./Z26C36RJ.js";import"./MTY3QVCM.js";import"./4QYVBXZT.js";import"./4KTRAA2J.js";import"./PKA745KL.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./TZ6HFMZZ.js";import b from"./TIPQ2ZWK.js";import"./TWCJJCPC.js";import"./YZTBAUIO.js";import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,{g:a}])=>{return a},a,b,c,d,e,f)
|
package/dist/cdn/FNWM2SRX.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import g from"./O24CJZKB.js";import"./SRWFOV5W.js";import"./JOUR2FB2.js";import f from"./A2Z4NCPQ.js";import"./4QYVBXZT.js";import e from"./WGCNE5CY.js";import"./4KTRAA2J.js";import d from"./IHB4RIMJ.js";import"./PKA745KL.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./TZ6HFMZZ.js";import b from"./TIPQ2ZWK.js";import"./TWCJJCPC.js";import"./4XIHI6AF.js";import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{R as r}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,e])=>{var t=class extends e{constructor(){super(...arguments),this.entityType="group",this.selected=null}static{this.properties={entityType:32,selected:0}}};r("arcgis-portal-group-picker",t);return t},a,b,c,d,e,f,g)
|
package/dist/cdn/I6WGLIEC.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as L}from"./K2XSYDAP.js";import{a as C,b as y,c as A,p as f,v as x,x as w}from"./AICPYLWE.js";var H=(s,n)=>{let e=s;for(;e;){if(e===n)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},d=(s,n,e)=>{let t=M(n).subscribe;return t(o=>{o.some(r=>H(s,r.target))&&e()})},m={},M=s=>{let n=s.join(","),e=m[n];if(e!==void 0)return e;let t=new Set,o=new MutationObserver(r=>t.forEach(i=>i(r)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:s,subtree:!0});let a={subscribe:r=>(t.add(r),()=>{t.delete(r),t.size===0&&(o.disconnect(),m[n]=void 0)})};return m[n]=a,a},N=(s,n)=>{let e=s;for(;e;){let t=e.closest?.(n);if(t)return t;let o=e.getRootNode?.();if(o===globalThis.document)return;e=o?.host}};var u=(s,n,e)=>N(s,`[${n}]`)?.getAttribute(n)??e;var E=s=>{let n=u(s,"lang",globalThis.navigator?.language||g);return{lang:n,t9nLocale:P(n)}},O=(s,n,e,t)=>{let o,a=()=>D(s,n(),t).then(r=>{(o?.lang!==r.lang||o.t9nLocale!==r.t9nLocale||o.t9nStrings!==r.t9nStrings)&&e(r),o=r}).catch(r=>{f("error","intl","Error updating component locale state",{detail:{error:r}})});return queueMicrotask(a),d(s,["lang"],a)},D=async(s,n,e=s.localName.split("-").slice(1).join("-"))=>{let{lang:t,t9nLocale:o}=E(s),a=`${n}/${e}/t9n`,i=e===null?{}:await z(o,a,"messages.");return{lang:t,t9nLocale:o,t9nStrings:i}};var _="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),F=new Set(_),g="en",R={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},z=async(s,n,e="")=>{let t=`${n}/${e}`,o=`${t}${s}.json`;return $[o]??=k(s,t),await $[o]},$={},k=async(s,n)=>{let e=`${n}${s}.json`;try{let t=await fetch(e);if(t.ok)return await t.json()}catch(t){return f("error","intl",`An unknown error occurred while fetching localization strings at ${e}`,{detail:{error:t}}),{}}return s===g?{}:await k(g,n)},P=s=>{let[n,e]=s.split("-"),t=n.toLowerCase(),o=t;return e&&(o=`${t}-${e.toUpperCase()}`),o=R[o]??o,F.has(o)?o:e?P(t):g};var S=s=>G(void 0,s),Ae=s=>n=>G(n,s),v=class extends w{constructor(n,e){super(n);let t=this.exports;try{y(this.component);let o=e(this.component,this),a=this.exports!==t;if(C(o)){a||this.setProvisionalExports(o);let r=o.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await r)}else(!a||o!==void 0)&&(this.exports=o),queueMicrotask(()=>super.catchUpLifecycle())}catch(o){this.P.reject(o)}}catchUpLifecycle(){}},G=L(v);var T="ltr",xe=()=>S((s,n)=>{n.exports=T,n.onLifecycle(()=>{let e=()=>{let t=u(s.el,"dir",T);n.exports=t==="rtl"?"rtl":"ltr"};return e(),d(s.el,["dir"],e)})}),we=s=>(n={})=>S((e,t)=>{let o=E(e.el),a={_lang:o.lang,_t9nLocale:o.t9nLocale,_loading:!0},r=e;t.onLifecycle(()=>O(e.el,()=>s("./assets"),({t9nLocale:c,t9nStrings:l,lang:h})=>{let p={...l,_lang:h,_t9nLocale:c,_loading:!1};t.exports=p;let b=l.componentLabel;typeof b=="string"&&"label"in e&&e.label==null&&(e.label??=b),i(r.messageOverrides)},n.name));let i=c=>{let l=t.exports,h=l._original??l,p=j(h,c);c&&(p._original=h),t.exports=p};return"messageOverrides"in r&&t.onUpdate(c=>{c.has("messageOverrides")&&i(r.messageOverrides)}),n.blocking?(t.setProvisionalExports(a,!1),t.ready):a}),j=(s,n)=>{if(!n)return s;let e={...s};return Object.entries(n).forEach(([t,o])=>{s[t]!==void 0&&(typeof o=="object"?e[t]=j(s[t],o):e[t]=o??s[t])}),e},Le=s=>q,V="arcgisPropertyChange",q=(...s)=>{let n=A(),e=x(V,void 0,n),t=!0;return n.manager.onUpdated(o=>{if(t||!n.el.isConnected){t=!1;return}for(let a of s)o.has(a)&&e.emit({name:a})}),e};export{N as a,S as b,Ae as c,xe as d,we as e,Le as f};
|
package/dist/cdn/IM7DWCQW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a}from"./BKD7JSV2.js";import b from"./A2Z4NCPQ.js";import"./4QYVBXZT.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([])=>{return a},b)
|
package/dist/cdn/ISHV5HNX.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import c from"./G6V653H2.js";import b from"./RHCRPJWS.js";import a from"./5HZNBMW6.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
|
package/dist/cdn/JQWP52DP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as a}from"./XQE23XTL.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import"./TWCJJCPC.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export{a as ArcgisPortalBrowserFilterStatus};
|
package/dist/cdn/OVQQO7DF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import a from"./WGCNE5CY.js";import"./4KTRAA2J.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([a])=>{return a},a)
|
package/dist/cdn/Q2CR4M4G.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import a from"./A2Z4NCPQ.js";import"./4QYVBXZT.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([a])=>{return a},a)
|
package/dist/cdn/QXBFIAOL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import c from"./7BHYNG4B.js";import b from"./RHCRPJWS.js";import a from"./5HZNBMW6.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
|
package/dist/cdn/RQTLNBI2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import c from"./G2C2DUPW.js";import b from"./RHCRPJWS.js";import a from"./5HZNBMW6.js";import"./XQE23XTL.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import"./TWCJJCPC.js";import"./2FKNF2ZK.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
|
package/dist/cdn/RW2EKBM4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as f,b as S,c as O}from"./MTY3QVCM.js";import a from"./3SCRMD7A.js";import"./4KTRAA2J.js";import{d as E}from"./H7DF6TTK.js";import"./KV4ZZSNW.js";import{c as R}from"./2FKNF2ZK.js";import{L,M as x,O as U,R as P,h as I,j as y,w as M}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{execute:K},{a:v,h:w}])=>{function j(t){return t?`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`:""}function V(t){return t&&t.xmin>=-180&&t.xmax<=180&&t.ymin>=-90&&t.ymax<=90&&t.xmin<=t.xmax&&t.ymin<=t.ymax?[[t.xmin,t.ymin],[t.xmax,t.ymax]]:[[-180,-90],[180,90]]}var m=document.createElement("div");m.style.height="532px";m.style.left="-10000px";m.style.position="absolute";m.style.top="-10000px";m.style.width="800px";async function z({item:t,portal:e,serviceInfo:a}){let i=t.thumbnailUrl,n=t.url??"",r=["Map Service","Feature Service","Image Service"];if(i)return i;if(!r.includes(t.type??""))return"";if(t.type==="Map Service"||t.type==="Image Service"||n.includes("/MapServer")){let l=j(t.extent);return l?A({serviceUrl:n,extent:l,size:"800,532",format:"image",serviceInfo:a}):""}return t.type==="Feature Service"?await G(t,e):""}function A({visibleLayers:t,serviceUrl:e,serviceInfo:a,size:i,extent:n,bboxSR:r,imageSR:l,format:h}){if(!a)return"";let s=e,u=s.includes("/MapServer"),p=t,d=s.indexOf("/MapServer");if(!p&&u&&d!==-1){let g=s.indexOf("?");p=g>-1?s.substring(d+11,g):s.substring(d+11),s=g>-1?s.substring(0,d+10)+s.substring(g):s.substring(0,d+10)}u||(u=!!(a.capabilities?.toLowerCase().includes("map")||a.supportedImageFormatTypes));let c=s.indexOf("?"),o;if(c===-1)if(u)o=`${s}/export?`;else{if((a.currentVersion??0)>=10.1)return`${s}/info/thumbnail`;o=`${s}/exportImage?`}else if(u)o=`${s.substring(0,c)}/export${s.substring(c)}&`;else{if((a.currentVersion??0)>=10.1)return`${s.substring(0,c)}/info/thumbnail${s.substring(c)}`;o=`${s.substring(0,c)}/exportImage${s.substring(c)}&`}return o+=`size=${i}&bbox=${n}`,r&&(o+=`&bboxSR=${r}`),l&&(o+=`&imageSR=${l}`),u?(o+=a.supportedImageFormatTypes?.includes("PNG32")?`&format=png32&f=${h}`:`&format=png24&f=${h}`,p&&(o+=`&layers=show:${p}`)):o+=`&format=jpgpng&f=${h}&interpolation=RSP_NearestNeighbor&bandIds=null`,o}async function G(t,e){if(!e||!t.id)return"";m.isConnected||document.body.append(m);let a,i;try{let[{default:n},{default:r},{default:l},h,{default:s},{default:u},{default:p},{default:d}]=await Promise.all([$arcgis.t(m=>({default:m[0]}),"Basemap"),$arcgis.t(m=>({default:m[0]}),"layers/FeatureLayer"),$arcgis.t(m=>({default:m[0]}),"Map"),$arcgis.t(m=>m[0],"rest/print"),$arcgis.t(m=>({default:m[0]}),"rest/support/PrintParameters"),$arcgis.t(m=>({default:m[0]}),"rest/support/PrintTemplate"),$arcgis.t(m=>({default:m[0]}),"smartMapping/heuristics/scaleRange"),$arcgis.t(m=>({default:m[0]}),"views/MapView")]),c=new r({portalItem:{id:t.id,portal:e}}),o=e.defaultBasemap?.id??"",g=o.includes("basemap")?"topo-vector":new n({portalItem:{id:o,portal:e}});a=new l({basemap:g}),i=new d({map:a,container:m}),await i.when();let $=0,b=0;o.includes("basemap")||({minScale:$,maxScale:b}=await p({layer:c,view:i}));let k=await c.queryExtent();if(!k.extent)return"";await i.goTo(k.extent),c.minScale=$,c.maxScale=b,a.add(c),i.scale=b,await new Promise(D=>setTimeout(D,2e3));let N=e.helperServices?.printTask?.url??"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task",_=new u({format:"png32",exportOptions:{dpi:96,width:800,height:532},layout:"map-only",showLabels:!1,attributionVisible:!1});return(await h.execute(N,new s({view:i,template:_}))).url??""}catch{return""}finally{i?.destroy(),a?.destroy()}}async function F({webMap:t,extent:e,portal:a,spatialReference:i}){let n=a?.helperServices?.printTask?.url;if(!n)return"";let r={Web_Map_as_JSON:JSON.stringify({...t,mapOptions:{showAttribution:!1,extent:{xmin:e[0][0],ymin:e[0][1],xmax:e[1][0],ymax:e[1][1],spatialReference:{wkid:4326}},spatialReference:i},exportOptions:{dpi:96,outputSize:[600,400]},layoutOptions:{}}),Format:"PNG32",Layout_Template:"MAP_ONLY"};return(await K(n,r)).results?.find(l=>l.dataType==="data-file")?.value?.url??""}async function W({item:t,portal:e}){let a=t.url||(e&&t.id?`${v(t.id,e)}/data`:"");if(!a||!e?.defaultBasemap)return"";let i=new URL(a),n=new URL(e.restUrl).hostname,r=E(e);r&&i.hostname===n&&i.searchParams.set("token",r);let l={baseMap:{...e.defaultBasemap.toJSON(),title:"basemap"},operationalLayers:[{url:i.toString(),id:`KML_${t.id}`,opacity:1,title:t.title,visibility:!0,type:"KML"}]};return await F({webMap:l,extent:V(t.extent),portal:e,spatialReference:{wkid:4326}})}async function B({item:t,portal:e}){if(!e||!t.id)return"";let a=v(t.id,e),i={operationalLayers:[],baseMap:{baseMapLayers:[{id:t.id,type:"VectorTileLayer",layerType:"VectorTileLayer",title:t.title,styleUrl:`${a}/resources/styles/root.json`,visibility:!0,opacity:1}],title:"Topographic"},spatialReference:{wkid:102100,latestWkid:3857},authoringApp:"WebMapViewer",authoringAppVersion:"5.3",version:"2.10"};return await F({webMap:i,extent:V(t.extent),portal:e,spatialReference:{wkid:102100}})}async function C({item:t,portal:e,serviceInfo:a}){let i=f(t),n=t.type??"",r;try{R(["Image Service","Map Service","Feature Service"],n)&&(r=await z({item:t,portal:e,serviceInfo:a})||i),n==="Vector Tile Service"&&(r=await B({item:t,portal:e})||i),n==="KML"&&(r=await W({item:t,portal:e})||i)}catch{return{error:{code:"unhandledError"}}}return{result:r??i}}function J(t,e){if(!t)return!1;let a=t.includes("thumbnail/ago_downloaded."),i=t.includes("Utilities/PrintingTools");return!t.includes("images/transparent.gif")&&(e?.isPortal?!i:!a)}function q(t,e){let a=!!e&&w(t,e),i=t.type==="Dashboard";return!S(t)&&a&&i}function H(t,e,a){let i=S(t),n=J(i,e),r=["Feature Service","Vector Tile Service"].includes(t.type)&&!n,l=t.type==="Feature Service"&&t.typeKeywords?.includes("Location Tracking Service"),h=t.typeKeywords?.includes("Table");if(t.type==="Image"||i&&!r||l||h)return!1;let s=t.typeKeywords?.includes("Tiled Imagery"),u=t.type==="Image Service"&&!s||t.type==="Map Service",p=!!a&&w(t,a);return p&&u||p&&t.type==="Feature Service"||t.type==="Vector Tile Service"||p&&t.type==="KML"}var Q=I`:host{display:block;height:100%;position:relative;width:100%}.outer{position:relative;width:100%;height:100%;aspect-ratio:3 / 2;min-height:0}.inner{position:absolute;inset:0;background-color:var(--calcite-color-background)}.inner--loading{animation:thumbnail-shimmer 1s linear infinite;background-image:linear-gradient(to right,var(--calcite-color-background) 0%,var(--calcite-color-foreground-2),var(--calcite-color-background) 40%,var(--calcite-color-background) 100%);background-repeat:no-repeat;background-size:800px 100%}.thumbnail{display:block;width:100%;height:100%;object-fit:cover;opacity:1;transition:opacity .3s linear}.thumbnail--loading{opacity:0}.fallback{display:flex;height:100%;width:100%;align-items:center;justify-content:center;background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-3)}@keyframes thumbnail-shimmer{0%{background-position:-468px 0}to{background-position:468px 0}}`,T=class extends L{constructor(){super(...arguments),this.generating=!1,this.imageError=!1,this.loading=!0,this.thumbnailUri=null,this.useDefaultThumbnail=!1,this.useProduction=!1,this.generate=!1,this.arcgisItemThumbnailGenerated=M()}static{this.properties={imageError:16,loading:16,thumbnailUri:16,useDefaultThumbnail:16,item:0,user:0,portal:0,useProduction:5,generate:5,serviceInfo:0,cacheString:1}}static{this.styles=Q}async generateThumbnail(e=!1){let{item:a,portal:i}=this;if(this.loading=!0,this.generating)return this.thumbnailUri??"";try{this.generating=!0;let n=e?f(a):await C({item:a,portal:i,serviceInfo:this.serviceInfo}),r=typeof n=="string"?n:n.result??f(a);return this.thumbnailUri=r,this.useDefaultThumbnail=!1,this.arcgisItemThumbnailGenerated.emit(r),this.generating=!1,r}catch{return this.generating=!1,""}}willUpdate(e){(e.has("item")||e.has("portal")||e.has("user")||e.has("useProduction")||e.has("cacheString")||e.has("generate"))&&this.updateThumbnail()}async updateThumbnail(){let{item:e,portal:a,user:i}=this;this.imageError=!1,this.useDefaultThumbnail=!1;let n=this.generate&&H(e,a,i),r=this.generate&&q(e,i);n&&await this.generateThumbnail()||(this.thumbnailUri=r?f(e):O(a,e,!1,this.useProduction,this.cacheString),r&&await this.generateThumbnail(!0))}render(){let e=this.thumbnailUri;return this.imageError?null:y`<div class="outer"><div class=${x({inner:!0,"inner--loading":this.loading})}>${e?y`<img class=${x({thumbnail:!0,"thumbnail--loading":this.loading})} src=${e??U} alt @load=${()=>{this.loading=!1}} @error=${()=>{if(!this.useDefaultThumbnail&&this.item){this.loading=!0,this.useDefaultThumbnail=!0,this.thumbnailUri=f(this.item);return}this.imageError=!0,this.loading=!1}}>`:null}</div></div>`}};P("arcgis-portal-item-thumbnail",T);return T},"rest/geoprocessor",a)
|