@ogc-maps/storybook-components 0.8.0 → 0.10.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 (62) hide show
  1. package/dist/{CollapsibleControl-CGRNPpCw.js → CollapsibleControl-qo9daiD8.js} +5 -5
  2. package/dist/ExportButton-BsNrOvRE.js +25 -0
  3. package/dist/Legend-BLWBzD7Y.js +275 -0
  4. package/dist/SearchPanel-4Y12jfuP.js +401 -0
  5. package/dist/components/CollapsibleControl/index.js +1 -1
  6. package/dist/components/ExportButton/ExportButton.d.ts +2 -8
  7. package/dist/components/ExportButton/ExportButton.d.ts.map +1 -1
  8. package/dist/components/ExportButton/index.d.ts +1 -1
  9. package/dist/components/ExportButton/index.d.ts.map +1 -1
  10. package/dist/components/ExportButton/index.js +1 -1
  11. package/dist/components/ExportModal/ExportModal.d.ts +29 -0
  12. package/dist/components/ExportModal/ExportModal.d.ts.map +1 -0
  13. package/dist/components/ExportModal/index.d.ts +3 -0
  14. package/dist/components/ExportModal/index.d.ts.map +1 -0
  15. package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
  16. package/dist/components/Legend/Legend.d.ts.map +1 -1
  17. package/dist/components/Legend/index.js +1 -1
  18. package/dist/components/LegendEditor/LegendEditor.d.ts.map +1 -1
  19. package/dist/components/MeasurePanel/MeasurePanel.d.ts +13 -0
  20. package/dist/components/MeasurePanel/MeasurePanel.d.ts.map +1 -0
  21. package/dist/components/MeasurePanel/index.d.ts +3 -0
  22. package/dist/components/MeasurePanel/index.d.ts.map +1 -0
  23. package/dist/components/SearchFieldEditor/SearchFieldEditor.d.ts.map +1 -1
  24. package/dist/components/SearchPanel/NumberInput.d.ts.map +1 -1
  25. package/dist/components/SearchPanel/SearchPanel.d.ts +2 -1
  26. package/dist/components/SearchPanel/SearchPanel.d.ts.map +1 -1
  27. package/dist/components/SearchPanel/index.js +1 -1
  28. package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts.map +1 -1
  29. package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
  30. package/dist/components/index.d.ts +5 -1
  31. package/dist/components/index.d.ts.map +1 -1
  32. package/dist/geo-CIJBPCVe.js +1038 -0
  33. package/dist/hooks/index.d.ts +5 -0
  34. package/dist/hooks/index.d.ts.map +1 -1
  35. package/dist/hooks/index.js +40 -35
  36. package/dist/hooks/useExport.d.ts +22 -0
  37. package/dist/hooks/useExport.d.ts.map +1 -0
  38. package/dist/hooks/useMeasure.d.ts +15 -0
  39. package/dist/hooks/useMeasure.d.ts.map +1 -0
  40. package/dist/{index-RzZtWlUz.js → index-DA_GGs_P.js} +444 -437
  41. package/dist/main.js +1301 -936
  42. package/dist/schemas/config.d.ts +167 -0
  43. package/dist/schemas/config.d.ts.map +1 -1
  44. package/dist/schemas/index.js +1 -1
  45. package/dist/style.css +1 -1
  46. package/dist/types/index.js +1 -1
  47. package/dist/utils/cql2.d.ts.map +1 -1
  48. package/dist/utils/csvExport.d.ts.map +1 -1
  49. package/dist/utils/download.d.ts +2 -0
  50. package/dist/utils/download.d.ts.map +1 -0
  51. package/dist/utils/expressionColors.d.ts.map +1 -1
  52. package/dist/utils/geo.d.ts +3 -0
  53. package/dist/utils/geo.d.ts.map +1 -0
  54. package/dist/utils/index.d.ts +1 -0
  55. package/dist/utils/index.d.ts.map +1 -1
  56. package/dist/utils/measure.d.ts +49 -0
  57. package/dist/utils/measure.d.ts.map +1 -0
  58. package/package.json +6 -3
  59. package/dist/ExportButton-CLsWoW4m.js +0 -77
  60. package/dist/Legend-BiRyrZL1.js +0 -239
  61. package/dist/SearchPanel-DtLXMoVs.js +0 -363
  62. package/dist/cql2-DOJnQwcv.js +0 -440
package/dist/main.js CHANGED
@@ -1,21 +1,230 @@
1
- import { B as rt } from "./BasemapSwitcher-BW7lyZ2Y.js";
2
- import { C as nt } from "./CollapsibleControl-CGRNPpCw.js";
3
- import { C as ot, f as ut, a as mt } from "./CoordinateDisplay-PxPmVjpm.js";
4
- import { E as ct } from "./ExportButton-CLsWoW4m.js";
5
- import { F as ht } from "./FeatureDetailPanel-CkFpdEKW.js";
6
- import { F as bt } from "./FeatureTooltip-Db1LgLQV.js";
7
- import { L as ft } from "./LayerPanel-SCdJ8948.js";
8
- import { L as wt } from "./Legend-BiRyrZL1.js";
9
- import { S as Nt } from "./SearchPanel-DtLXMoVs.js";
10
- import { jsxs as l, jsx as a, Fragment as q } from "react/jsx-runtime";
11
- import { useId as Ie, useState as A, useRef as ue, useMemo as Ee, useCallback as We, useEffect as X } from "react";
12
- import { LuInfo as ze } from "react-icons/lu";
13
- import { J as Fe, j as Pe, i as se, L as Ve, g as _e } from "./cql2-DOJnQwcv.js";
14
- import { a as Ct, b as St, M as Dt, e as Tt, N as Lt, f as At, c as It, d as Et, h as Ft, O as Pt, P as Mt, k as Ot, l as jt, m as $t, n as Rt, o as Bt, p as qt, q as Ut, r as Gt, s as Wt, t as zt, u as Vt, v as _t, w as Yt, x as Xt, y as Ht, z as Jt, A as Kt, Q as Qt, B as Zt, C as ei, D as ai, E as ti, F as ii, G as ri, H as li, I as ni, K as pi } from "./cql2-DOJnQwcv.js";
15
- import { s as Ye } from "./index-RzZtWlUz.js";
16
- import { B as ui, C as mi, a as si, b as ci, D as di, F as hi, c as gi, d as bi, e as yi, G as fi, L as xi, f as wi, g as vi, h as Ni, i as ki, j as Ci, M as Si, N as Di, O as Ti, P as Li, k as Ai, S as Ii, l as Ei, m as Fi, n as Pi, o as Mi, p as Oi, q as ji, r as $i, T as Ri, U as Bi, V as qi, v as Ui } from "./index-RzZtWlUz.js";
17
- import './style.css';function Xe({ text: e, id: t }) {
18
- const i = Ie(), r = t ?? i;
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({
18
+ open: e,
19
+ layers: t,
20
+ availableFormats: i,
21
+ hasActiveFilter: r,
22
+ loading: n = !1,
23
+ progress: o,
24
+ error: p,
25
+ onExport: x,
26
+ onClose: s
27
+ }) {
28
+ const [g, y] = S(""), [w, c] = S(""), [u, d] = S(!0);
29
+ if (V(() => {
30
+ e && (y(t.length === 1 ? t[0].id : ""), c(i.length > 0 ? i[0].id : ""), d(!0));
31
+ }, [e, t, i]), !e) return null;
32
+ const N = t.find((m) => m.id === g), v = i.find((m) => m.id === w), T = N != null && r(N.id), E = N != null && v != null && !n, j = () => {
33
+ !N || !v || x({
34
+ layer: N,
35
+ format: v,
36
+ filtered: T ? u : !1
37
+ });
38
+ };
39
+ return /* @__PURE__ */ a(
40
+ "div",
41
+ {
42
+ className: "mapui:fixed mapui:inset-0 mapui:z-50 mapui:flex mapui:items-center mapui:justify-center mapui:bg-black/50",
43
+ role: "dialog",
44
+ "aria-modal": "true",
45
+ "aria-labelledby": "export-modal-title",
46
+ children: /* @__PURE__ */ l("div", { className: "mapui:w-full mapui:max-w-md mapui:rounded-lg mapui:bg-white mapui:p-6 mapui:shadow-xl", children: [
47
+ /* @__PURE__ */ a(
48
+ "h2",
49
+ {
50
+ id: "export-modal-title",
51
+ className: "mapui:m-0 mapui:mb-4 mapui:text-base mapui:font-semibold mapui:text-gray-900",
52
+ children: "Export Data"
53
+ }
54
+ ),
55
+ /* @__PURE__ */ l("div", { className: "mapui:mb-4", children: [
56
+ /* @__PURE__ */ a(
57
+ "label",
58
+ {
59
+ htmlFor: "export-layer-select",
60
+ className: "mapui:mb-1 mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-700",
61
+ children: "Layer"
62
+ }
63
+ ),
64
+ t.length === 1 ? /* @__PURE__ */ a("div", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-700", children: t[0].label }) : /* @__PURE__ */ l(
65
+ "select",
66
+ {
67
+ id: "export-layer-select",
68
+ value: g,
69
+ onChange: (m) => y(m.target.value),
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
+ children: [
72
+ /* @__PURE__ */ a("option", { value: "", disabled: !0, children: "Select a layer..." }),
73
+ t.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label }, m.id))
74
+ ]
75
+ }
76
+ )
77
+ ] }),
78
+ /* @__PURE__ */ l("fieldset", { className: "mapui:mb-4", children: [
79
+ /* @__PURE__ */ a("legend", { className: "mapui:mb-1 mapui:text-sm mapui:font-medium mapui:text-gray-700", children: "Format" }),
80
+ /* @__PURE__ */ a("div", { className: "mapui:space-y-1", children: i.map((m) => /* @__PURE__ */ l(
81
+ "label",
82
+ {
83
+ className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-2 mapui:rounded mapui:px-2 mapui:py-1.5 hover:mapui:bg-gray-50",
84
+ children: [
85
+ /* @__PURE__ */ a(
86
+ "input",
87
+ {
88
+ type: "radio",
89
+ name: "export-format",
90
+ value: m.id,
91
+ checked: w === m.id,
92
+ onChange: () => c(m.id),
93
+ className: "mapui:accent-blue-600"
94
+ }
95
+ ),
96
+ /* @__PURE__ */ l("span", { className: "mapui:text-sm mapui:text-gray-700", children: [
97
+ m.label,
98
+ m.description && /* @__PURE__ */ l("span", { className: "mapui:ml-1 mapui:text-gray-400", children: [
99
+ "— ",
100
+ m.description
101
+ ] })
102
+ ] })
103
+ ]
104
+ },
105
+ m.id
106
+ )) })
107
+ ] }),
108
+ T && /* @__PURE__ */ l("label", { className: "mapui:mb-4 mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-2", children: [
109
+ /* @__PURE__ */ a(
110
+ "input",
111
+ {
112
+ type: "checkbox",
113
+ checked: u,
114
+ onChange: (m) => d(m.target.checked),
115
+ className: "mapui:accent-blue-600"
116
+ }
117
+ ),
118
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:text-gray-700", children: "Apply current filters" })
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 }),
122
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:justify-end mapui:gap-2", children: [
123
+ /* @__PURE__ */ a(
124
+ "button",
125
+ {
126
+ type: "button",
127
+ onClick: s,
128
+ disabled: n,
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
+ children: "Cancel"
131
+ }
132
+ ),
133
+ /* @__PURE__ */ a(
134
+ "button",
135
+ {
136
+ type: "button",
137
+ onClick: j,
138
+ disabled: !E,
139
+ className: [
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"
142
+ ].join(" "),
143
+ children: n ? "Exporting..." : "Export"
144
+ }
145
+ )
146
+ ] })
147
+ ] })
148
+ }
149
+ );
150
+ }
151
+ const na = [
152
+ { mode: "distance", icon: Ke, label: "Distance" },
153
+ { mode: "area", icon: Qe, label: "Area" }
154
+ ];
155
+ function pa(e, t) {
156
+ return e ? t === 0 ? "Click on the map to start measuring" : e === "distance" ? "Click to add points, double-click to finish" : t < 3 ? "Click to add points (min 3 for area)" : "Click to add points, double-click to close" : "Select a measurement mode";
157
+ }
158
+ function pt({
159
+ mode: e,
160
+ onModeChange: t,
161
+ points: i,
162
+ measurement: r,
163
+ unit: n,
164
+ onUnitChange: o,
165
+ onClear: p,
166
+ className: x
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 }) => {
171
+ const c = e === g;
172
+ return /* @__PURE__ */ l(
173
+ "button",
174
+ {
175
+ type: "button",
176
+ onClick: () => t(c ? null : g),
177
+ "aria-label": w,
178
+ "aria-pressed": c,
179
+ className: [
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
+ c ? "mapui:bg-blue-600 mapui:text-white" : "mapui:bg-gray-100 mapui:text-gray-700 hover:mapui:bg-gray-200"
182
+ ].join(" "),
183
+ children: [
184
+ /* @__PURE__ */ a(y, { size: 16 }),
185
+ w
186
+ ]
187
+ },
188
+ g
189
+ );
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) : "—" }) }),
193
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: s.map((g) => {
194
+ const y = n === g;
195
+ return /* @__PURE__ */ a(
196
+ "button",
197
+ {
198
+ type: "button",
199
+ onClick: () => o(g),
200
+ "aria-label": `Unit: ${fe[g]}`,
201
+ className: [
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"
204
+ ].join(" "),
205
+ children: fe[g]
206
+ },
207
+ g
208
+ );
209
+ }) }),
210
+ /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-center mapui:text-xs mapui:text-gray-500", children: pa(e, i.length) }),
211
+ i.length > 0 && /* @__PURE__ */ l(
212
+ "button",
213
+ {
214
+ type: "button",
215
+ onClick: p,
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
+ children: [
218
+ /* @__PURE__ */ a(Ze, { size: 14 }),
219
+ "Clear"
220
+ ]
221
+ }
222
+ )
223
+ ] })
224
+ ] });
225
+ }
226
+ function oa({ text: e, id: t }) {
227
+ const i = Re(), r = t ?? i;
19
228
  return /* @__PURE__ */ l("span", { className: "mapui:relative mapui:inline-flex mapui:group", children: [
20
229
  /* @__PURE__ */ a(
21
230
  "span",
@@ -24,7 +233,7 @@ import './style.css';function Xe({ text: e, id: t }) {
24
233
  "aria-label": "Info",
25
234
  "aria-describedby": r,
26
235
  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",
27
- children: /* @__PURE__ */ a(ze, { className: "mapui:h-3.5 mapui:w-3.5" })
236
+ children: /* @__PURE__ */ a(ea, { className: "mapui:h-3.5 mapui:w-3.5" })
28
237
  }
29
238
  ),
30
239
  /* @__PURE__ */ l(
@@ -41,20 +250,20 @@ import './style.css';function Xe({ text: e, id: t }) {
41
250
  )
42
251
  ] });
43
252
  }
44
- function D({ label: e, error: t, required: i, description: r, htmlFor: n, children: o }) {
253
+ function C({ label: e, error: t, required: i, description: r, htmlFor: n, children: o }) {
45
254
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
46
255
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1", children: [
47
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: [
48
257
  e,
49
258
  i && /* @__PURE__ */ a("span", { className: "mapui:ml-0.5 mapui:text-red-500", "aria-hidden": "true", children: "*" })
50
259
  ] }),
51
- r && /* @__PURE__ */ a(Xe, { text: r })
260
+ r && /* @__PURE__ */ a(oa, { text: r })
52
261
  ] }),
53
262
  o,
54
263
  t && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: t })
55
264
  ] });
56
265
  }
57
- function Y({ value: e, onChange: t, label: i }) {
266
+ function H({ value: e, onChange: t, label: i }) {
58
267
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
59
268
  /* @__PURE__ */ a(
60
269
  "input",
@@ -69,7 +278,7 @@ function Y({ value: e, onChange: t, label: i }) {
69
278
  /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-600", children: e })
70
279
  ] });
71
280
  }
72
- function Z({
281
+ function re({
73
282
  open: e,
74
283
  title: t,
75
284
  description: i,
@@ -125,13 +334,13 @@ function Z({
125
334
  }
126
335
  ) : null;
127
336
  }
128
- function _({
337
+ function X({
129
338
  title: e,
130
339
  children: t,
131
340
  defaultOpen: i = !1,
132
341
  badge: r
133
342
  }) {
134
- const [n, o] = A(i);
343
+ const [n, o] = S(i);
135
344
  return /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
136
345
  /* @__PURE__ */ l(
137
346
  "button",
@@ -151,8 +360,8 @@ function _({
151
360
  n && /* @__PURE__ */ a("div", { className: "mapui:p-3", children: t })
152
361
  ] });
153
362
  }
154
- 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";
155
- function ce({
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({
156
365
  value: e,
157
366
  onChange: t,
158
367
  onTestConnection: i,
@@ -161,17 +370,17 @@ function ce({
161
370
  }) {
162
371
  const o = (p) => t({ ...e, ...p });
163
372
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
164
- /* @__PURE__ */ a(D, { label: "ID", required: !0, children: /* @__PURE__ */ a(
373
+ /* @__PURE__ */ a(C, { label: "ID", required: !0, children: /* @__PURE__ */ a(
165
374
  "input",
166
375
  {
167
376
  type: "text",
168
377
  value: e.id,
169
378
  onChange: (p) => o({ id: p.target.value }),
170
379
  placeholder: "my-source",
171
- className: H
380
+ className: Z
172
381
  }
173
382
  ) }),
174
- /* @__PURE__ */ l(D, { label: "URL", required: !0, children: [
383
+ /* @__PURE__ */ l(C, { label: "URL", required: !0, children: [
175
384
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
176
385
  /* @__PURE__ */ a(
177
386
  "input",
@@ -180,7 +389,7 @@ function ce({
180
389
  value: e.url,
181
390
  onChange: (p) => o({ url: p.target.value }),
182
391
  placeholder: "https://example.com/ogcapi",
183
- className: `${H} mapui:flex-1`
392
+ className: `${Z} mapui:flex-1`
184
393
  }
185
394
  ),
186
395
  i && /* @__PURE__ */ a(
@@ -197,49 +406,49 @@ function ce({
197
406
  r === "success" && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-green-600", children: "Connection successful" }),
198
407
  r === "error" && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-600", children: n ?? "Connection failed" })
199
408
  ] }),
200
- /* @__PURE__ */ a(D, { label: "Label", children: /* @__PURE__ */ a(
409
+ /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
201
410
  "input",
202
411
  {
203
412
  type: "text",
204
413
  value: e.label ?? "",
205
414
  onChange: (p) => o({ label: p.target.value || void 0 }),
206
415
  placeholder: "My OGC API Source",
207
- className: H
416
+ className: Z
208
417
  }
209
418
  ) }),
210
- /* @__PURE__ */ a(D, { label: "Tile Matrix Set ID", children: /* @__PURE__ */ a(
419
+ /* @__PURE__ */ a(C, { label: "Tile Matrix Set ID", children: /* @__PURE__ */ a(
211
420
  "input",
212
421
  {
213
422
  type: "text",
214
423
  value: e.tileMatrixSetId ?? "WebMercatorQuad",
215
424
  onChange: (p) => o({ tileMatrixSetId: p.target.value || void 0 }),
216
425
  placeholder: "WebMercatorQuad",
217
- className: H
426
+ className: Z
218
427
  }
219
428
  ) })
220
429
  ] });
221
430
  }
222
- const ee = () => ({
431
+ const le = () => ({
223
432
  id: "",
224
433
  url: "",
225
434
  label: void 0,
226
435
  tileMatrixSetId: "WebMercatorQuad"
227
436
  });
228
- function Va({ sources: e, onChange: t }) {
229
- const [i, r] = A(null), [n, o] = A(null), [p, b] = A(!1), [m, w] = A(ee()), [d, f] = A({}), [c, u] = A({}), [s, v] = A(null), N = async (C, L) => {
230
- f((E) => ({ ...E, [C]: "loading" }));
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" }));
231
440
  try {
232
- const E = await fetch(`${L}/conformance`);
233
- E.ok ? f((y) => ({ ...y, [C]: "success" })) : (f((y) => ({ ...y, [C]: "error" })), u((y) => ({ ...y, [C]: `HTTP ${E.status}` })));
234
- } catch (E) {
235
- f((y) => ({ ...y, [C]: "error" })), u((y) => ({ ...y, [C]: E instanceof Error ? E.message : "Network error" }));
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" }));
236
445
  }
237
- }, S = () => {
238
- n && (t(e.map((C) => C.id === i ? n : C)), r(null), o(null));
239
- }, x = () => {
240
- t([...e, m]), b(!1), w(ee());
241
- }, P = (C) => {
242
- t(e.filter((L) => L.id !== C)), v(null);
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());
450
+ }, j = (m) => {
451
+ t(e.filter((I) => I.id !== m)), N(null);
243
452
  };
244
453
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
245
454
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -249,7 +458,7 @@ function Va({ sources: e, onChange: t }) {
249
458
  {
250
459
  type: "button",
251
460
  onClick: () => {
252
- b(!0), w(ee());
461
+ x(!0), g(le());
253
462
  },
254
463
  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",
255
464
  children: "+ Add Source"
@@ -257,19 +466,19 @@ function Va({ sources: e, onChange: t }) {
257
466
  )
258
467
  ] }),
259
468
  e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No sources configured." }),
260
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((C) => /* @__PURE__ */ a(
469
+ /* @__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(
261
470
  "li",
262
471
  {
263
472
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white mapui:p-3",
264
- children: i === C.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
473
+ children: i === m.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
265
474
  /* @__PURE__ */ a(
266
- ce,
475
+ xe,
267
476
  {
268
- value: n ?? C,
477
+ value: n ?? m,
269
478
  onChange: o,
270
- onTestConnection: (L) => N(`edit-${C.id}`, L),
271
- testStatus: d[`edit-${C.id}`],
272
- testError: c[`edit-${C.id}`]
479
+ onTestConnection: (I) => v(`edit-${m.id}`, I),
480
+ testStatus: y[`edit-${m.id}`],
481
+ testError: c[`edit-${m.id}`]
273
482
  }
274
483
  ),
275
484
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
@@ -277,7 +486,7 @@ function Va({ sources: e, onChange: t }) {
277
486
  "button",
278
487
  {
279
488
  type: "button",
280
- onClick: S,
489
+ onClick: T,
281
490
  disabled: !(n != null && n.id) || !(n != null && n.url),
282
491
  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",
283
492
  children: "Save"
@@ -297,11 +506,11 @@ function Va({ sources: e, onChange: t }) {
297
506
  ] })
298
507
  ] }) : /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-start mapui:justify-between mapui:gap-2", children: [
299
508
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
300
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: C.label ?? C.id }),
301
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: C.url }),
302
- C.tileMatrixSetId && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-gray-400", children: [
509
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: m.label ?? m.id }),
510
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: m.url }),
511
+ m.tileMatrixSetId && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-gray-400", children: [
303
512
  "TMS: ",
304
- C.tileMatrixSetId
513
+ m.tileMatrixSetId
305
514
  ] })
306
515
  ] }),
307
516
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
@@ -310,7 +519,7 @@ function Va({ sources: e, onChange: t }) {
310
519
  {
311
520
  type: "button",
312
521
  onClick: () => {
313
- r(C.id), o(C);
522
+ r(m.id), o(m);
314
523
  },
315
524
  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",
316
525
  children: "Edit"
@@ -320,7 +529,7 @@ function Va({ sources: e, onChange: t }) {
320
529
  "button",
321
530
  {
322
531
  type: "button",
323
- onClick: () => v(C.id),
532
+ onClick: () => N(m.id),
324
533
  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",
325
534
  children: "Remove"
326
535
  }
@@ -328,17 +537,17 @@ function Va({ sources: e, onChange: t }) {
328
537
  ] })
329
538
  ] })
330
539
  },
331
- C.id
540
+ m.id
332
541
  )) }),
333
542
  p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
334
543
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Source" }),
335
544
  /* @__PURE__ */ a(
336
- ce,
545
+ xe,
337
546
  {
338
- value: m,
339
- onChange: w,
340
- onTestConnection: (C) => N("new", C),
341
- testStatus: d.new,
547
+ value: s,
548
+ onChange: g,
549
+ onTestConnection: (m) => v("new", m),
550
+ testStatus: y.new,
342
551
  testError: c.new
343
552
  }
344
553
  ),
@@ -347,8 +556,8 @@ function Va({ sources: e, onChange: t }) {
347
556
  "button",
348
557
  {
349
558
  type: "button",
350
- onClick: x,
351
- disabled: !m.id || !m.url,
559
+ onClick: E,
560
+ disabled: !s.id || !s.url,
352
561
  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",
353
562
  children: "Save"
354
563
  }
@@ -357,7 +566,7 @@ function Va({ sources: e, onChange: t }) {
357
566
  "button",
358
567
  {
359
568
  type: "button",
360
- onClick: () => b(!1),
569
+ onClick: () => x(!1),
361
570
  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",
362
571
  children: "Cancel"
363
572
  }
@@ -365,32 +574,32 @@ function Va({ sources: e, onChange: t }) {
365
574
  ] })
366
575
  ] }),
367
576
  /* @__PURE__ */ a(
368
- Z,
577
+ re,
369
578
  {
370
- open: s !== null,
579
+ open: d !== null,
371
580
  title: "Remove Source",
372
581
  description: "Are you sure you want to remove this source? Any layers using it will be affected.",
373
- onConfirm: () => s && P(s),
374
- onCancel: () => v(null)
582
+ onConfirm: () => d && j(d),
583
+ onCancel: () => N(null)
375
584
  }
376
585
  )
377
586
  ] });
378
587
  }
379
- function _a({
588
+ function ut({
380
589
  sourceUrl: e,
381
590
  selectedCollectionIds: t,
382
591
  onSelect: i,
383
592
  onDeselect: r
384
593
  }) {
385
- const { collections: n, loading: o, error: p } = Fe(e || null);
594
+ const { collections: n, loading: o, error: p } = Ue(e || null);
386
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: [
387
596
  /* @__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" }),
388
597
  "Loading collections…"
389
598
  ] }) : p ? /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3 mapui:text-sm mapui:text-red-700", children: [
390
599
  "Failed to load collections: ",
391
600
  p.message
392
- ] }) : 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((b) => {
393
- const m = t.includes(b.id);
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);
394
603
  return /* @__PURE__ */ l(
395
604
  "li",
396
605
  {
@@ -400,63 +609,63 @@ function _a({
400
609
  "input",
401
610
  {
402
611
  type: "checkbox",
403
- id: `collection-${b.id}`,
404
- checked: m,
405
- onChange: () => m ? r(b.id) : i(b.id),
612
+ id: `collection-${x.id}`,
613
+ checked: s,
614
+ onChange: () => s ? r(x.id) : i(x.id),
406
615
  className: "mapui:mt-0.5 mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-blue-600"
407
616
  }
408
617
  ),
409
618
  /* @__PURE__ */ l(
410
619
  "label",
411
620
  {
412
- htmlFor: `collection-${b.id}`,
621
+ htmlFor: `collection-${x.id}`,
413
622
  className: "mapui:flex mapui:cursor-pointer mapui:flex-col mapui:gap-0.5",
414
623
  children: [
415
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: b.title ?? b.id }),
416
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: b.id }),
417
- b.description && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: b.description })
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 })
418
627
  ]
419
628
  }
420
629
  )
421
630
  ]
422
631
  },
423
- b.id
632
+ x.id
424
633
  );
425
634
  }) });
426
635
  }
427
- function He({ value: e, onChange: t, availableIcons: i }) {
428
- const [r, n] = A(!1), [o, p] = A(-1), b = ue(null), m = Ie(), w = o >= 0 ? `${m}-option-${o}` : void 0, d = Ee(() => {
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(() => {
429
638
  if (!i || i.length === 0) return [];
430
639
  if (!e) return i;
431
- const N = e.toLowerCase();
432
- return i.filter((S) => S.toLowerCase().includes(N));
433
- }, [i, e]), f = r && d.length > 0, c = We(
434
- (N) => {
435
- t(N), n(!1), p(-1);
640
+ const v = e.toLowerCase();
641
+ return i.filter((T) => T.toLowerCase().includes(v));
642
+ }, [i, e]), w = r && y.length > 0, c = Je(
643
+ (v) => {
644
+ t(v), n(!1), p(-1);
436
645
  },
437
646
  [t]
438
- ), u = (N) => {
439
- t(N.target.value), n(!0), p(-1);
440
- }, s = (N) => {
441
- f && (N.key === "ArrowDown" ? (N.preventDefault(), p((S) => Math.min(S + 1, d.length - 1))) : N.key === "ArrowUp" ? (N.preventDefault(), p((S) => Math.max(S - 1, 0))) : N.key === "Enter" && o >= 0 ? (N.preventDefault(), c(d[o])) : N.key === "Escape" && (n(!1), p(-1)));
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)));
442
651
  };
443
- X(() => {
444
- const N = (S) => {
445
- b.current && !b.current.contains(S.target) && (n(!1), p(-1));
652
+ V(() => {
653
+ const v = (T) => {
654
+ x.current && !x.current.contains(T.target) && (n(!1), p(-1));
446
655
  };
447
- return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
656
+ return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
448
657
  }, []);
449
- const v = "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";
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";
450
659
  return !i || i.length === 0 ? /* @__PURE__ */ a(
451
660
  "input",
452
661
  {
453
662
  type: "text",
454
663
  value: e,
455
- onChange: (N) => t(N.target.value || ""),
664
+ onChange: (v) => t(v.target.value || ""),
456
665
  placeholder: "icon-name",
457
- className: v
666
+ className: N
458
667
  }
459
- ) : /* @__PURE__ */ l("div", { ref: b, className: "mapui:relative", children: [
668
+ ) : /* @__PURE__ */ l("div", { ref: x, className: "mapui:relative", children: [
460
669
  /* @__PURE__ */ a(
461
670
  "input",
462
671
  {
@@ -464,41 +673,41 @@ function He({ value: e, onChange: t, availableIcons: i }) {
464
673
  value: e,
465
674
  placeholder: "Search icons…",
466
675
  role: "combobox",
467
- "aria-expanded": f,
676
+ "aria-expanded": w,
468
677
  "aria-autocomplete": "list",
469
- "aria-controls": m,
470
- "aria-activedescendant": w,
678
+ "aria-controls": s,
679
+ "aria-activedescendant": g,
471
680
  onChange: u,
472
681
  onFocus: () => n(!0),
473
- onKeyDown: s,
474
- className: v
682
+ onKeyDown: d,
683
+ className: N
475
684
  }
476
685
  ),
477
- f && /* @__PURE__ */ a(
686
+ w && /* @__PURE__ */ a(
478
687
  "ul",
479
688
  {
480
- id: m,
689
+ id: s,
481
690
  role: "listbox",
482
691
  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",
483
- children: d.map((N, S) => /* @__PURE__ */ a(
692
+ children: y.map((v, T) => /* @__PURE__ */ a(
484
693
  "li",
485
694
  {
486
- id: `${m}-option-${S}`,
695
+ id: `${s}-option-${T}`,
487
696
  role: "option",
488
- "aria-selected": S === o,
489
- onMouseDown: (x) => {
490
- x.preventDefault(), c(N);
697
+ "aria-selected": T === o,
698
+ onMouseDown: (E) => {
699
+ E.preventDefault(), c(v);
491
700
  },
492
- className: `mapui:cursor-pointer mapui:px-2 mapui:py-1 mapui:text-sm mapui:font-mono ${S === o ? "mapui:bg-blue-100" : "hover:mapui:bg-gray-50"}`,
493
- children: N
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"}`,
702
+ children: v
494
703
  },
495
- `${S}-${N}`
704
+ `${T}-${v}`
496
705
  ))
497
706
  }
498
707
  )
499
708
  ] });
500
709
  }
501
- const de = [
710
+ const we = [
502
711
  "#4e79a7",
503
712
  "#f28e2b",
504
713
  "#e15759",
@@ -510,205 +719,254 @@ const de = [
510
719
  "#9c755f",
511
720
  "#bab0ac"
512
721
  ];
513
- function ae(e) {
514
- return de[e % de.length];
722
+ function ne(e) {
723
+ return we[e % we.length];
515
724
  }
516
- function Je(e) {
725
+ function ma(e) {
517
726
  return e[0] === "interpolate" ? "interpolate" : "match";
518
727
  }
519
- function Ke(e) {
728
+ function sa(e) {
520
729
  const t = Array.isArray(e[1]) ? e[1][1] ?? "" : "", i = e[e.length - 1] ?? "#000000", r = [];
521
730
  for (let n = 2; n < e.length - 1; n += 2)
522
731
  r.push({ value: String(e[n] ?? ""), color: e[n + 1] ?? "#000000" });
523
732
  return { property: t, pairs: r, fallback: i };
524
733
  }
525
- function he(e, t, i) {
734
+ function Ne(e, t, i) {
526
735
  const r = ["match", ["get", e]];
527
736
  for (const n of t)
528
737
  r.push(n.value, n.color);
529
738
  return r.push(i), r;
530
739
  }
531
- function Qe(e) {
532
- const t = Array.isArray(e[2]) ? e[2][1] ?? "" : "", i = [];
533
- for (let r = 3; r < e.length; r += 2)
534
- i.push({ stop: Number(e[r] ?? 0), color: e[r + 1] ?? "#000000" });
535
- return { property: t, stops: i };
536
- }
537
- function ge(e, t) {
538
- const i = ["interpolate", ["linear"], ["get", e]];
740
+ function pe(e) {
741
+ const t = e[2];
742
+ let i = "";
743
+ Array.isArray(t) && (t[0] === "to-number" && Array.isArray(t[1]) ? i = t[1][1] ?? "" : i = t[1] ?? "");
744
+ const r = [];
745
+ for (let n = 3; n < e.length; n += 2)
746
+ r.push({ stop: Number(e[n] ?? 0), color: e[n + 1] ?? "#000000" });
747
+ return { property: i, stops: r };
748
+ }
749
+ function ve(e, t) {
750
+ const i = ["interpolate", ["linear"], ["to-number", ["get", e]]];
539
751
  for (const r of t)
540
752
  i.push(r.stop, r.color);
541
753
  return i;
542
754
  }
543
- const J = "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 = "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", be = "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";
544
- function Ze({
755
+ function ke(e) {
756
+ return e.map((t) => ({ stopText: String(t.stop), color: t.color }));
757
+ }
758
+ function ca(e) {
759
+ return e.map((t, i) => {
760
+ if (t.stopText.trim() === "") return "Value required";
761
+ const r = parseFloat(t.stopText);
762
+ if (isNaN(r)) return "Must be a number";
763
+ if (i > 0) {
764
+ const n = parseFloat(e[i - 1].stopText);
765
+ if (!isNaN(n) && r <= n) return "Must be greater than previous stop";
766
+ }
767
+ return "";
768
+ });
769
+ }
770
+ function da(e) {
771
+ const t = [];
772
+ for (const i of e) {
773
+ const r = parseFloat(i.stopText);
774
+ if (isNaN(r)) return null;
775
+ t.push({ stop: r, color: i.color });
776
+ }
777
+ return t;
778
+ }
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({
545
781
  value: e,
546
782
  onChange: t,
547
783
  availableProperties: i = [],
548
784
  onFetchDistinctValues: r
549
785
  }) {
550
- const [n, o] = A(() => Je(e)), [p, b] = A(!1), m = Ke(e), w = Qe(e), d = n === "match" ? m.property : "", f = n === "match" ? m.pairs : [], c = n === "match" ? m.fallback : "#000000", u = n === "interpolate" ? w.property : "", s = n === "interpolate" ? w.stops : [], v = i.filter(
551
- (h) => !h.type || h.type === "string"
552
- ), N = i.filter(
553
- (h) => h.type === "number" || h.type === "integer"
554
- ), S = (h, T, I) => {
555
- t(he(h, T, I));
556
- }, x = (h) => {
557
- S(h, f, c);
558
- }, P = (h) => {
559
- S(d, f, h);
560
- }, C = (h, T) => {
561
- const I = f.map((F, j) => j === h ? { ...F, value: T } : F);
562
- S(d, I, c);
563
- }, L = (h, T) => {
564
- const I = f.map((F, j) => j === h ? { ...F, color: T } : F);
565
- S(d, I, c);
566
- }, E = (h) => {
567
- const T = f.filter((I, F) => F !== h);
568
- S(d, T, c);
569
- }, y = () => {
570
- const h = [...f, { value: "", color: ae(f.length) }];
571
- S(d, h, c);
572
- }, $ = async () => {
573
- if (!(!r || !d)) {
574
- b(!0);
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([]);
794
+ }
795
+ E.current = e;
796
+ }, [e, n]);
797
+ const j = i.filter(
798
+ (b) => !b.type || b.type === "string"
799
+ ), m = i.filter(
800
+ (b) => b.type === "number" || b.type === "integer"
801
+ ), I = (b, D, A) => {
802
+ t(Ne(b, D, A));
803
+ }, M = (b) => {
804
+ I(b, y, w);
805
+ }, h = (b) => {
806
+ I(g, y, b);
807
+ }, F = (b, D) => {
808
+ const A = y.map((L, B) => B === b ? { ...L, value: D } : L);
809
+ I(g, A, w);
810
+ }, P = (b, D) => {
811
+ const A = y.map((L, B) => B === b ? { ...L, color: D } : L);
812
+ I(g, A, w);
813
+ }, f = (b) => {
814
+ const D = y.filter((A, L) => L !== b);
815
+ I(g, D, w);
816
+ }, k = () => {
817
+ const b = [...y, { value: "", color: ne(y.length) }];
818
+ I(g, b, w);
819
+ }, O = async () => {
820
+ if (!(!r || !g)) {
821
+ x(!0);
575
822
  try {
576
- const T = (await r(d)).map((I, F) => ({
577
- value: I,
578
- color: ae(F)
823
+ const D = (await r(g)).map((A, L) => ({
824
+ value: A,
825
+ color: ne(L)
579
826
  }));
580
- S(d, T, c);
827
+ I(g, D, w);
581
828
  } finally {
582
- b(!1);
829
+ x(!1);
583
830
  }
584
831
  }
585
- }, M = (h, T) => {
586
- t(ge(h, T));
587
- }, g = (h) => {
588
- M(h, s);
589
- }, k = (h, T) => {
590
- const I = s.map((F, j) => j === h ? { ...F, stop: T } : F);
591
- M(u, I);
592
- }, O = (h, T) => {
593
- const I = s.map((F, j) => j === h ? { ...F, color: T } : F);
594
- M(u, I);
595
- }, U = (h) => {
596
- const T = s.filter((I, F) => F !== h);
597
- M(u, T);
598
- }, G = () => {
599
- var I;
600
- const h = ((I = s[s.length - 1]) == null ? void 0 : I.stop) ?? 0, T = [...s, { stop: h + 10, color: ae(s.length) }];
601
- M(u, T);
602
- }, B = (h) => {
603
- o(h), t(h === "match" ? he("", [], "#000000") : ge("", []));
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));
837
+ }
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 = () => {
850
+ 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("", [])));
604
855
  };
605
856
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
606
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: ["match", "interpolate"].map((h) => /* @__PURE__ */ a(
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(
607
858
  "button",
608
859
  {
609
860
  type: "button",
610
- onClick: () => B(h),
861
+ onClick: () => Q(b),
611
862
  className: [
612
863
  "mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-xs mapui:capitalize mapui:outline-none",
613
864
  "focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
614
- n === h ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
865
+ n === b ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
615
866
  ].join(" "),
616
- children: h === "match" ? "Categorical" : "Gradient"
867
+ children: b === "match" ? "Categorical" : "Gradient"
617
868
  },
618
- h
869
+ b
619
870
  )) }),
620
- n === "match" && /* @__PURE__ */ l(q, { children: [
871
+ n === "match" && /* @__PURE__ */ l(U, { children: [
621
872
  /* @__PURE__ */ l(
622
873
  "select",
623
874
  {
624
- value: d,
625
- onChange: (h) => x(h.target.value),
626
- className: J,
875
+ value: g,
876
+ onChange: (b) => M(b.target.value),
877
+ className: ee,
627
878
  children: [
628
879
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
629
- v.map((h) => /* @__PURE__ */ a("option", { value: h.name, children: h.title ?? h.name }, h.name))
880
+ j.map((b) => /* @__PURE__ */ a("option", { value: b.name, children: b.title ?? b.name }, b.name))
630
881
  ]
631
882
  }
632
883
  ),
633
- f.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: f.map((h, T) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
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: [
634
885
  /* @__PURE__ */ a(
635
886
  "input",
636
887
  {
637
888
  type: "text",
638
- value: h.value,
639
- onChange: (I) => C(T, I.target.value),
889
+ value: b.value,
890
+ onChange: (A) => F(D, A.target.value),
640
891
  placeholder: "value",
641
- className: `${J} mapui:flex-1`
892
+ className: `${ee} mapui:flex-1`
642
893
  }
643
894
  ),
644
895
  /* @__PURE__ */ a(
645
- Y,
896
+ H,
646
897
  {
647
- value: h.color,
648
- onChange: (I) => L(T, I),
649
- label: `Color for "${h.value}"`
898
+ value: b.color,
899
+ onChange: (A) => P(D, A),
900
+ label: `Color for "${b.value}"`
650
901
  }
651
902
  ),
652
- /* @__PURE__ */ a("button", { type: "button", onClick: () => E(T), className: be, children: "×" })
653
- ] }, T)) }),
903
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => f(D), className: Ce, children: "×" })
904
+ ] }, D)) }),
654
905
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
655
906
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500 mapui:shrink-0", children: "Fallback:" }),
656
- /* @__PURE__ */ a(Y, { value: c, onChange: P, label: "Fallback color" })
907
+ /* @__PURE__ */ a(H, { value: w, onChange: h, label: "Fallback color" })
657
908
  ] }),
658
909
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
659
- /* @__PURE__ */ a("button", { type: "button", onClick: y, className: te, children: "+ Add value" }),
660
- r && d && /* @__PURE__ */ a(
910
+ /* @__PURE__ */ a("button", { type: "button", onClick: k, className: oe, children: "+ Add value" }),
911
+ r && g && /* @__PURE__ */ a(
661
912
  "button",
662
913
  {
663
914
  type: "button",
664
- onClick: $,
915
+ onClick: O,
665
916
  disabled: p,
666
- className: te,
917
+ className: oe,
667
918
  children: p ? "Loading…" : "Auto-populate"
668
919
  }
669
920
  )
670
921
  ] })
671
922
  ] }),
672
- n === "interpolate" && /* @__PURE__ */ l(q, { children: [
923
+ n === "interpolate" && /* @__PURE__ */ l(U, { children: [
673
924
  /* @__PURE__ */ l(
674
925
  "select",
675
926
  {
676
- value: u,
677
- onChange: (h) => g(h.target.value),
678
- className: J,
927
+ value: d,
928
+ onChange: (b) => G(b.target.value),
929
+ className: ee,
679
930
  children: [
680
931
  /* @__PURE__ */ a("option", { value: "", children: "Select a numeric property…" }),
681
- N.map((h) => /* @__PURE__ */ a("option", { value: h.name, children: h.title ?? h.name }, h.name))
932
+ m.map((b) => /* @__PURE__ */ a("option", { value: b.name, children: b.title ?? b.name }, b.name))
682
933
  ]
683
934
  }
684
935
  ),
685
- s.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: s.map((h, T) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
686
- /* @__PURE__ */ a(
687
- "input",
688
- {
689
- type: "number",
690
- value: h.stop,
691
- onChange: (I) => k(T, parseFloat(I.target.value) || 0),
692
- placeholder: "stop",
693
- className: `${J} mapui:w-24`
694
- }
695
- ),
696
- /* @__PURE__ */ a(
697
- Y,
698
- {
699
- value: h.color,
700
- onChange: (I) => O(T, I),
701
- label: `Color at stop ${h.stop}`
702
- }
703
- ),
704
- /* @__PURE__ */ a("button", { type: "button", onClick: () => U(T), className: be, children: "×" })
705
- ] }, T)) }),
706
- /* @__PURE__ */ a("button", { type: "button", onClick: G, className: te, children: "+ Add stop" })
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];
938
+ return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
939
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
940
+ /* @__PURE__ */ a(
941
+ "input",
942
+ {
943
+ type: "text",
944
+ inputMode: "numeric",
945
+ value: b.stopText,
946
+ onChange: (L) => q(D, L.target.value),
947
+ placeholder: "stop",
948
+ className: `${ee} mapui:w-24`
949
+ }
950
+ ),
951
+ /* @__PURE__ */ a(
952
+ H,
953
+ {
954
+ value: b.color,
955
+ onChange: (L) => z(D, L),
956
+ label: `Color at stop ${b.stopText}`
957
+ }
958
+ ),
959
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => J(D), className: Ce, children: "×" })
960
+ ] }),
961
+ A && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-500", children: A })
962
+ ] }, D);
963
+ }) }),
964
+ /* @__PURE__ */ a("button", { type: "button", onClick: K, className: oe, children: "+ Add stop" })
707
965
  ] })
708
966
  ] });
709
967
  }
710
- 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";
711
- function ea({
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({
712
970
  value: e,
713
971
  onChange: t
714
972
  }) {
@@ -721,7 +979,7 @@ function ea({
721
979
  step: 0.5,
722
980
  value: i,
723
981
  onChange: (n) => t([parseFloat(n.target.value) || 0, r]),
724
- className: `${z} mapui:w-20`,
982
+ className: `${_} mapui:w-20`,
725
983
  "aria-label": "X",
726
984
  placeholder: "X"
727
985
  }
@@ -733,14 +991,14 @@ function ea({
733
991
  step: 0.5,
734
992
  value: r,
735
993
  onChange: (n) => t([i, parseFloat(n.target.value) || 0]),
736
- className: `${z} mapui:w-20`,
994
+ className: `${_} mapui:w-20`,
737
995
  "aria-label": "Y",
738
996
  placeholder: "Y"
739
997
  }
740
998
  )
741
999
  ] });
742
1000
  }
743
- function aa({
1001
+ function ba({
744
1002
  value: e,
745
1003
  onChange: t
746
1004
  }) {
@@ -761,7 +1019,7 @@ function aa({
761
1019
  /* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: i.toFixed(2) })
762
1020
  ] });
763
1021
  }
764
- function ye({
1022
+ function Se({
765
1023
  def: e,
766
1024
  value: t,
767
1025
  onChange: i,
@@ -769,37 +1027,37 @@ function ye({
769
1027
  availableProperties: n,
770
1028
  onFetchDistinctValues: o
771
1029
  }) {
772
- var p, b;
1030
+ var p, x;
773
1031
  switch (e.widget) {
774
1032
  case "color": {
775
- const m = Array.isArray(t), w = m ? t[t.length - 1] ?? "#000000" : "#000000";
1033
+ const s = Array.isArray(t), g = s ? t[t.length - 1] ?? "#000000" : "#000000";
776
1034
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1 mapui:w-full", children: [
777
1035
  /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:justify-end", children: /* @__PURE__ */ a(
778
1036
  "button",
779
1037
  {
780
1038
  type: "button",
781
- title: m ? "Switch to static color" : "Switch to data-driven color",
1039
+ title: s ? "Switch to static color" : "Switch to data-driven color",
782
1040
  onClick: () => {
783
- i(m ? w : ["match", ["get", ""], w]);
1041
+ i(s ? g : ["match", ["get", ""], g]);
784
1042
  },
785
1043
  className: [
786
1044
  "mapui:cursor-pointer mapui:rounded mapui:border mapui:px-1.5 mapui:py-0.5 mapui:font-mono mapui:text-xs mapui:outline-none",
787
1045
  "focus:mapui:ring-1 focus:mapui:ring-blue-400",
788
- m ? "mapui:border-blue-400 mapui:bg-blue-50 mapui:text-blue-700" : "mapui:border-gray-300 mapui:bg-white mapui:text-gray-500 hover:mapui:border-blue-400 hover:mapui:text-blue-600"
1046
+ s ? "mapui:border-blue-400 mapui:bg-blue-50 mapui:text-blue-700" : "mapui:border-gray-300 mapui:bg-white mapui:text-gray-500 hover:mapui:border-blue-400 hover:mapui:text-blue-600"
789
1047
  ].join(" "),
790
1048
  children: "fx"
791
1049
  }
792
1050
  ) }),
793
- m ? /* @__PURE__ */ a(
794
- Ze,
1051
+ s ? /* @__PURE__ */ a(
1052
+ ha,
795
1053
  {
796
1054
  value: t,
797
- onChange: (d) => i(d),
1055
+ onChange: (y) => i(y),
798
1056
  availableProperties: n,
799
1057
  onFetchDistinctValues: o
800
1058
  }
801
1059
  ) : /* @__PURE__ */ a(
802
- Y,
1060
+ H,
803
1061
  {
804
1062
  value: t ?? "#000000",
805
1063
  onChange: i,
@@ -810,7 +1068,7 @@ function ye({
810
1068
  }
811
1069
  case "opacity":
812
1070
  return /* @__PURE__ */ a(
813
- aa,
1071
+ ba,
814
1072
  {
815
1073
  value: t,
816
1074
  onChange: i
@@ -825,8 +1083,8 @@ function ye({
825
1083
  max: e.max,
826
1084
  step: e.step ?? 1,
827
1085
  value: t ?? e.min ?? 0,
828
- onChange: (m) => i(parseFloat(m.target.value) || 0),
829
- className: z
1086
+ onChange: (s) => i(parseFloat(s.target.value) || 0),
1087
+ className: _
830
1088
  }
831
1089
  );
832
1090
  case "boolean":
@@ -835,7 +1093,7 @@ function ye({
835
1093
  {
836
1094
  type: "checkbox",
837
1095
  checked: t ?? !1,
838
- onChange: (m) => i(m.target.checked),
1096
+ onChange: (s) => i(s.target.checked),
839
1097
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
840
1098
  }
841
1099
  );
@@ -844,14 +1102,14 @@ function ye({
844
1102
  "select",
845
1103
  {
846
1104
  value: t ?? ((p = e.options) == null ? void 0 : p[0]) ?? "",
847
- onChange: (m) => i(m.target.value),
848
- className: z,
849
- children: (b = e.options) == null ? void 0 : b.map((m) => /* @__PURE__ */ a("option", { value: m, children: m }, m))
1105
+ 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))
850
1108
  }
851
1109
  );
852
1110
  case "translate":
853
1111
  return /* @__PURE__ */ a(
854
- ea,
1112
+ ga,
855
1113
  {
856
1114
  value: t,
857
1115
  onChange: i
@@ -859,28 +1117,28 @@ function ye({
859
1117
  );
860
1118
  case "dasharray":
861
1119
  case "stringArray": {
862
- const m = t, w = m ? m.join(", ") : "";
1120
+ const s = t, g = s ? s.join(", ") : "";
863
1121
  return /* @__PURE__ */ a(
864
1122
  "input",
865
1123
  {
866
1124
  type: "text",
867
- value: w,
868
- onChange: (d) => {
869
- const f = d.target.value.trim();
870
- if (!f) {
1125
+ value: g,
1126
+ onChange: (y) => {
1127
+ const w = y.target.value.trim();
1128
+ if (!w) {
871
1129
  i(void 0);
872
1130
  return;
873
1131
  }
874
1132
  if (e.widget === "dasharray") {
875
- const c = f.split(",").map((u) => parseFloat(u.trim())).filter((u) => !isNaN(u));
1133
+ const c = w.split(",").map((u) => parseFloat(u.trim())).filter((u) => !isNaN(u));
876
1134
  i(c.length > 0 ? c : void 0);
877
1135
  } else {
878
- const c = f.split(",").map((u) => u.trim()).filter(Boolean);
1136
+ const c = w.split(",").map((u) => u.trim()).filter(Boolean);
879
1137
  i(c.length > 0 ? c : void 0);
880
1138
  }
881
1139
  },
882
1140
  placeholder: e.widget === "dasharray" ? "e.g. 2, 4" : "comma-separated",
883
- className: z
1141
+ className: _
884
1142
  }
885
1143
  );
886
1144
  }
@@ -890,16 +1148,16 @@ function ye({
890
1148
  {
891
1149
  type: "text",
892
1150
  value: t ?? "",
893
- onChange: (m) => i(m.target.value || void 0),
894
- className: z
1151
+ onChange: (s) => i(s.target.value || void 0),
1152
+ className: _
895
1153
  }
896
1154
  );
897
1155
  case "icon-image":
898
1156
  return /* @__PURE__ */ a(
899
- He,
1157
+ ua,
900
1158
  {
901
1159
  value: t ?? "",
902
- onChange: (m) => i(m ?? void 0),
1160
+ onChange: (s) => i(s ?? void 0),
903
1161
  availableIcons: r
904
1162
  }
905
1163
  );
@@ -907,58 +1165,58 @@ function ye({
907
1165
  return null;
908
1166
  }
909
1167
  }
910
- function ta({ def: e, value: t, onChange: i, availableIcons: r, availableProperties: n, onFetchDistinctValues: o }) {
911
- const p = e.enableDefault !== void 0, b = t !== void 0;
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;
912
1170
  if (p && e.widget === "boolean") {
913
- const m = !e.enableDefault;
914
- return /* @__PURE__ */ a(D, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
1171
+ const s = !e.enableDefault;
1172
+ return /* @__PURE__ */ a(C, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
915
1173
  "input",
916
1174
  {
917
1175
  type: "checkbox",
918
- checked: t === m,
919
- onChange: (w) => {
920
- i(e.key, w.target.checked ? m : void 0);
1176
+ checked: t === s,
1177
+ onChange: (g) => {
1178
+ i(e.key, g.target.checked ? s : void 0);
921
1179
  },
922
1180
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
923
1181
  }
924
1182
  ) });
925
1183
  }
926
- return p ? /* @__PURE__ */ a(D, { label: e.label, description: e.description, children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
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: [
927
1185
  /* @__PURE__ */ a(
928
1186
  "input",
929
1187
  {
930
1188
  type: "checkbox",
931
- checked: b,
932
- onChange: (m) => {
933
- i(e.key, m.target.checked ? e.enableDefault : void 0);
1189
+ checked: x,
1190
+ onChange: (s) => {
1191
+ i(e.key, s.target.checked ? e.enableDefault : void 0);
934
1192
  },
935
1193
  className: "mapui:h-4 mapui:w-4 mapui:shrink-0 mapui:accent-blue-600"
936
1194
  }
937
1195
  ),
938
- b && /* @__PURE__ */ a(
939
- ye,
1196
+ x && /* @__PURE__ */ a(
1197
+ Se,
940
1198
  {
941
1199
  def: e,
942
1200
  value: t,
943
- onChange: (m) => i(e.key, m),
1201
+ onChange: (s) => i(e.key, s),
944
1202
  availableIcons: r,
945
1203
  availableProperties: n,
946
1204
  onFetchDistinctValues: o
947
1205
  }
948
1206
  )
949
- ] }) }) : /* @__PURE__ */ a(D, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
950
- ye,
1207
+ ] }) }) : /* @__PURE__ */ a(C, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
1208
+ Se,
951
1209
  {
952
1210
  def: e,
953
1211
  value: t,
954
- onChange: (m) => i(e.key, m),
1212
+ onChange: (s) => i(e.key, s),
955
1213
  availableIcons: r,
956
1214
  availableProperties: n,
957
1215
  onFetchDistinctValues: o
958
1216
  }
959
1217
  ) });
960
1218
  }
961
- function fe({
1219
+ function Te({
962
1220
  title: e,
963
1221
  properties: t,
964
1222
  values: i,
@@ -966,31 +1224,31 @@ function fe({
966
1224
  defaultOpen: n = !1,
967
1225
  availableIcons: o,
968
1226
  availableProperties: p,
969
- onFetchDistinctValues: b
1227
+ onFetchDistinctValues: x
970
1228
  }) {
971
- const m = t.filter(
972
- (w) => w.enableDefault !== void 0 && i[w.key] !== void 0
1229
+ const s = t.filter(
1230
+ (g) => g.enableDefault !== void 0 && i[g.key] !== void 0
973
1231
  ).length;
974
- return /* @__PURE__ */ a(_, { title: e, defaultOpen: n, badge: m || void 0, children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: t.map((w) => /* @__PURE__ */ a(
975
- ta,
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,
976
1234
  {
977
- def: w,
978
- value: i[w.key],
1235
+ def: g,
1236
+ value: i[g.key],
979
1237
  onChange: r,
980
1238
  availableIcons: o,
981
1239
  availableProperties: p,
982
- onFetchDistinctValues: b
1240
+ onFetchDistinctValues: x
983
1241
  },
984
- w.key
1242
+ g.key
985
1243
  )) }) });
986
1244
  }
987
1245
  function W(e) {
988
1246
  return Array.isArray(e);
989
1247
  }
990
- function ia(e) {
1248
+ function fa(e) {
991
1249
  return e[0] === "match" ? "match" : e[0] === "interpolate" ? "interpolate" : null;
992
1250
  }
993
- function Me(e) {
1251
+ function ze(e) {
994
1252
  if (e[0] === "match") {
995
1253
  const t = [];
996
1254
  for (let r = 3; r < e.length; r += 2)
@@ -1006,7 +1264,7 @@ function Me(e) {
1006
1264
  }
1007
1265
  return [];
1008
1266
  }
1009
- function ra(e) {
1267
+ function xa(e) {
1010
1268
  if (e[0] === "match") {
1011
1269
  const t = [];
1012
1270
  for (let r = 2; r < e.length - 1; r += 2) {
@@ -1026,11 +1284,16 @@ function ra(e) {
1026
1284
  }
1027
1285
  return [];
1028
1286
  }
1029
- function la(e) {
1287
+ function wa(e) {
1030
1288
  const t = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
1031
- return Array.isArray(t) && t[0] === "get" && typeof t[1] == "string" ? t[1] : null;
1289
+ if (Array.isArray(t)) {
1290
+ if (t[0] === "get" && typeof t[1] == "string") return t[1];
1291
+ if (t[0] === "to-number" && Array.isArray(t[1]) && t[1][0] === "get")
1292
+ return t[1][1] ?? null;
1293
+ }
1294
+ return null;
1032
1295
  }
1033
- function na(e) {
1296
+ function Na(e) {
1034
1297
  switch (e.type) {
1035
1298
  case "fill":
1036
1299
  return e.paint["fill-color"] ?? "#000000";
@@ -1042,7 +1305,7 @@ function na(e) {
1042
1305
  return e.paint["text-color"] ?? e.paint["icon-color"] ?? "#000000";
1043
1306
  }
1044
1307
  }
1045
- function pa(e) {
1308
+ function va(e) {
1046
1309
  switch (e.type) {
1047
1310
  case "fill":
1048
1311
  return "square";
@@ -1053,8 +1316,8 @@ function pa(e) {
1053
1316
  return "circle";
1054
1317
  }
1055
1318
  }
1056
- function ie({ expr: e, height: t }) {
1057
- const i = Me(e);
1319
+ function ue({ expr: e, height: t }) {
1320
+ const i = ze(e);
1058
1321
  if (i.length === 0)
1059
1322
  return /* @__PURE__ */ a(
1060
1323
  "div",
@@ -1077,10 +1340,10 @@ function ie({ expr: e, height: t }) {
1077
1340
  }
1078
1341
  );
1079
1342
  }
1080
- function xe(e, t) {
1081
- return typeof e == "string" ? e : W(e) ? Me(e)[0] ?? t : t;
1343
+ function De(e, t) {
1344
+ return typeof e == "string" ? e : W(e) ? ze(e)[0] ?? t : t;
1082
1345
  }
1083
- function oa({ style: e }) {
1346
+ function ka({ style: e }) {
1084
1347
  if (e.type === "fill") {
1085
1348
  const r = e.paint["fill-color"];
1086
1349
  return /* @__PURE__ */ a(
@@ -1088,7 +1351,7 @@ function oa({ style: e }) {
1088
1351
  {
1089
1352
  className: "mapui:h-8 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200 mapui:overflow-hidden",
1090
1353
  "aria-label": "Style preview",
1091
- children: W(r) ? /* @__PURE__ */ a(ie, { expr: r, height: 32 }) : /* @__PURE__ */ a(
1354
+ children: W(r) ? /* @__PURE__ */ a(ue, { expr: r, height: 32 }) : /* @__PURE__ */ a(
1092
1355
  "div",
1093
1356
  {
1094
1357
  style: {
@@ -1110,7 +1373,7 @@ function oa({ style: e }) {
1110
1373
  {
1111
1374
  className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:rounded mapui:border mapui:border-gray-200 mapui:px-2",
1112
1375
  "aria-label": "Style preview",
1113
- children: W(r) ? /* @__PURE__ */ a(ie, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
1376
+ children: W(r) ? /* @__PURE__ */ a(ue, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
1114
1377
  "div",
1115
1378
  {
1116
1379
  style: {
@@ -1131,7 +1394,7 @@ function oa({ style: e }) {
1131
1394
  {
1132
1395
  className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
1133
1396
  "aria-label": "Style preview",
1134
- children: W(r) ? /* @__PURE__ */ a("div", { style: { width: n, height: n, borderRadius: "50%", overflow: "hidden" }, children: /* @__PURE__ */ a(ie, { expr: r, height: n }) }) : /* @__PURE__ */ a(
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(
1135
1398
  "div",
1136
1399
  {
1137
1400
  style: {
@@ -1147,7 +1410,7 @@ function oa({ style: e }) {
1147
1410
  }
1148
1411
  );
1149
1412
  }
1150
- const t = xe(e.paint["text-color"], "#333333"), i = xe(e.paint["icon-color"], "#333333");
1413
+ const t = De(e.paint["text-color"], "#333333"), i = De(e.paint["icon-color"], "#333333");
1151
1414
  return /* @__PURE__ */ a(
1152
1415
  "div",
1153
1416
  {
@@ -1167,7 +1430,7 @@ function oa({ style: e }) {
1167
1430
  }
1168
1431
  );
1169
1432
  }
1170
- const ua = [
1433
+ const Ca = [
1171
1434
  // Appearance (paint)
1172
1435
  { key: "fill-color", label: "Fill Color", widget: "color", group: "Appearance", category: "paint" },
1173
1436
  { key: "fill-opacity", label: "Fill Opacity", widget: "opacity", group: "Appearance", category: "paint" },
@@ -1179,7 +1442,7 @@ const ua = [
1179
1442
  { 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.' },
1180
1443
  // Sorting (layout)
1181
1444
  { 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." }
1182
- ], ma = [
1445
+ ], Sa = [
1183
1446
  // Appearance (paint)
1184
1447
  { key: "line-color", label: "Line Color", widget: "color", group: "Appearance", category: "paint" },
1185
1448
  { key: "line-width", label: "Line Width", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.5 },
@@ -1200,7 +1463,7 @@ const ua = [
1200
1463
  { 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.' },
1201
1464
  // Sorting (layout)
1202
1465
  { 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." }
1203
- ], sa = [
1466
+ ], Ta = [
1204
1467
  // Appearance (paint)
1205
1468
  { key: "circle-color", label: "Circle Color", widget: "color", group: "Appearance", category: "paint" },
1206
1469
  { key: "circle-radius", label: "Radius", widget: "number", group: "Appearance", category: "paint", min: 0, step: 1 },
@@ -1218,7 +1481,7 @@ const ua = [
1218
1481
  { 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).' },
1219
1482
  // Sorting (layout)
1220
1483
  { 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." }
1221
- ], ca = [
1484
+ ], Da = [
1222
1485
  // Icon Appearance (paint)
1223
1486
  { key: "icon-color", label: "Icon Color", widget: "color", group: "Icon Appearance", category: "paint", enableDefault: "#000000" },
1224
1487
  { key: "icon-opacity", label: "Icon Opacity", widget: "opacity", group: "Icon Appearance", category: "paint", enableDefault: 1 },
@@ -1267,194 +1530,194 @@ const ua = [
1267
1530
  { 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." },
1268
1531
  { 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." },
1269
1532
  { 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.' }
1270
- ], da = {
1271
- fill: ua,
1272
- line: ma,
1273
- circle: sa,
1274
- symbol: ca
1533
+ ], La = {
1534
+ fill: Ca,
1535
+ line: Sa,
1536
+ circle: Ta,
1537
+ symbol: Da
1275
1538
  };
1276
- function ha(e) {
1277
- return da[e] ?? [];
1539
+ function Aa(e) {
1540
+ return La[e] ?? [];
1278
1541
  }
1279
- function we(e) {
1542
+ function Le(e) {
1280
1543
  const t = {};
1281
1544
  for (const i of e)
1282
1545
  t[i.group] || (t[i.group] = []), t[i.group].push(i);
1283
1546
  return t;
1284
1547
  }
1285
- const me = {
1548
+ const ge = {
1286
1549
  type: "fill",
1287
1550
  paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 }
1288
- }, ga = {
1551
+ }, Ea = {
1289
1552
  type: "line",
1290
1553
  paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 }
1291
- }, Oe = {
1554
+ }, Ge = {
1292
1555
  type: "circle",
1293
1556
  paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 }
1294
- }, ba = {
1557
+ }, Ia = {
1295
1558
  type: "symbol",
1296
1559
  paint: { "text-color": "#333333" },
1297
1560
  layout: { "text-field": "{name}", "text-size": 14 }
1298
- }, ya = {
1561
+ }, Fa = {
1299
1562
  layout: { "icon-image": "" }
1300
1563
  };
1301
- function ve(e) {
1564
+ function Ae(e) {
1302
1565
  if (e.type !== "symbol") return "text";
1303
1566
  const t = e.layout ?? {}, i = "icon-image" in t, r = "text-field" in t;
1304
1567
  return i && r ? "both" : i ? "icon" : "text";
1305
1568
  }
1306
- const fa = "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", K = {
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 = {
1307
1570
  fill: "Fill",
1308
1571
  line: "Line",
1309
1572
  circle: "Circle",
1310
1573
  symbol: "Symbol"
1311
- }, xa = ["text", "icon", "both"];
1312
- function wa({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availableIcons: n, availableProperties: o, onFetchDistinctValues: p }) {
1313
- const b = r ?? (i ? [i] : []), [m, w] = A(() => ve(e));
1314
- X(() => {
1315
- w(ve(e));
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));
1316
1579
  }, [e.type]);
1317
- const d = (y) => {
1318
- t(y === "fill" ? me : y === "line" ? ga : y === "circle" ? Oe : ba);
1319
- }, f = (y) => {
1320
- if (y === m) return;
1321
- const $ = e.paint ?? {}, M = e.layout ?? {};
1322
- let g = { ...$ }, k = { ...M };
1323
- y === "icon" ? (g = Object.fromEntries(Object.entries(g).filter(([O]) => !O.startsWith("text-"))), k = Object.fromEntries(Object.entries(k).filter(([O]) => !O.startsWith("text-"))), "icon-image" in k || (k["icon-image"] = ya.layout["icon-image"])) : y === "text" && (g = Object.fromEntries(Object.entries(g).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 g || (g["text-color"] = "#333333")), w(y), t({
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({
1324
1587
  ...e,
1325
- paint: g,
1588
+ paint: f,
1326
1589
  layout: Object.keys(k).length > 0 ? k : void 0
1327
1590
  });
1328
- }, c = (y, $) => {
1329
- const M = { ...e.paint, [y]: $ };
1330
- for (const g of Object.keys(M))
1331
- M[g] === void 0 && delete M[g];
1332
- t({ ...e, paint: M });
1333
- }, u = (y, $) => {
1334
- const g = { ...e.layout ?? {}, [y]: $ };
1335
- for (const k of Object.keys(g))
1336
- g[k] === void 0 && delete g[k];
1591
+ }, c = (h, F) => {
1592
+ const P = { ...e.paint, [h]: F };
1593
+ for (const f of Object.keys(P))
1594
+ P[f] === void 0 && delete P[f];
1595
+ t({ ...e, paint: P });
1596
+ }, u = (h, F) => {
1597
+ const f = { ...e.layout ?? {}, [h]: F };
1598
+ for (const k of Object.keys(f))
1599
+ f[k] === void 0 && delete f[k];
1337
1600
  t({
1338
1601
  ...e,
1339
- layout: Object.keys(g).length > 0 ? g : void 0
1602
+ layout: Object.keys(f).length > 0 ? f : void 0
1340
1603
  });
1341
1604
  };
1342
- let s = ha(e.type);
1343
- e.type === "symbol" && (m === "text" ? s = s.filter((y) => !y.key.startsWith("icon-")) : m === "icon" && (s = s.filter((y) => !y.key.startsWith("text-"))));
1344
- const v = s.filter((y) => y.category === "paint"), N = s.filter((y) => y.category === "layout"), S = we(v), x = we(N), P = e.paint, C = e.layout ?? {}, L = Object.keys(S), E = Object.keys(x);
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);
1345
1608
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1346
- b.length > 0 && !b.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: [
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: [
1347
1610
  /* @__PURE__ */ l("span", { children: [
1348
1611
  "Detected geometry is suitable for",
1349
1612
  " ",
1350
- b.map((y, $) => /* @__PURE__ */ l("span", { children: [
1351
- $ > 0 && ($ === b.length - 1 ? " or " : ", "),
1352
- /* @__PURE__ */ a("strong", { children: K[y] })
1353
- ] }, y)),
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)),
1354
1617
  " ",
1355
1618
  "style."
1356
1619
  ] }),
1357
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: b.map((y) => /* @__PURE__ */ a(
1620
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: x.map((h) => /* @__PURE__ */ a(
1358
1621
  "button",
1359
1622
  {
1360
1623
  type: "button",
1361
- onClick: () => d(y),
1624
+ onClick: () => y(h),
1362
1625
  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",
1363
- children: K[y]
1626
+ children: ae[h]
1364
1627
  },
1365
- y
1628
+ h
1366
1629
  )) })
1367
1630
  ] }),
1368
- /* @__PURE__ */ a(D, { label: "Style Type", children: /* @__PURE__ */ a(
1631
+ /* @__PURE__ */ a(C, { label: "Style Type", children: /* @__PURE__ */ a(
1369
1632
  "select",
1370
1633
  {
1371
1634
  value: e.type,
1372
- onChange: (y) => d(y.target.value),
1373
- className: fa,
1374
- children: Object.keys(K).map((y) => /* @__PURE__ */ a("option", { value: y, children: K[y] }, y))
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))
1375
1638
  }
1376
1639
  ) }),
1377
- e.type === "symbol" && /* @__PURE__ */ a(D, { label: "Symbol Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: xa.map((y) => /* @__PURE__ */ a(
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(
1378
1641
  "button",
1379
1642
  {
1380
1643
  type: "button",
1381
- onClick: () => f(y),
1644
+ onClick: () => w(h),
1382
1645
  className: [
1383
1646
  "mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-sm mapui:capitalize mapui:outline-none",
1384
1647
  "focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
1385
- m === y ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1648
+ s === h ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1386
1649
  ].join(" "),
1387
- children: y === "both" ? "Both" : y.charAt(0).toUpperCase() + y.slice(1)
1650
+ children: h === "both" ? "Both" : h.charAt(0).toUpperCase() + h.slice(1)
1388
1651
  },
1389
- y
1652
+ h
1390
1653
  )) }) }),
1391
1654
  /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-100 mapui:p-2", children: [
1392
1655
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:text-gray-500", children: "Preview" }),
1393
- /* @__PURE__ */ a(oa, { style: e })
1656
+ /* @__PURE__ */ a(ka, { style: e })
1394
1657
  ] }),
1395
- E.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1658
+ M.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1396
1659
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Layout" }),
1397
- E.map((y, $) => /* @__PURE__ */ a(
1398
- fe,
1660
+ M.map((h, F) => /* @__PURE__ */ a(
1661
+ Te,
1399
1662
  {
1400
- title: y,
1401
- properties: x[y],
1402
- values: C,
1663
+ title: h,
1664
+ properties: E[h],
1665
+ values: m,
1403
1666
  onChange: u,
1404
- defaultOpen: $ === 0,
1667
+ defaultOpen: F === 0,
1405
1668
  availableIcons: n,
1406
1669
  availableProperties: o,
1407
1670
  onFetchDistinctValues: p
1408
1671
  },
1409
- y
1672
+ h
1410
1673
  ))
1411
1674
  ] }),
1412
- L.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1675
+ I.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1413
1676
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Paint" }),
1414
- L.map((y) => /* @__PURE__ */ a(
1415
- fe,
1677
+ I.map((h) => /* @__PURE__ */ a(
1678
+ Te,
1416
1679
  {
1417
- title: y,
1418
- properties: S[y],
1419
- values: P,
1680
+ title: h,
1681
+ properties: T[h],
1682
+ values: j,
1420
1683
  onChange: c,
1421
1684
  defaultOpen: !1,
1422
1685
  availableIcons: n,
1423
1686
  availableProperties: o,
1424
1687
  onFetchDistinctValues: p
1425
1688
  },
1426
- y
1689
+ h
1427
1690
  ))
1428
1691
  ] })
1429
1692
  ] });
1430
1693
  }
1431
- const Ne = "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";
1432
- function va({ value: e, onChange: t }) {
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 }) {
1433
1696
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1434
- /* @__PURE__ */ a(D, { label: "Label", children: /* @__PURE__ */ a(
1697
+ /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
1435
1698
  "input",
1436
1699
  {
1437
1700
  type: "text",
1438
1701
  value: e.label,
1439
1702
  onChange: (i) => t({ ...e, label: i.target.value }),
1440
1703
  placeholder: "Legend entry label",
1441
- className: Ne
1704
+ className: Ee
1442
1705
  }
1443
1706
  ) }),
1444
- /* @__PURE__ */ a(D, { label: "Color", children: /* @__PURE__ */ a(
1445
- Y,
1707
+ /* @__PURE__ */ a(C, { label: "Color", children: /* @__PURE__ */ a(
1708
+ H,
1446
1709
  {
1447
1710
  value: e.color,
1448
1711
  onChange: (i) => t({ ...e, color: i }),
1449
1712
  label: "Entry color"
1450
1713
  }
1451
1714
  ) }),
1452
- /* @__PURE__ */ a(D, { label: "Shape", children: /* @__PURE__ */ l(
1715
+ /* @__PURE__ */ a(C, { label: "Shape", children: /* @__PURE__ */ l(
1453
1716
  "select",
1454
1717
  {
1455
1718
  value: e.shape ?? "square",
1456
1719
  onChange: (i) => t({ ...e, shape: i.target.value }),
1457
- className: Ne,
1720
+ className: Ee,
1458
1721
  children: [
1459
1722
  /* @__PURE__ */ a("option", { value: "square", children: "Square" }),
1460
1723
  /* @__PURE__ */ a("option", { value: "circle", children: "Circle" }),
@@ -1464,43 +1727,43 @@ function va({ value: e, onChange: t }) {
1464
1727
  ) })
1465
1728
  ] });
1466
1729
  }
1467
- const ke = () => ({ label: "", color: "#4a90d9", shape: "square" }), re = 8, Ce = "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";
1468
- function Na({ value: e, onChange: t, styles: i }) {
1469
- const r = (e == null ? void 0 : e.entries) ?? [], n = (e == null ? void 0 : e.displayMode) ?? "simple", o = Ee(() => {
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(() => {
1470
1733
  if (!i || i.length === 0) return null;
1471
1734
  const c = [];
1472
- let u = "simple", s = null;
1473
- for (const v of i) {
1474
- const N = na(v), S = pa(v);
1475
- if (W(N)) {
1476
- const x = ia(N);
1477
- if (!x) continue;
1478
- const P = ra(N).map((C) => ({ label: C.label, color: C.color, shape: S }));
1479
- c.push(...P), x === "interpolate" ? (u = "gradient", s || (s = la(N))) : u === "simple" && (u = "categorical");
1480
- } else typeof N == "string" && c.push({ label: v.type, color: N, shape: S });
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 });
1481
1744
  }
1482
- return c.length === 0 ? null : { entries: c, mode: u, property: s };
1745
+ return c.length === 0 ? null : { entries: c, mode: u, property: d };
1483
1746
  }, [i]), p = () => {
1484
- t({ ...e, entries: [...r, ke()] });
1485
- }, b = (c, u) => {
1486
- const s = r.map((v, N) => N === c ? u : v);
1487
- t({ ...e, entries: s });
1488
- }, m = (c) => {
1489
- const u = r.filter((s, v) => v !== c);
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 });
1751
+ }, s = (c) => {
1752
+ const u = r.filter((d, N) => N !== c);
1490
1753
  t(u.length > 0 ? { ...e, entries: u } : void 0);
1491
- }, w = (c) => {
1492
- t(c ? { entries: [ke()] } : void 0);
1493
- }, d = () => {
1754
+ }, g = (c) => {
1755
+ t(c ? { entries: [Ie()] } : void 0);
1756
+ }, y = () => {
1494
1757
  o && t({
1495
1758
  entries: o.entries,
1496
1759
  displayMode: o.mode,
1497
1760
  ...o.mode === "gradient" && o.property ? { gradientProperty: o.property } : {},
1498
1761
  ...o.mode === "categorical" ? { showLabelsCollapsed: !1 } : {}
1499
1762
  });
1500
- }, f = (c) => {
1763
+ }, w = (c) => {
1501
1764
  if (!e) return;
1502
1765
  const u = { ...e, displayMode: c };
1503
- c !== "categorical" && delete u.showLabelsCollapsed, c !== "gradient" && delete u.gradientProperty, t(u);
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);
1504
1767
  };
1505
1768
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1506
1769
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
@@ -1510,7 +1773,7 @@ function Na({ value: e, onChange: t, styles: i }) {
1510
1773
  type: "checkbox",
1511
1774
  id: "legend-enabled",
1512
1775
  checked: e !== void 0,
1513
- onChange: (c) => w(c.target.checked),
1776
+ onChange: (c) => g(c.target.checked),
1514
1777
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1515
1778
  }
1516
1779
  ),
@@ -1519,7 +1782,7 @@ function Na({ value: e, onChange: t, styles: i }) {
1519
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: [
1520
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"}` }),
1521
1784
  /* @__PURE__ */ l("div", { className: "mapui:mt-2 mapui:flex mapui:flex-wrap mapui:items-center mapui:gap-1.5", children: [
1522
- o.entries.slice(0, re).map((c, u) => /* @__PURE__ */ l(
1785
+ o.entries.slice(0, me).map((c, u) => /* @__PURE__ */ l(
1523
1786
  "div",
1524
1787
  {
1525
1788
  className: "mapui:flex mapui:items-center mapui:gap-1",
@@ -1537,9 +1800,9 @@ function Na({ value: e, onChange: t, styles: i }) {
1537
1800
  },
1538
1801
  `${c.label}-${u}`
1539
1802
  )),
1540
- o.entries.length > re && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-blue-600", children: [
1803
+ o.entries.length > me && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-blue-600", children: [
1541
1804
  "+",
1542
- o.entries.length - re,
1805
+ o.entries.length - me,
1543
1806
  " more"
1544
1807
  ] })
1545
1808
  ] }),
@@ -1547,13 +1810,13 @@ function Na({ value: e, onChange: t, styles: i }) {
1547
1810
  "button",
1548
1811
  {
1549
1812
  type: "button",
1550
- onClick: d,
1813
+ onClick: y,
1551
1814
  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",
1552
1815
  children: "Generate from Style"
1553
1816
  }
1554
1817
  )
1555
1818
  ] }),
1556
- e !== void 0 && /* @__PURE__ */ l(q, { children: [
1819
+ e !== void 0 && /* @__PURE__ */ l(U, { children: [
1557
1820
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1558
1821
  /* @__PURE__ */ a("label", { htmlFor: "legend-display-mode", className: "mapui:text-sm mapui:text-gray-700", children: "Display Mode" }),
1559
1822
  /* @__PURE__ */ l(
@@ -1561,8 +1824,8 @@ function Na({ value: e, onChange: t, styles: i }) {
1561
1824
  {
1562
1825
  id: "legend-display-mode",
1563
1826
  value: n,
1564
- onChange: (c) => f(c.target.value),
1565
- className: Ce,
1827
+ onChange: (c) => w(c.target.value),
1828
+ className: Fe,
1566
1829
  children: [
1567
1830
  /* @__PURE__ */ a("option", { value: "simple", children: "Simple" }),
1568
1831
  /* @__PURE__ */ a("option", { value: "categorical", children: "Categorical" }),
@@ -1584,8 +1847,34 @@ function Na({ value: e, onChange: t, styles: i }) {
1584
1847
  ),
1585
1848
  /* @__PURE__ */ a("label", { htmlFor: "legend-show-labels-collapsed", className: "mapui:text-sm mapui:text-gray-700", children: "Show labels in collapsed view" })
1586
1849
  ] }),
1850
+ (n === "categorical" || n === "gradient") && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1851
+ /* @__PURE__ */ a(
1852
+ "input",
1853
+ {
1854
+ type: "checkbox",
1855
+ id: "legend-show-color-bar",
1856
+ checked: e.showColorBar !== !1,
1857
+ onChange: (c) => t({ ...e, showColorBar: c.target.checked }),
1858
+ className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1859
+ }
1860
+ ),
1861
+ /* @__PURE__ */ a("label", { htmlFor: "legend-show-color-bar", className: "mapui:text-sm mapui:text-gray-700", children: "Show color bar" })
1862
+ ] }),
1863
+ (n === "categorical" || n === "gradient") && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1864
+ /* @__PURE__ */ a(
1865
+ "input",
1866
+ {
1867
+ type: "checkbox",
1868
+ id: "legend-show-disclosure-arrow",
1869
+ checked: e.showDisclosureArrow !== !1,
1870
+ onChange: (c) => t({ ...e, showDisclosureArrow: c.target.checked }),
1871
+ className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1872
+ }
1873
+ ),
1874
+ /* @__PURE__ */ a("label", { htmlFor: "legend-show-disclosure-arrow", className: "mapui:text-sm mapui:text-gray-700", children: "Show disclosure arrow" })
1875
+ ] }),
1587
1876
  n === "gradient" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1588
- /* @__PURE__ */ a("label", { htmlFor: "legend-gradient-property", className: "mapui:text-sm mapui:text-gray-700", children: "Gradient Property" }),
1877
+ /* @__PURE__ */ a("label", { htmlFor: "legend-gradient-property", className: "mapui:text-sm mapui:text-gray-700", children: "Gradient Label" }),
1589
1878
  /* @__PURE__ */ a(
1590
1879
  "input",
1591
1880
  {
@@ -1593,8 +1882,8 @@ function Na({ value: e, onChange: t, styles: i }) {
1593
1882
  id: "legend-gradient-property",
1594
1883
  value: e.gradientProperty ?? "",
1595
1884
  onChange: (c) => t({ ...e, gradientProperty: c.target.value || void 0 }),
1596
- placeholder: "e.g. POP_EST",
1597
- className: Ce
1885
+ placeholder: "e.g. Population",
1886
+ className: Fe
1598
1887
  }
1599
1888
  )
1600
1889
  ] }),
@@ -1612,17 +1901,17 @@ function Na({ value: e, onChange: t, styles: i }) {
1612
1901
  "button",
1613
1902
  {
1614
1903
  type: "button",
1615
- onClick: () => m(u),
1904
+ onClick: () => s(u),
1616
1905
  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",
1617
1906
  children: "Remove"
1618
1907
  }
1619
1908
  )
1620
1909
  ] }),
1621
1910
  /* @__PURE__ */ a(
1622
- va,
1911
+ ja,
1623
1912
  {
1624
1913
  value: c,
1625
- onChange: (s) => b(u, s)
1914
+ onChange: (d) => x(u, d)
1626
1915
  }
1627
1916
  )
1628
1917
  ]
@@ -1643,7 +1932,7 @@ function Na({ value: e, onChange: t, styles: i }) {
1643
1932
  "button",
1644
1933
  {
1645
1934
  type: "button",
1646
- onClick: d,
1935
+ onClick: y,
1647
1936
  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",
1648
1937
  children: [
1649
1938
  "Populate from Style (",
@@ -1656,47 +1945,47 @@ function Na({ value: e, onChange: t, styles: i }) {
1656
1945
  ] })
1657
1946
  ] });
1658
1947
  }
1659
- function Se({
1948
+ function Me({
1660
1949
  options: e,
1661
1950
  onChange: t,
1662
1951
  placeholder: i,
1663
1952
  className: r
1664
1953
  }) {
1665
- const [n, o] = A(() => (e == null ? void 0 : e.join(", ")) ?? "");
1666
- return X(() => {
1954
+ const [n, o] = S(() => (e == null ? void 0 : e.join(", ")) ?? "");
1955
+ return V(() => {
1667
1956
  o((e == null ? void 0 : e.join(", ")) ?? "");
1668
1957
  }, [e == null ? void 0 : e.join(",")]), /* @__PURE__ */ a(
1669
1958
  "input",
1670
1959
  {
1671
1960
  type: "text",
1672
1961
  value: n,
1673
- onChange: (b) => o(b.target.value),
1962
+ onChange: (x) => o(x.target.value),
1674
1963
  onBlur: () => {
1675
- const b = n.trim(), m = b ? b.split(",").map((w) => w.trim()).filter(Boolean) : void 0;
1676
- t(m), o((m == null ? void 0 : m.join(", ")) ?? "");
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(", ")) ?? "");
1677
1966
  },
1678
1967
  placeholder: i,
1679
1968
  className: r
1680
1969
  }
1681
1970
  );
1682
1971
  }
1683
- const R = "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", ka = {
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 = {
1684
1973
  text: { type: "text", property: "", label: "", autocomplete: !1 },
1685
1974
  number: { type: "number", property: "", label: "", inputMode: "input", operator: "eq" },
1686
1975
  datetime: { type: "datetime", property: "", label: "", range: !1 },
1687
1976
  select: { type: "select", property: "", label: "" }
1688
1977
  };
1689
- function Ca({ value: e, onChange: t, availableProperties: i }) {
1978
+ function Ba({ value: e, onChange: t, availableProperties: i }) {
1690
1979
  const r = (p) => {
1691
- t({ ...ka[p], property: e.property, label: e.label });
1980
+ t({ ...Ra[p], property: e.property, label: e.label });
1692
1981
  }, n = (p) => t({ ...e, ...p }), o = i && i.length > 0;
1693
1982
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1694
- /* @__PURE__ */ a(D, { label: "Field Type", children: /* @__PURE__ */ l(
1983
+ /* @__PURE__ */ a(C, { label: "Field Type", children: /* @__PURE__ */ l(
1695
1984
  "select",
1696
1985
  {
1697
1986
  value: e.type,
1698
1987
  onChange: (p) => r(p.target.value),
1699
- className: R,
1988
+ className: $,
1700
1989
  children: [
1701
1990
  /* @__PURE__ */ a("option", { value: "text", children: "Text" }),
1702
1991
  /* @__PURE__ */ a("option", { value: "number", children: "Number" }),
@@ -1705,12 +1994,12 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1705
1994
  ]
1706
1995
  }
1707
1996
  ) }),
1708
- /* @__PURE__ */ a(D, { label: "Property", required: !0, children: o ? /* @__PURE__ */ l(
1997
+ /* @__PURE__ */ a(C, { label: "Property", required: !0, children: o ? /* @__PURE__ */ l(
1709
1998
  "select",
1710
1999
  {
1711
2000
  value: e.property,
1712
2001
  onChange: (p) => n({ property: p.target.value }),
1713
- className: R,
2002
+ className: $,
1714
2003
  children: [
1715
2004
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
1716
2005
  i.map((p) => /* @__PURE__ */ a("option", { value: p.name, children: p.title ?? p.name }, p.name))
@@ -1723,30 +2012,30 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1723
2012
  value: e.property,
1724
2013
  onChange: (p) => n({ property: p.target.value }),
1725
2014
  placeholder: "e.g. name",
1726
- className: R
2015
+ className: $
1727
2016
  }
1728
2017
  ) }),
1729
- /* @__PURE__ */ a(D, { label: "Label", children: /* @__PURE__ */ a(
2018
+ /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
1730
2019
  "input",
1731
2020
  {
1732
2021
  type: "text",
1733
2022
  value: e.label,
1734
2023
  onChange: (p) => n({ label: p.target.value }),
1735
2024
  placeholder: "Display label",
1736
- className: R
2025
+ className: $
1737
2026
  }
1738
2027
  ) }),
1739
- /* @__PURE__ */ a(D, { label: "Placeholder", children: /* @__PURE__ */ a(
2028
+ /* @__PURE__ */ a(C, { label: "Placeholder", children: /* @__PURE__ */ a(
1740
2029
  "input",
1741
2030
  {
1742
2031
  type: "text",
1743
2032
  value: e.placeholder ?? "",
1744
2033
  onChange: (p) => n({ placeholder: p.target.value || void 0 }),
1745
2034
  placeholder: "Input placeholder text",
1746
- className: R
2035
+ className: $
1747
2036
  }
1748
2037
  ) }),
1749
- e.type === "text" && /* @__PURE__ */ l(q, { children: [
2038
+ e.type === "text" && /* @__PURE__ */ l(U, { children: [
1750
2039
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1751
2040
  /* @__PURE__ */ a(
1752
2041
  "input",
@@ -1773,18 +2062,31 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1773
2062
  ),
1774
2063
  /* @__PURE__ */ a("label", { htmlFor: "text-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
1775
2064
  ] }),
1776
- /* @__PURE__ */ a(D, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
1777
- Se,
2065
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2066
+ /* @__PURE__ */ a(
2067
+ "input",
2068
+ {
2069
+ type: "checkbox",
2070
+ id: "text-zoomTo",
2071
+ checked: e.zoomTo ?? !1,
2072
+ onChange: (p) => t({ ...e, zoomTo: p.target.checked }),
2073
+ className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2074
+ }
2075
+ ),
2076
+ /* @__PURE__ */ a("label", { htmlFor: "text-zoomTo", className: "mapui:text-sm mapui:text-gray-700", children: "Zoom to Result" })
2077
+ ] }),
2078
+ /* @__PURE__ */ a(C, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
2079
+ Me,
1778
2080
  {
1779
2081
  options: e.options,
1780
2082
  onChange: (p) => t({ ...e, options: p }),
1781
2083
  placeholder: "option1, option2",
1782
- className: R
2084
+ className: $
1783
2085
  }
1784
2086
  ) })
1785
2087
  ] }),
1786
- e.type === "number" && /* @__PURE__ */ l(q, { children: [
1787
- /* @__PURE__ */ a(D, { label: "Input Mode", children: /* @__PURE__ */ l(
2088
+ e.type === "number" && /* @__PURE__ */ l(U, { children: [
2089
+ /* @__PURE__ */ a(C, { label: "Input Mode", children: /* @__PURE__ */ l(
1788
2090
  "select",
1789
2091
  {
1790
2092
  value: e.inputMode ?? "input",
@@ -1792,14 +2094,14 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1792
2094
  ...e,
1793
2095
  inputMode: p.target.value
1794
2096
  }),
1795
- className: R,
2097
+ className: $,
1796
2098
  children: [
1797
2099
  /* @__PURE__ */ a("option", { value: "input", children: "Input" }),
1798
2100
  /* @__PURE__ */ a("option", { value: "slider", children: "Slider" })
1799
2101
  ]
1800
2102
  }
1801
2103
  ) }),
1802
- /* @__PURE__ */ a(D, { label: "Operator", children: /* @__PURE__ */ l(
2104
+ /* @__PURE__ */ a(C, { label: "Operator", children: /* @__PURE__ */ l(
1803
2105
  "select",
1804
2106
  {
1805
2107
  value: e.operator ?? "eq",
@@ -1807,7 +2109,7 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1807
2109
  ...e,
1808
2110
  operator: p.target.value
1809
2111
  }),
1810
- className: R,
2112
+ className: $,
1811
2113
  children: [
1812
2114
  /* @__PURE__ */ a("option", { value: "eq", children: "Equal (=)" }),
1813
2115
  /* @__PURE__ */ a("option", { value: "gt", children: "Greater Than (>)" }),
@@ -1818,8 +2120,36 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1818
2120
  ]
1819
2121
  }
1820
2122
  ) }),
2123
+ /* @__PURE__ */ a(C, { label: "Operator Labels", children: /* @__PURE__ */ l(
2124
+ "select",
2125
+ {
2126
+ value: e.operatorLabelStyle ?? "symbol",
2127
+ onChange: (p) => t({
2128
+ ...e,
2129
+ operatorLabelStyle: p.target.value
2130
+ }),
2131
+ className: $,
2132
+ children: [
2133
+ /* @__PURE__ */ a("option", { value: "symbol", children: "Symbols (=, >, <)" }),
2134
+ /* @__PURE__ */ a("option", { value: "word", children: "Words (equal to, greater than)" })
2135
+ ]
2136
+ }
2137
+ ) }),
2138
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2139
+ /* @__PURE__ */ a(
2140
+ "input",
2141
+ {
2142
+ type: "checkbox",
2143
+ id: "number-show-range",
2144
+ checked: e.showRange ?? !1,
2145
+ onChange: (p) => t({ ...e, showRange: p.target.checked }),
2146
+ className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2147
+ }
2148
+ ),
2149
+ /* @__PURE__ */ a("label", { htmlFor: "number-show-range", className: "mapui:text-sm mapui:text-gray-700", children: "Show Range on Slider" })
2150
+ ] }),
1821
2151
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-3 mapui:gap-2", children: [
1822
- /* @__PURE__ */ a(D, { label: "Min", children: /* @__PURE__ */ a(
2152
+ /* @__PURE__ */ a(C, { label: "Min", children: /* @__PURE__ */ a(
1823
2153
  "input",
1824
2154
  {
1825
2155
  type: "number",
@@ -1828,10 +2158,10 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1828
2158
  ...e,
1829
2159
  min: p.target.value ? parseFloat(p.target.value) : void 0
1830
2160
  }),
1831
- className: R
2161
+ className: $
1832
2162
  }
1833
2163
  ) }),
1834
- /* @__PURE__ */ a(D, { label: "Max", children: /* @__PURE__ */ a(
2164
+ /* @__PURE__ */ a(C, { label: "Max", children: /* @__PURE__ */ a(
1835
2165
  "input",
1836
2166
  {
1837
2167
  type: "number",
@@ -1840,10 +2170,10 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1840
2170
  ...e,
1841
2171
  max: p.target.value ? parseFloat(p.target.value) : void 0
1842
2172
  }),
1843
- className: R
2173
+ className: $
1844
2174
  }
1845
2175
  ) }),
1846
- /* @__PURE__ */ a(D, { label: "Step", children: /* @__PURE__ */ a(
2176
+ /* @__PURE__ */ a(C, { label: "Step", children: /* @__PURE__ */ a(
1847
2177
  "input",
1848
2178
  {
1849
2179
  type: "number",
@@ -1852,7 +2182,7 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1852
2182
  ...e,
1853
2183
  step: p.target.value ? parseFloat(p.target.value) : void 0
1854
2184
  }),
1855
- className: R
2185
+ className: $
1856
2186
  }
1857
2187
  ) })
1858
2188
  ] })
@@ -1870,7 +2200,7 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1870
2200
  ),
1871
2201
  /* @__PURE__ */ a("label", { htmlFor: "datetime-range", className: "mapui:text-sm mapui:text-gray-700", children: "Date Range" })
1872
2202
  ] }),
1873
- e.type === "select" && /* @__PURE__ */ l(q, { children: [
2203
+ e.type === "select" && /* @__PURE__ */ l(U, { children: [
1874
2204
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1875
2205
  /* @__PURE__ */ a(
1876
2206
  "input",
@@ -1884,52 +2214,65 @@ function Ca({ value: e, onChange: t, availableProperties: i }) {
1884
2214
  ),
1885
2215
  /* @__PURE__ */ a("label", { htmlFor: "select-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
1886
2216
  ] }),
1887
- /* @__PURE__ */ a(D, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
1888
- Se,
2217
+ /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2218
+ /* @__PURE__ */ a(
2219
+ "input",
2220
+ {
2221
+ type: "checkbox",
2222
+ id: "select-zoomTo",
2223
+ checked: e.zoomTo ?? !1,
2224
+ onChange: (p) => t({ ...e, zoomTo: p.target.checked }),
2225
+ className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2226
+ }
2227
+ ),
2228
+ /* @__PURE__ */ a("label", { htmlFor: "select-zoomTo", className: "mapui:text-sm mapui:text-gray-700", children: "Zoom to Result" })
2229
+ ] }),
2230
+ /* @__PURE__ */ a(C, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
2231
+ Me,
1889
2232
  {
1890
2233
  options: e.options,
1891
2234
  onChange: (p) => t({ ...e, options: p }),
1892
2235
  placeholder: "option1, option2",
1893
- className: R
2236
+ className: $
1894
2237
  }
1895
2238
  ) })
1896
2239
  ] })
1897
2240
  ] });
1898
2241
  }
1899
- const Sa = () => ({
2242
+ const Ua = () => ({
1900
2243
  type: "text",
1901
2244
  property: "",
1902
2245
  label: "",
1903
2246
  autocomplete: !1
1904
2247
  });
1905
- function Da({ fields: e, onChange: t, availableProperties: i }) {
1906
- const [r, n] = A(null), o = () => {
1907
- const d = [...e, Sa()];
1908
- t(d), n(d.length - 1);
1909
- }, p = (d, f) => {
1910
- t(e.map((c, u) => u === d ? f : c));
1911
- }, b = (d) => {
1912
- t(e.filter((f, c) => c !== d)), n(null);
1913
- }, m = (d) => {
1914
- if (d === 0) return;
1915
- const f = [...e];
1916
- [f[d - 1], f[d]] = [f[d], f[d - 1]], t(f), n(d - 1);
1917
- }, w = (d) => {
1918
- if (d === e.length - 1) return;
1919
- const f = [...e];
1920
- [f[d], f[d + 1]] = [f[d + 1], f[d]], t(f), n(d + 1);
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);
1921
2264
  };
1922
2265
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1923
2266
  e.length === 0 && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No search fields configured." }),
1924
- /* @__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, f) => /* @__PURE__ */ l("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
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: [
1925
2268
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:px-3 mapui:py-2", children: [
1926
2269
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
1927
2270
  /* @__PURE__ */ a(
1928
2271
  "button",
1929
2272
  {
1930
2273
  type: "button",
1931
- onClick: () => m(f),
1932
- disabled: f === 0,
2274
+ onClick: () => s(w),
2275
+ disabled: w === 0,
1933
2276
  "aria-label": "Move up",
1934
2277
  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",
1935
2278
  children: "▲"
@@ -1939,8 +2282,8 @@ function Da({ fields: e, onChange: t, availableProperties: i }) {
1939
2282
  "button",
1940
2283
  {
1941
2284
  type: "button",
1942
- onClick: () => w(f),
1943
- disabled: f === e.length - 1,
2285
+ onClick: () => g(w),
2286
+ disabled: w === e.length - 1,
1944
2287
  "aria-label": "Move down",
1945
2288
  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",
1946
2289
  children: "▼"
@@ -1951,11 +2294,11 @@ function Da({ fields: e, onChange: t, availableProperties: i }) {
1951
2294
  "button",
1952
2295
  {
1953
2296
  type: "button",
1954
- onClick: () => n(r === f ? null : f),
2297
+ onClick: () => n(r === w ? null : w),
1955
2298
  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",
1956
2299
  children: [
1957
- /* @__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 }),
1958
- d.label || d.property || "Untitled field"
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"
1959
2302
  ]
1960
2303
  }
1961
2304
  ),
@@ -1963,22 +2306,22 @@ function Da({ fields: e, onChange: t, availableProperties: i }) {
1963
2306
  "button",
1964
2307
  {
1965
2308
  type: "button",
1966
- onClick: () => b(f),
2309
+ onClick: () => x(w),
1967
2310
  "aria-label": "Remove field",
1968
2311
  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",
1969
2312
  children: "Remove"
1970
2313
  }
1971
2314
  )
1972
2315
  ] }),
1973
- r === f && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
1974
- Ca,
2316
+ r === w && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2317
+ Ba,
1975
2318
  {
1976
- value: d,
1977
- onChange: (c) => p(f, c),
2319
+ value: y,
2320
+ onChange: (c) => p(w, c),
1978
2321
  availableProperties: i
1979
2322
  }
1980
2323
  ) })
1981
- ] }, f)) }),
2324
+ ] }, w)) }),
1982
2325
  /* @__PURE__ */ a(
1983
2326
  "button",
1984
2327
  {
@@ -1990,14 +2333,14 @@ function Da({ fields: e, onChange: t, availableProperties: i }) {
1990
2333
  )
1991
2334
  ] });
1992
2335
  }
1993
- function Ta(e) {
2336
+ function za(e) {
1994
2337
  return Object.entries(e).map(([t, i]) => ({
1995
2338
  key: t,
1996
2339
  label: i.label ?? "",
1997
2340
  visible: i.visible ?? !0
1998
2341
  }));
1999
2342
  }
2000
- function La(e) {
2343
+ function Ga(e) {
2001
2344
  const t = {};
2002
2345
  for (const i of e)
2003
2346
  t[i.key] = {
@@ -2006,36 +2349,36 @@ function La(e) {
2006
2349
  };
2007
2350
  return t;
2008
2351
  }
2009
- const le = "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";
2010
- function Aa({ value: e, onChange: t, availableProperties: i }) {
2011
- const r = Ta(e), n = i && i.length > 0, o = (u) => t(La(u)), p = () => {
2352
+ 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 = () => {
2012
2355
  o([...r, { key: "", label: "", visible: !0 }]);
2013
- }, b = (u) => {
2014
- o(r.filter((s, v) => v !== u));
2015
- }, m = (u, s) => {
2016
- o(r.map((v, N) => N === u ? { ...v, ...s } : v));
2017
- }, w = (u, s) => {
2018
- const v = i == null ? void 0 : i.find((S) => S.name === s), N = (v == null ? void 0 : v.title) ?? r[u].label;
2019
- o(r.map((S, x) => x === u ? { ...S, key: s, label: N } : S));
2020
- }, d = (u) => {
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) => {
2021
2364
  if (u === 0) return;
2022
- const s = [...r];
2023
- [s[u - 1], s[u]] = [s[u], s[u - 1]], o(s);
2024
- }, f = (u) => {
2365
+ const d = [...r];
2366
+ [d[u - 1], d[u]] = [d[u], d[u - 1]], o(d);
2367
+ }, w = (u) => {
2025
2368
  if (u === r.length - 1) return;
2026
- const s = [...r];
2027
- [s[u], s[u + 1]] = [s[u + 1], s[u]], o(s);
2369
+ const d = [...r];
2370
+ [d[u], d[u + 1]] = [d[u + 1], d[u]], o(d);
2028
2371
  }, c = () => {
2029
2372
  if (!i) return;
2030
- const u = i.map((s) => ({
2031
- key: s.name,
2032
- label: s.title ?? "",
2373
+ const u = i.map((d) => ({
2374
+ key: d.name,
2375
+ label: d.title ?? "",
2033
2376
  visible: !0
2034
2377
  }));
2035
2378
  o(u);
2036
2379
  };
2037
2380
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2038
- r.length === 0 ? /* @__PURE__ */ l(q, { children: [
2381
+ r.length === 0 ? /* @__PURE__ */ l(U, { children: [
2039
2382
  /* @__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." }),
2040
2383
  n && /* @__PURE__ */ a(
2041
2384
  "button",
@@ -2046,20 +2389,20 @@ function Aa({ value: e, onChange: t, availableProperties: i }) {
2046
2389
  children: "Populate from API metadata"
2047
2390
  }
2048
2391
  )
2049
- ] }) : /* @__PURE__ */ l(q, { children: [
2392
+ ] }) : /* @__PURE__ */ l(U, { children: [
2050
2393
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:items-center mapui:gap-2 mapui:px-8", style: { gridTemplateColumns: "1fr 1fr auto" }, children: [
2051
- /* @__PURE__ */ a(D, { label: "Property Key", children: /* @__PURE__ */ a("span", {}) }),
2052
- /* @__PURE__ */ a(D, { label: "Display Label", children: /* @__PURE__ */ a("span", {}) }),
2394
+ /* @__PURE__ */ a(C, { label: "Property Key", children: /* @__PURE__ */ a("span", {}) }),
2395
+ /* @__PURE__ */ a(C, { label: "Display Label", children: /* @__PURE__ */ a("span", {}) }),
2053
2396
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: "Visible" })
2054
2397
  ] }),
2055
- /* @__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, s) => /* @__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: [
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: [
2056
2399
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
2057
2400
  /* @__PURE__ */ a(
2058
2401
  "button",
2059
2402
  {
2060
2403
  type: "button",
2061
- onClick: () => d(s),
2062
- disabled: s === 0,
2404
+ onClick: () => y(d),
2405
+ disabled: d === 0,
2063
2406
  "aria-label": "Move up",
2064
2407
  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",
2065
2408
  children: "▲"
@@ -2069,8 +2412,8 @@ function Aa({ value: e, onChange: t, availableProperties: i }) {
2069
2412
  "button",
2070
2413
  {
2071
2414
  type: "button",
2072
- onClick: () => f(s),
2073
- disabled: s === r.length - 1,
2415
+ onClick: () => w(d),
2416
+ disabled: d === r.length - 1,
2074
2417
  "aria-label": "Move down",
2075
2418
  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",
2076
2419
  children: "▼"
@@ -2082,12 +2425,12 @@ function Aa({ value: e, onChange: t, availableProperties: i }) {
2082
2425
  "select",
2083
2426
  {
2084
2427
  value: u.key,
2085
- onChange: (v) => w(s, v.target.value),
2428
+ onChange: (N) => g(d, N.target.value),
2086
2429
  "aria-label": "Property key",
2087
- className: le,
2430
+ className: se,
2088
2431
  children: [
2089
2432
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
2090
- i.map((v) => /* @__PURE__ */ a("option", { value: v.name, children: v.title ?? v.name }, v.name))
2433
+ i.map((N) => /* @__PURE__ */ a("option", { value: N.name, children: N.title ?? N.name }, N.name))
2091
2434
  ]
2092
2435
  }
2093
2436
  ) : /* @__PURE__ */ a(
@@ -2095,10 +2438,10 @@ function Aa({ value: e, onChange: t, availableProperties: i }) {
2095
2438
  {
2096
2439
  type: "text",
2097
2440
  value: u.key,
2098
- onChange: (v) => m(s, { key: v.target.value }),
2441
+ onChange: (N) => s(d, { key: N.target.value }),
2099
2442
  placeholder: "property_name",
2100
2443
  "aria-label": "Property key",
2101
- className: le
2444
+ className: se
2102
2445
  }
2103
2446
  ),
2104
2447
  /* @__PURE__ */ a(
@@ -2106,10 +2449,10 @@ function Aa({ value: e, onChange: t, availableProperties: i }) {
2106
2449
  {
2107
2450
  type: "text",
2108
2451
  value: u.label,
2109
- onChange: (v) => m(s, { label: v.target.value }),
2452
+ onChange: (N) => s(d, { label: N.target.value }),
2110
2453
  placeholder: "Friendly name",
2111
2454
  "aria-label": "Display label",
2112
- className: le
2455
+ className: se
2113
2456
  }
2114
2457
  ),
2115
2458
  /* @__PURE__ */ a(
@@ -2117,7 +2460,7 @@ function Aa({ value: e, onChange: t, availableProperties: i }) {
2117
2460
  {
2118
2461
  type: "checkbox",
2119
2462
  checked: u.visible,
2120
- onChange: (v) => m(s, { visible: v.target.checked }),
2463
+ onChange: (N) => s(d, { visible: N.target.checked }),
2121
2464
  "aria-label": "Visible",
2122
2465
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2123
2466
  }
@@ -2126,14 +2469,14 @@ function Aa({ value: e, onChange: t, availableProperties: i }) {
2126
2469
  "button",
2127
2470
  {
2128
2471
  type: "button",
2129
- onClick: () => b(s),
2472
+ onClick: () => x(d),
2130
2473
  "aria-label": "Remove property",
2131
2474
  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",
2132
2475
  children: "Remove"
2133
2476
  }
2134
2477
  )
2135
2478
  ] })
2136
- ] }, s)) })
2479
+ ] }, d)) })
2137
2480
  ] }),
2138
2481
  /* @__PURE__ */ a(
2139
2482
  "button",
@@ -2146,40 +2489,40 @@ function Aa({ value: e, onChange: t, availableProperties: i }) {
2146
2489
  )
2147
2490
  ] });
2148
2491
  }
2149
- const je = /geojson\.org\/schema\/(\w+)\.json/;
2150
- function Ia(e) {
2151
- return !!e.$ref && je.test(e.$ref);
2492
+ const We = /geojson\.org\/schema\/(\w+)\.json/;
2493
+ function Va(e) {
2494
+ return !!e.$ref && We.test(e.$ref);
2152
2495
  }
2153
- function $e(e) {
2154
- const t = je.exec(e);
2496
+ function Ve(e) {
2497
+ const t = We.exec(e);
2155
2498
  return t ? t[1] : null;
2156
2499
  }
2157
- function Re(e) {
2500
+ function _e(e) {
2158
2501
  const t = e.toLowerCase();
2159
2502
  return t.includes("polygon") ? "fill" : t.includes("linestring") ? "line" : t.includes("point") ? "circle" : null;
2160
2503
  }
2161
- function Be(e) {
2504
+ function ye(e) {
2162
2505
  const t = e.toLowerCase();
2163
- return t.includes("polygon") ? ["fill"] : t.includes("linestring") ? ["line"] : t.includes("point") ? ["circle", "symbol"] : [];
2506
+ return t.includes("polygon") ? ["fill", "line"] : t.includes("linestring") ? ["line"] : t.includes("point") ? ["circle", "symbol"] : [];
2164
2507
  }
2165
- function Ea(e) {
2508
+ function _a(e) {
2166
2509
  for (const t of Object.values(e.properties))
2167
2510
  if (t.$ref) {
2168
- const i = $e(t.$ref);
2169
- if (i) return Re(i);
2511
+ const i = Ve(t.$ref);
2512
+ if (i) return _e(i);
2170
2513
  }
2171
2514
  return null;
2172
2515
  }
2173
- function qe(e) {
2516
+ function Ye(e) {
2174
2517
  for (const t of Object.values(e.properties))
2175
2518
  if (t.$ref) {
2176
- const i = $e(t.$ref);
2177
- if (i) return Be(i);
2519
+ const i = Ve(t.$ref);
2520
+ if (i) return ye(i);
2178
2521
  }
2179
2522
  return [];
2180
2523
  }
2181
- function Fa(e) {
2182
- return Object.entries(e.properties).filter(([, t]) => !Ia(t)).map(([t, i]) => ({
2524
+ function Ya(e) {
2525
+ return Object.entries(e.properties).filter(([, t]) => !Va(t)).map(([t, i]) => ({
2183
2526
  name: t,
2184
2527
  title: i.title,
2185
2528
  type: i.type,
@@ -2189,14 +2532,14 @@ function Fa(e) {
2189
2532
  maximum: i.maximum
2190
2533
  }));
2191
2534
  }
2192
- function Ue(e) {
2535
+ function Xe(e) {
2193
2536
  var i;
2194
2537
  const t = /* @__PURE__ */ new Set();
2195
2538
  for (const r of e)
2196
2539
  (i = r.geometry) != null && i.type && t.add(r.geometry.type);
2197
2540
  return Array.from(t);
2198
2541
  }
2199
- function Pa(e) {
2542
+ function Xa(e) {
2200
2543
  const t = /* @__PURE__ */ new Set();
2201
2544
  for (const n of e) {
2202
2545
  const o = n.toLowerCase();
@@ -2217,132 +2560,138 @@ function Pa(e) {
2217
2560
  ...i ? { geometryFilter: ["Point", "MultiPoint"] } : {}
2218
2561
  }), r;
2219
2562
  }
2220
- async function Ya(e, t) {
2563
+ async function mt(e, t) {
2221
2564
  var i, r;
2222
2565
  try {
2223
- const n = await Pe(e, t), o = Ea(n);
2566
+ const n = await qe(e, t), o = _a(n);
2224
2567
  if (o) return o;
2225
2568
  } catch {
2226
2569
  }
2227
2570
  try {
2228
- const o = (r = (i = (await se(e, t, { limit: 1 })).features[0]) == null ? void 0 : i.geometry) == null ? void 0 : r.type;
2229
- if (typeof o == "string") return Re(o);
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);
2230
2573
  } catch {
2231
2574
  }
2232
2575
  return null;
2233
2576
  }
2234
- async function Xa(e, t) {
2577
+ async function st(e, t) {
2235
2578
  try {
2236
- const i = await Pe(e, t), r = qe(i);
2579
+ const i = await qe(e, t), r = Ye(i);
2237
2580
  if (r.length > 0) return r;
2238
2581
  } catch {
2239
2582
  }
2240
2583
  try {
2241
- const i = await se(e, t, { limit: 20 }), r = Ue(i.features), n = /* @__PURE__ */ new Set();
2584
+ const i = await be(e, t, { limit: 20 }), r = Xe(i.features), n = /* @__PURE__ */ new Set();
2242
2585
  for (const o of r)
2243
- for (const p of Be(o))
2586
+ for (const p of ye(o))
2244
2587
  n.add(p);
2245
2588
  return Array.from(n);
2246
2589
  } catch {
2247
2590
  }
2248
2591
  return [];
2249
2592
  }
2250
- function Ha(e) {
2593
+ function ct(e) {
2251
2594
  return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (t) => t.toUpperCase());
2252
2595
  }
2253
- function Ma(e, t, i) {
2596
+ function Ha(e, t, i) {
2254
2597
  const r = [...e ?? []];
2255
2598
  return r[t] = i, r;
2256
2599
  }
2257
- function Oa(e, t) {
2600
+ function Ja(e, t) {
2258
2601
  return (e ?? []).filter((i, r) => r !== t);
2259
2602
  }
2260
- const V = "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";
2261
- function De({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2262
- var S;
2263
- const n = (x) => t({ ...e, ...x }), o = ue(e);
2603
+ const Y = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2604
+ function Pe({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2605
+ var j;
2606
+ const n = (m) => t({ ...e, ...m }), o = ie(e);
2264
2607
  o.current = e;
2265
- const p = ue(t);
2608
+ const p = ie(t);
2266
2609
  p.current = t;
2267
- const b = i.find((x) => x.id === e.sourceId), m = (b == null ? void 0 : b.url) ?? null, w = e.collection || null, { collections: d, loading: f } = Fe(m), { queryables: c, loading: u } = Ve(m, w), s = c ? Fa(c) : [], [v, N] = A([]);
2268
- return X(() => {
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(() => {
2269
2612
  if (!c) {
2270
- N([]);
2613
+ v([]), E([]);
2271
2614
  return;
2272
2615
  }
2273
- const x = (L) => {
2274
- var y;
2275
- const E = Pa(L);
2276
- N(E), E.length > 0 && !((y = o.current.styles) != null && y.length) && p.current({ ...o.current, styles: E });
2277
- }, P = qe(c);
2278
- if (P.length > 0) {
2279
- const L = [];
2280
- for (const E of P)
2281
- E === "fill" ? L.push("Polygon") : E === "line" ? L.push("LineString") : (E === "circle" || E === "symbol") && L.push("Point");
2282
- x(L);
2616
+ const m = (h, F) => {
2617
+ var f;
2618
+ const P = Xa(h);
2619
+ v(P), E(F), P.length > 0 && !((f = o.current.styles) != null && f.length) && p.current({ ...o.current, styles: P });
2620
+ }, I = Ye(c);
2621
+ if (I.length > 0) {
2622
+ const h = [];
2623
+ for (const F of I)
2624
+ F === "fill" ? h.push("Polygon") : F === "line" ? h.push("LineString") : (F === "circle" || F === "symbol") && h.push("Point");
2625
+ m(h, I);
2283
2626
  return;
2284
2627
  }
2285
- if (!m || !w) {
2286
- N([]);
2628
+ if (!s || !g) {
2629
+ v([]), E([]);
2287
2630
  return;
2288
2631
  }
2289
- let C = !1;
2290
- return se(m, w, { limit: 20 }).then((L) => {
2291
- if (C) return;
2292
- const E = Ue(L.features);
2293
- E.length > 0 ? x(E) : N([]);
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) {
2637
+ 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));
2641
+ } else
2642
+ v([]), E([]);
2294
2643
  }).catch(() => {
2295
- C || N([]);
2644
+ M || (v([]), E([]));
2296
2645
  }), () => {
2297
- C = !0;
2646
+ M = !0;
2298
2647
  };
2299
- }, [c, m, w]), X(() => {
2300
- N([]);
2301
- }, [m, w]), /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2648
+ }, [c, s, g]), V(() => {
2649
+ v([]), E([]);
2650
+ }, [s, g]), /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2302
2651
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
2303
- /* @__PURE__ */ a(D, { label: "Layer ID", required: !0, children: /* @__PURE__ */ a(
2652
+ /* @__PURE__ */ a(C, { label: "Layer ID", required: !0, children: /* @__PURE__ */ a(
2304
2653
  "input",
2305
2654
  {
2306
2655
  type: "text",
2307
2656
  value: e.id,
2308
- onChange: (x) => n({ id: x.target.value }),
2657
+ onChange: (m) => n({ id: m.target.value }),
2309
2658
  placeholder: "my-layer",
2310
- className: V
2659
+ className: Y
2311
2660
  }
2312
2661
  ) }),
2313
- /* @__PURE__ */ a(D, { label: "Label", children: /* @__PURE__ */ a(
2662
+ /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
2314
2663
  "input",
2315
2664
  {
2316
2665
  type: "text",
2317
2666
  value: e.label,
2318
- onChange: (x) => n({ label: x.target.value }),
2667
+ onChange: (m) => n({ label: m.target.value }),
2319
2668
  placeholder: "My Layer",
2320
- className: V
2669
+ className: Y
2321
2670
  }
2322
2671
  ) })
2323
2672
  ] }),
2324
- /* @__PURE__ */ a(D, { label: "Source", required: !0, children: /* @__PURE__ */ l(
2673
+ /* @__PURE__ */ a(C, { label: "Source", required: !0, children: /* @__PURE__ */ l(
2325
2674
  "select",
2326
2675
  {
2327
2676
  value: e.sourceId,
2328
- onChange: (x) => n({ sourceId: x.target.value }),
2329
- className: V,
2677
+ onChange: (m) => n({ sourceId: m.target.value }),
2678
+ className: Y,
2330
2679
  children: [
2331
2680
  /* @__PURE__ */ a("option", { value: "", children: "Select a source…" }),
2332
- i.map((x) => /* @__PURE__ */ a("option", { value: x.id, children: x.label ?? x.id }, x.id))
2681
+ i.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label ?? m.id }, m.id))
2333
2682
  ]
2334
2683
  }
2335
2684
  ) }),
2336
- /* @__PURE__ */ l(D, { label: "Collection", required: !0, children: [
2337
- d.length > 0 ? /* @__PURE__ */ l(
2685
+ /* @__PURE__ */ l(C, { label: "Collection", required: !0, children: [
2686
+ y.length > 0 ? /* @__PURE__ */ l(
2338
2687
  "select",
2339
2688
  {
2340
2689
  value: e.collection,
2341
- onChange: (x) => n({ collection: x.target.value }),
2342
- className: V,
2690
+ onChange: (m) => n({ collection: m.target.value }),
2691
+ className: Y,
2343
2692
  children: [
2344
2693
  /* @__PURE__ */ a("option", { value: "", children: "Select a collection…" }),
2345
- d.map((x) => /* @__PURE__ */ a("option", { value: x.id, children: x.title ?? x.id }, x.id))
2694
+ y.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.title ?? m.id }, m.id))
2346
2695
  ]
2347
2696
  }
2348
2697
  ) : /* @__PURE__ */ a(
@@ -2350,27 +2699,27 @@ function De({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2350
2699
  {
2351
2700
  type: "text",
2352
2701
  value: e.collection,
2353
- onChange: (x) => n({ collection: x.target.value }),
2354
- placeholder: f ? "Loading collections…" : "collection-id",
2355
- className: V
2702
+ onChange: (m) => n({ collection: m.target.value }),
2703
+ placeholder: w ? "Loading collections…" : "collection-id",
2704
+ className: Y
2356
2705
  }
2357
2706
  ),
2358
2707
  u && /* @__PURE__ */ a("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
2359
2708
  ] }),
2360
- /* @__PURE__ */ a(D, { label: "Data Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-4", children: ["vector-tiles", "geojson"].map((x) => /* @__PURE__ */ l("label", { className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-1.5", children: [
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: [
2361
2710
  /* @__PURE__ */ a(
2362
2711
  "input",
2363
2712
  {
2364
2713
  type: "radio",
2365
2714
  name: `data-mode-${e.id}`,
2366
- value: x,
2367
- checked: e.dataMode === x,
2368
- onChange: () => n({ dataMode: x }),
2715
+ value: m,
2716
+ checked: e.dataMode === m,
2717
+ onChange: () => n({ dataMode: m }),
2369
2718
  className: "mapui:accent-blue-600"
2370
2719
  }
2371
2720
  ),
2372
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:text-gray-700", children: x })
2373
- ] }, x)) }) }),
2721
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:text-gray-700", children: m })
2722
+ ] }, m)) }) }),
2374
2723
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2375
2724
  /* @__PURE__ */ a(
2376
2725
  "input",
@@ -2378,83 +2727,83 @@ function De({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2378
2727
  type: "checkbox",
2379
2728
  id: "layer-visible",
2380
2729
  checked: e.visible,
2381
- onChange: (x) => n({ visible: x.target.checked }),
2730
+ onChange: (m) => n({ visible: m.target.checked }),
2382
2731
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2383
2732
  }
2384
2733
  ),
2385
2734
  /* @__PURE__ */ a("label", { htmlFor: "layer-visible", className: "mapui:text-sm mapui:text-gray-700", children: "Visible by default" })
2386
2735
  ] }),
2387
- /* @__PURE__ */ a(_, { title: "Style", children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-4", children: [
2388
- (e.styles ?? [me]).map((x, P) => {
2389
- var C;
2736
+ /* @__PURE__ */ a(X, { title: "Style", children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-4", children: [
2737
+ (e.styles ?? [ge]).map((m, I) => {
2738
+ var M;
2390
2739
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2391
- x.geometryFilter && x.geometryFilter.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-wrap mapui:gap-1", children: x.geometryFilter.map((L) => /* @__PURE__ */ a(
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(
2392
2741
  "span",
2393
2742
  {
2394
2743
  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",
2395
- children: L
2744
+ children: h
2396
2745
  },
2397
- L
2746
+ h
2398
2747
  )) }),
2399
2748
  /* @__PURE__ */ a(
2400
- wa,
2749
+ Oa,
2401
2750
  {
2402
- value: x,
2403
- onChange: (L) => n({ styles: Ma(e.styles, P, L) }),
2404
- suggestedTypes: v.map((L) => L.type),
2751
+ value: m,
2752
+ onChange: (h) => n({ styles: Ha(e.styles, I, h) }),
2753
+ suggestedTypes: T,
2405
2754
  availableIcons: r,
2406
- availableProperties: s,
2407
- onFetchDistinctValues: m && w ? (L) => _e(m, w, L, { limit: 1e3 }) : void 0
2755
+ availableProperties: d,
2756
+ onFetchDistinctValues: s && g ? (h) => ra(s, g, h, { limit: 1e3 }) : void 0
2408
2757
  }
2409
2758
  ),
2410
- (((C = e.styles) == null ? void 0 : C.length) ?? 0) > 1 && /* @__PURE__ */ a(
2759
+ (((M = e.styles) == null ? void 0 : M.length) ?? 0) > 0 && /* @__PURE__ */ a(
2411
2760
  "button",
2412
2761
  {
2413
2762
  type: "button",
2414
- onClick: () => n({ styles: Oa(e.styles, P) }),
2763
+ onClick: () => n({ styles: Ja(e.styles, I) }),
2415
2764
  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",
2416
2765
  children: "Remove style"
2417
2766
  }
2418
2767
  )
2419
- ] }, P);
2768
+ ] }, I);
2420
2769
  }),
2421
2770
  /* @__PURE__ */ a(
2422
2771
  "button",
2423
2772
  {
2424
2773
  type: "button",
2425
- onClick: () => n({ styles: [...e.styles ?? [me], Oe] }),
2774
+ onClick: () => n({ styles: [...e.styles ?? [ge], Ge] }),
2426
2775
  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",
2427
2776
  children: "+ Add style"
2428
2777
  }
2429
2778
  )
2430
2779
  ] }) }),
2431
- /* @__PURE__ */ a(_, { title: "Legend", children: /* @__PURE__ */ a(
2432
- Na,
2780
+ /* @__PURE__ */ a(X, { title: "Legend", children: /* @__PURE__ */ a(
2781
+ $a,
2433
2782
  {
2434
2783
  value: e.legend,
2435
- onChange: (x) => n({ legend: x }),
2784
+ onChange: (m) => n({ legend: m }),
2436
2785
  styles: e.styles
2437
2786
  }
2438
2787
  ) }),
2439
- /* @__PURE__ */ a(_, { title: "Search Fields", children: /* @__PURE__ */ a(
2440
- Da,
2788
+ /* @__PURE__ */ a(X, { title: "Search Fields", children: /* @__PURE__ */ a(
2789
+ qa,
2441
2790
  {
2442
- fields: ((S = e.search) == null ? void 0 : S.fields) ?? [],
2443
- onChange: (x) => n({ search: x.length > 0 ? { fields: x } : void 0 }),
2444
- availableProperties: s
2791
+ fields: ((j = e.search) == null ? void 0 : j.fields) ?? [],
2792
+ onChange: (m) => n({ search: m.length > 0 ? { fields: m } : void 0 }),
2793
+ availableProperties: d
2445
2794
  }
2446
2795
  ) }),
2447
- /* @__PURE__ */ a(_, { title: "Property Display", children: /* @__PURE__ */ a(
2448
- Aa,
2796
+ /* @__PURE__ */ a(X, { title: "Property Display", children: /* @__PURE__ */ a(
2797
+ Wa,
2449
2798
  {
2450
2799
  value: e.propertyDisplay ?? {},
2451
- onChange: (x) => n({ propertyDisplay: Object.keys(x).length > 0 ? x : void 0 }),
2452
- availableProperties: s
2800
+ onChange: (m) => n({ propertyDisplay: Object.keys(m).length > 0 ? m : void 0 }),
2801
+ availableProperties: d
2453
2802
  }
2454
2803
  ) })
2455
2804
  ] });
2456
2805
  }
2457
- const ne = () => ({
2806
+ const ce = () => ({
2458
2807
  id: "",
2459
2808
  sourceId: "",
2460
2809
  collection: "",
@@ -2462,37 +2811,37 @@ const ne = () => ({
2462
2811
  visible: !0,
2463
2812
  dataMode: "vector-tiles"
2464
2813
  });
2465
- function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r }) {
2466
- const [n, o] = A(null), [p, b] = A(!1), [m, w] = A(ne()), [d, f] = A(null), [c, u] = A(null), [s, v] = A(null), N = () => {
2467
- t([...e, m]), b(!1), w(ne());
2468
- }, S = (g) => {
2469
- t(e.map((k) => k.id === n ? g : k));
2470
- }, x = (g) => {
2471
- t(e.filter((k) => k.id !== g)), f(null), n === g && o(null);
2472
- }, P = (g) => {
2473
- if (g === 0) return;
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;
2474
2823
  const k = [...e];
2475
- [k[g - 1], k[g]] = [k[g], k[g - 1]], t(k);
2476
- }, C = (g) => {
2477
- if (g === e.length - 1) return;
2824
+ [k[f - 1], k[f]] = [k[f], k[f - 1]], t(k);
2825
+ }, m = (f) => {
2826
+ if (f === e.length - 1) return;
2478
2827
  const k = [...e];
2479
- [k[g], k[g + 1]] = [k[g + 1], k[g]], t(k);
2480
- }, L = (g, k) => {
2481
- u(k), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", k);
2482
- }, E = (g, k) => {
2483
- g.preventDefault(), g.dataTransfer.dropEffect = "move", v(k);
2484
- }, y = () => {
2485
- v(null);
2486
- }, $ = (g, k) => {
2487
- g.preventDefault(), v(null);
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);
2488
2837
  const O = c;
2489
2838
  if (u(null), !O || O === k) return;
2490
- const U = e.findIndex((h) => h.id === O), G = e.findIndex((h) => h.id === k);
2491
- if (U === -1 || G === -1) return;
2492
- const B = [...e];
2493
- B.splice(U, 1), B.splice(G, 0, e[U]), t(B);
2494
- }, M = () => {
2495
- u(null), v(null);
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);
2843
+ }, P = () => {
2844
+ u(null), N(null);
2496
2845
  };
2497
2846
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2498
2847
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -2502,7 +2851,7 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2502
2851
  {
2503
2852
  type: "button",
2504
2853
  onClick: () => {
2505
- b(!0), w(ne());
2854
+ x(!0), g(ce());
2506
2855
  },
2507
2856
  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",
2508
2857
  children: "+ Add Layer"
@@ -2510,21 +2859,21 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2510
2859
  )
2511
2860
  ] }),
2512
2861
  e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
2513
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((g, k) => {
2514
- var B, h, T, I, F;
2515
- const O = c === g.id, U = s === g.id, G = n === g.id;
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;
2516
2865
  return /* @__PURE__ */ l(
2517
2866
  "li",
2518
2867
  {
2519
2868
  draggable: !G,
2520
- onDragStart: G ? void 0 : (j) => L(j, g.id),
2521
- onDragOver: (j) => E(j, g.id),
2522
- onDragLeave: y,
2523
- onDrop: (j) => $(j, g.id),
2524
- onDragEnd: M,
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),
2873
+ onDragEnd: P,
2525
2874
  className: [
2526
2875
  "mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
2527
- U ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
2876
+ R ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
2528
2877
  O ? "mapui:opacity-50" : "mapui:opacity-100"
2529
2878
  ].join(" "),
2530
2879
  children: [
@@ -2535,7 +2884,7 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2535
2884
  "button",
2536
2885
  {
2537
2886
  type: "button",
2538
- onClick: () => P(k),
2887
+ onClick: () => j(k),
2539
2888
  disabled: k === 0,
2540
2889
  "aria-label": "Move layer up",
2541
2890
  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",
@@ -2546,7 +2895,7 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2546
2895
  "button",
2547
2896
  {
2548
2897
  type: "button",
2549
- onClick: () => C(k),
2898
+ onClick: () => m(k),
2550
2899
  disabled: k === e.length - 1,
2551
2900
  "aria-label": "Move layer down",
2552
2901
  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",
@@ -2563,18 +2912,18 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2563
2912
  }
2564
2913
  ),
2565
2914
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:min-w-0 mapui:flex-col mapui:gap-0.5", children: [
2566
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: g.label || g.id }),
2567
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: g.collection }),
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 }),
2568
2917
  /* @__PURE__ */ l("div", { className: "mapui:mt-1 mapui:flex mapui:flex-wrap mapui:gap-1", children: [
2569
- /* @__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: g.dataMode }),
2570
- (((B = g.styles) == null ? void 0 : B.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: g.styles.map((j) => j.type).join(" · ") }),
2571
- g.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" }),
2572
- (((T = (h = g.search) == null ? void 0 : h.fields) == null ? void 0 : T.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: [
2573
- g.search.fields.length,
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,
2574
2923
  " search fields"
2575
2924
  ] }),
2576
- (((F = (I = g.legend) == null ? void 0 : I.entries) == null ? void 0 : F.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: [
2577
- g.legend.entries.length,
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,
2578
2927
  " legend entries"
2579
2928
  ] })
2580
2929
  ] })
@@ -2585,43 +2934,43 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2585
2934
  "button",
2586
2935
  {
2587
2936
  type: "button",
2588
- onClick: () => o(n === g.id ? null : g.id),
2937
+ onClick: () => o(n === f.id ? null : f.id),
2589
2938
  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",
2590
- children: n === g.id ? "Close" : "Edit"
2939
+ children: n === f.id ? "Close" : "Edit"
2591
2940
  }
2592
2941
  ),
2593
2942
  /* @__PURE__ */ a(
2594
2943
  "button",
2595
2944
  {
2596
2945
  type: "button",
2597
- onClick: () => f(g.id),
2946
+ onClick: () => w(f.id),
2598
2947
  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",
2599
2948
  children: "Remove"
2600
2949
  }
2601
2950
  )
2602
2951
  ] })
2603
2952
  ] }),
2604
- n === g.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2605
- De,
2953
+ n === f.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2954
+ Pe,
2606
2955
  {
2607
- value: g,
2608
- onChange: S,
2956
+ value: f,
2957
+ onChange: T,
2609
2958
  availableSources: i,
2610
2959
  availableIcons: r
2611
2960
  }
2612
2961
  ) })
2613
2962
  ]
2614
2963
  },
2615
- g.id
2964
+ f.id
2616
2965
  );
2617
2966
  }) }),
2618
2967
  p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
2619
2968
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Layer" }),
2620
2969
  /* @__PURE__ */ a(
2621
- De,
2970
+ Pe,
2622
2971
  {
2623
- value: m,
2624
- onChange: w,
2972
+ value: s,
2973
+ onChange: g,
2625
2974
  availableSources: i,
2626
2975
  availableIcons: r
2627
2976
  }
@@ -2631,8 +2980,8 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2631
2980
  "button",
2632
2981
  {
2633
2982
  type: "button",
2634
- onClick: N,
2635
- disabled: !m.id || !m.sourceId || !m.collection,
2983
+ onClick: v,
2984
+ disabled: !s.id || !s.sourceId || !s.collection,
2636
2985
  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",
2637
2986
  children: "Save"
2638
2987
  }
@@ -2641,7 +2990,7 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2641
2990
  "button",
2642
2991
  {
2643
2992
  type: "button",
2644
- onClick: () => b(!1),
2993
+ onClick: () => x(!1),
2645
2994
  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",
2646
2995
  children: "Cancel"
2647
2996
  }
@@ -2649,52 +2998,52 @@ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2649
2998
  ] })
2650
2999
  ] }),
2651
3000
  /* @__PURE__ */ a(
2652
- Z,
3001
+ re,
2653
3002
  {
2654
- open: d !== null,
3003
+ open: y !== null,
2655
3004
  title: "Remove Layer",
2656
3005
  description: "Are you sure you want to remove this layer from the configuration?",
2657
- onConfirm: () => d && x(d),
2658
- onCancel: () => f(null)
3006
+ onConfirm: () => y && E(y),
3007
+ onCancel: () => w(null)
2659
3008
  }
2660
3009
  )
2661
3010
  ] });
2662
3011
  }
2663
- const Q = "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";
2664
- function Te({ value: e, onChange: t }) {
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";
3013
+ function Oe({ value: e, onChange: t }) {
2665
3014
  const i = (r) => t({ ...e, ...r });
2666
3015
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2667
- /* @__PURE__ */ a(D, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3016
+ /* @__PURE__ */ a(C, { label: "ID", required: !0, children: /* @__PURE__ */ a(
2668
3017
  "input",
2669
3018
  {
2670
3019
  type: "text",
2671
3020
  value: e.id,
2672
3021
  onChange: (r) => i({ id: r.target.value }),
2673
3022
  placeholder: "osm",
2674
- className: Q
3023
+ className: te
2675
3024
  }
2676
3025
  ) }),
2677
- /* @__PURE__ */ a(D, { label: "Label", children: /* @__PURE__ */ a(
3026
+ /* @__PURE__ */ a(C, { label: "Label", children: /* @__PURE__ */ a(
2678
3027
  "input",
2679
3028
  {
2680
3029
  type: "text",
2681
3030
  value: e.label,
2682
3031
  onChange: (r) => i({ label: r.target.value }),
2683
3032
  placeholder: "OpenStreetMap",
2684
- className: Q
3033
+ className: te
2685
3034
  }
2686
3035
  ) }),
2687
- /* @__PURE__ */ a(D, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
3036
+ /* @__PURE__ */ a(C, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
2688
3037
  "input",
2689
3038
  {
2690
3039
  type: "url",
2691
3040
  value: e.url,
2692
3041
  onChange: (r) => i({ url: r.target.value }),
2693
3042
  placeholder: "https://example.com/style.json",
2694
- className: Q
3043
+ className: te
2695
3044
  }
2696
3045
  ) }),
2697
- /* @__PURE__ */ l(D, { label: "Thumbnail URL (optional)", children: [
3046
+ /* @__PURE__ */ l(C, { label: "Thumbnail URL (optional)", children: [
2698
3047
  /* @__PURE__ */ a(
2699
3048
  "input",
2700
3049
  {
@@ -2702,7 +3051,7 @@ function Te({ value: e, onChange: t }) {
2702
3051
  value: e.thumbnail ?? "",
2703
3052
  onChange: (r) => i({ thumbnail: r.target.value || void 0 }),
2704
3053
  placeholder: "https://example.com/thumbnail.png",
2705
- className: Q
3054
+ className: te
2706
3055
  }
2707
3056
  ),
2708
3057
  e.thumbnail && /* @__PURE__ */ a(
@@ -2716,14 +3065,14 @@ function Te({ value: e, onChange: t }) {
2716
3065
  ] })
2717
3066
  ] });
2718
3067
  }
2719
- const pe = () => ({ id: "", label: "", url: "" });
2720
- function Ka({ basemaps: e, onChange: t }) {
2721
- const [i, r] = A(null), [n, o] = A(!1), [p, b] = A(pe()), [m, w] = A(null), d = (u) => {
2722
- t(e.map((s) => s.id === i ? u : s));
2723
- }, f = () => {
2724
- t([...e, p]), o(!1), b(pe());
3068
+ 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());
2725
3074
  }, c = (u) => {
2726
- t(e.filter((s) => s.id !== u)), w(null);
3075
+ t(e.filter((d) => d.id !== u)), g(null);
2727
3076
  };
2728
3077
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2729
3078
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -2733,7 +3082,7 @@ function Ka({ basemaps: e, onChange: t }) {
2733
3082
  {
2734
3083
  type: "button",
2735
3084
  onClick: () => {
2736
- o(!0), b(pe());
3085
+ o(!0), x(de());
2737
3086
  },
2738
3087
  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",
2739
3088
  children: "+ Add Basemap"
@@ -2773,27 +3122,27 @@ function Ka({ basemaps: e, onChange: t }) {
2773
3122
  "button",
2774
3123
  {
2775
3124
  type: "button",
2776
- onClick: () => w(u.id),
3125
+ onClick: () => g(u.id),
2777
3126
  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",
2778
3127
  children: "Remove"
2779
3128
  }
2780
3129
  )
2781
3130
  ] })
2782
3131
  ] }),
2783
- i === u.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Te, { value: u, onChange: d }) })
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 }) })
2784
3133
  ]
2785
3134
  },
2786
3135
  u.id
2787
3136
  )) }),
2788
3137
  n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
2789
3138
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Basemap" }),
2790
- /* @__PURE__ */ a(Te, { value: p, onChange: b }),
3139
+ /* @__PURE__ */ a(Oe, { value: p, onChange: x }),
2791
3140
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
2792
3141
  /* @__PURE__ */ a(
2793
3142
  "button",
2794
3143
  {
2795
3144
  type: "button",
2796
- onClick: f,
3145
+ onClick: w,
2797
3146
  disabled: !p.id || !p.url,
2798
3147
  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",
2799
3148
  children: "Save"
@@ -2811,32 +3160,32 @@ function Ka({ basemaps: e, onChange: t }) {
2811
3160
  ] })
2812
3161
  ] }),
2813
3162
  /* @__PURE__ */ a(
2814
- Z,
3163
+ re,
2815
3164
  {
2816
- open: m !== null,
3165
+ open: s !== null,
2817
3166
  title: "Remove Basemap",
2818
3167
  description: "Are you sure you want to remove this basemap from the configuration?",
2819
- onConfirm: () => m && c(m),
2820
- onCancel: () => w(null)
3168
+ onConfirm: () => s && c(s),
3169
+ onCancel: () => g(null)
2821
3170
  }
2822
3171
  )
2823
3172
  ] });
2824
3173
  }
2825
- const Le = "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";
2826
- function Ae({ value: e, onChange: t }) {
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 }) {
2827
3176
  const i = (r) => t({ ...e, ...r });
2828
3177
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2829
- /* @__PURE__ */ a(D, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3178
+ /* @__PURE__ */ a(C, { label: "ID", required: !0, children: /* @__PURE__ */ a(
2830
3179
  "input",
2831
3180
  {
2832
3181
  type: "text",
2833
3182
  value: e.id,
2834
3183
  onChange: (r) => i({ id: r.target.value }),
2835
3184
  placeholder: "my-sprites",
2836
- className: Le
3185
+ className: je
2837
3186
  }
2838
3187
  ) }),
2839
- /* @__PURE__ */ l(D, { label: "Sprite URL", required: !0, children: [
3188
+ /* @__PURE__ */ l(C, { label: "Sprite URL", required: !0, children: [
2840
3189
  /* @__PURE__ */ a(
2841
3190
  "input",
2842
3191
  {
@@ -2844,7 +3193,7 @@ function Ae({ value: e, onChange: t }) {
2844
3193
  value: e.url,
2845
3194
  onChange: (r) => i({ url: r.target.value }),
2846
3195
  placeholder: "https://example.com/sprites/sprite",
2847
- className: Le
3196
+ className: je
2848
3197
  }
2849
3198
  ),
2850
3199
  /* @__PURE__ */ l("p", { className: "mapui:mt-1 mapui:text-xs mapui:text-gray-400", children: [
@@ -2857,21 +3206,21 @@ function Ae({ value: e, onChange: t }) {
2857
3206
  ] })
2858
3207
  ] });
2859
3208
  }
2860
- const oe = () => ({ id: "", url: "" }), ja = (e) => {
3209
+ const he = () => ({ id: "", url: "" }), Ka = (e) => {
2861
3210
  try {
2862
3211
  return new URL(e), !0;
2863
3212
  } catch {
2864
3213
  return !1;
2865
3214
  }
2866
3215
  };
2867
- function Qa({ sprites: e, onChange: t }) {
2868
- const [i, r] = A(null), [n, o] = A(!1), [p, b] = A(oe()), [m, w] = A(null), d = (u) => {
2869
- t(e.map((s, v) => v === i ? u : s));
2870
- }, f = () => {
2871
- t([...e, p]), o(!1), b(oe());
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());
2872
3221
  }, c = (u) => {
2873
- const s = e.findIndex((v) => v.id === u);
2874
- t(e.filter((v) => v.id !== u)), i !== null && (s === i ? r(null) : s < i && r(i - 1)), w(null);
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);
2875
3224
  };
2876
3225
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2877
3226
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -2881,7 +3230,7 @@ function Qa({ sprites: e, onChange: t }) {
2881
3230
  {
2882
3231
  type: "button",
2883
3232
  onClick: () => {
2884
- o(!0), b(oe());
3233
+ o(!0), x(he());
2885
3234
  },
2886
3235
  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",
2887
3236
  children: "+ Add Sprite Sheet"
@@ -2889,7 +3238,7 @@ function Qa({ sprites: e, onChange: t }) {
2889
3238
  )
2890
3239
  ] }),
2891
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." }),
2892
- /* @__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, s) => /* @__PURE__ */ l(
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(
2893
3242
  "li",
2894
3243
  {
2895
3244
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
@@ -2904,37 +3253,37 @@ function Qa({ sprites: e, onChange: t }) {
2904
3253
  "button",
2905
3254
  {
2906
3255
  type: "button",
2907
- onClick: () => r(i === s ? null : s),
3256
+ onClick: () => r(i === d ? null : d),
2908
3257
  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",
2909
- children: i === s ? "Close" : "Edit"
3258
+ children: i === d ? "Close" : "Edit"
2910
3259
  }
2911
3260
  ),
2912
3261
  /* @__PURE__ */ a(
2913
3262
  "button",
2914
3263
  {
2915
3264
  type: "button",
2916
- onClick: () => w(u.id),
3265
+ onClick: () => g(u.id),
2917
3266
  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",
2918
3267
  children: "Remove"
2919
3268
  }
2920
3269
  )
2921
3270
  ] })
2922
3271
  ] }),
2923
- i === s && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Ae, { value: u, onChange: d }) })
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 }) })
2924
3273
  ]
2925
3274
  },
2926
- s
3275
+ d
2927
3276
  )) }),
2928
3277
  n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
2929
3278
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Sprite Sheet" }),
2930
- /* @__PURE__ */ a(Ae, { value: p, onChange: b }),
3279
+ /* @__PURE__ */ a($e, { value: p, onChange: x }),
2931
3280
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
2932
3281
  /* @__PURE__ */ a(
2933
3282
  "button",
2934
3283
  {
2935
3284
  type: "button",
2936
- onClick: f,
2937
- disabled: !p.id || !p.url || !ja(p.url) || e.some((u) => u.id === p.id),
3285
+ onClick: w,
3286
+ disabled: !p.id || !p.url || !Ka(p.url) || e.some((u) => u.id === p.id),
2938
3287
  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",
2939
3288
  children: "Save"
2940
3289
  }
@@ -2951,18 +3300,18 @@ function Qa({ sprites: e, onChange: t }) {
2951
3300
  ] })
2952
3301
  ] }),
2953
3302
  /* @__PURE__ */ a(
2954
- Z,
3303
+ re,
2955
3304
  {
2956
- open: m !== null,
3305
+ open: s !== null,
2957
3306
  title: "Remove Sprite Sheet",
2958
3307
  description: "Are you sure you want to remove this sprite sheet from the configuration?",
2959
- onConfirm: () => m && c(m),
2960
- onCancel: () => w(null)
3308
+ onConfirm: () => s && c(s),
3309
+ onCancel: () => g(null)
2961
3310
  }
2962
3311
  )
2963
3312
  ] });
2964
3313
  }
2965
- const $a = [
3314
+ const Qa = [
2966
3315
  { key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
2967
3316
  { key: "showLegend", label: "Legend", description: "Map legend" },
2968
3317
  { key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
@@ -2971,15 +3320,16 @@ const $a = [
2971
3320
  { key: "showFeatureDetail", label: "Feature Detail Panel", description: "Inspect feature properties" },
2972
3321
  { key: "showFeatureTooltip", label: "Feature Tooltip", description: "Hover tooltip on features" },
2973
3322
  { key: "showExportButton", label: "Export Button", description: "Export data as CSV" },
2974
- { key: "showLegendOpacity", label: "Legend Opacity", description: "Expand legend with opacity sliders" }
3323
+ { 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" }
2975
3325
  ];
2976
- function Za({ value: e, onChange: t }) {
3326
+ function bt({ value: e, onChange: t }) {
2977
3327
  const i = (r, n) => {
2978
3328
  t({ ...e, [r]: n });
2979
3329
  };
2980
3330
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
2981
3331
  /* @__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." }),
2982
- /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: $a.map(({ key: r, label: n, description: o }) => {
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 }) => {
2983
3333
  const p = e[r];
2984
3334
  return /* @__PURE__ */ l(
2985
3335
  "label",
@@ -2996,7 +3346,7 @@ function Za({ value: e, onChange: t }) {
2996
3346
  {
2997
3347
  type: "checkbox",
2998
3348
  checked: p,
2999
- onChange: (b) => i(r, b.target.checked),
3349
+ onChange: (x) => i(r, x.target.checked),
3000
3350
  className: "mapui:sr-only",
3001
3351
  "aria-label": n
3002
3352
  }
@@ -3027,46 +3377,46 @@ function Za({ value: e, onChange: t }) {
3027
3377
  }) })
3028
3378
  ] });
3029
3379
  }
3030
- const Ge = [
3380
+ const He = [
3031
3381
  { key: "latitude", label: "Latitude", min: -90, max: 90, step: 1e-6, placeholder: "0" },
3032
3382
  { key: "longitude", label: "Longitude", min: -180, max: 180, step: 1e-6, placeholder: "0" },
3033
3383
  { key: "zoom", label: "Zoom", min: 0, max: 24, step: 0.1, placeholder: "2" },
3034
3384
  { key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
3035
3385
  { key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
3036
3386
  ];
3037
- function Ra(e, t) {
3038
- const i = Ge.find((r) => r.key === e);
3387
+ function Za(e, t) {
3388
+ const i = He.find((r) => r.key === e);
3039
3389
  if (i) {
3040
3390
  if (isNaN(t)) return "Must be a number";
3041
3391
  if (t < i.min) return `Must be at least ${i.min}`;
3042
3392
  if (t > i.max) return `Must be at most ${i.max}`;
3043
3393
  }
3044
3394
  }
3045
- const Ba = "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";
3046
- function et({ value: e, onChange: t }) {
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 }) {
3047
3397
  const i = (r, n) => {
3048
3398
  const o = parseFloat(n);
3049
3399
  t({ ...e, [r]: isNaN(o) ? 0 : o });
3050
3400
  };
3051
- return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: Ge.map(({ key: r, label: n, min: o, max: p, step: b, placeholder: m }) => {
3052
- const w = Ra(r, e[r]);
3053
- return /* @__PURE__ */ a(D, { label: n, error: w, children: /* @__PURE__ */ a(
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(
3054
3404
  "input",
3055
3405
  {
3056
3406
  type: "number",
3057
3407
  min: o,
3058
3408
  max: p,
3059
- step: b,
3409
+ step: x,
3060
3410
  value: e[r],
3061
- placeholder: m,
3062
- onChange: (d) => i(r, d.target.value),
3063
- className: `${Ba} ${w ? "mapui:border-red-400" : ""}`
3411
+ placeholder: s,
3412
+ onChange: (y) => i(r, y.target.value),
3413
+ className: `${et} ${g ? "mapui:border-red-400" : ""}`
3064
3414
  }
3065
3415
  ) }, r);
3066
3416
  }) });
3067
3417
  }
3068
- function at({ config: e }) {
3069
- const t = Ye(e);
3418
+ function ft({ config: e }) {
3419
+ const t = la(e);
3070
3420
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3071
3421
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
3072
3422
  /* @__PURE__ */ a(
@@ -3092,137 +3442,152 @@ function at({ config: e }) {
3092
3442
  ] });
3093
3443
  }
3094
3444
  export {
3095
- ui as BasemapConfigSchema,
3096
- Te as BasemapEditor,
3097
- Ka as BasemapList,
3098
- rt as BasemapSwitcher,
3099
- mi as CircleLayoutSchema,
3100
- si as CirclePaintSchema,
3101
- ci as CircleStyleSchema,
3102
- nt as CollapsibleControl,
3103
- _a as CollectionBrowser,
3104
- Y as ColorPicker,
3105
- at as ConfigPreview,
3106
- Z as ConfirmDialog,
3107
- ot as CoordinateDisplay,
3108
- di as DatetimeSearchFieldSchema,
3109
- ct as ExportButton,
3110
- ht as FeatureDetailPanel,
3111
- bt as FeatureTooltip,
3112
- hi as FillLayoutSchema,
3113
- gi as FillPaintSchema,
3114
- bi as FillStyleSchema,
3115
- yi as FilterConfigSchema,
3116
- D as FormField,
3117
- fi as GeometryTypeSchema,
3118
- xi as LayerConfigSchema,
3119
- De as LayerEditor,
3120
- Ja as LayerList,
3121
- ft as LayerPanel,
3122
- wt as Legend,
3123
- wi as LegendConfigSchema,
3124
- Na as LegendEditor,
3125
- va as LegendEntryEditor,
3126
- vi as LegendEntrySchema,
3127
- Ni as LineLayoutSchema,
3128
- ki as LinePaintSchema,
3129
- Ci as LineStyleSchema,
3130
- Si as MapConfigSchema,
3131
- Di as NumberSearchFieldSchema,
3132
- Ti as OgcApiSourceSchema,
3133
- Li as PropertyDisplayConfigSchema,
3134
- Aa as PropertyDisplayEditor,
3135
- Ai as PropertyDisplaySchema,
3136
- Ii as SearchConfigSchema,
3137
- Ca as SearchFieldEditor,
3138
- Da as SearchFieldList,
3139
- Ei as SearchFieldSchema,
3140
- Nt as SearchPanel,
3141
- Fi as SelectSearchFieldSchema,
3142
- ce as SourceEditor,
3143
- Va as SourceList,
3144
- Ae as SpriteSourceEditor,
3145
- Qa as SpriteSourceList,
3146
- Pi as SpriteSourceSchema,
3147
- Mi as StyleConfigSchema,
3148
- wa as StyleEditor,
3149
- Oi as SymbolLayoutSchema,
3150
- ji as SymbolPaintSchema,
3151
- $i as SymbolStyleSchema,
3152
- Ri as TextSearchFieldSchema,
3153
- Za as UIConfigEditor,
3154
- Bi as UIConfigSchema,
3155
- qi as ViewConfigSchema,
3156
- et as ViewEditor,
3157
- Ct as and,
3158
- St as between,
3159
- Pa as buildDefaultStylesForGeometryTypes,
3160
- Oe as defaultCircle,
3161
- me as defaultFill,
3162
- ga as defaultLine,
3163
- ba as defaultSymbol,
3164
- qe as detectGeometryStyleTypesFromQueryables,
3165
- Ea as detectGeometryTypeFromQueryables,
3166
- Ue as detectGeometryTypesFromFeatures,
3167
- Ya as detectStyleTypeForCollection,
3168
- Xa as detectStyleTypesForCollection,
3169
- Dt as downloadCsv,
3170
- Tt as eq,
3171
- Me as expressionColors,
3172
- ra as expressionEntries,
3173
- la as expressionPropertyName,
3174
- ia as expressionType,
3175
- $e as extractGeometryType,
3176
- Lt as featuresToCsv,
3177
- At as fetchCollectionDetail,
3178
- It as fetchCollections,
3179
- Et as fetchConformance,
3180
- _e as fetchDistinctValues,
3181
- Ft as fetchFeatureCount,
3182
- se as fetchFeatures,
3183
- Pe as fetchQueryables,
3184
- Pt as fetchSpriteNames,
3185
- Mt as fetchSpriteUrlFromStyle,
3186
- Ot as fetchTileJson,
3187
- ut as formatDMS,
3188
- mt as formatDecimal,
3189
- jt as fromSimpleFilters,
3190
- $t as fromStructuredFilters,
3191
- Re as geometryTypeToStyleType,
3192
- Be as geometryTypeToStyleTypes,
3193
- ae as getColorFromPalette,
3194
- Rt as getCql2FilteredVectorTileUrl,
3195
- Bt as getFilteredVectorTileUrl,
3196
- na as getPrimaryColor,
3197
- pa as getShapeForStyleType,
3198
- qt as getTileJsonUrl,
3199
- Ut as getVectorTileUrl,
3200
- Gt as gt,
3201
- Wt as gte,
3202
- Ha as humanizePropertyName,
3203
- zt as inList,
3445
+ ji as BasemapConfigSchema,
3446
+ Oe as BasemapEditor,
3447
+ ht as BasemapList,
3448
+ Nt as BasemapSwitcher,
3449
+ $i as CircleLayoutSchema,
3450
+ Ri as CirclePaintSchema,
3451
+ Bi as CircleStyleSchema,
3452
+ kt as CollapsibleControl,
3453
+ ut as CollectionBrowser,
3454
+ H as ColorPicker,
3455
+ ft as ConfigPreview,
3456
+ 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,
3521
+ 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,
3204
3567
  W as isExpression,
3205
- Ia as isGeometryProperty,
3206
- Vt as isNull,
3207
- _t as like,
3208
- Yt as lt,
3209
- Xt as lte,
3210
- Ht as neq,
3211
- Jt as not,
3212
- Kt as or,
3213
- Qt as resolveAvailableIcons,
3214
- Zt as resolvePropertyDisplay,
3215
- ei as resolveStyleWithSprites,
3216
- Ye as safeValidateMapConfig,
3217
- ai as serializeCql2,
3218
- ti as tAfter,
3219
- ii as tBefore,
3220
- ri as tDuring,
3221
- Fa as toAvailableProperties,
3222
- li as useCsvExport,
3223
- ni as useOgcCollectionDetail,
3224
- Fe as useOgcCollections,
3225
- pi as useOgcFeatures,
3226
- Ve as useOgcQueryables,
3227
- Ui as validateMapConfig
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
3228
3593
  };