@phila/layerboard 3.0.0-beta.0 → 3.0.0-beta.1

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
@@ -6,15 +6,15 @@ function Ue(e, n, o = {}) {
6
6
  return (o.id === 0 || o.id) && (t.id = o.id), o.bbox && (t.bbox = o.bbox), t.properties = n || {}, t.geometry = e, t;
7
7
  }
8
8
  function Bt(e, n, o = {}) {
9
- for (const a of e) {
10
- if (a.length < 4)
9
+ for (const l of e) {
10
+ if (l.length < 4)
11
11
  throw new Error(
12
12
  "Each LinearRing of a Polygon must have 4 or more Positions."
13
13
  );
14
- if (a[a.length - 1].length !== a[0].length)
14
+ if (l[l.length - 1].length !== l[0].length)
15
15
  throw new Error("First and last Position are not equivalent.");
16
- for (let l = 0; l < a[a.length - 1].length; l++)
17
- if (a[a.length - 1][l] !== a[0][l])
16
+ for (let a = 0; a < l[l.length - 1].length; a++)
17
+ if (l[l.length - 1][a] !== l[0][a])
18
18
  throw new Error("First and last Position are not equivalent.");
19
19
  }
20
20
  return Ue({
@@ -46,27 +46,27 @@ function jt(e) {
46
46
  return e.type === "Feature" ? e.geometry : e;
47
47
  }
48
48
  function qt(e, n, o) {
49
- var t = e.length, a = Te(e[0], n), l = [], c, p, d;
49
+ var t = e.length, l = Te(e[0], n), a = [], c, p, d;
50
50
  let S, y;
51
51
  for (o || (o = []), c = 1; c < t; c++) {
52
52
  for (S = e[c - 1], y = e[c], p = d = Te(y, n); ; )
53
- if (a | p) {
54
- if (a & p)
53
+ if (l | p) {
54
+ if (l & p)
55
55
  break;
56
- a ? (S = it(S, y, a, n), a = Te(S, n)) : (y = it(S, y, p, n), p = Te(y, n));
56
+ l ? (S = it(S, y, l, n), l = Te(S, n)) : (y = it(S, y, p, n), p = Te(y, n));
57
57
  } else {
58
- l.push(S), p !== d ? (l.push(y), c < t - 1 && (o.push(l), l = [])) : c === t - 1 && l.push(y);
58
+ a.push(S), p !== d ? (a.push(y), c < t - 1 && (o.push(a), a = [])) : c === t - 1 && a.push(y);
59
59
  break;
60
60
  }
61
- a = d;
61
+ l = d;
62
62
  }
63
- return l.length && o.push(l), o;
63
+ return a.length && o.push(a), o;
64
64
  }
65
65
  function Gt(e, n) {
66
- var o, t, a, l, c, p, d;
66
+ var o, t, l, a, c, p, d;
67
67
  for (t = 1; t <= 8; t *= 2) {
68
- for (o = [], a = e[e.length - 1], l = !(Te(a, n) & t), c = 0; c < e.length; c++)
69
- p = e[c], d = !(Te(p, n) & t), d !== l && o.push(it(a, p, t, n)), d && o.push(p), a = p, l = d;
68
+ for (o = [], l = e[e.length - 1], a = !(Te(l, n) & t), c = 0; c < e.length; c++)
69
+ p = e[c], d = !(Te(p, n) & t), d !== a && o.push(it(l, p, t, n)), d && o.push(p), l = p, a = d;
70
70
  if (e = o, !e.length) break;
71
71
  }
72
72
  return o;
@@ -79,22 +79,22 @@ function Te(e, n) {
79
79
  return e[0] < n[0] ? o |= 1 : e[0] > n[2] && (o |= 2), e[1] < n[1] ? o |= 4 : e[1] > n[3] && (o |= 8), o;
80
80
  }
81
81
  function Ht(e, n) {
82
- const o = jt(e), t = o.type, a = e.type === "Feature" ? e.properties : {};
83
- let l = o.coordinates;
82
+ const o = jt(e), t = o.type, l = e.type === "Feature" ? e.properties : {};
83
+ let a = o.coordinates;
84
84
  switch (t) {
85
85
  case "LineString":
86
86
  case "MultiLineString": {
87
87
  const c = [];
88
- return t === "LineString" && (l = [l]), l.forEach((p) => {
88
+ return t === "LineString" && (a = [a]), a.forEach((p) => {
89
89
  qt(p, n, c);
90
- }), c.length === 1 ? Wt(c[0], a) : Ut(c, a);
90
+ }), c.length === 1 ? Wt(c[0], l) : Ut(c, l);
91
91
  }
92
92
  case "Polygon":
93
- return Bt(mt(l, n), a);
93
+ return Bt(mt(a, n), l);
94
94
  case "MultiPolygon":
95
95
  return Vt(
96
- l.map((c) => mt(c, n)),
97
- a
96
+ a.map((c) => mt(c, n)),
97
+ l
98
98
  );
99
99
  default:
100
100
  throw new Error("geometry " + t + " not supported");
@@ -103,8 +103,8 @@ function Ht(e, n) {
103
103
  function mt(e, n) {
104
104
  const o = [];
105
105
  for (const t of e) {
106
- const a = Gt(t, n);
107
- a.length > 0 && ((a[0][0] !== a[a.length - 1][0] || a[0][1] !== a[a.length - 1][1]) && a.push(a[0]), a.length >= 4 && o.push(a));
106
+ const l = Gt(t, n);
107
+ l.length > 0 && ((l[0][0] !== l[l.length - 1][0] || l[0][1] !== l[l.length - 1][1]) && l.push(l[0]), l.length >= 4 && o.push(l));
108
108
  }
109
109
  return o;
110
110
  }
@@ -132,9 +132,9 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
132
132
  },
133
133
  emits: ["zoom", "layerLoading", "layerError"],
134
134
  setup(e, { emit: n }) {
135
- const o = e, t = n, a = $(null), l = $(null), c = $(0);
135
+ const o = e, t = n, l = $(null), a = $(null), c = $(0);
136
136
  function p(i) {
137
- t("zoom", i), l.value && (c.value = d(l.value));
137
+ t("zoom", i), a.value && (c.value = d(a.value));
138
138
  }
139
139
  function d(i) {
140
140
  const u = i.getZoom(), x = i.getCenter().lat, k = 559082264028e-3, T = x * Math.PI / 180;
@@ -200,7 +200,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
200
200
  y.value = i.bounds, m(i.bounds);
201
201
  }
202
202
  function g(i) {
203
- l.value = i;
203
+ a.value = i;
204
204
  const u = i.getBounds();
205
205
  y.value = {
206
206
  west: u.getWest(),
@@ -398,7 +398,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
398
398
  });
399
399
  }
400
400
  function Pe(i) {
401
- const u = l.value;
401
+ const u = a.value;
402
402
  if (!u) return;
403
403
  const r = [];
404
404
  o.layerList.forEach((G) => {
@@ -449,7 +449,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
449
449
  break;
450
450
  case "ArrowRight":
451
451
  case "ArrowDown":
452
- i.preventDefault(), ae();
452
+ i.preventDefault(), le();
453
453
  break;
454
454
  case "Escape":
455
455
  i.preventDefault(), te();
@@ -461,7 +461,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
461
461
  }), Lt(() => {
462
462
  window.removeEventListener("keydown", be);
463
463
  });
464
- function ae() {
464
+ function le() {
465
465
  const i = oe.value.length;
466
466
  i <= 1 || (J.value = (J.value + 1) % i);
467
467
  }
@@ -472,7 +472,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
472
472
  const b = R(() => oe.value.length === 0 ? null : oe.value[J.value]), P = R(() => {
473
473
  const i = b.value;
474
474
  return !i || !i.popupConfig ? i?.layerTitle || "" : ve(i.popupConfig.title, i.properties);
475
- }), le = R(() => {
475
+ }), ae = R(() => {
476
476
  const i = b.value;
477
477
  if (!i) return "";
478
478
  let u = '<div class="popup-content">';
@@ -620,7 +620,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
620
620
  ge.value = null;
621
621
  return;
622
622
  }
623
- const u = l.value;
623
+ const u = a.value;
624
624
  if (!u || !pe.value) return;
625
625
  const r = [];
626
626
  o.layerList.forEach((O) => {
@@ -652,7 +652,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
652
652
  return (i, u) => (f(), L("div", Qt, [
653
653
  ee(_(Ot), {
654
654
  ref_key: "mapRef",
655
- ref: a,
655
+ ref: l,
656
656
  zoom: o.initialZoom,
657
657
  center: o.initialCenter,
658
658
  "navigation-controls": { position: o.navigationControlPosition },
@@ -753,14 +753,14 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
753
753
  b.value && pe.value ? (f(), X(_(Nt), {
754
754
  key: 1,
755
755
  "lng-lat": pe.value,
756
- html: le.value,
756
+ html: ae.value,
757
757
  "close-on-click": !1,
758
758
  "show-navigation": oe.value.length > 1,
759
759
  "current-feature-index": J.value,
760
760
  "total-features": oe.value.length,
761
761
  "layer-name": b.value.layerTitle,
762
762
  onClose: te,
763
- onNext: ae,
763
+ onNext: le,
764
764
  onPrevious: De
765
765
  }, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) : I("", !0)
766
766
  ]),
@@ -770,8 +770,8 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
770
770
  }
771
771
  }), _e = (e, n) => {
772
772
  const o = e.__vccOpts || e;
773
- for (const [t, a] of n)
774
- o[t] = a;
773
+ for (const [t, l] of n)
774
+ o[t] = l;
775
775
  return o;
776
776
  }, Xt = /* @__PURE__ */ _e(Kt, [["__scopeId", "data-v-38b78874"]]), Yt = ["disabled"], eo = /* @__PURE__ */ we({
777
777
  inheritAttrs: !1,
@@ -802,7 +802,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
802
802
  n.iconOnly && "icon-button",
803
803
  n.iconOnly && n.variant === "standard" && "icon-button--standard",
804
804
  n.className
805
- )), a = R(() => o(n) ? "to" in n && n.to !== void 0 ? {
805
+ )), l = R(() => o(n) ? "to" in n && n.to !== void 0 ? {
806
806
  to: n.to,
807
807
  disabled: n.disabled,
808
808
  className: t.value
@@ -812,7 +812,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
812
812
  rel: n.rel,
813
813
  disabled: n.disabled,
814
814
  className: t.value
815
- } : {}), l = R(
815
+ } : {}), a = R(
816
816
  () => ({
817
817
  iconDefinition: n.iconDefinition,
818
818
  iconClass: n.iconClass,
@@ -823,9 +823,9 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
823
823
  size: n.size
824
824
  })
825
825
  );
826
- return (c, p) => o(n) ? (f(), X(_(Zt), ot({ key: 0 }, { ...a.value, ...c.$attrs }, { role: "button" }), {
826
+ return (c, p) => o(n) ? (f(), X(_(Zt), ot({ key: 0 }, { ...l.value, ...c.$attrs }, { role: "button" }), {
827
827
  default: Ne(() => [
828
- ee(_(gt), dt(ft(l.value)), {
828
+ ee(_(gt), dt(ft(a.value)), {
829
829
  default: Ne(() => [
830
830
  se(c.$slots, "default", {}, () => [
831
831
  he(j(n.text), 1)
@@ -841,7 +841,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
841
841
  disabled: n.disabled,
842
842
  class: t.value
843
843
  }, c.$attrs), [
844
- ee(_(gt), dt(ft(l.value)), {
844
+ ee(_(gt), dt(ft(a.value)), {
845
845
  default: Ne(() => [
846
846
  se(c.$slots, "default", {}, () => [
847
847
  he(j(n.text), 1)
@@ -861,7 +861,7 @@ var to = {
861
861
  iconName: "xmark",
862
862
  icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
863
863
  }, io = no;
864
- const ao = ["for"], lo = { class: "state-layer" }, ro = { class: "content" }, so = { class: "input-text-container" }, co = ["id", "placeholder"], uo = {
864
+ const lo = ["for"], ao = { class: "state-layer" }, ro = { class: "content" }, so = { class: "input-text-container" }, co = ["id", "placeholder"], uo = {
865
865
  key: 1,
866
866
  class: "has-text-body-small phila-supporting-text"
867
867
  }, fo = {
@@ -883,9 +883,9 @@ const ao = ["for"], lo = { class: "state-layer" }, ro = { class: "content" }, so
883
883
  } }
884
884
  },
885
885
  setup(e, { emit: n }) {
886
- const o = Ft(), t = e, a = R(() => typeof t.error == "string" ? t.error : t.error[0]), l = Mt(t, "id"), c = R(() => {
886
+ const o = Ft(), t = e, l = R(() => typeof t.error == "string" ? t.error : t.error[0]), a = Mt(t, "id"), c = R(() => {
887
887
  const S = ["default-class"];
888
- return o.disabled != null && S.push("phila-input--disabled"), a.value && S.push("phila-input--error"), o.required != null && S.push("phila-input--required"), nt(...S);
888
+ return o.disabled != null && S.push("phila-input--disabled"), l.value && S.push("phila-input--error"), o.required != null && S.push("phila-input--required"), nt(...S);
889
889
  }), p = $(""), d = R(() => {
890
890
  const S = [];
891
891
  return p.value !== "" && S.push("phila-text-field--filled"), t.className && S.push(t.className), nt(...S);
@@ -895,13 +895,13 @@ const ao = ["for"], lo = { class: "state-layer" }, ro = { class: "content" }, so
895
895
  }, [
896
896
  t.label ? (f(), L("label", {
897
897
  key: 0,
898
- for: l.value,
898
+ for: a.value,
899
899
  class: "has-text-label-small phila-label"
900
- }, j(t.label), 9, ao)) : I("", !0),
900
+ }, j(t.label), 9, lo)) : I("", !0),
901
901
  F("div", {
902
902
  class: ne(["phila-text-field", d.value])
903
903
  }, [
904
- F("div", lo, [
904
+ F("div", ao, [
905
905
  t.leadingIcon ? (f(), X(_(me), {
906
906
  key: 0,
907
907
  "icon-class": t.leadingIcon,
@@ -910,7 +910,7 @@ const ao = ["for"], lo = { class: "state-layer" }, ro = { class: "content" }, so
910
910
  F("div", ro, [
911
911
  F("div", so, [
912
912
  St(F("input", ot({
913
- id: l.value,
913
+ id: a.value,
914
914
  "onUpdate:modelValue": y[0] || (y[0] = (h) => p.value = h),
915
915
  class: "phila-text-field-input has-text-body-default",
916
916
  placeholder: t.placeholder
@@ -935,13 +935,13 @@ const ao = ["for"], lo = { class: "state-layer" }, ro = { class: "content" }, so
935
935
  ])
936
936
  ], 2),
937
937
  t.supportingText ? (f(), L("div", uo, j(t.supportingText), 1)) : I("", !0),
938
- a.value ? (f(), L("div", fo, [
938
+ l.value ? (f(), L("div", fo, [
939
939
  ee(_(me), {
940
940
  "icon-definition": _(oo),
941
941
  size: "small",
942
942
  inline: ""
943
943
  }, null, 8, ["icon-definition"]),
944
- he(" " + j(a.value), 1)
944
+ he(" " + j(l.value), 1)
945
945
  ])) : I("", !0)
946
946
  ], 2));
947
947
  }
@@ -1010,7 +1010,7 @@ const vo = { class: "layer-panel" }, bo = {
1010
1010
  },
1011
1011
  emits: ["toggleLayer", "setOpacity", "updateSearch"],
1012
1012
  setup(e, { emit: n }) {
1013
- const o = e, t = n, a = R(() => {
1013
+ const o = e, t = n, l = R(() => {
1014
1014
  if (!o.searchQuery.trim())
1015
1015
  return o.layerList;
1016
1016
  const C = o.searchQuery.toLowerCase();
@@ -1018,12 +1018,12 @@ const vo = { class: "layer-panel" }, bo = {
1018
1018
  (g) => g.config.title.toLowerCase().includes(C)
1019
1019
  );
1020
1020
  });
1021
- function l(C) {
1021
+ function a(C) {
1022
1022
  let g = C.split("?")[0] || C;
1023
1023
  return g = g.replace(/\/query$/, ""), g = g.replace(/\/$/, ""), g.toLowerCase();
1024
1024
  }
1025
1025
  function c(C) {
1026
- const g = l(C);
1026
+ const g = a(C);
1027
1027
  return o.layerMetadata[g] || null;
1028
1028
  }
1029
1029
  const p = R(() => o.layerList.some((C) => c(C.config.url)));
@@ -1071,7 +1071,7 @@ const vo = { class: "layer-panel" }, bo = {
1071
1071
  key: 2,
1072
1072
  class: ne(["layer-list", { "has-metadata": p.value }])
1073
1073
  }, [
1074
- (f(!0), L(ie, null, re(a.value, (w) => (f(), L("div", {
1074
+ (f(!0), L(ie, null, re(l.value, (w) => (f(), L("div", {
1075
1075
  key: w.config.id,
1076
1076
  class: "layer-item"
1077
1077
  }, [
@@ -1154,15 +1154,15 @@ const vo = { class: "layer-panel" }, bo = {
1154
1154
  ]))), 128))
1155
1155
  ])) : I("", !0)
1156
1156
  ]))), 128)),
1157
- a.value.length === 0 ? (f(), L("div", Io, ' No layers match "' + j(e.searchQuery) + '" ', 1)) : I("", !0)
1157
+ l.value.length === 0 ? (f(), L("div", Io, ' No layers match "' + j(e.searchQuery) + '" ', 1)) : I("", !0)
1158
1158
  ], 2))
1159
1159
  ]));
1160
1160
  }
1161
1161
  }), Ro = /* @__PURE__ */ _e(Oo, [["__scopeId", "data-v-82d84fbe"]]);
1162
1162
  function D(e) {
1163
1163
  if (!e || !Array.isArray(e) || e.length < 3) return "#888888";
1164
- const n = e[0], o = e[1], t = e[2], l = (e[3] ?? 255) / 255;
1165
- return l === 1 ? `#${n.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}${t.toString(16).padStart(2, "0")}` : `rgba(${n}, ${o}, ${t}, ${l.toFixed(2)})`;
1164
+ const n = e[0], o = e[1], t = e[2], a = (e[3] ?? 255) / 255;
1165
+ return a === 1 ? `#${n.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}${t.toString(16).padStart(2, "0")}` : `rgba(${n}, ${o}, ${t}, ${a.toFixed(2)})`;
1166
1166
  }
1167
1167
  function ue(e) {
1168
1168
  return e !== void 0 ? e : 1;
@@ -1207,10 +1207,10 @@ function tt(e) {
1207
1207
  return String(e);
1208
1208
  }
1209
1209
  function Ct(e, n, o) {
1210
- const t = e.symbol, a = Ve(t);
1211
- console.log("[Transformer] convertSimpleRenderer - geomType:", a, "symbol:", t);
1212
- let l = {}, c = [], p = null;
1213
- if (a === "fill" && t) {
1210
+ const t = e.symbol, l = Ve(t);
1211
+ console.log("[Transformer] convertSimpleRenderer - geomType:", l, "symbol:", t);
1212
+ let a = {}, c = [], p = null;
1213
+ if (l === "fill" && t) {
1214
1214
  const d = t.color === null ? 0 : t.color?.[3] ?? 255, S = d === 0 ? "rgba(0, 0, 0, 0)" : D(t.color), y = d === 0 ? 0 : d < 255 ? 1 : ue(n);
1215
1215
  if (console.log(`[Transformer] Fill layer opacity calculation for "${o}":`, {
1216
1216
  symbolColor: t.color,
@@ -1218,7 +1218,7 @@ function Ct(e, n, o) {
1218
1218
  layerOpacity: n,
1219
1219
  fillOpacity: y,
1220
1220
  fillColor: S
1221
- }), l = {
1221
+ }), a = {
1222
1222
  "fill-color": S,
1223
1223
  "fill-opacity": y
1224
1224
  }, Fe(t.outline)) {
@@ -1228,7 +1228,7 @@ function Ct(e, n, o) {
1228
1228
  outlineWidth: h,
1229
1229
  outlineColor: s,
1230
1230
  willCreateOutlinePaint: h > 1 || d === 0
1231
- }), d !== 0 && (l["fill-outline-color"] = s), (h > 1 || d === 0) && (p = {
1231
+ }), d !== 0 && (a["fill-outline-color"] = s), (h > 1 || d === 0) && (p = {
1232
1232
  "line-color": s,
1233
1233
  "line-width": h
1234
1234
  }, console.log("[Transformer] Created outlinePaint:", p));
@@ -1239,8 +1239,8 @@ function Ct(e, n, o) {
1239
1239
  color: D(t.color),
1240
1240
  label: e.label || "Feature"
1241
1241
  }];
1242
- } else if (a === "line" && t)
1243
- l = {
1242
+ } else if (l === "line" && t)
1243
+ a = {
1244
1244
  "line-color": D(t.color),
1245
1245
  "line-width": t.width || 1,
1246
1246
  "line-opacity": ue(n)
@@ -1250,29 +1250,29 @@ function Ct(e, n, o) {
1250
1250
  width: t.width || 1,
1251
1251
  label: e.label || "Feature"
1252
1252
  }];
1253
- else if (a === "circle" && t) {
1253
+ else if (l === "circle" && t) {
1254
1254
  const d = Math.round((t.size || 6) * 0.71 * 100) / 100;
1255
- l = {
1255
+ a = {
1256
1256
  "circle-color": D(t.color),
1257
1257
  "circle-radius": d,
1258
1258
  "circle-opacity": ue(n)
1259
- }, Fe(t.outline) && (l["circle-stroke-color"] = D(t.outline.color), l["circle-stroke-width"] = t.outline.width || 1), c = [{
1259
+ }, Fe(t.outline) && (a["circle-stroke-color"] = D(t.outline.color), a["circle-stroke-width"] = t.outline.width || 1), c = [{
1260
1260
  type: "circle",
1261
1261
  color: D(t.color),
1262
1262
  label: e.label || "Feature"
1263
1263
  }];
1264
1264
  }
1265
- return { paint: l, legend: c, geomType: a, outlinePaint: p };
1265
+ return { paint: a, legend: c, geomType: l, outlinePaint: p };
1266
1266
  }
1267
1267
  function No(e, n, o) {
1268
- const t = e.field1, a = e.uniqueValueInfos || [], l = e.defaultSymbol;
1269
- if (a.length === 0)
1270
- return Ct({ ...e, symbol: l }, n);
1271
- const c = a[0]?.symbol || l, p = Ve(c);
1268
+ const t = e.field1, l = e.uniqueValueInfos || [], a = e.defaultSymbol;
1269
+ if (l.length === 0)
1270
+ return Ct({ ...e, symbol: a }, n);
1271
+ const c = l[0]?.symbol || a, p = Ve(c);
1272
1272
  let d = {}, S = [], y = null;
1273
1273
  if (p === "fill") {
1274
1274
  const h = ["match", ["to-string", ["get", t]]];
1275
- for (const s of a) {
1275
+ for (const s of l) {
1276
1276
  h.push(tt(s.value)), h.push(D(s.symbol?.color));
1277
1277
  const v = String(s.value), m = o?.get(v) || s.label || v;
1278
1278
  S.push({
@@ -1281,7 +1281,7 @@ function No(e, n, o) {
1281
1281
  label: m
1282
1282
  });
1283
1283
  }
1284
- if (h.push(l ? D(l.color) : "#888888"), d = {
1284
+ if (h.push(a ? D(a.color) : "#888888"), d = {
1285
1285
  "fill-color": h,
1286
1286
  "fill-opacity": ue(n)
1287
1287
  }, Fe(c?.outline)) {
@@ -1293,7 +1293,7 @@ function No(e, n, o) {
1293
1293
  }
1294
1294
  } else if (p === "line") {
1295
1295
  const h = ["match", ["to-string", ["get", t]]];
1296
- for (const s of a) {
1296
+ for (const s of l) {
1297
1297
  h.push(tt(s.value)), h.push(D(s.symbol?.color));
1298
1298
  const v = String(s.value), m = o?.get(v) || s.label || v;
1299
1299
  S.push({
@@ -1303,14 +1303,14 @@ function No(e, n, o) {
1303
1303
  label: m
1304
1304
  });
1305
1305
  }
1306
- h.push(l ? D(l.color) : "#888888"), d = {
1306
+ h.push(a ? D(a.color) : "#888888"), d = {
1307
1307
  "line-color": h,
1308
1308
  "line-width": c?.width || 2,
1309
1309
  "line-opacity": ue(n)
1310
1310
  };
1311
1311
  } else if (p === "circle") {
1312
1312
  const h = ["match", ["to-string", ["get", t]]];
1313
- for (const v of a) {
1313
+ for (const v of l) {
1314
1314
  h.push(tt(v.value)), h.push(D(v.symbol?.color));
1315
1315
  const E = String(v.value), C = o?.get(E) || v.label || E;
1316
1316
  S.push({
@@ -1319,7 +1319,7 @@ function No(e, n, o) {
1319
1319
  label: C
1320
1320
  });
1321
1321
  }
1322
- h.push(l ? D(l.color) : "#888888");
1322
+ h.push(a ? D(a.color) : "#888888");
1323
1323
  const s = Math.round((c?.size || 6) * 0.71 * 100) / 100;
1324
1324
  d = {
1325
1325
  "circle-color": h,
@@ -1330,12 +1330,12 @@ function No(e, n, o) {
1330
1330
  return { paint: d, legend: S, geomType: p, outlinePaint: y };
1331
1331
  }
1332
1332
  function Zo(e, n) {
1333
- const o = e.field, t = e.classBreakInfos || [], a = e.visualVariables?.find((y) => y.type === "colorInfo");
1334
- if (a?.stops && a.stops.length > 0)
1335
- return Bo(a, o, e, n);
1333
+ const o = e.field, t = e.classBreakInfos || [], l = e.visualVariables?.find((y) => y.type === "colorInfo");
1334
+ if (l?.stops && l.stops.length > 0)
1335
+ return Bo(l, o, e, n);
1336
1336
  if (t.length === 0)
1337
1337
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1338
- const l = t[0]?.symbol, c = Ve(l);
1338
+ const a = t[0]?.symbol, c = Ve(a);
1339
1339
  let p = {}, d = [], S = null;
1340
1340
  if (c === "fill") {
1341
1341
  const y = ["step", ["get", o]];
@@ -1351,8 +1351,8 @@ function Zo(e, n) {
1351
1351
  if (p = {
1352
1352
  "fill-color": y,
1353
1353
  "fill-opacity": ue(n)
1354
- }, Fe(l?.outline)) {
1355
- const h = l.outline.width || 1, s = D(l.outline.color);
1354
+ }, Fe(a?.outline)) {
1355
+ const h = a.outline.width || 1, s = D(a.outline.color);
1356
1356
  p["fill-outline-color"] = s, h > 1 && (S = {
1357
1357
  "line-color": s,
1358
1358
  "line-width": h
@@ -1367,11 +1367,11 @@ function Zo(e, n) {
1367
1367
  v > 0 && (y.push(t[v - 1].classMaxValue), y.push(D(E.symbol?.color))), d.push({
1368
1368
  type: "line",
1369
1369
  color: D(E.symbol?.color),
1370
- width: E.symbol?.width || l?.width || 2,
1370
+ width: E.symbol?.width || a?.width || 2,
1371
1371
  label: E.label || `${h} - ${E.classMaxValue}`
1372
1372
  }), h = E.classMaxValue + 1;
1373
1373
  }
1374
- const s = l?.width || 2;
1374
+ const s = a?.width || 2;
1375
1375
  p = {
1376
1376
  "line-color": y,
1377
1377
  "line-width": s,
@@ -1381,14 +1381,14 @@ function Zo(e, n) {
1381
1381
  return { paint: p, legend: d, geomType: c, outlinePaint: S };
1382
1382
  }
1383
1383
  function Bo(e, n, o, t) {
1384
- const a = e.stops || [];
1385
- if (a.length === 0)
1384
+ const l = e.stops || [];
1385
+ if (l.length === 0)
1386
1386
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1387
- const l = o.classBreakInfos?.[0]?.symbol || o.defaultSymbol, c = Ve(l);
1387
+ const a = o.classBreakInfos?.[0]?.symbol || o.defaultSymbol, c = Ve(a);
1388
1388
  let p = {}, d = [], S = null;
1389
1389
  if (c === "fill") {
1390
1390
  const y = ["interpolate", ["linear"], ["get", n]];
1391
- for (const s of a)
1391
+ for (const s of l)
1392
1392
  y.push(s.value), y.push(D(s.color)), d.push({
1393
1393
  type: "fill",
1394
1394
  color: D(s.color),
@@ -1404,8 +1404,8 @@ function Bo(e, n, o, t) {
1404
1404
  // Otherwise use the interpolated color
1405
1405
  ],
1406
1406
  "fill-opacity": ue(t)
1407
- }, Fe(l?.outline)) {
1408
- const s = l.outline.width || 1, v = D(l.outline.color);
1407
+ }, Fe(a?.outline)) {
1408
+ const s = a.outline.width || 1, v = D(a.outline.color);
1409
1409
  p["fill-outline-color"] = v, s > 1 && (S = {
1410
1410
  "line-color": v,
1411
1411
  "line-width": s
@@ -1417,26 +1417,26 @@ function Bo(e, n, o, t) {
1417
1417
  function Wo(e, n, o, t) {
1418
1418
  if (!e?.renderer)
1419
1419
  return console.warn("[Transformer] No renderer found in drawingInfo - layer will use service default (not available in WebMap)"), { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1420
- const a = e.renderer;
1421
- switch (a.type) {
1420
+ const l = e.renderer;
1421
+ switch (l.type) {
1422
1422
  case "simple":
1423
- return Ct(a, n, t);
1423
+ return Ct(l, n, t);
1424
1424
  case "uniqueValue":
1425
- return No(a, n, o);
1425
+ return No(l, n, o);
1426
1426
  case "classBreaks":
1427
- return Zo(a, n);
1427
+ return Zo(l, n);
1428
1428
  default:
1429
- return console.warn(`Unknown renderer type: ${a.type}`), { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1429
+ return console.warn(`Unknown renderer type: ${l.type}`), { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1430
1430
  }
1431
1431
  }
1432
1432
  function Uo(e) {
1433
1433
  if (!e) return null;
1434
- const n = e.title || "", t = (e.fieldInfos || []).filter((a) => a.visible === !0).map((a) => {
1435
- const l = {
1436
- field: a.fieldName,
1437
- label: a.label || a.fieldName
1434
+ const n = e.title || "", t = (e.fieldInfos || []).filter((l) => l.visible === !0).map((l) => {
1435
+ const a = {
1436
+ field: l.fieldName,
1437
+ label: l.label || l.fieldName
1438
1438
  };
1439
- return a.format && (l.format = {}, a.format.dateFormat && (l.format.dateFormat = a.format.dateFormat), a.format.digitSeparator !== void 0 && (l.format.digitSeparator = a.format.digitSeparator), a.format.places !== void 0 && (l.format.places = a.format.places), Object.keys(l.format).length === 0 && delete l.format), l;
1439
+ return l.format && (a.format = {}, l.format.dateFormat && (a.format.dateFormat = l.format.dateFormat), l.format.digitSeparator !== void 0 && (a.format.digitSeparator = l.format.digitSeparator), l.format.places !== void 0 && (a.format.places = l.format.places), Object.keys(a.format).length === 0 && delete a.format), a;
1440
1440
  });
1441
1441
  return {
1442
1442
  title: n,
@@ -1458,10 +1458,10 @@ function Go(e) {
1458
1458
  return n;
1459
1459
  const o = e.split(`
1460
1460
  `), t = /^(\d{1,3})\s+(.+)$/;
1461
- for (const a of o) {
1462
- const l = a.trim().match(t);
1463
- if (l) {
1464
- const [, c, p] = l;
1461
+ for (const l of o) {
1462
+ const a = l.trim().match(t);
1463
+ if (a) {
1464
+ const [, c, p] = a;
1465
1465
  c && p && n.set(c, p.trim());
1466
1466
  }
1467
1467
  }
@@ -1485,60 +1485,60 @@ async function Ho(e) {
1485
1485
  async function kt(e) {
1486
1486
  const n = e.operationalLayers || [], o = [], t = ["Zoning and Planning_Land Use"];
1487
1487
  console.log("🔄 [Transformer] ===== STARTING FRESH TRANSFORMATION ====="), console.log("[Transformer] Starting transformation of", n.length, "layers");
1488
- for (const a of n) {
1489
- if (!a.url) {
1490
- console.log(`Skipping layer without URL: ${a.title}`);
1488
+ for (const l of n) {
1489
+ if (!l.url) {
1490
+ console.log(`Skipping layer without URL: ${l.title}`);
1491
1491
  continue;
1492
1492
  }
1493
- if (a.itemId === "4f39b829b96d437da9231727d9c91fab") {
1494
- console.log(`Skipping layer with under-construction itemId: ${a.title}`);
1493
+ if (l.itemId === "4f39b829b96d437da9231727d9c91fab") {
1494
+ console.log(`Skipping layer with under-construction itemId: ${l.title}`);
1495
1495
  continue;
1496
1496
  }
1497
- console.log("[Transformer] Processing layer:", a.title), console.log(`[Transformer] Layer "${a.title}" - Renderer type:`, a.layerDefinition?.drawingInfo?.renderer?.type);
1497
+ console.log("[Transformer] Processing layer:", l.title), console.log(`[Transformer] Layer "${l.title}" - Renderer type:`, l.layerDefinition?.drawingInfo?.renderer?.type);
1498
1498
  try {
1499
- let l = a.layerDefinition?.drawingInfo, c;
1500
- const p = !l || !l.renderer, d = t.includes(a.title);
1501
- if ((p || d) && a.url) {
1502
- console.log(d ? `[Transformer] Layer "${a.title}" configured to use service renderer instead of WebMap renderer` : `[Transformer] Layer "${a.title}" has no renderer in WebMap, fetching from service...`);
1503
- const M = await Ho(a.url);
1504
- M ? (l = M.drawingInfo, console.log(`[Transformer] Fetched renderer from service for "${a.title}":`, M.drawingInfo?.renderer?.type), M.description && (c = Go(M.description), c.size > 0 && console.log(`[Transformer] Parsed ${c.size} custom labels from service description`))) : console.warn(`[Transformer] Failed to fetch renderer from service for "${a.title}"`);
1499
+ let a = l.layerDefinition?.drawingInfo, c;
1500
+ const p = !a || !a.renderer, d = t.includes(l.title);
1501
+ if ((p || d) && l.url) {
1502
+ console.log(d ? `[Transformer] Layer "${l.title}" configured to use service renderer instead of WebMap renderer` : `[Transformer] Layer "${l.title}" has no renderer in WebMap, fetching from service...`);
1503
+ const M = await Ho(l.url);
1504
+ M ? (a = M.drawingInfo, console.log(`[Transformer] Fetched renderer from service for "${l.title}":`, M.drawingInfo?.renderer?.type), M.description && (c = Go(M.description), c.size > 0 && console.log(`[Transformer] Parsed ${c.size} custom labels from service description`))) : console.warn(`[Transformer] Failed to fetch renderer from service for "${l.title}"`);
1505
1505
  }
1506
1506
  const { paint: S, legend: y, geomType: h, outlinePaint: s } = Wo(
1507
- l,
1508
- a.opacity,
1507
+ a,
1508
+ l.opacity,
1509
1509
  c,
1510
- a.title
1510
+ l.title
1511
1511
  );
1512
- console.log(`[Transformer] Layer "${a.title}" - Result: geomType=${h}, hasOutlinePaint=${!!s}`);
1513
- const v = Uo(a.popupInfo), E = Vo(a.layerDefinition), m = Ao(
1514
- a.layerDefinition?.minScale,
1515
- a.layerDefinition?.maxScale
1516
- ), C = jo(a.title), g = qo(a.title);
1517
- let w = a.opacity ?? 1;
1512
+ console.log(`[Transformer] Layer "${l.title}" - Result: geomType=${h}, hasOutlinePaint=${!!s}`);
1513
+ const v = Uo(l.popupInfo), E = Vo(l.layerDefinition), m = Ao(
1514
+ l.layerDefinition?.minScale,
1515
+ l.layerDefinition?.maxScale
1516
+ ), C = jo(l.title), g = qo(l.title);
1517
+ let w = l.opacity ?? 1;
1518
1518
  const z = {
1519
1519
  id: C,
1520
1520
  title: g,
1521
1521
  type: h,
1522
- url: a.url,
1522
+ url: l.url,
1523
1523
  opacity: w,
1524
1524
  paint: S,
1525
1525
  legend: y,
1526
1526
  popup: v
1527
1527
  };
1528
1528
  E && (z.where = E), m.minZoom !== void 0 && (z.minZoom = m.minZoom), m.maxZoom !== void 0 && (z.maxZoom = m.maxZoom), s && (z.outlinePaint = s), o.push(z);
1529
- } catch (l) {
1530
- console.error(`Error transforming layer ${a.title}:`, l);
1529
+ } catch (a) {
1530
+ console.error(`Error transforming layer ${l.title}:`, a);
1531
1531
  }
1532
1532
  }
1533
- return o.sort((a, l) => a.title.localeCompare(l.title)), o;
1533
+ return o.sort((l, a) => l.title.localeCompare(a.title)), o;
1534
1534
  }
1535
- const bt = {}, lt = "376af635c84643cd816a8c5d017a53aa", Dn = lt;
1535
+ const bt = {}, at = "376af635c84643cd816a8c5d017a53aa", Dn = at;
1536
1536
  function Be(e, n) {
1537
1537
  let o = `https://www.arcgis.com/sharing/rest/content/items/${e}/data?f=json`;
1538
1538
  return n && (o += `&token=${n}`), o;
1539
1539
  }
1540
1540
  function An() {
1541
- return Be(lt);
1541
+ return Be(at);
1542
1542
  }
1543
1543
  const We = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map();
1544
1544
  function Jo(e) {
@@ -1583,10 +1583,10 @@ async function Ko(e, n) {
1583
1583
  const t = await fetch(o);
1584
1584
  if (!t.ok)
1585
1585
  throw new Error(`Failed to fetch WebMap: ${t.status} ${t.statusText}`);
1586
- const a = await t.json();
1587
- if (a.error)
1588
- throw new Error(`ArcGIS error: ${a.error.message || a.error.code || "Unknown error"}`);
1589
- return a;
1586
+ const l = await t.json();
1587
+ if (l.error)
1588
+ throw new Error(`ArcGIS error: ${l.error.message || l.error.code || "Unknown error"}`);
1589
+ return l;
1590
1590
  }
1591
1591
  async function Xo(e) {
1592
1592
  try {
@@ -1599,7 +1599,7 @@ async function Xo(e) {
1599
1599
  throw console.error("[LayerConfigService] Error loading dynamic configs:", n), new Error(`Failed to load dynamic layer configs: ${n instanceof Error ? n.message : "Unknown error"}`);
1600
1600
  }
1601
1601
  }
1602
- async function at(e = lt) {
1602
+ async function lt(e = at) {
1603
1603
  const n = We.get(e);
1604
1604
  if (n)
1605
1605
  return console.log(`[LayerConfigService] ⚠️ Returning CACHED configs for ${e} (transformer will NOT run)`), console.log("[LayerConfigService] To force refresh, call clearCache() or reload with Ctrl+Shift+R"), n;
@@ -1609,8 +1609,8 @@ async function at(e = lt) {
1609
1609
  console.log(`[LayerConfigService] Mode: dynamic, WebMap: ${e}`);
1610
1610
  const t = (async () => {
1611
1611
  try {
1612
- const a = await Xo(e);
1613
- return We.set(e, a), a;
1612
+ const l = await Xo(e);
1613
+ return We.set(e, l), l;
1614
1614
  } finally {
1615
1615
  ze.delete(e);
1616
1616
  }
@@ -1684,10 +1684,10 @@ function Yo(e) {
1684
1684
  };
1685
1685
  }
1686
1686
  }
1687
- async function a() {
1687
+ async function l() {
1688
1688
  await Promise.all(e.map((s) => t(s)));
1689
1689
  }
1690
- async function l(s) {
1690
+ async function a(s) {
1691
1691
  const v = e.find((E) => E.id === s);
1692
1692
  v ? await t(v) : console.warn(`Data source "${s}" not found`);
1693
1693
  }
@@ -1716,7 +1716,7 @@ function Yo(e) {
1716
1716
  o.clear();
1717
1717
  }
1718
1718
  return Ze(() => {
1719
- a(), y();
1719
+ l(), y();
1720
1720
  }), Lt(() => {
1721
1721
  h();
1722
1722
  }), {
@@ -1725,9 +1725,9 @@ function Yo(e) {
1725
1725
  /** Whether any data source is currently loading */
1726
1726
  isLoading: p,
1727
1727
  /** Fetch all data sources */
1728
- fetchAll: a,
1728
+ fetchAll: l,
1729
1729
  /** Refetch a specific data source by id */
1730
- refetch: l,
1730
+ refetch: a,
1731
1731
  /** Get data for a specific source */
1732
1732
  getData: c,
1733
1733
  /** Check if a specific source is loading */
@@ -1741,10 +1741,10 @@ function Yo(e) {
1741
1741
  const en = { class: "layerboard-layout" }, tn = {
1742
1742
  key: 0,
1743
1743
  class: "layerboard-subtitle"
1744
- }, on = { class: "layerboard-mobile-menu-content" }, nn = { class: "layerboard-main" }, an = {
1744
+ }, on = { class: "layerboard-mobile-menu-content" }, nn = { class: "layerboard-main" }, ln = {
1745
1745
  key: 0,
1746
1746
  class: "layerboard-loading"
1747
- }, ln = {
1747
+ }, an = {
1748
1748
  key: 1,
1749
1749
  class: "layerboard-error"
1750
1750
  }, rn = { key: 0 }, sn = { key: 1 }, cn = { class: "layerboard-modal" }, un = /* @__PURE__ */ we({
@@ -1776,7 +1776,7 @@ const en = { class: "layerboard-layout" }, tn = {
1776
1776
  },
1777
1777
  emits: ["configs-loaded", "load-error", "zoom"],
1778
1778
  setup(e, { expose: n, emit: o }) {
1779
- const t = e, a = o, l = $([]), c = $(!0), p = $(null), d = $(12), S = $(""), y = $(/* @__PURE__ */ new Set()), h = $({}), s = $(/* @__PURE__ */ new Set()), v = $({}), E = $({}), m = $(/* @__PURE__ */ new Set()), C = $({});
1779
+ const t = e, l = o, a = $([]), c = $(!0), p = $(null), d = $(12), S = $(""), y = $(/* @__PURE__ */ new Set()), h = $({}), s = $(/* @__PURE__ */ new Set()), v = $({}), E = $({}), m = $(/* @__PURE__ */ new Set()), C = $({});
1780
1780
  function g() {
1781
1781
  const b = {};
1782
1782
  for (const P of t.tiledLayers)
@@ -1799,7 +1799,7 @@ const en = { class: "layerboard-layout" }, tn = {
1799
1799
  function Se(b) {
1800
1800
  return N?.refetch(b) ?? Promise.resolve();
1801
1801
  }
1802
- U("layerboard-layers", V(l)), U("layerboard-visible", y), U("layerboard-opacities", h), U("layerboard-loading", V(s)), U("layerboard-errors", V(v)), U("layerboard-zoom", V(d)), U("layerboard-toggle-layer", Ce), U("layerboard-set-layer-visible", de), U("layerboard-set-layers-visible", ke), U("layerboard-set-opacity", fe), U("layerboard-tiled-layers", V(R(() => t.tiledLayers))), U("layerboard-visible-tiled", m), U("layerboard-tiled-opacities", C), U("layerboard-toggle-tiled", w), U("layerboard-set-tiled-opacity", M), U("layerboard-set-tiled-visible", z), U("layerboard-data-sources-state", q), U("layerboard-data-sources-loading", ce), U("layerboard-get-data-source", Le), U("layerboard-refetch-data-source", Se);
1802
+ U("layerboard-layers", V(a)), U("layerboard-visible", y), U("layerboard-opacities", h), U("layerboard-loading", V(s)), U("layerboard-errors", V(v)), U("layerboard-zoom", V(d)), U("layerboard-toggle-layer", Ce), U("layerboard-set-layer-visible", de), U("layerboard-set-layers-visible", ke), U("layerboard-set-opacity", fe), U("layerboard-tiled-layers", V(R(() => t.tiledLayers))), U("layerboard-visible-tiled", m), U("layerboard-tiled-opacities", C), U("layerboard-toggle-tiled", w), U("layerboard-set-tiled-opacity", M), U("layerboard-set-tiled-visible", z), U("layerboard-data-sources-state", q), U("layerboard-data-sources-loading", ce), U("layerboard-get-data-source", Le), U("layerboard-refetch-data-source", Se);
1803
1803
  const je = R(() => ({
1804
1804
  backgroundColor: t.themeColor
1805
1805
  })), qe = R(() => ({
@@ -1812,7 +1812,7 @@ const en = { class: "layerboard-layout" }, tn = {
1812
1812
  async function Ee() {
1813
1813
  try {
1814
1814
  c.value = !0, p.value = null;
1815
- const P = (await at(t.webMapId)).map((Z) => {
1815
+ const P = (await lt(t.webMapId)).map((Z) => {
1816
1816
  const Q = t.layerStyleOverrides[Z.id];
1817
1817
  return Q ? (console.log(`[Layerboard] Applying style override for layer: ${Z.id}`), {
1818
1818
  ...Z,
@@ -1822,18 +1822,18 @@ const en = { class: "layerboard-layout" }, tn = {
1822
1822
  type: Q.type ?? Z.type
1823
1823
  }) : Z;
1824
1824
  });
1825
- l.value = P.map((Z) => ({
1825
+ a.value = P.map((Z) => ({
1826
1826
  config: Z,
1827
1827
  component: Z.type
1828
1828
  }));
1829
- const le = {};
1829
+ const ae = {};
1830
1830
  P.forEach((Z) => {
1831
- le[Z.id] = Z.opacity ?? 1;
1832
- }), h.value = le, console.log(`[Layerboard] Loaded ${P.length} layer configs from WebMap ${t.webMapId}`), console.log("[Layerboard] Layer IDs:", P.map((Z) => Z.id)), a("configs-loaded", P);
1831
+ ae[Z.id] = Z.opacity ?? 1;
1832
+ }), h.value = ae, console.log(`[Layerboard] Loaded ${P.length} layer configs from WebMap ${t.webMapId}`), console.log("[Layerboard] Layer IDs:", P.map((Z) => Z.id)), l("configs-loaded", P);
1833
1833
  } catch (b) {
1834
1834
  console.error("[Layerboard] Failed to load layer configs:", b);
1835
1835
  const P = b instanceof Error ? b.message : "Failed to load layer configurations";
1836
- p.value = P, a("load-error", P);
1836
+ p.value = P, l("load-error", P);
1837
1837
  } finally {
1838
1838
  c.value = !1;
1839
1839
  }
@@ -1849,8 +1849,8 @@ const en = { class: "layerboard-layout" }, tn = {
1849
1849
  "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"
1850
1850
  ), P = await fetch(b);
1851
1851
  if (!P.ok) return;
1852
- const le = await P.json(), Z = {};
1853
- for (const Q of le.rows || [])
1852
+ const ae = await P.json(), Z = {};
1853
+ for (const Q of ae.rows || [])
1854
1854
  if (Q.url_text && Q.representation) {
1855
1855
  const Ke = Oe(Q.url_text), Xe = `https://metadata.phila.gov/#home/representationdetails/${Q.representation}/`;
1856
1856
  Z[Ke] = Xe;
@@ -1861,7 +1861,7 @@ const en = { class: "layerboard-layout" }, tn = {
1861
1861
  }
1862
1862
  }
1863
1863
  function He(b) {
1864
- d.value = b, a("zoom", b);
1864
+ d.value = b, l("zoom", b);
1865
1865
  }
1866
1866
  function Ce(b) {
1867
1867
  y.value.has(b) ? y.value.delete(b) : y.value.add(b), y.value = new Set(y.value);
@@ -1870,8 +1870,8 @@ const en = { class: "layerboard-layout" }, tn = {
1870
1870
  P ? y.value.add(b) : y.value.delete(b), y.value = new Set(y.value);
1871
1871
  }
1872
1872
  function ke(b, P) {
1873
- for (const le of b)
1874
- P ? y.value.add(le) : y.value.delete(le);
1873
+ for (const ae of b)
1874
+ P ? y.value.add(ae) : y.value.delete(ae);
1875
1875
  y.value = new Set(y.value);
1876
1876
  }
1877
1877
  function fe(b, P) {
@@ -1884,7 +1884,7 @@ const en = { class: "layerboard-layout" }, tn = {
1884
1884
  if (P)
1885
1885
  v.value = { ...v.value, [b]: P };
1886
1886
  else {
1887
- const { [b]: le, ...Z } = v.value;
1887
+ const { [b]: ae, ...Z } = v.value;
1888
1888
  v.value = Z;
1889
1889
  }
1890
1890
  }
@@ -1910,15 +1910,15 @@ const en = { class: "layerboard-layout" }, tn = {
1910
1910
  function be() {
1911
1911
  te.value = !0;
1912
1912
  }
1913
- function ae() {
1913
+ function le() {
1914
1914
  te.value = !1;
1915
1915
  }
1916
1916
  function De(b) {
1917
- b.target.classList.contains("layerboard-modal-backdrop") && ae();
1917
+ b.target.classList.contains("layerboard-modal-backdrop") && le();
1918
1918
  }
1919
- return U("layerboard-open-modal", be), U("layerboard-close-modal", ae), U("layerboard-is-modal-open", V(te)), n({
1919
+ return U("layerboard-open-modal", be), U("layerboard-close-modal", le), U("layerboard-is-modal-open", V(te)), n({
1920
1920
  /** Layer configurations */
1921
- layerList: l,
1921
+ layerList: a,
1922
1922
  /** Set of visible layer IDs */
1923
1923
  visibleLayers: y,
1924
1924
  /** Layer opacity values */
@@ -1967,7 +1967,7 @@ const en = { class: "layerboard-layout" }, tn = {
1967
1967
  /** Open the modal */
1968
1968
  openModal: be,
1969
1969
  /** Close the modal */
1970
- closeModal: ae
1970
+ closeModal: le
1971
1971
  }), Ze(() => {
1972
1972
  Ee(), Ge(), g();
1973
1973
  }), (b, P) => (f(), L("div", en, [
@@ -2008,7 +2008,7 @@ const en = { class: "layerboard-layout" }, tn = {
2008
2008
  F("div", on, [
2009
2009
  se(b.$slots, "footer", {
2010
2010
  openModal: be,
2011
- closeModal: ae,
2011
+ closeModal: le,
2012
2012
  isModalOpen: te.value
2013
2013
  }, () => [
2014
2014
  P[0] || (P[0] = he(" City of Philadelphia ", -1))
@@ -2033,13 +2033,13 @@ const en = { class: "layerboard-layout" }, tn = {
2033
2033
  })) : I("", !0)
2034
2034
  ], 4),
2035
2035
  F("div", nn, [
2036
- c.value ? (f(), L("div", an, [
2036
+ c.value ? (f(), L("div", ln, [
2037
2037
  F("div", {
2038
2038
  class: "layerboard-spinner",
2039
2039
  style: Y({ borderTopColor: e.themeColor })
2040
2040
  }, null, 4),
2041
2041
  F("p", null, "Loading " + j(e.title) + "...", 1)
2042
- ])) : p.value ? (f(), L("div", ln, [
2042
+ ])) : p.value ? (f(), L("div", an, [
2043
2043
  P[3] || (P[3] = F("h2", null, "Error Loading Layers", -1)),
2044
2044
  F("p", null, j(p.value), 1),
2045
2045
  F("button", {
@@ -2053,7 +2053,7 @@ const en = { class: "layerboard-layout" }, tn = {
2053
2053
  style: Y(Ie.value)
2054
2054
  }, [
2055
2055
  se(b.$slots, "sidebar", {
2056
- layers: l.value,
2056
+ layers: a.value,
2057
2057
  visibleLayers: y.value,
2058
2058
  layerOpacities: h.value,
2059
2059
  loadingLayers: s.value,
@@ -2076,7 +2076,7 @@ const en = { class: "layerboard-layout" }, tn = {
2076
2076
  }, () => [
2077
2077
  e.showDefaultSidebar ? (f(), X(Ro, {
2078
2078
  key: 0,
2079
- "layer-list": l.value,
2079
+ "layer-list": a.value,
2080
2080
  "visible-layers": y.value,
2081
2081
  "layer-opacities": h.value,
2082
2082
  "loading-layers": s.value,
@@ -2096,7 +2096,7 @@ const en = { class: "layerboard-layout" }, tn = {
2096
2096
  ee(Xt, {
2097
2097
  "visible-layers": y.value,
2098
2098
  "layer-opacities": h.value,
2099
- "layer-list": l.value,
2099
+ "layer-list": a.value,
2100
2100
  "tiled-layers": e.tiledLayers,
2101
2101
  "visible-tiled-layers": m.value,
2102
2102
  "tiled-layer-opacities": C.value,
@@ -2143,7 +2143,7 @@ const en = { class: "layerboard-layout" }, tn = {
2143
2143
  }, [
2144
2144
  se(b.$slots, "footer", {
2145
2145
  openModal: be,
2146
- closeModal: ae,
2146
+ closeModal: le,
2147
2147
  isModalOpen: te.value
2148
2148
  }, () => [
2149
2149
  P[4] || (P[4] = he(" City of Philadelphia ", -1))
@@ -2157,7 +2157,7 @@ const en = { class: "layerboard-layout" }, tn = {
2157
2157
  F("div", cn, [
2158
2158
  F("button", {
2159
2159
  class: "layerboard-modal-close",
2160
- onClick: ae,
2160
+ onClick: le,
2161
2161
  "aria-label": "Close modal"
2162
2162
  }, [
2163
2163
  ee(_(me), {
@@ -2166,12 +2166,12 @@ const en = { class: "layerboard-layout" }, tn = {
2166
2166
  decorative: ""
2167
2167
  }, null, 8, ["icon-definition"])
2168
2168
  ]),
2169
- se(b.$slots, "modal", { closeModal: ae }, void 0, !0)
2169
+ se(b.$slots, "modal", { closeModal: le }, void 0, !0)
2170
2170
  ])
2171
2171
  ])) : I("", !0)
2172
2172
  ]));
2173
2173
  }
2174
- }), Nn = /* @__PURE__ */ _e(un, [["__scopeId", "data-v-02a74c3a"]]), dn = ["aria-expanded"], fn = {
2174
+ }), Nn = /* @__PURE__ */ _e(un, [["__scopeId", "data-v-54d854f8"]]), dn = ["aria-expanded"], fn = {
2175
2175
  key: 0,
2176
2176
  class: "topic-icon"
2177
2177
  }, pn = { class: "topic-title" }, yn = { class: "topic-content" }, gn = /* @__PURE__ */ we({
@@ -2185,26 +2185,26 @@ const en = { class: "layerboard-layout" }, tn = {
2185
2185
  },
2186
2186
  emits: ["toggle", "layerChange"],
2187
2187
  setup(e, { emit: n }) {
2188
- const o = e, t = n, a = $(o.expanded);
2188
+ const o = e, t = n, l = $(o.expanded);
2189
2189
  xe(
2190
2190
  () => o.expanded,
2191
2191
  (c) => {
2192
- a.value = c;
2192
+ l.value = c;
2193
2193
  }
2194
2194
  );
2195
- function l() {
2196
- a.value = !a.value, t("toggle", a.value);
2195
+ function a() {
2196
+ l.value = !l.value, t("toggle", l.value);
2197
2197
  }
2198
2198
  return (c, p) => {
2199
2199
  const d = _t("font-awesome-icon");
2200
2200
  return f(), L("div", {
2201
- class: ne(["topic-accordion", { "is-expanded": a.value }])
2201
+ class: ne(["topic-accordion", { "is-expanded": l.value }])
2202
2202
  }, [
2203
2203
  F("button", {
2204
2204
  class: ne(["topic-header", e.headerClass]),
2205
2205
  type: "button",
2206
- "aria-expanded": a.value,
2207
- onClick: l
2206
+ "aria-expanded": l.value,
2207
+ onClick: a
2208
2208
  }, [
2209
2209
  e.icon || c.$slots.icon ? (f(), L("span", fn, [
2210
2210
  se(c.$slots, "icon", {}, () => [
@@ -2216,7 +2216,7 @@ const en = { class: "layerboard-layout" }, tn = {
2216
2216
  ])) : I("", !0),
2217
2217
  F("span", pn, j(e.title), 1),
2218
2218
  F("span", {
2219
- class: ne(["topic-chevron", { "is-rotated": a.value }])
2219
+ class: ne(["topic-chevron", { "is-rotated": l.value }])
2220
2220
  }, [...p[0] || (p[0] = [
2221
2221
  F("svg", {
2222
2222
  xmlns: "http://www.w3.org/2000/svg",
@@ -2238,7 +2238,7 @@ const en = { class: "layerboard-layout" }, tn = {
2238
2238
  p[1] || (p[1] = F("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
2239
2239
  ], !0)
2240
2240
  ], 512), [
2241
- [It, a.value]
2241
+ [It, l.value]
2242
2242
  ])
2243
2243
  ], 2);
2244
2244
  };
@@ -2279,10 +2279,10 @@ const en = { class: "layerboard-layout" }, tn = {
2279
2279
  emits: ["toggleLayer", "setOpacity"],
2280
2280
  setup(e, { emit: n }) {
2281
2281
  const o = e, t = n;
2282
- function a(m) {
2282
+ function l(m) {
2283
2283
  return o.visibleLayerIds.has(m);
2284
2284
  }
2285
- function l(m) {
2285
+ function a(m) {
2286
2286
  return o.layerOpacities[m] ?? 1;
2287
2287
  }
2288
2288
  function c(m) {
@@ -2328,7 +2328,7 @@ const en = { class: "layerboard-layout" }, tn = {
2328
2328
  }, [
2329
2329
  F("input", {
2330
2330
  type: "checkbox",
2331
- checked: a(g.id),
2331
+ checked: l(g.id),
2332
2332
  disabled: !d(g),
2333
2333
  onChange: (w) => v(g.id)
2334
2334
  }, null, 40, hn),
@@ -2360,19 +2360,19 @@ const en = { class: "layerboard-layout" }, tn = {
2360
2360
  d(g) ? I("", !0) : (f(), L("span", $n, " (zoom in) "))
2361
2361
  ])
2362
2362
  ], 2)),
2363
- y(g) && a(g.id) ? (f(), L("div", Pn, [
2364
- F("label", xn, " Opacity: " + j(Math.round(l(g.id) * 100)) + "% ", 1),
2363
+ y(g) && l(g.id) ? (f(), L("div", Pn, [
2364
+ F("label", xn, " Opacity: " + j(Math.round(a(g.id) * 100)) + "% ", 1),
2365
2365
  F("input", {
2366
2366
  type: "range",
2367
2367
  min: "0",
2368
2368
  max: "1",
2369
2369
  step: "0.05",
2370
- value: l(g.id),
2370
+ value: a(g.id),
2371
2371
  class: "opacity-slider",
2372
2372
  onInput: (w) => E(g.id, w)
2373
2373
  }, null, 40, Tn)
2374
2374
  ])) : I("", !0),
2375
- h(g) && a(g.id) && g.legend?.length ? (f(), L("ul", Fn, [
2375
+ h(g) && l(g.id) && g.legend?.length ? (f(), L("ul", Fn, [
2376
2376
  (f(!0), L(ie, null, re(g.legend, (w, z) => (f(), L("li", {
2377
2377
  key: z,
2378
2378
  class: "legend-item"
@@ -2402,7 +2402,7 @@ const en = { class: "layerboard-layout" }, tn = {
2402
2402
  }
2403
2403
  }), Bn = /* @__PURE__ */ _e(zn, [["__scopeId", "data-v-cc5e50fd"]]);
2404
2404
  function Wn(e) {
2405
- const n = $([]), o = $(/* @__PURE__ */ new Set()), t = $({}), a = $(/* @__PURE__ */ new Set()), l = $({}), c = $(""), p = $(!1), d = $(!1), S = $(null), y = R(() => {
2405
+ const n = $([]), o = $(/* @__PURE__ */ new Set()), t = $({}), l = $(/* @__PURE__ */ new Set()), a = $({}), c = $(""), p = $(!1), d = $(!1), S = $(null), y = R(() => {
2406
2406
  if (!c.value.trim())
2407
2407
  return n.value;
2408
2408
  const M = c.value.toLowerCase();
@@ -2422,7 +2422,7 @@ function Wn(e) {
2422
2422
  p.value = !0, S.value = null;
2423
2423
  try {
2424
2424
  let M;
2425
- e.mode === "dynamic" || !e.mode ? e.webMapId ? M = await v(e.webMapId) : M = await at() : M = await at(), n.value = M;
2425
+ e.mode === "dynamic" || !e.mode ? e.webMapId ? M = await v(e.webMapId) : M = await lt() : M = await lt(), n.value = M;
2426
2426
  const N = {};
2427
2427
  M.forEach((q) => {
2428
2428
  N[q.id] = q.opacity ?? 1;
@@ -2456,27 +2456,27 @@ function Wn(e) {
2456
2456
  c.value = M;
2457
2457
  }
2458
2458
  function g(M, N) {
2459
- const q = new Set(a.value);
2460
- N ? q.add(M) : q.delete(M), a.value = q;
2459
+ const q = new Set(l.value);
2460
+ N ? q.add(M) : q.delete(M), l.value = q;
2461
2461
  }
2462
2462
  function w(M, N) {
2463
2463
  if (N)
2464
- l.value = { ...l.value, [M]: N };
2464
+ a.value = { ...a.value, [M]: N };
2465
2465
  else {
2466
- const { [M]: q, ...ce } = l.value;
2467
- l.value = ce;
2466
+ const { [M]: q, ...ce } = a.value;
2467
+ a.value = ce;
2468
2468
  }
2469
2469
  }
2470
2470
  function z() {
2471
- n.value = [], o.value = /* @__PURE__ */ new Set(), t.value = {}, a.value = /* @__PURE__ */ new Set(), l.value = {}, c.value = "", p.value = !1, d.value = !1, S.value = null;
2471
+ n.value = [], o.value = /* @__PURE__ */ new Set(), t.value = {}, l.value = /* @__PURE__ */ new Set(), a.value = {}, c.value = "", p.value = !1, d.value = !1, S.value = null;
2472
2472
  }
2473
2473
  return {
2474
2474
  // State (readonly)
2475
2475
  layerConfigs: V(n),
2476
2476
  visibleLayers: V(o),
2477
2477
  layerOpacities: V(t),
2478
- loadingLayers: V(a),
2479
- layerErrors: V(l),
2478
+ loadingLayers: V(l),
2479
+ layerErrors: V(a),
2480
2480
  searchQuery: V(c),
2481
2481
  isLoading: V(p),
2482
2482
  isInitialized: V(d),
@@ -2498,23 +2498,23 @@ function Wn(e) {
2498
2498
  }
2499
2499
  function Un() {
2500
2500
  const e = $([]), n = $(/* @__PURE__ */ new Set()), o = $(/* @__PURE__ */ new Set());
2501
- function t(l) {
2502
- n.value.has(l) ? n.value.delete(l) : n.value.add(l);
2501
+ function t(a) {
2502
+ n.value.has(a) ? n.value.delete(a) : n.value.add(a);
2503
2503
  }
2504
- function a(l) {
2505
- e.value = l;
2504
+ function l(a) {
2505
+ e.value = a;
2506
2506
  }
2507
2507
  return {
2508
2508
  layers: R(() => e.value),
2509
2509
  visibleLayerIds: R(() => n.value),
2510
2510
  loadingLayerIds: R(() => o.value),
2511
2511
  toggleLayer: t,
2512
- setLayers: a
2512
+ setLayers: l
2513
2513
  };
2514
2514
  }
2515
2515
  function _n(e) {
2516
- const n = $(null), o = $(!1), t = $(null), a = $(0);
2517
- async function l(d = {}) {
2516
+ const n = $(null), o = $(!1), t = $(null), l = $(0);
2517
+ async function a(d = {}) {
2518
2518
  o.value = !0, t.value = null;
2519
2519
  const S = e.pageSize || 2e3;
2520
2520
  let y = 0, h = [], s = !0;
@@ -2542,7 +2542,7 @@ function _n(e) {
2542
2542
  type: "FeatureCollection",
2543
2543
  features: h
2544
2544
  };
2545
- return n.value = v, a.value = h.length, v;
2545
+ return n.value = v, l.value = h.length, v;
2546
2546
  } catch (v) {
2547
2547
  const E = v instanceof Error ? v : new Error("Failed to fetch features");
2548
2548
  throw t.value = E, E;
@@ -2551,21 +2551,21 @@ function _n(e) {
2551
2551
  }
2552
2552
  }
2553
2553
  function c() {
2554
- n.value = null, a.value = 0, t.value = null;
2554
+ n.value = null, l.value = 0, t.value = null;
2555
2555
  }
2556
2556
  async function p(d = {}) {
2557
- return l(d);
2557
+ return a(d);
2558
2558
  }
2559
2559
  return {
2560
2560
  // State (readonly)
2561
2561
  data: V(n),
2562
2562
  isLoading: V(o),
2563
2563
  error: V(t),
2564
- totalFeatures: V(a),
2564
+ totalFeatures: V(l),
2565
2565
  // Config
2566
2566
  config: e,
2567
2567
  // Methods
2568
- fetch: l,
2568
+ fetch: a,
2569
2569
  refetch: p,
2570
2570
  clear: c
2571
2571
  };
@@ -2574,10 +2574,10 @@ function Vn(e, n, o) {
2574
2574
  const t = _n(e);
2575
2575
  return xe(
2576
2576
  n,
2577
- async (a) => {
2578
- if (a) {
2579
- const l = o(a);
2580
- await t.fetch(l);
2577
+ async (l) => {
2578
+ if (l) {
2579
+ const a = o(l);
2580
+ await t.fetch(a);
2581
2581
  }
2582
2582
  },
2583
2583
  { immediate: !0 }
@@ -2592,7 +2592,7 @@ export {
2592
2592
  Dn as WEBMAP_ID,
2593
2593
  Be as buildWebMapUrl,
2594
2594
  Jo as clearCache,
2595
- at as getLayerConfigs,
2595
+ lt as getLayerConfigs,
2596
2596
  An as getWebMapUrl,
2597
2597
  kt as transformWebMapToLayerConfigs,
2598
2598
  Yo as useApiDataSources,