@ogc-maps/storybook-components 0.9.0 → 0.11.0

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