@phila/layerboard 3.0.0-beta.35 → 3.0.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.mjs +331 -313
- package/dist/layerboard.css +1 -1
- package/dist/utils/webmap-transformer.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ge, ref as x, watch as Oe, computed as _, nextTick as Ne, onMounted as lt, onUnmounted as Vt, createElementBlock as M, openBlock as
|
|
1
|
+
import { defineComponent as ge, ref as x, watch as Oe, computed as _, nextTick as Ne, onMounted as lt, onUnmounted as Vt, createElementBlock as M, openBlock as h, createVNode as H, unref as f, withCtx as He, createBlock as q, createCommentVNode as A, Fragment as ue, renderList as Le, useAttrs as Kt, toRef as Qt, normalizeClass as ne, createElementVNode as P, toDisplayString as G, renderSlot as he, withDirectives as Zt, mergeProps as vt, vModelDynamic as Xt, createTextVNode as xe, normalizeProps as Pt, guardReactiveProps as Ft, normalizeStyle as ye, withModifiers as Yt, readonly as j, provide as N, onBeforeUnmount as eo, useId as Tt, resolveComponent as to, vShow as oo } from "vue";
|
|
2
2
|
import { Map as ao, DrawTool as io, RasterLayer as It, CircleLayer as Et, FillLayer as Ot, LineLayer as gt, MapMarker as lo, MapPopup as no } from "@phila/phila-ui-map-core";
|
|
3
3
|
import { cn as bt, Icon as ke, BaseLink as ro, ActionContent as zt } from "@phila/phila-ui-core";
|
|
4
4
|
const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
@@ -32,7 +32,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
32
32
|
const c = t.getZoom(), b = t.getCenter().lat, k = 559082264028e-3, I = b * Math.PI / 180;
|
|
33
33
|
return k * Math.cos(I) / Math.pow(2, c);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const S = x({}), y = x(null), m = x(/* @__PURE__ */ new Set());
|
|
36
36
|
async function i(t, c, s, b, k) {
|
|
37
37
|
const I = encodeURIComponent(b || "1=1"), B = JSON.stringify({
|
|
38
38
|
xmin: c.west,
|
|
@@ -40,14 +40,14 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
40
40
|
xmax: c.east,
|
|
41
41
|
ymax: c.north,
|
|
42
42
|
spatialReference: { wkid: 4326 }
|
|
43
|
-
}), Y = k !== void 0 && k < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, k) * 512)}` : "",
|
|
43
|
+
}), Y = k !== void 0 && k < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, k) * 512)}` : "", X = 2e3;
|
|
44
44
|
let pe = 0, we = [], se = !0;
|
|
45
45
|
for (; se; ) {
|
|
46
|
-
const te = `${t}/query?where=${I}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${
|
|
46
|
+
const te = `${t}/query?where=${I}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${X}&resultOffset=${pe}${Y}&f=geojson`, R = await fetch(te);
|
|
47
47
|
if (!R.ok)
|
|
48
48
|
throw new Error(`HTTP ${R.status}: ${R.statusText}`);
|
|
49
49
|
const W = await R.json();
|
|
50
|
-
W.features && W.features.length > 0 ? (we = we.concat(W.features), pe += W.features.length, se = W.features.length ===
|
|
50
|
+
W.features && W.features.length > 0 ? (we = we.concat(W.features), pe += W.features.length, se = W.features.length === X) : se = !1;
|
|
51
51
|
}
|
|
52
52
|
return we = we.map((te) => {
|
|
53
53
|
if (te.properties) {
|
|
@@ -69,7 +69,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
69
69
|
o("layerLoading", k, !0);
|
|
70
70
|
try {
|
|
71
71
|
const B = await i(I.url, t, k, I.where, s);
|
|
72
|
-
|
|
72
|
+
S.value = { ...S.value, [k]: B }, o("layerError", k, null);
|
|
73
73
|
} catch (B) {
|
|
74
74
|
const Y = B instanceof Error ? B.message : "Failed to load";
|
|
75
75
|
o("layerError", k, Y);
|
|
@@ -90,7 +90,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
90
90
|
const s = d([...l.visibleLayers]);
|
|
91
91
|
await g(t, s, c);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function C(t) {
|
|
94
94
|
y.value = t.bounds, L(t.bounds, t.zoom);
|
|
95
95
|
}
|
|
96
96
|
function E(t) {
|
|
@@ -109,8 +109,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
109
109
|
() => l.visibleLayers,
|
|
110
110
|
async () => {
|
|
111
111
|
if (re.value.length > 0 && Ie(), y.value) {
|
|
112
|
-
const t = new Set(l.visibleLayers), c = [...t].filter((b) => !
|
|
113
|
-
|
|
112
|
+
const t = new Set(l.visibleLayers), c = [...t].filter((b) => !m.value.has(b));
|
|
113
|
+
m.value = new Set(t);
|
|
114
114
|
const s = d(c);
|
|
115
115
|
if (s.length > 0) {
|
|
116
116
|
const b = n.value?.getZoom();
|
|
@@ -125,7 +125,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
125
125
|
return !!c?.parentId && l.visibleLayers.has(c.parentId);
|
|
126
126
|
}
|
|
127
127
|
function V(t) {
|
|
128
|
-
return !!
|
|
128
|
+
return !!S.value[t.id];
|
|
129
129
|
}
|
|
130
130
|
const T = _(
|
|
131
131
|
() => l.layerList.filter((t) => t.config.type === "circle" && F(t.config.id) && V(t.config)).map((t) => t.config)
|
|
@@ -213,7 +213,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
215
|
function Me(t) {
|
|
216
|
-
return { type: "geojson", data:
|
|
216
|
+
return { type: "geojson", data: S.value[t.id], tolerance: 0 };
|
|
217
217
|
}
|
|
218
218
|
function Fe(t) {
|
|
219
219
|
return l.layerOpacities[t] ?? 1;
|
|
@@ -227,18 +227,18 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
227
227
|
if (c === 1)
|
|
228
228
|
return k;
|
|
229
229
|
{
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
const [, pe, we, se, te] =
|
|
230
|
+
const X = I.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
231
|
+
if (X && X[4]) {
|
|
232
|
+
const [, pe, we, se, te] = X, R = parseFloat(te) * c;
|
|
233
233
|
k[b] = `rgba(${pe}, ${we}, ${se}, ${R})`, k[s] = 1;
|
|
234
234
|
}
|
|
235
235
|
return k;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
if (Y) {
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
const [, pe, we, se] =
|
|
239
|
+
const X = I.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
240
|
+
if (X) {
|
|
241
|
+
const [, pe, we, se] = X;
|
|
242
242
|
k[b] = `rgb(${pe}, ${we}, ${se})`;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
@@ -290,8 +290,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
290
290
|
return String(t);
|
|
291
291
|
const I = t.toFixed(b);
|
|
292
292
|
if (k) {
|
|
293
|
-
const B = I.split("."), Y = B[0] || "0",
|
|
294
|
-
return
|
|
293
|
+
const B = I.split("."), Y = B[0] || "0", X = B[1], pe = Y.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
294
|
+
return X ? `${pe}.${X}` : pe;
|
|
295
295
|
}
|
|
296
296
|
return I;
|
|
297
297
|
}
|
|
@@ -307,7 +307,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
309
|
function Se(t, c) {
|
|
310
|
-
const s =
|
|
310
|
+
const s = S.value[t];
|
|
311
311
|
if (!s?.features) return null;
|
|
312
312
|
const b = c.objectid ?? c.OBJECTID ?? c.FID;
|
|
313
313
|
if (b != null) {
|
|
@@ -344,7 +344,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
344
344
|
layers: b
|
|
345
345
|
});
|
|
346
346
|
if (Y.length === 0) return;
|
|
347
|
-
const
|
|
347
|
+
const X = et(Y), pe = l.layerList.map((R) => R.config), se = ft(X, pe).map((R) => {
|
|
348
348
|
const W = R.layer.id.replace(/-outline$/, ""), ce = _e(W);
|
|
349
349
|
if (!ce) return null;
|
|
350
350
|
const yt = Se(ce.id, R.properties || {});
|
|
@@ -360,16 +360,16 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
360
360
|
se.sort((R, W) => {
|
|
361
361
|
const ce = R.popupConfig?.popupSortField, yt = W.popupConfig?.popupSortField;
|
|
362
362
|
if (!ce || ce !== yt) return 0;
|
|
363
|
-
const
|
|
364
|
-
if (
|
|
363
|
+
const ht = R.properties[ce], mt = W.properties[ce];
|
|
364
|
+
if (ht == null || mt == null) return 0;
|
|
365
365
|
const Mt = R.popupConfig?.popupSortOrder !== "asc";
|
|
366
|
-
return
|
|
366
|
+
return ht < mt ? Mt ? 1 : -1 : ht > mt ? Mt ? -1 : 1 : 0;
|
|
367
367
|
}), re.value = se, oe.value = 0, Te.value = [t.lngLat.lng, t.lngLat.lat];
|
|
368
368
|
const te = se[0];
|
|
369
369
|
if (te) {
|
|
370
370
|
const R = _e(te.layerId);
|
|
371
371
|
if (R) {
|
|
372
|
-
const W =
|
|
372
|
+
const W = K(te.geometry), ce = Z(R.id, R.type);
|
|
373
373
|
$.value = {
|
|
374
374
|
geometry: te.geometry,
|
|
375
375
|
geometryType: W,
|
|
@@ -423,8 +423,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
423
423
|
if (c += `<h3 class="popup-title">${be(Re.value)}</h3>`, t.popupConfig?.fields?.length) {
|
|
424
424
|
c += `<table class="popup-table" aria-label="${be(Re.value)}">`;
|
|
425
425
|
for (const s of t.popupConfig.fields) {
|
|
426
|
-
const b = Ge(t.properties[s.field], s.format, t.popupConfig.showTime), k = s.label.toLowerCase(), I = k.includes("url") || k.includes("website"), B = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || I && b.includes("."), Y = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`,
|
|
427
|
-
c += `<tr><th scope="row">${be(s.label)}</th><td>${
|
|
426
|
+
const b = Ge(t.properties[s.field], s.format, t.popupConfig.showTime), k = s.label.toLowerCase(), I = k.includes("url") || k.includes("website"), B = b.startsWith("http://") || b.startsWith("https://") || b.startsWith("www.") || I && b.includes("."), Y = b.startsWith("http://") || b.startsWith("https://") ? b : `https://${b}`, X = B ? `<a href="${be(Y)}" target="_blank" rel="noopener noreferrer">${be(b)}</a>` : be(b);
|
|
427
|
+
c += `<tr><th scope="row">${be(s.label)}</th><td>${X}</td></tr>`;
|
|
428
428
|
}
|
|
429
429
|
c += "</table>";
|
|
430
430
|
}
|
|
@@ -452,7 +452,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
452
452
|
"fill-color": "#808080",
|
|
453
453
|
"fill-opacity": 0.5
|
|
454
454
|
}, $ = x(null);
|
|
455
|
-
function
|
|
455
|
+
function K(t) {
|
|
456
456
|
return t.type;
|
|
457
457
|
}
|
|
458
458
|
function Z(t, c) {
|
|
@@ -476,7 +476,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
476
476
|
}
|
|
477
477
|
return { radius: 5, width: 2 };
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Q(t) {
|
|
480
480
|
return !t || t.length === 0 ? [] : t[0] ?? [];
|
|
481
481
|
}
|
|
482
482
|
function Ce(t) {
|
|
@@ -512,7 +512,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
514
|
if (s === "Polygon") {
|
|
515
|
-
const k = c.coordinates, I =
|
|
515
|
+
const k = c.coordinates, I = Q(k), Y = (b.width || 2) + 3;
|
|
516
516
|
return {
|
|
517
517
|
type: "FeatureCollection",
|
|
518
518
|
features: [
|
|
@@ -533,11 +533,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
533
533
|
const k = c.coordinates, B = (b.width || 2) + 3;
|
|
534
534
|
return {
|
|
535
535
|
type: "FeatureCollection",
|
|
536
|
-
features: k.map((
|
|
536
|
+
features: k.map((X) => ({
|
|
537
537
|
type: "Feature",
|
|
538
538
|
geometry: {
|
|
539
539
|
type: "LineString",
|
|
540
|
-
coordinates:
|
|
540
|
+
coordinates: Q(X)
|
|
541
541
|
},
|
|
542
542
|
properties: {
|
|
543
543
|
highlightWidth: B
|
|
@@ -584,7 +584,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
584
584
|
}
|
|
585
585
|
const c = _e(t.layerId);
|
|
586
586
|
if (c) {
|
|
587
|
-
const s =
|
|
587
|
+
const s = K(t.geometry), b = Z(c.id, c.type);
|
|
588
588
|
$.value = {
|
|
589
589
|
geometry: t.geometry,
|
|
590
590
|
geometryType: s,
|
|
@@ -599,7 +599,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
599
599
|
const [c, s] = t.geometry.coordinates;
|
|
600
600
|
$t.value = [c, s];
|
|
601
601
|
}
|
|
602
|
-
return (t, c) => (
|
|
602
|
+
return (t, c) => (h(), M("div", so, [
|
|
603
603
|
H(f(ao), {
|
|
604
604
|
ref_key: "mapRef",
|
|
605
605
|
ref: r,
|
|
@@ -619,32 +619,34 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
619
619
|
"tool-panel-split-ratio": 50,
|
|
620
620
|
onZoom: w,
|
|
621
621
|
onClick: Ie,
|
|
622
|
-
onMoveend:
|
|
622
|
+
onMoveend: C,
|
|
623
623
|
onLoad: E,
|
|
624
624
|
onSearchResult: Jt
|
|
625
625
|
}, {
|
|
626
626
|
default: He(() => [
|
|
627
|
-
l.drawControlPosition !== null ? (
|
|
627
|
+
l.drawControlPosition !== null ? (h(), q(f(io), {
|
|
628
628
|
key: 0,
|
|
629
629
|
position: l.drawControlPosition
|
|
630
630
|
}, null, 8, ["position"])) : A("", !0),
|
|
631
|
-
(
|
|
631
|
+
(h(!0), M(ue, null, Le(ut.value, (s) => (h(), q(f(It), {
|
|
632
632
|
id: "tiled-" + s.id,
|
|
633
633
|
key: "tiled-" + s.id,
|
|
634
634
|
source: ct(s),
|
|
635
635
|
paint: { "raster-opacity": de(s.id) },
|
|
636
636
|
minzoom: s.minZoom,
|
|
637
|
-
maxzoom: s.maxZoom
|
|
637
|
+
maxzoom: s.maxZoom,
|
|
638
|
+
"before-id": "highlight-circles"
|
|
638
639
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
639
|
-
(
|
|
640
|
+
(h(!0), M(ue, null, Le(De.value, (s) => (h(), q(f(It), {
|
|
640
641
|
id: "dynamic-" + s.id,
|
|
641
642
|
key: "dynamic-" + s.id,
|
|
642
643
|
source: je(s),
|
|
643
644
|
paint: { "raster-opacity": de(s.id) },
|
|
644
645
|
minzoom: s.minZoom,
|
|
645
|
-
maxzoom: s.maxZoom
|
|
646
|
+
maxzoom: s.maxZoom,
|
|
647
|
+
"before-id": "highlight-circles"
|
|
646
648
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
647
|
-
(
|
|
649
|
+
(h(!0), M(ue, null, Le(T.value, (s) => (h(), q(f(Et), {
|
|
648
650
|
id: s.id,
|
|
649
651
|
key: s.id,
|
|
650
652
|
source: Me(s),
|
|
@@ -654,7 +656,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
654
656
|
"before-id": "highlight-circles",
|
|
655
657
|
onClick: ae
|
|
656
658
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
657
|
-
(
|
|
659
|
+
(h(!0), M(ue, null, Le(O.value, (s) => (h(), q(f(Ot), {
|
|
658
660
|
id: s.id,
|
|
659
661
|
key: s.id,
|
|
660
662
|
source: Me(s),
|
|
@@ -664,7 +666,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
664
666
|
"before-id": "highlight-circles",
|
|
665
667
|
onClick: ae
|
|
666
668
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
667
|
-
(
|
|
669
|
+
(h(!0), M(ue, null, Le(D.value, (s) => (h(), q(f(gt), {
|
|
668
670
|
id: s.id + "-outline",
|
|
669
671
|
key: s.id + "-outline",
|
|
670
672
|
source: Me(s),
|
|
@@ -674,7 +676,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
674
676
|
"before-id": "highlight-lines",
|
|
675
677
|
onClick: ae
|
|
676
678
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
677
|
-
(
|
|
679
|
+
(h(!0), M(ue, null, Le(ee.value, (s) => (h(), q(f(gt), {
|
|
678
680
|
id: s.id,
|
|
679
681
|
key: s.id,
|
|
680
682
|
source: Me(s),
|
|
@@ -706,7 +708,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
706
708
|
"lng-lat": $t.value,
|
|
707
709
|
color: "#2176d2"
|
|
708
710
|
}, null, 8, ["lng-lat"]),
|
|
709
|
-
ie.value && Te.value ? (
|
|
711
|
+
ie.value && Te.value ? (h(), q(f(no), {
|
|
710
712
|
key: 1,
|
|
711
713
|
"lng-lat": Te.value,
|
|
712
714
|
html: Ae.value,
|
|
@@ -730,7 +732,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
730
732
|
for (const [o, r] of a)
|
|
731
733
|
l[o] = r;
|
|
732
734
|
return l;
|
|
733
|
-
}, uo = /* @__PURE__ */ $e(co, [["__scopeId", "data-v-
|
|
735
|
+
}, uo = /* @__PURE__ */ $e(co, [["__scopeId", "data-v-1f8b1f59"]]);
|
|
734
736
|
function Nt(e) {
|
|
735
737
|
let a = e.split("?")[0] || e;
|
|
736
738
|
return a = a.replace(/\/query$/, ""), a = a.replace(/\/$/, ""), a = a.replace(/^https?:\/\//, ""), a.toLowerCase();
|
|
@@ -785,11 +787,11 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
785
787
|
size: a.size
|
|
786
788
|
})
|
|
787
789
|
);
|
|
788
|
-
return (u, w) => l(a) ? (
|
|
790
|
+
return (u, w) => l(a) ? (h(), q(f(ro), vt({ key: 0 }, { ...r.value, ...u.$attrs }, { role: "button" }), {
|
|
789
791
|
default: He(() => [
|
|
790
792
|
H(f(zt), Pt(Ft(n.value)), {
|
|
791
793
|
default: He(() => [
|
|
792
|
-
|
|
794
|
+
he(u.$slots, "default", {}, () => [
|
|
793
795
|
xe(G(a.text), 1)
|
|
794
796
|
])
|
|
795
797
|
]),
|
|
@@ -797,7 +799,7 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
797
799
|
}, 16)
|
|
798
800
|
]),
|
|
799
801
|
_: 3
|
|
800
|
-
}, 16)) : (
|
|
802
|
+
}, 16)) : (h(), M("button", vt({
|
|
801
803
|
key: 1,
|
|
802
804
|
type: "button",
|
|
803
805
|
disabled: a.disabled,
|
|
@@ -805,7 +807,7 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
805
807
|
}, u.$attrs), [
|
|
806
808
|
H(f(zt), Pt(Ft(n.value)), {
|
|
807
809
|
default: He(() => [
|
|
808
|
-
|
|
810
|
+
he(u.$slots, "default", {}, () => [
|
|
809
811
|
xe(G(a.text), 1)
|
|
810
812
|
])
|
|
811
813
|
]),
|
|
@@ -818,11 +820,11 @@ var yo = {
|
|
|
818
820
|
prefix: "fas",
|
|
819
821
|
iconName: "circle-exclamation",
|
|
820
822
|
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"]
|
|
821
|
-
},
|
|
823
|
+
}, ho = yo, mo = {
|
|
822
824
|
prefix: "fas",
|
|
823
825
|
iconName: "xmark",
|
|
824
826
|
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"]
|
|
825
|
-
}, go =
|
|
827
|
+
}, go = mo;
|
|
826
828
|
const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo = { class: "input-text-container" }, So = ["id", "placeholder", "aria-label"], Co = {
|
|
827
829
|
key: 1,
|
|
828
830
|
class: "has-text-body-small phila-supporting-text"
|
|
@@ -852,22 +854,22 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
852
854
|
set: (d) => {
|
|
853
855
|
u("update:modelValue", d), w.value = d;
|
|
854
856
|
}
|
|
855
|
-
}),
|
|
857
|
+
}), S = _(() => {
|
|
856
858
|
const d = ["default-class"];
|
|
857
859
|
return l.disabled != null && d.push("phila-input--disabled"), r.value && d.push("phila-input--error"), l.required != null && d.push("phila-input--required"), bt(...d);
|
|
858
860
|
}), y = _(() => {
|
|
859
861
|
const d = [];
|
|
860
862
|
return p.value !== "" && d.push("phila-text-field--filled"), o.className && d.push(o.className), bt(...d);
|
|
861
|
-
}),
|
|
863
|
+
}), m = _(() => {
|
|
862
864
|
if (!(o.label || l["aria-label"]))
|
|
863
865
|
return o.placeholder || void 0;
|
|
864
866
|
}), i = x(null), g = (d) => {
|
|
865
867
|
d.target.closest("button") || i.value?.focus();
|
|
866
868
|
};
|
|
867
|
-
return (d, L) => (
|
|
868
|
-
class: ne(["phila-input",
|
|
869
|
+
return (d, L) => (h(), M("div", {
|
|
870
|
+
class: ne(["phila-input", S.value])
|
|
869
871
|
}, [
|
|
870
|
-
o.label ? (
|
|
872
|
+
o.label ? (h(), M("label", {
|
|
871
873
|
key: 0,
|
|
872
874
|
for: n.value,
|
|
873
875
|
class: "has-text-label-small phila-label"
|
|
@@ -877,7 +879,7 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
877
879
|
onClick: g
|
|
878
880
|
}, [
|
|
879
881
|
P("div", bo, [
|
|
880
|
-
o.leadingIcon ? (
|
|
882
|
+
o.leadingIcon ? (h(), q(f(ke), {
|
|
881
883
|
key: 0,
|
|
882
884
|
"icon-class": o.leadingIcon,
|
|
883
885
|
inline: "",
|
|
@@ -889,37 +891,37 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
889
891
|
id: n.value,
|
|
890
892
|
ref_key: "inputRef",
|
|
891
893
|
ref: i,
|
|
892
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
894
|
+
"onUpdate:modelValue": L[0] || (L[0] = (C) => p.value = C),
|
|
893
895
|
class: "phila-text-field-input has-text-body-default",
|
|
894
896
|
placeholder: o.placeholder,
|
|
895
|
-
"aria-label":
|
|
897
|
+
"aria-label": m.value
|
|
896
898
|
}, f(l)), null, 16, So), [
|
|
897
899
|
[Xt, p.value]
|
|
898
900
|
])
|
|
899
901
|
])
|
|
900
902
|
]),
|
|
901
|
-
p.value != "" ? (
|
|
903
|
+
p.value != "" ? (h(), q(f(po), {
|
|
902
904
|
key: 1,
|
|
903
905
|
variant: "standard",
|
|
904
906
|
size: "small",
|
|
905
907
|
"icon-only": "",
|
|
906
908
|
"icon-definition": f(go),
|
|
907
|
-
onClick: L[1] || (L[1] = (
|
|
909
|
+
onClick: L[1] || (L[1] = (C) => p.value = "")
|
|
908
910
|
}, null, 8, ["icon-definition"])) : A("", !0),
|
|
909
|
-
o.trailingIcon ? (
|
|
911
|
+
o.trailingIcon ? (h(), q(f(ke), {
|
|
910
912
|
key: 2,
|
|
911
913
|
size: "small",
|
|
912
914
|
"icon-class": o.trailingIcon,
|
|
913
915
|
inline: "",
|
|
914
916
|
decorative: ""
|
|
915
917
|
}, null, 8, ["icon-class"])) : A("", !0),
|
|
916
|
-
|
|
918
|
+
he(d.$slots, "trailing-action")
|
|
917
919
|
])
|
|
918
920
|
], 2),
|
|
919
|
-
o.supportingText ? (
|
|
920
|
-
r.value ? (
|
|
921
|
+
o.supportingText ? (h(), M("div", Co, G(o.supportingText), 1)) : A("", !0),
|
|
922
|
+
r.value ? (h(), M("div", ko, [
|
|
921
923
|
H(f(ke), {
|
|
922
|
-
"icon-definition": f(
|
|
924
|
+
"icon-definition": f(ho),
|
|
923
925
|
size: "small",
|
|
924
926
|
inline: "",
|
|
925
927
|
decorative: ""
|
|
@@ -969,15 +971,15 @@ const Io = {
|
|
|
969
971
|
unavailable: { type: Boolean }
|
|
970
972
|
},
|
|
971
973
|
setup(e) {
|
|
972
|
-
return (a, l) => (
|
|
973
|
-
e.loading && !e.unavailable ? (
|
|
974
|
-
e.error ? (
|
|
974
|
+
return (a, l) => (h(), M(ue, null, [
|
|
975
|
+
e.loading && !e.unavailable ? (h(), M("span", Io, " Loading... ")) : A("", !0),
|
|
976
|
+
e.error ? (h(), M("span", {
|
|
975
977
|
key: 1,
|
|
976
978
|
class: "error-indicator",
|
|
977
979
|
"aria-label": e.error,
|
|
978
980
|
role: "status"
|
|
979
981
|
}, " Error ", 8, Eo)) : A("", !0),
|
|
980
|
-
e.unavailable ? (
|
|
982
|
+
e.unavailable ? (h(), M("span", Oo, " (zoom in) ")) : A("", !0)
|
|
981
983
|
], 64));
|
|
982
984
|
}
|
|
983
985
|
}), nt = /* @__PURE__ */ $e(zo, [["__scopeId", "data-v-19b1b402"]]), Do = { class: "opacity-control" }, _o = ["for"], Ro = ["id", "value", "aria-label"], Ao = /* @__PURE__ */ ge({
|
|
@@ -994,7 +996,7 @@ const Io = {
|
|
|
994
996
|
const n = r.target;
|
|
995
997
|
l("update:opacity", parseFloat(n.value));
|
|
996
998
|
}
|
|
997
|
-
return (r, n) => (
|
|
999
|
+
return (r, n) => (h(), M("div", Do, [
|
|
998
1000
|
P("label", {
|
|
999
1001
|
class: "opacity-label",
|
|
1000
1002
|
for: "opacity-" + e.layerId
|
|
@@ -1012,27 +1014,30 @@ const Io = {
|
|
|
1012
1014
|
}, null, 40, Ro)
|
|
1013
1015
|
]));
|
|
1014
1016
|
}
|
|
1015
|
-
}), Lt = /* @__PURE__ */ $e(Ao, [["__scopeId", "data-v-1a025f6a"]]), Bo = ["aria-label"], Vo = {
|
|
1017
|
+
}), Lt = /* @__PURE__ */ $e(Ao, [["__scopeId", "data-v-1a025f6a"]]), Bo = ["aria-label"], Vo = {
|
|
1018
|
+
key: 3,
|
|
1019
|
+
class: "legend-label"
|
|
1020
|
+
}, Zo = /* @__PURE__ */ ge({
|
|
1016
1021
|
__name: "LayerLegend",
|
|
1017
1022
|
props: {
|
|
1018
1023
|
items: {},
|
|
1019
1024
|
label: {}
|
|
1020
1025
|
},
|
|
1021
1026
|
setup(e) {
|
|
1022
|
-
return (a, l) => (
|
|
1027
|
+
return (a, l) => (h(), M("ul", {
|
|
1023
1028
|
class: "layer-legend",
|
|
1024
1029
|
"aria-label": e.label
|
|
1025
1030
|
}, [
|
|
1026
|
-
(
|
|
1031
|
+
(h(!0), M(ue, null, Le(e.items, (o, r) => (h(), M("li", {
|
|
1027
1032
|
key: r,
|
|
1028
1033
|
class: "legend-item"
|
|
1029
1034
|
}, [
|
|
1030
|
-
o.type === "circle" ? (
|
|
1035
|
+
o.type === "circle" ? (h(), M("span", {
|
|
1031
1036
|
key: 0,
|
|
1032
1037
|
class: "legend-symbol legend-circle",
|
|
1033
1038
|
style: ye({ backgroundColor: o.color }),
|
|
1034
1039
|
"aria-hidden": "true"
|
|
1035
|
-
}, null, 4)) : o.type === "line" ? (
|
|
1040
|
+
}, null, 4)) : o.type === "line" ? (h(), M("span", {
|
|
1036
1041
|
key: 1,
|
|
1037
1042
|
class: "legend-symbol legend-line",
|
|
1038
1043
|
style: ye({
|
|
@@ -1040,17 +1045,17 @@ const Io = {
|
|
|
1040
1045
|
height: `${o.width || 2}px`
|
|
1041
1046
|
}),
|
|
1042
1047
|
"aria-hidden": "true"
|
|
1043
|
-
}, null, 4)) : o.type === "fill" ? (
|
|
1048
|
+
}, null, 4)) : o.type === "fill" ? (h(), M("span", {
|
|
1044
1049
|
key: 2,
|
|
1045
1050
|
class: "legend-symbol legend-fill",
|
|
1046
1051
|
style: ye({ backgroundColor: o.color }),
|
|
1047
1052
|
"aria-hidden": "true"
|
|
1048
1053
|
}, null, 4)) : A("", !0),
|
|
1049
|
-
|
|
1054
|
+
e.items.length > 1 ? (h(), M("span", Vo, G(o.label), 1)) : A("", !0)
|
|
1050
1055
|
]))), 128))
|
|
1051
1056
|
], 8, Bo));
|
|
1052
1057
|
}
|
|
1053
|
-
}), St = /* @__PURE__ */ $e(Zo, [["__scopeId", "data-v-
|
|
1058
|
+
}), St = /* @__PURE__ */ $e(Zo, [["__scopeId", "data-v-bbb1a784"]]);
|
|
1054
1059
|
function Ct(e) {
|
|
1055
1060
|
function a(u) {
|
|
1056
1061
|
return e().visibleLayerIds.has(u);
|
|
@@ -1065,8 +1070,8 @@ function Ct(e) {
|
|
|
1065
1070
|
return e().layerErrors[u] || null;
|
|
1066
1071
|
}
|
|
1067
1072
|
function n(u) {
|
|
1068
|
-
const w = e().currentZoom, p = u.minZoom,
|
|
1069
|
-
return !(p !== void 0 && w < p ||
|
|
1073
|
+
const w = e().currentZoom, p = u.minZoom, S = u.maxZoom;
|
|
1074
|
+
return !(p !== void 0 && w < p || S !== void 0 && w > S);
|
|
1070
1075
|
}
|
|
1071
1076
|
return { isVisible: a, getLayerOpacity: l, isLayerLoading: o, getLayerError: r, isLayerAvailableAtZoom: n };
|
|
1072
1077
|
}
|
|
@@ -1111,7 +1116,7 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1111
1116
|
const L = Nt(d);
|
|
1112
1117
|
return l.layerMetadata[L] || null;
|
|
1113
1118
|
}
|
|
1114
|
-
const u = _(() => l.layerList.some((d) => n(d.config.url))), { isVisible: w, getLayerOpacity: p, isLayerLoading:
|
|
1119
|
+
const u = _(() => l.layerList.some((d) => n(d.config.url))), { isVisible: w, getLayerOpacity: p, isLayerLoading: S, getLayerError: y, isLayerAvailableAtZoom: m } = Ct(() => ({
|
|
1115
1120
|
visibleLayerIds: l.visibleLayers,
|
|
1116
1121
|
layerOpacities: l.layerOpacities,
|
|
1117
1122
|
loadingLayerIds: l.loadingLayers,
|
|
@@ -1124,11 +1129,11 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1124
1129
|
function g(d) {
|
|
1125
1130
|
o("toggleLayer", d);
|
|
1126
1131
|
}
|
|
1127
|
-
return (d, L) => (
|
|
1128
|
-
e.showSearch ? (
|
|
1132
|
+
return (d, L) => (h(), M("div", No, [
|
|
1133
|
+
e.showSearch ? (h(), M("div", Uo, [
|
|
1129
1134
|
H(f(xo), {
|
|
1130
1135
|
modelValue: i.value,
|
|
1131
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
1136
|
+
"onUpdate:modelValue": L[0] || (L[0] = (C) => i.value = C),
|
|
1132
1137
|
placeholder: e.searchPlaceholder,
|
|
1133
1138
|
"class-name": "layer-search-field"
|
|
1134
1139
|
}, {
|
|
@@ -1143,26 +1148,26 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1143
1148
|
_: 1
|
|
1144
1149
|
}, 8, ["modelValue", "placeholder"])
|
|
1145
1150
|
])) : A("", !0),
|
|
1146
|
-
e.mode === "topics" ? (
|
|
1147
|
-
|
|
1151
|
+
e.mode === "topics" ? (h(), M("div", Wo, [
|
|
1152
|
+
he(d.$slots, "topics", {}, () => [
|
|
1148
1153
|
L[2] || (L[2] = P("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
|
|
1149
1154
|
], !0)
|
|
1150
|
-
])) : (
|
|
1155
|
+
])) : (h(), M("div", {
|
|
1151
1156
|
key: 2,
|
|
1152
1157
|
class: ne(["layer-list", { "has-metadata": u.value }])
|
|
1153
1158
|
}, [
|
|
1154
|
-
(
|
|
1155
|
-
key:
|
|
1159
|
+
(h(!0), M(ue, null, Le(r.value, (C) => (h(), M("div", {
|
|
1160
|
+
key: C.config.id,
|
|
1156
1161
|
class: "layer-item"
|
|
1157
1162
|
}, [
|
|
1158
1163
|
P("div", jo, [
|
|
1159
|
-
n(
|
|
1164
|
+
n(C.config.url) ? (h(), M("a", {
|
|
1160
1165
|
key: 0,
|
|
1161
|
-
href: n(
|
|
1166
|
+
href: n(C.config.url) || "",
|
|
1162
1167
|
target: "_blank",
|
|
1163
1168
|
rel: "noopener noreferrer",
|
|
1164
1169
|
class: "metadata-link",
|
|
1165
|
-
"aria-label": "View metadata for " +
|
|
1170
|
+
"aria-label": "View metadata for " + C.config.title,
|
|
1166
1171
|
onClick: L[1] || (L[1] = Yt(() => {
|
|
1167
1172
|
}, ["stop"]))
|
|
1168
1173
|
}, [
|
|
@@ -1172,43 +1177,43 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1172
1177
|
inline: "",
|
|
1173
1178
|
decorative: ""
|
|
1174
1179
|
}, null, 8, ["icon-definition"])
|
|
1175
|
-
], 8, qo)) : u.value ? (
|
|
1180
|
+
], 8, qo)) : u.value ? (h(), M("span", Go)) : A("", !0),
|
|
1176
1181
|
P("label", {
|
|
1177
1182
|
class: ne(["layer-checkbox", {
|
|
1178
|
-
"layer-unavailable": !f(
|
|
1179
|
-
"layer-error": f(y)(
|
|
1183
|
+
"layer-unavailable": !f(m)(C.config),
|
|
1184
|
+
"layer-error": f(y)(C.config.id)
|
|
1180
1185
|
}])
|
|
1181
1186
|
}, [
|
|
1182
1187
|
P("input", {
|
|
1183
1188
|
type: "checkbox",
|
|
1184
|
-
checked: f(w)(
|
|
1185
|
-
disabled: !f(
|
|
1186
|
-
onChange: (E) => g(
|
|
1189
|
+
checked: f(w)(C.config.id),
|
|
1190
|
+
disabled: !f(m)(C.config),
|
|
1191
|
+
onChange: (E) => g(C.config.id)
|
|
1187
1192
|
}, null, 40, Ho),
|
|
1188
1193
|
P("span", Jo, [
|
|
1189
|
-
xe(G(
|
|
1194
|
+
xe(G(C.config.title) + " ", 1),
|
|
1190
1195
|
H(nt, {
|
|
1191
|
-
loading: f(
|
|
1192
|
-
error: f(y)(
|
|
1193
|
-
unavailable: !f(
|
|
1196
|
+
loading: f(S)(C.config.id),
|
|
1197
|
+
error: f(y)(C.config.id),
|
|
1198
|
+
unavailable: !f(m)(C.config)
|
|
1194
1199
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
1195
1200
|
])
|
|
1196
1201
|
], 2)
|
|
1197
1202
|
]),
|
|
1198
|
-
e.showOpacity && f(w)(
|
|
1203
|
+
e.showOpacity && f(w)(C.config.id) && f(m)(C.config) ? (h(), q(Lt, {
|
|
1199
1204
|
key: 0,
|
|
1200
|
-
"layer-id":
|
|
1201
|
-
"layer-name":
|
|
1202
|
-
opacity: f(p)(
|
|
1203
|
-
"onUpdate:opacity": (E) => o("setOpacity",
|
|
1205
|
+
"layer-id": C.config.id,
|
|
1206
|
+
"layer-name": C.config.title,
|
|
1207
|
+
opacity: f(p)(C.config.id),
|
|
1208
|
+
"onUpdate:opacity": (E) => o("setOpacity", C.config.id, E)
|
|
1204
1209
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
1205
|
-
e.showLegend && f(w)(
|
|
1210
|
+
e.showLegend && f(w)(C.config.id) && f(m)(C.config) && C.config.legend?.length ? (h(), q(St, {
|
|
1206
1211
|
key: 1,
|
|
1207
|
-
items:
|
|
1208
|
-
label: "Legend for " +
|
|
1212
|
+
items: C.config.legend,
|
|
1213
|
+
label: "Legend for " + C.config.title
|
|
1209
1214
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
1210
1215
|
]))), 128)),
|
|
1211
|
-
r.value.length === 0 ? (
|
|
1216
|
+
r.value.length === 0 ? (h(), M("div", Ko, 'No layers match "' + G(e.searchQuery) + '"', 1)) : A("", !0)
|
|
1212
1217
|
], 2))
|
|
1213
1218
|
]));
|
|
1214
1219
|
}
|
|
@@ -1230,23 +1235,23 @@ function ea(e, a, l, o, r) {
|
|
|
1230
1235
|
for (let i = 1; i < e.length; i++)
|
|
1231
1236
|
a[i] === u ? w.push(e[i]) : (n.push({ style: u, breaks: w, startIndex: p }), u = a[i], w = [e[i]], p = i);
|
|
1232
1237
|
n.push({ style: u, breaks: w, startIndex: p });
|
|
1233
|
-
const
|
|
1234
|
-
let
|
|
1238
|
+
const S = [], y = /* @__PURE__ */ new Set();
|
|
1239
|
+
let m = o.minValue ?? 0;
|
|
1235
1240
|
for (let i = 0; i < n.length; i++) {
|
|
1236
|
-
const g = n[i], d = g.breaks, L = Ke(g.style),
|
|
1241
|
+
const g = n[i], d = g.breaks, L = Ke(g.style), C = i === 0 ? null : n[i - 1].breaks[n[i - 1].breaks.length - 1].classMaxValue, E = d[d.length - 1].classMaxValue;
|
|
1237
1242
|
let F;
|
|
1238
1243
|
const V = !!o.defaultSymbol;
|
|
1239
|
-
|
|
1244
|
+
C === null ? F = `${!V && o.minValue != null ? `${l} >= ${o.minValue} AND ` : ""}${l} <= ${E}` : i === n.length - 1 && V ? F = `${l} > ${C}` : F = `${l} > ${C} AND ${l} <= ${E}`;
|
|
1240
1245
|
const T = {
|
|
1241
|
-
"line-opacity":
|
|
1246
|
+
"line-opacity": me(r)
|
|
1242
1247
|
};
|
|
1243
1248
|
if (L && (T["line-dasharray"] = L), d.length === 1)
|
|
1244
|
-
T["line-color"] = z(d[0].symbol?.color), T["line-width"] =
|
|
1249
|
+
T["line-color"] = z(d[0].symbol?.color), T["line-width"] = J(d[0].symbol?.width || 2);
|
|
1245
1250
|
else {
|
|
1246
1251
|
const U = ["step", ["get", l]], de = ["step", ["get", l]];
|
|
1247
|
-
U.push(z(d[0].symbol?.color)), de.push(
|
|
1252
|
+
U.push(z(d[0].symbol?.color)), de.push(J(d[0].symbol?.width || 2));
|
|
1248
1253
|
for (let ve = 1; ve < d.length; ve++)
|
|
1249
|
-
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), de.push(d[ve - 1].classMaxValue), de.push(
|
|
1254
|
+
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), de.push(d[ve - 1].classMaxValue), de.push(J(d[ve].symbol?.width || 2));
|
|
1250
1255
|
T["line-color"] = U, T["line-width"] = de;
|
|
1251
1256
|
}
|
|
1252
1257
|
const O = [];
|
|
@@ -1254,34 +1259,34 @@ function ea(e, a, l, o, r) {
|
|
|
1254
1259
|
O.push({
|
|
1255
1260
|
type: "line",
|
|
1256
1261
|
color: z(U.symbol?.color),
|
|
1257
|
-
width:
|
|
1258
|
-
label: U.label || `${
|
|
1259
|
-
}),
|
|
1262
|
+
width: J(U.symbol?.width || 2),
|
|
1263
|
+
label: U.label || `${m} - ${U.classMaxValue}`
|
|
1264
|
+
}), m = U.classMaxValue + 1;
|
|
1260
1265
|
const D = g.style.replace("esriSLS", "").toLowerCase();
|
|
1261
1266
|
let ee;
|
|
1262
|
-
i === 0 ? ee = "" : y.has(D) ? ee = `-${D}-${i}` : ee = `-${D}`, y.add(D),
|
|
1267
|
+
i === 0 ? ee = "" : y.has(D) ? ee = `-${D}-${i}` : ee = `-${D}`, y.add(D), S.push({ suffix: ee, where: F, paint: T, legend: O });
|
|
1263
1268
|
}
|
|
1264
|
-
return
|
|
1269
|
+
return S;
|
|
1265
1270
|
}
|
|
1266
1271
|
function ta(e, a, l, o, r) {
|
|
1267
1272
|
const n = /* @__PURE__ */ new Map();
|
|
1268
|
-
for (const
|
|
1269
|
-
const y =
|
|
1270
|
-
n.has(y) || n.set(y, []), n.get(y).push(
|
|
1273
|
+
for (const S of e) {
|
|
1274
|
+
const y = S.symbol?.style || "esriSLSSolid";
|
|
1275
|
+
n.has(y) || n.set(y, []), n.get(y).push(S);
|
|
1271
1276
|
}
|
|
1272
1277
|
const u = [], w = /* @__PURE__ */ new Set();
|
|
1273
1278
|
let p = !0;
|
|
1274
|
-
for (const [
|
|
1275
|
-
const
|
|
1276
|
-
"line-opacity":
|
|
1279
|
+
for (const [S, y] of n) {
|
|
1280
|
+
const m = Ke(S), g = y.map((F) => `${a} = '${String(F.value).replace(/'/g, "''")}'`).join(" OR "), d = {
|
|
1281
|
+
"line-opacity": me(o)
|
|
1277
1282
|
};
|
|
1278
|
-
if (
|
|
1279
|
-
d["line-color"] = z(y[0].symbol?.color), d["line-width"] =
|
|
1283
|
+
if (m && (d["line-dasharray"] = m), y.length === 1)
|
|
1284
|
+
d["line-color"] = z(y[0].symbol?.color), d["line-width"] = J(y[0].symbol?.width || 2);
|
|
1280
1285
|
else {
|
|
1281
1286
|
const F = ["match", ["to-string", ["get", a]]];
|
|
1282
1287
|
for (const V of y)
|
|
1283
1288
|
F.push(it(V.value)), F.push(z(V.symbol?.color));
|
|
1284
|
-
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] =
|
|
1289
|
+
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] = J(y[0].symbol?.width || 2);
|
|
1285
1290
|
}
|
|
1286
1291
|
const L = [];
|
|
1287
1292
|
for (const F of y) {
|
|
@@ -1289,13 +1294,13 @@ function ta(e, a, l, o, r) {
|
|
|
1289
1294
|
L.push({
|
|
1290
1295
|
type: "line",
|
|
1291
1296
|
color: z(F.symbol?.color),
|
|
1292
|
-
width:
|
|
1297
|
+
width: J(F.symbol?.width || 1),
|
|
1293
1298
|
label: O
|
|
1294
1299
|
});
|
|
1295
1300
|
}
|
|
1296
|
-
const
|
|
1301
|
+
const C = S.replace("esriSLS", "").toLowerCase();
|
|
1297
1302
|
let E;
|
|
1298
|
-
p ? E = "" : w.has(
|
|
1303
|
+
p ? E = "" : w.has(C) ? E = `-${C}-${u.length}` : E = `-${C}`, w.add(C), p = !1, u.push({ suffix: E, where: g, paint: d, legend: L });
|
|
1299
1304
|
}
|
|
1300
1305
|
return u;
|
|
1301
1306
|
}
|
|
@@ -1304,10 +1309,10 @@ function z(e) {
|
|
|
1304
1309
|
const a = e[0], l = e[1], o = e[2], n = (e[3] ?? 255) / 255;
|
|
1305
1310
|
return n === 1 ? `#${a.toString(16).padStart(2, "0")}${l.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}` : `rgba(${a}, ${l}, ${o}, ${n.toFixed(2)})`;
|
|
1306
1311
|
}
|
|
1307
|
-
function
|
|
1312
|
+
function me(e) {
|
|
1308
1313
|
return e !== void 0 ? e : 1;
|
|
1309
1314
|
}
|
|
1310
|
-
function
|
|
1315
|
+
function J(e) {
|
|
1311
1316
|
return Math.round(e * (96 / 72) * 10) / 10;
|
|
1312
1317
|
}
|
|
1313
1318
|
const oa = 559082264;
|
|
@@ -1353,15 +1358,15 @@ function Ut(e, a, l) {
|
|
|
1353
1358
|
const o = e.symbol, r = st(o);
|
|
1354
1359
|
let n = {}, u = [], w = null;
|
|
1355
1360
|
if (r === "fill" && o) {
|
|
1356
|
-
const p = o.color === null ? 0 : o.color?.[3] ?? 255,
|
|
1361
|
+
const p = o.color === null ? 0 : o.color?.[3] ?? 255, S = p === 0 ? "rgba(0, 0, 0, 0)" : z(o.color), y = p === 0 ? 0 : p < 255 ? 1 : me(a);
|
|
1357
1362
|
if (n = {
|
|
1358
|
-
"fill-color":
|
|
1363
|
+
"fill-color": S,
|
|
1359
1364
|
"fill-opacity": y
|
|
1360
1365
|
}, Pe(o.outline)) {
|
|
1361
|
-
const
|
|
1366
|
+
const m = J(o.outline.width || 1);
|
|
1362
1367
|
w = {
|
|
1363
1368
|
"line-color": z(o.outline.color),
|
|
1364
|
-
"line-width":
|
|
1369
|
+
"line-width": m
|
|
1365
1370
|
};
|
|
1366
1371
|
}
|
|
1367
1372
|
u = [
|
|
@@ -1374,15 +1379,15 @@ function Ut(e, a, l) {
|
|
|
1374
1379
|
} else if (r === "line" && o) {
|
|
1375
1380
|
n = {
|
|
1376
1381
|
"line-color": z(o.color),
|
|
1377
|
-
"line-width":
|
|
1378
|
-
"line-opacity":
|
|
1382
|
+
"line-width": J(o.width || 1),
|
|
1383
|
+
"line-opacity": me(a)
|
|
1379
1384
|
};
|
|
1380
1385
|
const p = Ke(o.style);
|
|
1381
1386
|
p && (n["line-dasharray"] = p), u = [
|
|
1382
1387
|
{
|
|
1383
1388
|
type: "line",
|
|
1384
1389
|
color: z(o.color),
|
|
1385
|
-
width:
|
|
1390
|
+
width: J(o.width || 1),
|
|
1386
1391
|
label: e.label || "Feature"
|
|
1387
1392
|
}
|
|
1388
1393
|
];
|
|
@@ -1391,8 +1396,8 @@ function Ut(e, a, l) {
|
|
|
1391
1396
|
n = {
|
|
1392
1397
|
"circle-color": z(o.color),
|
|
1393
1398
|
"circle-radius": p,
|
|
1394
|
-
"circle-opacity":
|
|
1395
|
-
}, Pe(o.outline) && (n["circle-stroke-color"] = z(o.outline.color), n["circle-stroke-width"] =
|
|
1399
|
+
"circle-opacity": me(a)
|
|
1400
|
+
}, Pe(o.outline) && (n["circle-stroke-color"] = z(o.outline.color), n["circle-stroke-width"] = J(o.outline.width || 1)), u = [
|
|
1396
1401
|
{
|
|
1397
1402
|
type: "circle",
|
|
1398
1403
|
color: z(o.color),
|
|
@@ -1408,45 +1413,54 @@ function ia(e, a, l) {
|
|
|
1408
1413
|
return Ut({ ...e, symbol: n }, a);
|
|
1409
1414
|
const u = r[0]?.symbol || n, w = st(u);
|
|
1410
1415
|
let p = {};
|
|
1411
|
-
const
|
|
1416
|
+
const S = [];
|
|
1412
1417
|
let y = null;
|
|
1413
1418
|
if (w === "fill") {
|
|
1414
|
-
const
|
|
1419
|
+
const m = ["match", ["to-string", ["get", o]]];
|
|
1415
1420
|
for (const i of r) {
|
|
1416
|
-
|
|
1421
|
+
m.push(it(i.value)), m.push(z(i.symbol?.color));
|
|
1417
1422
|
const g = String(i.value), L = l?.get(g) || i.label || g;
|
|
1418
|
-
|
|
1423
|
+
S.push({
|
|
1419
1424
|
type: "fill",
|
|
1420
1425
|
color: z(i.symbol?.color),
|
|
1421
1426
|
label: L
|
|
1422
1427
|
});
|
|
1423
1428
|
}
|
|
1424
|
-
if (
|
|
1425
|
-
"fill
|
|
1426
|
-
|
|
1429
|
+
if (m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1430
|
+
type: "fill",
|
|
1431
|
+
color: z(n.color),
|
|
1432
|
+
label: e.defaultLabel || "Other"
|
|
1433
|
+
}), p = {
|
|
1434
|
+
"fill-color": m,
|
|
1435
|
+
"fill-opacity": me(a)
|
|
1427
1436
|
}, Pe(u?.outline)) {
|
|
1428
|
-
const i =
|
|
1437
|
+
const i = J(Math.max(u.outline.width || 1, 1));
|
|
1429
1438
|
y = {
|
|
1430
1439
|
"line-color": z(u.outline.color),
|
|
1431
1440
|
"line-width": i
|
|
1432
1441
|
};
|
|
1433
1442
|
}
|
|
1434
1443
|
} else if (w === "line") {
|
|
1435
|
-
const
|
|
1444
|
+
const m = ["match", ["to-string", ["get", o]]];
|
|
1436
1445
|
for (const d of r) {
|
|
1437
|
-
|
|
1446
|
+
m.push(it(d.value)), m.push(z(d.symbol?.color));
|
|
1438
1447
|
const L = String(d.value), E = l?.get(L) || d.label || L;
|
|
1439
|
-
|
|
1448
|
+
S.push({
|
|
1440
1449
|
type: "line",
|
|
1441
1450
|
color: z(d.symbol?.color),
|
|
1442
|
-
width:
|
|
1451
|
+
width: J(d.symbol?.width || 1),
|
|
1443
1452
|
label: E
|
|
1444
1453
|
});
|
|
1445
1454
|
}
|
|
1446
|
-
|
|
1447
|
-
"line
|
|
1448
|
-
|
|
1449
|
-
|
|
1455
|
+
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1456
|
+
type: "line",
|
|
1457
|
+
color: z(n.color),
|
|
1458
|
+
width: J(n.width || 1),
|
|
1459
|
+
label: e.defaultLabel || "Other"
|
|
1460
|
+
}), p = {
|
|
1461
|
+
"line-color": m,
|
|
1462
|
+
"line-width": J(u?.width || 2),
|
|
1463
|
+
"line-opacity": me(a)
|
|
1450
1464
|
};
|
|
1451
1465
|
const i = r.map((d) => d.symbol?.style || "esriSLSSolid"), g = [...new Set(i)];
|
|
1452
1466
|
if (g.length > 1) {
|
|
@@ -1458,25 +1472,29 @@ function ia(e, a, l) {
|
|
|
1458
1472
|
d && (p["line-dasharray"] = d);
|
|
1459
1473
|
}
|
|
1460
1474
|
} else if (w === "circle") {
|
|
1461
|
-
const
|
|
1475
|
+
const m = ["match", ["to-string", ["get", o]]];
|
|
1462
1476
|
for (const g of r) {
|
|
1463
|
-
|
|
1464
|
-
const d = String(g.value),
|
|
1465
|
-
|
|
1477
|
+
m.push(it(g.value)), m.push(z(g.symbol?.color));
|
|
1478
|
+
const d = String(g.value), C = l?.get(d) || g.label || d;
|
|
1479
|
+
S.push({
|
|
1466
1480
|
type: "circle",
|
|
1467
1481
|
color: z(g.symbol?.color),
|
|
1468
|
-
label:
|
|
1482
|
+
label: C
|
|
1469
1483
|
});
|
|
1470
1484
|
}
|
|
1471
|
-
|
|
1485
|
+
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1486
|
+
type: "circle",
|
|
1487
|
+
color: z(n.color),
|
|
1488
|
+
label: e.defaultLabel || "Other"
|
|
1489
|
+
});
|
|
1472
1490
|
const i = Math.round((u?.size || 6) * 0.71 * 100) / 100;
|
|
1473
1491
|
p = {
|
|
1474
|
-
"circle-color":
|
|
1492
|
+
"circle-color": m,
|
|
1475
1493
|
"circle-radius": i,
|
|
1476
|
-
"circle-opacity":
|
|
1477
|
-
}, Pe(u?.outline) && (p["circle-stroke-color"] = z(u.outline.color), p["circle-stroke-width"] =
|
|
1494
|
+
"circle-opacity": me(a)
|
|
1495
|
+
}, Pe(u?.outline) && (p["circle-stroke-color"] = z(u.outline.color), p["circle-stroke-width"] = J(u.outline.width || 1));
|
|
1478
1496
|
}
|
|
1479
|
-
return { paint: p, legend:
|
|
1497
|
+
return { paint: p, legend: S, geomType: w, outlinePaint: y };
|
|
1480
1498
|
}
|
|
1481
1499
|
function la(e, a) {
|
|
1482
1500
|
const l = e.field.toLowerCase(), o = e.classBreakInfos || [], r = e.visualVariables?.find((y) => y.type === "colorInfo");
|
|
@@ -1487,13 +1505,13 @@ function la(e, a) {
|
|
|
1487
1505
|
const n = o[0]?.symbol, u = st(n);
|
|
1488
1506
|
let w = {};
|
|
1489
1507
|
const p = [];
|
|
1490
|
-
let
|
|
1508
|
+
let S = null;
|
|
1491
1509
|
if (u === "fill") {
|
|
1492
1510
|
const y = ["step", ["get", l]];
|
|
1493
1511
|
y.push(z(o[0]?.symbol?.color));
|
|
1494
|
-
for (let
|
|
1495
|
-
const i = o[
|
|
1496
|
-
|
|
1512
|
+
for (let m = 0; m < o.length; m++) {
|
|
1513
|
+
const i = o[m];
|
|
1514
|
+
m > 0 && (y.push(o[m - 1].classMaxValue), y.push(z(i.symbol?.color))), p.push({
|
|
1497
1515
|
type: "fill",
|
|
1498
1516
|
color: z(i.symbol?.color),
|
|
1499
1517
|
label: i.label || `${i.classMaxValue}`
|
|
@@ -1501,19 +1519,19 @@ function la(e, a) {
|
|
|
1501
1519
|
}
|
|
1502
1520
|
if (w = {
|
|
1503
1521
|
"fill-color": y,
|
|
1504
|
-
"fill-opacity":
|
|
1522
|
+
"fill-opacity": me(a)
|
|
1505
1523
|
}, Pe(n?.outline)) {
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1524
|
+
const m = J(n.outline.width || 1);
|
|
1525
|
+
S = {
|
|
1508
1526
|
"line-color": z(n.outline.color),
|
|
1509
|
-
"line-width":
|
|
1527
|
+
"line-width": m
|
|
1510
1528
|
};
|
|
1511
1529
|
}
|
|
1512
1530
|
} else if (u === "line") {
|
|
1513
|
-
const y = o.map((E) => E.symbol?.style || "esriSLSSolid"),
|
|
1514
|
-
if (
|
|
1531
|
+
const y = o.map((E) => E.symbol?.style || "esriSLSSolid"), m = [...new Set(y)];
|
|
1532
|
+
if (m.length > 1) {
|
|
1515
1533
|
const E = ea(o, y, l, e, a);
|
|
1516
|
-
return { paint: {}, legend: [], geomType: u, outlinePaint:
|
|
1534
|
+
return { paint: {}, legend: [], geomType: u, outlinePaint: S, splitLayers: E };
|
|
1517
1535
|
}
|
|
1518
1536
|
const g = ["step", ["get", l]];
|
|
1519
1537
|
g.push(z(o[0]?.symbol?.color));
|
|
@@ -1523,20 +1541,20 @@ function la(e, a) {
|
|
|
1523
1541
|
E > 0 && (g.push(o[E - 1].classMaxValue), g.push(z(F.symbol?.color))), p.push({
|
|
1524
1542
|
type: "line",
|
|
1525
1543
|
color: z(F.symbol?.color),
|
|
1526
|
-
width:
|
|
1544
|
+
width: J(F.symbol?.width || n?.width || 2),
|
|
1527
1545
|
label: F.label || `${d} - ${F.classMaxValue}`
|
|
1528
1546
|
}), d = F.classMaxValue + 1;
|
|
1529
1547
|
}
|
|
1530
|
-
const L =
|
|
1548
|
+
const L = J(n?.width || 2);
|
|
1531
1549
|
w = {
|
|
1532
1550
|
"line-color": g,
|
|
1533
1551
|
"line-width": L,
|
|
1534
|
-
"line-opacity":
|
|
1552
|
+
"line-opacity": me(a)
|
|
1535
1553
|
};
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1554
|
+
const C = Ke(m[0]);
|
|
1555
|
+
C && (w["line-dasharray"] = C);
|
|
1538
1556
|
}
|
|
1539
|
-
return { paint: w, legend: p, geomType: u, outlinePaint:
|
|
1557
|
+
return { paint: w, legend: p, geomType: u, outlinePaint: S };
|
|
1540
1558
|
}
|
|
1541
1559
|
function na(e, a, l, o) {
|
|
1542
1560
|
const r = e.stops || [];
|
|
@@ -1545,7 +1563,7 @@ function na(e, a, l, o) {
|
|
|
1545
1563
|
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol, u = st(n);
|
|
1546
1564
|
let w = {};
|
|
1547
1565
|
const p = [];
|
|
1548
|
-
let
|
|
1566
|
+
let S = null;
|
|
1549
1567
|
if (u === "fill") {
|
|
1550
1568
|
const y = ["interpolate", ["linear"], ["get", a]];
|
|
1551
1569
|
for (const i of r)
|
|
@@ -1563,16 +1581,16 @@ function na(e, a, l, o) {
|
|
|
1563
1581
|
y
|
|
1564
1582
|
// Otherwise use the interpolated color
|
|
1565
1583
|
],
|
|
1566
|
-
"fill-opacity":
|
|
1584
|
+
"fill-opacity": me(o)
|
|
1567
1585
|
}, Pe(n?.outline)) {
|
|
1568
|
-
const i =
|
|
1569
|
-
|
|
1586
|
+
const i = J(n.outline.width || 1);
|
|
1587
|
+
S = {
|
|
1570
1588
|
"line-color": z(n.outline.color),
|
|
1571
1589
|
"line-width": i
|
|
1572
1590
|
};
|
|
1573
1591
|
}
|
|
1574
1592
|
}
|
|
1575
|
-
return { paint: w, legend: p, geomType: u, outlinePaint:
|
|
1593
|
+
return { paint: w, legend: p, geomType: u, outlinePaint: S };
|
|
1576
1594
|
}
|
|
1577
1595
|
function ra(e, a, l, o) {
|
|
1578
1596
|
if (!e?.renderer)
|
|
@@ -1660,27 +1678,27 @@ async function Wt(e) {
|
|
|
1660
1678
|
if (r.url && !r.title?.toLowerCase().includes("(under construction)") && !(r.url && /\/MapServer(\/\d+)?$/i.test(r.url)))
|
|
1661
1679
|
try {
|
|
1662
1680
|
let n = r.layerDefinition?.drawingInfo, u;
|
|
1663
|
-
const w = !n || !n.renderer, p = o.includes(r.title),
|
|
1681
|
+
const w = !n || !n.renderer, p = o.includes(r.title), S = n?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || n?.renderer?.defaultSymbol?.outline;
|
|
1664
1682
|
if ((w || p) && r.url) {
|
|
1665
1683
|
const O = await pa(r.url);
|
|
1666
1684
|
if (O) {
|
|
1667
|
-
if (n = O.drawingInfo,
|
|
1685
|
+
if (n = O.drawingInfo, S && Pe(S) && n?.renderer) {
|
|
1668
1686
|
const D = n.renderer, ee = D.uniqueValueInfos?.[0]?.symbol?.outline || D.defaultSymbol?.outline;
|
|
1669
1687
|
if (!Pe(ee)) {
|
|
1670
1688
|
for (const U of D.uniqueValueInfos || [])
|
|
1671
|
-
U.symbol && (U.symbol.outline =
|
|
1672
|
-
D.defaultSymbol && (D.defaultSymbol.outline =
|
|
1689
|
+
U.symbol && (U.symbol.outline = S);
|
|
1690
|
+
D.defaultSymbol && (D.defaultSymbol.outline = S);
|
|
1673
1691
|
}
|
|
1674
1692
|
}
|
|
1675
1693
|
O.description && (u = fa(O.description), u.size > 0);
|
|
1676
1694
|
}
|
|
1677
1695
|
}
|
|
1678
|
-
const { paint: y, legend:
|
|
1696
|
+
const { paint: y, legend: m, geomType: i, outlinePaint: g, splitLayers: d } = ra(
|
|
1679
1697
|
n,
|
|
1680
1698
|
r.opacity,
|
|
1681
1699
|
u,
|
|
1682
1700
|
r.title
|
|
1683
|
-
), L = sa(r.popupInfo),
|
|
1701
|
+
), L = sa(r.popupInfo), C = ca(r.layerDefinition), E = aa(r.layerDefinition?.minScale, r.layerDefinition?.maxScale), F = ua(r.title), V = da(r.title), T = r.opacity ?? 1;
|
|
1684
1702
|
if (d && d.length > 0)
|
|
1685
1703
|
for (const O of d) {
|
|
1686
1704
|
const D = `${F}${O.suffix}`;
|
|
@@ -1693,7 +1711,7 @@ async function Wt(e) {
|
|
|
1693
1711
|
paint: O.paint,
|
|
1694
1712
|
legend: O.legend,
|
|
1695
1713
|
popup: L,
|
|
1696
|
-
where:
|
|
1714
|
+
where: C ? `(${C}) AND (${O.where})` : O.where,
|
|
1697
1715
|
minZoom: E.minZoom,
|
|
1698
1716
|
maxZoom: E.maxZoom,
|
|
1699
1717
|
parentId: O.suffix ? F : void 0
|
|
@@ -1707,9 +1725,9 @@ async function Wt(e) {
|
|
|
1707
1725
|
url: r.url,
|
|
1708
1726
|
opacity: T,
|
|
1709
1727
|
paint: y,
|
|
1710
|
-
legend:
|
|
1728
|
+
legend: m,
|
|
1711
1729
|
popup: L,
|
|
1712
|
-
where:
|
|
1730
|
+
where: C,
|
|
1713
1731
|
minZoom: E.minZoom,
|
|
1714
1732
|
maxZoom: E.maxZoom,
|
|
1715
1733
|
outlinePaint: g
|
|
@@ -1731,7 +1749,7 @@ function ya(e) {
|
|
|
1731
1749
|
e ? (rt.delete(e), Je.delete(e)) : (rt.clear(), Je.clear());
|
|
1732
1750
|
}
|
|
1733
1751
|
let at, Bt = 0;
|
|
1734
|
-
async function
|
|
1752
|
+
async function ha() {
|
|
1735
1753
|
const e = typeof import.meta < "u" && At?.VITE_AGO_USERNAME, a = typeof import.meta < "u" && At?.VITE_AGO_PASSWORD;
|
|
1736
1754
|
if (!(!e || !a)) {
|
|
1737
1755
|
if (at && Date.now() < Bt - 3e5)
|
|
@@ -1757,7 +1775,7 @@ async function ma() {
|
|
|
1757
1775
|
}
|
|
1758
1776
|
}
|
|
1759
1777
|
}
|
|
1760
|
-
async function
|
|
1778
|
+
async function ma(e, a) {
|
|
1761
1779
|
const l = xt(e, a), o = await fetch(l, { cache: "no-store" });
|
|
1762
1780
|
if (!o.ok)
|
|
1763
1781
|
throw new Error(`Failed to fetch WebMap: ${o.status} ${o.statusText}`);
|
|
@@ -1768,7 +1786,7 @@ async function ha(e, a) {
|
|
|
1768
1786
|
}
|
|
1769
1787
|
async function ga(e) {
|
|
1770
1788
|
try {
|
|
1771
|
-
const a = await
|
|
1789
|
+
const a = await ha(), l = await ma(e, a);
|
|
1772
1790
|
return await Wt(l);
|
|
1773
1791
|
} catch (a) {
|
|
1774
1792
|
throw new Error(
|
|
@@ -1832,7 +1850,7 @@ function va(e) {
|
|
|
1832
1850
|
throw new Error(`HTTP ${L.status}: ${L.statusText}`);
|
|
1833
1851
|
d = await L.json();
|
|
1834
1852
|
} else if (i.type === "esri") {
|
|
1835
|
-
const
|
|
1853
|
+
const C = `${i.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, E = await fetch(C, i.options);
|
|
1836
1854
|
if (!E.ok)
|
|
1837
1855
|
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
1838
1856
|
d = (await E.json()).features?.map((V) => V.attributes) || [];
|
|
@@ -1874,7 +1892,7 @@ function va(e) {
|
|
|
1874
1892
|
function p(i) {
|
|
1875
1893
|
return a.value[i]?.loading ?? !1;
|
|
1876
1894
|
}
|
|
1877
|
-
function
|
|
1895
|
+
function S(i) {
|
|
1878
1896
|
return a.value[i]?.error ?? null;
|
|
1879
1897
|
}
|
|
1880
1898
|
function y() {
|
|
@@ -1886,7 +1904,7 @@ function va(e) {
|
|
|
1886
1904
|
l.set(i.id, g);
|
|
1887
1905
|
}
|
|
1888
1906
|
}
|
|
1889
|
-
function
|
|
1907
|
+
function m() {
|
|
1890
1908
|
for (const [, i] of l)
|
|
1891
1909
|
window.clearInterval(i);
|
|
1892
1910
|
l.clear();
|
|
@@ -1894,7 +1912,7 @@ function va(e) {
|
|
|
1894
1912
|
return lt(() => {
|
|
1895
1913
|
r(), y();
|
|
1896
1914
|
}), Vt(() => {
|
|
1897
|
-
|
|
1915
|
+
m();
|
|
1898
1916
|
}), {
|
|
1899
1917
|
/** Reactive state for all data sources */
|
|
1900
1918
|
state: j(a),
|
|
@@ -1909,9 +1927,9 @@ function va(e) {
|
|
|
1909
1927
|
/** Check if a specific source is loading */
|
|
1910
1928
|
isSourceLoading: p,
|
|
1911
1929
|
/** Get error for a specific source */
|
|
1912
|
-
getError:
|
|
1930
|
+
getError: S,
|
|
1913
1931
|
/** Stop all polling (useful for cleanup) */
|
|
1914
|
-
stopPolling:
|
|
1932
|
+
stopPolling: m
|
|
1915
1933
|
};
|
|
1916
1934
|
}
|
|
1917
1935
|
const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
@@ -1959,12 +1977,12 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1959
1977
|
},
|
|
1960
1978
|
emits: ["configs-loaded", "load-error", "zoom"],
|
|
1961
1979
|
setup(e, { expose: a, emit: l }) {
|
|
1962
|
-
const o = e, r = l, n = x([]), u = x(!0), w = x(null), p = x(12),
|
|
1980
|
+
const o = e, r = l, n = x([]), u = x(!0), w = x(null), p = x(12), S = x(""), y = x(/* @__PURE__ */ new Set()), m = x({}), i = x(/* @__PURE__ */ new Set()), g = x({}), d = x({}), L = x(/* @__PURE__ */ new Set()), C = x({});
|
|
1963
1981
|
function E() {
|
|
1964
1982
|
const v = {};
|
|
1965
1983
|
for (const $ of o.tiledLayers)
|
|
1966
1984
|
v[$.id] = $.opacity ?? 1;
|
|
1967
|
-
|
|
1985
|
+
C.value = v;
|
|
1968
1986
|
}
|
|
1969
1987
|
function F(v) {
|
|
1970
1988
|
L.value.has(v) ? L.value.delete(v) : L.value.add(v), L.value = new Set(L.value);
|
|
@@ -1973,7 +1991,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1973
1991
|
$ ? L.value.add(v) : L.value.delete(v), L.value = new Set(L.value);
|
|
1974
1992
|
}
|
|
1975
1993
|
function T(v, $) {
|
|
1976
|
-
|
|
1994
|
+
C.value = { ...C.value, [v]: $ };
|
|
1977
1995
|
}
|
|
1978
1996
|
const O = o.dataSources.length > 0 ? va(o.dataSources) : null, D = _(() => O?.state.value ?? {}), ee = _(() => O?.isLoading.value ?? !1);
|
|
1979
1997
|
function U(v) {
|
|
@@ -1982,7 +2000,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1982
2000
|
function de(v) {
|
|
1983
2001
|
return O?.refetch(v) ?? Promise.resolve();
|
|
1984
2002
|
}
|
|
1985
|
-
N("layerboard-layers", j(n)), N("layerboard-visible", y), N("layerboard-opacities",
|
|
2003
|
+
N("layerboard-layers", j(n)), N("layerboard-visible", y), N("layerboard-opacities", m), N("layerboard-loading", j(i)), N("layerboard-errors", j(g)), N("layerboard-zoom", j(p)), N("layerboard-toggle-layer", De), N("layerboard-set-layer-visible", je), N("layerboard-set-layers-visible", Me), N("layerboard-set-opacity", Fe), N("layerboard-tiled-layers", j(_(() => o.tiledLayers))), N("layerboard-visible-tiled", L), N("layerboard-tiled-opacities", C), N("layerboard-toggle-tiled", F), N("layerboard-set-tiled-opacity", T), N("layerboard-set-tiled-visible", V), N("layerboard-data-sources-state", D), N("layerboard-data-sources-loading", ee), N("layerboard-get-data-source", U), N("layerboard-refetch-data-source", de);
|
|
1986
2004
|
const ve = _(() => ({
|
|
1987
2005
|
backgroundColor: o.themeColor
|
|
1988
2006
|
})), ct = _(() => ({
|
|
@@ -1996,29 +2014,29 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1996
2014
|
try {
|
|
1997
2015
|
u.value = !0, w.value = null;
|
|
1998
2016
|
const $ = (await wt(o.webMapId)).map((Z) => {
|
|
1999
|
-
let
|
|
2017
|
+
let Q = Z;
|
|
2000
2018
|
const Ce = o.layerStyleOverrides[Z.id];
|
|
2001
|
-
Ce && (
|
|
2002
|
-
...
|
|
2003
|
-
paint: Ce.paint ??
|
|
2004
|
-
outlinePaint: Ce.outlinePaint ??
|
|
2005
|
-
legend: Ce.legend ??
|
|
2006
|
-
type: Ce.type ??
|
|
2019
|
+
Ce && (Q = {
|
|
2020
|
+
...Q,
|
|
2021
|
+
paint: Ce.paint ?? Q.paint,
|
|
2022
|
+
outlinePaint: Ce.outlinePaint ?? Q.outlinePaint,
|
|
2023
|
+
legend: Ce.legend ?? Q.legend,
|
|
2024
|
+
type: Ce.type ?? Q.type
|
|
2007
2025
|
});
|
|
2008
2026
|
const Ze = o.popupOverrides[Z.id] || (Z.parentId ? o.popupOverrides[Z.parentId] : void 0);
|
|
2009
|
-
return Ze &&
|
|
2010
|
-
...
|
|
2011
|
-
popup: { ...
|
|
2012
|
-
}),
|
|
2027
|
+
return Ze && Q.popup && (Q = {
|
|
2028
|
+
...Q,
|
|
2029
|
+
popup: { ...Q.popup, ...Ze }
|
|
2030
|
+
}), Q;
|
|
2013
2031
|
});
|
|
2014
2032
|
n.value = $.map((Z) => ({
|
|
2015
2033
|
config: Z,
|
|
2016
2034
|
component: Z.type
|
|
2017
2035
|
}));
|
|
2018
|
-
const
|
|
2036
|
+
const K = {};
|
|
2019
2037
|
$.forEach((Z) => {
|
|
2020
|
-
|
|
2021
|
-
}),
|
|
2038
|
+
K[Z.id] = Z.opacity ?? 1;
|
|
2039
|
+
}), m.value = K, r("configs-loaded", $);
|
|
2022
2040
|
} catch (v) {
|
|
2023
2041
|
const $ = v instanceof Error ? v.message : "Failed to load layer configurations";
|
|
2024
2042
|
w.value = $, r("load-error", $);
|
|
@@ -2033,10 +2051,10 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2033
2051
|
"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"
|
|
2034
2052
|
), $ = await fetch(v);
|
|
2035
2053
|
if (!$.ok) return;
|
|
2036
|
-
const
|
|
2037
|
-
for (const
|
|
2038
|
-
if (
|
|
2039
|
-
const Ce = Nt(
|
|
2054
|
+
const K = await $.json(), Z = {};
|
|
2055
|
+
for (const Q of K.rows || [])
|
|
2056
|
+
if (Q.url_text && Q.representation) {
|
|
2057
|
+
const Ce = Nt(Q.url_text), Ze = `https://metadata.phila.gov/#home/representationdetails/${Q.representation}/`;
|
|
2040
2058
|
Z[Ce] = Ze;
|
|
2041
2059
|
}
|
|
2042
2060
|
d.value = Z;
|
|
@@ -2053,12 +2071,12 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2053
2071
|
$ ? y.value.add(v) : y.value.delete(v), y.value = new Set(y.value);
|
|
2054
2072
|
}
|
|
2055
2073
|
function Me(v, $) {
|
|
2056
|
-
for (const
|
|
2057
|
-
$ ? y.value.add(
|
|
2074
|
+
for (const K of v)
|
|
2075
|
+
$ ? y.value.add(K) : y.value.delete(K);
|
|
2058
2076
|
y.value = new Set(y.value);
|
|
2059
2077
|
}
|
|
2060
2078
|
function Fe(v, $) {
|
|
2061
|
-
|
|
2079
|
+
m.value = { ...m.value, [v]: $ };
|
|
2062
2080
|
}
|
|
2063
2081
|
function qe(v, $) {
|
|
2064
2082
|
$ ? i.value.add(v) : i.value.delete(v), i.value = new Set(i.value);
|
|
@@ -2067,12 +2085,12 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2067
2085
|
if ($)
|
|
2068
2086
|
g.value = { ...g.value, [v]: $ };
|
|
2069
2087
|
else {
|
|
2070
|
-
const
|
|
2071
|
-
delete
|
|
2088
|
+
const K = { ...g.value };
|
|
2089
|
+
delete K[v], g.value = K;
|
|
2072
2090
|
}
|
|
2073
2091
|
}
|
|
2074
2092
|
function re(v) {
|
|
2075
|
-
|
|
2093
|
+
S.value = v;
|
|
2076
2094
|
}
|
|
2077
2095
|
const Te = x(null), oe = x(null), _e = x(null), Ye = x(null), be = x(null), Ge = x(null), et = x(null), Se = x("sidebar");
|
|
2078
2096
|
function ft() {
|
|
@@ -2121,8 +2139,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2121
2139
|
)
|
|
2122
2140
|
);
|
|
2123
2141
|
if ($.length === 0) return;
|
|
2124
|
-
const
|
|
2125
|
-
v.shiftKey ? document.activeElement ===
|
|
2142
|
+
const K = $[0], Z = $[$.length - 1];
|
|
2143
|
+
v.shiftKey ? document.activeElement === K && (v.preventDefault(), Z.focus()) : document.activeElement === Z && (v.preventDefault(), K.focus());
|
|
2126
2144
|
}
|
|
2127
2145
|
}
|
|
2128
2146
|
function pt(v) {
|
|
@@ -2137,8 +2155,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2137
2155
|
)
|
|
2138
2156
|
);
|
|
2139
2157
|
if ($.length === 0) return;
|
|
2140
|
-
const
|
|
2141
|
-
v.shiftKey ? document.activeElement ===
|
|
2158
|
+
const K = $[0], Z = $[$.length - 1];
|
|
2159
|
+
v.shiftKey ? document.activeElement === K && (v.preventDefault(), Z.focus()) : document.activeElement === Z && (v.preventDefault(), K.focus());
|
|
2142
2160
|
}
|
|
2143
2161
|
}
|
|
2144
2162
|
N("layerboard-open-modal", Ae), N("layerboard-close-modal", le), N("layerboard-is-modal-open", j(ie)), a({
|
|
@@ -2147,7 +2165,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2147
2165
|
/** Set of visible layer IDs */
|
|
2148
2166
|
visibleLayers: y,
|
|
2149
2167
|
/** Layer opacity values */
|
|
2150
|
-
layerOpacities:
|
|
2168
|
+
layerOpacities: m,
|
|
2151
2169
|
/** Set of currently loading layer IDs */
|
|
2152
2170
|
loadingLayers: i,
|
|
2153
2171
|
/** Map of layer errors by ID */
|
|
@@ -2170,7 +2188,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2170
2188
|
/** Set of visible tiled layer IDs */
|
|
2171
2189
|
visibleTiledLayers: L,
|
|
2172
2190
|
/** Tiled layer opacity values */
|
|
2173
|
-
tiledLayerOpacities:
|
|
2191
|
+
tiledLayerOpacities: C,
|
|
2174
2192
|
/** Toggle a tiled layer's visibility */
|
|
2175
2193
|
toggleTiledLayer: F,
|
|
2176
2194
|
/** Set a tiled layer's visibility explicitly */
|
|
@@ -2201,7 +2219,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2201
2219
|
We(), Xe(), E(), document.addEventListener("keydown", ot);
|
|
2202
2220
|
}), eo(() => {
|
|
2203
2221
|
document.removeEventListener("keydown", ot);
|
|
2204
|
-
}), (v, $) => (
|
|
2222
|
+
}), (v, $) => (h(), M("div", ba, [
|
|
2205
2223
|
$[5] || ($[5] = P("a", {
|
|
2206
2224
|
href: "#main-content",
|
|
2207
2225
|
class: "skip-to-main-content-link"
|
|
@@ -2238,11 +2256,11 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2238
2256
|
decorative: ""
|
|
2239
2257
|
}, null, 8, ["icon-definition"])
|
|
2240
2258
|
], 8, wa),
|
|
2241
|
-
|
|
2259
|
+
he(v.$slots, "header", {}, () => [
|
|
2242
2260
|
P("h1", null, G(e.title), 1),
|
|
2243
|
-
e.subtitle ? (
|
|
2261
|
+
e.subtitle ? (h(), M("span", La, G(e.subtitle), 1)) : A("", !0)
|
|
2244
2262
|
], !0),
|
|
2245
|
-
ae.value ? (
|
|
2263
|
+
ae.value ? (h(), M("div", {
|
|
2246
2264
|
key: 0,
|
|
2247
2265
|
ref_key: "mobileMenuRef",
|
|
2248
2266
|
ref: be,
|
|
@@ -2254,7 +2272,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2254
2272
|
onKeydown: Ve
|
|
2255
2273
|
}, [
|
|
2256
2274
|
P("div", Sa, [
|
|
2257
|
-
|
|
2275
|
+
he(v.$slots, "footer", {
|
|
2258
2276
|
openModal: Ae,
|
|
2259
2277
|
closeModal: le,
|
|
2260
2278
|
isModalOpen: ie.value
|
|
@@ -2276,20 +2294,20 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2276
2294
|
}, null, 8, ["icon-definition"])
|
|
2277
2295
|
], 512)
|
|
2278
2296
|
], 36)) : A("", !0),
|
|
2279
|
-
ae.value ? (
|
|
2297
|
+
ae.value ? (h(), M("div", {
|
|
2280
2298
|
key: 1,
|
|
2281
2299
|
class: "layerboard-mobile-menu-backdrop",
|
|
2282
2300
|
onClick: Ee
|
|
2283
2301
|
})) : A("", !0)
|
|
2284
2302
|
], 4),
|
|
2285
2303
|
P("div", Ca, [
|
|
2286
|
-
u.value ? (
|
|
2304
|
+
u.value ? (h(), M("div", ka, [
|
|
2287
2305
|
P("div", {
|
|
2288
2306
|
class: "layerboard-spinner",
|
|
2289
2307
|
style: ye({ borderTopColor: e.themeColor })
|
|
2290
2308
|
}, null, 4),
|
|
2291
2309
|
P("p", null, "Loading " + G(e.title) + "...", 1)
|
|
2292
|
-
])) : w.value ? (
|
|
2310
|
+
])) : w.value ? (h(), M("div", xa, [
|
|
2293
2311
|
$[3] || ($[3] = P("h2", null, "Error Loading Layers", -1)),
|
|
2294
2312
|
P("p", null, G(w.value), 1),
|
|
2295
2313
|
P("button", {
|
|
@@ -2297,7 +2315,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2297
2315
|
style: ye({ backgroundColor: e.themeColor }),
|
|
2298
2316
|
onClick: We
|
|
2299
2317
|
}, " Retry ", 4)
|
|
2300
|
-
])) : (
|
|
2318
|
+
])) : (h(), M(ue, { key: 2 }, [
|
|
2301
2319
|
P("aside", {
|
|
2302
2320
|
id: "main-content",
|
|
2303
2321
|
ref_key: "sidebarRef",
|
|
@@ -2307,10 +2325,10 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2307
2325
|
"aria-label": "Map layers",
|
|
2308
2326
|
tabindex: "-1"
|
|
2309
2327
|
}, [
|
|
2310
|
-
|
|
2328
|
+
he(v.$slots, "sidebar", {
|
|
2311
2329
|
layers: n.value,
|
|
2312
2330
|
visibleLayers: y.value,
|
|
2313
|
-
layerOpacities:
|
|
2331
|
+
layerOpacities: m.value,
|
|
2314
2332
|
loadingLayers: i.value,
|
|
2315
2333
|
layerErrors: g.value,
|
|
2316
2334
|
currentZoom: p.value,
|
|
@@ -2320,7 +2338,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2320
2338
|
setOpacity: Fe,
|
|
2321
2339
|
tiledLayers: e.tiledLayers,
|
|
2322
2340
|
visibleTiledLayers: L.value,
|
|
2323
|
-
tiledLayerOpacities:
|
|
2341
|
+
tiledLayerOpacities: C.value,
|
|
2324
2342
|
toggleTiledLayer: F,
|
|
2325
2343
|
setTiledLayerVisible: V,
|
|
2326
2344
|
setTiledLayerOpacity: T,
|
|
@@ -2329,15 +2347,15 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2329
2347
|
getDataSource: U,
|
|
2330
2348
|
refetchDataSource: de
|
|
2331
2349
|
}, () => [
|
|
2332
|
-
e.showDefaultSidebar ? (
|
|
2350
|
+
e.showDefaultSidebar ? (h(), q(Xo, {
|
|
2333
2351
|
key: 0,
|
|
2334
2352
|
"layer-list": n.value,
|
|
2335
2353
|
"visible-layers": y.value,
|
|
2336
|
-
"layer-opacities":
|
|
2354
|
+
"layer-opacities": m.value,
|
|
2337
2355
|
"loading-layers": i.value,
|
|
2338
2356
|
"layer-errors": g.value,
|
|
2339
2357
|
"current-zoom": p.value,
|
|
2340
|
-
"search-query":
|
|
2358
|
+
"search-query": S.value,
|
|
2341
2359
|
"layer-metadata": d.value,
|
|
2342
2360
|
onToggleLayer: De,
|
|
2343
2361
|
onSetOpacity: Fe,
|
|
@@ -2352,11 +2370,11 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2352
2370
|
}, [
|
|
2353
2371
|
H(uo, {
|
|
2354
2372
|
"visible-layers": y.value,
|
|
2355
|
-
"layer-opacities":
|
|
2373
|
+
"layer-opacities": m.value,
|
|
2356
2374
|
"layer-list": n.value,
|
|
2357
2375
|
"tiled-layers": e.tiledLayers,
|
|
2358
2376
|
"visible-tiled-layers": L.value,
|
|
2359
|
-
"tiled-layer-opacities":
|
|
2377
|
+
"tiled-layer-opacities": C.value,
|
|
2360
2378
|
"cyclomedia-config": e.cyclomediaConfig,
|
|
2361
2379
|
"pictometry-credentials": e.pictometryCredentials,
|
|
2362
2380
|
"basemap-control-position": e.basemapControlPosition,
|
|
@@ -2395,13 +2413,13 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2395
2413
|
style: ye(Ue.value),
|
|
2396
2414
|
onClick: ft
|
|
2397
2415
|
}, [
|
|
2398
|
-
Se.value === "map" ? (
|
|
2416
|
+
Se.value === "map" ? (h(), M("span", Ma, G(e.sidebarLabel), 1)) : (h(), M("span", Pa, G(e.mapLabel), 1))
|
|
2399
2417
|
], 4),
|
|
2400
2418
|
P("footer", {
|
|
2401
2419
|
class: "layerboard-footer",
|
|
2402
2420
|
style: ye(ct.value)
|
|
2403
2421
|
}, [
|
|
2404
|
-
|
|
2422
|
+
he(v.$slots, "footer", {
|
|
2405
2423
|
openModal: Ae,
|
|
2406
2424
|
closeModal: le,
|
|
2407
2425
|
isModalOpen: ie.value
|
|
@@ -2409,7 +2427,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2409
2427
|
$[4] || ($[4] = xe(" City of Philadelphia ", -1))
|
|
2410
2428
|
], !0)
|
|
2411
2429
|
], 4),
|
|
2412
|
-
ie.value ? (
|
|
2430
|
+
ie.value ? (h(), M("div", {
|
|
2413
2431
|
key: 0,
|
|
2414
2432
|
class: "layerboard-modal-backdrop",
|
|
2415
2433
|
onClick: Be,
|
|
@@ -2436,7 +2454,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2436
2454
|
decorative: ""
|
|
2437
2455
|
}, null, 8, ["icon-definition"])
|
|
2438
2456
|
], 512),
|
|
2439
|
-
|
|
2457
|
+
he(v.$slots, "modal", { closeModal: le }, void 0, !0)
|
|
2440
2458
|
], 512)
|
|
2441
2459
|
], 32)) : A("", !0),
|
|
2442
2460
|
P("span", Fa, G(Se.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
|
|
@@ -2466,9 +2484,9 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2466
2484
|
function w() {
|
|
2467
2485
|
r.value = !r.value, o("toggle", r.value);
|
|
2468
2486
|
}
|
|
2469
|
-
return (p,
|
|
2487
|
+
return (p, S) => {
|
|
2470
2488
|
const y = to("font-awesome-icon");
|
|
2471
|
-
return
|
|
2489
|
+
return h(), M("div", {
|
|
2472
2490
|
class: ne(["topic-accordion", { "is-expanded": r.value }])
|
|
2473
2491
|
}, [
|
|
2474
2492
|
P("button", {
|
|
@@ -2479,9 +2497,9 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2479
2497
|
"aria-controls": n,
|
|
2480
2498
|
onClick: w
|
|
2481
2499
|
}, [
|
|
2482
|
-
e.icon || p.$slots.icon ? (
|
|
2483
|
-
|
|
2484
|
-
e.icon ? (
|
|
2500
|
+
e.icon || p.$slots.icon ? (h(), M("span", Ea, [
|
|
2501
|
+
he(p.$slots, "icon", {}, () => [
|
|
2502
|
+
e.icon ? (h(), q(y, {
|
|
2485
2503
|
key: 0,
|
|
2486
2504
|
icon: ["fas", e.icon],
|
|
2487
2505
|
"aria-hidden": "true"
|
|
@@ -2491,7 +2509,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2491
2509
|
P("span", Oa, G(e.title), 1),
|
|
2492
2510
|
P("span", {
|
|
2493
2511
|
class: ne(["topic-chevron", { "is-rotated": r.value }])
|
|
2494
|
-
}, [...
|
|
2512
|
+
}, [...S[0] || (S[0] = [
|
|
2495
2513
|
P("svg", {
|
|
2496
2514
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2497
2515
|
width: "20",
|
|
@@ -2514,8 +2532,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2514
2532
|
"aria-labelledby": u,
|
|
2515
2533
|
class: "topic-content"
|
|
2516
2534
|
}, [
|
|
2517
|
-
|
|
2518
|
-
|
|
2535
|
+
he(p.$slots, "default", {}, () => [
|
|
2536
|
+
S[1] || (S[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2519
2537
|
], !0)
|
|
2520
2538
|
], 512), [
|
|
2521
2539
|
[oo, r.value]
|
|
@@ -2557,19 +2575,19 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2557
2575
|
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading: u, getLayerError: w, isLayerAvailableAtZoom: p } = Ct(
|
|
2558
2576
|
() => l
|
|
2559
2577
|
);
|
|
2560
|
-
function
|
|
2578
|
+
function S(y) {
|
|
2561
2579
|
o("toggleLayer", y);
|
|
2562
2580
|
}
|
|
2563
|
-
return (y,
|
|
2581
|
+
return (y, m) => (h(), M("fieldset", {
|
|
2564
2582
|
class: "layer-checkbox-set",
|
|
2565
2583
|
role: "group",
|
|
2566
2584
|
"aria-label": e.groupLabel
|
|
2567
2585
|
}, [
|
|
2568
|
-
(
|
|
2586
|
+
(h(!0), M(ue, null, Le(e.layers, (i) => (h(), M("div", {
|
|
2569
2587
|
key: i.id,
|
|
2570
2588
|
class: "layer-item"
|
|
2571
2589
|
}, [
|
|
2572
|
-
f(Da)(i) ? (
|
|
2590
|
+
f(Da)(i) ? (h(), M("label", {
|
|
2573
2591
|
key: 0,
|
|
2574
2592
|
class: ne(["layer-checkbox", {
|
|
2575
2593
|
"layer-unavailable": !f(p)(i),
|
|
@@ -2580,7 +2598,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2580
2598
|
type: "checkbox",
|
|
2581
2599
|
checked: f(r)(i.id),
|
|
2582
2600
|
disabled: !f(p)(i),
|
|
2583
|
-
onChange: (g) =>
|
|
2601
|
+
onChange: (g) => S(i.id)
|
|
2584
2602
|
}, null, 40, Ra),
|
|
2585
2603
|
P("span", Aa, [
|
|
2586
2604
|
xe(G(f(ze)(i)) + " ", 1),
|
|
@@ -2590,7 +2608,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2590
2608
|
unavailable: !f(p)(i)
|
|
2591
2609
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2592
2610
|
])
|
|
2593
|
-
], 2)) : (
|
|
2611
|
+
], 2)) : (h(), M("div", {
|
|
2594
2612
|
key: 1,
|
|
2595
2613
|
class: ne(["layer-label-only", {
|
|
2596
2614
|
"layer-unavailable": !f(p)(i),
|
|
@@ -2606,20 +2624,20 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2606
2624
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2607
2625
|
])
|
|
2608
2626
|
], 2)),
|
|
2609
|
-
f(jt)(i, e.showOpacity) && f(r)(i.id) && f(p)(i) ? (
|
|
2627
|
+
f(jt)(i, e.showOpacity) && f(r)(i.id) && f(p)(i) ? (h(), q(Lt, {
|
|
2610
2628
|
key: 2,
|
|
2611
2629
|
"layer-id": i.id,
|
|
2612
2630
|
"layer-name": f(ze)(i),
|
|
2613
2631
|
opacity: f(n)(i.id),
|
|
2614
2632
|
"onUpdate:opacity": (g) => o("setOpacity", i.id, g)
|
|
2615
2633
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
2616
|
-
f(qt)(i, e.showLegend) && f(r)(i.id) && f(p)(i) && i.legend?.length ? (
|
|
2634
|
+
f(qt)(i, e.showLegend) && f(r)(i.id) && f(p)(i) && i.legend?.length ? (h(), q(St, {
|
|
2617
2635
|
key: 3,
|
|
2618
2636
|
items: i.legend,
|
|
2619
2637
|
label: "Legend for " + f(ze)(i)
|
|
2620
2638
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
2621
2639
|
]))), 128)),
|
|
2622
|
-
e.layers.length === 0 ? (
|
|
2640
|
+
e.layers.length === 0 ? (h(), M("div", Va, "No layers available")) : A("", !0)
|
|
2623
2641
|
], 8, _a));
|
|
2624
2642
|
}
|
|
2625
2643
|
}), ti = /* @__PURE__ */ $e(Za, [["__scopeId", "data-v-bfcd7855"]]), Na = ["aria-label"], Ua = ["name", "checked", "disabled", "onChange"], Wa = { class: "layer-title" }, ja = {
|
|
@@ -2644,16 +2662,16 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2644
2662
|
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading: u, getLayerError: w, isLayerAvailableAtZoom: p } = Ct(
|
|
2645
2663
|
() => l
|
|
2646
2664
|
);
|
|
2647
|
-
function
|
|
2648
|
-
const
|
|
2649
|
-
o("selectLayer", y,
|
|
2665
|
+
function S(y) {
|
|
2666
|
+
const m = l.layers.filter((i) => l.visibleLayerIds.has(i.id) && i.id !== y).map((i) => i.id);
|
|
2667
|
+
o("selectLayer", y, m);
|
|
2650
2668
|
}
|
|
2651
|
-
return (y,
|
|
2669
|
+
return (y, m) => (h(), M("div", {
|
|
2652
2670
|
class: "layer-radio-set",
|
|
2653
2671
|
role: "radiogroup",
|
|
2654
2672
|
"aria-label": e.groupLabel
|
|
2655
2673
|
}, [
|
|
2656
|
-
(
|
|
2674
|
+
(h(!0), M(ue, null, Le(e.layers, (i) => (h(), M("div", {
|
|
2657
2675
|
key: i.id,
|
|
2658
2676
|
class: "layer-item"
|
|
2659
2677
|
}, [
|
|
@@ -2668,7 +2686,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2668
2686
|
name: e.groupName,
|
|
2669
2687
|
checked: f(r)(i.id),
|
|
2670
2688
|
disabled: !f(p)(i),
|
|
2671
|
-
onChange: (g) =>
|
|
2689
|
+
onChange: (g) => S(i.id)
|
|
2672
2690
|
}, null, 40, Ua),
|
|
2673
2691
|
P("span", Wa, [
|
|
2674
2692
|
xe(G(f(ze)(i)) + " ", 1),
|
|
@@ -2679,37 +2697,37 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2679
2697
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2680
2698
|
])
|
|
2681
2699
|
], 2),
|
|
2682
|
-
f(jt)(i, e.showOpacity) && f(r)(i.id) && f(p)(i) ? (
|
|
2700
|
+
f(jt)(i, e.showOpacity) && f(r)(i.id) && f(p)(i) ? (h(), q(Lt, {
|
|
2683
2701
|
key: 0,
|
|
2684
2702
|
"layer-id": i.id,
|
|
2685
2703
|
"layer-name": f(ze)(i),
|
|
2686
2704
|
opacity: f(n)(i.id),
|
|
2687
2705
|
"onUpdate:opacity": (g) => o("setOpacity", i.id, g)
|
|
2688
2706
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
2689
|
-
f(qt)(i, e.showLegend) && f(r)(i.id) && f(p)(i) && i.legend?.length ? (
|
|
2707
|
+
f(qt)(i, e.showLegend) && f(r)(i.id) && f(p)(i) && i.legend?.length ? (h(), q(St, {
|
|
2690
2708
|
key: 1,
|
|
2691
2709
|
items: i.legend,
|
|
2692
2710
|
label: "Legend for " + f(ze)(i)
|
|
2693
2711
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
2694
2712
|
]))), 128)),
|
|
2695
|
-
e.layers.length === 0 ? (
|
|
2713
|
+
e.layers.length === 0 ? (h(), M("div", ja, "No layers available")) : A("", !0)
|
|
2696
2714
|
], 8, Na));
|
|
2697
2715
|
}
|
|
2698
2716
|
}), oi = /* @__PURE__ */ $e(qa, [["__scopeId", "data-v-c368d815"]]);
|
|
2699
2717
|
function ai(e) {
|
|
2700
|
-
const a = x([]), l = x(/* @__PURE__ */ new Set()), o = x({}), r = x(/* @__PURE__ */ new Set()), n = x({}), u = x(""), w = x(!1), p = x(!1),
|
|
2718
|
+
const a = x([]), l = x(/* @__PURE__ */ new Set()), o = x({}), r = x(/* @__PURE__ */ new Set()), n = x({}), u = x(""), w = x(!1), p = x(!1), S = x(null), y = _(() => {
|
|
2701
2719
|
if (!u.value.trim())
|
|
2702
2720
|
return a.value;
|
|
2703
2721
|
const T = u.value.toLowerCase();
|
|
2704
2722
|
return a.value.filter((O) => O.title.toLowerCase().includes(T));
|
|
2705
|
-
}),
|
|
2723
|
+
}), m = _(() => a.value.map((T) => ({
|
|
2706
2724
|
config: T,
|
|
2707
2725
|
component: T.type
|
|
2708
2726
|
// "circle", "fill", or "line"
|
|
2709
2727
|
})));
|
|
2710
2728
|
async function i() {
|
|
2711
2729
|
if (!p.value) {
|
|
2712
|
-
w.value = !0,
|
|
2730
|
+
w.value = !0, S.value = null;
|
|
2713
2731
|
try {
|
|
2714
2732
|
let T;
|
|
2715
2733
|
e.mode === "dynamic" || !e.mode ? e.webMapId ? T = await g(e.webMapId) : T = await wt() : T = await wt(), a.value = T;
|
|
@@ -2718,7 +2736,7 @@ function ai(e) {
|
|
|
2718
2736
|
O[D.id] = D.opacity ?? 1;
|
|
2719
2737
|
}), o.value = O, p.value = !0;
|
|
2720
2738
|
} catch (T) {
|
|
2721
|
-
|
|
2739
|
+
S.value = T instanceof Error ? T : new Error("Failed to initialize layerboard");
|
|
2722
2740
|
} finally {
|
|
2723
2741
|
w.value = !1;
|
|
2724
2742
|
}
|
|
@@ -2741,7 +2759,7 @@ function ai(e) {
|
|
|
2741
2759
|
[T]: Math.max(0, Math.min(1, O))
|
|
2742
2760
|
};
|
|
2743
2761
|
}
|
|
2744
|
-
function
|
|
2762
|
+
function C(T) {
|
|
2745
2763
|
u.value = T;
|
|
2746
2764
|
}
|
|
2747
2765
|
function E(T, O) {
|
|
@@ -2757,7 +2775,7 @@ function ai(e) {
|
|
|
2757
2775
|
}
|
|
2758
2776
|
}
|
|
2759
2777
|
function V() {
|
|
2760
|
-
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, u.value = "", w.value = !1, p.value = !1,
|
|
2778
|
+
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, u.value = "", w.value = !1, p.value = !1, S.value = null;
|
|
2761
2779
|
}
|
|
2762
2780
|
return {
|
|
2763
2781
|
// State (readonly)
|
|
@@ -2769,17 +2787,17 @@ function ai(e) {
|
|
|
2769
2787
|
searchQuery: j(u),
|
|
2770
2788
|
isLoading: j(w),
|
|
2771
2789
|
isInitialized: j(p),
|
|
2772
|
-
error: j(
|
|
2790
|
+
error: j(S),
|
|
2773
2791
|
// Computed
|
|
2774
2792
|
filteredLayerConfigs: y,
|
|
2775
|
-
layerList:
|
|
2793
|
+
layerList: m,
|
|
2776
2794
|
// Config
|
|
2777
2795
|
config: e,
|
|
2778
2796
|
// Methods
|
|
2779
2797
|
initialize: i,
|
|
2780
2798
|
toggleLayer: d,
|
|
2781
2799
|
setLayerOpacity: L,
|
|
2782
|
-
filterLayers:
|
|
2800
|
+
filterLayers: C,
|
|
2783
2801
|
setLayerLoading: E,
|
|
2784
2802
|
setLayerError: F,
|
|
2785
2803
|
reset: V
|
|
@@ -2805,12 +2823,12 @@ function Ga(e) {
|
|
|
2805
2823
|
const a = x(null), l = x(!1), o = x(null), r = x(0);
|
|
2806
2824
|
async function n(p = {}) {
|
|
2807
2825
|
l.value = !0, o.value = null;
|
|
2808
|
-
const
|
|
2809
|
-
let y = 0,
|
|
2826
|
+
const S = e.pageSize || 2e3;
|
|
2827
|
+
let y = 0, m = [], i = !0;
|
|
2810
2828
|
try {
|
|
2811
2829
|
for (; i; ) {
|
|
2812
2830
|
const d = e.url.replace(/\/$/, ""), L = encodeURIComponent(p.where || e.where || "1=1");
|
|
2813
|
-
let
|
|
2831
|
+
let C = `${d}/query?where=${L}&outFields=*&returnGeometry=true&resultRecordCount=${S}&resultOffset=${y}&f=geojson`;
|
|
2814
2832
|
if (p.bounds) {
|
|
2815
2833
|
const V = JSON.stringify({
|
|
2816
2834
|
xmin: p.bounds.west,
|
|
@@ -2819,19 +2837,19 @@ function Ga(e) {
|
|
|
2819
2837
|
ymax: p.bounds.north,
|
|
2820
2838
|
spatialReference: { wkid: 4326 }
|
|
2821
2839
|
});
|
|
2822
|
-
|
|
2840
|
+
C += `&geometry=${encodeURIComponent(V)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
|
|
2823
2841
|
}
|
|
2824
|
-
const E = await fetch(
|
|
2842
|
+
const E = await fetch(C);
|
|
2825
2843
|
if (!E.ok)
|
|
2826
2844
|
throw new Error(`HTTP ${E.status}: ${E.statusText}`);
|
|
2827
2845
|
const F = await E.json();
|
|
2828
|
-
F.features && F.features.length > 0 ? (
|
|
2846
|
+
F.features && F.features.length > 0 ? (m = m.concat(F.features), y += F.features.length, i = F.features.length === S) : i = !1;
|
|
2829
2847
|
}
|
|
2830
2848
|
const g = {
|
|
2831
2849
|
type: "FeatureCollection",
|
|
2832
|
-
features:
|
|
2850
|
+
features: m
|
|
2833
2851
|
};
|
|
2834
|
-
return a.value = g, r.value =
|
|
2852
|
+
return a.value = g, r.value = m.length, g;
|
|
2835
2853
|
} catch (g) {
|
|
2836
2854
|
const d = g instanceof Error ? g : new Error("Failed to fetch features");
|
|
2837
2855
|
throw o.value = d, d;
|