@burdenoff/microfe-ecoimpacthub 2026.1123.2 → 2026.1124.2

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 (33) hide show
  1. package/dist/ecoimpacthub/EcoImpactHubRoutes.js +47 -39
  2. package/dist/ecoimpacthub/EcoImpactHubRoutes.js.map +1 -1
  3. package/dist/ecoimpacthub/hooks/ecoTransport.d.ts +2 -0
  4. package/dist/ecoimpacthub/hooks/ecoTransport.js +1 -0
  5. package/dist/ecoimpacthub/hooks/ecoTransport.js.map +1 -1
  6. package/dist/ecoimpacthub/hooks/index.d.ts +1 -0
  7. package/dist/ecoimpacthub/hooks/index.js +3 -2
  8. package/dist/ecoimpacthub/hooks/useEcoAiOperations.d.ts +15 -0
  9. package/dist/ecoimpacthub/hooks/useEcoAiOperations.js +90 -0
  10. package/dist/ecoimpacthub/hooks/useEcoAiOperations.js.map +1 -0
  11. package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.js +1 -1
  12. package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.js.map +1 -1
  13. package/dist/ecoimpacthub/pages/ai/AiOperationsPage.d.ts +21 -0
  14. package/dist/ecoimpacthub/pages/ai/AiOperationsPage.js +536 -0
  15. package/dist/ecoimpacthub/pages/ai/AiOperationsPage.js.map +1 -0
  16. package/dist/ecoimpacthub/pages/carbon/CarbonPage.js +346 -320
  17. package/dist/ecoimpacthub/pages/carbon/CarbonPage.js.map +1 -1
  18. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js +85 -81
  19. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js.map +1 -1
  20. package/dist/ecoimpacthub/pages/habitat/StewardshipPage.d.ts +1 -0
  21. package/dist/ecoimpacthub/pages/habitat/StewardshipPage.js +193 -0
  22. package/dist/ecoimpacthub/pages/habitat/StewardshipPage.js.map +1 -0
  23. package/dist/ecoimpacthub/pages/habitat/stewardship.d.ts +34 -0
  24. package/dist/ecoimpacthub/pages/habitat/stewardship.js +83 -0
  25. package/dist/ecoimpacthub/pages/habitat/stewardship.js.map +1 -0
  26. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +165 -143
  27. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
  28. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +346 -185
  29. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
  30. package/dist/ecoimpacthub/types/index.d.ts +83 -0
  31. package/dist/ecoimpacthub/utils/pageContext.js +2 -1
  32. package/dist/ecoimpacthub/utils/pageContext.js.map +1 -1
  33. package/package.json +2 -2
@@ -3,23 +3,24 @@ import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { DataTable as n } from "../../components/DataTable.js";
4
4
  import { ErrorView as ee, LoadingView as te } from "../../components/StateViews.js";
5
5
  import { EmptyState as ne } from "../../components/EmptyState.js";
6
- import { Pagination as r } from "../../components/Pagination.js";
7
- import { useEcoObservations as i, useEcoRecordObservation as a, useEcoSites as re, useEcoSpecies as ie } from "../../hooks/useEcoImpactHubApi.js";
8
- import { useCursorPager as ae } from "../../hooks/useCursorPager.js";
9
- import { EvidenceUpload as o } from "../../components/EvidenceUpload.js";
10
- import { MethodBadge as s } from "../_shared/MethodBadge.js";
11
- import { MethodPicker as c } from "../_shared/MethodPicker.js";
12
- import { UseMyLocationButton as l } from "../_shared/UseMyLocationButton.js";
13
- import { EvidenceThumb as u } from "../_shared/EvidenceThumb.js";
6
+ import { Pagination as re } from "../../components/Pagination.js";
7
+ import { useEcoObservations as ie, useEcoRecordObservation as r, useEcoSites as ae, useEcoSpecies as oe } from "../../hooks/useEcoImpactHubApi.js";
8
+ import { useCursorPager as se } from "../../hooks/useCursorPager.js";
9
+ import { EvidenceUpload as ce } from "../../components/EvidenceUpload.js";
10
+ import { MethodBadge as i } from "../_shared/MethodBadge.js";
11
+ import { MethodPicker as a } from "../_shared/MethodPicker.js";
12
+ import { UseMyLocationButton as o } from "../_shared/UseMyLocationButton.js";
13
+ import { EvidenceThumb as s } from "../_shared/EvidenceThumb.js";
14
14
  import "../../hooks/index.js";
15
15
  import "../../context/index.js";
16
- import { formatCoords as d, formatDateTime as oe, formatNumber as se } from "../../utils/formatters.js";
17
- import { useMemo as f, useState as p } from "react";
18
- import { Binoculars as ce, MapPin as le, Plus as m, Smartphone as ue } from "lucide-react";
19
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
20
- import { Button as v, GlassCard as de, Input as y, Label as b, ResponsiveDialog as x, ResponsiveDialogContent as fe, ResponsiveDialogDescription as pe, ResponsiveDialogFooter as me, ResponsiveDialogHeader as he, ResponsiveDialogTitle as ge, Select as S, SelectContent as C, SelectItem as w, SelectTrigger as T, SelectValue as E, Textarea as D } from "@burdenoff/fe-libs/ui";
16
+ import { formatCoords as c, formatDateTime as l, formatNumber as le } from "../../utils/formatters.js";
17
+ import { useMemo as u, useState as d } from "react";
18
+ import { Binoculars as ue, MapPin as de, Plus as f, Smartphone as fe } from "lucide-react";
19
+ import { useSearchParams as pe } from "react-router";
20
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
21
+ import { Button as g, GlassCard as me, Input as _, Label as v, ResponsiveDialog as y, ResponsiveDialogContent as b, ResponsiveDialogDescription as he, ResponsiveDialogFooter as ge, ResponsiveDialogHeader as _e, ResponsiveDialogTitle as ve, Select as x, SelectContent as S, SelectItem as C, SelectTrigger as w, SelectValue as T, Textarea as E } from "@burdenoff/fe-libs/ui";
21
22
  // src/ecoimpacthub/pages/observations/ObservationsPage.tsx
22
- var O = [
23
+ var D = [
23
24
  "DIRECT_SIGHTING",
24
25
  "CAMERA_TRAP",
25
26
  "ACOUSTIC",
@@ -27,48 +28,48 @@ var O = [
27
28
  "EDNA",
28
29
  "TELEMETRY",
29
30
  "COMMUNITY_REPORT"
30
- ], k = 25, A = {
31
+ ], O = 25, k = {
31
32
  limit: 100,
32
33
  offset: 0
33
- }, j = "NONE";
34
- function M() {
34
+ }, A = "NONE";
35
+ function j() {
35
36
  let e = /* @__PURE__ */ new Date();
36
37
  return (/* @__PURE__ */ new Date(e.getTime() - e.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
37
38
  }
38
- function N() {
39
+ function M() {
39
40
  return {
40
41
  speciesId: "",
41
- observedAt: M(),
42
+ observedAt: j(),
42
43
  count: "1",
43
44
  method: "DIRECT_SIGHTING",
44
- siteId: j,
45
+ siteId: A,
45
46
  latitude: "",
46
47
  longitude: "",
47
48
  notes: "",
48
49
  evidence: null
49
50
  };
50
51
  }
51
- function P() {
52
- let { navigateTo: M } = e(), [P, F] = p("ALL"), [I, L] = p("ALL"), R = ae(), [_e, z] = p(!1), [B, V] = p(N), [H, U] = p(null), W = re({ pagination: A }), G = ie({ pagination: A }), { data: K, isLoading: ve, isError: ye, refetch: be } = i({
53
- speciesId: P === "ALL" ? void 0 : P,
54
- siteId: I === "ALL" ? void 0 : I,
52
+ function N() {
53
+ let { navigateTo: j } = e(), [N, P] = pe(), F = N.get("highlight"), [I, ye] = d("ALL"), [L, be] = d("ALL"), R = se(), [xe, z] = d(!1), [B, V] = d(M), [H, U] = d(null), W = ae({ pagination: k }), G = oe({ pagination: k }), { data: K, isLoading: Se, isError: Ce, refetch: we } = ie({
54
+ speciesId: I === "ALL" ? void 0 : I,
55
+ siteId: L === "ALL" ? void 0 : L,
55
56
  pagination: {
56
- limit: k,
57
+ limit: O,
57
58
  cursor: R.cursor
58
59
  }
59
- }), q = a(), J = f(() => W.data?.items ?? [], [W.data]), Y = f(() => G.data?.items ?? [], [G.data]), X = f(() => K?.items ?? [], [K]), xe = f(() => {
60
+ }), q = r(), J = u(() => W.data?.items ?? [], [W.data]), Y = u(() => G.data?.items ?? [], [G.data]), X = u(() => K?.items ?? [], [K]), Te = u(() => {
60
61
  let e = /* @__PURE__ */ new Map();
61
62
  for (let t of J) e.set(t.id, t.name);
62
63
  return e;
63
- }, [J]), Z = f(() => {
64
+ }, [J]), Z = u(() => {
64
65
  let e = /* @__PURE__ */ new Map();
65
66
  for (let t of Y) e.set(t.id, t.commonName);
66
67
  return e;
67
- }, [Y]), Se = [
68
+ }, [Y]), Ee = [
68
69
  {
69
70
  key: "evidence",
70
71
  header: "Evidence",
71
- render: (e) => /* @__PURE__ */ g(u, {
72
+ render: (e) => /* @__PURE__ */ m(s, {
72
73
  fileId: e.evidence?.id,
73
74
  alt: e.species?.commonName ?? Z.get(e.speciesId)
74
75
  })
@@ -76,12 +77,12 @@ function P() {
76
77
  {
77
78
  key: "species",
78
79
  header: "Species",
79
- render: (e) => /* @__PURE__ */ _("div", {
80
+ render: (e) => /* @__PURE__ */ h("div", {
80
81
  className: "min-w-0",
81
- children: [/* @__PURE__ */ g("p", {
82
+ children: [/* @__PURE__ */ m("p", {
82
83
  className: "font-semibold text-text-primary",
83
84
  children: e.species?.commonName ?? Z.get(e.speciesId) ?? "Unknown species"
84
- }), e.species?.scientificName && /* @__PURE__ */ g("p", {
85
+ }), e.species?.scientificName && /* @__PURE__ */ m("p", {
85
86
  className: "truncate text-xs italic text-text-tertiary",
86
87
  children: e.species.scientificName
87
88
  })]
@@ -90,25 +91,25 @@ function P() {
90
91
  {
91
92
  key: "method",
92
93
  header: "Method",
93
- render: (e) => /* @__PURE__ */ g(s, { method: e.method })
94
+ render: (e) => /* @__PURE__ */ m(i, { method: e.method })
94
95
  },
95
96
  {
96
97
  key: "count",
97
98
  header: "Count",
98
99
  align: "right",
99
100
  sortValue: (e) => e.count,
100
- render: (e) => /* @__PURE__ */ _("span", {
101
+ render: (e) => /* @__PURE__ */ h("span", {
101
102
  className: "tabular-nums font-medium text-text-primary",
102
- children: ["×", se(e.count)]
103
+ children: ["×", le(e.count)]
103
104
  })
104
105
  },
105
106
  {
106
107
  key: "observedAt",
107
108
  header: "Observed",
108
109
  hideOnMobile: !0,
109
- render: (e) => /* @__PURE__ */ g("span", {
110
+ render: (e) => /* @__PURE__ */ m("span", {
110
111
  className: "whitespace-nowrap text-text-secondary",
111
- children: oe(e.observedAt)
112
+ children: l(e.observedAt)
112
113
  })
113
114
  },
114
115
  {
@@ -116,11 +117,11 @@ function P() {
116
117
  header: "Site",
117
118
  hideOnMobile: !0,
118
119
  render: (e) => {
119
- let t = e.siteId ? xe.get(e.siteId) : void 0;
120
- return t ? /* @__PURE__ */ g("span", {
120
+ let t = e.siteId ? Te.get(e.siteId) : void 0;
121
+ return t ? /* @__PURE__ */ m("span", {
121
122
  className: "text-text-secondary",
122
123
  children: t
123
- }) : /* @__PURE__ */ g("span", {
124
+ }) : /* @__PURE__ */ m("span", {
124
125
  className: "text-text-tertiary",
125
126
  children: "—"
126
127
  });
@@ -131,13 +132,13 @@ function P() {
131
132
  header: "Coords",
132
133
  hideOnMobile: !0,
133
134
  render: (e) => {
134
- let t = d(e.latitude, e.longitude);
135
- return t === "—" ? /* @__PURE__ */ g("span", {
135
+ let t = c(e.latitude, e.longitude);
136
+ return t === "—" ? /* @__PURE__ */ m("span", {
136
137
  className: "text-text-tertiary",
137
138
  children: "—"
138
- }) : /* @__PURE__ */ _("span", {
139
+ }) : /* @__PURE__ */ h("span", {
139
140
  className: "inline-flex items-center gap-1 tabular-nums text-text-secondary",
140
- children: [/* @__PURE__ */ g(le, {
141
+ children: [/* @__PURE__ */ m(de, {
141
142
  className: "h-3.5 w-3.5 shrink-0 text-text-tertiary",
142
143
  "aria-hidden": "true"
143
144
  }), t]
@@ -148,20 +149,20 @@ function P() {
148
149
  key: "notes",
149
150
  header: "Notes",
150
151
  hideOnMobile: !0,
151
- render: (e) => e.notes ? /* @__PURE__ */ g("span", {
152
+ render: (e) => e.notes ? /* @__PURE__ */ m("span", {
152
153
  className: "block max-w-xs truncate text-text-secondary",
153
154
  title: e.notes,
154
155
  children: e.notes
155
- }) : /* @__PURE__ */ g("span", {
156
+ }) : /* @__PURE__ */ m("span", {
156
157
  className: "text-text-tertiary",
157
158
  children: "—"
158
159
  })
159
160
  }
160
161
  ], Q = () => {
161
- V(N()), U(null), z(!0);
162
+ V(M()), U(null), z(!0);
162
163
  }, $ = () => {
163
- V(N()), U(null);
164
- }, Ce = async () => {
164
+ V(M()), U(null);
165
+ }, De = async () => {
165
166
  if (!B.speciesId) U("Species is required.");
166
167
  else try {
167
168
  await q.mutateAsync({
@@ -169,7 +170,7 @@ function P() {
169
170
  observedAt: B.observedAt ? new Date(B.observedAt).toISOString() : (/* @__PURE__ */ new Date()).toISOString(),
170
171
  count: B.count ? Number(B.count) : 1,
171
172
  method: B.method,
172
- siteId: B.siteId && B.siteId !== j ? B.siteId : null,
173
+ siteId: B.siteId && B.siteId !== A ? B.siteId : null,
173
174
  latitude: B.latitude ? Number(B.latitude) : null,
174
175
  longitude: B.longitude ? Number(B.longitude) : null,
175
176
  notes: B.notes.trim() || null,
@@ -178,62 +179,62 @@ function P() {
178
179
  } catch (e) {
179
180
  U(e instanceof Error ? e.message : "Failed to record observation.");
180
181
  }
181
- }, we = P !== "ALL" || I !== "ALL";
182
- return /* @__PURE__ */ _(t, {
182
+ }, Oe = I !== "ALL" || L !== "ALL";
183
+ return /* @__PURE__ */ h(t, {
183
184
  title: "Field Observations",
184
185
  description: "Wildlife & biodiversity sightings across every species and site — your citizen-science field log.",
185
- actions: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _(v, {
186
+ actions: /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h(g, {
186
187
  variant: "outline",
187
- onClick: () => M("mobile/record-observation"),
188
- children: [/* @__PURE__ */ g(ue, { className: "mr-1.5 h-4 w-4" }), " Field capture"]
189
- }), /* @__PURE__ */ _(v, {
188
+ onClick: () => j("mobile/record-observation"),
189
+ children: [/* @__PURE__ */ m(fe, { className: "mr-1.5 h-4 w-4" }), " Field capture"]
190
+ }), /* @__PURE__ */ h(g, {
190
191
  onClick: Q,
191
- children: [/* @__PURE__ */ g(m, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
192
+ children: [/* @__PURE__ */ m(f, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
192
193
  })] }),
193
194
  children: [
194
- /* @__PURE__ */ g(de, {
195
+ /* @__PURE__ */ m(me, {
195
196
  treatment: "plain",
196
197
  className: "mb-5 p-4",
197
- children: /* @__PURE__ */ _("div", {
198
+ children: /* @__PURE__ */ h("div", {
198
199
  className: "flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end",
199
- children: [/* @__PURE__ */ _("div", {
200
+ children: [/* @__PURE__ */ h("div", {
200
201
  className: "grid gap-1.5",
201
- children: [/* @__PURE__ */ g("span", {
202
+ children: [/* @__PURE__ */ m("span", {
202
203
  className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
203
204
  children: "Species"
204
- }), /* @__PURE__ */ _(S, {
205
- value: P,
205
+ }), /* @__PURE__ */ h(x, {
206
+ value: I,
206
207
  onValueChange: (e) => {
207
- F(e), R.reset();
208
+ ye(e), R.reset();
208
209
  },
209
- children: [/* @__PURE__ */ g(T, {
210
+ children: [/* @__PURE__ */ m(w, {
210
211
  className: "w-full sm:w-52",
211
- children: /* @__PURE__ */ g(E, { placeholder: "All species" })
212
- }), /* @__PURE__ */ _(C, { children: [/* @__PURE__ */ g(w, {
212
+ children: /* @__PURE__ */ m(T, { placeholder: "All species" })
213
+ }), /* @__PURE__ */ h(S, { children: [/* @__PURE__ */ m(C, {
213
214
  value: "ALL",
214
215
  children: "All species"
215
- }), Y.map((e) => /* @__PURE__ */ g(w, {
216
+ }), Y.map((e) => /* @__PURE__ */ m(C, {
216
217
  value: e.id,
217
218
  children: e.commonName
218
219
  }, e.id))] })]
219
220
  })]
220
- }), /* @__PURE__ */ _("div", {
221
+ }), /* @__PURE__ */ h("div", {
221
222
  className: "grid gap-1.5",
222
- children: [/* @__PURE__ */ g("span", {
223
+ children: [/* @__PURE__ */ m("span", {
223
224
  className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
224
225
  children: "Site"
225
- }), /* @__PURE__ */ _(S, {
226
- value: I,
226
+ }), /* @__PURE__ */ h(x, {
227
+ value: L,
227
228
  onValueChange: (e) => {
228
- L(e), R.reset();
229
+ be(e), R.reset();
229
230
  },
230
- children: [/* @__PURE__ */ g(T, {
231
+ children: [/* @__PURE__ */ m(w, {
231
232
  className: "w-full sm:w-52",
232
- children: /* @__PURE__ */ g(E, { placeholder: "All sites" })
233
- }), /* @__PURE__ */ _(C, { children: [/* @__PURE__ */ g(w, {
233
+ children: /* @__PURE__ */ m(T, { placeholder: "All sites" })
234
+ }), /* @__PURE__ */ h(S, { children: [/* @__PURE__ */ m(C, {
234
235
  value: "ALL",
235
236
  children: "All sites"
236
- }), J.map((e) => /* @__PURE__ */ g(w, {
237
+ }), J.map((e) => /* @__PURE__ */ m(C, {
237
238
  value: e.id,
238
239
  children: e.name
239
240
  }, e.id))] })]
@@ -241,74 +242,95 @@ function P() {
241
242
  })]
242
243
  })
243
244
  }),
244
- ve ? /* @__PURE__ */ g(te, { label: "Loading observations…" }) : ye ? /* @__PURE__ */ g(ee, {
245
+ Se ? /* @__PURE__ */ m(te, { label: "Loading observations…" }) : Ce ? /* @__PURE__ */ m(ee, {
245
246
  message: "Couldn't load observations.",
246
- onRetry: () => be()
247
- }) : X.length === 0 ? /* @__PURE__ */ g(ne, {
247
+ onRetry: () => we()
248
+ }) : X.length === 0 ? /* @__PURE__ */ m(ne, {
248
249
  illustration: "empty-data",
249
- icon: /* @__PURE__ */ g(ce, { className: "h-10 w-10" }),
250
+ icon: /* @__PURE__ */ m(ue, { className: "h-10 w-10" }),
250
251
  title: "No observations yet",
251
- description: we ? "No observations match these filters." : "Record your first field observation to start building your biodiversity dataset.",
252
- action: /* @__PURE__ */ _(v, {
252
+ description: Oe ? "No observations match these filters." : "Record your first field observation to start building your biodiversity dataset.",
253
+ action: /* @__PURE__ */ h(g, {
253
254
  onClick: Q,
254
- children: [/* @__PURE__ */ g(m, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
255
+ children: [/* @__PURE__ */ m(f, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
256
+ })
257
+ }) : /* @__PURE__ */ h(p, { children: [
258
+ F && /* @__PURE__ */ h("div", {
259
+ role: "status",
260
+ "data-testid": "eco-observation-highlight-banner",
261
+ className: "mb-3 flex items-center justify-between rounded-lg border border-border-seam bg-bg-sunken px-3 py-2 text-xs text-text-primary",
262
+ children: [/* @__PURE__ */ h("span", { children: ["Highlighting cited observation ", /* @__PURE__ */ m("code", {
263
+ className: "font-mono",
264
+ children: F
265
+ })] }), /* @__PURE__ */ m(g, {
266
+ size: "sm",
267
+ variant: "ghost",
268
+ onClick: () => {
269
+ let e = new URLSearchParams(N);
270
+ e.delete("highlight"), P(e, { replace: !0 });
271
+ },
272
+ children: "Clear highlight"
273
+ })]
274
+ }),
275
+ /* @__PURE__ */ m(n, {
276
+ columns: Ee,
277
+ rows: X,
278
+ rowKey: (e) => e.id,
279
+ rowClassName: (e) => F && e.id === F ? "bg-status-warning-bg-subtle/60 ring-1 ring-inset ring-border-strong" : void 0
280
+ }),
281
+ /* @__PURE__ */ m(re, {
282
+ page: R.page,
283
+ pageSize: O,
284
+ itemCount: X.length,
285
+ hasMore: K?.pageInfo?.hasMore ?? !1,
286
+ onPageChange: (e) => R.onPageChange(e, K?.pageInfo?.cursor)
255
287
  })
256
- }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(n, {
257
- columns: Se,
258
- rows: X,
259
- rowKey: (e) => e.id
260
- }), /* @__PURE__ */ g(r, {
261
- page: R.page,
262
- pageSize: k,
263
- itemCount: X.length,
264
- hasMore: K?.pageInfo?.hasMore ?? !1,
265
- onPageChange: (e) => R.onPageChange(e, K?.pageInfo?.cursor)
266
- })] }),
267
- /* @__PURE__ */ g(x, {
268
- open: _e,
288
+ ] }),
289
+ /* @__PURE__ */ m(y, {
290
+ open: xe,
269
291
  onOpenChange: (e) => {
270
292
  z(e), e || $();
271
293
  },
272
- children: /* @__PURE__ */ _(fe, { children: [
273
- /* @__PURE__ */ _(he, { children: [/* @__PURE__ */ g(ge, { children: "Record observation" }), /* @__PURE__ */ g(pe, { children: "Log a wildlife or biodiversity sighting in the field." })] }),
274
- /* @__PURE__ */ _("div", {
294
+ children: /* @__PURE__ */ h(b, { children: [
295
+ /* @__PURE__ */ h(_e, { children: [/* @__PURE__ */ m(ve, { children: "Record observation" }), /* @__PURE__ */ m(he, { children: "Log a wildlife or biodiversity sighting in the field." })] }),
296
+ /* @__PURE__ */ h("div", {
275
297
  className: "grid gap-4 py-2",
276
298
  children: [
277
- /* @__PURE__ */ _("div", {
299
+ /* @__PURE__ */ h("div", {
278
300
  className: "grid gap-1.5",
279
301
  children: [
280
- /* @__PURE__ */ g(b, {
302
+ /* @__PURE__ */ m(v, {
281
303
  htmlFor: "species",
282
304
  children: "Species *"
283
305
  }),
284
- /* @__PURE__ */ _(S, {
306
+ /* @__PURE__ */ h(x, {
285
307
  value: B.speciesId,
286
308
  onValueChange: (e) => V({
287
309
  ...B,
288
310
  speciesId: e
289
311
  }),
290
- children: [/* @__PURE__ */ g(T, {
312
+ children: [/* @__PURE__ */ m(w, {
291
313
  id: "species",
292
- children: /* @__PURE__ */ g(E, { placeholder: "Select a species" })
293
- }), /* @__PURE__ */ g(C, { children: Y.map((e) => /* @__PURE__ */ g(w, {
314
+ children: /* @__PURE__ */ m(T, { placeholder: "Select a species" })
315
+ }), /* @__PURE__ */ m(S, { children: Y.map((e) => /* @__PURE__ */ m(C, {
294
316
  value: e.id,
295
317
  children: e.commonName
296
318
  }, e.id)) })]
297
319
  }),
298
- Y.length === 0 && /* @__PURE__ */ g("p", {
320
+ Y.length === 0 && /* @__PURE__ */ m("p", {
299
321
  className: "text-xs text-text-tertiary",
300
322
  children: "No species defined yet — add one in the Species section first."
301
323
  })
302
324
  ]
303
325
  }),
304
- /* @__PURE__ */ _("div", {
326
+ /* @__PURE__ */ h("div", {
305
327
  className: "grid gap-2 sm:grid-cols-2",
306
- children: [/* @__PURE__ */ _("div", {
328
+ children: [/* @__PURE__ */ h("div", {
307
329
  className: "grid gap-1.5",
308
- children: [/* @__PURE__ */ g(b, {
330
+ children: [/* @__PURE__ */ m(v, {
309
331
  htmlFor: "observedAt",
310
332
  children: "Observed at"
311
- }), /* @__PURE__ */ g(y, {
333
+ }), /* @__PURE__ */ m(_, {
312
334
  id: "observedAt",
313
335
  type: "datetime-local",
314
336
  value: B.observedAt,
@@ -317,12 +339,12 @@ function P() {
317
339
  observedAt: e.target.value
318
340
  })
319
341
  })]
320
- }), /* @__PURE__ */ _("div", {
342
+ }), /* @__PURE__ */ h("div", {
321
343
  className: "grid gap-1.5",
322
- children: [/* @__PURE__ */ g(b, {
344
+ children: [/* @__PURE__ */ m(v, {
323
345
  htmlFor: "count",
324
346
  children: "Count"
325
- }), /* @__PURE__ */ g(y, {
347
+ }), /* @__PURE__ */ m(_, {
326
348
  id: "count",
327
349
  type: "number",
328
350
  min: "1",
@@ -336,10 +358,10 @@ function P() {
336
358
  })]
337
359
  })]
338
360
  }),
339
- /* @__PURE__ */ _("div", {
361
+ /* @__PURE__ */ h("div", {
340
362
  className: "grid gap-1.5",
341
- children: [/* @__PURE__ */ g(b, { children: "Method" }), /* @__PURE__ */ g(c, {
342
- options: O,
363
+ children: [/* @__PURE__ */ m(v, { children: "Method" }), /* @__PURE__ */ m(a, {
364
+ options: D,
343
365
  value: B.method,
344
366
  onChange: (e) => V({
345
367
  ...B,
@@ -348,39 +370,39 @@ function P() {
348
370
  label: "Observation method"
349
371
  })]
350
372
  }),
351
- /* @__PURE__ */ _("div", {
373
+ /* @__PURE__ */ h("div", {
352
374
  className: "grid gap-1.5",
353
- children: [/* @__PURE__ */ g(b, {
375
+ children: [/* @__PURE__ */ m(v, {
354
376
  htmlFor: "site",
355
377
  children: "Site"
356
- }), /* @__PURE__ */ _(S, {
378
+ }), /* @__PURE__ */ h(x, {
357
379
  value: B.siteId,
358
380
  onValueChange: (e) => V({
359
381
  ...B,
360
382
  siteId: e
361
383
  }),
362
- children: [/* @__PURE__ */ g(T, {
384
+ children: [/* @__PURE__ */ m(w, {
363
385
  id: "site",
364
- children: /* @__PURE__ */ g(E, { placeholder: "No site" })
365
- }), /* @__PURE__ */ _(C, { children: [/* @__PURE__ */ g(w, {
366
- value: j,
386
+ children: /* @__PURE__ */ m(T, { placeholder: "No site" })
387
+ }), /* @__PURE__ */ h(S, { children: [/* @__PURE__ */ m(C, {
388
+ value: A,
367
389
  children: "No site"
368
- }), J.map((e) => /* @__PURE__ */ g(w, {
390
+ }), J.map((e) => /* @__PURE__ */ m(C, {
369
391
  value: e.id,
370
392
  children: e.name
371
393
  }, e.id))] })]
372
394
  })]
373
395
  }),
374
- /* @__PURE__ */ _("div", {
396
+ /* @__PURE__ */ h("div", {
375
397
  className: "grid gap-2",
376
- children: [/* @__PURE__ */ _("div", {
398
+ children: [/* @__PURE__ */ h("div", {
377
399
  className: "grid gap-2 sm:grid-cols-2",
378
- children: [/* @__PURE__ */ _("div", {
400
+ children: [/* @__PURE__ */ h("div", {
379
401
  className: "grid gap-1.5",
380
- children: [/* @__PURE__ */ g(b, {
402
+ children: [/* @__PURE__ */ m(v, {
381
403
  htmlFor: "lat",
382
404
  children: "Latitude"
383
- }), /* @__PURE__ */ g(y, {
405
+ }), /* @__PURE__ */ m(_, {
384
406
  id: "lat",
385
407
  type: "number",
386
408
  step: "any",
@@ -391,12 +413,12 @@ function P() {
391
413
  }),
392
414
  placeholder: "12.9716"
393
415
  })]
394
- }), /* @__PURE__ */ _("div", {
416
+ }), /* @__PURE__ */ h("div", {
395
417
  className: "grid gap-1.5",
396
- children: [/* @__PURE__ */ g(b, {
418
+ children: [/* @__PURE__ */ m(v, {
397
419
  htmlFor: "lng",
398
420
  children: "Longitude"
399
- }), /* @__PURE__ */ g(y, {
421
+ }), /* @__PURE__ */ m(_, {
400
422
  id: "lng",
401
423
  type: "number",
402
424
  step: "any",
@@ -408,7 +430,7 @@ function P() {
408
430
  placeholder: "77.5946"
409
431
  })]
410
432
  })]
411
- }), /* @__PURE__ */ g(l, {
433
+ }), /* @__PURE__ */ m(o, {
412
434
  onCapture: ({ latitude: e, longitude: t }) => V((n) => ({
413
435
  ...n,
414
436
  latitude: e.toFixed(6),
@@ -417,12 +439,12 @@ function P() {
417
439
  className: "justify-self-start"
418
440
  })]
419
441
  }),
420
- /* @__PURE__ */ _("div", {
442
+ /* @__PURE__ */ h("div", {
421
443
  className: "grid gap-1.5",
422
- children: [/* @__PURE__ */ g(b, {
444
+ children: [/* @__PURE__ */ m(v, {
423
445
  htmlFor: "notes",
424
446
  children: "Notes"
425
- }), /* @__PURE__ */ g(D, {
447
+ }), /* @__PURE__ */ m(E, {
426
448
  id: "notes",
427
449
  value: B.notes,
428
450
  onChange: (e) => V({
@@ -433,7 +455,7 @@ function P() {
433
455
  rows: 2
434
456
  })]
435
457
  }),
436
- /* @__PURE__ */ g(o, {
458
+ /* @__PURE__ */ m(ce, {
437
459
  id: "obsEvidence",
438
460
  label: "Evidence photo (optional)",
439
461
  value: B.evidence,
@@ -443,18 +465,18 @@ function P() {
443
465
  }),
444
466
  hint: "Attach a photo, audio clip or PDF as supporting evidence."
445
467
  }),
446
- H && /* @__PURE__ */ g("p", {
468
+ H && /* @__PURE__ */ m("p", {
447
469
  className: "text-sm text-status-error-text",
448
470
  children: H
449
471
  })
450
472
  ]
451
473
  }),
452
- /* @__PURE__ */ _(me, { children: [/* @__PURE__ */ g(v, {
474
+ /* @__PURE__ */ h(ge, { children: [/* @__PURE__ */ m(g, {
453
475
  variant: "outline",
454
476
  onClick: () => z(!1),
455
477
  children: "Cancel"
456
- }), /* @__PURE__ */ g(v, {
457
- onClick: Ce,
478
+ }), /* @__PURE__ */ m(g, {
479
+ onClick: De,
458
480
  disabled: q.isPending,
459
481
  children: q.isPending ? "Recording…" : "Record observation"
460
482
  })] })
@@ -463,6 +485,6 @@ function P() {
463
485
  ]
464
486
  });
465
487
  }
466
- export { P as ObservationsPage };
488
+ export { N as ObservationsPage };
467
489
 
468
490
  //# sourceMappingURL=ObservationsPage.js.map