@phila/layerboard 3.0.0-beta.28 → 3.0.0-beta.29
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/components/Layerboard.vue.d.ts +6 -0
- package/dist/composables/useLayerConfig.d.ts +2 -0
- package/dist/composables/useLayerboard.d.ts +8 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +582 -574
- package/dist/layerboard.css +1 -1
- package/dist/types/layer.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Map as
|
|
3
|
-
import { cn as mt, Icon as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as ye, ref as k, watch as Oe, computed as z, nextTick as Ne, onMounted as et, onUnmounted as _t, createElementBlock as $, openBlock as m, createVNode as H, unref as d, withCtx as Ge, createBlock as q, createCommentVNode as A, Fragment as ue, renderList as ve, useAttrs as jt, toRef as qt, normalizeClass as re, createElementVNode as P, toDisplayString as G, renderSlot as pe, withDirectives as Rt, mergeProps as yt, vModelDynamic as Gt, createTextVNode as xe, normalizeProps as kt, guardReactiveProps as xt, normalizeStyle as fe, withModifiers as Ht, readonly as j, provide as Z, onBeforeUnmount as Jt, useId as $t, resolveComponent as Kt, vShow as Qt } from "vue";
|
|
2
|
+
import { Map as Xt, DrawTool as Yt, RasterLayer as Mt, CircleLayer as Pt, FillLayer as Tt, LineLayer as ft, MapMarker as eo, MapPopup as to } from "@phila/phila-ui-map-core";
|
|
3
|
+
import { cn as mt, Icon as ke, BaseLink as oo, ActionContent as Ft } from "@phila/phila-ui-core";
|
|
4
|
+
const ao = { class: "map-panel" }, io = /* @__PURE__ */ ye({
|
|
5
5
|
__name: "MapPanel",
|
|
6
6
|
props: {
|
|
7
7
|
visibleLayers: {},
|
|
@@ -34,45 +34,45 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
34
34
|
}
|
|
35
35
|
const x = k({}), h = k(null), g = k(/* @__PURE__ */ new Set());
|
|
36
36
|
async function a(t, u, s, b, C) {
|
|
37
|
-
const F = encodeURIComponent(b || "1=1"),
|
|
37
|
+
const F = encodeURIComponent(b || "1=1"), B = JSON.stringify({
|
|
38
38
|
xmin: u.west,
|
|
39
39
|
ymin: u.south,
|
|
40
40
|
xmax: u.east,
|
|
41
41
|
ymax: u.north,
|
|
42
42
|
spatialReference: { wkid: 4326 }
|
|
43
|
-
}),
|
|
44
|
-
let oe = 0,
|
|
45
|
-
for (;
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
48
|
-
throw new Error(`HTTP ${
|
|
49
|
-
const
|
|
50
|
-
|
|
43
|
+
}), Y = C !== void 0 && C < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, C) * 512)}` : "", V = 2e3;
|
|
44
|
+
let oe = 0, R = [], K = !0;
|
|
45
|
+
for (; K; ) {
|
|
46
|
+
const W = `${t}/query?where=${F}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${V}&resultOffset=${oe}${Y}&f=geojson`, ae = await fetch(W);
|
|
47
|
+
if (!ae.ok)
|
|
48
|
+
throw new Error(`HTTP ${ae.status}: ${ae.statusText}`);
|
|
49
|
+
const ce = await ae.json();
|
|
50
|
+
ce.features && ce.features.length > 0 ? (R = R.concat(ce.features), oe += ce.features.length, K = ce.features.length === V) : K = !1;
|
|
51
51
|
}
|
|
52
|
-
return
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
for (const
|
|
56
|
-
|
|
57
|
-
return { ...
|
|
52
|
+
return R = R.map((W) => {
|
|
53
|
+
if (W.properties) {
|
|
54
|
+
const ae = {};
|
|
55
|
+
for (const ce of Object.keys(W.properties))
|
|
56
|
+
ae[ce.toLowerCase()] = W.properties[ce];
|
|
57
|
+
return { ...W, properties: ae };
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return W;
|
|
60
60
|
}), {
|
|
61
61
|
type: "FeatureCollection",
|
|
62
|
-
features:
|
|
62
|
+
features: R
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
async function v(t, u, s) {
|
|
66
66
|
const b = u.map(async (C) => {
|
|
67
|
-
const F = l.layerList.find((
|
|
67
|
+
const F = l.layerList.find((B) => B.config.id === C)?.config;
|
|
68
68
|
if (F && !(s !== void 0 && F.minZoom !== void 0 && s < F.minZoom)) {
|
|
69
69
|
o("layerLoading", C, !0);
|
|
70
70
|
try {
|
|
71
|
-
const
|
|
72
|
-
x.value = { ...x.value, [C]:
|
|
73
|
-
} catch (
|
|
74
|
-
const
|
|
75
|
-
o("layerError", C,
|
|
71
|
+
const B = await a(F.url, t, C, F.where, s);
|
|
72
|
+
x.value = { ...x.value, [C]: B }, o("layerError", C, null);
|
|
73
|
+
} catch (B) {
|
|
74
|
+
const Y = B instanceof Error ? B.message : "Failed to load";
|
|
75
|
+
o("layerError", C, Y);
|
|
76
76
|
} finally {
|
|
77
77
|
o("layerLoading", C, !1);
|
|
78
78
|
}
|
|
@@ -102,7 +102,7 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
102
102
|
Oe(
|
|
103
103
|
() => l.visibleLayers,
|
|
104
104
|
async () => {
|
|
105
|
-
if (
|
|
105
|
+
if (se.value.length > 0 && le(), h.value) {
|
|
106
106
|
const t = new Set(l.visibleLayers), u = [...t].filter((s) => !g.value.has(s));
|
|
107
107
|
if (g.value = new Set(t), u.length > 0) {
|
|
108
108
|
const s = n.value?.getZoom();
|
|
@@ -117,7 +117,7 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
117
117
|
function D(t) {
|
|
118
118
|
return !!x.value[t.id];
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const X = z(
|
|
121
121
|
() => l.layerList.filter((t) => t.config.type === "circle" && E(t.config.id) && D(t.config)).map((t) => t.config)
|
|
122
122
|
), T = z(
|
|
123
123
|
() => l.layerList.filter((t) => t.config.type === "fill" && E(t.config.id) && D(t.config)).map((t) => t.config)
|
|
@@ -144,16 +144,16 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
144
144
|
function te(t) {
|
|
145
145
|
return l.visibleTiledLayers?.has(t) ?? !1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function N(t) {
|
|
148
148
|
return l.tiledLayerOpacities?.[t] ?? 1;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function me(t) {
|
|
151
151
|
return `${t.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function he(t) {
|
|
154
154
|
return {
|
|
155
155
|
type: "raster",
|
|
156
|
-
tiles: [
|
|
156
|
+
tiles: [me(t.url)],
|
|
157
157
|
tileSize: 256,
|
|
158
158
|
attribution: t.attribution || ""
|
|
159
159
|
};
|
|
@@ -169,8 +169,8 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
169
169
|
const b = await s.json(), C = b.minScale || 0;
|
|
170
170
|
let F = b.maxScale || 0;
|
|
171
171
|
if (b.layers && b.layers.length > 0)
|
|
172
|
-
for (const
|
|
173
|
-
|
|
172
|
+
for (const B of b.layers)
|
|
173
|
+
B.maxScale && B.maxScale > 0 && (F === 0 || B.maxScale < F) && (F = B.maxScale);
|
|
174
174
|
F === 0 && (F = 72e3), Ue.value = {
|
|
175
175
|
...Ue.value,
|
|
176
176
|
[t.id]: { minScale: C, maxScale: F }
|
|
@@ -202,34 +202,34 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
202
202
|
attribution: t.attribution || ""
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Me(t) {
|
|
206
206
|
return { type: "geojson", data: x.value[t.id], tolerance: 0 };
|
|
207
207
|
}
|
|
208
208
|
function Re(t) {
|
|
209
209
|
return l.layerOpacities[t] ?? 1;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function Pe(t) {
|
|
212
212
|
const u = Re(t.id), s = t.type === "circle" ? "circle-opacity" : t.type === "fill" ? "fill-opacity" : "line-opacity";
|
|
213
213
|
if (t.type === "fill" && t.paint["fill-opacity"] === 0)
|
|
214
214
|
return { ...t.paint, "fill-opacity": 0 };
|
|
215
|
-
const b = t.type === "circle" ? "circle-color" : t.type === "fill" ? "fill-color" : "line-color", C = { ...t.paint }, F = C[b],
|
|
216
|
-
if (
|
|
215
|
+
const b = t.type === "circle" ? "circle-color" : t.type === "fill" ? "fill-color" : "line-color", C = { ...t.paint }, F = C[b], B = C[s] === 1, Y = typeof F == "string" && F.startsWith("rgba(");
|
|
216
|
+
if (B && Y) {
|
|
217
217
|
if (u === 1)
|
|
218
218
|
return C;
|
|
219
219
|
{
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
222
|
-
const [, oe,
|
|
223
|
-
C[b] = `rgba(${oe}, ${
|
|
220
|
+
const V = F.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
221
|
+
if (V && V[4]) {
|
|
222
|
+
const [, oe, R, K, W] = V, ae = parseFloat(W) * u;
|
|
223
|
+
C[b] = `rgba(${oe}, ${R}, ${K}, ${ae})`, C[s] = 1;
|
|
224
224
|
}
|
|
225
225
|
return C;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
if (
|
|
231
|
-
const [, oe,
|
|
232
|
-
C[b] = `rgb(${oe}, ${
|
|
228
|
+
if (Y) {
|
|
229
|
+
const V = F.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
230
|
+
if (V) {
|
|
231
|
+
const [, oe, R, K] = V;
|
|
232
|
+
C[b] = `rgb(${oe}, ${R}, ${K})`;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
return C[s] = u, C;
|
|
@@ -238,7 +238,7 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
238
238
|
const u = Re(t.id);
|
|
239
239
|
return { ...t.outlinePaint, "line-opacity": u };
|
|
240
240
|
}
|
|
241
|
-
const
|
|
241
|
+
const se = k([]), Ae = k(null), ie = k(0);
|
|
242
242
|
function Fe(t) {
|
|
243
243
|
const u = t.replace(/-outline$/, "");
|
|
244
244
|
return l.layerList.find((b) => b.config.id === u)?.config;
|
|
@@ -249,7 +249,7 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
249
249
|
return C == null ? "" : String(C);
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function we(t) {
|
|
253
253
|
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
254
254
|
}
|
|
255
255
|
function We(t, u, s) {
|
|
@@ -280,8 +280,8 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
280
280
|
return String(t);
|
|
281
281
|
const F = t.toFixed(b);
|
|
282
282
|
if (C) {
|
|
283
|
-
const
|
|
284
|
-
return
|
|
283
|
+
const B = F.split("."), Y = B[0] || "0", V = B[1], oe = Y.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
284
|
+
return V ? `${oe}.${V}` : oe;
|
|
285
285
|
}
|
|
286
286
|
return F;
|
|
287
287
|
}
|
|
@@ -308,112 +308,120 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
308
308
|
}
|
|
309
309
|
return null;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Le(t, u) {
|
|
312
312
|
const s = /* @__PURE__ */ new Map();
|
|
313
313
|
return u.forEach((b, C) => {
|
|
314
314
|
s.set(b.id, C);
|
|
315
315
|
}), t.sort((b, C) => {
|
|
316
|
-
const F = b.layer.id.replace(/-outline$/, ""),
|
|
317
|
-
return (s.get(
|
|
316
|
+
const F = b.layer.id.replace(/-outline$/, ""), B = C.layer.id.replace(/-outline$/, ""), Y = s.get(F) ?? -1;
|
|
317
|
+
return (s.get(B) ?? -1) - Y;
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Be(t) {
|
|
321
321
|
const u = n.value;
|
|
322
322
|
if (!u) return;
|
|
323
323
|
const s = [];
|
|
324
|
-
l.layerList.forEach((
|
|
325
|
-
const
|
|
326
|
-
l.visibleLayers.has(
|
|
324
|
+
l.layerList.forEach((R) => {
|
|
325
|
+
const K = R.config;
|
|
326
|
+
l.visibleLayers.has(K.id) && (s.push(K.id), K.outlinePaint && s.push(`${K.id}-outline`));
|
|
327
327
|
});
|
|
328
328
|
const b = u.project([t.lngLat.lng, t.lngLat.lat]), C = u.queryRenderedFeatures(b, {
|
|
329
329
|
layers: s
|
|
330
330
|
});
|
|
331
331
|
if (C.length === 0) return;
|
|
332
|
-
const F = je(C),
|
|
333
|
-
const
|
|
334
|
-
if (!
|
|
335
|
-
const
|
|
332
|
+
const F = je(C), B = l.layerList.map((R) => R.config), V = Le(F, B).map((R) => {
|
|
333
|
+
const K = R.layer.id.replace(/-outline$/, ""), W = Fe(K);
|
|
334
|
+
if (!W) return null;
|
|
335
|
+
const ae = Ke(W.id, R.properties || {});
|
|
336
336
|
return {
|
|
337
|
-
layerId:
|
|
338
|
-
layerTitle:
|
|
339
|
-
properties:
|
|
340
|
-
geometry:
|
|
341
|
-
popupConfig:
|
|
337
|
+
layerId: W.id,
|
|
338
|
+
layerTitle: W.title,
|
|
339
|
+
properties: R.properties || {},
|
|
340
|
+
geometry: ae || R.geometry,
|
|
341
|
+
popupConfig: W.popup
|
|
342
342
|
};
|
|
343
|
-
}).filter((
|
|
344
|
-
if (
|
|
345
|
-
|
|
346
|
-
|
|
343
|
+
}).filter((R) => R !== null);
|
|
344
|
+
if (V.length === 0) return;
|
|
345
|
+
V.sort((R, K) => {
|
|
346
|
+
if (R.layerId !== K.layerId) return 0;
|
|
347
|
+
const W = R.popupConfig?.popupSortField;
|
|
348
|
+
if (!W) return 0;
|
|
349
|
+
const ae = R.properties[W], ce = K.properties[W];
|
|
350
|
+
if (ae == null || ce == null) return 0;
|
|
351
|
+
const Ct = R.popupConfig?.popupSortOrder === "asc" ? 1 : -1;
|
|
352
|
+
return ae < ce ? Ct : ae > ce ? -Ct : 0;
|
|
353
|
+
}), se.value = V, ie.value = 0, Ae.value = [t.lngLat.lng, t.lngLat.lat];
|
|
354
|
+
const oe = V[0];
|
|
347
355
|
if (oe) {
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
350
|
-
const
|
|
356
|
+
const R = Fe(oe.layerId);
|
|
357
|
+
if (R) {
|
|
358
|
+
const K = M(oe.geometry), W = J(R.id, R.type);
|
|
351
359
|
y.value = {
|
|
352
360
|
geometry: oe.geometry,
|
|
353
|
-
geometryType:
|
|
354
|
-
layerId:
|
|
361
|
+
geometryType: K,
|
|
362
|
+
layerId: R.id,
|
|
355
363
|
properties: oe.properties,
|
|
356
|
-
originalStyle:
|
|
364
|
+
originalStyle: W
|
|
357
365
|
};
|
|
358
366
|
}
|
|
359
367
|
}
|
|
360
368
|
}
|
|
361
|
-
function
|
|
362
|
-
|
|
369
|
+
function le() {
|
|
370
|
+
se.value = [], Ae.value = null, ie.value = 0, y.value = null;
|
|
363
371
|
}
|
|
364
372
|
function Qe(t) {
|
|
365
|
-
if (
|
|
373
|
+
if (se.value.length === 0) return;
|
|
366
374
|
const u = t.target;
|
|
367
375
|
if (!(u.tagName === "INPUT" || u.tagName === "TEXTAREA" || u.isContentEditable))
|
|
368
376
|
switch (t.key) {
|
|
369
377
|
case "ArrowLeft":
|
|
370
378
|
case "ArrowUp":
|
|
371
|
-
t.preventDefault(),
|
|
379
|
+
t.preventDefault(), de();
|
|
372
380
|
break;
|
|
373
381
|
case "ArrowRight":
|
|
374
382
|
case "ArrowDown":
|
|
375
383
|
t.preventDefault(), Ee();
|
|
376
384
|
break;
|
|
377
385
|
case "Escape":
|
|
378
|
-
t.preventDefault(),
|
|
386
|
+
t.preventDefault(), le();
|
|
379
387
|
break;
|
|
380
388
|
}
|
|
381
389
|
}
|
|
382
390
|
et(() => {
|
|
383
391
|
window.addEventListener("keydown", Qe);
|
|
384
|
-
}),
|
|
392
|
+
}), _t(() => {
|
|
385
393
|
window.removeEventListener("keydown", Qe);
|
|
386
394
|
});
|
|
387
395
|
function Ee() {
|
|
388
|
-
const t =
|
|
389
|
-
t <= 1 ||
|
|
396
|
+
const t = se.value.length;
|
|
397
|
+
t <= 1 || ie.value >= t - 1 || (ie.value = ie.value + 1);
|
|
390
398
|
}
|
|
391
|
-
function
|
|
392
|
-
|
|
399
|
+
function de() {
|
|
400
|
+
se.value.length <= 1 || ie.value <= 0 || (ie.value = ie.value - 1);
|
|
393
401
|
}
|
|
394
|
-
const Ie = z(() =>
|
|
402
|
+
const Ie = z(() => se.value.length === 0 ? null : se.value[ie.value]), ge = z(() => {
|
|
395
403
|
const t = Ie.value;
|
|
396
404
|
return !t || !t.popupConfig ? t?.layerTitle || "" : ct(t.popupConfig.title, t.properties);
|
|
397
405
|
}), qe = z(() => {
|
|
398
406
|
const t = Ie.value;
|
|
399
407
|
if (!t) return "";
|
|
400
408
|
let u = '<div class="popup-content">';
|
|
401
|
-
if (u += `<h3 class="popup-title">${
|
|
402
|
-
u += `<table class="popup-table" aria-label="${
|
|
409
|
+
if (u += `<h3 class="popup-title">${we(ge.value)}</h3>`, t.popupConfig?.fields?.length) {
|
|
410
|
+
u += `<table class="popup-table" aria-label="${we(ge.value)}">`;
|
|
403
411
|
for (const s of t.popupConfig.fields) {
|
|
404
|
-
const b = We(t.properties[s.field], s.format, t.popupConfig.showTime), C = s.label.toLowerCase(), F = C.includes("url") || C.includes("website"),
|
|
405
|
-
u += `<tr><th scope="row">${
|
|
412
|
+
const b = We(t.properties[s.field], s.format, t.popupConfig.showTime), C = s.label.toLowerCase(), F = C.includes("url") || C.includes("website"), B = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || F && b.includes("."), Y = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`, V = B ? `<a href="${we(Y)}" target="_blank" rel="noopener noreferrer">${we(b)}</a>` : we(b);
|
|
413
|
+
u += `<tr><th scope="row">${we(s.label)}</th><td>${V}</td></tr>`;
|
|
406
414
|
}
|
|
407
415
|
u += "</table>";
|
|
408
416
|
}
|
|
409
417
|
return u += "</div>", u;
|
|
410
|
-
}),
|
|
418
|
+
}), Se = k({
|
|
411
419
|
type: "FeatureCollection",
|
|
412
420
|
features: []
|
|
413
|
-
}),
|
|
421
|
+
}), ne = k({
|
|
414
422
|
type: "FeatureCollection",
|
|
415
423
|
features: []
|
|
416
|
-
}),
|
|
424
|
+
}), Ze = k({
|
|
417
425
|
type: "FeatureCollection",
|
|
418
426
|
features: []
|
|
419
427
|
}), ut = {
|
|
@@ -433,7 +441,7 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
433
441
|
function M(t) {
|
|
434
442
|
return t.type;
|
|
435
443
|
}
|
|
436
|
-
function
|
|
444
|
+
function J(t, u) {
|
|
437
445
|
const s = Fe(t);
|
|
438
446
|
if (!s) return { radius: 5, width: 2 };
|
|
439
447
|
const b = s.paint || {};
|
|
@@ -454,10 +462,10 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
454
462
|
}
|
|
455
463
|
return { radius: 5, width: 2 };
|
|
456
464
|
}
|
|
457
|
-
function
|
|
465
|
+
function U(t) {
|
|
458
466
|
return !t || t.length === 0 ? [] : t[0] ?? [];
|
|
459
467
|
}
|
|
460
|
-
function
|
|
468
|
+
function Q(t) {
|
|
461
469
|
const { geometry: u, geometryType: s, originalStyle: b } = t;
|
|
462
470
|
if (s === "Point" || s === "MultiPoint") {
|
|
463
471
|
const F = (b.radius || 5) + 3;
|
|
@@ -490,7 +498,7 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
490
498
|
};
|
|
491
499
|
}
|
|
492
500
|
if (s === "Polygon") {
|
|
493
|
-
const C = u.coordinates, F =
|
|
501
|
+
const C = u.coordinates, F = U(C), Y = (b.width || 2) + 3;
|
|
494
502
|
return {
|
|
495
503
|
type: "FeatureCollection",
|
|
496
504
|
features: [
|
|
@@ -501,24 +509,24 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
501
509
|
coordinates: F
|
|
502
510
|
},
|
|
503
511
|
properties: {
|
|
504
|
-
highlightWidth:
|
|
512
|
+
highlightWidth: Y
|
|
505
513
|
}
|
|
506
514
|
}
|
|
507
515
|
]
|
|
508
516
|
};
|
|
509
517
|
}
|
|
510
518
|
if (s === "MultiPolygon") {
|
|
511
|
-
const C = u.coordinates,
|
|
519
|
+
const C = u.coordinates, B = (b.width || 2) + 3;
|
|
512
520
|
return {
|
|
513
521
|
type: "FeatureCollection",
|
|
514
|
-
features: C.map((
|
|
522
|
+
features: C.map((V) => ({
|
|
515
523
|
type: "Feature",
|
|
516
524
|
geometry: {
|
|
517
525
|
type: "LineString",
|
|
518
|
-
coordinates:
|
|
526
|
+
coordinates: U(V)
|
|
519
527
|
},
|
|
520
528
|
properties: {
|
|
521
|
-
highlightWidth:
|
|
529
|
+
highlightWidth: B
|
|
522
530
|
}
|
|
523
531
|
}))
|
|
524
532
|
};
|
|
@@ -528,7 +536,7 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
528
536
|
features: []
|
|
529
537
|
};
|
|
530
538
|
}
|
|
531
|
-
function
|
|
539
|
+
function Ce(t) {
|
|
532
540
|
const { geometry: u, geometryType: s } = t;
|
|
533
541
|
return s === "Polygon" || s === "MultiPolygon" ? {
|
|
534
542
|
type: "FeatureCollection",
|
|
@@ -537,24 +545,24 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
537
545
|
}
|
|
538
546
|
function Ve(t) {
|
|
539
547
|
if (!t) {
|
|
540
|
-
|
|
548
|
+
Ut();
|
|
541
549
|
return;
|
|
542
550
|
}
|
|
543
|
-
const u =
|
|
544
|
-
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (
|
|
551
|
+
const u = Q(t);
|
|
552
|
+
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (Se.value = u, ne.value = { type: "FeatureCollection", features: [] }, Ze.value = { type: "FeatureCollection", features: [] }) : (ne.value = u, Se.value = { type: "FeatureCollection", features: [] }, Ze.value = Ce(t));
|
|
545
553
|
}
|
|
546
|
-
function
|
|
547
|
-
|
|
554
|
+
function Ut() {
|
|
555
|
+
Se.value = { type: "FeatureCollection", features: [] }, ne.value = { type: "FeatureCollection", features: [] }, Ze.value = { type: "FeatureCollection", features: [] };
|
|
548
556
|
}
|
|
549
557
|
Oe(y, (t) => {
|
|
550
558
|
Ve(t);
|
|
551
559
|
}), Oe(
|
|
552
560
|
() => l.visibleLayers,
|
|
553
561
|
(t) => {
|
|
554
|
-
y.value && !t.has(y.value.layerId) && (y.value = null,
|
|
562
|
+
y.value && !t.has(y.value.layerId) && (y.value = null, le());
|
|
555
563
|
},
|
|
556
564
|
{ deep: !0 }
|
|
557
|
-
), Oe(
|
|
565
|
+
), Oe(ie, () => {
|
|
558
566
|
const t = Ie.value;
|
|
559
567
|
if (!t) {
|
|
560
568
|
y.value = null;
|
|
@@ -562,7 +570,7 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
562
570
|
}
|
|
563
571
|
const u = Fe(t.layerId);
|
|
564
572
|
if (u) {
|
|
565
|
-
const s = M(t.geometry), b =
|
|
573
|
+
const s = M(t.geometry), b = J(u.id, u.type);
|
|
566
574
|
y.value = {
|
|
567
575
|
geometry: t.geometry,
|
|
568
576
|
geometryType: s,
|
|
@@ -573,12 +581,12 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
573
581
|
}
|
|
574
582
|
});
|
|
575
583
|
const St = k(null);
|
|
576
|
-
function
|
|
584
|
+
function Wt(t) {
|
|
577
585
|
const [u, s] = t.geometry.coordinates;
|
|
578
586
|
St.value = [u, s];
|
|
579
587
|
}
|
|
580
|
-
return (t, u) => (m(), $("div",
|
|
581
|
-
|
|
588
|
+
return (t, u) => (m(), $("div", ao, [
|
|
589
|
+
H(d(Xt), {
|
|
582
590
|
ref_key: "mapRef",
|
|
583
591
|
ref: r,
|
|
584
592
|
zoom: l.initialZoom,
|
|
@@ -596,124 +604,124 @@ const oo = { class: "map-panel" }, ao = /* @__PURE__ */ pe({
|
|
|
596
604
|
"tool-panel-layout": "vertical",
|
|
597
605
|
"tool-panel-split-ratio": 50,
|
|
598
606
|
onZoom: w,
|
|
599
|
-
onClick:
|
|
607
|
+
onClick: le,
|
|
600
608
|
onMoveend: L,
|
|
601
609
|
onLoad: S,
|
|
602
|
-
onSearchResult:
|
|
610
|
+
onSearchResult: Wt
|
|
603
611
|
}, {
|
|
604
612
|
default: Ge(() => [
|
|
605
|
-
l.drawControlPosition !== null ? (m(),
|
|
613
|
+
l.drawControlPosition !== null ? (m(), q(d(Yt), {
|
|
606
614
|
key: 0,
|
|
607
615
|
position: l.drawControlPosition
|
|
608
|
-
}, null, 8, ["position"])) :
|
|
609
|
-
(m(!0), $(
|
|
616
|
+
}, null, 8, ["position"])) : A("", !0),
|
|
617
|
+
(m(!0), $(ue, null, ve(nt.value, (s) => (m(), q(d(Mt), {
|
|
610
618
|
id: "tiled-" + s.id,
|
|
611
619
|
key: "tiled-" + s.id,
|
|
612
|
-
source:
|
|
613
|
-
paint: { "raster-opacity":
|
|
620
|
+
source: he(s),
|
|
621
|
+
paint: { "raster-opacity": N(s.id) },
|
|
614
622
|
minzoom: s.minZoom,
|
|
615
623
|
maxzoom: s.maxZoom
|
|
616
624
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
617
|
-
(m(!0), $(
|
|
625
|
+
(m(!0), $(ue, null, ve(rt.value, (s) => (m(), q(d(Mt), {
|
|
618
626
|
id: "dynamic-" + s.id,
|
|
619
627
|
key: "dynamic-" + s.id,
|
|
620
628
|
source: _e(s),
|
|
621
|
-
paint: { "raster-opacity":
|
|
629
|
+
paint: { "raster-opacity": N(s.id) },
|
|
622
630
|
minzoom: s.minZoom,
|
|
623
631
|
maxzoom: s.maxZoom
|
|
624
632
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
625
|
-
(m(!0), $(
|
|
633
|
+
(m(!0), $(ue, null, ve(X.value, (s) => (m(), q(d(Pt), {
|
|
626
634
|
id: s.id,
|
|
627
635
|
key: s.id,
|
|
628
|
-
source:
|
|
629
|
-
paint:
|
|
636
|
+
source: Me(s),
|
|
637
|
+
paint: Pe(s),
|
|
630
638
|
minzoom: s.minZoom,
|
|
631
639
|
maxzoom: s.maxZoom,
|
|
632
640
|
"before-id": "highlight-circles",
|
|
633
|
-
onClick:
|
|
641
|
+
onClick: Be
|
|
634
642
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
635
|
-
(m(!0), $(
|
|
643
|
+
(m(!0), $(ue, null, ve(T.value, (s) => (m(), q(d(Tt), {
|
|
636
644
|
id: s.id,
|
|
637
645
|
key: s.id,
|
|
638
|
-
source:
|
|
639
|
-
paint:
|
|
646
|
+
source: Me(s),
|
|
647
|
+
paint: Pe(s),
|
|
640
648
|
minzoom: s.minZoom,
|
|
641
649
|
maxzoom: s.maxZoom,
|
|
642
650
|
"before-id": "highlight-circles",
|
|
643
|
-
onClick:
|
|
651
|
+
onClick: Be
|
|
644
652
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
645
|
-
(m(!0), $(
|
|
653
|
+
(m(!0), $(ue, null, ve(I.value, (s) => (m(), q(d(ft), {
|
|
646
654
|
id: s.id + "-outline",
|
|
647
655
|
key: s.id + "-outline",
|
|
648
|
-
source:
|
|
656
|
+
source: Me(s),
|
|
649
657
|
paint: st(s),
|
|
650
658
|
minzoom: s.minZoom,
|
|
651
659
|
maxzoom: s.maxZoom,
|
|
652
660
|
"before-id": "highlight-lines",
|
|
653
|
-
onClick:
|
|
661
|
+
onClick: Be
|
|
654
662
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
655
|
-
(m(!0), $(
|
|
663
|
+
(m(!0), $(ue, null, ve(_.value, (s) => (m(), q(d(ft), {
|
|
656
664
|
id: s.id,
|
|
657
665
|
key: s.id,
|
|
658
|
-
source:
|
|
659
|
-
paint:
|
|
666
|
+
source: Me(s),
|
|
667
|
+
paint: Pe(s),
|
|
660
668
|
minzoom: s.minZoom,
|
|
661
669
|
maxzoom: s.maxZoom,
|
|
662
670
|
"before-id": "highlight-lines",
|
|
663
|
-
onClick:
|
|
671
|
+
onClick: Be
|
|
664
672
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
665
|
-
|
|
673
|
+
H(d(Pt), {
|
|
666
674
|
id: "highlight-circles",
|
|
667
675
|
key: "highlight-circles-layer",
|
|
668
|
-
source: { type: "geojson", data:
|
|
676
|
+
source: { type: "geojson", data: Se.value },
|
|
669
677
|
paint: ut
|
|
670
678
|
}, null, 8, ["source"]),
|
|
671
|
-
|
|
679
|
+
H(d(Tt), {
|
|
672
680
|
id: "highlight-fill",
|
|
673
681
|
key: "highlight-fill-layer",
|
|
674
|
-
source: { type: "geojson", data:
|
|
682
|
+
source: { type: "geojson", data: Ze.value },
|
|
675
683
|
paint: Xe
|
|
676
684
|
}, null, 8, ["source"]),
|
|
677
|
-
|
|
685
|
+
H(d(ft), {
|
|
678
686
|
id: "highlight-lines",
|
|
679
687
|
key: "highlight-lines-layer",
|
|
680
|
-
source: { type: "geojson", data:
|
|
688
|
+
source: { type: "geojson", data: ne.value },
|
|
681
689
|
paint: dt
|
|
682
690
|
}, null, 8, ["source"]),
|
|
683
|
-
|
|
691
|
+
H(d(eo), {
|
|
684
692
|
"lng-lat": St.value,
|
|
685
693
|
color: "#2176d2"
|
|
686
694
|
}, null, 8, ["lng-lat"]),
|
|
687
|
-
Ie.value && Ae.value ? (m(),
|
|
695
|
+
Ie.value && Ae.value ? (m(), q(d(to), {
|
|
688
696
|
key: 1,
|
|
689
697
|
"lng-lat": Ae.value,
|
|
690
698
|
html: qe.value,
|
|
691
699
|
"close-on-click": !1,
|
|
692
700
|
offset: [0, -15],
|
|
693
|
-
"show-navigation":
|
|
694
|
-
"current-feature-index":
|
|
695
|
-
"total-features":
|
|
701
|
+
"show-navigation": se.value.length > 1,
|
|
702
|
+
"current-feature-index": ie.value,
|
|
703
|
+
"total-features": se.value.length,
|
|
696
704
|
"layer-name": Ie.value.layerTitle,
|
|
697
|
-
onClose:
|
|
705
|
+
onClose: le,
|
|
698
706
|
onNext: Ee,
|
|
699
|
-
onPrevious:
|
|
700
|
-
}, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) :
|
|
707
|
+
onPrevious: de
|
|
708
|
+
}, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) : A("", !0)
|
|
701
709
|
]),
|
|
702
710
|
_: 1
|
|
703
711
|
}, 8, ["zoom", "center", "navigation-controls", "geolocation-control", "basemap-change-controls", "map-search-control", "cyclomedia-config", "cyclomedia-button-position", "pictometry-credentials", "pictometry-button-position"])
|
|
704
712
|
]));
|
|
705
713
|
}
|
|
706
|
-
}),
|
|
714
|
+
}), $e = (e, i) => {
|
|
707
715
|
const l = e.__vccOpts || e;
|
|
708
716
|
for (const [o, r] of i)
|
|
709
717
|
l[o] = r;
|
|
710
718
|
return l;
|
|
711
|
-
},
|
|
712
|
-
function
|
|
719
|
+
}, lo = /* @__PURE__ */ $e(io, [["__scopeId", "data-v-c1a3d529"]]);
|
|
720
|
+
function At(e) {
|
|
713
721
|
let i = e.split("?")[0] || e;
|
|
714
722
|
return i = i.replace(/\/query$/, ""), i = i.replace(/\/$/, ""), i.toLowerCase();
|
|
715
723
|
}
|
|
716
|
-
const
|
|
724
|
+
const no = ["disabled"], ro = /* @__PURE__ */ ye({
|
|
717
725
|
inheritAttrs: !1,
|
|
718
726
|
__name: "PhlButton",
|
|
719
727
|
props: {
|
|
@@ -763,12 +771,12 @@ const lo = ["disabled"], no = /* @__PURE__ */ pe({
|
|
|
763
771
|
size: i.size
|
|
764
772
|
})
|
|
765
773
|
);
|
|
766
|
-
return (c, w) => l(i) ? (m(),
|
|
774
|
+
return (c, w) => l(i) ? (m(), q(d(oo), yt({ key: 0 }, { ...r.value, ...c.$attrs }, { role: "button" }), {
|
|
767
775
|
default: Ge(() => [
|
|
768
|
-
|
|
776
|
+
H(d(Ft), kt(xt(n.value)), {
|
|
769
777
|
default: Ge(() => [
|
|
770
|
-
|
|
771
|
-
|
|
778
|
+
pe(c.$slots, "default", {}, () => [
|
|
779
|
+
xe(G(i.text), 1)
|
|
772
780
|
])
|
|
773
781
|
]),
|
|
774
782
|
_: 3
|
|
@@ -781,33 +789,33 @@ const lo = ["disabled"], no = /* @__PURE__ */ pe({
|
|
|
781
789
|
disabled: i.disabled,
|
|
782
790
|
class: o.value
|
|
783
791
|
}, c.$attrs), [
|
|
784
|
-
|
|
792
|
+
H(d(Ft), kt(xt(n.value)), {
|
|
785
793
|
default: Ge(() => [
|
|
786
|
-
|
|
787
|
-
|
|
794
|
+
pe(c.$slots, "default", {}, () => [
|
|
795
|
+
xe(G(i.text), 1)
|
|
788
796
|
])
|
|
789
797
|
]),
|
|
790
798
|
_: 3
|
|
791
799
|
}, 16)
|
|
792
|
-
], 16,
|
|
800
|
+
], 16, no));
|
|
793
801
|
}
|
|
794
802
|
});
|
|
795
|
-
var
|
|
803
|
+
var so = {
|
|
796
804
|
prefix: "fas",
|
|
797
805
|
iconName: "circle-exclamation",
|
|
798
806
|
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"]
|
|
799
|
-
},
|
|
807
|
+
}, co = so, uo = {
|
|
800
808
|
prefix: "fas",
|
|
801
809
|
iconName: "xmark",
|
|
802
810
|
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"]
|
|
803
|
-
},
|
|
804
|
-
const
|
|
811
|
+
}, fo = uo;
|
|
812
|
+
const po = ["for"], yo = { class: "state-layer" }, mo = { class: "content" }, ho = { class: "input-text-container" }, go = ["id", "placeholder", "aria-label"], vo = {
|
|
805
813
|
key: 1,
|
|
806
814
|
class: "has-text-body-small phila-supporting-text"
|
|
807
|
-
},
|
|
815
|
+
}, bo = {
|
|
808
816
|
key: 2,
|
|
809
817
|
class: "has-text-body-small phila-error-text"
|
|
810
|
-
},
|
|
818
|
+
}, wo = /* @__PURE__ */ ye({
|
|
811
819
|
inheritAttrs: !1,
|
|
812
820
|
__name: "TextField",
|
|
813
821
|
props: {
|
|
@@ -825,7 +833,7 @@ const fo = ["for"], po = { class: "state-layer" }, yo = { class: "content" }, mo
|
|
|
825
833
|
},
|
|
826
834
|
emits: ["update:modelValue"],
|
|
827
835
|
setup(e, { emit: i }) {
|
|
828
|
-
const l =
|
|
836
|
+
const l = jt(), o = e, r = z(() => typeof o.error == "string" ? o.error : o.error[0]), n = qt(o, "id"), c = i, w = k(""), p = z({
|
|
829
837
|
get: () => o.modelValue !== void 0 ? o.modelValue : w.value,
|
|
830
838
|
set: (f) => {
|
|
831
839
|
c("update:modelValue", f), w.value = f;
|
|
@@ -843,27 +851,27 @@ const fo = ["for"], po = { class: "state-layer" }, yo = { class: "content" }, mo
|
|
|
843
851
|
f.target.closest("button") || a.value?.focus();
|
|
844
852
|
};
|
|
845
853
|
return (f, L) => (m(), $("div", {
|
|
846
|
-
class:
|
|
854
|
+
class: re(["phila-input", x.value])
|
|
847
855
|
}, [
|
|
848
856
|
o.label ? (m(), $("label", {
|
|
849
857
|
key: 0,
|
|
850
858
|
for: n.value,
|
|
851
859
|
class: "has-text-label-small phila-label"
|
|
852
|
-
},
|
|
860
|
+
}, G(o.label), 9, po)) : A("", !0),
|
|
853
861
|
P("div", {
|
|
854
|
-
class:
|
|
862
|
+
class: re(["phila-text-field", h.value]),
|
|
855
863
|
onClick: v
|
|
856
864
|
}, [
|
|
857
|
-
P("div",
|
|
858
|
-
o.leadingIcon ? (m(),
|
|
865
|
+
P("div", yo, [
|
|
866
|
+
o.leadingIcon ? (m(), q(d(ke), {
|
|
859
867
|
key: 0,
|
|
860
868
|
"icon-class": o.leadingIcon,
|
|
861
869
|
inline: "",
|
|
862
870
|
decorative: ""
|
|
863
|
-
}, null, 8, ["icon-class"])) :
|
|
864
|
-
P("div",
|
|
865
|
-
P("div",
|
|
866
|
-
|
|
871
|
+
}, null, 8, ["icon-class"])) : A("", !0),
|
|
872
|
+
P("div", mo, [
|
|
873
|
+
P("div", ho, [
|
|
874
|
+
Rt(P("input", yt({
|
|
867
875
|
id: n.value,
|
|
868
876
|
ref_key: "inputRef",
|
|
869
877
|
ref: a,
|
|
@@ -871,75 +879,75 @@ const fo = ["for"], po = { class: "state-layer" }, yo = { class: "content" }, mo
|
|
|
871
879
|
class: "phila-text-field-input has-text-body-default",
|
|
872
880
|
placeholder: o.placeholder,
|
|
873
881
|
"aria-label": g.value
|
|
874
|
-
}, d(l)), null, 16,
|
|
875
|
-
[
|
|
882
|
+
}, d(l)), null, 16, go), [
|
|
883
|
+
[Gt, p.value]
|
|
876
884
|
])
|
|
877
885
|
])
|
|
878
886
|
]),
|
|
879
|
-
p.value != "" ? (m(),
|
|
887
|
+
p.value != "" ? (m(), q(d(ro), {
|
|
880
888
|
key: 1,
|
|
881
889
|
variant: "standard",
|
|
882
890
|
size: "small",
|
|
883
891
|
"icon-only": "",
|
|
884
|
-
"icon-definition": d(
|
|
892
|
+
"icon-definition": d(fo),
|
|
885
893
|
onClick: L[1] || (L[1] = (S) => p.value = "")
|
|
886
|
-
}, null, 8, ["icon-definition"])) :
|
|
887
|
-
o.trailingIcon ? (m(),
|
|
894
|
+
}, null, 8, ["icon-definition"])) : A("", !0),
|
|
895
|
+
o.trailingIcon ? (m(), q(d(ke), {
|
|
888
896
|
key: 2,
|
|
889
897
|
size: "small",
|
|
890
898
|
"icon-class": o.trailingIcon,
|
|
891
899
|
inline: "",
|
|
892
900
|
decorative: ""
|
|
893
|
-
}, null, 8, ["icon-class"])) :
|
|
894
|
-
|
|
901
|
+
}, null, 8, ["icon-class"])) : A("", !0),
|
|
902
|
+
pe(f.$slots, "trailing-action")
|
|
895
903
|
])
|
|
896
904
|
], 2),
|
|
897
|
-
o.supportingText ? (m(), $("div",
|
|
898
|
-
r.value ? (m(), $("div",
|
|
899
|
-
|
|
900
|
-
"icon-definition": d(
|
|
905
|
+
o.supportingText ? (m(), $("div", vo, G(o.supportingText), 1)) : A("", !0),
|
|
906
|
+
r.value ? (m(), $("div", bo, [
|
|
907
|
+
H(d(ke), {
|
|
908
|
+
"icon-definition": d(co),
|
|
901
909
|
size: "small",
|
|
902
910
|
inline: "",
|
|
903
911
|
decorative: ""
|
|
904
912
|
}, null, 8, ["icon-definition"]),
|
|
905
|
-
|
|
906
|
-
])) :
|
|
913
|
+
xe(" " + G(r.value), 1)
|
|
914
|
+
])) : A("", !0)
|
|
907
915
|
], 2));
|
|
908
916
|
}
|
|
909
917
|
});
|
|
910
|
-
var
|
|
918
|
+
var Lo = {
|
|
911
919
|
prefix: "fas",
|
|
912
920
|
iconName: "filter",
|
|
913
921
|
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"]
|
|
914
|
-
},
|
|
922
|
+
}, So = {
|
|
915
923
|
prefix: "fas",
|
|
916
924
|
iconName: "caret-right",
|
|
917
925
|
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"]
|
|
918
|
-
},
|
|
926
|
+
}, Co = {
|
|
919
927
|
prefix: "fas",
|
|
920
928
|
iconName: "caret-left",
|
|
921
929
|
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"]
|
|
922
|
-
},
|
|
930
|
+
}, Et = {
|
|
923
931
|
prefix: "fas",
|
|
924
932
|
iconName: "xmark",
|
|
925
933
|
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"]
|
|
926
|
-
},
|
|
934
|
+
}, ko = {
|
|
927
935
|
prefix: "fas",
|
|
928
936
|
iconName: "bars",
|
|
929
937
|
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"]
|
|
930
|
-
},
|
|
938
|
+
}, xo = {
|
|
931
939
|
prefix: "fas",
|
|
932
940
|
iconName: "circle-info",
|
|
933
941
|
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"]
|
|
934
942
|
};
|
|
935
|
-
const
|
|
943
|
+
const $o = {
|
|
936
944
|
key: 0,
|
|
937
945
|
class: "loading-indicator",
|
|
938
946
|
role: "status"
|
|
939
|
-
},
|
|
947
|
+
}, Mo = ["aria-label"], Po = {
|
|
940
948
|
key: 2,
|
|
941
949
|
class: "zoom-indicator"
|
|
942
|
-
},
|
|
950
|
+
}, To = /* @__PURE__ */ ye({
|
|
943
951
|
__name: "LayerStatusIndicators",
|
|
944
952
|
props: {
|
|
945
953
|
loading: { type: Boolean },
|
|
@@ -947,18 +955,18 @@ const xo = {
|
|
|
947
955
|
unavailable: { type: Boolean }
|
|
948
956
|
},
|
|
949
957
|
setup(e) {
|
|
950
|
-
return (i, l) => (m(), $(
|
|
951
|
-
e.loading && !e.unavailable ? (m(), $("span",
|
|
958
|
+
return (i, l) => (m(), $(ue, null, [
|
|
959
|
+
e.loading && !e.unavailable ? (m(), $("span", $o, " Loading... ")) : A("", !0),
|
|
952
960
|
e.error ? (m(), $("span", {
|
|
953
961
|
key: 1,
|
|
954
962
|
class: "error-indicator",
|
|
955
963
|
"aria-label": e.error,
|
|
956
964
|
role: "status"
|
|
957
|
-
}, " Error ", 8,
|
|
958
|
-
e.unavailable ? (m(), $("span",
|
|
965
|
+
}, " Error ", 8, Mo)) : A("", !0),
|
|
966
|
+
e.unavailable ? (m(), $("span", Po, " (zoom in) ")) : A("", !0)
|
|
959
967
|
], 64));
|
|
960
968
|
}
|
|
961
|
-
}), tt = /* @__PURE__ */
|
|
969
|
+
}), tt = /* @__PURE__ */ $e(To, [["__scopeId", "data-v-19b1b402"]]), Fo = { class: "opacity-control" }, Eo = ["for"], Io = ["id", "value", "aria-label"], Oo = /* @__PURE__ */ ye({
|
|
962
970
|
__name: "LayerOpacitySlider",
|
|
963
971
|
props: {
|
|
964
972
|
layerId: {},
|
|
@@ -972,11 +980,11 @@ const xo = {
|
|
|
972
980
|
const n = r.target;
|
|
973
981
|
l("update:opacity", parseFloat(n.value));
|
|
974
982
|
}
|
|
975
|
-
return (r, n) => (m(), $("div",
|
|
983
|
+
return (r, n) => (m(), $("div", Fo, [
|
|
976
984
|
P("label", {
|
|
977
985
|
class: "opacity-label",
|
|
978
986
|
for: "opacity-" + e.layerId
|
|
979
|
-
}, " Opacity: " +
|
|
987
|
+
}, " Opacity: " + G(Math.round(e.opacity * 100)) + "% ", 9, Eo),
|
|
980
988
|
P("input", {
|
|
981
989
|
id: "opacity-" + e.layerId,
|
|
982
990
|
type: "range",
|
|
@@ -987,10 +995,10 @@ const xo = {
|
|
|
987
995
|
"aria-label": "Opacity for " + e.layerName,
|
|
988
996
|
class: "opacity-slider",
|
|
989
997
|
onInput: o
|
|
990
|
-
}, null, 40,
|
|
998
|
+
}, null, 40, Io)
|
|
991
999
|
]));
|
|
992
1000
|
}
|
|
993
|
-
}), gt = /* @__PURE__ */
|
|
1001
|
+
}), gt = /* @__PURE__ */ $e(Oo, [["__scopeId", "data-v-1a025f6a"]]), zo = ["aria-label"], Do = { class: "legend-label" }, _o = /* @__PURE__ */ ye({
|
|
994
1002
|
__name: "LayerLegend",
|
|
995
1003
|
props: {
|
|
996
1004
|
items: {},
|
|
@@ -1001,19 +1009,19 @@ const xo = {
|
|
|
1001
1009
|
class: "layer-legend",
|
|
1002
1010
|
"aria-label": e.label
|
|
1003
1011
|
}, [
|
|
1004
|
-
(m(!0), $(
|
|
1012
|
+
(m(!0), $(ue, null, ve(e.items, (o, r) => (m(), $("li", {
|
|
1005
1013
|
key: r,
|
|
1006
1014
|
class: "legend-item"
|
|
1007
1015
|
}, [
|
|
1008
1016
|
o.type === "circle" ? (m(), $("span", {
|
|
1009
1017
|
key: 0,
|
|
1010
1018
|
class: "legend-symbol legend-circle",
|
|
1011
|
-
style:
|
|
1019
|
+
style: fe({ backgroundColor: o.color }),
|
|
1012
1020
|
"aria-hidden": "true"
|
|
1013
1021
|
}, null, 4)) : o.type === "line" ? (m(), $("span", {
|
|
1014
1022
|
key: 1,
|
|
1015
1023
|
class: "legend-symbol legend-line",
|
|
1016
|
-
style:
|
|
1024
|
+
style: fe({
|
|
1017
1025
|
backgroundColor: o.color,
|
|
1018
1026
|
height: `${o.width || 2}px`
|
|
1019
1027
|
}),
|
|
@@ -1021,14 +1029,14 @@ const xo = {
|
|
|
1021
1029
|
}, null, 4)) : o.type === "fill" ? (m(), $("span", {
|
|
1022
1030
|
key: 2,
|
|
1023
1031
|
class: "legend-symbol legend-fill",
|
|
1024
|
-
style:
|
|
1032
|
+
style: fe({ backgroundColor: o.color }),
|
|
1025
1033
|
"aria-hidden": "true"
|
|
1026
|
-
}, null, 4)) :
|
|
1027
|
-
P("span",
|
|
1034
|
+
}, null, 4)) : A("", !0),
|
|
1035
|
+
P("span", Do, G(o.label), 1)
|
|
1028
1036
|
]))), 128))
|
|
1029
|
-
], 8,
|
|
1037
|
+
], 8, zo));
|
|
1030
1038
|
}
|
|
1031
|
-
}), vt = /* @__PURE__ */
|
|
1039
|
+
}), vt = /* @__PURE__ */ $e(_o, [["__scopeId", "data-v-62e210e3"]]);
|
|
1032
1040
|
function bt(e) {
|
|
1033
1041
|
function i(c) {
|
|
1034
1042
|
return e().visibleLayerIds.has(c);
|
|
@@ -1048,19 +1056,19 @@ function bt(e) {
|
|
|
1048
1056
|
}
|
|
1049
1057
|
return { isVisible: i, getLayerOpacity: l, isLayerLoading: o, getLayerError: r, isLayerAvailableAtZoom: n };
|
|
1050
1058
|
}
|
|
1051
|
-
const
|
|
1059
|
+
const Ro = { class: "layer-panel" }, Ao = {
|
|
1052
1060
|
key: 0,
|
|
1053
1061
|
class: "search-box"
|
|
1054
|
-
},
|
|
1062
|
+
}, Bo = {
|
|
1055
1063
|
key: 1,
|
|
1056
1064
|
class: "topics-container"
|
|
1057
|
-
}, Zo = { class: "layer-row" },
|
|
1065
|
+
}, Zo = { class: "layer-row" }, Vo = ["href", "aria-label"], No = {
|
|
1058
1066
|
key: 1,
|
|
1059
1067
|
class: "metadata-placeholder"
|
|
1060
|
-
},
|
|
1068
|
+
}, Uo = ["checked", "disabled", "onChange"], Wo = { class: "layer-title" }, jo = {
|
|
1061
1069
|
key: 0,
|
|
1062
1070
|
class: "no-results"
|
|
1063
|
-
},
|
|
1071
|
+
}, qo = /* @__PURE__ */ ye({
|
|
1064
1072
|
__name: "LayerPanel",
|
|
1065
1073
|
props: {
|
|
1066
1074
|
layerList: {},
|
|
@@ -1086,7 +1094,7 @@ const _o = { class: "layer-panel" }, Ro = {
|
|
|
1086
1094
|
return l.layerList.filter((L) => L.config.title.toLowerCase().includes(f));
|
|
1087
1095
|
});
|
|
1088
1096
|
function n(f) {
|
|
1089
|
-
const L =
|
|
1097
|
+
const L = At(f);
|
|
1090
1098
|
return l.layerMetadata[L] || null;
|
|
1091
1099
|
}
|
|
1092
1100
|
const c = z(() => l.layerList.some((f) => n(f.config.url))), { isVisible: w, getLayerOpacity: p, isLayerLoading: x, getLayerError: h, isLayerAvailableAtZoom: g } = bt(() => ({
|
|
@@ -1102,17 +1110,17 @@ const _o = { class: "layer-panel" }, Ro = {
|
|
|
1102
1110
|
function v(f) {
|
|
1103
1111
|
o("toggleLayer", f);
|
|
1104
1112
|
}
|
|
1105
|
-
return (f, L) => (m(), $("div",
|
|
1106
|
-
e.showSearch ? (m(), $("div",
|
|
1107
|
-
|
|
1113
|
+
return (f, L) => (m(), $("div", Ro, [
|
|
1114
|
+
e.showSearch ? (m(), $("div", Ao, [
|
|
1115
|
+
H(d(wo), {
|
|
1108
1116
|
modelValue: a.value,
|
|
1109
1117
|
"onUpdate:modelValue": L[0] || (L[0] = (S) => a.value = S),
|
|
1110
1118
|
placeholder: e.searchPlaceholder,
|
|
1111
1119
|
"class-name": "layer-search-field"
|
|
1112
1120
|
}, {
|
|
1113
1121
|
"trailing-action": Ge(() => [
|
|
1114
|
-
|
|
1115
|
-
"icon-definition": d(
|
|
1122
|
+
H(d(ke), {
|
|
1123
|
+
"icon-definition": d(Lo),
|
|
1116
1124
|
size: "small",
|
|
1117
1125
|
inline: "",
|
|
1118
1126
|
decorative: ""
|
|
@@ -1120,16 +1128,16 @@ const _o = { class: "layer-panel" }, Ro = {
|
|
|
1120
1128
|
]),
|
|
1121
1129
|
_: 1
|
|
1122
1130
|
}, 8, ["modelValue", "placeholder"])
|
|
1123
|
-
])) :
|
|
1124
|
-
e.mode === "topics" ? (m(), $("div",
|
|
1125
|
-
|
|
1131
|
+
])) : A("", !0),
|
|
1132
|
+
e.mode === "topics" ? (m(), $("div", Bo, [
|
|
1133
|
+
pe(f.$slots, "topics", {}, () => [
|
|
1126
1134
|
L[2] || (L[2] = P("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
|
|
1127
1135
|
], !0)
|
|
1128
1136
|
])) : (m(), $("div", {
|
|
1129
1137
|
key: 2,
|
|
1130
|
-
class:
|
|
1138
|
+
class: re(["layer-list", { "has-metadata": c.value }])
|
|
1131
1139
|
}, [
|
|
1132
|
-
(m(!0), $(
|
|
1140
|
+
(m(!0), $(ue, null, ve(r.value, (S) => (m(), $("div", {
|
|
1133
1141
|
key: S.config.id,
|
|
1134
1142
|
class: "layer-item"
|
|
1135
1143
|
}, [
|
|
@@ -1141,18 +1149,18 @@ const _o = { class: "layer-panel" }, Ro = {
|
|
|
1141
1149
|
rel: "noopener noreferrer",
|
|
1142
1150
|
class: "metadata-link",
|
|
1143
1151
|
"aria-label": "View metadata for " + S.config.title,
|
|
1144
|
-
onClick: L[1] || (L[1] =
|
|
1152
|
+
onClick: L[1] || (L[1] = Ht(() => {
|
|
1145
1153
|
}, ["stop"]))
|
|
1146
1154
|
}, [
|
|
1147
|
-
|
|
1148
|
-
"icon-definition": d(
|
|
1155
|
+
H(d(ke), {
|
|
1156
|
+
"icon-definition": d(xo),
|
|
1149
1157
|
size: "small",
|
|
1150
1158
|
inline: "",
|
|
1151
1159
|
decorative: ""
|
|
1152
1160
|
}, null, 8, ["icon-definition"])
|
|
1153
|
-
], 8,
|
|
1161
|
+
], 8, Vo)) : c.value ? (m(), $("span", No)) : A("", !0),
|
|
1154
1162
|
P("label", {
|
|
1155
|
-
class:
|
|
1163
|
+
class: re(["layer-checkbox", {
|
|
1156
1164
|
"layer-unavailable": !d(g)(S.config),
|
|
1157
1165
|
"layer-error": d(h)(S.config.id)
|
|
1158
1166
|
}])
|
|
@@ -1162,10 +1170,10 @@ const _o = { class: "layer-panel" }, Ro = {
|
|
|
1162
1170
|
checked: d(w)(S.config.id),
|
|
1163
1171
|
disabled: !d(g)(S.config),
|
|
1164
1172
|
onChange: (E) => v(S.config.id)
|
|
1165
|
-
}, null, 40,
|
|
1166
|
-
P("span",
|
|
1167
|
-
|
|
1168
|
-
|
|
1173
|
+
}, null, 40, Uo),
|
|
1174
|
+
P("span", Wo, [
|
|
1175
|
+
xe(G(S.config.title) + " ", 1),
|
|
1176
|
+
H(tt, {
|
|
1169
1177
|
loading: d(x)(S.config.id),
|
|
1170
1178
|
error: d(h)(S.config.id),
|
|
1171
1179
|
unavailable: !d(g)(S.config)
|
|
@@ -1173,24 +1181,24 @@ const _o = { class: "layer-panel" }, Ro = {
|
|
|
1173
1181
|
])
|
|
1174
1182
|
], 2)
|
|
1175
1183
|
]),
|
|
1176
|
-
e.showOpacity && d(w)(S.config.id) && d(g)(S.config) ? (m(),
|
|
1184
|
+
e.showOpacity && d(w)(S.config.id) && d(g)(S.config) ? (m(), q(gt, {
|
|
1177
1185
|
key: 0,
|
|
1178
1186
|
"layer-id": S.config.id,
|
|
1179
1187
|
"layer-name": S.config.title,
|
|
1180
1188
|
opacity: d(p)(S.config.id),
|
|
1181
1189
|
"onUpdate:opacity": (E) => o("setOpacity", S.config.id, E)
|
|
1182
|
-
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) :
|
|
1183
|
-
e.showLegend && d(w)(S.config.id) && d(g)(S.config) && S.config.legend?.length ? (m(),
|
|
1190
|
+
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
1191
|
+
e.showLegend && d(w)(S.config.id) && d(g)(S.config) && S.config.legend?.length ? (m(), q(vt, {
|
|
1184
1192
|
key: 1,
|
|
1185
1193
|
items: S.config.legend,
|
|
1186
1194
|
label: "Legend for " + S.config.title
|
|
1187
|
-
}, null, 8, ["items", "label"])) :
|
|
1195
|
+
}, null, 8, ["items", "label"])) : A("", !0)
|
|
1188
1196
|
]))), 128)),
|
|
1189
|
-
r.value.length === 0 ? (m(), $("div",
|
|
1197
|
+
r.value.length === 0 ? (m(), $("div", jo, 'No layers match "' + G(e.searchQuery) + '"', 1)) : A("", !0)
|
|
1190
1198
|
], 2))
|
|
1191
1199
|
]));
|
|
1192
1200
|
}
|
|
1193
|
-
}),
|
|
1201
|
+
}), Go = /* @__PURE__ */ $e(qo, [["__scopeId", "data-v-e48bb978"]]), Ho = {
|
|
1194
1202
|
esriSLSSolid: null,
|
|
1195
1203
|
esriSLSDash: [4, 3],
|
|
1196
1204
|
esriSLSDot: [1, 3],
|
|
@@ -1200,9 +1208,9 @@ const _o = { class: "layer-panel" }, Ro = {
|
|
|
1200
1208
|
};
|
|
1201
1209
|
function at(e) {
|
|
1202
1210
|
if (e)
|
|
1203
|
-
return
|
|
1211
|
+
return Ho[e] ?? void 0;
|
|
1204
1212
|
}
|
|
1205
|
-
function
|
|
1213
|
+
function Jo(e, i, l, o, r) {
|
|
1206
1214
|
const n = [];
|
|
1207
1215
|
let c = i[0], w = [e[0]], p = 0;
|
|
1208
1216
|
for (let a = 1; a < e.length; a++)
|
|
@@ -1213,28 +1221,28 @@ function Ho(e, i, l, o, r) {
|
|
|
1213
1221
|
for (let a = 0; a < n.length; a++) {
|
|
1214
1222
|
const v = n[a], f = v.breaks, L = at(v.style), S = a === 0 ? null : n[a - 1].breaks[n[a - 1].breaks.length - 1].classMaxValue, E = f[f.length - 1].classMaxValue;
|
|
1215
1223
|
let D;
|
|
1216
|
-
const
|
|
1217
|
-
S === null ? D = `${!
|
|
1224
|
+
const X = !!o.defaultSymbol;
|
|
1225
|
+
S === null ? D = `${!X && o.minValue != null ? `${l} >= ${o.minValue} AND ` : ""}${l} <= ${E}` : a === n.length - 1 && X ? D = `${l} > ${S}` : D = `${l} > ${S} AND ${l} <= ${E}`;
|
|
1218
1226
|
const T = {
|
|
1219
|
-
"line-opacity":
|
|
1227
|
+
"line-opacity": be(r)
|
|
1220
1228
|
};
|
|
1221
1229
|
if (L && (T["line-dasharray"] = L), f.length === 1)
|
|
1222
1230
|
T["line-color"] = O(f[0].symbol?.color), T["line-width"] = ee(f[0].symbol?.width || 2);
|
|
1223
1231
|
else {
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1226
|
-
for (let
|
|
1227
|
-
|
|
1228
|
-
T["line-color"] =
|
|
1232
|
+
const N = ["step", ["get", l]], me = ["step", ["get", l]];
|
|
1233
|
+
N.push(O(f[0].symbol?.color)), me.push(ee(f[0].symbol?.width || 2));
|
|
1234
|
+
for (let he = 1; he < f.length; he++)
|
|
1235
|
+
N.push(f[he - 1].classMaxValue), N.push(O(f[he].symbol?.color)), me.push(f[he - 1].classMaxValue), me.push(ee(f[he].symbol?.width || 2));
|
|
1236
|
+
T["line-color"] = N, T["line-width"] = me;
|
|
1229
1237
|
}
|
|
1230
1238
|
const I = [];
|
|
1231
|
-
for (const
|
|
1239
|
+
for (const N of f)
|
|
1232
1240
|
I.push({
|
|
1233
1241
|
type: "line",
|
|
1234
|
-
color: O(
|
|
1235
|
-
width: ee(
|
|
1236
|
-
label:
|
|
1237
|
-
}), g =
|
|
1242
|
+
color: O(N.symbol?.color),
|
|
1243
|
+
width: ee(N.symbol?.width || 2),
|
|
1244
|
+
label: N.label || `${g} - ${N.classMaxValue}`
|
|
1245
|
+
}), g = N.classMaxValue + 1;
|
|
1238
1246
|
const _ = v.style.replace("esriSLS", "").toLowerCase();
|
|
1239
1247
|
let te;
|
|
1240
1248
|
a === 0 ? te = "" : h.has(_) ? te = `-${_}-${a}` : te = `-${_}`, h.add(_), x.push({ suffix: te, where: D, paint: T, legend: I });
|
|
@@ -1246,24 +1254,24 @@ function O(e) {
|
|
|
1246
1254
|
const i = e[0], l = e[1], o = e[2], n = (e[3] ?? 255) / 255;
|
|
1247
1255
|
return n === 1 ? `#${i.toString(16).padStart(2, "0")}${l.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}` : `rgba(${i}, ${l}, ${o}, ${n.toFixed(2)})`;
|
|
1248
1256
|
}
|
|
1249
|
-
function
|
|
1257
|
+
function be(e) {
|
|
1250
1258
|
return e !== void 0 ? e : 1;
|
|
1251
1259
|
}
|
|
1252
1260
|
function ee(e) {
|
|
1253
1261
|
return Math.round(e * (96 / 72) * 10) / 10;
|
|
1254
1262
|
}
|
|
1255
|
-
const
|
|
1256
|
-
function
|
|
1257
|
-
return !e || e <= 0 ? null : Math.round(Math.log2(
|
|
1263
|
+
const Ko = 559082264;
|
|
1264
|
+
function It(e) {
|
|
1265
|
+
return !e || e <= 0 ? null : Math.round(Math.log2(Ko / e) * 100) / 100;
|
|
1258
1266
|
}
|
|
1259
|
-
function
|
|
1267
|
+
function Qo(e, i) {
|
|
1260
1268
|
const l = {};
|
|
1261
1269
|
if (e && e > 0) {
|
|
1262
|
-
const o =
|
|
1270
|
+
const o = It(e);
|
|
1263
1271
|
o !== null && (l.minZoom = o);
|
|
1264
1272
|
}
|
|
1265
1273
|
if (i && i > 0) {
|
|
1266
|
-
const o =
|
|
1274
|
+
const o = It(i);
|
|
1267
1275
|
o !== null && (l.maxZoom = o);
|
|
1268
1276
|
}
|
|
1269
1277
|
return l;
|
|
@@ -1291,11 +1299,11 @@ function Te(e) {
|
|
|
1291
1299
|
function pt(e) {
|
|
1292
1300
|
return String(e);
|
|
1293
1301
|
}
|
|
1294
|
-
function
|
|
1302
|
+
function Bt(e, i, l) {
|
|
1295
1303
|
const o = e.symbol, r = it(o);
|
|
1296
1304
|
let n = {}, c = [], w = null;
|
|
1297
1305
|
if (r === "fill" && o) {
|
|
1298
|
-
const p = o.color === null ? 0 : o.color?.[3] ?? 255, x = p === 0 ? "rgba(0, 0, 0, 0)" : O(o.color), h = p === 0 ? 0 : p < 255 ? 1 :
|
|
1306
|
+
const p = o.color === null ? 0 : o.color?.[3] ?? 255, x = p === 0 ? "rgba(0, 0, 0, 0)" : O(o.color), h = p === 0 ? 0 : p < 255 ? 1 : be(i);
|
|
1299
1307
|
if (n = {
|
|
1300
1308
|
"fill-color": x,
|
|
1301
1309
|
"fill-opacity": h
|
|
@@ -1317,7 +1325,7 @@ function At(e, i, l) {
|
|
|
1317
1325
|
n = {
|
|
1318
1326
|
"line-color": O(o.color),
|
|
1319
1327
|
"line-width": ee(o.width || 1),
|
|
1320
|
-
"line-opacity":
|
|
1328
|
+
"line-opacity": be(i)
|
|
1321
1329
|
};
|
|
1322
1330
|
const p = at(o.style);
|
|
1323
1331
|
p && (n["line-dasharray"] = p), c = [
|
|
@@ -1333,7 +1341,7 @@ function At(e, i, l) {
|
|
|
1333
1341
|
n = {
|
|
1334
1342
|
"circle-color": O(o.color),
|
|
1335
1343
|
"circle-radius": p,
|
|
1336
|
-
"circle-opacity":
|
|
1344
|
+
"circle-opacity": be(i)
|
|
1337
1345
|
}, Te(o.outline) && (n["circle-stroke-color"] = O(o.outline.color), n["circle-stroke-width"] = ee(o.outline.width || 1)), c = [
|
|
1338
1346
|
{
|
|
1339
1347
|
type: "circle",
|
|
@@ -1344,10 +1352,10 @@ function At(e, i, l) {
|
|
|
1344
1352
|
}
|
|
1345
1353
|
return { paint: n, legend: c, geomType: r, outlinePaint: w };
|
|
1346
1354
|
}
|
|
1347
|
-
function
|
|
1355
|
+
function Xo(e, i, l) {
|
|
1348
1356
|
const o = e.field1.toLowerCase(), r = e.uniqueValueInfos || [], n = e.defaultSymbol;
|
|
1349
1357
|
if (r.length === 0)
|
|
1350
|
-
return
|
|
1358
|
+
return Bt({ ...e, symbol: n }, i);
|
|
1351
1359
|
const c = r[0]?.symbol || n, w = it(c);
|
|
1352
1360
|
let p = {};
|
|
1353
1361
|
const x = [];
|
|
@@ -1365,7 +1373,7 @@ function Qo(e, i, l) {
|
|
|
1365
1373
|
}
|
|
1366
1374
|
if (g.push(n ? O(n.color) : "rgba(0, 0, 0, 0)"), p = {
|
|
1367
1375
|
"fill-color": g,
|
|
1368
|
-
"fill-opacity":
|
|
1376
|
+
"fill-opacity": be(i)
|
|
1369
1377
|
}, Te(c?.outline)) {
|
|
1370
1378
|
const a = ee(Math.max(c.outline.width || 1, 1));
|
|
1371
1379
|
h = {
|
|
@@ -1388,7 +1396,7 @@ function Qo(e, i, l) {
|
|
|
1388
1396
|
g.push(n ? O(n.color) : "rgba(0, 0, 0, 0)"), p = {
|
|
1389
1397
|
"line-color": g,
|
|
1390
1398
|
"line-width": ee(c?.width || 2),
|
|
1391
|
-
"line-opacity":
|
|
1399
|
+
"line-opacity": be(i)
|
|
1392
1400
|
};
|
|
1393
1401
|
const a = r.map((f) => f.symbol?.style).filter(Boolean), v = [...new Set(a)];
|
|
1394
1402
|
if (v.length === 1) {
|
|
@@ -1411,15 +1419,15 @@ function Qo(e, i, l) {
|
|
|
1411
1419
|
p = {
|
|
1412
1420
|
"circle-color": g,
|
|
1413
1421
|
"circle-radius": a,
|
|
1414
|
-
"circle-opacity":
|
|
1422
|
+
"circle-opacity": be(i)
|
|
1415
1423
|
}, Te(c?.outline) && (p["circle-stroke-color"] = O(c.outline.color), p["circle-stroke-width"] = ee(c.outline.width || 1));
|
|
1416
1424
|
}
|
|
1417
1425
|
return { paint: p, legend: x, geomType: w, outlinePaint: h };
|
|
1418
1426
|
}
|
|
1419
|
-
function
|
|
1427
|
+
function Yo(e, i) {
|
|
1420
1428
|
const l = e.field.toLowerCase(), o = e.classBreakInfos || [], r = e.visualVariables?.find((h) => h.type === "colorInfo");
|
|
1421
1429
|
if (r?.stops && r.stops.length > 0)
|
|
1422
|
-
return
|
|
1430
|
+
return ea(r, l, e, i);
|
|
1423
1431
|
if (o.length === 0)
|
|
1424
1432
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1425
1433
|
const n = o[0]?.symbol, c = it(n);
|
|
@@ -1439,7 +1447,7 @@ function Xo(e, i) {
|
|
|
1439
1447
|
}
|
|
1440
1448
|
if (w = {
|
|
1441
1449
|
"fill-color": h,
|
|
1442
|
-
"fill-opacity":
|
|
1450
|
+
"fill-opacity": be(i)
|
|
1443
1451
|
}, Te(n?.outline)) {
|
|
1444
1452
|
const g = ee(n.outline.width || 1);
|
|
1445
1453
|
x = {
|
|
@@ -1450,7 +1458,7 @@ function Xo(e, i) {
|
|
|
1450
1458
|
} else if (c === "line") {
|
|
1451
1459
|
const h = o.map((E) => E.symbol?.style || "esriSLSSolid"), g = [...new Set(h)];
|
|
1452
1460
|
if (g.length > 1) {
|
|
1453
|
-
const E =
|
|
1461
|
+
const E = Jo(o, h, l, e, i);
|
|
1454
1462
|
return { paint: {}, legend: [], geomType: c, outlinePaint: x, splitLayers: E };
|
|
1455
1463
|
}
|
|
1456
1464
|
const v = ["step", ["get", l]];
|
|
@@ -1469,14 +1477,14 @@ function Xo(e, i) {
|
|
|
1469
1477
|
w = {
|
|
1470
1478
|
"line-color": v,
|
|
1471
1479
|
"line-width": L,
|
|
1472
|
-
"line-opacity":
|
|
1480
|
+
"line-opacity": be(i)
|
|
1473
1481
|
};
|
|
1474
1482
|
const S = at(g[0]);
|
|
1475
1483
|
S && (w["line-dasharray"] = S);
|
|
1476
1484
|
}
|
|
1477
1485
|
return { paint: w, legend: p, geomType: c, outlinePaint: x };
|
|
1478
1486
|
}
|
|
1479
|
-
function
|
|
1487
|
+
function ea(e, i, l, o) {
|
|
1480
1488
|
const r = e.stops || [];
|
|
1481
1489
|
if (r.length === 0)
|
|
1482
1490
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
@@ -1501,7 +1509,7 @@ function Yo(e, i, l, o) {
|
|
|
1501
1509
|
h
|
|
1502
1510
|
// Otherwise use the interpolated color
|
|
1503
1511
|
],
|
|
1504
|
-
"fill-opacity":
|
|
1512
|
+
"fill-opacity": be(o)
|
|
1505
1513
|
}, Te(n?.outline)) {
|
|
1506
1514
|
const a = ee(n.outline.width || 1);
|
|
1507
1515
|
x = {
|
|
@@ -1512,22 +1520,22 @@ function Yo(e, i, l, o) {
|
|
|
1512
1520
|
}
|
|
1513
1521
|
return { paint: w, legend: p, geomType: c, outlinePaint: x };
|
|
1514
1522
|
}
|
|
1515
|
-
function
|
|
1523
|
+
function ta(e, i, l, o) {
|
|
1516
1524
|
if (!e?.renderer)
|
|
1517
1525
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1518
1526
|
const r = e.renderer;
|
|
1519
1527
|
switch (r.type) {
|
|
1520
1528
|
case "simple":
|
|
1521
|
-
return
|
|
1529
|
+
return Bt(r, i);
|
|
1522
1530
|
case "uniqueValue":
|
|
1523
|
-
return
|
|
1531
|
+
return Xo(r, i, l);
|
|
1524
1532
|
case "classBreaks":
|
|
1525
|
-
return
|
|
1533
|
+
return Yo(r, i);
|
|
1526
1534
|
default:
|
|
1527
1535
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1528
1536
|
}
|
|
1529
1537
|
}
|
|
1530
|
-
function
|
|
1538
|
+
function oa(e) {
|
|
1531
1539
|
if (!e) return null;
|
|
1532
1540
|
const i = (e.title || "").replace(/\{([^}]+)\}/g, (n, c) => `{${c.toLowerCase()}}`), o = (e.fieldInfos || []).filter((n) => n.visible === !0).map((n) => {
|
|
1533
1541
|
const c = {
|
|
@@ -1541,16 +1549,16 @@ function ta(e) {
|
|
|
1541
1549
|
};
|
|
1542
1550
|
return e.showTime && (r.showTime = !0), r;
|
|
1543
1551
|
}
|
|
1544
|
-
function
|
|
1552
|
+
function aa(e) {
|
|
1545
1553
|
return e?.definitionExpression;
|
|
1546
1554
|
}
|
|
1547
|
-
function
|
|
1555
|
+
function ia(e) {
|
|
1548
1556
|
return (e.includes("_") ? e.split("_").slice(1).join(" ") : e).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
1549
1557
|
}
|
|
1550
|
-
function
|
|
1558
|
+
function la(e) {
|
|
1551
1559
|
return e.includes("_") ? e.split("_").slice(1).join(" ") : e;
|
|
1552
1560
|
}
|
|
1553
|
-
function
|
|
1561
|
+
function na(e) {
|
|
1554
1562
|
const i = /* @__PURE__ */ new Map();
|
|
1555
1563
|
if (!e)
|
|
1556
1564
|
return i;
|
|
@@ -1565,7 +1573,7 @@ function la(e) {
|
|
|
1565
1573
|
}
|
|
1566
1574
|
return i;
|
|
1567
1575
|
}
|
|
1568
|
-
async function
|
|
1576
|
+
async function ra(e) {
|
|
1569
1577
|
try {
|
|
1570
1578
|
const i = await fetch(`${e}?f=json`);
|
|
1571
1579
|
if (!i.ok)
|
|
@@ -1579,7 +1587,7 @@ async function na(e) {
|
|
|
1579
1587
|
return null;
|
|
1580
1588
|
}
|
|
1581
1589
|
}
|
|
1582
|
-
function
|
|
1590
|
+
function Ot(e) {
|
|
1583
1591
|
const i = {
|
|
1584
1592
|
id: e.id,
|
|
1585
1593
|
title: e.title,
|
|
@@ -1600,30 +1608,30 @@ async function Zt(e) {
|
|
|
1600
1608
|
let n = r.layerDefinition?.drawingInfo, c;
|
|
1601
1609
|
const w = !n || !n.renderer, p = o.includes(r.title), x = n?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || n?.renderer?.defaultSymbol?.outline;
|
|
1602
1610
|
if ((w || p) && r.url) {
|
|
1603
|
-
const I = await
|
|
1611
|
+
const I = await ra(r.url);
|
|
1604
1612
|
if (I) {
|
|
1605
1613
|
if (n = I.drawingInfo, x && Te(x) && n?.renderer) {
|
|
1606
1614
|
const _ = n.renderer, te = _.uniqueValueInfos?.[0]?.symbol?.outline || _.defaultSymbol?.outline;
|
|
1607
1615
|
if (!Te(te)) {
|
|
1608
|
-
for (const
|
|
1609
|
-
|
|
1616
|
+
for (const N of _.uniqueValueInfos || [])
|
|
1617
|
+
N.symbol && (N.symbol.outline = x);
|
|
1610
1618
|
_.defaultSymbol && (_.defaultSymbol.outline = x);
|
|
1611
1619
|
}
|
|
1612
1620
|
}
|
|
1613
|
-
I.description && (c =
|
|
1621
|
+
I.description && (c = na(I.description), c.size > 0);
|
|
1614
1622
|
}
|
|
1615
1623
|
}
|
|
1616
|
-
const { paint: h, legend: g, geomType: a, outlinePaint: v, splitLayers: f } =
|
|
1624
|
+
const { paint: h, legend: g, geomType: a, outlinePaint: v, splitLayers: f } = ta(
|
|
1617
1625
|
n,
|
|
1618
1626
|
r.opacity,
|
|
1619
1627
|
c,
|
|
1620
1628
|
r.title
|
|
1621
|
-
), L =
|
|
1629
|
+
), L = oa(r.popupInfo), S = aa(r.layerDefinition), E = Qo(r.layerDefinition?.minScale, r.layerDefinition?.maxScale), D = ia(r.title), X = la(r.title), T = r.opacity ?? 1;
|
|
1622
1630
|
if (f && f.length > 0)
|
|
1623
1631
|
for (const I of f)
|
|
1624
|
-
l.push(
|
|
1632
|
+
l.push(Ot({
|
|
1625
1633
|
id: `${D}${I.suffix}`,
|
|
1626
|
-
title:
|
|
1634
|
+
title: X,
|
|
1627
1635
|
type: a,
|
|
1628
1636
|
url: r.url,
|
|
1629
1637
|
opacity: T,
|
|
@@ -1635,9 +1643,9 @@ async function Zt(e) {
|
|
|
1635
1643
|
maxZoom: E.maxZoom
|
|
1636
1644
|
}));
|
|
1637
1645
|
else
|
|
1638
|
-
l.push(
|
|
1646
|
+
l.push(Ot({
|
|
1639
1647
|
id: D,
|
|
1640
|
-
title:
|
|
1648
|
+
title: X,
|
|
1641
1649
|
type: a,
|
|
1642
1650
|
url: r.url,
|
|
1643
1651
|
opacity: T,
|
|
@@ -1653,23 +1661,23 @@ async function Zt(e) {
|
|
|
1653
1661
|
}
|
|
1654
1662
|
return l.sort((r, n) => r.title.localeCompare(n.title)), l;
|
|
1655
1663
|
}
|
|
1656
|
-
const
|
|
1664
|
+
const zt = {}, wt = "376af635c84643cd816a8c5d017a53aa", ja = wt;
|
|
1657
1665
|
function Lt(e, i) {
|
|
1658
1666
|
let l = `https://www.arcgis.com/sharing/rest/content/items/${e}/data?f=json`;
|
|
1659
1667
|
return i && (l += `&token=${i}`), l;
|
|
1660
1668
|
}
|
|
1661
|
-
function
|
|
1669
|
+
function qa() {
|
|
1662
1670
|
return Lt(wt);
|
|
1663
1671
|
}
|
|
1664
1672
|
const ot = /* @__PURE__ */ new Map(), He = /* @__PURE__ */ new Map();
|
|
1665
|
-
function
|
|
1673
|
+
function sa(e) {
|
|
1666
1674
|
e ? (ot.delete(e), He.delete(e)) : (ot.clear(), He.clear());
|
|
1667
1675
|
}
|
|
1668
|
-
let Ye,
|
|
1669
|
-
async function
|
|
1670
|
-
const e = typeof import.meta < "u" &&
|
|
1676
|
+
let Ye, Dt = 0;
|
|
1677
|
+
async function ca() {
|
|
1678
|
+
const e = typeof import.meta < "u" && zt?.VITE_AGO_USERNAME, i = typeof import.meta < "u" && zt?.VITE_AGO_PASSWORD;
|
|
1671
1679
|
if (!(!e || !i)) {
|
|
1672
|
-
if (Ye && Date.now() <
|
|
1680
|
+
if (Ye && Date.now() < Dt - 3e5)
|
|
1673
1681
|
return Ye;
|
|
1674
1682
|
try {
|
|
1675
1683
|
const o = await (await fetch("https://www.arcgis.com/sharing/rest/generateToken", {
|
|
@@ -1686,13 +1694,13 @@ async function sa() {
|
|
|
1686
1694
|
// 2 hours
|
|
1687
1695
|
})
|
|
1688
1696
|
})).json();
|
|
1689
|
-
return o.error ? void 0 : (Ye = o.token,
|
|
1697
|
+
return o.error ? void 0 : (Ye = o.token, Dt = o.expires, Ye);
|
|
1690
1698
|
} catch {
|
|
1691
1699
|
return;
|
|
1692
1700
|
}
|
|
1693
1701
|
}
|
|
1694
1702
|
}
|
|
1695
|
-
async function
|
|
1703
|
+
async function ua(e, i) {
|
|
1696
1704
|
const l = Lt(e, i), o = await fetch(l, { cache: "no-store" });
|
|
1697
1705
|
if (!o.ok)
|
|
1698
1706
|
throw new Error(`Failed to fetch WebMap: ${o.status} ${o.statusText}`);
|
|
@@ -1701,9 +1709,9 @@ async function ca(e, i) {
|
|
|
1701
1709
|
throw new Error(`ArcGIS error: ${r.error.message || r.error.code || "Unknown error"}`);
|
|
1702
1710
|
return r;
|
|
1703
1711
|
}
|
|
1704
|
-
async function
|
|
1712
|
+
async function da(e) {
|
|
1705
1713
|
try {
|
|
1706
|
-
const i = await
|
|
1714
|
+
const i = await ca(), l = await ua(e, i);
|
|
1707
1715
|
return await Zt(l);
|
|
1708
1716
|
} catch (i) {
|
|
1709
1717
|
throw new Error(
|
|
@@ -1720,7 +1728,7 @@ async function ht(e = wt) {
|
|
|
1720
1728
|
return l;
|
|
1721
1729
|
const o = (async () => {
|
|
1722
1730
|
try {
|
|
1723
|
-
const r = await
|
|
1731
|
+
const r = await da(e);
|
|
1724
1732
|
return ot.set(e, r), r;
|
|
1725
1733
|
} finally {
|
|
1726
1734
|
He.delete(e);
|
|
@@ -1728,7 +1736,7 @@ async function ht(e = wt) {
|
|
|
1728
1736
|
})();
|
|
1729
1737
|
return He.set(e, o), o;
|
|
1730
1738
|
}
|
|
1731
|
-
function
|
|
1739
|
+
function fa(e) {
|
|
1732
1740
|
const i = k({}), l = /* @__PURE__ */ new Map();
|
|
1733
1741
|
for (const a of e)
|
|
1734
1742
|
i.value[a.id] = {
|
|
@@ -1770,7 +1778,7 @@ function da(e) {
|
|
|
1770
1778
|
const S = `${a.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, E = await fetch(S, a.options);
|
|
1771
1779
|
if (!E.ok)
|
|
1772
1780
|
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
1773
|
-
f = (await E.json()).features?.map((
|
|
1781
|
+
f = (await E.json()).features?.map((X) => X.attributes) || [];
|
|
1774
1782
|
} else
|
|
1775
1783
|
throw new Error(`Unknown data source type: ${a.type}`);
|
|
1776
1784
|
a.transform && (f = a.transform(f)), i.value = {
|
|
@@ -1828,11 +1836,11 @@ function da(e) {
|
|
|
1828
1836
|
}
|
|
1829
1837
|
return et(() => {
|
|
1830
1838
|
r(), h();
|
|
1831
|
-
}),
|
|
1839
|
+
}), _t(() => {
|
|
1832
1840
|
g();
|
|
1833
1841
|
}), {
|
|
1834
1842
|
/** Reactive state for all data sources */
|
|
1835
|
-
state:
|
|
1843
|
+
state: j(i),
|
|
1836
1844
|
/** Whether any data source is currently loading */
|
|
1837
1845
|
isLoading: w,
|
|
1838
1846
|
/** Fetch all data sources */
|
|
@@ -1849,22 +1857,22 @@ function da(e) {
|
|
|
1849
1857
|
stopPolling: g
|
|
1850
1858
|
};
|
|
1851
1859
|
}
|
|
1852
|
-
const
|
|
1860
|
+
const pa = { class: "layerboard-layout" }, ya = ["aria-expanded"], ma = {
|
|
1853
1861
|
key: 0,
|
|
1854
1862
|
class: "layerboard-subtitle"
|
|
1855
|
-
},
|
|
1863
|
+
}, ha = { class: "layerboard-mobile-menu-content" }, ga = { class: "layerboard-main" }, va = {
|
|
1856
1864
|
key: 0,
|
|
1857
1865
|
class: "layerboard-loading",
|
|
1858
1866
|
role: "status",
|
|
1859
1867
|
"aria-live": "polite"
|
|
1860
|
-
},
|
|
1868
|
+
}, ba = {
|
|
1861
1869
|
key: 1,
|
|
1862
1870
|
class: "layerboard-error",
|
|
1863
1871
|
role: "alert"
|
|
1864
|
-
},
|
|
1872
|
+
}, wa = ["aria-expanded", "aria-label"], La = { key: 0 }, Sa = { key: 1 }, Ca = {
|
|
1865
1873
|
class: "sr-only",
|
|
1866
1874
|
"aria-live": "polite"
|
|
1867
|
-
},
|
|
1875
|
+
}, ka = /* @__PURE__ */ ye({
|
|
1868
1876
|
__name: "Layerboard",
|
|
1869
1877
|
props: {
|
|
1870
1878
|
title: {},
|
|
@@ -1904,56 +1912,56 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
1904
1912
|
function D(y) {
|
|
1905
1913
|
L.value.has(y) ? L.value.delete(y) : L.value.add(y), L.value = new Set(L.value);
|
|
1906
1914
|
}
|
|
1907
|
-
function
|
|
1915
|
+
function X(y, M) {
|
|
1908
1916
|
M ? L.value.add(y) : L.value.delete(y), L.value = new Set(L.value);
|
|
1909
1917
|
}
|
|
1910
1918
|
function T(y, M) {
|
|
1911
1919
|
S.value = { ...S.value, [y]: M };
|
|
1912
1920
|
}
|
|
1913
|
-
const I = o.dataSources.length > 0 ?
|
|
1914
|
-
function
|
|
1921
|
+
const I = o.dataSources.length > 0 ? fa(o.dataSources) : null, _ = z(() => I?.state.value ?? {}), te = z(() => I?.isLoading.value ?? !1);
|
|
1922
|
+
function N(y) {
|
|
1915
1923
|
return I?.getData(y) ?? null;
|
|
1916
1924
|
}
|
|
1917
|
-
function
|
|
1925
|
+
function me(y) {
|
|
1918
1926
|
return I?.refetch(y) ?? Promise.resolve();
|
|
1919
1927
|
}
|
|
1920
|
-
|
|
1921
|
-
const
|
|
1928
|
+
Z("layerboard-layers", j(n)), Z("layerboard-visible", h), Z("layerboard-opacities", g), Z("layerboard-loading", j(a)), Z("layerboard-errors", j(v)), Z("layerboard-zoom", j(p)), Z("layerboard-toggle-layer", _e), Z("layerboard-set-layer-visible", Me), Z("layerboard-set-layers-visible", Re), Z("layerboard-set-opacity", Pe), Z("layerboard-tiled-layers", j(z(() => o.tiledLayers))), Z("layerboard-visible-tiled", L), Z("layerboard-tiled-opacities", S), Z("layerboard-toggle-tiled", D), Z("layerboard-set-tiled-opacity", T), Z("layerboard-set-tiled-visible", X), Z("layerboard-data-sources-state", _), Z("layerboard-data-sources-loading", te), Z("layerboard-get-data-source", N), Z("layerboard-refetch-data-source", me);
|
|
1929
|
+
const he = z(() => ({
|
|
1922
1930
|
backgroundColor: o.themeColor
|
|
1923
1931
|
})), Ue = z(() => ({
|
|
1924
1932
|
backgroundColor: o.themeColor
|
|
1925
1933
|
})), Je = z(() => ({
|
|
1926
1934
|
backgroundColor: o.themeColor
|
|
1927
1935
|
})), lt = z(() => ({
|
|
1928
|
-
width:
|
|
1936
|
+
width: de.value ? "0" : o.sidebarWidth
|
|
1929
1937
|
}));
|
|
1930
1938
|
async function De() {
|
|
1931
1939
|
try {
|
|
1932
1940
|
c.value = !0, w.value = null;
|
|
1933
|
-
const M = (await ht(o.webMapId)).map((
|
|
1934
|
-
let
|
|
1935
|
-
const
|
|
1936
|
-
|
|
1937
|
-
...
|
|
1938
|
-
paint:
|
|
1939
|
-
outlinePaint:
|
|
1940
|
-
legend:
|
|
1941
|
-
type:
|
|
1941
|
+
const M = (await ht(o.webMapId)).map((U) => {
|
|
1942
|
+
let Q = U;
|
|
1943
|
+
const Ce = o.layerStyleOverrides[U.id];
|
|
1944
|
+
Ce && (Q = {
|
|
1945
|
+
...Q,
|
|
1946
|
+
paint: Ce.paint ?? Q.paint,
|
|
1947
|
+
outlinePaint: Ce.outlinePaint ?? Q.outlinePaint,
|
|
1948
|
+
legend: Ce.legend ?? Q.legend,
|
|
1949
|
+
type: Ce.type ?? Q.type
|
|
1942
1950
|
});
|
|
1943
|
-
const Ve = o.popupOverrides[
|
|
1944
|
-
return Ve &&
|
|
1945
|
-
...
|
|
1946
|
-
popup: { ...
|
|
1947
|
-
}),
|
|
1951
|
+
const Ve = o.popupOverrides[U.id];
|
|
1952
|
+
return Ve && Q.popup && (Q = {
|
|
1953
|
+
...Q,
|
|
1954
|
+
popup: { ...Q.popup, ...Ve }
|
|
1955
|
+
}), Q;
|
|
1948
1956
|
});
|
|
1949
|
-
n.value = M.map((
|
|
1950
|
-
config:
|
|
1951
|
-
component:
|
|
1957
|
+
n.value = M.map((U) => ({
|
|
1958
|
+
config: U,
|
|
1959
|
+
component: U.type
|
|
1952
1960
|
}));
|
|
1953
|
-
const
|
|
1954
|
-
M.forEach((
|
|
1955
|
-
|
|
1956
|
-
}), g.value =
|
|
1961
|
+
const J = {};
|
|
1962
|
+
M.forEach((U) => {
|
|
1963
|
+
J[U.id] = U.opacity ?? 1;
|
|
1964
|
+
}), g.value = J, r("configs-loaded", M);
|
|
1957
1965
|
} catch (y) {
|
|
1958
1966
|
const M = y instanceof Error ? y.message : "Failed to load layer configurations";
|
|
1959
1967
|
w.value = M, r("load-error", M);
|
|
@@ -1968,13 +1976,13 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
1968
1976
|
"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"
|
|
1969
1977
|
), M = await fetch(y);
|
|
1970
1978
|
if (!M.ok) return;
|
|
1971
|
-
const
|
|
1972
|
-
for (const
|
|
1973
|
-
if (
|
|
1974
|
-
const
|
|
1975
|
-
|
|
1979
|
+
const J = await M.json(), U = {};
|
|
1980
|
+
for (const Q of J.rows || [])
|
|
1981
|
+
if (Q.url_text && Q.representation) {
|
|
1982
|
+
const Ce = At(Q.url_text), Ve = `https://metadata.phila.gov/#home/representationdetails/${Q.representation}/`;
|
|
1983
|
+
U[Ce] = Ve;
|
|
1976
1984
|
}
|
|
1977
|
-
f.value =
|
|
1985
|
+
f.value = U;
|
|
1978
1986
|
} catch {
|
|
1979
1987
|
}
|
|
1980
1988
|
}
|
|
@@ -1984,65 +1992,65 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
1984
1992
|
function _e(y) {
|
|
1985
1993
|
h.value.has(y) ? h.value.delete(y) : h.value.add(y), h.value = new Set(h.value);
|
|
1986
1994
|
}
|
|
1987
|
-
function
|
|
1995
|
+
function Me(y, M) {
|
|
1988
1996
|
M ? h.value.add(y) : h.value.delete(y), h.value = new Set(h.value);
|
|
1989
1997
|
}
|
|
1990
1998
|
function Re(y, M) {
|
|
1991
|
-
for (const
|
|
1992
|
-
M ? h.value.add(
|
|
1999
|
+
for (const J of y)
|
|
2000
|
+
M ? h.value.add(J) : h.value.delete(J);
|
|
1993
2001
|
h.value = new Set(h.value);
|
|
1994
2002
|
}
|
|
1995
|
-
function
|
|
2003
|
+
function Pe(y, M) {
|
|
1996
2004
|
g.value = { ...g.value, [y]: M };
|
|
1997
2005
|
}
|
|
1998
2006
|
function st(y, M) {
|
|
1999
2007
|
M ? a.value.add(y) : a.value.delete(y), a.value = new Set(a.value);
|
|
2000
2008
|
}
|
|
2001
|
-
function
|
|
2009
|
+
function se(y, M) {
|
|
2002
2010
|
if (M)
|
|
2003
2011
|
v.value = { ...v.value, [y]: M };
|
|
2004
2012
|
else {
|
|
2005
|
-
const
|
|
2006
|
-
delete
|
|
2013
|
+
const J = { ...v.value };
|
|
2014
|
+
delete J[y], v.value = J;
|
|
2007
2015
|
}
|
|
2008
2016
|
}
|
|
2009
2017
|
function Ae(y) {
|
|
2010
2018
|
x.value = y;
|
|
2011
2019
|
}
|
|
2012
|
-
const
|
|
2013
|
-
function
|
|
2014
|
-
|
|
2015
|
-
|
|
2020
|
+
const ie = k(null), Fe = k(null), ct = k(null), we = k(null), We = k(null), je = k(null), Ke = k(null), Le = k("map");
|
|
2021
|
+
function Be() {
|
|
2022
|
+
Le.value = Le.value === "sidebar" ? "map" : "sidebar", Ne(() => {
|
|
2023
|
+
Le.value === "sidebar" && ie.value?.focus();
|
|
2016
2024
|
});
|
|
2017
2025
|
}
|
|
2018
|
-
const
|
|
2026
|
+
const le = k(!1);
|
|
2019
2027
|
function Qe() {
|
|
2020
|
-
|
|
2021
|
-
|
|
2028
|
+
le.value = !le.value, le.value && Ne(() => {
|
|
2029
|
+
we.value?.focus();
|
|
2022
2030
|
});
|
|
2023
2031
|
}
|
|
2024
2032
|
function Ee() {
|
|
2025
|
-
|
|
2033
|
+
le.value = !1, Ne(() => {
|
|
2026
2034
|
Fe.value?.focus();
|
|
2027
2035
|
});
|
|
2028
2036
|
}
|
|
2029
|
-
const
|
|
2037
|
+
const de = k(!1);
|
|
2030
2038
|
function Ie() {
|
|
2031
|
-
|
|
2039
|
+
de.value = !de.value;
|
|
2032
2040
|
}
|
|
2033
|
-
const
|
|
2034
|
-
function
|
|
2035
|
-
qe.value = document.activeElement,
|
|
2041
|
+
const ge = k(!1), qe = k(null);
|
|
2042
|
+
function Se() {
|
|
2043
|
+
qe.value = document.activeElement, ge.value = !0, Ne(() => {
|
|
2036
2044
|
Ke.value?.focus();
|
|
2037
2045
|
});
|
|
2038
2046
|
}
|
|
2039
|
-
function
|
|
2040
|
-
|
|
2047
|
+
function ne() {
|
|
2048
|
+
ge.value = !1, Ne(() => {
|
|
2041
2049
|
qe.value?.focus(), qe.value = null;
|
|
2042
2050
|
});
|
|
2043
2051
|
}
|
|
2044
|
-
function
|
|
2045
|
-
y.target.classList.contains("layerboard-modal-backdrop") &&
|
|
2052
|
+
function Ze(y) {
|
|
2053
|
+
y.target.classList.contains("layerboard-modal-backdrop") && ne();
|
|
2046
2054
|
}
|
|
2047
2055
|
function ut(y) {
|
|
2048
2056
|
if (y.key === "Escape") {
|
|
@@ -2056,13 +2064,13 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2056
2064
|
)
|
|
2057
2065
|
);
|
|
2058
2066
|
if (M.length === 0) return;
|
|
2059
|
-
const
|
|
2060
|
-
y.shiftKey ? document.activeElement ===
|
|
2067
|
+
const J = M[0], U = M[M.length - 1];
|
|
2068
|
+
y.shiftKey ? document.activeElement === J && (y.preventDefault(), U.focus()) : document.activeElement === U && (y.preventDefault(), J.focus());
|
|
2061
2069
|
}
|
|
2062
2070
|
}
|
|
2063
2071
|
function dt(y) {
|
|
2064
2072
|
if (y.key === "Escape") {
|
|
2065
|
-
|
|
2073
|
+
ne();
|
|
2066
2074
|
return;
|
|
2067
2075
|
}
|
|
2068
2076
|
if (y.key === "Tab" && je.value) {
|
|
@@ -2072,11 +2080,11 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2072
2080
|
)
|
|
2073
2081
|
);
|
|
2074
2082
|
if (M.length === 0) return;
|
|
2075
|
-
const
|
|
2076
|
-
y.shiftKey ? document.activeElement ===
|
|
2083
|
+
const J = M[0], U = M[M.length - 1];
|
|
2084
|
+
y.shiftKey ? document.activeElement === J && (y.preventDefault(), U.focus()) : document.activeElement === U && (y.preventDefault(), J.focus());
|
|
2077
2085
|
}
|
|
2078
2086
|
}
|
|
2079
|
-
|
|
2087
|
+
Z("layerboard-open-modal", Se), Z("layerboard-close-modal", ne), Z("layerboard-is-modal-open", j(ge)), i({
|
|
2080
2088
|
/** Layer configurations */
|
|
2081
2089
|
layerList: n,
|
|
2082
2090
|
/** Set of visible layer IDs */
|
|
@@ -2092,15 +2100,15 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2092
2100
|
/** Toggle a layer's visibility */
|
|
2093
2101
|
toggleLayer: _e,
|
|
2094
2102
|
/** Set a layer's visibility explicitly */
|
|
2095
|
-
setLayerVisible:
|
|
2103
|
+
setLayerVisible: Me,
|
|
2096
2104
|
/** Set multiple layers' visibility at once */
|
|
2097
2105
|
setLayersVisible: Re,
|
|
2098
2106
|
/** Set a layer's opacity */
|
|
2099
|
-
setLayerOpacity:
|
|
2107
|
+
setLayerOpacity: Pe,
|
|
2100
2108
|
/** Reload layer configurations */
|
|
2101
2109
|
reloadConfigs: De,
|
|
2102
2110
|
/** Clear configuration cache */
|
|
2103
|
-
clearCache: () =>
|
|
2111
|
+
clearCache: () => sa(o.webMapId),
|
|
2104
2112
|
// Tiled layer APIs
|
|
2105
2113
|
/** Set of visible tiled layer IDs */
|
|
2106
2114
|
visibleTiledLayers: L,
|
|
@@ -2109,7 +2117,7 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2109
2117
|
/** Toggle a tiled layer's visibility */
|
|
2110
2118
|
toggleTiledLayer: D,
|
|
2111
2119
|
/** Set a tiled layer's visibility explicitly */
|
|
2112
|
-
setTiledLayerVisible:
|
|
2120
|
+
setTiledLayerVisible: X,
|
|
2113
2121
|
/** Set a tiled layer's opacity */
|
|
2114
2122
|
setTiledLayerOpacity: T,
|
|
2115
2123
|
// Data source APIs
|
|
@@ -2118,32 +2126,32 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2118
2126
|
/** Whether any data source is loading */
|
|
2119
2127
|
dataSourcesLoading: te,
|
|
2120
2128
|
/** Get data from a specific data source */
|
|
2121
|
-
getDataSourceData:
|
|
2129
|
+
getDataSourceData: N,
|
|
2122
2130
|
/** Refetch a specific data source */
|
|
2123
|
-
refetchDataSource:
|
|
2131
|
+
refetchDataSource: me,
|
|
2124
2132
|
// Modal APIs
|
|
2125
2133
|
/** Whether the modal is currently open */
|
|
2126
|
-
isModalOpen:
|
|
2134
|
+
isModalOpen: ge,
|
|
2127
2135
|
/** Open the modal */
|
|
2128
|
-
openModal:
|
|
2136
|
+
openModal: Se,
|
|
2129
2137
|
/** Close the modal */
|
|
2130
|
-
closeModal:
|
|
2138
|
+
closeModal: ne
|
|
2131
2139
|
});
|
|
2132
2140
|
function Xe(y) {
|
|
2133
|
-
y.key === "Escape" &&
|
|
2141
|
+
y.key === "Escape" && le.value && Ee();
|
|
2134
2142
|
}
|
|
2135
2143
|
return et(() => {
|
|
2136
2144
|
De(), nt(), E(), document.addEventListener("keydown", Xe);
|
|
2137
|
-
}),
|
|
2145
|
+
}), Jt(() => {
|
|
2138
2146
|
document.removeEventListener("keydown", Xe);
|
|
2139
|
-
}), (y, M) => (m(), $("div",
|
|
2147
|
+
}), (y, M) => (m(), $("div", pa, [
|
|
2140
2148
|
M[5] || (M[5] = P("a", {
|
|
2141
2149
|
href: "#main-content",
|
|
2142
2150
|
class: "skip-to-main-content-link"
|
|
2143
2151
|
}, "Skip to main content", -1)),
|
|
2144
2152
|
P("header", {
|
|
2145
2153
|
class: "layerboard-header",
|
|
2146
|
-
style:
|
|
2154
|
+
style: fe(he.value)
|
|
2147
2155
|
}, [
|
|
2148
2156
|
M[1] || (M[1] = P("a", {
|
|
2149
2157
|
href: "https://www.phila.gov/",
|
|
@@ -2162,22 +2170,22 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2162
2170
|
ref_key: "hamburgerRef",
|
|
2163
2171
|
ref: Fe,
|
|
2164
2172
|
class: "layerboard-hamburger layerboard-mobile-only",
|
|
2165
|
-
"aria-expanded":
|
|
2173
|
+
"aria-expanded": le.value,
|
|
2166
2174
|
"aria-label": "Toggle menu",
|
|
2167
2175
|
onClick: Qe
|
|
2168
2176
|
}, [
|
|
2169
|
-
|
|
2170
|
-
"icon-definition": d(
|
|
2177
|
+
H(d(ke), {
|
|
2178
|
+
"icon-definition": d(ko),
|
|
2171
2179
|
size: "medium",
|
|
2172
2180
|
inline: "",
|
|
2173
2181
|
decorative: ""
|
|
2174
2182
|
}, null, 8, ["icon-definition"])
|
|
2175
|
-
], 8,
|
|
2176
|
-
|
|
2177
|
-
P("h1", null,
|
|
2178
|
-
e.subtitle ? (m(), $("span",
|
|
2183
|
+
], 8, ya),
|
|
2184
|
+
pe(y.$slots, "header", {}, () => [
|
|
2185
|
+
P("h1", null, G(e.title), 1),
|
|
2186
|
+
e.subtitle ? (m(), $("span", ma, G(e.subtitle), 1)) : A("", !0)
|
|
2179
2187
|
], !0),
|
|
2180
|
-
|
|
2188
|
+
le.value ? (m(), $("div", {
|
|
2181
2189
|
key: 0,
|
|
2182
2190
|
ref_key: "mobileMenuRef",
|
|
2183
2191
|
ref: We,
|
|
@@ -2185,64 +2193,64 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2185
2193
|
role: "dialog",
|
|
2186
2194
|
"aria-modal": "true",
|
|
2187
2195
|
"aria-label": "Site menu",
|
|
2188
|
-
style:
|
|
2196
|
+
style: fe({ backgroundColor: e.themeColor }),
|
|
2189
2197
|
onKeydown: ut
|
|
2190
2198
|
}, [
|
|
2191
|
-
P("div",
|
|
2192
|
-
|
|
2193
|
-
openModal:
|
|
2194
|
-
closeModal:
|
|
2195
|
-
isModalOpen:
|
|
2199
|
+
P("div", ha, [
|
|
2200
|
+
pe(y.$slots, "footer", {
|
|
2201
|
+
openModal: Se,
|
|
2202
|
+
closeModal: ne,
|
|
2203
|
+
isModalOpen: ge.value
|
|
2196
2204
|
}, () => [
|
|
2197
|
-
M[0] || (M[0] =
|
|
2205
|
+
M[0] || (M[0] = xe(" City of Philadelphia ", -1))
|
|
2198
2206
|
], !0)
|
|
2199
2207
|
]),
|
|
2200
2208
|
P("button", {
|
|
2201
2209
|
ref_key: "mobileMenuCloseRef",
|
|
2202
|
-
ref:
|
|
2210
|
+
ref: we,
|
|
2203
2211
|
class: "layerboard-mobile-menu-close",
|
|
2204
2212
|
"aria-label": "Close menu",
|
|
2205
2213
|
onClick: Ee
|
|
2206
2214
|
}, [
|
|
2207
|
-
|
|
2208
|
-
"icon-definition": d(
|
|
2215
|
+
H(d(ke), {
|
|
2216
|
+
"icon-definition": d(Et),
|
|
2209
2217
|
size: "medium",
|
|
2210
2218
|
decorative: ""
|
|
2211
2219
|
}, null, 8, ["icon-definition"])
|
|
2212
2220
|
], 512)
|
|
2213
|
-
], 36)) :
|
|
2214
|
-
|
|
2221
|
+
], 36)) : A("", !0),
|
|
2222
|
+
le.value ? (m(), $("div", {
|
|
2215
2223
|
key: 1,
|
|
2216
2224
|
class: "layerboard-mobile-menu-backdrop",
|
|
2217
2225
|
onClick: Ee
|
|
2218
|
-
})) :
|
|
2226
|
+
})) : A("", !0)
|
|
2219
2227
|
], 4),
|
|
2220
|
-
P("div",
|
|
2221
|
-
c.value ? (m(), $("div",
|
|
2228
|
+
P("div", ga, [
|
|
2229
|
+
c.value ? (m(), $("div", va, [
|
|
2222
2230
|
P("div", {
|
|
2223
2231
|
class: "layerboard-spinner",
|
|
2224
|
-
style:
|
|
2232
|
+
style: fe({ borderTopColor: e.themeColor })
|
|
2225
2233
|
}, null, 4),
|
|
2226
|
-
P("p", null, "Loading " +
|
|
2227
|
-
])) : w.value ? (m(), $("div",
|
|
2234
|
+
P("p", null, "Loading " + G(e.title) + "...", 1)
|
|
2235
|
+
])) : w.value ? (m(), $("div", ba, [
|
|
2228
2236
|
M[3] || (M[3] = P("h2", null, "Error Loading Layers", -1)),
|
|
2229
|
-
P("p", null,
|
|
2237
|
+
P("p", null, G(w.value), 1),
|
|
2230
2238
|
P("button", {
|
|
2231
2239
|
class: "layerboard-retry-button",
|
|
2232
|
-
style:
|
|
2240
|
+
style: fe({ backgroundColor: e.themeColor }),
|
|
2233
2241
|
onClick: De
|
|
2234
2242
|
}, " Retry ", 4)
|
|
2235
|
-
])) : (m(), $(
|
|
2243
|
+
])) : (m(), $(ue, { key: 2 }, [
|
|
2236
2244
|
P("aside", {
|
|
2237
2245
|
id: "main-content",
|
|
2238
2246
|
ref_key: "sidebarRef",
|
|
2239
|
-
ref:
|
|
2240
|
-
class:
|
|
2241
|
-
style:
|
|
2247
|
+
ref: ie,
|
|
2248
|
+
class: re(["layerboard-sidebar", { "is-active": Le.value === "sidebar" }]),
|
|
2249
|
+
style: fe(lt.value),
|
|
2242
2250
|
"aria-label": "Map layers",
|
|
2243
2251
|
tabindex: "-1"
|
|
2244
2252
|
}, [
|
|
2245
|
-
|
|
2253
|
+
pe(y.$slots, "sidebar", {
|
|
2246
2254
|
layers: n.value,
|
|
2247
2255
|
visibleLayers: h.value,
|
|
2248
2256
|
layerOpacities: g.value,
|
|
@@ -2250,21 +2258,21 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2250
2258
|
layerErrors: v.value,
|
|
2251
2259
|
currentZoom: p.value,
|
|
2252
2260
|
toggleLayer: _e,
|
|
2253
|
-
setLayerVisible:
|
|
2261
|
+
setLayerVisible: Me,
|
|
2254
2262
|
setLayersVisible: Re,
|
|
2255
|
-
setOpacity:
|
|
2263
|
+
setOpacity: Pe,
|
|
2256
2264
|
tiledLayers: e.tiledLayers,
|
|
2257
2265
|
visibleTiledLayers: L.value,
|
|
2258
2266
|
tiledLayerOpacities: S.value,
|
|
2259
2267
|
toggleTiledLayer: D,
|
|
2260
|
-
setTiledLayerVisible:
|
|
2268
|
+
setTiledLayerVisible: X,
|
|
2261
2269
|
setTiledLayerOpacity: T,
|
|
2262
2270
|
dataSourcesState: _.value,
|
|
2263
2271
|
dataSourcesLoading: te.value,
|
|
2264
|
-
getDataSource:
|
|
2265
|
-
refetchDataSource:
|
|
2272
|
+
getDataSource: N,
|
|
2273
|
+
refetchDataSource: me
|
|
2266
2274
|
}, () => [
|
|
2267
|
-
e.showDefaultSidebar ? (m(),
|
|
2275
|
+
e.showDefaultSidebar ? (m(), q(Go, {
|
|
2268
2276
|
key: 0,
|
|
2269
2277
|
"layer-list": n.value,
|
|
2270
2278
|
"visible-layers": h.value,
|
|
@@ -2275,17 +2283,17 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2275
2283
|
"search-query": x.value,
|
|
2276
2284
|
"layer-metadata": f.value,
|
|
2277
2285
|
onToggleLayer: _e,
|
|
2278
|
-
onSetOpacity:
|
|
2286
|
+
onSetOpacity: Pe,
|
|
2279
2287
|
onUpdateSearch: Ae
|
|
2280
|
-
}, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) :
|
|
2288
|
+
}, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) : A("", !0)
|
|
2281
2289
|
], !0)
|
|
2282
2290
|
], 6),
|
|
2283
2291
|
P("div", {
|
|
2284
2292
|
role: "main",
|
|
2285
2293
|
"aria-label": "Map",
|
|
2286
|
-
class:
|
|
2294
|
+
class: re(["layerboard-map", { "is-active": Le.value === "map" }])
|
|
2287
2295
|
}, [
|
|
2288
|
-
|
|
2296
|
+
H(lo, {
|
|
2289
2297
|
"visible-layers": h.value,
|
|
2290
2298
|
"layer-opacities": g.value,
|
|
2291
2299
|
"layer-list": n.value,
|
|
@@ -2305,49 +2313,49 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2305
2313
|
"initial-center": e.initialCenter,
|
|
2306
2314
|
onZoom: rt,
|
|
2307
2315
|
onLayerLoading: st,
|
|
2308
|
-
onLayerError:
|
|
2316
|
+
onLayerError: se
|
|
2309
2317
|
}, 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"])
|
|
2310
2318
|
], 2),
|
|
2311
2319
|
P("button", {
|
|
2312
|
-
class:
|
|
2313
|
-
style:
|
|
2314
|
-
"aria-expanded": !
|
|
2315
|
-
"aria-label":
|
|
2320
|
+
class: re(["layerboard-sidebar-toggle", { "is-collapsed": de.value }]),
|
|
2321
|
+
style: fe({ left: de.value ? "0" : o.sidebarWidth }),
|
|
2322
|
+
"aria-expanded": !de.value,
|
|
2323
|
+
"aria-label": de.value ? "Expand sidebar" : "Collapse sidebar",
|
|
2316
2324
|
onClick: Ie
|
|
2317
2325
|
}, [
|
|
2318
|
-
|
|
2319
|
-
"icon-definition":
|
|
2326
|
+
H(d(ke), {
|
|
2327
|
+
"icon-definition": de.value ? d(So) : d(Co),
|
|
2320
2328
|
size: "medium",
|
|
2321
2329
|
decorative: ""
|
|
2322
2330
|
}, null, 8, ["icon-definition"])
|
|
2323
|
-
], 14,
|
|
2331
|
+
], 14, wa)
|
|
2324
2332
|
], 64))
|
|
2325
2333
|
]),
|
|
2326
2334
|
P("button", {
|
|
2327
2335
|
ref_key: "mobileToggleRef",
|
|
2328
2336
|
ref: ct,
|
|
2329
2337
|
class: "layerboard-mobile-toggle",
|
|
2330
|
-
style:
|
|
2331
|
-
onClick:
|
|
2338
|
+
style: fe(Je.value),
|
|
2339
|
+
onClick: Be
|
|
2332
2340
|
}, [
|
|
2333
|
-
|
|
2341
|
+
Le.value === "map" ? (m(), $("span", La, G(e.sidebarLabel), 1)) : (m(), $("span", Sa, G(e.mapLabel), 1))
|
|
2334
2342
|
], 4),
|
|
2335
2343
|
P("footer", {
|
|
2336
2344
|
class: "layerboard-footer",
|
|
2337
|
-
style:
|
|
2345
|
+
style: fe(Ue.value)
|
|
2338
2346
|
}, [
|
|
2339
|
-
|
|
2340
|
-
openModal:
|
|
2341
|
-
closeModal:
|
|
2342
|
-
isModalOpen:
|
|
2347
|
+
pe(y.$slots, "footer", {
|
|
2348
|
+
openModal: Se,
|
|
2349
|
+
closeModal: ne,
|
|
2350
|
+
isModalOpen: ge.value
|
|
2343
2351
|
}, () => [
|
|
2344
|
-
M[4] || (M[4] =
|
|
2352
|
+
M[4] || (M[4] = xe(" City of Philadelphia ", -1))
|
|
2345
2353
|
], !0)
|
|
2346
2354
|
], 4),
|
|
2347
|
-
|
|
2355
|
+
ge.value ? (m(), $("div", {
|
|
2348
2356
|
key: 0,
|
|
2349
2357
|
class: "layerboard-modal-backdrop",
|
|
2350
|
-
onClick:
|
|
2358
|
+
onClick: Ze,
|
|
2351
2359
|
onKeydown: dt
|
|
2352
2360
|
}, [
|
|
2353
2361
|
P("div", {
|
|
@@ -2363,24 +2371,24 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2363
2371
|
ref: Ke,
|
|
2364
2372
|
class: "layerboard-modal-close",
|
|
2365
2373
|
"aria-label": "Close modal",
|
|
2366
|
-
onClick:
|
|
2374
|
+
onClick: ne
|
|
2367
2375
|
}, [
|
|
2368
|
-
|
|
2369
|
-
"icon-definition": d(
|
|
2376
|
+
H(d(ke), {
|
|
2377
|
+
"icon-definition": d(Et),
|
|
2370
2378
|
size: "medium",
|
|
2371
2379
|
decorative: ""
|
|
2372
2380
|
}, null, 8, ["icon-definition"])
|
|
2373
2381
|
], 512),
|
|
2374
|
-
|
|
2382
|
+
pe(y.$slots, "modal", { closeModal: ne }, void 0, !0)
|
|
2375
2383
|
], 512)
|
|
2376
|
-
], 32)) :
|
|
2377
|
-
P("span",
|
|
2384
|
+
], 32)) : A("", !0),
|
|
2385
|
+
P("span", Ca, G(Le.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
|
|
2378
2386
|
]));
|
|
2379
2387
|
}
|
|
2380
|
-
}),
|
|
2388
|
+
}), Ga = /* @__PURE__ */ $e(ka, [["__scopeId", "data-v-67021805"]]), xa = ["aria-expanded"], $a = {
|
|
2381
2389
|
key: 0,
|
|
2382
2390
|
class: "topic-icon"
|
|
2383
|
-
},
|
|
2391
|
+
}, Ma = { class: "topic-title" }, Pa = /* @__PURE__ */ ye({
|
|
2384
2392
|
__name: "TopicAccordion",
|
|
2385
2393
|
props: {
|
|
2386
2394
|
title: {},
|
|
@@ -2391,7 +2399,7 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2391
2399
|
},
|
|
2392
2400
|
emits: ["toggle", "layerChange"],
|
|
2393
2401
|
setup(e, { emit: i }) {
|
|
2394
|
-
const l = e, o = i, r = k(l.expanded), n = `topic-panel-${
|
|
2402
|
+
const l = e, o = i, r = k(l.expanded), n = `topic-panel-${$t()}`, c = `topic-header-${$t()}`;
|
|
2395
2403
|
Oe(
|
|
2396
2404
|
() => l.expanded,
|
|
2397
2405
|
(p) => {
|
|
@@ -2402,30 +2410,30 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2402
2410
|
r.value = !r.value, o("toggle", r.value);
|
|
2403
2411
|
}
|
|
2404
2412
|
return (p, x) => {
|
|
2405
|
-
const h =
|
|
2413
|
+
const h = Kt("font-awesome-icon");
|
|
2406
2414
|
return m(), $("div", {
|
|
2407
|
-
class:
|
|
2415
|
+
class: re(["topic-accordion", { "is-expanded": r.value }])
|
|
2408
2416
|
}, [
|
|
2409
2417
|
P("button", {
|
|
2410
2418
|
id: c,
|
|
2411
|
-
class:
|
|
2419
|
+
class: re(["topic-header", e.headerClass]),
|
|
2412
2420
|
type: "button",
|
|
2413
2421
|
"aria-expanded": r.value,
|
|
2414
2422
|
"aria-controls": n,
|
|
2415
2423
|
onClick: w
|
|
2416
2424
|
}, [
|
|
2417
|
-
e.icon || p.$slots.icon ? (m(), $("span",
|
|
2418
|
-
|
|
2419
|
-
e.icon ? (m(),
|
|
2425
|
+
e.icon || p.$slots.icon ? (m(), $("span", $a, [
|
|
2426
|
+
pe(p.$slots, "icon", {}, () => [
|
|
2427
|
+
e.icon ? (m(), q(h, {
|
|
2420
2428
|
key: 0,
|
|
2421
2429
|
icon: ["fas", e.icon],
|
|
2422
2430
|
"aria-hidden": "true"
|
|
2423
|
-
}, null, 8, ["icon"])) :
|
|
2431
|
+
}, null, 8, ["icon"])) : A("", !0)
|
|
2424
2432
|
], !0)
|
|
2425
|
-
])) :
|
|
2426
|
-
P("span",
|
|
2433
|
+
])) : A("", !0),
|
|
2434
|
+
P("span", Ma, G(e.title), 1),
|
|
2427
2435
|
P("span", {
|
|
2428
|
-
class:
|
|
2436
|
+
class: re(["topic-chevron", { "is-rotated": r.value }])
|
|
2429
2437
|
}, [...x[0] || (x[0] = [
|
|
2430
2438
|
P("svg", {
|
|
2431
2439
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2442,39 +2450,39 @@ const fa = { class: "layerboard-layout" }, pa = ["aria-expanded"], ya = {
|
|
|
2442
2450
|
P("polyline", { points: "6 9 12 15 18 9" })
|
|
2443
2451
|
], -1)
|
|
2444
2452
|
])], 2)
|
|
2445
|
-
], 10,
|
|
2446
|
-
|
|
2453
|
+
], 10, xa),
|
|
2454
|
+
Rt(P("div", {
|
|
2447
2455
|
id: n,
|
|
2448
2456
|
role: "region",
|
|
2449
2457
|
"aria-labelledby": c,
|
|
2450
2458
|
class: "topic-content"
|
|
2451
2459
|
}, [
|
|
2452
|
-
|
|
2460
|
+
pe(p.$slots, "default", {}, () => [
|
|
2453
2461
|
x[1] || (x[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2454
2462
|
], !0)
|
|
2455
2463
|
], 512), [
|
|
2456
|
-
[
|
|
2464
|
+
[Qt, r.value]
|
|
2457
2465
|
])
|
|
2458
2466
|
], 2);
|
|
2459
2467
|
};
|
|
2460
2468
|
}
|
|
2461
|
-
}),
|
|
2462
|
-
function
|
|
2469
|
+
}), Ha = /* @__PURE__ */ $e(Pa, [["__scopeId", "data-v-a2023afa"]]);
|
|
2470
|
+
function Ta(e) {
|
|
2463
2471
|
return e.displayOptions?.shouldShowCheckbox !== !1;
|
|
2464
2472
|
}
|
|
2465
|
-
function
|
|
2473
|
+
function Vt(e, i) {
|
|
2466
2474
|
return i ? e.displayOptions?.shouldShowSlider !== !1 : !1;
|
|
2467
2475
|
}
|
|
2468
|
-
function
|
|
2476
|
+
function Nt(e, i) {
|
|
2469
2477
|
return i ? e.displayOptions?.shouldShowLegendBox !== !1 : !1;
|
|
2470
2478
|
}
|
|
2471
2479
|
function ze(e) {
|
|
2472
2480
|
return e.displayOptions?.layerNameChange || e.title;
|
|
2473
2481
|
}
|
|
2474
|
-
const
|
|
2482
|
+
const Fa = ["aria-label"], Ea = ["checked", "disabled", "onChange"], Ia = { class: "layer-title" }, Oa = { class: "layer-title" }, za = {
|
|
2475
2483
|
key: 0,
|
|
2476
2484
|
class: "empty-state"
|
|
2477
|
-
},
|
|
2485
|
+
}, Da = /* @__PURE__ */ ye({
|
|
2478
2486
|
__name: "LayerCheckboxSet",
|
|
2479
2487
|
props: {
|
|
2480
2488
|
layers: {},
|
|
@@ -2500,13 +2508,13 @@ const Ta = ["aria-label"], Fa = ["checked", "disabled", "onChange"], Ea = { clas
|
|
|
2500
2508
|
role: "group",
|
|
2501
2509
|
"aria-label": e.groupLabel
|
|
2502
2510
|
}, [
|
|
2503
|
-
(m(!0), $(
|
|
2511
|
+
(m(!0), $(ue, null, ve(e.layers, (a) => (m(), $("div", {
|
|
2504
2512
|
key: a.id,
|
|
2505
2513
|
class: "layer-item"
|
|
2506
2514
|
}, [
|
|
2507
|
-
d(
|
|
2515
|
+
d(Ta)(a) ? (m(), $("label", {
|
|
2508
2516
|
key: 0,
|
|
2509
|
-
class:
|
|
2517
|
+
class: re(["layer-checkbox", {
|
|
2510
2518
|
"layer-unavailable": !d(p)(a),
|
|
2511
2519
|
"layer-error": d(w)(a.id)
|
|
2512
2520
|
}])
|
|
@@ -2516,10 +2524,10 @@ const Ta = ["aria-label"], Fa = ["checked", "disabled", "onChange"], Ea = { clas
|
|
|
2516
2524
|
checked: d(r)(a.id),
|
|
2517
2525
|
disabled: !d(p)(a),
|
|
2518
2526
|
onChange: (v) => x(a.id)
|
|
2519
|
-
}, null, 40,
|
|
2520
|
-
P("span",
|
|
2521
|
-
|
|
2522
|
-
|
|
2527
|
+
}, null, 40, Ea),
|
|
2528
|
+
P("span", Ia, [
|
|
2529
|
+
xe(G(d(ze)(a)) + " ", 1),
|
|
2530
|
+
H(tt, {
|
|
2523
2531
|
loading: d(c)(a.id),
|
|
2524
2532
|
error: d(w)(a.id),
|
|
2525
2533
|
unavailable: !d(p)(a)
|
|
@@ -2527,40 +2535,40 @@ const Ta = ["aria-label"], Fa = ["checked", "disabled", "onChange"], Ea = { clas
|
|
|
2527
2535
|
])
|
|
2528
2536
|
], 2)) : (m(), $("div", {
|
|
2529
2537
|
key: 1,
|
|
2530
|
-
class:
|
|
2538
|
+
class: re(["layer-label-only", {
|
|
2531
2539
|
"layer-unavailable": !d(p)(a),
|
|
2532
2540
|
"layer-error": d(w)(a.id)
|
|
2533
2541
|
}])
|
|
2534
2542
|
}, [
|
|
2535
|
-
P("span",
|
|
2536
|
-
|
|
2537
|
-
|
|
2543
|
+
P("span", Oa, [
|
|
2544
|
+
xe(G(d(ze)(a)) + " ", 1),
|
|
2545
|
+
H(tt, {
|
|
2538
2546
|
loading: d(c)(a.id),
|
|
2539
2547
|
error: d(w)(a.id),
|
|
2540
2548
|
unavailable: !d(p)(a)
|
|
2541
2549
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2542
2550
|
])
|
|
2543
2551
|
], 2)),
|
|
2544
|
-
d(
|
|
2552
|
+
d(Vt)(a, e.showOpacity) && d(r)(a.id) && d(p)(a) ? (m(), q(gt, {
|
|
2545
2553
|
key: 2,
|
|
2546
2554
|
"layer-id": a.id,
|
|
2547
2555
|
"layer-name": d(ze)(a),
|
|
2548
2556
|
opacity: d(n)(a.id),
|
|
2549
2557
|
"onUpdate:opacity": (v) => o("setOpacity", a.id, v)
|
|
2550
|
-
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) :
|
|
2551
|
-
d(
|
|
2558
|
+
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
2559
|
+
d(Nt)(a, e.showLegend) && d(r)(a.id) && d(p)(a) && a.legend?.length ? (m(), q(vt, {
|
|
2552
2560
|
key: 3,
|
|
2553
2561
|
items: a.legend,
|
|
2554
2562
|
label: "Legend for " + d(ze)(a)
|
|
2555
|
-
}, null, 8, ["items", "label"])) :
|
|
2563
|
+
}, null, 8, ["items", "label"])) : A("", !0)
|
|
2556
2564
|
]))), 128)),
|
|
2557
|
-
e.layers.length === 0 ? (m(), $("div",
|
|
2558
|
-
], 8,
|
|
2565
|
+
e.layers.length === 0 ? (m(), $("div", za, "No layers available")) : A("", !0)
|
|
2566
|
+
], 8, Fa));
|
|
2559
2567
|
}
|
|
2560
|
-
}),
|
|
2568
|
+
}), Ja = /* @__PURE__ */ $e(Da, [["__scopeId", "data-v-bfcd7855"]]), _a = ["aria-label"], Ra = ["name", "checked", "disabled", "onChange"], Aa = { class: "layer-title" }, Ba = {
|
|
2561
2569
|
key: 0,
|
|
2562
2570
|
class: "empty-state"
|
|
2563
|
-
}, Za = /* @__PURE__ */
|
|
2571
|
+
}, Za = /* @__PURE__ */ ye({
|
|
2564
2572
|
__name: "LayerRadioButtonSet",
|
|
2565
2573
|
props: {
|
|
2566
2574
|
layers: {},
|
|
@@ -2588,12 +2596,12 @@ const Ta = ["aria-label"], Fa = ["checked", "disabled", "onChange"], Ea = { clas
|
|
|
2588
2596
|
role: "radiogroup",
|
|
2589
2597
|
"aria-label": e.groupLabel
|
|
2590
2598
|
}, [
|
|
2591
|
-
(m(!0), $(
|
|
2599
|
+
(m(!0), $(ue, null, ve(e.layers, (a) => (m(), $("div", {
|
|
2592
2600
|
key: a.id,
|
|
2593
2601
|
class: "layer-item"
|
|
2594
2602
|
}, [
|
|
2595
2603
|
P("label", {
|
|
2596
|
-
class:
|
|
2604
|
+
class: re(["layer-radio", {
|
|
2597
2605
|
"layer-unavailable": !d(p)(a),
|
|
2598
2606
|
"layer-error": d(w)(a.id)
|
|
2599
2607
|
}])
|
|
@@ -2604,34 +2612,34 @@ const Ta = ["aria-label"], Fa = ["checked", "disabled", "onChange"], Ea = { clas
|
|
|
2604
2612
|
checked: d(r)(a.id),
|
|
2605
2613
|
disabled: !d(p)(a),
|
|
2606
2614
|
onChange: (v) => x(a.id)
|
|
2607
|
-
}, null, 40,
|
|
2608
|
-
P("span",
|
|
2609
|
-
|
|
2610
|
-
|
|
2615
|
+
}, null, 40, Ra),
|
|
2616
|
+
P("span", Aa, [
|
|
2617
|
+
xe(G(d(ze)(a)) + " ", 1),
|
|
2618
|
+
H(tt, {
|
|
2611
2619
|
loading: d(c)(a.id),
|
|
2612
2620
|
error: d(w)(a.id),
|
|
2613
2621
|
unavailable: !d(p)(a)
|
|
2614
2622
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2615
2623
|
])
|
|
2616
2624
|
], 2),
|
|
2617
|
-
d(
|
|
2625
|
+
d(Vt)(a, e.showOpacity) && d(r)(a.id) && d(p)(a) ? (m(), q(gt, {
|
|
2618
2626
|
key: 0,
|
|
2619
2627
|
"layer-id": a.id,
|
|
2620
2628
|
"layer-name": d(ze)(a),
|
|
2621
2629
|
opacity: d(n)(a.id),
|
|
2622
2630
|
"onUpdate:opacity": (v) => o("setOpacity", a.id, v)
|
|
2623
|
-
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) :
|
|
2624
|
-
d(
|
|
2631
|
+
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
2632
|
+
d(Nt)(a, e.showLegend) && d(r)(a.id) && d(p)(a) && a.legend?.length ? (m(), q(vt, {
|
|
2625
2633
|
key: 1,
|
|
2626
2634
|
items: a.legend,
|
|
2627
2635
|
label: "Legend for " + d(ze)(a)
|
|
2628
|
-
}, null, 8, ["items", "label"])) :
|
|
2636
|
+
}, null, 8, ["items", "label"])) : A("", !0)
|
|
2629
2637
|
]))), 128)),
|
|
2630
|
-
e.layers.length === 0 ? (m(), $("div",
|
|
2631
|
-
], 8,
|
|
2638
|
+
e.layers.length === 0 ? (m(), $("div", Ba, "No layers available")) : A("", !0)
|
|
2639
|
+
], 8, _a));
|
|
2632
2640
|
}
|
|
2633
|
-
}),
|
|
2634
|
-
function
|
|
2641
|
+
}), Ka = /* @__PURE__ */ $e(Za, [["__scopeId", "data-v-c368d815"]]);
|
|
2642
|
+
function Qa(e) {
|
|
2635
2643
|
const i = k([]), l = k(/* @__PURE__ */ new Set()), o = k({}), r = k(/* @__PURE__ */ new Set()), n = k({}), c = k(""), w = k(!1), p = k(!1), x = k(null), h = z(() => {
|
|
2636
2644
|
if (!c.value.trim())
|
|
2637
2645
|
return i.value;
|
|
@@ -2691,20 +2699,20 @@ function Ka(e) {
|
|
|
2691
2699
|
delete _[T], n.value = _;
|
|
2692
2700
|
}
|
|
2693
2701
|
}
|
|
2694
|
-
function
|
|
2702
|
+
function X() {
|
|
2695
2703
|
i.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, c.value = "", w.value = !1, p.value = !1, x.value = null;
|
|
2696
2704
|
}
|
|
2697
2705
|
return {
|
|
2698
2706
|
// State (readonly)
|
|
2699
|
-
layerConfigs:
|
|
2700
|
-
visibleLayers:
|
|
2701
|
-
layerOpacities:
|
|
2702
|
-
loadingLayers:
|
|
2703
|
-
layerErrors:
|
|
2704
|
-
searchQuery:
|
|
2705
|
-
isLoading:
|
|
2706
|
-
isInitialized:
|
|
2707
|
-
error:
|
|
2707
|
+
layerConfigs: j(i),
|
|
2708
|
+
visibleLayers: j(l),
|
|
2709
|
+
layerOpacities: j(o),
|
|
2710
|
+
loadingLayers: j(r),
|
|
2711
|
+
layerErrors: j(n),
|
|
2712
|
+
searchQuery: j(c),
|
|
2713
|
+
isLoading: j(w),
|
|
2714
|
+
isInitialized: j(p),
|
|
2715
|
+
error: j(x),
|
|
2708
2716
|
// Computed
|
|
2709
2717
|
filteredLayerConfigs: h,
|
|
2710
2718
|
layerList: g,
|
|
@@ -2717,10 +2725,10 @@ function Ka(e) {
|
|
|
2717
2725
|
filterLayers: S,
|
|
2718
2726
|
setLayerLoading: E,
|
|
2719
2727
|
setLayerError: D,
|
|
2720
|
-
reset:
|
|
2728
|
+
reset: X
|
|
2721
2729
|
};
|
|
2722
2730
|
}
|
|
2723
|
-
function
|
|
2731
|
+
function Xa() {
|
|
2724
2732
|
const e = k([]), i = k(/* @__PURE__ */ new Set()), l = k(/* @__PURE__ */ new Set());
|
|
2725
2733
|
function o(n) {
|
|
2726
2734
|
i.value.has(n) ? i.value.delete(n) : i.value.add(n);
|
|
@@ -2736,7 +2744,7 @@ function Qa() {
|
|
|
2736
2744
|
setLayers: r
|
|
2737
2745
|
};
|
|
2738
2746
|
}
|
|
2739
|
-
function
|
|
2747
|
+
function Va(e) {
|
|
2740
2748
|
const i = k(null), l = k(!1), o = k(null), r = k(0);
|
|
2741
2749
|
async function n(p = {}) {
|
|
2742
2750
|
l.value = !0, o.value = null;
|
|
@@ -2747,14 +2755,14 @@ function Ba(e) {
|
|
|
2747
2755
|
const f = e.url.replace(/\/$/, ""), L = encodeURIComponent(p.where || e.where || "1=1");
|
|
2748
2756
|
let S = `${f}/query?where=${L}&outFields=*&returnGeometry=true&resultRecordCount=${x}&resultOffset=${h}&f=geojson`;
|
|
2749
2757
|
if (p.bounds) {
|
|
2750
|
-
const
|
|
2758
|
+
const X = JSON.stringify({
|
|
2751
2759
|
xmin: p.bounds.west,
|
|
2752
2760
|
ymin: p.bounds.south,
|
|
2753
2761
|
xmax: p.bounds.east,
|
|
2754
2762
|
ymax: p.bounds.north,
|
|
2755
2763
|
spatialReference: { wkid: 4326 }
|
|
2756
2764
|
});
|
|
2757
|
-
S += `&geometry=${encodeURIComponent(
|
|
2765
|
+
S += `&geometry=${encodeURIComponent(X)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
|
|
2758
2766
|
}
|
|
2759
2767
|
const E = await fetch(S);
|
|
2760
2768
|
if (!E.ok)
|
|
@@ -2782,10 +2790,10 @@ function Ba(e) {
|
|
|
2782
2790
|
}
|
|
2783
2791
|
return {
|
|
2784
2792
|
// State (readonly)
|
|
2785
|
-
data:
|
|
2786
|
-
isLoading:
|
|
2787
|
-
error:
|
|
2788
|
-
totalFeatures:
|
|
2793
|
+
data: j(i),
|
|
2794
|
+
isLoading: j(l),
|
|
2795
|
+
error: j(o),
|
|
2796
|
+
totalFeatures: j(r),
|
|
2789
2797
|
// Config
|
|
2790
2798
|
config: e,
|
|
2791
2799
|
// Methods
|
|
@@ -2794,8 +2802,8 @@ function Ba(e) {
|
|
|
2794
2802
|
clear: c
|
|
2795
2803
|
};
|
|
2796
2804
|
}
|
|
2797
|
-
function
|
|
2798
|
-
const o =
|
|
2805
|
+
function Ya(e, i, l) {
|
|
2806
|
+
const o = Va(e);
|
|
2799
2807
|
return Oe(
|
|
2800
2808
|
i,
|
|
2801
2809
|
async (r) => {
|
|
@@ -2808,26 +2816,26 @@ function Xa(e, i, l) {
|
|
|
2808
2816
|
), o;
|
|
2809
2817
|
}
|
|
2810
2818
|
export {
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2819
|
+
Ja as LayerCheckboxSet,
|
|
2820
|
+
Go as LayerPanel,
|
|
2821
|
+
Ka as LayerRadioButtonSet,
|
|
2822
|
+
Ga as Layerboard,
|
|
2823
|
+
lo as MapPanel,
|
|
2824
|
+
Ha as TopicAccordion,
|
|
2825
|
+
ja as WEBMAP_ID,
|
|
2818
2826
|
Lt as buildWebMapUrl,
|
|
2819
|
-
|
|
2827
|
+
sa as clearCache,
|
|
2820
2828
|
ht as getLayerConfigs,
|
|
2821
2829
|
ze as getLayerDisplayName,
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2830
|
+
qa as getWebMapUrl,
|
|
2831
|
+
At as normalizeUrl,
|
|
2832
|
+
Ta as shouldShowCheckbox,
|
|
2833
|
+
Nt as shouldShowLegendBox,
|
|
2834
|
+
Vt as shouldShowSlider,
|
|
2827
2835
|
Zt as transformWebMapToLayerConfigs,
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2836
|
+
fa as useApiDataSources,
|
|
2837
|
+
Va as useDataSource,
|
|
2838
|
+
Xa as useLayerConfig,
|
|
2839
|
+
Qa as useLayerboard,
|
|
2840
|
+
Ya as useReactiveDataSource
|
|
2833
2841
|
};
|