@phila/layerboard 3.0.0-beta.21 → 3.0.0-beta.23

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