@ogc-maps/storybook-components 0.10.0 → 0.12.0

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.
Files changed (49) hide show
  1. package/dist/FeatureTooltip-DxzN-jnp.js +49 -0
  2. package/dist/components/FeatureTooltip/FeatureTooltip.d.ts +12 -2
  3. package/dist/components/FeatureTooltip/FeatureTooltip.d.ts.map +1 -1
  4. package/dist/components/FeatureTooltip/index.js +1 -1
  5. package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
  6. package/dist/components/LayerEditor/LayerList.d.ts.map +1 -1
  7. package/dist/components/ResultsDrawer/ResultsDrawer.d.ts +15 -0
  8. package/dist/components/ResultsDrawer/ResultsDrawer.d.ts.map +1 -0
  9. package/dist/components/ResultsDrawer/index.d.ts +3 -0
  10. package/dist/components/ResultsDrawer/index.d.ts.map +1 -0
  11. package/dist/components/SelectionPanel/SelectionPanel.d.ts +15 -0
  12. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -0
  13. package/dist/components/SelectionPanel/index.d.ts +3 -0
  14. package/dist/components/SelectionPanel/index.d.ts.map +1 -0
  15. package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
  16. package/dist/components/admin/CollapsibleSection.d.ts +1 -1
  17. package/dist/components/admin/CollapsibleSection.d.ts.map +1 -1
  18. package/dist/components/index.d.ts +6 -2
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/geo--Ta-t__y.js +1124 -0
  21. package/dist/hooks/index.d.ts +4 -2
  22. package/dist/hooks/index.d.ts.map +1 -1
  23. package/dist/hooks/index.js +47 -40
  24. package/dist/hooks/useSelection.d.ts +14 -0
  25. package/dist/hooks/useSelection.d.ts.map +1 -0
  26. package/dist/{index-DA_GGs_P.js → index-CqBeCxon.js} +203 -190
  27. package/dist/main.js +1494 -1208
  28. package/dist/schemas/config.d.ts +118 -0
  29. package/dist/schemas/config.d.ts.map +1 -1
  30. package/dist/schemas/index.d.ts +1 -1
  31. package/dist/schemas/index.d.ts.map +1 -1
  32. package/dist/schemas/index.js +22 -20
  33. package/dist/style.css +1 -1
  34. package/dist/types/index.d.ts +3 -2
  35. package/dist/types/index.d.ts.map +1 -1
  36. package/dist/types/index.js +30 -29
  37. package/dist/utils/boxDraw.d.ts +5 -0
  38. package/dist/utils/boxDraw.d.ts.map +1 -0
  39. package/dist/utils/cql2.d.ts +11 -0
  40. package/dist/utils/cql2.d.ts.map +1 -1
  41. package/dist/utils/index.d.ts +2 -0
  42. package/dist/utils/index.d.ts.map +1 -1
  43. package/dist/utils/ogcApi.d.ts +17 -0
  44. package/dist/utils/ogcApi.d.ts.map +1 -1
  45. package/dist/utils/selection.d.ts +12 -0
  46. package/dist/utils/selection.d.ts.map +1 -0
  47. package/package.json +1 -1
  48. package/dist/FeatureTooltip-Db1LgLQV.js +0 -47
  49. package/dist/geo-CIJBPCVe.js +0 -1038
package/dist/main.js CHANGED
@@ -1,39 +1,39 @@
1
- import { B as Nt } from "./BasemapSwitcher-BW7lyZ2Y.js";
2
- import { C as kt } from "./CollapsibleControl-qo9daiD8.js";
3
- import { C as St, f as Tt, a as Dt } from "./CoordinateDisplay-PxPmVjpm.js";
4
- import { E as At } from "./ExportButton-BsNrOvRE.js";
5
- import { jsx as a, jsxs as l, Fragment as U } from "react/jsx-runtime";
6
- import { useState as S, useEffect as V, useId as Re, useRef as ie, useMemo as Be, useCallback as Je } from "react";
7
- import { F as It } from "./FeatureDetailPanel-CkFpdEKW.js";
8
- import { F as Mt } from "./FeatureTooltip-Db1LgLQV.js";
9
- import { L as Ot } from "./LayerPanel-SCdJ8948.js";
10
- import { L as $t } from "./Legend-BLWBzD7Y.js";
11
- import { LuRuler as Ke, LuPentagon as Qe, LuTrash2 as Ze, LuInfo as ea } from "react-icons/lu";
12
- import { U as aa, R as ta, S as fe, O as Ue, m as qe, l as be, Q as ia, j as ra } from "./geo-CIJBPCVe.js";
13
- import { a as Bt, b as Ut, c as qt, T as zt, V as Gt, W as Wt, X as Vt, Y as _t, Z as Yt, d as Xt, _ as Ht, e as Jt, f as Kt, g as Qt, h as Zt, i as ei, k as ai, $ as ti, a0 as ii, n as ri, o as li, p as ni, q as pi, r as oi, s as ui, t as mi, u as si, v as ci, w as di, x as hi, y as gi, z as bi, A as yi, B as fi, C as xi, D as wi, a1 as Ni, E as vi, F as ki, G as Ci, H as Si, I as Ti, J as Di, K as Li, L as Ai, M as Ei, N as Ii, P as Fi } from "./geo-CIJBPCVe.js";
14
- import { S as Pi } from "./SearchPanel-4Y12jfuP.js";
15
- import { s as la } from "./index-DA_GGs_P.js";
16
- import { B as ji, C as $i, a as Ri, b as Bi, D as Ui, F as qi, c as zi, d as Gi, e as Wi, G as Vi, L as _i, f as Yi, g as Xi, h as Hi, i as Ji, j as Ki, M as Qi, N as Zi, O as er, P as ar, k as tr, S as ir, l as rr, m as lr, n as nr, o as pr, p as or, q as ur, r as mr, T as sr, U as cr, V as dr, v as hr } from "./index-DA_GGs_P.js";
17
- import './style.css';function nt({
1
+ import { B as $i } from "./BasemapSwitcher-BW7lyZ2Y.js";
2
+ import { C as Bi } from "./CollapsibleControl-qo9daiD8.js";
3
+ import { C as Ui, f as Gi, a as qi } from "./CoordinateDisplay-PxPmVjpm.js";
4
+ import { E as _i } from "./ExportButton-BsNrOvRE.js";
5
+ import { jsx as a, jsxs as l, Fragment as z } from "react/jsx-runtime";
6
+ import { useState as T, useEffect as q, useRef as H, useCallback as Be, useId as ze, useMemo as Ue } from "react";
7
+ import { F as Hi } from "./FeatureDetailPanel-CkFpdEKW.js";
8
+ import { F as Xi } from "./FeatureTooltip-DxzN-jnp.js";
9
+ import { L as Ji } from "./LayerPanel-SCdJ8948.js";
10
+ import { L as Qi } from "./Legend-BLWBzD7Y.js";
11
+ import { LuRuler as Ke, LuPentagon as Qe, LuTrash2 as be, LuMousePointer2 as ea, LuSquareDashedMousePointer as aa, LuList as ia, LuGripHorizontal as ta, LuDownload as ra, LuX as la, LuInfo as pa } from "react-icons/lu";
12
+ import { Y as na, Z as ua, _ as xe, U as Ge, o as qe, n as ye, W as oa, k as ma } from "./geo--Ta-t__y.js";
13
+ import { a as at, b as it, c as tt, d as rt, $ as lt, a0 as pt, a1 as nt, a2 as ut, a3 as ot, a4 as mt, e as st, a5 as ct, f as dt, g as ht, h as gt, i as bt, j as yt, l as ft, m as xt, a6 as wt, a7 as Nt, p as vt, q as kt, r as Ct, s as St, t as Tt, u as Dt, v as Lt, w as At, x as Et, y as It, z as Mt, A as Ft, B as Pt, C as Ot, D as jt, E as $t, F as Rt, G as Bt, a8 as zt, H as Ut, I as Gt, J as qt, K as Wt, L as _t, a9 as Vt, M as Ht, N as Yt, O as Xt, P as Zt, Q as Jt, R as Kt, S as Qt, T as er, V as ar, X as ir } from "./geo--Ta-t__y.js";
14
+ import { S as rr } from "./SearchPanel-4Y12jfuP.js";
15
+ import { s as sa } from "./index-CqBeCxon.js";
16
+ import { B as pr, a as nr, C as ur, b as or, c as mr, D as sr, d as cr, F as dr, e as hr, f as gr, g as br, G as yr, L as fr, h as xr, i as wr, j as Nr, k as vr, l as kr, M as Cr, N as Sr, O as Tr, P as Dr, m as Lr, S as Ar, n as Er, o as Ir, p as Mr, q as Fr, r as Pr, t as Or, u as jr, T as $r, U as Rr, V as Br, v as zr } from "./index-CqBeCxon.js";
17
+ import './style.css';function xi({
18
18
  open: e,
19
- layers: t,
20
- availableFormats: i,
19
+ layers: i,
20
+ availableFormats: t,
21
21
  hasActiveFilter: r,
22
- loading: n = !1,
23
- progress: o,
24
- error: p,
22
+ loading: p = !1,
23
+ progress: u,
24
+ error: n,
25
25
  onExport: x,
26
26
  onClose: s
27
27
  }) {
28
- const [g, y] = S(""), [w, c] = S(""), [u, d] = S(!0);
29
- if (V(() => {
30
- e && (y(t.length === 1 ? t[0].id : ""), c(i.length > 0 ? i[0].id : ""), d(!0));
31
- }, [e, t, i]), !e) return null;
32
- const N = t.find((m) => m.id === g), v = i.find((m) => m.id === w), T = N != null && r(N.id), E = N != null && v != null && !n, j = () => {
28
+ const [g, d] = T(""), [w, c] = T(""), [o, h] = T(!0);
29
+ if (q(() => {
30
+ e && (d(i.length === 1 ? i[0].id : ""), c(t.length > 0 ? t[0].id : ""), h(!0));
31
+ }, [e, i, t]), !e) return null;
32
+ const N = i.find((m) => m.id === g), v = t.find((m) => m.id === w), C = N != null && r(N.id), E = N != null && v != null && !p, O = () => {
33
33
  !N || !v || x({
34
34
  layer: N,
35
35
  format: v,
36
- filtered: T ? u : !1
36
+ filtered: C ? o : !1
37
37
  });
38
38
  };
39
39
  return /* @__PURE__ */ a(
@@ -61,23 +61,23 @@ import './style.css';function nt({
61
61
  children: "Layer"
62
62
  }
63
63
  ),
64
- t.length === 1 ? /* @__PURE__ */ a("div", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-700", children: t[0].label }) : /* @__PURE__ */ l(
64
+ i.length === 1 ? /* @__PURE__ */ a("div", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-700", children: i[0].label }) : /* @__PURE__ */ l(
65
65
  "select",
66
66
  {
67
67
  id: "export-layer-select",
68
68
  value: g,
69
- onChange: (m) => y(m.target.value),
69
+ onChange: (m) => d(m.target.value),
70
70
  className: "mapui:w-full mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-700",
71
71
  children: [
72
72
  /* @__PURE__ */ a("option", { value: "", disabled: !0, children: "Select a layer..." }),
73
- t.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label }, m.id))
73
+ i.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label }, m.id))
74
74
  ]
75
75
  }
76
76
  )
77
77
  ] }),
78
78
  /* @__PURE__ */ l("fieldset", { className: "mapui:mb-4", children: [
79
79
  /* @__PURE__ */ a("legend", { className: "mapui:mb-1 mapui:text-sm mapui:font-medium mapui:text-gray-700", children: "Format" }),
80
- /* @__PURE__ */ a("div", { className: "mapui:space-y-1", children: i.map((m) => /* @__PURE__ */ l(
80
+ /* @__PURE__ */ a("div", { className: "mapui:space-y-1", children: t.map((m) => /* @__PURE__ */ l(
81
81
  "label",
82
82
  {
83
83
  className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-2 mapui:rounded mapui:px-2 mapui:py-1.5 hover:mapui:bg-gray-50",
@@ -105,27 +105,27 @@ import './style.css';function nt({
105
105
  m.id
106
106
  )) })
107
107
  ] }),
108
- T && /* @__PURE__ */ l("label", { className: "mapui:mb-4 mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-2", children: [
108
+ C && /* @__PURE__ */ l("label", { className: "mapui:mb-4 mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-2", children: [
109
109
  /* @__PURE__ */ a(
110
110
  "input",
111
111
  {
112
112
  type: "checkbox",
113
- checked: u,
114
- onChange: (m) => d(m.target.checked),
113
+ checked: o,
114
+ onChange: (m) => h(m.target.checked),
115
115
  className: "mapui:accent-blue-600"
116
116
  }
117
117
  ),
118
118
  /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:text-gray-700", children: "Apply current filters" })
119
119
  ] }),
120
- n && o && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-sm mapui:text-blue-600", children: o }),
121
- p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-sm mapui:text-red-600", children: p }),
120
+ p && u && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-sm mapui:text-blue-600", children: u }),
121
+ n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-sm mapui:text-red-600", children: n }),
122
122
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:justify-end mapui:gap-2", children: [
123
123
  /* @__PURE__ */ a(
124
124
  "button",
125
125
  {
126
126
  type: "button",
127
127
  onClick: s,
128
- disabled: n,
128
+ disabled: p,
129
129
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-gray-700 hover:mapui:bg-gray-50",
130
130
  children: "Cancel"
131
131
  }
@@ -134,13 +134,13 @@ import './style.css';function nt({
134
134
  "button",
135
135
  {
136
136
  type: "button",
137
- onClick: j,
137
+ onClick: O,
138
138
  disabled: !E,
139
139
  className: [
140
140
  "mapui:rounded mapui:border mapui:border-transparent mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-white",
141
141
  E ? "mapui:cursor-pointer mapui:bg-blue-600 hover:mapui:bg-blue-700" : "mapui:cursor-not-allowed mapui:bg-blue-400"
142
142
  ].join(" "),
143
- children: n ? "Exporting..." : "Export"
143
+ children: p ? "Exporting..." : "Export"
144
144
  }
145
145
  )
146
146
  ] })
@@ -148,32 +148,32 @@ import './style.css';function nt({
148
148
  }
149
149
  );
150
150
  }
151
- const na = [
151
+ const ca = [
152
152
  { mode: "distance", icon: Ke, label: "Distance" },
153
153
  { mode: "area", icon: Qe, label: "Area" }
154
154
  ];
155
- function pa(e, t) {
156
- return e ? t === 0 ? "Click on the map to start measuring" : e === "distance" ? "Click to add points, double-click to finish" : t < 3 ? "Click to add points (min 3 for area)" : "Click to add points, double-click to close" : "Select a measurement mode";
155
+ function da(e, i) {
156
+ return e ? i === 0 ? "Click on the map to start measuring" : e === "distance" ? "Click to add points, double-click to finish" : i < 3 ? "Click to add points (min 3 for area)" : "Click to add points, double-click to close" : "Select a measurement mode";
157
157
  }
158
- function pt({
158
+ function wi({
159
159
  mode: e,
160
- onModeChange: t,
161
- points: i,
160
+ onModeChange: i,
161
+ points: t,
162
162
  measurement: r,
163
- unit: n,
164
- onUnitChange: o,
165
- onClear: p,
163
+ unit: p,
164
+ onUnitChange: u,
165
+ onClear: n,
166
166
  className: x
167
167
  }) {
168
- const s = e ? aa[e] : [];
168
+ const s = e ? na[e] : [];
169
169
  return /* @__PURE__ */ l("div", { className: `mapui:flex mapui:flex-col mapui:gap-3 ${x ?? ""}`, children: [
170
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: na.map(({ mode: g, icon: y, label: w }) => {
170
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: ca.map(({ mode: g, icon: d, label: w }) => {
171
171
  const c = e === g;
172
172
  return /* @__PURE__ */ l(
173
173
  "button",
174
174
  {
175
175
  type: "button",
176
- onClick: () => t(c ? null : g),
176
+ onClick: () => i(c ? null : g),
177
177
  "aria-label": w,
178
178
  "aria-pressed": c,
179
179
  className: [
@@ -181,41 +181,41 @@ function pt({
181
181
  c ? "mapui:bg-blue-600 mapui:text-white" : "mapui:bg-gray-100 mapui:text-gray-700 hover:mapui:bg-gray-200"
182
182
  ].join(" "),
183
183
  children: [
184
- /* @__PURE__ */ a(y, { size: 16 }),
184
+ /* @__PURE__ */ a(d, { size: 16 }),
185
185
  w
186
186
  ]
187
187
  },
188
188
  g
189
189
  );
190
190
  }) }),
191
- e && /* @__PURE__ */ l(U, { children: [
192
- /* @__PURE__ */ a("div", { className: "mapui:text-center", children: /* @__PURE__ */ a("div", { className: "mapui:text-2xl mapui:font-semibold mapui:text-gray-900", children: r ? ta(r) : "—" }) }),
191
+ e && /* @__PURE__ */ l(z, { children: [
192
+ /* @__PURE__ */ a("div", { className: "mapui:text-center", children: /* @__PURE__ */ a("div", { className: "mapui:text-2xl mapui:font-semibold mapui:text-gray-900", children: r ? ua(r) : "—" }) }),
193
193
  /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: s.map((g) => {
194
- const y = n === g;
194
+ const d = p === g;
195
195
  return /* @__PURE__ */ a(
196
196
  "button",
197
197
  {
198
198
  type: "button",
199
- onClick: () => o(g),
200
- "aria-label": `Unit: ${fe[g]}`,
199
+ onClick: () => u(g),
200
+ "aria-label": `Unit: ${xe[g]}`,
201
201
  className: [
202
202
  "mapui:flex-1 mapui:rounded mapui:px-2 mapui:py-1 mapui:text-xs mapui:font-medium mapui:transition-colors",
203
- y ? "mapui:bg-blue-100 mapui:text-blue-700" : "mapui:bg-gray-50 mapui:text-gray-500 hover:mapui:bg-gray-100"
203
+ d ? "mapui:bg-blue-100 mapui:text-blue-700" : "mapui:bg-gray-50 mapui:text-gray-500 hover:mapui:bg-gray-100"
204
204
  ].join(" "),
205
- children: fe[g]
205
+ children: xe[g]
206
206
  },
207
207
  g
208
208
  );
209
209
  }) }),
210
- /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-center mapui:text-xs mapui:text-gray-500", children: pa(e, i.length) }),
211
- i.length > 0 && /* @__PURE__ */ l(
210
+ /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-center mapui:text-xs mapui:text-gray-500", children: da(e, t.length) }),
211
+ t.length > 0 && /* @__PURE__ */ l(
212
212
  "button",
213
213
  {
214
214
  type: "button",
215
- onClick: p,
215
+ onClick: n,
216
216
  className: "mapui:flex mapui:items-center mapui:justify-center mapui:gap-1.5 mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-3 mapui:py-1.5 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
217
217
  children: [
218
- /* @__PURE__ */ a(Ze, { size: 14 }),
218
+ /* @__PURE__ */ a(be, { size: 14 }),
219
219
  "Clear"
220
220
  ]
221
221
  }
@@ -223,8 +223,218 @@ function pt({
223
223
  ] })
224
224
  ] });
225
225
  }
226
- function oa({ text: e, id: t }) {
227
- const i = Re(), r = t ?? i;
226
+ const ha = [
227
+ { mode: "click", icon: ea, label: "Click" },
228
+ { mode: "box", icon: aa, label: "Box" }
229
+ ];
230
+ function ga(e, i, t) {
231
+ return i ? e ? t === 0 ? e === "click" ? "Click on features to select them" : "Click and drag to draw a selection box" : `${t} feature${t !== 1 ? "s" : ""} selected` : "Choose a selection mode" : "Select a layer to begin";
232
+ }
233
+ function Ni({
234
+ mode: e,
235
+ onModeChange: i,
236
+ layers: t,
237
+ activeLayerId: r,
238
+ onActiveLayerChange: p,
239
+ selectedCount: u,
240
+ onClear: n,
241
+ onViewResults: x,
242
+ className: s
243
+ }) {
244
+ const g = t.filter((d) => d.visible);
245
+ return /* @__PURE__ */ l("div", { className: `mapui:flex mapui:flex-col mapui:gap-3 ${s ?? ""}`, children: [
246
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
247
+ /* @__PURE__ */ a("label", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: "Layer" }),
248
+ /* @__PURE__ */ l(
249
+ "select",
250
+ {
251
+ value: r ?? "",
252
+ onChange: (d) => p(d.target.value || null),
253
+ className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1.5 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500",
254
+ children: [
255
+ /* @__PURE__ */ a("option", { value: "", children: "Select a layer…" }),
256
+ g.map((d) => /* @__PURE__ */ a("option", { value: d.id, children: d.label }, d.id))
257
+ ]
258
+ }
259
+ )
260
+ ] }),
261
+ r && /* @__PURE__ */ l(z, { children: [
262
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: ha.map(({ mode: d, icon: w, label: c }) => {
263
+ const o = e === d;
264
+ return /* @__PURE__ */ l(
265
+ "button",
266
+ {
267
+ type: "button",
268
+ onClick: () => i(o ? null : d),
269
+ "aria-label": c,
270
+ "aria-pressed": o,
271
+ className: [
272
+ "mapui:flex mapui:flex-1 mapui:items-center mapui:justify-center mapui:gap-1.5 mapui:rounded mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:transition-colors",
273
+ o ? "mapui:bg-blue-600 mapui:text-white" : "mapui:bg-gray-100 mapui:text-gray-700 hover:mapui:bg-gray-200"
274
+ ].join(" "),
275
+ children: [
276
+ /* @__PURE__ */ a(w, { size: 16 }),
277
+ c
278
+ ]
279
+ },
280
+ d
281
+ );
282
+ }) }),
283
+ /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-center mapui:text-xs mapui:text-gray-500", children: ga(e, r, u) }),
284
+ u > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
285
+ /* @__PURE__ */ l(
286
+ "button",
287
+ {
288
+ type: "button",
289
+ onClick: x,
290
+ className: "mapui:flex mapui:flex-1 mapui:items-center mapui:justify-center mapui:gap-1.5 mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1.5 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
291
+ children: [
292
+ /* @__PURE__ */ a(ia, { size: 14 }),
293
+ "View Results"
294
+ ]
295
+ }
296
+ ),
297
+ /* @__PURE__ */ l(
298
+ "button",
299
+ {
300
+ type: "button",
301
+ onClick: n,
302
+ className: "mapui:flex mapui:items-center mapui:justify-center mapui:gap-1.5 mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-3 mapui:py-1.5 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
303
+ children: [
304
+ /* @__PURE__ */ a(be, { size: 14 }),
305
+ "Clear"
306
+ ]
307
+ }
308
+ )
309
+ ] })
310
+ ] })
311
+ ] });
312
+ }
313
+ function ba(e) {
314
+ return e == null ? "--" : typeof e == "boolean" ? e ? "Yes" : "No" : typeof e == "object" ? JSON.stringify(e) : String(e);
315
+ }
316
+ const ya = 200, fa = 0.6, xa = 300;
317
+ function vi({
318
+ open: e,
319
+ features: i,
320
+ columns: t,
321
+ title: r = "Results",
322
+ onClose: p,
323
+ onExport: u,
324
+ onFeatureClick: n,
325
+ onClearSelection: x
326
+ }) {
327
+ const [s, g] = T(xa), d = H(!1), w = H(0), c = H(0), o = Be((N) => {
328
+ N.preventDefault(), d.current = !0, w.current = N.clientY, c.current = s;
329
+ }, [s]);
330
+ if (q(() => {
331
+ if (!e) return;
332
+ const N = (C) => {
333
+ if (!d.current) return;
334
+ const E = window.innerHeight * fa, O = w.current - C.clientY, m = Math.min(E, Math.max(ya, c.current + O));
335
+ g(m);
336
+ }, v = () => {
337
+ d.current = !1;
338
+ };
339
+ return window.addEventListener("mousemove", N), window.addEventListener("mouseup", v), () => {
340
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", v);
341
+ };
342
+ }, [e]), !e) return null;
343
+ const h = t ?? (i.length > 0 ? Object.keys(i[0].properties).filter((N) => N !== "geometry") : []);
344
+ return /* @__PURE__ */ l(
345
+ "div",
346
+ {
347
+ className: "mapui:absolute mapui:bottom-0 mapui:left-0 mapui:right-0 mapui:z-20 mapui:bg-white mapui:shadow-[0_-4px_12px_rgba(0,0,0,0.15)] mapui:flex mapui:flex-col",
348
+ style: { height: s },
349
+ children: [
350
+ /* @__PURE__ */ a(
351
+ "div",
352
+ {
353
+ className: "mapui:flex mapui:items-center mapui:justify-center mapui:h-3 mapui:cursor-ns-resize mapui:bg-gray-100 mapui:border-b mapui:border-gray-200 hover:mapui:bg-gray-200",
354
+ onMouseDown: o,
355
+ children: /* @__PURE__ */ a(ta, { size: 14, className: "mapui:text-gray-400" })
356
+ }
357
+ ),
358
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:px-4 mapui:py-2 mapui:border-b mapui:border-gray-200 mapui:shrink-0", children: [
359
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
360
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-semibold mapui:text-gray-800", children: r }),
361
+ /* @__PURE__ */ a("span", { className: "mapui:rounded-full mapui:bg-blue-100 mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:font-medium mapui:text-blue-700", children: i.length })
362
+ ] }),
363
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1", children: [
364
+ u && /* @__PURE__ */ a(
365
+ "button",
366
+ {
367
+ type: "button",
368
+ onClick: u,
369
+ title: "Export",
370
+ className: "mapui:flex mapui:items-center mapui:justify-center mapui:w-7 mapui:h-7 mapui:rounded hover:mapui:bg-gray-100 mapui:text-gray-500",
371
+ children: /* @__PURE__ */ a(ra, { size: 16 })
372
+ }
373
+ ),
374
+ x && /* @__PURE__ */ a(
375
+ "button",
376
+ {
377
+ type: "button",
378
+ onClick: x,
379
+ title: "Clear selection",
380
+ className: "mapui:flex mapui:items-center mapui:justify-center mapui:w-7 mapui:h-7 mapui:rounded hover:mapui:bg-gray-100 mapui:text-gray-500",
381
+ children: /* @__PURE__ */ a(be, { size: 16 })
382
+ }
383
+ ),
384
+ /* @__PURE__ */ a(
385
+ "button",
386
+ {
387
+ type: "button",
388
+ onClick: p,
389
+ title: "Close",
390
+ className: "mapui:flex mapui:items-center mapui:justify-center mapui:w-7 mapui:h-7 mapui:rounded hover:mapui:bg-gray-100 mapui:text-gray-500",
391
+ children: /* @__PURE__ */ a(la, { size: 16 })
392
+ }
393
+ )
394
+ ] })
395
+ ] }),
396
+ /* @__PURE__ */ a("div", { className: "mapui:overflow-auto mapui:flex-1", children: i.length === 0 ? /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:justify-center mapui:h-full mapui:text-sm mapui:text-gray-400", children: "No features to display" }) : /* @__PURE__ */ l("table", { className: "mapui:w-full mapui:text-xs mapui:border-collapse", children: [
397
+ /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ l("tr", { className: "mapui:bg-gray-50 mapui:sticky mapui:top-0", children: [
398
+ /* @__PURE__ */ a("th", { className: "mapui:px-3 mapui:py-2 mapui:text-left mapui:font-medium mapui:text-gray-600 mapui:border-b mapui:border-gray-200", children: "#" }),
399
+ h.map((N) => /* @__PURE__ */ a(
400
+ "th",
401
+ {
402
+ className: "mapui:px-3 mapui:py-2 mapui:text-left mapui:font-medium mapui:text-gray-600 mapui:border-b mapui:border-gray-200 mapui:whitespace-nowrap",
403
+ children: N
404
+ },
405
+ N
406
+ ))
407
+ ] }) }),
408
+ /* @__PURE__ */ a("tbody", { children: i.map((N, v) => /* @__PURE__ */ l(
409
+ "tr",
410
+ {
411
+ onClick: () => n == null ? void 0 : n(v),
412
+ className: [
413
+ n ? "mapui:cursor-pointer" : "",
414
+ v % 2 === 0 ? "mapui:bg-white" : "mapui:bg-gray-50",
415
+ "hover:mapui:bg-blue-50"
416
+ ].join(" "),
417
+ children: [
418
+ /* @__PURE__ */ a("td", { className: "mapui:px-3 mapui:py-1.5 mapui:text-gray-400 mapui:border-b mapui:border-gray-100", children: v + 1 }),
419
+ h.map((C) => /* @__PURE__ */ a(
420
+ "td",
421
+ {
422
+ className: "mapui:px-3 mapui:py-1.5 mapui:text-gray-700 mapui:border-b mapui:border-gray-100 mapui:whitespace-nowrap",
423
+ children: ba(N.properties[C])
424
+ },
425
+ C
426
+ ))
427
+ ]
428
+ },
429
+ v
430
+ )) })
431
+ ] }) })
432
+ ]
433
+ }
434
+ );
435
+ }
436
+ function wa({ text: e, id: i }) {
437
+ const t = ze(), r = i ?? t;
228
438
  return /* @__PURE__ */ l("span", { className: "mapui:relative mapui:inline-flex mapui:group", children: [
229
439
  /* @__PURE__ */ a(
230
440
  "span",
@@ -233,7 +443,7 @@ function oa({ text: e, id: t }) {
233
443
  "aria-label": "Info",
234
444
  "aria-describedby": r,
235
445
  className: "mapui:inline-flex mapui:items-center mapui:text-gray-400 mapui:cursor-default hover:mapui:text-gray-600 focus:mapui:text-gray-600 focus:mapui:outline-none",
236
- children: /* @__PURE__ */ a(ea, { className: "mapui:h-3.5 mapui:w-3.5" })
446
+ children: /* @__PURE__ */ a(pa, { className: "mapui:h-3.5 mapui:w-3.5" })
237
447
  }
238
448
  ),
239
449
  /* @__PURE__ */ l(
@@ -250,28 +460,28 @@ function oa({ text: e, id: t }) {
250
460
  )
251
461
  ] });
252
462
  }
253
- function C({ label: e, error: t, required: i, description: r, htmlFor: n, children: o }) {
463
+ function S({ label: e, error: i, required: t, description: r, htmlFor: p, children: u }) {
254
464
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
255
465
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1", children: [
256
- /* @__PURE__ */ l("label", { htmlFor: n, className: "mapui:flex mapui:items-center mapui:gap-1 mapui:text-xs mapui:font-medium mapui:text-gray-700", children: [
466
+ /* @__PURE__ */ l("label", { htmlFor: p, className: "mapui:flex mapui:items-center mapui:gap-1 mapui:text-xs mapui:font-medium mapui:text-gray-700", children: [
257
467
  e,
258
- i && /* @__PURE__ */ a("span", { className: "mapui:ml-0.5 mapui:text-red-500", "aria-hidden": "true", children: "*" })
468
+ t && /* @__PURE__ */ a("span", { className: "mapui:ml-0.5 mapui:text-red-500", "aria-hidden": "true", children: "*" })
259
469
  ] }),
260
- r && /* @__PURE__ */ a(oa, { text: r })
470
+ r && /* @__PURE__ */ a(wa, { text: r })
261
471
  ] }),
262
- o,
263
- t && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: t })
472
+ u,
473
+ i && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: i })
264
474
  ] });
265
475
  }
266
- function H({ value: e, onChange: t, label: i }) {
476
+ function Z({ value: e, onChange: i, label: t }) {
267
477
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
268
478
  /* @__PURE__ */ a(
269
479
  "input",
270
480
  {
271
481
  type: "color",
272
482
  value: e,
273
- onChange: (r) => t(r.target.value),
274
- "aria-label": i ?? "Color",
483
+ onChange: (r) => i(r.target.value),
484
+ "aria-label": t ?? "Color",
275
485
  className: "mapui:h-8 mapui:w-10 mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:p-0.5"
276
486
  }
277
487
  ),
@@ -280,10 +490,10 @@ function H({ value: e, onChange: t, label: i }) {
280
490
  }
281
491
  function re({
282
492
  open: e,
283
- title: t,
284
- description: i,
493
+ title: i,
494
+ description: t,
285
495
  onConfirm: r,
286
- onCancel: n
496
+ onCancel: p
287
497
  }) {
288
498
  return e ? /* @__PURE__ */ a(
289
499
  "div",
@@ -299,7 +509,7 @@ function re({
299
509
  {
300
510
  id: "confirm-dialog-title",
301
511
  className: "mapui:m-0 mapui:mb-2 mapui:text-base mapui:font-semibold mapui:text-gray-900",
302
- children: t
512
+ children: i
303
513
  }
304
514
  ),
305
515
  /* @__PURE__ */ a(
@@ -307,7 +517,7 @@ function re({
307
517
  {
308
518
  id: "confirm-dialog-description",
309
519
  className: "mapui:m-0 mapui:mb-6 mapui:text-sm mapui:text-gray-600",
310
- children: i
520
+ children: t
311
521
  }
312
522
  ),
313
523
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:justify-end mapui:gap-2", children: [
@@ -315,7 +525,7 @@ function re({
315
525
  "button",
316
526
  {
317
527
  type: "button",
318
- onClick: n,
528
+ onClick: p,
319
529
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-gray-700 hover:mapui:bg-gray-50",
320
530
  children: "Cancel"
321
531
  }
@@ -336,67 +546,67 @@ function re({
336
546
  }
337
547
  function X({
338
548
  title: e,
339
- children: t,
340
- defaultOpen: i = !1,
549
+ children: i,
550
+ defaultOpen: t = !1,
341
551
  badge: r
342
552
  }) {
343
- const [n, o] = S(i);
553
+ const [p, u] = T(t);
344
554
  return /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
345
555
  /* @__PURE__ */ l(
346
556
  "button",
347
557
  {
348
558
  type: "button",
349
- onClick: () => o((p) => !p),
559
+ onClick: () => u((n) => !n),
350
560
  className: "mapui:flex mapui:w-full mapui:cursor-pointer mapui:items-center mapui:justify-between mapui:rounded mapui:border-none mapui:bg-gray-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:font-medium mapui:text-gray-700 hover:mapui:bg-gray-100",
351
561
  children: [
352
562
  /* @__PURE__ */ l("span", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
353
563
  e,
354
564
  r !== void 0 && r > 0 && /* @__PURE__ */ a("span", { className: "mapui:rounded-full mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: r })
355
565
  ] }),
356
- /* @__PURE__ */ a("span", { "aria-hidden": "true", children: n ? "▲" : "▼" })
566
+ /* @__PURE__ */ a("span", { "aria-hidden": "true", children: p ? "▲" : "▼" })
357
567
  ]
358
568
  }
359
569
  ),
360
- n && /* @__PURE__ */ a("div", { className: "mapui:p-3", children: t })
570
+ p && /* @__PURE__ */ a("div", { className: "mapui:p-3", children: i })
361
571
  ] });
362
572
  }
363
- const Z = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
364
- function xe({
573
+ const ee = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
574
+ function we({
365
575
  value: e,
366
- onChange: t,
367
- onTestConnection: i,
576
+ onChange: i,
577
+ onTestConnection: t,
368
578
  testStatus: r = "idle",
369
- testError: n
579
+ testError: p
370
580
  }) {
371
- const o = (p) => t({ ...e, ...p });
581
+ const u = (n) => i({ ...e, ...n });
372
582
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
373
- /* @__PURE__ */ a(C, { label: "ID", required: !0, children: /* @__PURE__ */ a(
583
+ /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
374
584
  "input",
375
585
  {
376
586
  type: "text",
377
587
  value: e.id,
378
- onChange: (p) => o({ id: p.target.value }),
588
+ onChange: (n) => u({ id: n.target.value }),
379
589
  placeholder: "my-source",
380
- className: Z
590
+ className: ee
381
591
  }
382
592
  ) }),
383
- /* @__PURE__ */ l(C, { label: "URL", required: !0, children: [
593
+ /* @__PURE__ */ l(S, { label: "URL", required: !0, children: [
384
594
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
385
595
  /* @__PURE__ */ a(
386
596
  "input",
387
597
  {
388
598
  type: "url",
389
599
  value: e.url,
390
- onChange: (p) => o({ url: p.target.value }),
600
+ onChange: (n) => u({ url: n.target.value }),
391
601
  placeholder: "https://example.com/ogcapi",
392
- className: `${Z} mapui:flex-1`
602
+ className: `${ee} mapui:flex-1`
393
603
  }
394
604
  ),
395
- i && /* @__PURE__ */ a(
605
+ t && /* @__PURE__ */ a(
396
606
  "button",
397
607
  {
398
608
  type: "button",
399
- onClick: () => i(e.url),
609
+ onClick: () => t(e.url),
400
610
  disabled: r === "loading" || !e.url,
401
611
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-500 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-sm mapui:text-blue-600 hover:mapui:bg-blue-50 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
402
612
  children: r === "loading" ? "Testing…" : "Test Connection"
@@ -404,26 +614,26 @@ function xe({
404
614
  )
405
615
  ] }),
406
616
  r === "success" && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-green-600", children: "Connection successful" }),
407
- r === "error" && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-600", children: n ?? "Connection failed" })
617
+ r === "error" && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-600", children: p ?? "Connection failed" })
408
618
  ] }),
409
- /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
619
+ /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
410
620
  "input",
411
621
  {
412
622
  type: "text",
413
623
  value: e.label ?? "",
414
- onChange: (p) => o({ label: p.target.value || void 0 }),
624
+ onChange: (n) => u({ label: n.target.value || void 0 }),
415
625
  placeholder: "My OGC API Source",
416
- className: Z
626
+ className: ee
417
627
  }
418
628
  ) }),
419
- /* @__PURE__ */ a(C, { label: "Tile Matrix Set ID", children: /* @__PURE__ */ a(
629
+ /* @__PURE__ */ a(S, { label: "Tile Matrix Set ID", children: /* @__PURE__ */ a(
420
630
  "input",
421
631
  {
422
632
  type: "text",
423
633
  value: e.tileMatrixSetId ?? "WebMercatorQuad",
424
- onChange: (p) => o({ tileMatrixSetId: p.target.value || void 0 }),
634
+ onChange: (n) => u({ tileMatrixSetId: n.target.value || void 0 }),
425
635
  placeholder: "WebMercatorQuad",
426
- className: Z
636
+ className: ee
427
637
  }
428
638
  ) })
429
639
  ] });
@@ -434,21 +644,21 @@ const le = () => ({
434
644
  label: void 0,
435
645
  tileMatrixSetId: "WebMercatorQuad"
436
646
  });
437
- function ot({ sources: e, onChange: t }) {
438
- const [i, r] = S(null), [n, o] = S(null), [p, x] = S(!1), [s, g] = S(le()), [y, w] = S({}), [c, u] = S({}), [d, N] = S(null), v = async (m, I) => {
439
- w((M) => ({ ...M, [m]: "loading" }));
647
+ function ki({ sources: e, onChange: i }) {
648
+ const [t, r] = T(null), [p, u] = T(null), [n, x] = T(!1), [s, g] = T(le()), [d, w] = T({}), [c, o] = T({}), [h, N] = T(null), v = async (m, L) => {
649
+ w((F) => ({ ...F, [m]: "loading" }));
440
650
  try {
441
- const M = await fetch(`${I}/conformance`);
442
- M.ok ? w((h) => ({ ...h, [m]: "success" })) : (w((h) => ({ ...h, [m]: "error" })), u((h) => ({ ...h, [m]: `HTTP ${M.status}` })));
443
- } catch (M) {
444
- w((h) => ({ ...h, [m]: "error" })), u((h) => ({ ...h, [m]: M instanceof Error ? M.message : "Network error" }));
651
+ const F = await fetch(`${L}/conformance`);
652
+ F.ok ? w((b) => ({ ...b, [m]: "success" })) : (w((b) => ({ ...b, [m]: "error" })), o((b) => ({ ...b, [m]: `HTTP ${F.status}` })));
653
+ } catch (F) {
654
+ w((b) => ({ ...b, [m]: "error" })), o((b) => ({ ...b, [m]: F instanceof Error ? F.message : "Network error" }));
445
655
  }
446
- }, T = () => {
447
- n && (t(e.map((m) => m.id === i ? n : m)), r(null), o(null));
656
+ }, C = () => {
657
+ p && (i(e.map((m) => m.id === t ? p : m)), r(null), u(null));
448
658
  }, E = () => {
449
- t([...e, s]), x(!1), g(le());
450
- }, j = (m) => {
451
- t(e.filter((I) => I.id !== m)), N(null);
659
+ i([...e, s]), x(!1), g(le());
660
+ }, O = (m) => {
661
+ i(e.filter((L) => L.id !== m)), N(null);
452
662
  };
453
663
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
454
664
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -465,19 +675,19 @@ function ot({ sources: e, onChange: t }) {
465
675
  }
466
676
  )
467
677
  ] }),
468
- e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No sources configured." }),
678
+ e.length === 0 && !n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No sources configured." }),
469
679
  /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((m) => /* @__PURE__ */ a(
470
680
  "li",
471
681
  {
472
682
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white mapui:p-3",
473
- children: i === m.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
683
+ children: t === m.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
474
684
  /* @__PURE__ */ a(
475
- xe,
685
+ we,
476
686
  {
477
- value: n ?? m,
478
- onChange: o,
479
- onTestConnection: (I) => v(`edit-${m.id}`, I),
480
- testStatus: y[`edit-${m.id}`],
687
+ value: p ?? m,
688
+ onChange: u,
689
+ onTestConnection: (L) => v(`edit-${m.id}`, L),
690
+ testStatus: d[`edit-${m.id}`],
481
691
  testError: c[`edit-${m.id}`]
482
692
  }
483
693
  ),
@@ -486,8 +696,8 @@ function ot({ sources: e, onChange: t }) {
486
696
  "button",
487
697
  {
488
698
  type: "button",
489
- onClick: T,
490
- disabled: !(n != null && n.id) || !(n != null && n.url),
699
+ onClick: C,
700
+ disabled: !(p != null && p.id) || !(p != null && p.url),
491
701
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
492
702
  children: "Save"
493
703
  }
@@ -497,7 +707,7 @@ function ot({ sources: e, onChange: t }) {
497
707
  {
498
708
  type: "button",
499
709
  onClick: () => {
500
- r(null), o(null);
710
+ r(null), u(null);
501
711
  },
502
712
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
503
713
  children: "Cancel"
@@ -519,7 +729,7 @@ function ot({ sources: e, onChange: t }) {
519
729
  {
520
730
  type: "button",
521
731
  onClick: () => {
522
- r(m.id), o(m);
732
+ r(m.id), u(m);
523
733
  },
524
734
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
525
735
  children: "Edit"
@@ -539,15 +749,15 @@ function ot({ sources: e, onChange: t }) {
539
749
  },
540
750
  m.id
541
751
  )) }),
542
- p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
752
+ n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
543
753
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Source" }),
544
754
  /* @__PURE__ */ a(
545
- xe,
755
+ we,
546
756
  {
547
757
  value: s,
548
758
  onChange: g,
549
759
  onTestConnection: (m) => v("new", m),
550
- testStatus: y.new,
760
+ testStatus: d.new,
551
761
  testError: c.new
552
762
  }
553
763
  ),
@@ -576,30 +786,30 @@ function ot({ sources: e, onChange: t }) {
576
786
  /* @__PURE__ */ a(
577
787
  re,
578
788
  {
579
- open: d !== null,
789
+ open: h !== null,
580
790
  title: "Remove Source",
581
791
  description: "Are you sure you want to remove this source? Any layers using it will be affected.",
582
- onConfirm: () => d && j(d),
792
+ onConfirm: () => h && O(h),
583
793
  onCancel: () => N(null)
584
794
  }
585
795
  )
586
796
  ] });
587
797
  }
588
- function ut({
798
+ function Ci({
589
799
  sourceUrl: e,
590
- selectedCollectionIds: t,
591
- onSelect: i,
800
+ selectedCollectionIds: i,
801
+ onSelect: t,
592
802
  onDeselect: r
593
803
  }) {
594
- const { collections: n, loading: o, error: p } = Ue(e || null);
595
- return o ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2 mapui:py-4 mapui:text-sm mapui:text-gray-500", children: [
804
+ const { collections: p, loading: u, error: n } = Ge(e || null);
805
+ return u ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2 mapui:py-4 mapui:text-sm mapui:text-gray-500", children: [
596
806
  /* @__PURE__ */ a("span", { className: "mapui:inline-block mapui:h-4 mapui:w-4 mapui:animate-spin mapui:rounded-full mapui:border-2 mapui:border-gray-300 mapui:border-t-blue-600" }),
597
807
  "Loading collections…"
598
- ] }) : p ? /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3 mapui:text-sm mapui:text-red-700", children: [
808
+ ] }) : n ? /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3 mapui:text-sm mapui:text-red-700", children: [
599
809
  "Failed to load collections: ",
600
- p.message
601
- ] }) : n.length === 0 ? /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No collections found at this source." }) : /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: n.map((x) => {
602
- const s = t.includes(x.id);
810
+ n.message
811
+ ] }) : p.length === 0 ? /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No collections found at this source." }) : /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: p.map((x) => {
812
+ const s = i.includes(x.id);
603
813
  return /* @__PURE__ */ l(
604
814
  "li",
605
815
  {
@@ -611,7 +821,7 @@ function ut({
611
821
  type: "checkbox",
612
822
  id: `collection-${x.id}`,
613
823
  checked: s,
614
- onChange: () => s ? r(x.id) : i(x.id),
824
+ onChange: () => s ? r(x.id) : t(x.id),
615
825
  className: "mapui:mt-0.5 mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-blue-600"
616
826
  }
617
827
  ),
@@ -633,35 +843,35 @@ function ut({
633
843
  );
634
844
  }) });
635
845
  }
636
- function ua({ value: e, onChange: t, availableIcons: i }) {
637
- const [r, n] = S(!1), [o, p] = S(-1), x = ie(null), s = Re(), g = o >= 0 ? `${s}-option-${o}` : void 0, y = Be(() => {
638
- if (!i || i.length === 0) return [];
639
- if (!e) return i;
846
+ function Na({ value: e, onChange: i, availableIcons: t }) {
847
+ const [r, p] = T(!1), [u, n] = T(-1), x = H(null), s = ze(), g = u >= 0 ? `${s}-option-${u}` : void 0, d = Ue(() => {
848
+ if (!t || t.length === 0) return [];
849
+ if (!e) return t;
640
850
  const v = e.toLowerCase();
641
- return i.filter((T) => T.toLowerCase().includes(v));
642
- }, [i, e]), w = r && y.length > 0, c = Je(
851
+ return t.filter((C) => C.toLowerCase().includes(v));
852
+ }, [t, e]), w = r && d.length > 0, c = Be(
643
853
  (v) => {
644
- t(v), n(!1), p(-1);
854
+ i(v), p(!1), n(-1);
645
855
  },
646
- [t]
647
- ), u = (v) => {
648
- t(v.target.value), n(!0), p(-1);
649
- }, d = (v) => {
650
- w && (v.key === "ArrowDown" ? (v.preventDefault(), p((T) => Math.min(T + 1, y.length - 1))) : v.key === "ArrowUp" ? (v.preventDefault(), p((T) => Math.max(T - 1, 0))) : v.key === "Enter" && o >= 0 ? (v.preventDefault(), c(y[o])) : v.key === "Escape" && (n(!1), p(-1)));
856
+ [i]
857
+ ), o = (v) => {
858
+ i(v.target.value), p(!0), n(-1);
859
+ }, h = (v) => {
860
+ w && (v.key === "ArrowDown" ? (v.preventDefault(), n((C) => Math.min(C + 1, d.length - 1))) : v.key === "ArrowUp" ? (v.preventDefault(), n((C) => Math.max(C - 1, 0))) : v.key === "Enter" && u >= 0 ? (v.preventDefault(), c(d[u])) : v.key === "Escape" && (p(!1), n(-1)));
651
861
  };
652
- V(() => {
653
- const v = (T) => {
654
- x.current && !x.current.contains(T.target) && (n(!1), p(-1));
862
+ q(() => {
863
+ const v = (C) => {
864
+ x.current && !x.current.contains(C.target) && (p(!1), n(-1));
655
865
  };
656
866
  return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
657
867
  }, []);
658
868
  const N = "mapui:w-full mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
659
- return !i || i.length === 0 ? /* @__PURE__ */ a(
869
+ return !t || t.length === 0 ? /* @__PURE__ */ a(
660
870
  "input",
661
871
  {
662
872
  type: "text",
663
873
  value: e,
664
- onChange: (v) => t(v.target.value || ""),
874
+ onChange: (v) => i(v.target.value || ""),
665
875
  placeholder: "icon-name",
666
876
  className: N
667
877
  }
@@ -677,9 +887,9 @@ function ua({ value: e, onChange: t, availableIcons: i }) {
677
887
  "aria-autocomplete": "list",
678
888
  "aria-controls": s,
679
889
  "aria-activedescendant": g,
680
- onChange: u,
681
- onFocus: () => n(!0),
682
- onKeyDown: d,
890
+ onChange: o,
891
+ onFocus: () => p(!0),
892
+ onKeyDown: h,
683
893
  className: N
684
894
  }
685
895
  ),
@@ -689,25 +899,25 @@ function ua({ value: e, onChange: t, availableIcons: i }) {
689
899
  id: s,
690
900
  role: "listbox",
691
901
  className: "mapui:absolute mapui:z-10 mapui:mt-1 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:shadow-lg mapui:max-h-48 mapui:overflow-y-auto mapui:p-0 mapui:m-0 mapui:list-none",
692
- children: y.map((v, T) => /* @__PURE__ */ a(
902
+ children: d.map((v, C) => /* @__PURE__ */ a(
693
903
  "li",
694
904
  {
695
- id: `${s}-option-${T}`,
905
+ id: `${s}-option-${C}`,
696
906
  role: "option",
697
- "aria-selected": T === o,
907
+ "aria-selected": C === u,
698
908
  onMouseDown: (E) => {
699
909
  E.preventDefault(), c(v);
700
910
  },
701
- className: `mapui:cursor-pointer mapui:px-2 mapui:py-1 mapui:text-sm mapui:font-mono ${T === o ? "mapui:bg-blue-100" : "hover:mapui:bg-gray-50"}`,
911
+ className: `mapui:cursor-pointer mapui:px-2 mapui:py-1 mapui:text-sm mapui:font-mono ${C === u ? "mapui:bg-blue-100" : "hover:mapui:bg-gray-50"}`,
702
912
  children: v
703
913
  },
704
- `${T}-${v}`
914
+ `${C}-${v}`
705
915
  ))
706
916
  }
707
917
  )
708
918
  ] });
709
919
  }
710
- const we = [
920
+ const Ne = [
711
921
  "#4e79a7",
712
922
  "#f28e2b",
713
923
  "#e15759",
@@ -719,222 +929,222 @@ const we = [
719
929
  "#9c755f",
720
930
  "#bab0ac"
721
931
  ];
722
- function ne(e) {
723
- return we[e % we.length];
932
+ function pe(e) {
933
+ return Ne[e % Ne.length];
724
934
  }
725
- function ma(e) {
935
+ function va(e) {
726
936
  return e[0] === "interpolate" ? "interpolate" : "match";
727
937
  }
728
- function sa(e) {
729
- const t = Array.isArray(e[1]) ? e[1][1] ?? "" : "", i = e[e.length - 1] ?? "#000000", r = [];
730
- for (let n = 2; n < e.length - 1; n += 2)
731
- r.push({ value: String(e[n] ?? ""), color: e[n + 1] ?? "#000000" });
732
- return { property: t, pairs: r, fallback: i };
938
+ function ka(e) {
939
+ const i = Array.isArray(e[1]) ? e[1][1] ?? "" : "", t = e[e.length - 1] ?? "#000000", r = [];
940
+ for (let p = 2; p < e.length - 1; p += 2)
941
+ r.push({ value: String(e[p] ?? ""), color: e[p + 1] ?? "#000000" });
942
+ return { property: i, pairs: r, fallback: t };
733
943
  }
734
- function Ne(e, t, i) {
944
+ function ve(e, i, t) {
735
945
  const r = ["match", ["get", e]];
736
- for (const n of t)
737
- r.push(n.value, n.color);
738
- return r.push(i), r;
946
+ for (const p of i)
947
+ r.push(p.value, p.color);
948
+ return r.push(t), r;
739
949
  }
740
- function pe(e) {
741
- const t = e[2];
742
- let i = "";
743
- Array.isArray(t) && (t[0] === "to-number" && Array.isArray(t[1]) ? i = t[1][1] ?? "" : i = t[1] ?? "");
950
+ function ne(e) {
951
+ const i = e[2];
952
+ let t = "";
953
+ Array.isArray(i) && (i[0] === "to-number" && Array.isArray(i[1]) ? t = i[1][1] ?? "" : t = i[1] ?? "");
744
954
  const r = [];
745
- for (let n = 3; n < e.length; n += 2)
746
- r.push({ stop: Number(e[n] ?? 0), color: e[n + 1] ?? "#000000" });
747
- return { property: i, stops: r };
748
- }
749
- function ve(e, t) {
750
- const i = ["interpolate", ["linear"], ["to-number", ["get", e]]];
751
- for (const r of t)
752
- i.push(r.stop, r.color);
753
- return i;
955
+ for (let p = 3; p < e.length; p += 2)
956
+ r.push({ stop: Number(e[p] ?? 0), color: e[p + 1] ?? "#000000" });
957
+ return { property: t, stops: r };
958
+ }
959
+ function ke(e, i) {
960
+ const t = ["interpolate", ["linear"], ["to-number", ["get", e]]];
961
+ for (const r of i)
962
+ t.push(r.stop, r.color);
963
+ return t;
754
964
  }
755
- function ke(e) {
756
- return e.map((t) => ({ stopText: String(t.stop), color: t.color }));
965
+ function Ce(e) {
966
+ return e.map((i) => ({ stopText: String(i.stop), color: i.color }));
757
967
  }
758
- function ca(e) {
759
- return e.map((t, i) => {
760
- if (t.stopText.trim() === "") return "Value required";
761
- const r = parseFloat(t.stopText);
968
+ function Ca(e) {
969
+ return e.map((i, t) => {
970
+ if (i.stopText.trim() === "") return "Value required";
971
+ const r = parseFloat(i.stopText);
762
972
  if (isNaN(r)) return "Must be a number";
763
- if (i > 0) {
764
- const n = parseFloat(e[i - 1].stopText);
765
- if (!isNaN(n) && r <= n) return "Must be greater than previous stop";
973
+ if (t > 0) {
974
+ const p = parseFloat(e[t - 1].stopText);
975
+ if (!isNaN(p) && r <= p) return "Must be greater than previous stop";
766
976
  }
767
977
  return "";
768
978
  });
769
979
  }
770
- function da(e) {
771
- const t = [];
772
- for (const i of e) {
773
- const r = parseFloat(i.stopText);
980
+ function Sa(e) {
981
+ const i = [];
982
+ for (const t of e) {
983
+ const r = parseFloat(t.stopText);
774
984
  if (isNaN(r)) return null;
775
- t.push({ stop: r, color: i.color });
985
+ i.push({ stop: r, color: t.color });
776
986
  }
777
- return t;
987
+ return i;
778
988
  }
779
- const ee = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", oe = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50", Ce = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50";
780
- function ha({
989
+ const ae = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", ue = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50", Se = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50";
990
+ function Ta({
781
991
  value: e,
782
- onChange: t,
783
- availableProperties: i = [],
992
+ onChange: i,
993
+ availableProperties: t = [],
784
994
  onFetchDistinctValues: r
785
995
  }) {
786
- const [n, o] = S(() => ma(e)), [p, x] = S(!1), s = sa(e), g = n === "match" ? s.property : "", y = n === "match" ? s.pairs : [], w = n === "match" ? s.fallback : "#000000", [c, u] = S(() => {
787
- const b = pe(e);
788
- return ke(b.stops);
789
- }), [d, N] = S(() => n === "interpolate" ? pe(e).property : ""), [v, T] = S([]), E = ie(e);
790
- V(() => {
791
- if (E.current !== e && n === "interpolate") {
792
- const b = pe(e);
793
- u(ke(b.stops)), N(b.property), T([]);
996
+ const [p, u] = T(() => va(e)), [n, x] = T(!1), s = ka(e), g = p === "match" ? s.property : "", d = p === "match" ? s.pairs : [], w = p === "match" ? s.fallback : "#000000", [c, o] = T(() => {
997
+ const f = ne(e);
998
+ return Ce(f.stops);
999
+ }), [h, N] = T(() => p === "interpolate" ? ne(e).property : ""), [v, C] = T([]), E = H(e);
1000
+ q(() => {
1001
+ if (E.current !== e && p === "interpolate") {
1002
+ const f = ne(e);
1003
+ o(Ce(f.stops)), N(f.property), C([]);
794
1004
  }
795
1005
  E.current = e;
796
- }, [e, n]);
797
- const j = i.filter(
798
- (b) => !b.type || b.type === "string"
799
- ), m = i.filter(
800
- (b) => b.type === "number" || b.type === "integer"
801
- ), I = (b, D, A) => {
802
- t(Ne(b, D, A));
803
- }, M = (b) => {
804
- I(b, y, w);
805
- }, h = (b) => {
806
- I(g, y, b);
807
- }, F = (b, D) => {
808
- const A = y.map((L, B) => B === b ? { ...L, value: D } : L);
809
- I(g, A, w);
810
- }, P = (b, D) => {
811
- const A = y.map((L, B) => B === b ? { ...L, color: D } : L);
812
- I(g, A, w);
813
- }, f = (b) => {
814
- const D = y.filter((A, L) => L !== b);
815
- I(g, D, w);
1006
+ }, [e, p]);
1007
+ const O = t.filter(
1008
+ (f) => !f.type || f.type === "string"
1009
+ ), m = t.filter(
1010
+ (f) => f.type === "number" || f.type === "integer"
1011
+ ), L = (f, D, I) => {
1012
+ i(ve(f, D, I));
1013
+ }, F = (f) => {
1014
+ L(f, d, w);
1015
+ }, b = (f) => {
1016
+ L(g, d, f);
1017
+ }, M = (f, D) => {
1018
+ const I = d.map((A, B) => B === f ? { ...A, value: D } : A);
1019
+ L(g, I, w);
1020
+ }, P = (f, D) => {
1021
+ const I = d.map((A, B) => B === f ? { ...A, color: D } : A);
1022
+ L(g, I, w);
1023
+ }, y = (f) => {
1024
+ const D = d.filter((I, A) => A !== f);
1025
+ L(g, D, w);
816
1026
  }, k = () => {
817
- const b = [...y, { value: "", color: ne(y.length) }];
818
- I(g, b, w);
819
- }, O = async () => {
1027
+ const f = [...d, { value: "", color: pe(d.length) }];
1028
+ L(g, f, w);
1029
+ }, j = async () => {
820
1030
  if (!(!r || !g)) {
821
1031
  x(!0);
822
1032
  try {
823
- const D = (await r(g)).map((A, L) => ({
824
- value: A,
825
- color: ne(L)
1033
+ const D = (await r(g)).map((I, A) => ({
1034
+ value: I,
1035
+ color: pe(A)
826
1036
  }));
827
- I(g, D, w);
1037
+ L(g, D, w);
828
1038
  } finally {
829
1039
  x(!1);
830
1040
  }
831
1041
  }
832
- }, R = (b, D) => {
833
- const A = ca(D);
834
- if (T(A), b && D.length >= 2 && A.every((L) => !L)) {
835
- const L = da(D);
836
- L && t(ve(b, L));
1042
+ }, R = (f, D) => {
1043
+ const I = Ca(D);
1044
+ if (C(I), f && D.length >= 2 && I.every((A) => !A)) {
1045
+ const A = Sa(D);
1046
+ A && i(ke(f, A));
837
1047
  }
838
- }, G = (b) => {
839
- N(b), R(b, c);
840
- }, q = (b, D) => {
841
- const A = c.map((L, B) => B === b ? { ...L, stopText: D } : L);
842
- u(A), R(d, A);
843
- }, z = (b, D) => {
844
- const A = c.map((L, B) => B === b ? { ...L, color: D } : L);
845
- u(A), R(d, A);
846
- }, J = (b) => {
847
- const D = c.filter((A, L) => L !== b);
848
- u(D), R(d, D);
1048
+ }, W = (f) => {
1049
+ N(f), R(f, c);
1050
+ }, U = (f, D) => {
1051
+ const I = c.map((A, B) => B === f ? { ...A, stopText: D } : A);
1052
+ o(I), R(h, I);
1053
+ }, G = (f, D) => {
1054
+ const I = c.map((A, B) => B === f ? { ...A, color: D } : A);
1055
+ o(I), R(h, I);
1056
+ }, J = (f) => {
1057
+ const D = c.filter((I, A) => A !== f);
1058
+ o(D), R(h, D);
849
1059
  }, K = () => {
850
1060
  var B;
851
- const b = ((B = c[c.length - 1]) == null ? void 0 : B.stopText) ?? "0", D = parseFloat(b), A = isNaN(D) ? 0 : D + 10, L = [...c, { stopText: String(A), color: ne(c.length) }];
852
- u(L), R(d, L);
853
- }, Q = (b) => {
854
- o(b), b === "match" ? t(Ne("", [], "#000000")) : (u([]), N(""), T([]), t(ve("", [])));
1061
+ const f = ((B = c[c.length - 1]) == null ? void 0 : B.stopText) ?? "0", D = parseFloat(f), I = isNaN(D) ? 0 : D + 10, A = [...c, { stopText: String(I), color: pe(c.length) }];
1062
+ o(A), R(h, A);
1063
+ }, Q = (f) => {
1064
+ u(f), f === "match" ? i(ve("", [], "#000000")) : (o([]), N(""), C([]), i(ke("", [])));
855
1065
  };
856
1066
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
857
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: ["match", "interpolate"].map((b) => /* @__PURE__ */ a(
1067
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: ["match", "interpolate"].map((f) => /* @__PURE__ */ a(
858
1068
  "button",
859
1069
  {
860
1070
  type: "button",
861
- onClick: () => Q(b),
1071
+ onClick: () => Q(f),
862
1072
  className: [
863
1073
  "mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-xs mapui:capitalize mapui:outline-none",
864
1074
  "focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
865
- n === b ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1075
+ p === f ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
866
1076
  ].join(" "),
867
- children: b === "match" ? "Categorical" : "Gradient"
1077
+ children: f === "match" ? "Categorical" : "Gradient"
868
1078
  },
869
- b
1079
+ f
870
1080
  )) }),
871
- n === "match" && /* @__PURE__ */ l(U, { children: [
1081
+ p === "match" && /* @__PURE__ */ l(z, { children: [
872
1082
  /* @__PURE__ */ l(
873
1083
  "select",
874
1084
  {
875
1085
  value: g,
876
- onChange: (b) => M(b.target.value),
877
- className: ee,
1086
+ onChange: (f) => F(f.target.value),
1087
+ className: ae,
878
1088
  children: [
879
1089
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
880
- j.map((b) => /* @__PURE__ */ a("option", { value: b.name, children: b.title ?? b.name }, b.name))
1090
+ O.map((f) => /* @__PURE__ */ a("option", { value: f.name, children: f.title ?? f.name }, f.name))
881
1091
  ]
882
1092
  }
883
1093
  ),
884
- y.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: y.map((b, D) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1094
+ d.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: d.map((f, D) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
885
1095
  /* @__PURE__ */ a(
886
1096
  "input",
887
1097
  {
888
1098
  type: "text",
889
- value: b.value,
890
- onChange: (A) => F(D, A.target.value),
1099
+ value: f.value,
1100
+ onChange: (I) => M(D, I.target.value),
891
1101
  placeholder: "value",
892
- className: `${ee} mapui:flex-1`
1102
+ className: `${ae} mapui:flex-1`
893
1103
  }
894
1104
  ),
895
1105
  /* @__PURE__ */ a(
896
- H,
1106
+ Z,
897
1107
  {
898
- value: b.color,
899
- onChange: (A) => P(D, A),
900
- label: `Color for "${b.value}"`
1108
+ value: f.color,
1109
+ onChange: (I) => P(D, I),
1110
+ label: `Color for "${f.value}"`
901
1111
  }
902
1112
  ),
903
- /* @__PURE__ */ a("button", { type: "button", onClick: () => f(D), className: Ce, children: "×" })
1113
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => y(D), className: Se, children: "×" })
904
1114
  ] }, D)) }),
905
1115
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
906
1116
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500 mapui:shrink-0", children: "Fallback:" }),
907
- /* @__PURE__ */ a(H, { value: w, onChange: h, label: "Fallback color" })
1117
+ /* @__PURE__ */ a(Z, { value: w, onChange: b, label: "Fallback color" })
908
1118
  ] }),
909
1119
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
910
- /* @__PURE__ */ a("button", { type: "button", onClick: k, className: oe, children: "+ Add value" }),
1120
+ /* @__PURE__ */ a("button", { type: "button", onClick: k, className: ue, children: "+ Add value" }),
911
1121
  r && g && /* @__PURE__ */ a(
912
1122
  "button",
913
1123
  {
914
1124
  type: "button",
915
- onClick: O,
916
- disabled: p,
917
- className: oe,
918
- children: p ? "Loading…" : "Auto-populate"
1125
+ onClick: j,
1126
+ disabled: n,
1127
+ className: ue,
1128
+ children: n ? "Loading…" : "Auto-populate"
919
1129
  }
920
1130
  )
921
1131
  ] })
922
1132
  ] }),
923
- n === "interpolate" && /* @__PURE__ */ l(U, { children: [
1133
+ p === "interpolate" && /* @__PURE__ */ l(z, { children: [
924
1134
  /* @__PURE__ */ l(
925
1135
  "select",
926
1136
  {
927
- value: d,
928
- onChange: (b) => G(b.target.value),
929
- className: ee,
1137
+ value: h,
1138
+ onChange: (f) => W(f.target.value),
1139
+ className: ae,
930
1140
  children: [
931
1141
  /* @__PURE__ */ a("option", { value: "", children: "Select a numeric property…" }),
932
- m.map((b) => /* @__PURE__ */ a("option", { value: b.name, children: b.title ?? b.name }, b.name))
1142
+ m.map((f) => /* @__PURE__ */ a("option", { value: f.name, children: f.title ?? f.name }, f.name))
933
1143
  ]
934
1144
  }
935
1145
  ),
936
- c.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: c.map((b, D) => {
937
- const A = v[D];
1146
+ c.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: c.map((f, D) => {
1147
+ const I = v[D];
938
1148
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
939
1149
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
940
1150
  /* @__PURE__ */ a(
@@ -942,44 +1152,44 @@ function ha({
942
1152
  {
943
1153
  type: "text",
944
1154
  inputMode: "numeric",
945
- value: b.stopText,
946
- onChange: (L) => q(D, L.target.value),
1155
+ value: f.stopText,
1156
+ onChange: (A) => U(D, A.target.value),
947
1157
  placeholder: "stop",
948
- className: `${ee} mapui:w-24`
1158
+ className: `${ae} mapui:w-24`
949
1159
  }
950
1160
  ),
951
1161
  /* @__PURE__ */ a(
952
- H,
1162
+ Z,
953
1163
  {
954
- value: b.color,
955
- onChange: (L) => z(D, L),
956
- label: `Color at stop ${b.stopText}`
1164
+ value: f.color,
1165
+ onChange: (A) => G(D, A),
1166
+ label: `Color at stop ${f.stopText}`
957
1167
  }
958
1168
  ),
959
- /* @__PURE__ */ a("button", { type: "button", onClick: () => J(D), className: Ce, children: "×" })
1169
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => J(D), className: Se, children: "×" })
960
1170
  ] }),
961
- A && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-500", children: A })
1171
+ I && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-500", children: I })
962
1172
  ] }, D);
963
1173
  }) }),
964
- /* @__PURE__ */ a("button", { type: "button", onClick: K, className: oe, children: "+ Add stop" })
1174
+ /* @__PURE__ */ a("button", { type: "button", onClick: K, className: ue, children: "+ Add stop" })
965
1175
  ] })
966
1176
  ] });
967
1177
  }
968
- const _ = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
969
- function ga({
1178
+ const Y = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1179
+ function Da({
970
1180
  value: e,
971
- onChange: t
1181
+ onChange: i
972
1182
  }) {
973
- const i = (e == null ? void 0 : e[0]) ?? 0, r = (e == null ? void 0 : e[1]) ?? 0;
1183
+ const t = (e == null ? void 0 : e[0]) ?? 0, r = (e == null ? void 0 : e[1]) ?? 0;
974
1184
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
975
1185
  /* @__PURE__ */ a(
976
1186
  "input",
977
1187
  {
978
1188
  type: "number",
979
1189
  step: 0.5,
980
- value: i,
981
- onChange: (n) => t([parseFloat(n.target.value) || 0, r]),
982
- className: `${_} mapui:w-20`,
1190
+ value: t,
1191
+ onChange: (p) => i([parseFloat(p.target.value) || 0, r]),
1192
+ className: `${Y} mapui:w-20`,
983
1193
  "aria-label": "X",
984
1194
  placeholder: "X"
985
1195
  }
@@ -990,19 +1200,19 @@ function ga({
990
1200
  type: "number",
991
1201
  step: 0.5,
992
1202
  value: r,
993
- onChange: (n) => t([i, parseFloat(n.target.value) || 0]),
994
- className: `${_} mapui:w-20`,
1203
+ onChange: (p) => i([t, parseFloat(p.target.value) || 0]),
1204
+ className: `${Y} mapui:w-20`,
995
1205
  "aria-label": "Y",
996
1206
  placeholder: "Y"
997
1207
  }
998
1208
  )
999
1209
  ] });
1000
1210
  }
1001
- function ba({
1211
+ function La({
1002
1212
  value: e,
1003
- onChange: t
1213
+ onChange: i
1004
1214
  }) {
1005
- const i = e ?? 1;
1215
+ const t = e ?? 1;
1006
1216
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1007
1217
  /* @__PURE__ */ a(
1008
1218
  "input",
@@ -1011,26 +1221,26 @@ function ba({
1011
1221
  min: 0,
1012
1222
  max: 1,
1013
1223
  step: 0.01,
1014
- value: i,
1015
- onChange: (r) => t(parseFloat(r.target.value)),
1224
+ value: t,
1225
+ onChange: (r) => i(parseFloat(r.target.value)),
1016
1226
  className: "mapui:flex-1"
1017
1227
  }
1018
1228
  ),
1019
- /* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: i.toFixed(2) })
1229
+ /* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: t.toFixed(2) })
1020
1230
  ] });
1021
1231
  }
1022
- function Se({
1232
+ function Te({
1023
1233
  def: e,
1024
- value: t,
1025
- onChange: i,
1234
+ value: i,
1235
+ onChange: t,
1026
1236
  availableIcons: r,
1027
- availableProperties: n,
1028
- onFetchDistinctValues: o
1237
+ availableProperties: p,
1238
+ onFetchDistinctValues: u
1029
1239
  }) {
1030
- var p, x;
1240
+ var n, x;
1031
1241
  switch (e.widget) {
1032
1242
  case "color": {
1033
- const s = Array.isArray(t), g = s ? t[t.length - 1] ?? "#000000" : "#000000";
1243
+ const s = Array.isArray(i), g = s ? i[i.length - 1] ?? "#000000" : "#000000";
1034
1244
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1 mapui:w-full", children: [
1035
1245
  /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:justify-end", children: /* @__PURE__ */ a(
1036
1246
  "button",
@@ -1038,7 +1248,7 @@ function Se({
1038
1248
  type: "button",
1039
1249
  title: s ? "Switch to static color" : "Switch to data-driven color",
1040
1250
  onClick: () => {
1041
- i(s ? g : ["match", ["get", ""], g]);
1251
+ t(s ? g : ["match", ["get", ""], g]);
1042
1252
  },
1043
1253
  className: [
1044
1254
  "mapui:cursor-pointer mapui:rounded mapui:border mapui:px-1.5 mapui:py-0.5 mapui:font-mono mapui:text-xs mapui:outline-none",
@@ -1049,18 +1259,18 @@ function Se({
1049
1259
  }
1050
1260
  ) }),
1051
1261
  s ? /* @__PURE__ */ a(
1052
- ha,
1262
+ Ta,
1053
1263
  {
1054
- value: t,
1055
- onChange: (y) => i(y),
1056
- availableProperties: n,
1057
- onFetchDistinctValues: o
1264
+ value: i,
1265
+ onChange: (d) => t(d),
1266
+ availableProperties: p,
1267
+ onFetchDistinctValues: u
1058
1268
  }
1059
1269
  ) : /* @__PURE__ */ a(
1060
- H,
1270
+ Z,
1061
1271
  {
1062
- value: t ?? "#000000",
1063
- onChange: i,
1272
+ value: i ?? "#000000",
1273
+ onChange: t,
1064
1274
  label: e.label
1065
1275
  }
1066
1276
  )
@@ -1068,10 +1278,10 @@ function Se({
1068
1278
  }
1069
1279
  case "opacity":
1070
1280
  return /* @__PURE__ */ a(
1071
- ba,
1281
+ La,
1072
1282
  {
1073
- value: t,
1074
- onChange: i
1283
+ value: i,
1284
+ onChange: t
1075
1285
  }
1076
1286
  );
1077
1287
  case "number":
@@ -1082,9 +1292,9 @@ function Se({
1082
1292
  min: e.min,
1083
1293
  max: e.max,
1084
1294
  step: e.step ?? 1,
1085
- value: t ?? e.min ?? 0,
1086
- onChange: (s) => i(parseFloat(s.target.value) || 0),
1087
- className: _
1295
+ value: i ?? e.min ?? 0,
1296
+ onChange: (s) => t(parseFloat(s.target.value) || 0),
1297
+ className: Y
1088
1298
  }
1089
1299
  );
1090
1300
  case "boolean":
@@ -1092,8 +1302,8 @@ function Se({
1092
1302
  "input",
1093
1303
  {
1094
1304
  type: "checkbox",
1095
- checked: t ?? !1,
1096
- onChange: (s) => i(s.target.checked),
1305
+ checked: i ?? !1,
1306
+ onChange: (s) => t(s.target.checked),
1097
1307
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1098
1308
  }
1099
1309
  );
@@ -1101,44 +1311,44 @@ function Se({
1101
1311
  return /* @__PURE__ */ a(
1102
1312
  "select",
1103
1313
  {
1104
- value: t ?? ((p = e.options) == null ? void 0 : p[0]) ?? "",
1105
- onChange: (s) => i(s.target.value),
1106
- className: _,
1314
+ value: i ?? ((n = e.options) == null ? void 0 : n[0]) ?? "",
1315
+ onChange: (s) => t(s.target.value),
1316
+ className: Y,
1107
1317
  children: (x = e.options) == null ? void 0 : x.map((s) => /* @__PURE__ */ a("option", { value: s, children: s }, s))
1108
1318
  }
1109
1319
  );
1110
1320
  case "translate":
1111
1321
  return /* @__PURE__ */ a(
1112
- ga,
1322
+ Da,
1113
1323
  {
1114
- value: t,
1115
- onChange: i
1324
+ value: i,
1325
+ onChange: t
1116
1326
  }
1117
1327
  );
1118
1328
  case "dasharray":
1119
1329
  case "stringArray": {
1120
- const s = t, g = s ? s.join(", ") : "";
1330
+ const s = i, g = s ? s.join(", ") : "";
1121
1331
  return /* @__PURE__ */ a(
1122
1332
  "input",
1123
1333
  {
1124
1334
  type: "text",
1125
1335
  value: g,
1126
- onChange: (y) => {
1127
- const w = y.target.value.trim();
1336
+ onChange: (d) => {
1337
+ const w = d.target.value.trim();
1128
1338
  if (!w) {
1129
- i(void 0);
1339
+ t(void 0);
1130
1340
  return;
1131
1341
  }
1132
1342
  if (e.widget === "dasharray") {
1133
- const c = w.split(",").map((u) => parseFloat(u.trim())).filter((u) => !isNaN(u));
1134
- i(c.length > 0 ? c : void 0);
1343
+ const c = w.split(",").map((o) => parseFloat(o.trim())).filter((o) => !isNaN(o));
1344
+ t(c.length > 0 ? c : void 0);
1135
1345
  } else {
1136
- const c = w.split(",").map((u) => u.trim()).filter(Boolean);
1137
- i(c.length > 0 ? c : void 0);
1346
+ const c = w.split(",").map((o) => o.trim()).filter(Boolean);
1347
+ t(c.length > 0 ? c : void 0);
1138
1348
  }
1139
1349
  },
1140
1350
  placeholder: e.widget === "dasharray" ? "e.g. 2, 4" : "comma-separated",
1141
- className: _
1351
+ className: Y
1142
1352
  }
1143
1353
  );
1144
1354
  }
@@ -1147,17 +1357,17 @@ function Se({
1147
1357
  "input",
1148
1358
  {
1149
1359
  type: "text",
1150
- value: t ?? "",
1151
- onChange: (s) => i(s.target.value || void 0),
1152
- className: _
1360
+ value: i ?? "",
1361
+ onChange: (s) => t(s.target.value || void 0),
1362
+ className: Y
1153
1363
  }
1154
1364
  );
1155
1365
  case "icon-image":
1156
1366
  return /* @__PURE__ */ a(
1157
- ua,
1367
+ Na,
1158
1368
  {
1159
- value: t ?? "",
1160
- onChange: (s) => i(s ?? void 0),
1369
+ value: i ?? "",
1370
+ onChange: (s) => t(s ?? void 0),
1161
1371
  availableIcons: r
1162
1372
  }
1163
1373
  );
@@ -1165,135 +1375,135 @@ function Se({
1165
1375
  return null;
1166
1376
  }
1167
1377
  }
1168
- function ya({ def: e, value: t, onChange: i, availableIcons: r, availableProperties: n, onFetchDistinctValues: o }) {
1169
- const p = e.enableDefault !== void 0, x = t !== void 0;
1170
- if (p && e.widget === "boolean") {
1378
+ function Aa({ def: e, value: i, onChange: t, availableIcons: r, availableProperties: p, onFetchDistinctValues: u }) {
1379
+ const n = e.enableDefault !== void 0, x = i !== void 0;
1380
+ if (n && e.widget === "boolean") {
1171
1381
  const s = !e.enableDefault;
1172
- return /* @__PURE__ */ a(C, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
1382
+ return /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
1173
1383
  "input",
1174
1384
  {
1175
1385
  type: "checkbox",
1176
- checked: t === s,
1386
+ checked: i === s,
1177
1387
  onChange: (g) => {
1178
- i(e.key, g.target.checked ? s : void 0);
1388
+ t(e.key, g.target.checked ? s : void 0);
1179
1389
  },
1180
1390
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1181
1391
  }
1182
1392
  ) });
1183
1393
  }
1184
- return p ? /* @__PURE__ */ a(C, { label: e.label, description: e.description, children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1394
+ return n ? /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1185
1395
  /* @__PURE__ */ a(
1186
1396
  "input",
1187
1397
  {
1188
1398
  type: "checkbox",
1189
1399
  checked: x,
1190
1400
  onChange: (s) => {
1191
- i(e.key, s.target.checked ? e.enableDefault : void 0);
1401
+ t(e.key, s.target.checked ? e.enableDefault : void 0);
1192
1402
  },
1193
1403
  className: "mapui:h-4 mapui:w-4 mapui:shrink-0 mapui:accent-blue-600"
1194
1404
  }
1195
1405
  ),
1196
1406
  x && /* @__PURE__ */ a(
1197
- Se,
1407
+ Te,
1198
1408
  {
1199
1409
  def: e,
1200
- value: t,
1201
- onChange: (s) => i(e.key, s),
1410
+ value: i,
1411
+ onChange: (s) => t(e.key, s),
1202
1412
  availableIcons: r,
1203
- availableProperties: n,
1204
- onFetchDistinctValues: o
1413
+ availableProperties: p,
1414
+ onFetchDistinctValues: u
1205
1415
  }
1206
1416
  )
1207
- ] }) }) : /* @__PURE__ */ a(C, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
1208
- Se,
1417
+ ] }) }) : /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
1418
+ Te,
1209
1419
  {
1210
1420
  def: e,
1211
- value: t,
1212
- onChange: (s) => i(e.key, s),
1421
+ value: i,
1422
+ onChange: (s) => t(e.key, s),
1213
1423
  availableIcons: r,
1214
- availableProperties: n,
1215
- onFetchDistinctValues: o
1424
+ availableProperties: p,
1425
+ onFetchDistinctValues: u
1216
1426
  }
1217
1427
  ) });
1218
1428
  }
1219
- function Te({
1429
+ function De({
1220
1430
  title: e,
1221
- properties: t,
1222
- values: i,
1431
+ properties: i,
1432
+ values: t,
1223
1433
  onChange: r,
1224
- defaultOpen: n = !1,
1225
- availableIcons: o,
1226
- availableProperties: p,
1434
+ defaultOpen: p = !1,
1435
+ availableIcons: u,
1436
+ availableProperties: n,
1227
1437
  onFetchDistinctValues: x
1228
1438
  }) {
1229
- const s = t.filter(
1230
- (g) => g.enableDefault !== void 0 && i[g.key] !== void 0
1439
+ const s = i.filter(
1440
+ (g) => g.enableDefault !== void 0 && t[g.key] !== void 0
1231
1441
  ).length;
1232
- return /* @__PURE__ */ a(X, { title: e, defaultOpen: n, badge: s || void 0, children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: t.map((g) => /* @__PURE__ */ a(
1233
- ya,
1442
+ return /* @__PURE__ */ a(X, { title: e, defaultOpen: p, badge: s || void 0, children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: i.map((g) => /* @__PURE__ */ a(
1443
+ Aa,
1234
1444
  {
1235
1445
  def: g,
1236
- value: i[g.key],
1446
+ value: t[g.key],
1237
1447
  onChange: r,
1238
- availableIcons: o,
1239
- availableProperties: p,
1448
+ availableIcons: u,
1449
+ availableProperties: n,
1240
1450
  onFetchDistinctValues: x
1241
1451
  },
1242
1452
  g.key
1243
1453
  )) }) });
1244
1454
  }
1245
- function W(e) {
1455
+ function V(e) {
1246
1456
  return Array.isArray(e);
1247
1457
  }
1248
- function fa(e) {
1458
+ function Ea(e) {
1249
1459
  return e[0] === "match" ? "match" : e[0] === "interpolate" ? "interpolate" : null;
1250
1460
  }
1251
- function ze(e) {
1461
+ function We(e) {
1252
1462
  if (e[0] === "match") {
1253
- const t = [];
1463
+ const i = [];
1254
1464
  for (let r = 3; r < e.length; r += 2)
1255
- typeof e[r] == "string" && t.push(e[r]);
1256
- const i = e[e.length - 1];
1257
- return typeof i == "string" && t.push(i), t;
1465
+ typeof e[r] == "string" && i.push(e[r]);
1466
+ const t = e[e.length - 1];
1467
+ return typeof t == "string" && i.push(t), i;
1258
1468
  }
1259
1469
  if (e[0] === "interpolate") {
1260
- const t = [];
1261
- for (let i = 4; i < e.length; i += 2)
1262
- typeof e[i] == "string" && t.push(e[i]);
1263
- return t;
1470
+ const i = [];
1471
+ for (let t = 4; t < e.length; t += 2)
1472
+ typeof e[t] == "string" && i.push(e[t]);
1473
+ return i;
1264
1474
  }
1265
1475
  return [];
1266
1476
  }
1267
- function xa(e) {
1477
+ function Ia(e) {
1268
1478
  if (e[0] === "match") {
1269
- const t = [];
1479
+ const i = [];
1270
1480
  for (let r = 2; r < e.length - 1; r += 2) {
1271
- const n = String(e[r]), o = e[r + 1];
1272
- typeof o == "string" && t.push({ label: n, color: o });
1481
+ const p = String(e[r]), u = e[r + 1];
1482
+ typeof u == "string" && i.push({ label: p, color: u });
1273
1483
  }
1274
- const i = e[e.length - 1];
1275
- return typeof i == "string" && t.push({ label: "Other", color: i }), t;
1484
+ const t = e[e.length - 1];
1485
+ return typeof t == "string" && i.push({ label: "Other", color: t }), i;
1276
1486
  }
1277
1487
  if (e[0] === "interpolate") {
1278
- const t = [];
1279
- for (let i = 3; i < e.length; i += 2) {
1280
- const r = String(e[i]), n = e[i + 1];
1281
- typeof n == "string" && t.push({ label: r, color: n });
1488
+ const i = [];
1489
+ for (let t = 3; t < e.length; t += 2) {
1490
+ const r = String(e[t]), p = e[t + 1];
1491
+ typeof p == "string" && i.push({ label: r, color: p });
1282
1492
  }
1283
- return t;
1493
+ return i;
1284
1494
  }
1285
1495
  return [];
1286
1496
  }
1287
- function wa(e) {
1288
- const t = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
1289
- if (Array.isArray(t)) {
1290
- if (t[0] === "get" && typeof t[1] == "string") return t[1];
1291
- if (t[0] === "to-number" && Array.isArray(t[1]) && t[1][0] === "get")
1292
- return t[1][1] ?? null;
1497
+ function Ma(e) {
1498
+ const i = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
1499
+ if (Array.isArray(i)) {
1500
+ if (i[0] === "get" && typeof i[1] == "string") return i[1];
1501
+ if (i[0] === "to-number" && Array.isArray(i[1]) && i[1][0] === "get")
1502
+ return i[1][1] ?? null;
1293
1503
  }
1294
1504
  return null;
1295
1505
  }
1296
- function Na(e) {
1506
+ function Fa(e) {
1297
1507
  switch (e.type) {
1298
1508
  case "fill":
1299
1509
  return e.paint["fill-color"] ?? "#000000";
@@ -1305,7 +1515,7 @@ function Na(e) {
1305
1515
  return e.paint["text-color"] ?? e.paint["icon-color"] ?? "#000000";
1306
1516
  }
1307
1517
  }
1308
- function va(e) {
1518
+ function Pa(e) {
1309
1519
  switch (e.type) {
1310
1520
  case "fill":
1311
1521
  return "square";
@@ -1316,34 +1526,34 @@ function va(e) {
1316
1526
  return "circle";
1317
1527
  }
1318
1528
  }
1319
- function ue({ expr: e, height: t }) {
1320
- const i = ze(e);
1321
- if (i.length === 0)
1529
+ function oe({ expr: e, height: i }) {
1530
+ const t = We(e);
1531
+ if (t.length === 0)
1322
1532
  return /* @__PURE__ */ a(
1323
1533
  "div",
1324
1534
  {
1325
- style: { width: "100%", height: t ?? 32, background: "#e5e7eb", borderRadius: 4 },
1535
+ style: { width: "100%", height: i ?? 32, background: "#e5e7eb", borderRadius: 4 },
1326
1536
  title: "Expression (no preview)"
1327
1537
  }
1328
1538
  );
1329
- const r = e[0] === "interpolate", n = r ? `linear-gradient(to right, ${i.join(", ")})` : i.map((o, p) => `${o} ${p / i.length * 100}% ${(p + 1) / i.length * 100}%`).join(", ");
1539
+ const r = e[0] === "interpolate", p = r ? `linear-gradient(to right, ${t.join(", ")})` : t.map((u, n) => `${u} ${n / t.length * 100}% ${(n + 1) / t.length * 100}%`).join(", ");
1330
1540
  return /* @__PURE__ */ a(
1331
1541
  "div",
1332
1542
  {
1333
1543
  style: {
1334
1544
  width: "100%",
1335
- height: t ?? 32,
1336
- background: r ? n : `linear-gradient(to right, ${n})`,
1545
+ height: i ?? 32,
1546
+ background: r ? p : `linear-gradient(to right, ${p})`,
1337
1547
  borderRadius: 4
1338
1548
  },
1339
1549
  title: "Data-driven color expression"
1340
1550
  }
1341
1551
  );
1342
1552
  }
1343
- function De(e, t) {
1344
- return typeof e == "string" ? e : W(e) ? ze(e)[0] ?? t : t;
1553
+ function Le(e, i) {
1554
+ return typeof e == "string" ? e : V(e) ? We(e)[0] ?? i : i;
1345
1555
  }
1346
- function ka({ style: e }) {
1556
+ function Oa({ style: e }) {
1347
1557
  if (e.type === "fill") {
1348
1558
  const r = e.paint["fill-color"];
1349
1559
  return /* @__PURE__ */ a(
@@ -1351,7 +1561,7 @@ function ka({ style: e }) {
1351
1561
  {
1352
1562
  className: "mapui:h-8 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200 mapui:overflow-hidden",
1353
1563
  "aria-label": "Style preview",
1354
- children: W(r) ? /* @__PURE__ */ a(ue, { expr: r, height: 32 }) : /* @__PURE__ */ a(
1564
+ children: V(r) ? /* @__PURE__ */ a(oe, { expr: r, height: 32 }) : /* @__PURE__ */ a(
1355
1565
  "div",
1356
1566
  {
1357
1567
  style: {
@@ -1359,7 +1569,7 @@ function ka({ style: e }) {
1359
1569
  height: "100%",
1360
1570
  backgroundColor: r,
1361
1571
  opacity: e.paint["fill-opacity"],
1362
- outline: e.paint["fill-outline-color"] && !W(e.paint["fill-outline-color"]) ? `2px solid ${e.paint["fill-outline-color"]}` : void 0
1572
+ outline: e.paint["fill-outline-color"] && !V(e.paint["fill-outline-color"]) ? `2px solid ${e.paint["fill-outline-color"]}` : void 0
1363
1573
  }
1364
1574
  }
1365
1575
  )
@@ -1373,7 +1583,7 @@ function ka({ style: e }) {
1373
1583
  {
1374
1584
  className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:rounded mapui:border mapui:border-gray-200 mapui:px-2",
1375
1585
  "aria-label": "Style preview",
1376
- children: W(r) ? /* @__PURE__ */ a(ue, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
1586
+ children: V(r) ? /* @__PURE__ */ a(oe, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
1377
1587
  "div",
1378
1588
  {
1379
1589
  style: {
@@ -1388,29 +1598,29 @@ function ka({ style: e }) {
1388
1598
  );
1389
1599
  }
1390
1600
  if (e.type === "circle") {
1391
- const r = e.paint["circle-color"], n = e.paint["circle-radius"] * 2;
1601
+ const r = e.paint["circle-color"], p = e.paint["circle-radius"] * 2;
1392
1602
  return /* @__PURE__ */ a(
1393
1603
  "div",
1394
1604
  {
1395
1605
  className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
1396
1606
  "aria-label": "Style preview",
1397
- children: W(r) ? /* @__PURE__ */ a("div", { style: { width: n, height: n, borderRadius: "50%", overflow: "hidden" }, children: /* @__PURE__ */ a(ue, { expr: r, height: n }) }) : /* @__PURE__ */ a(
1607
+ children: V(r) ? /* @__PURE__ */ a("div", { style: { width: p, height: p, borderRadius: "50%", overflow: "hidden" }, children: /* @__PURE__ */ a(oe, { expr: r, height: p }) }) : /* @__PURE__ */ a(
1398
1608
  "div",
1399
1609
  {
1400
1610
  style: {
1401
- width: n,
1402
- height: n,
1611
+ width: p,
1612
+ height: p,
1403
1613
  backgroundColor: r,
1404
1614
  opacity: e.paint["circle-opacity"],
1405
1615
  borderRadius: "50%",
1406
- border: e.paint["circle-stroke-color"] && !W(e.paint["circle-stroke-color"]) ? `${e.paint["circle-stroke-width"] ?? 1}px solid ${e.paint["circle-stroke-color"]}` : void 0
1616
+ border: e.paint["circle-stroke-color"] && !V(e.paint["circle-stroke-color"]) ? `${e.paint["circle-stroke-width"] ?? 1}px solid ${e.paint["circle-stroke-color"]}` : void 0
1407
1617
  }
1408
1618
  }
1409
1619
  )
1410
1620
  }
1411
1621
  );
1412
1622
  }
1413
- const t = De(e.paint["text-color"], "#333333"), i = De(e.paint["icon-color"], "#333333");
1623
+ const i = Le(e.paint["text-color"], "#333333"), t = Le(e.paint["icon-color"], "#333333");
1414
1624
  return /* @__PURE__ */ a(
1415
1625
  "div",
1416
1626
  {
@@ -1420,7 +1630,7 @@ function ka({ style: e }) {
1420
1630
  "span",
1421
1631
  {
1422
1632
  style: {
1423
- color: t ?? i ?? "#333333",
1633
+ color: i ?? t ?? "#333333",
1424
1634
  fontSize: "1.1rem",
1425
1635
  fontWeight: 600
1426
1636
  },
@@ -1430,7 +1640,7 @@ function ka({ style: e }) {
1430
1640
  }
1431
1641
  );
1432
1642
  }
1433
- const Ca = [
1643
+ const ja = [
1434
1644
  // Appearance (paint)
1435
1645
  { key: "fill-color", label: "Fill Color", widget: "color", group: "Appearance", category: "paint" },
1436
1646
  { key: "fill-opacity", label: "Fill Opacity", widget: "opacity", group: "Appearance", category: "paint" },
@@ -1442,7 +1652,7 @@ const Ca = [
1442
1652
  { key: "fill-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map", description: '"map" moves the fill with the map when panning; "viewport" keeps the offset fixed on screen.' },
1443
1653
  // Sorting (layout)
1444
1654
  { key: "fill-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
1445
- ], Sa = [
1655
+ ], $a = [
1446
1656
  // Appearance (paint)
1447
1657
  { key: "line-color", label: "Line Color", widget: "color", group: "Appearance", category: "paint" },
1448
1658
  { key: "line-width", label: "Line Width", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.5 },
@@ -1463,7 +1673,7 @@ const Ca = [
1463
1673
  { key: "line-round-limit", label: "Round Limit", widget: "number", group: "Cap & Join", category: "layout", step: 0.1, enableDefault: 1.05, description: 'When line-join is "round", angles sharper than this threshold (in radians) are bevelled instead of rounded.' },
1464
1674
  // Sorting (layout)
1465
1675
  { key: "line-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
1466
- ], Ta = [
1676
+ ], Ra = [
1467
1677
  // Appearance (paint)
1468
1678
  { key: "circle-color", label: "Circle Color", widget: "color", group: "Appearance", category: "paint" },
1469
1679
  { key: "circle-radius", label: "Radius", widget: "number", group: "Appearance", category: "paint", min: 0, step: 1 },
@@ -1481,7 +1691,7 @@ const Ca = [
1481
1691
  { key: "circle-pitch-alignment", label: "Pitch Alignment", widget: "enum", group: "Alignment", category: "paint", options: ["map", "viewport"], enableDefault: "viewport", description: '"map" orients circles flat on the map surface; "viewport" keeps circles facing the screen (default).' },
1482
1692
  // Sorting (layout)
1483
1693
  { key: "circle-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
1484
- ], Da = [
1694
+ ], Ba = [
1485
1695
  // Icon Appearance (paint)
1486
1696
  { key: "icon-color", label: "Icon Color", widget: "color", group: "Icon Appearance", category: "paint", enableDefault: "#000000" },
1487
1697
  { key: "icon-opacity", label: "Icon Opacity", widget: "opacity", group: "Icon Appearance", category: "paint", enableDefault: 1 },
@@ -1530,194 +1740,194 @@ const Ca = [
1530
1740
  { key: "symbol-avoid-edges", label: "Avoid Edges", widget: "boolean", group: "Placement", category: "layout", enableDefault: !1, description: "When enabled, symbols near tile edges are hidden to avoid being clipped or doubled at tile boundaries." },
1531
1741
  { key: "symbol-sort-key", label: "Sort Key", widget: "number", group: "Placement", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are prioritised in collision detection and drawn on top within this layer." },
1532
1742
  { key: "symbol-z-order", label: "Z-Order", widget: "enum", group: "Placement", category: "layout", options: ["auto", "viewport-y", "source"], enableDefault: "auto", description: '"viewport-y" renders symbols in top-to-bottom screen order (closer = higher); "source" preserves data source order; "auto" uses "viewport-y" when sort-key is unset.' }
1533
- ], La = {
1534
- fill: Ca,
1535
- line: Sa,
1536
- circle: Ta,
1537
- symbol: Da
1743
+ ], za = {
1744
+ fill: ja,
1745
+ line: $a,
1746
+ circle: Ra,
1747
+ symbol: Ba
1538
1748
  };
1539
- function Aa(e) {
1540
- return La[e] ?? [];
1749
+ function Ua(e) {
1750
+ return za[e] ?? [];
1541
1751
  }
1542
- function Le(e) {
1543
- const t = {};
1544
- for (const i of e)
1545
- t[i.group] || (t[i.group] = []), t[i.group].push(i);
1546
- return t;
1752
+ function Ae(e) {
1753
+ const i = {};
1754
+ for (const t of e)
1755
+ i[t.group] || (i[t.group] = []), i[t.group].push(t);
1756
+ return i;
1547
1757
  }
1548
1758
  const ge = {
1549
1759
  type: "fill",
1550
1760
  paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 }
1551
- }, Ea = {
1761
+ }, Ga = {
1552
1762
  type: "line",
1553
1763
  paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 }
1554
- }, Ge = {
1764
+ }, _e = {
1555
1765
  type: "circle",
1556
1766
  paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 }
1557
- }, Ia = {
1767
+ }, qa = {
1558
1768
  type: "symbol",
1559
1769
  paint: { "text-color": "#333333" },
1560
1770
  layout: { "text-field": "{name}", "text-size": 14 }
1561
- }, Fa = {
1771
+ }, Wa = {
1562
1772
  layout: { "icon-image": "" }
1563
1773
  };
1564
- function Ae(e) {
1774
+ function Ee(e) {
1565
1775
  if (e.type !== "symbol") return "text";
1566
- const t = e.layout ?? {}, i = "icon-image" in t, r = "text-field" in t;
1567
- return i && r ? "both" : i ? "icon" : "text";
1776
+ const i = e.layout ?? {}, t = "icon-image" in i, r = "text-field" in i;
1777
+ return t && r ? "both" : t ? "icon" : "text";
1568
1778
  }
1569
- const Ma = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", ae = {
1779
+ const _a = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", ie = {
1570
1780
  fill: "Fill",
1571
1781
  line: "Line",
1572
1782
  circle: "Circle",
1573
1783
  symbol: "Symbol"
1574
- }, Pa = ["text", "icon", "both"];
1575
- function Oa({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availableIcons: n, availableProperties: o, onFetchDistinctValues: p }) {
1576
- const x = r ?? (i ? [i] : []), [s, g] = S(() => Ae(e));
1577
- V(() => {
1578
- g(Ae(e));
1784
+ }, Va = ["text", "icon", "both"];
1785
+ function Ha({ value: e, onChange: i, suggestedType: t, suggestedTypes: r, availableIcons: p, availableProperties: u, onFetchDistinctValues: n }) {
1786
+ const x = r ?? (t ? [t] : []), [s, g] = T(() => Ee(e));
1787
+ q(() => {
1788
+ g(Ee(e));
1579
1789
  }, [e.type]);
1580
- const y = (h) => {
1581
- t(h === "fill" ? ge : h === "line" ? Ea : h === "circle" ? Ge : Ia);
1582
- }, w = (h) => {
1583
- if (h === s) return;
1584
- const F = e.paint ?? {}, P = e.layout ?? {};
1585
- let f = { ...F }, k = { ...P };
1586
- h === "icon" ? (f = Object.fromEntries(Object.entries(f).filter(([O]) => !O.startsWith("text-"))), k = Object.fromEntries(Object.entries(k).filter(([O]) => !O.startsWith("text-"))), "icon-image" in k || (k["icon-image"] = Fa.layout["icon-image"])) : h === "text" && (f = Object.fromEntries(Object.entries(f).filter(([O]) => !O.startsWith("icon-"))), k = Object.fromEntries(Object.entries(k).filter(([O]) => !O.startsWith("icon-"))), "text-field" in k || (k["text-field"] = "{name}"), "text-size" in k || (k["text-size"] = 14), "text-color" in f || (f["text-color"] = "#333333")), g(h), t({
1790
+ const d = (b) => {
1791
+ i(b === "fill" ? ge : b === "line" ? Ga : b === "circle" ? _e : qa);
1792
+ }, w = (b) => {
1793
+ if (b === s) return;
1794
+ const M = e.paint ?? {}, P = e.layout ?? {};
1795
+ let y = { ...M }, k = { ...P };
1796
+ b === "icon" ? (y = Object.fromEntries(Object.entries(y).filter(([j]) => !j.startsWith("text-"))), k = Object.fromEntries(Object.entries(k).filter(([j]) => !j.startsWith("text-"))), "icon-image" in k || (k["icon-image"] = Wa.layout["icon-image"])) : b === "text" && (y = Object.fromEntries(Object.entries(y).filter(([j]) => !j.startsWith("icon-"))), k = Object.fromEntries(Object.entries(k).filter(([j]) => !j.startsWith("icon-"))), "text-field" in k || (k["text-field"] = "{name}"), "text-size" in k || (k["text-size"] = 14), "text-color" in y || (y["text-color"] = "#333333")), g(b), i({
1587
1797
  ...e,
1588
- paint: f,
1798
+ paint: y,
1589
1799
  layout: Object.keys(k).length > 0 ? k : void 0
1590
1800
  });
1591
- }, c = (h, F) => {
1592
- const P = { ...e.paint, [h]: F };
1593
- for (const f of Object.keys(P))
1594
- P[f] === void 0 && delete P[f];
1595
- t({ ...e, paint: P });
1596
- }, u = (h, F) => {
1597
- const f = { ...e.layout ?? {}, [h]: F };
1598
- for (const k of Object.keys(f))
1599
- f[k] === void 0 && delete f[k];
1600
- t({
1801
+ }, c = (b, M) => {
1802
+ const P = { ...e.paint, [b]: M };
1803
+ for (const y of Object.keys(P))
1804
+ P[y] === void 0 && delete P[y];
1805
+ i({ ...e, paint: P });
1806
+ }, o = (b, M) => {
1807
+ const y = { ...e.layout ?? {}, [b]: M };
1808
+ for (const k of Object.keys(y))
1809
+ y[k] === void 0 && delete y[k];
1810
+ i({
1601
1811
  ...e,
1602
- layout: Object.keys(f).length > 0 ? f : void 0
1812
+ layout: Object.keys(y).length > 0 ? y : void 0
1603
1813
  });
1604
1814
  };
1605
- let d = Aa(e.type);
1606
- e.type === "symbol" && (s === "text" ? d = d.filter((h) => !h.key.startsWith("icon-")) : s === "icon" && (d = d.filter((h) => !h.key.startsWith("text-"))));
1607
- const N = d.filter((h) => h.category === "paint"), v = d.filter((h) => h.category === "layout"), T = Le(N), E = Le(v), j = e.paint, m = e.layout ?? {}, I = Object.keys(T), M = Object.keys(E);
1815
+ let h = Ua(e.type);
1816
+ e.type === "symbol" && (s === "text" ? h = h.filter((b) => !b.key.startsWith("icon-")) : s === "icon" && (h = h.filter((b) => !b.key.startsWith("text-"))));
1817
+ const N = h.filter((b) => b.category === "paint"), v = h.filter((b) => b.category === "layout"), C = Ae(N), E = Ae(v), O = e.paint, m = e.layout ?? {}, L = Object.keys(C), F = Object.keys(E);
1608
1818
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1609
1819
  x.length > 0 && !x.includes(e.type) && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-blue-800", children: [
1610
1820
  /* @__PURE__ */ l("span", { children: [
1611
1821
  "Detected geometry is suitable for",
1612
1822
  " ",
1613
- x.map((h, F) => /* @__PURE__ */ l("span", { children: [
1614
- F > 0 && (F === x.length - 1 ? " or " : ", "),
1615
- /* @__PURE__ */ a("strong", { children: ae[h] })
1616
- ] }, h)),
1823
+ x.map((b, M) => /* @__PURE__ */ l("span", { children: [
1824
+ M > 0 && (M === x.length - 1 ? " or " : ", "),
1825
+ /* @__PURE__ */ a("strong", { children: ie[b] })
1826
+ ] }, b)),
1617
1827
  " ",
1618
1828
  "style."
1619
1829
  ] }),
1620
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: x.map((h) => /* @__PURE__ */ a(
1830
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: x.map((b) => /* @__PURE__ */ a(
1621
1831
  "button",
1622
1832
  {
1623
1833
  type: "button",
1624
- onClick: () => y(h),
1834
+ onClick: () => d(b),
1625
1835
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-400 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-blue-700 hover:mapui:bg-blue-100",
1626
- children: ae[h]
1836
+ children: ie[b]
1627
1837
  },
1628
- h
1838
+ b
1629
1839
  )) })
1630
1840
  ] }),
1631
- /* @__PURE__ */ a(C, { label: "Style Type", children: /* @__PURE__ */ a(
1841
+ /* @__PURE__ */ a(S, { label: "Style Type", children: /* @__PURE__ */ a(
1632
1842
  "select",
1633
1843
  {
1634
1844
  value: e.type,
1635
- onChange: (h) => y(h.target.value),
1636
- className: Ma,
1637
- children: Object.keys(ae).map((h) => /* @__PURE__ */ a("option", { value: h, children: ae[h] }, h))
1845
+ onChange: (b) => d(b.target.value),
1846
+ className: _a,
1847
+ children: Object.keys(ie).map((b) => /* @__PURE__ */ a("option", { value: b, children: ie[b] }, b))
1638
1848
  }
1639
1849
  ) }),
1640
- e.type === "symbol" && /* @__PURE__ */ a(C, { label: "Symbol Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: Pa.map((h) => /* @__PURE__ */ a(
1850
+ e.type === "symbol" && /* @__PURE__ */ a(S, { label: "Symbol Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: Va.map((b) => /* @__PURE__ */ a(
1641
1851
  "button",
1642
1852
  {
1643
1853
  type: "button",
1644
- onClick: () => w(h),
1854
+ onClick: () => w(b),
1645
1855
  className: [
1646
1856
  "mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-sm mapui:capitalize mapui:outline-none",
1647
1857
  "focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
1648
- s === h ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1858
+ s === b ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1649
1859
  ].join(" "),
1650
- children: h === "both" ? "Both" : h.charAt(0).toUpperCase() + h.slice(1)
1860
+ children: b === "both" ? "Both" : b.charAt(0).toUpperCase() + b.slice(1)
1651
1861
  },
1652
- h
1862
+ b
1653
1863
  )) }) }),
1654
1864
  /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-100 mapui:p-2", children: [
1655
1865
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:text-gray-500", children: "Preview" }),
1656
- /* @__PURE__ */ a(ka, { style: e })
1866
+ /* @__PURE__ */ a(Oa, { style: e })
1657
1867
  ] }),
1658
- M.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1868
+ F.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1659
1869
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Layout" }),
1660
- M.map((h, F) => /* @__PURE__ */ a(
1661
- Te,
1870
+ F.map((b, M) => /* @__PURE__ */ a(
1871
+ De,
1662
1872
  {
1663
- title: h,
1664
- properties: E[h],
1873
+ title: b,
1874
+ properties: E[b],
1665
1875
  values: m,
1666
- onChange: u,
1667
- defaultOpen: F === 0,
1668
- availableIcons: n,
1669
- availableProperties: o,
1670
- onFetchDistinctValues: p
1876
+ onChange: o,
1877
+ defaultOpen: M === 0,
1878
+ availableIcons: p,
1879
+ availableProperties: u,
1880
+ onFetchDistinctValues: n
1671
1881
  },
1672
- h
1882
+ b
1673
1883
  ))
1674
1884
  ] }),
1675
- I.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1885
+ L.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1676
1886
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Paint" }),
1677
- I.map((h) => /* @__PURE__ */ a(
1678
- Te,
1887
+ L.map((b) => /* @__PURE__ */ a(
1888
+ De,
1679
1889
  {
1680
- title: h,
1681
- properties: T[h],
1682
- values: j,
1890
+ title: b,
1891
+ properties: C[b],
1892
+ values: O,
1683
1893
  onChange: c,
1684
1894
  defaultOpen: !1,
1685
- availableIcons: n,
1686
- availableProperties: o,
1687
- onFetchDistinctValues: p
1895
+ availableIcons: p,
1896
+ availableProperties: u,
1897
+ onFetchDistinctValues: n
1688
1898
  },
1689
- h
1899
+ b
1690
1900
  ))
1691
1901
  ] })
1692
1902
  ] });
1693
1903
  }
1694
- const Ee = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1695
- function ja({ value: e, onChange: t }) {
1904
+ const Ie = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1905
+ function Ya({ value: e, onChange: i }) {
1696
1906
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1697
- /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
1907
+ /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
1698
1908
  "input",
1699
1909
  {
1700
1910
  type: "text",
1701
1911
  value: e.label,
1702
- onChange: (i) => t({ ...e, label: i.target.value }),
1912
+ onChange: (t) => i({ ...e, label: t.target.value }),
1703
1913
  placeholder: "Legend entry label",
1704
- className: Ee
1914
+ className: Ie
1705
1915
  }
1706
1916
  ) }),
1707
- /* @__PURE__ */ a(C, { label: "Color", children: /* @__PURE__ */ a(
1708
- H,
1917
+ /* @__PURE__ */ a(S, { label: "Color", children: /* @__PURE__ */ a(
1918
+ Z,
1709
1919
  {
1710
1920
  value: e.color,
1711
- onChange: (i) => t({ ...e, color: i }),
1921
+ onChange: (t) => i({ ...e, color: t }),
1712
1922
  label: "Entry color"
1713
1923
  }
1714
1924
  ) }),
1715
- /* @__PURE__ */ a(C, { label: "Shape", children: /* @__PURE__ */ l(
1925
+ /* @__PURE__ */ a(S, { label: "Shape", children: /* @__PURE__ */ l(
1716
1926
  "select",
1717
1927
  {
1718
1928
  value: e.shape ?? "square",
1719
- onChange: (i) => t({ ...e, shape: i.target.value }),
1720
- className: Ee,
1929
+ onChange: (t) => i({ ...e, shape: t.target.value }),
1930
+ className: Ie,
1721
1931
  children: [
1722
1932
  /* @__PURE__ */ a("option", { value: "square", children: "Square" }),
1723
1933
  /* @__PURE__ */ a("option", { value: "circle", children: "Circle" }),
@@ -1727,43 +1937,43 @@ function ja({ value: e, onChange: t }) {
1727
1937
  ) })
1728
1938
  ] });
1729
1939
  }
1730
- const Ie = () => ({ label: "", color: "#4a90d9", shape: "square" }), me = 8, Fe = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1731
- function $a({ value: e, onChange: t, styles: i }) {
1732
- const r = (e == null ? void 0 : e.entries) ?? [], n = (e == null ? void 0 : e.displayMode) ?? "simple", o = Be(() => {
1733
- if (!i || i.length === 0) return null;
1940
+ const Me = () => ({ label: "", color: "#4a90d9", shape: "square" }), me = 8, Fe = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1941
+ function Xa({ value: e, onChange: i, styles: t }) {
1942
+ const r = (e == null ? void 0 : e.entries) ?? [], p = (e == null ? void 0 : e.displayMode) ?? "simple", u = Ue(() => {
1943
+ if (!t || t.length === 0) return null;
1734
1944
  const c = [];
1735
- let u = "simple", d = null;
1736
- for (const N of i) {
1737
- const v = Na(N), T = va(N);
1738
- if (W(v)) {
1739
- const E = fa(v);
1945
+ let o = "simple", h = null;
1946
+ for (const N of t) {
1947
+ const v = Fa(N), C = Pa(N);
1948
+ if (V(v)) {
1949
+ const E = Ea(v);
1740
1950
  if (!E) continue;
1741
- const j = xa(v).map((m) => ({ label: m.label, color: m.color, shape: T }));
1742
- c.push(...j), E === "interpolate" ? (u = "gradient", d || (d = wa(v))) : u === "simple" && (u = "categorical");
1743
- } else typeof v == "string" && c.length === 0 && c.push({ label: N.type, color: v, shape: T });
1951
+ const O = Ia(v).map((m) => ({ label: m.label, color: m.color, shape: C }));
1952
+ c.push(...O), E === "interpolate" ? (o = "gradient", h || (h = Ma(v))) : o === "simple" && (o = "categorical");
1953
+ } else typeof v == "string" && c.length === 0 && c.push({ label: N.type, color: v, shape: C });
1744
1954
  }
1745
- return c.length === 0 ? null : { entries: c, mode: u, property: d };
1746
- }, [i]), p = () => {
1747
- t({ ...e, entries: [...r, Ie()] });
1748
- }, x = (c, u) => {
1749
- const d = r.map((N, v) => v === c ? u : N);
1750
- t({ ...e, entries: d });
1955
+ return c.length === 0 ? null : { entries: c, mode: o, property: h };
1956
+ }, [t]), n = () => {
1957
+ i({ ...e, entries: [...r, Me()] });
1958
+ }, x = (c, o) => {
1959
+ const h = r.map((N, v) => v === c ? o : N);
1960
+ i({ ...e, entries: h });
1751
1961
  }, s = (c) => {
1752
- const u = r.filter((d, N) => N !== c);
1753
- t(u.length > 0 ? { ...e, entries: u } : void 0);
1962
+ const o = r.filter((h, N) => N !== c);
1963
+ i(o.length > 0 ? { ...e, entries: o } : void 0);
1754
1964
  }, g = (c) => {
1755
- t(c ? { entries: [Ie()] } : void 0);
1756
- }, y = () => {
1757
- o && t({
1758
- entries: o.entries,
1759
- displayMode: o.mode,
1760
- ...o.mode === "gradient" && o.property ? { gradientProperty: o.property } : {},
1761
- ...o.mode === "categorical" ? { showLabelsCollapsed: !1 } : {}
1965
+ i(c ? { entries: [Me()] } : void 0);
1966
+ }, d = () => {
1967
+ u && i({
1968
+ entries: u.entries,
1969
+ displayMode: u.mode,
1970
+ ...u.mode === "gradient" && u.property ? { gradientProperty: u.property } : {},
1971
+ ...u.mode === "categorical" ? { showLabelsCollapsed: !1 } : {}
1762
1972
  });
1763
1973
  }, w = (c) => {
1764
1974
  if (!e) return;
1765
- const u = { ...e, displayMode: c };
1766
- c !== "categorical" && delete u.showLabelsCollapsed, c !== "categorical" && c !== "gradient" && delete u.showColorBar, c !== "gradient" && delete u.gradientProperty, c === "simple" && delete u.showDisclosureArrow, t(u);
1975
+ const o = { ...e, displayMode: c };
1976
+ c !== "categorical" && delete o.showLabelsCollapsed, c !== "categorical" && c !== "gradient" && delete o.showColorBar, c !== "gradient" && delete o.gradientProperty, c === "simple" && delete o.showDisclosureArrow, i(o);
1767
1977
  };
1768
1978
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1769
1979
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
@@ -1779,10 +1989,10 @@ function $a({ value: e, onChange: t, styles: i }) {
1779
1989
  ),
1780
1990
  /* @__PURE__ */ a("label", { htmlFor: "legend-enabled", className: "mapui:text-sm mapui:font-medium mapui:text-gray-700", children: "Enable Legend" })
1781
1991
  ] }),
1782
- e === void 0 && o && o.entries.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
1783
- /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-blue-800", children: o.mode !== "simple" ? `This layer uses data-driven colors (${o.entries.length} ${o.entries.length === 1 ? "category" : "categories"})` : `This layer has ${o.entries.length} style ${o.entries.length === 1 ? "color" : "colors"}` }),
1992
+ e === void 0 && u && u.entries.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
1993
+ /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-blue-800", children: u.mode !== "simple" ? `This layer uses data-driven colors (${u.entries.length} ${u.entries.length === 1 ? "category" : "categories"})` : `This layer has ${u.entries.length} style ${u.entries.length === 1 ? "color" : "colors"}` }),
1784
1994
  /* @__PURE__ */ l("div", { className: "mapui:mt-2 mapui:flex mapui:flex-wrap mapui:items-center mapui:gap-1.5", children: [
1785
- o.entries.slice(0, me).map((c, u) => /* @__PURE__ */ l(
1995
+ u.entries.slice(0, me).map((c, o) => /* @__PURE__ */ l(
1786
1996
  "div",
1787
1997
  {
1788
1998
  className: "mapui:flex mapui:items-center mapui:gap-1",
@@ -1798,11 +2008,11 @@ function $a({ value: e, onChange: t, styles: i }) {
1798
2008
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-blue-700 mapui:truncate mapui:max-w-16", children: c.label })
1799
2009
  ]
1800
2010
  },
1801
- `${c.label}-${u}`
2011
+ `${c.label}-${o}`
1802
2012
  )),
1803
- o.entries.length > me && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-blue-600", children: [
2013
+ u.entries.length > me && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-blue-600", children: [
1804
2014
  "+",
1805
- o.entries.length - me,
2015
+ u.entries.length - me,
1806
2016
  " more"
1807
2017
  ] })
1808
2018
  ] }),
@@ -1810,20 +2020,20 @@ function $a({ value: e, onChange: t, styles: i }) {
1810
2020
  "button",
1811
2021
  {
1812
2022
  type: "button",
1813
- onClick: y,
2023
+ onClick: d,
1814
2024
  className: "mapui:mt-2 mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-300 mapui:bg-white mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-blue-700 hover:mapui:bg-blue-100",
1815
2025
  children: "Generate from Style"
1816
2026
  }
1817
2027
  )
1818
2028
  ] }),
1819
- e !== void 0 && /* @__PURE__ */ l(U, { children: [
2029
+ e !== void 0 && /* @__PURE__ */ l(z, { children: [
1820
2030
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1821
2031
  /* @__PURE__ */ a("label", { htmlFor: "legend-display-mode", className: "mapui:text-sm mapui:text-gray-700", children: "Display Mode" }),
1822
2032
  /* @__PURE__ */ l(
1823
2033
  "select",
1824
2034
  {
1825
2035
  id: "legend-display-mode",
1826
- value: n,
2036
+ value: p,
1827
2037
  onChange: (c) => w(c.target.value),
1828
2038
  className: Fe,
1829
2039
  children: [
@@ -1834,46 +2044,46 @@ function $a({ value: e, onChange: t, styles: i }) {
1834
2044
  }
1835
2045
  )
1836
2046
  ] }),
1837
- n === "categorical" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2047
+ p === "categorical" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1838
2048
  /* @__PURE__ */ a(
1839
2049
  "input",
1840
2050
  {
1841
2051
  type: "checkbox",
1842
2052
  id: "legend-show-labels-collapsed",
1843
2053
  checked: e.showLabelsCollapsed ?? !1,
1844
- onChange: (c) => t({ ...e, showLabelsCollapsed: c.target.checked }),
2054
+ onChange: (c) => i({ ...e, showLabelsCollapsed: c.target.checked }),
1845
2055
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1846
2056
  }
1847
2057
  ),
1848
2058
  /* @__PURE__ */ a("label", { htmlFor: "legend-show-labels-collapsed", className: "mapui:text-sm mapui:text-gray-700", children: "Show labels in collapsed view" })
1849
2059
  ] }),
1850
- (n === "categorical" || n === "gradient") && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2060
+ (p === "categorical" || p === "gradient") && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1851
2061
  /* @__PURE__ */ a(
1852
2062
  "input",
1853
2063
  {
1854
2064
  type: "checkbox",
1855
2065
  id: "legend-show-color-bar",
1856
2066
  checked: e.showColorBar !== !1,
1857
- onChange: (c) => t({ ...e, showColorBar: c.target.checked }),
2067
+ onChange: (c) => i({ ...e, showColorBar: c.target.checked }),
1858
2068
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1859
2069
  }
1860
2070
  ),
1861
2071
  /* @__PURE__ */ a("label", { htmlFor: "legend-show-color-bar", className: "mapui:text-sm mapui:text-gray-700", children: "Show color bar" })
1862
2072
  ] }),
1863
- (n === "categorical" || n === "gradient") && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2073
+ (p === "categorical" || p === "gradient") && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1864
2074
  /* @__PURE__ */ a(
1865
2075
  "input",
1866
2076
  {
1867
2077
  type: "checkbox",
1868
2078
  id: "legend-show-disclosure-arrow",
1869
2079
  checked: e.showDisclosureArrow !== !1,
1870
- onChange: (c) => t({ ...e, showDisclosureArrow: c.target.checked }),
2080
+ onChange: (c) => i({ ...e, showDisclosureArrow: c.target.checked }),
1871
2081
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1872
2082
  }
1873
2083
  ),
1874
2084
  /* @__PURE__ */ a("label", { htmlFor: "legend-show-disclosure-arrow", className: "mapui:text-sm mapui:text-gray-700", children: "Show disclosure arrow" })
1875
2085
  ] }),
1876
- n === "gradient" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2086
+ p === "gradient" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1877
2087
  /* @__PURE__ */ a("label", { htmlFor: "legend-gradient-property", className: "mapui:text-sm mapui:text-gray-700", children: "Gradient Label" }),
1878
2088
  /* @__PURE__ */ a(
1879
2089
  "input",
@@ -1881,13 +2091,13 @@ function $a({ value: e, onChange: t, styles: i }) {
1881
2091
  type: "text",
1882
2092
  id: "legend-gradient-property",
1883
2093
  value: e.gradientProperty ?? "",
1884
- onChange: (c) => t({ ...e, gradientProperty: c.target.value || void 0 }),
2094
+ onChange: (c) => i({ ...e, gradientProperty: c.target.value || void 0 }),
1885
2095
  placeholder: "e.g. Population",
1886
2096
  className: Fe
1887
2097
  }
1888
2098
  )
1889
2099
  ] }),
1890
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: r.map((c, u) => /* @__PURE__ */ l(
2100
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: r.map((c, o) => /* @__PURE__ */ l(
1891
2101
  "li",
1892
2102
  {
1893
2103
  className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:p-3",
@@ -1895,48 +2105,48 @@ function $a({ value: e, onChange: t, styles: i }) {
1895
2105
  /* @__PURE__ */ l("div", { className: "mapui:mb-2 mapui:flex mapui:items-center mapui:justify-between", children: [
1896
2106
  /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: [
1897
2107
  "Entry ",
1898
- u + 1
2108
+ o + 1
1899
2109
  ] }),
1900
2110
  /* @__PURE__ */ a(
1901
2111
  "button",
1902
2112
  {
1903
2113
  type: "button",
1904
- onClick: () => s(u),
2114
+ onClick: () => s(o),
1905
2115
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
1906
2116
  children: "Remove"
1907
2117
  }
1908
2118
  )
1909
2119
  ] }),
1910
2120
  /* @__PURE__ */ a(
1911
- ja,
2121
+ Ya,
1912
2122
  {
1913
2123
  value: c,
1914
- onChange: (d) => x(u, d)
2124
+ onChange: (h) => x(o, h)
1915
2125
  }
1916
2126
  )
1917
2127
  ]
1918
2128
  },
1919
- u
2129
+ o
1920
2130
  )) }),
1921
2131
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
1922
2132
  /* @__PURE__ */ a(
1923
2133
  "button",
1924
2134
  {
1925
2135
  type: "button",
1926
- onClick: p,
2136
+ onClick: n,
1927
2137
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-dashed mapui:border-gray-300 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-600 hover:mapui:border-blue-400 hover:mapui:text-blue-600",
1928
2138
  children: "+ Add Entry"
1929
2139
  }
1930
2140
  ),
1931
- o && o.entries.length > 0 && /* @__PURE__ */ l(
2141
+ u && u.entries.length > 0 && /* @__PURE__ */ l(
1932
2142
  "button",
1933
2143
  {
1934
2144
  type: "button",
1935
- onClick: y,
2145
+ onClick: d,
1936
2146
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-300 mapui:bg-white mapui:px-3 mapui:py-2 mapui:text-sm mapui:font-medium mapui:text-blue-700 hover:mapui:bg-blue-50",
1937
2147
  children: [
1938
2148
  "Populate from Style (",
1939
- o.entries.length,
2149
+ u.entries.length,
1940
2150
  " entries)"
1941
2151
  ]
1942
2152
  }
@@ -1945,46 +2155,46 @@ function $a({ value: e, onChange: t, styles: i }) {
1945
2155
  ] })
1946
2156
  ] });
1947
2157
  }
1948
- function Me({
2158
+ function Pe({
1949
2159
  options: e,
1950
- onChange: t,
1951
- placeholder: i,
2160
+ onChange: i,
2161
+ placeholder: t,
1952
2162
  className: r
1953
2163
  }) {
1954
- const [n, o] = S(() => (e == null ? void 0 : e.join(", ")) ?? "");
1955
- return V(() => {
1956
- o((e == null ? void 0 : e.join(", ")) ?? "");
2164
+ const [p, u] = T(() => (e == null ? void 0 : e.join(", ")) ?? "");
2165
+ return q(() => {
2166
+ u((e == null ? void 0 : e.join(", ")) ?? "");
1957
2167
  }, [e == null ? void 0 : e.join(",")]), /* @__PURE__ */ a(
1958
2168
  "input",
1959
2169
  {
1960
2170
  type: "text",
1961
- value: n,
1962
- onChange: (x) => o(x.target.value),
2171
+ value: p,
2172
+ onChange: (x) => u(x.target.value),
1963
2173
  onBlur: () => {
1964
- const x = n.trim(), s = x ? x.split(",").map((g) => g.trim()).filter(Boolean) : void 0;
1965
- t(s), o((s == null ? void 0 : s.join(", ")) ?? "");
2174
+ const x = p.trim(), s = x ? x.split(",").map((g) => g.trim()).filter(Boolean) : void 0;
2175
+ i(s), u((s == null ? void 0 : s.join(", ")) ?? "");
1966
2176
  },
1967
- placeholder: i,
2177
+ placeholder: t,
1968
2178
  className: r
1969
2179
  }
1970
2180
  );
1971
2181
  }
1972
- const $ = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", Ra = {
2182
+ const $ = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", Za = {
1973
2183
  text: { type: "text", property: "", label: "", autocomplete: !1 },
1974
2184
  number: { type: "number", property: "", label: "", inputMode: "input", operator: "eq" },
1975
2185
  datetime: { type: "datetime", property: "", label: "", range: !1 },
1976
2186
  select: { type: "select", property: "", label: "" }
1977
2187
  };
1978
- function Ba({ value: e, onChange: t, availableProperties: i }) {
1979
- const r = (p) => {
1980
- t({ ...Ra[p], property: e.property, label: e.label });
1981
- }, n = (p) => t({ ...e, ...p }), o = i && i.length > 0;
2188
+ function Ja({ value: e, onChange: i, availableProperties: t }) {
2189
+ const r = (n) => {
2190
+ i({ ...Za[n], property: e.property, label: e.label });
2191
+ }, p = (n) => i({ ...e, ...n }), u = t && t.length > 0;
1982
2192
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1983
- /* @__PURE__ */ a(C, { label: "Field Type", children: /* @__PURE__ */ l(
2193
+ /* @__PURE__ */ a(S, { label: "Field Type", children: /* @__PURE__ */ l(
1984
2194
  "select",
1985
2195
  {
1986
2196
  value: e.type,
1987
- onChange: (p) => r(p.target.value),
2197
+ onChange: (n) => r(n.target.value),
1988
2198
  className: $,
1989
2199
  children: [
1990
2200
  /* @__PURE__ */ a("option", { value: "text", children: "Text" }),
@@ -1994,15 +2204,15 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
1994
2204
  ]
1995
2205
  }
1996
2206
  ) }),
1997
- /* @__PURE__ */ a(C, { label: "Property", required: !0, children: o ? /* @__PURE__ */ l(
2207
+ /* @__PURE__ */ a(S, { label: "Property", required: !0, children: u ? /* @__PURE__ */ l(
1998
2208
  "select",
1999
2209
  {
2000
2210
  value: e.property,
2001
- onChange: (p) => n({ property: p.target.value }),
2211
+ onChange: (n) => p({ property: n.target.value }),
2002
2212
  className: $,
2003
2213
  children: [
2004
2214
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
2005
- i.map((p) => /* @__PURE__ */ a("option", { value: p.name, children: p.title ?? p.name }, p.name))
2215
+ t.map((n) => /* @__PURE__ */ a("option", { value: n.name, children: n.title ?? n.name }, n.name))
2006
2216
  ]
2007
2217
  }
2008
2218
  ) : /* @__PURE__ */ a(
@@ -2010,32 +2220,32 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2010
2220
  {
2011
2221
  type: "text",
2012
2222
  value: e.property,
2013
- onChange: (p) => n({ property: p.target.value }),
2223
+ onChange: (n) => p({ property: n.target.value }),
2014
2224
  placeholder: "e.g. name",
2015
2225
  className: $
2016
2226
  }
2017
2227
  ) }),
2018
- /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
2228
+ /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
2019
2229
  "input",
2020
2230
  {
2021
2231
  type: "text",
2022
2232
  value: e.label,
2023
- onChange: (p) => n({ label: p.target.value }),
2233
+ onChange: (n) => p({ label: n.target.value }),
2024
2234
  placeholder: "Display label",
2025
2235
  className: $
2026
2236
  }
2027
2237
  ) }),
2028
- /* @__PURE__ */ a(C, { label: "Placeholder", children: /* @__PURE__ */ a(
2238
+ /* @__PURE__ */ a(S, { label: "Placeholder", children: /* @__PURE__ */ a(
2029
2239
  "input",
2030
2240
  {
2031
2241
  type: "text",
2032
2242
  value: e.placeholder ?? "",
2033
- onChange: (p) => n({ placeholder: p.target.value || void 0 }),
2243
+ onChange: (n) => p({ placeholder: n.target.value || void 0 }),
2034
2244
  placeholder: "Input placeholder text",
2035
2245
  className: $
2036
2246
  }
2037
2247
  ) }),
2038
- e.type === "text" && /* @__PURE__ */ l(U, { children: [
2248
+ e.type === "text" && /* @__PURE__ */ l(z, { children: [
2039
2249
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2040
2250
  /* @__PURE__ */ a(
2041
2251
  "input",
@@ -2043,7 +2253,7 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2043
2253
  type: "checkbox",
2044
2254
  id: "text-autocomplete",
2045
2255
  checked: e.autocomplete ?? !1,
2046
- onChange: (p) => t({ ...e, autocomplete: p.target.checked }),
2256
+ onChange: (n) => i({ ...e, autocomplete: n.target.checked }),
2047
2257
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2048
2258
  }
2049
2259
  ),
@@ -2056,7 +2266,7 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2056
2266
  type: "checkbox",
2057
2267
  id: "text-prefetch",
2058
2268
  checked: e.prefetch ?? !1,
2059
- onChange: (p) => t({ ...e, prefetch: p.target.checked }),
2269
+ onChange: (n) => i({ ...e, prefetch: n.target.checked }),
2060
2270
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2061
2271
  }
2062
2272
  ),
@@ -2069,30 +2279,30 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2069
2279
  type: "checkbox",
2070
2280
  id: "text-zoomTo",
2071
2281
  checked: e.zoomTo ?? !1,
2072
- onChange: (p) => t({ ...e, zoomTo: p.target.checked }),
2282
+ onChange: (n) => i({ ...e, zoomTo: n.target.checked }),
2073
2283
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2074
2284
  }
2075
2285
  ),
2076
2286
  /* @__PURE__ */ a("label", { htmlFor: "text-zoomTo", className: "mapui:text-sm mapui:text-gray-700", children: "Zoom to Result" })
2077
2287
  ] }),
2078
- /* @__PURE__ */ a(C, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
2079
- Me,
2288
+ /* @__PURE__ */ a(S, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
2289
+ Pe,
2080
2290
  {
2081
2291
  options: e.options,
2082
- onChange: (p) => t({ ...e, options: p }),
2292
+ onChange: (n) => i({ ...e, options: n }),
2083
2293
  placeholder: "option1, option2",
2084
2294
  className: $
2085
2295
  }
2086
2296
  ) })
2087
2297
  ] }),
2088
- e.type === "number" && /* @__PURE__ */ l(U, { children: [
2089
- /* @__PURE__ */ a(C, { label: "Input Mode", children: /* @__PURE__ */ l(
2298
+ e.type === "number" && /* @__PURE__ */ l(z, { children: [
2299
+ /* @__PURE__ */ a(S, { label: "Input Mode", children: /* @__PURE__ */ l(
2090
2300
  "select",
2091
2301
  {
2092
2302
  value: e.inputMode ?? "input",
2093
- onChange: (p) => t({
2303
+ onChange: (n) => i({
2094
2304
  ...e,
2095
- inputMode: p.target.value
2305
+ inputMode: n.target.value
2096
2306
  }),
2097
2307
  className: $,
2098
2308
  children: [
@@ -2101,13 +2311,13 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2101
2311
  ]
2102
2312
  }
2103
2313
  ) }),
2104
- /* @__PURE__ */ a(C, { label: "Operator", children: /* @__PURE__ */ l(
2314
+ /* @__PURE__ */ a(S, { label: "Operator", children: /* @__PURE__ */ l(
2105
2315
  "select",
2106
2316
  {
2107
2317
  value: e.operator ?? "eq",
2108
- onChange: (p) => t({
2318
+ onChange: (n) => i({
2109
2319
  ...e,
2110
- operator: p.target.value
2320
+ operator: n.target.value
2111
2321
  }),
2112
2322
  className: $,
2113
2323
  children: [
@@ -2120,13 +2330,13 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2120
2330
  ]
2121
2331
  }
2122
2332
  ) }),
2123
- /* @__PURE__ */ a(C, { label: "Operator Labels", children: /* @__PURE__ */ l(
2333
+ /* @__PURE__ */ a(S, { label: "Operator Labels", children: /* @__PURE__ */ l(
2124
2334
  "select",
2125
2335
  {
2126
2336
  value: e.operatorLabelStyle ?? "symbol",
2127
- onChange: (p) => t({
2337
+ onChange: (n) => i({
2128
2338
  ...e,
2129
- operatorLabelStyle: p.target.value
2339
+ operatorLabelStyle: n.target.value
2130
2340
  }),
2131
2341
  className: $,
2132
2342
  children: [
@@ -2142,45 +2352,45 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2142
2352
  type: "checkbox",
2143
2353
  id: "number-show-range",
2144
2354
  checked: e.showRange ?? !1,
2145
- onChange: (p) => t({ ...e, showRange: p.target.checked }),
2355
+ onChange: (n) => i({ ...e, showRange: n.target.checked }),
2146
2356
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2147
2357
  }
2148
2358
  ),
2149
2359
  /* @__PURE__ */ a("label", { htmlFor: "number-show-range", className: "mapui:text-sm mapui:text-gray-700", children: "Show Range on Slider" })
2150
2360
  ] }),
2151
2361
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-3 mapui:gap-2", children: [
2152
- /* @__PURE__ */ a(C, { label: "Min", children: /* @__PURE__ */ a(
2362
+ /* @__PURE__ */ a(S, { label: "Min", children: /* @__PURE__ */ a(
2153
2363
  "input",
2154
2364
  {
2155
2365
  type: "number",
2156
2366
  value: e.min ?? "",
2157
- onChange: (p) => t({
2367
+ onChange: (n) => i({
2158
2368
  ...e,
2159
- min: p.target.value ? parseFloat(p.target.value) : void 0
2369
+ min: n.target.value ? parseFloat(n.target.value) : void 0
2160
2370
  }),
2161
2371
  className: $
2162
2372
  }
2163
2373
  ) }),
2164
- /* @__PURE__ */ a(C, { label: "Max", children: /* @__PURE__ */ a(
2374
+ /* @__PURE__ */ a(S, { label: "Max", children: /* @__PURE__ */ a(
2165
2375
  "input",
2166
2376
  {
2167
2377
  type: "number",
2168
2378
  value: e.max ?? "",
2169
- onChange: (p) => t({
2379
+ onChange: (n) => i({
2170
2380
  ...e,
2171
- max: p.target.value ? parseFloat(p.target.value) : void 0
2381
+ max: n.target.value ? parseFloat(n.target.value) : void 0
2172
2382
  }),
2173
2383
  className: $
2174
2384
  }
2175
2385
  ) }),
2176
- /* @__PURE__ */ a(C, { label: "Step", children: /* @__PURE__ */ a(
2386
+ /* @__PURE__ */ a(S, { label: "Step", children: /* @__PURE__ */ a(
2177
2387
  "input",
2178
2388
  {
2179
2389
  type: "number",
2180
2390
  value: e.step ?? "",
2181
- onChange: (p) => t({
2391
+ onChange: (n) => i({
2182
2392
  ...e,
2183
- step: p.target.value ? parseFloat(p.target.value) : void 0
2393
+ step: n.target.value ? parseFloat(n.target.value) : void 0
2184
2394
  }),
2185
2395
  className: $
2186
2396
  }
@@ -2194,13 +2404,13 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2194
2404
  type: "checkbox",
2195
2405
  id: "datetime-range",
2196
2406
  checked: e.range ?? !1,
2197
- onChange: (p) => t({ ...e, range: p.target.checked }),
2407
+ onChange: (n) => i({ ...e, range: n.target.checked }),
2198
2408
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2199
2409
  }
2200
2410
  ),
2201
2411
  /* @__PURE__ */ a("label", { htmlFor: "datetime-range", className: "mapui:text-sm mapui:text-gray-700", children: "Date Range" })
2202
2412
  ] }),
2203
- e.type === "select" && /* @__PURE__ */ l(U, { children: [
2413
+ e.type === "select" && /* @__PURE__ */ l(z, { children: [
2204
2414
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2205
2415
  /* @__PURE__ */ a(
2206
2416
  "input",
@@ -2208,7 +2418,7 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2208
2418
  type: "checkbox",
2209
2419
  id: "select-prefetch",
2210
2420
  checked: e.prefetch ?? !1,
2211
- onChange: (p) => t({ ...e, prefetch: p.target.checked }),
2421
+ onChange: (n) => i({ ...e, prefetch: n.target.checked }),
2212
2422
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2213
2423
  }
2214
2424
  ),
@@ -2221,17 +2431,17 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2221
2431
  type: "checkbox",
2222
2432
  id: "select-zoomTo",
2223
2433
  checked: e.zoomTo ?? !1,
2224
- onChange: (p) => t({ ...e, zoomTo: p.target.checked }),
2434
+ onChange: (n) => i({ ...e, zoomTo: n.target.checked }),
2225
2435
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2226
2436
  }
2227
2437
  ),
2228
2438
  /* @__PURE__ */ a("label", { htmlFor: "select-zoomTo", className: "mapui:text-sm mapui:text-gray-700", children: "Zoom to Result" })
2229
2439
  ] }),
2230
- /* @__PURE__ */ a(C, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
2231
- Me,
2440
+ /* @__PURE__ */ a(S, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
2441
+ Pe,
2232
2442
  {
2233
2443
  options: e.options,
2234
- onChange: (p) => t({ ...e, options: p }),
2444
+ onChange: (n) => i({ ...e, options: n }),
2235
2445
  placeholder: "option1, option2",
2236
2446
  className: $
2237
2447
  }
@@ -2239,32 +2449,32 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2239
2449
  ] })
2240
2450
  ] });
2241
2451
  }
2242
- const Ua = () => ({
2452
+ const Ka = () => ({
2243
2453
  type: "text",
2244
2454
  property: "",
2245
2455
  label: "",
2246
2456
  autocomplete: !1
2247
2457
  });
2248
- function qa({ fields: e, onChange: t, availableProperties: i }) {
2249
- const [r, n] = S(null), o = () => {
2250
- const y = [...e, Ua()];
2251
- t(y), n(y.length - 1);
2252
- }, p = (y, w) => {
2253
- t(e.map((c, u) => u === y ? w : c));
2254
- }, x = (y) => {
2255
- t(e.filter((w, c) => c !== y)), n(null);
2256
- }, s = (y) => {
2257
- if (y === 0) return;
2458
+ function Qa({ fields: e, onChange: i, availableProperties: t }) {
2459
+ const [r, p] = T(null), u = () => {
2460
+ const d = [...e, Ka()];
2461
+ i(d), p(d.length - 1);
2462
+ }, n = (d, w) => {
2463
+ i(e.map((c, o) => o === d ? w : c));
2464
+ }, x = (d) => {
2465
+ i(e.filter((w, c) => c !== d)), p(null);
2466
+ }, s = (d) => {
2467
+ if (d === 0) return;
2258
2468
  const w = [...e];
2259
- [w[y - 1], w[y]] = [w[y], w[y - 1]], t(w), n(y - 1);
2260
- }, g = (y) => {
2261
- if (y === e.length - 1) return;
2469
+ [w[d - 1], w[d]] = [w[d], w[d - 1]], i(w), p(d - 1);
2470
+ }, g = (d) => {
2471
+ if (d === e.length - 1) return;
2262
2472
  const w = [...e];
2263
- [w[y], w[y + 1]] = [w[y + 1], w[y]], t(w), n(y + 1);
2473
+ [w[d], w[d + 1]] = [w[d + 1], w[d]], i(w), p(d + 1);
2264
2474
  };
2265
2475
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2266
2476
  e.length === 0 && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No search fields configured." }),
2267
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((y, w) => /* @__PURE__ */ l("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
2477
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((d, w) => /* @__PURE__ */ l("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
2268
2478
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:px-3 mapui:py-2", children: [
2269
2479
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
2270
2480
  /* @__PURE__ */ a(
@@ -2294,11 +2504,11 @@ function qa({ fields: e, onChange: t, availableProperties: i }) {
2294
2504
  "button",
2295
2505
  {
2296
2506
  type: "button",
2297
- onClick: () => n(r === w ? null : w),
2507
+ onClick: () => p(r === w ? null : w),
2298
2508
  className: "mapui:flex-1 mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:text-left mapui:text-sm mapui:font-medium mapui:text-gray-800",
2299
2509
  children: [
2300
- /* @__PURE__ */ a("span", { className: "mapui:mr-1 mapui:rounded mapui:bg-gray-100 mapui:px-1 mapui:py-0.5 mapui:text-xs mapui:font-mono mapui:text-gray-500", children: y.type }),
2301
- y.label || y.property || "Untitled field"
2510
+ /* @__PURE__ */ a("span", { className: "mapui:mr-1 mapui:rounded mapui:bg-gray-100 mapui:px-1 mapui:py-0.5 mapui:text-xs mapui:font-mono mapui:text-gray-500", children: d.type }),
2511
+ d.label || d.property || "Untitled field"
2302
2512
  ]
2303
2513
  }
2304
2514
  ),
@@ -2314,11 +2524,11 @@ function qa({ fields: e, onChange: t, availableProperties: i }) {
2314
2524
  )
2315
2525
  ] }),
2316
2526
  r === w && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2317
- Ba,
2527
+ Ja,
2318
2528
  {
2319
- value: y,
2320
- onChange: (c) => p(w, c),
2321
- availableProperties: i
2529
+ value: d,
2530
+ onChange: (c) => n(w, c),
2531
+ availableProperties: t
2322
2532
  }
2323
2533
  ) })
2324
2534
  ] }, w)) }),
@@ -2326,61 +2536,61 @@ function qa({ fields: e, onChange: t, availableProperties: i }) {
2326
2536
  "button",
2327
2537
  {
2328
2538
  type: "button",
2329
- onClick: o,
2539
+ onClick: u,
2330
2540
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-dashed mapui:border-gray-300 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-600 hover:mapui:border-blue-400 hover:mapui:text-blue-600",
2331
2541
  children: "+ Add Search Field"
2332
2542
  }
2333
2543
  )
2334
2544
  ] });
2335
2545
  }
2336
- function za(e) {
2337
- return Object.entries(e).map(([t, i]) => ({
2338
- key: t,
2339
- label: i.label ?? "",
2340
- visible: i.visible ?? !0
2546
+ function ei(e) {
2547
+ return Object.entries(e).map(([i, t]) => ({
2548
+ key: i,
2549
+ label: t.label ?? "",
2550
+ visible: t.visible ?? !0
2341
2551
  }));
2342
2552
  }
2343
- function Ga(e) {
2344
- const t = {};
2345
- for (const i of e)
2346
- t[i.key] = {
2347
- visible: i.visible,
2348
- ...i.label ? { label: i.label } : {}
2553
+ function ai(e) {
2554
+ const i = {};
2555
+ for (const t of e)
2556
+ i[t.key] = {
2557
+ visible: t.visible,
2558
+ ...t.label ? { label: t.label } : {}
2349
2559
  };
2350
- return t;
2560
+ return i;
2351
2561
  }
2352
2562
  const se = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2353
- function Wa({ value: e, onChange: t, availableProperties: i }) {
2354
- const r = za(e), n = i && i.length > 0, o = (u) => t(Ga(u)), p = () => {
2355
- o([...r, { key: "", label: "", visible: !0 }]);
2356
- }, x = (u) => {
2357
- o(r.filter((d, N) => N !== u));
2358
- }, s = (u, d) => {
2359
- o(r.map((N, v) => v === u ? { ...N, ...d } : N));
2360
- }, g = (u, d) => {
2361
- const N = i == null ? void 0 : i.find((T) => T.name === d), v = (N == null ? void 0 : N.title) ?? r[u].label;
2362
- o(r.map((T, E) => E === u ? { ...T, key: d, label: v } : T));
2363
- }, y = (u) => {
2364
- if (u === 0) return;
2365
- const d = [...r];
2366
- [d[u - 1], d[u]] = [d[u], d[u - 1]], o(d);
2367
- }, w = (u) => {
2368
- if (u === r.length - 1) return;
2369
- const d = [...r];
2370
- [d[u], d[u + 1]] = [d[u + 1], d[u]], o(d);
2563
+ function ii({ value: e, onChange: i, availableProperties: t }) {
2564
+ const r = ei(e), p = t && t.length > 0, u = (o) => i(ai(o)), n = () => {
2565
+ u([...r, { key: "", label: "", visible: !0 }]);
2566
+ }, x = (o) => {
2567
+ u(r.filter((h, N) => N !== o));
2568
+ }, s = (o, h) => {
2569
+ u(r.map((N, v) => v === o ? { ...N, ...h } : N));
2570
+ }, g = (o, h) => {
2571
+ const N = t == null ? void 0 : t.find((C) => C.name === h), v = (N == null ? void 0 : N.title) ?? r[o].label;
2572
+ u(r.map((C, E) => E === o ? { ...C, key: h, label: v } : C));
2573
+ }, d = (o) => {
2574
+ if (o === 0) return;
2575
+ const h = [...r];
2576
+ [h[o - 1], h[o]] = [h[o], h[o - 1]], u(h);
2577
+ }, w = (o) => {
2578
+ if (o === r.length - 1) return;
2579
+ const h = [...r];
2580
+ [h[o], h[o + 1]] = [h[o + 1], h[o]], u(h);
2371
2581
  }, c = () => {
2372
- if (!i) return;
2373
- const u = i.map((d) => ({
2374
- key: d.name,
2375
- label: d.title ?? "",
2582
+ if (!t) return;
2583
+ const o = t.map((h) => ({
2584
+ key: h.name,
2585
+ label: h.title ?? "",
2376
2586
  visible: !0
2377
2587
  }));
2378
- o(u);
2588
+ u(o);
2379
2589
  };
2380
2590
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2381
- r.length === 0 ? /* @__PURE__ */ l(U, { children: [
2591
+ r.length === 0 ? /* @__PURE__ */ l(z, { children: [
2382
2592
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No property display rules configured. All properties will be shown." }),
2383
- n && /* @__PURE__ */ a(
2593
+ p && /* @__PURE__ */ a(
2384
2594
  "button",
2385
2595
  {
2386
2596
  type: "button",
@@ -2389,20 +2599,20 @@ function Wa({ value: e, onChange: t, availableProperties: i }) {
2389
2599
  children: "Populate from API metadata"
2390
2600
  }
2391
2601
  )
2392
- ] }) : /* @__PURE__ */ l(U, { children: [
2602
+ ] }) : /* @__PURE__ */ l(z, { children: [
2393
2603
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:items-center mapui:gap-2 mapui:px-8", style: { gridTemplateColumns: "1fr 1fr auto" }, children: [
2394
- /* @__PURE__ */ a(C, { label: "Property Key", children: /* @__PURE__ */ a("span", {}) }),
2395
- /* @__PURE__ */ a(C, { label: "Display Label", children: /* @__PURE__ */ a("span", {}) }),
2604
+ /* @__PURE__ */ a(S, { label: "Property Key", children: /* @__PURE__ */ a("span", {}) }),
2605
+ /* @__PURE__ */ a(S, { label: "Display Label", children: /* @__PURE__ */ a("span", {}) }),
2396
2606
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: "Visible" })
2397
2607
  ] }),
2398
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1.5 mapui:p-0", children: r.map((u, d) => /* @__PURE__ */ l("li", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1.5", children: [
2608
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1.5 mapui:p-0", children: r.map((o, h) => /* @__PURE__ */ l("li", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1.5", children: [
2399
2609
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
2400
2610
  /* @__PURE__ */ a(
2401
2611
  "button",
2402
2612
  {
2403
2613
  type: "button",
2404
- onClick: () => y(d),
2405
- disabled: d === 0,
2614
+ onClick: () => d(h),
2615
+ disabled: h === 0,
2406
2616
  "aria-label": "Move up",
2407
2617
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
2408
2618
  children: "▲"
@@ -2412,8 +2622,8 @@ function Wa({ value: e, onChange: t, availableProperties: i }) {
2412
2622
  "button",
2413
2623
  {
2414
2624
  type: "button",
2415
- onClick: () => w(d),
2416
- disabled: d === r.length - 1,
2625
+ onClick: () => w(h),
2626
+ disabled: h === r.length - 1,
2417
2627
  "aria-label": "Move down",
2418
2628
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
2419
2629
  children: "▼"
@@ -2421,24 +2631,24 @@ function Wa({ value: e, onChange: t, availableProperties: i }) {
2421
2631
  )
2422
2632
  ] }),
2423
2633
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:flex-1 mapui:items-center mapui:gap-2", style: { gridTemplateColumns: "1fr 1fr auto auto" }, children: [
2424
- n ? /* @__PURE__ */ l(
2634
+ p ? /* @__PURE__ */ l(
2425
2635
  "select",
2426
2636
  {
2427
- value: u.key,
2428
- onChange: (N) => g(d, N.target.value),
2637
+ value: o.key,
2638
+ onChange: (N) => g(h, N.target.value),
2429
2639
  "aria-label": "Property key",
2430
2640
  className: se,
2431
2641
  children: [
2432
2642
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
2433
- i.map((N) => /* @__PURE__ */ a("option", { value: N.name, children: N.title ?? N.name }, N.name))
2643
+ t.map((N) => /* @__PURE__ */ a("option", { value: N.name, children: N.title ?? N.name }, N.name))
2434
2644
  ]
2435
2645
  }
2436
2646
  ) : /* @__PURE__ */ a(
2437
2647
  "input",
2438
2648
  {
2439
2649
  type: "text",
2440
- value: u.key,
2441
- onChange: (N) => s(d, { key: N.target.value }),
2650
+ value: o.key,
2651
+ onChange: (N) => s(h, { key: N.target.value }),
2442
2652
  placeholder: "property_name",
2443
2653
  "aria-label": "Property key",
2444
2654
  className: se
@@ -2448,8 +2658,8 @@ function Wa({ value: e, onChange: t, availableProperties: i }) {
2448
2658
  "input",
2449
2659
  {
2450
2660
  type: "text",
2451
- value: u.label,
2452
- onChange: (N) => s(d, { label: N.target.value }),
2661
+ value: o.label,
2662
+ onChange: (N) => s(h, { label: N.target.value }),
2453
2663
  placeholder: "Friendly name",
2454
2664
  "aria-label": "Display label",
2455
2665
  className: se
@@ -2459,8 +2669,8 @@ function Wa({ value: e, onChange: t, availableProperties: i }) {
2459
2669
  "input",
2460
2670
  {
2461
2671
  type: "checkbox",
2462
- checked: u.visible,
2463
- onChange: (N) => s(d, { visible: N.target.checked }),
2672
+ checked: o.visible,
2673
+ onChange: (N) => s(h, { visible: N.target.checked }),
2464
2674
  "aria-label": "Visible",
2465
2675
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2466
2676
  }
@@ -2469,229 +2679,229 @@ function Wa({ value: e, onChange: t, availableProperties: i }) {
2469
2679
  "button",
2470
2680
  {
2471
2681
  type: "button",
2472
- onClick: () => x(d),
2682
+ onClick: () => x(h),
2473
2683
  "aria-label": "Remove property",
2474
2684
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2475
2685
  children: "Remove"
2476
2686
  }
2477
2687
  )
2478
2688
  ] })
2479
- ] }, d)) })
2689
+ ] }, h)) })
2480
2690
  ] }),
2481
2691
  /* @__PURE__ */ a(
2482
2692
  "button",
2483
2693
  {
2484
2694
  type: "button",
2485
- onClick: p,
2695
+ onClick: n,
2486
2696
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-dashed mapui:border-gray-300 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-600 hover:mapui:border-blue-400 hover:mapui:text-blue-600",
2487
2697
  children: "+ Add Property"
2488
2698
  }
2489
2699
  )
2490
2700
  ] });
2491
2701
  }
2492
- const We = /geojson\.org\/schema\/(\w+)\.json/;
2493
- function Va(e) {
2494
- return !!e.$ref && We.test(e.$ref);
2702
+ const Ve = /geojson\.org\/schema\/(\w+)\.json/;
2703
+ function ti(e) {
2704
+ return !!e.$ref && Ve.test(e.$ref);
2495
2705
  }
2496
- function Ve(e) {
2497
- const t = We.exec(e);
2498
- return t ? t[1] : null;
2706
+ function He(e) {
2707
+ const i = Ve.exec(e);
2708
+ return i ? i[1] : null;
2499
2709
  }
2500
- function _e(e) {
2501
- const t = e.toLowerCase();
2502
- return t.includes("polygon") ? "fill" : t.includes("linestring") ? "line" : t.includes("point") ? "circle" : null;
2503
- }
2504
- function ye(e) {
2505
- const t = e.toLowerCase();
2506
- return t.includes("polygon") ? ["fill", "line"] : t.includes("linestring") ? ["line"] : t.includes("point") ? ["circle", "symbol"] : [];
2507
- }
2508
- function _a(e) {
2509
- for (const t of Object.values(e.properties))
2510
- if (t.$ref) {
2511
- const i = Ve(t.$ref);
2512
- if (i) return _e(i);
2710
+ function Ye(e) {
2711
+ const i = e.toLowerCase();
2712
+ return i.includes("polygon") ? "fill" : i.includes("linestring") ? "line" : i.includes("point") ? "circle" : null;
2713
+ }
2714
+ function fe(e) {
2715
+ const i = e.toLowerCase();
2716
+ return i.includes("polygon") ? ["fill", "line"] : i.includes("linestring") ? ["line"] : i.includes("point") ? ["circle", "symbol"] : [];
2717
+ }
2718
+ function ri(e) {
2719
+ for (const i of Object.values(e.properties))
2720
+ if (i.$ref) {
2721
+ const t = He(i.$ref);
2722
+ if (t) return Ye(t);
2513
2723
  }
2514
2724
  return null;
2515
2725
  }
2516
- function Ye(e) {
2517
- for (const t of Object.values(e.properties))
2518
- if (t.$ref) {
2519
- const i = Ve(t.$ref);
2520
- if (i) return ye(i);
2726
+ function Xe(e) {
2727
+ for (const i of Object.values(e.properties))
2728
+ if (i.$ref) {
2729
+ const t = He(i.$ref);
2730
+ if (t) return fe(t);
2521
2731
  }
2522
2732
  return [];
2523
2733
  }
2524
- function Ya(e) {
2525
- return Object.entries(e.properties).filter(([, t]) => !Va(t)).map(([t, i]) => ({
2526
- name: t,
2527
- title: i.title,
2528
- type: i.type,
2529
- format: i.format,
2530
- enum: i.enum,
2531
- minimum: i.minimum,
2532
- maximum: i.maximum
2734
+ function li(e) {
2735
+ return Object.entries(e.properties).filter(([, i]) => !ti(i)).map(([i, t]) => ({
2736
+ name: i,
2737
+ title: t.title,
2738
+ type: t.type,
2739
+ format: t.format,
2740
+ enum: t.enum,
2741
+ minimum: t.minimum,
2742
+ maximum: t.maximum
2533
2743
  }));
2534
2744
  }
2535
- function Xe(e) {
2536
- var i;
2537
- const t = /* @__PURE__ */ new Set();
2745
+ function Ze(e) {
2746
+ var t;
2747
+ const i = /* @__PURE__ */ new Set();
2538
2748
  for (const r of e)
2539
- (i = r.geometry) != null && i.type && t.add(r.geometry.type);
2540
- return Array.from(t);
2541
- }
2542
- function Xa(e) {
2543
- const t = /* @__PURE__ */ new Set();
2544
- for (const n of e) {
2545
- const o = n.toLowerCase();
2546
- o.includes("polygon") ? t.add("polygon") : o.includes("linestring") ? t.add("line") : o.includes("point") && t.add("point");
2749
+ (t = r.geometry) != null && t.type && i.add(r.geometry.type);
2750
+ return Array.from(i);
2751
+ }
2752
+ function pi(e) {
2753
+ const i = /* @__PURE__ */ new Set();
2754
+ for (const p of e) {
2755
+ const u = p.toLowerCase();
2756
+ u.includes("polygon") ? i.add("polygon") : u.includes("linestring") ? i.add("line") : u.includes("point") && i.add("point");
2547
2757
  }
2548
- const i = t.size > 1, r = [];
2549
- return t.has("polygon") && r.push({
2758
+ const t = i.size > 1, r = [];
2759
+ return i.has("polygon") && r.push({
2550
2760
  type: "fill",
2551
2761
  paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 },
2552
- ...i ? { geometryFilter: ["Polygon", "MultiPolygon"] } : {}
2553
- }), t.has("line") && r.push({
2762
+ ...t ? { geometryFilter: ["Polygon", "MultiPolygon"] } : {}
2763
+ }), i.has("line") && r.push({
2554
2764
  type: "line",
2555
2765
  paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 },
2556
- ...i ? { geometryFilter: ["LineString", "MultiLineString"] } : {}
2557
- }), t.has("point") && r.push({
2766
+ ...t ? { geometryFilter: ["LineString", "MultiLineString"] } : {}
2767
+ }), i.has("point") && r.push({
2558
2768
  type: "circle",
2559
2769
  paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 },
2560
- ...i ? { geometryFilter: ["Point", "MultiPoint"] } : {}
2770
+ ...t ? { geometryFilter: ["Point", "MultiPoint"] } : {}
2561
2771
  }), r;
2562
2772
  }
2563
- async function mt(e, t) {
2564
- var i, r;
2773
+ async function Si(e, i) {
2774
+ var t, r;
2565
2775
  try {
2566
- const n = await qe(e, t), o = _a(n);
2567
- if (o) return o;
2776
+ const p = await qe(e, i), u = ri(p);
2777
+ if (u) return u;
2568
2778
  } catch {
2569
2779
  }
2570
2780
  try {
2571
- const o = (r = (i = (await be(e, t, { limit: 1 })).features[0]) == null ? void 0 : i.geometry) == null ? void 0 : r.type;
2572
- if (typeof o == "string") return _e(o);
2781
+ const u = (r = (t = (await ye(e, i, { limit: 1 })).features[0]) == null ? void 0 : t.geometry) == null ? void 0 : r.type;
2782
+ if (typeof u == "string") return Ye(u);
2573
2783
  } catch {
2574
2784
  }
2575
2785
  return null;
2576
2786
  }
2577
- async function st(e, t) {
2787
+ async function Ti(e, i) {
2578
2788
  try {
2579
- const i = await qe(e, t), r = Ye(i);
2789
+ const t = await qe(e, i), r = Xe(t);
2580
2790
  if (r.length > 0) return r;
2581
2791
  } catch {
2582
2792
  }
2583
2793
  try {
2584
- const i = await be(e, t, { limit: 20 }), r = Xe(i.features), n = /* @__PURE__ */ new Set();
2585
- for (const o of r)
2586
- for (const p of ye(o))
2587
- n.add(p);
2588
- return Array.from(n);
2794
+ const t = await ye(e, i, { limit: 20 }), r = Ze(t.features), p = /* @__PURE__ */ new Set();
2795
+ for (const u of r)
2796
+ for (const n of fe(u))
2797
+ p.add(n);
2798
+ return Array.from(p);
2589
2799
  } catch {
2590
2800
  }
2591
2801
  return [];
2592
2802
  }
2593
- function ct(e) {
2594
- return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (t) => t.toUpperCase());
2803
+ function Di(e) {
2804
+ return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (i) => i.toUpperCase());
2595
2805
  }
2596
- function Ha(e, t, i) {
2806
+ function ni(e, i, t) {
2597
2807
  const r = [...e ?? []];
2598
- return r[t] = i, r;
2808
+ return r[i] = t, r;
2599
2809
  }
2600
- function Ja(e, t) {
2601
- return (e ?? []).filter((i, r) => r !== t);
2810
+ function ui(e, i) {
2811
+ return (e ?? []).filter((t, r) => r !== i);
2602
2812
  }
2603
- const Y = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2604
- function Pe({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2605
- var j;
2606
- const n = (m) => t({ ...e, ...m }), o = ie(e);
2607
- o.current = e;
2608
- const p = ie(t);
2609
- p.current = t;
2610
- const x = i.find((m) => m.id === e.sourceId), s = (x == null ? void 0 : x.url) ?? null, g = e.collection || null, { collections: y, loading: w } = Ue(s), { queryables: c, loading: u } = ia(s, g), d = c ? Ya(c) : [], [N, v] = S([]), [T, E] = S([]);
2611
- return V(() => {
2813
+ const _ = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2814
+ function Oe({ value: e, onChange: i, availableSources: t, availableIcons: r }) {
2815
+ var O;
2816
+ const p = (m) => i({ ...e, ...m }), u = H(e);
2817
+ u.current = e;
2818
+ const n = H(i);
2819
+ n.current = i;
2820
+ const x = t.find((m) => m.id === e.sourceId), s = (x == null ? void 0 : x.url) ?? null, g = e.collection || null, { collections: d, loading: w } = Ge(s), { queryables: c, loading: o } = oa(s, g), h = c ? li(c) : [], [N, v] = T([]), [C, E] = T([]);
2821
+ return q(() => {
2612
2822
  if (!c) {
2613
2823
  v([]), E([]);
2614
2824
  return;
2615
2825
  }
2616
- const m = (h, F) => {
2617
- var f;
2618
- const P = Xa(h);
2619
- v(P), E(F), P.length > 0 && !((f = o.current.styles) != null && f.length) && p.current({ ...o.current, styles: P });
2620
- }, I = Ye(c);
2621
- if (I.length > 0) {
2622
- const h = [];
2623
- for (const F of I)
2624
- F === "fill" ? h.push("Polygon") : F === "line" ? h.push("LineString") : (F === "circle" || F === "symbol") && h.push("Point");
2625
- m(h, I);
2826
+ const m = (b, M) => {
2827
+ var y;
2828
+ const P = pi(b);
2829
+ v(P), E(M), P.length > 0 && !((y = u.current.styles) != null && y.length) && n.current({ ...u.current, styles: P });
2830
+ }, L = Xe(c);
2831
+ if (L.length > 0) {
2832
+ const b = [];
2833
+ for (const M of L)
2834
+ M === "fill" ? b.push("Polygon") : M === "line" ? b.push("LineString") : (M === "circle" || M === "symbol") && b.push("Point");
2835
+ m(b, L);
2626
2836
  return;
2627
2837
  }
2628
2838
  if (!s || !g) {
2629
2839
  v([]), E([]);
2630
2840
  return;
2631
2841
  }
2632
- let M = !1;
2633
- return be(s, g, { limit: 20 }).then((h) => {
2634
- if (M) return;
2635
- const F = Xe(h.features);
2636
- if (F.length > 0) {
2842
+ let F = !1;
2843
+ return ye(s, g, { limit: 20 }).then((b) => {
2844
+ if (F) return;
2845
+ const M = Ze(b.features);
2846
+ if (M.length > 0) {
2637
2847
  const P = /* @__PURE__ */ new Set();
2638
- for (const f of F)
2639
- for (const k of ye(f)) P.add(k);
2640
- m(F, Array.from(P));
2848
+ for (const y of M)
2849
+ for (const k of fe(y)) P.add(k);
2850
+ m(M, Array.from(P));
2641
2851
  } else
2642
2852
  v([]), E([]);
2643
2853
  }).catch(() => {
2644
- M || (v([]), E([]));
2854
+ F || (v([]), E([]));
2645
2855
  }), () => {
2646
- M = !0;
2856
+ F = !0;
2647
2857
  };
2648
- }, [c, s, g]), V(() => {
2858
+ }, [c, s, g]), q(() => {
2649
2859
  v([]), E([]);
2650
2860
  }, [s, g]), /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2651
2861
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
2652
- /* @__PURE__ */ a(C, { label: "Layer ID", required: !0, children: /* @__PURE__ */ a(
2862
+ /* @__PURE__ */ a(S, { label: "Layer ID", required: !0, children: /* @__PURE__ */ a(
2653
2863
  "input",
2654
2864
  {
2655
2865
  type: "text",
2656
2866
  value: e.id,
2657
- onChange: (m) => n({ id: m.target.value }),
2867
+ onChange: (m) => p({ id: m.target.value }),
2658
2868
  placeholder: "my-layer",
2659
- className: Y
2869
+ className: _
2660
2870
  }
2661
2871
  ) }),
2662
- /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
2872
+ /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
2663
2873
  "input",
2664
2874
  {
2665
2875
  type: "text",
2666
2876
  value: e.label,
2667
- onChange: (m) => n({ label: m.target.value }),
2877
+ onChange: (m) => p({ label: m.target.value }),
2668
2878
  placeholder: "My Layer",
2669
- className: Y
2879
+ className: _
2670
2880
  }
2671
2881
  ) })
2672
2882
  ] }),
2673
- /* @__PURE__ */ a(C, { label: "Source", required: !0, children: /* @__PURE__ */ l(
2883
+ /* @__PURE__ */ a(S, { label: "Source", required: !0, children: /* @__PURE__ */ l(
2674
2884
  "select",
2675
2885
  {
2676
2886
  value: e.sourceId,
2677
- onChange: (m) => n({ sourceId: m.target.value }),
2678
- className: Y,
2887
+ onChange: (m) => p({ sourceId: m.target.value }),
2888
+ className: _,
2679
2889
  children: [
2680
2890
  /* @__PURE__ */ a("option", { value: "", children: "Select a source…" }),
2681
- i.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label ?? m.id }, m.id))
2891
+ t.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label ?? m.id }, m.id))
2682
2892
  ]
2683
2893
  }
2684
2894
  ) }),
2685
- /* @__PURE__ */ l(C, { label: "Collection", required: !0, children: [
2686
- y.length > 0 ? /* @__PURE__ */ l(
2895
+ /* @__PURE__ */ l(S, { label: "Collection", required: !0, children: [
2896
+ d.length > 0 ? /* @__PURE__ */ l(
2687
2897
  "select",
2688
2898
  {
2689
2899
  value: e.collection,
2690
- onChange: (m) => n({ collection: m.target.value }),
2691
- className: Y,
2900
+ onChange: (m) => p({ collection: m.target.value }),
2901
+ className: _,
2692
2902
  children: [
2693
2903
  /* @__PURE__ */ a("option", { value: "", children: "Select a collection…" }),
2694
- y.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.title ?? m.id }, m.id))
2904
+ d.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.title ?? m.id }, m.id))
2695
2905
  ]
2696
2906
  }
2697
2907
  ) : /* @__PURE__ */ a(
@@ -2699,14 +2909,14 @@ function Pe({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2699
2909
  {
2700
2910
  type: "text",
2701
2911
  value: e.collection,
2702
- onChange: (m) => n({ collection: m.target.value }),
2912
+ onChange: (m) => p({ collection: m.target.value }),
2703
2913
  placeholder: w ? "Loading collections…" : "collection-id",
2704
- className: Y
2914
+ className: _
2705
2915
  }
2706
2916
  ),
2707
- u && /* @__PURE__ */ a("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
2917
+ o && /* @__PURE__ */ a("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
2708
2918
  ] }),
2709
- /* @__PURE__ */ a(C, { label: "Data Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-4", children: ["vector-tiles", "geojson"].map((m) => /* @__PURE__ */ l("label", { className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-1.5", children: [
2919
+ /* @__PURE__ */ a(S, { label: "Data Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-4", children: ["vector-tiles", "geojson"].map((m) => /* @__PURE__ */ l("label", { className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-1.5", children: [
2710
2920
  /* @__PURE__ */ a(
2711
2921
  "input",
2712
2922
  {
@@ -2714,7 +2924,7 @@ function Pe({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2714
2924
  name: `data-mode-${e.id}`,
2715
2925
  value: m,
2716
2926
  checked: e.dataMode === m,
2717
- onChange: () => n({ dataMode: m }),
2927
+ onChange: () => p({ dataMode: m }),
2718
2928
  className: "mapui:accent-blue-600"
2719
2929
  }
2720
2930
  ),
@@ -2727,78 +2937,112 @@ function Pe({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2727
2937
  type: "checkbox",
2728
2938
  id: "layer-visible",
2729
2939
  checked: e.visible,
2730
- onChange: (m) => n({ visible: m.target.checked }),
2940
+ onChange: (m) => p({ visible: m.target.checked }),
2731
2941
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2732
2942
  }
2733
2943
  ),
2734
2944
  /* @__PURE__ */ a("label", { htmlFor: "layer-visible", className: "mapui:text-sm mapui:text-gray-700", children: "Visible by default" })
2735
2945
  ] }),
2946
+ /* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
2947
+ /* @__PURE__ */ a(S, { label: "Min Zoom", children: /* @__PURE__ */ a(
2948
+ "input",
2949
+ {
2950
+ type: "number",
2951
+ min: 0,
2952
+ max: 24,
2953
+ step: 1,
2954
+ value: e.minZoom ?? "",
2955
+ onChange: (m) => {
2956
+ const L = m.target.valueAsNumber;
2957
+ p({ minZoom: isNaN(L) ? void 0 : L });
2958
+ },
2959
+ placeholder: "0",
2960
+ className: _
2961
+ }
2962
+ ) }),
2963
+ /* @__PURE__ */ a(S, { label: "Max Zoom", children: /* @__PURE__ */ a(
2964
+ "input",
2965
+ {
2966
+ type: "number",
2967
+ min: 0,
2968
+ max: 24,
2969
+ step: 1,
2970
+ value: e.maxZoom ?? "",
2971
+ onChange: (m) => {
2972
+ const L = m.target.valueAsNumber;
2973
+ p({ maxZoom: isNaN(L) ? void 0 : L });
2974
+ },
2975
+ placeholder: "24",
2976
+ className: _
2977
+ }
2978
+ ) })
2979
+ ] }),
2736
2980
  /* @__PURE__ */ a(X, { title: "Style", children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-4", children: [
2737
- (e.styles ?? [ge]).map((m, I) => {
2738
- var M;
2981
+ (e.styles ?? [ge]).map((m, L) => {
2982
+ var F;
2739
2983
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2740
- m.geometryFilter && m.geometryFilter.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-wrap mapui:gap-1", children: m.geometryFilter.map((h) => /* @__PURE__ */ a(
2984
+ m.geometryFilter && m.geometryFilter.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-wrap mapui:gap-1", children: m.geometryFilter.map((b) => /* @__PURE__ */ a(
2741
2985
  "span",
2742
2986
  {
2743
2987
  className: "mapui:rounded mapui:bg-indigo-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-indigo-700",
2744
- children: h
2988
+ children: b
2745
2989
  },
2746
- h
2990
+ b
2747
2991
  )) }),
2748
2992
  /* @__PURE__ */ a(
2749
- Oa,
2993
+ Ha,
2750
2994
  {
2751
2995
  value: m,
2752
- onChange: (h) => n({ styles: Ha(e.styles, I, h) }),
2753
- suggestedTypes: T,
2996
+ onChange: (b) => p({ styles: ni(e.styles, L, b) }),
2997
+ suggestedTypes: C,
2754
2998
  availableIcons: r,
2755
- availableProperties: d,
2756
- onFetchDistinctValues: s && g ? (h) => ra(s, g, h, { limit: 1e3 }) : void 0
2999
+ availableProperties: h,
3000
+ onFetchDistinctValues: s && g ? (b) => ma(s, g, b, { fetchAll: !0 }) : void 0
2757
3001
  }
2758
3002
  ),
2759
- (((M = e.styles) == null ? void 0 : M.length) ?? 0) > 0 && /* @__PURE__ */ a(
3003
+ (((F = e.styles) == null ? void 0 : F.length) ?? 0) > 0 && /* @__PURE__ */ a(
2760
3004
  "button",
2761
3005
  {
2762
3006
  type: "button",
2763
- onClick: () => n({ styles: Ja(e.styles, I) }),
3007
+ onClick: () => p({ styles: ui(e.styles, L) }),
2764
3008
  className: "mapui:cursor-pointer mapui:self-start mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2765
3009
  children: "Remove style"
2766
3010
  }
2767
3011
  )
2768
- ] }, I);
3012
+ ] }, L);
2769
3013
  }),
2770
3014
  /* @__PURE__ */ a(
2771
3015
  "button",
2772
3016
  {
2773
3017
  type: "button",
2774
- onClick: () => n({ styles: [...e.styles ?? [ge], Ge] }),
3018
+ onClick: () => p({ styles: [...e.styles ?? [ge], _e] }),
2775
3019
  className: "mapui:cursor-pointer mapui:self-start mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
2776
3020
  children: "+ Add style"
2777
3021
  }
2778
3022
  )
2779
3023
  ] }) }),
2780
3024
  /* @__PURE__ */ a(X, { title: "Legend", children: /* @__PURE__ */ a(
2781
- $a,
3025
+ Xa,
2782
3026
  {
2783
3027
  value: e.legend,
2784
- onChange: (m) => n({ legend: m }),
3028
+ onChange: (m) => p({ legend: m }),
2785
3029
  styles: e.styles
2786
3030
  }
2787
3031
  ) }),
2788
3032
  /* @__PURE__ */ a(X, { title: "Search Fields", children: /* @__PURE__ */ a(
2789
- qa,
3033
+ Qa,
2790
3034
  {
2791
- fields: ((j = e.search) == null ? void 0 : j.fields) ?? [],
2792
- onChange: (m) => n({ search: m.length > 0 ? { fields: m } : void 0 }),
2793
- availableProperties: d
3035
+ fields: ((O = e.search) == null ? void 0 : O.fields) ?? [],
3036
+ onChange: (m) => p({ search: m.length > 0 ? { fields: m } : void 0 }),
3037
+ availableProperties: h
2794
3038
  }
2795
3039
  ) }),
2796
3040
  /* @__PURE__ */ a(X, { title: "Property Display", children: /* @__PURE__ */ a(
2797
- Wa,
3041
+ ii,
2798
3042
  {
2799
3043
  value: e.propertyDisplay ?? {},
2800
- onChange: (m) => n({ propertyDisplay: Object.keys(m).length > 0 ? m : void 0 }),
2801
- availableProperties: d
3044
+ onChange: (m) => p({ propertyDisplay: Object.keys(m).length > 0 ? m : void 0 }),
3045
+ availableProperties: h
2802
3046
  }
2803
3047
  ) })
2804
3048
  ] });
@@ -2811,37 +3055,37 @@ const ce = () => ({
2811
3055
  visible: !0,
2812
3056
  dataMode: "vector-tiles"
2813
3057
  });
2814
- function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r }) {
2815
- const [n, o] = S(null), [p, x] = S(!1), [s, g] = S(ce()), [y, w] = S(null), [c, u] = S(null), [d, N] = S(null), v = () => {
2816
- t([...e, s]), x(!1), g(ce());
2817
- }, T = (f) => {
2818
- t(e.map((k) => k.id === n ? f : k));
2819
- }, E = (f) => {
2820
- t(e.filter((k) => k.id !== f)), w(null), n === f && o(null);
2821
- }, j = (f) => {
2822
- if (f === 0) return;
3058
+ function Li({ layers: e, onChange: i, availableSources: t, availableIcons: r }) {
3059
+ const [p, u] = T(null), [n, x] = T(!1), [s, g] = T(ce()), [d, w] = T(null), [c, o] = T(null), [h, N] = T(null), v = () => {
3060
+ i([...e, s]), x(!1), g(ce());
3061
+ }, C = (y) => {
3062
+ i(e.map((k) => k.id === p ? y : k));
3063
+ }, E = (y) => {
3064
+ i(e.filter((k) => k.id !== y)), w(null), p === y && u(null);
3065
+ }, O = (y) => {
3066
+ if (y === 0) return;
2823
3067
  const k = [...e];
2824
- [k[f - 1], k[f]] = [k[f], k[f - 1]], t(k);
2825
- }, m = (f) => {
2826
- if (f === e.length - 1) return;
3068
+ [k[y - 1], k[y]] = [k[y], k[y - 1]], i(k);
3069
+ }, m = (y) => {
3070
+ if (y === e.length - 1) return;
2827
3071
  const k = [...e];
2828
- [k[f], k[f + 1]] = [k[f + 1], k[f]], t(k);
2829
- }, I = (f, k) => {
2830
- u(k), f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", k);
2831
- }, M = (f, k) => {
2832
- f.preventDefault(), f.dataTransfer.dropEffect = "move", N(k);
2833
- }, h = () => {
3072
+ [k[y], k[y + 1]] = [k[y + 1], k[y]], i(k);
3073
+ }, L = (y, k) => {
3074
+ o(k), y.dataTransfer.effectAllowed = "move", y.dataTransfer.setData("text/plain", k);
3075
+ }, F = (y, k) => {
3076
+ y.preventDefault(), y.dataTransfer.dropEffect = "move", N(k);
3077
+ }, b = () => {
2834
3078
  N(null);
2835
- }, F = (f, k) => {
2836
- f.preventDefault(), N(null);
2837
- const O = c;
2838
- if (u(null), !O || O === k) return;
2839
- const R = e.findIndex((z) => z.id === O), G = e.findIndex((z) => z.id === k);
2840
- if (R === -1 || G === -1) return;
2841
- const q = [...e];
2842
- q.splice(R, 1), q.splice(G, 0, e[R]), t(q);
3079
+ }, M = (y, k) => {
3080
+ y.preventDefault(), N(null);
3081
+ const j = c;
3082
+ if (o(null), !j || j === k) return;
3083
+ const R = e.findIndex((G) => G.id === j), W = e.findIndex((G) => G.id === k);
3084
+ if (R === -1 || W === -1) return;
3085
+ const U = [...e];
3086
+ U.splice(R, 1), U.splice(W, 0, e[R]), i(U);
2843
3087
  }, P = () => {
2844
- u(null), N(null);
3088
+ o(null), N(null);
2845
3089
  };
2846
3090
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2847
3091
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -2858,23 +3102,23 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2858
3102
  }
2859
3103
  )
2860
3104
  ] }),
2861
- e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
2862
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((f, k) => {
2863
- var q, z, J, K, Q;
2864
- const O = c === f.id, R = d === f.id, G = n === f.id;
3105
+ e.length === 0 && !n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
3106
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((y, k) => {
3107
+ var U, G, J, K, Q;
3108
+ const j = c === y.id, R = h === y.id, W = p === y.id;
2865
3109
  return /* @__PURE__ */ l(
2866
3110
  "li",
2867
3111
  {
2868
- draggable: !G,
2869
- onDragStart: G ? void 0 : (b) => I(b, f.id),
2870
- onDragOver: (b) => M(b, f.id),
2871
- onDragLeave: h,
2872
- onDrop: (b) => F(b, f.id),
3112
+ draggable: !W,
3113
+ onDragStart: W ? void 0 : (f) => L(f, y.id),
3114
+ onDragOver: (f) => F(f, y.id),
3115
+ onDragLeave: b,
3116
+ onDrop: (f) => M(f, y.id),
2873
3117
  onDragEnd: P,
2874
3118
  className: [
2875
3119
  "mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
2876
3120
  R ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
2877
- O ? "mapui:opacity-50" : "mapui:opacity-100"
3121
+ j ? "mapui:opacity-50" : "mapui:opacity-100"
2878
3122
  ].join(" "),
2879
3123
  children: [
2880
3124
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:gap-2 mapui:px-3 mapui:py-2", children: [
@@ -2884,7 +3128,7 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2884
3128
  "button",
2885
3129
  {
2886
3130
  type: "button",
2887
- onClick: () => j(k),
3131
+ onClick: () => O(k),
2888
3132
  disabled: k === 0,
2889
3133
  "aria-label": "Move layer up",
2890
3134
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
@@ -2912,18 +3156,24 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2912
3156
  }
2913
3157
  ),
2914
3158
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:min-w-0 mapui:flex-col mapui:gap-0.5", children: [
2915
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: f.label || f.id }),
2916
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: f.collection }),
3159
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: y.label || y.id }),
3160
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: y.collection }),
2917
3161
  /* @__PURE__ */ l("div", { className: "mapui:mt-1 mapui:flex mapui:flex-wrap mapui:gap-1", children: [
2918
- /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-slate-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-slate-700", children: f.dataMode }),
2919
- (((q = f.styles) == null ? void 0 : q.length) ?? 0) > 0 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-purple-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-purple-700", children: f.styles.map((b) => b.type).join(" · ") }),
2920
- f.visible === !1 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-amber-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-amber-700", children: "hidden" }),
2921
- (((J = (z = f.search) == null ? void 0 : z.fields) == null ? void 0 : J.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-blue-700", children: [
2922
- f.search.fields.length,
3162
+ /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-slate-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-slate-700", children: y.dataMode }),
3163
+ (((U = y.styles) == null ? void 0 : U.length) ?? 0) > 0 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-purple-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-purple-700", children: y.styles.map((f) => f.type).join(" · ") }),
3164
+ y.visible === !1 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-amber-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-amber-700", children: "hidden" }),
3165
+ (((J = (G = y.search) == null ? void 0 : G.fields) == null ? void 0 : J.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-blue-700", children: [
3166
+ y.search.fields.length,
2923
3167
  " search fields"
2924
3168
  ] }),
2925
- (((Q = (K = f.legend) == null ? void 0 : K.entries) == null ? void 0 : Q.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-green-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-green-700", children: [
2926
- f.legend.entries.length,
3169
+ (y.minZoom != null || y.maxZoom != null) && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-cyan-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-cyan-700", children: [
3170
+ "z",
3171
+ y.minZoom ?? 0,
3172
+ "–",
3173
+ y.maxZoom ?? 24
3174
+ ] }),
3175
+ (((Q = (K = y.legend) == null ? void 0 : K.entries) == null ? void 0 : Q.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-green-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-green-700", children: [
3176
+ y.legend.entries.length,
2927
3177
  " legend entries"
2928
3178
  ] })
2929
3179
  ] })
@@ -2934,44 +3184,44 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2934
3184
  "button",
2935
3185
  {
2936
3186
  type: "button",
2937
- onClick: () => o(n === f.id ? null : f.id),
3187
+ onClick: () => u(p === y.id ? null : y.id),
2938
3188
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
2939
- children: n === f.id ? "Close" : "Edit"
3189
+ children: p === y.id ? "Close" : "Edit"
2940
3190
  }
2941
3191
  ),
2942
3192
  /* @__PURE__ */ a(
2943
3193
  "button",
2944
3194
  {
2945
3195
  type: "button",
2946
- onClick: () => w(f.id),
3196
+ onClick: () => w(y.id),
2947
3197
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2948
3198
  children: "Remove"
2949
3199
  }
2950
3200
  )
2951
3201
  ] })
2952
3202
  ] }),
2953
- n === f.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2954
- Pe,
3203
+ p === y.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
3204
+ Oe,
2955
3205
  {
2956
- value: f,
2957
- onChange: T,
2958
- availableSources: i,
3206
+ value: y,
3207
+ onChange: C,
3208
+ availableSources: t,
2959
3209
  availableIcons: r
2960
3210
  }
2961
3211
  ) })
2962
3212
  ]
2963
3213
  },
2964
- f.id
3214
+ y.id
2965
3215
  );
2966
3216
  }) }),
2967
- p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3217
+ n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
2968
3218
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Layer" }),
2969
3219
  /* @__PURE__ */ a(
2970
- Pe,
3220
+ Oe,
2971
3221
  {
2972
3222
  value: s,
2973
3223
  onChange: g,
2974
- availableSources: i,
3224
+ availableSources: t,
2975
3225
  availableIcons: r
2976
3226
  }
2977
3227
  ),
@@ -3000,56 +3250,56 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3000
3250
  /* @__PURE__ */ a(
3001
3251
  re,
3002
3252
  {
3003
- open: y !== null,
3253
+ open: d !== null,
3004
3254
  title: "Remove Layer",
3005
3255
  description: "Are you sure you want to remove this layer from the configuration?",
3006
- onConfirm: () => y && E(y),
3256
+ onConfirm: () => d && E(d),
3007
3257
  onCancel: () => w(null)
3008
3258
  }
3009
3259
  )
3010
3260
  ] });
3011
3261
  }
3012
3262
  const te = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3013
- function Oe({ value: e, onChange: t }) {
3014
- const i = (r) => t({ ...e, ...r });
3263
+ function je({ value: e, onChange: i }) {
3264
+ const t = (r) => i({ ...e, ...r });
3015
3265
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3016
- /* @__PURE__ */ a(C, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3266
+ /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3017
3267
  "input",
3018
3268
  {
3019
3269
  type: "text",
3020
3270
  value: e.id,
3021
- onChange: (r) => i({ id: r.target.value }),
3271
+ onChange: (r) => t({ id: r.target.value }),
3022
3272
  placeholder: "osm",
3023
3273
  className: te
3024
3274
  }
3025
3275
  ) }),
3026
- /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
3276
+ /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
3027
3277
  "input",
3028
3278
  {
3029
3279
  type: "text",
3030
3280
  value: e.label,
3031
- onChange: (r) => i({ label: r.target.value }),
3281
+ onChange: (r) => t({ label: r.target.value }),
3032
3282
  placeholder: "OpenStreetMap",
3033
3283
  className: te
3034
3284
  }
3035
3285
  ) }),
3036
- /* @__PURE__ */ a(C, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
3286
+ /* @__PURE__ */ a(S, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
3037
3287
  "input",
3038
3288
  {
3039
3289
  type: "url",
3040
3290
  value: e.url,
3041
- onChange: (r) => i({ url: r.target.value }),
3291
+ onChange: (r) => t({ url: r.target.value }),
3042
3292
  placeholder: "https://example.com/style.json",
3043
3293
  className: te
3044
3294
  }
3045
3295
  ) }),
3046
- /* @__PURE__ */ l(C, { label: "Thumbnail URL (optional)", children: [
3296
+ /* @__PURE__ */ l(S, { label: "Thumbnail URL (optional)", children: [
3047
3297
  /* @__PURE__ */ a(
3048
3298
  "input",
3049
3299
  {
3050
3300
  type: "url",
3051
3301
  value: e.thumbnail ?? "",
3052
- onChange: (r) => i({ thumbnail: r.target.value || void 0 }),
3302
+ onChange: (r) => t({ thumbnail: r.target.value || void 0 }),
3053
3303
  placeholder: "https://example.com/thumbnail.png",
3054
3304
  className: te
3055
3305
  }
@@ -3066,13 +3316,13 @@ function Oe({ value: e, onChange: t }) {
3066
3316
  ] });
3067
3317
  }
3068
3318
  const de = () => ({ id: "", label: "", url: "" });
3069
- function ht({ basemaps: e, onChange: t }) {
3070
- const [i, r] = S(null), [n, o] = S(!1), [p, x] = S(de()), [s, g] = S(null), y = (u) => {
3071
- t(e.map((d) => d.id === i ? u : d));
3319
+ function Ai({ basemaps: e, onChange: i }) {
3320
+ const [t, r] = T(null), [p, u] = T(!1), [n, x] = T(de()), [s, g] = T(null), d = (o) => {
3321
+ i(e.map((h) => h.id === t ? o : h));
3072
3322
  }, w = () => {
3073
- t([...e, p]), o(!1), x(de());
3074
- }, c = (u) => {
3075
- t(e.filter((d) => d.id !== u)), g(null);
3323
+ i([...e, n]), u(!1), x(de());
3324
+ }, c = (o) => {
3325
+ i(e.filter((h) => h.id !== o)), g(null);
3076
3326
  };
3077
3327
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3078
3328
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -3082,68 +3332,68 @@ function ht({ basemaps: e, onChange: t }) {
3082
3332
  {
3083
3333
  type: "button",
3084
3334
  onClick: () => {
3085
- o(!0), x(de());
3335
+ u(!0), x(de());
3086
3336
  },
3087
3337
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
3088
3338
  children: "+ Add Basemap"
3089
3339
  }
3090
3340
  )
3091
3341
  ] }),
3092
- e.length === 0 && !n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No basemaps configured." }),
3093
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((u) => /* @__PURE__ */ l(
3342
+ e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No basemaps configured." }),
3343
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((o) => /* @__PURE__ */ l(
3094
3344
  "li",
3095
3345
  {
3096
3346
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
3097
3347
  children: [
3098
3348
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
3099
- u.thumbnail && /* @__PURE__ */ a(
3349
+ o.thumbnail && /* @__PURE__ */ a(
3100
3350
  "img",
3101
3351
  {
3102
- src: u.thumbnail,
3352
+ src: o.thumbnail,
3103
3353
  alt: "",
3104
3354
  className: "mapui:h-10 mapui:w-14 mapui:shrink-0 mapui:rounded mapui:object-cover"
3105
3355
  }
3106
3356
  ),
3107
3357
  /* @__PURE__ */ l("div", { className: "mapui:flex-1 mapui:overflow-hidden", children: [
3108
- /* @__PURE__ */ a("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: u.label || u.id }),
3109
- /* @__PURE__ */ a("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: u.url })
3358
+ /* @__PURE__ */ a("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: o.label || o.id }),
3359
+ /* @__PURE__ */ a("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: o.url })
3110
3360
  ] }),
3111
3361
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
3112
3362
  /* @__PURE__ */ a(
3113
3363
  "button",
3114
3364
  {
3115
3365
  type: "button",
3116
- onClick: () => r(i === u.id ? null : u.id),
3366
+ onClick: () => r(t === o.id ? null : o.id),
3117
3367
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
3118
- children: i === u.id ? "Close" : "Edit"
3368
+ children: t === o.id ? "Close" : "Edit"
3119
3369
  }
3120
3370
  ),
3121
3371
  /* @__PURE__ */ a(
3122
3372
  "button",
3123
3373
  {
3124
3374
  type: "button",
3125
- onClick: () => g(u.id),
3375
+ onClick: () => g(o.id),
3126
3376
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
3127
3377
  children: "Remove"
3128
3378
  }
3129
3379
  )
3130
3380
  ] })
3131
3381
  ] }),
3132
- i === u.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Oe, { value: u, onChange: y }) })
3382
+ t === o.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(je, { value: o, onChange: d }) })
3133
3383
  ]
3134
3384
  },
3135
- u.id
3385
+ o.id
3136
3386
  )) }),
3137
- n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3387
+ p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3138
3388
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Basemap" }),
3139
- /* @__PURE__ */ a(Oe, { value: p, onChange: x }),
3389
+ /* @__PURE__ */ a(je, { value: n, onChange: x }),
3140
3390
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
3141
3391
  /* @__PURE__ */ a(
3142
3392
  "button",
3143
3393
  {
3144
3394
  type: "button",
3145
3395
  onClick: w,
3146
- disabled: !p.id || !p.url,
3396
+ disabled: !n.id || !n.url,
3147
3397
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
3148
3398
  children: "Save"
3149
3399
  }
@@ -3152,7 +3402,7 @@ function ht({ basemaps: e, onChange: t }) {
3152
3402
  "button",
3153
3403
  {
3154
3404
  type: "button",
3155
- onClick: () => o(!1),
3405
+ onClick: () => u(!1),
3156
3406
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
3157
3407
  children: "Cancel"
3158
3408
  }
@@ -3171,29 +3421,29 @@ function ht({ basemaps: e, onChange: t }) {
3171
3421
  )
3172
3422
  ] });
3173
3423
  }
3174
- const je = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3175
- function $e({ value: e, onChange: t }) {
3176
- const i = (r) => t({ ...e, ...r });
3424
+ const $e = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3425
+ function Re({ value: e, onChange: i }) {
3426
+ const t = (r) => i({ ...e, ...r });
3177
3427
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3178
- /* @__PURE__ */ a(C, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3428
+ /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3179
3429
  "input",
3180
3430
  {
3181
3431
  type: "text",
3182
3432
  value: e.id,
3183
- onChange: (r) => i({ id: r.target.value }),
3433
+ onChange: (r) => t({ id: r.target.value }),
3184
3434
  placeholder: "my-sprites",
3185
- className: je
3435
+ className: $e
3186
3436
  }
3187
3437
  ) }),
3188
- /* @__PURE__ */ l(C, { label: "Sprite URL", required: !0, children: [
3438
+ /* @__PURE__ */ l(S, { label: "Sprite URL", required: !0, children: [
3189
3439
  /* @__PURE__ */ a(
3190
3440
  "input",
3191
3441
  {
3192
3442
  type: "url",
3193
3443
  value: e.url,
3194
- onChange: (r) => i({ url: r.target.value }),
3444
+ onChange: (r) => t({ url: r.target.value }),
3195
3445
  placeholder: "https://example.com/sprites/sprite",
3196
- className: je
3446
+ className: $e
3197
3447
  }
3198
3448
  ),
3199
3449
  /* @__PURE__ */ l("p", { className: "mapui:mt-1 mapui:text-xs mapui:text-gray-400", children: [
@@ -3206,21 +3456,21 @@ function $e({ value: e, onChange: t }) {
3206
3456
  ] })
3207
3457
  ] });
3208
3458
  }
3209
- const he = () => ({ id: "", url: "" }), Ka = (e) => {
3459
+ const he = () => ({ id: "", url: "" }), oi = (e) => {
3210
3460
  try {
3211
3461
  return new URL(e), !0;
3212
3462
  } catch {
3213
3463
  return !1;
3214
3464
  }
3215
3465
  };
3216
- function gt({ sprites: e, onChange: t }) {
3217
- const [i, r] = S(null), [n, o] = S(!1), [p, x] = S(he()), [s, g] = S(null), y = (u) => {
3218
- t(e.map((d, N) => N === i ? u : d));
3466
+ function Ei({ sprites: e, onChange: i }) {
3467
+ const [t, r] = T(null), [p, u] = T(!1), [n, x] = T(he()), [s, g] = T(null), d = (o) => {
3468
+ i(e.map((h, N) => N === t ? o : h));
3219
3469
  }, w = () => {
3220
- t([...e, p]), o(!1), x(he());
3221
- }, c = (u) => {
3222
- const d = e.findIndex((N) => N.id === u);
3223
- t(e.filter((N) => N.id !== u)), i !== null && (d === i ? r(null) : d < i && r(i - 1)), g(null);
3470
+ i([...e, n]), u(!1), x(he());
3471
+ }, c = (o) => {
3472
+ const h = e.findIndex((N) => N.id === o);
3473
+ i(e.filter((N) => N.id !== o)), t !== null && (h === t ? r(null) : h < t && r(t - 1)), g(null);
3224
3474
  };
3225
3475
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3226
3476
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -3230,60 +3480,60 @@ function gt({ sprites: e, onChange: t }) {
3230
3480
  {
3231
3481
  type: "button",
3232
3482
  onClick: () => {
3233
- o(!0), x(he());
3483
+ u(!0), x(he());
3234
3484
  },
3235
3485
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
3236
3486
  children: "+ Add Sprite Sheet"
3237
3487
  }
3238
3488
  )
3239
3489
  ] }),
3240
- e.length === 0 && !n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No custom sprite sheets. Basemap icons are available automatically." }),
3241
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((u, d) => /* @__PURE__ */ l(
3490
+ e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No custom sprite sheets. Basemap icons are available automatically." }),
3491
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((o, h) => /* @__PURE__ */ l(
3242
3492
  "li",
3243
3493
  {
3244
3494
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
3245
3495
  children: [
3246
3496
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
3247
3497
  /* @__PURE__ */ l("div", { className: "mapui:flex-1 mapui:overflow-hidden", children: [
3248
- /* @__PURE__ */ a("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: u.id }),
3249
- /* @__PURE__ */ a("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: u.url })
3498
+ /* @__PURE__ */ a("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: o.id }),
3499
+ /* @__PURE__ */ a("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: o.url })
3250
3500
  ] }),
3251
3501
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
3252
3502
  /* @__PURE__ */ a(
3253
3503
  "button",
3254
3504
  {
3255
3505
  type: "button",
3256
- onClick: () => r(i === d ? null : d),
3506
+ onClick: () => r(t === h ? null : h),
3257
3507
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
3258
- children: i === d ? "Close" : "Edit"
3508
+ children: t === h ? "Close" : "Edit"
3259
3509
  }
3260
3510
  ),
3261
3511
  /* @__PURE__ */ a(
3262
3512
  "button",
3263
3513
  {
3264
3514
  type: "button",
3265
- onClick: () => g(u.id),
3515
+ onClick: () => g(o.id),
3266
3516
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
3267
3517
  children: "Remove"
3268
3518
  }
3269
3519
  )
3270
3520
  ] })
3271
3521
  ] }),
3272
- i === d && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a($e, { value: u, onChange: y }) })
3522
+ t === h && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Re, { value: o, onChange: d }) })
3273
3523
  ]
3274
3524
  },
3275
- d
3525
+ h
3276
3526
  )) }),
3277
- n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3527
+ p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3278
3528
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Sprite Sheet" }),
3279
- /* @__PURE__ */ a($e, { value: p, onChange: x }),
3529
+ /* @__PURE__ */ a(Re, { value: n, onChange: x }),
3280
3530
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
3281
3531
  /* @__PURE__ */ a(
3282
3532
  "button",
3283
3533
  {
3284
3534
  type: "button",
3285
3535
  onClick: w,
3286
- disabled: !p.id || !p.url || !Ka(p.url) || e.some((u) => u.id === p.id),
3536
+ disabled: !n.id || !n.url || !oi(n.url) || e.some((o) => o.id === n.id),
3287
3537
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
3288
3538
  children: "Save"
3289
3539
  }
@@ -3292,7 +3542,7 @@ function gt({ sprites: e, onChange: t }) {
3292
3542
  "button",
3293
3543
  {
3294
3544
  type: "button",
3295
- onClick: () => o(!1),
3545
+ onClick: () => u(!1),
3296
3546
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
3297
3547
  children: "Cancel"
3298
3548
  }
@@ -3311,7 +3561,7 @@ function gt({ sprites: e, onChange: t }) {
3311
3561
  )
3312
3562
  ] });
3313
3563
  }
3314
- const Qa = [
3564
+ const mi = [
3315
3565
  { key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
3316
3566
  { key: "showLegend", label: "Legend", description: "Map legend" },
3317
3567
  { key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
@@ -3321,34 +3571,35 @@ const Qa = [
3321
3571
  { key: "showFeatureTooltip", label: "Feature Tooltip", description: "Hover tooltip on features" },
3322
3572
  { key: "showExportButton", label: "Export Button", description: "Export data as CSV" },
3323
3573
  { key: "showLegendOpacity", label: "Legend Opacity", description: "Expand legend with opacity sliders" },
3324
- { key: "showMeasureTool", label: "Measure Tool", description: "Measure distances and areas on the map" }
3574
+ { key: "showMeasureTool", label: "Measure Tool", description: "Measure distances and areas on the map" },
3575
+ { key: "showSelectionTool", label: "Selection Tool", description: "Select features by click or box draw" }
3325
3576
  ];
3326
- function bt({ value: e, onChange: t }) {
3327
- const i = (r, n) => {
3328
- t({ ...e, [r]: n });
3577
+ function Ii({ value: e, onChange: i }) {
3578
+ const t = (r, p) => {
3579
+ i({ ...e, [r]: p });
3329
3580
  };
3330
3581
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
3331
3582
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-2 mapui:text-xs mapui:text-gray-500", children: "Enable or disable UI panels and controls." }),
3332
- /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: Qa.map(({ key: r, label: n, description: o }) => {
3333
- const p = e[r];
3583
+ /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: mi.map(({ key: r, label: p, description: u }) => {
3584
+ const n = e[r];
3334
3585
  return /* @__PURE__ */ l(
3335
3586
  "label",
3336
3587
  {
3337
3588
  className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:justify-between mapui:gap-3 mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-3 mapui:py-2 hover:mapui:bg-gray-50",
3338
3589
  children: [
3339
3590
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
3340
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: n }),
3341
- /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500", children: o })
3591
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: p }),
3592
+ /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500", children: u })
3342
3593
  ] }),
3343
3594
  /* @__PURE__ */ l("div", { className: "mapui:relative mapui:flex mapui:shrink-0 mapui:items-center", children: [
3344
3595
  /* @__PURE__ */ a(
3345
3596
  "input",
3346
3597
  {
3347
3598
  type: "checkbox",
3348
- checked: p,
3349
- onChange: (x) => i(r, x.target.checked),
3599
+ checked: n,
3600
+ onChange: (x) => t(r, x.target.checked),
3350
3601
  className: "mapui:sr-only",
3351
- "aria-label": n
3602
+ "aria-label": p
3352
3603
  }
3353
3604
  ),
3354
3605
  /* @__PURE__ */ a(
@@ -3356,14 +3607,14 @@ function bt({ value: e, onChange: t }) {
3356
3607
  {
3357
3608
  className: [
3358
3609
  "mapui:relative mapui:h-5 mapui:w-9 mapui:rounded-full mapui:transition-colors",
3359
- p ? "mapui:bg-blue-600" : "mapui:bg-gray-300"
3610
+ n ? "mapui:bg-blue-600" : "mapui:bg-gray-300"
3360
3611
  ].join(" "),
3361
3612
  children: /* @__PURE__ */ a(
3362
3613
  "div",
3363
3614
  {
3364
3615
  className: [
3365
3616
  "mapui:absolute mapui:top-0.5 mapui:h-4 mapui:w-4 mapui:rounded-full mapui:bg-white mapui:shadow mapui:transition-transform",
3366
- p ? "mapui:translate-x-4" : "mapui:translate-x-0.5"
3617
+ n ? "mapui:translate-x-4" : "mapui:translate-x-0.5"
3367
3618
  ].join(" ")
3368
3619
  }
3369
3620
  )
@@ -3377,46 +3628,46 @@ function bt({ value: e, onChange: t }) {
3377
3628
  }) })
3378
3629
  ] });
3379
3630
  }
3380
- const He = [
3631
+ const Je = [
3381
3632
  { key: "latitude", label: "Latitude", min: -90, max: 90, step: 1e-6, placeholder: "0" },
3382
3633
  { key: "longitude", label: "Longitude", min: -180, max: 180, step: 1e-6, placeholder: "0" },
3383
3634
  { key: "zoom", label: "Zoom", min: 0, max: 24, step: 0.1, placeholder: "2" },
3384
3635
  { key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
3385
3636
  { key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
3386
3637
  ];
3387
- function Za(e, t) {
3388
- const i = He.find((r) => r.key === e);
3389
- if (i) {
3390
- if (isNaN(t)) return "Must be a number";
3391
- if (t < i.min) return `Must be at least ${i.min}`;
3392
- if (t > i.max) return `Must be at most ${i.max}`;
3638
+ function si(e, i) {
3639
+ const t = Je.find((r) => r.key === e);
3640
+ if (t) {
3641
+ if (isNaN(i)) return "Must be a number";
3642
+ if (i < t.min) return `Must be at least ${t.min}`;
3643
+ if (i > t.max) return `Must be at most ${t.max}`;
3393
3644
  }
3394
3645
  }
3395
- const et = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3396
- function yt({ value: e, onChange: t }) {
3397
- const i = (r, n) => {
3398
- const o = parseFloat(n);
3399
- t({ ...e, [r]: isNaN(o) ? 0 : o });
3646
+ const ci = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3647
+ function Mi({ value: e, onChange: i }) {
3648
+ const t = (r, p) => {
3649
+ const u = parseFloat(p);
3650
+ i({ ...e, [r]: isNaN(u) ? 0 : u });
3400
3651
  };
3401
- return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: He.map(({ key: r, label: n, min: o, max: p, step: x, placeholder: s }) => {
3402
- const g = Za(r, e[r]);
3403
- return /* @__PURE__ */ a(C, { label: n, error: g, children: /* @__PURE__ */ a(
3652
+ return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: Je.map(({ key: r, label: p, min: u, max: n, step: x, placeholder: s }) => {
3653
+ const g = si(r, e[r]);
3654
+ return /* @__PURE__ */ a(S, { label: p, error: g, children: /* @__PURE__ */ a(
3404
3655
  "input",
3405
3656
  {
3406
3657
  type: "number",
3407
- min: o,
3408
- max: p,
3658
+ min: u,
3659
+ max: n,
3409
3660
  step: x,
3410
3661
  value: e[r],
3411
3662
  placeholder: s,
3412
- onChange: (y) => i(r, y.target.value),
3413
- className: `${et} ${g ? "mapui:border-red-400" : ""}`
3663
+ onChange: (d) => t(r, d.target.value),
3664
+ className: `${ci} ${g ? "mapui:border-red-400" : ""}`
3414
3665
  }
3415
3666
  ) }, r);
3416
3667
  }) });
3417
3668
  }
3418
- function ft({ config: e }) {
3419
- const t = la(e);
3669
+ function Fi({ config: e }) {
3670
+ const i = sa(e);
3420
3671
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3421
3672
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
3422
3673
  /* @__PURE__ */ a(
@@ -3424,170 +3675,205 @@ function ft({ config: e }) {
3424
3675
  {
3425
3676
  className: [
3426
3677
  "mapui:inline-flex mapui:items-center mapui:rounded-full mapui:px-2.5 mapui:py-0.5 mapui:text-xs mapui:font-semibold",
3427
- t.success ? "mapui:bg-green-100 mapui:text-green-800" : "mapui:bg-red-100 mapui:text-red-800"
3678
+ i.success ? "mapui:bg-green-100 mapui:text-green-800" : "mapui:bg-red-100 mapui:text-red-800"
3428
3679
  ].join(" "),
3429
- children: t.success ? "Valid" : "Invalid"
3680
+ children: i.success ? "Valid" : "Invalid"
3430
3681
  }
3431
3682
  ),
3432
3683
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500", children: "MapConfig validation" })
3433
3684
  ] }),
3434
- !t.success && /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3", children: [
3685
+ !i.success && /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3", children: [
3435
3686
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:font-semibold mapui:text-red-700", children: "Validation Errors" }),
3436
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: t.error.errors.map((i, r) => /* @__PURE__ */ l("li", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
3437
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-red-600", children: i.path.join(" > ") || "root" }),
3438
- /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-800", children: i.message })
3687
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: i.error.errors.map((t, r) => /* @__PURE__ */ l("li", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
3688
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-red-600", children: t.path.join(" > ") || "root" }),
3689
+ /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-800", children: t.message })
3439
3690
  ] }, r)) })
3440
3691
  ] }),
3441
3692
  /* @__PURE__ */ a("div", { className: "mapui:overflow-auto mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50", children: /* @__PURE__ */ a("pre", { className: "mapui:m-0 mapui:p-3 mapui:text-xs mapui:text-gray-800 mapui:whitespace-pre", children: JSON.stringify(e, null, 2) }) })
3442
3693
  ] });
3443
3694
  }
3695
+ function di(e, i) {
3696
+ const [t, r] = e, [p, u] = i;
3697
+ return {
3698
+ type: "Polygon",
3699
+ coordinates: [[
3700
+ [t, r],
3701
+ [p, r],
3702
+ [p, u],
3703
+ [t, u],
3704
+ [t, r]
3705
+ ]]
3706
+ };
3707
+ }
3708
+ function Pi(e, i) {
3709
+ return {
3710
+ type: "Feature",
3711
+ properties: {},
3712
+ geometry: di(e, i)
3713
+ };
3714
+ }
3444
3715
  export {
3445
- ji as BasemapConfigSchema,
3446
- Oe as BasemapEditor,
3447
- ht as BasemapList,
3448
- Nt as BasemapSwitcher,
3449
- $i as CircleLayoutSchema,
3450
- Ri as CirclePaintSchema,
3451
- Bi as CircleStyleSchema,
3452
- kt as CollapsibleControl,
3453
- ut as CollectionBrowser,
3454
- H as ColorPicker,
3455
- ft as ConfigPreview,
3716
+ pr as BasemapConfigSchema,
3717
+ je as BasemapEditor,
3718
+ Ai as BasemapList,
3719
+ $i as BasemapSwitcher,
3720
+ nr as BrandingConfigSchema,
3721
+ ur as CircleLayoutSchema,
3722
+ or as CirclePaintSchema,
3723
+ mr as CircleStyleSchema,
3724
+ Bi as CollapsibleControl,
3725
+ X as CollapsibleSection,
3726
+ Ci as CollectionBrowser,
3727
+ Z as ColorPicker,
3728
+ Fi as ConfigPreview,
3456
3729
  re as ConfirmDialog,
3457
- St as CoordinateDisplay,
3458
- Ui as DatetimeSearchFieldSchema,
3459
- At as ExportButton,
3460
- nt as ExportModal,
3461
- It as FeatureDetailPanel,
3462
- Mt as FeatureTooltip,
3463
- qi as FillLayoutSchema,
3464
- zi as FillPaintSchema,
3465
- Gi as FillStyleSchema,
3466
- Wi as FilterConfigSchema,
3467
- C as FormField,
3468
- Vi as GeometryTypeSchema,
3469
- _i as LayerConfigSchema,
3470
- Pe as LayerEditor,
3471
- dt as LayerList,
3472
- Ot as LayerPanel,
3473
- $t as Legend,
3474
- Yi as LegendConfigSchema,
3475
- $a as LegendEditor,
3476
- ja as LegendEntryEditor,
3477
- Xi as LegendEntrySchema,
3478
- Hi as LineLayoutSchema,
3479
- Ji as LinePaintSchema,
3480
- Ki as LineStyleSchema,
3481
- Qi as MapConfigSchema,
3482
- pt as MeasurePanel,
3483
- Zi as NumberSearchFieldSchema,
3484
- er as OgcApiSourceSchema,
3485
- ar as PropertyDisplayConfigSchema,
3486
- Wa as PropertyDisplayEditor,
3487
- tr as PropertyDisplaySchema,
3488
- ir as SearchConfigSchema,
3489
- Ba as SearchFieldEditor,
3490
- qa as SearchFieldList,
3491
- rr as SearchFieldSchema,
3492
- Pi as SearchPanel,
3493
- lr as SelectSearchFieldSchema,
3494
- xe as SourceEditor,
3495
- ot as SourceList,
3496
- $e as SpriteSourceEditor,
3497
- gt as SpriteSourceList,
3498
- nr as SpriteSourceSchema,
3499
- pr as StyleConfigSchema,
3500
- Oa as StyleEditor,
3501
- or as SymbolLayoutSchema,
3502
- ur as SymbolPaintSchema,
3503
- mr as SymbolStyleSchema,
3504
- sr as TextSearchFieldSchema,
3505
- bt as UIConfigEditor,
3506
- cr as UIConfigSchema,
3507
- aa as UNITS_FOR_MODE,
3508
- fe as UNIT_LABELS,
3509
- dr as ViewConfigSchema,
3510
- yt as ViewEditor,
3511
- Bt as and,
3512
- Ut as bboxFromGeometry,
3513
- qt as between,
3514
- Xa as buildDefaultStylesForGeometryTypes,
3515
- zt as buildMeasureGeometryData,
3516
- Gt as buildMeasurePointsData,
3517
- Wt as calculateArea,
3518
- Vt as calculateDistance,
3519
- _t as calculateMeasurement,
3520
- Ge as defaultCircle,
3730
+ Ui as CoordinateDisplay,
3731
+ sr as DEFAULT_HEADER_COLOR,
3732
+ cr as DatetimeSearchFieldSchema,
3733
+ _i as ExportButton,
3734
+ xi as ExportModal,
3735
+ Hi as FeatureDetailPanel,
3736
+ Xi as FeatureTooltip,
3737
+ dr as FillLayoutSchema,
3738
+ hr as FillPaintSchema,
3739
+ gr as FillStyleSchema,
3740
+ br as FilterConfigSchema,
3741
+ S as FormField,
3742
+ yr as GeometryTypeSchema,
3743
+ fr as LayerConfigSchema,
3744
+ Oe as LayerEditor,
3745
+ Li as LayerList,
3746
+ Ji as LayerPanel,
3747
+ Qi as Legend,
3748
+ xr as LegendConfigSchema,
3749
+ Xa as LegendEditor,
3750
+ Ya as LegendEntryEditor,
3751
+ wr as LegendEntrySchema,
3752
+ Nr as LineLayoutSchema,
3753
+ vr as LinePaintSchema,
3754
+ kr as LineStyleSchema,
3755
+ Cr as MapConfigSchema,
3756
+ wi as MeasurePanel,
3757
+ Sr as NumberSearchFieldSchema,
3758
+ Tr as OgcApiSourceSchema,
3759
+ Dr as PropertyDisplayConfigSchema,
3760
+ ii as PropertyDisplayEditor,
3761
+ Lr as PropertyDisplaySchema,
3762
+ vi as ResultsDrawer,
3763
+ Ar as SearchConfigSchema,
3764
+ Ja as SearchFieldEditor,
3765
+ Qa as SearchFieldList,
3766
+ Er as SearchFieldSchema,
3767
+ rr as SearchPanel,
3768
+ Ir as SelectSearchFieldSchema,
3769
+ Ni as SelectionPanel,
3770
+ we as SourceEditor,
3771
+ ki as SourceList,
3772
+ Re as SpriteSourceEditor,
3773
+ Ei as SpriteSourceList,
3774
+ Mr as SpriteSourceSchema,
3775
+ Fr as StyleConfigSchema,
3776
+ Ha as StyleEditor,
3777
+ Pr as SymbolLayoutSchema,
3778
+ Or as SymbolPaintSchema,
3779
+ jr as SymbolStyleSchema,
3780
+ $r as TextSearchFieldSchema,
3781
+ Ii as UIConfigEditor,
3782
+ Rr as UIConfigSchema,
3783
+ na as UNITS_FOR_MODE,
3784
+ xe as UNIT_LABELS,
3785
+ Br as ViewConfigSchema,
3786
+ Mi as ViewEditor,
3787
+ at as and,
3788
+ it as bboxFromGeometry,
3789
+ tt as between,
3790
+ Pi as buildBoxDrawData,
3791
+ di as buildBoxPolygon,
3792
+ pi as buildDefaultStylesForGeometryTypes,
3793
+ rt as buildGeometryFilter,
3794
+ lt as buildMeasureGeometryData,
3795
+ pt as buildMeasurePointsData,
3796
+ nt as calculateArea,
3797
+ ut as calculateDistance,
3798
+ ot as calculateMeasurement,
3799
+ _e as defaultCircle,
3521
3800
  ge as defaultFill,
3522
- Ea as defaultLine,
3523
- Ia as defaultSymbol,
3524
- Yt as defaultUnitForMode,
3525
- Ye as detectGeometryStyleTypesFromQueryables,
3526
- _a as detectGeometryTypeFromQueryables,
3527
- Xe as detectGeometryTypesFromFeatures,
3528
- mt as detectStyleTypeForCollection,
3529
- st as detectStyleTypesForCollection,
3530
- Xt as downloadBlob,
3531
- Ht as downloadCsv,
3532
- Jt as eq,
3533
- ze as expressionColors,
3534
- xa as expressionEntries,
3535
- wa as expressionPropertyName,
3536
- fa as expressionType,
3537
- Ve as extractGeometryType,
3538
- Kt as featuresToCsv,
3539
- Qt as fetchCollectionDetail,
3540
- Zt as fetchCollections,
3541
- ei as fetchConformance,
3542
- ra as fetchDistinctValues,
3543
- ai as fetchFeatureCount,
3544
- be as fetchFeatures,
3801
+ Ga as defaultLine,
3802
+ qa as defaultSymbol,
3803
+ mt as defaultUnitForMode,
3804
+ Xe as detectGeometryStyleTypesFromQueryables,
3805
+ ri as detectGeometryTypeFromQueryables,
3806
+ Ze as detectGeometryTypesFromFeatures,
3807
+ Si as detectStyleTypeForCollection,
3808
+ Ti as detectStyleTypesForCollection,
3809
+ st as downloadBlob,
3810
+ ct as downloadCsv,
3811
+ dt as eq,
3812
+ We as expressionColors,
3813
+ Ia as expressionEntries,
3814
+ Ma as expressionPropertyName,
3815
+ Ea as expressionType,
3816
+ He as extractGeometryType,
3817
+ ht as featuresToCsv,
3818
+ gt as fetchCollectionDetail,
3819
+ bt as fetchCollections,
3820
+ yt as fetchConformance,
3821
+ ma as fetchDistinctValues,
3822
+ ft as fetchFeatureById,
3823
+ xt as fetchFeatureCount,
3824
+ ye as fetchFeatures,
3545
3825
  qe as fetchQueryables,
3546
- ti as fetchSpriteNames,
3547
- ii as fetchSpriteUrlFromStyle,
3548
- ri as fetchTileJson,
3549
- Tt as formatDMS,
3550
- Dt as formatDecimal,
3551
- ta as formatMeasurement,
3552
- li as fromSimpleFilters,
3553
- ni as fromStructuredFilters,
3554
- _e as geometryTypeToStyleType,
3555
- ye as geometryTypeToStyleTypes,
3556
- ne as getColorFromPalette,
3557
- pi as getCql2FilteredVectorTileUrl,
3558
- oi as getFilteredVectorTileUrl,
3559
- Na as getPrimaryColor,
3560
- va as getShapeForStyleType,
3561
- ui as getTileJsonUrl,
3562
- mi as getVectorTileUrl,
3563
- si as gt,
3564
- ci as gte,
3565
- ct as humanizePropertyName,
3566
- di as inList,
3567
- W as isExpression,
3568
- Va as isGeometryProperty,
3569
- hi as isNull,
3570
- gi as like,
3571
- bi as lt,
3572
- yi as lte,
3573
- fi as neq,
3574
- xi as not,
3575
- wi as or,
3576
- Ni as resolveAvailableIcons,
3577
- vi as resolvePropertyDisplay,
3578
- ki as resolveStyleWithSprites,
3579
- la as safeValidateMapConfig,
3580
- Ci as serializeCql2,
3581
- Si as tAfter,
3582
- Ti as tBefore,
3583
- Di as tDuring,
3584
- Ya as toAvailableProperties,
3585
- Li as useCsvExport,
3586
- Ai as useExport,
3587
- Ei as useMeasure,
3588
- Ii as useOgcCollectionDetail,
3589
- Ue as useOgcCollections,
3590
- Fi as useOgcFeatures,
3591
- ia as useOgcQueryables,
3592
- hr as validateMapConfig
3826
+ wt as fetchSpriteNames,
3827
+ Nt as fetchSpriteUrlFromStyle,
3828
+ vt as fetchTileJson,
3829
+ Gi as formatDMS,
3830
+ qi as formatDecimal,
3831
+ ua as formatMeasurement,
3832
+ kt as fromSimpleFilters,
3833
+ Ct as fromStructuredFilters,
3834
+ Ye as geometryTypeToStyleType,
3835
+ fe as geometryTypeToStyleTypes,
3836
+ pe as getColorFromPalette,
3837
+ St as getCql2FilteredVectorTileUrl,
3838
+ Tt as getFilteredVectorTileUrl,
3839
+ Fa as getPrimaryColor,
3840
+ Pa as getShapeForStyleType,
3841
+ Dt as getTileJsonUrl,
3842
+ Lt as getVectorTileSourceKey,
3843
+ At as getVectorTileUrl,
3844
+ Et as gt,
3845
+ It as gte,
3846
+ Di as humanizePropertyName,
3847
+ Mt as inList,
3848
+ V as isExpression,
3849
+ ti as isGeometryProperty,
3850
+ Ft as isNull,
3851
+ Pt as like,
3852
+ Ot as lt,
3853
+ jt as lte,
3854
+ $t as neq,
3855
+ Rt as not,
3856
+ Bt as or,
3857
+ zt as resolveAvailableIcons,
3858
+ Ut as resolvePropertyDisplay,
3859
+ Gt as resolveStyleWithSprites,
3860
+ qt as sDwithin,
3861
+ Wt as sIntersects,
3862
+ _t as sWithin,
3863
+ sa as safeValidateMapConfig,
3864
+ Vt as selectedFeatureKey,
3865
+ Ht as serializeCql2,
3866
+ Yt as tAfter,
3867
+ Xt as tBefore,
3868
+ Zt as tDuring,
3869
+ li as toAvailableProperties,
3870
+ Jt as useCsvExport,
3871
+ Kt as useExport,
3872
+ Qt as useMeasure,
3873
+ er as useOgcCollectionDetail,
3874
+ Ge as useOgcCollections,
3875
+ ar as useOgcFeatures,
3876
+ oa as useOgcQueryables,
3877
+ ir as useSelection,
3878
+ zr as validateMapConfig
3593
3879
  };