@phila/layerboard 3.0.0-beta.30 → 3.0.0-beta.32

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