@burdenoff/microfe-healthybowl 2026.710.12 → 2026.710.13

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.
@@ -4,26 +4,28 @@ import { useHealthyBowl as n } from "../../context/HealthyBowlContext.js";
4
4
  import { PageLayout as r } from "../../components/PageLayout.js";
5
5
  import { ErrorState as i } from "../../components/ErrorState.js";
6
6
  import { ToastContainer as a } from "../../components/Toast.js";
7
- import { useConfirm as o } from "../../components/ConfirmDialog.js";
8
- import { Modal as ee } from "../../components/Modal.js";
9
- import { require_leaflet_src as s } from "../../../node_modules/leaflet/dist/leaflet-src.js";
10
- import { useToast as te } from "../../hooks/useToast.js";
11
- import { ensureLeafletCss as ne } from "../../utils/leaflet.js";
12
- import { extractPolygon as re, isValidPolygon as c, polygonAreaInUnit as l, polygonAreaSqMeters as ie, polygonCentroid as ae, ringToPolygon as u } from "../../utils/geo.js";
13
- import { SOIL_PALETTE as oe, soilColor as se, soilLegendFor as ce } from "../../utils/soil.js";
14
- import { elevationColor as le, fetchElevations as ue } from "../../utils/elevation.js";
7
+ import { useConfirm as ee } from "../../components/ConfirmDialog.js";
8
+ import { Modal as te } from "../../components/Modal.js";
9
+ import { require_leaflet_src as o } from "../../../node_modules/leaflet/dist/leaflet-src.js";
10
+ import { useToast as ne } from "../../hooks/useToast.js";
11
+ import { ensureLeafletCss as re } from "../../utils/leaflet.js";
12
+ import { extractPolygon as ie, isValidPolygon as s, polygonAreaInUnit as ae, polygonAreaSqMeters as oe, polygonCentroid as se, ringToPolygon as c } from "../../utils/geo.js";
13
+ import { SOIL_PALETTE as ce, soilColor as le, soilLegendFor as ue } from "../../utils/soil.js";
14
+ import { elevationColor as de, fetchElevations as fe } from "../../utils/elevation.js";
15
+ import { bedPlantCount as pe, generateBeds as me } from "../../utils/bedLayout.js";
15
16
  import "../../utils/index.js";
16
17
  import "../../components/index.js";
17
- import { useHealthyBowlData as de } from "../../hooks/useHealthyBowlData.js";
18
- import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
19
- import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
- import { Check as pe, Layers as me, LocateFixed as he, MapPinned as ge, Pencil as _e, Plus as ve, Ruler as ye, Save as be, Search as xe, Spline as Se, Trash2 as Ce, X as we } from "lucide-react";
21
- import { Fragment as Te, jsx as g, jsxs as _ } from "react/jsx-runtime";
22
- import { Button as v, Select as Ee, SelectContent as De, SelectItem as y, SelectTrigger as Oe, SelectValue as ke } from "@burdenoff/fe-libs/ui";
23
- import { gql as Ae } from "@apollo/client";
24
- import { useMutation as je } from "@apollo/client/react";
18
+ import { useHealthyBowlData as he } from "../../hooks/useHealthyBowlData.js";
19
+ import { DEFAULT_BED_WIDTH_M as ge, DEFAULT_PATH_WIDTH_M as _e, getCropSpacingPreset as ve } from "../../utils/plantingCapacity.js";
20
+ import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
21
+ import { useI18n as ye } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { Check as be, Layers as xe, LayoutGrid as Se, LocateFixed as Ce, MapPinned as we, Pencil as Te, Plus as Ee, Ruler as De, Save as Oe, Search as ke, Spline as Ae, Trash2 as je, X as Me } from "lucide-react";
23
+ import { Fragment as Ne, jsx as m, jsxs as h } from "react/jsx-runtime";
24
+ import { Button as g, Select as _, SelectContent as v, SelectItem as y, SelectTrigger as Pe, SelectValue as Fe } from "@burdenoff/fe-libs/ui";
25
+ import { gql as b } from "@apollo/client";
26
+ import { useMutation as Ie } from "@apollo/client/react";
25
27
  //#region src/healthybowl/pages/fields/FieldMapPage.tsx
26
- var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
28
+ var x = /* @__PURE__ */ e(o(), 1), Le = b`
27
29
  mutation UpdateHealthyBowlFieldBoundaryOnMapPage($input: UpdateHealthyBowlFieldInput!) {
28
30
  updateHealthyBowlField(input: $input) {
29
31
  id
@@ -32,44 +34,49 @@ var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
32
34
  location
33
35
  }
34
36
  }
35
- `, Ne = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", Pe = "Esri, Maxar, Earthstar Geographics", Fe = "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", Ie = "© OpenTopoMap (CC-BY-SA) · © OpenStreetMap contributors", Le = 21, Re = 16, ze = 2.47105, Be = "#16a34a", Ve = {
37
+ `, Re = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", ze = "Esri, Maxar, Earthstar Geographics", Be = "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", Ve = "© OpenTopoMap (CC-BY-SA) · © OpenStreetMap contributors", He = 21, Ue = 16, We = 2.47105, Ge = "#16a34a", Ke = {
36
38
  color: "#f59e0b",
37
39
  weight: 2,
38
40
  dashArray: "6 4",
39
41
  fillColor: "#f59e0b",
40
42
  fillOpacity: .15
41
- }, He = {
43
+ }, qe = {
42
44
  color: "#ffffff",
43
45
  weight: 2,
44
46
  dashArray: "6 4",
45
47
  fillColor: "#22c55e",
46
48
  fillOpacity: .2
47
- }, Ue = {
49
+ }, Je = {
48
50
  color: "#38bdf8",
49
51
  weight: 3,
50
52
  dashArray: "6 6"
51
- }, We = (e) => !!(e && Number.isFinite(e.lat) && Number.isFinite(e.lng) && e.lat >= -90 && e.lat <= 90 && e.lng >= -180 && e.lng <= 180 && (e.lat !== 0 || e.lng !== 0)), Ge = (e) => /hect|(^|[^a-z])ha([^a-z]|$)/i.test(e ?? ""), Ke = (e) => Ge(e.unit) ? e.area * ze : e.area, qe = (e) => `${e.area.toFixed(1)} ${Ge(e.unit) ? "ha" : "ac"}`, x = (e) => {
52
- let t = re(e.boundary);
53
- return t && c(t) ? t : null;
54
- }, Je = b.default.divIcon({
53
+ }, Ye = {
54
+ color: "#064e3b",
55
+ weight: 1,
56
+ fillColor: "#22c55e",
57
+ fillOpacity: .4
58
+ }, Xe = (e) => !!(e && Number.isFinite(e.lat) && Number.isFinite(e.lng) && e.lat >= -90 && e.lat <= 90 && e.lng >= -180 && e.lng <= 180 && (e.lat !== 0 || e.lng !== 0)), Ze = (e) => /hect|(^|[^a-z])ha([^a-z]|$)/i.test(e ?? ""), Qe = (e) => Ze(e.unit) ? e.area * We : e.area, $e = (e) => `${e.area.toFixed(1)} ${Ze(e.unit) ? "ha" : "ac"}`, S = (e) => {
59
+ let t = ie(e.boundary);
60
+ return t && s(t) ? t : null;
61
+ }, et = x.default.divIcon({
55
62
  className: "",
56
63
  html: "<span style=\"display:block;width:12px;height:12px;background:#22c55e;border:2px solid #fff;border-radius:2px;box-shadow:0 0 3px rgba(0,0,0,.6)\"></span>",
57
64
  iconSize: [16, 16],
58
65
  iconAnchor: [8, 8]
59
- }), S = () => {
60
- let { t: e } = fe(), { workspaceId: s } = n(), re = o(), { fields: c, crops: Ae, loadings: ze, errors: Ge, refetch: S, createField: Ye } = de(), { toasts: Xe, toast: C, dismiss: Ze } = te(), [w] = je(Me), [T, Qe] = h("loading"), [E, D] = h("view"), [O, k] = h(null), [A, $e] = h(!1), [j, et] = h(!0), [M, tt] = h(!1), [N, nt] = h({}), [rt, it] = h(""), [at, ot] = h(""), [st, ct] = h(!1), [lt, ut] = h(0), [dt, ft] = h(null), [pt, mt] = h(!1), [ht, gt] = h(!1), [P, _t] = h(null), [F, I] = h(null), [vt, yt] = h(!1), [L, bt] = h(""), [xt, St] = h("Clay loam"), [Ct, wt] = h("Drip"), [Tt, Et] = h("active"), Dt = m(null), R = m(null), Ot = m(null), kt = m(null), At = m(null), z = m(null), B = m(null), V = m(null), H = m([]), U = m(null), W = m([]), G = m(null), jt = m([]), K = m("view"), Mt = m(!1);
61
- f(() => {
62
- K.current = E;
63
- }, [E]);
64
- let Nt = p(() => c.filter((e) => x(e) !== null).length, [c]), Pt = p(() => c.reduce((e, t) => e + Ke(t), 0), [c]), Ft = p(() => ce(c.map((e) => e.soilType)), [c]), q = p(() => c.find((e) => e.id === O) ?? null, [c, O]), It = p(() => {
65
- let e = rt.trim().toLowerCase();
66
- return e ? c.filter((t) => t.name.toLowerCase().includes(e) || (t.soilType ?? "").toLowerCase().includes(e)) : c;
67
- }, [c, rt]), J = p(() => {
66
+ }), C = () => {
67
+ let { t: e } = ye(), { workspaceId: o } = n(), ie = ee(), { fields: s, crops: b, loadings: We, errors: Ze, refetch: C, createField: tt } = he(), { toasts: nt, toast: w, dismiss: rt } = ne(), [T] = Ie(Le), [E, it] = p("loading"), [D, O] = p("view"), [k, A] = p(null), [j, at] = p(!1), [M, ot] = p(!0), [N, st] = p(!1), [P, ct] = p({}), [lt, ut] = p(""), [dt, ft] = p(""), [pt, mt] = p(!1), [ht, gt] = p(0), [_t, vt] = p(null), [yt, bt] = p(!1), [xt, St] = p(!1), [F, Ct] = p(null), [wt, Tt] = p(!1), [I, Et] = p(ge), [Dt, Ot] = p(_e), [L, kt] = p(0), [At, jt] = p(""), [R, z] = p(null), [Mt, Nt] = p(!1), [B, Pt] = p(""), [Ft, It] = p("Clay loam"), [Lt, Rt] = p("Drip"), [zt, Bt] = p("active"), Vt = f(null), V = f(null), Ht = f(null), Ut = f(null), Wt = f(null), H = f(null), U = f(null), W = f(null), Gt = f(null), G = f([]), Kt = f(null), K = f([]), qt = f(null), Jt = f([]), q = f("view"), Yt = f(!1);
68
+ u(() => {
69
+ q.current = D;
70
+ }, [D]);
71
+ let Xt = d(() => s.filter((e) => S(e) !== null).length, [s]), Zt = d(() => s.reduce((e, t) => e + Qe(t), 0), [s]), Qt = d(() => ue(s.map((e) => e.soilType)), [s]), J = d(() => s.find((e) => e.id === k) ?? null, [s, k]), $t = d(() => {
72
+ let e = lt.trim().toLowerCase();
73
+ return e ? s.filter((t) => t.name.toLowerCase().includes(e) || (t.soilType ?? "").toLowerCase().includes(e)) : s;
74
+ }, [s, lt]), Y = d(() => {
68
75
  let e = [];
69
- for (let t of c) {
70
- let n = x(t);
76
+ for (let t of s) {
77
+ let n = S(t);
71
78
  if (n) {
72
- let r = ae(n);
79
+ let r = se(n);
73
80
  if (r) {
74
81
  e.push({
75
82
  id: t.id,
@@ -79,46 +86,88 @@ var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
79
86
  continue;
80
87
  }
81
88
  }
82
- We(t.location) && e.push({
89
+ Xe(t.location) && e.push({
83
90
  id: t.id,
84
91
  lat: t.location.lat,
85
92
  lng: t.location.lng
86
93
  });
87
94
  }
88
95
  return e;
89
- }, [c]);
90
- f(() => {
91
- if (J.length === 0) {
92
- nt({});
96
+ }, [s]);
97
+ u(() => {
98
+ if (Y.length === 0) {
99
+ ct({});
93
100
  return;
94
101
  }
95
102
  let e = new AbortController(), t = !1;
96
- return ue(J.map((e) => ({
103
+ return fe(Y.map((e) => ({
97
104
  lat: e.lat,
98
105
  lng: e.lng
99
106
  })), e.signal).then((e) => {
100
107
  if (t) return;
101
108
  let n = {};
102
- J.forEach((t, r) => {
109
+ Y.forEach((t, r) => {
103
110
  n[t.id] = e[r] ?? null;
104
- }), nt(n);
111
+ }), ct(n);
105
112
  }), () => {
106
113
  t = !0, e.abort();
107
114
  };
108
- }, [p(() => J.map((e) => `${e.id}:${e.lat.toFixed(5)},${e.lng.toFixed(5)}`).join("|"), [J])]);
109
- let [Lt, Rt] = p(() => {
110
- let e = Object.values(N).filter((e) => e != null && Number.isFinite(e));
115
+ }, [d(() => Y.map((e) => `${e.id}:${e.lat.toFixed(5)},${e.lng.toFixed(5)}`).join("|"), [Y])]);
116
+ let [en, tn] = d(() => {
117
+ let e = Object.values(P).filter((e) => e != null && Number.isFinite(e));
111
118
  return e.length === 0 ? [0, 0] : [Math.min(...e), Math.max(...e)];
112
- }, [N]), zt = p(() => Object.values(N).some((e) => e != null && Number.isFinite(e)), [N]), Bt = d((e) => {
119
+ }, [P]), nn = d(() => Object.values(P).some((e) => e != null && Number.isFinite(e)), [P]), rn = l((e) => {
113
120
  if (!e) return "";
114
- let t = Ae.find((t) => t.field === e.id || t.fieldName === e.name);
121
+ let t = b.find((t) => t.field === e.id || t.fieldName === e.name);
115
122
  return t ? t.name : (e.crops ?? []).join(", ");
116
- }, [Ae]), Vt = d((e) => {
117
- let t = R.current;
123
+ }, [b]), an = d(() => J ? S(J) : null, [J]), on = d(() => J ? b.find((e) => e.field === J.id || e.fieldName === J.name) ?? null : null, [b, J]), sn = d(() => b.find((e) => e.id === At) ?? on, [
124
+ b,
125
+ At,
126
+ on
127
+ ]), X = d(() => ve(sn), [sn]);
128
+ u(() => {
129
+ jt("");
130
+ }, [k]);
131
+ let Z = d(() => an ? me(an, {
132
+ bedWidthM: I,
133
+ pathWidthM: Dt,
134
+ orientationDeg: L
135
+ }) : null, [
136
+ an,
137
+ I,
138
+ Dt,
139
+ L
140
+ ]), cn = d(() => Z ? Z.beds.reduce((e, t) => e + pe(oe(t), I, X.plantSpacingCm, X.rowSpacingCm), 0) : 0, [
141
+ Z,
142
+ I,
143
+ X
144
+ ]);
145
+ u(() => {
146
+ let t = Gt.current;
147
+ t && (t.clearLayers(), !(!wt || !Z || D !== "view") && Z.beds.forEach((n) => {
148
+ let r = oe(n), i = pe(r, I, X.plantSpacingCm, X.rowSpacingCm), a = x.default.geoJSON(n, { style: () => Ye });
149
+ a.bindTooltip(e("healthybowl.fieldMapPage.beds.bedTooltip", "{{plants}} plants · {{area}} m²", {
150
+ plants: String(i),
151
+ area: r.toFixed(0)
152
+ }), {
153
+ sticky: !0,
154
+ direction: "top"
155
+ }), a.addTo(t);
156
+ }));
157
+ }, [
158
+ wt,
159
+ Z,
160
+ I,
161
+ X,
162
+ D,
163
+ e
164
+ ]);
165
+ let ln = l((e) => {
166
+ let t = V.current;
118
167
  if (!t) return;
119
- let n = x(e);
168
+ let n = S(e);
120
169
  if (n) try {
121
- let e = b.default.geoJSON(n).getBounds();
170
+ let e = x.default.geoJSON(n).getBounds();
122
171
  if (e.isValid()) {
123
172
  t.fitBounds(e, {
124
173
  padding: [40, 40],
@@ -127,29 +176,29 @@ var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
127
176
  return;
128
177
  }
129
178
  } catch {}
130
- We(e.location) && t.flyTo([e.location.lat, e.location.lng], Re, { duration: .6 });
131
- }, []), Ht = d((e) => {
132
- K.current === "draw" || K.current === "measure" || (k(e.id), Vt(e));
133
- }, [Vt]);
134
- f(() => {
135
- O && document.querySelector(`[data-field-id="${O}"]`)?.scrollIntoView({ block: "nearest" });
136
- }, [O]);
137
- let Y = d(() => {
138
- let t = R.current, n = At.current;
179
+ Xe(e.location) && t.flyTo([e.location.lat, e.location.lng], Ue, { duration: .6 });
180
+ }, []), un = l((e) => {
181
+ q.current === "draw" || q.current === "measure" || (A(e.id), ln(e));
182
+ }, [ln]);
183
+ u(() => {
184
+ k && document.querySelector(`[data-field-id="${k}"]`)?.scrollIntoView({ block: "nearest" });
185
+ }, [k]);
186
+ let dn = l(() => {
187
+ let t = V.current, n = Wt.current;
139
188
  if (!t || !n) return;
140
189
  n.clearLayers();
141
190
  let r = [];
142
- for (let t of c) {
143
- if (E === "edit" && t.id === O) continue;
144
- let i = t.id === O, a = N[t.id], o = M && a != null ? le(a, Lt, Rt) : j ? se(t.soilType) : Be, ee = `${t.name} — ${qe(t)}`, s = x(t);
145
- if (s) {
146
- let e = b.default.geoJSON(s, { style: () => ({
147
- color: i ? "#ffffff" : o,
191
+ for (let t of s) {
192
+ if (D === "edit" && t.id === k) continue;
193
+ let i = t.id === k, a = P[t.id], ee = N && a != null ? de(a, en, tn) : M ? le(t.soilType) : Ge, te = `${t.name} — ${$e(t)}`, o = S(t);
194
+ if (o) {
195
+ let e = x.default.geoJSON(o, { style: () => ({
196
+ color: i ? "#ffffff" : ee,
148
197
  weight: i ? 4 : 2,
149
- fillColor: o,
198
+ fillColor: ee,
150
199
  fillOpacity: i ? .5 : .3
151
200
  }) });
152
- e.on("click", () => k(t.id)), e.bindTooltip(ee, {
201
+ e.on("click", () => A(t.id)), e.bindTooltip(te, {
153
202
  permanent: !0,
154
203
  direction: "center",
155
204
  className: "hb-field-label"
@@ -158,94 +207,94 @@ var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
158
207
  let t = e.getBounds();
159
208
  t.isValid() && r.push(t);
160
209
  } catch {}
161
- } else if (We(t.location)) {
162
- let a = b.default.circleMarker([t.location.lat, t.location.lng], {
210
+ } else if (Xe(t.location)) {
211
+ let a = x.default.circleMarker([t.location.lat, t.location.lng], {
163
212
  radius: i ? 9 : 7,
164
213
  color: i ? "#ffffff" : "#fff",
165
214
  weight: i ? 3 : 2,
166
- fillColor: o,
215
+ fillColor: ee,
167
216
  fillOpacity: 1
168
217
  });
169
- a.on("click", () => k(t.id)), a.bindTooltip(`${t.name} (${e("healthybowl.fieldMapPage.unmapped", "no boundary")})`, {
218
+ a.on("click", () => A(t.id)), a.bindTooltip(`${t.name} (${e("healthybowl.fieldMapPage.unmapped", "no boundary")})`, {
170
219
  permanent: !1,
171
220
  direction: "top"
172
- }), a.addTo(n), r.push(b.default.latLngBounds([t.location.lat, t.location.lng], [t.location.lat, t.location.lng]));
221
+ }), a.addTo(n), r.push(x.default.latLngBounds([t.location.lat, t.location.lng], [t.location.lat, t.location.lng]));
173
222
  }
174
223
  }
175
- if (!Mt.current && r.length > 0) {
176
- let e = r.reduce((e, t) => e.extend(t), b.default.latLngBounds(r[0].getSouthWest(), r[0].getNorthEast()));
224
+ if (!Yt.current && r.length > 0) {
225
+ let e = r.reduce((e, t) => e.extend(t), x.default.latLngBounds(r[0].getSouthWest(), r[0].getNorthEast()));
177
226
  try {
178
227
  t.fitBounds(e, {
179
228
  padding: [40, 40],
180
229
  maxZoom: 17
181
- }), Mt.current = !0;
230
+ }), Yt.current = !0;
182
231
  } catch {}
183
232
  }
184
233
  }, [
185
- c,
186
- E,
187
- O,
188
- j,
234
+ s,
235
+ D,
236
+ k,
189
237
  M,
190
238
  N,
191
- Lt,
192
- Rt,
239
+ P,
240
+ en,
241
+ tn,
193
242
  e
194
243
  ]);
195
- f(() => {
196
- T === "ready" && Y();
197
- }, [Y, T]);
198
- let X = d(() => {
199
- z.current?.clearLayers(), U.current = null, H.current = [], ut(0);
200
- }, []), Ut = d(() => {
201
- let e = z.current;
244
+ u(() => {
245
+ E === "ready" && dn();
246
+ }, [dn, E]);
247
+ let Q = l(() => {
248
+ H.current?.clearLayers(), Kt.current = null, G.current = [], gt(0);
249
+ }, []), fn = l(() => {
250
+ let e = H.current;
202
251
  if (!e) return;
203
- U.current &&= (e.removeLayer(U.current), null);
204
- let t = H.current;
205
- t.length >= 2 && (U.current = b.default.polygon(t, Ve).addTo(e));
206
- }, []), Wt = d(() => {
207
- let t = H.current;
252
+ Kt.current &&= (e.removeLayer(Kt.current), null);
253
+ let t = G.current;
254
+ t.length >= 2 && (Kt.current = x.default.polygon(t, Ke).addTo(e));
255
+ }, []), pn = l(() => {
256
+ let t = G.current;
208
257
  if (t.length < 3) {
209
- C({
258
+ w({
210
259
  title: e("healthybowl.fieldMapPage.toast.needPoints.title", "Need at least 3 points"),
211
260
  description: e("healthybowl.fieldMapPage.toast.needPoints.description", "Click the map to add more corners."),
212
261
  variant: "warning"
213
262
  });
214
263
  return;
215
264
  }
216
- let n = u(t.map((e) => ({
265
+ let n = c(t.map((e) => ({
217
266
  lat: e.lat,
218
267
  lng: e.lng
219
268
  })));
220
- X(), K.current = "view", D("view"), n && (I({
269
+ Q(), q.current = "view", O("view"), n && (z({
221
270
  boundary: n,
222
- area: l(n, "acres"),
223
- centroid: ae(n) ?? [0, 0]
224
- }), bt(""), St("Clay loam"), wt("Drip"), Et("active"));
271
+ area: ae(n, "acres"),
272
+ centroid: se(n) ?? [0, 0]
273
+ }), Pt(""), It("Clay loam"), Rt("Drip"), Bt("active"));
225
274
  }, [
226
- X,
275
+ Q,
227
276
  e,
228
- C
229
- ]), Gt = d(() => {
230
- k(null), X(), K.current = "draw", D("draw");
231
- }, [X]), Kt = d(() => {
232
- X(), K.current = "view", D("view");
233
- }, [X]), Z = d(() => {
234
- B.current?.clearLayers(), G.current = null, W.current = [], ft(null), mt(!1);
235
- }, []), qt = d(() => {
236
- if (!B.current || !G.current) return;
237
- G.current.setLatLngs(W.current);
238
- let e = u(W.current.map((e) => ({
277
+ w
278
+ ]), mn = l(() => {
279
+ A(null), Q(), q.current = "draw", O("draw");
280
+ }, [Q]), hn = l(() => {
281
+ Q(), q.current = "view", O("view");
282
+ }, [Q]), gn = l(() => {
283
+ U.current?.clearLayers(), qt.current = null, K.current = [], vt(null), bt(!1);
284
+ }, []), _n = l(() => {
285
+ if (!U.current || !qt.current) return;
286
+ qt.current.setLatLngs(K.current);
287
+ let e = c(K.current.map((e) => ({
239
288
  lat: e.lat,
240
289
  lng: e.lng
241
290
  })));
242
- e && ft(l(e, q?.unit ?? "acres"));
243
- }, [q]), Jt = d(() => {
244
- let t = R.current, n = B.current;
245
- if (!t || !n || !q) return;
246
- let r = x(q);
291
+ e && vt(ae(e, J?.unit ?? "acres"));
292
+ }, [J]), vn = l(() => {
293
+ let t = V.current, n = U.current;
294
+ if (!t || !n || !J) return;
295
+ let r = S(J);
247
296
  if (!r) {
248
- C({
297
+ w({
249
298
  title: e("healthybowl.fieldMapPage.toast.noBoundary.title", "No boundary to edit"),
250
299
  description: e("healthybowl.fieldMapPage.toast.noBoundary.description", "Draw a boundary for this field first."),
251
300
  variant: "warning"
@@ -253,89 +302,89 @@ var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
253
302
  return;
254
303
  }
255
304
  n.clearLayers();
256
- let i = r.coordinates[0].slice(0, -1).map(([e, t]) => b.default.latLng(t, e));
257
- W.current = i, G.current = b.default.polygon(i, He).addTo(n), i.forEach((e, t) => {
258
- b.default.marker(i[t], {
259
- icon: Je,
305
+ let i = r.coordinates[0].slice(0, -1).map(([e, t]) => x.default.latLng(t, e));
306
+ K.current = i, qt.current = x.default.polygon(i, qe).addTo(n), i.forEach((e, t) => {
307
+ x.default.marker(i[t], {
308
+ icon: et,
260
309
  draggable: !0
261
310
  }).addTo(n).on("drag", (e) => {
262
- W.current[t] = e.target.getLatLng(), qt(), mt(!0);
311
+ K.current[t] = e.target.getLatLng(), _n(), bt(!0);
263
312
  });
264
- }), K.current = "edit", D("edit"), mt(!1), ft(l(r, q.unit));
313
+ }), q.current = "edit", O("edit"), bt(!1), vt(ae(r, J.unit));
265
314
  }, [
266
- qt,
267
- q,
315
+ _n,
316
+ J,
268
317
  e,
269
- C
270
- ]), Yt = d(() => {
271
- Z(), K.current = "view", D("view"), Y();
272
- }, [Z, Y]), Xt = d(async () => {
273
- if (!q) return;
274
- let t = u(W.current.map((e) => ({
318
+ w
319
+ ]), yn = l(() => {
320
+ gn(), q.current = "view", O("view"), dn();
321
+ }, [gn, dn]), bn = l(async () => {
322
+ if (!J) return;
323
+ let t = c(K.current.map((e) => ({
275
324
  lat: e.lat,
276
325
  lng: e.lng
277
326
  })));
278
327
  if (t) {
279
- gt(!0);
328
+ St(!0);
280
329
  try {
281
- let n = l(t, q.unit);
282
- await w({ variables: { input: {
283
- id: q.id,
330
+ let n = ae(t, J.unit);
331
+ await T({ variables: { input: {
332
+ id: J.id,
284
333
  boundary: t,
285
334
  area: n,
286
- context: { workspaceId: s }
287
- } } }), await S(), Z(), K.current = "view", D("view"), C({
335
+ context: { workspaceId: o }
336
+ } } }), await C(), gn(), q.current = "view", O("view"), w({
288
337
  title: e("healthybowl.fieldMapPage.toast.saved.title", "Boundary saved"),
289
338
  description: e("healthybowl.fieldMapPage.toast.saved.description", "Area updated to {{area}} {{unit}}.", {
290
339
  area: String(n),
291
- unit: q.unit
340
+ unit: J.unit
292
341
  }),
293
342
  variant: "success"
294
343
  });
295
344
  } catch (t) {
296
- C({
345
+ w({
297
346
  title: e("healthybowl.fieldMapPage.toast.saveFailed.title", "Save failed"),
298
347
  description: String(t),
299
348
  variant: "error"
300
349
  });
301
350
  } finally {
302
- gt(!1);
351
+ St(!1);
303
352
  }
304
353
  }
305
354
  }, [
306
- Z,
307
- S,
308
- q,
309
- e,
355
+ gn,
310
356
  C,
357
+ J,
358
+ e,
311
359
  w,
312
- s
313
- ]), Zt = d(async () => {
314
- if (q) {
315
- if (!x(q)) {
316
- C({
360
+ T,
361
+ o
362
+ ]), xn = l(async () => {
363
+ if (J) {
364
+ if (!S(J)) {
365
+ w({
317
366
  title: e("healthybowl.fieldMapPage.toast.noBoundary.title", "No boundary to edit"),
318
367
  description: e("healthybowl.fieldMapPage.toast.deleteNone.description", "This field has no boundary to delete."),
319
368
  variant: "warning"
320
369
  });
321
370
  return;
322
371
  }
323
- if (await re({
372
+ if (await ie({
324
373
  title: e("healthybowl.fieldMapPage.confirmDelete.title", "Delete boundary?"),
325
- message: e("healthybowl.fieldMapPage.confirmDelete.description", "This removes the drawn shape from {{name}}. The field record is kept.", { name: q.name }),
374
+ message: e("healthybowl.fieldMapPage.confirmDelete.description", "This removes the drawn shape from {{name}}. The field record is kept.", { name: J.name }),
326
375
  okButtonTitle: e("healthybowl.common.delete", "Delete")
327
376
  })) try {
328
- await w({ variables: { input: {
329
- id: q.id,
377
+ await T({ variables: { input: {
378
+ id: J.id,
330
379
  boundary: null,
331
- context: { workspaceId: s }
332
- } } }), await S(), C({
380
+ context: { workspaceId: o }
381
+ } } }), await C(), w({
333
382
  title: e("healthybowl.fieldMapPage.toast.boundaryDeleted.title", "Boundary removed"),
334
383
  description: e("healthybowl.fieldMapPage.toast.boundaryDeleted.description", "The drawn shape was cleared."),
335
384
  variant: "success"
336
385
  });
337
386
  } catch (t) {
338
- C({
387
+ w({
339
388
  title: e("healthybowl.fieldMapPage.toast.saveFailed.title", "Save failed"),
340
389
  description: String(t),
341
390
  variant: "error"
@@ -343,440 +392,440 @@ var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
343
392
  }
344
393
  }
345
394
  }, [
346
- re,
347
- S,
348
- q,
349
- e,
395
+ ie,
350
396
  C,
397
+ J,
398
+ e,
351
399
  w,
352
- s
353
- ]), Q = d(() => {
354
- V.current?.clearLayers(), jt.current = [], _t(null);
355
- }, []), Qt = d(() => {
356
- let e = V.current;
400
+ T,
401
+ o
402
+ ]), $ = l(() => {
403
+ W.current?.clearLayers(), Jt.current = [], Ct(null);
404
+ }, []), Sn = l(() => {
405
+ let e = W.current;
357
406
  if (!e) return;
358
407
  e.clearLayers();
359
- let t = jt.current;
408
+ let t = Jt.current;
360
409
  t.forEach((t) => {
361
- b.default.circleMarker(t, {
410
+ x.default.circleMarker(t, {
362
411
  radius: 4,
363
412
  color: "#38bdf8",
364
413
  weight: 2,
365
414
  fillColor: "#fff",
366
415
  fillOpacity: 1
367
416
  }).addTo(e);
368
- }), t.length >= 2 && b.default.polyline(t, Ue).addTo(e);
417
+ }), t.length >= 2 && x.default.polyline(t, Je).addTo(e);
369
418
  let n = 0;
370
419
  for (let e = 1; e < t.length; e++) n += t[e - 1].distanceTo(t[e]);
371
420
  let r = null;
372
421
  if (t.length >= 3) {
373
- let e = u(t.map((e) => ({
422
+ let e = c(t.map((e) => ({
374
423
  lat: e.lat,
375
424
  lng: e.lng
376
425
  })));
377
- e && (r = ie(e));
426
+ e && (r = oe(e));
378
427
  }
379
- _t({
428
+ Ct({
380
429
  distance: n,
381
430
  area: r
382
431
  });
383
- }, []), $t = d(() => {
384
- k(null), Q(), K.current = "measure", D("measure"), _t({
432
+ }, []), Cn = l(() => {
433
+ A(null), $(), q.current = "measure", O("measure"), Ct({
385
434
  distance: 0,
386
435
  area: null
387
436
  });
388
- }, [Q]), en = d(() => {
389
- Q(), K.current = "view", D("view");
390
- }, [Q]), tn = d((e) => {
391
- if (R.current) if (K.current === "draw") {
392
- H.current.push(e.latlng);
393
- let t = H.current.length === 1, n = b.default.circleMarker(e.latlng, {
437
+ }, [$]), wn = l(() => {
438
+ $(), q.current = "view", O("view");
439
+ }, [$]), Tn = l((e) => {
440
+ if (V.current) if (q.current === "draw") {
441
+ G.current.push(e.latlng);
442
+ let t = G.current.length === 1, n = x.default.circleMarker(e.latlng, {
394
443
  radius: t ? 7 : 5,
395
444
  color: "#fff",
396
445
  weight: 2,
397
446
  fillColor: t ? "#16a34a" : "#f59e0b",
398
447
  fillOpacity: 1
399
- }).addTo(z.current);
448
+ }).addTo(H.current);
400
449
  t && n.on("click", (e) => {
401
- b.default.DomEvent.stopPropagation(e), Wt();
402
- }), ut(H.current.length), Ut();
403
- } else K.current === "measure" && (jt.current.push(e.latlng), Qt());
450
+ x.default.DomEvent.stopPropagation(e), pn();
451
+ }), gt(G.current.length), fn();
452
+ } else q.current === "measure" && (Jt.current.push(e.latlng), Sn());
404
453
  }, [
405
- Wt,
406
- Qt,
407
- Ut
408
- ]), nn = d(async (n) => {
454
+ pn,
455
+ Sn,
456
+ fn
457
+ ]), En = l(async (n) => {
409
458
  n.preventDefault();
410
- let r = R.current, i = at.trim();
459
+ let r = V.current, i = dt.trim();
411
460
  if (!r || !i) return;
412
461
  let a = i.match(/^(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)$/);
413
462
  if (a) {
414
- r.flyTo([Number(a[1]), Number(a[2])], Re, { duration: .6 });
463
+ r.flyTo([Number(a[1]), Number(a[2])], Ue, { duration: .6 });
415
464
  return;
416
465
  }
417
- ct(!0);
466
+ mt(!0);
418
467
  try {
419
468
  let n = await t(i);
420
469
  if (!n) {
421
- C({
470
+ w({
422
471
  title: e("healthybowl.fieldMapPage.toast.placeNotFound.title", "Place not found"),
423
472
  description: e("healthybowl.fieldMapPage.toast.placeNotFound.description", "Try a more specific place name."),
424
473
  variant: "warning"
425
474
  });
426
475
  return;
427
476
  }
428
- r.flyTo([n.latitude, n.longitude], Re, { duration: .6 });
477
+ r.flyTo([n.latitude, n.longitude], Ue, { duration: .6 });
429
478
  } catch (t) {
430
- C({
479
+ w({
431
480
  title: e("healthybowl.fieldMapPage.toast.searchFailed.title", "Search failed"),
432
481
  description: t instanceof Error ? t.message : String(t),
433
482
  variant: "error"
434
483
  });
435
484
  } finally {
436
- ct(!1);
485
+ mt(!1);
437
486
  }
438
487
  }, [
439
- at,
488
+ dt,
440
489
  e,
441
- C
442
- ]), rn = d(async () => {
443
- if (F) {
444
- if (!L.trim()) {
445
- C({
490
+ w
491
+ ]), Dn = l(async () => {
492
+ if (R) {
493
+ if (!B.trim()) {
494
+ w({
446
495
  title: e("healthybowl.fieldMapPage.toast.nameRequired.title", "Name required"),
447
496
  description: e("healthybowl.fieldMapPage.toast.nameRequired.description", "Give the new field a name."),
448
497
  variant: "warning"
449
498
  });
450
499
  return;
451
500
  }
452
- yt(!0);
501
+ Nt(!0);
453
502
  try {
454
- let [t, n] = F.centroid, r = await Ye({
455
- name: L.trim(),
456
- area: F.area,
503
+ let [t, n] = R.centroid, r = await tt({
504
+ name: B.trim(),
505
+ area: R.area,
457
506
  unit: "acres",
458
- soilType: xt,
459
- irrigationType: Ct,
507
+ soilType: Ft,
508
+ irrigationType: Lt,
460
509
  organicCertified: !1,
461
- status: Tt,
510
+ status: zt,
462
511
  crops: [],
463
512
  location: {
464
513
  lat: t,
465
514
  lng: n
466
515
  }
467
516
  });
468
- r?.id && await w({ variables: { input: {
517
+ r?.id && await T({ variables: { input: {
469
518
  id: r.id,
470
- boundary: F.boundary,
471
- area: F.area,
472
- context: { workspaceId: s }
473
- } } }), await S(), I(null), r?.id && k(r.id), C({
519
+ boundary: R.boundary,
520
+ area: R.area,
521
+ context: { workspaceId: o }
522
+ } } }), await C(), z(null), r?.id && A(r.id), w({
474
523
  title: e("healthybowl.fieldMapPage.toast.fieldCreated.title", "Field created"),
475
524
  description: e("healthybowl.fieldMapPage.toast.fieldCreated.description", "{{name}} saved at {{area}} acres.", {
476
- name: L.trim(),
477
- area: String(F.area)
525
+ name: B.trim(),
526
+ area: String(R.area)
478
527
  }),
479
528
  variant: "success"
480
529
  });
481
530
  } catch (t) {
482
- C({
531
+ w({
483
532
  title: e("healthybowl.fieldMapPage.toast.createFailed.title", "Create failed"),
484
533
  description: String(t),
485
534
  variant: "error"
486
535
  });
487
536
  } finally {
488
- yt(!1);
537
+ Nt(!1);
489
538
  }
490
539
  }
491
540
  }, [
492
- Ye,
493
- Ct,
494
- L,
495
- xt,
496
- Tt,
497
- F,
498
- S,
499
- e,
541
+ tt,
542
+ Lt,
543
+ B,
544
+ Ft,
545
+ zt,
546
+ R,
500
547
  C,
548
+ e,
501
549
  w,
502
- s
550
+ T,
551
+ o
503
552
  ]);
504
- f(() => {
505
- let e = Dt.current;
553
+ u(() => {
554
+ let e = Vt.current;
506
555
  if (!e) return;
507
- ne();
508
- let t = b.default.tileLayer(Ne, {
509
- attribution: Pe,
510
- maxZoom: Le,
556
+ re();
557
+ let t = x.default.tileLayer(Re, {
558
+ attribution: ze,
559
+ maxZoom: He,
511
560
  maxNativeZoom: 18
512
- }), n = b.default.tileLayer(Fe, {
513
- attribution: Ie,
514
- maxZoom: Le,
561
+ }), n = x.default.tileLayer(Be, {
562
+ attribution: Ve,
563
+ maxZoom: He,
515
564
  maxNativeZoom: 17,
516
565
  opacity: .65
517
566
  });
518
- Ot.current = t, kt.current = n;
519
- let r = b.default.map(e, {
567
+ Ht.current = t, Ut.current = n;
568
+ let r = x.default.map(e, {
520
569
  center: [20, 78],
521
570
  zoom: 4,
522
571
  scrollWheelZoom: !0,
523
- maxZoom: Le,
572
+ maxZoom: He,
524
573
  layers: [t]
525
574
  });
526
- return R.current = r, At.current = b.default.layerGroup().addTo(r), z.current = b.default.layerGroup().addTo(r), B.current = b.default.layerGroup().addTo(r), V.current = b.default.layerGroup().addTo(r), r.on("click", tn), Qe("ready"), window.setTimeout(() => r.invalidateSize(), 80), () => {
527
- r.off("click", tn), r.remove(), R.current = null, Ot.current = null, kt.current = null, At.current = null, z.current = null, B.current = null, V.current = null;
575
+ return V.current = r, Wt.current = x.default.layerGroup().addTo(r), Gt.current = x.default.layerGroup().addTo(r), H.current = x.default.layerGroup().addTo(r), U.current = x.default.layerGroup().addTo(r), W.current = x.default.layerGroup().addTo(r), r.on("click", Tn), it("ready"), window.setTimeout(() => r.invalidateSize(), 80), () => {
576
+ r.off("click", Tn), r.remove(), V.current = null, Ht.current = null, Ut.current = null, Wt.current = null, Gt.current = null, H.current = null, U.current = null, W.current = null;
528
577
  };
529
- }, []), f(() => {
530
- let e = R.current, t = kt.current;
531
- !e || !t || (A ? t.addTo(e) : e.removeLayer(t));
532
- }, [A]);
533
- let an = !ze.crops && c.length === 0, on = P ? P.distance >= 1e3 ? `${(P.distance / 1e3).toFixed(2)} km` : `${P.distance.toFixed(0)} m` : "";
534
- if (Ge.crops && c.length === 0) return /* @__PURE__ */ g(r, {
578
+ }, []), u(() => {
579
+ let e = V.current, t = Ut.current;
580
+ !e || !t || (j ? t.addTo(e) : e.removeLayer(t));
581
+ }, [j]);
582
+ let On = !We.crops && s.length === 0, kn = F ? F.distance >= 1e3 ? `${(F.distance / 1e3).toFixed(2)} km` : `${F.distance.toFixed(0)} m` : "";
583
+ if (Ze.crops && s.length === 0) return /* @__PURE__ */ m(r, {
535
584
  title: e("healthybowl.fieldMapPage.title", "Field Map"),
536
585
  titleAccent: e("healthybowl.fieldMapPage.titleAccent", "Map"),
537
586
  description: e("healthybowl.fieldMapPage.description", "Draw and manage your field boundaries on satellite imagery."),
538
- children: /* @__PURE__ */ g(i, { onRetry: S })
587
+ children: /* @__PURE__ */ m(i, { onRetry: C })
539
588
  });
540
- let $ = (e, t, n, r) => /* @__PURE__ */ _("button", {
589
+ let An = (e, t, n, r) => /* @__PURE__ */ h("button", {
541
590
  type: "button",
542
591
  onClick: t,
543
592
  "aria-pressed": e,
544
593
  className: `flex flex-col items-center gap-1 rounded-md px-3 py-1.5 text-[11px] font-medium transition-colors ${e ? "bg-success text-white" : "text-text-primary hover:bg-bg-sunken"}`,
545
594
  children: [n, r]
546
595
  });
547
- return /* @__PURE__ */ _(r, {
596
+ return /* @__PURE__ */ h(r, {
548
597
  title: e("healthybowl.fieldMapPage.title", "Field Map"),
549
598
  titleAccent: e("healthybowl.fieldMapPage.titleAccent", "Map"),
550
599
  hero: !0,
551
600
  description: e("healthybowl.fieldMapPage.description", "Draw and manage your field boundaries on satellite imagery."),
552
601
  purpose: "Trace each plot on the aerial view to auto-calculate its acreage, shade fields by soil type, overlay terrain, and see your whole holding at a glance. Click any field in the list to fly straight to it.",
553
602
  children: [
554
- /* @__PURE__ */ _("div", {
603
+ /* @__PURE__ */ h("div", {
555
604
  className: "flex flex-col gap-4 lg:flex-row",
556
- children: [/* @__PURE__ */ _("div", {
605
+ children: [/* @__PURE__ */ h("div", {
557
606
  className: "min-w-0 flex-1 space-y-3",
558
607
  children: [
559
- /* @__PURE__ */ _("form", {
608
+ /* @__PURE__ */ h("form", {
560
609
  className: "flex gap-2",
561
- onSubmit: nn,
562
- children: [/* @__PURE__ */ _("div", {
610
+ onSubmit: En,
611
+ children: [/* @__PURE__ */ h("div", {
563
612
  className: "relative min-w-0 flex-1",
564
- children: [/* @__PURE__ */ g(xe, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ g("input", {
613
+ children: [/* @__PURE__ */ m(ke, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ m("input", {
565
614
  type: "search",
566
- value: at,
567
- onChange: (e) => ot(e.target.value),
615
+ value: dt,
616
+ onChange: (e) => ft(e.target.value),
568
617
  placeholder: e("healthybowl.fieldMapPage.placeSearch.placeholder", "Find your farm — village, city, or lat,lng…"),
569
618
  "aria-label": e("healthybowl.fieldMapPage.placeSearch.label", "Locate a place on the map"),
570
619
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
571
620
  })]
572
- }), /* @__PURE__ */ _(v, {
621
+ }), /* @__PURE__ */ h(g, {
573
622
  type: "submit",
574
623
  variant: "outline",
575
624
  size: "sm",
576
- disabled: T !== "ready" || st,
625
+ disabled: E !== "ready" || pt,
577
626
  children: [
578
- /* @__PURE__ */ g(he, { className: "h-4 w-4" }),
627
+ /* @__PURE__ */ m(Ce, { className: "h-4 w-4" }),
579
628
  " ",
580
- st ? e("healthybowl.fieldMapPage.placeSearch.searching", "Locating…") : e("healthybowl.fieldMapPage.placeSearch.action", "Locate")
629
+ pt ? e("healthybowl.fieldMapPage.placeSearch.searching", "Locating…") : e("healthybowl.fieldMapPage.placeSearch.action", "Locate")
581
630
  ]
582
631
  })]
583
632
  }),
584
- /* @__PURE__ */ _("div", {
633
+ /* @__PURE__ */ h("div", {
585
634
  className: "relative",
586
635
  children: [
587
- /* @__PURE__ */ g("div", {
588
- ref: Dt,
636
+ /* @__PURE__ */ m("div", {
637
+ ref: Vt,
589
638
  className: "h-[70vh] max-h-[640px] w-full overflow-hidden rounded-lg border border-border-subtle bg-bg-sunken"
590
639
  }),
591
- T === "ready" && /* @__PURE__ */ _("div", {
640
+ E === "ready" && /* @__PURE__ */ h("div", {
592
641
  className: "absolute right-3 top-3 z-[1000] flex items-center gap-1 rounded-lg border border-border-subtle bg-bg-surface/95 p-1 shadow-md",
593
642
  children: [
594
- $(E === "draw", () => E === "draw" ? Kt() : Gt(), /* @__PURE__ */ g(_e, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.polygon", "Polygon")),
595
- $(E === "edit", () => E === "edit" ? Yt() : Jt(), /* @__PURE__ */ g(Se, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.vertices", "Vertices")),
596
- $(!1, Zt, /* @__PURE__ */ g(Ce, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.delete", "Delete")),
597
- $(E === "measure", () => E === "measure" ? en() : $t(), /* @__PURE__ */ g(ye, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.measure", "Measure"))
643
+ An(D === "draw", () => D === "draw" ? hn() : mn(), /* @__PURE__ */ m(Te, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.polygon", "Polygon")),
644
+ An(D === "edit", () => D === "edit" ? yn() : vn(), /* @__PURE__ */ m(Ae, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.vertices", "Vertices")),
645
+ An(!1, xn, /* @__PURE__ */ m(je, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.delete", "Delete")),
646
+ An(D === "measure", () => D === "measure" ? wn() : Cn(), /* @__PURE__ */ m(De, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.measure", "Measure"))
598
647
  ]
599
648
  }),
600
- E === "draw" && /* @__PURE__ */ _("div", {
649
+ D === "draw" && /* @__PURE__ */ h("div", {
601
650
  className: "absolute left-1/2 top-3 z-[1000] flex -translate-x-1/2 items-center gap-2 rounded-full bg-bg-surface/95 px-3 py-1.5 text-xs text-text-primary shadow-md",
602
651
  children: [
603
- /* @__PURE__ */ g("span", { children: e("healthybowl.fieldMapPage.drawHint", "Click the map to add corners ({{count}}) — click the first point or Finish.", { count: String(lt) }) }),
604
- /* @__PURE__ */ _(v, {
652
+ /* @__PURE__ */ m("span", { children: e("healthybowl.fieldMapPage.drawHint", "Click the map to add corners ({{count}}) — click the first point or Finish.", { count: String(ht) }) }),
653
+ /* @__PURE__ */ h(g, {
605
654
  size: "sm",
606
655
  variant: "default",
607
- onClick: Wt,
656
+ onClick: pn,
608
657
  children: [
609
- /* @__PURE__ */ g(pe, { className: "h-3.5 w-3.5" }),
658
+ /* @__PURE__ */ m(be, { className: "h-3.5 w-3.5" }),
610
659
  " ",
611
660
  e("healthybowl.fieldMapPage.finish", "Finish")
612
661
  ]
613
662
  }),
614
- /* @__PURE__ */ g(v, {
663
+ /* @__PURE__ */ m(g, {
615
664
  size: "sm",
616
665
  variant: "outline",
617
- onClick: Kt,
618
- children: /* @__PURE__ */ g(we, { className: "h-3.5 w-3.5" })
666
+ onClick: hn,
667
+ children: /* @__PURE__ */ m(Me, { className: "h-3.5 w-3.5" })
619
668
  })
620
669
  ]
621
670
  }),
622
- E === "edit" && /* @__PURE__ */ _("div", {
671
+ D === "edit" && /* @__PURE__ */ h("div", {
623
672
  className: "absolute left-1/2 top-3 z-[1000] flex -translate-x-1/2 items-center gap-2 rounded-full bg-bg-surface/95 px-3 py-1.5 text-xs text-text-primary shadow-md",
624
673
  children: [
625
- /* @__PURE__ */ g("span", { children: e("healthybowl.fieldMapPage.editHint", "Drag handles to reshape · {{area}} {{unit}}", {
626
- area: String(dt ?? ""),
627
- unit: q?.unit ?? "acres"
674
+ /* @__PURE__ */ m("span", { children: e("healthybowl.fieldMapPage.editHint", "Drag handles to reshape · {{area}} {{unit}}", {
675
+ area: String(_t ?? ""),
676
+ unit: J?.unit ?? "acres"
628
677
  }) }),
629
- /* @__PURE__ */ _(v, {
678
+ /* @__PURE__ */ h(g, {
630
679
  size: "sm",
631
680
  variant: "default",
632
- onClick: Xt,
633
- disabled: !pt || ht,
681
+ onClick: bn,
682
+ disabled: !yt || xt,
634
683
  children: [
635
- /* @__PURE__ */ g(be, { className: "h-3.5 w-3.5" }),
684
+ /* @__PURE__ */ m(Oe, { className: "h-3.5 w-3.5" }),
636
685
  " ",
637
- ht ? e("healthybowl.fieldMapPage.saving", "Saving…") : e("healthybowl.fieldMapPage.save", "Save")
686
+ xt ? e("healthybowl.fieldMapPage.saving", "Saving…") : e("healthybowl.fieldMapPage.save", "Save")
638
687
  ]
639
688
  }),
640
- /* @__PURE__ */ g(v, {
689
+ /* @__PURE__ */ m(g, {
641
690
  size: "sm",
642
691
  variant: "outline",
643
- onClick: Yt,
644
- children: /* @__PURE__ */ g(we, { className: "h-3.5 w-3.5" })
692
+ onClick: yn,
693
+ children: /* @__PURE__ */ m(Me, { className: "h-3.5 w-3.5" })
645
694
  })
646
695
  ]
647
696
  }),
648
- E === "measure" && P && /* @__PURE__ */ _("div", {
697
+ D === "measure" && F && /* @__PURE__ */ h("div", {
649
698
  className: "absolute left-1/2 top-3 z-[1000] flex -translate-x-1/2 items-center gap-3 rounded-full bg-bg-surface/95 px-3 py-1.5 text-xs text-text-primary shadow-md",
650
699
  children: [
651
- /* @__PURE__ */ _("span", { children: [e("healthybowl.fieldMapPage.measure.distance", "Distance: {{d}}", { d: on }), P.area != null && ` · ${e("healthybowl.fieldMapPage.measure.area", "Area: {{a}} ac", { a: (P.area / 4046.8564224).toFixed(2) })}`] }),
652
- /* @__PURE__ */ g(v, {
700
+ /* @__PURE__ */ h("span", { children: [e("healthybowl.fieldMapPage.measure.distance", "Distance: {{d}}", { d: kn }), F.area != null && ` · ${e("healthybowl.fieldMapPage.measure.area", "Area: {{a}} ac", { a: (F.area / 4046.8564224).toFixed(2) })}`] }),
701
+ /* @__PURE__ */ m(g, {
653
702
  size: "sm",
654
703
  variant: "outline",
655
- onClick: Q,
704
+ onClick: $,
656
705
  children: e("healthybowl.fieldMapPage.measure.reset", "Reset")
657
706
  }),
658
- /* @__PURE__ */ g(v, {
707
+ /* @__PURE__ */ m(g, {
659
708
  size: "sm",
660
709
  variant: "outline",
661
- onClick: en,
662
- children: /* @__PURE__ */ g(we, { className: "h-3.5 w-3.5" })
710
+ onClick: wn,
711
+ children: /* @__PURE__ */ m(Me, { className: "h-3.5 w-3.5" })
663
712
  })
664
713
  ]
665
714
  }),
666
- T === "ready" && /* @__PURE__ */ _("div", {
715
+ E === "ready" && /* @__PURE__ */ h("div", {
667
716
  className: "absolute bottom-3 left-3 z-[1000] rounded-lg border border-border-subtle bg-bg-surface/95 p-3 text-xs shadow-md",
668
717
  children: [
669
- /* @__PURE__ */ _("div", {
718
+ /* @__PURE__ */ h("div", {
670
719
  className: "mb-1.5 flex items-center gap-1.5 font-semibold text-text-primary",
671
720
  children: [
672
- /* @__PURE__ */ g(me, { className: "h-3.5 w-3.5" }),
721
+ /* @__PURE__ */ m(xe, { className: "h-3.5 w-3.5" }),
673
722
  " ",
674
723
  e("healthybowl.fieldMapPage.layers.title", "Layers")
675
724
  ]
676
725
  }),
677
- /* @__PURE__ */ _("label", {
726
+ /* @__PURE__ */ h("label", {
678
727
  className: "flex items-center gap-2 py-0.5 text-text-secondary",
679
- children: [/* @__PURE__ */ g("input", {
728
+ children: [/* @__PURE__ */ m("input", {
680
729
  type: "checkbox",
681
730
  checked: !0,
682
731
  readOnly: !0,
683
732
  className: "h-3.5 w-3.5 accent-[var(--color-success)]"
684
733
  }), e("healthybowl.fieldMapPage.layers.satellite", "Satellite")]
685
734
  }),
686
- /* @__PURE__ */ _("label", {
735
+ /* @__PURE__ */ h("label", {
687
736
  className: "flex cursor-pointer items-center gap-2 py-0.5 text-text-primary",
688
- children: [/* @__PURE__ */ g("input", {
737
+ children: [/* @__PURE__ */ m("input", {
689
738
  type: "checkbox",
690
- checked: A,
691
- onChange: (e) => $e(e.target.checked),
739
+ checked: j,
740
+ onChange: (e) => at(e.target.checked),
692
741
  className: "h-3.5 w-3.5 accent-[var(--color-success)]"
693
742
  }), e("healthybowl.fieldMapPage.layers.terrain", "Terrain")]
694
743
  }),
695
- /* @__PURE__ */ _("label", {
744
+ /* @__PURE__ */ h("label", {
696
745
  className: "flex cursor-pointer items-center gap-2 py-0.5 text-text-primary",
697
- children: [/* @__PURE__ */ g("input", {
746
+ children: [/* @__PURE__ */ m("input", {
698
747
  type: "checkbox",
699
- checked: j,
700
- onChange: (e) => et(e.target.checked),
748
+ checked: M,
749
+ onChange: (e) => ot(e.target.checked),
701
750
  className: "h-3.5 w-3.5 accent-[var(--color-success)]"
702
751
  }), e("healthybowl.fieldMapPage.layers.soil", "Soil type")]
703
752
  }),
704
- /* @__PURE__ */ _("label", {
753
+ /* @__PURE__ */ h("label", {
705
754
  className: "flex cursor-pointer items-center gap-2 py-0.5 text-text-primary",
706
- children: [/* @__PURE__ */ g("input", {
755
+ children: [/* @__PURE__ */ m("input", {
707
756
  type: "checkbox",
708
- checked: M,
709
- onChange: (e) => tt(e.target.checked),
757
+ checked: N,
758
+ onChange: (e) => st(e.target.checked),
710
759
  className: "h-3.5 w-3.5 accent-[var(--color-success)]"
711
760
  }), e("healthybowl.fieldMapPage.layers.elevation", "Elevation")]
712
761
  })
713
762
  ]
714
763
  }),
715
- T === "ready" && M && /* @__PURE__ */ _("div", {
764
+ E === "ready" && N && /* @__PURE__ */ h("div", {
716
765
  className: "absolute bottom-3 right-3 z-[1000] rounded-lg border border-border-subtle bg-bg-surface/95 p-3 text-xs shadow-md",
717
- children: [/* @__PURE__ */ g("div", {
766
+ children: [/* @__PURE__ */ m("div", {
718
767
  className: "mb-1.5 font-semibold text-text-primary",
719
768
  children: e("healthybowl.fieldMapPage.elevationLegend.title", "Elevation")
720
- }), zt ? /* @__PURE__ */ _(Te, { children: [/* @__PURE__ */ g("span", {
769
+ }), nn ? /* @__PURE__ */ h(Ne, { children: [/* @__PURE__ */ m("span", {
721
770
  className: "block h-2 w-40 rounded-full",
722
771
  style: { background: "linear-gradient(to right, #16a34a, #f59e0b, #dc2626)" }
723
- }), /* @__PURE__ */ _("div", {
772
+ }), /* @__PURE__ */ h("div", {
724
773
  className: "mt-1 flex justify-between gap-3 text-text-secondary",
725
- children: [/* @__PURE__ */ g("span", { children: e("healthybowl.fieldMapPage.elevationLegend.low", "{{value}} m Low", { value: String(Math.round(Lt)) }) }), /* @__PURE__ */ g("span", { children: e("healthybowl.fieldMapPage.elevationLegend.high", "{{value}} m High", { value: String(Math.round(Rt)) }) })]
726
- })] }) : /* @__PURE__ */ g("span", {
774
+ children: [/* @__PURE__ */ m("span", { children: e("healthybowl.fieldMapPage.elevationLegend.low", "{{value}} m Low", { value: String(Math.round(en)) }) }), /* @__PURE__ */ m("span", { children: e("healthybowl.fieldMapPage.elevationLegend.high", "{{value}} m High", { value: String(Math.round(tn)) }) })]
775
+ })] }) : /* @__PURE__ */ m("span", {
727
776
  className: "text-text-secondary",
728
777
  children: e("healthybowl.fieldMapPage.elevationLegend.loading", "Loading elevation…")
729
778
  })]
730
779
  }),
731
- T === "ready" && j && !M && Ft.length > 0 && /* @__PURE__ */ _("div", {
780
+ E === "ready" && M && !N && Qt.length > 0 && /* @__PURE__ */ h("div", {
732
781
  className: "absolute bottom-3 right-3 z-[1000] rounded-lg border border-border-subtle bg-bg-surface/95 p-3 text-xs shadow-md",
733
- children: [/* @__PURE__ */ g("div", {
782
+ children: [/* @__PURE__ */ m("div", {
734
783
  className: "mb-1.5 font-semibold text-text-primary",
735
784
  children: e("healthybowl.fieldMapPage.soilLegend.title", "Soil Legend")
736
- }), Ft.map((t) => /* @__PURE__ */ _("div", {
785
+ }), Qt.map((t) => /* @__PURE__ */ h("div", {
737
786
  className: "flex items-center gap-2 py-0.5 text-text-secondary",
738
- children: [/* @__PURE__ */ g("span", {
787
+ children: [/* @__PURE__ */ m("span", {
739
788
  className: "inline-block h-3 w-3 rounded-sm",
740
789
  style: { backgroundColor: t.color }
741
790
  }), e(`healthybowl.fieldMapPage.soil.${t.key}`, t.label)]
742
791
  }, t.key))]
743
792
  }),
744
- T === "ready" && A && /* @__PURE__ */ _("div", {
793
+ E === "ready" && j && /* @__PURE__ */ h("div", {
745
794
  className: "absolute left-3 top-3 z-[1000] rounded-lg border border-border-subtle bg-bg-surface/95 px-3 py-2 text-[11px] text-text-secondary shadow-md",
746
- children: [/* @__PURE__ */ g("div", {
795
+ children: [/* @__PURE__ */ m("div", {
747
796
  className: "font-semibold text-text-primary",
748
797
  children: e("healthybowl.fieldMapPage.terrainLegend.title", "Terrain / Elevation")
749
- }), /* @__PURE__ */ _("div", {
798
+ }), /* @__PURE__ */ h("div", {
750
799
  className: "mt-1 flex items-center gap-2",
751
- children: [/* @__PURE__ */ g("span", { className: "inline-block h-2 w-16 rounded-full bg-gradient-to-r from-green-600 via-yellow-400 to-orange-500" }), /* @__PURE__ */ g("span", { children: e("healthybowl.fieldMapPage.terrainLegend.scale", "low → high (contours)") })]
800
+ children: [/* @__PURE__ */ m("span", { className: "inline-block h-2 w-16 rounded-full bg-gradient-to-r from-green-600 via-yellow-400 to-orange-500" }), /* @__PURE__ */ m("span", { children: e("healthybowl.fieldMapPage.terrainLegend.scale", "low → high (contours)") })]
752
801
  })]
753
802
  }),
754
- (T === "loading" || ze.crops && c.length === 0) && /* @__PURE__ */ g("div", {
803
+ (E === "loading" || We.crops && s.length === 0) && /* @__PURE__ */ m("div", {
755
804
  className: "pointer-events-none absolute inset-0 z-[900] flex items-center justify-center rounded-lg bg-bg-surface/60 text-sm text-text-secondary",
756
805
  children: e("healthybowl.fieldMapPage.loading", "Loading map…")
757
806
  }),
758
- an && T === "ready" && E === "view" && /* @__PURE__ */ g("div", {
807
+ On && E === "ready" && D === "view" && /* @__PURE__ */ m("div", {
759
808
  className: "absolute inset-0 z-[950] flex items-center justify-center p-6",
760
- children: /* @__PURE__ */ _("div", {
809
+ children: /* @__PURE__ */ h("div", {
761
810
  className: "max-w-sm rounded-xl border border-border-subtle bg-bg-surface/95 p-6 text-center shadow-lg",
762
811
  children: [
763
- /* @__PURE__ */ g("div", {
812
+ /* @__PURE__ */ m("div", {
764
813
  className: "mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-success/15",
765
- children: /* @__PURE__ */ g(ge, { className: "h-6 w-6 text-success" })
814
+ children: /* @__PURE__ */ m(we, { className: "h-6 w-6 text-success" })
766
815
  }),
767
- /* @__PURE__ */ g("h3", {
816
+ /* @__PURE__ */ m("h3", {
768
817
  className: "text-lg font-semibold text-text-primary",
769
818
  children: e("healthybowl.fieldMapPage.empty.title", "No field boundaries yet")
770
819
  }),
771
- /* @__PURE__ */ g("p", {
820
+ /* @__PURE__ */ m("p", {
772
821
  className: "mt-1 text-sm text-text-secondary",
773
822
  children: e("healthybowl.fieldMapPage.empty.description", "Draw the shape of each field on the satellite view to auto-calculate its area and unlock soil & terrain overlays.")
774
823
  }),
775
- /* @__PURE__ */ _(v, {
824
+ /* @__PURE__ */ h(g, {
776
825
  className: "mt-4",
777
- onClick: Gt,
826
+ onClick: mn,
778
827
  children: [
779
- /* @__PURE__ */ g(ve, { className: "h-4 w-4" }),
828
+ /* @__PURE__ */ m(Ee, { className: "h-4 w-4" }),
780
829
  " ",
781
830
  e("healthybowl.fieldMapPage.empty.action", "Draw Your First Field")
782
831
  ]
@@ -786,294 +835,406 @@ var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
786
835
  })
787
836
  ]
788
837
  }),
789
- /* @__PURE__ */ g("p", {
838
+ /* @__PURE__ */ m("p", {
790
839
  className: "text-xs text-text-secondary",
791
840
  children: e("healthybowl.fieldMapPage.attribution", "Imagery © Esri, Maxar, Earthstar Geographics · terrain © OpenTopoMap / OpenStreetMap")
792
841
  })
793
842
  ]
794
- }), /* @__PURE__ */ _("aside", {
843
+ }), /* @__PURE__ */ h("aside", {
795
844
  className: "shrink-0 space-y-4 lg:w-80",
796
- children: [/* @__PURE__ */ _("div", {
797
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
798
- children: [
799
- /* @__PURE__ */ g("h2", {
800
- className: "text-base font-semibold text-text-primary",
801
- children: e("healthybowl.fieldMapPage.panel.title", "Fields")
802
- }),
803
- /* @__PURE__ */ g("p", {
804
- className: "mt-0.5 text-xs text-text-secondary",
805
- children: e("healthybowl.fieldMapPage.panel.summary", "{{acres}} acres · {{count}} fields · {{mapped}} mapped", {
806
- acres: Pt.toFixed(1),
807
- count: String(c.length),
808
- mapped: String(Nt)
809
- })
810
- }),
811
- /* @__PURE__ */ _("div", {
812
- className: "relative mt-3",
813
- children: [/* @__PURE__ */ g(xe, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ g("input", {
814
- type: "search",
815
- value: rt,
816
- onChange: (e) => it(e.target.value),
817
- placeholder: e("healthybowl.fieldMapPage.panel.search", "Search fields…"),
818
- className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
819
- })]
820
- }),
821
- /* @__PURE__ */ _("div", {
822
- className: "mt-3 max-h-[38vh] space-y-1 overflow-y-auto",
823
- children: [It.map((t) => {
824
- let n = x(t) !== null;
825
- return /* @__PURE__ */ _("button", {
826
- type: "button",
827
- "data-field-id": t.id,
828
- onClick: () => Ht(t),
829
- className: `flex w-full items-center gap-3 rounded-md border px-2.5 py-2 text-left transition-colors ${t.id === O ? "border-success bg-success/10" : "border-transparent hover:bg-bg-sunken"}`,
830
- children: [
831
- /* @__PURE__ */ g("span", {
832
- className: "mt-0.5 inline-block h-4 w-4 shrink-0 rounded",
833
- style: { backgroundColor: se(t.soilType) }
834
- }),
835
- /* @__PURE__ */ _("span", {
836
- className: "min-w-0 flex-1",
837
- children: [/* @__PURE__ */ g("span", {
838
- className: "block truncate text-sm font-medium text-text-primary",
839
- children: t.name
840
- }), /* @__PURE__ */ _("span", {
841
- className: "block truncate text-xs text-text-secondary",
842
- children: [
843
- qe(t),
844
- " ·",
845
- " ",
846
- t.soilType || e("healthybowl.fieldMapPage.unknownSoil", "Unknown soil"),
847
- N[t.id] != null && ` · ${e("healthybowl.fieldMapPage.detail.elevationValue", "{{value}} m", { value: String(Math.round(N[t.id])) })}`
848
- ]
849
- })]
850
- }),
851
- !n && /* @__PURE__ */ g("span", {
852
- className: "shrink-0 rounded-full bg-warning/20 px-1.5 py-0.5 text-[10px] font-medium text-warning",
853
- children: e("healthybowl.fieldMapPage.unmapped", "no boundary")
854
- })
855
- ]
856
- }, t.id);
857
- }), It.length === 0 && /* @__PURE__ */ g("p", {
858
- className: "px-2 py-4 text-center text-xs text-text-secondary",
859
- children: e("healthybowl.fieldMapPage.panel.none", "No fields match your search.")
860
- })]
861
- }),
862
- /* @__PURE__ */ _(v, {
863
- className: "mt-3 w-full",
864
- onClick: Gt,
865
- disabled: E === "draw",
866
- children: [
867
- /* @__PURE__ */ g(ve, { className: "h-4 w-4" }),
868
- " ",
869
- e("healthybowl.fieldMapPage.panel.drawNew", "Draw New Field")
870
- ]
871
- })
872
- ]
873
- }), q && /* @__PURE__ */ _("div", {
874
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
875
- children: [
876
- /* @__PURE__ */ g("h3", {
877
- className: "text-sm font-semibold text-text-primary",
878
- children: e("healthybowl.fieldMapPage.detail.selected", "Selected: {{name}}", { name: q.name })
879
- }),
880
- /* @__PURE__ */ _("dl", {
881
- className: "mt-3 space-y-2 text-sm",
882
- children: [
883
- /* @__PURE__ */ _("div", {
884
- className: "flex justify-between gap-3",
885
- children: [/* @__PURE__ */ g("dt", {
886
- className: "text-text-secondary",
887
- children: e("healthybowl.fieldMapPage.detail.area", "Area")
888
- }), /* @__PURE__ */ _("dd", {
889
- className: "font-medium text-text-primary",
845
+ children: [
846
+ /* @__PURE__ */ h("div", {
847
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
848
+ children: [
849
+ /* @__PURE__ */ m("h2", {
850
+ className: "text-base font-semibold text-text-primary",
851
+ children: e("healthybowl.fieldMapPage.panel.title", "Fields")
852
+ }),
853
+ /* @__PURE__ */ m("p", {
854
+ className: "mt-0.5 text-xs text-text-secondary",
855
+ children: e("healthybowl.fieldMapPage.panel.summary", "{{acres}} acres · {{count}} fields · {{mapped}} mapped", {
856
+ acres: Zt.toFixed(1),
857
+ count: String(s.length),
858
+ mapped: String(Xt)
859
+ })
860
+ }),
861
+ /* @__PURE__ */ h("div", {
862
+ className: "relative mt-3",
863
+ children: [/* @__PURE__ */ m(ke, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ m("input", {
864
+ type: "search",
865
+ value: lt,
866
+ onChange: (e) => ut(e.target.value),
867
+ placeholder: e("healthybowl.fieldMapPage.panel.search", "Search fields…"),
868
+ className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
869
+ })]
870
+ }),
871
+ /* @__PURE__ */ h("div", {
872
+ className: "mt-3 max-h-[38vh] space-y-1 overflow-y-auto",
873
+ children: [$t.map((t) => {
874
+ let n = S(t) !== null;
875
+ return /* @__PURE__ */ h("button", {
876
+ type: "button",
877
+ "data-field-id": t.id,
878
+ onClick: () => un(t),
879
+ className: `flex w-full items-center gap-3 rounded-md border px-2.5 py-2 text-left transition-colors ${t.id === k ? "border-success bg-success/10" : "border-transparent hover:bg-bg-sunken"}`,
890
880
  children: [
891
- q.area,
892
- " ",
893
- q.unit
881
+ /* @__PURE__ */ m("span", {
882
+ className: "mt-0.5 inline-block h-4 w-4 shrink-0 rounded",
883
+ style: { backgroundColor: le(t.soilType) }
884
+ }),
885
+ /* @__PURE__ */ h("span", {
886
+ className: "min-w-0 flex-1",
887
+ children: [/* @__PURE__ */ m("span", {
888
+ className: "block truncate text-sm font-medium text-text-primary",
889
+ children: t.name
890
+ }), /* @__PURE__ */ h("span", {
891
+ className: "block truncate text-xs text-text-secondary",
892
+ children: [
893
+ $e(t),
894
+ " ·",
895
+ " ",
896
+ t.soilType || e("healthybowl.fieldMapPage.unknownSoil", "Unknown soil"),
897
+ P[t.id] != null && ` · ${e("healthybowl.fieldMapPage.detail.elevationValue", "{{value}} m", { value: String(Math.round(P[t.id])) })}`
898
+ ]
899
+ })]
900
+ }),
901
+ !n && /* @__PURE__ */ m("span", {
902
+ className: "shrink-0 rounded-full bg-warning/20 px-1.5 py-0.5 text-[10px] font-medium text-warning",
903
+ children: e("healthybowl.fieldMapPage.unmapped", "no boundary")
904
+ })
894
905
  ]
895
- })]
896
- }),
897
- /* @__PURE__ */ _("div", {
898
- className: "flex justify-between gap-3",
899
- children: [/* @__PURE__ */ g("dt", {
900
- className: "text-text-secondary",
901
- children: e("healthybowl.fieldMapPage.detail.elevation", "Elevation")
902
- }), /* @__PURE__ */ g("dd", {
903
- className: "font-medium text-text-primary",
904
- children: N[q.id] == null ? "—" : e("healthybowl.fieldMapPage.detail.elevationValue", "{{value}} m", { value: String(Math.round(N[q.id])) })
905
- })]
906
- }),
907
- /* @__PURE__ */ _("div", {
908
- className: "flex justify-between gap-3",
909
- children: [/* @__PURE__ */ g("dt", {
910
- className: "text-text-secondary",
911
- children: e("healthybowl.fieldMapPage.detail.soil", "Soil")
912
- }), /* @__PURE__ */ g("dd", {
913
- className: "font-medium text-text-primary",
914
- children: q.soilType || e("healthybowl.fieldMapPage.unknownSoil", "Unknown soil")
915
- })]
916
- }),
917
- /* @__PURE__ */ _("div", {
918
- className: "flex justify-between gap-3",
919
- children: [/* @__PURE__ */ g("dt", {
920
- className: "text-text-secondary",
921
- children: e("healthybowl.fieldMapPage.detail.irrigation", "Irrigation")
922
- }), /* @__PURE__ */ g("dd", {
923
- className: "font-medium text-text-primary",
924
- children: q.irrigationType || "—"
925
- })]
926
- }),
927
- /* @__PURE__ */ _("div", {
928
- className: "flex justify-between gap-3",
929
- children: [/* @__PURE__ */ g("dt", {
930
- className: "text-text-secondary",
931
- children: e("healthybowl.fieldMapPage.detail.crop", "Crop")
932
- }), /* @__PURE__ */ g("dd", {
933
- className: "font-medium text-text-primary",
934
- children: Bt(q) || e("healthybowl.fieldMapPage.detail.noCrop", "None")
935
- })]
936
- }),
937
- /* @__PURE__ */ _("div", {
938
- className: "flex justify-between gap-3",
939
- children: [/* @__PURE__ */ g("dt", {
940
- className: "text-text-secondary",
941
- children: e("healthybowl.fieldMapPage.detail.status", "Status")
942
- }), /* @__PURE__ */ g("dd", {
943
- className: "font-medium capitalize text-text-primary",
944
- children: q.status
945
- })]
946
- })
947
- ]
948
- }),
949
- /* @__PURE__ */ _("div", {
950
- className: "mt-3 flex gap-2",
951
- children: [/* @__PURE__ */ _(v, {
952
- variant: "outline",
953
- size: "sm",
954
- className: "flex-1",
955
- onClick: () => Vt(q),
906
+ }, t.id);
907
+ }), $t.length === 0 && /* @__PURE__ */ m("p", {
908
+ className: "px-2 py-4 text-center text-xs text-text-secondary",
909
+ children: e("healthybowl.fieldMapPage.panel.none", "No fields match your search.")
910
+ })]
911
+ }),
912
+ /* @__PURE__ */ h(g, {
913
+ className: "mt-3 w-full",
914
+ onClick: mn,
915
+ disabled: D === "draw",
956
916
  children: [
957
- /* @__PURE__ */ g(ge, { className: "h-4 w-4" }),
917
+ /* @__PURE__ */ m(Ee, { className: "h-4 w-4" }),
958
918
  " ",
959
- e("healthybowl.fieldMapPage.detail.flyTo", "Fly to")
919
+ e("healthybowl.fieldMapPage.panel.drawNew", "Draw New Field")
960
920
  ]
961
- }), x(q) && /* @__PURE__ */ _(v, {
962
- variant: "outline",
963
- size: "sm",
964
- className: "flex-1",
965
- onClick: Jt,
966
- disabled: E === "edit",
921
+ })
922
+ ]
923
+ }),
924
+ J && /* @__PURE__ */ h("div", {
925
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
926
+ children: [
927
+ /* @__PURE__ */ m("h3", {
928
+ className: "text-sm font-semibold text-text-primary",
929
+ children: e("healthybowl.fieldMapPage.detail.selected", "Selected: {{name}}", { name: J.name })
930
+ }),
931
+ /* @__PURE__ */ h("dl", {
932
+ className: "mt-3 space-y-2 text-sm",
967
933
  children: [
968
- /* @__PURE__ */ g(Se, { className: "h-4 w-4" }),
969
- " ",
970
- e("healthybowl.fieldMapPage.detail.edit", "Edit")
934
+ /* @__PURE__ */ h("div", {
935
+ className: "flex justify-between gap-3",
936
+ children: [/* @__PURE__ */ m("dt", {
937
+ className: "text-text-secondary",
938
+ children: e("healthybowl.fieldMapPage.detail.area", "Area")
939
+ }), /* @__PURE__ */ h("dd", {
940
+ className: "font-medium text-text-primary",
941
+ children: [
942
+ J.area,
943
+ " ",
944
+ J.unit
945
+ ]
946
+ })]
947
+ }),
948
+ /* @__PURE__ */ h("div", {
949
+ className: "flex justify-between gap-3",
950
+ children: [/* @__PURE__ */ m("dt", {
951
+ className: "text-text-secondary",
952
+ children: e("healthybowl.fieldMapPage.detail.elevation", "Elevation")
953
+ }), /* @__PURE__ */ m("dd", {
954
+ className: "font-medium text-text-primary",
955
+ children: P[J.id] == null ? "—" : e("healthybowl.fieldMapPage.detail.elevationValue", "{{value}} m", { value: String(Math.round(P[J.id])) })
956
+ })]
957
+ }),
958
+ /* @__PURE__ */ h("div", {
959
+ className: "flex justify-between gap-3",
960
+ children: [/* @__PURE__ */ m("dt", {
961
+ className: "text-text-secondary",
962
+ children: e("healthybowl.fieldMapPage.detail.soil", "Soil")
963
+ }), /* @__PURE__ */ m("dd", {
964
+ className: "font-medium text-text-primary",
965
+ children: J.soilType || e("healthybowl.fieldMapPage.unknownSoil", "Unknown soil")
966
+ })]
967
+ }),
968
+ /* @__PURE__ */ h("div", {
969
+ className: "flex justify-between gap-3",
970
+ children: [/* @__PURE__ */ m("dt", {
971
+ className: "text-text-secondary",
972
+ children: e("healthybowl.fieldMapPage.detail.irrigation", "Irrigation")
973
+ }), /* @__PURE__ */ m("dd", {
974
+ className: "font-medium text-text-primary",
975
+ children: J.irrigationType || "—"
976
+ })]
977
+ }),
978
+ /* @__PURE__ */ h("div", {
979
+ className: "flex justify-between gap-3",
980
+ children: [/* @__PURE__ */ m("dt", {
981
+ className: "text-text-secondary",
982
+ children: e("healthybowl.fieldMapPage.detail.crop", "Crop")
983
+ }), /* @__PURE__ */ m("dd", {
984
+ className: "font-medium text-text-primary",
985
+ children: rn(J) || e("healthybowl.fieldMapPage.detail.noCrop", "None")
986
+ })]
987
+ }),
988
+ /* @__PURE__ */ h("div", {
989
+ className: "flex justify-between gap-3",
990
+ children: [/* @__PURE__ */ m("dt", {
991
+ className: "text-text-secondary",
992
+ children: e("healthybowl.fieldMapPage.detail.status", "Status")
993
+ }), /* @__PURE__ */ m("dd", {
994
+ className: "font-medium capitalize text-text-primary",
995
+ children: J.status
996
+ })]
997
+ })
971
998
  ]
972
- })]
973
- })
974
- ]
975
- })]
999
+ }),
1000
+ /* @__PURE__ */ h("div", {
1001
+ className: "mt-3 flex gap-2",
1002
+ children: [/* @__PURE__ */ h(g, {
1003
+ variant: "outline",
1004
+ size: "sm",
1005
+ className: "flex-1",
1006
+ onClick: () => ln(J),
1007
+ children: [
1008
+ /* @__PURE__ */ m(we, { className: "h-4 w-4" }),
1009
+ " ",
1010
+ e("healthybowl.fieldMapPage.detail.flyTo", "Fly to")
1011
+ ]
1012
+ }), S(J) && /* @__PURE__ */ h(g, {
1013
+ variant: "outline",
1014
+ size: "sm",
1015
+ className: "flex-1",
1016
+ onClick: vn,
1017
+ disabled: D === "edit",
1018
+ children: [
1019
+ /* @__PURE__ */ m(Ae, { className: "h-4 w-4" }),
1020
+ " ",
1021
+ e("healthybowl.fieldMapPage.detail.edit", "Edit")
1022
+ ]
1023
+ })]
1024
+ })
1025
+ ]
1026
+ }),
1027
+ J && an && /* @__PURE__ */ h("div", {
1028
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
1029
+ children: [
1030
+ /* @__PURE__ */ h("div", {
1031
+ className: "flex items-center justify-between gap-2",
1032
+ children: [/* @__PURE__ */ h("h3", {
1033
+ className: "flex items-center gap-1.5 text-sm font-semibold text-text-primary",
1034
+ children: [
1035
+ /* @__PURE__ */ m(Se, { className: "h-4 w-4" }),
1036
+ " ",
1037
+ e("healthybowl.fieldMapPage.beds.title", "Bed layout")
1038
+ ]
1039
+ }), /* @__PURE__ */ h("label", {
1040
+ className: "flex cursor-pointer items-center gap-2 text-xs font-medium text-text-primary",
1041
+ children: [/* @__PURE__ */ m("input", {
1042
+ type: "checkbox",
1043
+ checked: wt,
1044
+ onChange: (e) => Tt(e.target.checked),
1045
+ className: "h-3.5 w-3.5 accent-[var(--color-success)]"
1046
+ }), e("healthybowl.fieldMapPage.beds.show", "Show beds")]
1047
+ })]
1048
+ }),
1049
+ /* @__PURE__ */ m("p", {
1050
+ className: "mt-1 text-xs text-text-secondary",
1051
+ children: e("healthybowl.fieldMapPage.beds.hint", "Draw planting bed strips inside this field. Layout only — not saved.")
1052
+ }),
1053
+ /* @__PURE__ */ h("div", {
1054
+ className: "mt-3 grid grid-cols-2 gap-3",
1055
+ children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
1056
+ className: "text-xs font-medium text-text-primary",
1057
+ children: e("healthybowl.fieldMapPage.beds.bedWidth", "Bed width (m)")
1058
+ }), /* @__PURE__ */ m("input", {
1059
+ type: "number",
1060
+ min: .2,
1061
+ step: .1,
1062
+ value: I,
1063
+ onChange: (e) => Et(Math.max(.2, Number(e.target.value) || 0)),
1064
+ className: "mt-1 h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1065
+ })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
1066
+ className: "text-xs font-medium text-text-primary",
1067
+ children: e("healthybowl.fieldMapPage.beds.pathWidth", "Path width (m)")
1068
+ }), /* @__PURE__ */ m("input", {
1069
+ type: "number",
1070
+ min: 0,
1071
+ step: .05,
1072
+ value: Dt,
1073
+ onChange: (e) => Ot(Math.max(0, Number(e.target.value) || 0)),
1074
+ className: "mt-1 h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1075
+ })] })]
1076
+ }),
1077
+ /* @__PURE__ */ h("div", {
1078
+ className: "mt-3",
1079
+ children: [/* @__PURE__ */ h("div", {
1080
+ className: "flex items-center justify-between",
1081
+ children: [/* @__PURE__ */ m("label", {
1082
+ className: "text-xs font-medium text-text-primary",
1083
+ children: e("healthybowl.fieldMapPage.beds.orientation", "Orientation")
1084
+ }), /* @__PURE__ */ h("span", {
1085
+ className: "text-xs text-text-secondary",
1086
+ children: [L, "°"]
1087
+ })]
1088
+ }), /* @__PURE__ */ m("input", {
1089
+ type: "range",
1090
+ min: 0,
1091
+ max: 180,
1092
+ step: 1,
1093
+ value: L,
1094
+ onChange: (e) => kt(Number(e.target.value)),
1095
+ className: "mt-1 w-full accent-[var(--color-success)]",
1096
+ "aria-label": e("healthybowl.fieldMapPage.beds.orientation", "Orientation")
1097
+ })]
1098
+ }),
1099
+ b.length > 0 && /* @__PURE__ */ h("div", {
1100
+ className: "mt-3",
1101
+ children: [
1102
+ /* @__PURE__ */ m("label", {
1103
+ className: "text-xs font-medium text-text-primary",
1104
+ children: e("healthybowl.fieldMapPage.beds.crop", "Spacing for crop")
1105
+ }),
1106
+ /* @__PURE__ */ h(_, {
1107
+ value: sn?.id ?? "",
1108
+ onValueChange: jt,
1109
+ children: [/* @__PURE__ */ m(Pe, {
1110
+ className: "mt-1 w-full",
1111
+ children: /* @__PURE__ */ m(Fe, { placeholder: e("healthybowl.fieldMapPage.beds.cropPlaceholder", "Standard spacing") })
1112
+ }), /* @__PURE__ */ m(v, { children: b.map((e) => /* @__PURE__ */ m(y, {
1113
+ value: e.id,
1114
+ children: e.name
1115
+ }, e.id)) })]
1116
+ }),
1117
+ /* @__PURE__ */ m("p", {
1118
+ className: "mt-1 text-[11px] text-text-secondary",
1119
+ children: e("healthybowl.fieldMapPage.beds.spacingLine", "{{preset}} · {{plant}}×{{row}} cm", {
1120
+ preset: X.label,
1121
+ plant: String(X.plantSpacingCm),
1122
+ row: String(X.rowSpacingCm)
1123
+ })
1124
+ })
1125
+ ]
1126
+ }),
1127
+ Z && /* @__PURE__ */ m("div", {
1128
+ className: "mt-3 rounded-md bg-success/10 px-3 py-2 text-sm font-medium text-text-primary",
1129
+ children: e("healthybowl.fieldMapPage.beds.readout", "{{beds}} beds · ~{{plants}} plants", {
1130
+ beds: String(Z.bedCount),
1131
+ plants: cn.toLocaleString()
1132
+ })
1133
+ })
1134
+ ]
1135
+ })
1136
+ ]
976
1137
  })]
977
1138
  }),
978
- /* @__PURE__ */ g(ee, {
979
- open: F !== null,
980
- onClose: () => I(null),
1139
+ /* @__PURE__ */ m(te, {
1140
+ open: R !== null,
1141
+ onClose: () => z(null),
981
1142
  title: e("healthybowl.fieldMapPage.create.title", "Save New Field"),
982
1143
  description: e("healthybowl.fieldMapPage.create.description", "Name the field you just drew. Its area is auto-calculated."),
983
- footer: /* @__PURE__ */ _(Te, { children: [/* @__PURE__ */ g(v, {
1144
+ footer: /* @__PURE__ */ h(Ne, { children: [/* @__PURE__ */ m(g, {
984
1145
  variant: "outline",
985
- onClick: () => I(null),
1146
+ onClick: () => z(null),
986
1147
  className: "text-text-secondary",
987
1148
  children: e("healthybowl.common.cancel", "Cancel")
988
- }), /* @__PURE__ */ g(v, {
989
- onClick: rn,
990
- disabled: vt,
991
- children: vt ? e("healthybowl.fieldMapPage.create.saving", "Saving…") : e("healthybowl.fieldMapPage.create.action", "Save Field")
1149
+ }), /* @__PURE__ */ m(g, {
1150
+ onClick: Dn,
1151
+ disabled: Mt,
1152
+ children: Mt ? e("healthybowl.fieldMapPage.create.saving", "Saving…") : e("healthybowl.fieldMapPage.create.action", "Save Field")
992
1153
  })] }),
993
- children: /* @__PURE__ */ _("div", {
1154
+ children: /* @__PURE__ */ h("div", {
994
1155
  className: "space-y-4",
995
1156
  children: [
996
- /* @__PURE__ */ g("div", {
1157
+ /* @__PURE__ */ m("div", {
997
1158
  className: "rounded-md bg-success/10 px-3 py-2 text-sm text-text-primary",
998
- children: e("healthybowl.fieldMapPage.create.areaLine", "Auto-calculated area: {{area}} acres", { area: String(F?.area ?? 0) })
1159
+ children: e("healthybowl.fieldMapPage.create.areaLine", "Auto-calculated area: {{area}} acres", { area: String(R?.area ?? 0) })
999
1160
  }),
1000
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1161
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
1001
1162
  className: "text-sm font-medium text-text-primary",
1002
1163
  children: e("healthybowl.fieldMapPage.create.name", "Field name *")
1003
- }), /* @__PURE__ */ g("input", {
1164
+ }), /* @__PURE__ */ m("input", {
1004
1165
  type: "text",
1005
- value: L,
1006
- onChange: (e) => bt(e.target.value),
1166
+ value: B,
1167
+ onChange: (e) => Pt(e.target.value),
1007
1168
  placeholder: e("healthybowl.fieldMapPage.create.namePlaceholder", "e.g., North Paddy"),
1008
1169
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1009
1170
  })] }),
1010
- /* @__PURE__ */ _("div", {
1171
+ /* @__PURE__ */ h("div", {
1011
1172
  className: "grid grid-cols-2 gap-3",
1012
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1173
+ children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
1013
1174
  className: "text-sm font-medium text-text-primary",
1014
1175
  children: e("healthybowl.fieldMapPage.create.soil", "Soil type")
1015
- }), /* @__PURE__ */ _(Ee, {
1016
- value: xt,
1017
- onValueChange: St,
1018
- children: [/* @__PURE__ */ g(Oe, {
1176
+ }), /* @__PURE__ */ h(_, {
1177
+ value: Ft,
1178
+ onValueChange: It,
1179
+ children: [/* @__PURE__ */ m(Pe, {
1019
1180
  className: "mt-1 w-full",
1020
- children: /* @__PURE__ */ g(ke, {})
1021
- }), /* @__PURE__ */ g(De, { children: oe.map((t) => /* @__PURE__ */ g(y, {
1181
+ children: /* @__PURE__ */ m(Fe, {})
1182
+ }), /* @__PURE__ */ m(v, { children: ce.map((t) => /* @__PURE__ */ m(y, {
1022
1183
  value: t.label,
1023
1184
  children: e(`healthybowl.fieldMapPage.soil.${t.key}`, t.label)
1024
1185
  }, t.key)) })]
1025
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1186
+ })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
1026
1187
  className: "text-sm font-medium text-text-primary",
1027
1188
  children: e("healthybowl.fieldMapPage.create.irrigation", "Irrigation")
1028
- }), /* @__PURE__ */ _(Ee, {
1029
- value: Ct,
1030
- onValueChange: wt,
1031
- children: [/* @__PURE__ */ g(Oe, {
1189
+ }), /* @__PURE__ */ h(_, {
1190
+ value: Lt,
1191
+ onValueChange: Rt,
1192
+ children: [/* @__PURE__ */ m(Pe, {
1032
1193
  className: "mt-1 w-full",
1033
- children: /* @__PURE__ */ g(ke, {})
1034
- }), /* @__PURE__ */ _(De, { children: [
1035
- /* @__PURE__ */ g(y, {
1194
+ children: /* @__PURE__ */ m(Fe, {})
1195
+ }), /* @__PURE__ */ h(v, { children: [
1196
+ /* @__PURE__ */ m(y, {
1036
1197
  value: "Drip",
1037
1198
  children: e("healthybowl.fieldMapPage.irrigation.drip", "Drip")
1038
1199
  }),
1039
- /* @__PURE__ */ g(y, {
1200
+ /* @__PURE__ */ m(y, {
1040
1201
  value: "Sprinkler",
1041
1202
  children: e("healthybowl.fieldMapPage.irrigation.sprinkler", "Sprinkler")
1042
1203
  }),
1043
- /* @__PURE__ */ g(y, {
1204
+ /* @__PURE__ */ m(y, {
1044
1205
  value: "Flood",
1045
1206
  children: e("healthybowl.fieldMapPage.irrigation.flood", "Flood")
1046
1207
  }),
1047
- /* @__PURE__ */ g(y, {
1208
+ /* @__PURE__ */ m(y, {
1048
1209
  value: "Rainfed",
1049
1210
  children: e("healthybowl.fieldMapPage.irrigation.rainfed", "Rainfed")
1050
1211
  }),
1051
- /* @__PURE__ */ g(y, {
1212
+ /* @__PURE__ */ m(y, {
1052
1213
  value: "None",
1053
1214
  children: e("healthybowl.fieldMapPage.irrigation.none", "None")
1054
1215
  })
1055
1216
  ] })]
1056
1217
  })] })]
1057
1218
  }),
1058
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1219
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
1059
1220
  className: "text-sm font-medium text-text-primary",
1060
1221
  children: e("healthybowl.fieldMapPage.create.status", "Status")
1061
- }), /* @__PURE__ */ _(Ee, {
1062
- value: Tt,
1063
- onValueChange: Et,
1064
- children: [/* @__PURE__ */ g(Oe, {
1222
+ }), /* @__PURE__ */ h(_, {
1223
+ value: zt,
1224
+ onValueChange: Bt,
1225
+ children: [/* @__PURE__ */ m(Pe, {
1065
1226
  className: "mt-1 w-full",
1066
- children: /* @__PURE__ */ g(ke, {})
1067
- }), /* @__PURE__ */ _(De, { children: [
1068
- /* @__PURE__ */ g(y, {
1227
+ children: /* @__PURE__ */ m(Fe, {})
1228
+ }), /* @__PURE__ */ h(v, { children: [
1229
+ /* @__PURE__ */ m(y, {
1069
1230
  value: "active",
1070
1231
  children: e("healthybowl.fieldMapPage.status.active", "Active")
1071
1232
  }),
1072
- /* @__PURE__ */ g(y, {
1233
+ /* @__PURE__ */ m(y, {
1073
1234
  value: "preparation",
1074
1235
  children: e("healthybowl.fieldMapPage.status.preparation", "Preparation")
1075
1236
  }),
1076
- /* @__PURE__ */ g(y, {
1237
+ /* @__PURE__ */ m(y, {
1077
1238
  value: "fallow",
1078
1239
  children: e("healthybowl.fieldMapPage.status.fallow", "Fallow")
1079
1240
  })
@@ -1082,14 +1243,14 @@ var b = /* @__PURE__ */ e(s(), 1), Me = Ae`
1082
1243
  ]
1083
1244
  })
1084
1245
  }),
1085
- /* @__PURE__ */ g(a, {
1086
- toasts: Xe,
1087
- onDismiss: Ze
1246
+ /* @__PURE__ */ m(a, {
1247
+ toasts: nt,
1248
+ onDismiss: rt
1088
1249
  })
1089
1250
  ]
1090
1251
  });
1091
1252
  };
1092
1253
  //#endregion
1093
- export { S as FieldMapPage };
1254
+ export { C as FieldMapPage };
1094
1255
 
1095
1256
  //# sourceMappingURL=FieldMapPage.js.map