@burdenoff/microfe-healthybowl 2026.1005.2 → 2026.1007.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 (101) hide show
  1. package/dist/healthybowl/components/BedLayoutGrid.js +128 -115
  2. package/dist/healthybowl/components/BedLayoutGrid.js.map +1 -1
  3. package/dist/healthybowl/components/CropPicker.js +37 -0
  4. package/dist/healthybowl/components/CropPicker.js.map +1 -0
  5. package/dist/healthybowl/components/DataTable.js +125 -108
  6. package/dist/healthybowl/components/DataTable.js.map +1 -1
  7. package/dist/healthybowl/components/FilterBar.js +9 -6
  8. package/dist/healthybowl/components/FilterBar.js.map +1 -1
  9. package/dist/healthybowl/components/PlantCatalogPicker.js +32 -0
  10. package/dist/healthybowl/components/PlantCatalogPicker.js.map +1 -0
  11. package/dist/healthybowl/components/WorkspaceRecordPicker.js +164 -0
  12. package/dist/healthybowl/components/WorkspaceRecordPicker.js.map +1 -0
  13. package/dist/healthybowl/components/index.js +3 -1
  14. package/dist/healthybowl/hooks/useCropPage.js +71 -0
  15. package/dist/healthybowl/hooks/useCropPage.js.map +1 -0
  16. package/dist/healthybowl/hooks/usePlantCatalog.js +133 -44
  17. package/dist/healthybowl/hooks/usePlantCatalog.js.map +1 -1
  18. package/dist/healthybowl/hooks/usePlantingEstimate.js +6 -6
  19. package/dist/healthybowl/hooks/usePlantingEstimate.js.map +1 -1
  20. package/dist/healthybowl/hooks/useWorkspaceRead.js +46 -0
  21. package/dist/healthybowl/hooks/useWorkspaceRead.js.map +1 -0
  22. package/dist/healthybowl/pages/HomePage.js +143 -142
  23. package/dist/healthybowl/pages/HomePage.js.map +1 -1
  24. package/dist/healthybowl/pages/analytics/ReportsPage.js +8 -8
  25. package/dist/healthybowl/pages/catalog/PlantCatalogPage.js +266 -192
  26. package/dist/healthybowl/pages/catalog/PlantCatalogPage.js.map +1 -1
  27. package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js +58 -0
  28. package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js.map +1 -0
  29. package/dist/healthybowl/pages/catalog/browsePagination.js +24 -0
  30. package/dist/healthybowl/pages/catalog/browsePagination.js.map +1 -0
  31. package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +6 -6
  32. package/dist/healthybowl/pages/crops/CropDetailsPage.js +340 -348
  33. package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
  34. package/dist/healthybowl/pages/crops/CropPlanningPage.js +468 -434
  35. package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
  36. package/dist/healthybowl/pages/crops/CropsPage.js +633 -542
  37. package/dist/healthybowl/pages/crops/CropsPage.js.map +1 -1
  38. package/dist/healthybowl/pages/crops/FieldDetailsPage.js +875 -800
  39. package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
  40. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +459 -448
  41. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
  42. package/dist/healthybowl/pages/crops/SuccessionCropLabel.js +21 -0
  43. package/dist/healthybowl/pages/crops/SuccessionCropLabel.js.map +1 -0
  44. package/dist/healthybowl/pages/crops/planningEdit.js +30 -0
  45. package/dist/healthybowl/pages/crops/planningEdit.js.map +1 -0
  46. package/dist/healthybowl/pages/fields/FieldMapPage.js +989 -941
  47. package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
  48. package/dist/healthybowl/pages/financial/GeneralLedgerPage.js +6 -6
  49. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +7 -7
  50. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js.map +1 -1
  51. package/dist/healthybowl/pages/financial/TransactionsPage.js +541 -541
  52. package/dist/healthybowl/pages/financial/TransactionsPage.js.map +1 -1
  53. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +10 -10
  54. package/dist/healthybowl/pages/government-schemes/CommunicationPage.js +207 -207
  55. package/dist/healthybowl/pages/government-schemes/CommunicationPage.js.map +1 -1
  56. package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js +38 -38
  57. package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js.map +1 -1
  58. package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js +15 -15
  59. package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js.map +1 -1
  60. package/dist/healthybowl/pages/livestock/AnimalRegistryPage.js +4 -4
  61. package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +4 -4
  62. package/dist/healthybowl/pages/livestock/FeedManagementPage.js +4 -4
  63. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js +16 -16
  64. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js.map +1 -1
  65. package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js +4 -4
  66. package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js +4 -4
  67. package/dist/healthybowl/pages/market/MarketPricesPage.js +305 -305
  68. package/dist/healthybowl/pages/market/MarketPricesPage.js.map +1 -1
  69. package/dist/healthybowl/pages/network/CohortsPage.js +107 -107
  70. package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
  71. package/dist/healthybowl/pages/network/CommunityPage.js +247 -247
  72. package/dist/healthybowl/pages/network/CommunityPage.js.map +1 -1
  73. package/dist/healthybowl/pages/network/EventsPage.js +16 -16
  74. package/dist/healthybowl/pages/network/EventsPage.js.map +1 -1
  75. package/dist/healthybowl/pages/network/ExpertsPage.js +470 -470
  76. package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
  77. package/dist/healthybowl/pages/network/MentorsPage.js +6 -6
  78. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +8 -8
  79. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +7 -7
  80. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
  81. package/dist/healthybowl/pages/production/ProductionBatchesPage.js +7 -7
  82. package/dist/healthybowl/pages/production/RecipeManagementPage.js +5 -5
  83. package/dist/healthybowl/pages/production/ValueAddedProductsPage.js +7 -7
  84. package/dist/healthybowl/pages/soil/SoilTestsPage.js +6 -6
  85. package/dist/healthybowl/pages/soil/SoilTestsPage.js.map +1 -1
  86. package/dist/healthybowl/pages/suppliers/SuppliersPage.js +10 -10
  87. package/dist/healthybowl/pages/sustainability/CarbonCreditLedgerPage.js +6 -6
  88. package/dist/healthybowl/pages/terrace/PlantingFormModal.js +151 -131
  89. package/dist/healthybowl/pages/terrace/PlantingFormModal.js.map +1 -1
  90. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +6 -6
  91. package/dist/healthybowl/utils/cropComparison.js +1 -1
  92. package/dist/healthybowl/utils/cropComparison.js.map +1 -1
  93. package/dist/healthybowl/utils/cropPicker.js +35 -0
  94. package/dist/healthybowl/utils/cropPicker.js.map +1 -0
  95. package/dist/healthybowl/utils/plantingCapacity.js +2 -2
  96. package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
  97. package/dist/healthybowl/utils/quotaLabels.js +8 -0
  98. package/dist/healthybowl/utils/quotaLabels.js.map +1 -0
  99. package/dist/healthybowl/utils/seedRate.js +1 -8
  100. package/dist/healthybowl/utils/seedRate.js.map +1 -1
  101. package/package.json +1 -1
@@ -1,41 +1,41 @@
1
1
  import { cn as e } from "../../utils/helpers.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { StatCard as n } from "../../components/StatCard.js";
4
- import { ErrorState as r } from "../../components/ErrorState.js";
5
- import { ChartCard as i } from "../../components/ChartCard.js";
6
- import { FilterBar as ee } from "../../components/FilterBar.js";
7
- import { useConfirm as te } from "../../components/ConfirmDialog.js";
8
- import { PageLoader as ne } from "../../components/PageLoader.js";
9
- import { useToast as re } from "../../hooks/useToast.js";
4
+ import { FilterBar as r } from "../../components/FilterBar.js";
5
+ import { ErrorState as i } from "../../components/ErrorState.js";
6
+ import { ChartCard as a } from "../../components/ChartCard.js";
7
+ import { useConfirm as ee } from "../../components/ConfirmDialog.js";
8
+ import { PageLoader as te } from "../../components/PageLoader.js";
9
+ import { useToast as ne } from "../../hooks/useToast.js";
10
10
  import "../../components/index.js";
11
- import { Legend as ie } from "../../../node_modules/recharts/es6/component/Legend.js";
12
- import { Tooltip as ae } from "../../../node_modules/recharts/es6/component/Tooltip.js";
13
- import { ResponsiveContainer as oe } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
14
- import { CartesianGrid as se } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
15
- import { Line as a } from "../../../node_modules/recharts/es6/cartesian/Line.js";
16
- import { XAxis as ce } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
17
- import { YAxis as le } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
18
- import { LineChart as ue } from "../../../node_modules/recharts/es6/chart/LineChart.js";
19
- import { buildMandiFilter as de, buildTrendRows as fe, changeToneClass as o, comparatorSymbol as pe, districtsReporting as me, formatQty as he, formatRupee as s, latestPriceDateOf as ge, severityBadgeVariant as _e, severityBarClass as ve, sourceFreshnessLabel as c, statesReporting as ye } from "../../utils/mandiPrices.js";
20
- import { useHealthyBowlMandiPriceTrend as be, useHealthyBowlMandiPrices as xe } from "../../hooks/useHealthyBowlMandiPrices.js";
21
- import { PriceAlertRuleModal as Se } from "./market-prices/PriceAlertRuleModal.js";
22
- import { AddWatchModal as Ce } from "./market-prices/AddWatchModal.js";
23
- import { useCallback as we, useMemo as l, useState as u } from "react";
24
- import { useI18n as Te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
25
- import { AlertTriangle as Ee, BellPlus as d, Check as De, LineChart as f, Minus as p, Pencil as Oe, Plus as m, Sprout as ke, Star as h, Store as Ae, Trash2 as g, TrendingDown as je, TrendingUp as _ } from "lucide-react";
26
- import { Fragment as Me, jsx as v, jsxs as y } from "react/jsx-runtime";
27
- import { Badge as Ne, Button as b, Select as x, SelectContent as Pe, SelectItem as S, SelectTrigger as Fe, SelectValue as C, Switch as Ie } from "@burdenoff/fe-libs/ui";
11
+ import { Legend as re } from "../../../node_modules/recharts/es6/component/Legend.js";
12
+ import { Tooltip as ie } from "../../../node_modules/recharts/es6/component/Tooltip.js";
13
+ import { ResponsiveContainer as ae } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
14
+ import { CartesianGrid as oe } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
15
+ import { Line as o } from "../../../node_modules/recharts/es6/cartesian/Line.js";
16
+ import { XAxis as se } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
17
+ import { YAxis as ce } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
18
+ import { LineChart as le } from "../../../node_modules/recharts/es6/chart/LineChart.js";
19
+ import { buildMandiFilter as ue, buildTrendRows as de, changeToneClass as s, comparatorSymbol as fe, districtsReporting as pe, formatQty as me, formatRupee as c, latestPriceDateOf as he, severityBadgeVariant as ge, severityBarClass as _e, sourceFreshnessLabel as l, statesReporting as ve } from "../../utils/mandiPrices.js";
20
+ import { useHealthyBowlMandiPriceTrend as ye, useHealthyBowlMandiPrices as be } from "../../hooks/useHealthyBowlMandiPrices.js";
21
+ import { PriceAlertRuleModal as xe } from "./market-prices/PriceAlertRuleModal.js";
22
+ import { AddWatchModal as Se } from "./market-prices/AddWatchModal.js";
23
+ import { useCallback as Ce, useMemo as u, useState as d } from "react";
24
+ import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
25
+ import { AlertTriangle as Te, BellPlus as f, Check as Ee, LineChart as p, Minus as m, Pencil as De, Plus as h, Sprout as Oe, Star as g, Store as _, Trash2 as v, TrendingDown as ke, TrendingUp as y } from "lucide-react";
26
+ import { Fragment as Ae, jsx as b, jsxs as x } from "react/jsx-runtime";
27
+ import { Badge as je, Button as S, Select as C, SelectContent as Me, SelectItem as w, SelectTrigger as Ne, SelectValue as Pe, Switch as Fe } from "@burdenoff/fe-libs/ui";
28
28
  //#region src/healthybowl/pages/market/MarketPricesPage.tsx
29
- var Le = {
29
+ var Ie = {
30
30
  backgroundColor: "var(--color-card)",
31
31
  border: "1px solid var(--color-border)",
32
32
  borderRadius: "8px"
33
- }, w = [
33
+ }, T = [
34
34
  "var(--color-primary)",
35
35
  "var(--color-info)",
36
36
  "var(--color-warning)"
37
37
  ];
38
- function Re(e) {
38
+ function Le(e) {
39
39
  let t = Date.parse(e);
40
40
  if (!Number.isFinite(t)) return "";
41
41
  let n = Date.now() - t, r = Math.round(n / 6e4);
@@ -44,79 +44,79 @@ function Re(e) {
44
44
  let i = Math.round(r / 60);
45
45
  return i < 24 ? `${i}h ago` : `${Math.round(i / 24)}d ago`;
46
46
  }
47
- function ze({ row: t }) {
48
- if (t.changeDir == null || t.changePct == null) return /* @__PURE__ */ v("span", {
47
+ function Re({ row: t }) {
48
+ if (t.changeDir == null || t.changePct == null) return /* @__PURE__ */ b("span", {
49
49
  className: "text-xs text-text-secondary",
50
50
  children: "—"
51
51
  });
52
- let n = t.changeDir === "up" ? _ : t.changeDir === "down" ? je : p, r = t.changePct > 0 ? "+" : "";
53
- return /* @__PURE__ */ y("span", {
54
- className: e("inline-flex items-center gap-1 text-xs font-medium tabular-nums", o(t.changeDir)),
52
+ let n = t.changeDir === "up" ? y : t.changeDir === "down" ? ke : m, r = t.changePct > 0 ? "+" : "";
53
+ return /* @__PURE__ */ x("span", {
54
+ className: e("inline-flex items-center gap-1 text-xs font-medium tabular-nums", s(t.changeDir)),
55
55
  children: [
56
- /* @__PURE__ */ v(n, { className: "h-3.5 w-3.5" }),
56
+ /* @__PURE__ */ b(n, { className: "h-3.5 w-3.5" }),
57
57
  r,
58
58
  t.changePct.toFixed(1),
59
59
  "%"
60
60
  ]
61
61
  });
62
62
  }
63
- var T = "__all__";
64
- function E() {
65
- let { t: o } = Te(), { toast: p } = re(), je = te(), [_, E] = u(""), [O, k] = u(""), [A, j] = u(""), [M, Be] = u(""), { commodities: N, prices: P, facetPrices: F, watches: I, alertRules: L, alerts: R, loading: z, error: Ve, refetchAll: He, createWatch: Ue, deleteWatch: We, createRule: Ge, updateRule: B, deleteRule: Ke, acknowledgeAlert: qe } = xe({ filter: l(() => de({
66
- state: _,
67
- district: O,
68
- from: A,
69
- to: M
63
+ var E = "__all__";
64
+ function D() {
65
+ let { t: s } = we(), { toast: m } = ne(), ke = ee(), [y, D] = d(""), [k, A] = d(""), [j, M] = d(""), [N, ze] = d(""), { commodities: P, prices: F, facetPrices: I, watches: L, alertRules: R, alerts: z, loading: B, error: Be, refetchAll: Ve, createWatch: He, deleteWatch: Ue, createRule: We, updateRule: V, deleteRule: Ge, acknowledgeAlert: Ke } = be({ filter: u(() => ue({
66
+ state: y,
67
+ district: k,
68
+ from: j,
69
+ to: N
70
70
  }), [
71
- _,
72
- O,
73
- A,
74
- M
75
- ]) }), [V, Je] = u(""), [H, Ye] = u(null), [Xe, U] = u(!1), [Ze, Qe] = u(void 0), [$e, W] = u(!1), [et, tt] = u(null), G = l(() => [...new Set(F.map((e) => e.commodity).filter(Boolean))].sort((e, t) => e.localeCompare(t)), [F]), K = l(() => [...new Set(F.map((e) => e.marketName).filter(Boolean))], [F]), nt = l(() => ye(F), [F]), rt = l(() => me(F, _ || null), [F, _]), it = we((e) => {
76
- E(e), k("");
77
- }, []), at = !!(_ || O || A || M), ot = we(() => {
78
- E(""), k(""), j(""), Be("");
79
- }, []), q = l(() => ge(P), [P]), J = l(() => c(q, P[0]?.source ?? null), [q, P]), st = l(() => {
80
- let e = V.trim().toLowerCase();
81
- return e ? N.filter((t) => t.commodity.toLowerCase().includes(e) || (t.representativeMarket ?? "").toLowerCase().includes(e)) : N;
82
- }, [N, V]), Y = be({
83
- commodity: H?.commodity,
84
- marketName: H?.representativeMarket ?? null,
71
+ y,
72
+ k,
73
+ j,
74
+ N
75
+ ]) }), [H, qe] = d(""), [U, Je] = d(null), [Ye, W] = d(!1), [Xe, Ze] = d(void 0), [Qe, G] = d(!1), [$e, et] = d(null), K = u(() => [...new Set(I.map((e) => e.commodity).filter(Boolean))].sort((e, t) => e.localeCompare(t)), [I]), q = u(() => [...new Set(I.map((e) => e.marketName).filter(Boolean))], [I]), tt = u(() => ve(I), [I]), nt = u(() => pe(I, y || null), [I, y]), rt = Ce((e) => {
76
+ D(e), A("");
77
+ }, []), it = !!(y || k || j || N), at = Ce(() => {
78
+ D(""), A(""), M(""), ze("");
79
+ }, []), J = u(() => he(F), [F]), ot = u(() => l(J, F[0]?.source ?? null), [J, F]), st = u(() => {
80
+ let e = H.trim().toLowerCase();
81
+ return e ? P.filter((t) => t.commodity.toLowerCase().includes(e) || (t.representativeMarket ?? "").toLowerCase().includes(e)) : P;
82
+ }, [P, H]), Y = ye({
83
+ commodity: U?.commodity,
84
+ marketName: U?.representativeMarket ?? null,
85
85
  days: 30,
86
- skip: !H
87
- }), X = l(() => fe(Y.points), [Y.points]), ct = (e) => N.find((t) => t.commodity.toLowerCase() === e.commodity.toLowerCase()), Z = (e) => {
88
- Qe(e), U(!0);
86
+ skip: !U
87
+ }), X = u(() => de(Y.points), [Y.points]), ct = (e) => P.find((t) => t.commodity.toLowerCase() === e.commodity.toLowerCase()), Z = (e) => {
88
+ Ze(e), W(!0);
89
89
  }, Q = (e) => {
90
- tt(e ?? null), W(!0);
91
- }, lt = (e) => Ye((t) => t?.commodity === e.commodity ? null : e), ut = async (e) => {
92
- await Ue(e), p({
93
- title: o("healthybowl.mandi.toast.watched", "Added to watchlist"),
90
+ et(e ?? null), G(!0);
91
+ }, lt = (e) => Je((t) => t?.commodity === e.commodity ? null : e), ut = async (e) => {
92
+ await He(e), m({
93
+ title: s("healthybowl.mandi.toast.watched", "Added to watchlist"),
94
94
  variant: "success"
95
95
  });
96
96
  }, dt = async (e) => {
97
97
  try {
98
- await We(e.id), p({
99
- title: o("healthybowl.mandi.toast.unwatched", "Removed from watchlist"),
98
+ await Ue(e.id), m({
99
+ title: s("healthybowl.mandi.toast.unwatched", "Removed from watchlist"),
100
100
  variant: "success"
101
101
  });
102
102
  } catch (e) {
103
- p({
104
- title: o("healthybowl.common.error", "Something went wrong"),
103
+ m({
104
+ title: s("healthybowl.common.error", "Something went wrong"),
105
105
  description: e instanceof Error ? e.message : void 0,
106
106
  variant: "error"
107
107
  });
108
108
  }
109
109
  }, ft = async (e, t) => {
110
- t ? (await B(e), p({
111
- title: o("healthybowl.mandi.toast.ruleUpdated", "Alert updated"),
110
+ t ? (await V(e), m({
111
+ title: s("healthybowl.mandi.toast.ruleUpdated", "Alert updated"),
112
112
  variant: "success"
113
- })) : (await Ge(e), p({
114
- title: o("healthybowl.mandi.toast.ruleCreated", "Alert created"),
113
+ })) : (await We(e), m({
114
+ title: s("healthybowl.mandi.toast.ruleCreated", "Alert created"),
115
115
  variant: "success"
116
116
  }));
117
117
  }, pt = async (e) => {
118
118
  try {
119
- await B({
119
+ await V({
120
120
  id: e.id,
121
121
  commodity: e.commodity,
122
122
  marketName: e.marketName,
@@ -125,291 +125,291 @@ function E() {
125
125
  enabled: !e.enabled
126
126
  });
127
127
  } catch (e) {
128
- p({
129
- title: o("healthybowl.common.error", "Something went wrong"),
128
+ m({
129
+ title: s("healthybowl.common.error", "Something went wrong"),
130
130
  description: e instanceof Error ? e.message : void 0,
131
131
  variant: "error"
132
132
  });
133
133
  }
134
134
  }, mt = async (e) => {
135
- if (await je({
136
- title: o("healthybowl.mandi.rule.deleteTitle", "Delete price alert?"),
137
- message: o("healthybowl.mandi.rule.deleteBody", "You will stop getting alerts for {{c}}.", { c: e.commodity }),
138
- okButtonTitle: o("healthybowl.common.remove", "Remove"),
135
+ if (await ke({
136
+ title: s("healthybowl.mandi.rule.deleteTitle", "Delete price alert?"),
137
+ message: s("healthybowl.mandi.rule.deleteBody", "You will stop getting alerts for {{c}}.", { c: e.commodity }),
138
+ okButtonTitle: s("healthybowl.common.remove", "Remove"),
139
139
  destructive: !0
140
140
  })) try {
141
- await Ke(e.id), p({
142
- title: o("healthybowl.mandi.toast.ruleRemoved", "Alert removed"),
141
+ await Ge(e.id), m({
142
+ title: s("healthybowl.mandi.toast.ruleRemoved", "Alert removed"),
143
143
  variant: "success"
144
144
  });
145
145
  } catch (e) {
146
- p({
147
- title: o("healthybowl.common.error", "Something went wrong"),
146
+ m({
147
+ title: s("healthybowl.common.error", "Something went wrong"),
148
148
  description: e instanceof Error ? e.message : void 0,
149
149
  variant: "error"
150
150
  });
151
151
  }
152
- }, $ = l(() => R.filter((e) => e.status === "ACTIVE"), [R]), ht = async (e) => {
152
+ }, $ = u(() => z.filter((e) => e.status === "ACTIVE"), [z]), ht = async (e) => {
153
153
  try {
154
- await qe(e.id), p({
155
- title: o("healthybowl.mandi.toast.alertAcknowledged", "Alert acknowledged"),
154
+ await Ke(e.id), m({
155
+ title: s("healthybowl.mandi.toast.alertAcknowledged", "Alert acknowledged"),
156
156
  variant: "success"
157
157
  });
158
158
  } catch (e) {
159
- p({
160
- title: o("healthybowl.common.error", "Something went wrong"),
159
+ m({
160
+ title: s("healthybowl.common.error", "Something went wrong"),
161
161
  description: e instanceof Error ? e.message : void 0,
162
162
  variant: "error"
163
163
  });
164
164
  }
165
- }, gt = l(() => new Set(P.map((e) => e.marketName).filter(Boolean)).size, [P]), _t = $.length, vt = /* @__PURE__ */ y("div", {
165
+ }, gt = u(() => new Set(F.map((e) => e.marketName).filter(Boolean)).size, [F]), _t = $.length, vt = /* @__PURE__ */ x("div", {
166
166
  className: "flex items-center gap-2",
167
167
  children: [
168
- /* @__PURE__ */ y("span", {
168
+ /* @__PURE__ */ x("span", {
169
169
  className: "hidden items-center gap-1.5 rounded-full border border-border-subtle bg-bg-surface px-3 py-1.5 text-xs font-medium text-text-secondary sm:inline-flex",
170
- title: o("healthybowl.mandi.sourceTitle", "Agmarknet — Directorate of Marketing & Inspection, Govt. of India"),
171
- children: [/* @__PURE__ */ v("span", { className: "h-2 w-2 rounded-full bg-success" }), J]
170
+ title: s("healthybowl.mandi.sourceTitle", "Agmarknet — Directorate of Marketing & Inspection, Govt. of India"),
171
+ children: [/* @__PURE__ */ b("span", { className: "h-2 w-2 rounded-full bg-success" }), ot]
172
172
  }),
173
- /* @__PURE__ */ y(b, {
173
+ /* @__PURE__ */ x(S, {
174
174
  variant: "outline",
175
175
  size: "sm",
176
176
  onClick: () => Z(),
177
- children: [/* @__PURE__ */ v(h, { className: "h-3.5 w-3.5" }), o("healthybowl.mandi.watchCta", "Watch")]
177
+ children: [/* @__PURE__ */ b(g, { className: "h-3.5 w-3.5" }), s("healthybowl.mandi.watchCta", "Watch")]
178
178
  }),
179
- /* @__PURE__ */ y(b, {
179
+ /* @__PURE__ */ x(S, {
180
180
  size: "sm",
181
181
  onClick: () => Q(),
182
- children: [/* @__PURE__ */ v(d, { className: "h-3.5 w-3.5" }), o("healthybowl.mandi.newAlert", "New alert")]
182
+ children: [/* @__PURE__ */ b(f, { className: "h-3.5 w-3.5" }), s("healthybowl.mandi.newAlert", "New alert")]
183
183
  })
184
184
  ]
185
- }), yt = /* @__PURE__ */ y(Me, { children: [/* @__PURE__ */ v(Ce, {
186
- open: Xe,
187
- onClose: () => U(!1),
188
- commodities: G,
189
- markets: K,
190
- initialCommodity: Ze,
191
- onSubmit: ut
192
- }), /* @__PURE__ */ v(Se, {
193
- open: $e,
185
+ }), yt = /* @__PURE__ */ x(Ae, { children: [/* @__PURE__ */ b(Se, {
186
+ open: Ye,
194
187
  onClose: () => W(!1),
195
- editing: et,
196
- commodities: G,
197
- markets: K,
188
+ commodities: K,
189
+ markets: q,
190
+ initialCommodity: Xe,
191
+ onSubmit: ut
192
+ }), /* @__PURE__ */ b(xe, {
193
+ open: Qe,
194
+ onClose: () => G(!1),
195
+ editing: $e,
196
+ commodities: K,
197
+ markets: q,
198
198
  onSubmit: ft
199
- })] }), bt = !z && F.length === 0 && I.length === 0 && L.length === 0 && R.length === 0;
200
- return /* @__PURE__ */ v(t, {
201
- title: o("healthybowl.mandi.title", "Market Prices"),
202
- description: o("healthybowl.mandi.subtitle", "Mandi price intelligence"),
199
+ })] }), bt = !B && I.length === 0 && L.length === 0 && R.length === 0 && z.length === 0;
200
+ return /* @__PURE__ */ b(t, {
201
+ title: s("healthybowl.mandi.title", "Market Prices"),
202
+ description: s("healthybowl.mandi.subtitle", "Mandi price intelligence"),
203
203
  purpose: "See the latest mandi (wholesale market) prices for your crops — the modal rate, the day's low–high band and how it moved since yesterday — so you can decide when and where to sell. Pin the commodities you care about to your watchlist and set price alerts that ping you when a crop crosses your target rate. Prices come from Agmarknet (Govt. of India); the badge above shows the date of the latest available prices.",
204
204
  actions: vt,
205
- children: z && N.length === 0 ? /* @__PURE__ */ v(ne, {}) : Ve && N.length === 0 ? /* @__PURE__ */ v(r, { onRetry: He }) : bt ? /* @__PURE__ */ y("div", {
205
+ children: B && P.length === 0 ? /* @__PURE__ */ b(te, {}) : Be && P.length === 0 ? /* @__PURE__ */ b(i, { onRetry: Ve }) : bt ? /* @__PURE__ */ x("div", {
206
206
  className: "mx-auto max-w-xl py-10 text-center",
207
207
  "data-testid": "mandi-empty-state",
208
208
  children: [
209
- /* @__PURE__ */ v("div", {
209
+ /* @__PURE__ */ b("div", {
210
210
  className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-2xl bg-[var(--color-accent-soft)]",
211
- children: /* @__PURE__ */ v(Ae, { className: "h-8 w-8 text-success" })
211
+ children: /* @__PURE__ */ b(_, { className: "h-8 w-8 text-success" })
212
212
  }),
213
- /* @__PURE__ */ v("h2", {
213
+ /* @__PURE__ */ b("h2", {
214
214
  className: "text-xl font-semibold text-text-primary",
215
- children: o("healthybowl.mandi.empty.title", "No mandi prices yet")
215
+ children: s("healthybowl.mandi.empty.title", "No mandi prices yet")
216
216
  }),
217
- /* @__PURE__ */ v("p", {
217
+ /* @__PURE__ */ b("p", {
218
218
  className: "mt-2 text-sm text-text-secondary",
219
- children: o("healthybowl.mandi.empty.description", "Wholesale mandi prices from Agmarknet will appear here once the price feed has synced for your region. In the meantime you can pin commodities to watch and set price alerts.")
219
+ children: s("healthybowl.mandi.empty.description", "Wholesale mandi prices from Agmarknet will appear here once the price feed has synced for your region. In the meantime you can pin commodities to watch and set price alerts.")
220
220
  }),
221
- /* @__PURE__ */ y("div", {
221
+ /* @__PURE__ */ x("div", {
222
222
  className: "mt-6 flex items-center justify-center gap-3",
223
- children: [/* @__PURE__ */ y(b, {
223
+ children: [/* @__PURE__ */ x(S, {
224
224
  variant: "outline",
225
225
  onClick: () => Z(),
226
- children: [/* @__PURE__ */ v(h, { className: "h-4 w-4" }), o("healthybowl.mandi.watchCta", "Watch")]
227
- }), /* @__PURE__ */ y(b, {
226
+ children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), s("healthybowl.mandi.watchCta", "Watch")]
227
+ }), /* @__PURE__ */ x(S, {
228
228
  onClick: () => Q(),
229
- children: [/* @__PURE__ */ v(d, { className: "h-4 w-4" }), o("healthybowl.mandi.newAlert", "New alert")]
229
+ children: [/* @__PURE__ */ b(f, { className: "h-4 w-4" }), s("healthybowl.mandi.newAlert", "New alert")]
230
230
  })]
231
231
  }),
232
- /* @__PURE__ */ v("p", {
232
+ /* @__PURE__ */ b("p", {
233
233
  className: "mt-6 text-xs text-text-secondary",
234
- children: o("healthybowl.mandi.sourceNote", "Source: Agmarknet (agmarknet.gov.in), Govt. of India.")
234
+ children: s("healthybowl.mandi.sourceNote", "Source: Agmarknet (agmarknet.gov.in), Govt. of India.")
235
235
  }),
236
236
  yt
237
237
  ]
238
- }) : /* @__PURE__ */ y("div", {
238
+ }) : /* @__PURE__ */ x("div", {
239
239
  className: "space-y-4",
240
240
  children: [
241
- /* @__PURE__ */ y("div", {
241
+ /* @__PURE__ */ x("div", {
242
242
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
243
243
  children: [
244
- /* @__PURE__ */ v(n, {
244
+ /* @__PURE__ */ b(n, {
245
245
  hero: !0,
246
- label: o("healthybowl.mandi.kpi.commodities", "Commodities tracked"),
247
- value: N.length,
248
- icon: /* @__PURE__ */ v(ke, { className: "h-4 w-4" })
246
+ label: s("healthybowl.mandi.kpi.commodities", "Commodities tracked"),
247
+ value: P.length,
248
+ icon: /* @__PURE__ */ b(Oe, { className: "h-4 w-4" })
249
249
  }),
250
- /* @__PURE__ */ v(n, {
251
- label: o("healthybowl.mandi.kpi.markets", "Markets reporting"),
250
+ /* @__PURE__ */ b(n, {
251
+ label: s("healthybowl.mandi.kpi.markets", "Markets reporting"),
252
252
  value: gt,
253
- icon: /* @__PURE__ */ v(Ae, { className: "h-4 w-4" })
253
+ icon: /* @__PURE__ */ b(_, { className: "h-4 w-4" })
254
254
  }),
255
- /* @__PURE__ */ v(n, {
255
+ /* @__PURE__ */ b(n, {
256
256
  "data-testid": "mandi-kpi-watchlist",
257
- "data-value": I.length,
258
- label: o("healthybowl.mandi.kpi.watchlist", "On watchlist"),
259
- value: I.length,
260
- icon: /* @__PURE__ */ v(h, { className: "h-4 w-4" })
257
+ "data-value": L.length,
258
+ label: s("healthybowl.mandi.kpi.watchlist", "On watchlist"),
259
+ value: L.length,
260
+ icon: /* @__PURE__ */ b(g, { className: "h-4 w-4" })
261
261
  }),
262
- /* @__PURE__ */ v(n, {
262
+ /* @__PURE__ */ b(n, {
263
263
  "data-testid": "mandi-kpi-alerts",
264
264
  "data-value": _t,
265
- label: o("healthybowl.mandi.kpi.alerts", "Active alerts"),
265
+ label: s("healthybowl.mandi.kpi.alerts", "Active alerts"),
266
266
  value: _t,
267
- icon: /* @__PURE__ */ v(Ee, { className: "h-4 w-4" })
267
+ icon: /* @__PURE__ */ b(Te, { className: "h-4 w-4" })
268
268
  })
269
269
  ]
270
270
  }),
271
- /* @__PURE__ */ y("div", {
271
+ /* @__PURE__ */ x("div", {
272
272
  className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
273
- children: [/* @__PURE__ */ y("div", {
273
+ children: [/* @__PURE__ */ x("div", {
274
274
  className: "space-y-4 lg:col-span-2",
275
- children: [/* @__PURE__ */ y(i, {
276
- title: o("healthybowl.mandi.prices.title", "Latest prices by commodity"),
277
- description: `${o("healthybowl.mandi.prices.caption", "Modal ₹/unit")} · ${J}`,
278
- children: [/* @__PURE__ */ v("div", {
275
+ children: [/* @__PURE__ */ x(a, {
276
+ title: s("healthybowl.mandi.prices.title", "Latest prices by commodity"),
277
+ description: `${s("healthybowl.mandi.prices.caption", "Modal ₹/unit")} · ${ot}`,
278
+ children: [/* @__PURE__ */ b("div", {
279
279
  className: "mb-3",
280
- children: /* @__PURE__ */ v(ee, {
281
- searchValue: V,
282
- onSearchChange: Je,
283
- searchPlaceholder: o("healthybowl.mandi.prices.search", "Search commodity or market"),
284
- filters: /* @__PURE__ */ y("div", {
280
+ children: /* @__PURE__ */ b(r, {
281
+ searchValue: H,
282
+ onSearchChange: qe,
283
+ searchPlaceholder: s("healthybowl.mandi.prices.search", "Search commodity or market"),
284
+ filters: /* @__PURE__ */ x("div", {
285
285
  className: "flex flex-wrap items-center gap-2",
286
286
  children: [
287
- /* @__PURE__ */ y(x, {
288
- value: _ || T,
289
- onValueChange: (e) => it(e === T ? "" : e),
290
- children: [/* @__PURE__ */ v(Fe, {
287
+ /* @__PURE__ */ x(C, {
288
+ value: y || E,
289
+ onValueChange: (e) => rt(e === E ? "" : e),
290
+ children: [/* @__PURE__ */ b(Ne, {
291
291
  className: "w-44",
292
- children: /* @__PURE__ */ v(C, { placeholder: o("healthybowl.mandi.prices.filters.allStates", "All states") })
293
- }), /* @__PURE__ */ y(Pe, { children: [/* @__PURE__ */ v(S, {
294
- value: T,
295
- children: o("healthybowl.mandi.prices.filters.allStates", "All states")
296
- }), nt.map((e) => /* @__PURE__ */ v(S, {
292
+ children: /* @__PURE__ */ b(Pe, { placeholder: s("healthybowl.mandi.prices.filters.allStates", "All states") })
293
+ }), /* @__PURE__ */ x(Me, { children: [/* @__PURE__ */ b(w, {
294
+ value: E,
295
+ children: s("healthybowl.mandi.prices.filters.allStates", "All states")
296
+ }), tt.map((e) => /* @__PURE__ */ b(w, {
297
297
  value: e,
298
298
  children: e
299
299
  }, e))] })]
300
300
  }),
301
- /* @__PURE__ */ y(x, {
302
- value: O || T,
303
- onValueChange: (e) => k(e === T ? "" : e),
304
- children: [/* @__PURE__ */ v(Fe, {
301
+ /* @__PURE__ */ x(C, {
302
+ value: k || E,
303
+ onValueChange: (e) => A(e === E ? "" : e),
304
+ children: [/* @__PURE__ */ b(Ne, {
305
305
  className: "w-44",
306
- children: /* @__PURE__ */ v(C, { placeholder: o("healthybowl.mandi.prices.filters.allDistricts", "All districts") })
307
- }), /* @__PURE__ */ y(Pe, { children: [/* @__PURE__ */ v(S, {
308
- value: T,
309
- children: o("healthybowl.mandi.prices.filters.allDistricts", "All districts")
310
- }), rt.map((e) => /* @__PURE__ */ v(S, {
306
+ children: /* @__PURE__ */ b(Pe, { placeholder: s("healthybowl.mandi.prices.filters.allDistricts", "All districts") })
307
+ }), /* @__PURE__ */ x(Me, { children: [/* @__PURE__ */ b(w, {
308
+ value: E,
309
+ children: s("healthybowl.mandi.prices.filters.allDistricts", "All districts")
310
+ }), nt.map((e) => /* @__PURE__ */ b(w, {
311
311
  value: e,
312
312
  children: e
313
313
  }, e))] })]
314
314
  }),
315
- /* @__PURE__ */ v("input", {
315
+ /* @__PURE__ */ b("input", {
316
316
  type: "date",
317
- value: A,
318
- max: M || void 0,
319
- onChange: (e) => j(e.target.value),
320
- "aria-label": o("healthybowl.mandi.prices.filters.from", "From date"),
317
+ value: j,
318
+ max: N || void 0,
319
+ onChange: (e) => M(e.target.value),
320
+ "aria-label": s("healthybowl.mandi.prices.filters.from", "From date"),
321
321
  className: "rounded-lg border border-border-subtle bg-bg-surface px-2 py-1.5 text-sm text-text-primary"
322
322
  }),
323
- /* @__PURE__ */ v("input", {
323
+ /* @__PURE__ */ b("input", {
324
324
  type: "date",
325
- value: M,
326
- min: A || void 0,
327
- onChange: (e) => Be(e.target.value),
328
- "aria-label": o("healthybowl.mandi.prices.filters.to", "To date"),
325
+ value: N,
326
+ min: j || void 0,
327
+ onChange: (e) => ze(e.target.value),
328
+ "aria-label": s("healthybowl.mandi.prices.filters.to", "To date"),
329
329
  className: "rounded-lg border border-border-subtle bg-bg-surface px-2 py-1.5 text-sm text-text-primary"
330
330
  }),
331
- at && /* @__PURE__ */ v(b, {
331
+ it && /* @__PURE__ */ b(S, {
332
332
  variant: "ghost",
333
333
  size: "sm",
334
- onClick: ot,
335
- children: o("healthybowl.mandi.prices.filters.clear", "Clear filters")
334
+ onClick: at,
335
+ children: s("healthybowl.mandi.prices.filters.clear", "Clear filters")
336
336
  })
337
337
  ]
338
338
  })
339
339
  })
340
- }), st.length === 0 ? /* @__PURE__ */ v("p", {
340
+ }), st.length === 0 ? /* @__PURE__ */ b("p", {
341
341
  className: "py-6 text-center text-sm text-text-secondary",
342
- children: o("healthybowl.mandi.prices.noMatch", "No commodities match your search.")
343
- }) : /* @__PURE__ */ v("div", {
342
+ children: s("healthybowl.mandi.prices.noMatch", "No commodities match your search.")
343
+ }) : /* @__PURE__ */ b("div", {
344
344
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
345
- children: st.map((t) => /* @__PURE__ */ y("button", {
345
+ children: st.map((t) => /* @__PURE__ */ x("button", {
346
346
  type: "button",
347
347
  onClick: () => lt(t),
348
- className: e("rounded-lg border p-3 text-start transition-colors", H?.commodity === t.commodity ? "border-primary bg-[var(--color-accent-soft)]" : "border-border-subtle bg-bg-surface hover:border-border"),
348
+ className: e("rounded-lg border p-3 text-start transition-colors", U?.commodity === t.commodity ? "border-primary bg-[var(--color-accent-soft)]" : "border-border-subtle bg-bg-surface hover:border-border"),
349
349
  children: [
350
- /* @__PURE__ */ y("div", {
350
+ /* @__PURE__ */ x("div", {
351
351
  className: "flex items-start justify-between gap-2",
352
- children: [/* @__PURE__ */ y("div", {
352
+ children: [/* @__PURE__ */ x("div", {
353
353
  className: "min-w-0",
354
- children: [/* @__PURE__ */ v("div", {
354
+ children: [/* @__PURE__ */ b("div", {
355
355
  className: "truncate font-medium text-text-primary",
356
356
  children: t.commodity
357
- }), /* @__PURE__ */ v("div", {
357
+ }), /* @__PURE__ */ b("div", {
358
358
  className: "truncate text-xs text-text-secondary",
359
- children: t.representativeMarket ?? o("healthybowl.mandi.prices.markets", "{{n}} markets", { n: t.marketsCount })
359
+ children: t.representativeMarket ?? s("healthybowl.mandi.prices.markets", "{{n}} markets", { n: t.marketsCount })
360
360
  })]
361
- }), /* @__PURE__ */ v(ze, { row: t })]
361
+ }), /* @__PURE__ */ b(Re, { row: t })]
362
362
  }),
363
- /* @__PURE__ */ y("div", {
363
+ /* @__PURE__ */ x("div", {
364
364
  className: "mt-2 flex items-baseline gap-1",
365
- children: [/* @__PURE__ */ v("span", {
365
+ children: [/* @__PURE__ */ b("span", {
366
366
  className: "text-lg font-semibold tabular-nums text-text-primary",
367
- children: s(t.modalPrice)
368
- }), t.unit ? /* @__PURE__ */ y("span", {
367
+ children: c(t.modalPrice)
368
+ }), t.unit ? /* @__PURE__ */ x("span", {
369
369
  className: "text-xs text-text-secondary",
370
370
  children: ["/", t.unit]
371
371
  }) : null]
372
372
  }),
373
- /* @__PURE__ */ y("div", {
373
+ /* @__PURE__ */ x("div", {
374
374
  className: "mt-1 flex items-center justify-between text-xs text-text-secondary",
375
- children: [/* @__PURE__ */ y("span", {
375
+ children: [/* @__PURE__ */ x("span", {
376
376
  className: "tabular-nums",
377
377
  children: [
378
- s(t.minPrice),
378
+ c(t.minPrice),
379
379
  " – ",
380
- s(t.maxPrice)
380
+ c(t.maxPrice)
381
381
  ]
382
- }), /* @__PURE__ */ v("span", {
382
+ }), /* @__PURE__ */ b("span", {
383
383
  className: "tabular-nums",
384
- children: o("healthybowl.mandi.prices.arrivals", "Arr. {{q}}", { q: he(t.arrivalQty, t.unit) })
384
+ children: s("healthybowl.mandi.prices.arrivals", "Arr. {{q}}", { q: me(t.arrivalQty, t.unit) })
385
385
  })]
386
386
  }),
387
- /* @__PURE__ */ y("div", {
387
+ /* @__PURE__ */ x("div", {
388
388
  className: "mt-1.5 flex items-center justify-between border-t border-border-subtle pt-1.5",
389
- children: [/* @__PURE__ */ v("span", {
389
+ children: [/* @__PURE__ */ b("span", {
390
390
  className: "text-[11px] text-text-secondary",
391
- children: c(t.priceDate, t.source)
392
- }), /* @__PURE__ */ v("span", {
391
+ children: l(t.priceDate, t.source)
392
+ }), /* @__PURE__ */ b("span", {
393
393
  className: "text-[11px] font-medium text-primary hover:underline",
394
394
  onClick: (e) => {
395
395
  e.stopPropagation(), Z(t.commodity);
396
396
  },
397
- children: o("healthybowl.mandi.prices.watch", "Watch")
397
+ children: s("healthybowl.mandi.prices.watch", "Watch")
398
398
  })]
399
399
  })
400
400
  ]
401
401
  }, t.commodity))
402
402
  })]
403
- }), /* @__PURE__ */ v(i, {
404
- title: H ? o("healthybowl.mandi.trend.titleFor", "{{c}} — 30-day trend", { c: H.commodity }) : o("healthybowl.mandi.trend.title", "Price trend"),
405
- description: o("healthybowl.mandi.trend.caption", "Modal price · last 30 days"),
406
- children: H ? Y.loading && X.length === 0 ? /* @__PURE__ */ v(D, { label: o("healthybowl.mandi.trend.loading", "Loading trend…") }) : X.length === 0 ? /* @__PURE__ */ v(D, {
407
- icon: /* @__PURE__ */ v(f, { className: "h-6 w-6" }),
408
- label: o("healthybowl.mandi.trend.none", "No trend history available for this commodity yet.")
409
- }) : /* @__PURE__ */ v(oe, {
403
+ }), /* @__PURE__ */ b(a, {
404
+ title: U ? s("healthybowl.mandi.trend.titleFor", "{{c}} — 30-day trend", { c: U.commodity }) : s("healthybowl.mandi.trend.title", "Price trend"),
405
+ description: s("healthybowl.mandi.trend.caption", "Modal price · last 30 days"),
406
+ children: U ? Y.loading && X.length === 0 ? /* @__PURE__ */ b(O, { label: s("healthybowl.mandi.trend.loading", "Loading trend…") }) : X.length === 0 ? /* @__PURE__ */ b(O, {
407
+ icon: /* @__PURE__ */ b(p, { className: "h-6 w-6" }),
408
+ label: s("healthybowl.mandi.trend.none", "No trend history available for this commodity yet.")
409
+ }) : /* @__PURE__ */ b(ae, {
410
410
  width: "100%",
411
411
  height: 240,
412
- children: /* @__PURE__ */ y(ue, {
412
+ children: /* @__PURE__ */ x(le, {
413
413
  data: X,
414
414
  margin: {
415
415
  top: 6,
@@ -418,51 +418,51 @@ function E() {
418
418
  bottom: 4
419
419
  },
420
420
  children: [
421
- /* @__PURE__ */ v(se, {
421
+ /* @__PURE__ */ b(oe, {
422
422
  strokeDasharray: "3 3",
423
423
  className: "stroke-border"
424
424
  }),
425
- /* @__PURE__ */ v(ce, {
425
+ /* @__PURE__ */ b(se, {
426
426
  dataKey: "label",
427
427
  className: "text-xs",
428
428
  tick: { fill: "currentColor" }
429
429
  }),
430
- /* @__PURE__ */ v(le, {
430
+ /* @__PURE__ */ b(ce, {
431
431
  className: "text-xs",
432
432
  tick: { fill: "currentColor" },
433
- tickFormatter: (e) => s(e),
433
+ tickFormatter: (e) => c(e),
434
434
  width: 70
435
435
  }),
436
- /* @__PURE__ */ v(ae, {
437
- contentStyle: Le,
436
+ /* @__PURE__ */ b(ie, {
437
+ contentStyle: Ie,
438
438
  labelStyle: { color: "var(--color-foreground)" },
439
- formatter: (e) => s(e)
439
+ formatter: (e) => c(e)
440
440
  }),
441
- /* @__PURE__ */ v(ie, {}),
442
- /* @__PURE__ */ v(a, {
441
+ /* @__PURE__ */ b(re, {}),
442
+ /* @__PURE__ */ b(o, {
443
443
  type: "monotone",
444
444
  dataKey: "modal",
445
- name: o("healthybowl.mandi.trend.modal", "Modal"),
446
- stroke: w[0],
445
+ name: s("healthybowl.mandi.trend.modal", "Modal"),
446
+ stroke: T[0],
447
447
  strokeWidth: 2,
448
448
  dot: { r: 2 },
449
449
  connectNulls: !0
450
450
  }),
451
- /* @__PURE__ */ v(a, {
451
+ /* @__PURE__ */ b(o, {
452
452
  type: "monotone",
453
453
  dataKey: "min",
454
- name: o("healthybowl.mandi.trend.min", "Min"),
455
- stroke: w[1],
454
+ name: s("healthybowl.mandi.trend.min", "Min"),
455
+ stroke: T[1],
456
456
  strokeWidth: 1.5,
457
457
  strokeDasharray: "4 3",
458
458
  dot: !1,
459
459
  connectNulls: !0
460
460
  }),
461
- /* @__PURE__ */ v(a, {
461
+ /* @__PURE__ */ b(o, {
462
462
  type: "monotone",
463
463
  dataKey: "max",
464
- name: o("healthybowl.mandi.trend.max", "Max"),
465
- stroke: w[2],
464
+ name: s("healthybowl.mandi.trend.max", "Max"),
465
+ stroke: T[2],
466
466
  strokeWidth: 1.5,
467
467
  strokeDasharray: "4 3",
468
468
  dot: !1,
@@ -470,158 +470,158 @@ function E() {
470
470
  })
471
471
  ]
472
472
  })
473
- }) : /* @__PURE__ */ v(D, {
474
- icon: /* @__PURE__ */ v(f, { className: "h-6 w-6" }),
475
- label: o("healthybowl.mandi.trend.pick", "Select a commodity above to see its price trend.")
473
+ }) : /* @__PURE__ */ b(O, {
474
+ icon: /* @__PURE__ */ b(p, { className: "h-6 w-6" }),
475
+ label: s("healthybowl.mandi.trend.pick", "Select a commodity above to see its price trend.")
476
476
  })
477
477
  })]
478
- }), /* @__PURE__ */ y("div", {
478
+ }), /* @__PURE__ */ x("div", {
479
479
  className: "space-y-4 lg:col-span-1",
480
- children: [/* @__PURE__ */ v(i, {
481
- title: o("healthybowl.mandi.watchlist.title", "Watchlist"),
482
- actions: /* @__PURE__ */ y(b, {
480
+ children: [/* @__PURE__ */ b(a, {
481
+ title: s("healthybowl.mandi.watchlist.title", "Watchlist"),
482
+ actions: /* @__PURE__ */ x(S, {
483
483
  variant: "ghost",
484
484
  size: "sm",
485
485
  onClick: () => Z(),
486
- children: [/* @__PURE__ */ v(m, { className: "h-3.5 w-3.5" }), o("healthybowl.mandi.watchlist.add", "Add")]
486
+ children: [/* @__PURE__ */ b(h, { className: "h-3.5 w-3.5" }), s("healthybowl.mandi.watchlist.add", "Add")]
487
487
  }),
488
- children: I.length === 0 ? /* @__PURE__ */ v("p", {
488
+ children: L.length === 0 ? /* @__PURE__ */ b("p", {
489
489
  className: "py-6 text-center text-sm text-text-secondary",
490
- children: o("healthybowl.mandi.watchlist.empty", "Pin commodities to keep their latest price handy.")
491
- }) : /* @__PURE__ */ v("ul", {
490
+ children: s("healthybowl.mandi.watchlist.empty", "Pin commodities to keep their latest price handy.")
491
+ }) : /* @__PURE__ */ b("ul", {
492
492
  className: "space-y-2",
493
- children: I.map((e) => {
493
+ children: L.map((e) => {
494
494
  let t = ct(e);
495
- return /* @__PURE__ */ y("li", {
495
+ return /* @__PURE__ */ x("li", {
496
496
  className: "flex items-center justify-between gap-2 rounded-lg border border-border-subtle bg-bg-surface p-2.5",
497
- children: [/* @__PURE__ */ y("div", {
497
+ children: [/* @__PURE__ */ x("div", {
498
498
  className: "min-w-0",
499
- children: [/* @__PURE__ */ v("div", {
499
+ children: [/* @__PURE__ */ b("div", {
500
500
  className: "truncate text-sm font-medium text-text-primary",
501
501
  children: e.commodity
502
- }), /* @__PURE__ */ v("div", {
502
+ }), /* @__PURE__ */ b("div", {
503
503
  className: "truncate text-xs text-text-secondary",
504
- children: e.marketName ?? o("healthybowl.mandi.watchlist.anyMarket", "Any market")
504
+ children: e.marketName ?? s("healthybowl.mandi.watchlist.anyMarket", "Any market")
505
505
  })]
506
- }), /* @__PURE__ */ y("div", {
506
+ }), /* @__PURE__ */ x("div", {
507
507
  className: "flex items-center gap-2",
508
- children: [/* @__PURE__ */ v("span", {
508
+ children: [/* @__PURE__ */ b("span", {
509
509
  className: "text-sm font-semibold tabular-nums text-text-primary",
510
- children: t ? s(t.modalPrice) : "—"
511
- }), /* @__PURE__ */ v("button", {
510
+ children: t ? c(t.modalPrice) : "—"
511
+ }), /* @__PURE__ */ b("button", {
512
512
  type: "button",
513
513
  onClick: () => dt(e),
514
514
  className: "rounded-md p-1.5 text-text-secondary transition-colors hover:bg-status-error-bg hover:text-status-error-text",
515
- "aria-label": o("healthybowl.common.remove", "Remove"),
516
- title: o("healthybowl.common.remove", "Remove"),
517
- children: /* @__PURE__ */ v(g, { className: "h-4 w-4" })
515
+ "aria-label": s("healthybowl.common.remove", "Remove"),
516
+ title: s("healthybowl.common.remove", "Remove"),
517
+ children: /* @__PURE__ */ b(v, { className: "h-4 w-4" })
518
518
  })]
519
519
  })]
520
520
  }, e.id);
521
521
  })
522
522
  })
523
- }), /* @__PURE__ */ y(i, {
524
- title: o("healthybowl.mandi.alerts.title", "Price alerts"),
525
- actions: /* @__PURE__ */ y(b, {
523
+ }), /* @__PURE__ */ x(a, {
524
+ title: s("healthybowl.mandi.alerts.title", "Price alerts"),
525
+ actions: /* @__PURE__ */ x(S, {
526
526
  variant: "ghost",
527
527
  size: "sm",
528
528
  onClick: () => Q(),
529
- children: [/* @__PURE__ */ v(m, { className: "h-3.5 w-3.5" }), o("healthybowl.mandi.alerts.new", "New")]
529
+ children: [/* @__PURE__ */ b(h, { className: "h-3.5 w-3.5" }), s("healthybowl.mandi.alerts.new", "New")]
530
530
  }),
531
- children: [$.length === 0 ? /* @__PURE__ */ v("p", {
531
+ children: [$.length === 0 ? /* @__PURE__ */ b("p", {
532
532
  className: "py-4 text-center text-sm text-text-secondary",
533
- children: o("healthybowl.mandi.alerts.none", "No price alerts triggered.")
534
- }) : /* @__PURE__ */ v("ul", {
533
+ children: s("healthybowl.mandi.alerts.none", "No price alerts triggered.")
534
+ }) : /* @__PURE__ */ b("ul", {
535
535
  className: "space-y-2",
536
- children: $.slice(0, 5).map((t) => /* @__PURE__ */ y("li", {
536
+ children: $.slice(0, 5).map((t) => /* @__PURE__ */ x("li", {
537
537
  "data-testid": "mandi-alert-row",
538
538
  "data-alert-id": t.id,
539
539
  className: "flex gap-2 rounded-lg border border-border-subtle bg-bg-surface p-2.5",
540
- children: [/* @__PURE__ */ v("span", { className: e("mt-0.5 w-1 shrink-0 rounded-full", ve(t.severity)) }), /* @__PURE__ */ y("div", {
540
+ children: [/* @__PURE__ */ b("span", { className: e("mt-0.5 w-1 shrink-0 rounded-full", _e(t.severity)) }), /* @__PURE__ */ x("div", {
541
541
  className: "min-w-0 flex-1",
542
542
  children: [
543
- /* @__PURE__ */ y("div", {
543
+ /* @__PURE__ */ x("div", {
544
544
  className: "flex items-center justify-between gap-2",
545
- children: [/* @__PURE__ */ v("span", {
545
+ children: [/* @__PURE__ */ b("span", {
546
546
  className: "truncate text-sm font-medium text-text-primary",
547
547
  children: t.title
548
- }), /* @__PURE__ */ y("div", {
548
+ }), /* @__PURE__ */ x("div", {
549
549
  className: "flex shrink-0 items-center gap-1.5",
550
- children: [/* @__PURE__ */ v(Ne, {
551
- variant: _e(t.severity),
550
+ children: [/* @__PURE__ */ b(je, {
551
+ variant: ge(t.severity),
552
552
  children: t.severity
553
- }), /* @__PURE__ */ v(b, {
553
+ }), /* @__PURE__ */ b(S, {
554
554
  variant: "ghost",
555
555
  size: "sm",
556
556
  className: "h-6 px-1.5",
557
557
  "data-testid": "mandi-alert-acknowledge",
558
558
  onClick: () => ht(t),
559
- "aria-label": o("healthybowl.mandi.alerts.acknowledge", "Acknowledge alert"),
560
- title: o("healthybowl.mandi.alerts.acknowledge", "Acknowledge alert"),
561
- children: /* @__PURE__ */ v(De, { className: "h-3.5 w-3.5" })
559
+ "aria-label": s("healthybowl.mandi.alerts.acknowledge", "Acknowledge alert"),
560
+ title: s("healthybowl.mandi.alerts.acknowledge", "Acknowledge alert"),
561
+ children: /* @__PURE__ */ b(Ee, { className: "h-3.5 w-3.5" })
562
562
  })]
563
563
  })]
564
564
  }),
565
- /* @__PURE__ */ v("p", {
565
+ /* @__PURE__ */ b("p", {
566
566
  className: "mt-0.5 line-clamp-2 text-xs text-text-secondary",
567
567
  children: t.message
568
568
  }),
569
- /* @__PURE__ */ v("span", {
569
+ /* @__PURE__ */ b("span", {
570
570
  className: "mt-1 block text-[11px] text-text-secondary",
571
- children: Re(t.timestamp)
571
+ children: Le(t.timestamp)
572
572
  })
573
573
  ]
574
574
  })]
575
575
  }, t.id))
576
- }), /* @__PURE__ */ y("div", {
576
+ }), /* @__PURE__ */ x("div", {
577
577
  className: "mt-4 border-t border-border-subtle pt-3",
578
- children: [/* @__PURE__ */ v("p", {
578
+ children: [/* @__PURE__ */ b("p", {
579
579
  className: "text-sm font-semibold text-text-primary",
580
- children: o("healthybowl.mandi.alerts.rules", "Alert rules")
581
- }), L.length === 0 ? /* @__PURE__ */ v("p", {
580
+ children: s("healthybowl.mandi.alerts.rules", "Alert rules")
581
+ }), R.length === 0 ? /* @__PURE__ */ b("p", {
582
582
  className: "mt-1.5 text-xs text-text-secondary",
583
- children: o("healthybowl.mandi.alerts.noRules", "No rules yet — create one to get notified on price moves.")
584
- }) : /* @__PURE__ */ v("ul", {
583
+ children: s("healthybowl.mandi.alerts.noRules", "No rules yet — create one to get notified on price moves.")
584
+ }) : /* @__PURE__ */ b("ul", {
585
585
  className: "mt-2 space-y-1.5",
586
- children: L.map((e) => /* @__PURE__ */ y("li", {
586
+ children: R.map((e) => /* @__PURE__ */ x("li", {
587
587
  className: "flex items-center justify-between gap-2 text-xs",
588
- children: [/* @__PURE__ */ y("div", {
588
+ children: [/* @__PURE__ */ x("div", {
589
589
  className: "min-w-0",
590
- children: [/* @__PURE__ */ v("span", {
590
+ children: [/* @__PURE__ */ b("span", {
591
591
  className: "font-medium text-text-primary",
592
592
  children: e.commodity
593
- }), /* @__PURE__ */ y("span", {
593
+ }), /* @__PURE__ */ x("span", {
594
594
  className: "text-text-secondary",
595
595
  children: [
596
596
  " ",
597
- pe(e.comparator),
597
+ fe(e.comparator),
598
598
  " ",
599
- s(e.threshold),
599
+ c(e.threshold),
600
600
  e.marketName ? ` · ${e.marketName}` : ""
601
601
  ]
602
602
  })]
603
- }), /* @__PURE__ */ y("div", {
603
+ }), /* @__PURE__ */ x("div", {
604
604
  className: "flex shrink-0 items-center gap-1",
605
605
  children: [
606
- /* @__PURE__ */ v(Ie, {
606
+ /* @__PURE__ */ b(Fe, {
607
607
  checked: e.enabled,
608
608
  onCheckedChange: () => pt(e)
609
609
  }),
610
- /* @__PURE__ */ v("button", {
610
+ /* @__PURE__ */ b("button", {
611
611
  type: "button",
612
612
  onClick: () => Q(e),
613
613
  className: "rounded-md p-1 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
614
- "aria-label": o("healthybowl.common.edit", "Edit"),
615
- title: o("healthybowl.common.edit", "Edit"),
616
- children: /* @__PURE__ */ v(Oe, { className: "h-3.5 w-3.5" })
614
+ "aria-label": s("healthybowl.common.edit", "Edit"),
615
+ title: s("healthybowl.common.edit", "Edit"),
616
+ children: /* @__PURE__ */ b(De, { className: "h-3.5 w-3.5" })
617
617
  }),
618
- /* @__PURE__ */ v("button", {
618
+ /* @__PURE__ */ b("button", {
619
619
  type: "button",
620
620
  onClick: () => mt(e),
621
621
  className: "rounded-md p-1 text-text-secondary transition-colors hover:bg-status-error-bg hover:text-status-error-text",
622
- "aria-label": o("healthybowl.common.remove", "Remove"),
623
- title: o("healthybowl.common.remove", "Remove"),
624
- children: /* @__PURE__ */ v(g, { className: "h-3.5 w-3.5" })
622
+ "aria-label": s("healthybowl.common.remove", "Remove"),
623
+ title: s("healthybowl.common.remove", "Remove"),
624
+ children: /* @__PURE__ */ b(v, { className: "h-3.5 w-3.5" })
625
625
  })
626
626
  ]
627
627
  })]
@@ -631,25 +631,25 @@ function E() {
631
631
  })]
632
632
  })]
633
633
  }),
634
- /* @__PURE__ */ v("p", {
634
+ /* @__PURE__ */ b("p", {
635
635
  className: "text-xs text-text-secondary",
636
- children: o("healthybowl.mandi.disclosure", "Prices sourced from Agmarknet (agmarknet.gov.in), Directorate of Marketing & Inspection, Govt. of India, and shown as indicative wholesale rates — confirm at your local mandi before trading.")
636
+ children: s("healthybowl.mandi.disclosure", "Prices sourced from Agmarknet (agmarknet.gov.in), Directorate of Marketing & Inspection, Govt. of India, and shown as indicative wholesale rates — confirm at your local mandi before trading.")
637
637
  }),
638
638
  yt
639
639
  ]
640
640
  })
641
641
  });
642
642
  }
643
- function D({ icon: e, label: t }) {
644
- return /* @__PURE__ */ y("div", {
643
+ function O({ icon: e, label: t }) {
644
+ return /* @__PURE__ */ x("div", {
645
645
  className: "flex h-[240px] flex-col items-center justify-center gap-2 text-sm text-text-secondary",
646
- children: [e ? /* @__PURE__ */ v("span", {
646
+ children: [e ? /* @__PURE__ */ b("span", {
647
647
  className: "text-text-secondary",
648
648
  children: e
649
649
  }) : null, t]
650
650
  });
651
651
  }
652
652
  //#endregion
653
- export { E as MarketPricesPage };
653
+ export { D as MarketPricesPage };
654
654
 
655
655
  //# sourceMappingURL=MarketPricesPage.js.map