@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
@@ -2,30 +2,30 @@ import { cn as e, formatCurrency as t, formatDate as n } from "../../utils/helpe
2
2
  import { PageLayout as r } from "../../components/PageLayout.js";
3
3
  import { StatCard as i } from "../../components/StatCard.js";
4
4
  import { DataTable as a } from "../../components/DataTable.js";
5
- import { StatusBadge as o } from "../../components/StatusBadge.js";
5
+ import { FilterBar as o } from "../../components/FilterBar.js";
6
+ import { StatusBadge as s } from "../../components/StatusBadge.js";
6
7
  import { EmptyState as ee } from "../../components/EmptyState.js";
7
8
  import { ErrorState as te } from "../../components/ErrorState.js";
8
- import { FilterBar as ne } from "../../components/FilterBar.js";
9
- import { ToastContainer as re } from "../../components/Toast.js";
10
- import { useConfirm as ie } from "../../components/ConfirmDialog.js";
11
- import { LoadingSkeleton as ae } from "../../components/LoadingSkeleton.js";
12
- import { Modal as oe } from "../../components/Modal.js";
13
- import { useToast as se } from "../../hooks/useToast.js";
9
+ import { ToastContainer as ne } from "../../components/Toast.js";
10
+ import { useConfirm as re } from "../../components/ConfirmDialog.js";
11
+ import { LoadingSkeleton as ie } from "../../components/LoadingSkeleton.js";
12
+ import { Modal as ae } from "../../components/Modal.js";
13
+ import { useToast as oe } from "../../hooks/useToast.js";
14
14
  import "../../components/index.js";
15
- import { useHealthyBowlData as ce } from "../../hooks/useHealthyBowlData.js";
16
- import { useHealthyBowlContacts as le } from "../../hooks/useHealthyBowlContacts.js";
17
- import { humanizeEnum as ue } from "../../utils/contracts.js";
18
- import { useHealthyBowlAccounting as de } from "../../hooks/useHealthyBowlAccounting.js";
19
- import { useMemo as s, useRef as fe, useState as c } from "react";
20
- import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { Calendar as me, DollarSign as he, Download as ge, Edit as _e, ExternalLink as ve, Hash as ye, Paperclip as be, Plus as xe, Trash2 as Se, TrendingDown as Ce, TrendingUp as we, Upload as Te, X as Ee } from "lucide-react";
22
- import { Fragment as De, jsx as l, jsxs as u } from "react/jsx-runtime";
23
- import { Button as d, Select as f, SelectContent as p, SelectItem as m, SelectTrigger as h, SelectValue as g } from "@burdenoff/fe-libs/ui";
24
- import { useSaveToFiles as Oe } from "@burdenoff/fe-libs/storage";
25
- import { useAssistantPageControls as ke } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
26
- import { enumFilter as _, filtersOf as Ae, openersOf as je, searchOf as Me } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
15
+ import { useHealthyBowlData as se } from "../../hooks/useHealthyBowlData.js";
16
+ import { useHealthyBowlContacts as ce } from "../../hooks/useHealthyBowlContacts.js";
17
+ import { humanizeEnum as le } from "../../utils/contracts.js";
18
+ import { useHealthyBowlAccounting as ue } from "../../hooks/useHealthyBowlAccounting.js";
19
+ import { useMemo as c, useRef as de, useState as l } from "react";
20
+ import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { Calendar as pe, DollarSign as me, Download as he, Edit as ge, ExternalLink as _e, Hash as ve, Paperclip as ye, Plus as be, Trash2 as xe, TrendingDown as Se, TrendingUp as Ce, Upload as we, X as Te } from "lucide-react";
22
+ import { Fragment as Ee, jsx as u, jsxs as d } from "react/jsx-runtime";
23
+ import { Button as f, Select as p, SelectContent as m, SelectItem as h, SelectTrigger as g, SelectValue as _ } from "@burdenoff/fe-libs/ui";
24
+ import { useSaveToFiles as De } from "@burdenoff/fe-libs/storage";
25
+ import { useAssistantPageControls as Oe } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
26
+ import { enumFilter as v, filtersOf as ke, openersOf as Ae, searchOf as je } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
27
27
  //#region src/healthybowl/pages/financial/TransactionsPage.tsx
28
- var v = [
28
+ var y = [
29
29
  "crop_sales",
30
30
  "livestock_sales",
31
31
  "marketplace",
@@ -37,50 +37,50 @@ var v = [
37
37
  "certification",
38
38
  "equipment",
39
39
  "other"
40
- ], Ne = [
41
- ...v,
40
+ ], Me = [
41
+ ...y,
42
42
  "contract_sale",
43
43
  "contract_procurement",
44
44
  "coop_settlement",
45
45
  "coop_settlement_payout"
46
- ], Pe = [
46
+ ], Ne = [
47
47
  "Bank Transfer",
48
48
  "Credit Card",
49
49
  "Cash",
50
50
  "Check",
51
51
  "Payment Gateway"
52
- ], y = "none", b = "none", x = "none", S = "none", C = BigInt(2 ** 53 - 1), Fe = 10 * 1024 * 1024, w = (e) => {
52
+ ], b = "none", x = "none", S = "none", C = "none", w = BigInt(2 ** 53 - 1), Pe = 10 * 1024 * 1024, T = (e) => {
53
53
  if (e.length === 0) return !1;
54
54
  for (let t of e) if (t < "0" || t > "9") return !1;
55
55
  return !0;
56
- }, T = (e) => {
56
+ }, E = (e) => {
57
57
  let t = e.trim();
58
58
  if (!t || t.length > 21) return null;
59
59
  let n = t.split(".");
60
60
  if (n.length > 2) return null;
61
61
  let r = n[0] ?? "", i = n[1];
62
- if (!w(r) || r.length > 18 || i !== void 0 && (!w(i) || i.length > 2)) return null;
62
+ if (!T(r) || r.length > 18 || i !== void 0 && (!T(i) || i.length > 2)) return null;
63
63
  let a = (i ?? "").padEnd(2, "0"), o = BigInt(r) * 100n + BigInt(a || "0");
64
- return o <= C ? o : null;
65
- }, E = (e) => {
64
+ return o <= w ? o : null;
65
+ }, D = (e) => {
66
66
  let t = e < 0n ? "-" : "", n = e < 0n ? -e : e;
67
67
  return `${t}${n / 100n}.${(n % 100n).toString().padStart(2, "0")}`;
68
- }, Ie = (e) => {
69
- let t = Number(E(e));
70
- return Number.isFinite(t) && T(t.toString()) === e ? t : null;
71
- }, D = (e, t) => t.every((t, n) => e[n] === t), Le = async (e) => {
68
+ }, Fe = (e) => {
69
+ let t = Number(D(e));
70
+ return Number.isFinite(t) && E(t.toString()) === e ? t : null;
71
+ }, O = (e, t) => t.every((t, n) => e[n] === t), Ie = async (e) => {
72
72
  let t = new Uint8Array(await e.slice(0, 12).arrayBuffer());
73
- return D(t, [
73
+ return O(t, [
74
74
  37,
75
75
  80,
76
76
  68,
77
77
  70,
78
78
  45
79
- ]) ? "application/pdf" : D(t, [
79
+ ]) ? "application/pdf" : O(t, [
80
80
  255,
81
81
  216,
82
82
  255
83
- ]) ? "image/jpeg" : D(t, [
83
+ ]) ? "image/jpeg" : O(t, [
84
84
  137,
85
85
  80,
86
86
  78,
@@ -89,13 +89,13 @@ var v = [
89
89
  10,
90
90
  26,
91
91
  10
92
- ]) ? "image/png" : D(t, [
92
+ ]) ? "image/png" : O(t, [
93
93
  82,
94
94
  73,
95
95
  70,
96
96
  70
97
97
  ]) && t[8] === 87 && t[9] === 69 && t[10] === 66 && t[11] === 80 ? "image/webp" : null;
98
- }, Re = (e) => {
98
+ }, Le = (e) => {
99
99
  try {
100
100
  let t = new URL(e), n = t.protocol === "http:" && [
101
101
  "localhost",
@@ -106,12 +106,12 @@ var v = [
106
106
  } catch {
107
107
  return null;
108
108
  }
109
- }, ze = (e, t = "", n = "") => ({
109
+ }, Re = (e, t = "", n = "") => ({
110
110
  rowId: crypto.randomUUID(),
111
111
  category: e,
112
112
  amount: t,
113
113
  costCenterId: n
114
- }), O = {
114
+ }), k = {
115
115
  date: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
116
116
  type: "income",
117
117
  category: "crop_sales",
@@ -127,21 +127,21 @@ var v = [
127
127
  splits: [],
128
128
  receiptFileId: "",
129
129
  receiptFileName: ""
130
- }, Be = () => {
131
- let { t: C } = pe(), { transactions: w, crops: D, fields: Be, createTransaction: Ve, updateTransaction: He, deleteTransaction: Ue, getTransactionReceiptUrl: We, loading: Ge, errors: Ke } = ce(), { costCenters: k } = de({ costCenters: !0 }), A = s(() => k.filter((e) => e.isActive), [k]), { contacts: j } = le({
130
+ }, ze = () => {
131
+ let { t: w } = fe(), { transactions: T, crops: O, fields: ze, createTransaction: Be, updateTransaction: Ve, deleteTransaction: He, getTransactionReceiptUrl: Ue, loading: We, errors: Ge } = se(), { costCenters: A } = ue({ costCenters: !0 }), j = c(() => A.filter((e) => e.isActive), [A]), { contacts: M } = ce({
132
132
  list: !0,
133
133
  type: "SUPPLIER"
134
- }), qe = s(() => j.filter((e) => e.status === "ACTIVE"), [j]), { toasts: Je, toast: M, dismiss: Ye } = se(), Xe = ie(), { save: Ze, isPending: N } = Oe(), P = fe(null), [Qe, $e] = c(null), [F, et] = c(""), [I, tt] = c("all"), [L, nt] = c("all"), [R, rt] = c("all"), [z, it] = c("all"), [at, B] = c(!1), [ot, st] = c(!1), [V, H] = c(null), [ct, lt] = c(null), [U, W] = c(O), G = s(() => V ? w.find((e) => e.id === V) ?? null : null, [V, w]), K = s(() => {
135
- let e = T(U.amount), t = 0n, n = !0;
136
- for (let e of U.splits) {
137
- let r = T(e.amount);
134
+ }), Ke = c(() => M.filter((e) => e.status === "ACTIVE"), [M]), { toasts: qe, toast: N, dismiss: Je } = oe(), Ye = re(), { save: Xe, isPending: P } = De(), F = de(null), [Ze, Qe] = l(null), [I, $e] = l(""), [L, et] = l("all"), [R, tt] = l("all"), [z, nt] = l("all"), [B, rt] = l("all"), [it, V] = l(!1), [at, ot] = l(!1), [H, U] = l(null), [st, ct] = l(null), [W, G] = l(k), K = c(() => H ? T.find((e) => e.id === H) ?? null : null, [H, T]), q = c(() => {
135
+ let e = E(W.amount), t = 0n, n = !0;
136
+ for (let e of W.splits) {
137
+ let r = E(e.amount);
138
138
  if (r === null || r <= 0n) {
139
139
  n = !1;
140
140
  continue;
141
141
  }
142
142
  t += r;
143
143
  }
144
- let r = U.splits.length > 0;
144
+ let r = W.splits.length > 0;
145
145
  return {
146
146
  allocated: t,
147
147
  hasSplits: r,
@@ -150,72 +150,72 @@ var v = [
150
150
  splitAmountsValid: n,
151
151
  total: e
152
152
  };
153
- }, [U.amount, U.splits]), q = K.total === null ? null : Ie(K.total), ut = U.description.trim().length > 0 && K.total !== null && K.total > 0n && q !== null && K.matches && !N, dt = s(() => {
154
- let e = [...A];
155
- if (U.costCenterId && !e.some((e) => e.id === U.costCenterId)) {
156
- let t = k.find((e) => e.id === U.costCenterId);
153
+ }, [W.amount, W.splits]), J = q.total === null ? null : Fe(q.total), lt = W.description.trim().length > 0 && q.total !== null && q.total > 0n && J !== null && q.matches && !P, ut = c(() => {
154
+ let e = [...j];
155
+ if (W.costCenterId && !e.some((e) => e.id === W.costCenterId)) {
156
+ let t = A.find((e) => e.id === W.costCenterId);
157
157
  t && e.push(t);
158
158
  }
159
159
  return e;
160
160
  }, [
161
+ j,
161
162
  A,
162
- k,
163
- U.costCenterId
164
- ]), ft = s(() => {
165
- let e = [...qe];
166
- if (U.contactId && !e.some((e) => e.id === U.contactId)) {
167
- let t = j.find((e) => e.id === U.contactId);
163
+ W.costCenterId
164
+ ]), dt = c(() => {
165
+ let e = [...Ke];
166
+ if (W.contactId && !e.some((e) => e.id === W.contactId)) {
167
+ let t = M.find((e) => e.id === W.contactId);
168
168
  t && e.push(t);
169
169
  }
170
170
  return e;
171
171
  }, [
172
- qe,
173
- U.contactId,
174
- j
175
- ]), J = s(() => w.filter((e) => {
176
- let t = F === "" || (e.description ?? "").toLowerCase().includes(F.toLowerCase()) || e.reference && (e.reference ?? "").toLowerCase().includes(F.toLowerCase()) || e.contactName && e.contactName.toLowerCase().includes(F.toLowerCase()), n = I === "all" || e.type === I, r = L === "all" || e.category === L, i = R === "all" || e.status === R, a = z === "all" || e.cropId === z;
172
+ Ke,
173
+ W.contactId,
174
+ M
175
+ ]), ft = c(() => T.filter((e) => {
176
+ let t = I === "" || (e.description ?? "").toLowerCase().includes(I.toLowerCase()) || e.reference && (e.reference ?? "").toLowerCase().includes(I.toLowerCase()) || e.contactName && e.contactName.toLowerCase().includes(I.toLowerCase()), n = L === "all" || e.type === L, r = R === "all" || e.category === R, i = z === "all" || e.status === z, a = B === "all" || e.cropId === B;
177
177
  return t && n && r && i && a;
178
178
  }), [
179
- w,
180
- F,
179
+ T,
181
180
  I,
182
181
  L,
183
182
  R,
184
- z
185
- ]), pt = s(() => w.filter((e) => e.type === "income").reduce((e, t) => e + t.amount, 0), [w]), mt = s(() => w.filter((e) => e.type === "expense").reduce((e, t) => e + t.amount, 0), [w]), ht = pt - mt, Y = s(() => ({
186
- income: C("healthybowl.financial.transactions.type.income", "Income"),
187
- expense: C("healthybowl.financial.transactions.type.expense", "Expense")
188
- }), [C]), X = s(() => ({
189
- crop_sales: C("healthybowl.financial.transactions.category.cropSales", "Crop Sales"),
190
- livestock_sales: C("healthybowl.financial.transactions.category.livestockSales", "Livestock Sales"),
191
- marketplace: C("healthybowl.financial.transactions.category.marketplace", "Marketplace"),
192
- seeds: C("healthybowl.financial.transactions.category.seeds", "Seeds"),
193
- fertilizers: C("healthybowl.financial.transactions.category.fertilizers", "Fertilizers"),
194
- labor: C("healthybowl.financial.transactions.category.labor", "Labor"),
195
- irrigation: C("healthybowl.financial.transactions.category.irrigation", "Irrigation"),
196
- pest_control: C("healthybowl.financial.transactions.category.pestControl", "Pest Control"),
197
- certification: C("healthybowl.financial.transactions.category.certification", "Certification"),
198
- equipment: C("healthybowl.financial.transactions.category.equipment", "Equipment"),
199
- contract_sale: C("healthybowl.financial.transactions.category.contractSale", "Contract Sale"),
200
- contract_procurement: C("healthybowl.financial.transactions.category.contractProcurement", "Contract Procurement"),
201
- coop_settlement: C("healthybowl.financial.transactions.category.coopSettlement", "Co-op Settlement"),
202
- coop_settlement_payout: C("healthybowl.financial.transactions.category.coopPayout", "Co-op Payout"),
203
- other: C("healthybowl.financial.transactions.category.other", "Other")
204
- }), [C]), Z = s(() => ({
205
- completed: C("healthybowl.financial.transactions.status.completed", "Completed"),
206
- pending: C("healthybowl.financial.transactions.status.pending", "Pending"),
207
- failed: C("healthybowl.financial.transactions.status.failed", "Failed")
208
- }), [C]);
209
- ke(s(() => ({
210
- page: C("healthybowl.financial.transactions.assistant.page", "Transactions"),
211
- filters: Ae([
212
- _({
183
+ z,
184
+ B
185
+ ]), pt = c(() => T.filter((e) => e.type === "income").reduce((e, t) => e + t.amount, 0), [T]), mt = c(() => T.filter((e) => e.type === "expense").reduce((e, t) => e + t.amount, 0), [T]), ht = pt - mt, Y = c(() => ({
186
+ income: w("healthybowl.financial.transactions.type.income", "Income"),
187
+ expense: w("healthybowl.financial.transactions.type.expense", "Expense")
188
+ }), [w]), X = c(() => ({
189
+ crop_sales: w("healthybowl.financial.transactions.category.cropSales", "Crop Sales"),
190
+ livestock_sales: w("healthybowl.financial.transactions.category.livestockSales", "Livestock Sales"),
191
+ marketplace: w("healthybowl.financial.transactions.category.marketplace", "Marketplace"),
192
+ seeds: w("healthybowl.financial.transactions.category.seeds", "Seeds"),
193
+ fertilizers: w("healthybowl.financial.transactions.category.fertilizers", "Fertilizers"),
194
+ labor: w("healthybowl.financial.transactions.category.labor", "Labor"),
195
+ irrigation: w("healthybowl.financial.transactions.category.irrigation", "Irrigation"),
196
+ pest_control: w("healthybowl.financial.transactions.category.pestControl", "Pest Control"),
197
+ certification: w("healthybowl.financial.transactions.category.certification", "Certification"),
198
+ equipment: w("healthybowl.financial.transactions.category.equipment", "Equipment"),
199
+ contract_sale: w("healthybowl.financial.transactions.category.contractSale", "Contract Sale"),
200
+ contract_procurement: w("healthybowl.financial.transactions.category.contractProcurement", "Contract Procurement"),
201
+ coop_settlement: w("healthybowl.financial.transactions.category.coopSettlement", "Co-op Settlement"),
202
+ coop_settlement_payout: w("healthybowl.financial.transactions.category.coopPayout", "Co-op Payout"),
203
+ other: w("healthybowl.financial.transactions.category.other", "Other")
204
+ }), [w]), Z = c(() => ({
205
+ completed: w("healthybowl.financial.transactions.status.completed", "Completed"),
206
+ pending: w("healthybowl.financial.transactions.status.pending", "Pending"),
207
+ failed: w("healthybowl.financial.transactions.status.failed", "Failed")
208
+ }), [w]);
209
+ Oe(c(() => ({
210
+ page: w("healthybowl.financial.transactions.assistant.page", "Transactions"),
211
+ filters: ke([
212
+ v({
213
213
  id: "type",
214
- label: C("healthybowl.financial.transactions.assistant.type", "Type"),
214
+ label: w("healthybowl.financial.transactions.assistant.type", "Type"),
215
215
  options: [
216
216
  {
217
217
  value: "all",
218
- label: C("healthybowl.financial.transactions.filters.type.all", "All Types")
218
+ label: w("healthybowl.financial.transactions.filters.type.all", "All Types")
219
219
  },
220
220
  {
221
221
  value: "income",
@@ -227,30 +227,30 @@ var v = [
227
227
  }
228
228
  ],
229
229
  neutral: "all",
230
- value: I,
231
- set: tt
230
+ value: L,
231
+ set: et
232
232
  }),
233
- _({
233
+ v({
234
234
  id: "category",
235
- label: C("healthybowl.financial.transactions.assistant.category", "Category"),
235
+ label: w("healthybowl.financial.transactions.assistant.category", "Category"),
236
236
  options: [{
237
237
  value: "all",
238
- label: C("healthybowl.financial.transactions.filters.category.all", "All Categories")
238
+ label: w("healthybowl.financial.transactions.filters.category.all", "All Categories")
239
239
  }, ...Object.entries(X).map(([e, t]) => ({
240
240
  value: e,
241
241
  label: t
242
242
  }))],
243
243
  neutral: "all",
244
- value: L,
245
- set: nt
244
+ value: R,
245
+ set: tt
246
246
  }),
247
- _({
247
+ v({
248
248
  id: "status",
249
- label: C("healthybowl.financial.transactions.assistant.status", "Status"),
249
+ label: w("healthybowl.financial.transactions.assistant.status", "Status"),
250
250
  options: [
251
251
  {
252
252
  value: "all",
253
- label: C("healthybowl.financial.transactions.filters.status.all", "All Statuses")
253
+ label: w("healthybowl.financial.transactions.filters.status.all", "All Statuses")
254
254
  },
255
255
  {
256
256
  value: "completed",
@@ -266,42 +266,42 @@ var v = [
266
266
  }
267
267
  ],
268
268
  neutral: "all",
269
- value: R,
270
- set: rt
269
+ value: z,
270
+ set: nt
271
271
  })
272
272
  ]),
273
- search: Me(et),
274
- openers: je([{
273
+ search: je($e),
274
+ openers: Ae([{
275
275
  id: "add-transaction",
276
- label: C("healthybowl.financial.transactions.assistant.addTransaction", "Add transaction"),
276
+ label: w("healthybowl.financial.transactions.assistant.addTransaction", "Add transaction"),
277
277
  open: () => {
278
- W(O), H(null), B(!0);
278
+ G(k), U(null), V(!0);
279
279
  }
280
280
  }])
281
281
  }), [
282
- C,
282
+ w,
283
283
  Y,
284
284
  X,
285
285
  Z,
286
- I,
287
286
  L,
288
- R
287
+ R,
288
+ z
289
289
  ]));
290
- let gt = s(() => ({
291
- "Bank Transfer": C("healthybowl.financial.transactions.paymentMethod.bankTransfer", "Bank Transfer"),
292
- "Credit Card": C("healthybowl.financial.transactions.paymentMethod.creditCard", "Credit Card"),
293
- Cash: C("healthybowl.financial.transactions.paymentMethod.cash", "Cash"),
294
- Check: C("healthybowl.financial.transactions.paymentMethod.check", "Check"),
295
- "Payment Gateway": C("healthybowl.financial.transactions.paymentMethod.paymentGateway", "Payment Gateway")
296
- }), [C]), _t = () => {
297
- B(!1), H(null), W(O);
290
+ let gt = c(() => ({
291
+ "Bank Transfer": w("healthybowl.financial.transactions.paymentMethod.bankTransfer", "Bank Transfer"),
292
+ "Credit Card": w("healthybowl.financial.transactions.paymentMethod.creditCard", "Credit Card"),
293
+ Cash: w("healthybowl.financial.transactions.paymentMethod.cash", "Cash"),
294
+ Check: w("healthybowl.financial.transactions.paymentMethod.check", "Check"),
295
+ "Payment Gateway": w("healthybowl.financial.transactions.paymentMethod.paymentGateway", "Payment Gateway")
296
+ }), [w]), _t = () => {
297
+ V(!1), U(null), G(k);
298
298
  }, vt = () => {
299
- W((e) => ({
299
+ G((e) => ({
300
300
  ...e,
301
- splits: [...e.splits, ze(e.category, e.splits.length === 0 && T(e.amount) !== null ? e.amount : "", e.costCenterId)]
301
+ splits: [...e.splits, Re(e.category, e.splits.length === 0 && E(e.amount) !== null ? e.amount : "", e.costCenterId)]
302
302
  }));
303
303
  }, yt = (e, t) => {
304
- W((n) => ({
304
+ G((n) => ({
305
305
  ...n,
306
306
  splits: n.splits.map((n) => n.rowId === e ? {
307
307
  ...n,
@@ -309,17 +309,17 @@ var v = [
309
309
  } : n)
310
310
  }));
311
311
  }, bt = (e) => {
312
- W((t) => ({
312
+ G((t) => ({
313
313
  ...t,
314
314
  splits: t.splits.filter((t) => t.rowId !== e)
315
315
  }));
316
316
  }, xt = async (e) => {
317
317
  let t = e.target.files?.[0];
318
- if (P.current && (P.current.value = ""), t) try {
319
- if (t.size === 0 || t.size > Fe) throw Error(C("healthybowl.financial.transactions.receipt.invalidSize", "Receipt files must be non-empty and no larger than 10 MB."));
320
- let e = await Le(t);
321
- if (!e) throw Error(C("healthybowl.financial.transactions.receipt.invalidType", "Choose a PDF, JPEG, PNG, or WebP receipt file."));
322
- let n = await Ze({
318
+ if (F.current && (F.current.value = ""), t) try {
319
+ if (t.size === 0 || t.size > Pe) throw Error(w("healthybowl.financial.transactions.receipt.invalidSize", "Receipt files must be non-empty and no larger than 10 MB."));
320
+ let e = await Ie(t);
321
+ if (!e) throw Error(w("healthybowl.financial.transactions.receipt.invalidType", "Choose a PDF, JPEG, PNG, or WebP receipt file."));
322
+ let n = await Xe({
323
323
  source: {
324
324
  kind: "blob",
325
325
  filename: t.name,
@@ -332,139 +332,139 @@ var v = [
332
332
  },
333
333
  folderPath: "/HealthyBowl/Receipts"
334
334
  });
335
- W((e) => ({
335
+ G((e) => ({
336
336
  ...e,
337
337
  receiptFileId: n.id,
338
338
  receiptFileName: n.name
339
- })), M({
340
- title: C("healthybowl.financial.transactions.receipt.uploaded", "Receipt uploaded"),
339
+ })), N({
340
+ title: w("healthybowl.financial.transactions.receipt.uploaded", "Receipt uploaded"),
341
341
  description: n.name,
342
342
  variant: "success"
343
343
  });
344
344
  } catch (e) {
345
- M({
346
- title: C("healthybowl.financial.transactions.receipt.uploadFailed", "Receipt upload failed"),
347
- description: e instanceof Error ? e.message : C("healthybowl.financial.transactions.receipt.uploadFailedDescription", "Could not upload the receipt."),
345
+ N({
346
+ title: w("healthybowl.financial.transactions.receipt.uploadFailed", "Receipt upload failed"),
347
+ description: e instanceof Error ? e.message : w("healthybowl.financial.transactions.receipt.uploadFailedDescription", "Could not upload the receipt."),
348
348
  variant: "error"
349
349
  });
350
350
  }
351
351
  }, St = async (e) => {
352
352
  let t = window.open("about:blank", "_blank");
353
353
  if (!t) {
354
- M({
355
- title: C("healthybowl.financial.transactions.receipt.popupBlocked", "Receipt window blocked"),
356
- description: C("healthybowl.financial.transactions.receipt.popupBlockedDescription", "Allow pop-ups for this app, then try again."),
354
+ N({
355
+ title: w("healthybowl.financial.transactions.receipt.popupBlocked", "Receipt window blocked"),
356
+ description: w("healthybowl.financial.transactions.receipt.popupBlockedDescription", "Allow pop-ups for this app, then try again."),
357
357
  variant: "warning"
358
358
  });
359
359
  return;
360
360
  }
361
- t.opener = null, $e(e.id);
361
+ t.opener = null, Qe(e.id);
362
362
  try {
363
- let n = Re(await We(e.id));
364
- if (!n) throw Error(C("healthybowl.financial.transactions.receipt.unsupportedUrl", "Files returned an unsupported receipt URL."));
363
+ let n = Le(await Ue(e.id));
364
+ if (!n) throw Error(w("healthybowl.financial.transactions.receipt.unsupportedUrl", "Files returned an unsupported receipt URL."));
365
365
  t.closed || t.location.replace(n);
366
366
  } catch (e) {
367
- t.closed || t.close(), M({
368
- title: C("healthybowl.financial.transactions.receipt.openFailed", "Receipt unavailable"),
369
- description: e instanceof Error ? e.message : C("healthybowl.financial.transactions.receipt.openFailedDescription", "The receipt could not be opened."),
367
+ t.closed || t.close(), N({
368
+ title: w("healthybowl.financial.transactions.receipt.openFailed", "Receipt unavailable"),
369
+ description: e instanceof Error ? e.message : w("healthybowl.financial.transactions.receipt.openFailedDescription", "The receipt could not be opened."),
370
370
  variant: "error"
371
371
  });
372
372
  } finally {
373
- $e(null);
373
+ Qe(null);
374
374
  }
375
375
  }, Ct = async () => {
376
- if (!U.description.trim() || K.total === null || K.total <= 0n) {
377
- M({
378
- title: C("healthybowl.financial.transactions.toast.validation.title", "Validation Error"),
379
- description: C("healthybowl.financial.transactions.toast.validation.description", "Enter a description and an amount greater than 0 with no more than two decimal places."),
376
+ if (!W.description.trim() || q.total === null || q.total <= 0n) {
377
+ N({
378
+ title: w("healthybowl.financial.transactions.toast.validation.title", "Validation Error"),
379
+ description: w("healthybowl.financial.transactions.toast.validation.description", "Enter a description and an amount greater than 0 with no more than two decimal places."),
380
380
  variant: "error"
381
381
  });
382
382
  return;
383
383
  }
384
- if (K.hasSplits && (!K.splitAmountsValid || !K.matches)) {
385
- M({
386
- title: C("healthybowl.financial.transactions.splits.mismatchTitle", "Split allocation mismatch"),
387
- description: C("healthybowl.financial.transactions.splits.mismatchDescription", "Transaction amount {{total}} does not match allocated split total {{allocated}}.", {
388
- total: E(K.total),
389
- allocated: E(K.allocated)
384
+ if (q.hasSplits && (!q.splitAmountsValid || !q.matches)) {
385
+ N({
386
+ title: w("healthybowl.financial.transactions.splits.mismatchTitle", "Split allocation mismatch"),
387
+ description: w("healthybowl.financial.transactions.splits.mismatchDescription", "Transaction amount {{total}} does not match allocated split total {{allocated}}.", {
388
+ total: D(q.total),
389
+ allocated: D(q.allocated)
390
390
  }),
391
391
  variant: "error"
392
392
  });
393
393
  return;
394
394
  }
395
- if (q === null) {
396
- M({
397
- title: C("healthybowl.financial.transactions.toast.validation.title", "Validation Error"),
398
- description: C("healthybowl.financial.transactions.toast.validation.amountTooLarge", "This amount is too large to save without changing its exact cents. Enter a smaller amount."),
395
+ if (J === null) {
396
+ N({
397
+ title: w("healthybowl.financial.transactions.toast.validation.title", "Validation Error"),
398
+ description: w("healthybowl.financial.transactions.toast.validation.amountTooLarge", "This amount is too large to save without changing its exact cents. Enter a smaller amount."),
399
399
  variant: "error"
400
400
  });
401
401
  return;
402
402
  }
403
- if (N) return;
404
- let e = U.splits.map((e) => ({
403
+ if (P) return;
404
+ let e = W.splits.map((e) => ({
405
405
  category: e.category,
406
406
  amount: e.amount.trim(),
407
407
  costCenterId: e.costCenterId || null
408
- })), n = q;
409
- st(!0);
408
+ })), n = J;
409
+ ot(!0);
410
410
  try {
411
- V ? (await He({
412
- id: V,
411
+ H ? (await Ve({
412
+ id: H,
413
413
  amount: n,
414
- category: U.category,
415
- date: U.date,
416
- description: U.description,
417
- status: U.status,
418
- type: U.type,
419
- paymentMethod: U.paymentMethod,
420
- reference: U.reference,
421
- costCenterId: U.costCenterId || null,
422
- ...U.contactId === (G?.contactId ?? "") ? {} : { contactId: U.contactId || null },
423
- cropId: U.cropId || null,
424
- fieldId: U.fieldId || null,
414
+ category: W.category,
415
+ date: W.date,
416
+ description: W.description,
417
+ status: W.status,
418
+ type: W.type,
419
+ paymentMethod: W.paymentMethod,
420
+ reference: W.reference,
421
+ costCenterId: W.costCenterId || null,
422
+ ...W.contactId === (K?.contactId ?? "") ? {} : { contactId: W.contactId || null },
423
+ cropId: W.cropId || null,
424
+ fieldId: W.fieldId || null,
425
425
  splits: e,
426
- receiptFileId: U.receiptFileId || null
427
- }), M({
428
- title: C("healthybowl.financial.transactions.toast.updated.title", "Transaction Updated"),
429
- description: C("healthybowl.financial.transactions.toast.updated.description", "{{type}} of {{amount}} updated", {
430
- type: Y[U.type],
426
+ receiptFileId: W.receiptFileId || null
427
+ }), N({
428
+ title: w("healthybowl.financial.transactions.toast.updated.title", "Transaction Updated"),
429
+ description: w("healthybowl.financial.transactions.toast.updated.description", "{{type}} of {{amount}} updated", {
430
+ type: Y[W.type],
431
431
  amount: t(n, "INR")
432
432
  }),
433
433
  variant: "success"
434
- })) : (await Ve({
434
+ })) : (await Be({
435
435
  amount: n,
436
- category: U.category,
437
- date: U.date,
438
- description: U.description,
439
- status: U.status,
440
- type: U.type,
441
- ...U.paymentMethod ? { paymentMethod: U.paymentMethod } : {},
442
- ...U.reference ? { reference: U.reference } : {},
443
- ...U.costCenterId ? { costCenterId: U.costCenterId } : {},
444
- ...U.type === "expense" && U.contactId ? { contactId: U.contactId } : {},
445
- ...U.cropId ? { cropId: U.cropId } : {},
446
- ...U.fieldId ? { fieldId: U.fieldId } : {},
436
+ category: W.category,
437
+ date: W.date,
438
+ description: W.description,
439
+ status: W.status,
440
+ type: W.type,
441
+ ...W.paymentMethod ? { paymentMethod: W.paymentMethod } : {},
442
+ ...W.reference ? { reference: W.reference } : {},
443
+ ...W.costCenterId ? { costCenterId: W.costCenterId } : {},
444
+ ...W.type === "expense" && W.contactId ? { contactId: W.contactId } : {},
445
+ ...W.cropId ? { cropId: W.cropId } : {},
446
+ ...W.fieldId ? { fieldId: W.fieldId } : {},
447
447
  ...e.length > 0 ? { splits: e } : {},
448
- ...U.receiptFileId ? { receiptFileId: U.receiptFileId } : {}
449
- }), M({
450
- title: C("healthybowl.financial.transactions.toast.added.title", "Transaction Added"),
451
- description: C("healthybowl.financial.transactions.toast.added.description", "{{type}} of {{amount}} recorded", {
452
- type: Y[U.type],
448
+ ...W.receiptFileId ? { receiptFileId: W.receiptFileId } : {}
449
+ }), N({
450
+ title: w("healthybowl.financial.transactions.toast.added.title", "Transaction Added"),
451
+ description: w("healthybowl.financial.transactions.toast.added.description", "{{type}} of {{amount}} recorded", {
452
+ type: Y[W.type],
453
453
  amount: t(n, "INR")
454
454
  }),
455
455
  variant: "success"
456
456
  })), _t();
457
457
  } catch (e) {
458
- M({
459
- title: V ? C("healthybowl.financial.transactions.toast.updateFailed.title", "Update failed") : C("healthybowl.financial.transactions.toast.createFailed.title", "Create failed"),
458
+ N({
459
+ title: H ? w("healthybowl.financial.transactions.toast.updateFailed.title", "Update failed") : w("healthybowl.financial.transactions.toast.createFailed.title", "Create failed"),
460
460
  description: e instanceof Error ? e.message : String(e),
461
461
  variant: "error"
462
462
  });
463
463
  } finally {
464
- st(!1);
464
+ ot(!1);
465
465
  }
466
466
  }, wt = (e) => {
467
- W({
467
+ G({
468
468
  date: e.date,
469
469
  type: e.type,
470
470
  category: e.category,
@@ -485,24 +485,24 @@ var v = [
485
485
  })),
486
486
  receiptFileId: e.receiptFileId ?? "",
487
487
  receiptFileName: ""
488
- }), H(e.id), B(!0);
488
+ }), U(e.id), V(!0);
489
489
  }, Tt = async (e) => {
490
- if (await Xe({ message: C("healthybowl.financial.transactions.deleteConfirm", "Delete this transaction ({{description}})? This cannot be undone.", { description: e.description ?? "" }) })) {
491
- lt(e.id);
490
+ if (await Ye({ message: w("healthybowl.financial.transactions.deleteConfirm", "Delete this transaction ({{description}})? This cannot be undone.", { description: e.description ?? "" }) })) {
491
+ ct(e.id);
492
492
  try {
493
- await Ue(e.id), M({
494
- title: C("healthybowl.financial.transactions.toast.deleted.title", "Transaction Deleted"),
493
+ await He(e.id), N({
494
+ title: w("healthybowl.financial.transactions.toast.deleted.title", "Transaction Deleted"),
495
495
  description: e.description,
496
496
  variant: "success"
497
497
  });
498
498
  } catch (e) {
499
- M({
500
- title: C("healthybowl.common.error", "Error"),
501
- description: e instanceof Error ? e.message : C("healthybowl.financial.transactions.toast.deleteFailed", "Failed to delete transaction"),
499
+ N({
500
+ title: w("healthybowl.common.error", "Error"),
501
+ description: e instanceof Error ? e.message : w("healthybowl.financial.transactions.toast.deleteFailed", "Failed to delete transaction"),
502
502
  variant: "error"
503
503
  });
504
504
  } finally {
505
- lt(null);
505
+ ct(null);
506
506
  }
507
507
  }
508
508
  }, Et = () => {
@@ -519,7 +519,7 @@ var v = [
519
519
  "Crop",
520
520
  "Field",
521
521
  "Status"
522
- ], t = J.map((e) => [
522
+ ], t = ft.map((e) => [
523
523
  e.date,
524
524
  e.type,
525
525
  e.category,
@@ -536,19 +536,19 @@ var v = [
536
536
  let t = String(e ?? "");
537
537
  return `"${(/^[=+\-@\t\r]/.test(t) ? `'${t}` : t).replace(/"/g, "\"\"")}"`;
538
538
  }, r = [e, ...t].map((e) => e.map(n).join(",")).join("\n"), i = new Blob([r], { type: "text/csv" }), a = URL.createObjectURL(i), o = document.createElement("a");
539
- o.href = a, o.download = "transactions.csv", o.click(), URL.revokeObjectURL(a), M({
540
- title: C("healthybowl.financial.transactions.toast.exported.title", "Exported to CSV"),
541
- description: C("healthybowl.financial.transactions.toast.exported.description", "{{count}} transactions exported", { count: J.length }),
539
+ o.href = a, o.download = "transactions.csv", o.click(), URL.revokeObjectURL(a), N({
540
+ title: w("healthybowl.financial.transactions.toast.exported.title", "Exported to CSV"),
541
+ description: w("healthybowl.financial.transactions.toast.exported.description", "{{count}} transactions exported", { count: ft.length }),
542
542
  variant: "success"
543
543
  });
544
544
  }, Q = (e, t) => {
545
- W((n) => ({
545
+ G((n) => ({
546
546
  ...n,
547
547
  [e]: t
548
548
  }));
549
549
  }, Dt = (e) => {
550
550
  let t = e === "expense" ? "expense" : "income";
551
- W((e) => ({
551
+ G((e) => ({
552
552
  ...e,
553
553
  type: t,
554
554
  contactId: t === "expense" ? e.contactId : ""
@@ -556,20 +556,20 @@ var v = [
556
556
  }, Ot = [
557
557
  {
558
558
  key: "date",
559
- header: C("healthybowl.financial.transactions.table.headers.date", "Date"),
560
- render: (e) => /* @__PURE__ */ u("span", {
559
+ header: w("healthybowl.financial.transactions.table.headers.date", "Date"),
560
+ render: (e) => /* @__PURE__ */ d("span", {
561
561
  className: "flex items-center gap-1.5 text-sm text-text-secondary",
562
- children: [/* @__PURE__ */ l(me, { className: "h-3 w-3" }), n(e.date)]
562
+ children: [/* @__PURE__ */ u(pe, { className: "h-3 w-3" }), n(e.date)]
563
563
  })
564
564
  },
565
565
  {
566
566
  key: "type",
567
- header: C("healthybowl.financial.transactions.table.headers.type", "Type"),
567
+ header: w("healthybowl.financial.transactions.table.headers.type", "Type"),
568
568
  render: (e) => {
569
569
  let t = e.type === "income";
570
- return /* @__PURE__ */ u("span", {
570
+ return /* @__PURE__ */ d("span", {
571
571
  className: "flex items-center gap-1.5",
572
- children: [t ? /* @__PURE__ */ l(we, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ l(Ce, { className: "h-3.5 w-3.5 text-status-error-text" }), /* @__PURE__ */ l(o, {
572
+ children: [t ? /* @__PURE__ */ u(Ce, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ u(Se, { className: "h-3.5 w-3.5 text-status-error-text" }), /* @__PURE__ */ u(s, {
573
573
  label: Y[e.type],
574
574
  variant: t ? "success" : "error"
575
575
  })]
@@ -578,60 +578,60 @@ var v = [
578
578
  },
579
579
  {
580
580
  key: "category",
581
- header: C("healthybowl.financial.transactions.table.headers.category", "Category"),
582
- render: (e) => /* @__PURE__ */ l("span", {
581
+ header: w("healthybowl.financial.transactions.table.headers.category", "Category"),
582
+ render: (e) => /* @__PURE__ */ u("span", {
583
583
  className: "text-sm capitalize text-text-primary",
584
- children: e.category ? X[e.category] ?? ue(e.category) : ""
584
+ children: e.category ? X[e.category] ?? le(e.category) : ""
585
585
  })
586
586
  },
587
587
  {
588
588
  key: "description",
589
- header: C("healthybowl.financial.transactions.table.headers.description", "Description"),
590
- render: (e) => /* @__PURE__ */ l("span", {
589
+ header: w("healthybowl.financial.transactions.table.headers.description", "Description"),
590
+ render: (e) => /* @__PURE__ */ u("span", {
591
591
  className: "text-sm text-text-primary",
592
592
  children: e.description
593
593
  })
594
594
  },
595
595
  {
596
596
  key: "contact",
597
- header: C("healthybowl.financial.transactions.table.headers.supplier", "Supplier"),
598
- render: (e) => e.contactName ? /* @__PURE__ */ l("span", {
597
+ header: w("healthybowl.financial.transactions.table.headers.supplier", "Supplier"),
598
+ render: (e) => e.contactName ? /* @__PURE__ */ u("span", {
599
599
  className: "text-sm text-text-primary",
600
600
  children: e.contactName
601
- }) : /* @__PURE__ */ l("span", {
601
+ }) : /* @__PURE__ */ u("span", {
602
602
  className: "text-xs text-text-secondary",
603
603
  children: "-"
604
604
  })
605
605
  },
606
606
  {
607
607
  key: "costCenter",
608
- header: C("healthybowl.financial.transactions.table.headers.costCenter", "Cost Center"),
609
- render: (e) => e.costCenterLabel ? /* @__PURE__ */ l(o, {
608
+ header: w("healthybowl.financial.transactions.table.headers.costCenter", "Cost Center"),
609
+ render: (e) => e.costCenterLabel ? /* @__PURE__ */ u(s, {
610
610
  label: e.costCenterLabel,
611
611
  variant: "info"
612
- }) : /* @__PURE__ */ l("span", {
612
+ }) : /* @__PURE__ */ u("span", {
613
613
  className: "text-xs text-text-secondary",
614
614
  children: "-"
615
615
  })
616
616
  },
617
617
  {
618
618
  key: "crop",
619
- header: C("healthybowl.financial.transactions.table.headers.crop", "Crop / Field"),
620
- render: (e) => e.cropName || e.fieldName ? /* @__PURE__ */ l("span", {
619
+ header: w("healthybowl.financial.transactions.table.headers.crop", "Crop / Field"),
620
+ render: (e) => e.cropName || e.fieldName ? /* @__PURE__ */ u("span", {
621
621
  className: "text-sm text-text-primary",
622
622
  children: [e.cropName, e.fieldName].filter(Boolean).join(" / ")
623
- }) : /* @__PURE__ */ l("span", {
623
+ }) : /* @__PURE__ */ u("span", {
624
624
  className: "text-xs text-text-secondary",
625
625
  children: "-"
626
626
  })
627
627
  },
628
628
  {
629
629
  key: "amount",
630
- header: C("healthybowl.financial.transactions.table.headers.amount", "Amount"),
630
+ header: w("healthybowl.financial.transactions.table.headers.amount", "Amount"),
631
631
  className: "text-end",
632
632
  render: (n) => {
633
633
  let r = n.type === "income";
634
- return /* @__PURE__ */ u("span", {
634
+ return /* @__PURE__ */ d("span", {
635
635
  className: e("text-sm font-semibold", r ? "text-success" : "text-status-error-text"),
636
636
  children: [r ? "+" : "-", t(n.amount, "INR")]
637
637
  });
@@ -639,24 +639,24 @@ var v = [
639
639
  },
640
640
  {
641
641
  key: "paymentMethod",
642
- header: C("healthybowl.financial.transactions.table.headers.payment", "Payment"),
643
- render: (e) => /* @__PURE__ */ l("span", {
642
+ header: w("healthybowl.financial.transactions.table.headers.payment", "Payment"),
643
+ render: (e) => /* @__PURE__ */ u("span", {
644
644
  className: "text-xs text-text-secondary",
645
645
  children: e.paymentMethod
646
646
  })
647
647
  },
648
648
  {
649
649
  key: "reference",
650
- header: C("healthybowl.financial.transactions.table.headers.reference", "Reference"),
651
- render: (e) => /* @__PURE__ */ l("span", {
650
+ header: w("healthybowl.financial.transactions.table.headers.reference", "Reference"),
651
+ render: (e) => /* @__PURE__ */ u("span", {
652
652
  className: "text-xs font-mono text-text-secondary",
653
653
  children: e.reference || "-"
654
654
  })
655
655
  },
656
656
  {
657
657
  key: "status",
658
- header: C("healthybowl.financial.transactions.table.headers.status", "Status"),
659
- render: (e) => /* @__PURE__ */ l(o, {
658
+ header: w("healthybowl.financial.transactions.table.headers.status", "Status"),
659
+ render: (e) => /* @__PURE__ */ u(s, {
660
660
  label: Z[e.status],
661
661
  variant: e.status === "completed" ? "success" : e.status === "pending" ? "warning" : "error",
662
662
  dot: !0
@@ -664,469 +664,469 @@ var v = [
664
664
  },
665
665
  {
666
666
  key: "actions",
667
- header: C("healthybowl.financial.transactions.table.headers.actions", "Actions"),
667
+ header: w("healthybowl.financial.transactions.table.headers.actions", "Actions"),
668
668
  className: "text-end",
669
- render: (e) => /* @__PURE__ */ u("div", {
669
+ render: (e) => /* @__PURE__ */ d("div", {
670
670
  className: "flex items-center justify-end gap-1.5",
671
671
  children: [
672
- e.receiptFileId ? /* @__PURE__ */ l(d, {
672
+ e.receiptFileId ? /* @__PURE__ */ u(f, {
673
673
  variant: "ghost",
674
674
  size: "icon-sm",
675
675
  onClick: () => void St(e),
676
- disabled: Qe === e.id,
677
- title: C("healthybowl.financial.transactions.actions.openReceipt", "Open receipt"),
678
- "aria-label": C("healthybowl.financial.transactions.actions.openReceipt", "Open receipt"),
679
- children: /* @__PURE__ */ l(be, { className: "h-3.5 w-3.5" })
676
+ disabled: Ze === e.id,
677
+ title: w("healthybowl.financial.transactions.actions.openReceipt", "Open receipt"),
678
+ "aria-label": w("healthybowl.financial.transactions.actions.openReceipt", "Open receipt"),
679
+ children: /* @__PURE__ */ u(ye, { className: "h-3.5 w-3.5" })
680
680
  }) : null,
681
- /* @__PURE__ */ l(d, {
681
+ /* @__PURE__ */ u(f, {
682
682
  variant: "ghost",
683
683
  size: "icon-sm",
684
684
  onClick: () => wt(e),
685
- title: C("healthybowl.financial.transactions.actions.edit", "Edit Transaction"),
686
- "aria-label": C("healthybowl.financial.transactions.actions.edit", "Edit Transaction"),
687
- children: /* @__PURE__ */ l(_e, { className: "h-3.5 w-3.5" })
685
+ title: w("healthybowl.financial.transactions.actions.edit", "Edit Transaction"),
686
+ "aria-label": w("healthybowl.financial.transactions.actions.edit", "Edit Transaction"),
687
+ children: /* @__PURE__ */ u(ge, { className: "h-3.5 w-3.5" })
688
688
  }),
689
- /* @__PURE__ */ l(d, {
689
+ /* @__PURE__ */ u(f, {
690
690
  variant: "ghost",
691
691
  size: "icon-sm",
692
692
  onClick: () => Tt(e),
693
- disabled: ct === e.id,
693
+ disabled: st === e.id,
694
694
  className: "text-status-error-text hover:bg-status-error-bg/10 hover:text-status-error-text",
695
- title: C("healthybowl.financial.transactions.actions.delete", "Delete Transaction"),
696
- "aria-label": C("healthybowl.financial.transactions.actions.delete", "Delete Transaction"),
697
- children: /* @__PURE__ */ l(Se, { className: "h-3.5 w-3.5" })
695
+ title: w("healthybowl.financial.transactions.actions.delete", "Delete Transaction"),
696
+ "aria-label": w("healthybowl.financial.transactions.actions.delete", "Delete Transaction"),
697
+ children: /* @__PURE__ */ u(xe, { className: "h-3.5 w-3.5" })
698
698
  })
699
699
  ]
700
700
  })
701
701
  }
702
702
  ], $ = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]";
703
- return /* @__PURE__ */ u(r, {
704
- title: C("healthybowl.financial.transactions.title", "Transactions"),
705
- description: C("healthybowl.financial.transactions.description", "All income and expense records"),
703
+ return /* @__PURE__ */ d(r, {
704
+ title: w("healthybowl.financial.transactions.title", "Transactions"),
705
+ description: w("healthybowl.financial.transactions.description", "All income and expense records"),
706
706
  purpose: "Every rupee in and out of your farm, in one ledger. Record sales and costs here so your dashboard, budgets and reports stay accurate — and so you have a clean history come tax time.",
707
- actions: /* @__PURE__ */ u("div", {
707
+ actions: /* @__PURE__ */ d("div", {
708
708
  className: "flex items-center gap-2",
709
- children: [/* @__PURE__ */ u(d, {
709
+ children: [/* @__PURE__ */ d(f, {
710
710
  variant: "outline",
711
711
  onClick: Et,
712
- children: [/* @__PURE__ */ l(ge, { className: "h-3.5 w-3.5" }), C("healthybowl.financial.transactions.actions.exportCsv", "Export CSV")]
713
- }), /* @__PURE__ */ u(d, {
712
+ children: [/* @__PURE__ */ u(he, { className: "h-3.5 w-3.5" }), w("healthybowl.financial.transactions.actions.exportCsv", "Export CSV")]
713
+ }), /* @__PURE__ */ d(f, {
714
714
  onClick: () => {
715
- W(O), H(null), B(!0);
715
+ G(k), U(null), V(!0);
716
716
  },
717
- children: [/* @__PURE__ */ l(xe, { className: "h-3.5 w-3.5" }), C("healthybowl.financial.transactions.actions.add", "Add Transaction")]
717
+ children: [/* @__PURE__ */ u(be, { className: "h-3.5 w-3.5" }), w("healthybowl.financial.transactions.actions.add", "Add Transaction")]
718
718
  })]
719
719
  }),
720
720
  children: [
721
- Ge && w.length === 0 ? /* @__PURE__ */ l(ae, {
721
+ We && T.length === 0 ? /* @__PURE__ */ u(ie, {
722
722
  variant: "table",
723
723
  count: 6
724
- }) : w.length === 0 ? Ke.financial ? /* @__PURE__ */ l(te, {}) : /* @__PURE__ */ l(ee, {
724
+ }) : T.length === 0 ? Ge.financial ? /* @__PURE__ */ u(te, {}) : /* @__PURE__ */ u(ee, {
725
725
  illustration: "empty-data",
726
- title: C("healthybowl.financial.transactions.emptyState.title", "No transactions yet"),
727
- description: C("healthybowl.financial.transactions.emptyState.description", "Income and expense records will appear here once they're added.")
728
- }) : /* @__PURE__ */ u(De, { children: [
729
- /* @__PURE__ */ u("div", {
726
+ title: w("healthybowl.financial.transactions.emptyState.title", "No transactions yet"),
727
+ description: w("healthybowl.financial.transactions.emptyState.description", "Income and expense records will appear here once they're added.")
728
+ }) : /* @__PURE__ */ d(Ee, { children: [
729
+ /* @__PURE__ */ d("div", {
730
730
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
731
731
  children: [
732
- /* @__PURE__ */ l(i, {
732
+ /* @__PURE__ */ u(i, {
733
733
  hero: !0,
734
- label: C("healthybowl.financial.transactions.stats.totalIncome.label", "Total Income"),
734
+ label: w("healthybowl.financial.transactions.stats.totalIncome.label", "Total Income"),
735
735
  value: pt,
736
736
  currency: "INR",
737
- icon: /* @__PURE__ */ l(we, { className: "h-4 w-4" })
737
+ icon: /* @__PURE__ */ u(Ce, { className: "h-4 w-4" })
738
738
  }),
739
- /* @__PURE__ */ l(i, {
740
- label: C("healthybowl.financial.transactions.stats.totalExpenses.label", "Total Expenses"),
739
+ /* @__PURE__ */ u(i, {
740
+ label: w("healthybowl.financial.transactions.stats.totalExpenses.label", "Total Expenses"),
741
741
  value: mt,
742
742
  currency: "INR",
743
- icon: /* @__PURE__ */ l(Ce, { className: "h-4 w-4" })
743
+ icon: /* @__PURE__ */ u(Se, { className: "h-4 w-4" })
744
744
  }),
745
- /* @__PURE__ */ l(i, {
746
- label: C("healthybowl.financial.transactions.stats.netAmount.label", "Net Amount"),
745
+ /* @__PURE__ */ u(i, {
746
+ label: w("healthybowl.financial.transactions.stats.netAmount.label", "Net Amount"),
747
747
  value: ht,
748
748
  currency: "INR",
749
- icon: /* @__PURE__ */ l(he, { className: "h-4 w-4" })
749
+ icon: /* @__PURE__ */ u(me, { className: "h-4 w-4" })
750
750
  }),
751
- /* @__PURE__ */ l(i, {
752
- label: C("healthybowl.financial.transactions.stats.count.label", "Transaction Count"),
753
- value: w.length,
754
- icon: /* @__PURE__ */ l(ye, { className: "h-4 w-4" })
751
+ /* @__PURE__ */ u(i, {
752
+ label: w("healthybowl.financial.transactions.stats.count.label", "Transaction Count"),
753
+ value: T.length,
754
+ icon: /* @__PURE__ */ u(ve, { className: "h-4 w-4" })
755
755
  })
756
756
  ]
757
757
  }),
758
- /* @__PURE__ */ l(ne, {
759
- searchValue: F,
760
- onSearchChange: et,
761
- searchPlaceholder: C("healthybowl.financial.transactions.filters.searchPlaceholder", "Search by description or reference..."),
762
- filters: /* @__PURE__ */ u(De, { children: [
763
- /* @__PURE__ */ u(f, {
764
- value: I,
765
- onValueChange: (e) => tt(e),
766
- children: [/* @__PURE__ */ l(h, {
758
+ /* @__PURE__ */ u(o, {
759
+ searchValue: I,
760
+ onSearchChange: $e,
761
+ searchPlaceholder: w("healthybowl.financial.transactions.filters.searchPlaceholder", "Search by description or reference..."),
762
+ filters: /* @__PURE__ */ d(Ee, { children: [
763
+ /* @__PURE__ */ d(p, {
764
+ value: L,
765
+ onValueChange: (e) => et(e),
766
+ children: [/* @__PURE__ */ u(g, {
767
767
  className: "h-9 w-auto",
768
- children: /* @__PURE__ */ l(g, { placeholder: C("healthybowl.financial.transactions.filters.type.all", "All Types") })
769
- }), /* @__PURE__ */ u(p, { children: [
770
- /* @__PURE__ */ l(m, {
768
+ children: /* @__PURE__ */ u(_, { placeholder: w("healthybowl.financial.transactions.filters.type.all", "All Types") })
769
+ }), /* @__PURE__ */ d(m, { children: [
770
+ /* @__PURE__ */ u(h, {
771
771
  value: "all",
772
- children: C("healthybowl.financial.transactions.filters.type.all", "All Types")
772
+ children: w("healthybowl.financial.transactions.filters.type.all", "All Types")
773
773
  }),
774
- /* @__PURE__ */ l(m, {
774
+ /* @__PURE__ */ u(h, {
775
775
  value: "income",
776
776
  children: Y.income
777
777
  }),
778
- /* @__PURE__ */ l(m, {
778
+ /* @__PURE__ */ u(h, {
779
779
  value: "expense",
780
780
  children: Y.expense
781
781
  })
782
782
  ] })]
783
783
  }),
784
- /* @__PURE__ */ u(f, {
785
- value: L,
786
- onValueChange: nt,
787
- children: [/* @__PURE__ */ l(h, {
784
+ /* @__PURE__ */ d(p, {
785
+ value: R,
786
+ onValueChange: tt,
787
+ children: [/* @__PURE__ */ u(g, {
788
788
  className: "h-9 w-auto",
789
- children: /* @__PURE__ */ l(g, { placeholder: C("healthybowl.financial.transactions.filters.category.all", "All Categories") })
790
- }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
789
+ children: /* @__PURE__ */ u(_, { placeholder: w("healthybowl.financial.transactions.filters.category.all", "All Categories") })
790
+ }), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(h, {
791
791
  value: "all",
792
- children: C("healthybowl.financial.transactions.filters.category.all", "All Categories")
793
- }), v.map((e) => /* @__PURE__ */ l(m, {
792
+ children: w("healthybowl.financial.transactions.filters.category.all", "All Categories")
793
+ }), y.map((e) => /* @__PURE__ */ u(h, {
794
794
  value: e,
795
795
  children: X[e]
796
796
  }, e))] })]
797
797
  }),
798
- /* @__PURE__ */ u(f, {
799
- value: R,
800
- onValueChange: (e) => rt(e),
801
- children: [/* @__PURE__ */ l(h, {
798
+ /* @__PURE__ */ d(p, {
799
+ value: z,
800
+ onValueChange: (e) => nt(e),
801
+ children: [/* @__PURE__ */ u(g, {
802
802
  className: "h-9 w-auto",
803
- children: /* @__PURE__ */ l(g, { placeholder: C("healthybowl.financial.transactions.filters.status.all", "All Statuses") })
804
- }), /* @__PURE__ */ u(p, { children: [
805
- /* @__PURE__ */ l(m, {
803
+ children: /* @__PURE__ */ u(_, { placeholder: w("healthybowl.financial.transactions.filters.status.all", "All Statuses") })
804
+ }), /* @__PURE__ */ d(m, { children: [
805
+ /* @__PURE__ */ u(h, {
806
806
  value: "all",
807
- children: C("healthybowl.financial.transactions.filters.status.all", "All Statuses")
807
+ children: w("healthybowl.financial.transactions.filters.status.all", "All Statuses")
808
808
  }),
809
- /* @__PURE__ */ l(m, {
809
+ /* @__PURE__ */ u(h, {
810
810
  value: "completed",
811
811
  children: Z.completed
812
812
  }),
813
- /* @__PURE__ */ l(m, {
813
+ /* @__PURE__ */ u(h, {
814
814
  value: "pending",
815
815
  children: Z.pending
816
816
  }),
817
- /* @__PURE__ */ l(m, {
817
+ /* @__PURE__ */ u(h, {
818
818
  value: "failed",
819
819
  children: Z.failed
820
820
  })
821
821
  ] })]
822
822
  }),
823
- /* @__PURE__ */ u(f, {
824
- value: z,
825
- onValueChange: it,
826
- children: [/* @__PURE__ */ l(h, {
823
+ /* @__PURE__ */ d(p, {
824
+ value: B,
825
+ onValueChange: rt,
826
+ children: [/* @__PURE__ */ u(g, {
827
827
  className: "h-9 w-auto",
828
- children: /* @__PURE__ */ l(g, { placeholder: C("healthybowl.financial.transactions.filters.crop.all", "All Crops") })
829
- }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
828
+ children: /* @__PURE__ */ u(_, { placeholder: w("healthybowl.financial.transactions.filters.crop.all", "All Crops") })
829
+ }), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(h, {
830
830
  value: "all",
831
- children: C("healthybowl.financial.transactions.filters.crop.all", "All Crops")
832
- }), D.map((e) => /* @__PURE__ */ l(m, {
831
+ children: w("healthybowl.financial.transactions.filters.crop.all", "All Crops")
832
+ }), O.map((e) => /* @__PURE__ */ u(h, {
833
833
  value: e.id,
834
834
  children: e.name
835
835
  }, e.id))] })]
836
836
  })
837
837
  ] })
838
838
  }),
839
- /* @__PURE__ */ l(a, {
839
+ /* @__PURE__ */ u(a, {
840
840
  columns: Ot,
841
- data: J,
841
+ data: ft,
842
842
  keyField: "id",
843
- emptyMessage: C("healthybowl.financial.transactions.table.empty", "No transactions found.")
843
+ emptyMessage: w("healthybowl.financial.transactions.table.empty", "No transactions found.")
844
844
  })
845
845
  ] }),
846
- /* @__PURE__ */ l(oe, {
847
- open: at,
846
+ /* @__PURE__ */ u(ae, {
847
+ open: it,
848
848
  onClose: _t,
849
- title: V ? C("healthybowl.financial.transactions.modal.editTitle", "Edit Transaction") : C("healthybowl.financial.transactions.modal.title", "Add Transaction"),
850
- description: V ? C("healthybowl.financial.transactions.modal.editDescription", "Update this income or expense record") : C("healthybowl.financial.transactions.modal.description", "Record a new income or expense"),
849
+ title: H ? w("healthybowl.financial.transactions.modal.editTitle", "Edit Transaction") : w("healthybowl.financial.transactions.modal.title", "Add Transaction"),
850
+ description: H ? w("healthybowl.financial.transactions.modal.editDescription", "Update this income or expense record") : w("healthybowl.financial.transactions.modal.description", "Record a new income or expense"),
851
851
  size: "lg",
852
- footer: /* @__PURE__ */ u(De, { children: [/* @__PURE__ */ l(d, {
852
+ footer: /* @__PURE__ */ d(Ee, { children: [/* @__PURE__ */ u(f, {
853
853
  variant: "outline",
854
854
  onClick: _t,
855
- children: C("healthybowl.common.cancel", "Cancel")
856
- }), /* @__PURE__ */ l(d, {
855
+ children: w("healthybowl.common.cancel", "Cancel")
856
+ }), /* @__PURE__ */ u(f, {
857
857
  onClick: Ct,
858
- disabled: ot || !ut,
859
- children: N ? C("healthybowl.financial.transactions.receipt.uploading", "Uploading receipt...") : ot ? V ? C("healthybowl.financial.transactions.modal.updating", "Saving...") : C("healthybowl.financial.transactions.modal.submitting", "Adding...") : V ? C("healthybowl.financial.transactions.modal.update", "Save Changes") : C("healthybowl.financial.transactions.actions.add", "Add Transaction")
858
+ disabled: at || !lt,
859
+ children: P ? w("healthybowl.financial.transactions.receipt.uploading", "Uploading receipt...") : at ? H ? w("healthybowl.financial.transactions.modal.updating", "Saving...") : w("healthybowl.financial.transactions.modal.submitting", "Adding...") : H ? w("healthybowl.financial.transactions.modal.update", "Save Changes") : w("healthybowl.financial.transactions.actions.add", "Add Transaction")
860
860
  })] }),
861
- children: /* @__PURE__ */ u("div", {
861
+ children: /* @__PURE__ */ d("div", {
862
862
  className: "grid gap-4 sm:grid-cols-2",
863
863
  children: [
864
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
864
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
865
865
  className: "mb-1 block text-sm font-medium text-text-primary",
866
- children: C("healthybowl.financial.transactions.form.fields.date.label", "Date *")
867
- }), /* @__PURE__ */ l("input", {
866
+ children: w("healthybowl.financial.transactions.form.fields.date.label", "Date *")
867
+ }), /* @__PURE__ */ u("input", {
868
868
  type: "date",
869
- value: U.date,
869
+ value: W.date,
870
870
  onChange: (e) => Q("date", e.target.value),
871
871
  className: $
872
872
  })] }),
873
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
873
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
874
874
  className: "mb-1 block text-sm font-medium text-text-primary",
875
- children: C("healthybowl.financial.transactions.form.fields.type.label", "Type *")
876
- }), /* @__PURE__ */ u(f, {
877
- value: U.type,
875
+ children: w("healthybowl.financial.transactions.form.fields.type.label", "Type *")
876
+ }), /* @__PURE__ */ d(p, {
877
+ value: W.type,
878
878
  onValueChange: Dt,
879
- children: [/* @__PURE__ */ l(h, {
879
+ children: [/* @__PURE__ */ u(g, {
880
880
  className: "w-full",
881
- children: /* @__PURE__ */ l(g, {})
882
- }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
881
+ children: /* @__PURE__ */ u(_, {})
882
+ }), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(h, {
883
883
  value: "income",
884
884
  children: Y.income
885
- }), /* @__PURE__ */ l(m, {
885
+ }), /* @__PURE__ */ u(h, {
886
886
  value: "expense",
887
887
  children: Y.expense
888
888
  })] })]
889
889
  })] }),
890
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
890
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
891
891
  className: "mb-1 block text-sm font-medium text-text-primary",
892
- children: C("healthybowl.financial.transactions.form.fields.category.label", "Category *")
893
- }), /* @__PURE__ */ u(f, {
894
- value: U.category,
892
+ children: w("healthybowl.financial.transactions.form.fields.category.label", "Category *")
893
+ }), /* @__PURE__ */ d(p, {
894
+ value: W.category,
895
895
  onValueChange: (e) => Q("category", e),
896
- children: [/* @__PURE__ */ l(h, {
896
+ children: [/* @__PURE__ */ u(g, {
897
897
  className: "w-full",
898
- children: /* @__PURE__ */ l(g, {})
899
- }), /* @__PURE__ */ l(p, { children: v.map((e) => /* @__PURE__ */ l(m, {
898
+ children: /* @__PURE__ */ u(_, {})
899
+ }), /* @__PURE__ */ u(m, { children: y.map((e) => /* @__PURE__ */ u(h, {
900
900
  value: e,
901
901
  children: X[e]
902
902
  }, e)) })]
903
903
  })] }),
904
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
904
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
905
905
  className: "mb-1 block text-sm font-medium text-text-primary",
906
- children: C("healthybowl.financial.transactions.form.fields.amount.label", "Amount *")
907
- }), /* @__PURE__ */ l("input", {
906
+ children: w("healthybowl.financial.transactions.form.fields.amount.label", "Amount *")
907
+ }), /* @__PURE__ */ u("input", {
908
908
  type: "text",
909
909
  inputMode: "decimal",
910
- value: U.amount,
910
+ value: W.amount,
911
911
  onChange: (e) => Q("amount", e.target.value),
912
912
  placeholder: "0.00",
913
913
  className: $,
914
- "aria-describedby": K.hasSplits ? "transaction-allocation-summary" : void 0
914
+ "aria-describedby": q.hasSplits ? "transaction-allocation-summary" : void 0
915
915
  })] }),
916
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
916
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
917
917
  className: "mb-1 block text-sm font-medium text-text-primary",
918
- children: C("healthybowl.financial.transactions.form.fields.status.label", "Status *")
919
- }), /* @__PURE__ */ u(f, {
920
- value: U.status,
918
+ children: w("healthybowl.financial.transactions.form.fields.status.label", "Status *")
919
+ }), /* @__PURE__ */ d(p, {
920
+ value: W.status,
921
921
  onValueChange: (e) => Q("status", e),
922
- children: [/* @__PURE__ */ l(h, {
922
+ children: [/* @__PURE__ */ u(g, {
923
923
  className: "w-full",
924
- children: /* @__PURE__ */ l(g, {})
925
- }), /* @__PURE__ */ u(p, { children: [
926
- /* @__PURE__ */ l(m, {
924
+ children: /* @__PURE__ */ u(_, {})
925
+ }), /* @__PURE__ */ d(m, { children: [
926
+ /* @__PURE__ */ u(h, {
927
927
  value: "completed",
928
928
  children: Z.completed
929
929
  }),
930
- /* @__PURE__ */ l(m, {
930
+ /* @__PURE__ */ u(h, {
931
931
  value: "pending",
932
932
  children: Z.pending
933
933
  }),
934
- /* @__PURE__ */ l(m, {
934
+ /* @__PURE__ */ u(h, {
935
935
  value: "failed",
936
936
  children: Z.failed
937
937
  })
938
938
  ] })]
939
939
  })] }),
940
- /* @__PURE__ */ u("div", {
940
+ /* @__PURE__ */ d("div", {
941
941
  className: "sm:col-span-2",
942
- children: [/* @__PURE__ */ l("label", {
942
+ children: [/* @__PURE__ */ u("label", {
943
943
  className: "mb-1 block text-sm font-medium text-text-primary",
944
- children: C("healthybowl.financial.transactions.form.fields.description.label", "Description *")
945
- }), /* @__PURE__ */ l("input", {
944
+ children: w("healthybowl.financial.transactions.form.fields.description.label", "Description *")
945
+ }), /* @__PURE__ */ u("input", {
946
946
  type: "text",
947
- value: U.description,
947
+ value: W.description,
948
948
  onChange: (e) => Q("description", e.target.value),
949
- placeholder: C("healthybowl.financial.transactions.form.fields.description.placeholder", "Transaction description"),
949
+ placeholder: w("healthybowl.financial.transactions.form.fields.description.placeholder", "Transaction description"),
950
950
  className: $
951
951
  })]
952
952
  }),
953
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
953
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
954
954
  className: "mb-1 block text-sm font-medium text-text-primary",
955
- children: C("healthybowl.financial.transactions.form.fields.paymentMethod.label", "Payment Method")
956
- }), /* @__PURE__ */ u(f, {
957
- value: U.paymentMethod,
955
+ children: w("healthybowl.financial.transactions.form.fields.paymentMethod.label", "Payment Method")
956
+ }), /* @__PURE__ */ d(p, {
957
+ value: W.paymentMethod,
958
958
  onValueChange: (e) => Q("paymentMethod", e),
959
- children: [/* @__PURE__ */ l(h, {
959
+ children: [/* @__PURE__ */ u(g, {
960
960
  className: "w-full",
961
- children: /* @__PURE__ */ l(g, {})
962
- }), /* @__PURE__ */ l(p, { children: Pe.map((e) => /* @__PURE__ */ l(m, {
961
+ children: /* @__PURE__ */ u(_, {})
962
+ }), /* @__PURE__ */ u(m, { children: Ne.map((e) => /* @__PURE__ */ u(h, {
963
963
  value: e,
964
964
  children: gt[e] ?? e
965
965
  }, e)) })]
966
966
  })] }),
967
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
967
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
968
968
  className: "mb-1 block text-sm font-medium text-text-primary",
969
- children: C("healthybowl.financial.transactions.form.fields.reference.label", "Reference")
970
- }), /* @__PURE__ */ l("input", {
969
+ children: w("healthybowl.financial.transactions.form.fields.reference.label", "Reference")
970
+ }), /* @__PURE__ */ u("input", {
971
971
  type: "text",
972
- value: U.reference,
972
+ value: W.reference,
973
973
  onChange: (e) => Q("reference", e.target.value),
974
974
  placeholder: "INV-2025-XXX",
975
975
  className: $
976
976
  })] }),
977
- U.type === "expense" ? /* @__PURE__ */ u("div", {
977
+ W.type === "expense" ? /* @__PURE__ */ d("div", {
978
978
  className: "sm:col-span-2",
979
979
  children: [
980
- /* @__PURE__ */ l("label", {
980
+ /* @__PURE__ */ u("label", {
981
981
  className: "mb-1 block text-sm font-medium text-text-primary",
982
- children: C("healthybowl.financial.transactions.form.fields.supplier.label", "Supplier")
982
+ children: w("healthybowl.financial.transactions.form.fields.supplier.label", "Supplier")
983
983
  }),
984
- /* @__PURE__ */ u(f, {
985
- value: U.contactId === "" ? b : U.contactId,
986
- onValueChange: (e) => Q("contactId", e === b ? "" : e),
987
- children: [/* @__PURE__ */ l(h, {
984
+ /* @__PURE__ */ d(p, {
985
+ value: W.contactId === "" ? x : W.contactId,
986
+ onValueChange: (e) => Q("contactId", e === x ? "" : e),
987
+ children: [/* @__PURE__ */ u(g, {
988
988
  className: "w-full",
989
- children: /* @__PURE__ */ l(g, { placeholder: C("healthybowl.financial.transactions.form.fields.supplier.none", "None") })
990
- }), /* @__PURE__ */ u(p, { children: [
991
- /* @__PURE__ */ l(m, {
992
- value: b,
993
- children: C("healthybowl.financial.transactions.form.fields.supplier.none", "None")
989
+ children: /* @__PURE__ */ u(_, { placeholder: w("healthybowl.financial.transactions.form.fields.supplier.none", "None") })
990
+ }), /* @__PURE__ */ d(m, { children: [
991
+ /* @__PURE__ */ u(h, {
992
+ value: x,
993
+ children: w("healthybowl.financial.transactions.form.fields.supplier.none", "None")
994
994
  }),
995
- U.contactId && !ft.some((e) => e.id === U.contactId) ? /* @__PURE__ */ u(m, {
996
- value: U.contactId,
995
+ W.contactId && !dt.some((e) => e.id === W.contactId) ? /* @__PURE__ */ d(h, {
996
+ value: W.contactId,
997
997
  children: [
998
- G?.contactName ?? C("healthybowl.financial.transactions.form.fields.supplier.unavailable", "Linked supplier"),
998
+ K?.contactName ?? w("healthybowl.financial.transactions.form.fields.supplier.unavailable", "Linked supplier"),
999
999
  " ",
1000
1000
  "(",
1001
- C("healthybowl.common.unavailable", "unavailable"),
1001
+ w("healthybowl.common.unavailable", "unavailable"),
1002
1002
  ")"
1003
1003
  ]
1004
1004
  }) : null,
1005
- ft.map((e) => /* @__PURE__ */ u(m, {
1005
+ dt.map((e) => /* @__PURE__ */ d(h, {
1006
1006
  value: e.id,
1007
1007
  children: [e.name, e.status === "ACTIVE" ? "" : " (inactive)"]
1008
1008
  }, e.id))
1009
1009
  ] })]
1010
1010
  }),
1011
- /* @__PURE__ */ l("p", {
1011
+ /* @__PURE__ */ u("p", {
1012
1012
  className: "mt-1 text-xs text-text-secondary",
1013
- children: C("healthybowl.financial.transactions.form.fields.supplier.hint", "Linked expenses are included in this supplier’s completed and pending spend totals.")
1013
+ children: w("healthybowl.financial.transactions.form.fields.supplier.hint", "Linked expenses are included in this supplier’s completed and pending spend totals.")
1014
1014
  })
1015
1015
  ]
1016
1016
  }) : null,
1017
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1017
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
1018
1018
  className: "mb-1 block text-sm font-medium text-text-primary",
1019
- children: C("healthybowl.financial.transactions.form.fields.crop.label", "Crop")
1020
- }), /* @__PURE__ */ u(f, {
1021
- value: U.cropId === "" ? x : U.cropId,
1022
- onValueChange: (e) => Q("cropId", e === x ? "" : e),
1023
- children: [/* @__PURE__ */ l(h, {
1019
+ children: w("healthybowl.financial.transactions.form.fields.crop.label", "Crop")
1020
+ }), /* @__PURE__ */ d(p, {
1021
+ value: W.cropId === "" ? S : W.cropId,
1022
+ onValueChange: (e) => Q("cropId", e === S ? "" : e),
1023
+ children: [/* @__PURE__ */ u(g, {
1024
1024
  className: "w-full",
1025
- children: /* @__PURE__ */ l(g, { placeholder: C("healthybowl.financial.transactions.form.fields.crop.placeholder", "Select crop...") })
1026
- }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
1027
- value: x,
1028
- children: C("healthybowl.financial.transactions.form.fields.crop.none", "None")
1029
- }), D.map((e) => /* @__PURE__ */ l(m, {
1025
+ children: /* @__PURE__ */ u(_, { placeholder: w("healthybowl.financial.transactions.form.fields.crop.placeholder", "Select crop...") })
1026
+ }), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(h, {
1027
+ value: S,
1028
+ children: w("healthybowl.financial.transactions.form.fields.crop.none", "None")
1029
+ }), O.map((e) => /* @__PURE__ */ u(h, {
1030
1030
  value: e.id,
1031
1031
  children: e.name
1032
1032
  }, e.id))] })]
1033
1033
  })] }),
1034
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1034
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
1035
1035
  className: "mb-1 block text-sm font-medium text-text-primary",
1036
- children: C("healthybowl.financial.transactions.form.fields.field.label", "Field")
1037
- }), /* @__PURE__ */ u(f, {
1038
- value: U.fieldId === "" ? S : U.fieldId,
1039
- onValueChange: (e) => Q("fieldId", e === S ? "" : e),
1040
- children: [/* @__PURE__ */ l(h, {
1036
+ children: w("healthybowl.financial.transactions.form.fields.field.label", "Field")
1037
+ }), /* @__PURE__ */ d(p, {
1038
+ value: W.fieldId === "" ? C : W.fieldId,
1039
+ onValueChange: (e) => Q("fieldId", e === C ? "" : e),
1040
+ children: [/* @__PURE__ */ u(g, {
1041
1041
  className: "w-full",
1042
- children: /* @__PURE__ */ l(g, { placeholder: C("healthybowl.financial.transactions.form.fields.field.placeholder", "Select field...") })
1043
- }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
1044
- value: S,
1045
- children: C("healthybowl.financial.transactions.form.fields.field.none", "None")
1046
- }), Be.map((e) => /* @__PURE__ */ l(m, {
1042
+ children: /* @__PURE__ */ u(_, { placeholder: w("healthybowl.financial.transactions.form.fields.field.placeholder", "Select field...") })
1043
+ }), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(h, {
1044
+ value: C,
1045
+ children: w("healthybowl.financial.transactions.form.fields.field.none", "None")
1046
+ }), ze.map((e) => /* @__PURE__ */ u(h, {
1047
1047
  value: e.id,
1048
1048
  children: e.name
1049
1049
  }, e.id))] })]
1050
1050
  })] }),
1051
- /* @__PURE__ */ u("div", {
1051
+ /* @__PURE__ */ d("div", {
1052
1052
  className: "sm:col-span-2",
1053
1053
  children: [
1054
- /* @__PURE__ */ l("label", {
1054
+ /* @__PURE__ */ u("label", {
1055
1055
  className: "mb-1 block text-sm font-medium text-text-primary",
1056
- children: C("healthybowl.financial.transactions.form.fields.costCenter.label", "Cost Center")
1056
+ children: w("healthybowl.financial.transactions.form.fields.costCenter.label", "Cost Center")
1057
1057
  }),
1058
- /* @__PURE__ */ u(f, {
1059
- value: U.costCenterId === "" ? y : U.costCenterId,
1060
- onValueChange: (e) => Q("costCenterId", e === y ? "" : e),
1061
- children: [/* @__PURE__ */ l(h, {
1058
+ /* @__PURE__ */ d(p, {
1059
+ value: W.costCenterId === "" ? b : W.costCenterId,
1060
+ onValueChange: (e) => Q("costCenterId", e === b ? "" : e),
1061
+ children: [/* @__PURE__ */ u(g, {
1062
1062
  className: "w-full",
1063
- children: /* @__PURE__ */ l(g, { placeholder: C("healthybowl.financial.transactions.form.fields.costCenter.none", "None") })
1064
- }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
1065
- value: y,
1066
- children: C("healthybowl.financial.transactions.form.fields.costCenter.none", "None")
1067
- }), dt.map((e) => /* @__PURE__ */ u(m, {
1063
+ children: /* @__PURE__ */ u(_, { placeholder: w("healthybowl.financial.transactions.form.fields.costCenter.none", "None") })
1064
+ }), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(h, {
1065
+ value: b,
1066
+ children: w("healthybowl.financial.transactions.form.fields.costCenter.none", "None")
1067
+ }), ut.map((e) => /* @__PURE__ */ d(h, {
1068
1068
  value: e.id,
1069
1069
  children: [e.label, e.isActive ? "" : " (inactive)"]
1070
1070
  }, e.id))] })]
1071
1071
  }),
1072
- /* @__PURE__ */ l("p", {
1072
+ /* @__PURE__ */ u("p", {
1073
1073
  className: "mt-1 text-xs text-text-secondary",
1074
- children: C("healthybowl.financial.transactions.form.fields.costCenter.hint", "Attribute this entry to a crop or animal so it appears in cost-by-crop and the P&L.")
1074
+ children: w("healthybowl.financial.transactions.form.fields.costCenter.hint", "Attribute this entry to a crop or animal so it appears in cost-by-crop and the P&L.")
1075
1075
  })
1076
1076
  ]
1077
1077
  }),
1078
- /* @__PURE__ */ u("section", {
1078
+ /* @__PURE__ */ d("section", {
1079
1079
  className: "sm:col-span-2 rounded-lg border border-border-subtle bg-bg-surface p-4",
1080
- children: [/* @__PURE__ */ u("div", {
1080
+ children: [/* @__PURE__ */ d("div", {
1081
1081
  className: "flex flex-wrap items-start justify-between gap-3",
1082
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h3", {
1082
+ children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
1083
1083
  className: "text-sm font-semibold text-text-primary",
1084
- children: C("healthybowl.financial.transactions.splits.title", "Split allocation")
1085
- }), /* @__PURE__ */ l("p", {
1084
+ children: w("healthybowl.financial.transactions.splits.title", "Split allocation")
1085
+ }), /* @__PURE__ */ u("p", {
1086
1086
  className: "mt-1 text-xs text-text-secondary",
1087
- children: C("healthybowl.financial.transactions.splits.description", "Optionally allocate this transaction across categories and independent cost centers.")
1088
- })] }), /* @__PURE__ */ u(d, {
1087
+ children: w("healthybowl.financial.transactions.splits.description", "Optionally allocate this transaction across categories and independent cost centers.")
1088
+ })] }), /* @__PURE__ */ d(f, {
1089
1089
  type: "button",
1090
1090
  variant: "outline",
1091
1091
  size: "sm",
1092
1092
  onClick: vt,
1093
- disabled: U.splits.length >= 100,
1094
- children: [/* @__PURE__ */ l(xe, { className: "h-3.5 w-3.5" }), C("healthybowl.financial.transactions.splits.add", "Add split")]
1093
+ disabled: W.splits.length >= 100,
1094
+ children: [/* @__PURE__ */ u(be, { className: "h-3.5 w-3.5" }), w("healthybowl.financial.transactions.splits.add", "Add split")]
1095
1095
  })]
1096
- }), U.splits.length > 0 ? /* @__PURE__ */ u("div", {
1096
+ }), W.splits.length > 0 ? /* @__PURE__ */ d("div", {
1097
1097
  className: "mt-4 space-y-3",
1098
- children: [U.splits.map((e, t) => {
1099
- let n = k.find((t) => t.id === e.costCenterId), r = T(e.amount);
1100
- return /* @__PURE__ */ u("fieldset", {
1098
+ children: [W.splits.map((e, t) => {
1099
+ let n = A.find((t) => t.id === e.costCenterId), r = E(e.amount);
1100
+ return /* @__PURE__ */ d("fieldset", {
1101
1101
  className: "rounded-md border border-border-subtle p-3",
1102
- "aria-label": C("healthybowl.financial.transactions.splits.rowLabel", "Split allocation {{number}}", { number: t + 1 }),
1103
- children: [/* @__PURE__ */ l("legend", {
1102
+ "aria-label": w("healthybowl.financial.transactions.splits.rowLabel", "Split allocation {{number}}", { number: t + 1 }),
1103
+ children: [/* @__PURE__ */ u("legend", {
1104
1104
  className: "sr-only",
1105
- children: C("healthybowl.financial.transactions.splits.rowLegend", "Split {{number}}", { number: t + 1 })
1106
- }), /* @__PURE__ */ u("div", {
1105
+ children: w("healthybowl.financial.transactions.splits.rowLegend", "Split {{number}}", { number: t + 1 })
1106
+ }), /* @__PURE__ */ d("div", {
1107
1107
  className: "grid gap-3 sm:grid-cols-[minmax(0,1fr)_minmax(7rem,0.6fr)_minmax(0,1fr)_auto] sm:items-end",
1108
1108
  children: [
1109
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1109
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
1110
1110
  htmlFor: `transaction-split-category-${e.rowId}`,
1111
1111
  className: "mb-1 block text-xs font-medium text-text-primary",
1112
- children: C("healthybowl.financial.transactions.splits.category", "Category")
1113
- }), /* @__PURE__ */ u(f, {
1112
+ children: w("healthybowl.financial.transactions.splits.category", "Category")
1113
+ }), /* @__PURE__ */ d(p, {
1114
1114
  value: e.category,
1115
1115
  onValueChange: (t) => yt(e.rowId, { category: t }),
1116
- children: [/* @__PURE__ */ l(h, {
1116
+ children: [/* @__PURE__ */ u(g, {
1117
1117
  id: `transaction-split-category-${e.rowId}`,
1118
1118
  className: "w-full",
1119
- children: /* @__PURE__ */ l(g, {})
1120
- }), /* @__PURE__ */ l(p, { children: Ne.map((e) => /* @__PURE__ */ l(m, {
1119
+ children: /* @__PURE__ */ u(_, {})
1120
+ }), /* @__PURE__ */ u(m, { children: Me.map((e) => /* @__PURE__ */ u(h, {
1121
1121
  value: e,
1122
1122
  children: X[e]
1123
1123
  }, e)) })]
1124
1124
  })] }),
1125
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1125
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
1126
1126
  htmlFor: `transaction-split-amount-${e.rowId}`,
1127
1127
  className: "mb-1 block text-xs font-medium text-text-primary",
1128
- children: C("healthybowl.financial.transactions.splits.amount", "Amount")
1129
- }), /* @__PURE__ */ l("input", {
1128
+ children: w("healthybowl.financial.transactions.splits.amount", "Amount")
1129
+ }), /* @__PURE__ */ u("input", {
1130
1130
  id: `transaction-split-amount-${e.rowId}`,
1131
1131
  type: "text",
1132
1132
  inputMode: "decimal",
@@ -1136,142 +1136,142 @@ var v = [
1136
1136
  className: $,
1137
1137
  "aria-invalid": r === null || r <= 0n
1138
1138
  })] }),
1139
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
1139
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
1140
1140
  htmlFor: `transaction-split-cost-center-${e.rowId}`,
1141
1141
  className: "mb-1 block text-xs font-medium text-text-primary",
1142
- children: C("healthybowl.financial.transactions.splits.costCenter", "Cost center")
1143
- }), /* @__PURE__ */ u(f, {
1144
- value: e.costCenterId || y,
1145
- onValueChange: (t) => yt(e.rowId, { costCenterId: t === y ? "" : t }),
1146
- children: [/* @__PURE__ */ l(h, {
1142
+ children: w("healthybowl.financial.transactions.splits.costCenter", "Cost center")
1143
+ }), /* @__PURE__ */ d(p, {
1144
+ value: e.costCenterId || b,
1145
+ onValueChange: (t) => yt(e.rowId, { costCenterId: t === b ? "" : t }),
1146
+ children: [/* @__PURE__ */ u(g, {
1147
1147
  id: `transaction-split-cost-center-${e.rowId}`,
1148
1148
  className: "w-full",
1149
- children: /* @__PURE__ */ l(g, {})
1150
- }), /* @__PURE__ */ u(p, { children: [
1151
- /* @__PURE__ */ l(m, {
1152
- value: y,
1153
- children: C("healthybowl.financial.transactions.form.fields.costCenter.none", "None")
1149
+ children: /* @__PURE__ */ u(_, {})
1150
+ }), /* @__PURE__ */ d(m, { children: [
1151
+ /* @__PURE__ */ u(h, {
1152
+ value: b,
1153
+ children: w("healthybowl.financial.transactions.form.fields.costCenter.none", "None")
1154
1154
  }),
1155
- n && !n.isActive ? /* @__PURE__ */ u(m, {
1155
+ n && !n.isActive ? /* @__PURE__ */ d(h, {
1156
1156
  value: n.id,
1157
1157
  children: [
1158
1158
  n.label,
1159
1159
  " (",
1160
- C("healthybowl.common.inactive", "inactive"),
1160
+ w("healthybowl.common.inactive", "inactive"),
1161
1161
  ")"
1162
1162
  ]
1163
1163
  }) : null,
1164
- A.map((e) => /* @__PURE__ */ l(m, {
1164
+ j.map((e) => /* @__PURE__ */ u(h, {
1165
1165
  value: e.id,
1166
1166
  children: e.label
1167
1167
  }, e.id))
1168
1168
  ] })]
1169
1169
  })] }),
1170
- /* @__PURE__ */ l(d, {
1170
+ /* @__PURE__ */ u(f, {
1171
1171
  type: "button",
1172
1172
  variant: "ghost",
1173
1173
  size: "icon-sm",
1174
1174
  onClick: () => bt(e.rowId),
1175
- "aria-label": C("healthybowl.financial.transactions.splits.remove", "Remove split {{number}}", { number: t + 1 }),
1176
- children: /* @__PURE__ */ l(Se, { className: "h-3.5 w-3.5" })
1175
+ "aria-label": w("healthybowl.financial.transactions.splits.remove", "Remove split {{number}}", { number: t + 1 }),
1176
+ children: /* @__PURE__ */ u(xe, { className: "h-3.5 w-3.5" })
1177
1177
  })
1178
1178
  ]
1179
1179
  })]
1180
1180
  }, e.rowId);
1181
- }), /* @__PURE__ */ u("div", {
1181
+ }), /* @__PURE__ */ d("div", {
1182
1182
  id: "transaction-allocation-summary",
1183
1183
  className: "grid grid-cols-3 gap-3 rounded-md bg-bg-subtle p-3 text-sm",
1184
1184
  "aria-live": "polite",
1185
1185
  children: [
1186
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
1186
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
1187
1187
  className: "text-xs text-text-secondary",
1188
- children: C("healthybowl.financial.transactions.splits.allocated", "Allocated")
1189
- }), /* @__PURE__ */ l("p", {
1188
+ children: w("healthybowl.financial.transactions.splits.allocated", "Allocated")
1189
+ }), /* @__PURE__ */ u("p", {
1190
1190
  className: "font-semibold text-text-primary",
1191
- children: K.splitAmountsValid ? E(K.allocated) : "—"
1191
+ children: q.splitAmountsValid ? D(q.allocated) : "—"
1192
1192
  })] }),
1193
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
1193
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
1194
1194
  className: "text-xs text-text-secondary",
1195
- children: C("healthybowl.financial.transactions.splits.total", "Total")
1196
- }), /* @__PURE__ */ l("p", {
1195
+ children: w("healthybowl.financial.transactions.splits.total", "Total")
1196
+ }), /* @__PURE__ */ u("p", {
1197
1197
  className: "font-semibold text-text-primary",
1198
- children: K.total === null ? "—" : E(K.total)
1198
+ children: q.total === null ? "—" : D(q.total)
1199
1199
  })] }),
1200
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
1200
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
1201
1201
  className: "text-xs text-text-secondary",
1202
- children: C("healthybowl.financial.transactions.splits.remaining", "Remaining")
1203
- }), /* @__PURE__ */ l("p", {
1204
- className: e("font-semibold", K.matches ? "text-success" : "text-status-error-text"),
1205
- children: K.remaining === null || !K.splitAmountsValid ? "—" : E(K.remaining)
1202
+ children: w("healthybowl.financial.transactions.splits.remaining", "Remaining")
1203
+ }), /* @__PURE__ */ u("p", {
1204
+ className: e("font-semibold", q.matches ? "text-success" : "text-status-error-text"),
1205
+ children: q.remaining === null || !q.splitAmountsValid ? "—" : D(q.remaining)
1206
1206
  })] }),
1207
- K.matches ? null : /* @__PURE__ */ l("p", {
1207
+ q.matches ? null : /* @__PURE__ */ u("p", {
1208
1208
  className: "col-span-3 text-xs text-status-error-text",
1209
- children: K.splitAmountsValid ? C("healthybowl.financial.transactions.splits.saveBlockedMismatch", "Allocated splits must exactly equal the transaction total before you can save.") : C("healthybowl.financial.transactions.splits.saveBlockedInvalid", "Every split must have an amount greater than 0 with no more than two decimal places.")
1209
+ children: q.splitAmountsValid ? w("healthybowl.financial.transactions.splits.saveBlockedMismatch", "Allocated splits must exactly equal the transaction total before you can save.") : w("healthybowl.financial.transactions.splits.saveBlockedInvalid", "Every split must have an amount greater than 0 with no more than two decimal places.")
1210
1210
  })
1211
1211
  ]
1212
1212
  })]
1213
- }) : /* @__PURE__ */ l("p", {
1213
+ }) : /* @__PURE__ */ u("p", {
1214
1214
  className: "mt-3 text-xs text-text-secondary",
1215
- children: C("healthybowl.financial.transactions.splits.unsplit", "No split rows: this transaction uses its header category and cost center.")
1215
+ children: w("healthybowl.financial.transactions.splits.unsplit", "No split rows: this transaction uses its header category and cost center.")
1216
1216
  })]
1217
1217
  }),
1218
- /* @__PURE__ */ u("section", {
1218
+ /* @__PURE__ */ d("section", {
1219
1219
  className: "sm:col-span-2 rounded-lg border border-border-subtle bg-bg-surface p-4",
1220
- children: [/* @__PURE__ */ u("div", {
1220
+ children: [/* @__PURE__ */ d("div", {
1221
1221
  className: "flex flex-wrap items-center justify-between gap-3",
1222
1222
  children: [
1223
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h3", {
1223
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
1224
1224
  className: "text-sm font-semibold text-text-primary",
1225
- children: C("healthybowl.financial.transactions.receipt.title", "Receipt")
1226
- }), /* @__PURE__ */ l("p", {
1225
+ children: w("healthybowl.financial.transactions.receipt.title", "Receipt")
1226
+ }), /* @__PURE__ */ u("p", {
1227
1227
  className: "mt-1 text-xs text-text-secondary",
1228
- children: C("healthybowl.financial.transactions.receipt.description", "Attach a PDF, JPEG, PNG, or WebP receipt (up to 10 MB). The transaction stores only its Files record ID.")
1228
+ children: w("healthybowl.financial.transactions.receipt.description", "Attach a PDF, JPEG, PNG, or WebP receipt (up to 10 MB). The transaction stores only its Files record ID.")
1229
1229
  })] }),
1230
- /* @__PURE__ */ l("input", {
1231
- ref: P,
1230
+ /* @__PURE__ */ u("input", {
1231
+ ref: F,
1232
1232
  id: "transaction-receipt-input",
1233
1233
  type: "file",
1234
1234
  accept: ".pdf,.jpg,.jpeg,.png,.webp,application/pdf,image/jpeg,image/png,image/webp",
1235
1235
  className: "sr-only",
1236
1236
  onChange: (e) => void xt(e),
1237
- disabled: N
1237
+ disabled: P
1238
1238
  }),
1239
- /* @__PURE__ */ u(d, {
1239
+ /* @__PURE__ */ d(f, {
1240
1240
  type: "button",
1241
1241
  variant: "outline",
1242
1242
  size: "sm",
1243
- onClick: () => P.current?.click(),
1244
- disabled: N,
1245
- children: [/* @__PURE__ */ l(Te, { className: "h-3.5 w-3.5" }), N ? C("healthybowl.financial.transactions.receipt.uploading", "Uploading receipt...") : U.receiptFileId ? C("healthybowl.financial.transactions.receipt.replace", "Replace receipt") : C("healthybowl.financial.transactions.receipt.upload", "Upload receipt")]
1243
+ onClick: () => F.current?.click(),
1244
+ disabled: P,
1245
+ children: [/* @__PURE__ */ u(we, { className: "h-3.5 w-3.5" }), P ? w("healthybowl.financial.transactions.receipt.uploading", "Uploading receipt...") : W.receiptFileId ? w("healthybowl.financial.transactions.receipt.replace", "Replace receipt") : w("healthybowl.financial.transactions.receipt.upload", "Upload receipt")]
1246
1246
  })
1247
1247
  ]
1248
- }), U.receiptFileId ? /* @__PURE__ */ u("div", {
1248
+ }), W.receiptFileId ? /* @__PURE__ */ d("div", {
1249
1249
  className: "mt-3 flex flex-wrap items-center justify-between gap-3 rounded-md bg-bg-subtle p-3",
1250
- children: [/* @__PURE__ */ u("p", {
1250
+ children: [/* @__PURE__ */ d("p", {
1251
1251
  className: "flex min-w-0 items-center gap-2 text-sm text-text-primary",
1252
- children: [/* @__PURE__ */ l(be, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ l("span", {
1252
+ children: [/* @__PURE__ */ u(ye, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ u("span", {
1253
1253
  className: "truncate",
1254
- children: U.receiptFileName || C("healthybowl.financial.transactions.receipt.attached", "Receipt attached")
1254
+ children: W.receiptFileName || w("healthybowl.financial.transactions.receipt.attached", "Receipt attached")
1255
1255
  })]
1256
- }), /* @__PURE__ */ u("div", {
1256
+ }), /* @__PURE__ */ d("div", {
1257
1257
  className: "flex items-center gap-1",
1258
- children: [G?.receiptFileId === U.receiptFileId ? /* @__PURE__ */ u(d, {
1258
+ children: [K?.receiptFileId === W.receiptFileId ? /* @__PURE__ */ d(f, {
1259
1259
  type: "button",
1260
1260
  variant: "ghost",
1261
1261
  size: "sm",
1262
- onClick: () => void St(G),
1263
- disabled: Qe === G.id,
1264
- children: [/* @__PURE__ */ l(ve, { className: "h-3.5 w-3.5" }), C("healthybowl.financial.transactions.receipt.open", "Open")]
1265
- }) : null, /* @__PURE__ */ u(d, {
1262
+ onClick: () => void St(K),
1263
+ disabled: Ze === K.id,
1264
+ children: [/* @__PURE__ */ u(_e, { className: "h-3.5 w-3.5" }), w("healthybowl.financial.transactions.receipt.open", "Open")]
1265
+ }) : null, /* @__PURE__ */ d(f, {
1266
1266
  type: "button",
1267
1267
  variant: "ghost",
1268
1268
  size: "sm",
1269
- onClick: () => W((e) => ({
1269
+ onClick: () => G((e) => ({
1270
1270
  ...e,
1271
1271
  receiptFileId: "",
1272
1272
  receiptFileName: ""
1273
1273
  })),
1274
- children: [/* @__PURE__ */ l(Ee, { className: "h-3.5 w-3.5" }), C("healthybowl.financial.transactions.receipt.clear", "Clear")]
1274
+ children: [/* @__PURE__ */ u(Te, { className: "h-3.5 w-3.5" }), w("healthybowl.financial.transactions.receipt.clear", "Clear")]
1275
1275
  })]
1276
1276
  })]
1277
1277
  }) : null]
@@ -1279,14 +1279,14 @@ var v = [
1279
1279
  ]
1280
1280
  })
1281
1281
  }),
1282
- /* @__PURE__ */ l(re, {
1283
- toasts: Je,
1284
- onDismiss: Ye
1282
+ /* @__PURE__ */ u(ne, {
1283
+ toasts: qe,
1284
+ onDismiss: Je
1285
1285
  })
1286
1286
  ]
1287
1287
  });
1288
1288
  };
1289
1289
  //#endregion
1290
- export { Be as TransactionsPage };
1290
+ export { ze as TransactionsPage };
1291
1291
 
1292
1292
  //# sourceMappingURL=TransactionsPage.js.map