@phila/layerboard 3.0.0-beta.26 → 3.0.0-beta.28
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/index.js +2 -2
- package/dist/index.mjs +1478 -1451
- package/dist/layerboard.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Map as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as pe, ref as k, watch as Oe, computed as z, nextTick as Ne, onMounted as et, onUnmounted as Dt, createElementBlock as $, openBlock as m, createVNode as G, unref as d, withCtx as Ge, createBlock as j, createCommentVNode as R, Fragment as se, renderList as ge, useAttrs as Wt, toRef as jt, normalizeClass as ne, createElementVNode as P, toDisplayString as q, renderSlot as fe, withDirectives as _t, mergeProps as yt, vModelDynamic as qt, createTextVNode as ke, normalizeProps as Ct, guardReactiveProps as kt, normalizeStyle as de, withModifiers as Gt, readonly as W, provide as B, onBeforeUnmount as Ht, useId as xt, resolveComponent as Jt, vShow as Kt } from "vue";
|
|
2
|
+
import { Map as Qt, DrawTool as Xt, RasterLayer as $t, CircleLayer as Mt, FillLayer as Pt, LineLayer as ft, MapMarker as Yt, MapPopup as eo } from "@phila/phila-ui-map-core";
|
|
3
|
+
import { cn as mt, Icon as Ce, BaseLink as to, ActionContent as Tt } from "@phila/phila-ui-core";
|
|
4
|
+
const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
5
5
|
__name: "MapPanel",
|
|
6
6
|
props: {
|
|
7
7
|
visibleLayers: {},
|
|
@@ -23,175 +23,178 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ he({
|
|
|
23
23
|
initialCenter: { default: void 0 }
|
|
24
24
|
},
|
|
25
25
|
emits: ["zoom", "layerLoading", "layerError"],
|
|
26
|
-
setup(e, { emit:
|
|
27
|
-
const l = e, o =
|
|
28
|
-
function
|
|
29
|
-
o("zoom", t),
|
|
30
|
-
}
|
|
31
|
-
function
|
|
32
|
-
const
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
const
|
|
36
|
-
async function
|
|
37
|
-
const
|
|
38
|
-
xmin:
|
|
39
|
-
ymin:
|
|
40
|
-
xmax:
|
|
41
|
-
ymax:
|
|
26
|
+
setup(e, { emit: i }) {
|
|
27
|
+
const l = e, o = i, r = k(null), n = k(null), c = k(0);
|
|
28
|
+
function w(t) {
|
|
29
|
+
o("zoom", t), n.value && (c.value = p(n.value));
|
|
30
|
+
}
|
|
31
|
+
function p(t) {
|
|
32
|
+
const u = t.getZoom(), b = t.getCenter().lat, C = 559082264028e-3, F = b * Math.PI / 180;
|
|
33
|
+
return C * Math.cos(F) / Math.pow(2, u);
|
|
34
|
+
}
|
|
35
|
+
const x = k({}), h = k(null), g = k(/* @__PURE__ */ new Set());
|
|
36
|
+
async function a(t, u, s, b, C) {
|
|
37
|
+
const F = encodeURIComponent(b || "1=1"), A = JSON.stringify({
|
|
38
|
+
xmin: u.west,
|
|
39
|
+
ymin: u.south,
|
|
40
|
+
xmax: u.east,
|
|
41
|
+
ymax: u.north,
|
|
42
42
|
spatialReference: { wkid: 4326 }
|
|
43
|
-
}),
|
|
44
|
-
let oe = 0,
|
|
45
|
-
for (;
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
48
|
-
throw new Error(`HTTP ${
|
|
49
|
-
const
|
|
50
|
-
|
|
43
|
+
}), X = C !== void 0 && C < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, C) * 512)}` : "", U = 2e3;
|
|
44
|
+
let oe = 0, Z = [], Y = !0;
|
|
45
|
+
for (; Y; ) {
|
|
46
|
+
const Q = `${t}/query?where=${F}&geometry=${encodeURIComponent(A)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${U}&resultOffset=${oe}${X}&f=geojson`, ue = await fetch(Q);
|
|
47
|
+
if (!ue.ok)
|
|
48
|
+
throw new Error(`HTTP ${ue.status}: ${ue.statusText}`);
|
|
49
|
+
const Pe = await ue.json();
|
|
50
|
+
Pe.features && Pe.features.length > 0 ? (Z = Z.concat(Pe.features), oe += Pe.features.length, Y = Pe.features.length === U) : Y = !1;
|
|
51
51
|
}
|
|
52
|
-
return
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
for (const
|
|
56
|
-
|
|
57
|
-
return { ...
|
|
52
|
+
return Z = Z.map((Q) => {
|
|
53
|
+
if (Q.properties) {
|
|
54
|
+
const ue = {};
|
|
55
|
+
for (const Pe of Object.keys(Q.properties))
|
|
56
|
+
ue[Pe.toLowerCase()] = Q.properties[Pe];
|
|
57
|
+
return { ...Q, properties: ue };
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return Q;
|
|
60
60
|
}), {
|
|
61
61
|
type: "FeatureCollection",
|
|
62
|
-
features:
|
|
62
|
+
features: Z
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
async function
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
o("layerLoading",
|
|
65
|
+
async function v(t, u, s) {
|
|
66
|
+
const b = u.map(async (C) => {
|
|
67
|
+
const F = l.layerList.find((A) => A.config.id === C)?.config;
|
|
68
|
+
if (F && !(s !== void 0 && F.minZoom !== void 0 && s < F.minZoom)) {
|
|
69
|
+
o("layerLoading", C, !0);
|
|
70
70
|
try {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
} catch (
|
|
74
|
-
const
|
|
75
|
-
o("layerError",
|
|
71
|
+
const A = await a(F.url, t, C, F.where, s);
|
|
72
|
+
x.value = { ...x.value, [C]: A }, o("layerError", C, null);
|
|
73
|
+
} catch (A) {
|
|
74
|
+
const X = A instanceof Error ? A.message : "Failed to load";
|
|
75
|
+
o("layerError", C, X);
|
|
76
76
|
} finally {
|
|
77
|
-
o("layerLoading",
|
|
77
|
+
o("layerLoading", C, !1);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
-
await Promise.all(
|
|
81
|
+
await Promise.all(b);
|
|
82
82
|
}
|
|
83
|
-
async function
|
|
84
|
-
const
|
|
85
|
-
await
|
|
83
|
+
async function f(t, u) {
|
|
84
|
+
const s = [...l.visibleLayers];
|
|
85
|
+
await v(t, s, u);
|
|
86
86
|
}
|
|
87
87
|
function L(t) {
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
west:
|
|
95
|
-
south:
|
|
96
|
-
east:
|
|
97
|
-
north:
|
|
88
|
+
h.value = t.bounds, f(t.bounds, t.zoom);
|
|
89
|
+
}
|
|
90
|
+
function S(t) {
|
|
91
|
+
n.value = t;
|
|
92
|
+
const u = t.getBounds();
|
|
93
|
+
h.value = {
|
|
94
|
+
west: u.getWest(),
|
|
95
|
+
south: u.getSouth(),
|
|
96
|
+
east: u.getEast(),
|
|
97
|
+
north: u.getNorth()
|
|
98
98
|
};
|
|
99
99
|
const s = t.getZoom();
|
|
100
|
-
o("zoom", s),
|
|
100
|
+
o("zoom", s), c.value = p(t), f(h.value, s);
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
Oe(
|
|
103
103
|
() => l.visibleLayers,
|
|
104
104
|
async () => {
|
|
105
|
-
if (
|
|
106
|
-
const t = new Set(l.visibleLayers),
|
|
107
|
-
|
|
105
|
+
if (re.value.length > 0 && ie(), h.value) {
|
|
106
|
+
const t = new Set(l.visibleLayers), u = [...t].filter((s) => !g.value.has(s));
|
|
107
|
+
if (g.value = new Set(t), u.length > 0) {
|
|
108
|
+
const s = n.value?.getZoom();
|
|
109
|
+
await v(h.value, u, s);
|
|
110
|
+
}
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
113
|
);
|
|
111
|
-
function
|
|
114
|
+
function E(t) {
|
|
112
115
|
return l.visibleLayers.has(t);
|
|
113
116
|
}
|
|
114
|
-
function
|
|
115
|
-
return
|
|
117
|
+
function D(t) {
|
|
118
|
+
return !!x.value[t.id];
|
|
116
119
|
}
|
|
117
|
-
const
|
|
118
|
-
() => l.layerList.filter((t) => t.config.type === "circle" &&
|
|
119
|
-
),
|
|
120
|
-
() => l.layerList.filter((t) => t.config.type === "fill" &&
|
|
121
|
-
),
|
|
120
|
+
const K = z(
|
|
121
|
+
() => l.layerList.filter((t) => t.config.type === "circle" && E(t.config.id) && D(t.config)).map((t) => t.config)
|
|
122
|
+
), T = z(
|
|
123
|
+
() => l.layerList.filter((t) => t.config.type === "fill" && E(t.config.id) && D(t.config)).map((t) => t.config)
|
|
124
|
+
), I = z(
|
|
122
125
|
() => l.layerList.filter(
|
|
123
|
-
(t) => t.config.type === "fill" && t.config.outlinePaint &&
|
|
126
|
+
(t) => t.config.type === "fill" && t.config.outlinePaint && E(t.config.id) && D(t.config)
|
|
124
127
|
).map((t) => t.config)
|
|
125
|
-
),
|
|
126
|
-
() => l.layerList.filter((t) => t.config.type === "line" &&
|
|
128
|
+
), _ = z(
|
|
129
|
+
() => l.layerList.filter((t) => t.config.type === "line" && E(t.config.id) && D(t.config)).map((t) => t.config)
|
|
127
130
|
);
|
|
128
|
-
|
|
131
|
+
Oe(_, async (t) => {
|
|
129
132
|
if (t.length < 2) return;
|
|
130
|
-
await
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
133
|
+
await Ne();
|
|
134
|
+
const u = n.value;
|
|
135
|
+
if (u)
|
|
133
136
|
for (let s = t.length - 1; s >= 0; s--) {
|
|
134
|
-
const
|
|
137
|
+
const b = s < t.length - 1 ? t[s + 1].id : "highlight-lines";
|
|
135
138
|
try {
|
|
136
|
-
|
|
139
|
+
u.getLayer(t[s].id) && u.moveLayer(t[s].id, b);
|
|
137
140
|
} catch {
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
143
|
});
|
|
141
|
-
function
|
|
144
|
+
function te(t) {
|
|
142
145
|
return l.visibleTiledLayers?.has(t) ?? !1;
|
|
143
146
|
}
|
|
144
|
-
function
|
|
147
|
+
function V(t) {
|
|
145
148
|
return l.tiledLayerOpacities?.[t] ?? 1;
|
|
146
149
|
}
|
|
147
|
-
function
|
|
150
|
+
function ye(t) {
|
|
148
151
|
return `${t.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
|
|
149
152
|
}
|
|
150
|
-
function
|
|
153
|
+
function me(t) {
|
|
151
154
|
return {
|
|
152
155
|
type: "raster",
|
|
153
|
-
tiles: [
|
|
156
|
+
tiles: [ye(t.url)],
|
|
154
157
|
tileSize: 256,
|
|
155
158
|
attribution: t.attribution || ""
|
|
156
159
|
};
|
|
157
160
|
}
|
|
158
|
-
const
|
|
159
|
-
async function
|
|
160
|
-
if (!
|
|
161
|
-
|
|
161
|
+
const Ue = k({}), Je = k(/* @__PURE__ */ new Set());
|
|
162
|
+
async function lt(t) {
|
|
163
|
+
if (!Je.value.has(t.id)) {
|
|
164
|
+
Je.value.add(t.id);
|
|
162
165
|
try {
|
|
163
|
-
const
|
|
166
|
+
const u = t.url.replace(/\/$/, ""), s = await fetch(`${u}?f=json`);
|
|
164
167
|
if (!s.ok)
|
|
165
168
|
return;
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
if (
|
|
169
|
-
for (const A of
|
|
170
|
-
A.maxScale && A.maxScale > 0 && (
|
|
171
|
-
|
|
172
|
-
...
|
|
173
|
-
[t.id]: { minScale:
|
|
169
|
+
const b = await s.json(), C = b.minScale || 0;
|
|
170
|
+
let F = b.maxScale || 0;
|
|
171
|
+
if (b.layers && b.layers.length > 0)
|
|
172
|
+
for (const A of b.layers)
|
|
173
|
+
A.maxScale && A.maxScale > 0 && (F === 0 || A.maxScale < F) && (F = A.maxScale);
|
|
174
|
+
F === 0 && (F = 72e3), Ue.value = {
|
|
175
|
+
...Ue.value,
|
|
176
|
+
[t.id]: { minScale: C, maxScale: F }
|
|
174
177
|
};
|
|
175
178
|
} catch {
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
181
|
}
|
|
179
|
-
|
|
182
|
+
et(() => {
|
|
180
183
|
if (l.tiledLayers)
|
|
181
184
|
for (const t of l.tiledLayers)
|
|
182
|
-
t.scaleBasedRendering &&
|
|
185
|
+
t.scaleBasedRendering && lt(t);
|
|
183
186
|
});
|
|
184
|
-
function
|
|
187
|
+
function De(t) {
|
|
185
188
|
if (!t.scaleBasedRendering)
|
|
186
189
|
return "tiled";
|
|
187
|
-
const
|
|
188
|
-
if (!
|
|
190
|
+
const u = Ue.value[t.id];
|
|
191
|
+
if (!u)
|
|
189
192
|
return "tiled";
|
|
190
|
-
const s =
|
|
191
|
-
return s === 0 || s >
|
|
193
|
+
const s = c.value;
|
|
194
|
+
return s === 0 || s > u.maxScale ? "tiled" : "dynamic";
|
|
192
195
|
}
|
|
193
|
-
const
|
|
194
|
-
function
|
|
196
|
+
const nt = z(() => l.tiledLayers ? l.tiledLayers.filter((t) => te(t.id) ? t.scaleBasedRendering ? De(t) === "tiled" : !0 : !1) : []), rt = z(() => l.tiledLayers ? l.tiledLayers.filter((t) => te(t.id) && t.scaleBasedRendering ? De(t) === "dynamic" : !1) : []);
|
|
197
|
+
function _e(t) {
|
|
195
198
|
return {
|
|
196
199
|
type: "raster",
|
|
197
200
|
tiles: [`${t.url.replace(/\/$/, "")}/export?bbox={bbox-epsg-3857}&bboxSR=3857&imageSR=3857&size=256,256&format=png32&transparent=true&f=image`],
|
|
@@ -199,253 +202,253 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ he({
|
|
|
199
202
|
attribution: t.attribution || ""
|
|
200
203
|
};
|
|
201
204
|
}
|
|
202
|
-
function
|
|
203
|
-
return { type: "geojson", data:
|
|
205
|
+
function $e(t) {
|
|
206
|
+
return { type: "geojson", data: x.value[t.id], tolerance: 0 };
|
|
204
207
|
}
|
|
205
|
-
function
|
|
208
|
+
function Re(t) {
|
|
206
209
|
return l.layerOpacities[t] ?? 1;
|
|
207
210
|
}
|
|
208
|
-
function
|
|
209
|
-
const
|
|
211
|
+
function Me(t) {
|
|
212
|
+
const u = Re(t.id), s = t.type === "circle" ? "circle-opacity" : t.type === "fill" ? "fill-opacity" : "line-opacity";
|
|
210
213
|
if (t.type === "fill" && t.paint["fill-opacity"] === 0)
|
|
211
214
|
return { ...t.paint, "fill-opacity": 0 };
|
|
212
|
-
const
|
|
213
|
-
if (A &&
|
|
214
|
-
if (
|
|
215
|
-
return
|
|
215
|
+
const b = t.type === "circle" ? "circle-color" : t.type === "fill" ? "fill-color" : "line-color", C = { ...t.paint }, F = C[b], A = C[s] === 1, X = typeof F == "string" && F.startsWith("rgba(");
|
|
216
|
+
if (A && X) {
|
|
217
|
+
if (u === 1)
|
|
218
|
+
return C;
|
|
216
219
|
{
|
|
217
|
-
const U =
|
|
220
|
+
const U = F.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
218
221
|
if (U && U[4]) {
|
|
219
|
-
const [, oe,
|
|
220
|
-
|
|
222
|
+
const [, oe, Z, Y, Q] = U, ue = parseFloat(Q) * u;
|
|
223
|
+
C[b] = `rgba(${oe}, ${Z}, ${Y}, ${ue})`, C[s] = 1;
|
|
221
224
|
}
|
|
222
|
-
return
|
|
225
|
+
return C;
|
|
223
226
|
}
|
|
224
227
|
}
|
|
225
|
-
if (
|
|
226
|
-
const U =
|
|
228
|
+
if (X) {
|
|
229
|
+
const U = F.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
227
230
|
if (U) {
|
|
228
|
-
const [, oe,
|
|
229
|
-
|
|
231
|
+
const [, oe, Z, Y] = U;
|
|
232
|
+
C[b] = `rgb(${oe}, ${Z}, ${Y})`;
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
|
-
return
|
|
235
|
+
return C[s] = u, C;
|
|
233
236
|
}
|
|
234
|
-
function
|
|
235
|
-
const
|
|
236
|
-
return { ...t.outlinePaint, "line-opacity":
|
|
237
|
+
function st(t) {
|
|
238
|
+
const u = Re(t.id);
|
|
239
|
+
return { ...t.outlinePaint, "line-opacity": u };
|
|
237
240
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
240
|
-
const
|
|
241
|
-
return l.layerList.find((
|
|
241
|
+
const re = k([]), Ae = k(null), ae = k(0);
|
|
242
|
+
function Fe(t) {
|
|
243
|
+
const u = t.replace(/-outline$/, "");
|
|
244
|
+
return l.layerList.find((b) => b.config.id === u)?.config;
|
|
242
245
|
}
|
|
243
|
-
function
|
|
244
|
-
return t.replace(/\{([^}]+)\}/g, (s,
|
|
245
|
-
const
|
|
246
|
-
return
|
|
246
|
+
function ct(t, u) {
|
|
247
|
+
return t.replace(/\{([^}]+)\}/g, (s, b) => {
|
|
248
|
+
const C = u[b];
|
|
249
|
+
return C == null ? "" : String(C);
|
|
247
250
|
});
|
|
248
251
|
}
|
|
249
|
-
function
|
|
252
|
+
function be(t) {
|
|
250
253
|
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
251
254
|
}
|
|
252
|
-
function
|
|
255
|
+
function We(t, u, s) {
|
|
253
256
|
if (t == null) return "-";
|
|
254
|
-
if (
|
|
255
|
-
const
|
|
256
|
-
if (s &&
|
|
257
|
-
return
|
|
258
|
-
switch (
|
|
257
|
+
if (u?.dateFormat && typeof t == "number") {
|
|
258
|
+
const b = new Date(t);
|
|
259
|
+
if (s && u.dateFormat === "shortDateShortTime")
|
|
260
|
+
return b.toLocaleString(void 0, { dateStyle: "short", timeStyle: "short" });
|
|
261
|
+
switch (u.dateFormat) {
|
|
259
262
|
case "shortDateShortTime":
|
|
260
|
-
return
|
|
263
|
+
return b.toLocaleDateString();
|
|
261
264
|
case "longMonthDayYear":
|
|
262
|
-
return
|
|
265
|
+
return b.toLocaleDateString(void 0, { month: "long", day: "numeric", year: "numeric" });
|
|
263
266
|
case "shortDate":
|
|
264
|
-
return
|
|
267
|
+
return b.toLocaleDateString();
|
|
265
268
|
case "longDate":
|
|
266
|
-
return
|
|
269
|
+
return b.toLocaleDateString(void 0, { weekday: "long", month: "long", day: "numeric", year: "numeric" });
|
|
267
270
|
default:
|
|
268
|
-
return
|
|
271
|
+
return b.toLocaleDateString();
|
|
269
272
|
}
|
|
270
273
|
}
|
|
271
274
|
if (typeof t == "number") {
|
|
272
|
-
if (t > 1e12 && !
|
|
275
|
+
if (t > 1e12 && !u)
|
|
273
276
|
return new Date(t).toLocaleDateString();
|
|
274
|
-
const
|
|
275
|
-
if (
|
|
276
|
-
if (Number.isInteger(t) &&
|
|
277
|
+
const b = u?.places, C = u?.digitSeparator ?? !0;
|
|
278
|
+
if (b !== void 0) {
|
|
279
|
+
if (Number.isInteger(t) && b >= 0)
|
|
277
280
|
return String(t);
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
280
|
-
const A =
|
|
281
|
+
const F = t.toFixed(b);
|
|
282
|
+
if (C) {
|
|
283
|
+
const A = F.split("."), X = A[0] || "0", U = A[1], oe = X.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
281
284
|
return U ? `${oe}.${U}` : oe;
|
|
282
285
|
}
|
|
283
|
-
return
|
|
286
|
+
return F;
|
|
284
287
|
}
|
|
285
|
-
return Number.isInteger(t) ? String(t) :
|
|
288
|
+
return Number.isInteger(t) ? String(t) : C ? t.toLocaleString() : String(t);
|
|
286
289
|
}
|
|
287
290
|
return String(t);
|
|
288
291
|
}
|
|
289
|
-
function
|
|
290
|
-
const
|
|
292
|
+
function je(t) {
|
|
293
|
+
const u = /* @__PURE__ */ new Set();
|
|
291
294
|
return t.filter((s) => {
|
|
292
|
-
const
|
|
293
|
-
return
|
|
295
|
+
const C = `${s.layer.id.replace(/-outline$/, "")}:${JSON.stringify(s.properties)}`;
|
|
296
|
+
return u.has(C) ? !1 : (u.add(C), !0);
|
|
294
297
|
});
|
|
295
298
|
}
|
|
296
|
-
function
|
|
297
|
-
const s =
|
|
299
|
+
function Ke(t, u) {
|
|
300
|
+
const s = x.value[t];
|
|
298
301
|
if (!s?.features) return null;
|
|
299
|
-
const
|
|
300
|
-
if (
|
|
301
|
-
const
|
|
302
|
-
(
|
|
302
|
+
const b = u.objectid ?? u.OBJECTID ?? u.FID;
|
|
303
|
+
if (b != null) {
|
|
304
|
+
const C = s.features.find(
|
|
305
|
+
(F) => (F.properties?.objectid ?? F.properties?.OBJECTID ?? F.properties?.FID) === b
|
|
303
306
|
);
|
|
304
|
-
if (
|
|
307
|
+
if (C) return C.geometry;
|
|
305
308
|
}
|
|
306
309
|
return null;
|
|
307
310
|
}
|
|
308
|
-
function
|
|
311
|
+
function we(t, u) {
|
|
309
312
|
const s = /* @__PURE__ */ new Map();
|
|
310
|
-
return
|
|
311
|
-
s.set(
|
|
312
|
-
}), t.sort((
|
|
313
|
-
const
|
|
314
|
-
return (s.get(A) ?? -1) -
|
|
313
|
+
return u.forEach((b, C) => {
|
|
314
|
+
s.set(b.id, C);
|
|
315
|
+
}), t.sort((b, C) => {
|
|
316
|
+
const F = b.layer.id.replace(/-outline$/, ""), A = C.layer.id.replace(/-outline$/, ""), X = s.get(F) ?? -1;
|
|
317
|
+
return (s.get(A) ?? -1) - X;
|
|
315
318
|
});
|
|
316
319
|
}
|
|
317
|
-
function
|
|
318
|
-
const
|
|
319
|
-
if (!
|
|
320
|
+
function Ze(t) {
|
|
321
|
+
const u = n.value;
|
|
322
|
+
if (!u) return;
|
|
320
323
|
const s = [];
|
|
321
|
-
l.layerList.forEach((
|
|
322
|
-
const
|
|
323
|
-
l.visibleLayers.has(
|
|
324
|
+
l.layerList.forEach((Z) => {
|
|
325
|
+
const Y = Z.config;
|
|
326
|
+
l.visibleLayers.has(Y.id) && (s.push(Y.id), Y.outlinePaint && s.push(`${Y.id}-outline`));
|
|
324
327
|
});
|
|
325
|
-
const
|
|
328
|
+
const b = u.project([t.lngLat.lng, t.lngLat.lat]), C = u.queryRenderedFeatures(b, {
|
|
326
329
|
layers: s
|
|
327
330
|
});
|
|
328
|
-
if (
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
if (!
|
|
332
|
-
const
|
|
331
|
+
if (C.length === 0) return;
|
|
332
|
+
const F = je(C), A = l.layerList.map((Z) => Z.config), U = we(F, A).map((Z) => {
|
|
333
|
+
const Y = Z.layer.id.replace(/-outline$/, ""), Q = Fe(Y);
|
|
334
|
+
if (!Q) return null;
|
|
335
|
+
const ue = Ke(Q.id, Z.properties || {});
|
|
333
336
|
return {
|
|
334
|
-
layerId:
|
|
335
|
-
layerTitle:
|
|
336
|
-
properties:
|
|
337
|
-
geometry:
|
|
338
|
-
popupConfig:
|
|
337
|
+
layerId: Q.id,
|
|
338
|
+
layerTitle: Q.title,
|
|
339
|
+
properties: Z.properties || {},
|
|
340
|
+
geometry: ue || Z.geometry,
|
|
341
|
+
popupConfig: Q.popup
|
|
339
342
|
};
|
|
340
|
-
}).filter((
|
|
343
|
+
}).filter((Z) => Z !== null);
|
|
341
344
|
if (U.length === 0) return;
|
|
342
|
-
|
|
345
|
+
re.value = U, ae.value = 0, Ae.value = [t.lngLat.lng, t.lngLat.lat];
|
|
343
346
|
const oe = U[0];
|
|
344
347
|
if (oe) {
|
|
345
|
-
const
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
+
const Z = Fe(oe.layerId);
|
|
349
|
+
if (Z) {
|
|
350
|
+
const Y = M(oe.geometry), Q = H(Z.id, Z.type);
|
|
348
351
|
y.value = {
|
|
349
352
|
geometry: oe.geometry,
|
|
350
|
-
geometryType:
|
|
351
|
-
layerId:
|
|
353
|
+
geometryType: Y,
|
|
354
|
+
layerId: Z.id,
|
|
352
355
|
properties: oe.properties,
|
|
353
|
-
originalStyle:
|
|
356
|
+
originalStyle: Q
|
|
354
357
|
};
|
|
355
358
|
}
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
361
|
function ie() {
|
|
359
|
-
|
|
362
|
+
re.value = [], Ae.value = null, ae.value = 0, y.value = null;
|
|
360
363
|
}
|
|
361
|
-
function
|
|
362
|
-
if (
|
|
363
|
-
const
|
|
364
|
-
if (!(
|
|
364
|
+
function Qe(t) {
|
|
365
|
+
if (re.value.length === 0) return;
|
|
366
|
+
const u = t.target;
|
|
367
|
+
if (!(u.tagName === "INPUT" || u.tagName === "TEXTAREA" || u.isContentEditable))
|
|
365
368
|
switch (t.key) {
|
|
366
369
|
case "ArrowLeft":
|
|
367
370
|
case "ArrowUp":
|
|
368
|
-
t.preventDefault(),
|
|
371
|
+
t.preventDefault(), ce();
|
|
369
372
|
break;
|
|
370
373
|
case "ArrowRight":
|
|
371
374
|
case "ArrowDown":
|
|
372
|
-
t.preventDefault(),
|
|
375
|
+
t.preventDefault(), Ee();
|
|
373
376
|
break;
|
|
374
377
|
case "Escape":
|
|
375
378
|
t.preventDefault(), ie();
|
|
376
379
|
break;
|
|
377
380
|
}
|
|
378
381
|
}
|
|
379
|
-
|
|
380
|
-
window.addEventListener("keydown",
|
|
381
|
-
}),
|
|
382
|
-
window.removeEventListener("keydown",
|
|
382
|
+
et(() => {
|
|
383
|
+
window.addEventListener("keydown", Qe);
|
|
384
|
+
}), Dt(() => {
|
|
385
|
+
window.removeEventListener("keydown", Qe);
|
|
383
386
|
});
|
|
384
|
-
function
|
|
385
|
-
const t =
|
|
387
|
+
function Ee() {
|
|
388
|
+
const t = re.value.length;
|
|
386
389
|
t <= 1 || ae.value >= t - 1 || (ae.value = ae.value + 1);
|
|
387
390
|
}
|
|
388
|
-
function
|
|
389
|
-
|
|
391
|
+
function ce() {
|
|
392
|
+
re.value.length <= 1 || ae.value <= 0 || (ae.value = ae.value - 1);
|
|
390
393
|
}
|
|
391
|
-
const
|
|
392
|
-
const t =
|
|
393
|
-
return !t || !t.popupConfig ? t?.layerTitle || "" :
|
|
394
|
-
}),
|
|
395
|
-
const t =
|
|
394
|
+
const Ie = z(() => re.value.length === 0 ? null : re.value[ae.value]), he = z(() => {
|
|
395
|
+
const t = Ie.value;
|
|
396
|
+
return !t || !t.popupConfig ? t?.layerTitle || "" : ct(t.popupConfig.title, t.properties);
|
|
397
|
+
}), qe = z(() => {
|
|
398
|
+
const t = Ie.value;
|
|
396
399
|
if (!t) return "";
|
|
397
|
-
let
|
|
398
|
-
if (
|
|
399
|
-
|
|
400
|
+
let u = '<div class="popup-content">';
|
|
401
|
+
if (u += `<h3 class="popup-title">${be(he.value)}</h3>`, t.popupConfig?.fields?.length) {
|
|
402
|
+
u += `<table class="popup-table" aria-label="${be(he.value)}">`;
|
|
400
403
|
for (const s of t.popupConfig.fields) {
|
|
401
|
-
const
|
|
402
|
-
|
|
404
|
+
const b = We(t.properties[s.field], s.format, t.popupConfig.showTime), C = s.label.toLowerCase(), F = C.includes("url") || C.includes("website"), A = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || F && b.includes("."), X = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`, U = A ? `<a href="${be(X)}" target="_blank" rel="noopener noreferrer">${be(b)}</a>` : be(b);
|
|
405
|
+
u += `<tr><th scope="row">${be(s.label)}</th><td>${U}</td></tr>`;
|
|
403
406
|
}
|
|
404
|
-
|
|
407
|
+
u += "</table>";
|
|
405
408
|
}
|
|
406
|
-
return
|
|
407
|
-
}),
|
|
409
|
+
return u += "</div>", u;
|
|
410
|
+
}), Le = k({
|
|
408
411
|
type: "FeatureCollection",
|
|
409
412
|
features: []
|
|
410
|
-
}),
|
|
413
|
+
}), le = k({
|
|
411
414
|
type: "FeatureCollection",
|
|
412
415
|
features: []
|
|
413
|
-
}),
|
|
416
|
+
}), Be = k({
|
|
414
417
|
type: "FeatureCollection",
|
|
415
418
|
features: []
|
|
416
|
-
}),
|
|
419
|
+
}), ut = {
|
|
417
420
|
"circle-radius": ["get", "highlightRadius"],
|
|
418
421
|
"circle-color": "#00FFFF",
|
|
419
422
|
"circle-opacity": 0.8,
|
|
420
423
|
"circle-stroke-width": 2,
|
|
421
424
|
"circle-stroke-color": "#FFFFFF"
|
|
422
|
-
},
|
|
425
|
+
}, dt = {
|
|
423
426
|
"line-width": ["get", "highlightWidth"],
|
|
424
427
|
"line-color": "#00FFFF",
|
|
425
428
|
"line-opacity": 0.9
|
|
426
|
-
},
|
|
429
|
+
}, Xe = {
|
|
427
430
|
"fill-color": "#808080",
|
|
428
431
|
"fill-opacity": 0.5
|
|
429
|
-
}, y =
|
|
432
|
+
}, y = k(null);
|
|
430
433
|
function M(t) {
|
|
431
434
|
return t.type;
|
|
432
435
|
}
|
|
433
|
-
function
|
|
434
|
-
const s =
|
|
436
|
+
function H(t, u) {
|
|
437
|
+
const s = Fe(t);
|
|
435
438
|
if (!s) return { radius: 5, width: 2 };
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
438
|
-
const
|
|
439
|
-
return typeof
|
|
439
|
+
const b = s.paint || {};
|
|
440
|
+
if (u === "circle") {
|
|
441
|
+
const C = b["circle-radius"];
|
|
442
|
+
return typeof C == "number" ? { radius: C } : { radius: 5 };
|
|
440
443
|
}
|
|
441
|
-
if (
|
|
442
|
-
const
|
|
443
|
-
if (typeof
|
|
444
|
-
return { width:
|
|
444
|
+
if (u === "line" || u === "fill") {
|
|
445
|
+
const C = b["line-width"];
|
|
446
|
+
if (typeof C == "number")
|
|
447
|
+
return { width: C };
|
|
445
448
|
if (s.outlinePaint && s.outlinePaint["line-width"]) {
|
|
446
|
-
const
|
|
447
|
-
if (typeof
|
|
448
|
-
return { width:
|
|
449
|
+
const F = s.outlinePaint["line-width"];
|
|
450
|
+
if (typeof F == "number")
|
|
451
|
+
return { width: F };
|
|
449
452
|
}
|
|
450
453
|
return { width: 2 };
|
|
451
454
|
}
|
|
@@ -454,40 +457,40 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ he({
|
|
|
454
457
|
function N(t) {
|
|
455
458
|
return !t || t.length === 0 ? [] : t[0] ?? [];
|
|
456
459
|
}
|
|
457
|
-
function
|
|
458
|
-
const { geometry:
|
|
460
|
+
function J(t) {
|
|
461
|
+
const { geometry: u, geometryType: s, originalStyle: b } = t;
|
|
459
462
|
if (s === "Point" || s === "MultiPoint") {
|
|
460
|
-
const
|
|
463
|
+
const F = (b.radius || 5) + 3;
|
|
461
464
|
return {
|
|
462
465
|
type: "FeatureCollection",
|
|
463
466
|
features: [
|
|
464
467
|
{
|
|
465
468
|
type: "Feature",
|
|
466
|
-
geometry:
|
|
469
|
+
geometry: u,
|
|
467
470
|
properties: {
|
|
468
|
-
highlightRadius:
|
|
471
|
+
highlightRadius: F
|
|
469
472
|
}
|
|
470
473
|
}
|
|
471
474
|
]
|
|
472
475
|
};
|
|
473
476
|
}
|
|
474
477
|
if (s === "LineString" || s === "MultiLineString") {
|
|
475
|
-
const
|
|
478
|
+
const F = (b.width || 2) + 3;
|
|
476
479
|
return {
|
|
477
480
|
type: "FeatureCollection",
|
|
478
481
|
features: [
|
|
479
482
|
{
|
|
480
483
|
type: "Feature",
|
|
481
|
-
geometry:
|
|
484
|
+
geometry: u,
|
|
482
485
|
properties: {
|
|
483
|
-
highlightWidth:
|
|
486
|
+
highlightWidth: F
|
|
484
487
|
}
|
|
485
488
|
}
|
|
486
489
|
]
|
|
487
490
|
};
|
|
488
491
|
}
|
|
489
492
|
if (s === "Polygon") {
|
|
490
|
-
const
|
|
493
|
+
const C = u.coordinates, F = N(C), X = (b.width || 2) + 3;
|
|
491
494
|
return {
|
|
492
495
|
type: "FeatureCollection",
|
|
493
496
|
features: [
|
|
@@ -495,20 +498,20 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ he({
|
|
|
495
498
|
type: "Feature",
|
|
496
499
|
geometry: {
|
|
497
500
|
type: "LineString",
|
|
498
|
-
coordinates:
|
|
501
|
+
coordinates: F
|
|
499
502
|
},
|
|
500
503
|
properties: {
|
|
501
|
-
highlightWidth:
|
|
504
|
+
highlightWidth: X
|
|
502
505
|
}
|
|
503
506
|
}
|
|
504
507
|
]
|
|
505
508
|
};
|
|
506
509
|
}
|
|
507
510
|
if (s === "MultiPolygon") {
|
|
508
|
-
const
|
|
511
|
+
const C = u.coordinates, A = (b.width || 2) + 3;
|
|
509
512
|
return {
|
|
510
513
|
type: "FeatureCollection",
|
|
511
|
-
features:
|
|
514
|
+
features: C.map((U) => ({
|
|
512
515
|
type: "Feature",
|
|
513
516
|
geometry: {
|
|
514
517
|
type: "LineString",
|
|
@@ -525,59 +528,59 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ he({
|
|
|
525
528
|
features: []
|
|
526
529
|
};
|
|
527
530
|
}
|
|
528
|
-
function
|
|
529
|
-
const { geometry:
|
|
531
|
+
function Se(t) {
|
|
532
|
+
const { geometry: u, geometryType: s } = t;
|
|
530
533
|
return s === "Polygon" || s === "MultiPolygon" ? {
|
|
531
534
|
type: "FeatureCollection",
|
|
532
|
-
features: [{ type: "Feature", geometry:
|
|
535
|
+
features: [{ type: "Feature", geometry: u, properties: {} }]
|
|
533
536
|
} : { type: "FeatureCollection", features: [] };
|
|
534
537
|
}
|
|
535
|
-
function
|
|
538
|
+
function Ve(t) {
|
|
536
539
|
if (!t) {
|
|
537
|
-
|
|
540
|
+
Nt();
|
|
538
541
|
return;
|
|
539
542
|
}
|
|
540
|
-
const
|
|
541
|
-
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (
|
|
543
|
+
const u = J(t);
|
|
544
|
+
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (Le.value = u, le.value = { type: "FeatureCollection", features: [] }, Be.value = { type: "FeatureCollection", features: [] }) : (le.value = u, Le.value = { type: "FeatureCollection", features: [] }, Be.value = Se(t));
|
|
542
545
|
}
|
|
543
|
-
function
|
|
544
|
-
|
|
546
|
+
function Nt() {
|
|
547
|
+
Le.value = { type: "FeatureCollection", features: [] }, le.value = { type: "FeatureCollection", features: [] }, Be.value = { type: "FeatureCollection", features: [] };
|
|
545
548
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
}),
|
|
549
|
+
Oe(y, (t) => {
|
|
550
|
+
Ve(t);
|
|
551
|
+
}), Oe(
|
|
549
552
|
() => l.visibleLayers,
|
|
550
553
|
(t) => {
|
|
551
554
|
y.value && !t.has(y.value.layerId) && (y.value = null, ie());
|
|
552
555
|
},
|
|
553
556
|
{ deep: !0 }
|
|
554
|
-
),
|
|
555
|
-
const t =
|
|
557
|
+
), Oe(ae, () => {
|
|
558
|
+
const t = Ie.value;
|
|
556
559
|
if (!t) {
|
|
557
560
|
y.value = null;
|
|
558
561
|
return;
|
|
559
562
|
}
|
|
560
|
-
const
|
|
561
|
-
if (
|
|
562
|
-
const s = M(t.geometry),
|
|
563
|
+
const u = Fe(t.layerId);
|
|
564
|
+
if (u) {
|
|
565
|
+
const s = M(t.geometry), b = H(u.id, u.type);
|
|
563
566
|
y.value = {
|
|
564
567
|
geometry: t.geometry,
|
|
565
568
|
geometryType: s,
|
|
566
|
-
layerId:
|
|
569
|
+
layerId: u.id,
|
|
567
570
|
properties: t.properties,
|
|
568
|
-
originalStyle:
|
|
571
|
+
originalStyle: b
|
|
569
572
|
};
|
|
570
573
|
}
|
|
571
574
|
});
|
|
572
|
-
const
|
|
573
|
-
function
|
|
574
|
-
const [
|
|
575
|
-
|
|
575
|
+
const St = k(null);
|
|
576
|
+
function Ut(t) {
|
|
577
|
+
const [u, s] = t.geometry.coordinates;
|
|
578
|
+
St.value = [u, s];
|
|
576
579
|
}
|
|
577
|
-
return (t,
|
|
578
|
-
|
|
580
|
+
return (t, u) => (m(), $("div", oo, [
|
|
581
|
+
G(d(Qt), {
|
|
579
582
|
ref_key: "mapRef",
|
|
580
|
-
ref:
|
|
583
|
+
ref: r,
|
|
581
584
|
zoom: l.initialZoom,
|
|
582
585
|
center: l.initialCenter,
|
|
583
586
|
"navigation-controls": { position: l.navigationControlPosition },
|
|
@@ -592,125 +595,125 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ he({
|
|
|
592
595
|
"pictometry-button-position": l.pictometryButtonPosition,
|
|
593
596
|
"tool-panel-layout": "vertical",
|
|
594
597
|
"tool-panel-split-ratio": 50,
|
|
595
|
-
onZoom:
|
|
598
|
+
onZoom: w,
|
|
596
599
|
onClick: ie,
|
|
597
600
|
onMoveend: L,
|
|
598
|
-
onLoad:
|
|
599
|
-
onSearchResult:
|
|
601
|
+
onLoad: S,
|
|
602
|
+
onSearchResult: Ut
|
|
600
603
|
}, {
|
|
601
|
-
default:
|
|
602
|
-
l.drawControlPosition !== null ? (m(),
|
|
604
|
+
default: Ge(() => [
|
|
605
|
+
l.drawControlPosition !== null ? (m(), j(d(Xt), {
|
|
603
606
|
key: 0,
|
|
604
607
|
position: l.drawControlPosition
|
|
605
|
-
}, null, 8, ["position"])) :
|
|
606
|
-
(m(!0),
|
|
608
|
+
}, null, 8, ["position"])) : R("", !0),
|
|
609
|
+
(m(!0), $(se, null, ge(nt.value, (s) => (m(), j(d($t), {
|
|
607
610
|
id: "tiled-" + s.id,
|
|
608
611
|
key: "tiled-" + s.id,
|
|
609
|
-
source:
|
|
610
|
-
paint: { "raster-opacity":
|
|
612
|
+
source: me(s),
|
|
613
|
+
paint: { "raster-opacity": V(s.id) },
|
|
611
614
|
minzoom: s.minZoom,
|
|
612
615
|
maxzoom: s.maxZoom
|
|
613
616
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
614
|
-
(m(!0),
|
|
617
|
+
(m(!0), $(se, null, ge(rt.value, (s) => (m(), j(d($t), {
|
|
615
618
|
id: "dynamic-" + s.id,
|
|
616
619
|
key: "dynamic-" + s.id,
|
|
617
|
-
source:
|
|
618
|
-
paint: { "raster-opacity":
|
|
620
|
+
source: _e(s),
|
|
621
|
+
paint: { "raster-opacity": V(s.id) },
|
|
619
622
|
minzoom: s.minZoom,
|
|
620
623
|
maxzoom: s.maxZoom
|
|
621
624
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
622
|
-
(m(!0),
|
|
625
|
+
(m(!0), $(se, null, ge(K.value, (s) => (m(), j(d(Mt), {
|
|
623
626
|
id: s.id,
|
|
624
627
|
key: s.id,
|
|
625
|
-
source:
|
|
626
|
-
paint:
|
|
628
|
+
source: $e(s),
|
|
629
|
+
paint: Me(s),
|
|
627
630
|
minzoom: s.minZoom,
|
|
628
631
|
maxzoom: s.maxZoom,
|
|
629
632
|
"before-id": "highlight-circles",
|
|
630
|
-
onClick:
|
|
633
|
+
onClick: Ze
|
|
631
634
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
632
|
-
(m(!0),
|
|
635
|
+
(m(!0), $(se, null, ge(T.value, (s) => (m(), j(d(Pt), {
|
|
633
636
|
id: s.id,
|
|
634
637
|
key: s.id,
|
|
635
|
-
source:
|
|
636
|
-
paint:
|
|
638
|
+
source: $e(s),
|
|
639
|
+
paint: Me(s),
|
|
637
640
|
minzoom: s.minZoom,
|
|
638
641
|
maxzoom: s.maxZoom,
|
|
639
642
|
"before-id": "highlight-circles",
|
|
640
|
-
onClick:
|
|
643
|
+
onClick: Ze
|
|
641
644
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
642
|
-
(m(!0),
|
|
645
|
+
(m(!0), $(se, null, ge(I.value, (s) => (m(), j(d(ft), {
|
|
643
646
|
id: s.id + "-outline",
|
|
644
647
|
key: s.id + "-outline",
|
|
645
|
-
source:
|
|
646
|
-
paint:
|
|
648
|
+
source: $e(s),
|
|
649
|
+
paint: st(s),
|
|
647
650
|
minzoom: s.minZoom,
|
|
648
651
|
maxzoom: s.maxZoom,
|
|
649
652
|
"before-id": "highlight-lines",
|
|
650
|
-
onClick:
|
|
653
|
+
onClick: Ze
|
|
651
654
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
652
|
-
(m(!0),
|
|
655
|
+
(m(!0), $(se, null, ge(_.value, (s) => (m(), j(d(ft), {
|
|
653
656
|
id: s.id,
|
|
654
657
|
key: s.id,
|
|
655
|
-
source:
|
|
656
|
-
paint:
|
|
658
|
+
source: $e(s),
|
|
659
|
+
paint: Me(s),
|
|
657
660
|
minzoom: s.minZoom,
|
|
658
661
|
maxzoom: s.maxZoom,
|
|
659
662
|
"before-id": "highlight-lines",
|
|
660
|
-
onClick:
|
|
663
|
+
onClick: Ze
|
|
661
664
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
662
|
-
|
|
665
|
+
G(d(Mt), {
|
|
663
666
|
id: "highlight-circles",
|
|
664
667
|
key: "highlight-circles-layer",
|
|
665
|
-
source: { type: "geojson", data:
|
|
666
|
-
paint:
|
|
668
|
+
source: { type: "geojson", data: Le.value },
|
|
669
|
+
paint: ut
|
|
667
670
|
}, null, 8, ["source"]),
|
|
668
|
-
|
|
671
|
+
G(d(Pt), {
|
|
669
672
|
id: "highlight-fill",
|
|
670
673
|
key: "highlight-fill-layer",
|
|
671
|
-
source: { type: "geojson", data:
|
|
672
|
-
paint:
|
|
674
|
+
source: { type: "geojson", data: Be.value },
|
|
675
|
+
paint: Xe
|
|
673
676
|
}, null, 8, ["source"]),
|
|
674
|
-
|
|
677
|
+
G(d(ft), {
|
|
675
678
|
id: "highlight-lines",
|
|
676
679
|
key: "highlight-lines-layer",
|
|
677
|
-
source: { type: "geojson", data:
|
|
678
|
-
paint:
|
|
680
|
+
source: { type: "geojson", data: le.value },
|
|
681
|
+
paint: dt
|
|
679
682
|
}, null, 8, ["source"]),
|
|
680
|
-
|
|
681
|
-
"lng-lat":
|
|
683
|
+
G(d(Yt), {
|
|
684
|
+
"lng-lat": St.value,
|
|
682
685
|
color: "#2176d2"
|
|
683
686
|
}, null, 8, ["lng-lat"]),
|
|
684
|
-
|
|
687
|
+
Ie.value && Ae.value ? (m(), j(d(eo), {
|
|
685
688
|
key: 1,
|
|
686
|
-
"lng-lat":
|
|
687
|
-
html:
|
|
689
|
+
"lng-lat": Ae.value,
|
|
690
|
+
html: qe.value,
|
|
688
691
|
"close-on-click": !1,
|
|
689
692
|
offset: [0, -15],
|
|
690
|
-
"show-navigation":
|
|
693
|
+
"show-navigation": re.value.length > 1,
|
|
691
694
|
"current-feature-index": ae.value,
|
|
692
|
-
"total-features":
|
|
693
|
-
"layer-name":
|
|
695
|
+
"total-features": re.value.length,
|
|
696
|
+
"layer-name": Ie.value.layerTitle,
|
|
694
697
|
onClose: ie,
|
|
695
|
-
onNext:
|
|
696
|
-
onPrevious:
|
|
697
|
-
}, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) :
|
|
698
|
+
onNext: Ee,
|
|
699
|
+
onPrevious: ce
|
|
700
|
+
}, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) : R("", !0)
|
|
698
701
|
]),
|
|
699
702
|
_: 1
|
|
700
703
|
}, 8, ["zoom", "center", "navigation-controls", "geolocation-control", "basemap-change-controls", "map-search-control", "cyclomedia-config", "cyclomedia-button-position", "pictometry-credentials", "pictometry-button-position"])
|
|
701
704
|
]));
|
|
702
705
|
}
|
|
703
|
-
}),
|
|
706
|
+
}), xe = (e, i) => {
|
|
704
707
|
const l = e.__vccOpts || e;
|
|
705
|
-
for (const [o,
|
|
706
|
-
l[o] =
|
|
708
|
+
for (const [o, r] of i)
|
|
709
|
+
l[o] = r;
|
|
707
710
|
return l;
|
|
708
|
-
},
|
|
709
|
-
function
|
|
710
|
-
let
|
|
711
|
-
return
|
|
711
|
+
}, io = /* @__PURE__ */ xe(ao, [["__scopeId", "data-v-1921fe4b"]]);
|
|
712
|
+
function Rt(e) {
|
|
713
|
+
let i = e.split("?")[0] || e;
|
|
714
|
+
return i = i.replace(/\/query$/, ""), i = i.replace(/\/$/, ""), i.toLowerCase();
|
|
712
715
|
}
|
|
713
|
-
const
|
|
716
|
+
const lo = ["disabled"], no = /* @__PURE__ */ pe({
|
|
714
717
|
inheritAttrs: !1,
|
|
715
718
|
__name: "PhlButton",
|
|
716
719
|
props: {
|
|
@@ -732,79 +735,79 @@ const ao = ["disabled"], io = /* @__PURE__ */ he({
|
|
|
732
735
|
svgRaw: {}
|
|
733
736
|
},
|
|
734
737
|
setup(e) {
|
|
735
|
-
const
|
|
738
|
+
const i = e, l = (c) => "href" in c && c.href !== void 0 || "to" in c && c.to !== void 0, o = z(() => mt(
|
|
736
739
|
"phila-button",
|
|
737
|
-
`phila-button--${
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
)),
|
|
743
|
-
to:
|
|
744
|
-
disabled:
|
|
740
|
+
`phila-button--${i.variant}`,
|
|
741
|
+
i.size && `is-${i.size}`,
|
|
742
|
+
i.iconOnly && "icon-button",
|
|
743
|
+
i.iconOnly && i.variant === "standard" && "icon-button--standard",
|
|
744
|
+
i.className
|
|
745
|
+
)), r = z(() => l(i) ? "to" in i && i.to !== void 0 ? {
|
|
746
|
+
to: i.to,
|
|
747
|
+
disabled: i.disabled,
|
|
745
748
|
className: o.value
|
|
746
749
|
} : {
|
|
747
|
-
href:
|
|
748
|
-
target:
|
|
749
|
-
rel:
|
|
750
|
-
disabled:
|
|
750
|
+
href: i.href,
|
|
751
|
+
target: i.target,
|
|
752
|
+
rel: i.rel,
|
|
753
|
+
disabled: i.disabled,
|
|
751
754
|
className: o.value
|
|
752
|
-
} : {}),
|
|
755
|
+
} : {}), n = z(
|
|
753
756
|
() => ({
|
|
754
|
-
iconDefinition:
|
|
755
|
-
iconClass:
|
|
756
|
-
src:
|
|
757
|
-
iconRight:
|
|
758
|
-
iconOnly:
|
|
759
|
-
text:
|
|
760
|
-
size:
|
|
757
|
+
iconDefinition: i.iconDefinition,
|
|
758
|
+
iconClass: i.iconClass,
|
|
759
|
+
src: i.src,
|
|
760
|
+
iconRight: i.iconRight,
|
|
761
|
+
iconOnly: i.iconOnly,
|
|
762
|
+
text: i.text,
|
|
763
|
+
size: i.size
|
|
761
764
|
})
|
|
762
765
|
);
|
|
763
|
-
return (
|
|
764
|
-
default:
|
|
765
|
-
|
|
766
|
-
default:
|
|
767
|
-
|
|
768
|
-
|
|
766
|
+
return (c, w) => l(i) ? (m(), j(d(to), yt({ key: 0 }, { ...r.value, ...c.$attrs }, { role: "button" }), {
|
|
767
|
+
default: Ge(() => [
|
|
768
|
+
G(d(Tt), Ct(kt(n.value)), {
|
|
769
|
+
default: Ge(() => [
|
|
770
|
+
fe(c.$slots, "default", {}, () => [
|
|
771
|
+
ke(q(i.text), 1)
|
|
769
772
|
])
|
|
770
773
|
]),
|
|
771
774
|
_: 3
|
|
772
775
|
}, 16)
|
|
773
776
|
]),
|
|
774
777
|
_: 3
|
|
775
|
-
}, 16)) : (m(),
|
|
778
|
+
}, 16)) : (m(), $("button", yt({
|
|
776
779
|
key: 1,
|
|
777
780
|
type: "button",
|
|
778
|
-
disabled:
|
|
781
|
+
disabled: i.disabled,
|
|
779
782
|
class: o.value
|
|
780
|
-
},
|
|
781
|
-
|
|
782
|
-
default:
|
|
783
|
-
|
|
784
|
-
|
|
783
|
+
}, c.$attrs), [
|
|
784
|
+
G(d(Tt), Ct(kt(n.value)), {
|
|
785
|
+
default: Ge(() => [
|
|
786
|
+
fe(c.$slots, "default", {}, () => [
|
|
787
|
+
ke(q(i.text), 1)
|
|
785
788
|
])
|
|
786
789
|
]),
|
|
787
790
|
_: 3
|
|
788
791
|
}, 16)
|
|
789
|
-
], 16,
|
|
792
|
+
], 16, lo));
|
|
790
793
|
}
|
|
791
794
|
});
|
|
792
|
-
var
|
|
795
|
+
var ro = {
|
|
793
796
|
prefix: "fas",
|
|
794
797
|
iconName: "circle-exclamation",
|
|
795
798
|
icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]
|
|
796
|
-
},
|
|
799
|
+
}, so = ro, co = {
|
|
797
800
|
prefix: "fas",
|
|
798
801
|
iconName: "xmark",
|
|
799
802
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
|
|
800
|
-
},
|
|
801
|
-
const
|
|
803
|
+
}, uo = co;
|
|
804
|
+
const fo = ["for"], po = { class: "state-layer" }, yo = { class: "content" }, mo = { class: "input-text-container" }, ho = ["id", "placeholder", "aria-label"], go = {
|
|
802
805
|
key: 1,
|
|
803
806
|
class: "has-text-body-small phila-supporting-text"
|
|
804
|
-
},
|
|
807
|
+
}, vo = {
|
|
805
808
|
key: 2,
|
|
806
809
|
class: "has-text-body-small phila-error-text"
|
|
807
|
-
},
|
|
810
|
+
}, bo = /* @__PURE__ */ pe({
|
|
808
811
|
inheritAttrs: !1,
|
|
809
812
|
__name: "TextField",
|
|
810
813
|
props: {
|
|
@@ -821,122 +824,122 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
821
824
|
} }
|
|
822
825
|
},
|
|
823
826
|
emits: ["update:modelValue"],
|
|
824
|
-
setup(e, { emit:
|
|
825
|
-
const l =
|
|
826
|
-
get: () => o.modelValue !== void 0 ? o.modelValue :
|
|
827
|
-
set: (
|
|
828
|
-
|
|
827
|
+
setup(e, { emit: i }) {
|
|
828
|
+
const l = Wt(), o = e, r = z(() => typeof o.error == "string" ? o.error : o.error[0]), n = jt(o, "id"), c = i, w = k(""), p = z({
|
|
829
|
+
get: () => o.modelValue !== void 0 ? o.modelValue : w.value,
|
|
830
|
+
set: (f) => {
|
|
831
|
+
c("update:modelValue", f), w.value = f;
|
|
829
832
|
}
|
|
830
|
-
}),
|
|
831
|
-
const
|
|
832
|
-
return l.disabled != null &&
|
|
833
|
-
}),
|
|
834
|
-
const
|
|
835
|
-
return
|
|
836
|
-
}),
|
|
833
|
+
}), x = z(() => {
|
|
834
|
+
const f = ["default-class"];
|
|
835
|
+
return l.disabled != null && f.push("phila-input--disabled"), r.value && f.push("phila-input--error"), l.required != null && f.push("phila-input--required"), mt(...f);
|
|
836
|
+
}), h = z(() => {
|
|
837
|
+
const f = [];
|
|
838
|
+
return p.value !== "" && f.push("phila-text-field--filled"), o.className && f.push(o.className), mt(...f);
|
|
839
|
+
}), g = z(() => {
|
|
837
840
|
if (!(o.label || l["aria-label"]))
|
|
838
841
|
return o.placeholder || void 0;
|
|
839
|
-
}),
|
|
840
|
-
|
|
842
|
+
}), a = k(null), v = (f) => {
|
|
843
|
+
f.target.closest("button") || a.value?.focus();
|
|
841
844
|
};
|
|
842
|
-
return (
|
|
843
|
-
class:
|
|
845
|
+
return (f, L) => (m(), $("div", {
|
|
846
|
+
class: ne(["phila-input", x.value])
|
|
844
847
|
}, [
|
|
845
|
-
o.label ? (m(),
|
|
848
|
+
o.label ? (m(), $("label", {
|
|
846
849
|
key: 0,
|
|
847
|
-
for:
|
|
850
|
+
for: n.value,
|
|
848
851
|
class: "has-text-label-small phila-label"
|
|
849
|
-
},
|
|
852
|
+
}, q(o.label), 9, fo)) : R("", !0),
|
|
850
853
|
P("div", {
|
|
851
|
-
class:
|
|
852
|
-
onClick:
|
|
854
|
+
class: ne(["phila-text-field", h.value]),
|
|
855
|
+
onClick: v
|
|
853
856
|
}, [
|
|
854
|
-
P("div",
|
|
855
|
-
o.leadingIcon ? (m(),
|
|
857
|
+
P("div", po, [
|
|
858
|
+
o.leadingIcon ? (m(), j(d(Ce), {
|
|
856
859
|
key: 0,
|
|
857
860
|
"icon-class": o.leadingIcon,
|
|
858
861
|
inline: "",
|
|
859
862
|
decorative: ""
|
|
860
|
-
}, null, 8, ["icon-class"])) :
|
|
861
|
-
P("div",
|
|
862
|
-
P("div",
|
|
863
|
-
|
|
864
|
-
id:
|
|
863
|
+
}, null, 8, ["icon-class"])) : R("", !0),
|
|
864
|
+
P("div", yo, [
|
|
865
|
+
P("div", mo, [
|
|
866
|
+
_t(P("input", yt({
|
|
867
|
+
id: n.value,
|
|
865
868
|
ref_key: "inputRef",
|
|
866
|
-
ref:
|
|
867
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
869
|
+
ref: a,
|
|
870
|
+
"onUpdate:modelValue": L[0] || (L[0] = (S) => p.value = S),
|
|
868
871
|
class: "phila-text-field-input has-text-body-default",
|
|
869
872
|
placeholder: o.placeholder,
|
|
870
|
-
"aria-label":
|
|
871
|
-
}, d(l)), null, 16,
|
|
872
|
-
[
|
|
873
|
+
"aria-label": g.value
|
|
874
|
+
}, d(l)), null, 16, ho), [
|
|
875
|
+
[qt, p.value]
|
|
873
876
|
])
|
|
874
877
|
])
|
|
875
878
|
]),
|
|
876
|
-
|
|
879
|
+
p.value != "" ? (m(), j(d(no), {
|
|
877
880
|
key: 1,
|
|
878
881
|
variant: "standard",
|
|
879
882
|
size: "small",
|
|
880
883
|
"icon-only": "",
|
|
881
|
-
"icon-definition": d(
|
|
882
|
-
onClick: L[1] || (L[1] = (
|
|
883
|
-
}, null, 8, ["icon-definition"])) :
|
|
884
|
-
o.trailingIcon ? (m(),
|
|
884
|
+
"icon-definition": d(uo),
|
|
885
|
+
onClick: L[1] || (L[1] = (S) => p.value = "")
|
|
886
|
+
}, null, 8, ["icon-definition"])) : R("", !0),
|
|
887
|
+
o.trailingIcon ? (m(), j(d(Ce), {
|
|
885
888
|
key: 2,
|
|
886
889
|
size: "small",
|
|
887
890
|
"icon-class": o.trailingIcon,
|
|
888
891
|
inline: "",
|
|
889
892
|
decorative: ""
|
|
890
|
-
}, null, 8, ["icon-class"])) :
|
|
891
|
-
|
|
893
|
+
}, null, 8, ["icon-class"])) : R("", !0),
|
|
894
|
+
fe(f.$slots, "trailing-action")
|
|
892
895
|
])
|
|
893
896
|
], 2),
|
|
894
|
-
o.supportingText ? (m(),
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
"icon-definition": d(
|
|
897
|
+
o.supportingText ? (m(), $("div", go, q(o.supportingText), 1)) : R("", !0),
|
|
898
|
+
r.value ? (m(), $("div", vo, [
|
|
899
|
+
G(d(Ce), {
|
|
900
|
+
"icon-definition": d(so),
|
|
898
901
|
size: "small",
|
|
899
902
|
inline: "",
|
|
900
903
|
decorative: ""
|
|
901
904
|
}, null, 8, ["icon-definition"]),
|
|
902
|
-
|
|
903
|
-
])) :
|
|
905
|
+
ke(" " + q(r.value), 1)
|
|
906
|
+
])) : R("", !0)
|
|
904
907
|
], 2));
|
|
905
908
|
}
|
|
906
909
|
});
|
|
907
|
-
var
|
|
910
|
+
var wo = {
|
|
908
911
|
prefix: "fas",
|
|
909
912
|
iconName: "filter",
|
|
910
913
|
icon: [512, 512, [], "f0b0", "M32 64C19.1 64 7.4 71.8 2.4 83.8S.2 109.5 9.4 118.6L192 301.3 192 416c0 8.5 3.4 16.6 9.4 22.6l64 64c9.2 9.2 22.9 11.9 34.9 6.9S320 492.9 320 480l0-178.7 182.6-182.6c9.2-9.2 11.9-22.9 6.9-34.9S492.9 64 480 64L32 64z"]
|
|
911
|
-
},
|
|
914
|
+
}, Lo = {
|
|
912
915
|
prefix: "fas",
|
|
913
916
|
iconName: "caret-right",
|
|
914
917
|
icon: [256, 512, [], "f0da", "M249.3 235.8c10.2 12.6 9.5 31.1-2.2 42.8l-128 128c-9.2 9.2-22.9 11.9-34.9 6.9S64.5 396.9 64.5 384l0-256c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l128 128 2.2 2.4z"]
|
|
915
|
-
},
|
|
918
|
+
}, So = {
|
|
916
919
|
prefix: "fas",
|
|
917
920
|
iconName: "caret-left",
|
|
918
921
|
icon: [256, 512, [], "f0d9", "M7.7 235.8c-10.3 12.6-9.5 31.1 2.2 42.8l128 128c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-256c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-128 128-2.2 2.4z"]
|
|
919
|
-
},
|
|
922
|
+
}, Ft = {
|
|
920
923
|
prefix: "fas",
|
|
921
924
|
iconName: "xmark",
|
|
922
925
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
|
|
923
|
-
},
|
|
926
|
+
}, Co = {
|
|
924
927
|
prefix: "fas",
|
|
925
928
|
iconName: "bars",
|
|
926
929
|
icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
|
|
927
|
-
},
|
|
930
|
+
}, ko = {
|
|
928
931
|
prefix: "fas",
|
|
929
932
|
iconName: "circle-info",
|
|
930
933
|
icon: [512, 512, ["info-circle"], "f05a", "M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]
|
|
931
934
|
};
|
|
932
|
-
const
|
|
935
|
+
const xo = {
|
|
933
936
|
key: 0,
|
|
934
937
|
class: "loading-indicator",
|
|
935
938
|
role: "status"
|
|
936
|
-
},
|
|
939
|
+
}, $o = ["aria-label"], Mo = {
|
|
937
940
|
key: 2,
|
|
938
941
|
class: "zoom-indicator"
|
|
939
|
-
},
|
|
942
|
+
}, Po = /* @__PURE__ */ pe({
|
|
940
943
|
__name: "LayerStatusIndicators",
|
|
941
944
|
props: {
|
|
942
945
|
loading: { type: Boolean },
|
|
@@ -944,18 +947,18 @@ const Co = {
|
|
|
944
947
|
unavailable: { type: Boolean }
|
|
945
948
|
},
|
|
946
949
|
setup(e) {
|
|
947
|
-
return (
|
|
948
|
-
e.loading && !e.unavailable ? (m(),
|
|
949
|
-
e.error ? (m(),
|
|
950
|
+
return (i, l) => (m(), $(se, null, [
|
|
951
|
+
e.loading && !e.unavailable ? (m(), $("span", xo, " Loading... ")) : R("", !0),
|
|
952
|
+
e.error ? (m(), $("span", {
|
|
950
953
|
key: 1,
|
|
951
954
|
class: "error-indicator",
|
|
952
955
|
"aria-label": e.error,
|
|
953
956
|
role: "status"
|
|
954
|
-
}, " Error ", 8,
|
|
955
|
-
e.unavailable ? (m(),
|
|
957
|
+
}, " Error ", 8, $o)) : R("", !0),
|
|
958
|
+
e.unavailable ? (m(), $("span", Mo, " (zoom in) ")) : R("", !0)
|
|
956
959
|
], 64));
|
|
957
960
|
}
|
|
958
|
-
}),
|
|
961
|
+
}), tt = /* @__PURE__ */ xe(Po, [["__scopeId", "data-v-19b1b402"]]), To = { class: "opacity-control" }, Fo = ["for"], Eo = ["id", "value", "aria-label"], Io = /* @__PURE__ */ pe({
|
|
959
962
|
__name: "LayerOpacitySlider",
|
|
960
963
|
props: {
|
|
961
964
|
layerId: {},
|
|
@@ -963,17 +966,17 @@ const Co = {
|
|
|
963
966
|
opacity: {}
|
|
964
967
|
},
|
|
965
968
|
emits: ["update:opacity"],
|
|
966
|
-
setup(e, { emit:
|
|
967
|
-
const l =
|
|
968
|
-
function o(
|
|
969
|
-
const
|
|
970
|
-
l("update:opacity", parseFloat(
|
|
969
|
+
setup(e, { emit: i }) {
|
|
970
|
+
const l = i;
|
|
971
|
+
function o(r) {
|
|
972
|
+
const n = r.target;
|
|
973
|
+
l("update:opacity", parseFloat(n.value));
|
|
971
974
|
}
|
|
972
|
-
return (
|
|
975
|
+
return (r, n) => (m(), $("div", To, [
|
|
973
976
|
P("label", {
|
|
974
977
|
class: "opacity-label",
|
|
975
978
|
for: "opacity-" + e.layerId
|
|
976
|
-
}, " Opacity: " +
|
|
979
|
+
}, " Opacity: " + q(Math.round(e.opacity * 100)) + "% ", 9, Fo),
|
|
977
980
|
P("input", {
|
|
978
981
|
id: "opacity-" + e.layerId,
|
|
979
982
|
type: "range",
|
|
@@ -984,80 +987,80 @@ const Co = {
|
|
|
984
987
|
"aria-label": "Opacity for " + e.layerName,
|
|
985
988
|
class: "opacity-slider",
|
|
986
989
|
onInput: o
|
|
987
|
-
}, null, 40,
|
|
990
|
+
}, null, 40, Eo)
|
|
988
991
|
]));
|
|
989
992
|
}
|
|
990
|
-
}),
|
|
993
|
+
}), gt = /* @__PURE__ */ xe(Io, [["__scopeId", "data-v-1a025f6a"]]), Oo = ["aria-label"], zo = { class: "legend-label" }, Do = /* @__PURE__ */ pe({
|
|
991
994
|
__name: "LayerLegend",
|
|
992
995
|
props: {
|
|
993
996
|
items: {},
|
|
994
997
|
label: {}
|
|
995
998
|
},
|
|
996
999
|
setup(e) {
|
|
997
|
-
return (
|
|
1000
|
+
return (i, l) => (m(), $("ul", {
|
|
998
1001
|
class: "layer-legend",
|
|
999
1002
|
"aria-label": e.label
|
|
1000
1003
|
}, [
|
|
1001
|
-
(m(!0),
|
|
1002
|
-
key:
|
|
1004
|
+
(m(!0), $(se, null, ge(e.items, (o, r) => (m(), $("li", {
|
|
1005
|
+
key: r,
|
|
1003
1006
|
class: "legend-item"
|
|
1004
1007
|
}, [
|
|
1005
|
-
o.type === "circle" ? (m(),
|
|
1008
|
+
o.type === "circle" ? (m(), $("span", {
|
|
1006
1009
|
key: 0,
|
|
1007
1010
|
class: "legend-symbol legend-circle",
|
|
1008
|
-
style:
|
|
1011
|
+
style: de({ backgroundColor: o.color }),
|
|
1009
1012
|
"aria-hidden": "true"
|
|
1010
|
-
}, null, 4)) : o.type === "line" ? (m(),
|
|
1013
|
+
}, null, 4)) : o.type === "line" ? (m(), $("span", {
|
|
1011
1014
|
key: 1,
|
|
1012
1015
|
class: "legend-symbol legend-line",
|
|
1013
|
-
style:
|
|
1016
|
+
style: de({
|
|
1014
1017
|
backgroundColor: o.color,
|
|
1015
1018
|
height: `${o.width || 2}px`
|
|
1016
1019
|
}),
|
|
1017
1020
|
"aria-hidden": "true"
|
|
1018
|
-
}, null, 4)) : o.type === "fill" ? (m(),
|
|
1021
|
+
}, null, 4)) : o.type === "fill" ? (m(), $("span", {
|
|
1019
1022
|
key: 2,
|
|
1020
1023
|
class: "legend-symbol legend-fill",
|
|
1021
|
-
style:
|
|
1024
|
+
style: de({ backgroundColor: o.color }),
|
|
1022
1025
|
"aria-hidden": "true"
|
|
1023
|
-
}, null, 4)) :
|
|
1024
|
-
P("span",
|
|
1026
|
+
}, null, 4)) : R("", !0),
|
|
1027
|
+
P("span", zo, q(o.label), 1)
|
|
1025
1028
|
]))), 128))
|
|
1026
|
-
], 8,
|
|
1029
|
+
], 8, Oo));
|
|
1027
1030
|
}
|
|
1028
|
-
}),
|
|
1029
|
-
function
|
|
1030
|
-
function
|
|
1031
|
-
return e().visibleLayerIds.has(
|
|
1031
|
+
}), vt = /* @__PURE__ */ xe(Do, [["__scopeId", "data-v-62e210e3"]]);
|
|
1032
|
+
function bt(e) {
|
|
1033
|
+
function i(c) {
|
|
1034
|
+
return e().visibleLayerIds.has(c);
|
|
1032
1035
|
}
|
|
1033
|
-
function l(
|
|
1034
|
-
return e().layerOpacities[
|
|
1036
|
+
function l(c) {
|
|
1037
|
+
return e().layerOpacities[c] ?? 1;
|
|
1035
1038
|
}
|
|
1036
|
-
function o(
|
|
1037
|
-
return e().loadingLayerIds.has(
|
|
1039
|
+
function o(c) {
|
|
1040
|
+
return e().loadingLayerIds.has(c);
|
|
1038
1041
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return e().layerErrors[
|
|
1042
|
+
function r(c) {
|
|
1043
|
+
return e().layerErrors[c] || null;
|
|
1041
1044
|
}
|
|
1042
|
-
function
|
|
1043
|
-
const
|
|
1044
|
-
return !(
|
|
1045
|
+
function n(c) {
|
|
1046
|
+
const w = e().currentZoom, p = c.minZoom, x = c.maxZoom;
|
|
1047
|
+
return !(p !== void 0 && w < p || x !== void 0 && w > x);
|
|
1045
1048
|
}
|
|
1046
|
-
return { isVisible:
|
|
1049
|
+
return { isVisible: i, getLayerOpacity: l, isLayerLoading: o, getLayerError: r, isLayerAvailableAtZoom: n };
|
|
1047
1050
|
}
|
|
1048
|
-
const
|
|
1051
|
+
const _o = { class: "layer-panel" }, Ro = {
|
|
1049
1052
|
key: 0,
|
|
1050
1053
|
class: "search-box"
|
|
1051
|
-
},
|
|
1054
|
+
}, Ao = {
|
|
1052
1055
|
key: 1,
|
|
1053
1056
|
class: "topics-container"
|
|
1054
|
-
},
|
|
1057
|
+
}, Zo = { class: "layer-row" }, Bo = ["href", "aria-label"], Vo = {
|
|
1055
1058
|
key: 1,
|
|
1056
1059
|
class: "metadata-placeholder"
|
|
1057
|
-
},
|
|
1060
|
+
}, No = ["checked", "disabled", "onChange"], Uo = { class: "layer-title" }, Wo = {
|
|
1058
1061
|
key: 0,
|
|
1059
1062
|
class: "no-results"
|
|
1060
|
-
},
|
|
1063
|
+
}, jo = /* @__PURE__ */ pe({
|
|
1061
1064
|
__name: "LayerPanel",
|
|
1062
1065
|
props: {
|
|
1063
1066
|
layerList: {},
|
|
@@ -1075,41 +1078,41 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1075
1078
|
searchPlaceholder: { default: "Filter layers..." }
|
|
1076
1079
|
},
|
|
1077
1080
|
emits: ["toggleLayer", "setOpacity", "updateSearch"],
|
|
1078
|
-
setup(e, { emit:
|
|
1079
|
-
const l = e, o =
|
|
1081
|
+
setup(e, { emit: i }) {
|
|
1082
|
+
const l = e, o = i, r = z(() => {
|
|
1080
1083
|
if (!l.searchQuery.trim())
|
|
1081
1084
|
return l.layerList;
|
|
1082
|
-
const
|
|
1083
|
-
return l.layerList.filter((L) => L.config.title.toLowerCase().includes(
|
|
1085
|
+
const f = l.searchQuery.toLowerCase();
|
|
1086
|
+
return l.layerList.filter((L) => L.config.title.toLowerCase().includes(f));
|
|
1084
1087
|
});
|
|
1085
|
-
function
|
|
1086
|
-
const L =
|
|
1088
|
+
function n(f) {
|
|
1089
|
+
const L = Rt(f);
|
|
1087
1090
|
return l.layerMetadata[L] || null;
|
|
1088
1091
|
}
|
|
1089
|
-
const
|
|
1092
|
+
const c = z(() => l.layerList.some((f) => n(f.config.url))), { isVisible: w, getLayerOpacity: p, isLayerLoading: x, getLayerError: h, isLayerAvailableAtZoom: g } = bt(() => ({
|
|
1090
1093
|
visibleLayerIds: l.visibleLayers,
|
|
1091
1094
|
layerOpacities: l.layerOpacities,
|
|
1092
1095
|
loadingLayerIds: l.loadingLayers,
|
|
1093
1096
|
layerErrors: l.layerErrors,
|
|
1094
1097
|
currentZoom: l.currentZoom
|
|
1095
|
-
})),
|
|
1098
|
+
})), a = z({
|
|
1096
1099
|
get: () => l.searchQuery,
|
|
1097
|
-
set: (
|
|
1100
|
+
set: (f) => o("updateSearch", f)
|
|
1098
1101
|
});
|
|
1099
|
-
function
|
|
1100
|
-
o("toggleLayer",
|
|
1101
|
-
}
|
|
1102
|
-
return (
|
|
1103
|
-
e.showSearch ? (m(),
|
|
1104
|
-
|
|
1105
|
-
modelValue:
|
|
1106
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
1102
|
+
function v(f) {
|
|
1103
|
+
o("toggleLayer", f);
|
|
1104
|
+
}
|
|
1105
|
+
return (f, L) => (m(), $("div", _o, [
|
|
1106
|
+
e.showSearch ? (m(), $("div", Ro, [
|
|
1107
|
+
G(d(bo), {
|
|
1108
|
+
modelValue: a.value,
|
|
1109
|
+
"onUpdate:modelValue": L[0] || (L[0] = (S) => a.value = S),
|
|
1107
1110
|
placeholder: e.searchPlaceholder,
|
|
1108
1111
|
"class-name": "layer-search-field"
|
|
1109
1112
|
}, {
|
|
1110
|
-
"trailing-action":
|
|
1111
|
-
|
|
1112
|
-
"icon-definition": d(
|
|
1113
|
+
"trailing-action": Ge(() => [
|
|
1114
|
+
G(d(Ce), {
|
|
1115
|
+
"icon-definition": d(wo),
|
|
1113
1116
|
size: "small",
|
|
1114
1117
|
inline: "",
|
|
1115
1118
|
decorative: ""
|
|
@@ -1117,77 +1120,77 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1117
1120
|
]),
|
|
1118
1121
|
_: 1
|
|
1119
1122
|
}, 8, ["modelValue", "placeholder"])
|
|
1120
|
-
])) :
|
|
1121
|
-
e.mode === "topics" ? (m(),
|
|
1122
|
-
|
|
1123
|
+
])) : R("", !0),
|
|
1124
|
+
e.mode === "topics" ? (m(), $("div", Ao, [
|
|
1125
|
+
fe(f.$slots, "topics", {}, () => [
|
|
1123
1126
|
L[2] || (L[2] = P("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
|
|
1124
1127
|
], !0)
|
|
1125
|
-
])) : (m(),
|
|
1128
|
+
])) : (m(), $("div", {
|
|
1126
1129
|
key: 2,
|
|
1127
|
-
class:
|
|
1130
|
+
class: ne(["layer-list", { "has-metadata": c.value }])
|
|
1128
1131
|
}, [
|
|
1129
|
-
(m(!0),
|
|
1130
|
-
key:
|
|
1132
|
+
(m(!0), $(se, null, ge(r.value, (S) => (m(), $("div", {
|
|
1133
|
+
key: S.config.id,
|
|
1131
1134
|
class: "layer-item"
|
|
1132
1135
|
}, [
|
|
1133
|
-
P("div",
|
|
1134
|
-
|
|
1136
|
+
P("div", Zo, [
|
|
1137
|
+
n(S.config.url) ? (m(), $("a", {
|
|
1135
1138
|
key: 0,
|
|
1136
|
-
href:
|
|
1139
|
+
href: n(S.config.url) || "",
|
|
1137
1140
|
target: "_blank",
|
|
1138
1141
|
rel: "noopener noreferrer",
|
|
1139
1142
|
class: "metadata-link",
|
|
1140
|
-
"aria-label": "View metadata for " +
|
|
1141
|
-
onClick: L[1] || (L[1] =
|
|
1143
|
+
"aria-label": "View metadata for " + S.config.title,
|
|
1144
|
+
onClick: L[1] || (L[1] = Gt(() => {
|
|
1142
1145
|
}, ["stop"]))
|
|
1143
1146
|
}, [
|
|
1144
|
-
|
|
1145
|
-
"icon-definition": d(
|
|
1147
|
+
G(d(Ce), {
|
|
1148
|
+
"icon-definition": d(ko),
|
|
1146
1149
|
size: "small",
|
|
1147
1150
|
inline: "",
|
|
1148
1151
|
decorative: ""
|
|
1149
1152
|
}, null, 8, ["icon-definition"])
|
|
1150
|
-
], 8, Bo)) :
|
|
1153
|
+
], 8, Bo)) : c.value ? (m(), $("span", Vo)) : R("", !0),
|
|
1151
1154
|
P("label", {
|
|
1152
|
-
class:
|
|
1153
|
-
"layer-unavailable": !d(
|
|
1154
|
-
"layer-error": d(
|
|
1155
|
+
class: ne(["layer-checkbox", {
|
|
1156
|
+
"layer-unavailable": !d(g)(S.config),
|
|
1157
|
+
"layer-error": d(h)(S.config.id)
|
|
1155
1158
|
}])
|
|
1156
1159
|
}, [
|
|
1157
1160
|
P("input", {
|
|
1158
1161
|
type: "checkbox",
|
|
1159
|
-
checked: d(
|
|
1160
|
-
disabled: !d(
|
|
1161
|
-
onChange: (
|
|
1162
|
-
}, null, 40,
|
|
1163
|
-
P("span",
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
loading: d(
|
|
1167
|
-
error: d(
|
|
1168
|
-
unavailable: !d(
|
|
1162
|
+
checked: d(w)(S.config.id),
|
|
1163
|
+
disabled: !d(g)(S.config),
|
|
1164
|
+
onChange: (E) => v(S.config.id)
|
|
1165
|
+
}, null, 40, No),
|
|
1166
|
+
P("span", Uo, [
|
|
1167
|
+
ke(q(S.config.title) + " ", 1),
|
|
1168
|
+
G(tt, {
|
|
1169
|
+
loading: d(x)(S.config.id),
|
|
1170
|
+
error: d(h)(S.config.id),
|
|
1171
|
+
unavailable: !d(g)(S.config)
|
|
1169
1172
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
1170
1173
|
])
|
|
1171
1174
|
], 2)
|
|
1172
1175
|
]),
|
|
1173
|
-
e.showOpacity && d(
|
|
1176
|
+
e.showOpacity && d(w)(S.config.id) && d(g)(S.config) ? (m(), j(gt, {
|
|
1174
1177
|
key: 0,
|
|
1175
|
-
"layer-id":
|
|
1176
|
-
"layer-name":
|
|
1177
|
-
opacity: d(
|
|
1178
|
-
"onUpdate:opacity": (
|
|
1179
|
-
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) :
|
|
1180
|
-
e.showLegend && d(
|
|
1178
|
+
"layer-id": S.config.id,
|
|
1179
|
+
"layer-name": S.config.title,
|
|
1180
|
+
opacity: d(p)(S.config.id),
|
|
1181
|
+
"onUpdate:opacity": (E) => o("setOpacity", S.config.id, E)
|
|
1182
|
+
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : R("", !0),
|
|
1183
|
+
e.showLegend && d(w)(S.config.id) && d(g)(S.config) && S.config.legend?.length ? (m(), j(vt, {
|
|
1181
1184
|
key: 1,
|
|
1182
|
-
items:
|
|
1183
|
-
label: "Legend for " +
|
|
1184
|
-
}, null, 8, ["items", "label"])) :
|
|
1185
|
+
items: S.config.legend,
|
|
1186
|
+
label: "Legend for " + S.config.title
|
|
1187
|
+
}, null, 8, ["items", "label"])) : R("", !0)
|
|
1185
1188
|
]))), 128)),
|
|
1186
|
-
|
|
1189
|
+
r.value.length === 0 ? (m(), $("div", Wo, 'No layers match "' + q(e.searchQuery) + '"', 1)) : R("", !0)
|
|
1187
1190
|
], 2))
|
|
1188
1191
|
]));
|
|
1189
1192
|
}
|
|
1190
|
-
}),
|
|
1193
|
+
}), qo = /* @__PURE__ */ xe(jo, [["__scopeId", "data-v-e48bb978"]]), Go = {
|
|
1191
1194
|
esriSLSSolid: null,
|
|
1192
1195
|
esriSLSDash: [4, 3],
|
|
1193
1196
|
esriSLSDot: [1, 3],
|
|
@@ -1195,35 +1198,77 @@ const zo = { class: "layer-panel" }, Do = {
|
|
|
1195
1198
|
esriSLSDashDotDot: [4, 3, 1, 3, 1, 3],
|
|
1196
1199
|
esriSLSNull: null
|
|
1197
1200
|
};
|
|
1198
|
-
function
|
|
1201
|
+
function at(e) {
|
|
1199
1202
|
if (e)
|
|
1200
|
-
return
|
|
1203
|
+
return Go[e] ?? void 0;
|
|
1201
1204
|
}
|
|
1202
|
-
function
|
|
1205
|
+
function Ho(e, i, l, o, r) {
|
|
1206
|
+
const n = [];
|
|
1207
|
+
let c = i[0], w = [e[0]], p = 0;
|
|
1208
|
+
for (let a = 1; a < e.length; a++)
|
|
1209
|
+
i[a] === c ? w.push(e[a]) : (n.push({ style: c, breaks: w, startIndex: p }), c = i[a], w = [e[a]], p = a);
|
|
1210
|
+
n.push({ style: c, breaks: w, startIndex: p });
|
|
1211
|
+
const x = [], h = /* @__PURE__ */ new Set();
|
|
1212
|
+
let g = o.minValue ?? 0;
|
|
1213
|
+
for (let a = 0; a < n.length; a++) {
|
|
1214
|
+
const v = n[a], f = v.breaks, L = at(v.style), S = a === 0 ? null : n[a - 1].breaks[n[a - 1].breaks.length - 1].classMaxValue, E = f[f.length - 1].classMaxValue;
|
|
1215
|
+
let D;
|
|
1216
|
+
const K = !!o.defaultSymbol;
|
|
1217
|
+
S === null ? D = `${!K && o.minValue != null ? `${l} >= ${o.minValue} AND ` : ""}${l} <= ${E}` : a === n.length - 1 && K ? D = `${l} > ${S}` : D = `${l} > ${S} AND ${l} <= ${E}`;
|
|
1218
|
+
const T = {
|
|
1219
|
+
"line-opacity": ve(r)
|
|
1220
|
+
};
|
|
1221
|
+
if (L && (T["line-dasharray"] = L), f.length === 1)
|
|
1222
|
+
T["line-color"] = O(f[0].symbol?.color), T["line-width"] = ee(f[0].symbol?.width || 2);
|
|
1223
|
+
else {
|
|
1224
|
+
const V = ["step", ["get", l]], ye = ["step", ["get", l]];
|
|
1225
|
+
V.push(O(f[0].symbol?.color)), ye.push(ee(f[0].symbol?.width || 2));
|
|
1226
|
+
for (let me = 1; me < f.length; me++)
|
|
1227
|
+
V.push(f[me - 1].classMaxValue), V.push(O(f[me].symbol?.color)), ye.push(f[me - 1].classMaxValue), ye.push(ee(f[me].symbol?.width || 2));
|
|
1228
|
+
T["line-color"] = V, T["line-width"] = ye;
|
|
1229
|
+
}
|
|
1230
|
+
const I = [];
|
|
1231
|
+
for (const V of f)
|
|
1232
|
+
I.push({
|
|
1233
|
+
type: "line",
|
|
1234
|
+
color: O(V.symbol?.color),
|
|
1235
|
+
width: ee(V.symbol?.width || 2),
|
|
1236
|
+
label: V.label || `${g} - ${V.classMaxValue}`
|
|
1237
|
+
}), g = V.classMaxValue + 1;
|
|
1238
|
+
const _ = v.style.replace("esriSLS", "").toLowerCase();
|
|
1239
|
+
let te;
|
|
1240
|
+
a === 0 ? te = "" : h.has(_) ? te = `-${_}-${a}` : te = `-${_}`, h.add(_), x.push({ suffix: te, where: D, paint: T, legend: I });
|
|
1241
|
+
}
|
|
1242
|
+
return x;
|
|
1243
|
+
}
|
|
1244
|
+
function O(e) {
|
|
1203
1245
|
if (!e || !Array.isArray(e) || e.length < 3) return "#888888";
|
|
1204
|
-
const
|
|
1205
|
-
return
|
|
1246
|
+
const i = e[0], l = e[1], o = e[2], n = (e[3] ?? 255) / 255;
|
|
1247
|
+
return n === 1 ? `#${i.toString(16).padStart(2, "0")}${l.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}` : `rgba(${i}, ${l}, ${o}, ${n.toFixed(2)})`;
|
|
1206
1248
|
}
|
|
1207
|
-
function
|
|
1249
|
+
function ve(e) {
|
|
1208
1250
|
return e !== void 0 ? e : 1;
|
|
1209
1251
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1252
|
+
function ee(e) {
|
|
1253
|
+
return Math.round(e * (96 / 72) * 10) / 10;
|
|
1254
|
+
}
|
|
1255
|
+
const Jo = 559082264;
|
|
1256
|
+
function Et(e) {
|
|
1257
|
+
return !e || e <= 0 ? null : Math.round(Math.log2(Jo / e) * 100) / 100;
|
|
1213
1258
|
}
|
|
1214
|
-
function
|
|
1259
|
+
function Ko(e, i) {
|
|
1215
1260
|
const l = {};
|
|
1216
1261
|
if (e && e > 0) {
|
|
1217
|
-
const o =
|
|
1262
|
+
const o = Et(e);
|
|
1218
1263
|
o !== null && (l.minZoom = o);
|
|
1219
1264
|
}
|
|
1220
|
-
if (
|
|
1221
|
-
const o =
|
|
1265
|
+
if (i && i > 0) {
|
|
1266
|
+
const o = Et(i);
|
|
1222
1267
|
o !== null && (l.maxZoom = o);
|
|
1223
1268
|
}
|
|
1224
1269
|
return l;
|
|
1225
1270
|
}
|
|
1226
|
-
function
|
|
1271
|
+
function it(e) {
|
|
1227
1272
|
if (!e) return "fill";
|
|
1228
1273
|
switch (e.type) {
|
|
1229
1274
|
case "esriSFS":
|
|
@@ -1240,326 +1285,292 @@ function nt(e) {
|
|
|
1240
1285
|
return "fill";
|
|
1241
1286
|
}
|
|
1242
1287
|
}
|
|
1243
|
-
function
|
|
1288
|
+
function Te(e) {
|
|
1244
1289
|
return !(!e || e.style === "esriSLSNull" || e.color === null || e.width === 0 || e.color && e.color[3] === 0);
|
|
1245
1290
|
}
|
|
1246
|
-
function
|
|
1291
|
+
function pt(e) {
|
|
1247
1292
|
return String(e);
|
|
1248
1293
|
}
|
|
1249
|
-
function
|
|
1250
|
-
const o = e.symbol,
|
|
1251
|
-
let
|
|
1252
|
-
if (
|
|
1253
|
-
const
|
|
1254
|
-
if (
|
|
1255
|
-
"fill-color":
|
|
1256
|
-
"fill-opacity":
|
|
1257
|
-
},
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1260
|
-
"line-color":
|
|
1261
|
-
"line-width":
|
|
1294
|
+
function At(e, i, l) {
|
|
1295
|
+
const o = e.symbol, r = it(o);
|
|
1296
|
+
let n = {}, c = [], w = null;
|
|
1297
|
+
if (r === "fill" && o) {
|
|
1298
|
+
const p = o.color === null ? 0 : o.color?.[3] ?? 255, x = p === 0 ? "rgba(0, 0, 0, 0)" : O(o.color), h = p === 0 ? 0 : p < 255 ? 1 : ve(i);
|
|
1299
|
+
if (n = {
|
|
1300
|
+
"fill-color": x,
|
|
1301
|
+
"fill-opacity": h
|
|
1302
|
+
}, Te(o.outline)) {
|
|
1303
|
+
const g = ee(o.outline.width || 1);
|
|
1304
|
+
w = {
|
|
1305
|
+
"line-color": O(o.outline.color),
|
|
1306
|
+
"line-width": g
|
|
1262
1307
|
};
|
|
1263
1308
|
}
|
|
1264
|
-
|
|
1309
|
+
c = [
|
|
1265
1310
|
{
|
|
1266
1311
|
type: "fill",
|
|
1267
|
-
color:
|
|
1312
|
+
color: O(o.color),
|
|
1268
1313
|
label: e.label || "Feature"
|
|
1269
1314
|
}
|
|
1270
1315
|
];
|
|
1271
|
-
} else if (
|
|
1272
|
-
|
|
1273
|
-
"line-color":
|
|
1274
|
-
"line-width": o.width || 1,
|
|
1275
|
-
"line-opacity":
|
|
1316
|
+
} else if (r === "line" && o) {
|
|
1317
|
+
n = {
|
|
1318
|
+
"line-color": O(o.color),
|
|
1319
|
+
"line-width": ee(o.width || 1),
|
|
1320
|
+
"line-opacity": ve(i)
|
|
1276
1321
|
};
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1322
|
+
const p = at(o.style);
|
|
1323
|
+
p && (n["line-dasharray"] = p), c = [
|
|
1279
1324
|
{
|
|
1280
1325
|
type: "line",
|
|
1281
|
-
color:
|
|
1282
|
-
width: o.width || 1,
|
|
1326
|
+
color: O(o.color),
|
|
1327
|
+
width: ee(o.width || 1),
|
|
1283
1328
|
label: e.label || "Feature"
|
|
1284
1329
|
}
|
|
1285
1330
|
];
|
|
1286
|
-
} else if (
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
"circle-color":
|
|
1290
|
-
"circle-radius":
|
|
1291
|
-
"circle-opacity":
|
|
1292
|
-
},
|
|
1331
|
+
} else if (r === "circle" && o) {
|
|
1332
|
+
const p = Math.round((o.size || 6) * 0.71 * 100) / 100;
|
|
1333
|
+
n = {
|
|
1334
|
+
"circle-color": O(o.color),
|
|
1335
|
+
"circle-radius": p,
|
|
1336
|
+
"circle-opacity": ve(i)
|
|
1337
|
+
}, Te(o.outline) && (n["circle-stroke-color"] = O(o.outline.color), n["circle-stroke-width"] = ee(o.outline.width || 1)), c = [
|
|
1293
1338
|
{
|
|
1294
1339
|
type: "circle",
|
|
1295
|
-
color:
|
|
1340
|
+
color: O(o.color),
|
|
1296
1341
|
label: e.label || "Feature"
|
|
1297
1342
|
}
|
|
1298
1343
|
];
|
|
1299
1344
|
}
|
|
1300
|
-
return { paint:
|
|
1345
|
+
return { paint: n, legend: c, geomType: r, outlinePaint: w };
|
|
1301
1346
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const o = e.field1.toLowerCase(),
|
|
1304
|
-
if (
|
|
1305
|
-
return
|
|
1306
|
-
const
|
|
1307
|
-
let
|
|
1308
|
-
const
|
|
1309
|
-
let
|
|
1310
|
-
if (
|
|
1311
|
-
const
|
|
1312
|
-
for (const
|
|
1313
|
-
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1347
|
+
function Qo(e, i, l) {
|
|
1348
|
+
const o = e.field1.toLowerCase(), r = e.uniqueValueInfos || [], n = e.defaultSymbol;
|
|
1349
|
+
if (r.length === 0)
|
|
1350
|
+
return At({ ...e, symbol: n }, i);
|
|
1351
|
+
const c = r[0]?.symbol || n, w = it(c);
|
|
1352
|
+
let p = {};
|
|
1353
|
+
const x = [];
|
|
1354
|
+
let h = null;
|
|
1355
|
+
if (w === "fill") {
|
|
1356
|
+
const g = ["match", ["to-string", ["get", o]]];
|
|
1357
|
+
for (const a of r) {
|
|
1358
|
+
g.push(pt(a.value)), g.push(O(a.symbol?.color));
|
|
1359
|
+
const v = String(a.value), L = l?.get(v) || a.label || v;
|
|
1360
|
+
x.push({
|
|
1316
1361
|
type: "fill",
|
|
1317
|
-
color:
|
|
1362
|
+
color: O(a.symbol?.color),
|
|
1318
1363
|
label: L
|
|
1319
1364
|
});
|
|
1320
1365
|
}
|
|
1321
|
-
if (
|
|
1322
|
-
"fill-color":
|
|
1323
|
-
"fill-opacity":
|
|
1324
|
-
},
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1327
|
-
"line-color":
|
|
1328
|
-
"line-width":
|
|
1366
|
+
if (g.push(n ? O(n.color) : "rgba(0, 0, 0, 0)"), p = {
|
|
1367
|
+
"fill-color": g,
|
|
1368
|
+
"fill-opacity": ve(i)
|
|
1369
|
+
}, Te(c?.outline)) {
|
|
1370
|
+
const a = ee(Math.max(c.outline.width || 1, 1));
|
|
1371
|
+
h = {
|
|
1372
|
+
"line-color": O(c.outline.color),
|
|
1373
|
+
"line-width": a
|
|
1329
1374
|
};
|
|
1330
1375
|
}
|
|
1331
|
-
} else if (
|
|
1332
|
-
const
|
|
1333
|
-
for (const
|
|
1334
|
-
|
|
1335
|
-
const L = String(
|
|
1336
|
-
|
|
1376
|
+
} else if (w === "line") {
|
|
1377
|
+
const g = ["match", ["to-string", ["get", o]]];
|
|
1378
|
+
for (const f of r) {
|
|
1379
|
+
g.push(pt(f.value)), g.push(O(f.symbol?.color));
|
|
1380
|
+
const L = String(f.value), E = l?.get(L) || f.label || L;
|
|
1381
|
+
x.push({
|
|
1337
1382
|
type: "line",
|
|
1338
|
-
color:
|
|
1339
|
-
width:
|
|
1340
|
-
label:
|
|
1383
|
+
color: O(f.symbol?.color),
|
|
1384
|
+
width: ee(f.symbol?.width || 1),
|
|
1385
|
+
label: E
|
|
1341
1386
|
});
|
|
1342
1387
|
}
|
|
1343
|
-
|
|
1344
|
-
"line-color":
|
|
1345
|
-
"line-width":
|
|
1346
|
-
"line-opacity":
|
|
1388
|
+
g.push(n ? O(n.color) : "rgba(0, 0, 0, 0)"), p = {
|
|
1389
|
+
"line-color": g,
|
|
1390
|
+
"line-width": ee(c?.width || 2),
|
|
1391
|
+
"line-opacity": ve(i)
|
|
1347
1392
|
};
|
|
1348
|
-
const
|
|
1349
|
-
if (
|
|
1350
|
-
const
|
|
1351
|
-
|
|
1352
|
-
}
|
|
1353
|
-
} else if (
|
|
1354
|
-
const
|
|
1355
|
-
for (const
|
|
1356
|
-
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1393
|
+
const a = r.map((f) => f.symbol?.style).filter(Boolean), v = [...new Set(a)];
|
|
1394
|
+
if (v.length === 1) {
|
|
1395
|
+
const f = at(v[0]);
|
|
1396
|
+
f && (p["line-dasharray"] = f);
|
|
1397
|
+
}
|
|
1398
|
+
} else if (w === "circle") {
|
|
1399
|
+
const g = ["match", ["to-string", ["get", o]]];
|
|
1400
|
+
for (const v of r) {
|
|
1401
|
+
g.push(pt(v.value)), g.push(O(v.symbol?.color));
|
|
1402
|
+
const f = String(v.value), S = l?.get(f) || v.label || f;
|
|
1403
|
+
x.push({
|
|
1359
1404
|
type: "circle",
|
|
1360
|
-
color:
|
|
1361
|
-
label:
|
|
1405
|
+
color: O(v.symbol?.color),
|
|
1406
|
+
label: S
|
|
1362
1407
|
});
|
|
1363
1408
|
}
|
|
1364
|
-
|
|
1365
|
-
const
|
|
1366
|
-
|
|
1367
|
-
"circle-color":
|
|
1368
|
-
"circle-radius":
|
|
1369
|
-
"circle-opacity":
|
|
1370
|
-
},
|
|
1409
|
+
g.push(n ? O(n.color) : "rgba(0, 0, 0, 0)");
|
|
1410
|
+
const a = Math.round((c?.size || 6) * 0.71 * 100) / 100;
|
|
1411
|
+
p = {
|
|
1412
|
+
"circle-color": g,
|
|
1413
|
+
"circle-radius": a,
|
|
1414
|
+
"circle-opacity": ve(i)
|
|
1415
|
+
}, Te(c?.outline) && (p["circle-stroke-color"] = O(c.outline.color), p["circle-stroke-width"] = ee(c.outline.width || 1));
|
|
1371
1416
|
}
|
|
1372
|
-
return { paint:
|
|
1417
|
+
return { paint: p, legend: x, geomType: w, outlinePaint: h };
|
|
1373
1418
|
}
|
|
1374
|
-
function
|
|
1375
|
-
const l = e.field.toLowerCase(), o = e.classBreakInfos || [],
|
|
1376
|
-
if (
|
|
1377
|
-
return
|
|
1419
|
+
function Xo(e, i) {
|
|
1420
|
+
const l = e.field.toLowerCase(), o = e.classBreakInfos || [], r = e.visualVariables?.find((h) => h.type === "colorInfo");
|
|
1421
|
+
if (r?.stops && r.stops.length > 0)
|
|
1422
|
+
return Yo(r, l, e, i);
|
|
1378
1423
|
if (o.length === 0)
|
|
1379
1424
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1380
|
-
const
|
|
1381
|
-
let
|
|
1382
|
-
const
|
|
1383
|
-
let
|
|
1384
|
-
if (
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1387
|
-
for (let
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1425
|
+
const n = o[0]?.symbol, c = it(n);
|
|
1426
|
+
let w = {};
|
|
1427
|
+
const p = [];
|
|
1428
|
+
let x = null;
|
|
1429
|
+
if (c === "fill") {
|
|
1430
|
+
const h = ["step", ["get", l]];
|
|
1431
|
+
h.push(O(o[0]?.symbol?.color));
|
|
1432
|
+
for (let g = 0; g < o.length; g++) {
|
|
1433
|
+
const a = o[g];
|
|
1434
|
+
g > 0 && (h.push(o[g - 1].classMaxValue), h.push(O(a.symbol?.color))), p.push({
|
|
1390
1435
|
type: "fill",
|
|
1391
|
-
color:
|
|
1392
|
-
label:
|
|
1436
|
+
color: O(a.symbol?.color),
|
|
1437
|
+
label: a.label || `${a.classMaxValue}`
|
|
1393
1438
|
});
|
|
1394
1439
|
}
|
|
1395
|
-
if (
|
|
1396
|
-
"fill-color":
|
|
1397
|
-
"fill-opacity":
|
|
1398
|
-
},
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
"line-color":
|
|
1402
|
-
"line-width":
|
|
1440
|
+
if (w = {
|
|
1441
|
+
"fill-color": h,
|
|
1442
|
+
"fill-opacity": ve(i)
|
|
1443
|
+
}, Te(n?.outline)) {
|
|
1444
|
+
const g = ee(n.outline.width || 1);
|
|
1445
|
+
x = {
|
|
1446
|
+
"line-color": O(n.outline.color),
|
|
1447
|
+
"line-width": g
|
|
1403
1448
|
};
|
|
1404
1449
|
}
|
|
1405
|
-
} else if (
|
|
1406
|
-
const
|
|
1407
|
-
if (
|
|
1408
|
-
const
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
let Fe;
|
|
1418
|
-
const Se = !!e.defaultSymbol;
|
|
1419
|
-
Le === null ? Fe = `${!Se && e.minValue != null ? `${l} >= ${e.minValue} AND ` : ""}${l} <= ${ze}` : R === T.length - 1 && Se ? Fe = `${l} > ${Le}` : Fe = `${l} > ${Le} AND ${l} <= ${ze}`;
|
|
1420
|
-
const ge = {
|
|
1421
|
-
"line-opacity": we(a)
|
|
1422
|
-
};
|
|
1423
|
-
if (Ve && (ge["line-dasharray"] = Ve), K.length === 1)
|
|
1424
|
-
ge["line-color"] = z(K[0].symbol?.color), ge["line-width"] = K[0].symbol?.width || 2;
|
|
1425
|
-
else {
|
|
1426
|
-
const W = ["step", ["get", l]], de = ["step", ["get", l]];
|
|
1427
|
-
W.push(z(K[0].symbol?.color)), de.push(K[0].symbol?.width || 2);
|
|
1428
|
-
for (let te = 1; te < K.length; te++)
|
|
1429
|
-
W.push(K[te - 1].classMaxValue), W.push(z(K[te].symbol?.color)), de.push(K[te - 1].classMaxValue), de.push(K[te].symbol?.width || 2);
|
|
1430
|
-
ge["line-color"] = W, ge["line-width"] = de;
|
|
1431
|
-
}
|
|
1432
|
-
const Ze = [];
|
|
1433
|
-
for (const W of K)
|
|
1434
|
-
Ze.push({
|
|
1435
|
-
type: "line",
|
|
1436
|
-
color: z(W.symbol?.color),
|
|
1437
|
-
width: W.symbol?.width || 2,
|
|
1438
|
-
label: W.label || `${O} - ${W.classMaxValue}`
|
|
1439
|
-
}), O = W.classMaxValue + 1;
|
|
1440
|
-
const Ee = R === 0 ? "" : `-${ne.style.replace("esriSLS", "").toLowerCase()}`;
|
|
1441
|
-
F.push({ suffix: Ee, where: Fe, paint: ge, legend: Ze });
|
|
1442
|
-
}
|
|
1443
|
-
return { paint: {}, legend: [], geomType: u, outlinePaint: $, splitLayers: F };
|
|
1444
|
-
}
|
|
1445
|
-
const b = ["step", ["get", l]];
|
|
1446
|
-
b.push(z(o[0]?.symbol?.color));
|
|
1447
|
-
let p = e.minValue ?? 0;
|
|
1448
|
-
for (let T = 0; T < o.length; T++) {
|
|
1449
|
-
const _ = o[T];
|
|
1450
|
-
T > 0 && (b.push(o[T - 1].classMaxValue), b.push(z(_.symbol?.color))), f.push({
|
|
1450
|
+
} else if (c === "line") {
|
|
1451
|
+
const h = o.map((E) => E.symbol?.style || "esriSLSSolid"), g = [...new Set(h)];
|
|
1452
|
+
if (g.length > 1) {
|
|
1453
|
+
const E = Ho(o, h, l, e, i);
|
|
1454
|
+
return { paint: {}, legend: [], geomType: c, outlinePaint: x, splitLayers: E };
|
|
1455
|
+
}
|
|
1456
|
+
const v = ["step", ["get", l]];
|
|
1457
|
+
v.push(O(o[0]?.symbol?.color));
|
|
1458
|
+
let f = e.minValue ?? 0;
|
|
1459
|
+
for (let E = 0; E < o.length; E++) {
|
|
1460
|
+
const D = o[E];
|
|
1461
|
+
E > 0 && (v.push(o[E - 1].classMaxValue), v.push(O(D.symbol?.color))), p.push({
|
|
1451
1462
|
type: "line",
|
|
1452
|
-
color:
|
|
1453
|
-
width:
|
|
1454
|
-
label:
|
|
1455
|
-
}),
|
|
1456
|
-
}
|
|
1457
|
-
const L =
|
|
1458
|
-
|
|
1459
|
-
"line-color":
|
|
1463
|
+
color: O(D.symbol?.color),
|
|
1464
|
+
width: ee(D.symbol?.width || n?.width || 2),
|
|
1465
|
+
label: D.label || `${f} - ${D.classMaxValue}`
|
|
1466
|
+
}), f = D.classMaxValue + 1;
|
|
1467
|
+
}
|
|
1468
|
+
const L = ee(n?.width || 2);
|
|
1469
|
+
w = {
|
|
1470
|
+
"line-color": v,
|
|
1460
1471
|
"line-width": L,
|
|
1461
|
-
"line-opacity":
|
|
1472
|
+
"line-opacity": ve(i)
|
|
1462
1473
|
};
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1474
|
+
const S = at(g[0]);
|
|
1475
|
+
S && (w["line-dasharray"] = S);
|
|
1465
1476
|
}
|
|
1466
|
-
return { paint:
|
|
1477
|
+
return { paint: w, legend: p, geomType: c, outlinePaint: x };
|
|
1467
1478
|
}
|
|
1468
|
-
function
|
|
1469
|
-
const
|
|
1470
|
-
if (
|
|
1479
|
+
function Yo(e, i, l, o) {
|
|
1480
|
+
const r = e.stops || [];
|
|
1481
|
+
if (r.length === 0)
|
|
1471
1482
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1472
|
-
const
|
|
1473
|
-
let
|
|
1474
|
-
const
|
|
1475
|
-
let
|
|
1476
|
-
if (
|
|
1477
|
-
const
|
|
1478
|
-
for (const
|
|
1479
|
-
|
|
1483
|
+
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol, c = it(n);
|
|
1484
|
+
let w = {};
|
|
1485
|
+
const p = [];
|
|
1486
|
+
let x = null;
|
|
1487
|
+
if (c === "fill") {
|
|
1488
|
+
const h = ["interpolate", ["linear"], ["get", i]];
|
|
1489
|
+
for (const a of r)
|
|
1490
|
+
h.push(a.value), h.push(O(a.color)), p.push({
|
|
1480
1491
|
type: "fill",
|
|
1481
|
-
color:
|
|
1482
|
-
label:
|
|
1492
|
+
color: O(a.color),
|
|
1493
|
+
label: a.label || `${a.value}`
|
|
1483
1494
|
});
|
|
1484
|
-
if (
|
|
1495
|
+
if (w = {
|
|
1485
1496
|
"fill-color": [
|
|
1486
1497
|
"case",
|
|
1487
|
-
["==", ["get",
|
|
1498
|
+
["==", ["get", i], null],
|
|
1488
1499
|
"rgba(0, 0, 0, 0)",
|
|
1489
1500
|
// Transparent for null/no-data values
|
|
1490
|
-
|
|
1501
|
+
h
|
|
1491
1502
|
// Otherwise use the interpolated color
|
|
1492
1503
|
],
|
|
1493
|
-
"fill-opacity":
|
|
1494
|
-
},
|
|
1495
|
-
const
|
|
1496
|
-
|
|
1497
|
-
"line-color":
|
|
1498
|
-
"line-width":
|
|
1504
|
+
"fill-opacity": ve(o)
|
|
1505
|
+
}, Te(n?.outline)) {
|
|
1506
|
+
const a = ee(n.outline.width || 1);
|
|
1507
|
+
x = {
|
|
1508
|
+
"line-color": O(n.outline.color),
|
|
1509
|
+
"line-width": a
|
|
1499
1510
|
};
|
|
1500
1511
|
}
|
|
1501
1512
|
}
|
|
1502
|
-
return { paint:
|
|
1513
|
+
return { paint: w, legend: p, geomType: c, outlinePaint: x };
|
|
1503
1514
|
}
|
|
1504
|
-
function
|
|
1515
|
+
function ea(e, i, l, o) {
|
|
1505
1516
|
if (!e?.renderer)
|
|
1506
1517
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1507
|
-
const
|
|
1508
|
-
switch (
|
|
1518
|
+
const r = e.renderer;
|
|
1519
|
+
switch (r.type) {
|
|
1509
1520
|
case "simple":
|
|
1510
|
-
return
|
|
1521
|
+
return At(r, i);
|
|
1511
1522
|
case "uniqueValue":
|
|
1512
|
-
return
|
|
1523
|
+
return Qo(r, i, l);
|
|
1513
1524
|
case "classBreaks":
|
|
1514
|
-
return
|
|
1525
|
+
return Xo(r, i);
|
|
1515
1526
|
default:
|
|
1516
1527
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1517
1528
|
}
|
|
1518
1529
|
}
|
|
1519
|
-
function
|
|
1530
|
+
function ta(e) {
|
|
1520
1531
|
if (!e) return null;
|
|
1521
|
-
const
|
|
1522
|
-
const
|
|
1523
|
-
field:
|
|
1524
|
-
label:
|
|
1532
|
+
const i = (e.title || "").replace(/\{([^}]+)\}/g, (n, c) => `{${c.toLowerCase()}}`), o = (e.fieldInfos || []).filter((n) => n.visible === !0).map((n) => {
|
|
1533
|
+
const c = {
|
|
1534
|
+
field: n.fieldName.toLowerCase(),
|
|
1535
|
+
label: n.label || n.fieldName
|
|
1525
1536
|
};
|
|
1526
|
-
return
|
|
1527
|
-
}),
|
|
1528
|
-
title:
|
|
1537
|
+
return n.format && (c.format = {}, n.format.dateFormat && (c.format.dateFormat = n.format.dateFormat), n.format.digitSeparator !== void 0 && (c.format.digitSeparator = n.format.digitSeparator), n.format.places !== void 0 && (c.format.places = n.format.places), Object.keys(c.format).length === 0 && delete c.format), c;
|
|
1538
|
+
}), r = {
|
|
1539
|
+
title: i,
|
|
1529
1540
|
fields: o
|
|
1530
1541
|
};
|
|
1531
|
-
return e.showTime && (
|
|
1542
|
+
return e.showTime && (r.showTime = !0), r;
|
|
1532
1543
|
}
|
|
1533
|
-
function
|
|
1544
|
+
function oa(e) {
|
|
1534
1545
|
return e?.definitionExpression;
|
|
1535
1546
|
}
|
|
1536
|
-
function
|
|
1547
|
+
function aa(e) {
|
|
1537
1548
|
return (e.includes("_") ? e.split("_").slice(1).join(" ") : e).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
1538
1549
|
}
|
|
1539
|
-
function
|
|
1550
|
+
function ia(e) {
|
|
1540
1551
|
return e.includes("_") ? e.split("_").slice(1).join(" ") : e;
|
|
1541
1552
|
}
|
|
1542
|
-
function
|
|
1543
|
-
const
|
|
1553
|
+
function la(e) {
|
|
1554
|
+
const i = /* @__PURE__ */ new Map();
|
|
1544
1555
|
if (!e)
|
|
1545
|
-
return
|
|
1556
|
+
return i;
|
|
1546
1557
|
const l = e.split(`
|
|
1547
1558
|
`), o = /^(\d{1,3})\s+(.+)$/;
|
|
1548
|
-
for (const
|
|
1549
|
-
const
|
|
1550
|
-
if (
|
|
1551
|
-
const [,
|
|
1552
|
-
|
|
1559
|
+
for (const r of l) {
|
|
1560
|
+
const n = r.trim().match(o);
|
|
1561
|
+
if (n) {
|
|
1562
|
+
const [, c, w] = n;
|
|
1563
|
+
c && w && i.set(c, w.trim());
|
|
1553
1564
|
}
|
|
1554
1565
|
}
|
|
1555
|
-
return
|
|
1566
|
+
return i;
|
|
1556
1567
|
}
|
|
1557
|
-
async function
|
|
1568
|
+
async function na(e) {
|
|
1558
1569
|
try {
|
|
1559
|
-
const
|
|
1560
|
-
if (!
|
|
1570
|
+
const i = await fetch(`${e}?f=json`);
|
|
1571
|
+
if (!i.ok)
|
|
1561
1572
|
return null;
|
|
1562
|
-
const l = await
|
|
1573
|
+
const l = await i.json();
|
|
1563
1574
|
return l.drawingInfo ? {
|
|
1564
1575
|
drawingInfo: l.drawingInfo,
|
|
1565
1576
|
description: l.description
|
|
@@ -1568,82 +1579,98 @@ async function aa(e) {
|
|
|
1568
1579
|
return null;
|
|
1569
1580
|
}
|
|
1570
1581
|
}
|
|
1571
|
-
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1574
|
-
|
|
1582
|
+
function It(e) {
|
|
1583
|
+
const i = {
|
|
1584
|
+
id: e.id,
|
|
1585
|
+
title: e.title,
|
|
1586
|
+
type: e.type,
|
|
1587
|
+
url: e.url,
|
|
1588
|
+
opacity: e.opacity,
|
|
1589
|
+
paint: e.paint,
|
|
1590
|
+
legend: e.legend,
|
|
1591
|
+
popup: e.popup
|
|
1592
|
+
};
|
|
1593
|
+
return e.where && (i.where = e.where), e.minZoom !== void 0 && (i.minZoom = e.minZoom), e.maxZoom !== void 0 && (i.maxZoom = e.maxZoom), e.outlinePaint && (i.outlinePaint = e.outlinePaint), i;
|
|
1594
|
+
}
|
|
1595
|
+
async function Zt(e) {
|
|
1596
|
+
const i = e.operationalLayers || [], l = [], o = ["Zoning and Planning_Land Use"];
|
|
1597
|
+
for (const r of i)
|
|
1598
|
+
if (r.url && !r.title?.toLowerCase().includes("(under construction)") && !(r.url && /\/MapServer(\/\d+)?$/i.test(r.url)))
|
|
1575
1599
|
try {
|
|
1576
|
-
let
|
|
1577
|
-
const
|
|
1578
|
-
if ((
|
|
1579
|
-
const
|
|
1580
|
-
if (
|
|
1581
|
-
if (
|
|
1582
|
-
const
|
|
1583
|
-
if (!
|
|
1584
|
-
for (const
|
|
1585
|
-
|
|
1586
|
-
|
|
1600
|
+
let n = r.layerDefinition?.drawingInfo, c;
|
|
1601
|
+
const w = !n || !n.renderer, p = o.includes(r.title), x = n?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || n?.renderer?.defaultSymbol?.outline;
|
|
1602
|
+
if ((w || p) && r.url) {
|
|
1603
|
+
const I = await na(r.url);
|
|
1604
|
+
if (I) {
|
|
1605
|
+
if (n = I.drawingInfo, x && Te(x) && n?.renderer) {
|
|
1606
|
+
const _ = n.renderer, te = _.uniqueValueInfos?.[0]?.symbol?.outline || _.defaultSymbol?.outline;
|
|
1607
|
+
if (!Te(te)) {
|
|
1608
|
+
for (const V of _.uniqueValueInfos || [])
|
|
1609
|
+
V.symbol && (V.symbol.outline = x);
|
|
1610
|
+
_.defaultSymbol && (_.defaultSymbol.outline = x);
|
|
1587
1611
|
}
|
|
1588
1612
|
}
|
|
1589
|
-
|
|
1613
|
+
I.description && (c = la(I.description), c.size > 0);
|
|
1590
1614
|
}
|
|
1591
1615
|
}
|
|
1592
|
-
const { paint:
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
), L =
|
|
1598
|
-
if (
|
|
1599
|
-
for (const
|
|
1600
|
-
|
|
1601
|
-
id: `${
|
|
1602
|
-
title:
|
|
1603
|
-
type:
|
|
1604
|
-
url:
|
|
1605
|
-
opacity:
|
|
1606
|
-
paint:
|
|
1607
|
-
legend:
|
|
1608
|
-
popup: L
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1616
|
+
const { paint: h, legend: g, geomType: a, outlinePaint: v, splitLayers: f } = ea(
|
|
1617
|
+
n,
|
|
1618
|
+
r.opacity,
|
|
1619
|
+
c,
|
|
1620
|
+
r.title
|
|
1621
|
+
), L = ta(r.popupInfo), S = oa(r.layerDefinition), E = Ko(r.layerDefinition?.minScale, r.layerDefinition?.maxScale), D = aa(r.title), K = ia(r.title), T = r.opacity ?? 1;
|
|
1622
|
+
if (f && f.length > 0)
|
|
1623
|
+
for (const I of f)
|
|
1624
|
+
l.push(It({
|
|
1625
|
+
id: `${D}${I.suffix}`,
|
|
1626
|
+
title: K,
|
|
1627
|
+
type: a,
|
|
1628
|
+
url: r.url,
|
|
1629
|
+
opacity: T,
|
|
1630
|
+
paint: I.paint,
|
|
1631
|
+
legend: I.legend,
|
|
1632
|
+
popup: L,
|
|
1633
|
+
where: S ? `(${S}) AND (${I.where})` : I.where,
|
|
1634
|
+
minZoom: E.minZoom,
|
|
1635
|
+
maxZoom: E.maxZoom
|
|
1636
|
+
}));
|
|
1637
|
+
else
|
|
1638
|
+
l.push(It({
|
|
1639
|
+
id: D,
|
|
1640
|
+
title: K,
|
|
1641
|
+
type: a,
|
|
1642
|
+
url: r.url,
|
|
1643
|
+
opacity: T,
|
|
1644
|
+
paint: h,
|
|
1645
|
+
legend: g,
|
|
1646
|
+
popup: L,
|
|
1647
|
+
where: S,
|
|
1648
|
+
minZoom: E.minZoom,
|
|
1649
|
+
maxZoom: E.maxZoom,
|
|
1650
|
+
outlinePaint: v
|
|
1651
|
+
}));
|
|
1625
1652
|
} catch {
|
|
1626
1653
|
}
|
|
1627
|
-
return l.sort((
|
|
1654
|
+
return l.sort((r, n) => r.title.localeCompare(n.title)), l;
|
|
1628
1655
|
}
|
|
1629
|
-
const
|
|
1630
|
-
function
|
|
1656
|
+
const Ot = {}, wt = "376af635c84643cd816a8c5d017a53aa", Wa = wt;
|
|
1657
|
+
function Lt(e, i) {
|
|
1631
1658
|
let l = `https://www.arcgis.com/sharing/rest/content/items/${e}/data?f=json`;
|
|
1632
|
-
return
|
|
1659
|
+
return i && (l += `&token=${i}`), l;
|
|
1633
1660
|
}
|
|
1634
|
-
function
|
|
1635
|
-
return wt
|
|
1661
|
+
function ja() {
|
|
1662
|
+
return Lt(wt);
|
|
1636
1663
|
}
|
|
1637
|
-
const
|
|
1638
|
-
function
|
|
1639
|
-
e ? (
|
|
1664
|
+
const ot = /* @__PURE__ */ new Map(), He = /* @__PURE__ */ new Map();
|
|
1665
|
+
function ra(e) {
|
|
1666
|
+
e ? (ot.delete(e), He.delete(e)) : (ot.clear(), He.clear());
|
|
1640
1667
|
}
|
|
1641
|
-
let
|
|
1642
|
-
async function
|
|
1643
|
-
const e = typeof import.meta < "u" &&
|
|
1644
|
-
if (!(!e || !
|
|
1645
|
-
if (
|
|
1646
|
-
return
|
|
1668
|
+
let Ye, zt = 0;
|
|
1669
|
+
async function sa() {
|
|
1670
|
+
const e = typeof import.meta < "u" && Ot?.VITE_AGO_USERNAME, i = typeof import.meta < "u" && Ot?.VITE_AGO_PASSWORD;
|
|
1671
|
+
if (!(!e || !i)) {
|
|
1672
|
+
if (Ye && Date.now() < zt - 3e5)
|
|
1673
|
+
return Ye;
|
|
1647
1674
|
try {
|
|
1648
1675
|
const o = await (await fetch("https://www.arcgis.com/sharing/rest/generateToken", {
|
|
1649
1676
|
method: "POST",
|
|
@@ -1653,191 +1680,191 @@ async function la() {
|
|
|
1653
1680
|
body: new URLSearchParams({
|
|
1654
1681
|
f: "json",
|
|
1655
1682
|
username: e,
|
|
1656
|
-
password:
|
|
1683
|
+
password: i,
|
|
1657
1684
|
referer: window.location.origin || "https://localhost",
|
|
1658
1685
|
expiration: "120"
|
|
1659
1686
|
// 2 hours
|
|
1660
1687
|
})
|
|
1661
1688
|
})).json();
|
|
1662
|
-
return o.error ? void 0 : (
|
|
1689
|
+
return o.error ? void 0 : (Ye = o.token, zt = o.expires, Ye);
|
|
1663
1690
|
} catch {
|
|
1664
1691
|
return;
|
|
1665
1692
|
}
|
|
1666
1693
|
}
|
|
1667
1694
|
}
|
|
1668
|
-
async function
|
|
1669
|
-
const l =
|
|
1695
|
+
async function ca(e, i) {
|
|
1696
|
+
const l = Lt(e, i), o = await fetch(l, { cache: "no-store" });
|
|
1670
1697
|
if (!o.ok)
|
|
1671
1698
|
throw new Error(`Failed to fetch WebMap: ${o.status} ${o.statusText}`);
|
|
1672
|
-
const
|
|
1673
|
-
if (
|
|
1674
|
-
throw new Error(`ArcGIS error: ${
|
|
1675
|
-
return
|
|
1699
|
+
const r = await o.json();
|
|
1700
|
+
if (r.error)
|
|
1701
|
+
throw new Error(`ArcGIS error: ${r.error.message || r.error.code || "Unknown error"}`);
|
|
1702
|
+
return r;
|
|
1676
1703
|
}
|
|
1677
|
-
async function
|
|
1704
|
+
async function ua(e) {
|
|
1678
1705
|
try {
|
|
1679
|
-
const
|
|
1680
|
-
return await
|
|
1681
|
-
} catch (
|
|
1706
|
+
const i = await sa(), l = await ca(e, i);
|
|
1707
|
+
return await Zt(l);
|
|
1708
|
+
} catch (i) {
|
|
1682
1709
|
throw new Error(
|
|
1683
|
-
`Failed to load dynamic layer configs: ${
|
|
1710
|
+
`Failed to load dynamic layer configs: ${i instanceof Error ? i.message : "Unknown error"}`
|
|
1684
1711
|
);
|
|
1685
1712
|
}
|
|
1686
1713
|
}
|
|
1687
|
-
async function
|
|
1688
|
-
const
|
|
1689
|
-
if (
|
|
1690
|
-
return
|
|
1691
|
-
const l =
|
|
1714
|
+
async function ht(e = wt) {
|
|
1715
|
+
const i = ot.get(e);
|
|
1716
|
+
if (i)
|
|
1717
|
+
return i;
|
|
1718
|
+
const l = He.get(e);
|
|
1692
1719
|
if (l)
|
|
1693
1720
|
return l;
|
|
1694
1721
|
const o = (async () => {
|
|
1695
1722
|
try {
|
|
1696
|
-
const
|
|
1697
|
-
return
|
|
1723
|
+
const r = await ua(e);
|
|
1724
|
+
return ot.set(e, r), r;
|
|
1698
1725
|
} finally {
|
|
1699
|
-
|
|
1726
|
+
He.delete(e);
|
|
1700
1727
|
}
|
|
1701
1728
|
})();
|
|
1702
|
-
return
|
|
1729
|
+
return He.set(e, o), o;
|
|
1703
1730
|
}
|
|
1704
|
-
function
|
|
1705
|
-
const
|
|
1706
|
-
for (const
|
|
1707
|
-
|
|
1731
|
+
function da(e) {
|
|
1732
|
+
const i = k({}), l = /* @__PURE__ */ new Map();
|
|
1733
|
+
for (const a of e)
|
|
1734
|
+
i.value[a.id] = {
|
|
1708
1735
|
data: null,
|
|
1709
1736
|
loading: !1,
|
|
1710
1737
|
error: null,
|
|
1711
1738
|
lastFetched: null
|
|
1712
1739
|
};
|
|
1713
|
-
async function o(
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1716
|
-
...
|
|
1717
|
-
[
|
|
1718
|
-
data:
|
|
1719
|
-
lastFetched:
|
|
1740
|
+
async function o(a) {
|
|
1741
|
+
const v = a.id;
|
|
1742
|
+
i.value = {
|
|
1743
|
+
...i.value,
|
|
1744
|
+
[v]: {
|
|
1745
|
+
data: i.value[v]?.data ?? null,
|
|
1746
|
+
lastFetched: i.value[v]?.lastFetched ?? null,
|
|
1720
1747
|
loading: !0,
|
|
1721
1748
|
error: null
|
|
1722
1749
|
}
|
|
1723
1750
|
};
|
|
1724
1751
|
try {
|
|
1725
|
-
let
|
|
1726
|
-
if (
|
|
1727
|
-
const L = await fetch(
|
|
1752
|
+
let f;
|
|
1753
|
+
if (a.type === "http-get") {
|
|
1754
|
+
const L = await fetch(a.url, {
|
|
1728
1755
|
method: "GET",
|
|
1729
|
-
...
|
|
1756
|
+
...a.options
|
|
1730
1757
|
});
|
|
1731
1758
|
if (!L.ok)
|
|
1732
1759
|
throw new Error(`HTTP ${L.status}: ${L.statusText}`);
|
|
1733
|
-
|
|
1734
|
-
} else if (
|
|
1735
|
-
const L = await fetch(
|
|
1760
|
+
f = await L.json();
|
|
1761
|
+
} else if (a.type === "http-post") {
|
|
1762
|
+
const L = await fetch(a.url, {
|
|
1736
1763
|
method: "POST",
|
|
1737
|
-
...
|
|
1764
|
+
...a.options
|
|
1738
1765
|
});
|
|
1739
1766
|
if (!L.ok)
|
|
1740
1767
|
throw new Error(`HTTP ${L.status}: ${L.statusText}`);
|
|
1741
|
-
|
|
1742
|
-
} else if (
|
|
1743
|
-
const
|
|
1744
|
-
if (!
|
|
1745
|
-
throw new Error(`HTTP ${
|
|
1746
|
-
|
|
1768
|
+
f = await L.json();
|
|
1769
|
+
} else if (a.type === "esri") {
|
|
1770
|
+
const S = `${a.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, E = await fetch(S, a.options);
|
|
1771
|
+
if (!E.ok)
|
|
1772
|
+
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
1773
|
+
f = (await E.json()).features?.map((K) => K.attributes) || [];
|
|
1747
1774
|
} else
|
|
1748
|
-
throw new Error(`Unknown data source type: ${
|
|
1749
|
-
|
|
1750
|
-
...
|
|
1751
|
-
[
|
|
1752
|
-
data:
|
|
1775
|
+
throw new Error(`Unknown data source type: ${a.type}`);
|
|
1776
|
+
a.transform && (f = a.transform(f)), i.value = {
|
|
1777
|
+
...i.value,
|
|
1778
|
+
[v]: {
|
|
1779
|
+
data: f,
|
|
1753
1780
|
loading: !1,
|
|
1754
1781
|
error: null,
|
|
1755
1782
|
lastFetched: Date.now()
|
|
1756
1783
|
}
|
|
1757
1784
|
};
|
|
1758
|
-
} catch (
|
|
1759
|
-
const L =
|
|
1760
|
-
|
|
1761
|
-
...
|
|
1762
|
-
[
|
|
1763
|
-
data:
|
|
1764
|
-
lastFetched:
|
|
1785
|
+
} catch (f) {
|
|
1786
|
+
const L = f instanceof Error ? f.message : "Unknown error";
|
|
1787
|
+
i.value = {
|
|
1788
|
+
...i.value,
|
|
1789
|
+
[v]: {
|
|
1790
|
+
data: i.value[v]?.data ?? null,
|
|
1791
|
+
lastFetched: i.value[v]?.lastFetched ?? null,
|
|
1765
1792
|
loading: !1,
|
|
1766
1793
|
error: L
|
|
1767
1794
|
}
|
|
1768
1795
|
};
|
|
1769
1796
|
}
|
|
1770
1797
|
}
|
|
1771
|
-
async function
|
|
1772
|
-
await Promise.all(e.map((
|
|
1798
|
+
async function r() {
|
|
1799
|
+
await Promise.all(e.map((a) => o(a)));
|
|
1773
1800
|
}
|
|
1774
|
-
async function
|
|
1775
|
-
const
|
|
1776
|
-
|
|
1801
|
+
async function n(a) {
|
|
1802
|
+
const v = e.find((f) => f.id === a);
|
|
1803
|
+
v && await o(v);
|
|
1777
1804
|
}
|
|
1778
|
-
function
|
|
1779
|
-
return
|
|
1805
|
+
function c(a) {
|
|
1806
|
+
return i.value[a]?.data ?? null;
|
|
1780
1807
|
}
|
|
1781
|
-
const
|
|
1782
|
-
function
|
|
1783
|
-
return
|
|
1808
|
+
const w = z(() => Object.values(i.value).some((a) => a.loading));
|
|
1809
|
+
function p(a) {
|
|
1810
|
+
return i.value[a]?.loading ?? !1;
|
|
1784
1811
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return
|
|
1812
|
+
function x(a) {
|
|
1813
|
+
return i.value[a]?.error ?? null;
|
|
1787
1814
|
}
|
|
1788
|
-
function
|
|
1789
|
-
for (const
|
|
1790
|
-
if (
|
|
1791
|
-
const
|
|
1792
|
-
o(
|
|
1793
|
-
},
|
|
1794
|
-
l.set(
|
|
1815
|
+
function h() {
|
|
1816
|
+
for (const a of e)
|
|
1817
|
+
if (a.pollInterval && a.pollInterval > 0) {
|
|
1818
|
+
const v = window.setInterval(() => {
|
|
1819
|
+
o(a);
|
|
1820
|
+
}, a.pollInterval);
|
|
1821
|
+
l.set(a.id, v);
|
|
1795
1822
|
}
|
|
1796
1823
|
}
|
|
1797
|
-
function
|
|
1798
|
-
for (const [,
|
|
1799
|
-
window.clearInterval(
|
|
1824
|
+
function g() {
|
|
1825
|
+
for (const [, a] of l)
|
|
1826
|
+
window.clearInterval(a);
|
|
1800
1827
|
l.clear();
|
|
1801
1828
|
}
|
|
1802
|
-
return
|
|
1803
|
-
|
|
1804
|
-
}),
|
|
1805
|
-
|
|
1829
|
+
return et(() => {
|
|
1830
|
+
r(), h();
|
|
1831
|
+
}), Dt(() => {
|
|
1832
|
+
g();
|
|
1806
1833
|
}), {
|
|
1807
1834
|
/** Reactive state for all data sources */
|
|
1808
|
-
state:
|
|
1835
|
+
state: W(i),
|
|
1809
1836
|
/** Whether any data source is currently loading */
|
|
1810
|
-
isLoading:
|
|
1837
|
+
isLoading: w,
|
|
1811
1838
|
/** Fetch all data sources */
|
|
1812
|
-
fetchAll:
|
|
1839
|
+
fetchAll: r,
|
|
1813
1840
|
/** Refetch a specific data source by id */
|
|
1814
|
-
refetch:
|
|
1841
|
+
refetch: n,
|
|
1815
1842
|
/** Get data for a specific source */
|
|
1816
|
-
getData:
|
|
1843
|
+
getData: c,
|
|
1817
1844
|
/** Check if a specific source is loading */
|
|
1818
|
-
isSourceLoading:
|
|
1845
|
+
isSourceLoading: p,
|
|
1819
1846
|
/** Get error for a specific source */
|
|
1820
|
-
getError:
|
|
1847
|
+
getError: x,
|
|
1821
1848
|
/** Stop all polling (useful for cleanup) */
|
|
1822
|
-
stopPolling:
|
|
1849
|
+
stopPolling: g
|
|
1823
1850
|
};
|
|
1824
1851
|
}
|
|
1825
|
-
const
|
|
1852
|
+
const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
1826
1853
|
key: 0,
|
|
1827
1854
|
class: "layerboard-subtitle"
|
|
1828
|
-
},
|
|
1855
|
+
}, ma = { class: "layerboard-mobile-menu-content" }, ha = { class: "layerboard-main" }, ga = {
|
|
1829
1856
|
key: 0,
|
|
1830
1857
|
class: "layerboard-loading",
|
|
1831
1858
|
role: "status",
|
|
1832
1859
|
"aria-live": "polite"
|
|
1833
|
-
},
|
|
1860
|
+
}, va = {
|
|
1834
1861
|
key: 1,
|
|
1835
1862
|
class: "layerboard-error",
|
|
1836
1863
|
role: "alert"
|
|
1837
|
-
},
|
|
1864
|
+
}, ba = ["aria-expanded", "aria-label"], wa = { key: 0 }, La = { key: 1 }, Sa = {
|
|
1838
1865
|
class: "sr-only",
|
|
1839
1866
|
"aria-live": "polite"
|
|
1840
|
-
},
|
|
1867
|
+
}, Ca = /* @__PURE__ */ pe({
|
|
1841
1868
|
__name: "Layerboard",
|
|
1842
1869
|
props: {
|
|
1843
1870
|
title: {},
|
|
@@ -1866,257 +1893,257 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
1866
1893
|
initialCenter: { default: void 0 }
|
|
1867
1894
|
},
|
|
1868
1895
|
emits: ["configs-loaded", "load-error", "zoom"],
|
|
1869
|
-
setup(e, { expose:
|
|
1870
|
-
const o = e,
|
|
1871
|
-
function
|
|
1896
|
+
setup(e, { expose: i, emit: l }) {
|
|
1897
|
+
const o = e, r = l, n = k([]), c = k(!0), w = k(null), p = k(12), x = k(""), h = k(/* @__PURE__ */ new Set()), g = k({}), a = k(/* @__PURE__ */ new Set()), v = k({}), f = k({}), L = k(/* @__PURE__ */ new Set()), S = k({});
|
|
1898
|
+
function E() {
|
|
1872
1899
|
const y = {};
|
|
1873
1900
|
for (const M of o.tiledLayers)
|
|
1874
1901
|
y[M.id] = M.opacity ?? 1;
|
|
1875
|
-
|
|
1902
|
+
S.value = y;
|
|
1876
1903
|
}
|
|
1877
|
-
function
|
|
1904
|
+
function D(y) {
|
|
1878
1905
|
L.value.has(y) ? L.value.delete(y) : L.value.add(y), L.value = new Set(L.value);
|
|
1879
1906
|
}
|
|
1880
|
-
function
|
|
1907
|
+
function K(y, M) {
|
|
1881
1908
|
M ? L.value.add(y) : L.value.delete(y), L.value = new Set(L.value);
|
|
1882
1909
|
}
|
|
1883
|
-
function
|
|
1884
|
-
|
|
1910
|
+
function T(y, M) {
|
|
1911
|
+
S.value = { ...S.value, [y]: M };
|
|
1885
1912
|
}
|
|
1886
|
-
const
|
|
1887
|
-
function
|
|
1888
|
-
return
|
|
1913
|
+
const I = o.dataSources.length > 0 ? da(o.dataSources) : null, _ = z(() => I?.state.value ?? {}), te = z(() => I?.isLoading.value ?? !1);
|
|
1914
|
+
function V(y) {
|
|
1915
|
+
return I?.getData(y) ?? null;
|
|
1889
1916
|
}
|
|
1890
|
-
function
|
|
1891
|
-
return
|
|
1917
|
+
function ye(y) {
|
|
1918
|
+
return I?.refetch(y) ?? Promise.resolve();
|
|
1892
1919
|
}
|
|
1893
|
-
|
|
1894
|
-
const
|
|
1920
|
+
B("layerboard-layers", W(n)), B("layerboard-visible", h), B("layerboard-opacities", g), B("layerboard-loading", W(a)), B("layerboard-errors", W(v)), B("layerboard-zoom", W(p)), B("layerboard-toggle-layer", _e), B("layerboard-set-layer-visible", $e), B("layerboard-set-layers-visible", Re), B("layerboard-set-opacity", Me), B("layerboard-tiled-layers", W(z(() => o.tiledLayers))), B("layerboard-visible-tiled", L), B("layerboard-tiled-opacities", S), B("layerboard-toggle-tiled", D), B("layerboard-set-tiled-opacity", T), B("layerboard-set-tiled-visible", K), B("layerboard-data-sources-state", _), B("layerboard-data-sources-loading", te), B("layerboard-get-data-source", V), B("layerboard-refetch-data-source", ye);
|
|
1921
|
+
const me = z(() => ({
|
|
1895
1922
|
backgroundColor: o.themeColor
|
|
1896
|
-
})),
|
|
1923
|
+
})), Ue = z(() => ({
|
|
1897
1924
|
backgroundColor: o.themeColor
|
|
1898
|
-
})),
|
|
1925
|
+
})), Je = z(() => ({
|
|
1899
1926
|
backgroundColor: o.themeColor
|
|
1900
|
-
})),
|
|
1901
|
-
width:
|
|
1927
|
+
})), lt = z(() => ({
|
|
1928
|
+
width: ce.value ? "0" : o.sidebarWidth
|
|
1902
1929
|
}));
|
|
1903
|
-
async function
|
|
1930
|
+
async function De() {
|
|
1904
1931
|
try {
|
|
1905
|
-
|
|
1906
|
-
const M = (await
|
|
1907
|
-
let
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1910
|
-
...
|
|
1911
|
-
paint:
|
|
1912
|
-
outlinePaint:
|
|
1913
|
-
legend:
|
|
1914
|
-
type:
|
|
1932
|
+
c.value = !0, w.value = null;
|
|
1933
|
+
const M = (await ht(o.webMapId)).map((N) => {
|
|
1934
|
+
let J = N;
|
|
1935
|
+
const Se = o.layerStyleOverrides[N.id];
|
|
1936
|
+
Se && (J = {
|
|
1937
|
+
...J,
|
|
1938
|
+
paint: Se.paint ?? J.paint,
|
|
1939
|
+
outlinePaint: Se.outlinePaint ?? J.outlinePaint,
|
|
1940
|
+
legend: Se.legend ?? J.legend,
|
|
1941
|
+
type: Se.type ?? J.type
|
|
1915
1942
|
});
|
|
1916
|
-
const
|
|
1917
|
-
return
|
|
1918
|
-
...
|
|
1919
|
-
popup: { ...
|
|
1920
|
-
}),
|
|
1943
|
+
const Ve = o.popupOverrides[N.id];
|
|
1944
|
+
return Ve && J.popup && (J = {
|
|
1945
|
+
...J,
|
|
1946
|
+
popup: { ...J.popup, ...Ve }
|
|
1947
|
+
}), J;
|
|
1921
1948
|
});
|
|
1922
|
-
|
|
1949
|
+
n.value = M.map((N) => ({
|
|
1923
1950
|
config: N,
|
|
1924
1951
|
component: N.type
|
|
1925
1952
|
}));
|
|
1926
|
-
const
|
|
1953
|
+
const H = {};
|
|
1927
1954
|
M.forEach((N) => {
|
|
1928
|
-
|
|
1929
|
-
}),
|
|
1955
|
+
H[N.id] = N.opacity ?? 1;
|
|
1956
|
+
}), g.value = H, r("configs-loaded", M);
|
|
1930
1957
|
} catch (y) {
|
|
1931
1958
|
const M = y instanceof Error ? y.message : "Failed to load layer configurations";
|
|
1932
|
-
|
|
1959
|
+
w.value = M, r("load-error", M);
|
|
1933
1960
|
} finally {
|
|
1934
|
-
|
|
1961
|
+
c.value = !1;
|
|
1935
1962
|
}
|
|
1936
1963
|
}
|
|
1937
|
-
async function
|
|
1964
|
+
async function nt() {
|
|
1938
1965
|
if (o.fetchMetadata)
|
|
1939
1966
|
try {
|
|
1940
1967
|
const y = "https://phl.carto.com/api/v2/sql?q=" + encodeURIComponent(
|
|
1941
1968
|
"select url_text, COALESCE(representation, '') as representation from phl.knack_metadata_reps_endpoints_join WHERE ( format = 'API' OR format = 'GeoService' ) AND url_text IS NOT null"
|
|
1942
1969
|
), M = await fetch(y);
|
|
1943
1970
|
if (!M.ok) return;
|
|
1944
|
-
const
|
|
1945
|
-
for (const
|
|
1946
|
-
if (
|
|
1947
|
-
const
|
|
1948
|
-
N[
|
|
1971
|
+
const H = await M.json(), N = {};
|
|
1972
|
+
for (const J of H.rows || [])
|
|
1973
|
+
if (J.url_text && J.representation) {
|
|
1974
|
+
const Se = Rt(J.url_text), Ve = `https://metadata.phila.gov/#home/representationdetails/${J.representation}/`;
|
|
1975
|
+
N[Se] = Ve;
|
|
1949
1976
|
}
|
|
1950
|
-
|
|
1977
|
+
f.value = N;
|
|
1951
1978
|
} catch {
|
|
1952
1979
|
}
|
|
1953
1980
|
}
|
|
1954
|
-
function
|
|
1955
|
-
|
|
1981
|
+
function rt(y) {
|
|
1982
|
+
p.value = y, r("zoom", y);
|
|
1956
1983
|
}
|
|
1957
|
-
function
|
|
1958
|
-
|
|
1984
|
+
function _e(y) {
|
|
1985
|
+
h.value.has(y) ? h.value.delete(y) : h.value.add(y), h.value = new Set(h.value);
|
|
1959
1986
|
}
|
|
1960
|
-
function
|
|
1961
|
-
M ?
|
|
1987
|
+
function $e(y, M) {
|
|
1988
|
+
M ? h.value.add(y) : h.value.delete(y), h.value = new Set(h.value);
|
|
1962
1989
|
}
|
|
1963
|
-
function
|
|
1964
|
-
for (const
|
|
1965
|
-
M ?
|
|
1966
|
-
|
|
1990
|
+
function Re(y, M) {
|
|
1991
|
+
for (const H of y)
|
|
1992
|
+
M ? h.value.add(H) : h.value.delete(H);
|
|
1993
|
+
h.value = new Set(h.value);
|
|
1967
1994
|
}
|
|
1968
|
-
function
|
|
1969
|
-
|
|
1995
|
+
function Me(y, M) {
|
|
1996
|
+
g.value = { ...g.value, [y]: M };
|
|
1970
1997
|
}
|
|
1971
|
-
function
|
|
1972
|
-
M ?
|
|
1998
|
+
function st(y, M) {
|
|
1999
|
+
M ? a.value.add(y) : a.value.delete(y), a.value = new Set(a.value);
|
|
1973
2000
|
}
|
|
1974
|
-
function
|
|
2001
|
+
function re(y, M) {
|
|
1975
2002
|
if (M)
|
|
1976
|
-
|
|
2003
|
+
v.value = { ...v.value, [y]: M };
|
|
1977
2004
|
else {
|
|
1978
|
-
const
|
|
1979
|
-
delete
|
|
2005
|
+
const H = { ...v.value };
|
|
2006
|
+
delete H[y], v.value = H;
|
|
1980
2007
|
}
|
|
1981
2008
|
}
|
|
1982
|
-
function
|
|
1983
|
-
|
|
2009
|
+
function Ae(y) {
|
|
2010
|
+
x.value = y;
|
|
1984
2011
|
}
|
|
1985
|
-
const ae =
|
|
1986
|
-
function
|
|
1987
|
-
|
|
1988
|
-
|
|
2012
|
+
const ae = k(null), Fe = k(null), ct = k(null), be = k(null), We = k(null), je = k(null), Ke = k(null), we = k("map");
|
|
2013
|
+
function Ze() {
|
|
2014
|
+
we.value = we.value === "sidebar" ? "map" : "sidebar", Ne(() => {
|
|
2015
|
+
we.value === "sidebar" && ae.value?.focus();
|
|
1989
2016
|
});
|
|
1990
2017
|
}
|
|
1991
|
-
const ie =
|
|
1992
|
-
function
|
|
1993
|
-
ie.value = !ie.value, ie.value &&
|
|
1994
|
-
|
|
2018
|
+
const ie = k(!1);
|
|
2019
|
+
function Qe() {
|
|
2020
|
+
ie.value = !ie.value, ie.value && Ne(() => {
|
|
2021
|
+
be.value?.focus();
|
|
1995
2022
|
});
|
|
1996
2023
|
}
|
|
1997
|
-
function
|
|
1998
|
-
ie.value = !1,
|
|
1999
|
-
|
|
2024
|
+
function Ee() {
|
|
2025
|
+
ie.value = !1, Ne(() => {
|
|
2026
|
+
Fe.value?.focus();
|
|
2000
2027
|
});
|
|
2001
2028
|
}
|
|
2002
|
-
const
|
|
2003
|
-
function
|
|
2004
|
-
|
|
2029
|
+
const ce = k(!1);
|
|
2030
|
+
function Ie() {
|
|
2031
|
+
ce.value = !ce.value;
|
|
2005
2032
|
}
|
|
2006
|
-
const
|
|
2007
|
-
function
|
|
2008
|
-
|
|
2009
|
-
|
|
2033
|
+
const he = k(!1), qe = k(null);
|
|
2034
|
+
function Le() {
|
|
2035
|
+
qe.value = document.activeElement, he.value = !0, Ne(() => {
|
|
2036
|
+
Ke.value?.focus();
|
|
2010
2037
|
});
|
|
2011
2038
|
}
|
|
2012
|
-
function
|
|
2013
|
-
|
|
2014
|
-
|
|
2039
|
+
function le() {
|
|
2040
|
+
he.value = !1, Ne(() => {
|
|
2041
|
+
qe.value?.focus(), qe.value = null;
|
|
2015
2042
|
});
|
|
2016
2043
|
}
|
|
2017
|
-
function
|
|
2018
|
-
y.target.classList.contains("layerboard-modal-backdrop") &&
|
|
2044
|
+
function Be(y) {
|
|
2045
|
+
y.target.classList.contains("layerboard-modal-backdrop") && le();
|
|
2019
2046
|
}
|
|
2020
|
-
function
|
|
2047
|
+
function ut(y) {
|
|
2021
2048
|
if (y.key === "Escape") {
|
|
2022
|
-
|
|
2049
|
+
Ee();
|
|
2023
2050
|
return;
|
|
2024
2051
|
}
|
|
2025
|
-
if (y.key === "Tab" &&
|
|
2052
|
+
if (y.key === "Tab" && We.value) {
|
|
2026
2053
|
const M = Array.from(
|
|
2027
|
-
|
|
2054
|
+
We.value.querySelectorAll(
|
|
2028
2055
|
'a[href], button:not([disabled]), textarea, input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2029
2056
|
)
|
|
2030
2057
|
);
|
|
2031
2058
|
if (M.length === 0) return;
|
|
2032
|
-
const
|
|
2033
|
-
y.shiftKey ? document.activeElement ===
|
|
2059
|
+
const H = M[0], N = M[M.length - 1];
|
|
2060
|
+
y.shiftKey ? document.activeElement === H && (y.preventDefault(), N.focus()) : document.activeElement === N && (y.preventDefault(), H.focus());
|
|
2034
2061
|
}
|
|
2035
2062
|
}
|
|
2036
|
-
function
|
|
2063
|
+
function dt(y) {
|
|
2037
2064
|
if (y.key === "Escape") {
|
|
2038
|
-
|
|
2065
|
+
le();
|
|
2039
2066
|
return;
|
|
2040
2067
|
}
|
|
2041
|
-
if (y.key === "Tab" &&
|
|
2068
|
+
if (y.key === "Tab" && je.value) {
|
|
2042
2069
|
const M = Array.from(
|
|
2043
|
-
|
|
2070
|
+
je.value.querySelectorAll(
|
|
2044
2071
|
'a[href], button:not([disabled]), textarea, input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2045
2072
|
)
|
|
2046
2073
|
);
|
|
2047
2074
|
if (M.length === 0) return;
|
|
2048
|
-
const
|
|
2049
|
-
y.shiftKey ? document.activeElement ===
|
|
2075
|
+
const H = M[0], N = M[M.length - 1];
|
|
2076
|
+
y.shiftKey ? document.activeElement === H && (y.preventDefault(), N.focus()) : document.activeElement === N && (y.preventDefault(), H.focus());
|
|
2050
2077
|
}
|
|
2051
2078
|
}
|
|
2052
|
-
|
|
2079
|
+
B("layerboard-open-modal", Le), B("layerboard-close-modal", le), B("layerboard-is-modal-open", W(he)), i({
|
|
2053
2080
|
/** Layer configurations */
|
|
2054
|
-
layerList:
|
|
2081
|
+
layerList: n,
|
|
2055
2082
|
/** Set of visible layer IDs */
|
|
2056
|
-
visibleLayers:
|
|
2083
|
+
visibleLayers: h,
|
|
2057
2084
|
/** Layer opacity values */
|
|
2058
|
-
layerOpacities:
|
|
2085
|
+
layerOpacities: g,
|
|
2059
2086
|
/** Set of currently loading layer IDs */
|
|
2060
|
-
loadingLayers:
|
|
2087
|
+
loadingLayers: a,
|
|
2061
2088
|
/** Map of layer errors by ID */
|
|
2062
|
-
layerErrors:
|
|
2089
|
+
layerErrors: v,
|
|
2063
2090
|
/** Current map zoom level */
|
|
2064
|
-
currentZoom:
|
|
2091
|
+
currentZoom: p,
|
|
2065
2092
|
/** Toggle a layer's visibility */
|
|
2066
|
-
toggleLayer:
|
|
2093
|
+
toggleLayer: _e,
|
|
2067
2094
|
/** Set a layer's visibility explicitly */
|
|
2068
|
-
setLayerVisible:
|
|
2095
|
+
setLayerVisible: $e,
|
|
2069
2096
|
/** Set multiple layers' visibility at once */
|
|
2070
|
-
setLayersVisible:
|
|
2097
|
+
setLayersVisible: Re,
|
|
2071
2098
|
/** Set a layer's opacity */
|
|
2072
|
-
setLayerOpacity:
|
|
2099
|
+
setLayerOpacity: Me,
|
|
2073
2100
|
/** Reload layer configurations */
|
|
2074
|
-
reloadConfigs:
|
|
2101
|
+
reloadConfigs: De,
|
|
2075
2102
|
/** Clear configuration cache */
|
|
2076
|
-
clearCache: () =>
|
|
2103
|
+
clearCache: () => ra(o.webMapId),
|
|
2077
2104
|
// Tiled layer APIs
|
|
2078
2105
|
/** Set of visible tiled layer IDs */
|
|
2079
2106
|
visibleTiledLayers: L,
|
|
2080
2107
|
/** Tiled layer opacity values */
|
|
2081
|
-
tiledLayerOpacities:
|
|
2108
|
+
tiledLayerOpacities: S,
|
|
2082
2109
|
/** Toggle a tiled layer's visibility */
|
|
2083
|
-
toggleTiledLayer:
|
|
2110
|
+
toggleTiledLayer: D,
|
|
2084
2111
|
/** Set a tiled layer's visibility explicitly */
|
|
2085
|
-
setTiledLayerVisible:
|
|
2112
|
+
setTiledLayerVisible: K,
|
|
2086
2113
|
/** Set a tiled layer's opacity */
|
|
2087
|
-
setTiledLayerOpacity:
|
|
2114
|
+
setTiledLayerOpacity: T,
|
|
2088
2115
|
// Data source APIs
|
|
2089
2116
|
/** State of all data sources */
|
|
2090
|
-
dataSourcesState:
|
|
2117
|
+
dataSourcesState: _,
|
|
2091
2118
|
/** Whether any data source is loading */
|
|
2092
|
-
dataSourcesLoading:
|
|
2119
|
+
dataSourcesLoading: te,
|
|
2093
2120
|
/** Get data from a specific data source */
|
|
2094
|
-
getDataSourceData:
|
|
2121
|
+
getDataSourceData: V,
|
|
2095
2122
|
/** Refetch a specific data source */
|
|
2096
|
-
refetchDataSource:
|
|
2123
|
+
refetchDataSource: ye,
|
|
2097
2124
|
// Modal APIs
|
|
2098
2125
|
/** Whether the modal is currently open */
|
|
2099
|
-
isModalOpen:
|
|
2126
|
+
isModalOpen: he,
|
|
2100
2127
|
/** Open the modal */
|
|
2101
|
-
openModal:
|
|
2128
|
+
openModal: Le,
|
|
2102
2129
|
/** Close the modal */
|
|
2103
|
-
closeModal:
|
|
2130
|
+
closeModal: le
|
|
2104
2131
|
});
|
|
2105
|
-
function
|
|
2106
|
-
y.key === "Escape" && ie.value &&
|
|
2107
|
-
}
|
|
2108
|
-
return
|
|
2109
|
-
|
|
2110
|
-
}),
|
|
2111
|
-
document.removeEventListener("keydown",
|
|
2112
|
-
}), (y, M) => (m(),
|
|
2132
|
+
function Xe(y) {
|
|
2133
|
+
y.key === "Escape" && ie.value && Ee();
|
|
2134
|
+
}
|
|
2135
|
+
return et(() => {
|
|
2136
|
+
De(), nt(), E(), document.addEventListener("keydown", Xe);
|
|
2137
|
+
}), Ht(() => {
|
|
2138
|
+
document.removeEventListener("keydown", Xe);
|
|
2139
|
+
}), (y, M) => (m(), $("div", fa, [
|
|
2113
2140
|
M[5] || (M[5] = P("a", {
|
|
2114
2141
|
href: "#main-content",
|
|
2115
2142
|
class: "skip-to-main-content-link"
|
|
2116
2143
|
}, "Skip to main content", -1)),
|
|
2117
2144
|
P("header", {
|
|
2118
2145
|
class: "layerboard-header",
|
|
2119
|
-
style:
|
|
2146
|
+
style: de(me.value)
|
|
2120
2147
|
}, [
|
|
2121
2148
|
M[1] || (M[1] = P("a", {
|
|
2122
2149
|
href: "https://www.phila.gov/",
|
|
@@ -2133,138 +2160,138 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2133
2160
|
}, null, -1)),
|
|
2134
2161
|
P("button", {
|
|
2135
2162
|
ref_key: "hamburgerRef",
|
|
2136
|
-
ref:
|
|
2163
|
+
ref: Fe,
|
|
2137
2164
|
class: "layerboard-hamburger layerboard-mobile-only",
|
|
2138
2165
|
"aria-expanded": ie.value,
|
|
2139
2166
|
"aria-label": "Toggle menu",
|
|
2140
|
-
onClick:
|
|
2167
|
+
onClick: Qe
|
|
2141
2168
|
}, [
|
|
2142
|
-
|
|
2143
|
-
"icon-definition": d(
|
|
2169
|
+
G(d(Ce), {
|
|
2170
|
+
"icon-definition": d(Co),
|
|
2144
2171
|
size: "medium",
|
|
2145
2172
|
inline: "",
|
|
2146
2173
|
decorative: ""
|
|
2147
2174
|
}, null, 8, ["icon-definition"])
|
|
2148
|
-
], 8,
|
|
2149
|
-
|
|
2150
|
-
P("h1", null,
|
|
2151
|
-
e.subtitle ? (m(),
|
|
2175
|
+
], 8, pa),
|
|
2176
|
+
fe(y.$slots, "header", {}, () => [
|
|
2177
|
+
P("h1", null, q(e.title), 1),
|
|
2178
|
+
e.subtitle ? (m(), $("span", ya, q(e.subtitle), 1)) : R("", !0)
|
|
2152
2179
|
], !0),
|
|
2153
|
-
ie.value ? (m(),
|
|
2180
|
+
ie.value ? (m(), $("div", {
|
|
2154
2181
|
key: 0,
|
|
2155
2182
|
ref_key: "mobileMenuRef",
|
|
2156
|
-
ref:
|
|
2183
|
+
ref: We,
|
|
2157
2184
|
class: "layerboard-mobile-menu",
|
|
2158
2185
|
role: "dialog",
|
|
2159
2186
|
"aria-modal": "true",
|
|
2160
2187
|
"aria-label": "Site menu",
|
|
2161
|
-
style:
|
|
2162
|
-
onKeydown:
|
|
2188
|
+
style: de({ backgroundColor: e.themeColor }),
|
|
2189
|
+
onKeydown: ut
|
|
2163
2190
|
}, [
|
|
2164
|
-
P("div",
|
|
2165
|
-
|
|
2166
|
-
openModal:
|
|
2167
|
-
closeModal:
|
|
2168
|
-
isModalOpen:
|
|
2191
|
+
P("div", ma, [
|
|
2192
|
+
fe(y.$slots, "footer", {
|
|
2193
|
+
openModal: Le,
|
|
2194
|
+
closeModal: le,
|
|
2195
|
+
isModalOpen: he.value
|
|
2169
2196
|
}, () => [
|
|
2170
|
-
M[0] || (M[0] =
|
|
2197
|
+
M[0] || (M[0] = ke(" City of Philadelphia ", -1))
|
|
2171
2198
|
], !0)
|
|
2172
2199
|
]),
|
|
2173
2200
|
P("button", {
|
|
2174
2201
|
ref_key: "mobileMenuCloseRef",
|
|
2175
|
-
ref:
|
|
2202
|
+
ref: be,
|
|
2176
2203
|
class: "layerboard-mobile-menu-close",
|
|
2177
2204
|
"aria-label": "Close menu",
|
|
2178
|
-
onClick:
|
|
2205
|
+
onClick: Ee
|
|
2179
2206
|
}, [
|
|
2180
|
-
|
|
2181
|
-
"icon-definition": d(
|
|
2207
|
+
G(d(Ce), {
|
|
2208
|
+
"icon-definition": d(Ft),
|
|
2182
2209
|
size: "medium",
|
|
2183
2210
|
decorative: ""
|
|
2184
2211
|
}, null, 8, ["icon-definition"])
|
|
2185
2212
|
], 512)
|
|
2186
|
-
], 36)) :
|
|
2187
|
-
ie.value ? (m(),
|
|
2213
|
+
], 36)) : R("", !0),
|
|
2214
|
+
ie.value ? (m(), $("div", {
|
|
2188
2215
|
key: 1,
|
|
2189
2216
|
class: "layerboard-mobile-menu-backdrop",
|
|
2190
|
-
onClick:
|
|
2191
|
-
})) :
|
|
2217
|
+
onClick: Ee
|
|
2218
|
+
})) : R("", !0)
|
|
2192
2219
|
], 4),
|
|
2193
|
-
P("div",
|
|
2194
|
-
|
|
2220
|
+
P("div", ha, [
|
|
2221
|
+
c.value ? (m(), $("div", ga, [
|
|
2195
2222
|
P("div", {
|
|
2196
2223
|
class: "layerboard-spinner",
|
|
2197
|
-
style:
|
|
2224
|
+
style: de({ borderTopColor: e.themeColor })
|
|
2198
2225
|
}, null, 4),
|
|
2199
|
-
P("p", null, "Loading " +
|
|
2200
|
-
])) :
|
|
2226
|
+
P("p", null, "Loading " + q(e.title) + "...", 1)
|
|
2227
|
+
])) : w.value ? (m(), $("div", va, [
|
|
2201
2228
|
M[3] || (M[3] = P("h2", null, "Error Loading Layers", -1)),
|
|
2202
|
-
P("p", null,
|
|
2229
|
+
P("p", null, q(w.value), 1),
|
|
2203
2230
|
P("button", {
|
|
2204
2231
|
class: "layerboard-retry-button",
|
|
2205
|
-
style:
|
|
2206
|
-
onClick:
|
|
2232
|
+
style: de({ backgroundColor: e.themeColor }),
|
|
2233
|
+
onClick: De
|
|
2207
2234
|
}, " Retry ", 4)
|
|
2208
|
-
])) : (m(),
|
|
2235
|
+
])) : (m(), $(se, { key: 2 }, [
|
|
2209
2236
|
P("aside", {
|
|
2210
2237
|
id: "main-content",
|
|
2211
2238
|
ref_key: "sidebarRef",
|
|
2212
2239
|
ref: ae,
|
|
2213
|
-
class:
|
|
2214
|
-
style:
|
|
2240
|
+
class: ne(["layerboard-sidebar", { "is-active": we.value === "sidebar" }]),
|
|
2241
|
+
style: de(lt.value),
|
|
2215
2242
|
"aria-label": "Map layers",
|
|
2216
2243
|
tabindex: "-1"
|
|
2217
2244
|
}, [
|
|
2218
|
-
|
|
2219
|
-
layers:
|
|
2220
|
-
visibleLayers:
|
|
2221
|
-
layerOpacities:
|
|
2222
|
-
loadingLayers:
|
|
2223
|
-
layerErrors:
|
|
2224
|
-
currentZoom:
|
|
2225
|
-
toggleLayer:
|
|
2226
|
-
setLayerVisible:
|
|
2227
|
-
setLayersVisible:
|
|
2228
|
-
setOpacity:
|
|
2245
|
+
fe(y.$slots, "sidebar", {
|
|
2246
|
+
layers: n.value,
|
|
2247
|
+
visibleLayers: h.value,
|
|
2248
|
+
layerOpacities: g.value,
|
|
2249
|
+
loadingLayers: a.value,
|
|
2250
|
+
layerErrors: v.value,
|
|
2251
|
+
currentZoom: p.value,
|
|
2252
|
+
toggleLayer: _e,
|
|
2253
|
+
setLayerVisible: $e,
|
|
2254
|
+
setLayersVisible: Re,
|
|
2255
|
+
setOpacity: Me,
|
|
2229
2256
|
tiledLayers: e.tiledLayers,
|
|
2230
2257
|
visibleTiledLayers: L.value,
|
|
2231
|
-
tiledLayerOpacities:
|
|
2232
|
-
toggleTiledLayer:
|
|
2233
|
-
setTiledLayerVisible:
|
|
2234
|
-
setTiledLayerOpacity:
|
|
2235
|
-
dataSourcesState:
|
|
2236
|
-
dataSourcesLoading:
|
|
2237
|
-
getDataSource:
|
|
2238
|
-
refetchDataSource:
|
|
2258
|
+
tiledLayerOpacities: S.value,
|
|
2259
|
+
toggleTiledLayer: D,
|
|
2260
|
+
setTiledLayerVisible: K,
|
|
2261
|
+
setTiledLayerOpacity: T,
|
|
2262
|
+
dataSourcesState: _.value,
|
|
2263
|
+
dataSourcesLoading: te.value,
|
|
2264
|
+
getDataSource: V,
|
|
2265
|
+
refetchDataSource: ye
|
|
2239
2266
|
}, () => [
|
|
2240
|
-
e.showDefaultSidebar ? (m(),
|
|
2267
|
+
e.showDefaultSidebar ? (m(), j(qo, {
|
|
2241
2268
|
key: 0,
|
|
2242
|
-
"layer-list":
|
|
2243
|
-
"visible-layers":
|
|
2244
|
-
"layer-opacities":
|
|
2245
|
-
"loading-layers":
|
|
2246
|
-
"layer-errors":
|
|
2247
|
-
"current-zoom":
|
|
2248
|
-
"search-query":
|
|
2249
|
-
"layer-metadata":
|
|
2250
|
-
onToggleLayer:
|
|
2251
|
-
onSetOpacity:
|
|
2252
|
-
onUpdateSearch:
|
|
2253
|
-
}, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) :
|
|
2269
|
+
"layer-list": n.value,
|
|
2270
|
+
"visible-layers": h.value,
|
|
2271
|
+
"layer-opacities": g.value,
|
|
2272
|
+
"loading-layers": a.value,
|
|
2273
|
+
"layer-errors": v.value,
|
|
2274
|
+
"current-zoom": p.value,
|
|
2275
|
+
"search-query": x.value,
|
|
2276
|
+
"layer-metadata": f.value,
|
|
2277
|
+
onToggleLayer: _e,
|
|
2278
|
+
onSetOpacity: Me,
|
|
2279
|
+
onUpdateSearch: Ae
|
|
2280
|
+
}, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) : R("", !0)
|
|
2254
2281
|
], !0)
|
|
2255
2282
|
], 6),
|
|
2256
2283
|
P("div", {
|
|
2257
2284
|
role: "main",
|
|
2258
2285
|
"aria-label": "Map",
|
|
2259
|
-
class:
|
|
2286
|
+
class: ne(["layerboard-map", { "is-active": we.value === "map" }])
|
|
2260
2287
|
}, [
|
|
2261
|
-
|
|
2262
|
-
"visible-layers":
|
|
2263
|
-
"layer-opacities":
|
|
2264
|
-
"layer-list":
|
|
2288
|
+
G(io, {
|
|
2289
|
+
"visible-layers": h.value,
|
|
2290
|
+
"layer-opacities": g.value,
|
|
2291
|
+
"layer-list": n.value,
|
|
2265
2292
|
"tiled-layers": e.tiledLayers,
|
|
2266
2293
|
"visible-tiled-layers": L.value,
|
|
2267
|
-
"tiled-layer-opacities":
|
|
2294
|
+
"tiled-layer-opacities": S.value,
|
|
2268
2295
|
"cyclomedia-config": e.cyclomediaConfig,
|
|
2269
2296
|
"pictometry-credentials": e.pictometryCredentials,
|
|
2270
2297
|
"basemap-control-position": e.basemapControlPosition,
|
|
@@ -2276,56 +2303,56 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2276
2303
|
"pictometry-button-position": e.pictometryButtonPosition,
|
|
2277
2304
|
"initial-zoom": e.initialZoom,
|
|
2278
2305
|
"initial-center": e.initialCenter,
|
|
2279
|
-
onZoom:
|
|
2280
|
-
onLayerLoading:
|
|
2281
|
-
onLayerError:
|
|
2306
|
+
onZoom: rt,
|
|
2307
|
+
onLayerLoading: st,
|
|
2308
|
+
onLayerError: re
|
|
2282
2309
|
}, null, 8, ["visible-layers", "layer-opacities", "layer-list", "tiled-layers", "visible-tiled-layers", "tiled-layer-opacities", "cyclomedia-config", "pictometry-credentials", "basemap-control-position", "navigation-control-position", "geolocation-control-position", "search-control-position", "draw-control-position", "cyclomedia-button-position", "pictometry-button-position", "initial-zoom", "initial-center"])
|
|
2283
2310
|
], 2),
|
|
2284
2311
|
P("button", {
|
|
2285
|
-
class:
|
|
2286
|
-
style:
|
|
2287
|
-
"aria-expanded": !
|
|
2288
|
-
"aria-label":
|
|
2289
|
-
onClick:
|
|
2312
|
+
class: ne(["layerboard-sidebar-toggle", { "is-collapsed": ce.value }]),
|
|
2313
|
+
style: de({ left: ce.value ? "0" : o.sidebarWidth }),
|
|
2314
|
+
"aria-expanded": !ce.value,
|
|
2315
|
+
"aria-label": ce.value ? "Expand sidebar" : "Collapse sidebar",
|
|
2316
|
+
onClick: Ie
|
|
2290
2317
|
}, [
|
|
2291
|
-
|
|
2292
|
-
"icon-definition":
|
|
2318
|
+
G(d(Ce), {
|
|
2319
|
+
"icon-definition": ce.value ? d(Lo) : d(So),
|
|
2293
2320
|
size: "medium",
|
|
2294
2321
|
decorative: ""
|
|
2295
2322
|
}, null, 8, ["icon-definition"])
|
|
2296
|
-
], 14,
|
|
2323
|
+
], 14, ba)
|
|
2297
2324
|
], 64))
|
|
2298
2325
|
]),
|
|
2299
2326
|
P("button", {
|
|
2300
2327
|
ref_key: "mobileToggleRef",
|
|
2301
|
-
ref:
|
|
2328
|
+
ref: ct,
|
|
2302
2329
|
class: "layerboard-mobile-toggle",
|
|
2303
|
-
style:
|
|
2304
|
-
onClick:
|
|
2330
|
+
style: de(Je.value),
|
|
2331
|
+
onClick: Ze
|
|
2305
2332
|
}, [
|
|
2306
|
-
|
|
2333
|
+
we.value === "map" ? (m(), $("span", wa, q(e.sidebarLabel), 1)) : (m(), $("span", La, q(e.mapLabel), 1))
|
|
2307
2334
|
], 4),
|
|
2308
2335
|
P("footer", {
|
|
2309
2336
|
class: "layerboard-footer",
|
|
2310
|
-
style:
|
|
2337
|
+
style: de(Ue.value)
|
|
2311
2338
|
}, [
|
|
2312
|
-
|
|
2313
|
-
openModal:
|
|
2314
|
-
closeModal:
|
|
2315
|
-
isModalOpen:
|
|
2339
|
+
fe(y.$slots, "footer", {
|
|
2340
|
+
openModal: Le,
|
|
2341
|
+
closeModal: le,
|
|
2342
|
+
isModalOpen: he.value
|
|
2316
2343
|
}, () => [
|
|
2317
|
-
M[4] || (M[4] =
|
|
2344
|
+
M[4] || (M[4] = ke(" City of Philadelphia ", -1))
|
|
2318
2345
|
], !0)
|
|
2319
2346
|
], 4),
|
|
2320
|
-
|
|
2347
|
+
he.value ? (m(), $("div", {
|
|
2321
2348
|
key: 0,
|
|
2322
2349
|
class: "layerboard-modal-backdrop",
|
|
2323
|
-
onClick:
|
|
2324
|
-
onKeydown:
|
|
2350
|
+
onClick: Be,
|
|
2351
|
+
onKeydown: dt
|
|
2325
2352
|
}, [
|
|
2326
2353
|
P("div", {
|
|
2327
2354
|
ref_key: "modalRef",
|
|
2328
|
-
ref:
|
|
2355
|
+
ref: je,
|
|
2329
2356
|
class: "layerboard-modal",
|
|
2330
2357
|
role: "dialog",
|
|
2331
2358
|
"aria-modal": "true",
|
|
@@ -2333,27 +2360,27 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2333
2360
|
}, [
|
|
2334
2361
|
P("button", {
|
|
2335
2362
|
ref_key: "modalCloseRef",
|
|
2336
|
-
ref:
|
|
2363
|
+
ref: Ke,
|
|
2337
2364
|
class: "layerboard-modal-close",
|
|
2338
2365
|
"aria-label": "Close modal",
|
|
2339
|
-
onClick:
|
|
2366
|
+
onClick: le
|
|
2340
2367
|
}, [
|
|
2341
|
-
|
|
2342
|
-
"icon-definition": d(
|
|
2368
|
+
G(d(Ce), {
|
|
2369
|
+
"icon-definition": d(Ft),
|
|
2343
2370
|
size: "medium",
|
|
2344
2371
|
decorative: ""
|
|
2345
2372
|
}, null, 8, ["icon-definition"])
|
|
2346
2373
|
], 512),
|
|
2347
|
-
|
|
2374
|
+
fe(y.$slots, "modal", { closeModal: le }, void 0, !0)
|
|
2348
2375
|
], 512)
|
|
2349
|
-
], 32)) :
|
|
2350
|
-
P("span",
|
|
2376
|
+
], 32)) : R("", !0),
|
|
2377
|
+
P("span", Sa, q(we.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
|
|
2351
2378
|
]));
|
|
2352
2379
|
}
|
|
2353
|
-
}),
|
|
2380
|
+
}), qa = /* @__PURE__ */ xe(Ca, [["__scopeId", "data-v-67021805"]]), ka = ["aria-expanded"], xa = {
|
|
2354
2381
|
key: 0,
|
|
2355
2382
|
class: "topic-icon"
|
|
2356
|
-
},
|
|
2383
|
+
}, $a = { class: "topic-title" }, Ma = /* @__PURE__ */ pe({
|
|
2357
2384
|
__name: "TopicAccordion",
|
|
2358
2385
|
props: {
|
|
2359
2386
|
title: {},
|
|
@@ -2363,43 +2390,43 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2363
2390
|
headerClass: { default: void 0 }
|
|
2364
2391
|
},
|
|
2365
2392
|
emits: ["toggle", "layerChange"],
|
|
2366
|
-
setup(e, { emit:
|
|
2367
|
-
const l = e, o =
|
|
2368
|
-
|
|
2393
|
+
setup(e, { emit: i }) {
|
|
2394
|
+
const l = e, o = i, r = k(l.expanded), n = `topic-panel-${xt()}`, c = `topic-header-${xt()}`;
|
|
2395
|
+
Oe(
|
|
2369
2396
|
() => l.expanded,
|
|
2370
|
-
(
|
|
2371
|
-
|
|
2397
|
+
(p) => {
|
|
2398
|
+
r.value = p;
|
|
2372
2399
|
}
|
|
2373
2400
|
);
|
|
2374
|
-
function
|
|
2375
|
-
|
|
2401
|
+
function w() {
|
|
2402
|
+
r.value = !r.value, o("toggle", r.value);
|
|
2376
2403
|
}
|
|
2377
|
-
return (
|
|
2378
|
-
const
|
|
2379
|
-
return m(),
|
|
2380
|
-
class:
|
|
2404
|
+
return (p, x) => {
|
|
2405
|
+
const h = Jt("font-awesome-icon");
|
|
2406
|
+
return m(), $("div", {
|
|
2407
|
+
class: ne(["topic-accordion", { "is-expanded": r.value }])
|
|
2381
2408
|
}, [
|
|
2382
2409
|
P("button", {
|
|
2383
|
-
id:
|
|
2384
|
-
class:
|
|
2410
|
+
id: c,
|
|
2411
|
+
class: ne(["topic-header", e.headerClass]),
|
|
2385
2412
|
type: "button",
|
|
2386
|
-
"aria-expanded":
|
|
2387
|
-
"aria-controls":
|
|
2388
|
-
onClick:
|
|
2413
|
+
"aria-expanded": r.value,
|
|
2414
|
+
"aria-controls": n,
|
|
2415
|
+
onClick: w
|
|
2389
2416
|
}, [
|
|
2390
|
-
e.icon ||
|
|
2391
|
-
|
|
2392
|
-
e.icon ? (m(),
|
|
2417
|
+
e.icon || p.$slots.icon ? (m(), $("span", xa, [
|
|
2418
|
+
fe(p.$slots, "icon", {}, () => [
|
|
2419
|
+
e.icon ? (m(), j(h, {
|
|
2393
2420
|
key: 0,
|
|
2394
2421
|
icon: ["fas", e.icon],
|
|
2395
2422
|
"aria-hidden": "true"
|
|
2396
|
-
}, null, 8, ["icon"])) :
|
|
2423
|
+
}, null, 8, ["icon"])) : R("", !0)
|
|
2397
2424
|
], !0)
|
|
2398
|
-
])) :
|
|
2399
|
-
P("span",
|
|
2425
|
+
])) : R("", !0),
|
|
2426
|
+
P("span", $a, q(e.title), 1),
|
|
2400
2427
|
P("span", {
|
|
2401
|
-
class:
|
|
2402
|
-
}, [
|
|
2428
|
+
class: ne(["topic-chevron", { "is-rotated": r.value }])
|
|
2429
|
+
}, [...x[0] || (x[0] = [
|
|
2403
2430
|
P("svg", {
|
|
2404
2431
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2405
2432
|
width: "20",
|
|
@@ -2415,39 +2442,39 @@ const ca = { class: "layerboard-layout" }, ua = ["aria-expanded"], da = {
|
|
|
2415
2442
|
P("polyline", { points: "6 9 12 15 18 9" })
|
|
2416
2443
|
], -1)
|
|
2417
2444
|
])], 2)
|
|
2418
|
-
], 10,
|
|
2419
|
-
|
|
2420
|
-
id:
|
|
2445
|
+
], 10, ka),
|
|
2446
|
+
_t(P("div", {
|
|
2447
|
+
id: n,
|
|
2421
2448
|
role: "region",
|
|
2422
|
-
"aria-labelledby":
|
|
2449
|
+
"aria-labelledby": c,
|
|
2423
2450
|
class: "topic-content"
|
|
2424
2451
|
}, [
|
|
2425
|
-
|
|
2426
|
-
|
|
2452
|
+
fe(p.$slots, "default", {}, () => [
|
|
2453
|
+
x[1] || (x[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2427
2454
|
], !0)
|
|
2428
2455
|
], 512), [
|
|
2429
|
-
[
|
|
2456
|
+
[Kt, r.value]
|
|
2430
2457
|
])
|
|
2431
2458
|
], 2);
|
|
2432
2459
|
};
|
|
2433
2460
|
}
|
|
2434
|
-
}),
|
|
2435
|
-
function
|
|
2461
|
+
}), Ga = /* @__PURE__ */ xe(Ma, [["__scopeId", "data-v-a2023afa"]]);
|
|
2462
|
+
function Pa(e) {
|
|
2436
2463
|
return e.displayOptions?.shouldShowCheckbox !== !1;
|
|
2437
2464
|
}
|
|
2438
|
-
function Bt(e,
|
|
2439
|
-
return
|
|
2465
|
+
function Bt(e, i) {
|
|
2466
|
+
return i ? e.displayOptions?.shouldShowSlider !== !1 : !1;
|
|
2440
2467
|
}
|
|
2441
|
-
function
|
|
2442
|
-
return
|
|
2468
|
+
function Vt(e, i) {
|
|
2469
|
+
return i ? e.displayOptions?.shouldShowLegendBox !== !1 : !1;
|
|
2443
2470
|
}
|
|
2444
|
-
function
|
|
2471
|
+
function ze(e) {
|
|
2445
2472
|
return e.displayOptions?.layerNameChange || e.title;
|
|
2446
2473
|
}
|
|
2447
|
-
const
|
|
2474
|
+
const Ta = ["aria-label"], Fa = ["checked", "disabled", "onChange"], Ea = { class: "layer-title" }, Ia = { class: "layer-title" }, Oa = {
|
|
2448
2475
|
key: 0,
|
|
2449
2476
|
class: "empty-state"
|
|
2450
|
-
},
|
|
2477
|
+
}, za = /* @__PURE__ */ pe({
|
|
2451
2478
|
__name: "LayerCheckboxSet",
|
|
2452
2479
|
props: {
|
|
2453
2480
|
layers: {},
|
|
@@ -2461,79 +2488,79 @@ const $a = ["aria-label"], Ma = ["checked", "disabled", "onChange"], Pa = { clas
|
|
|
2461
2488
|
groupLabel: { default: void 0 }
|
|
2462
2489
|
},
|
|
2463
2490
|
emits: ["toggleLayer", "setOpacity"],
|
|
2464
|
-
setup(e, { emit:
|
|
2465
|
-
const l = e, o =
|
|
2491
|
+
setup(e, { emit: i }) {
|
|
2492
|
+
const l = e, o = i, { isVisible: r, getLayerOpacity: n, isLayerLoading: c, getLayerError: w, isLayerAvailableAtZoom: p } = bt(
|
|
2466
2493
|
() => l
|
|
2467
2494
|
);
|
|
2468
|
-
function
|
|
2469
|
-
o("toggleLayer",
|
|
2495
|
+
function x(h) {
|
|
2496
|
+
o("toggleLayer", h);
|
|
2470
2497
|
}
|
|
2471
|
-
return (
|
|
2498
|
+
return (h, g) => (m(), $("fieldset", {
|
|
2472
2499
|
class: "layer-checkbox-set",
|
|
2473
2500
|
role: "group",
|
|
2474
2501
|
"aria-label": e.groupLabel
|
|
2475
2502
|
}, [
|
|
2476
|
-
(m(!0),
|
|
2477
|
-
key:
|
|
2503
|
+
(m(!0), $(se, null, ge(e.layers, (a) => (m(), $("div", {
|
|
2504
|
+
key: a.id,
|
|
2478
2505
|
class: "layer-item"
|
|
2479
2506
|
}, [
|
|
2480
|
-
d(
|
|
2507
|
+
d(Pa)(a) ? (m(), $("label", {
|
|
2481
2508
|
key: 0,
|
|
2482
|
-
class:
|
|
2483
|
-
"layer-unavailable": !d(
|
|
2484
|
-
"layer-error": d(
|
|
2509
|
+
class: ne(["layer-checkbox", {
|
|
2510
|
+
"layer-unavailable": !d(p)(a),
|
|
2511
|
+
"layer-error": d(w)(a.id)
|
|
2485
2512
|
}])
|
|
2486
2513
|
}, [
|
|
2487
2514
|
P("input", {
|
|
2488
2515
|
type: "checkbox",
|
|
2489
|
-
checked: d(
|
|
2490
|
-
disabled: !d(
|
|
2491
|
-
onChange: (
|
|
2492
|
-
}, null, 40,
|
|
2493
|
-
P("span",
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
loading: d(
|
|
2497
|
-
error: d(
|
|
2498
|
-
unavailable: !d(
|
|
2516
|
+
checked: d(r)(a.id),
|
|
2517
|
+
disabled: !d(p)(a),
|
|
2518
|
+
onChange: (v) => x(a.id)
|
|
2519
|
+
}, null, 40, Fa),
|
|
2520
|
+
P("span", Ea, [
|
|
2521
|
+
ke(q(d(ze)(a)) + " ", 1),
|
|
2522
|
+
G(tt, {
|
|
2523
|
+
loading: d(c)(a.id),
|
|
2524
|
+
error: d(w)(a.id),
|
|
2525
|
+
unavailable: !d(p)(a)
|
|
2499
2526
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2500
2527
|
])
|
|
2501
|
-
], 2)) : (m(),
|
|
2528
|
+
], 2)) : (m(), $("div", {
|
|
2502
2529
|
key: 1,
|
|
2503
|
-
class:
|
|
2504
|
-
"layer-unavailable": !d(
|
|
2505
|
-
"layer-error": d(
|
|
2530
|
+
class: ne(["layer-label-only", {
|
|
2531
|
+
"layer-unavailable": !d(p)(a),
|
|
2532
|
+
"layer-error": d(w)(a.id)
|
|
2506
2533
|
}])
|
|
2507
2534
|
}, [
|
|
2508
|
-
P("span",
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
loading: d(
|
|
2512
|
-
error: d(
|
|
2513
|
-
unavailable: !d(
|
|
2535
|
+
P("span", Ia, [
|
|
2536
|
+
ke(q(d(ze)(a)) + " ", 1),
|
|
2537
|
+
G(tt, {
|
|
2538
|
+
loading: d(c)(a.id),
|
|
2539
|
+
error: d(w)(a.id),
|
|
2540
|
+
unavailable: !d(p)(a)
|
|
2514
2541
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2515
2542
|
])
|
|
2516
2543
|
], 2)),
|
|
2517
|
-
d(Bt)(
|
|
2544
|
+
d(Bt)(a, e.showOpacity) && d(r)(a.id) && d(p)(a) ? (m(), j(gt, {
|
|
2518
2545
|
key: 2,
|
|
2519
|
-
"layer-id":
|
|
2520
|
-
"layer-name": d(
|
|
2521
|
-
opacity: d(
|
|
2522
|
-
"onUpdate:opacity": (
|
|
2523
|
-
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) :
|
|
2524
|
-
d(
|
|
2546
|
+
"layer-id": a.id,
|
|
2547
|
+
"layer-name": d(ze)(a),
|
|
2548
|
+
opacity: d(n)(a.id),
|
|
2549
|
+
"onUpdate:opacity": (v) => o("setOpacity", a.id, v)
|
|
2550
|
+
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : R("", !0),
|
|
2551
|
+
d(Vt)(a, e.showLegend) && d(r)(a.id) && d(p)(a) && a.legend?.length ? (m(), j(vt, {
|
|
2525
2552
|
key: 3,
|
|
2526
|
-
items:
|
|
2527
|
-
label: "Legend for " + d(
|
|
2528
|
-
}, null, 8, ["items", "label"])) :
|
|
2553
|
+
items: a.legend,
|
|
2554
|
+
label: "Legend for " + d(ze)(a)
|
|
2555
|
+
}, null, 8, ["items", "label"])) : R("", !0)
|
|
2529
2556
|
]))), 128)),
|
|
2530
|
-
e.layers.length === 0 ? (m(),
|
|
2531
|
-
], 8,
|
|
2557
|
+
e.layers.length === 0 ? (m(), $("div", Oa, "No layers available")) : R("", !0)
|
|
2558
|
+
], 8, Ta));
|
|
2532
2559
|
}
|
|
2533
|
-
}),
|
|
2560
|
+
}), Ha = /* @__PURE__ */ xe(za, [["__scopeId", "data-v-bfcd7855"]]), Da = ["aria-label"], _a = ["name", "checked", "disabled", "onChange"], Ra = { class: "layer-title" }, Aa = {
|
|
2534
2561
|
key: 0,
|
|
2535
2562
|
class: "empty-state"
|
|
2536
|
-
},
|
|
2563
|
+
}, Za = /* @__PURE__ */ pe({
|
|
2537
2564
|
__name: "LayerRadioButtonSet",
|
|
2538
2565
|
props: {
|
|
2539
2566
|
layers: {},
|
|
@@ -2548,259 +2575,259 @@ const $a = ["aria-label"], Ma = ["checked", "disabled", "onChange"], Pa = { clas
|
|
|
2548
2575
|
groupLabel: { default: void 0 }
|
|
2549
2576
|
},
|
|
2550
2577
|
emits: ["selectLayer", "setOpacity"],
|
|
2551
|
-
setup(e, { emit:
|
|
2552
|
-
const l = e, o =
|
|
2578
|
+
setup(e, { emit: i }) {
|
|
2579
|
+
const l = e, o = i, { isVisible: r, getLayerOpacity: n, isLayerLoading: c, getLayerError: w, isLayerAvailableAtZoom: p } = bt(
|
|
2553
2580
|
() => l
|
|
2554
2581
|
);
|
|
2555
|
-
function
|
|
2556
|
-
const
|
|
2557
|
-
o("selectLayer",
|
|
2582
|
+
function x(h) {
|
|
2583
|
+
const g = l.layers.filter((a) => l.visibleLayerIds.has(a.id) && a.id !== h).map((a) => a.id);
|
|
2584
|
+
o("selectLayer", h, g);
|
|
2558
2585
|
}
|
|
2559
|
-
return (
|
|
2586
|
+
return (h, g) => (m(), $("div", {
|
|
2560
2587
|
class: "layer-radio-set",
|
|
2561
2588
|
role: "radiogroup",
|
|
2562
2589
|
"aria-label": e.groupLabel
|
|
2563
2590
|
}, [
|
|
2564
|
-
(m(!0),
|
|
2565
|
-
key:
|
|
2591
|
+
(m(!0), $(se, null, ge(e.layers, (a) => (m(), $("div", {
|
|
2592
|
+
key: a.id,
|
|
2566
2593
|
class: "layer-item"
|
|
2567
2594
|
}, [
|
|
2568
2595
|
P("label", {
|
|
2569
|
-
class:
|
|
2570
|
-
"layer-unavailable": !d(
|
|
2571
|
-
"layer-error": d(
|
|
2596
|
+
class: ne(["layer-radio", {
|
|
2597
|
+
"layer-unavailable": !d(p)(a),
|
|
2598
|
+
"layer-error": d(w)(a.id)
|
|
2572
2599
|
}])
|
|
2573
2600
|
}, [
|
|
2574
2601
|
P("input", {
|
|
2575
2602
|
type: "radio",
|
|
2576
2603
|
name: e.groupName,
|
|
2577
|
-
checked: d(
|
|
2578
|
-
disabled: !d(
|
|
2579
|
-
onChange: (
|
|
2580
|
-
}, null, 40,
|
|
2581
|
-
P("span",
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
loading: d(
|
|
2585
|
-
error: d(
|
|
2586
|
-
unavailable: !d(
|
|
2604
|
+
checked: d(r)(a.id),
|
|
2605
|
+
disabled: !d(p)(a),
|
|
2606
|
+
onChange: (v) => x(a.id)
|
|
2607
|
+
}, null, 40, _a),
|
|
2608
|
+
P("span", Ra, [
|
|
2609
|
+
ke(q(d(ze)(a)) + " ", 1),
|
|
2610
|
+
G(tt, {
|
|
2611
|
+
loading: d(c)(a.id),
|
|
2612
|
+
error: d(w)(a.id),
|
|
2613
|
+
unavailable: !d(p)(a)
|
|
2587
2614
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2588
2615
|
])
|
|
2589
2616
|
], 2),
|
|
2590
|
-
d(Bt)(
|
|
2617
|
+
d(Bt)(a, e.showOpacity) && d(r)(a.id) && d(p)(a) ? (m(), j(gt, {
|
|
2591
2618
|
key: 0,
|
|
2592
|
-
"layer-id":
|
|
2593
|
-
"layer-name": d(
|
|
2594
|
-
opacity: d(
|
|
2595
|
-
"onUpdate:opacity": (
|
|
2596
|
-
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) :
|
|
2597
|
-
d(
|
|
2619
|
+
"layer-id": a.id,
|
|
2620
|
+
"layer-name": d(ze)(a),
|
|
2621
|
+
opacity: d(n)(a.id),
|
|
2622
|
+
"onUpdate:opacity": (v) => o("setOpacity", a.id, v)
|
|
2623
|
+
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : R("", !0),
|
|
2624
|
+
d(Vt)(a, e.showLegend) && d(r)(a.id) && d(p)(a) && a.legend?.length ? (m(), j(vt, {
|
|
2598
2625
|
key: 1,
|
|
2599
|
-
items:
|
|
2600
|
-
label: "Legend for " + d(
|
|
2601
|
-
}, null, 8, ["items", "label"])) :
|
|
2626
|
+
items: a.legend,
|
|
2627
|
+
label: "Legend for " + d(ze)(a)
|
|
2628
|
+
}, null, 8, ["items", "label"])) : R("", !0)
|
|
2602
2629
|
]))), 128)),
|
|
2603
|
-
e.layers.length === 0 ? (m(),
|
|
2604
|
-
], 8,
|
|
2630
|
+
e.layers.length === 0 ? (m(), $("div", Aa, "No layers available")) : R("", !0)
|
|
2631
|
+
], 8, Da));
|
|
2605
2632
|
}
|
|
2606
|
-
}),
|
|
2607
|
-
function
|
|
2608
|
-
const
|
|
2609
|
-
if (!
|
|
2610
|
-
return
|
|
2611
|
-
const
|
|
2612
|
-
return
|
|
2613
|
-
}),
|
|
2614
|
-
config:
|
|
2615
|
-
component:
|
|
2633
|
+
}), Ja = /* @__PURE__ */ xe(Za, [["__scopeId", "data-v-c368d815"]]);
|
|
2634
|
+
function Ka(e) {
|
|
2635
|
+
const i = k([]), l = k(/* @__PURE__ */ new Set()), o = k({}), r = k(/* @__PURE__ */ new Set()), n = k({}), c = k(""), w = k(!1), p = k(!1), x = k(null), h = z(() => {
|
|
2636
|
+
if (!c.value.trim())
|
|
2637
|
+
return i.value;
|
|
2638
|
+
const T = c.value.toLowerCase();
|
|
2639
|
+
return i.value.filter((I) => I.title.toLowerCase().includes(T));
|
|
2640
|
+
}), g = z(() => i.value.map((T) => ({
|
|
2641
|
+
config: T,
|
|
2642
|
+
component: T.type
|
|
2616
2643
|
// "circle", "fill", or "line"
|
|
2617
2644
|
})));
|
|
2618
|
-
async function
|
|
2619
|
-
if (!
|
|
2620
|
-
|
|
2645
|
+
async function a() {
|
|
2646
|
+
if (!p.value) {
|
|
2647
|
+
w.value = !0, x.value = null;
|
|
2621
2648
|
try {
|
|
2622
|
-
let
|
|
2623
|
-
e.mode === "dynamic" || !e.mode ? e.webMapId ?
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
}), o.value =
|
|
2628
|
-
} catch (
|
|
2629
|
-
|
|
2649
|
+
let T;
|
|
2650
|
+
e.mode === "dynamic" || !e.mode ? e.webMapId ? T = await v(e.webMapId) : T = await ht() : T = await ht(), i.value = T;
|
|
2651
|
+
const I = {};
|
|
2652
|
+
T.forEach((_) => {
|
|
2653
|
+
I[_.id] = _.opacity ?? 1;
|
|
2654
|
+
}), o.value = I, p.value = !0;
|
|
2655
|
+
} catch (T) {
|
|
2656
|
+
x.value = T instanceof Error ? T : new Error("Failed to initialize layerboard");
|
|
2630
2657
|
} finally {
|
|
2631
|
-
|
|
2658
|
+
w.value = !1;
|
|
2632
2659
|
}
|
|
2633
2660
|
}
|
|
2634
2661
|
}
|
|
2635
|
-
async function
|
|
2636
|
-
const
|
|
2637
|
-
if (!
|
|
2638
|
-
throw new Error(`Failed to fetch WebMap: ${
|
|
2639
|
-
const
|
|
2640
|
-
return
|
|
2662
|
+
async function v(T) {
|
|
2663
|
+
const I = Lt(T), _ = await fetch(I, { cache: "no-store" });
|
|
2664
|
+
if (!_.ok)
|
|
2665
|
+
throw new Error(`Failed to fetch WebMap: ${_.status} ${_.statusText}`);
|
|
2666
|
+
const te = await _.json();
|
|
2667
|
+
return Zt(te);
|
|
2641
2668
|
}
|
|
2642
|
-
function
|
|
2643
|
-
const
|
|
2644
|
-
|
|
2669
|
+
function f(T) {
|
|
2670
|
+
const I = new Set(l.value);
|
|
2671
|
+
I.has(T) ? I.delete(T) : I.add(T), l.value = I;
|
|
2645
2672
|
}
|
|
2646
|
-
function L(
|
|
2673
|
+
function L(T, I) {
|
|
2647
2674
|
o.value = {
|
|
2648
2675
|
...o.value,
|
|
2649
|
-
[
|
|
2676
|
+
[T]: Math.max(0, Math.min(1, I))
|
|
2650
2677
|
};
|
|
2651
2678
|
}
|
|
2652
|
-
function
|
|
2653
|
-
|
|
2679
|
+
function S(T) {
|
|
2680
|
+
c.value = T;
|
|
2654
2681
|
}
|
|
2655
|
-
function T
|
|
2656
|
-
const
|
|
2657
|
-
|
|
2682
|
+
function E(T, I) {
|
|
2683
|
+
const _ = new Set(r.value);
|
|
2684
|
+
I ? _.add(T) : _.delete(T), r.value = _;
|
|
2658
2685
|
}
|
|
2659
|
-
function
|
|
2660
|
-
if (
|
|
2661
|
-
|
|
2686
|
+
function D(T, I) {
|
|
2687
|
+
if (I)
|
|
2688
|
+
n.value = { ...n.value, [T]: I };
|
|
2662
2689
|
else {
|
|
2663
|
-
const
|
|
2664
|
-
delete
|
|
2690
|
+
const _ = { ...n.value };
|
|
2691
|
+
delete _[T], n.value = _;
|
|
2665
2692
|
}
|
|
2666
2693
|
}
|
|
2667
|
-
function
|
|
2668
|
-
|
|
2694
|
+
function K() {
|
|
2695
|
+
i.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, c.value = "", w.value = !1, p.value = !1, x.value = null;
|
|
2669
2696
|
}
|
|
2670
2697
|
return {
|
|
2671
2698
|
// State (readonly)
|
|
2672
|
-
layerConfigs:
|
|
2673
|
-
visibleLayers:
|
|
2674
|
-
layerOpacities:
|
|
2675
|
-
loadingLayers:
|
|
2676
|
-
layerErrors:
|
|
2677
|
-
searchQuery:
|
|
2678
|
-
isLoading:
|
|
2679
|
-
isInitialized:
|
|
2680
|
-
error:
|
|
2699
|
+
layerConfigs: W(i),
|
|
2700
|
+
visibleLayers: W(l),
|
|
2701
|
+
layerOpacities: W(o),
|
|
2702
|
+
loadingLayers: W(r),
|
|
2703
|
+
layerErrors: W(n),
|
|
2704
|
+
searchQuery: W(c),
|
|
2705
|
+
isLoading: W(w),
|
|
2706
|
+
isInitialized: W(p),
|
|
2707
|
+
error: W(x),
|
|
2681
2708
|
// Computed
|
|
2682
|
-
filteredLayerConfigs:
|
|
2683
|
-
layerList:
|
|
2709
|
+
filteredLayerConfigs: h,
|
|
2710
|
+
layerList: g,
|
|
2684
2711
|
// Config
|
|
2685
2712
|
config: e,
|
|
2686
2713
|
// Methods
|
|
2687
|
-
initialize:
|
|
2688
|
-
toggleLayer:
|
|
2714
|
+
initialize: a,
|
|
2715
|
+
toggleLayer: f,
|
|
2689
2716
|
setLayerOpacity: L,
|
|
2690
|
-
filterLayers:
|
|
2691
|
-
setLayerLoading:
|
|
2692
|
-
setLayerError:
|
|
2693
|
-
reset:
|
|
2717
|
+
filterLayers: S,
|
|
2718
|
+
setLayerLoading: E,
|
|
2719
|
+
setLayerError: D,
|
|
2720
|
+
reset: K
|
|
2694
2721
|
};
|
|
2695
2722
|
}
|
|
2696
|
-
function
|
|
2697
|
-
const e =
|
|
2698
|
-
function o(
|
|
2699
|
-
|
|
2723
|
+
function Qa() {
|
|
2724
|
+
const e = k([]), i = k(/* @__PURE__ */ new Set()), l = k(/* @__PURE__ */ new Set());
|
|
2725
|
+
function o(n) {
|
|
2726
|
+
i.value.has(n) ? i.value.delete(n) : i.value.add(n);
|
|
2700
2727
|
}
|
|
2701
|
-
function n
|
|
2702
|
-
e.value =
|
|
2728
|
+
function r(n) {
|
|
2729
|
+
e.value = n;
|
|
2703
2730
|
}
|
|
2704
2731
|
return {
|
|
2705
|
-
layers:
|
|
2706
|
-
visibleLayerIds:
|
|
2707
|
-
loadingLayerIds:
|
|
2732
|
+
layers: z(() => e.value),
|
|
2733
|
+
visibleLayerIds: z(() => i.value),
|
|
2734
|
+
loadingLayerIds: z(() => l.value),
|
|
2708
2735
|
toggleLayer: o,
|
|
2709
|
-
setLayers:
|
|
2736
|
+
setLayers: r
|
|
2710
2737
|
};
|
|
2711
2738
|
}
|
|
2712
|
-
function
|
|
2713
|
-
const
|
|
2714
|
-
async function
|
|
2739
|
+
function Ba(e) {
|
|
2740
|
+
const i = k(null), l = k(!1), o = k(null), r = k(0);
|
|
2741
|
+
async function n(p = {}) {
|
|
2715
2742
|
l.value = !0, o.value = null;
|
|
2716
|
-
const
|
|
2717
|
-
let
|
|
2743
|
+
const x = e.pageSize || 2e3;
|
|
2744
|
+
let h = 0, g = [], a = !0;
|
|
2718
2745
|
try {
|
|
2719
|
-
for (;
|
|
2720
|
-
const
|
|
2721
|
-
let
|
|
2722
|
-
if (
|
|
2723
|
-
const
|
|
2724
|
-
xmin:
|
|
2725
|
-
ymin:
|
|
2726
|
-
xmax:
|
|
2727
|
-
ymax:
|
|
2746
|
+
for (; a; ) {
|
|
2747
|
+
const f = e.url.replace(/\/$/, ""), L = encodeURIComponent(p.where || e.where || "1=1");
|
|
2748
|
+
let S = `${f}/query?where=${L}&outFields=*&returnGeometry=true&resultRecordCount=${x}&resultOffset=${h}&f=geojson`;
|
|
2749
|
+
if (p.bounds) {
|
|
2750
|
+
const K = JSON.stringify({
|
|
2751
|
+
xmin: p.bounds.west,
|
|
2752
|
+
ymin: p.bounds.south,
|
|
2753
|
+
xmax: p.bounds.east,
|
|
2754
|
+
ymax: p.bounds.north,
|
|
2728
2755
|
spatialReference: { wkid: 4326 }
|
|
2729
2756
|
});
|
|
2730
|
-
|
|
2757
|
+
S += `&geometry=${encodeURIComponent(K)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
|
|
2731
2758
|
}
|
|
2732
|
-
const
|
|
2733
|
-
if (!
|
|
2734
|
-
throw new Error(`HTTP ${
|
|
2735
|
-
const
|
|
2736
|
-
|
|
2759
|
+
const E = await fetch(S);
|
|
2760
|
+
if (!E.ok)
|
|
2761
|
+
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
2762
|
+
const D = await E.json();
|
|
2763
|
+
D.features && D.features.length > 0 ? (g = g.concat(D.features), h += D.features.length, a = D.features.length === x) : a = !1;
|
|
2737
2764
|
}
|
|
2738
|
-
const
|
|
2765
|
+
const v = {
|
|
2739
2766
|
type: "FeatureCollection",
|
|
2740
|
-
features:
|
|
2767
|
+
features: g
|
|
2741
2768
|
};
|
|
2742
|
-
return
|
|
2743
|
-
} catch (
|
|
2744
|
-
const
|
|
2745
|
-
throw o.value =
|
|
2769
|
+
return i.value = v, r.value = g.length, v;
|
|
2770
|
+
} catch (v) {
|
|
2771
|
+
const f = v instanceof Error ? v : new Error("Failed to fetch features");
|
|
2772
|
+
throw o.value = f, f;
|
|
2746
2773
|
} finally {
|
|
2747
2774
|
l.value = !1;
|
|
2748
2775
|
}
|
|
2749
2776
|
}
|
|
2750
|
-
function
|
|
2751
|
-
|
|
2777
|
+
function c() {
|
|
2778
|
+
i.value = null, r.value = 0, o.value = null;
|
|
2752
2779
|
}
|
|
2753
|
-
async function
|
|
2754
|
-
return
|
|
2780
|
+
async function w(p = {}) {
|
|
2781
|
+
return n(p);
|
|
2755
2782
|
}
|
|
2756
2783
|
return {
|
|
2757
2784
|
// State (readonly)
|
|
2758
|
-
data:
|
|
2759
|
-
isLoading:
|
|
2760
|
-
error:
|
|
2761
|
-
totalFeatures:
|
|
2785
|
+
data: W(i),
|
|
2786
|
+
isLoading: W(l),
|
|
2787
|
+
error: W(o),
|
|
2788
|
+
totalFeatures: W(r),
|
|
2762
2789
|
// Config
|
|
2763
2790
|
config: e,
|
|
2764
2791
|
// Methods
|
|
2765
|
-
fetch:
|
|
2766
|
-
refetch:
|
|
2767
|
-
clear:
|
|
2792
|
+
fetch: n,
|
|
2793
|
+
refetch: w,
|
|
2794
|
+
clear: c
|
|
2768
2795
|
};
|
|
2769
2796
|
}
|
|
2770
|
-
function
|
|
2771
|
-
const o =
|
|
2772
|
-
return
|
|
2773
|
-
|
|
2774
|
-
async (
|
|
2775
|
-
if (
|
|
2776
|
-
const
|
|
2777
|
-
await o.fetch(
|
|
2797
|
+
function Xa(e, i, l) {
|
|
2798
|
+
const o = Ba(e);
|
|
2799
|
+
return Oe(
|
|
2800
|
+
i,
|
|
2801
|
+
async (r) => {
|
|
2802
|
+
if (r) {
|
|
2803
|
+
const n = l(r);
|
|
2804
|
+
await o.fetch(n);
|
|
2778
2805
|
}
|
|
2779
2806
|
},
|
|
2780
2807
|
{ immediate: !0 }
|
|
2781
2808
|
), o;
|
|
2782
2809
|
}
|
|
2783
2810
|
export {
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2811
|
+
Ha as LayerCheckboxSet,
|
|
2812
|
+
qo as LayerPanel,
|
|
2813
|
+
Ja as LayerRadioButtonSet,
|
|
2814
|
+
qa as Layerboard,
|
|
2815
|
+
io as MapPanel,
|
|
2816
|
+
Ga as TopicAccordion,
|
|
2817
|
+
Wa as WEBMAP_ID,
|
|
2818
|
+
Lt as buildWebMapUrl,
|
|
2819
|
+
ra as clearCache,
|
|
2820
|
+
ht as getLayerConfigs,
|
|
2821
|
+
ze as getLayerDisplayName,
|
|
2822
|
+
ja as getWebMapUrl,
|
|
2823
|
+
Rt as normalizeUrl,
|
|
2824
|
+
Pa as shouldShowCheckbox,
|
|
2825
|
+
Vt as shouldShowLegendBox,
|
|
2799
2826
|
Bt as shouldShowSlider,
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2827
|
+
Zt as transformWebMapToLayerConfigs,
|
|
2828
|
+
da as useApiDataSources,
|
|
2829
|
+
Ba as useDataSource,
|
|
2830
|
+
Qa as useLayerConfig,
|
|
2831
|
+
Ka as useLayerboard,
|
|
2832
|
+
Xa as useReactiveDataSource
|
|
2806
2833
|
};
|