@phila/layerboard 3.0.0-beta.12 → 3.0.0-beta.13
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 +460 -453
- package/dist/layerboard.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Se, ref as C, watch as Te, computed as I, onMounted as Je, onUnmounted as
|
|
1
|
+
import { defineComponent as Se, ref as C, watch as Te, computed as I, onMounted as Je, onUnmounted as _t, createElementBlock as m, openBlock as d, createVNode as Q, unref as O, withCtx as Ne, createBlock as ee, createCommentVNode as z, Fragment as oe, renderList as re, useAttrs as zt, toRef as Ft, normalizeClass as ae, createElementVNode as x, toDisplayString as V, renderSlot as ce, withDirectives as Et, mergeProps as dt, vModelDynamic as Ot, createTextVNode as me, normalizeProps as mt, guardReactiveProps as vt, withModifiers as It, normalizeStyle as H, readonly as j, provide as W, onBeforeUnmount as Rt, nextTick as Ae, useId as bt, resolveComponent as Dt, vShow as Zt } from "vue";
|
|
2
2
|
import { Map as Bt, DrawTool as At, RasterLayer as wt, CircleLayer as Lt, FillLayer as Nt, LineLayer as ct, MapMarker as Vt, MapPopup as Ut } from "@phila/phila-ui-map-core";
|
|
3
3
|
import { cn as ft, Icon as ge, BaseLink as Wt, ActionContent as St } from "@phila/phila-ui-core";
|
|
4
4
|
function Xe(e, i, t = {}) {
|
|
@@ -6,15 +6,15 @@ function Xe(e, i, t = {}) {
|
|
|
6
6
|
return (t.id === 0 || t.id) && (o.id = t.id), t.bbox && (o.bbox = t.bbox), o.properties = i || {}, o.geometry = e, o;
|
|
7
7
|
}
|
|
8
8
|
function jt(e, i, t = {}) {
|
|
9
|
-
for (const
|
|
10
|
-
if (
|
|
9
|
+
for (const n of e) {
|
|
10
|
+
if (n.length < 4)
|
|
11
11
|
throw new Error(
|
|
12
12
|
"Each LinearRing of a Polygon must have 4 or more Positions."
|
|
13
13
|
);
|
|
14
|
-
if (
|
|
14
|
+
if (n[n.length - 1].length !== n[0].length)
|
|
15
15
|
throw new Error("First and last Position are not equivalent.");
|
|
16
|
-
for (let l = 0; l <
|
|
17
|
-
if (
|
|
16
|
+
for (let l = 0; l < n[n.length - 1].length; l++)
|
|
17
|
+
if (n[n.length - 1][l] !== n[0][l])
|
|
18
18
|
throw new Error("First and last Position are not equivalent.");
|
|
19
19
|
}
|
|
20
20
|
return Xe({
|
|
@@ -46,27 +46,27 @@ function Kt(e) {
|
|
|
46
46
|
return e.type === "Feature" ? e.geometry : e;
|
|
47
47
|
}
|
|
48
48
|
function Jt(e, i, t) {
|
|
49
|
-
var o = e.length,
|
|
50
|
-
let
|
|
49
|
+
var o = e.length, n = ze(e[0], i), l = [], u, b, y;
|
|
50
|
+
let P, v;
|
|
51
51
|
for (t || (t = []), u = 1; u < o; u++) {
|
|
52
|
-
for (
|
|
53
|
-
if (
|
|
54
|
-
if (
|
|
52
|
+
for (P = e[u - 1], v = e[u], b = y = ze(v, i); ; )
|
|
53
|
+
if (n | b) {
|
|
54
|
+
if (n & b)
|
|
55
55
|
break;
|
|
56
|
-
|
|
56
|
+
n ? (P = pt(P, v, n, i), n = ze(P, i)) : (v = pt(P, v, b, i), b = ze(v, i));
|
|
57
57
|
} else {
|
|
58
|
-
l.push(
|
|
58
|
+
l.push(P), b !== y ? (l.push(v), u < o - 1 && (t.push(l), l = [])) : u === o - 1 && l.push(v);
|
|
59
59
|
break;
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
n = y;
|
|
62
62
|
}
|
|
63
63
|
return l.length && t.push(l), t;
|
|
64
64
|
}
|
|
65
65
|
function Qt(e, i) {
|
|
66
|
-
var t, o,
|
|
66
|
+
var t, o, n, l, u, b, y;
|
|
67
67
|
for (o = 1; o <= 8; o *= 2) {
|
|
68
|
-
for (t = [],
|
|
69
|
-
b = e[u], y = !(ze(b, i) & o), y !== l && t.push(pt(
|
|
68
|
+
for (t = [], n = e[e.length - 1], l = !(ze(n, i) & o), u = 0; u < e.length; u++)
|
|
69
|
+
b = e[u], y = !(ze(b, i) & o), y !== l && t.push(pt(n, b, o, i)), y && t.push(b), n = b, l = y;
|
|
70
70
|
if (e = t, !e.length) break;
|
|
71
71
|
}
|
|
72
72
|
return t;
|
|
@@ -79,7 +79,7 @@ function ze(e, i) {
|
|
|
79
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
80
|
}
|
|
81
81
|
function Xt(e, i) {
|
|
82
|
-
const t = Kt(e), o = t.type,
|
|
82
|
+
const t = Kt(e), o = t.type, n = e.type === "Feature" ? e.properties : {};
|
|
83
83
|
let l = t.coordinates;
|
|
84
84
|
switch (o) {
|
|
85
85
|
case "LineString":
|
|
@@ -87,14 +87,14 @@ function Xt(e, i) {
|
|
|
87
87
|
const u = [];
|
|
88
88
|
return o === "LineString" && (l = [l]), l.forEach((b) => {
|
|
89
89
|
Jt(b, i, u);
|
|
90
|
-
}), u.length === 1 ? qt(u[0],
|
|
90
|
+
}), u.length === 1 ? qt(u[0], n) : Gt(u, n);
|
|
91
91
|
}
|
|
92
92
|
case "Polygon":
|
|
93
|
-
return jt(kt(l, i),
|
|
93
|
+
return jt(kt(l, i), n);
|
|
94
94
|
case "MultiPolygon":
|
|
95
95
|
return Ht(
|
|
96
96
|
l.map((u) => kt(u, i)),
|
|
97
|
-
|
|
97
|
+
n
|
|
98
98
|
);
|
|
99
99
|
default:
|
|
100
100
|
throw new Error("geometry " + o + " not supported");
|
|
@@ -103,8 +103,8 @@ function Xt(e, i) {
|
|
|
103
103
|
function kt(e, i) {
|
|
104
104
|
const t = [];
|
|
105
105
|
for (const o of e) {
|
|
106
|
-
const
|
|
107
|
-
|
|
106
|
+
const n = Qt(o, i);
|
|
107
|
+
n.length > 0 && ((n[0][0] !== n[n.length - 1][0] || n[0][1] !== n[n.length - 1][1]) && n.push(n[0]), n.length >= 4 && t.push(n));
|
|
108
108
|
}
|
|
109
109
|
return t;
|
|
110
110
|
}
|
|
@@ -132,17 +132,17 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
132
132
|
},
|
|
133
133
|
emits: ["zoom", "layerLoading", "layerError"],
|
|
134
134
|
setup(e, { emit: i }) {
|
|
135
|
-
const t = e, o = i,
|
|
136
|
-
function b(
|
|
137
|
-
o("zoom",
|
|
135
|
+
const t = e, o = i, n = C(null), l = C(null), u = C(0);
|
|
136
|
+
function b(a) {
|
|
137
|
+
o("zoom", a), l.value && (u.value = y(l.value));
|
|
138
138
|
}
|
|
139
|
-
function y(
|
|
140
|
-
const p =
|
|
141
|
-
return
|
|
139
|
+
function y(a) {
|
|
140
|
+
const p = a.getZoom(), E = a.getCenter().lat, _ = 559082264028e-3, M = E * Math.PI / 180;
|
|
141
|
+
return _ * Math.cos(M) / Math.pow(2, p);
|
|
142
142
|
}
|
|
143
|
-
const
|
|
144
|
-
async function h(
|
|
145
|
-
const
|
|
143
|
+
const P = C({}), v = C(null), k = C(/* @__PURE__ */ new Set()), r = ["fema-100-year-floodplain", "fema-500-year-floodplain"];
|
|
144
|
+
async function h(a, p, s, E) {
|
|
145
|
+
const _ = encodeURIComponent(E || "1=1"), M = JSON.stringify({
|
|
146
146
|
xmin: p.west,
|
|
147
147
|
ymin: p.south,
|
|
148
148
|
xmax: p.east,
|
|
@@ -151,7 +151,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
151
151
|
}), R = 2e3;
|
|
152
152
|
let N = 0, U = [], Y = !0;
|
|
153
153
|
for (; Y; ) {
|
|
154
|
-
const G = `${
|
|
154
|
+
const G = `${a}/query?where=${_}&geometry=${encodeURIComponent(M)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${R}&resultOffset=${N}&f=geojson`, Z = await fetch(G);
|
|
155
155
|
if (!Z.ok)
|
|
156
156
|
throw new Error(`HTTP ${Z.status}: ${Z.statusText}`);
|
|
157
157
|
const J = await Z.json();
|
|
@@ -174,14 +174,14 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
174
174
|
features: U
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
async function w(
|
|
177
|
+
async function w(a, p) {
|
|
178
178
|
const s = p.map(async (E) => {
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
179
|
+
const _ = t.layerList.find((M) => M.config.id === E)?.config;
|
|
180
|
+
if (_) {
|
|
181
181
|
o("layerLoading", E, !0);
|
|
182
182
|
try {
|
|
183
|
-
const M = await h(
|
|
184
|
-
|
|
183
|
+
const M = await h(_.url, a, E, _.where);
|
|
184
|
+
P.value = { ...P.value, [E]: M }, o("layerError", E, null);
|
|
185
185
|
} catch (M) {
|
|
186
186
|
const R = M instanceof Error ? M.message : "Failed to load";
|
|
187
187
|
o("layerError", E, R);
|
|
@@ -192,84 +192,84 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
192
192
|
});
|
|
193
193
|
await Promise.all(s);
|
|
194
194
|
}
|
|
195
|
-
async function g(
|
|
195
|
+
async function g(a) {
|
|
196
196
|
const p = [...t.visibleLayers];
|
|
197
|
-
await w(
|
|
197
|
+
await w(a, p);
|
|
198
198
|
}
|
|
199
|
-
function f(
|
|
200
|
-
v.value =
|
|
199
|
+
function f(a) {
|
|
200
|
+
v.value = a.bounds, g(a.bounds);
|
|
201
201
|
}
|
|
202
|
-
function c(
|
|
203
|
-
l.value =
|
|
204
|
-
const p =
|
|
202
|
+
function c(a) {
|
|
203
|
+
l.value = a;
|
|
204
|
+
const p = a.getBounds();
|
|
205
205
|
v.value = {
|
|
206
206
|
west: p.getWest(),
|
|
207
207
|
south: p.getSouth(),
|
|
208
208
|
east: p.getEast(),
|
|
209
209
|
north: p.getNorth()
|
|
210
210
|
};
|
|
211
|
-
const s =
|
|
212
|
-
o("zoom", s), u.value = y(
|
|
211
|
+
const s = a.getZoom();
|
|
212
|
+
o("zoom", s), u.value = y(a), g(v.value);
|
|
213
213
|
}
|
|
214
214
|
Te(
|
|
215
215
|
() => t.visibleLayers.size,
|
|
216
216
|
async () => {
|
|
217
217
|
if (ie.value.length > 0 && $e(), v.value) {
|
|
218
|
-
const
|
|
218
|
+
const a = new Set(t.visibleLayers), p = [...a].filter(
|
|
219
219
|
(s) => !k.value.has(s)
|
|
220
220
|
);
|
|
221
|
-
k.value = new Set(
|
|
221
|
+
k.value = new Set(a), p.length > 0 && await w(v.value, p);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
);
|
|
225
|
-
function S(
|
|
226
|
-
return t.visibleLayers.has(
|
|
225
|
+
function S(a) {
|
|
226
|
+
return t.visibleLayers.has(a);
|
|
227
227
|
}
|
|
228
|
-
function F(
|
|
229
|
-
return !!
|
|
228
|
+
function F(a) {
|
|
229
|
+
return !!P.value[a.id];
|
|
230
230
|
}
|
|
231
231
|
const T = I(
|
|
232
|
-
() => t.layerList.filter((
|
|
232
|
+
() => t.layerList.filter((a) => a.config.type === "circle" && S(a.config.id) && F(a.config)).map((a) => a.config)
|
|
233
233
|
), A = I(
|
|
234
|
-
() => t.layerList.filter((
|
|
234
|
+
() => t.layerList.filter((a) => a.config.type === "fill" && S(a.config.id) && F(a.config)).map((a) => a.config)
|
|
235
235
|
), q = I(
|
|
236
|
-
() => t.layerList.filter((
|
|
236
|
+
() => t.layerList.filter((a) => a.config.type === "fill" && a.config.outlinePaint && S(a.config.id) && F(a.config)).map((a) => a.config)
|
|
237
237
|
), fe = I(
|
|
238
|
-
() => t.layerList.filter((
|
|
238
|
+
() => t.layerList.filter((a) => a.config.type === "line" && S(a.config.id) && F(a.config)).map((a) => a.config)
|
|
239
239
|
);
|
|
240
|
-
function
|
|
241
|
-
return t.visibleTiledLayers?.has(
|
|
240
|
+
function Pe(a) {
|
|
241
|
+
return t.visibleTiledLayers?.has(a) ?? !1;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
return t.tiledLayerOpacities?.[
|
|
243
|
+
function _e(a) {
|
|
244
|
+
return t.tiledLayerOpacities?.[a] ?? 1;
|
|
245
245
|
}
|
|
246
|
-
function et(
|
|
247
|
-
return `${
|
|
246
|
+
function et(a) {
|
|
247
|
+
return `${a.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
|
|
248
248
|
}
|
|
249
|
-
function tt(
|
|
249
|
+
function tt(a) {
|
|
250
250
|
return {
|
|
251
251
|
type: "raster",
|
|
252
|
-
tiles: [et(
|
|
252
|
+
tiles: [et(a.url)],
|
|
253
253
|
tileSize: 256,
|
|
254
|
-
attribution:
|
|
254
|
+
attribution: a.attribution || ""
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
const Ie = C({}), Ue = C(/* @__PURE__ */ new Set());
|
|
258
|
-
async function Re(
|
|
259
|
-
if (!Ue.value.has(
|
|
260
|
-
Ue.value.add(
|
|
258
|
+
async function Re(a) {
|
|
259
|
+
if (!Ue.value.has(a.id)) {
|
|
260
|
+
Ue.value.add(a.id);
|
|
261
261
|
try {
|
|
262
|
-
const p =
|
|
262
|
+
const p = a.url.replace(/\/$/, ""), s = await fetch(`${p}?f=json`);
|
|
263
263
|
if (!s.ok)
|
|
264
264
|
return;
|
|
265
265
|
const E = await s.json();
|
|
266
|
-
let
|
|
266
|
+
let _ = E.minScale || 0, M = E.maxScale || 0;
|
|
267
267
|
if (E.layers && E.layers.length > 0)
|
|
268
268
|
for (const R of E.layers)
|
|
269
269
|
R.maxScale && R.maxScale > 0 && (M === 0 || R.maxScale < M) && (M = R.maxScale);
|
|
270
270
|
M === 0 && (M = 72e3), Ie.value = {
|
|
271
271
|
...Ie.value,
|
|
272
|
-
[
|
|
272
|
+
[a.id]: { minScale: _, maxScale: M }
|
|
273
273
|
};
|
|
274
274
|
} catch {
|
|
275
275
|
}
|
|
@@ -277,81 +277,81 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
277
277
|
}
|
|
278
278
|
Je(() => {
|
|
279
279
|
if (t.tiledLayers)
|
|
280
|
-
for (const
|
|
281
|
-
|
|
280
|
+
for (const a of t.tiledLayers)
|
|
281
|
+
a.scaleBasedRendering && Re(a);
|
|
282
282
|
});
|
|
283
|
-
function We(
|
|
284
|
-
if (!
|
|
283
|
+
function We(a) {
|
|
284
|
+
if (!a.scaleBasedRendering)
|
|
285
285
|
return "tiled";
|
|
286
|
-
const p = Ie.value[
|
|
286
|
+
const p = Ie.value[a.id];
|
|
287
287
|
if (!p)
|
|
288
288
|
return "tiled";
|
|
289
289
|
const s = u.value;
|
|
290
290
|
return s === 0 || s > p.maxScale ? "tiled" : "dynamic";
|
|
291
291
|
}
|
|
292
|
-
const ot = I(() => t.tiledLayers ? t.tiledLayers.filter((
|
|
293
|
-
function Ee(
|
|
292
|
+
const ot = I(() => t.tiledLayers ? t.tiledLayers.filter((a) => Pe(a.id) ? a.scaleBasedRendering ? We(a) === "tiled" : !0 : !1) : []), at = I(() => t.tiledLayers ? t.tiledLayers.filter((a) => Pe(a.id) && a.scaleBasedRendering ? We(a) === "dynamic" : !1) : []);
|
|
293
|
+
function Ee(a) {
|
|
294
294
|
return {
|
|
295
295
|
type: "raster",
|
|
296
|
-
tiles: [`${
|
|
296
|
+
tiles: [`${a.url.replace(/\/$/, "")}/export?bbox={bbox-epsg-3857}&bboxSR=3857&imageSR=3857&size=256,256&format=png32&transparent=true&f=image`],
|
|
297
297
|
tileSize: 256,
|
|
298
|
-
attribution:
|
|
298
|
+
attribution: a.attribution || ""
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
function ve(
|
|
302
|
-
return { type: "geojson", data:
|
|
301
|
+
function ve(a) {
|
|
302
|
+
return { type: "geojson", data: P.value[a.id] };
|
|
303
303
|
}
|
|
304
|
-
function Me(
|
|
305
|
-
return t.layerOpacities[
|
|
304
|
+
function Me(a) {
|
|
305
|
+
return t.layerOpacities[a] ?? 1;
|
|
306
306
|
}
|
|
307
|
-
function be(
|
|
308
|
-
const p = Me(
|
|
309
|
-
if (
|
|
310
|
-
return { ...
|
|
311
|
-
const E =
|
|
307
|
+
function be(a) {
|
|
308
|
+
const p = Me(a.id), s = a.type === "circle" ? "circle-opacity" : a.type === "fill" ? "fill-opacity" : "line-opacity";
|
|
309
|
+
if (a.type === "fill" && a.paint["fill-opacity"] === 0)
|
|
310
|
+
return { ...a.paint, "fill-opacity": 0 };
|
|
311
|
+
const E = a.type === "circle" ? "circle-color" : a.type === "fill" ? "fill-color" : "line-color", _ = { ...a.paint }, M = _[E], R = _[s] === 1, N = typeof M == "string" && M.startsWith("rgba(");
|
|
312
312
|
if (R && N) {
|
|
313
313
|
if (p === 1)
|
|
314
|
-
return
|
|
314
|
+
return _;
|
|
315
315
|
{
|
|
316
316
|
const U = M.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
317
317
|
if (U && U[4]) {
|
|
318
318
|
const [, Y, G, Z, J] = U, st = parseFloat(J) * p;
|
|
319
|
-
|
|
319
|
+
_[E] = `rgba(${Y}, ${G}, ${Z}, ${st})`, _[s] = 1;
|
|
320
320
|
}
|
|
321
|
-
return
|
|
321
|
+
return _;
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
if (N) {
|
|
325
325
|
const U = M.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
326
326
|
if (U) {
|
|
327
327
|
const [, Y, G, Z] = U;
|
|
328
|
-
|
|
328
|
+
_[E] = `rgb(${Y}, ${G}, ${Z})`;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
return
|
|
331
|
+
return _[s] = p, _;
|
|
332
332
|
}
|
|
333
|
-
function it(
|
|
334
|
-
const p = Me(
|
|
335
|
-
return { ...
|
|
333
|
+
function it(a) {
|
|
334
|
+
const p = Me(a.id);
|
|
335
|
+
return { ...a.outlinePaint, "line-opacity": p };
|
|
336
336
|
}
|
|
337
|
-
const ie = C([]), we = C(null),
|
|
338
|
-
function ke(
|
|
339
|
-
const p =
|
|
337
|
+
const ie = C([]), we = C(null), ne = C(0);
|
|
338
|
+
function ke(a) {
|
|
339
|
+
const p = a.replace(/-outline$/, "");
|
|
340
340
|
return t.layerList.find((E) => E.config.id === p)?.config;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
return
|
|
344
|
-
const
|
|
345
|
-
return
|
|
342
|
+
function nt(a, p) {
|
|
343
|
+
return a.replace(/\{([^}]+)\}/g, (s, E) => {
|
|
344
|
+
const _ = p[E];
|
|
345
|
+
return _ == null ? "" : String(_);
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
|
-
function Ce(
|
|
349
|
-
return
|
|
348
|
+
function Ce(a) {
|
|
349
|
+
return a.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
350
350
|
}
|
|
351
|
-
function De(
|
|
352
|
-
if (
|
|
353
|
-
if (p?.dateFormat && typeof
|
|
354
|
-
const s = new Date(
|
|
351
|
+
function De(a, p) {
|
|
352
|
+
if (a == null) return "-";
|
|
353
|
+
if (p?.dateFormat && typeof a == "number") {
|
|
354
|
+
const s = new Date(a);
|
|
355
355
|
switch (p.dateFormat) {
|
|
356
356
|
case "shortDateShortTime":
|
|
357
357
|
return s.toLocaleString();
|
|
@@ -365,39 +365,39 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
365
365
|
return s.toLocaleDateString();
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
if (typeof
|
|
369
|
-
if (
|
|
370
|
-
return new Date(
|
|
368
|
+
if (typeof a == "number") {
|
|
369
|
+
if (a > 1e12 && !p)
|
|
370
|
+
return new Date(a).toLocaleDateString();
|
|
371
371
|
const s = p?.places, E = p?.digitSeparator ?? !0;
|
|
372
372
|
if (s !== void 0) {
|
|
373
|
-
const
|
|
373
|
+
const _ = a.toFixed(s);
|
|
374
374
|
if (E) {
|
|
375
|
-
const M =
|
|
375
|
+
const M = _.split("."), R = M[0] || "0", N = M[1], U = R.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
376
376
|
return N ? `${U}.${N}` : U;
|
|
377
377
|
}
|
|
378
|
-
return
|
|
378
|
+
return _;
|
|
379
379
|
}
|
|
380
|
-
return E ?
|
|
380
|
+
return E ? a.toLocaleString() : String(a);
|
|
381
381
|
}
|
|
382
|
-
return String(
|
|
382
|
+
return String(a);
|
|
383
383
|
}
|
|
384
|
-
function Ze(
|
|
384
|
+
function Ze(a) {
|
|
385
385
|
const p = /* @__PURE__ */ new Set();
|
|
386
|
-
return
|
|
387
|
-
const
|
|
388
|
-
return p.has(
|
|
386
|
+
return a.filter((s) => {
|
|
387
|
+
const _ = `${s.layer.id.replace(/-outline$/, "")}:${JSON.stringify(s.properties)}`;
|
|
388
|
+
return p.has(_) ? !1 : (p.add(_), !0);
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
function je(
|
|
391
|
+
function je(a, p) {
|
|
392
392
|
const s = /* @__PURE__ */ new Map();
|
|
393
|
-
return p.forEach((E,
|
|
394
|
-
s.set(E.id,
|
|
395
|
-
}),
|
|
396
|
-
const M = E.layer.id.replace(/-outline$/, ""), R =
|
|
393
|
+
return p.forEach((E, _) => {
|
|
394
|
+
s.set(E.id, _);
|
|
395
|
+
}), a.sort((E, _) => {
|
|
396
|
+
const M = E.layer.id.replace(/-outline$/, ""), R = _.layer.id.replace(/-outline$/, ""), N = s.get(M) ?? -1;
|
|
397
397
|
return (s.get(R) ?? -1) - N;
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
function le(
|
|
400
|
+
function le(a) {
|
|
401
401
|
const p = l.value;
|
|
402
402
|
if (!p) return;
|
|
403
403
|
const s = [];
|
|
@@ -405,11 +405,11 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
405
405
|
const Z = G.config;
|
|
406
406
|
t.visibleLayers.has(Z.id) && (s.push(Z.id), Z.outlinePaint && s.push(`${Z.id}-outline`));
|
|
407
407
|
});
|
|
408
|
-
const E = p.project([
|
|
408
|
+
const E = p.project([a.lngLat.lng, a.lngLat.lat]), _ = p.queryRenderedFeatures(E, {
|
|
409
409
|
layers: s
|
|
410
410
|
});
|
|
411
|
-
if (
|
|
412
|
-
const M = Ze(
|
|
411
|
+
if (_.length === 0) return;
|
|
412
|
+
const M = Ze(_), R = t.layerList.map((G) => G.config), N = je(M, R), U = N.map((G) => {
|
|
413
413
|
const Z = G.layer.id.replace(/-outline$/, ""), J = ke(Z);
|
|
414
414
|
return J ? {
|
|
415
415
|
layerId: J.id,
|
|
@@ -419,7 +419,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
419
419
|
} : null;
|
|
420
420
|
}).filter((G) => G !== null);
|
|
421
421
|
if (U.length === 0) return;
|
|
422
|
-
ie.value = U,
|
|
422
|
+
ie.value = U, ne.value = 0, we.value = [a.lngLat.lng, a.lngLat.lat];
|
|
423
423
|
const Y = N[0];
|
|
424
424
|
if (Y && Y.geometry) {
|
|
425
425
|
const G = Y.layer.id.replace(/-outline$/, ""), Z = ke(G);
|
|
@@ -436,50 +436,50 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
function $e() {
|
|
439
|
-
ie.value = [], we.value = null,
|
|
439
|
+
ie.value = [], we.value = null, ne.value = 0, de.value = null;
|
|
440
440
|
}
|
|
441
|
-
function se(
|
|
441
|
+
function se(a) {
|
|
442
442
|
if (ie.value.length === 0) return;
|
|
443
|
-
const p =
|
|
443
|
+
const p = a.target;
|
|
444
444
|
if (!(p.tagName === "INPUT" || p.tagName === "TEXTAREA" || p.isContentEditable))
|
|
445
|
-
switch (
|
|
445
|
+
switch (a.key) {
|
|
446
446
|
case "ArrowLeft":
|
|
447
447
|
case "ArrowUp":
|
|
448
|
-
|
|
448
|
+
a.preventDefault(), xe();
|
|
449
449
|
break;
|
|
450
450
|
case "ArrowRight":
|
|
451
451
|
case "ArrowDown":
|
|
452
|
-
|
|
452
|
+
a.preventDefault(), qe();
|
|
453
453
|
break;
|
|
454
454
|
case "Escape":
|
|
455
|
-
|
|
455
|
+
a.preventDefault(), $e();
|
|
456
456
|
break;
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
Je(() => {
|
|
460
460
|
window.addEventListener("keydown", se);
|
|
461
|
-
}),
|
|
461
|
+
}), _t(() => {
|
|
462
462
|
window.removeEventListener("keydown", se);
|
|
463
463
|
});
|
|
464
464
|
function qe() {
|
|
465
|
-
const
|
|
466
|
-
|
|
465
|
+
const a = ie.value.length;
|
|
466
|
+
a <= 1 || (ne.value = (ne.value + 1) % a);
|
|
467
467
|
}
|
|
468
468
|
function xe() {
|
|
469
|
-
const
|
|
470
|
-
|
|
469
|
+
const a = ie.value.length;
|
|
470
|
+
a <= 1 || (ne.value = (ne.value - 1 + a) % a);
|
|
471
471
|
}
|
|
472
|
-
const X = I(() => ie.value.length === 0 ? null : ie.value[
|
|
473
|
-
const
|
|
474
|
-
return !
|
|
472
|
+
const X = I(() => ie.value.length === 0 ? null : ie.value[ne.value]), Ge = I(() => {
|
|
473
|
+
const a = X.value;
|
|
474
|
+
return !a || !a.popupConfig ? a?.layerTitle || "" : nt(a.popupConfig.title, a.properties);
|
|
475
475
|
}), pe = I(() => {
|
|
476
|
-
const
|
|
477
|
-
if (!
|
|
476
|
+
const a = X.value;
|
|
477
|
+
if (!a) return "";
|
|
478
478
|
let p = '<div class="popup-content">';
|
|
479
|
-
if (p += `<h3 class="popup-title">${Ce(Ge.value)}</h3>`,
|
|
479
|
+
if (p += `<h3 class="popup-title">${Ce(Ge.value)}</h3>`, a.popupConfig?.fields?.length) {
|
|
480
480
|
p += `<table class="popup-table" aria-label="${Ce(Ge.value)}">`;
|
|
481
|
-
for (const s of
|
|
482
|
-
const E = De(
|
|
481
|
+
for (const s of a.popupConfig.fields) {
|
|
482
|
+
const E = De(a.properties[s.field], s.format);
|
|
483
483
|
p += `<tr><th scope="row">${Ce(s.label)}</th><td>${Ce(E)}</td></tr>`;
|
|
484
484
|
}
|
|
485
485
|
p += "</table>";
|
|
@@ -503,21 +503,21 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
503
503
|
"line-color": "#00FFFF",
|
|
504
504
|
"line-opacity": 0.9
|
|
505
505
|
}, de = C(null);
|
|
506
|
-
function He(
|
|
507
|
-
return
|
|
506
|
+
function He(a) {
|
|
507
|
+
return a.type;
|
|
508
508
|
}
|
|
509
|
-
function Be(
|
|
510
|
-
const s = ke(
|
|
509
|
+
function Be(a, p) {
|
|
510
|
+
const s = ke(a);
|
|
511
511
|
if (!s) return { radius: 5, width: 2 };
|
|
512
512
|
const E = s.paint || {};
|
|
513
513
|
if (p === "circle") {
|
|
514
|
-
const
|
|
515
|
-
return typeof
|
|
514
|
+
const _ = E["circle-radius"];
|
|
515
|
+
return typeof _ == "number" ? { radius: _ } : { radius: 5 };
|
|
516
516
|
}
|
|
517
517
|
if (p === "line" || p === "fill") {
|
|
518
|
-
const
|
|
519
|
-
if (typeof
|
|
520
|
-
return { width:
|
|
518
|
+
const _ = E["line-width"];
|
|
519
|
+
if (typeof _ == "number")
|
|
520
|
+
return { width: _ };
|
|
521
521
|
if (s.outlinePaint && s.outlinePaint["line-width"]) {
|
|
522
522
|
const M = s.outlinePaint["line-width"];
|
|
523
523
|
if (typeof M == "number")
|
|
@@ -527,11 +527,11 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
527
527
|
}
|
|
528
528
|
return { radius: 5, width: 2 };
|
|
529
529
|
}
|
|
530
|
-
function L(
|
|
531
|
-
return !
|
|
530
|
+
function L(a) {
|
|
531
|
+
return !a || a.length === 0 ? [] : a[0] ?? [];
|
|
532
532
|
}
|
|
533
|
-
function $(
|
|
534
|
-
const { geometry: p, geometryType: s, originalStyle: E } =
|
|
533
|
+
function $(a) {
|
|
534
|
+
const { geometry: p, geometryType: s, originalStyle: E } = a;
|
|
535
535
|
if (s === "Point" || s === "MultiPoint") {
|
|
536
536
|
const M = (E.radius || 5) + 3;
|
|
537
537
|
return {
|
|
@@ -559,7 +559,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
561
|
if (s === "Polygon") {
|
|
562
|
-
const
|
|
562
|
+
const _ = p.coordinates, M = L(_), N = (E.width || 2) + 3;
|
|
563
563
|
return {
|
|
564
564
|
type: "FeatureCollection",
|
|
565
565
|
features: [{
|
|
@@ -575,10 +575,10 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
577
|
if (s === "MultiPolygon") {
|
|
578
|
-
const
|
|
578
|
+
const _ = p.coordinates, R = (E.width || 2) + 3;
|
|
579
579
|
return {
|
|
580
580
|
type: "FeatureCollection",
|
|
581
|
-
features:
|
|
581
|
+
features: _.map((U) => ({
|
|
582
582
|
type: "Feature",
|
|
583
583
|
geometry: {
|
|
584
584
|
type: "LineString",
|
|
@@ -595,28 +595,28 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
595
595
|
features: []
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
function K(
|
|
599
|
-
if (!
|
|
598
|
+
function K(a) {
|
|
599
|
+
if (!a) {
|
|
600
600
|
B();
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
|
-
const p = $(
|
|
604
|
-
|
|
603
|
+
const p = $(a);
|
|
604
|
+
a.geometryType === "Point" || a.geometryType === "MultiPoint" ? (Le.value = p, ye.value = { type: "FeatureCollection", features: [] }) : (ye.value = p, Le.value = { type: "FeatureCollection", features: [] });
|
|
605
605
|
}
|
|
606
606
|
function B() {
|
|
607
607
|
Le.value = { type: "FeatureCollection", features: [] }, ye.value = { type: "FeatureCollection", features: [] };
|
|
608
608
|
}
|
|
609
|
-
Te(de, (
|
|
610
|
-
K(
|
|
609
|
+
Te(de, (a) => {
|
|
610
|
+
K(a);
|
|
611
611
|
}), Te(
|
|
612
612
|
() => t.visibleLayers,
|
|
613
|
-
(
|
|
614
|
-
de.value && !
|
|
613
|
+
(a) => {
|
|
614
|
+
de.value && !a.has(de.value.layerId) && (de.value = null, $e());
|
|
615
615
|
},
|
|
616
616
|
{ deep: !0 }
|
|
617
|
-
), Te(
|
|
618
|
-
const
|
|
619
|
-
if (!
|
|
617
|
+
), Te(ne, () => {
|
|
618
|
+
const a = X.value;
|
|
619
|
+
if (!a) {
|
|
620
620
|
de.value = null;
|
|
621
621
|
return;
|
|
622
622
|
}
|
|
@@ -629,9 +629,9 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
629
629
|
});
|
|
630
630
|
const E = p.project(we.value), M = p.queryRenderedFeatures(E, {
|
|
631
631
|
layers: s
|
|
632
|
-
}).find((R) => R.layer.id.replace(/-outline$/, "") ===
|
|
632
|
+
}).find((R) => R.layer.id.replace(/-outline$/, "") === a.layerId && JSON.stringify(R.properties) === JSON.stringify(a.properties));
|
|
633
633
|
if (M && M.geometry) {
|
|
634
|
-
const R = ke(
|
|
634
|
+
const R = ke(a.layerId);
|
|
635
635
|
if (R) {
|
|
636
636
|
const N = He(M.geometry), U = Be(R.id, R.type);
|
|
637
637
|
de.value = {
|
|
@@ -645,14 +645,14 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
645
645
|
}
|
|
646
646
|
});
|
|
647
647
|
const te = C(null);
|
|
648
|
-
function rt(
|
|
649
|
-
const [p, s] =
|
|
648
|
+
function rt(a) {
|
|
649
|
+
const [p, s] = a.geometry.coordinates;
|
|
650
650
|
te.value = [p, s];
|
|
651
651
|
}
|
|
652
|
-
return (
|
|
652
|
+
return (a, p) => (d(), m("div", eo, [
|
|
653
653
|
Q(O(Bt), {
|
|
654
654
|
ref_key: "mapRef",
|
|
655
|
-
ref:
|
|
655
|
+
ref: n,
|
|
656
656
|
zoom: t.initialZoom,
|
|
657
657
|
center: t.initialCenter,
|
|
658
658
|
"navigation-controls": { position: t.navigationControlPosition },
|
|
@@ -682,15 +682,15 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
682
682
|
key: "tiled-" + s.id,
|
|
683
683
|
id: "tiled-" + s.id,
|
|
684
684
|
source: tt(s),
|
|
685
|
-
paint: { "raster-opacity":
|
|
685
|
+
paint: { "raster-opacity": _e(s.id) },
|
|
686
686
|
minzoom: s.minZoom,
|
|
687
687
|
maxzoom: s.maxZoom
|
|
688
688
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
689
|
-
(d(!0), m(oe, null, re(
|
|
689
|
+
(d(!0), m(oe, null, re(at.value, (s) => (d(), ee(O(wt), {
|
|
690
690
|
key: "dynamic-" + s.id,
|
|
691
691
|
id: "dynamic-" + s.id,
|
|
692
692
|
source: Ee(s),
|
|
693
|
-
paint: { "raster-opacity":
|
|
693
|
+
paint: { "raster-opacity": _e(s.id) },
|
|
694
694
|
minzoom: s.minZoom,
|
|
695
695
|
maxzoom: s.maxZoom
|
|
696
696
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
@@ -756,7 +756,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
756
756
|
html: pe.value,
|
|
757
757
|
"close-on-click": !1,
|
|
758
758
|
"show-navigation": ie.value.length > 1,
|
|
759
|
-
"current-feature-index":
|
|
759
|
+
"current-feature-index": ne.value,
|
|
760
760
|
"total-features": ie.value.length,
|
|
761
761
|
"layer-name": X.value.layerTitle,
|
|
762
762
|
onClose: $e,
|
|
@@ -770,10 +770,10 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
770
770
|
}
|
|
771
771
|
}), Oe = (e, i) => {
|
|
772
772
|
const t = e.__vccOpts || e;
|
|
773
|
-
for (const [o,
|
|
774
|
-
t[o] =
|
|
773
|
+
for (const [o, n] of i)
|
|
774
|
+
t[o] = n;
|
|
775
775
|
return t;
|
|
776
|
-
}, oo = /* @__PURE__ */ Oe(to, [["__scopeId", "data-v-669444d6"]]),
|
|
776
|
+
}, oo = /* @__PURE__ */ Oe(to, [["__scopeId", "data-v-669444d6"]]), ao = ["disabled"], io = /* @__PURE__ */ Se({
|
|
777
777
|
inheritAttrs: !1,
|
|
778
778
|
__name: "PhlButton",
|
|
779
779
|
props: {
|
|
@@ -802,7 +802,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
802
802
|
i.iconOnly && "icon-button",
|
|
803
803
|
i.iconOnly && i.variant === "standard" && "icon-button--standard",
|
|
804
804
|
i.className
|
|
805
|
-
)),
|
|
805
|
+
)), n = I(() => t(i) ? "to" in i && i.to !== void 0 ? {
|
|
806
806
|
to: i.to,
|
|
807
807
|
disabled: i.disabled,
|
|
808
808
|
className: o.value
|
|
@@ -823,7 +823,7 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
823
823
|
size: i.size
|
|
824
824
|
})
|
|
825
825
|
);
|
|
826
|
-
return (u, b) => t(i) ? (d(), ee(O(Wt), dt({ key: 0 }, { ...
|
|
826
|
+
return (u, b) => t(i) ? (d(), ee(O(Wt), dt({ key: 0 }, { ...n.value, ...u.$attrs }, { role: "button" }), {
|
|
827
827
|
default: Ne(() => [
|
|
828
828
|
Q(O(St), mt(vt(l.value)), {
|
|
829
829
|
default: Ne(() => [
|
|
@@ -849,14 +849,14 @@ const eo = { class: "map-panel" }, to = /* @__PURE__ */ Se({
|
|
|
849
849
|
]),
|
|
850
850
|
_: 3
|
|
851
851
|
}, 16)
|
|
852
|
-
], 16,
|
|
852
|
+
], 16, ao));
|
|
853
853
|
}
|
|
854
854
|
});
|
|
855
|
-
var
|
|
855
|
+
var no = {
|
|
856
856
|
prefix: "fas",
|
|
857
857
|
iconName: "circle-exclamation",
|
|
858
858
|
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"]
|
|
859
|
-
}, lo =
|
|
859
|
+
}, lo = no, ro = {
|
|
860
860
|
prefix: "fas",
|
|
861
861
|
iconName: "xmark",
|
|
862
862
|
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"]
|
|
@@ -885,14 +885,14 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
885
885
|
},
|
|
886
886
|
emits: ["update:modelValue"],
|
|
887
887
|
setup(e, { emit: i }) {
|
|
888
|
-
const t = zt(), o = e,
|
|
888
|
+
const t = zt(), o = e, n = I(() => typeof o.error == "string" ? o.error : o.error[0]), l = Ft(o, "id"), u = i, b = C(""), y = I({
|
|
889
889
|
get: () => o.modelValue !== void 0 ? o.modelValue : b.value,
|
|
890
890
|
set: (h) => {
|
|
891
891
|
u("update:modelValue", h), b.value = h;
|
|
892
892
|
}
|
|
893
|
-
}),
|
|
893
|
+
}), P = I(() => {
|
|
894
894
|
const h = ["default-class"];
|
|
895
|
-
return t.disabled != null && h.push("phila-input--disabled"),
|
|
895
|
+
return t.disabled != null && h.push("phila-input--disabled"), n.value && h.push("phila-input--error"), t.required != null && h.push("phila-input--required"), ft(...h);
|
|
896
896
|
}), v = I(() => {
|
|
897
897
|
const h = [];
|
|
898
898
|
return y.value !== "" && h.push("phila-text-field--filled"), o.className && h.push(o.className), ft(...h);
|
|
@@ -900,7 +900,7 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
900
900
|
h.target.closest("button") || k.value?.focus();
|
|
901
901
|
};
|
|
902
902
|
return (h, w) => (d(), m("div", {
|
|
903
|
-
class:
|
|
903
|
+
class: ae(["phila-input", P.value])
|
|
904
904
|
}, [
|
|
905
905
|
o.label ? (d(), m("label", {
|
|
906
906
|
key: 0,
|
|
@@ -908,7 +908,7 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
908
908
|
class: "has-text-label-small phila-label"
|
|
909
909
|
}, V(o.label), 9, co)) : z("", !0),
|
|
910
910
|
x("div", {
|
|
911
|
-
class:
|
|
911
|
+
class: ae(["phila-text-field", v.value]),
|
|
912
912
|
onClick: r
|
|
913
913
|
}, [
|
|
914
914
|
x("div", uo, [
|
|
@@ -951,14 +951,14 @@ const co = ["for"], uo = { class: "state-layer" }, fo = { class: "content" }, po
|
|
|
951
951
|
])
|
|
952
952
|
], 2),
|
|
953
953
|
o.supportingText ? (d(), m("div", go, V(o.supportingText), 1)) : z("", !0),
|
|
954
|
-
|
|
954
|
+
n.value ? (d(), m("div", ho, [
|
|
955
955
|
Q(O(ge), {
|
|
956
956
|
"icon-definition": O(lo),
|
|
957
957
|
size: "small",
|
|
958
958
|
inline: "",
|
|
959
959
|
decorative: ""
|
|
960
960
|
}, null, 8, ["icon-definition"]),
|
|
961
|
-
me(" " + V(
|
|
961
|
+
me(" " + V(n.value), 1)
|
|
962
962
|
])) : z("", !0)
|
|
963
963
|
], 2));
|
|
964
964
|
}
|
|
@@ -994,7 +994,7 @@ const ko = { class: "layer-panel" }, Co = {
|
|
|
994
994
|
}, $o = {
|
|
995
995
|
key: 1,
|
|
996
996
|
class: "topics-container"
|
|
997
|
-
}, xo = { class: "layer-row" },
|
|
997
|
+
}, xo = { class: "layer-row" }, Po = ["href", "aria-label"], _o = {
|
|
998
998
|
key: 1,
|
|
999
999
|
class: "metadata-placeholder"
|
|
1000
1000
|
}, Eo = ["checked", "disabled", "onChange"], Mo = { class: "layer-title" }, To = {
|
|
@@ -1029,7 +1029,7 @@ const ko = { class: "layer-panel" }, Co = {
|
|
|
1029
1029
|
},
|
|
1030
1030
|
emits: ["toggleLayer", "setOpacity", "updateSearch"],
|
|
1031
1031
|
setup(e, { emit: i }) {
|
|
1032
|
-
const t = e, o = i,
|
|
1032
|
+
const t = e, o = i, n = I(() => {
|
|
1033
1033
|
if (!t.searchQuery.trim())
|
|
1034
1034
|
return t.layerList;
|
|
1035
1035
|
const f = t.searchQuery.toLowerCase();
|
|
@@ -1049,7 +1049,7 @@ const ko = { class: "layer-panel" }, Co = {
|
|
|
1049
1049
|
function y(f) {
|
|
1050
1050
|
return t.visibleLayers.has(f);
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function P(f) {
|
|
1053
1053
|
return t.layerOpacities[f] ?? 1;
|
|
1054
1054
|
}
|
|
1055
1055
|
function v(f) {
|
|
@@ -1098,9 +1098,9 @@ const ko = { class: "layer-panel" }, Co = {
|
|
|
1098
1098
|
], !0)
|
|
1099
1099
|
])) : (d(), m("div", {
|
|
1100
1100
|
key: 2,
|
|
1101
|
-
class:
|
|
1101
|
+
class: ae(["layer-list", { "has-metadata": b.value }])
|
|
1102
1102
|
}, [
|
|
1103
|
-
(d(!0), m(oe, null, re(
|
|
1103
|
+
(d(!0), m(oe, null, re(n.value, (S) => (d(), m("div", {
|
|
1104
1104
|
key: S.config.id,
|
|
1105
1105
|
class: "layer-item"
|
|
1106
1106
|
}, [
|
|
@@ -1121,9 +1121,9 @@ const ko = { class: "layer-panel" }, Co = {
|
|
|
1121
1121
|
inline: "",
|
|
1122
1122
|
decorative: ""
|
|
1123
1123
|
}, null, 8, ["icon-definition"])
|
|
1124
|
-
], 8,
|
|
1124
|
+
], 8, Po)) : b.value ? (d(), m("span", _o)) : z("", !0),
|
|
1125
1125
|
x("label", {
|
|
1126
|
-
class:
|
|
1126
|
+
class: ae(["layer-checkbox", {
|
|
1127
1127
|
"layer-unavailable": !r(S.config),
|
|
1128
1128
|
"layer-error": k(S.config.id)
|
|
1129
1129
|
}])
|
|
@@ -1151,14 +1151,14 @@ const ko = { class: "layer-panel" }, Co = {
|
|
|
1151
1151
|
x("label", {
|
|
1152
1152
|
class: "opacity-label",
|
|
1153
1153
|
for: "opacity-" + S.config.id
|
|
1154
|
-
}, " Opacity: " + V(Math.round(
|
|
1154
|
+
}, " Opacity: " + V(Math.round(P(S.config.id) * 100)) + "% ", 9, Io),
|
|
1155
1155
|
x("input", {
|
|
1156
1156
|
id: "opacity-" + S.config.id,
|
|
1157
1157
|
type: "range",
|
|
1158
1158
|
min: "0",
|
|
1159
1159
|
max: "1",
|
|
1160
1160
|
step: "0.05",
|
|
1161
|
-
value:
|
|
1161
|
+
value: P(S.config.id),
|
|
1162
1162
|
"aria-label": "Opacity for " + S.config.title,
|
|
1163
1163
|
class: "opacity-slider",
|
|
1164
1164
|
onInput: (F) => g(S.config.id, F)
|
|
@@ -1196,7 +1196,7 @@ const ko = { class: "layer-panel" }, Co = {
|
|
|
1196
1196
|
]))), 128))
|
|
1197
1197
|
], 8, Do)) : z("", !0)
|
|
1198
1198
|
]))), 128)),
|
|
1199
|
-
|
|
1199
|
+
n.value.length === 0 ? (d(), m("div", Bo, ' No layers match "' + V(e.searchQuery) + '" ', 1)) : z("", !0)
|
|
1200
1200
|
], 2))
|
|
1201
1201
|
]));
|
|
1202
1202
|
}
|
|
@@ -1249,12 +1249,12 @@ function ut(e) {
|
|
|
1249
1249
|
return String(e);
|
|
1250
1250
|
}
|
|
1251
1251
|
function Mt(e, i, t) {
|
|
1252
|
-
const o = e.symbol,
|
|
1252
|
+
const o = e.symbol, n = Ye(o);
|
|
1253
1253
|
let l = {}, u = [], b = null;
|
|
1254
|
-
if (
|
|
1255
|
-
const y = o.color === null ? 0 : o.color?.[3] ?? 255,
|
|
1254
|
+
if (n === "fill" && o) {
|
|
1255
|
+
const y = o.color === null ? 0 : o.color?.[3] ?? 255, P = y === 0 ? "rgba(0, 0, 0, 0)" : D(o.color), v = y === 0 ? 0 : y < 255 ? 1 : he(i);
|
|
1256
1256
|
if (l = {
|
|
1257
|
-
"fill-color":
|
|
1257
|
+
"fill-color": P,
|
|
1258
1258
|
"fill-opacity": v
|
|
1259
1259
|
}, Fe(o.outline)) {
|
|
1260
1260
|
const k = o.outline.width || 1, r = D(o.outline.color);
|
|
@@ -1268,7 +1268,7 @@ function Mt(e, i, t) {
|
|
|
1268
1268
|
color: D(o.color),
|
|
1269
1269
|
label: e.label || "Feature"
|
|
1270
1270
|
}];
|
|
1271
|
-
} else if (
|
|
1271
|
+
} else if (n === "line" && o)
|
|
1272
1272
|
l = {
|
|
1273
1273
|
"line-color": D(o.color),
|
|
1274
1274
|
"line-width": o.width || 1,
|
|
@@ -1279,7 +1279,7 @@ function Mt(e, i, t) {
|
|
|
1279
1279
|
width: o.width || 1,
|
|
1280
1280
|
label: e.label || "Feature"
|
|
1281
1281
|
}];
|
|
1282
|
-
else if (
|
|
1282
|
+
else if (n === "circle" && o) {
|
|
1283
1283
|
const y = Math.round((o.size || 6) * 0.71 * 100) / 100;
|
|
1284
1284
|
l = {
|
|
1285
1285
|
"circle-color": D(o.color),
|
|
@@ -1291,20 +1291,20 @@ function Mt(e, i, t) {
|
|
|
1291
1291
|
label: e.label || "Feature"
|
|
1292
1292
|
}];
|
|
1293
1293
|
}
|
|
1294
|
-
return { paint: l, legend: u, geomType:
|
|
1294
|
+
return { paint: l, legend: u, geomType: n, outlinePaint: b };
|
|
1295
1295
|
}
|
|
1296
1296
|
function Wo(e, i, t) {
|
|
1297
|
-
const o = e.field1,
|
|
1298
|
-
if (
|
|
1297
|
+
const o = e.field1, n = e.uniqueValueInfos || [], l = e.defaultSymbol;
|
|
1298
|
+
if (n.length === 0)
|
|
1299
1299
|
return Mt({ ...e, symbol: l }, i);
|
|
1300
|
-
const u =
|
|
1301
|
-
let y = {},
|
|
1300
|
+
const u = n[0]?.symbol || l, b = Ye(u);
|
|
1301
|
+
let y = {}, P = [], v = null;
|
|
1302
1302
|
if (b === "fill") {
|
|
1303
1303
|
const k = ["match", ["to-string", ["get", o]]];
|
|
1304
|
-
for (const r of
|
|
1304
|
+
for (const r of n) {
|
|
1305
1305
|
k.push(ut(r.value)), k.push(D(r.symbol?.color));
|
|
1306
1306
|
const h = String(r.value), g = t?.get(h) || r.label || h;
|
|
1307
|
-
|
|
1307
|
+
P.push({
|
|
1308
1308
|
type: "fill",
|
|
1309
1309
|
color: D(r.symbol?.color),
|
|
1310
1310
|
label: g
|
|
@@ -1322,10 +1322,10 @@ function Wo(e, i, t) {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
} else if (b === "line") {
|
|
1324
1324
|
const k = ["match", ["to-string", ["get", o]]];
|
|
1325
|
-
for (const r of
|
|
1325
|
+
for (const r of n) {
|
|
1326
1326
|
k.push(ut(r.value)), k.push(D(r.symbol?.color));
|
|
1327
1327
|
const h = String(r.value), g = t?.get(h) || r.label || h;
|
|
1328
|
-
|
|
1328
|
+
P.push({
|
|
1329
1329
|
type: "line",
|
|
1330
1330
|
color: D(r.symbol?.color),
|
|
1331
1331
|
width: r.symbol?.width || 1,
|
|
@@ -1339,10 +1339,10 @@ function Wo(e, i, t) {
|
|
|
1339
1339
|
};
|
|
1340
1340
|
} else if (b === "circle") {
|
|
1341
1341
|
const k = ["match", ["to-string", ["get", o]]];
|
|
1342
|
-
for (const h of
|
|
1342
|
+
for (const h of n) {
|
|
1343
1343
|
k.push(ut(h.value)), k.push(D(h.symbol?.color));
|
|
1344
1344
|
const w = String(h.value), f = t?.get(w) || h.label || w;
|
|
1345
|
-
|
|
1345
|
+
P.push({
|
|
1346
1346
|
type: "circle",
|
|
1347
1347
|
color: D(h.symbol?.color),
|
|
1348
1348
|
label: f
|
|
@@ -1356,16 +1356,16 @@ function Wo(e, i, t) {
|
|
|
1356
1356
|
"circle-opacity": he(i)
|
|
1357
1357
|
}, Fe(u?.outline) && (y["circle-stroke-color"] = D(u.outline.color), y["circle-stroke-width"] = u.outline.width || 1);
|
|
1358
1358
|
}
|
|
1359
|
-
return { paint: y, legend:
|
|
1359
|
+
return { paint: y, legend: P, geomType: b, outlinePaint: v };
|
|
1360
1360
|
}
|
|
1361
1361
|
function jo(e, i) {
|
|
1362
|
-
const t = e.field, o = e.classBreakInfos || [],
|
|
1363
|
-
if (
|
|
1364
|
-
return qo(
|
|
1362
|
+
const t = e.field, o = e.classBreakInfos || [], n = e.visualVariables?.find((v) => v.type === "colorInfo");
|
|
1363
|
+
if (n?.stops && n.stops.length > 0)
|
|
1364
|
+
return qo(n, t, e, i);
|
|
1365
1365
|
if (o.length === 0)
|
|
1366
1366
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1367
1367
|
const l = o[0]?.symbol, u = Ye(l);
|
|
1368
|
-
let b = {}, y = [],
|
|
1368
|
+
let b = {}, y = [], P = null;
|
|
1369
1369
|
if (u === "fill") {
|
|
1370
1370
|
const v = ["step", ["get", t]];
|
|
1371
1371
|
v.push(D(o[0]?.symbol?.color));
|
|
@@ -1382,7 +1382,7 @@ function jo(e, i) {
|
|
|
1382
1382
|
"fill-opacity": he(i)
|
|
1383
1383
|
}, Fe(l?.outline)) {
|
|
1384
1384
|
const k = l.outline.width || 1, r = D(l.outline.color);
|
|
1385
|
-
b["fill-outline-color"] = r, k > 1 && (
|
|
1385
|
+
b["fill-outline-color"] = r, k > 1 && (P = {
|
|
1386
1386
|
"line-color": r,
|
|
1387
1387
|
"line-width": k
|
|
1388
1388
|
});
|
|
@@ -1407,17 +1407,17 @@ function jo(e, i) {
|
|
|
1407
1407
|
"line-opacity": he(i)
|
|
1408
1408
|
};
|
|
1409
1409
|
}
|
|
1410
|
-
return { paint: b, legend: y, geomType: u, outlinePaint:
|
|
1410
|
+
return { paint: b, legend: y, geomType: u, outlinePaint: P };
|
|
1411
1411
|
}
|
|
1412
1412
|
function qo(e, i, t, o) {
|
|
1413
|
-
const
|
|
1414
|
-
if (
|
|
1413
|
+
const n = e.stops || [];
|
|
1414
|
+
if (n.length === 0)
|
|
1415
1415
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1416
1416
|
const l = t.classBreakInfos?.[0]?.symbol || t.defaultSymbol, u = Ye(l);
|
|
1417
|
-
let b = {}, y = [],
|
|
1417
|
+
let b = {}, y = [], P = null;
|
|
1418
1418
|
if (u === "fill") {
|
|
1419
1419
|
const v = ["interpolate", ["linear"], ["get", i]];
|
|
1420
|
-
for (const r of
|
|
1420
|
+
for (const r of n)
|
|
1421
1421
|
v.push(r.value), v.push(D(r.color)), y.push({
|
|
1422
1422
|
type: "fill",
|
|
1423
1423
|
color: D(r.color),
|
|
@@ -1435,37 +1435,37 @@ function qo(e, i, t, o) {
|
|
|
1435
1435
|
"fill-opacity": he(o)
|
|
1436
1436
|
}, Fe(l?.outline)) {
|
|
1437
1437
|
const r = l.outline.width || 1, h = D(l.outline.color);
|
|
1438
|
-
b["fill-outline-color"] = h, r > 1 && (
|
|
1438
|
+
b["fill-outline-color"] = h, r > 1 && (P = {
|
|
1439
1439
|
"line-color": h,
|
|
1440
1440
|
"line-width": r
|
|
1441
1441
|
});
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
return { paint: b, legend: y, geomType: u, outlinePaint:
|
|
1444
|
+
return { paint: b, legend: y, geomType: u, outlinePaint: P };
|
|
1445
1445
|
}
|
|
1446
1446
|
function Go(e, i, t, o) {
|
|
1447
1447
|
if (!e?.renderer)
|
|
1448
1448
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1449
|
-
const
|
|
1450
|
-
switch (
|
|
1449
|
+
const n = e.renderer;
|
|
1450
|
+
switch (n.type) {
|
|
1451
1451
|
case "simple":
|
|
1452
|
-
return Mt(
|
|
1452
|
+
return Mt(n, i);
|
|
1453
1453
|
case "uniqueValue":
|
|
1454
|
-
return Wo(
|
|
1454
|
+
return Wo(n, i, t);
|
|
1455
1455
|
case "classBreaks":
|
|
1456
|
-
return jo(
|
|
1456
|
+
return jo(n, i);
|
|
1457
1457
|
default:
|
|
1458
1458
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
1461
1461
|
function Ho(e) {
|
|
1462
1462
|
if (!e) return null;
|
|
1463
|
-
const i = e.title || "", o = (e.fieldInfos || []).filter((
|
|
1463
|
+
const i = e.title || "", o = (e.fieldInfos || []).filter((n) => n.visible === !0).map((n) => {
|
|
1464
1464
|
const l = {
|
|
1465
|
-
field:
|
|
1466
|
-
label:
|
|
1465
|
+
field: n.fieldName,
|
|
1466
|
+
label: n.label || n.fieldName
|
|
1467
1467
|
};
|
|
1468
|
-
return
|
|
1468
|
+
return n.format && (l.format = {}, n.format.dateFormat && (l.format.dateFormat = n.format.dateFormat), n.format.digitSeparator !== void 0 && (l.format.digitSeparator = n.format.digitSeparator), n.format.places !== void 0 && (l.format.places = n.format.places), Object.keys(l.format).length === 0 && delete l.format), l;
|
|
1469
1469
|
});
|
|
1470
1470
|
return {
|
|
1471
1471
|
title: i,
|
|
@@ -1487,8 +1487,8 @@ function Xo(e) {
|
|
|
1487
1487
|
return i;
|
|
1488
1488
|
const t = e.split(`
|
|
1489
1489
|
`), o = /^(\d{1,3})\s+(.+)$/;
|
|
1490
|
-
for (const
|
|
1491
|
-
const l =
|
|
1490
|
+
for (const n of t) {
|
|
1491
|
+
const l = n.trim().match(o);
|
|
1492
1492
|
if (l) {
|
|
1493
1493
|
const [, u, b] = l;
|
|
1494
1494
|
u && b && i.set(u, b.trim());
|
|
@@ -1512,57 +1512,57 @@ async function Yo(e) {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
async function Tt(e) {
|
|
1514
1514
|
const i = e.operationalLayers || [], t = [], o = ["Zoning and Planning_Land Use"];
|
|
1515
|
-
for (const
|
|
1516
|
-
if (
|
|
1515
|
+
for (const n of i)
|
|
1516
|
+
if (n.url && n.itemId !== "4f39b829b96d437da9231727d9c91fab")
|
|
1517
1517
|
try {
|
|
1518
|
-
let l =
|
|
1519
|
-
const b = !l || !l.renderer, y = o.includes(
|
|
1520
|
-
if ((b || y) &&
|
|
1521
|
-
const T = await Yo(
|
|
1518
|
+
let l = n.layerDefinition?.drawingInfo, u;
|
|
1519
|
+
const b = !l || !l.renderer, y = o.includes(n.title);
|
|
1520
|
+
if ((b || y) && n.url) {
|
|
1521
|
+
const T = await Yo(n.url);
|
|
1522
1522
|
T && (l = T.drawingInfo, T.description && (u = Xo(T.description), u.size > 0));
|
|
1523
1523
|
}
|
|
1524
|
-
const { paint:
|
|
1524
|
+
const { paint: P, legend: v, geomType: k, outlinePaint: r } = Go(
|
|
1525
1525
|
l,
|
|
1526
|
-
|
|
1526
|
+
n.opacity,
|
|
1527
1527
|
u,
|
|
1528
|
-
|
|
1529
|
-
), h = Ho(
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
), f = Jo(
|
|
1533
|
-
let S =
|
|
1528
|
+
n.title
|
|
1529
|
+
), h = Ho(n.popupInfo), w = Ko(n.layerDefinition), g = Uo(
|
|
1530
|
+
n.layerDefinition?.minScale,
|
|
1531
|
+
n.layerDefinition?.maxScale
|
|
1532
|
+
), f = Jo(n.title), c = Qo(n.title);
|
|
1533
|
+
let S = n.opacity ?? 1;
|
|
1534
1534
|
const F = {
|
|
1535
1535
|
id: f,
|
|
1536
1536
|
title: c,
|
|
1537
1537
|
type: k,
|
|
1538
|
-
url:
|
|
1538
|
+
url: n.url,
|
|
1539
1539
|
opacity: S,
|
|
1540
|
-
paint:
|
|
1540
|
+
paint: P,
|
|
1541
1541
|
legend: v,
|
|
1542
1542
|
popup: h
|
|
1543
1543
|
};
|
|
1544
1544
|
w && (F.where = w), g.minZoom !== void 0 && (F.minZoom = g.minZoom), g.maxZoom !== void 0 && (F.maxZoom = g.maxZoom), r && (F.outlinePaint = r), t.push(F);
|
|
1545
1545
|
} catch {
|
|
1546
1546
|
}
|
|
1547
|
-
return t.sort((
|
|
1547
|
+
return t.sort((n, l) => n.title.localeCompare(l.title)), t;
|
|
1548
1548
|
}
|
|
1549
|
-
const xt = {}, gt = "376af635c84643cd816a8c5d017a53aa",
|
|
1549
|
+
const xt = {}, gt = "376af635c84643cd816a8c5d017a53aa", ti = gt;
|
|
1550
1550
|
function ht(e, i) {
|
|
1551
1551
|
let t = `https://www.arcgis.com/sharing/rest/content/items/${e}/data?f=json`;
|
|
1552
1552
|
return i && (t += `&token=${i}`), t;
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function oi() {
|
|
1555
1555
|
return ht(gt);
|
|
1556
1556
|
}
|
|
1557
1557
|
const Qe = /* @__PURE__ */ new Map(), Ve = /* @__PURE__ */ new Map();
|
|
1558
|
-
function
|
|
1558
|
+
function ea(e) {
|
|
1559
1559
|
e ? (Qe.delete(e), Ve.delete(e)) : (Qe.clear(), Ve.clear());
|
|
1560
1560
|
}
|
|
1561
|
-
let Ke,
|
|
1562
|
-
async function
|
|
1561
|
+
let Ke, Pt = 0;
|
|
1562
|
+
async function ta() {
|
|
1563
1563
|
const e = typeof import.meta < "u" && xt?.VITE_AGO_USERNAME, i = typeof import.meta < "u" && xt?.VITE_AGO_PASSWORD;
|
|
1564
1564
|
if (!(!e || !i)) {
|
|
1565
|
-
if (Ke && Date.now() <
|
|
1565
|
+
if (Ke && Date.now() < Pt - 3e5)
|
|
1566
1566
|
return Ke;
|
|
1567
1567
|
try {
|
|
1568
1568
|
const o = await (await fetch("https://www.arcgis.com/sharing/rest/generateToken", {
|
|
@@ -1579,24 +1579,24 @@ async function tn() {
|
|
|
1579
1579
|
// 2 hours
|
|
1580
1580
|
})
|
|
1581
1581
|
})).json();
|
|
1582
|
-
return o.error ? void 0 : (Ke = o.token,
|
|
1582
|
+
return o.error ? void 0 : (Ke = o.token, Pt = o.expires, Ke);
|
|
1583
1583
|
} catch {
|
|
1584
1584
|
return;
|
|
1585
1585
|
}
|
|
1586
1586
|
}
|
|
1587
1587
|
}
|
|
1588
|
-
async function
|
|
1588
|
+
async function oa(e, i) {
|
|
1589
1589
|
const t = ht(e, i), o = await fetch(t);
|
|
1590
1590
|
if (!o.ok)
|
|
1591
1591
|
throw new Error(`Failed to fetch WebMap: ${o.status} ${o.statusText}`);
|
|
1592
|
-
const
|
|
1593
|
-
if (
|
|
1594
|
-
throw new Error(`ArcGIS error: ${
|
|
1595
|
-
return
|
|
1592
|
+
const n = await o.json();
|
|
1593
|
+
if (n.error)
|
|
1594
|
+
throw new Error(`ArcGIS error: ${n.error.message || n.error.code || "Unknown error"}`);
|
|
1595
|
+
return n;
|
|
1596
1596
|
}
|
|
1597
|
-
async function
|
|
1597
|
+
async function aa(e) {
|
|
1598
1598
|
try {
|
|
1599
|
-
const i = await
|
|
1599
|
+
const i = await ta(), t = await oa(e, i);
|
|
1600
1600
|
return await Tt(t);
|
|
1601
1601
|
} catch (i) {
|
|
1602
1602
|
throw new Error(`Failed to load dynamic layer configs: ${i instanceof Error ? i.message : "Unknown error"}`);
|
|
@@ -1611,15 +1611,15 @@ async function yt(e = gt) {
|
|
|
1611
1611
|
return t;
|
|
1612
1612
|
const o = (async () => {
|
|
1613
1613
|
try {
|
|
1614
|
-
const
|
|
1615
|
-
return Qe.set(e,
|
|
1614
|
+
const n = await aa(e);
|
|
1615
|
+
return Qe.set(e, n), n;
|
|
1616
1616
|
} finally {
|
|
1617
1617
|
Ve.delete(e);
|
|
1618
1618
|
}
|
|
1619
1619
|
})();
|
|
1620
1620
|
return Ve.set(e, o), o;
|
|
1621
1621
|
}
|
|
1622
|
-
function
|
|
1622
|
+
function ia(e) {
|
|
1623
1623
|
const i = C({}), t = /* @__PURE__ */ new Map();
|
|
1624
1624
|
for (const r of e)
|
|
1625
1625
|
i.value[r.id] = {
|
|
@@ -1686,7 +1686,7 @@ function an(e) {
|
|
|
1686
1686
|
};
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
|
-
async function
|
|
1689
|
+
async function n() {
|
|
1690
1690
|
await Promise.all(e.map((r) => o(r)));
|
|
1691
1691
|
}
|
|
1692
1692
|
async function l(r) {
|
|
@@ -1700,7 +1700,7 @@ function an(e) {
|
|
|
1700
1700
|
function y(r) {
|
|
1701
1701
|
return i.value[r]?.loading ?? !1;
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1703
|
+
function P(r) {
|
|
1704
1704
|
return i.value[r]?.error ?? null;
|
|
1705
1705
|
}
|
|
1706
1706
|
function v() {
|
|
@@ -1718,8 +1718,8 @@ function an(e) {
|
|
|
1718
1718
|
t.clear();
|
|
1719
1719
|
}
|
|
1720
1720
|
return Je(() => {
|
|
1721
|
-
|
|
1722
|
-
}),
|
|
1721
|
+
n(), v();
|
|
1722
|
+
}), _t(() => {
|
|
1723
1723
|
k();
|
|
1724
1724
|
}), {
|
|
1725
1725
|
/** Reactive state for all data sources */
|
|
@@ -1727,7 +1727,7 @@ function an(e) {
|
|
|
1727
1727
|
/** Whether any data source is currently loading */
|
|
1728
1728
|
isLoading: b,
|
|
1729
1729
|
/** Fetch all data sources */
|
|
1730
|
-
fetchAll:
|
|
1730
|
+
fetchAll: n,
|
|
1731
1731
|
/** Refetch a specific data source by id */
|
|
1732
1732
|
refetch: l,
|
|
1733
1733
|
/** Get data for a specific source */
|
|
@@ -1735,27 +1735,27 @@ function an(e) {
|
|
|
1735
1735
|
/** Check if a specific source is loading */
|
|
1736
1736
|
isSourceLoading: y,
|
|
1737
1737
|
/** Get error for a specific source */
|
|
1738
|
-
getError:
|
|
1738
|
+
getError: P,
|
|
1739
1739
|
/** Stop all polling (useful for cleanup) */
|
|
1740
1740
|
stopPolling: k
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
|
-
const
|
|
1743
|
+
const na = { class: "layerboard-layout" }, la = ["aria-expanded"], ra = {
|
|
1744
1744
|
key: 0,
|
|
1745
1745
|
class: "layerboard-subtitle"
|
|
1746
|
-
},
|
|
1746
|
+
}, sa = { class: "layerboard-mobile-menu-content" }, ca = { class: "layerboard-main" }, ua = {
|
|
1747
1747
|
key: 0,
|
|
1748
1748
|
class: "layerboard-loading",
|
|
1749
1749
|
role: "status",
|
|
1750
1750
|
"aria-live": "polite"
|
|
1751
|
-
},
|
|
1751
|
+
}, da = {
|
|
1752
1752
|
key: 1,
|
|
1753
1753
|
class: "layerboard-error",
|
|
1754
1754
|
role: "alert"
|
|
1755
|
-
},
|
|
1755
|
+
}, fa = ["aria-expanded", "aria-label"], pa = { key: 0 }, ya = { key: 1 }, ga = {
|
|
1756
1756
|
class: "sr-only",
|
|
1757
1757
|
"aria-live": "polite"
|
|
1758
|
-
},
|
|
1758
|
+
}, ha = /* @__PURE__ */ Se({
|
|
1759
1759
|
__name: "Layerboard",
|
|
1760
1760
|
props: {
|
|
1761
1761
|
title: {},
|
|
@@ -1784,7 +1784,7 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
1784
1784
|
},
|
|
1785
1785
|
emits: ["configs-loaded", "load-error", "zoom"],
|
|
1786
1786
|
setup(e, { expose: i, emit: t }) {
|
|
1787
|
-
const o = e,
|
|
1787
|
+
const o = e, n = t, l = C([]), u = C(!0), b = C(null), y = C(12), P = C(""), v = C(/* @__PURE__ */ new Set()), k = C({}), r = C(/* @__PURE__ */ new Set()), h = C({}), w = C({}), g = C(/* @__PURE__ */ new Set()), f = C({});
|
|
1788
1788
|
function c() {
|
|
1789
1789
|
const L = {};
|
|
1790
1790
|
for (const $ of o.tiledLayers)
|
|
@@ -1800,14 +1800,14 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
1800
1800
|
function T(L, $) {
|
|
1801
1801
|
f.value = { ...f.value, [L]: $ };
|
|
1802
1802
|
}
|
|
1803
|
-
const A = o.dataSources.length > 0 ?
|
|
1804
|
-
function
|
|
1803
|
+
const A = o.dataSources.length > 0 ? ia(o.dataSources) : null, q = I(() => A?.state.value ?? {}), fe = I(() => A?.isLoading.value ?? !1);
|
|
1804
|
+
function Pe(L) {
|
|
1805
1805
|
return A?.getData(L) ?? null;
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function _e(L) {
|
|
1808
1808
|
return A?.refetch(L) ?? Promise.resolve();
|
|
1809
1809
|
}
|
|
1810
|
-
W("layerboard-layers", j(l)), W("layerboard-visible", v), W("layerboard-opacities", k), W("layerboard-loading", j(r)), W("layerboard-errors", j(h)), W("layerboard-zoom", j(y)), W("layerboard-toggle-layer", Ee), W("layerboard-set-layer-visible", ve), W("layerboard-set-layers-visible", Me), W("layerboard-set-opacity", be), W("layerboard-tiled-layers", j(I(() => o.tiledLayers))), W("layerboard-visible-tiled", g), W("layerboard-tiled-opacities", f), W("layerboard-toggle-tiled", S), W("layerboard-set-tiled-opacity", T), W("layerboard-set-tiled-visible", F), W("layerboard-data-sources-state", q), W("layerboard-data-sources-loading", fe), W("layerboard-get-data-source",
|
|
1810
|
+
W("layerboard-layers", j(l)), W("layerboard-visible", v), W("layerboard-opacities", k), W("layerboard-loading", j(r)), W("layerboard-errors", j(h)), W("layerboard-zoom", j(y)), W("layerboard-toggle-layer", Ee), W("layerboard-set-layer-visible", ve), W("layerboard-set-layers-visible", Me), W("layerboard-set-opacity", be), W("layerboard-tiled-layers", j(I(() => o.tiledLayers))), W("layerboard-visible-tiled", g), W("layerboard-tiled-opacities", f), W("layerboard-toggle-tiled", S), W("layerboard-set-tiled-opacity", T), W("layerboard-set-tiled-visible", F), W("layerboard-data-sources-state", q), W("layerboard-data-sources-loading", fe), W("layerboard-get-data-source", Pe), W("layerboard-refetch-data-source", _e);
|
|
1811
1811
|
const et = I(() => ({
|
|
1812
1812
|
backgroundColor: o.themeColor
|
|
1813
1813
|
})), tt = I(() => ({
|
|
@@ -1837,10 +1837,10 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
1837
1837
|
const K = {};
|
|
1838
1838
|
$.forEach((B) => {
|
|
1839
1839
|
K[B.id] = B.opacity ?? 1;
|
|
1840
|
-
}), k.value = K,
|
|
1840
|
+
}), k.value = K, n("configs-loaded", $);
|
|
1841
1841
|
} catch (L) {
|
|
1842
1842
|
const $ = L instanceof Error ? L.message : "Failed to load layer configurations";
|
|
1843
|
-
b.value = $,
|
|
1843
|
+
b.value = $, n("load-error", $);
|
|
1844
1844
|
} finally {
|
|
1845
1845
|
u.value = !1;
|
|
1846
1846
|
}
|
|
@@ -1859,15 +1859,15 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
1859
1859
|
const K = await $.json(), B = {};
|
|
1860
1860
|
for (const te of K.rows || [])
|
|
1861
1861
|
if (te.url_text && te.representation) {
|
|
1862
|
-
const rt = We(te.url_text),
|
|
1863
|
-
B[rt] =
|
|
1862
|
+
const rt = We(te.url_text), a = `https://metadata.phila.gov/#home/representationdetails/${te.representation}/`;
|
|
1863
|
+
B[rt] = a;
|
|
1864
1864
|
}
|
|
1865
1865
|
w.value = B;
|
|
1866
1866
|
} catch {
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1870
|
-
y.value = L,
|
|
1869
|
+
function at(L) {
|
|
1870
|
+
y.value = L, n("zoom", L);
|
|
1871
1871
|
}
|
|
1872
1872
|
function Ee(L) {
|
|
1873
1873
|
v.value.has(L) ? v.value.delete(L) : v.value.add(L), v.value = new Set(v.value);
|
|
@@ -1895,12 +1895,12 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
1897
|
function we(L) {
|
|
1898
|
-
|
|
1898
|
+
P.value = L;
|
|
1899
1899
|
}
|
|
1900
|
-
const
|
|
1900
|
+
const ne = C(null), ke = C(null), nt = C(null), Ce = C(null), De = C(null), Ze = C(null), je = C(null), le = C("map");
|
|
1901
1901
|
function $e() {
|
|
1902
1902
|
le.value = le.value === "sidebar" ? "map" : "sidebar", Ae(() => {
|
|
1903
|
-
le.value === "sidebar" &&
|
|
1903
|
+
le.value === "sidebar" && ne.value?.focus();
|
|
1904
1904
|
});
|
|
1905
1905
|
}
|
|
1906
1906
|
const se = C(!1);
|
|
@@ -1984,7 +1984,7 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
1984
1984
|
/** Reload layer configurations */
|
|
1985
1985
|
reloadConfigs: Re,
|
|
1986
1986
|
/** Clear configuration cache */
|
|
1987
|
-
clearCache: () =>
|
|
1987
|
+
clearCache: () => ea(o.webMapId),
|
|
1988
1988
|
// Tiled layer APIs
|
|
1989
1989
|
/** Set of visible tiled layer IDs */
|
|
1990
1990
|
visibleTiledLayers: g,
|
|
@@ -2002,9 +2002,9 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2002
2002
|
/** Whether any data source is loading */
|
|
2003
2003
|
dataSourcesLoading: fe,
|
|
2004
2004
|
/** Get data from a specific data source */
|
|
2005
|
-
getDataSourceData:
|
|
2005
|
+
getDataSourceData: Pe,
|
|
2006
2006
|
/** Refetch a specific data source */
|
|
2007
|
-
refetchDataSource:
|
|
2007
|
+
refetchDataSource: _e,
|
|
2008
2008
|
// Modal APIs
|
|
2009
2009
|
/** Whether the modal is currently open */
|
|
2010
2010
|
isModalOpen: pe,
|
|
@@ -2020,7 +2020,7 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2020
2020
|
Re(), ot(), c(), document.addEventListener("keydown", Be);
|
|
2021
2021
|
}), Rt(() => {
|
|
2022
2022
|
document.removeEventListener("keydown", Be);
|
|
2023
|
-
}), (L, $) => (d(), m("div",
|
|
2023
|
+
}), (L, $) => (d(), m("div", na, [
|
|
2024
2024
|
$[5] || ($[5] = x("a", {
|
|
2025
2025
|
href: "#main-content",
|
|
2026
2026
|
class: "skip-to-main-content-link"
|
|
@@ -2055,20 +2055,23 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2055
2055
|
size: "medium",
|
|
2056
2056
|
decorative: ""
|
|
2057
2057
|
}, null, 8, ["icon-definition"])
|
|
2058
|
-
], 8,
|
|
2058
|
+
], 8, la),
|
|
2059
2059
|
ce(L.$slots, "header", {}, () => [
|
|
2060
2060
|
x("h1", null, V(e.title), 1),
|
|
2061
|
-
e.subtitle ? (d(), m("span",
|
|
2061
|
+
e.subtitle ? (d(), m("span", ra, V(e.subtitle), 1)) : z("", !0)
|
|
2062
2062
|
], !0),
|
|
2063
2063
|
se.value ? (d(), m("div", {
|
|
2064
2064
|
key: 0,
|
|
2065
2065
|
ref_key: "mobileMenuRef",
|
|
2066
2066
|
ref: De,
|
|
2067
2067
|
class: "layerboard-mobile-menu",
|
|
2068
|
+
role: "dialog",
|
|
2069
|
+
"aria-modal": "true",
|
|
2070
|
+
"aria-label": "Site menu",
|
|
2068
2071
|
style: H({ backgroundColor: e.themeColor }),
|
|
2069
2072
|
onKeydown: de
|
|
2070
2073
|
}, [
|
|
2071
|
-
x("div",
|
|
2074
|
+
x("div", sa, [
|
|
2072
2075
|
ce(L.$slots, "footer", {
|
|
2073
2076
|
openModal: ye,
|
|
2074
2077
|
closeModal: ue,
|
|
@@ -2097,14 +2100,14 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2097
2100
|
onClick: xe
|
|
2098
2101
|
})) : z("", !0)
|
|
2099
2102
|
], 4),
|
|
2100
|
-
x("div",
|
|
2101
|
-
u.value ? (d(), m("div",
|
|
2103
|
+
x("div", ca, [
|
|
2104
|
+
u.value ? (d(), m("div", ua, [
|
|
2102
2105
|
x("div", {
|
|
2103
2106
|
class: "layerboard-spinner",
|
|
2104
2107
|
style: H({ borderTopColor: e.themeColor })
|
|
2105
2108
|
}, null, 4),
|
|
2106
2109
|
x("p", null, "Loading " + V(e.title) + "...", 1)
|
|
2107
|
-
])) : b.value ? (d(), m("div",
|
|
2110
|
+
])) : b.value ? (d(), m("div", da, [
|
|
2108
2111
|
$[3] || ($[3] = x("h2", null, "Error Loading Layers", -1)),
|
|
2109
2112
|
x("p", null, V(b.value), 1),
|
|
2110
2113
|
x("button", {
|
|
@@ -2115,9 +2118,9 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2115
2118
|
])) : (d(), m(oe, { key: 2 }, [
|
|
2116
2119
|
x("aside", {
|
|
2117
2120
|
ref_key: "sidebarRef",
|
|
2118
|
-
ref:
|
|
2121
|
+
ref: ne,
|
|
2119
2122
|
id: "main-content",
|
|
2120
|
-
class:
|
|
2123
|
+
class: ae(["layerboard-sidebar", { "is-active": le.value === "sidebar" }]),
|
|
2121
2124
|
style: H(Ue.value),
|
|
2122
2125
|
"aria-label": "Map layers",
|
|
2123
2126
|
tabindex: "-1"
|
|
@@ -2141,8 +2144,8 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2141
2144
|
setTiledLayerOpacity: T,
|
|
2142
2145
|
dataSourcesState: q.value,
|
|
2143
2146
|
dataSourcesLoading: fe.value,
|
|
2144
|
-
getDataSource:
|
|
2145
|
-
refetchDataSource:
|
|
2147
|
+
getDataSource: Pe,
|
|
2148
|
+
refetchDataSource: _e
|
|
2146
2149
|
}, () => [
|
|
2147
2150
|
e.showDefaultSidebar ? (d(), ee(No, {
|
|
2148
2151
|
key: 0,
|
|
@@ -2152,7 +2155,7 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2152
2155
|
"loading-layers": r.value,
|
|
2153
2156
|
"layer-errors": h.value,
|
|
2154
2157
|
"current-zoom": y.value,
|
|
2155
|
-
"search-query":
|
|
2158
|
+
"search-query": P.value,
|
|
2156
2159
|
"layer-metadata": w.value,
|
|
2157
2160
|
onToggleLayer: Ee,
|
|
2158
2161
|
onSetOpacity: be,
|
|
@@ -2163,7 +2166,7 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2163
2166
|
x("div", {
|
|
2164
2167
|
role: "main",
|
|
2165
2168
|
"aria-label": "Map",
|
|
2166
|
-
class:
|
|
2169
|
+
class: ae(["layerboard-map", { "is-active": le.value === "map" }])
|
|
2167
2170
|
}, [
|
|
2168
2171
|
Q(oo, {
|
|
2169
2172
|
"visible-layers": v.value,
|
|
@@ -2183,13 +2186,13 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2183
2186
|
"pictometry-button-position": e.pictometryButtonPosition,
|
|
2184
2187
|
"initial-zoom": e.initialZoom,
|
|
2185
2188
|
"initial-center": e.initialCenter,
|
|
2186
|
-
onZoom:
|
|
2189
|
+
onZoom: at,
|
|
2187
2190
|
onLayerLoading: it,
|
|
2188
2191
|
onLayerError: ie
|
|
2189
2192
|
}, 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"])
|
|
2190
2193
|
], 2),
|
|
2191
2194
|
x("button", {
|
|
2192
|
-
class:
|
|
2195
|
+
class: ae(["layerboard-sidebar-toggle", { "is-collapsed": X.value }]),
|
|
2193
2196
|
style: H({ left: X.value ? "0" : o.sidebarWidth }),
|
|
2194
2197
|
onClick: Ge,
|
|
2195
2198
|
"aria-expanded": !X.value,
|
|
@@ -2200,17 +2203,17 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2200
2203
|
size: "medium",
|
|
2201
2204
|
decorative: ""
|
|
2202
2205
|
}, null, 8, ["icon-definition"])
|
|
2203
|
-
], 14,
|
|
2206
|
+
], 14, fa)
|
|
2204
2207
|
], 64))
|
|
2205
2208
|
]),
|
|
2206
2209
|
x("button", {
|
|
2207
2210
|
ref_key: "mobileToggleRef",
|
|
2208
|
-
ref:
|
|
2211
|
+
ref: nt,
|
|
2209
2212
|
class: "layerboard-mobile-toggle",
|
|
2210
2213
|
style: H(Ie.value),
|
|
2211
2214
|
onClick: $e
|
|
2212
2215
|
}, [
|
|
2213
|
-
le.value === "map" ? (d(), m("span",
|
|
2216
|
+
le.value === "map" ? (d(), m("span", pa, V(e.sidebarLabel), 1)) : (d(), m("span", ya, V(e.mapLabel), 1))
|
|
2214
2217
|
], 4),
|
|
2215
2218
|
x("footer", {
|
|
2216
2219
|
class: "layerboard-footer",
|
|
@@ -2254,13 +2257,13 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2254
2257
|
ce(L.$slots, "modal", { closeModal: ue }, void 0, !0)
|
|
2255
2258
|
], 512)
|
|
2256
2259
|
], 32)) : z("", !0),
|
|
2257
|
-
x("span",
|
|
2260
|
+
x("span", ga, V(le.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
|
|
2258
2261
|
]));
|
|
2259
2262
|
}
|
|
2260
|
-
}),
|
|
2263
|
+
}), ai = /* @__PURE__ */ Oe(ha, [["__scopeId", "data-v-d1e907be"]]), ma = ["aria-expanded"], va = {
|
|
2261
2264
|
key: 0,
|
|
2262
2265
|
class: "topic-icon"
|
|
2263
|
-
},
|
|
2266
|
+
}, ba = { class: "topic-title" }, wa = /* @__PURE__ */ Se({
|
|
2264
2267
|
__name: "TopicAccordion",
|
|
2265
2268
|
props: {
|
|
2266
2269
|
title: {},
|
|
@@ -2271,30 +2274,30 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2271
2274
|
},
|
|
2272
2275
|
emits: ["toggle", "layerChange"],
|
|
2273
2276
|
setup(e, { emit: i }) {
|
|
2274
|
-
const t = e, o = i,
|
|
2277
|
+
const t = e, o = i, n = C(t.expanded), l = `topic-panel-${bt()}`, u = `topic-header-${bt()}`;
|
|
2275
2278
|
Te(
|
|
2276
2279
|
() => t.expanded,
|
|
2277
2280
|
(y) => {
|
|
2278
|
-
|
|
2281
|
+
n.value = y;
|
|
2279
2282
|
}
|
|
2280
2283
|
);
|
|
2281
2284
|
function b() {
|
|
2282
|
-
|
|
2285
|
+
n.value = !n.value, o("toggle", n.value);
|
|
2283
2286
|
}
|
|
2284
|
-
return (y,
|
|
2287
|
+
return (y, P) => {
|
|
2285
2288
|
const v = Dt("font-awesome-icon");
|
|
2286
2289
|
return d(), m("div", {
|
|
2287
|
-
class:
|
|
2290
|
+
class: ae(["topic-accordion", { "is-expanded": n.value }])
|
|
2288
2291
|
}, [
|
|
2289
2292
|
x("button", {
|
|
2290
2293
|
id: u,
|
|
2291
|
-
class:
|
|
2294
|
+
class: ae(["topic-header", e.headerClass]),
|
|
2292
2295
|
type: "button",
|
|
2293
|
-
"aria-expanded":
|
|
2296
|
+
"aria-expanded": n.value,
|
|
2294
2297
|
"aria-controls": l,
|
|
2295
2298
|
onClick: b
|
|
2296
2299
|
}, [
|
|
2297
|
-
e.icon || y.$slots.icon ? (d(), m("span",
|
|
2300
|
+
e.icon || y.$slots.icon ? (d(), m("span", va, [
|
|
2298
2301
|
ce(y.$slots, "icon", {}, () => [
|
|
2299
2302
|
e.icon ? (d(), ee(v, {
|
|
2300
2303
|
key: 0,
|
|
@@ -2303,10 +2306,10 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2303
2306
|
}, null, 8, ["icon"])) : z("", !0)
|
|
2304
2307
|
], !0)
|
|
2305
2308
|
])) : z("", !0),
|
|
2306
|
-
x("span",
|
|
2309
|
+
x("span", ba, V(e.title), 1),
|
|
2307
2310
|
x("span", {
|
|
2308
|
-
class:
|
|
2309
|
-
}, [...
|
|
2311
|
+
class: ae(["topic-chevron", { "is-rotated": n.value }])
|
|
2312
|
+
}, [...P[0] || (P[0] = [
|
|
2310
2313
|
x("svg", {
|
|
2311
2314
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2312
2315
|
width: "20",
|
|
@@ -2322,7 +2325,7 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2322
2325
|
x("polyline", { points: "6 9 12 15 18 9" })
|
|
2323
2326
|
], -1)
|
|
2324
2327
|
])], 2)
|
|
2325
|
-
], 10,
|
|
2328
|
+
], 10, ma),
|
|
2326
2329
|
Et(x("div", {
|
|
2327
2330
|
id: l,
|
|
2328
2331
|
role: "region",
|
|
@@ -2330,38 +2333,35 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2330
2333
|
class: "topic-content"
|
|
2331
2334
|
}, [
|
|
2332
2335
|
ce(y.$slots, "default", {}, () => [
|
|
2333
|
-
|
|
2336
|
+
P[1] || (P[1] = x("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2334
2337
|
], !0)
|
|
2335
2338
|
], 512), [
|
|
2336
|
-
[Zt,
|
|
2339
|
+
[Zt, n.value]
|
|
2337
2340
|
])
|
|
2338
2341
|
], 2);
|
|
2339
2342
|
};
|
|
2340
2343
|
}
|
|
2341
|
-
}),
|
|
2342
|
-
class: "layer-checkbox-set",
|
|
2343
|
-
role: "group"
|
|
2344
|
-
}, kn = ["checked", "disabled", "onChange"], Cn = { class: "layer-title" }, $n = {
|
|
2344
|
+
}), ii = /* @__PURE__ */ Oe(wa, [["__scopeId", "data-v-13853397"]]), La = ["aria-label"], Sa = ["checked", "disabled", "onChange"], ka = { class: "layer-title" }, Ca = {
|
|
2345
2345
|
key: 0,
|
|
2346
2346
|
class: "loading-indicator",
|
|
2347
2347
|
role: "status"
|
|
2348
|
-
},
|
|
2348
|
+
}, $a = ["aria-label"], xa = {
|
|
2349
2349
|
key: 2,
|
|
2350
2350
|
class: "zoom-indicator"
|
|
2351
|
-
},
|
|
2351
|
+
}, Pa = { class: "layer-title" }, _a = {
|
|
2352
2352
|
key: 0,
|
|
2353
2353
|
class: "loading-indicator",
|
|
2354
2354
|
role: "status"
|
|
2355
|
-
},
|
|
2355
|
+
}, Ea = ["aria-label"], Ma = {
|
|
2356
2356
|
key: 2,
|
|
2357
2357
|
class: "zoom-indicator"
|
|
2358
|
-
},
|
|
2358
|
+
}, Ta = {
|
|
2359
2359
|
key: 2,
|
|
2360
2360
|
class: "opacity-control"
|
|
2361
|
-
},
|
|
2361
|
+
}, za = ["for"], Fa = ["id", "value", "aria-label", "onInput"], Oa = ["aria-label"], Ia = { class: "legend-label" }, Ra = {
|
|
2362
2362
|
key: 0,
|
|
2363
2363
|
class: "empty-state"
|
|
2364
|
-
},
|
|
2364
|
+
}, Da = /* @__PURE__ */ Se({
|
|
2365
2365
|
__name: "LayerCheckboxSet",
|
|
2366
2366
|
props: {
|
|
2367
2367
|
layers: {},
|
|
@@ -2371,12 +2371,13 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2371
2371
|
layerErrors: { default: () => ({}) },
|
|
2372
2372
|
currentZoom: { default: 12 },
|
|
2373
2373
|
showOpacity: { type: Boolean, default: !0 },
|
|
2374
|
-
showLegend: { type: Boolean, default: !0 }
|
|
2374
|
+
showLegend: { type: Boolean, default: !0 },
|
|
2375
|
+
groupLabel: {}
|
|
2375
2376
|
},
|
|
2376
2377
|
emits: ["toggleLayer", "setOpacity"],
|
|
2377
2378
|
setup(e, { emit: i }) {
|
|
2378
2379
|
const t = e, o = i;
|
|
2379
|
-
function
|
|
2380
|
+
function n(g) {
|
|
2380
2381
|
return t.visibleLayerIds.has(g);
|
|
2381
2382
|
}
|
|
2382
2383
|
function l(g) {
|
|
@@ -2392,7 +2393,7 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2392
2393
|
const f = t.currentZoom, c = g.minZoom, S = g.maxZoom;
|
|
2393
2394
|
return !(c !== void 0 && f < c || S !== void 0 && f > S);
|
|
2394
2395
|
}
|
|
2395
|
-
function
|
|
2396
|
+
function P(g) {
|
|
2396
2397
|
return g.displayOptions?.shouldShowCheckbox !== !1;
|
|
2397
2398
|
}
|
|
2398
2399
|
function v(g) {
|
|
@@ -2411,59 +2412,63 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2411
2412
|
const c = f.target;
|
|
2412
2413
|
o("setOpacity", g, parseFloat(c.value));
|
|
2413
2414
|
}
|
|
2414
|
-
return (g, f) => (d(), m("fieldset",
|
|
2415
|
+
return (g, f) => (d(), m("fieldset", {
|
|
2416
|
+
class: "layer-checkbox-set",
|
|
2417
|
+
role: "group",
|
|
2418
|
+
"aria-label": e.groupLabel
|
|
2419
|
+
}, [
|
|
2415
2420
|
(d(!0), m(oe, null, re(e.layers, (c) => (d(), m("div", {
|
|
2416
2421
|
key: c.id,
|
|
2417
2422
|
class: "layer-item"
|
|
2418
2423
|
}, [
|
|
2419
|
-
|
|
2424
|
+
P(c) ? (d(), m("label", {
|
|
2420
2425
|
key: 0,
|
|
2421
|
-
class:
|
|
2426
|
+
class: ae(["layer-checkbox", {
|
|
2422
2427
|
"layer-unavailable": !y(c),
|
|
2423
2428
|
"layer-error": b(c.id)
|
|
2424
2429
|
}])
|
|
2425
2430
|
}, [
|
|
2426
2431
|
x("input", {
|
|
2427
2432
|
type: "checkbox",
|
|
2428
|
-
checked:
|
|
2433
|
+
checked: n(c.id),
|
|
2429
2434
|
disabled: !y(c),
|
|
2430
2435
|
onChange: (S) => h(c.id)
|
|
2431
|
-
}, null, 40,
|
|
2432
|
-
x("span",
|
|
2436
|
+
}, null, 40, Sa),
|
|
2437
|
+
x("span", ka, [
|
|
2433
2438
|
me(V(r(c)) + " ", 1),
|
|
2434
|
-
u(c.id) ? (d(), m("span",
|
|
2439
|
+
u(c.id) ? (d(), m("span", Ca, " Loading... ")) : z("", !0),
|
|
2435
2440
|
b(c.id) ? (d(), m("span", {
|
|
2436
2441
|
key: 1,
|
|
2437
2442
|
class: "error-indicator",
|
|
2438
2443
|
"aria-label": b(c.id) || "Error",
|
|
2439
2444
|
role: "status"
|
|
2440
|
-
}, " Error ", 8,
|
|
2441
|
-
y(c) ? z("", !0) : (d(), m("span",
|
|
2445
|
+
}, " Error ", 8, $a)) : z("", !0),
|
|
2446
|
+
y(c) ? z("", !0) : (d(), m("span", xa, " (zoom in) "))
|
|
2442
2447
|
])
|
|
2443
2448
|
], 2)) : (d(), m("div", {
|
|
2444
2449
|
key: 1,
|
|
2445
|
-
class:
|
|
2450
|
+
class: ae(["layer-label-only", {
|
|
2446
2451
|
"layer-unavailable": !y(c),
|
|
2447
2452
|
"layer-error": b(c.id)
|
|
2448
2453
|
}])
|
|
2449
2454
|
}, [
|
|
2450
|
-
x("span",
|
|
2455
|
+
x("span", Pa, [
|
|
2451
2456
|
me(V(r(c)) + " ", 1),
|
|
2452
|
-
u(c.id) ? (d(), m("span",
|
|
2457
|
+
u(c.id) ? (d(), m("span", _a, " Loading... ")) : z("", !0),
|
|
2453
2458
|
b(c.id) ? (d(), m("span", {
|
|
2454
2459
|
key: 1,
|
|
2455
2460
|
class: "error-indicator",
|
|
2456
2461
|
"aria-label": b(c.id) || "Error",
|
|
2457
2462
|
role: "status"
|
|
2458
|
-
}, " Error ", 8,
|
|
2459
|
-
y(c) ? z("", !0) : (d(), m("span",
|
|
2463
|
+
}, " Error ", 8, Ea)) : z("", !0),
|
|
2464
|
+
y(c) ? z("", !0) : (d(), m("span", Ma, " (zoom in) "))
|
|
2460
2465
|
])
|
|
2461
2466
|
], 2)),
|
|
2462
|
-
v(c) &&
|
|
2467
|
+
v(c) && n(c.id) ? (d(), m("div", Ta, [
|
|
2463
2468
|
x("label", {
|
|
2464
2469
|
class: "opacity-label",
|
|
2465
2470
|
for: "opacity-" + c.id
|
|
2466
|
-
}, " Opacity: " + V(Math.round(l(c.id) * 100)) + "% ", 9,
|
|
2471
|
+
}, " Opacity: " + V(Math.round(l(c.id) * 100)) + "% ", 9, za),
|
|
2467
2472
|
x("input", {
|
|
2468
2473
|
id: "opacity-" + c.id,
|
|
2469
2474
|
type: "range",
|
|
@@ -2474,9 +2479,9 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2474
2479
|
"aria-label": "Opacity for " + r(c),
|
|
2475
2480
|
class: "opacity-slider",
|
|
2476
2481
|
onInput: (S) => w(c.id, S)
|
|
2477
|
-
}, null, 40,
|
|
2482
|
+
}, null, 40, Fa)
|
|
2478
2483
|
])) : z("", !0),
|
|
2479
|
-
k(c) &&
|
|
2484
|
+
k(c) && n(c.id) && c.legend?.length ? (d(), m("ul", {
|
|
2480
2485
|
key: 3,
|
|
2481
2486
|
class: "layer-legend",
|
|
2482
2487
|
"aria-label": "Legend for " + r(c)
|
|
@@ -2504,30 +2509,27 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2504
2509
|
style: H({ backgroundColor: S.color }),
|
|
2505
2510
|
"aria-hidden": "true"
|
|
2506
2511
|
}, null, 4)) : z("", !0),
|
|
2507
|
-
x("span",
|
|
2512
|
+
x("span", Ia, V(S.label), 1)
|
|
2508
2513
|
]))), 128))
|
|
2509
|
-
], 8,
|
|
2514
|
+
], 8, Oa)) : z("", !0)
|
|
2510
2515
|
]))), 128)),
|
|
2511
|
-
e.layers.length === 0 ? (d(), m("div",
|
|
2512
|
-
]));
|
|
2516
|
+
e.layers.length === 0 ? (d(), m("div", Ra, " No layers available ")) : z("", !0)
|
|
2517
|
+
], 8, La));
|
|
2513
2518
|
}
|
|
2514
|
-
}),
|
|
2515
|
-
class: "layer-radio-set",
|
|
2516
|
-
role: "radiogroup"
|
|
2517
|
-
}, An = ["name", "checked", "disabled", "onChange"], Nn = { class: "layer-title" }, Vn = {
|
|
2519
|
+
}), ni = /* @__PURE__ */ Oe(Da, [["__scopeId", "data-v-a20fd1c9"]]), Za = ["aria-label"], Ba = ["name", "checked", "disabled", "onChange"], Aa = { class: "layer-title" }, Na = {
|
|
2518
2520
|
key: 0,
|
|
2519
2521
|
class: "loading-indicator",
|
|
2520
2522
|
role: "status"
|
|
2521
|
-
},
|
|
2523
|
+
}, Va = ["aria-label"], Ua = {
|
|
2522
2524
|
key: 2,
|
|
2523
2525
|
class: "zoom-indicator"
|
|
2524
|
-
},
|
|
2526
|
+
}, Wa = {
|
|
2525
2527
|
key: 0,
|
|
2526
2528
|
class: "opacity-control"
|
|
2527
|
-
},
|
|
2529
|
+
}, ja = ["for"], qa = ["id", "value", "aria-label", "onInput"], Ga = ["aria-label"], Ha = { class: "legend-label" }, Ka = {
|
|
2528
2530
|
key: 0,
|
|
2529
2531
|
class: "empty-state"
|
|
2530
|
-
},
|
|
2532
|
+
}, Ja = /* @__PURE__ */ Se({
|
|
2531
2533
|
__name: "LayerRadioButtonSet",
|
|
2532
2534
|
props: {
|
|
2533
2535
|
layers: {},
|
|
@@ -2538,12 +2540,13 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2538
2540
|
currentZoom: { default: 12 },
|
|
2539
2541
|
showOpacity: { type: Boolean, default: !0 },
|
|
2540
2542
|
showLegend: { type: Boolean, default: !0 },
|
|
2541
|
-
groupName: { default: "layer-radio-group" }
|
|
2543
|
+
groupName: { default: "layer-radio-group" },
|
|
2544
|
+
groupLabel: {}
|
|
2542
2545
|
},
|
|
2543
2546
|
emits: ["selectLayer", "setOpacity"],
|
|
2544
2547
|
setup(e, { emit: i }) {
|
|
2545
2548
|
const t = e, o = i;
|
|
2546
|
-
function
|
|
2549
|
+
function n(w) {
|
|
2547
2550
|
return t.visibleLayerIds.has(w);
|
|
2548
2551
|
}
|
|
2549
2552
|
function l(w) {
|
|
@@ -2559,7 +2562,7 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2559
2562
|
const g = t.currentZoom, f = w.minZoom, c = w.maxZoom;
|
|
2560
2563
|
return !(f !== void 0 && g < f || c !== void 0 && g > c);
|
|
2561
2564
|
}
|
|
2562
|
-
function
|
|
2565
|
+
function P(w) {
|
|
2563
2566
|
return t.showOpacity ? w.displayOptions?.shouldShowSlider !== !1 : !1;
|
|
2564
2567
|
}
|
|
2565
2568
|
function v(w) {
|
|
@@ -2576,13 +2579,17 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2576
2579
|
const f = g.target;
|
|
2577
2580
|
o("setOpacity", w, parseFloat(f.value));
|
|
2578
2581
|
}
|
|
2579
|
-
return (w, g) => (d(), m("div",
|
|
2582
|
+
return (w, g) => (d(), m("div", {
|
|
2583
|
+
class: "layer-radio-set",
|
|
2584
|
+
role: "radiogroup",
|
|
2585
|
+
"aria-label": e.groupLabel
|
|
2586
|
+
}, [
|
|
2580
2587
|
(d(!0), m(oe, null, re(e.layers, (f) => (d(), m("div", {
|
|
2581
2588
|
key: f.id,
|
|
2582
2589
|
class: "layer-item"
|
|
2583
2590
|
}, [
|
|
2584
2591
|
x("label", {
|
|
2585
|
-
class:
|
|
2592
|
+
class: ae(["layer-radio", {
|
|
2586
2593
|
"layer-unavailable": !y(f),
|
|
2587
2594
|
"layer-error": b(f.id)
|
|
2588
2595
|
}])
|
|
@@ -2590,27 +2597,27 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2590
2597
|
x("input", {
|
|
2591
2598
|
type: "radio",
|
|
2592
2599
|
name: e.groupName,
|
|
2593
|
-
checked:
|
|
2600
|
+
checked: n(f.id),
|
|
2594
2601
|
disabled: !y(f),
|
|
2595
2602
|
onChange: (c) => r(f.id)
|
|
2596
|
-
}, null, 40,
|
|
2597
|
-
x("span",
|
|
2603
|
+
}, null, 40, Ba),
|
|
2604
|
+
x("span", Aa, [
|
|
2598
2605
|
me(V(k(f)) + " ", 1),
|
|
2599
|
-
u(f.id) ? (d(), m("span",
|
|
2606
|
+
u(f.id) ? (d(), m("span", Na, " Loading... ")) : z("", !0),
|
|
2600
2607
|
b(f.id) ? (d(), m("span", {
|
|
2601
2608
|
key: 1,
|
|
2602
2609
|
class: "error-indicator",
|
|
2603
2610
|
"aria-label": b(f.id) || "Error",
|
|
2604
2611
|
role: "status"
|
|
2605
|
-
}, " Error ", 8,
|
|
2606
|
-
y(f) ? z("", !0) : (d(), m("span",
|
|
2612
|
+
}, " Error ", 8, Va)) : z("", !0),
|
|
2613
|
+
y(f) ? z("", !0) : (d(), m("span", Ua, " (zoom in) "))
|
|
2607
2614
|
])
|
|
2608
2615
|
], 2),
|
|
2609
|
-
|
|
2616
|
+
P(f) && n(f.id) ? (d(), m("div", Wa, [
|
|
2610
2617
|
x("label", {
|
|
2611
2618
|
class: "opacity-label",
|
|
2612
2619
|
for: "opacity-" + f.id
|
|
2613
|
-
}, " Opacity: " + V(Math.round(l(f.id) * 100)) + "% ", 9,
|
|
2620
|
+
}, " Opacity: " + V(Math.round(l(f.id) * 100)) + "% ", 9, ja),
|
|
2614
2621
|
x("input", {
|
|
2615
2622
|
id: "opacity-" + f.id,
|
|
2616
2623
|
type: "range",
|
|
@@ -2621,9 +2628,9 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2621
2628
|
"aria-label": "Opacity for " + k(f),
|
|
2622
2629
|
class: "opacity-slider",
|
|
2623
2630
|
onInput: (c) => h(f.id, c)
|
|
2624
|
-
}, null, 40,
|
|
2631
|
+
}, null, 40, qa)
|
|
2625
2632
|
])) : z("", !0),
|
|
2626
|
-
v(f) &&
|
|
2633
|
+
v(f) && n(f.id) && f.legend?.length ? (d(), m("ul", {
|
|
2627
2634
|
key: 1,
|
|
2628
2635
|
class: "layer-legend",
|
|
2629
2636
|
"aria-label": "Legend for " + k(f)
|
|
@@ -2651,16 +2658,16 @@ const ln = { class: "layerboard-layout" }, rn = ["aria-expanded"], sn = {
|
|
|
2651
2658
|
style: H({ backgroundColor: c.color }),
|
|
2652
2659
|
"aria-hidden": "true"
|
|
2653
2660
|
}, null, 4)) : z("", !0),
|
|
2654
|
-
x("span",
|
|
2661
|
+
x("span", Ha, V(c.label), 1)
|
|
2655
2662
|
]))), 128))
|
|
2656
|
-
], 8,
|
|
2663
|
+
], 8, Ga)) : z("", !0)
|
|
2657
2664
|
]))), 128)),
|
|
2658
|
-
e.layers.length === 0 ? (d(), m("div",
|
|
2659
|
-
]));
|
|
2665
|
+
e.layers.length === 0 ? (d(), m("div", Ka, " No layers available ")) : z("", !0)
|
|
2666
|
+
], 8, Za));
|
|
2660
2667
|
}
|
|
2661
|
-
}),
|
|
2662
|
-
function
|
|
2663
|
-
const i = C([]), t = C(/* @__PURE__ */ new Set()), o = C({}),
|
|
2668
|
+
}), li = /* @__PURE__ */ Oe(Ja, [["__scopeId", "data-v-ed130a35"]]);
|
|
2669
|
+
function ri(e) {
|
|
2670
|
+
const i = C([]), t = C(/* @__PURE__ */ new Set()), o = C({}), n = C(/* @__PURE__ */ new Set()), l = C({}), u = C(""), b = C(!1), y = C(!1), P = C(null), v = I(() => {
|
|
2664
2671
|
if (!u.value.trim())
|
|
2665
2672
|
return i.value;
|
|
2666
2673
|
const T = u.value.toLowerCase();
|
|
@@ -2674,7 +2681,7 @@ function si(e) {
|
|
|
2674
2681
|
})));
|
|
2675
2682
|
async function r() {
|
|
2676
2683
|
if (!y.value) {
|
|
2677
|
-
b.value = !0,
|
|
2684
|
+
b.value = !0, P.value = null;
|
|
2678
2685
|
try {
|
|
2679
2686
|
let T;
|
|
2680
2687
|
e.mode === "dynamic" || !e.mode ? e.webMapId ? T = await h(e.webMapId) : T = await yt() : T = await yt(), i.value = T;
|
|
@@ -2683,7 +2690,7 @@ function si(e) {
|
|
|
2683
2690
|
A[q.id] = q.opacity ?? 1;
|
|
2684
2691
|
}), o.value = A, y.value = !0;
|
|
2685
2692
|
} catch (T) {
|
|
2686
|
-
|
|
2693
|
+
P.value = T instanceof Error ? T : new Error("Failed to initialize layerboard");
|
|
2687
2694
|
} finally {
|
|
2688
2695
|
b.value = !1;
|
|
2689
2696
|
}
|
|
@@ -2710,8 +2717,8 @@ function si(e) {
|
|
|
2710
2717
|
u.value = T;
|
|
2711
2718
|
}
|
|
2712
2719
|
function c(T, A) {
|
|
2713
|
-
const q = new Set(
|
|
2714
|
-
A ? q.add(T) : q.delete(T),
|
|
2720
|
+
const q = new Set(n.value);
|
|
2721
|
+
A ? q.add(T) : q.delete(T), n.value = q;
|
|
2715
2722
|
}
|
|
2716
2723
|
function S(T, A) {
|
|
2717
2724
|
if (A)
|
|
@@ -2722,19 +2729,19 @@ function si(e) {
|
|
|
2722
2729
|
}
|
|
2723
2730
|
}
|
|
2724
2731
|
function F() {
|
|
2725
|
-
i.value = [], t.value = /* @__PURE__ */ new Set(), o.value = {},
|
|
2732
|
+
i.value = [], t.value = /* @__PURE__ */ new Set(), o.value = {}, n.value = /* @__PURE__ */ new Set(), l.value = {}, u.value = "", b.value = !1, y.value = !1, P.value = null;
|
|
2726
2733
|
}
|
|
2727
2734
|
return {
|
|
2728
2735
|
// State (readonly)
|
|
2729
2736
|
layerConfigs: j(i),
|
|
2730
2737
|
visibleLayers: j(t),
|
|
2731
2738
|
layerOpacities: j(o),
|
|
2732
|
-
loadingLayers: j(
|
|
2739
|
+
loadingLayers: j(n),
|
|
2733
2740
|
layerErrors: j(l),
|
|
2734
2741
|
searchQuery: j(u),
|
|
2735
2742
|
isLoading: j(b),
|
|
2736
2743
|
isInitialized: j(y),
|
|
2737
|
-
error: j(
|
|
2744
|
+
error: j(P),
|
|
2738
2745
|
// Computed
|
|
2739
2746
|
filteredLayerConfigs: v,
|
|
2740
2747
|
layerList: k,
|
|
@@ -2750,12 +2757,12 @@ function si(e) {
|
|
|
2750
2757
|
reset: F
|
|
2751
2758
|
};
|
|
2752
2759
|
}
|
|
2753
|
-
function
|
|
2760
|
+
function si() {
|
|
2754
2761
|
const e = C([]), i = C(/* @__PURE__ */ new Set()), t = C(/* @__PURE__ */ new Set());
|
|
2755
2762
|
function o(l) {
|
|
2756
2763
|
i.value.has(l) ? i.value.delete(l) : i.value.add(l);
|
|
2757
2764
|
}
|
|
2758
|
-
function
|
|
2765
|
+
function n(l) {
|
|
2759
2766
|
e.value = l;
|
|
2760
2767
|
}
|
|
2761
2768
|
return {
|
|
@@ -2763,19 +2770,19 @@ function ci() {
|
|
|
2763
2770
|
visibleLayerIds: I(() => i.value),
|
|
2764
2771
|
loadingLayerIds: I(() => t.value),
|
|
2765
2772
|
toggleLayer: o,
|
|
2766
|
-
setLayers:
|
|
2773
|
+
setLayers: n
|
|
2767
2774
|
};
|
|
2768
2775
|
}
|
|
2769
|
-
function
|
|
2770
|
-
const i = C(null), t = C(!1), o = C(null),
|
|
2776
|
+
function Qa(e) {
|
|
2777
|
+
const i = C(null), t = C(!1), o = C(null), n = C(0);
|
|
2771
2778
|
async function l(y = {}) {
|
|
2772
2779
|
t.value = !0, o.value = null;
|
|
2773
|
-
const
|
|
2780
|
+
const P = e.pageSize || 2e3;
|
|
2774
2781
|
let v = 0, k = [], r = !0;
|
|
2775
2782
|
try {
|
|
2776
2783
|
for (; r; ) {
|
|
2777
2784
|
const w = e.url.replace(/\/$/, ""), g = encodeURIComponent(y.where || e.where || "1=1");
|
|
2778
|
-
let f = `${w}/query?where=${g}&outFields=*&returnGeometry=true&resultRecordCount=${
|
|
2785
|
+
let f = `${w}/query?where=${g}&outFields=*&returnGeometry=true&resultRecordCount=${P}&resultOffset=${v}&f=geojson`;
|
|
2779
2786
|
if (y.bounds) {
|
|
2780
2787
|
const F = JSON.stringify({
|
|
2781
2788
|
xmin: y.bounds.west,
|
|
@@ -2790,13 +2797,13 @@ function Xn(e) {
|
|
|
2790
2797
|
if (!c.ok)
|
|
2791
2798
|
throw new Error(`HTTP ${c.status}: ${c.statusText}`);
|
|
2792
2799
|
const S = await c.json();
|
|
2793
|
-
S.features && S.features.length > 0 ? (k = k.concat(S.features), v += S.features.length, r = S.features.length ===
|
|
2800
|
+
S.features && S.features.length > 0 ? (k = k.concat(S.features), v += S.features.length, r = S.features.length === P) : r = !1;
|
|
2794
2801
|
}
|
|
2795
2802
|
const h = {
|
|
2796
2803
|
type: "FeatureCollection",
|
|
2797
2804
|
features: k
|
|
2798
2805
|
};
|
|
2799
|
-
return i.value = h,
|
|
2806
|
+
return i.value = h, n.value = k.length, h;
|
|
2800
2807
|
} catch (h) {
|
|
2801
2808
|
const w = h instanceof Error ? h : new Error("Failed to fetch features");
|
|
2802
2809
|
throw o.value = w, w;
|
|
@@ -2805,7 +2812,7 @@ function Xn(e) {
|
|
|
2805
2812
|
}
|
|
2806
2813
|
}
|
|
2807
2814
|
function u() {
|
|
2808
|
-
i.value = null,
|
|
2815
|
+
i.value = null, n.value = 0, o.value = null;
|
|
2809
2816
|
}
|
|
2810
2817
|
async function b(y = {}) {
|
|
2811
2818
|
return l(y);
|
|
@@ -2815,7 +2822,7 @@ function Xn(e) {
|
|
|
2815
2822
|
data: j(i),
|
|
2816
2823
|
isLoading: j(t),
|
|
2817
2824
|
error: j(o),
|
|
2818
|
-
totalFeatures: j(
|
|
2825
|
+
totalFeatures: j(n),
|
|
2819
2826
|
// Config
|
|
2820
2827
|
config: e,
|
|
2821
2828
|
// Methods
|
|
@@ -2824,13 +2831,13 @@ function Xn(e) {
|
|
|
2824
2831
|
clear: u
|
|
2825
2832
|
};
|
|
2826
2833
|
}
|
|
2827
|
-
function
|
|
2828
|
-
const o =
|
|
2834
|
+
function ci(e, i, t) {
|
|
2835
|
+
const o = Qa(e);
|
|
2829
2836
|
return Te(
|
|
2830
2837
|
i,
|
|
2831
|
-
async (
|
|
2832
|
-
if (
|
|
2833
|
-
const l = t(
|
|
2838
|
+
async (n) => {
|
|
2839
|
+
if (n) {
|
|
2840
|
+
const l = t(n);
|
|
2834
2841
|
await o.fetch(l);
|
|
2835
2842
|
}
|
|
2836
2843
|
},
|
|
@@ -2838,21 +2845,21 @@ function ui(e, i, t) {
|
|
|
2838
2845
|
), o;
|
|
2839
2846
|
}
|
|
2840
2847
|
export {
|
|
2841
|
-
|
|
2848
|
+
ni as LayerCheckboxSet,
|
|
2842
2849
|
No as LayerPanel,
|
|
2843
|
-
|
|
2844
|
-
|
|
2850
|
+
li as LayerRadioButtonSet,
|
|
2851
|
+
ai as Layerboard,
|
|
2845
2852
|
oo as MapPanel,
|
|
2846
|
-
|
|
2847
|
-
|
|
2853
|
+
ii as TopicAccordion,
|
|
2854
|
+
ti as WEBMAP_ID,
|
|
2848
2855
|
ht as buildWebMapUrl,
|
|
2849
|
-
|
|
2856
|
+
ea as clearCache,
|
|
2850
2857
|
yt as getLayerConfigs,
|
|
2851
|
-
|
|
2858
|
+
oi as getWebMapUrl,
|
|
2852
2859
|
Tt as transformWebMapToLayerConfigs,
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2860
|
+
ia as useApiDataSources,
|
|
2861
|
+
Qa as useDataSource,
|
|
2862
|
+
si as useLayerConfig,
|
|
2863
|
+
ri as useLayerboard,
|
|
2864
|
+
ci as useReactiveDataSource
|
|
2858
2865
|
};
|