@burdenoff/microfe-ecoimpacthub 2026.704.4 → 2026.709.1

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 (178) hide show
  1. package/dist/dev/main.d.ts +2 -0
  2. package/dist/dev/main.d.ts.map +1 -0
  3. package/dist/ecoimpacthub/EcoImpactHubRoot.d.ts +5 -0
  4. package/dist/ecoimpacthub/EcoImpactHubRoot.d.ts.map +1 -0
  5. package/dist/ecoimpacthub/EcoImpactHubRoutes.d.ts +4 -0
  6. package/dist/ecoimpacthub/EcoImpactHubRoutes.d.ts.map +1 -0
  7. package/dist/ecoimpacthub/EcoImpactHubRoutes.js +48 -40
  8. package/dist/ecoimpacthub/EcoImpactHubRoutes.js.map +1 -1
  9. package/dist/ecoimpacthub/components/DataTable.d.ts +28 -0
  10. package/dist/ecoimpacthub/components/DataTable.d.ts.map +1 -0
  11. package/dist/ecoimpacthub/components/EcoDiscussion.d.ts +18 -0
  12. package/dist/ecoimpacthub/components/EcoDiscussion.d.ts.map +1 -0
  13. package/dist/ecoimpacthub/components/EcoTags.d.ts +17 -0
  14. package/dist/ecoimpacthub/components/EcoTags.d.ts.map +1 -0
  15. package/dist/ecoimpacthub/components/EmptyState.d.ts +18 -0
  16. package/dist/ecoimpacthub/components/EmptyState.d.ts.map +1 -0
  17. package/dist/ecoimpacthub/components/EvidenceUpload.d.ts +14 -0
  18. package/dist/ecoimpacthub/components/EvidenceUpload.d.ts.map +1 -0
  19. package/dist/ecoimpacthub/components/FeatureFlagGate.d.ts +10 -0
  20. package/dist/ecoimpacthub/components/FeatureFlagGate.d.ts.map +1 -0
  21. package/dist/ecoimpacthub/components/FeatureFlagGate.js +8 -0
  22. package/dist/ecoimpacthub/components/FeatureFlagGate.js.map +1 -0
  23. package/dist/ecoimpacthub/components/FileLink.d.ts +15 -0
  24. package/dist/ecoimpacthub/components/FileLink.d.ts.map +1 -0
  25. package/dist/ecoimpacthub/components/FilterTabs.d.ts +18 -0
  26. package/dist/ecoimpacthub/components/FilterTabs.d.ts.map +1 -0
  27. package/dist/ecoimpacthub/components/MetricsCard.d.ts +23 -0
  28. package/dist/ecoimpacthub/components/MetricsCard.d.ts.map +1 -0
  29. package/dist/ecoimpacthub/components/MiniBar.d.ts +16 -0
  30. package/dist/ecoimpacthub/components/MiniBar.d.ts.map +1 -0
  31. package/dist/ecoimpacthub/components/PageLayout.d.ts +16 -0
  32. package/dist/ecoimpacthub/components/PageLayout.d.ts.map +1 -0
  33. package/dist/ecoimpacthub/components/Pagination.d.ts +22 -0
  34. package/dist/ecoimpacthub/components/Pagination.d.ts.map +1 -0
  35. package/dist/ecoimpacthub/components/StateViews.d.ts +24 -0
  36. package/dist/ecoimpacthub/components/StateViews.d.ts.map +1 -0
  37. package/dist/ecoimpacthub/components/StatusBadge.d.ts +9 -0
  38. package/dist/ecoimpacthub/components/StatusBadge.d.ts.map +1 -0
  39. package/dist/ecoimpacthub/components/Tabs.d.ts +17 -0
  40. package/dist/ecoimpacthub/components/Tabs.d.ts.map +1 -0
  41. package/dist/ecoimpacthub/components/index.d.ts +19 -0
  42. package/dist/ecoimpacthub/components/index.d.ts.map +1 -0
  43. package/dist/ecoimpacthub/context/EcoImpactHubContext.d.ts +16 -0
  44. package/dist/ecoimpacthub/context/EcoImpactHubContext.d.ts.map +1 -0
  45. package/dist/ecoimpacthub/context/index.d.ts +6 -0
  46. package/dist/ecoimpacthub/context/index.d.ts.map +1 -0
  47. package/dist/ecoimpacthub/hooks/index.d.ts +10 -0
  48. package/dist/ecoimpacthub/hooks/index.d.ts.map +1 -0
  49. package/dist/ecoimpacthub/hooks/useCursorPager.d.ts +33 -0
  50. package/dist/ecoimpacthub/hooks/useCursorPager.d.ts.map +1 -0
  51. package/dist/ecoimpacthub/hooks/useEcoComments.d.ts +36 -0
  52. package/dist/ecoimpacthub/hooks/useEcoComments.d.ts.map +1 -0
  53. package/dist/ecoimpacthub/hooks/useEcoFiles.d.ts +47 -0
  54. package/dist/ecoimpacthub/hooks/useEcoFiles.d.ts.map +1 -0
  55. package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts +104 -0
  56. package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts.map +1 -0
  57. package/dist/ecoimpacthub/hooks/useEcoTags.d.ts +44 -0
  58. package/dist/ecoimpacthub/hooks/useEcoTags.d.ts.map +1 -0
  59. package/dist/ecoimpacthub/index.d.ts +10 -0
  60. package/dist/ecoimpacthub/index.d.ts.map +1 -0
  61. package/dist/ecoimpacthub/index.js +2 -0
  62. package/dist/ecoimpacthub/pages/DashboardPage.d.ts +10 -0
  63. package/dist/ecoimpacthub/pages/DashboardPage.d.ts.map +1 -0
  64. package/dist/ecoimpacthub/pages/DashboardPage.js +345 -189
  65. package/dist/ecoimpacthub/pages/DashboardPage.js.map +1 -1
  66. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.d.ts +9 -0
  67. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.d.ts.map +1 -0
  68. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js +58 -0
  69. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js.map +1 -0
  70. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.d.ts +23 -0
  71. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.d.ts.map +1 -0
  72. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js +70 -0
  73. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js.map +1 -0
  74. package/dist/ecoimpacthub/pages/_shared/MethodBadge.d.ts +9 -0
  75. package/dist/ecoimpacthub/pages/_shared/MethodBadge.d.ts.map +1 -0
  76. package/dist/ecoimpacthub/pages/_shared/MethodBadge.js +51 -0
  77. package/dist/ecoimpacthub/pages/_shared/MethodBadge.js.map +1 -0
  78. package/dist/ecoimpacthub/pages/_shared/TaxonChip.d.ts +9 -0
  79. package/dist/ecoimpacthub/pages/_shared/TaxonChip.d.ts.map +1 -0
  80. package/dist/ecoimpacthub/pages/_shared/TaxonChip.js +29 -0
  81. package/dist/ecoimpacthub/pages/_shared/TaxonChip.js.map +1 -0
  82. package/dist/ecoimpacthub/pages/badges.d.ts +27 -0
  83. package/dist/ecoimpacthub/pages/badges.d.ts.map +1 -0
  84. package/dist/ecoimpacthub/pages/badges.js +71 -0
  85. package/dist/ecoimpacthub/pages/badges.js.map +1 -0
  86. package/dist/ecoimpacthub/pages/carbon/CarbonPage.d.ts +15 -0
  87. package/dist/ecoimpacthub/pages/carbon/CarbonPage.d.ts.map +1 -0
  88. package/dist/ecoimpacthub/pages/carbon/CarbonPage.js +337 -300
  89. package/dist/ecoimpacthub/pages/carbon/CarbonPage.js.map +1 -1
  90. package/dist/ecoimpacthub/pages/carbonVisuals.d.ts +47 -0
  91. package/dist/ecoimpacthub/pages/carbonVisuals.d.ts.map +1 -0
  92. package/dist/ecoimpacthub/pages/carbonVisuals.js +89 -0
  93. package/dist/ecoimpacthub/pages/carbonVisuals.js.map +1 -0
  94. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts +12 -0
  95. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts.map +1 -0
  96. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js +252 -218
  97. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js.map +1 -1
  98. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.d.ts +8 -0
  99. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.d.ts.map +1 -0
  100. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js +15 -12
  101. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js.map +1 -1
  102. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.d.ts +6 -0
  103. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.d.ts.map +1 -0
  104. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js +168 -0
  105. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js.map +1 -0
  106. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.d.ts +12 -0
  107. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.d.ts.map +1 -0
  108. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js +30 -17
  109. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js.map +1 -1
  110. package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts +11 -0
  111. package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts.map +1 -0
  112. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +236 -219
  113. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
  114. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts +11 -0
  115. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts.map +1 -0
  116. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +248 -212
  117. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
  118. package/dist/ecoimpacthub/pages/reports/ReportsPage.d.ts +8 -0
  119. package/dist/ecoimpacthub/pages/reports/ReportsPage.d.ts.map +1 -0
  120. package/dist/ecoimpacthub/pages/reports/ReportsPage.js +119 -118
  121. package/dist/ecoimpacthub/pages/reports/ReportsPage.js.map +1 -1
  122. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts +10 -0
  123. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts.map +1 -0
  124. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js +498 -370
  125. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js.map +1 -1
  126. package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts +8 -0
  127. package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts.map +1 -0
  128. package/dist/ecoimpacthub/pages/sites/SitesPage.js +109 -99
  129. package/dist/ecoimpacthub/pages/sites/SitesPage.js.map +1 -1
  130. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.d.ts +22 -0
  131. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.d.ts.map +1 -0
  132. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js +64 -0
  133. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js.map +1 -0
  134. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts +9 -0
  135. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts.map +1 -0
  136. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js +275 -259
  137. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js.map +1 -1
  138. package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts +8 -0
  139. package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts.map +1 -0
  140. package/dist/ecoimpacthub/pages/species/SpeciesPage.js +235 -177
  141. package/dist/ecoimpacthub/pages/species/SpeciesPage.js.map +1 -1
  142. package/dist/ecoimpacthub/services/createSandboxAssistantTransport.d.ts +33 -0
  143. package/dist/ecoimpacthub/services/createSandboxAssistantTransport.d.ts.map +1 -0
  144. package/dist/ecoimpacthub/services/createSandboxAssistantTransport.js +42 -0
  145. package/dist/ecoimpacthub/services/createSandboxAssistantTransport.js.map +1 -0
  146. package/dist/ecoimpacthub/services/index.d.ts +6 -0
  147. package/dist/ecoimpacthub/services/index.d.ts.map +1 -0
  148. package/dist/ecoimpacthub/services/index.js +1 -0
  149. package/dist/ecoimpacthub/types/index.d.ts +417 -0
  150. package/dist/ecoimpacthub/types/index.d.ts.map +1 -0
  151. package/dist/ecoimpacthub/utils/cn.d.ts +4 -0
  152. package/dist/ecoimpacthub/utils/cn.d.ts.map +1 -0
  153. package/dist/ecoimpacthub/utils/formatters.d.ts +26 -0
  154. package/dist/ecoimpacthub/utils/formatters.d.ts.map +1 -0
  155. package/dist/ecoimpacthub/utils/i18n.d.ts +6 -0
  156. package/dist/ecoimpacthub/utils/i18n.d.ts.map +1 -0
  157. package/dist/ecoimpacthub/utils/index.d.ts +9 -0
  158. package/dist/ecoimpacthub/utils/index.d.ts.map +1 -0
  159. package/dist/ecoimpacthub/utils/navigation.d.ts +14 -0
  160. package/dist/ecoimpacthub/utils/navigation.d.ts.map +1 -0
  161. package/dist/generated/global-operations.d.ts +2 -0
  162. package/dist/generated/global-operations.d.ts.map +1 -0
  163. package/dist/generated/global-types.d.ts +18199 -0
  164. package/dist/generated/global-types.d.ts.map +1 -0
  165. package/dist/generated/wspace-operations.d.ts +2 -0
  166. package/dist/generated/wspace-operations.d.ts.map +1 -0
  167. package/dist/generated/wspace-types.d.ts +43046 -0
  168. package/dist/generated/wspace-types.d.ts.map +1 -0
  169. package/dist/index.d.ts +2 -0
  170. package/dist/index.d.ts.map +1 -0
  171. package/dist/index.js +2 -1
  172. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +305 -0
  173. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +1 -0
  174. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +44 -33
  175. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
  176. package/dist/node_modules/recharts/es6/util/ChartUtils.js +31 -23
  177. package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
  178. package/package.json +5 -1
@@ -1,23 +1,25 @@
1
1
  import { useEcoImpactHub as e } from "../../context/EcoImpactHubContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { formatDateTime as n, formatEnumLabel as r, formatNumber as ee } from "../../utils/formatters.js";
4
- import { StatusBadge as i } from "../../components/StatusBadge.js";
5
- import { ErrorView as a, LoadingView as te, Section as ne } from "../../components/StateViews.js";
6
- import { EmptyState as re } from "../../components/EmptyState.js";
3
+ import { formatDateTime as ee, formatEnumLabel as n, formatNumber as r } from "../../utils/formatters.js";
4
+ import { ErrorView as i, LoadingView as a, Section as te } from "../../components/StateViews.js";
5
+ import { EmptyState as ne } from "../../components/EmptyState.js";
7
6
  import "../../context/index.js";
8
- import { useEcoArchiveSpecies as ie, useEcoRecordObservation as ae, useEcoSites as oe, useEcoSpeciesDetail as se, useEcoUpdateSpecies as ce } from "../../hooks/useEcoImpactHubApi.js";
7
+ import { useEcoArchiveSpecies as re, useEcoRecordObservation as ie, useEcoSites as ae, useEcoSpeciesDetail as oe, useEcoUpdateSpecies as se } from "../../hooks/useEcoImpactHubApi.js";
9
8
  import "../../hooks/index.js";
10
- import { DataTable as le } from "../../components/DataTable.js";
11
- import { EvidenceUpload as ue } from "../../components/EvidenceUpload.js";
12
- import { FileLink as de } from "../../components/FileLink.js";
13
- import { EcoTags as fe } from "../../components/EcoTags.js";
14
- import { useState as o } from "react";
15
- import { Archive as pe, ArrowLeft as s, Binoculars as c, Pencil as l, Star as u } from "lucide-react";
16
- import { useParams as d } from "react-router-dom";
17
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
18
- import { Button as h, GlassCard as g, Input as _, Label as v, ResponsiveDialog as y, ResponsiveDialogContent as b, ResponsiveDialogDescription as x, ResponsiveDialogFooter as S, ResponsiveDialogHeader as C, ResponsiveDialogTitle as w, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k, Textarea as A } from "@burdenoff/fe-libs/ui";
9
+ import { DataTable as ce } from "../../components/DataTable.js";
10
+ import { EcoTags as o } from "../../components/EcoTags.js";
11
+ import { EvidenceUpload as s } from "../../components/EvidenceUpload.js";
12
+ import { MethodBadge as le } from "../_shared/MethodBadge.js";
13
+ import { EvidenceThumb as ue } from "../_shared/EvidenceThumb.js";
14
+ import { ConservationBadge as c } from "../_shared/ConservationBadge.js";
15
+ import { TaxonChip as de } from "../_shared/TaxonChip.js";
16
+ import { useState as l } from "react";
17
+ import { Archive as fe, ArrowLeft as pe, Binoculars as u, Pencil as me, Star as d } from "lucide-react";
18
+ import { useParams as f } from "react-router-dom";
19
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
20
+ import { Button as g, GlassCard as _, Input as v, Label as y, ResponsiveDialog as b, ResponsiveDialogContent as x, ResponsiveDialogDescription as S, ResponsiveDialogFooter as C, ResponsiveDialogHeader as w, ResponsiveDialogTitle as T, Select as E, SelectContent as D, SelectItem as O, SelectTrigger as k, SelectValue as A, Textarea as j } from "@burdenoff/fe-libs/ui";
19
21
  //#region src/ecoimpacthub/pages/species/SpeciesDetailPage.tsx
20
- var j = [
22
+ var M = [
21
23
  "DIRECT_SIGHTING",
22
24
  "CAMERA_TRAP",
23
25
  "ACOUSTIC",
@@ -25,7 +27,7 @@ var j = [
25
27
  "EDNA",
26
28
  "TELEMETRY",
27
29
  "COMMUNITY_REPORT"
28
- ], M = [
30
+ ], N = [
29
31
  "MAMMAL",
30
32
  "BIRD",
31
33
  "REPTILE",
@@ -35,7 +37,7 @@ var j = [
35
37
  "PLANT",
36
38
  "FUNGI",
37
39
  "OTHER"
38
- ], N = [
40
+ ], P = [
39
41
  "LEAST_CONCERN",
40
42
  "NEAR_THREATENED",
41
43
  "VULNERABLE",
@@ -44,491 +46,505 @@ var j = [
44
46
  "EXTINCT_IN_WILD",
45
47
  "DATA_DEFICIENT",
46
48
  "NOT_EVALUATED"
47
- ], P = (e) => {
49
+ ], F = (e) => {
48
50
  let t = (e) => String(e).padStart(2, "0");
49
51
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`;
50
52
  };
51
- function F() {
52
- let { id: F } = d(), { navigateTo: I } = e(), { data: L, isLoading: R, isError: z, refetch: me } = se(F), he = oe({ pagination: {
53
+ function I() {
54
+ let { id: I } = f(), { navigateTo: L } = e(), { data: R, isLoading: he, isError: ge, refetch: _e } = oe(I), ve = ae({ pagination: {
53
55
  limit: 100,
54
56
  offset: 0
55
- } }), B = ae(), V = ce(), H = ie(), [ge, U] = o(!1), [W, G] = o({
57
+ } }), z = ie(), B = se(), V = re(), [ye, H] = l(!1), [U, W] = l({
56
58
  method: "DIRECT_SIGHTING",
57
59
  count: "1",
58
- observedAt: P(/* @__PURE__ */ new Date()),
60
+ observedAt: F(/* @__PURE__ */ new Date()),
59
61
  siteId: "",
60
62
  notes: "",
61
63
  evidence: null
62
- }), [_e, K] = o(!1), [q, J] = o({
64
+ }), [be, G] = l(!1), [K, q] = l({
63
65
  commonName: "",
64
66
  scientificName: "",
65
67
  taxonGroup: "MAMMAL",
66
68
  conservationStatus: "NOT_EVALUATED",
67
69
  isPriority: !1,
68
70
  description: ""
69
- }), [Y, X] = o(null);
70
- if (R) return /* @__PURE__ */ p(t, {
71
+ }), [J, Y] = l(null);
72
+ if (he) return /* @__PURE__ */ m(t, {
71
73
  title: "Species",
72
- children: /* @__PURE__ */ p(te, {})
74
+ children: /* @__PURE__ */ m(a, {})
73
75
  });
74
- if (z || !L) return /* @__PURE__ */ p(t, {
76
+ if (ge || !R) return /* @__PURE__ */ m(t, {
75
77
  title: "Species",
76
- children: /* @__PURE__ */ p(a, {
78
+ children: /* @__PURE__ */ m(i, {
77
79
  message: "This species could not be loaded.",
78
- onRetry: () => me()
80
+ onRetry: () => _e()
79
81
  })
80
82
  });
81
- let Z = L.observations ?? [], Q = he.data?.items ?? [], $ = () => {
82
- G({
83
+ let X = R.observations ?? [], Z = ve.data?.items ?? [], Q = /* @__PURE__ */ new Map();
84
+ for (let e of Z) Q.set(e.id, e.name);
85
+ let $ = () => {
86
+ W({
83
87
  method: "DIRECT_SIGHTING",
84
88
  count: "1",
85
- observedAt: P(/* @__PURE__ */ new Date()),
89
+ observedAt: F(/* @__PURE__ */ new Date()),
86
90
  siteId: "",
87
91
  notes: "",
88
92
  evidence: null
89
- }), X(null), U(!0);
93
+ }), Y(null), H(!0);
90
94
  };
91
- return /* @__PURE__ */ m(t, {
92
- title: L.commonName,
93
- description: [L.scientificName, r(L.taxonGroup)].filter(Boolean).join(" · "),
94
- actions: /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(i, { status: L.conservationStatus }), /* @__PURE__ */ m(h, {
95
- variant: "ghost",
96
- onClick: () => I("species"),
97
- children: [/* @__PURE__ */ p(s, { className: "mr-1.5 h-4 w-4" }), " Back"]
98
- })] }),
95
+ return /* @__PURE__ */ h(t, {
96
+ title: R.commonName,
97
+ description: [R.scientificName, n(R.taxonGroup)].filter(Boolean).join(" · "),
98
+ actions: /* @__PURE__ */ h(p, { children: [
99
+ /* @__PURE__ */ m(c, { status: R.conservationStatus }),
100
+ R.isPriority && /* @__PURE__ */ h("span", {
101
+ className: "inline-flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2.5 py-0.5 text-xs font-semibold text-status-warning-text",
102
+ title: "Priority species",
103
+ children: [/* @__PURE__ */ m(d, { className: "h-3.5 w-3.5 fill-current" }), " Priority"]
104
+ }),
105
+ /* @__PURE__ */ h(g, {
106
+ variant: "ghost",
107
+ onClick: () => L("species"),
108
+ children: [/* @__PURE__ */ m(pe, { className: "mr-1.5 h-4 w-4" }), " Back"]
109
+ })
110
+ ] }),
99
111
  children: [
100
- /* @__PURE__ */ m("div", {
112
+ /* @__PURE__ */ h("div", {
101
113
  className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
102
- children: [/* @__PURE__ */ m(g, {
114
+ children: [/* @__PURE__ */ h(_, {
103
115
  treatment: "glass",
104
116
  className: "p-6 lg:col-span-2",
105
117
  children: [
106
- /* @__PURE__ */ m("dl", {
118
+ /* @__PURE__ */ h("dl", {
107
119
  className: "grid grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3",
108
120
  children: [
109
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
121
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("dt", {
110
122
  className: "text-xs text-text-tertiary",
111
123
  children: "Scientific name"
112
- }), /* @__PURE__ */ p("dd", {
124
+ }), /* @__PURE__ */ m("dd", {
113
125
  className: "mt-0.5 text-sm italic text-text-primary",
114
- children: L.scientificName ?? "—"
126
+ children: R.scientificName ?? "—"
115
127
  })] }),
116
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
128
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("dt", {
117
129
  className: "text-xs text-text-tertiary",
118
130
  children: "Taxon group"
119
- }), /* @__PURE__ */ p("dd", {
120
- className: "mt-0.5 text-sm text-text-primary",
121
- children: r(L.taxonGroup)
131
+ }), /* @__PURE__ */ m("dd", {
132
+ className: "mt-1",
133
+ children: /* @__PURE__ */ m(de, { group: R.taxonGroup })
122
134
  })] }),
123
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
135
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("dt", {
124
136
  className: "text-xs text-text-tertiary",
125
137
  children: "Conservation"
126
- }), /* @__PURE__ */ p("dd", {
127
- className: "mt-0.5",
128
- children: /* @__PURE__ */ p(i, { status: L.conservationStatus })
138
+ }), /* @__PURE__ */ m("dd", {
139
+ className: "mt-1",
140
+ children: /* @__PURE__ */ m(c, { status: R.conservationStatus })
129
141
  })] }),
130
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
142
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("dt", {
131
143
  className: "text-xs text-text-tertiary",
132
144
  children: "Priority"
133
- }), /* @__PURE__ */ p("dd", {
145
+ }), /* @__PURE__ */ m("dd", {
134
146
  className: "mt-0.5 text-sm text-text-primary",
135
- children: L.isPriority ? /* @__PURE__ */ m("span", {
147
+ children: R.isPriority ? /* @__PURE__ */ h("span", {
136
148
  className: "inline-flex items-center gap-1 text-status-warning-text",
137
- children: [/* @__PURE__ */ p(u, { className: "h-4 w-4 fill-current" }), " Priority"]
149
+ children: [/* @__PURE__ */ m(d, { className: "h-4 w-4 fill-current" }), " Priority"]
138
150
  }) : "—"
139
151
  })] }),
140
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
152
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("dt", {
141
153
  className: "text-xs text-text-tertiary",
142
154
  children: "Observations"
143
- }), /* @__PURE__ */ p("dd", {
155
+ }), /* @__PURE__ */ m("dd", {
144
156
  className: "mt-0.5 text-sm text-text-primary tabular-nums",
145
- children: Z.length
157
+ children: X.length
146
158
  })] })
147
159
  ]
148
160
  }),
149
- L.description && /* @__PURE__ */ p("p", {
161
+ R.description && /* @__PURE__ */ m("p", {
150
162
  className: "mt-5 rounded-lg bg-bg-sunken/60 p-3 text-sm text-text-secondary",
151
- children: L.description
163
+ children: R.description
152
164
  }),
153
- /* @__PURE__ */ p("div", {
165
+ /* @__PURE__ */ m("div", {
154
166
  className: "mt-5 border-t border-border-seam pt-4",
155
- children: /* @__PURE__ */ p(fe, {
167
+ children: /* @__PURE__ */ m(o, {
156
168
  entityType: "ecoimpacthub-species",
157
- entityId: L.id
169
+ entityId: R.id
158
170
  })
159
171
  })
160
172
  ]
161
- }), /* @__PURE__ */ m(g, {
173
+ }), /* @__PURE__ */ h(_, {
162
174
  treatment: "glass",
163
175
  className: "flex flex-col gap-3 p-6",
164
176
  children: [
165
- /* @__PURE__ */ p("p", {
177
+ /* @__PURE__ */ m("p", {
166
178
  className: "text-xs text-text-tertiary",
167
179
  children: "Quick actions"
168
180
  }),
169
- /* @__PURE__ */ m(h, {
181
+ /* @__PURE__ */ h(g, {
170
182
  onClick: $,
171
- children: [/* @__PURE__ */ p(c, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
183
+ children: [/* @__PURE__ */ m(u, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
172
184
  }),
173
- /* @__PURE__ */ m(h, {
185
+ /* @__PURE__ */ h(g, {
174
186
  variant: "outline",
175
187
  onClick: () => {
176
- J({
177
- commonName: L.commonName,
178
- scientificName: L.scientificName ?? "",
179
- taxonGroup: L.taxonGroup,
180
- conservationStatus: L.conservationStatus,
181
- isPriority: L.isPriority,
182
- description: L.description ?? ""
183
- }), X(null), K(!0);
188
+ q({
189
+ commonName: R.commonName,
190
+ scientificName: R.scientificName ?? "",
191
+ taxonGroup: R.taxonGroup,
192
+ conservationStatus: R.conservationStatus,
193
+ isPriority: R.isPriority,
194
+ description: R.description ?? ""
195
+ }), Y(null), G(!0);
184
196
  },
185
- children: [/* @__PURE__ */ p(l, { className: "mr-1.5 h-4 w-4" }), " Edit species"]
197
+ children: [/* @__PURE__ */ m(me, { className: "mr-1.5 h-4 w-4" }), " Edit species"]
186
198
  }),
187
- /* @__PURE__ */ m(h, {
199
+ /* @__PURE__ */ h(g, {
188
200
  variant: "ghost",
189
201
  onClick: async () => {
190
- if (F) {
191
- X(null);
202
+ if (I) {
203
+ Y(null);
192
204
  try {
193
- await H.mutateAsync(F), I("species");
205
+ await V.mutateAsync(I), L("species");
194
206
  } catch (e) {
195
- X(e instanceof Error ? e.message : "Failed to archive species.");
207
+ Y(e instanceof Error ? e.message : "Failed to archive species.");
196
208
  }
197
209
  }
198
210
  },
199
- disabled: H.isPending,
211
+ disabled: V.isPending,
200
212
  className: "text-status-error-text hover:text-status-error-text",
201
- children: [/* @__PURE__ */ p(pe, { className: "mr-1.5 h-4 w-4" }), " Archive"]
213
+ children: [/* @__PURE__ */ m(fe, { className: "mr-1.5 h-4 w-4" }), " Archive"]
202
214
  })
203
215
  ]
204
216
  })]
205
217
  }),
206
- Y && /* @__PURE__ */ p("p", {
218
+ J && /* @__PURE__ */ m("p", {
207
219
  className: "mt-4 text-sm text-status-error-text",
208
- children: Y
220
+ children: J
209
221
  }),
210
- /* @__PURE__ */ p(ne, {
222
+ /* @__PURE__ */ m(te, {
211
223
  title: "Observations",
212
224
  description: "Field records logged against this species.",
213
- action: /* @__PURE__ */ m(h, {
225
+ action: /* @__PURE__ */ h(g, {
214
226
  size: "sm",
215
227
  onClick: $,
216
- children: [/* @__PURE__ */ p(c, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
228
+ children: [/* @__PURE__ */ m(u, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
217
229
  }),
218
- children: Z.length === 0 ? /* @__PURE__ */ p(re, {
230
+ children: X.length === 0 ? /* @__PURE__ */ m(ne, {
219
231
  illustration: "empty-data",
220
232
  title: "No observations yet",
221
233
  description: "Record a field observation to see it here."
222
- }) : /* @__PURE__ */ p(le, {
234
+ }) : /* @__PURE__ */ m(ce, {
223
235
  columns: [
236
+ {
237
+ key: "evidence",
238
+ header: "Evidence",
239
+ render: (e) => /* @__PURE__ */ m(ue, {
240
+ fileId: e.evidence?.id,
241
+ alt: R.commonName
242
+ })
243
+ },
224
244
  {
225
245
  key: "method",
226
246
  header: "Method",
227
- render: (e) => /* @__PURE__ */ p("span", {
228
- className: "font-medium text-text-primary",
229
- children: r(e.method)
230
- })
247
+ render: (e) => /* @__PURE__ */ m(le, { method: e.method })
231
248
  },
232
249
  {
233
250
  key: "count",
234
251
  header: "Count",
235
252
  align: "right",
236
253
  sortValue: (e) => e.count,
237
- render: (e) => /* @__PURE__ */ p("span", {
238
- className: "tabular-nums text-text-primary",
239
- children: ee(e.count)
254
+ render: (e) => /* @__PURE__ */ h("span", {
255
+ className: "tabular-nums font-medium text-text-primary",
256
+ children: ["×", r(e.count)]
240
257
  })
241
258
  },
242
259
  {
243
260
  key: "observedAt",
244
261
  header: "Observed",
245
- render: (e) => /* @__PURE__ */ p("span", {
246
- className: "text-text-secondary",
247
- children: n(e.observedAt)
262
+ hideOnMobile: !0,
263
+ render: (e) => /* @__PURE__ */ m("span", {
264
+ className: "whitespace-nowrap text-text-secondary",
265
+ children: ee(e.observedAt)
248
266
  })
249
267
  },
250
268
  {
251
269
  key: "site",
252
270
  header: "Site",
253
271
  hideOnMobile: !0,
254
- render: (e) => e.siteId ? /* @__PURE__ */ p("span", {
255
- className: "text-text-secondary",
256
- children: e.siteId
257
- }) : /* @__PURE__ */ p("span", {
258
- className: "text-text-tertiary",
259
- children: "—"
260
- })
272
+ render: (e) => {
273
+ let t = e.siteId ? Q.get(e.siteId) : void 0;
274
+ return t ? /* @__PURE__ */ m("span", {
275
+ className: "text-text-secondary",
276
+ children: t
277
+ }) : /* @__PURE__ */ m("span", {
278
+ className: "text-text-tertiary",
279
+ children: "—"
280
+ });
281
+ }
261
282
  },
262
283
  {
263
284
  key: "notes",
264
285
  header: "Notes",
265
286
  hideOnMobile: !0,
266
- render: (e) => /* @__PURE__ */ p("span", {
267
- className: "text-text-secondary",
268
- children: e.notes ?? "—"
269
- })
270
- },
271
- {
272
- key: "evidence",
273
- header: "Evidence",
274
- hideOnMobile: !0,
275
- render: (e) => e.evidence?.id ? /* @__PURE__ */ p(de, { fileId: e.evidence.id }) : /* @__PURE__ */ p("span", {
287
+ render: (e) => e.notes ? /* @__PURE__ */ m("span", {
288
+ className: "block max-w-xs truncate text-text-secondary",
289
+ title: e.notes,
290
+ children: e.notes
291
+ }) : /* @__PURE__ */ m("span", {
276
292
  className: "text-text-tertiary",
277
293
  children: "—"
278
294
  })
279
295
  }
280
296
  ],
281
- rows: Z,
297
+ rows: X,
282
298
  rowKey: (e) => e.id
283
299
  })
284
300
  }),
285
- /* @__PURE__ */ p(y, {
286
- open: ge,
287
- onOpenChange: U,
288
- children: /* @__PURE__ */ m(b, { children: [
289
- /* @__PURE__ */ m(C, { children: [/* @__PURE__ */ p(w, { children: "Record observation" }), /* @__PURE__ */ m(x, { children: [
301
+ /* @__PURE__ */ m(b, {
302
+ open: ye,
303
+ onOpenChange: H,
304
+ children: /* @__PURE__ */ h(x, { children: [
305
+ /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, { children: "Record observation" }), /* @__PURE__ */ h(S, { children: [
290
306
  "Log a field sighting or detection of ",
291
- L.commonName,
307
+ R.commonName,
292
308
  "."
293
309
  ] })] }),
294
- /* @__PURE__ */ m("div", {
310
+ /* @__PURE__ */ h("div", {
295
311
  className: "grid gap-4 py-2",
296
312
  children: [
297
- /* @__PURE__ */ m("div", {
313
+ /* @__PURE__ */ h("div", {
298
314
  className: "grid gap-2 sm:grid-cols-2",
299
- children: [/* @__PURE__ */ m("div", {
315
+ children: [/* @__PURE__ */ h("div", {
300
316
  className: "grid gap-1.5",
301
- children: [/* @__PURE__ */ p(v, {
317
+ children: [/* @__PURE__ */ m(y, {
302
318
  htmlFor: "obsMethod",
303
319
  children: "Method"
304
- }), /* @__PURE__ */ m(T, {
305
- value: W.method,
306
- onValueChange: (e) => G({
307
- ...W,
320
+ }), /* @__PURE__ */ h(E, {
321
+ value: U.method,
322
+ onValueChange: (e) => W({
323
+ ...U,
308
324
  method: e
309
325
  }),
310
- children: [/* @__PURE__ */ p(O, {
326
+ children: [/* @__PURE__ */ m(k, {
311
327
  id: "obsMethod",
312
- children: /* @__PURE__ */ p(k, {})
313
- }), /* @__PURE__ */ p(E, { children: j.map((e) => /* @__PURE__ */ p(D, {
328
+ children: /* @__PURE__ */ m(A, {})
329
+ }), /* @__PURE__ */ m(D, { children: M.map((e) => /* @__PURE__ */ m(O, {
314
330
  value: e,
315
- children: r(e)
331
+ children: n(e)
316
332
  }, e)) })]
317
333
  })]
318
- }), /* @__PURE__ */ m("div", {
334
+ }), /* @__PURE__ */ h("div", {
319
335
  className: "grid gap-1.5",
320
- children: [/* @__PURE__ */ p(v, {
336
+ children: [/* @__PURE__ */ m(y, {
321
337
  htmlFor: "obsCount",
322
338
  children: "Count"
323
- }), /* @__PURE__ */ p(_, {
339
+ }), /* @__PURE__ */ m(v, {
324
340
  id: "obsCount",
325
341
  type: "number",
326
342
  min: "1",
327
343
  step: "1",
328
- value: W.count,
329
- onChange: (e) => G({
330
- ...W,
344
+ value: U.count,
345
+ onChange: (e) => W({
346
+ ...U,
331
347
  count: e.target.value
332
348
  }),
333
349
  placeholder: "1"
334
350
  })]
335
351
  })]
336
352
  }),
337
- /* @__PURE__ */ m("div", {
353
+ /* @__PURE__ */ h("div", {
338
354
  className: "grid gap-1.5",
339
- children: [/* @__PURE__ */ p(v, {
355
+ children: [/* @__PURE__ */ m(y, {
340
356
  htmlFor: "obsAt",
341
357
  children: "Observed at"
342
- }), /* @__PURE__ */ p(_, {
358
+ }), /* @__PURE__ */ m(v, {
343
359
  id: "obsAt",
344
360
  type: "datetime-local",
345
- value: W.observedAt,
346
- onChange: (e) => G({
347
- ...W,
361
+ value: U.observedAt,
362
+ onChange: (e) => W({
363
+ ...U,
348
364
  observedAt: e.target.value
349
365
  })
350
366
  })]
351
367
  }),
352
- /* @__PURE__ */ m("div", {
368
+ /* @__PURE__ */ h("div", {
353
369
  className: "grid gap-1.5",
354
- children: [/* @__PURE__ */ p(v, {
370
+ children: [/* @__PURE__ */ m(y, {
355
371
  htmlFor: "obsSite",
356
372
  children: "Site (optional)"
357
- }), /* @__PURE__ */ m(T, {
358
- value: W.siteId,
359
- onValueChange: (e) => G({
360
- ...W,
373
+ }), /* @__PURE__ */ h(E, {
374
+ value: U.siteId,
375
+ onValueChange: (e) => W({
376
+ ...U,
361
377
  siteId: e
362
378
  }),
363
- children: [/* @__PURE__ */ p(O, {
379
+ children: [/* @__PURE__ */ m(k, {
364
380
  id: "obsSite",
365
- children: /* @__PURE__ */ p(k, { placeholder: "No site" })
366
- }), /* @__PURE__ */ p(E, { children: Q.map((e) => /* @__PURE__ */ p(D, {
381
+ children: /* @__PURE__ */ m(A, { placeholder: "No site" })
382
+ }), /* @__PURE__ */ m(D, { children: Z.map((e) => /* @__PURE__ */ m(O, {
367
383
  value: e.id,
368
384
  children: e.name
369
385
  }, e.id)) })]
370
386
  })]
371
387
  }),
372
- /* @__PURE__ */ m("div", {
388
+ /* @__PURE__ */ h("div", {
373
389
  className: "grid gap-1.5",
374
- children: [/* @__PURE__ */ p(v, {
390
+ children: [/* @__PURE__ */ m(y, {
375
391
  htmlFor: "obsNotes",
376
392
  children: "Notes"
377
- }), /* @__PURE__ */ p(A, {
393
+ }), /* @__PURE__ */ m(j, {
378
394
  id: "obsNotes",
379
- value: W.notes,
380
- onChange: (e) => G({
381
- ...W,
395
+ value: U.notes,
396
+ onChange: (e) => W({
397
+ ...U,
382
398
  notes: e.target.value
383
399
  }),
384
400
  placeholder: "Optional context — behaviour, conditions, evidence.",
385
401
  rows: 2
386
402
  })]
387
403
  }),
388
- /* @__PURE__ */ p(ue, {
404
+ /* @__PURE__ */ m(s, {
389
405
  id: "speciesObsEvidence",
390
406
  label: "Evidence photo (optional)",
391
- value: W.evidence,
392
- onChange: (e) => G({
393
- ...W,
407
+ value: U.evidence,
408
+ onChange: (e) => W({
409
+ ...U,
394
410
  evidence: e
395
411
  }),
396
412
  hint: "Attach a photo, audio clip or PDF as supporting evidence."
397
413
  })
398
414
  ]
399
415
  }),
400
- /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(h, {
416
+ /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(g, {
401
417
  variant: "outline",
402
- onClick: () => U(!1),
418
+ onClick: () => H(!1),
403
419
  children: "Cancel"
404
- }), /* @__PURE__ */ p(h, {
420
+ }), /* @__PURE__ */ m(g, {
405
421
  onClick: async () => {
406
- if (F) {
407
- X(null);
422
+ if (I) {
423
+ Y(null);
408
424
  try {
409
- await B.mutateAsync({
410
- speciesId: F,
411
- method: W.method,
412
- count: W.count ? Number(W.count) : 1,
413
- observedAt: new Date(W.observedAt).toISOString(),
414
- siteId: W.siteId || null,
415
- notes: W.notes.trim() || null,
416
- evidenceFileId: W.evidence?.fileId ?? null
417
- }), U(!1);
425
+ await z.mutateAsync({
426
+ speciesId: I,
427
+ method: U.method,
428
+ count: U.count ? Number(U.count) : 1,
429
+ observedAt: new Date(U.observedAt).toISOString(),
430
+ siteId: U.siteId || null,
431
+ notes: U.notes.trim() || null,
432
+ evidenceFileId: U.evidence?.fileId ?? null
433
+ }), H(!1);
418
434
  } catch (e) {
419
- X(e instanceof Error ? e.message : "Failed to record observation.");
435
+ Y(e instanceof Error ? e.message : "Failed to record observation.");
420
436
  }
421
437
  }
422
438
  },
423
- disabled: B.isPending,
424
- children: B.isPending ? "Recording…" : "Record"
439
+ disabled: z.isPending,
440
+ children: z.isPending ? "Recording…" : "Record"
425
441
  })] })
426
442
  ] })
427
443
  }),
428
- /* @__PURE__ */ p(y, {
429
- open: _e,
430
- onOpenChange: K,
431
- children: /* @__PURE__ */ m(b, { children: [
432
- /* @__PURE__ */ m(C, { children: [/* @__PURE__ */ p(w, { children: "Edit species" }), /* @__PURE__ */ p(x, { children: "Update naming, classification and priority for this species." })] }),
433
- /* @__PURE__ */ m("div", {
444
+ /* @__PURE__ */ m(b, {
445
+ open: be,
446
+ onOpenChange: G,
447
+ children: /* @__PURE__ */ h(x, { children: [
448
+ /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, { children: "Edit species" }), /* @__PURE__ */ m(S, { children: "Update naming, classification and priority for this species." })] }),
449
+ /* @__PURE__ */ h("div", {
434
450
  className: "grid gap-4 py-2",
435
451
  children: [
436
- /* @__PURE__ */ m("div", {
452
+ /* @__PURE__ */ h("div", {
437
453
  className: "grid gap-2 sm:grid-cols-2",
438
- children: [/* @__PURE__ */ m("div", {
454
+ children: [/* @__PURE__ */ h("div", {
439
455
  className: "grid gap-1.5",
440
- children: [/* @__PURE__ */ p(v, {
456
+ children: [/* @__PURE__ */ m(y, {
441
457
  htmlFor: "editCommon",
442
458
  children: "Common name *"
443
- }), /* @__PURE__ */ p(_, {
459
+ }), /* @__PURE__ */ m(v, {
444
460
  id: "editCommon",
445
- value: q.commonName,
446
- onChange: (e) => J({
447
- ...q,
461
+ value: K.commonName,
462
+ onChange: (e) => q({
463
+ ...K,
448
464
  commonName: e.target.value
449
465
  }),
450
466
  placeholder: "Indian Pangolin"
451
467
  })]
452
- }), /* @__PURE__ */ m("div", {
468
+ }), /* @__PURE__ */ h("div", {
453
469
  className: "grid gap-1.5",
454
- children: [/* @__PURE__ */ p(v, {
470
+ children: [/* @__PURE__ */ m(y, {
455
471
  htmlFor: "editScientific",
456
472
  children: "Scientific name"
457
- }), /* @__PURE__ */ p(_, {
473
+ }), /* @__PURE__ */ m(v, {
458
474
  id: "editScientific",
459
- value: q.scientificName,
460
- onChange: (e) => J({
461
- ...q,
475
+ value: K.scientificName,
476
+ onChange: (e) => q({
477
+ ...K,
462
478
  scientificName: e.target.value
463
479
  }),
464
480
  placeholder: "Manis crassicaudata"
465
481
  })]
466
482
  })]
467
483
  }),
468
- /* @__PURE__ */ m("div", {
484
+ /* @__PURE__ */ h("div", {
469
485
  className: "grid gap-2 sm:grid-cols-2",
470
- children: [/* @__PURE__ */ m("div", {
486
+ children: [/* @__PURE__ */ h("div", {
471
487
  className: "grid gap-1.5",
472
- children: [/* @__PURE__ */ p(v, {
488
+ children: [/* @__PURE__ */ m(y, {
473
489
  htmlFor: "editTaxon",
474
490
  children: "Taxon group"
475
- }), /* @__PURE__ */ m(T, {
476
- value: q.taxonGroup,
477
- onValueChange: (e) => J({
478
- ...q,
491
+ }), /* @__PURE__ */ h(E, {
492
+ value: K.taxonGroup,
493
+ onValueChange: (e) => q({
494
+ ...K,
479
495
  taxonGroup: e
480
496
  }),
481
- children: [/* @__PURE__ */ p(O, {
497
+ children: [/* @__PURE__ */ m(k, {
482
498
  id: "editTaxon",
483
- children: /* @__PURE__ */ p(k, {})
484
- }), /* @__PURE__ */ p(E, { children: M.map((e) => /* @__PURE__ */ p(D, {
499
+ children: /* @__PURE__ */ m(A, {})
500
+ }), /* @__PURE__ */ m(D, { children: N.map((e) => /* @__PURE__ */ m(O, {
485
501
  value: e,
486
- children: r(e)
502
+ children: n(e)
487
503
  }, e)) })]
488
504
  })]
489
- }), /* @__PURE__ */ m("div", {
505
+ }), /* @__PURE__ */ h("div", {
490
506
  className: "grid gap-1.5",
491
- children: [/* @__PURE__ */ p(v, {
507
+ children: [/* @__PURE__ */ m(y, {
492
508
  htmlFor: "editConservation",
493
509
  children: "Conservation status"
494
- }), /* @__PURE__ */ m(T, {
495
- value: q.conservationStatus,
496
- onValueChange: (e) => J({
497
- ...q,
510
+ }), /* @__PURE__ */ h(E, {
511
+ value: K.conservationStatus,
512
+ onValueChange: (e) => q({
513
+ ...K,
498
514
  conservationStatus: e
499
515
  }),
500
- children: [/* @__PURE__ */ p(O, {
516
+ children: [/* @__PURE__ */ m(k, {
501
517
  id: "editConservation",
502
- children: /* @__PURE__ */ p(k, {})
503
- }), /* @__PURE__ */ p(E, { children: N.map((e) => /* @__PURE__ */ p(D, {
518
+ children: /* @__PURE__ */ m(A, {})
519
+ }), /* @__PURE__ */ m(D, { children: P.map((e) => /* @__PURE__ */ m(O, {
504
520
  value: e,
505
- children: r(e)
521
+ children: n(e)
506
522
  }, e)) })]
507
523
  })]
508
524
  })]
509
525
  }),
510
- /* @__PURE__ */ m("label", {
526
+ /* @__PURE__ */ h("label", {
511
527
  className: "flex items-center gap-2 text-sm text-text-primary",
512
- children: [/* @__PURE__ */ p("input", {
528
+ children: [/* @__PURE__ */ m("input", {
513
529
  type: "checkbox",
514
- checked: q.isPriority,
515
- onChange: (e) => J({
516
- ...q,
530
+ checked: K.isPriority,
531
+ onChange: (e) => q({
532
+ ...K,
517
533
  isPriority: e.target.checked
518
534
  }),
519
535
  className: "h-4 w-4 rounded border-border-seam accent-action-primary-bg"
520
536
  }), "Mark as priority species"]
521
537
  }),
522
- /* @__PURE__ */ m("div", {
538
+ /* @__PURE__ */ h("div", {
523
539
  className: "grid gap-1.5",
524
- children: [/* @__PURE__ */ p(v, {
540
+ children: [/* @__PURE__ */ m(y, {
525
541
  htmlFor: "editDescription",
526
542
  children: "Description"
527
- }), /* @__PURE__ */ p(A, {
543
+ }), /* @__PURE__ */ m(j, {
528
544
  id: "editDescription",
529
- value: q.description,
530
- onChange: (e) => J({
531
- ...q,
545
+ value: K.description,
546
+ onChange: (e) => q({
547
+ ...K,
532
548
  description: e.target.value
533
549
  }),
534
550
  placeholder: "Optional notes on habitat, range or identification.",
@@ -537,35 +553,35 @@ function F() {
537
553
  })
538
554
  ]
539
555
  }),
540
- /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(h, {
556
+ /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(g, {
541
557
  variant: "outline",
542
- onClick: () => K(!1),
558
+ onClick: () => G(!1),
543
559
  children: "Cancel"
544
- }), /* @__PURE__ */ p(h, {
560
+ }), /* @__PURE__ */ m(g, {
545
561
  onClick: async () => {
546
- if (!F || !q.commonName.trim()) {
547
- X("Common name is required.");
562
+ if (!I || !K.commonName.trim()) {
563
+ Y("Common name is required.");
548
564
  return;
549
565
  }
550
- X(null);
566
+ Y(null);
551
567
  try {
552
- await V.mutateAsync({
553
- id: F,
568
+ await B.mutateAsync({
569
+ id: I,
554
570
  input: {
555
- commonName: q.commonName.trim(),
556
- scientificName: q.scientificName.trim() || null,
557
- taxonGroup: q.taxonGroup,
558
- conservationStatus: q.conservationStatus,
559
- isPriority: q.isPriority,
560
- description: q.description.trim() || null
571
+ commonName: K.commonName.trim(),
572
+ scientificName: K.scientificName.trim() || null,
573
+ taxonGroup: K.taxonGroup,
574
+ conservationStatus: K.conservationStatus,
575
+ isPriority: K.isPriority,
576
+ description: K.description.trim() || null
561
577
  }
562
- }), K(!1);
578
+ }), G(!1);
563
579
  } catch (e) {
564
- X(e instanceof Error ? e.message : "Failed to update species.");
580
+ Y(e instanceof Error ? e.message : "Failed to update species.");
565
581
  }
566
582
  },
567
- disabled: V.isPending,
568
- children: V.isPending ? "Saving…" : "Save changes"
583
+ disabled: B.isPending,
584
+ children: B.isPending ? "Saving…" : "Save changes"
569
585
  })] })
570
586
  ] })
571
587
  })
@@ -573,6 +589,6 @@ function F() {
573
589
  });
574
590
  }
575
591
  //#endregion
576
- export { F as SpeciesDetailPage };
592
+ export { I as SpeciesDetailPage };
577
593
 
578
594
  //# sourceMappingURL=SpeciesDetailPage.js.map