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