@ogc-maps/storybook-components 0.10.0 → 0.11.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 (44) 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/ResultsDrawer/ResultsDrawer.d.ts +15 -0
  7. package/dist/components/ResultsDrawer/ResultsDrawer.d.ts.map +1 -0
  8. package/dist/components/ResultsDrawer/index.d.ts +3 -0
  9. package/dist/components/ResultsDrawer/index.d.ts.map +1 -0
  10. package/dist/components/SelectionPanel/SelectionPanel.d.ts +15 -0
  11. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -0
  12. package/dist/components/SelectionPanel/index.d.ts +3 -0
  13. package/dist/components/SelectionPanel/index.d.ts.map +1 -0
  14. package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
  15. package/dist/components/admin/CollapsibleSection.d.ts +1 -1
  16. package/dist/components/admin/CollapsibleSection.d.ts.map +1 -1
  17. package/dist/components/index.d.ts +6 -2
  18. package/dist/components/index.d.ts.map +1 -1
  19. package/dist/geo-CyDCsiW-.js +1116 -0
  20. package/dist/hooks/index.d.ts +4 -2
  21. package/dist/hooks/index.d.ts.map +1 -1
  22. package/dist/hooks/index.js +30 -25
  23. package/dist/hooks/useSelection.d.ts +14 -0
  24. package/dist/hooks/useSelection.d.ts.map +1 -0
  25. package/dist/{index-DA_GGs_P.js → index-BrphSJJ2.js} +113 -112
  26. package/dist/main.js +1289 -1047
  27. package/dist/schemas/config.d.ts +11 -0
  28. package/dist/schemas/config.d.ts.map +1 -1
  29. package/dist/schemas/index.js +1 -1
  30. package/dist/style.css +1 -1
  31. package/dist/types/index.js +1 -1
  32. package/dist/utils/boxDraw.d.ts +5 -0
  33. package/dist/utils/boxDraw.d.ts.map +1 -0
  34. package/dist/utils/cql2.d.ts +11 -0
  35. package/dist/utils/cql2.d.ts.map +1 -1
  36. package/dist/utils/index.d.ts +2 -0
  37. package/dist/utils/index.d.ts.map +1 -1
  38. package/dist/utils/ogcApi.d.ts +7 -0
  39. package/dist/utils/ogcApi.d.ts.map +1 -1
  40. package/dist/utils/selection.d.ts +12 -0
  41. package/dist/utils/selection.d.ts.map +1 -0
  42. package/package.json +1 -1
  43. package/dist/FeatureTooltip-Db1LgLQV.js +0 -47
  44. 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 $t } from "./BasemapSwitcher-BW7lyZ2Y.js";
2
+ import { C as Bt } from "./CollapsibleControl-qo9daiD8.js";
3
+ import { C as Ut, f as qt, a as Gt } from "./CoordinateDisplay-PxPmVjpm.js";
4
+ import { E as _t } 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 G, useRef as V, useCallback as Be, useId as ze, useMemo as Ue } from "react";
7
+ import { F as Ht } from "./FeatureDetailPanel-CkFpdEKW.js";
8
+ import { F as Xt } from "./FeatureTooltip-DxzN-jnp.js";
9
+ import { L as Kt } from "./LayerPanel-SCdJ8948.js";
10
+ import { L as Zt } from "./Legend-BLWBzD7Y.js";
11
+ import { LuRuler as Qe, LuPentagon as Ze, LuTrash2 as be, LuMousePointer2 as ea, LuSquareDashedMousePointer as aa, LuList as ta, LuGripHorizontal as ia, LuDownload as ra, LuX as la, LuInfo as pa } from "react-icons/lu";
12
+ import { W as na, X as ua, Y as xe, S as qe, n as Ge, m as ye, U as oa, j as ma } from "./geo-CyDCsiW-.js";
13
+ import { a as ai, b as ti, c as ii, Z as ri, _ as li, $ as pi, a0 as ni, a1 as ui, a2 as oi, d as mi, a3 as si, e as ci, f as di, g as hi, h as gi, i as bi, k as yi, l as fi, a4 as xi, a5 as wi, o as Ni, p as vi, q as ki, r as Ci, s as Si, t as Ti, u as Di, v as Li, w as Ai, x as Ei, y as Ii, z as Mi, A as Fi, B as Pi, C as ji, D as Oi, E as $i, a6 as Ri, F as Bi, G as zi, H as Ui, I as qi, J as Gi, a7 as Wi, K as _i, L as Vi, M as Hi, N as Yi, O as Xi, P as Ji, Q as Ki, R as Qi, T as Zi, V as er } from "./geo-CyDCsiW-.js";
14
+ import { S as tr } from "./SearchPanel-4Y12jfuP.js";
15
+ import { s as sa } from "./index-BrphSJJ2.js";
16
+ import { B as rr, C as lr, a as pr, b as nr, D as ur, F as or, c as mr, d as sr, e as cr, G as dr, L as hr, f as gr, g as br, h as yr, i as fr, j as xr, M as wr, N as Nr, O as vr, P as kr, k as Cr, S as Sr, l as Tr, m as Dr, n as Lr, o as Ar, p as Er, q as Ir, r as Mr, T as Fr, U as Pr, V as jr, v as Or } from "./index-BrphSJJ2.js";
17
+ import './style.css';function xt({
18
18
  open: e,
19
19
  layers: t,
20
20
  availableFormats: i,
21
21
  hasActiveFilter: r,
22
- loading: n = !1,
23
- progress: o,
24
- error: p,
25
- onExport: x,
22
+ loading: p = !1,
23
+ progress: u,
24
+ error: n,
25
+ onExport: f,
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));
28
+ const [g, d] = T(""), [x, c] = T(""), [o, h] = T(!0);
29
+ if (G(() => {
30
+ e && (d(t.length === 1 ? t[0].id : ""), c(i.length > 0 ? i[0].id : ""), h(!0));
31
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 = () => {
33
- !N || !v || x({
34
- layer: N,
32
+ const w = t.find((m) => m.id === g), v = i.find((m) => m.id === x), C = w != null && r(w.id), A = w != null && v != null && !p, j = () => {
33
+ !w || !v || f({
34
+ layer: w,
35
35
  format: v,
36
- filtered: T ? u : !1
36
+ filtered: C ? o : !1
37
37
  });
38
38
  };
39
39
  return /* @__PURE__ */ a(
@@ -66,7 +66,7 @@ import './style.css';function nt({
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..." }),
@@ -88,7 +88,7 @@ import './style.css';function nt({
88
88
  type: "radio",
89
89
  name: "export-format",
90
90
  value: m.id,
91
- checked: w === m.id,
91
+ checked: x === m.id,
92
92
  onChange: () => c(m.id),
93
93
  className: "mapui:accent-blue-600"
94
94
  }
@@ -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
  }
@@ -135,12 +135,12 @@ import './style.css';function nt({
135
135
  {
136
136
  type: "button",
137
137
  onClick: j,
138
- disabled: !E,
138
+ disabled: !A,
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
- E ? "mapui:cursor-pointer mapui:bg-blue-600 hover:mapui:bg-blue-700" : "mapui:cursor-not-allowed mapui:bg-blue-400"
141
+ A ? "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,74 +148,74 @@ import './style.css';function nt({
148
148
  }
149
149
  );
150
150
  }
151
- const na = [
152
- { mode: "distance", icon: Ke, label: "Distance" },
153
- { mode: "area", icon: Qe, label: "Area" }
151
+ const ca = [
152
+ { mode: "distance", icon: Qe, label: "Distance" },
153
+ { mode: "area", icon: Ze, label: "Area" }
154
154
  ];
155
- function pa(e, t) {
155
+ function da(e, t) {
156
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";
157
157
  }
158
- function pt({
158
+ function wt({
159
159
  mode: e,
160
160
  onModeChange: t,
161
161
  points: i,
162
162
  measurement: r,
163
- unit: n,
164
- onUnitChange: o,
165
- onClear: p,
166
- className: x
163
+ unit: p,
164
+ onUnitChange: u,
165
+ onClear: n,
166
+ className: f
167
167
  }) {
168
- const s = e ? aa[e] : [];
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 }) => {
168
+ const s = e ? na[e] : [];
169
+ return /* @__PURE__ */ l("div", { className: `mapui:flex mapui:flex-col mapui:gap-3 ${f ?? ""}`, children: [
170
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: ca.map(({ mode: g, icon: d, label: x }) => {
171
171
  const c = e === g;
172
172
  return /* @__PURE__ */ l(
173
173
  "button",
174
174
  {
175
175
  type: "button",
176
176
  onClick: () => t(c ? null : g),
177
- "aria-label": w,
177
+ "aria-label": x,
178
178
  "aria-pressed": c,
179
179
  className: [
180
180
  "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",
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 }),
185
- w
184
+ /* @__PURE__ */ a(d, { size: 16 }),
185
+ x
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) }),
210
+ /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-center mapui:text-xs mapui:text-gray-500", children: da(e, i.length) }),
211
211
  i.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, t, i) {
231
+ return t ? e ? i === 0 ? e === "click" ? "Click on features to select them" : "Click and drag to draw a selection box" : `${i} feature${i !== 1 ? "s" : ""} selected` : "Choose a selection mode" : "Select a layer to begin";
232
+ }
233
+ function Nt({
234
+ mode: e,
235
+ onModeChange: t,
236
+ layers: i,
237
+ activeLayerId: r,
238
+ onActiveLayerChange: p,
239
+ selectedCount: u,
240
+ onClear: n,
241
+ onViewResults: f,
242
+ className: s
243
+ }) {
244
+ const g = i.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: x, label: c }) => {
263
+ const o = e === d;
264
+ return /* @__PURE__ */ l(
265
+ "button",
266
+ {
267
+ type: "button",
268
+ onClick: () => t(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(x, { 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: f,
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(ta, { 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 vt({
318
+ open: e,
319
+ features: t,
320
+ columns: i,
321
+ title: r = "Results",
322
+ onClose: p,
323
+ onExport: u,
324
+ onFeatureClick: n,
325
+ onClearSelection: f
326
+ }) {
327
+ const [s, g] = T(xa), d = V(!1), x = V(0), c = V(0), o = Be((w) => {
328
+ w.preventDefault(), d.current = !0, x.current = w.clientY, c.current = s;
329
+ }, [s]);
330
+ if (G(() => {
331
+ if (!e) return;
332
+ const w = (C) => {
333
+ if (!d.current) return;
334
+ const A = window.innerHeight * fa, j = x.current - C.clientY, m = Math.min(A, Math.max(ya, c.current + j));
335
+ g(m);
336
+ }, v = () => {
337
+ d.current = !1;
338
+ };
339
+ return window.addEventListener("mousemove", w), window.addEventListener("mouseup", v), () => {
340
+ window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", v);
341
+ };
342
+ }, [e]), !e) return null;
343
+ const h = i ?? (t.length > 0 ? Object.keys(t[0].properties).filter((w) => w !== "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(ia, { 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: t.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
+ f && /* @__PURE__ */ a(
375
+ "button",
376
+ {
377
+ type: "button",
378
+ onClick: f,
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: t.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((w) => /* @__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: w
404
+ },
405
+ w
406
+ ))
407
+ ] }) }),
408
+ /* @__PURE__ */ a("tbody", { children: t.map((w, 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(w.properties[C])
424
+ },
425
+ C
426
+ ))
427
+ ]
428
+ },
429
+ v
430
+ )) })
431
+ ] }) })
432
+ ]
433
+ }
434
+ );
435
+ }
436
+ function wa({ text: e, id: t }) {
437
+ const i = ze(), r = t ?? i;
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,20 +460,20 @@ 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: t, required: i, 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
468
  i && /* @__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,
472
+ u,
263
473
  t && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: t })
264
474
  ] });
265
475
  }
266
- function H({ value: e, onChange: t, label: i }) {
476
+ function J({ value: e, onChange: t, label: i }) {
267
477
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
268
478
  /* @__PURE__ */ a(
269
479
  "input",
@@ -283,7 +493,7 @@ function re({
283
493
  title: t,
284
494
  description: i,
285
495
  onConfirm: r,
286
- onCancel: n
496
+ onCancel: p
287
497
  }) {
288
498
  return e ? /* @__PURE__ */ a(
289
499
  "div",
@@ -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
  }
@@ -340,56 +550,56 @@ function X({
340
550
  defaultOpen: i = !1,
341
551
  badge: r
342
552
  }) {
343
- const [n, o] = S(i);
553
+ const [p, u] = T(i);
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: t })
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
576
  onChange: t,
367
577
  onTestConnection: i,
368
578
  testStatus: r = "idle",
369
- testError: n
579
+ testError: p
370
580
  }) {
371
- const o = (p) => t({ ...e, ...p });
581
+ const u = (n) => t({ ...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
605
  i && /* @__PURE__ */ a(
@@ -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 kt({ sources: e, onChange: t }) {
648
+ const [i, r] = T(null), [p, u] = T(null), [n, f] = T(!1), [s, g] = T(le()), [d, x] = T({}), [c, o] = T({}), [h, w] = T(null), v = async (m, I) => {
649
+ x((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(`${I}/conformance`);
652
+ F.ok ? x((b) => ({ ...b, [m]: "success" })) : (x((b) => ({ ...b, [m]: "error" })), o((b) => ({ ...b, [m]: `HTTP ${F.status}` })));
653
+ } catch (F) {
654
+ x((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));
448
- }, E = () => {
449
- t([...e, s]), x(!1), g(le());
656
+ }, C = () => {
657
+ p && (t(e.map((m) => m.id === i ? p : m)), r(null), u(null));
658
+ }, A = () => {
659
+ t([...e, s]), f(!1), g(le());
450
660
  }, j = (m) => {
451
- t(e.filter((I) => I.id !== m)), N(null);
661
+ t(e.filter((I) => I.id !== m)), w(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: [
@@ -458,26 +668,26 @@ function ot({ sources: e, onChange: t }) {
458
668
  {
459
669
  type: "button",
460
670
  onClick: () => {
461
- x(!0), g(le());
671
+ f(!0), g(le());
462
672
  },
463
673
  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",
464
674
  children: "+ Add Source"
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
683
  children: i === 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,
687
+ value: p ?? m,
688
+ onChange: u,
479
689
  onTestConnection: (I) => v(`edit-${m.id}`, I),
480
- testStatus: y[`edit-${m.id}`],
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"
@@ -529,7 +739,7 @@ function ot({ sources: e, onChange: t }) {
529
739
  "button",
530
740
  {
531
741
  type: "button",
532
- onClick: () => N(m.id),
742
+ onClick: () => w(m.id),
533
743
  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",
534
744
  children: "Remove"
535
745
  }
@@ -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
  ),
@@ -556,7 +766,7 @@ function ot({ sources: e, onChange: t }) {
556
766
  "button",
557
767
  {
558
768
  type: "button",
559
- onClick: E,
769
+ onClick: A,
560
770
  disabled: !s.id || !s.url,
561
771
  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",
562
772
  children: "Save"
@@ -566,7 +776,7 @@ function ot({ sources: e, onChange: t }) {
566
776
  "button",
567
777
  {
568
778
  type: "button",
569
- onClick: () => x(!1),
779
+ onClick: () => f(!1),
570
780
  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",
571
781
  children: "Cancel"
572
782
  }
@@ -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),
583
- onCancel: () => N(null)
792
+ onConfirm: () => h && j(h),
793
+ onCancel: () => w(null)
584
794
  }
585
795
  )
586
796
  ] });
587
797
  }
588
- function ut({
798
+ function Ct({
589
799
  sourceUrl: e,
590
800
  selectedCollectionIds: t,
591
801
  onSelect: i,
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 } = qe(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((f) => {
812
+ const s = t.includes(f.id);
603
813
  return /* @__PURE__ */ l(
604
814
  "li",
605
815
  {
@@ -609,53 +819,53 @@ function ut({
609
819
  "input",
610
820
  {
611
821
  type: "checkbox",
612
- id: `collection-${x.id}`,
822
+ id: `collection-${f.id}`,
613
823
  checked: s,
614
- onChange: () => s ? r(x.id) : i(x.id),
824
+ onChange: () => s ? r(f.id) : i(f.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
  ),
618
828
  /* @__PURE__ */ l(
619
829
  "label",
620
830
  {
621
- htmlFor: `collection-${x.id}`,
831
+ htmlFor: `collection-${f.id}`,
622
832
  className: "mapui:flex mapui:cursor-pointer mapui:flex-col mapui:gap-0.5",
623
833
  children: [
624
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: x.title ?? x.id }),
625
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: x.id }),
626
- x.description && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: x.description })
834
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: f.title ?? f.id }),
835
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: f.id }),
836
+ f.description && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: f.description })
627
837
  ]
628
838
  }
629
839
  )
630
840
  ]
631
841
  },
632
- x.id
842
+ f.id
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(() => {
846
+ function Na({ value: e, onChange: t, availableIcons: i }) {
847
+ const [r, p] = T(!1), [u, n] = T(-1), f = V(null), s = ze(), g = u >= 0 ? `${s}-option-${u}` : void 0, d = Ue(() => {
638
848
  if (!i || i.length === 0) return [];
639
849
  if (!e) return i;
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 i.filter((C) => C.toLowerCase().includes(v));
852
+ }, [i, e]), x = r && d.length > 0, c = Be(
643
853
  (v) => {
644
- t(v), n(!1), p(-1);
854
+ t(v), p(!1), n(-1);
645
855
  },
646
856
  [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)));
857
+ ), o = (v) => {
858
+ t(v.target.value), p(!0), n(-1);
859
+ }, h = (v) => {
860
+ x && (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
+ G(() => {
863
+ const v = (C) => {
864
+ f.current && !f.current.contains(C.target) && (p(!1), n(-1));
655
865
  };
656
866
  return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
657
867
  }, []);
658
- 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";
868
+ const w = "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
869
  return !i || i.length === 0 ? /* @__PURE__ */ a(
660
870
  "input",
661
871
  {
@@ -663,9 +873,9 @@ function ua({ value: e, onChange: t, availableIcons: i }) {
663
873
  value: e,
664
874
  onChange: (v) => t(v.target.value || ""),
665
875
  placeholder: "icon-name",
666
- className: N
876
+ className: w
667
877
  }
668
- ) : /* @__PURE__ */ l("div", { ref: x, className: "mapui:relative", children: [
878
+ ) : /* @__PURE__ */ l("div", { ref: f, className: "mapui:relative", children: [
669
879
  /* @__PURE__ */ a(
670
880
  "input",
671
881
  {
@@ -673,41 +883,41 @@ function ua({ value: e, onChange: t, availableIcons: i }) {
673
883
  value: e,
674
884
  placeholder: "Search icons…",
675
885
  role: "combobox",
676
- "aria-expanded": w,
886
+ "aria-expanded": x,
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,
683
- className: N
890
+ onChange: o,
891
+ onFocus: () => p(!0),
892
+ onKeyDown: h,
893
+ className: w
684
894
  }
685
895
  ),
686
- w && /* @__PURE__ */ a(
896
+ x && /* @__PURE__ */ a(
687
897
  "ul",
688
898
  {
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,
698
- onMouseDown: (E) => {
699
- E.preventDefault(), c(v);
907
+ "aria-selected": C === u,
908
+ onMouseDown: (A) => {
909
+ A.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,55 +929,55 @@ 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) {
938
+ function ka(e) {
729
939
  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" });
940
+ for (let p = 2; p < e.length - 1; p += 2)
941
+ r.push({ value: String(e[p] ?? ""), color: e[p + 1] ?? "#000000" });
732
942
  return { property: t, pairs: r, fallback: i };
733
943
  }
734
- function Ne(e, t, i) {
944
+ function ve(e, t, i) {
735
945
  const r = ["match", ["get", e]];
736
- for (const n of t)
737
- r.push(n.value, n.color);
946
+ for (const p of t)
947
+ r.push(p.value, p.color);
738
948
  return r.push(i), r;
739
949
  }
740
- function pe(e) {
950
+ function ne(e) {
741
951
  const t = e[2];
742
952
  let i = "";
743
953
  Array.isArray(t) && (t[0] === "to-number" && Array.isArray(t[1]) ? i = t[1][1] ?? "" : i = t[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" });
955
+ for (let p = 3; p < e.length; p += 2)
956
+ r.push({ stop: Number(e[p] ?? 0), color: e[p + 1] ?? "#000000" });
747
957
  return { property: i, stops: r };
748
958
  }
749
- function ve(e, t) {
959
+ function ke(e, t) {
750
960
  const i = ["interpolate", ["linear"], ["to-number", ["get", e]]];
751
961
  for (const r of t)
752
962
  i.push(r.stop, r.color);
753
963
  return i;
754
964
  }
755
- function ke(e) {
965
+ function Ce(e) {
756
966
  return e.map((t) => ({ stopText: String(t.stop), color: t.color }));
757
967
  }
758
- function ca(e) {
968
+ function Ca(e) {
759
969
  return e.map((t, i) => {
760
970
  if (t.stopText.trim() === "") return "Value required";
761
971
  const r = parseFloat(t.stopText);
762
972
  if (isNaN(r)) return "Must be a number";
763
973
  if (i > 0) {
764
- const n = parseFloat(e[i - 1].stopText);
765
- if (!isNaN(n) && r <= n) return "Must be greater than previous stop";
974
+ const p = parseFloat(e[i - 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) {
980
+ function Sa(e) {
771
981
  const t = [];
772
982
  for (const i of e) {
773
983
  const r = parseFloat(i.stopText);
@@ -776,165 +986,165 @@ function da(e) {
776
986
  }
777
987
  return t;
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
992
  onChange: t,
783
993
  availableProperties: i = [],
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, f] = T(!1), s = ka(e), g = p === "match" ? s.property : "", d = p === "match" ? s.pairs : [], x = p === "match" ? s.fallback : "#000000", [c, o] = T(() => {
997
+ const y = ne(e);
998
+ return Ce(y.stops);
999
+ }), [h, w] = T(() => p === "interpolate" ? ne(e).property : ""), [v, C] = T([]), A = V(e);
1000
+ G(() => {
1001
+ if (A.current !== e && p === "interpolate") {
1002
+ const y = ne(e);
1003
+ o(Ce(y.stops)), w(y.property), C([]);
794
1004
  }
795
- E.current = e;
796
- }, [e, n]);
1005
+ A.current = e;
1006
+ }, [e, p]);
797
1007
  const j = i.filter(
798
- (b) => !b.type || b.type === "string"
1008
+ (y) => !y.type || y.type === "string"
799
1009
  ), 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);
1010
+ (y) => y.type === "number" || y.type === "integer"
1011
+ ), I = (y, D, E) => {
1012
+ t(ve(y, D, E));
1013
+ }, F = (y) => {
1014
+ I(y, d, x);
1015
+ }, b = (y) => {
1016
+ I(g, d, y);
1017
+ }, M = (y, D) => {
1018
+ const E = d.map((L, B) => B === y ? { ...L, value: D } : L);
1019
+ I(g, E, x);
1020
+ }, P = (y, D) => {
1021
+ const E = d.map((L, B) => B === y ? { ...L, color: D } : L);
1022
+ I(g, E, x);
1023
+ }, N = (y) => {
1024
+ const D = d.filter((E, L) => L !== y);
1025
+ I(g, D, x);
816
1026
  }, k = () => {
817
- const b = [...y, { value: "", color: ne(y.length) }];
818
- I(g, b, w);
1027
+ const y = [...d, { value: "", color: pe(d.length) }];
1028
+ I(g, y, x);
819
1029
  }, O = async () => {
820
1030
  if (!(!r || !g)) {
821
- x(!0);
1031
+ f(!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((E, L) => ({
1034
+ value: E,
1035
+ color: pe(L)
826
1036
  }));
827
- I(g, D, w);
1037
+ I(g, D, x);
828
1038
  } finally {
829
- x(!1);
1039
+ f(!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 = (y, D) => {
1043
+ const E = Ca(D);
1044
+ if (C(E), y && D.length >= 2 && E.every((L) => !L)) {
1045
+ const L = Sa(D);
1046
+ L && t(ke(y, L));
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);
849
- }, K = () => {
1048
+ }, W = (y) => {
1049
+ w(y), R(y, c);
1050
+ }, U = (y, D) => {
1051
+ const E = c.map((L, B) => B === y ? { ...L, stopText: D } : L);
1052
+ o(E), R(h, E);
1053
+ }, q = (y, D) => {
1054
+ const E = c.map((L, B) => B === y ? { ...L, color: D } : L);
1055
+ o(E), R(h, E);
1056
+ }, K = (y) => {
1057
+ const D = c.filter((E, L) => L !== y);
1058
+ o(D), R(h, D);
1059
+ }, Q = () => {
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 y = ((B = c[c.length - 1]) == null ? void 0 : B.stopText) ?? "0", D = parseFloat(y), E = isNaN(D) ? 0 : D + 10, L = [...c, { stopText: String(E), color: pe(c.length) }];
1062
+ o(L), R(h, L);
1063
+ }, Z = (y) => {
1064
+ u(y), y === "match" ? t(ve("", [], "#000000")) : (o([]), w(""), C([]), t(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((y) => /* @__PURE__ */ a(
858
1068
  "button",
859
1069
  {
860
1070
  type: "button",
861
- onClick: () => Q(b),
1071
+ onClick: () => Z(y),
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 === y ? "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: y === "match" ? "Categorical" : "Gradient"
868
1078
  },
869
- b
1079
+ y
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: (y) => F(y.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
+ j.map((y) => /* @__PURE__ */ a("option", { value: y.name, children: y.title ?? y.name }, y.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((y, 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: y.value,
1100
+ onChange: (E) => M(D, E.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
+ J,
897
1107
  {
898
- value: b.color,
899
- onChange: (A) => P(D, A),
900
- label: `Color for "${b.value}"`
1108
+ value: y.color,
1109
+ onChange: (E) => P(D, E),
1110
+ label: `Color for "${y.value}"`
901
1111
  }
902
1112
  ),
903
- /* @__PURE__ */ a("button", { type: "button", onClick: () => f(D), className: Ce, children: "×" })
1113
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => N(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(J, { value: x, 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
1125
  onClick: O,
916
- disabled: p,
917
- className: oe,
918
- children: p ? "Loading…" : "Auto-populate"
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: (y) => W(y.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((y) => /* @__PURE__ */ a("option", { value: y.name, children: y.title ?? y.name }, y.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((y, D) => {
1147
+ const E = 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,31 +1152,31 @@ 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: y.stopText,
1156
+ onChange: (L) => U(D, L.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
+ J,
953
1163
  {
954
- value: b.color,
955
- onChange: (L) => z(D, L),
956
- label: `Color at stop ${b.stopText}`
1164
+ value: y.color,
1165
+ onChange: (L) => q(D, L),
1166
+ label: `Color at stop ${y.stopText}`
957
1167
  }
958
1168
  ),
959
- /* @__PURE__ */ a("button", { type: "button", onClick: () => J(D), className: Ce, children: "×" })
1169
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => K(D), className: Se, children: "×" })
960
1170
  ] }),
961
- A && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-500", children: A })
1171
+ E && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-500", children: E })
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: Q, 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 H = "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
1181
  onChange: t
972
1182
  }) {
@@ -978,8 +1188,8 @@ function ga({
978
1188
  type: "number",
979
1189
  step: 0.5,
980
1190
  value: i,
981
- onChange: (n) => t([parseFloat(n.target.value) || 0, r]),
982
- className: `${_} mapui:w-20`,
1191
+ onChange: (p) => t([parseFloat(p.target.value) || 0, r]),
1192
+ className: `${H} mapui:w-20`,
983
1193
  "aria-label": "X",
984
1194
  placeholder: "X"
985
1195
  }
@@ -990,15 +1200,15 @@ 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) => t([i, parseFloat(p.target.value) || 0]),
1204
+ className: `${H} 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
1213
  onChange: t
1004
1214
  }) {
@@ -1019,15 +1229,15 @@ function ba({
1019
1229
  /* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: i.toFixed(2) })
1020
1230
  ] });
1021
1231
  }
1022
- function Se({
1232
+ function Te({
1023
1233
  def: e,
1024
1234
  value: t,
1025
1235
  onChange: i,
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, f;
1031
1241
  switch (e.widget) {
1032
1242
  case "color": {
1033
1243
  const s = Array.isArray(t), g = s ? t[t.length - 1] ?? "#000000" : "#000000";
@@ -1049,15 +1259,15 @@ function Se({
1049
1259
  }
1050
1260
  ) }),
1051
1261
  s ? /* @__PURE__ */ a(
1052
- ha,
1262
+ Ta,
1053
1263
  {
1054
1264
  value: t,
1055
- onChange: (y) => i(y),
1056
- availableProperties: n,
1057
- onFetchDistinctValues: o
1265
+ onChange: (d) => i(d),
1266
+ availableProperties: p,
1267
+ onFetchDistinctValues: u
1058
1268
  }
1059
1269
  ) : /* @__PURE__ */ a(
1060
- H,
1270
+ J,
1061
1271
  {
1062
1272
  value: t ?? "#000000",
1063
1273
  onChange: i,
@@ -1068,7 +1278,7 @@ function Se({
1068
1278
  }
1069
1279
  case "opacity":
1070
1280
  return /* @__PURE__ */ a(
1071
- ba,
1281
+ La,
1072
1282
  {
1073
1283
  value: t,
1074
1284
  onChange: i
@@ -1084,7 +1294,7 @@ function Se({
1084
1294
  step: e.step ?? 1,
1085
1295
  value: t ?? e.min ?? 0,
1086
1296
  onChange: (s) => i(parseFloat(s.target.value) || 0),
1087
- className: _
1297
+ className: H
1088
1298
  }
1089
1299
  );
1090
1300
  case "boolean":
@@ -1101,15 +1311,15 @@ function Se({
1101
1311
  return /* @__PURE__ */ a(
1102
1312
  "select",
1103
1313
  {
1104
- value: t ?? ((p = e.options) == null ? void 0 : p[0]) ?? "",
1314
+ value: t ?? ((n = e.options) == null ? void 0 : n[0]) ?? "",
1105
1315
  onChange: (s) => i(s.target.value),
1106
- className: _,
1107
- children: (x = e.options) == null ? void 0 : x.map((s) => /* @__PURE__ */ a("option", { value: s, children: s }, s))
1316
+ className: H,
1317
+ children: (f = e.options) == null ? void 0 : f.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
1324
  value: t,
1115
1325
  onChange: i
@@ -1123,22 +1333,22 @@ function Se({
1123
1333
  {
1124
1334
  type: "text",
1125
1335
  value: g,
1126
- onChange: (y) => {
1127
- const w = y.target.value.trim();
1128
- if (!w) {
1336
+ onChange: (d) => {
1337
+ const x = d.target.value.trim();
1338
+ if (!x) {
1129
1339
  i(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));
1343
+ const c = x.split(",").map((o) => parseFloat(o.trim())).filter((o) => !isNaN(o));
1134
1344
  i(c.length > 0 ? c : void 0);
1135
1345
  } else {
1136
- const c = w.split(",").map((u) => u.trim()).filter(Boolean);
1346
+ const c = x.split(",").map((o) => o.trim()).filter(Boolean);
1137
1347
  i(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: H
1142
1352
  }
1143
1353
  );
1144
1354
  }
@@ -1149,12 +1359,12 @@ function Se({
1149
1359
  type: "text",
1150
1360
  value: t ?? "",
1151
1361
  onChange: (s) => i(s.target.value || void 0),
1152
- className: _
1362
+ className: H
1153
1363
  }
1154
1364
  );
1155
1365
  case "icon-image":
1156
1366
  return /* @__PURE__ */ a(
1157
- ua,
1367
+ Na,
1158
1368
  {
1159
1369
  value: t ?? "",
1160
1370
  onChange: (s) => i(s ?? void 0),
@@ -1165,11 +1375,11 @@ 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: t, onChange: i, availableIcons: r, availableProperties: p, onFetchDistinctValues: u }) {
1379
+ const n = e.enableDefault !== void 0, f = t !== 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",
@@ -1181,74 +1391,74 @@ function ya({ def: e, value: t, onChange: i, availableIcons: r, availablePropert
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
- checked: x,
1399
+ checked: f,
1190
1400
  onChange: (s) => {
1191
1401
  i(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
- x && /* @__PURE__ */ a(
1197
- Se,
1406
+ f && /* @__PURE__ */ a(
1407
+ Te,
1198
1408
  {
1199
1409
  def: e,
1200
1410
  value: t,
1201
1411
  onChange: (s) => i(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
1421
  value: t,
1212
1422
  onChange: (s) => i(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
1431
  properties: t,
1222
1432
  values: i,
1223
1433
  onChange: r,
1224
- defaultOpen: n = !1,
1225
- availableIcons: o,
1226
- availableProperties: p,
1227
- onFetchDistinctValues: x
1434
+ defaultOpen: p = !1,
1435
+ availableIcons: u,
1436
+ availableProperties: n,
1437
+ onFetchDistinctValues: f
1228
1438
  }) {
1229
1439
  const s = t.filter(
1230
1440
  (g) => g.enableDefault !== void 0 && i[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: t.map((g) => /* @__PURE__ */ a(
1443
+ Aa,
1234
1444
  {
1235
1445
  def: g,
1236
1446
  value: i[g.key],
1237
1447
  onChange: r,
1238
- availableIcons: o,
1239
- availableProperties: p,
1240
- onFetchDistinctValues: x
1448
+ availableIcons: u,
1449
+ availableProperties: n,
1450
+ onFetchDistinctValues: f
1241
1451
  },
1242
1452
  g.key
1243
1453
  )) }) });
1244
1454
  }
1245
- function W(e) {
1455
+ function _(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
1463
  const t = [];
1254
1464
  for (let r = 3; r < e.length; r += 2)
@@ -1264,12 +1474,12 @@ function ze(e) {
1264
1474
  }
1265
1475
  return [];
1266
1476
  }
1267
- function xa(e) {
1477
+ function Ia(e) {
1268
1478
  if (e[0] === "match") {
1269
1479
  const t = [];
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" && t.push({ label: p, color: u });
1273
1483
  }
1274
1484
  const i = e[e.length - 1];
1275
1485
  return typeof i == "string" && t.push({ label: "Other", color: i }), t;
@@ -1277,14 +1487,14 @@ function xa(e) {
1277
1487
  if (e[0] === "interpolate") {
1278
1488
  const t = [];
1279
1489
  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 });
1490
+ const r = String(e[i]), p = e[i + 1];
1491
+ typeof p == "string" && t.push({ label: r, color: p });
1282
1492
  }
1283
1493
  return t;
1284
1494
  }
1285
1495
  return [];
1286
1496
  }
1287
- function wa(e) {
1497
+ function Ma(e) {
1288
1498
  const t = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
1289
1499
  if (Array.isArray(t)) {
1290
1500
  if (t[0] === "get" && typeof t[1] == "string") return t[1];
@@ -1293,7 +1503,7 @@ function wa(e) {
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,8 +1526,8 @@ function va(e) {
1316
1526
  return "circle";
1317
1527
  }
1318
1528
  }
1319
- function ue({ expr: e, height: t }) {
1320
- const i = ze(e);
1529
+ function oe({ expr: e, height: t }) {
1530
+ const i = We(e);
1321
1531
  if (i.length === 0)
1322
1532
  return /* @__PURE__ */ a(
1323
1533
  "div",
@@ -1326,24 +1536,24 @@ function ue({ expr: e, height: t }) {
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, ${i.join(", ")})` : i.map((u, n) => `${u} ${n / i.length * 100}% ${(n + 1) / i.length * 100}%`).join(", ");
1330
1540
  return /* @__PURE__ */ a(
1331
1541
  "div",
1332
1542
  {
1333
1543
  style: {
1334
1544
  width: "100%",
1335
1545
  height: t ?? 32,
1336
- background: r ? n : `linear-gradient(to right, ${n})`,
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, t) {
1554
+ return typeof e == "string" ? e : _(e) ? We(e)[0] ?? t : t;
1345
1555
  }
1346
- function ka({ style: e }) {
1556
+ function ja({ 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: _(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"] && !_(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: _(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: _(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"] && !_(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 t = Le(e.paint["text-color"], "#333333"), i = Le(e.paint["icon-color"], "#333333");
1414
1624
  return /* @__PURE__ */ a(
1415
1625
  "div",
1416
1626
  {
@@ -1430,7 +1640,7 @@ function ka({ style: e }) {
1430
1640
  }
1431
1641
  );
1432
1642
  }
1433
- const Ca = [
1643
+ const Oa = [
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,16 +1740,16 @@ 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: Oa,
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) {
1752
+ function Ae(e) {
1543
1753
  const t = {};
1544
1754
  for (const i of e)
1545
1755
  t[i.group] || (t[i.group] = []), t[i.group].push(i);
@@ -1548,176 +1758,176 @@ function Le(e) {
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
+ }, qa = {
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
+ }, Ga = {
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
1776
  const t = e.layout ?? {}, i = "icon-image" in t, r = "text-field" in t;
1567
1777
  return i && r ? "both" : i ? "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", te = {
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: t, suggestedType: i, suggestedTypes: r, availableIcons: p, availableProperties: u, onFetchDistinctValues: n }) {
1786
+ const f = r ?? (i ? [i] : []), [s, g] = T(() => Ee(e));
1787
+ G(() => {
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
+ t(b === "fill" ? ge : b === "line" ? qa : b === "circle" ? _e : Ga);
1792
+ }, x = (b) => {
1793
+ if (b === s) return;
1794
+ const M = e.paint ?? {}, P = e.layout ?? {};
1795
+ let N = { ...M }, k = { ...P };
1796
+ b === "icon" ? (N = Object.fromEntries(Object.entries(N).filter(([O]) => !O.startsWith("text-"))), k = Object.fromEntries(Object.entries(k).filter(([O]) => !O.startsWith("text-"))), "icon-image" in k || (k["icon-image"] = Wa.layout["icon-image"])) : b === "text" && (N = Object.fromEntries(Object.entries(N).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 N || (N["text-color"] = "#333333")), g(b), t({
1587
1797
  ...e,
1588
- paint: f,
1798
+ paint: N,
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];
1801
+ }, c = (b, M) => {
1802
+ const P = { ...e.paint, [b]: M };
1803
+ for (const N of Object.keys(P))
1804
+ P[N] === void 0 && delete P[N];
1595
1805
  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];
1806
+ }, o = (b, M) => {
1807
+ const N = { ...e.layout ?? {}, [b]: M };
1808
+ for (const k of Object.keys(N))
1809
+ N[k] === void 0 && delete N[k];
1600
1810
  t({
1601
1811
  ...e,
1602
- layout: Object.keys(f).length > 0 ? f : void 0
1812
+ layout: Object.keys(N).length > 0 ? N : 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 w = h.filter((b) => b.category === "paint"), v = h.filter((b) => b.category === "layout"), C = Ae(w), A = Ae(v), j = e.paint, m = e.layout ?? {}, I = Object.keys(C), F = Object.keys(A);
1608
1818
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1609
- 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: [
1819
+ f.length > 0 && !f.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
+ f.map((b, M) => /* @__PURE__ */ l("span", { children: [
1824
+ M > 0 && (M === f.length - 1 ? " or " : ", "),
1825
+ /* @__PURE__ */ a("strong", { children: te[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: f.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: te[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(te).map((b) => /* @__PURE__ */ a("option", { value: b, children: te[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: () => x(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(ja, { 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: A[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
1885
  I.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
+ I.map((b) => /* @__PURE__ */ a(
1888
+ De,
1679
1889
  {
1680
- title: h,
1681
- properties: T[h],
1890
+ title: b,
1891
+ properties: C[b],
1682
1892
  values: j,
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: t }) {
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
1912
  onChange: (i) => t({ ...e, label: i.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
+ J,
1709
1919
  {
1710
1920
  value: e.color,
1711
1921
  onChange: (i) => t({ ...e, color: i }),
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
1929
  onChange: (i) => t({ ...e, shape: i.target.value }),
1720
- className: Ee,
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(() => {
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: t, styles: i }) {
1942
+ const r = (e == null ? void 0 : e.entries) ?? [], p = (e == null ? void 0 : e.displayMode) ?? "simple", u = Ue(() => {
1733
1943
  if (!i || i.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);
1740
- 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 });
1945
+ let o = "simple", h = null;
1946
+ for (const w of i) {
1947
+ const v = Fa(w), C = Pa(w);
1948
+ if (_(v)) {
1949
+ const A = Ea(v);
1950
+ if (!A) continue;
1951
+ const j = Ia(v).map((m) => ({ label: m.label, color: m.color, shape: C }));
1952
+ c.push(...j), A === "interpolate" ? (o = "gradient", h || (h = Ma(v))) : o === "simple" && (o = "categorical");
1953
+ } else typeof v == "string" && c.length === 0 && c.push({ label: w.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
+ }, [i]), n = () => {
1957
+ t({ ...e, entries: [...r, Me()] });
1958
+ }, f = (c, o) => {
1959
+ const h = r.map((w, v) => v === c ? o : w);
1960
+ t({ ...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, w) => w !== c);
1963
+ t(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
+ t(c ? { entries: [Me()] } : void 0);
1966
+ }, d = () => {
1967
+ u && t({
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
- }, w = (c) => {
1973
+ }, x = (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, t(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,21 +2020,21 @@ 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,
1827
- onChange: (c) => w(c.target.value),
2036
+ value: p,
2037
+ onChange: (c) => x(c.target.value),
1828
2038
  className: Fe,
1829
2039
  children: [
1830
2040
  /* @__PURE__ */ a("option", { value: "simple", children: "Simple" }),
@@ -1834,7 +2044,7 @@ 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
  {
@@ -1847,7 +2057,7 @@ function $a({ value: e, onChange: t, styles: i }) {
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
  {
@@ -1860,7 +2070,7 @@ function $a({ value: e, onChange: t, styles: i }) {
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
  {
@@ -1873,7 +2083,7 @@ function $a({ value: e, onChange: t, styles: i }) {
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",
@@ -1887,7 +2097,7 @@ function $a({ value: e, onChange: t, styles: i }) {
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) => f(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
2160
  onChange: t,
1951
2161
  placeholder: i,
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 G(() => {
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: (f) => u(f.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 f = p.trim(), s = f ? f.split(",").map((g) => g.trim()).filter(Boolean) : void 0;
2175
+ t(s), u((s == null ? void 0 : s.join(", ")) ?? "");
1966
2176
  },
1967
2177
  placeholder: i,
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", Ja = {
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 Ka({ value: e, onChange: t, availableProperties: i }) {
2189
+ const r = (n) => {
2190
+ t({ ...Ja[n], property: e.property, label: e.label });
2191
+ }, p = (n) => t({ ...e, ...n }), u = i && i.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
+ i.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) => t({ ...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) => t({ ...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) => t({ ...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) => t({ ...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) => t({
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) => t({
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) => t({
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) => t({ ...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) => t({
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) => t({
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) => t({
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) => t({ ...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) => t({ ...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) => t({ ...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) => t({ ...e, options: n }),
2235
2445
  placeholder: "option1, option2",
2236
2446
  className: $
2237
2447
  }
@@ -2239,40 +2449,40 @@ function Ba({ value: e, onChange: t, availableProperties: i }) {
2239
2449
  ] })
2240
2450
  ] });
2241
2451
  }
2242
- const Ua = () => ({
2452
+ const Qa = () => ({
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;
2258
- 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;
2262
- const w = [...e];
2263
- [w[y], w[y + 1]] = [w[y + 1], w[y]], t(w), n(y + 1);
2458
+ function Za({ fields: e, onChange: t, availableProperties: i }) {
2459
+ const [r, p] = T(null), u = () => {
2460
+ const d = [...e, Qa()];
2461
+ t(d), p(d.length - 1);
2462
+ }, n = (d, x) => {
2463
+ t(e.map((c, o) => o === d ? x : c));
2464
+ }, f = (d) => {
2465
+ t(e.filter((x, c) => c !== d)), p(null);
2466
+ }, s = (d) => {
2467
+ if (d === 0) return;
2468
+ const x = [...e];
2469
+ [x[d - 1], x[d]] = [x[d], x[d - 1]], t(x), p(d - 1);
2470
+ }, g = (d) => {
2471
+ if (d === e.length - 1) return;
2472
+ const x = [...e];
2473
+ [x[d], x[d + 1]] = [x[d + 1], x[d]], t(x), 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, x) => /* @__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(
2271
2481
  "button",
2272
2482
  {
2273
2483
  type: "button",
2274
- onClick: () => s(w),
2275
- disabled: w === 0,
2484
+ onClick: () => s(x),
2485
+ disabled: x === 0,
2276
2486
  "aria-label": "Move up",
2277
2487
  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",
2278
2488
  children: "▲"
@@ -2282,8 +2492,8 @@ function qa({ fields: e, onChange: t, availableProperties: i }) {
2282
2492
  "button",
2283
2493
  {
2284
2494
  type: "button",
2285
- onClick: () => g(w),
2286
- disabled: w === e.length - 1,
2495
+ onClick: () => g(x),
2496
+ disabled: x === e.length - 1,
2287
2497
  "aria-label": "Move down",
2288
2498
  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",
2289
2499
  children: "▼"
@@ -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 === x ? null : x),
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
  ),
@@ -2306,41 +2516,41 @@ function qa({ fields: e, onChange: t, availableProperties: i }) {
2306
2516
  "button",
2307
2517
  {
2308
2518
  type: "button",
2309
- onClick: () => x(w),
2519
+ onClick: () => f(x),
2310
2520
  "aria-label": "Remove field",
2311
2521
  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",
2312
2522
  children: "Remove"
2313
2523
  }
2314
2524
  )
2315
2525
  ] }),
2316
- r === w && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2317
- Ba,
2526
+ r === x && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2527
+ Ka,
2318
2528
  {
2319
- value: y,
2320
- onChange: (c) => p(w, c),
2529
+ value: d,
2530
+ onChange: (c) => n(x, c),
2321
2531
  availableProperties: i
2322
2532
  }
2323
2533
  ) })
2324
- ] }, w)) }),
2534
+ ] }, x)) }),
2325
2535
  /* @__PURE__ */ a(
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) {
2546
+ function et(e) {
2337
2547
  return Object.entries(e).map(([t, i]) => ({
2338
2548
  key: t,
2339
2549
  label: i.label ?? "",
2340
2550
  visible: i.visible ?? !0
2341
2551
  }));
2342
2552
  }
2343
- function Ga(e) {
2553
+ function at(e) {
2344
2554
  const t = {};
2345
2555
  for (const i of e)
2346
2556
  t[i.key] = {
@@ -2350,37 +2560,37 @@ function Ga(e) {
2350
2560
  return t;
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 tt({ value: e, onChange: t, availableProperties: i }) {
2564
+ const r = et(e), p = i && i.length > 0, u = (o) => t(at(o)), n = () => {
2565
+ u([...r, { key: "", label: "", visible: !0 }]);
2566
+ }, f = (o) => {
2567
+ u(r.filter((h, w) => w !== o));
2568
+ }, s = (o, h) => {
2569
+ u(r.map((w, v) => v === o ? { ...w, ...h } : w));
2570
+ }, g = (o, h) => {
2571
+ const w = i == null ? void 0 : i.find((C) => C.name === h), v = (w == null ? void 0 : w.title) ?? r[o].label;
2572
+ u(r.map((C, A) => A === 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
+ }, x = (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
2582
  if (!i) return;
2373
- const u = i.map((d) => ({
2374
- key: d.name,
2375
- label: d.title ?? "",
2583
+ const o = i.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: () => x(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: (w) => g(h, w.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
+ i.map((w) => /* @__PURE__ */ a("option", { value: w.name, children: w.title ?? w.name }, w.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: (w) => s(h, { key: w.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: (w) => s(h, { label: w.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: (w) => s(h, { visible: w.target.checked }),
2464
2674
  "aria-label": "Visible",
2465
2675
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2466
2676
  }
@@ -2469,60 +2679,60 @@ function Wa({ value: e, onChange: t, availableProperties: i }) {
2469
2679
  "button",
2470
2680
  {
2471
2681
  type: "button",
2472
- onClick: () => x(d),
2682
+ onClick: () => f(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 it(e) {
2704
+ return !!e.$ref && Ve.test(e.$ref);
2495
2705
  }
2496
- function Ve(e) {
2497
- const t = We.exec(e);
2706
+ function He(e) {
2707
+ const t = Ve.exec(e);
2498
2708
  return t ? t[1] : null;
2499
2709
  }
2500
- function _e(e) {
2710
+ function Ye(e) {
2501
2711
  const t = e.toLowerCase();
2502
2712
  return t.includes("polygon") ? "fill" : t.includes("linestring") ? "line" : t.includes("point") ? "circle" : null;
2503
2713
  }
2504
- function ye(e) {
2714
+ function fe(e) {
2505
2715
  const t = e.toLowerCase();
2506
2716
  return t.includes("polygon") ? ["fill", "line"] : t.includes("linestring") ? ["line"] : t.includes("point") ? ["circle", "symbol"] : [];
2507
2717
  }
2508
- function _a(e) {
2718
+ function rt(e) {
2509
2719
  for (const t of Object.values(e.properties))
2510
2720
  if (t.$ref) {
2511
- const i = Ve(t.$ref);
2512
- if (i) return _e(i);
2721
+ const i = He(t.$ref);
2722
+ if (i) return Ye(i);
2513
2723
  }
2514
2724
  return null;
2515
2725
  }
2516
- function Ye(e) {
2726
+ function Xe(e) {
2517
2727
  for (const t of Object.values(e.properties))
2518
2728
  if (t.$ref) {
2519
- const i = Ve(t.$ref);
2520
- if (i) return ye(i);
2729
+ const i = He(t.$ref);
2730
+ if (i) return fe(i);
2521
2731
  }
2522
2732
  return [];
2523
2733
  }
2524
- function Ya(e) {
2525
- return Object.entries(e.properties).filter(([, t]) => !Va(t)).map(([t, i]) => ({
2734
+ function lt(e) {
2735
+ return Object.entries(e.properties).filter(([, t]) => !it(t)).map(([t, i]) => ({
2526
2736
  name: t,
2527
2737
  title: i.title,
2528
2738
  type: i.type,
@@ -2532,18 +2742,18 @@ function Ya(e) {
2532
2742
  maximum: i.maximum
2533
2743
  }));
2534
2744
  }
2535
- function Xe(e) {
2745
+ function Je(e) {
2536
2746
  var i;
2537
2747
  const t = /* @__PURE__ */ new Set();
2538
2748
  for (const r of e)
2539
2749
  (i = r.geometry) != null && i.type && t.add(r.geometry.type);
2540
2750
  return Array.from(t);
2541
2751
  }
2542
- function Xa(e) {
2752
+ function pt(e) {
2543
2753
  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");
2754
+ for (const p of e) {
2755
+ const u = p.toLowerCase();
2756
+ u.includes("polygon") ? t.add("polygon") : u.includes("linestring") ? t.add("line") : u.includes("point") && t.add("point");
2547
2757
  }
2548
2758
  const i = t.size > 1, r = [];
2549
2759
  return t.has("polygon") && r.push({
@@ -2560,121 +2770,121 @@ function Xa(e) {
2560
2770
  ...i ? { geometryFilter: ["Point", "MultiPoint"] } : {}
2561
2771
  }), r;
2562
2772
  }
2563
- async function mt(e, t) {
2773
+ async function St(e, t) {
2564
2774
  var i, r;
2565
2775
  try {
2566
- const n = await qe(e, t), o = _a(n);
2567
- if (o) return o;
2776
+ const p = await Ge(e, t), u = rt(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 = (i = (await ye(e, t, { limit: 1 })).features[0]) == null ? void 0 : i.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 Tt(e, t) {
2578
2788
  try {
2579
- const i = await qe(e, t), r = Ye(i);
2789
+ const i = await Ge(e, t), r = Xe(i);
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 i = await ye(e, t, { limit: 20 }), r = Je(i.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) {
2803
+ function Dt(e) {
2594
2804
  return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (t) => t.toUpperCase());
2595
2805
  }
2596
- function Ha(e, t, i) {
2806
+ function nt(e, t, i) {
2597
2807
  const r = [...e ?? []];
2598
2808
  return r[t] = i, r;
2599
2809
  }
2600
- function Ja(e, t) {
2810
+ function ut(e, t) {
2601
2811
  return (e ?? []).filter((i, r) => r !== t);
2602
2812
  }
2603
2813
  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 }) {
2814
+ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2605
2815
  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(() => {
2816
+ const p = (m) => t({ ...e, ...m }), u = V(e);
2817
+ u.current = e;
2818
+ const n = V(t);
2819
+ n.current = t;
2820
+ const f = i.find((m) => m.id === e.sourceId), s = (f == null ? void 0 : f.url) ?? null, g = e.collection || null, { collections: d, loading: x } = qe(s), { queryables: c, loading: o } = oa(s, g), h = c ? lt(c) : [], [w, v] = T([]), [C, A] = T([]);
2821
+ return G(() => {
2612
2822
  if (!c) {
2613
- v([]), E([]);
2823
+ v([]), A([]);
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);
2826
+ const m = (b, M) => {
2827
+ var N;
2828
+ const P = pt(b);
2829
+ v(P), A(M), P.length > 0 && !((N = u.current.styles) != null && N.length) && n.current({ ...u.current, styles: P });
2830
+ }, I = Xe(c);
2621
2831
  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);
2832
+ const b = [];
2833
+ for (const M of I)
2834
+ M === "fill" ? b.push("Polygon") : M === "line" ? b.push("LineString") : (M === "circle" || M === "symbol") && b.push("Point");
2835
+ m(b, I);
2626
2836
  return;
2627
2837
  }
2628
2838
  if (!s || !g) {
2629
- v([]), E([]);
2839
+ v([]), A([]);
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 = Je(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 N of M)
2849
+ for (const k of fe(N)) P.add(k);
2850
+ m(M, Array.from(P));
2641
2851
  } else
2642
- v([]), E([]);
2852
+ v([]), A([]);
2643
2853
  }).catch(() => {
2644
- M || (v([]), E([]));
2854
+ F || (v([]), A([]));
2645
2855
  }), () => {
2646
- M = !0;
2856
+ F = !0;
2647
2857
  };
2648
- }, [c, s, g]), V(() => {
2649
- v([]), E([]);
2858
+ }, [c, s, g]), G(() => {
2859
+ v([]), A([]);
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
2869
  className: Y
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
2879
  className: Y
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 }),
2887
+ onChange: (m) => p({ sourceId: m.target.value }),
2678
2888
  className: Y,
2679
2889
  children: [
2680
2890
  /* @__PURE__ */ a("option", { value: "", children: "Select a source…" }),
@@ -2682,16 +2892,16 @@ function Pe({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
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 }),
2900
+ onChange: (m) => p({ collection: m.target.value }),
2691
2901
  className: Y,
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 }),
2703
- placeholder: w ? "Loading collections…" : "collection-id",
2912
+ onChange: (m) => p({ collection: m.target.value }),
2913
+ placeholder: x ? "Loading collections…" : "collection-id",
2704
2914
  className: Y
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,7 +2937,7 @@ 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
  ),
@@ -2735,32 +2945,32 @@ function Pe({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2735
2945
  ] }),
2736
2946
  /* @__PURE__ */ a(X, { title: "Style", children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-4", children: [
2737
2947
  (e.styles ?? [ge]).map((m, I) => {
2738
- var M;
2948
+ var F;
2739
2949
  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(
2950
+ 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
2951
  "span",
2742
2952
  {
2743
2953
  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
2954
+ children: b
2745
2955
  },
2746
- h
2956
+ b
2747
2957
  )) }),
2748
2958
  /* @__PURE__ */ a(
2749
- Oa,
2959
+ Ha,
2750
2960
  {
2751
2961
  value: m,
2752
- onChange: (h) => n({ styles: Ha(e.styles, I, h) }),
2753
- suggestedTypes: T,
2962
+ onChange: (b) => p({ styles: nt(e.styles, I, b) }),
2963
+ suggestedTypes: C,
2754
2964
  availableIcons: r,
2755
- availableProperties: d,
2756
- onFetchDistinctValues: s && g ? (h) => ra(s, g, h, { limit: 1e3 }) : void 0
2965
+ availableProperties: h,
2966
+ onFetchDistinctValues: s && g ? (b) => ma(s, g, b, { fetchAll: !0 }) : void 0
2757
2967
  }
2758
2968
  ),
2759
- (((M = e.styles) == null ? void 0 : M.length) ?? 0) > 0 && /* @__PURE__ */ a(
2969
+ (((F = e.styles) == null ? void 0 : F.length) ?? 0) > 0 && /* @__PURE__ */ a(
2760
2970
  "button",
2761
2971
  {
2762
2972
  type: "button",
2763
- onClick: () => n({ styles: Ja(e.styles, I) }),
2973
+ onClick: () => p({ styles: ut(e.styles, I) }),
2764
2974
  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
2975
  children: "Remove style"
2766
2976
  }
@@ -2771,34 +2981,34 @@ function Pe({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2771
2981
  "button",
2772
2982
  {
2773
2983
  type: "button",
2774
- onClick: () => n({ styles: [...e.styles ?? [ge], Ge] }),
2984
+ onClick: () => p({ styles: [...e.styles ?? [ge], _e] }),
2775
2985
  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
2986
  children: "+ Add style"
2777
2987
  }
2778
2988
  )
2779
2989
  ] }) }),
2780
2990
  /* @__PURE__ */ a(X, { title: "Legend", children: /* @__PURE__ */ a(
2781
- $a,
2991
+ Xa,
2782
2992
  {
2783
2993
  value: e.legend,
2784
- onChange: (m) => n({ legend: m }),
2994
+ onChange: (m) => p({ legend: m }),
2785
2995
  styles: e.styles
2786
2996
  }
2787
2997
  ) }),
2788
2998
  /* @__PURE__ */ a(X, { title: "Search Fields", children: /* @__PURE__ */ a(
2789
- qa,
2999
+ Za,
2790
3000
  {
2791
3001
  fields: ((j = e.search) == null ? void 0 : j.fields) ?? [],
2792
- onChange: (m) => n({ search: m.length > 0 ? { fields: m } : void 0 }),
2793
- availableProperties: d
3002
+ onChange: (m) => p({ search: m.length > 0 ? { fields: m } : void 0 }),
3003
+ availableProperties: h
2794
3004
  }
2795
3005
  ) }),
2796
3006
  /* @__PURE__ */ a(X, { title: "Property Display", children: /* @__PURE__ */ a(
2797
- Wa,
3007
+ tt,
2798
3008
  {
2799
3009
  value: e.propertyDisplay ?? {},
2800
- onChange: (m) => n({ propertyDisplay: Object.keys(m).length > 0 ? m : void 0 }),
2801
- availableProperties: d
3010
+ onChange: (m) => p({ propertyDisplay: Object.keys(m).length > 0 ? m : void 0 }),
3011
+ availableProperties: h
2802
3012
  }
2803
3013
  ) })
2804
3014
  ] });
@@ -2811,37 +3021,37 @@ const ce = () => ({
2811
3021
  visible: !0,
2812
3022
  dataMode: "vector-tiles"
2813
3023
  });
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;
3024
+ function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r }) {
3025
+ const [p, u] = T(null), [n, f] = T(!1), [s, g] = T(ce()), [d, x] = T(null), [c, o] = T(null), [h, w] = T(null), v = () => {
3026
+ t([...e, s]), f(!1), g(ce());
3027
+ }, C = (N) => {
3028
+ t(e.map((k) => k.id === p ? N : k));
3029
+ }, A = (N) => {
3030
+ t(e.filter((k) => k.id !== N)), x(null), p === N && u(null);
3031
+ }, j = (N) => {
3032
+ if (N === 0) return;
2823
3033
  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;
3034
+ [k[N - 1], k[N]] = [k[N], k[N - 1]], t(k);
3035
+ }, m = (N) => {
3036
+ if (N === e.length - 1) return;
2827
3037
  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 = () => {
2834
- N(null);
2835
- }, F = (f, k) => {
2836
- f.preventDefault(), N(null);
3038
+ [k[N], k[N + 1]] = [k[N + 1], k[N]], t(k);
3039
+ }, I = (N, k) => {
3040
+ o(k), N.dataTransfer.effectAllowed = "move", N.dataTransfer.setData("text/plain", k);
3041
+ }, F = (N, k) => {
3042
+ N.preventDefault(), N.dataTransfer.dropEffect = "move", w(k);
3043
+ }, b = () => {
3044
+ w(null);
3045
+ }, M = (N, k) => {
3046
+ N.preventDefault(), w(null);
2837
3047
  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);
3048
+ if (o(null), !O || O === k) return;
3049
+ const R = e.findIndex((q) => q.id === O), W = e.findIndex((q) => q.id === k);
3050
+ if (R === -1 || W === -1) return;
3051
+ const U = [...e];
3052
+ U.splice(R, 1), U.splice(W, 0, e[R]), t(U);
2843
3053
  }, P = () => {
2844
- u(null), N(null);
3054
+ o(null), w(null);
2845
3055
  };
2846
3056
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2847
3057
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -2851,25 +3061,25 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2851
3061
  {
2852
3062
  type: "button",
2853
3063
  onClick: () => {
2854
- x(!0), g(ce());
3064
+ f(!0), g(ce());
2855
3065
  },
2856
3066
  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",
2857
3067
  children: "+ Add Layer"
2858
3068
  }
2859
3069
  )
2860
3070
  ] }),
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;
3071
+ e.length === 0 && !n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
3072
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((N, k) => {
3073
+ var U, q, K, Q, Z;
3074
+ const O = c === N.id, R = h === N.id, W = p === N.id;
2865
3075
  return /* @__PURE__ */ l(
2866
3076
  "li",
2867
3077
  {
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),
3078
+ draggable: !W,
3079
+ onDragStart: W ? void 0 : (y) => I(y, N.id),
3080
+ onDragOver: (y) => F(y, N.id),
3081
+ onDragLeave: b,
3082
+ onDrop: (y) => M(y, N.id),
2873
3083
  onDragEnd: P,
2874
3084
  className: [
2875
3085
  "mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
@@ -2912,18 +3122,18 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2912
3122
  }
2913
3123
  ),
2914
3124
  /* @__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 }),
3125
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: N.label || N.id }),
3126
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: N.collection }),
2917
3127
  /* @__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,
3128
+ /* @__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: N.dataMode }),
3129
+ (((U = N.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: N.styles.map((y) => y.type).join(" · ") }),
3130
+ N.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" }),
3131
+ (((K = (q = N.search) == null ? void 0 : q.fields) == null ? void 0 : K.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: [
3132
+ N.search.fields.length,
2923
3133
  " search fields"
2924
3134
  ] }),
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,
3135
+ (((Z = (Q = N.legend) == null ? void 0 : Q.entries) == null ? void 0 : Z.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: [
3136
+ N.legend.entries.length,
2927
3137
  " legend entries"
2928
3138
  ] })
2929
3139
  ] })
@@ -2934,40 +3144,40 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2934
3144
  "button",
2935
3145
  {
2936
3146
  type: "button",
2937
- onClick: () => o(n === f.id ? null : f.id),
3147
+ onClick: () => u(p === N.id ? null : N.id),
2938
3148
  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"
3149
+ children: p === N.id ? "Close" : "Edit"
2940
3150
  }
2941
3151
  ),
2942
3152
  /* @__PURE__ */ a(
2943
3153
  "button",
2944
3154
  {
2945
3155
  type: "button",
2946
- onClick: () => w(f.id),
3156
+ onClick: () => x(N.id),
2947
3157
  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
3158
  children: "Remove"
2949
3159
  }
2950
3160
  )
2951
3161
  ] })
2952
3162
  ] }),
2953
- n === f.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2954
- Pe,
3163
+ p === N.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
3164
+ je,
2955
3165
  {
2956
- value: f,
2957
- onChange: T,
3166
+ value: N,
3167
+ onChange: C,
2958
3168
  availableSources: i,
2959
3169
  availableIcons: r
2960
3170
  }
2961
3171
  ) })
2962
3172
  ]
2963
3173
  },
2964
- f.id
3174
+ N.id
2965
3175
  );
2966
3176
  }) }),
2967
- p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3177
+ n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
2968
3178
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Layer" }),
2969
3179
  /* @__PURE__ */ a(
2970
- Pe,
3180
+ je,
2971
3181
  {
2972
3182
  value: s,
2973
3183
  onChange: g,
@@ -2990,7 +3200,7 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2990
3200
  "button",
2991
3201
  {
2992
3202
  type: "button",
2993
- onClick: () => x(!1),
3203
+ onClick: () => f(!1),
2994
3204
  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",
2995
3205
  children: "Cancel"
2996
3206
  }
@@ -3000,50 +3210,50 @@ function dt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3000
3210
  /* @__PURE__ */ a(
3001
3211
  re,
3002
3212
  {
3003
- open: y !== null,
3213
+ open: d !== null,
3004
3214
  title: "Remove Layer",
3005
3215
  description: "Are you sure you want to remove this layer from the configuration?",
3006
- onConfirm: () => y && E(y),
3007
- onCancel: () => w(null)
3216
+ onConfirm: () => d && A(d),
3217
+ onCancel: () => x(null)
3008
3218
  }
3009
3219
  )
3010
3220
  ] });
3011
3221
  }
3012
- 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";
3222
+ 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";
3013
3223
  function Oe({ value: e, onChange: t }) {
3014
3224
  const i = (r) => t({ ...e, ...r });
3015
3225
  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(
3226
+ /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3017
3227
  "input",
3018
3228
  {
3019
3229
  type: "text",
3020
3230
  value: e.id,
3021
3231
  onChange: (r) => i({ id: r.target.value }),
3022
3232
  placeholder: "osm",
3023
- className: te
3233
+ className: ie
3024
3234
  }
3025
3235
  ) }),
3026
- /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
3236
+ /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
3027
3237
  "input",
3028
3238
  {
3029
3239
  type: "text",
3030
3240
  value: e.label,
3031
3241
  onChange: (r) => i({ label: r.target.value }),
3032
3242
  placeholder: "OpenStreetMap",
3033
- className: te
3243
+ className: ie
3034
3244
  }
3035
3245
  ) }),
3036
- /* @__PURE__ */ a(C, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
3246
+ /* @__PURE__ */ a(S, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
3037
3247
  "input",
3038
3248
  {
3039
3249
  type: "url",
3040
3250
  value: e.url,
3041
3251
  onChange: (r) => i({ url: r.target.value }),
3042
3252
  placeholder: "https://example.com/style.json",
3043
- className: te
3253
+ className: ie
3044
3254
  }
3045
3255
  ) }),
3046
- /* @__PURE__ */ l(C, { label: "Thumbnail URL (optional)", children: [
3256
+ /* @__PURE__ */ l(S, { label: "Thumbnail URL (optional)", children: [
3047
3257
  /* @__PURE__ */ a(
3048
3258
  "input",
3049
3259
  {
@@ -3051,7 +3261,7 @@ function Oe({ value: e, onChange: t }) {
3051
3261
  value: e.thumbnail ?? "",
3052
3262
  onChange: (r) => i({ thumbnail: r.target.value || void 0 }),
3053
3263
  placeholder: "https://example.com/thumbnail.png",
3054
- className: te
3264
+ className: ie
3055
3265
  }
3056
3266
  ),
3057
3267
  e.thumbnail && /* @__PURE__ */ a(
@@ -3066,13 +3276,13 @@ function Oe({ value: e, onChange: t }) {
3066
3276
  ] });
3067
3277
  }
3068
3278
  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));
3072
- }, w = () => {
3073
- t([...e, p]), o(!1), x(de());
3074
- }, c = (u) => {
3075
- t(e.filter((d) => d.id !== u)), g(null);
3279
+ function At({ basemaps: e, onChange: t }) {
3280
+ const [i, r] = T(null), [p, u] = T(!1), [n, f] = T(de()), [s, g] = T(null), d = (o) => {
3281
+ t(e.map((h) => h.id === i ? o : h));
3282
+ }, x = () => {
3283
+ t([...e, n]), u(!1), f(de());
3284
+ }, c = (o) => {
3285
+ t(e.filter((h) => h.id !== o)), g(null);
3076
3286
  };
3077
3287
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3078
3288
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -3082,68 +3292,68 @@ function ht({ basemaps: e, onChange: t }) {
3082
3292
  {
3083
3293
  type: "button",
3084
3294
  onClick: () => {
3085
- o(!0), x(de());
3295
+ u(!0), f(de());
3086
3296
  },
3087
3297
  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
3298
  children: "+ Add Basemap"
3089
3299
  }
3090
3300
  )
3091
3301
  ] }),
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(
3302
+ e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No basemaps configured." }),
3303
+ /* @__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
3304
  "li",
3095
3305
  {
3096
3306
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
3097
3307
  children: [
3098
3308
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
3099
- u.thumbnail && /* @__PURE__ */ a(
3309
+ o.thumbnail && /* @__PURE__ */ a(
3100
3310
  "img",
3101
3311
  {
3102
- src: u.thumbnail,
3312
+ src: o.thumbnail,
3103
3313
  alt: "",
3104
3314
  className: "mapui:h-10 mapui:w-14 mapui:shrink-0 mapui:rounded mapui:object-cover"
3105
3315
  }
3106
3316
  ),
3107
3317
  /* @__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 })
3318
+ /* @__PURE__ */ a("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: o.label || o.id }),
3319
+ /* @__PURE__ */ a("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: o.url })
3110
3320
  ] }),
3111
3321
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
3112
3322
  /* @__PURE__ */ a(
3113
3323
  "button",
3114
3324
  {
3115
3325
  type: "button",
3116
- onClick: () => r(i === u.id ? null : u.id),
3326
+ onClick: () => r(i === o.id ? null : o.id),
3117
3327
  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"
3328
+ children: i === o.id ? "Close" : "Edit"
3119
3329
  }
3120
3330
  ),
3121
3331
  /* @__PURE__ */ a(
3122
3332
  "button",
3123
3333
  {
3124
3334
  type: "button",
3125
- onClick: () => g(u.id),
3335
+ onClick: () => g(o.id),
3126
3336
  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
3337
  children: "Remove"
3128
3338
  }
3129
3339
  )
3130
3340
  ] })
3131
3341
  ] }),
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 }) })
3342
+ i === o.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Oe, { value: o, onChange: d }) })
3133
3343
  ]
3134
3344
  },
3135
- u.id
3345
+ o.id
3136
3346
  )) }),
3137
- n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3347
+ p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3138
3348
  /* @__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 }),
3349
+ /* @__PURE__ */ a(Oe, { value: n, onChange: f }),
3140
3350
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
3141
3351
  /* @__PURE__ */ a(
3142
3352
  "button",
3143
3353
  {
3144
3354
  type: "button",
3145
- onClick: w,
3146
- disabled: !p.id || !p.url,
3355
+ onClick: x,
3356
+ disabled: !n.id || !n.url,
3147
3357
  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
3358
  children: "Save"
3149
3359
  }
@@ -3152,7 +3362,7 @@ function ht({ basemaps: e, onChange: t }) {
3152
3362
  "button",
3153
3363
  {
3154
3364
  type: "button",
3155
- onClick: () => o(!1),
3365
+ onClick: () => u(!1),
3156
3366
  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
3367
  children: "Cancel"
3158
3368
  }
@@ -3171,21 +3381,21 @@ function ht({ basemaps: e, onChange: t }) {
3171
3381
  )
3172
3382
  ] });
3173
3383
  }
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 }) {
3384
+ 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";
3385
+ function Re({ value: e, onChange: t }) {
3176
3386
  const i = (r) => t({ ...e, ...r });
3177
3387
  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(
3388
+ /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3179
3389
  "input",
3180
3390
  {
3181
3391
  type: "text",
3182
3392
  value: e.id,
3183
3393
  onChange: (r) => i({ id: r.target.value }),
3184
3394
  placeholder: "my-sprites",
3185
- className: je
3395
+ className: $e
3186
3396
  }
3187
3397
  ) }),
3188
- /* @__PURE__ */ l(C, { label: "Sprite URL", required: !0, children: [
3398
+ /* @__PURE__ */ l(S, { label: "Sprite URL", required: !0, children: [
3189
3399
  /* @__PURE__ */ a(
3190
3400
  "input",
3191
3401
  {
@@ -3193,7 +3403,7 @@ function $e({ value: e, onChange: t }) {
3193
3403
  value: e.url,
3194
3404
  onChange: (r) => i({ url: r.target.value }),
3195
3405
  placeholder: "https://example.com/sprites/sprite",
3196
- className: je
3406
+ className: $e
3197
3407
  }
3198
3408
  ),
3199
3409
  /* @__PURE__ */ l("p", { className: "mapui:mt-1 mapui:text-xs mapui:text-gray-400", children: [
@@ -3206,21 +3416,21 @@ function $e({ value: e, onChange: t }) {
3206
3416
  ] })
3207
3417
  ] });
3208
3418
  }
3209
- const he = () => ({ id: "", url: "" }), Ka = (e) => {
3419
+ const he = () => ({ id: "", url: "" }), ot = (e) => {
3210
3420
  try {
3211
3421
  return new URL(e), !0;
3212
3422
  } catch {
3213
3423
  return !1;
3214
3424
  }
3215
3425
  };
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));
3219
- }, 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);
3426
+ function Et({ sprites: e, onChange: t }) {
3427
+ const [i, r] = T(null), [p, u] = T(!1), [n, f] = T(he()), [s, g] = T(null), d = (o) => {
3428
+ t(e.map((h, w) => w === i ? o : h));
3429
+ }, x = () => {
3430
+ t([...e, n]), u(!1), f(he());
3431
+ }, c = (o) => {
3432
+ const h = e.findIndex((w) => w.id === o);
3433
+ t(e.filter((w) => w.id !== o)), i !== null && (h === i ? r(null) : h < i && r(i - 1)), g(null);
3224
3434
  };
3225
3435
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3226
3436
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -3230,60 +3440,60 @@ function gt({ sprites: e, onChange: t }) {
3230
3440
  {
3231
3441
  type: "button",
3232
3442
  onClick: () => {
3233
- o(!0), x(he());
3443
+ u(!0), f(he());
3234
3444
  },
3235
3445
  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
3446
  children: "+ Add Sprite Sheet"
3237
3447
  }
3238
3448
  )
3239
3449
  ] }),
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(
3450
+ 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." }),
3451
+ /* @__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
3452
  "li",
3243
3453
  {
3244
3454
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
3245
3455
  children: [
3246
3456
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
3247
3457
  /* @__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 })
3458
+ /* @__PURE__ */ a("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: o.id }),
3459
+ /* @__PURE__ */ a("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: o.url })
3250
3460
  ] }),
3251
3461
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
3252
3462
  /* @__PURE__ */ a(
3253
3463
  "button",
3254
3464
  {
3255
3465
  type: "button",
3256
- onClick: () => r(i === d ? null : d),
3466
+ onClick: () => r(i === h ? null : h),
3257
3467
  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"
3468
+ children: i === h ? "Close" : "Edit"
3259
3469
  }
3260
3470
  ),
3261
3471
  /* @__PURE__ */ a(
3262
3472
  "button",
3263
3473
  {
3264
3474
  type: "button",
3265
- onClick: () => g(u.id),
3475
+ onClick: () => g(o.id),
3266
3476
  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
3477
  children: "Remove"
3268
3478
  }
3269
3479
  )
3270
3480
  ] })
3271
3481
  ] }),
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 }) })
3482
+ i === h && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Re, { value: o, onChange: d }) })
3273
3483
  ]
3274
3484
  },
3275
- d
3485
+ h
3276
3486
  )) }),
3277
- n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3487
+ p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3278
3488
  /* @__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 }),
3489
+ /* @__PURE__ */ a(Re, { value: n, onChange: f }),
3280
3490
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
3281
3491
  /* @__PURE__ */ a(
3282
3492
  "button",
3283
3493
  {
3284
3494
  type: "button",
3285
- onClick: w,
3286
- disabled: !p.id || !p.url || !Ka(p.url) || e.some((u) => u.id === p.id),
3495
+ onClick: x,
3496
+ disabled: !n.id || !n.url || !ot(n.url) || e.some((o) => o.id === n.id),
3287
3497
  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
3498
  children: "Save"
3289
3499
  }
@@ -3292,7 +3502,7 @@ function gt({ sprites: e, onChange: t }) {
3292
3502
  "button",
3293
3503
  {
3294
3504
  type: "button",
3295
- onClick: () => o(!1),
3505
+ onClick: () => u(!1),
3296
3506
  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
3507
  children: "Cancel"
3298
3508
  }
@@ -3311,7 +3521,7 @@ function gt({ sprites: e, onChange: t }) {
3311
3521
  )
3312
3522
  ] });
3313
3523
  }
3314
- const Qa = [
3524
+ const mt = [
3315
3525
  { key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
3316
3526
  { key: "showLegend", label: "Legend", description: "Map legend" },
3317
3527
  { key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
@@ -3321,34 +3531,35 @@ const Qa = [
3321
3531
  { key: "showFeatureTooltip", label: "Feature Tooltip", description: "Hover tooltip on features" },
3322
3532
  { key: "showExportButton", label: "Export Button", description: "Export data as CSV" },
3323
3533
  { 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" }
3534
+ { key: "showMeasureTool", label: "Measure Tool", description: "Measure distances and areas on the map" },
3535
+ { key: "showSelectionTool", label: "Selection Tool", description: "Select features by click or box draw" }
3325
3536
  ];
3326
- function bt({ value: e, onChange: t }) {
3327
- const i = (r, n) => {
3328
- t({ ...e, [r]: n });
3537
+ function It({ value: e, onChange: t }) {
3538
+ const i = (r, p) => {
3539
+ t({ ...e, [r]: p });
3329
3540
  };
3330
3541
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
3331
3542
  /* @__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];
3543
+ /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: mt.map(({ key: r, label: p, description: u }) => {
3544
+ const n = e[r];
3334
3545
  return /* @__PURE__ */ l(
3335
3546
  "label",
3336
3547
  {
3337
3548
  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
3549
  children: [
3339
3550
  /* @__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 })
3551
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: p }),
3552
+ /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500", children: u })
3342
3553
  ] }),
3343
3554
  /* @__PURE__ */ l("div", { className: "mapui:relative mapui:flex mapui:shrink-0 mapui:items-center", children: [
3344
3555
  /* @__PURE__ */ a(
3345
3556
  "input",
3346
3557
  {
3347
3558
  type: "checkbox",
3348
- checked: p,
3349
- onChange: (x) => i(r, x.target.checked),
3559
+ checked: n,
3560
+ onChange: (f) => i(r, f.target.checked),
3350
3561
  className: "mapui:sr-only",
3351
- "aria-label": n
3562
+ "aria-label": p
3352
3563
  }
3353
3564
  ),
3354
3565
  /* @__PURE__ */ a(
@@ -3356,14 +3567,14 @@ function bt({ value: e, onChange: t }) {
3356
3567
  {
3357
3568
  className: [
3358
3569
  "mapui:relative mapui:h-5 mapui:w-9 mapui:rounded-full mapui:transition-colors",
3359
- p ? "mapui:bg-blue-600" : "mapui:bg-gray-300"
3570
+ n ? "mapui:bg-blue-600" : "mapui:bg-gray-300"
3360
3571
  ].join(" "),
3361
3572
  children: /* @__PURE__ */ a(
3362
3573
  "div",
3363
3574
  {
3364
3575
  className: [
3365
3576
  "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"
3577
+ n ? "mapui:translate-x-4" : "mapui:translate-x-0.5"
3367
3578
  ].join(" ")
3368
3579
  }
3369
3580
  )
@@ -3377,46 +3588,46 @@ function bt({ value: e, onChange: t }) {
3377
3588
  }) })
3378
3589
  ] });
3379
3590
  }
3380
- const He = [
3591
+ const Ke = [
3381
3592
  { key: "latitude", label: "Latitude", min: -90, max: 90, step: 1e-6, placeholder: "0" },
3382
3593
  { key: "longitude", label: "Longitude", min: -180, max: 180, step: 1e-6, placeholder: "0" },
3383
3594
  { key: "zoom", label: "Zoom", min: 0, max: 24, step: 0.1, placeholder: "2" },
3384
3595
  { key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
3385
3596
  { key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
3386
3597
  ];
3387
- function Za(e, t) {
3388
- const i = He.find((r) => r.key === e);
3598
+ function st(e, t) {
3599
+ const i = Ke.find((r) => r.key === e);
3389
3600
  if (i) {
3390
3601
  if (isNaN(t)) return "Must be a number";
3391
3602
  if (t < i.min) return `Must be at least ${i.min}`;
3392
3603
  if (t > i.max) return `Must be at most ${i.max}`;
3393
3604
  }
3394
3605
  }
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 });
3606
+ const ct = "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";
3607
+ function Mt({ value: e, onChange: t }) {
3608
+ const i = (r, p) => {
3609
+ const u = parseFloat(p);
3610
+ t({ ...e, [r]: isNaN(u) ? 0 : u });
3400
3611
  };
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(
3612
+ return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: Ke.map(({ key: r, label: p, min: u, max: n, step: f, placeholder: s }) => {
3613
+ const g = st(r, e[r]);
3614
+ return /* @__PURE__ */ a(S, { label: p, error: g, children: /* @__PURE__ */ a(
3404
3615
  "input",
3405
3616
  {
3406
3617
  type: "number",
3407
- min: o,
3408
- max: p,
3409
- step: x,
3618
+ min: u,
3619
+ max: n,
3620
+ step: f,
3410
3621
  value: e[r],
3411
3622
  placeholder: s,
3412
- onChange: (y) => i(r, y.target.value),
3413
- className: `${et} ${g ? "mapui:border-red-400" : ""}`
3623
+ onChange: (d) => i(r, d.target.value),
3624
+ className: `${ct} ${g ? "mapui:border-red-400" : ""}`
3414
3625
  }
3415
3626
  ) }, r);
3416
3627
  }) });
3417
3628
  }
3418
- function ft({ config: e }) {
3419
- const t = la(e);
3629
+ function Ft({ config: e }) {
3630
+ const t = sa(e);
3420
3631
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3421
3632
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
3422
3633
  /* @__PURE__ */ a(
@@ -3441,153 +3652,184 @@ function ft({ config: e }) {
3441
3652
  /* @__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
3653
  ] });
3443
3654
  }
3655
+ function dt(e, t) {
3656
+ const [i, r] = e, [p, u] = t;
3657
+ return {
3658
+ type: "Polygon",
3659
+ coordinates: [[
3660
+ [i, r],
3661
+ [p, r],
3662
+ [p, u],
3663
+ [i, u],
3664
+ [i, r]
3665
+ ]]
3666
+ };
3667
+ }
3668
+ function Pt(e, t) {
3669
+ return {
3670
+ type: "Feature",
3671
+ properties: {},
3672
+ geometry: dt(e, t)
3673
+ };
3674
+ }
3444
3675
  export {
3445
- ji as BasemapConfigSchema,
3676
+ rr as BasemapConfigSchema,
3446
3677
  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,
3678
+ At as BasemapList,
3679
+ $t as BasemapSwitcher,
3680
+ lr as CircleLayoutSchema,
3681
+ pr as CirclePaintSchema,
3682
+ nr as CircleStyleSchema,
3683
+ Bt as CollapsibleControl,
3684
+ X as CollapsibleSection,
3685
+ Ct as CollectionBrowser,
3686
+ J as ColorPicker,
3687
+ Ft as ConfigPreview,
3456
3688
  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,
3689
+ Ut as CoordinateDisplay,
3690
+ ur as DatetimeSearchFieldSchema,
3691
+ _t as ExportButton,
3692
+ xt as ExportModal,
3693
+ Ht as FeatureDetailPanel,
3694
+ Xt as FeatureTooltip,
3695
+ or as FillLayoutSchema,
3696
+ mr as FillPaintSchema,
3697
+ sr as FillStyleSchema,
3698
+ cr as FilterConfigSchema,
3699
+ S as FormField,
3700
+ dr as GeometryTypeSchema,
3701
+ hr as LayerConfigSchema,
3702
+ je as LayerEditor,
3703
+ Lt as LayerList,
3704
+ Kt as LayerPanel,
3705
+ Zt as Legend,
3706
+ gr as LegendConfigSchema,
3707
+ Xa as LegendEditor,
3708
+ Ya as LegendEntryEditor,
3709
+ br as LegendEntrySchema,
3710
+ yr as LineLayoutSchema,
3711
+ fr as LinePaintSchema,
3712
+ xr as LineStyleSchema,
3713
+ wr as MapConfigSchema,
3714
+ wt as MeasurePanel,
3715
+ Nr as NumberSearchFieldSchema,
3716
+ vr as OgcApiSourceSchema,
3717
+ kr as PropertyDisplayConfigSchema,
3718
+ tt as PropertyDisplayEditor,
3719
+ Cr as PropertyDisplaySchema,
3720
+ vt as ResultsDrawer,
3721
+ Sr as SearchConfigSchema,
3722
+ Ka as SearchFieldEditor,
3723
+ Za as SearchFieldList,
3724
+ Tr as SearchFieldSchema,
3725
+ tr as SearchPanel,
3726
+ Dr as SelectSearchFieldSchema,
3727
+ Nt as SelectionPanel,
3728
+ we as SourceEditor,
3729
+ kt as SourceList,
3730
+ Re as SpriteSourceEditor,
3731
+ Et as SpriteSourceList,
3732
+ Lr as SpriteSourceSchema,
3733
+ Ar as StyleConfigSchema,
3734
+ Ha as StyleEditor,
3735
+ Er as SymbolLayoutSchema,
3736
+ Ir as SymbolPaintSchema,
3737
+ Mr as SymbolStyleSchema,
3738
+ Fr as TextSearchFieldSchema,
3739
+ It as UIConfigEditor,
3740
+ Pr as UIConfigSchema,
3741
+ na as UNITS_FOR_MODE,
3742
+ xe as UNIT_LABELS,
3743
+ jr as ViewConfigSchema,
3744
+ Mt as ViewEditor,
3745
+ ai as and,
3746
+ ti as bboxFromGeometry,
3747
+ ii as between,
3748
+ Pt as buildBoxDrawData,
3749
+ dt as buildBoxPolygon,
3750
+ pt as buildDefaultStylesForGeometryTypes,
3751
+ ri as buildMeasureGeometryData,
3752
+ li as buildMeasurePointsData,
3753
+ pi as calculateArea,
3754
+ ni as calculateDistance,
3755
+ ui as calculateMeasurement,
3756
+ _e as defaultCircle,
3521
3757
  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,
3545
- 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
3758
+ qa as defaultLine,
3759
+ Ga as defaultSymbol,
3760
+ oi as defaultUnitForMode,
3761
+ Xe as detectGeometryStyleTypesFromQueryables,
3762
+ rt as detectGeometryTypeFromQueryables,
3763
+ Je as detectGeometryTypesFromFeatures,
3764
+ St as detectStyleTypeForCollection,
3765
+ Tt as detectStyleTypesForCollection,
3766
+ mi as downloadBlob,
3767
+ si as downloadCsv,
3768
+ ci as eq,
3769
+ We as expressionColors,
3770
+ Ia as expressionEntries,
3771
+ Ma as expressionPropertyName,
3772
+ Ea as expressionType,
3773
+ He as extractGeometryType,
3774
+ di as featuresToCsv,
3775
+ hi as fetchCollectionDetail,
3776
+ gi as fetchCollections,
3777
+ bi as fetchConformance,
3778
+ ma as fetchDistinctValues,
3779
+ yi as fetchFeatureById,
3780
+ fi as fetchFeatureCount,
3781
+ ye as fetchFeatures,
3782
+ Ge as fetchQueryables,
3783
+ xi as fetchSpriteNames,
3784
+ wi as fetchSpriteUrlFromStyle,
3785
+ Ni as fetchTileJson,
3786
+ qt as formatDMS,
3787
+ Gt as formatDecimal,
3788
+ ua as formatMeasurement,
3789
+ vi as fromSimpleFilters,
3790
+ ki as fromStructuredFilters,
3791
+ Ye as geometryTypeToStyleType,
3792
+ fe as geometryTypeToStyleTypes,
3793
+ pe as getColorFromPalette,
3794
+ Ci as getCql2FilteredVectorTileUrl,
3795
+ Si as getFilteredVectorTileUrl,
3796
+ Fa as getPrimaryColor,
3797
+ Pa as getShapeForStyleType,
3798
+ Ti as getTileJsonUrl,
3799
+ Di as getVectorTileUrl,
3800
+ Li as gt,
3801
+ Ai as gte,
3802
+ Dt as humanizePropertyName,
3803
+ Ei as inList,
3804
+ _ as isExpression,
3805
+ it as isGeometryProperty,
3806
+ Ii as isNull,
3807
+ Mi as like,
3808
+ Fi as lt,
3809
+ Pi as lte,
3810
+ ji as neq,
3811
+ Oi as not,
3812
+ $i as or,
3813
+ Ri as resolveAvailableIcons,
3814
+ Bi as resolvePropertyDisplay,
3815
+ zi as resolveStyleWithSprites,
3816
+ Ui as sDwithin,
3817
+ qi as sIntersects,
3818
+ Gi as sWithin,
3819
+ sa as safeValidateMapConfig,
3820
+ Wi as selectedFeatureKey,
3821
+ _i as serializeCql2,
3822
+ Vi as tAfter,
3823
+ Hi as tBefore,
3824
+ Yi as tDuring,
3825
+ lt as toAvailableProperties,
3826
+ Xi as useCsvExport,
3827
+ Ji as useExport,
3828
+ Ki as useMeasure,
3829
+ Qi as useOgcCollectionDetail,
3830
+ qe as useOgcCollections,
3831
+ Zi as useOgcFeatures,
3832
+ oa as useOgcQueryables,
3833
+ er as useSelection,
3834
+ Or as validateMapConfig
3593
3835
  };