@burdenoff/microfe-healthybowl 2026.714.6 → 2026.714.7

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.
@@ -1,34 +1,108 @@
1
1
  import { PageLayout as e } from "../../components/PageLayout.js";
2
2
  import { StatCard as t } from "../../components/StatCard.js";
3
- import { ErrorState as n } from "../../components/ErrorState.js";
4
- import { ToastContainer as r } from "../../components/Toast.js";
5
- import { PageLoader as i } from "../../components/PageLoader.js";
6
- import { useToast as a } from "../../hooks/useToast.js";
3
+ import { EmptyState as n } from "../../components/EmptyState.js";
4
+ import { ErrorState as r } from "../../components/ErrorState.js";
5
+ import { ChartCard as i } from "../../components/ChartCard.js";
6
+ import { ToastContainer as a } from "../../components/Toast.js";
7
+ import { PageLoader as o } from "../../components/PageLoader.js";
8
+ import { useToast as s } from "../../hooks/useToast.js";
7
9
  import "../../components/index.js";
8
- import { useHealthyBowlData as o } from "../../hooks/useHealthyBowlData.js";
9
- import { useMemo as s, useState as c } from "react";
10
- import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { AlertTriangle as u, BarChart3 as d, Calendar as f, ChevronRight as p, Cloud as m, CloudRain as h, Download as g, Droplets as ee, Sun as _, Sunrise as v, Sunset as y, Thermometer as b, TrendingUp as x, Wind as S } from "lucide-react";
12
- import { useNavigate as C } from "react-router-dom";
10
+ import { useHealthyBowlData as c } from "../../hooks/useHealthyBowlData.js";
11
+ import { Legend as l } from "../../../node_modules/recharts/es6/component/Legend.js";
12
+ import { Tooltip as u } from "../../../node_modules/recharts/es6/component/Tooltip.js";
13
+ import { ResponsiveContainer as ee } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
14
+ import { Bar as te } from "../../../node_modules/recharts/es6/cartesian/Bar.js";
15
+ import { CartesianGrid as ne } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
16
+ import { Line as d } from "../../../node_modules/recharts/es6/cartesian/Line.js";
17
+ import { Area as re } from "../../../node_modules/recharts/es6/cartesian/Area.js";
18
+ import { XAxis as ie } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
19
+ import { YAxis as f } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
20
+ import { ComposedChart as ae } from "../../../node_modules/recharts/es6/chart/ComposedChart.js";
21
+ import { useWeatherIntelligence as oe } from "../../hooks/useWeatherIntelligence.js";
22
+ import { useEffect as p, useMemo as m, useRef as se, useState as h } from "react";
23
+ import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
+ import { AlertTriangle as le, BarChart3 as g, Calendar as ue, ChevronRight as _, Cloud as v, CloudRain as y, Download as b, Droplets as de, MapPin as fe, RefreshCw as x, Sun as S, Sunrise as pe, Sunset as me, Thermometer as he, TrendingUp as ge, Wind as C } from "lucide-react";
25
+ import { useNavigate as _e } from "react-router-dom";
13
26
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
14
27
  import { Button as D, Select as O, SelectContent as k, SelectItem as A, SelectTrigger as j, SelectValue as M } from "@burdenoff/fe-libs/ui";
15
28
  //#region src/healthybowl/pages/weather/WeatherHistoryPage.tsx
16
- var N = (e) => {
29
+ var N = [
30
+ "var(--color-chart-1)",
31
+ "var(--color-chart-2)",
32
+ "var(--color-chart-3)",
33
+ "var(--color-chart-4)",
34
+ "var(--color-chart-5)",
35
+ "var(--color-chart-6)",
36
+ "var(--color-chart-7)",
37
+ "var(--color-chart-8)",
38
+ "var(--color-chart-9)",
39
+ "var(--color-chart-10)"
40
+ ], P = {
41
+ backgroundColor: "var(--color-card)",
42
+ border: "1px solid var(--color-border)",
43
+ borderRadius: "8px"
44
+ }, F = (e) => {
17
45
  switch (e) {
18
- case "sunny": return _;
19
- case "cloudy": return m;
20
- case "rainy": return h;
21
- case "stormy": return S;
22
- default: return m;
46
+ case "sunny": return S;
47
+ case "cloudy": return v;
48
+ case "rainy": return y;
49
+ case "stormy": return C;
50
+ default: return v;
23
51
  }
24
- }, P = (e) => new Date(e).toLocaleDateString("en-US", {
52
+ }, I = (e) => new Date(e).toLocaleDateString("en-US", {
25
53
  weekday: "short",
26
54
  day: "numeric",
27
55
  month: "short"
28
- }), F = () => {
29
- let { t: m } = l(), { dailyHistory: _, monthlySummaries: F, loadings: I, errors: L, refetch: R } = o(), z = C(), { toasts: B, toast: V, dismiss: H } = a(), [U, W] = c("daily"), [G, K] = c("7days"), q = s(() => {
56
+ }), L = () => {
57
+ let { t: v } = ce(), { dailyHistory: S, monthlySummaries: L, loadings: ve, errors: ye, refetch: be } = c(), R = _e(), { toasts: xe, toast: z, dismiss: Se } = s(), [B, Ce] = h("daily"), [V, we] = h("7days"), { series: H, loadingSeries: Te, errorSeries: Ee, refetchSeries: De, syncHistory: U } = oe(), [W, G] = h(!1), [K, q] = h(!1), J = se(!1);
58
+ p(() => {
59
+ !H || J.current || H.synced === !1 && (J.current = !0, q(!0), U().finally(() => q(!1)));
60
+ }, [H, U]);
61
+ let Oe = async () => {
62
+ G(!0);
63
+ try {
64
+ await U(), z({
65
+ title: v("healthybowl.weather.history.toast.resync.title", "History re-synced"),
66
+ description: v("healthybowl.weather.history.toast.resync.description", "Your farm weather archive is up to date."),
67
+ variant: "success"
68
+ });
69
+ } catch {
70
+ z({
71
+ title: v("healthybowl.weather.history.toast.resyncError.title", "Sync failed"),
72
+ description: v("healthybowl.weather.history.toast.resyncError.description", "Could not refresh the weather archive. Please try again."),
73
+ variant: "error"
74
+ });
75
+ } finally {
76
+ G(!1);
77
+ }
78
+ }, { chartData: Y, years: X } = m(() => {
79
+ if (!H) return {
80
+ chartData: [],
81
+ years: []
82
+ };
83
+ let e = Array.from(new Set(H.points.map((e) => e.year))).sort((e, t) => e - t), t = new Map(H.baseline.map((e) => [e.month, e])), n = [];
84
+ for (let r = 1; r <= 12; r += 1) {
85
+ let i = H.points.filter((e) => e.month === r), a = t.get(r);
86
+ if (i.length === 0 && !a) continue;
87
+ let o = i[0]?.monthName ?? a?.monthName ?? String(r), s = i.find((e) => e.year === H.endYear), c = {
88
+ month: r,
89
+ monthName: o,
90
+ rainfall: s ? s.totalRainfall : null,
91
+ tempBand: a ? [a.tempMin, a.tempMax] : null
92
+ };
93
+ for (let t of e) {
94
+ let e = i.find((e) => e.year === t);
95
+ c[`y${t}`] = e ? e.avgTemp : null;
96
+ }
97
+ n.push(c);
98
+ }
99
+ return {
100
+ chartData: n,
101
+ years: e
102
+ };
103
+ }, [H]), ke = K || Te && !H, Ae = !!H && Y.length > 0 && X.length > 0, Z = m(() => {
30
104
  let e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
31
- switch (G) {
105
+ switch (V) {
32
106
  case "7days":
33
107
  t.setDate(e.getDate() - 7);
34
108
  break;
@@ -43,12 +117,12 @@ var N = (e) => {
43
117
  break;
44
118
  default: t.setDate(e.getDate() - 7);
45
119
  }
46
- let n = _.filter((e) => new Date(e.date) >= t);
47
- return n.length > 0 ? n : _;
48
- }, [_, G]), J = Math.max(q.length, 1), Y = q.reduce((e, t) => e + t.tempAvg, 0) / J, X = q.reduce((e, t) => e + t.rainfall, 0), Z = q.reduce((e, t) => e + t.humidity, 0) / J, Q = q.reduce((e, t) => e + t.windSpeed, 0) / J, $ = Math.max(...q.map((e) => e.tempMax), 1);
120
+ let n = S.filter((e) => new Date(e.date) >= t);
121
+ return n.length > 0 ? n : S;
122
+ }, [S, V]), Q = Math.max(Z.length, 1), je = Z.reduce((e, t) => e + t.tempAvg, 0) / Q, Me = Z.reduce((e, t) => e + t.rainfall, 0), Ne = Z.reduce((e, t) => e + t.humidity, 0) / Q, Pe = Z.reduce((e, t) => e + t.windSpeed, 0) / Q, $ = Math.max(...Z.map((e) => e.tempMax), 1);
49
123
  return /* @__PURE__ */ E(e, {
50
- title: m("healthybowl.weather.history.title", "Weather History"),
51
- description: m("healthybowl.weather.history.description", "Historical weather data and trends for your location"),
124
+ title: v("healthybowl.weather.history.title", "Weather History"),
125
+ description: v("healthybowl.weather.history.description", "Historical weather data and trends for your location"),
52
126
  purpose: "Past weather for your farm, so you can compare seasons, understand why a crop did well or poorly, and make better planting and irrigation decisions based on what actually happened before.",
53
127
  actions: /* @__PURE__ */ E("div", {
54
128
  className: "flex items-center gap-2",
@@ -66,7 +140,7 @@ var N = (e) => {
66
140
  "WindSpeed",
67
141
  "UVIndex",
68
142
  "Pressure"
69
- ], t = q.map((e) => [
143
+ ], t = Z.map((e) => [
70
144
  e.date,
71
145
  e.condition,
72
146
  e.tempMax,
@@ -78,107 +152,232 @@ var N = (e) => {
78
152
  e.uvIndex,
79
153
  e.pressure
80
154
  ].join(",")), n = [e.join(","), ...t].join("\n"), r = new Blob([n], { type: "text/csv;charset=utf-8;" }), i = URL.createObjectURL(r), a = document.createElement("a");
81
- a.href = i, a.download = `weather-history-${G}.csv`, document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(i), V({
82
- title: m("healthybowl.weather.history.toast.exportComplete.title", "Export Complete"),
83
- description: m("healthybowl.weather.history.toast.exportComplete.description", "Weather data exported as CSV ({{count}} records)", { count: q.length }),
155
+ a.href = i, a.download = `weather-history-${V}.csv`, document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(i), z({
156
+ title: v("healthybowl.weather.history.toast.exportComplete.title", "Export Complete"),
157
+ description: v("healthybowl.weather.history.toast.exportComplete.description", "Weather data exported as CSV ({{count}} records)", { count: Z.length }),
84
158
  variant: "success"
85
159
  });
86
160
  },
87
161
  children: [
88
- /* @__PURE__ */ T(g, { className: "h-4 w-4" }),
162
+ /* @__PURE__ */ T(b, { className: "h-4 w-4" }),
89
163
  " ",
90
- m("healthybowl.weather.history.actions.exportData", "Export Data")
164
+ v("healthybowl.weather.history.actions.exportData", "Export Data")
91
165
  ]
92
166
  }), /* @__PURE__ */ E(D, {
93
- onClick: () => z("../forecast"),
167
+ onClick: () => R("../forecast"),
94
168
  children: [
95
- m("healthybowl.weather.history.actions.viewForecast", "View Forecast"),
169
+ v("healthybowl.weather.history.actions.viewForecast", "View Forecast"),
96
170
  " ",
97
- /* @__PURE__ */ T(p, { className: "h-4 w-4" })
171
+ /* @__PURE__ */ T(_, { className: "h-4 w-4" })
98
172
  ]
99
173
  })]
100
174
  }),
101
- children: [I.weather ? /* @__PURE__ */ T(i, {}) : L.weather ? /* @__PURE__ */ T(n, { onRetry: R }) : /* @__PURE__ */ E(w, { children: [
175
+ children: [ve.weather ? /* @__PURE__ */ T(o, {}) : ye.weather ? /* @__PURE__ */ T(r, { onRetry: be }) : /* @__PURE__ */ E(w, { children: [
102
176
  /* @__PURE__ */ E("div", {
103
177
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
104
178
  children: [
105
179
  /* @__PURE__ */ T(t, {
106
180
  hero: !0,
107
- label: m("healthybowl.weather.history.stats.avgTemperature.label", "Avg Temperature"),
108
- value: `${Y.toFixed(1)}°C`,
109
- icon: /* @__PURE__ */ T(b, { className: "h-4 w-4" })
181
+ label: v("healthybowl.weather.history.stats.avgTemperature.label", "Avg Temperature"),
182
+ value: `${je.toFixed(1)}°C`,
183
+ icon: /* @__PURE__ */ T(he, { className: "h-4 w-4" })
110
184
  }),
111
185
  /* @__PURE__ */ T(t, {
112
- label: m("healthybowl.weather.history.stats.totalRainfall.label", "Total Rainfall"),
113
- value: `${X} mm`,
114
- icon: /* @__PURE__ */ T(h, { className: "h-4 w-4" })
186
+ label: v("healthybowl.weather.history.stats.totalRainfall.label", "Total Rainfall"),
187
+ value: `${Me} mm`,
188
+ icon: /* @__PURE__ */ T(y, { className: "h-4 w-4" })
115
189
  }),
116
190
  /* @__PURE__ */ T(t, {
117
- label: m("healthybowl.weather.history.stats.avgHumidity.label", "Avg Humidity"),
118
- value: `${Z.toFixed(0)}%`,
119
- icon: /* @__PURE__ */ T(ee, { className: "h-4 w-4" })
191
+ label: v("healthybowl.weather.history.stats.avgHumidity.label", "Avg Humidity"),
192
+ value: `${Ne.toFixed(0)}%`,
193
+ icon: /* @__PURE__ */ T(de, { className: "h-4 w-4" })
120
194
  }),
121
195
  /* @__PURE__ */ T(t, {
122
- label: m("healthybowl.weather.history.stats.avgWindSpeed.label", "Avg Wind Speed"),
123
- value: `${Q.toFixed(0)} km/h`,
124
- icon: /* @__PURE__ */ T(S, { className: "h-4 w-4" })
196
+ label: v("healthybowl.weather.history.stats.avgWindSpeed.label", "Avg Wind Speed"),
197
+ value: `${Pe.toFixed(0)} km/h`,
198
+ icon: /* @__PURE__ */ T(C, { className: "h-4 w-4" })
125
199
  })
126
200
  ]
127
201
  }),
202
+ /* @__PURE__ */ T(i, {
203
+ title: H ? v("healthybowl.weather.history.multiYear.title", "Multi-Year Temperature & Rainfall History ({{start}}-{{end}})", {
204
+ start: H.startYear,
205
+ end: H.endYear
206
+ }) : v("healthybowl.weather.history.multiYear.titleBare", "Multi-Year Temperature & Rainfall History"),
207
+ description: H ? v("healthybowl.weather.history.multiYear.subtitle", "This year vs {{years}}-year average", { years: H.baselineYears }) : void 0,
208
+ actions: /* @__PURE__ */ E(D, {
209
+ variant: "outline",
210
+ size: "sm",
211
+ onClick: Oe,
212
+ disabled: W || K,
213
+ children: [/* @__PURE__ */ T(x, { className: `h-4 w-4 ${W || K ? "animate-spin" : ""}` }), v("healthybowl.weather.history.multiYear.resync", "Re-sync history")]
214
+ }),
215
+ children: Ee ? /* @__PURE__ */ T(r, { onRetry: De }) : ke ? /* @__PURE__ */ E("div", {
216
+ className: "flex flex-col items-center justify-center gap-3 py-12 text-center",
217
+ children: [/* @__PURE__ */ T(x, { className: "h-6 w-6 animate-spin text-text-secondary" }), /* @__PURE__ */ T("p", {
218
+ className: "text-sm text-text-secondary",
219
+ children: v("healthybowl.weather.history.multiYear.building", "Building your farm's weather archive…")
220
+ })]
221
+ }) : Ae ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(ee, {
222
+ width: "100%",
223
+ height: 360,
224
+ children: /* @__PURE__ */ E(ae, {
225
+ data: Y,
226
+ margin: {
227
+ top: 8,
228
+ right: 16,
229
+ left: 0,
230
+ bottom: 4
231
+ },
232
+ children: [
233
+ /* @__PURE__ */ T(ne, {
234
+ strokeDasharray: "3 3",
235
+ className: "stroke-border"
236
+ }),
237
+ /* @__PURE__ */ T(ie, {
238
+ dataKey: "monthName",
239
+ className: "text-xs",
240
+ tick: { fill: "currentColor" }
241
+ }),
242
+ /* @__PURE__ */ T(f, {
243
+ yAxisId: "temp",
244
+ className: "text-xs",
245
+ tick: { fill: "currentColor" },
246
+ tickFormatter: (e) => `${e}°`,
247
+ label: {
248
+ value: v("healthybowl.weather.history.multiYear.axis.temp", "Temperature (°C)"),
249
+ angle: -90,
250
+ position: "insideLeft",
251
+ fill: "currentColor",
252
+ fontSize: 11
253
+ }
254
+ }),
255
+ /* @__PURE__ */ T(f, {
256
+ yAxisId: "rain",
257
+ orientation: "right",
258
+ className: "text-xs",
259
+ tick: { fill: "currentColor" },
260
+ tickFormatter: (e) => `${e}`,
261
+ label: {
262
+ value: v("healthybowl.weather.history.multiYear.axis.rain", "Rainfall (mm)"),
263
+ angle: 90,
264
+ position: "insideRight",
265
+ fill: "currentColor",
266
+ fontSize: 11
267
+ }
268
+ }),
269
+ /* @__PURE__ */ T(u, {
270
+ contentStyle: P,
271
+ labelStyle: { color: "var(--color-foreground)" }
272
+ }),
273
+ /* @__PURE__ */ T(l, {}),
274
+ /* @__PURE__ */ T(re, {
275
+ yAxisId: "temp",
276
+ type: "monotone",
277
+ dataKey: "tempBand",
278
+ name: v("healthybowl.weather.history.multiYear.legend.baseline", "Baseline range"),
279
+ fill: "var(--color-warning)",
280
+ fillOpacity: .15,
281
+ stroke: "none",
282
+ connectNulls: !0,
283
+ isAnimationActive: !1
284
+ }),
285
+ /* @__PURE__ */ T(te, {
286
+ yAxisId: "rain",
287
+ dataKey: "rainfall",
288
+ name: v("healthybowl.weather.history.multiYear.legend.rainfall", "{{year}} rainfall", { year: H?.endYear ?? "" }),
289
+ fill: "var(--color-info)",
290
+ radius: [
291
+ 3,
292
+ 3,
293
+ 0,
294
+ 0
295
+ ],
296
+ barSize: 10
297
+ }),
298
+ X.map((e, t) => /* @__PURE__ */ T(d, {
299
+ yAxisId: "temp",
300
+ type: "monotone",
301
+ dataKey: `y${e}`,
302
+ name: String(e),
303
+ stroke: N[t % N.length],
304
+ strokeWidth: 2,
305
+ dot: !1,
306
+ connectNulls: !0,
307
+ isAnimationActive: !1
308
+ }, e))
309
+ ]
310
+ })
311
+ }), H && /* @__PURE__ */ E("p", {
312
+ className: "mt-3 text-xs text-text-secondary",
313
+ children: [v("healthybowl.weather.history.multiYear.source", "Source: {{source}} · {{years}}-year baseline", {
314
+ source: H.source,
315
+ years: H.baselineYears
316
+ }), H.lastSyncedAt ? v("healthybowl.weather.history.multiYear.lastSynced", " · Last synced {{date}}", { date: new Date(H.lastSyncedAt).toLocaleDateString("en-US", {
317
+ day: "numeric",
318
+ month: "short",
319
+ year: "numeric"
320
+ }) }) : ""]
321
+ })] }) : /* @__PURE__ */ T(n, {
322
+ icon: /* @__PURE__ */ T(fe, { className: "h-6 w-6" }),
323
+ title: v("healthybowl.weather.history.multiYear.empty.title", "No weather archive yet"),
324
+ description: v("healthybowl.weather.history.multiYear.empty.description", "Set your farm location to build a multi-year weather history from the Open-Meteo archive.")
325
+ })
326
+ }),
128
327
  /* @__PURE__ */ E("div", {
129
328
  className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
130
329
  children: [/* @__PURE__ */ T("div", {
131
330
  className: "flex gap-2",
132
331
  children: ["daily", "monthly"].map((e) => /* @__PURE__ */ T("button", {
133
332
  type: "button",
134
- onClick: () => W(e),
135
- className: `rounded-md px-4 py-2 text-sm font-medium capitalize ${U === e ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-primary hover:bg-bg-sunken/50"}`,
136
- children: e === "daily" ? m("healthybowl.weather.history.viewMode.daily", "Daily View") : m("healthybowl.weather.history.viewMode.monthly", "Monthly Summary")
333
+ onClick: () => Ce(e),
334
+ className: `rounded-md px-4 py-2 text-sm font-medium capitalize ${B === e ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-primary hover:bg-bg-sunken/50"}`,
335
+ children: e === "daily" ? v("healthybowl.weather.history.viewMode.daily", "Daily View") : v("healthybowl.weather.history.viewMode.monthly", "Monthly Summary")
137
336
  }, e))
138
337
  }), /* @__PURE__ */ E("div", {
139
338
  className: "flex items-center gap-2",
140
339
  children: [/* @__PURE__ */ E(O, {
141
- value: G,
142
- onValueChange: K,
340
+ value: V,
341
+ onValueChange: we,
143
342
  children: [/* @__PURE__ */ T(j, {
144
343
  className: "h-9 w-auto",
145
- children: /* @__PURE__ */ T(M, { placeholder: m("healthybowl.weather.history.period.last7Days", "Last 7 Days") })
344
+ children: /* @__PURE__ */ T(M, { placeholder: v("healthybowl.weather.history.period.last7Days", "Last 7 Days") })
146
345
  }), /* @__PURE__ */ E(k, { children: [
147
346
  /* @__PURE__ */ T(A, {
148
347
  value: "7days",
149
- children: m("healthybowl.weather.history.period.last7Days", "Last 7 Days")
348
+ children: v("healthybowl.weather.history.period.last7Days", "Last 7 Days")
150
349
  }),
151
350
  /* @__PURE__ */ T(A, {
152
351
  value: "30days",
153
- children: m("healthybowl.weather.history.period.last30Days", "Last 30 Days")
352
+ children: v("healthybowl.weather.history.period.last30Days", "Last 30 Days")
154
353
  }),
155
354
  /* @__PURE__ */ T(A, {
156
355
  value: "90days",
157
- children: m("healthybowl.weather.history.period.last90Days", "Last 90 Days")
356
+ children: v("healthybowl.weather.history.period.last90Days", "Last 90 Days")
158
357
  }),
159
358
  /* @__PURE__ */ T(A, {
160
359
  value: "year",
161
- children: m("healthybowl.weather.history.period.lastYear", "Last Year")
360
+ children: v("healthybowl.weather.history.period.lastYear", "Last Year")
162
361
  })
163
362
  ] })]
164
363
  }), /* @__PURE__ */ E(D, {
165
364
  variant: "outline",
166
- onClick: () => V({
167
- title: m("healthybowl.weather.history.toast.customRange.title", "Custom Range"),
168
- description: m("healthybowl.weather.history.toast.customRange.description", "Custom date range picker coming soon."),
365
+ onClick: () => z({
366
+ title: v("healthybowl.weather.history.toast.customRange.title", "Custom Range"),
367
+ description: v("healthybowl.weather.history.toast.customRange.description", "Custom date range picker coming soon."),
169
368
  variant: "info"
170
369
  }),
171
370
  children: [
172
- /* @__PURE__ */ T(f, { className: "h-4 w-4" }),
371
+ /* @__PURE__ */ T(ue, { className: "h-4 w-4" }),
173
372
  " ",
174
- m("healthybowl.weather.history.actions.customRange", "Custom Range")
373
+ v("healthybowl.weather.history.actions.customRange", "Custom Range")
175
374
  ]
176
375
  })]
177
376
  })]
178
377
  }),
179
- U === "daily" && /* @__PURE__ */ T("div", {
378
+ B === "daily" && /* @__PURE__ */ T("div", {
180
379
  className: "space-y-4",
181
- children: q.map((e) => /* @__PURE__ */ E("div", {
380
+ children: Z.map((e) => /* @__PURE__ */ E("div", {
182
381
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
183
382
  children: [/* @__PURE__ */ E("div", {
184
383
  className: "flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",
@@ -186,10 +385,10 @@ var N = (e) => {
186
385
  className: "flex items-center gap-4",
187
386
  children: [/* @__PURE__ */ T("div", {
188
387
  className: "rounded-lg bg-bg-sunken p-3",
189
- children: /* @__PURE__ */ T(N(e.condition), { className: "h-7 w-7 text-text-secondary" })
388
+ children: /* @__PURE__ */ T(F(e.condition), { className: "h-7 w-7 text-text-secondary" })
190
389
  }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
191
390
  className: "text-sm font-semibold text-text-primary",
192
- children: P(e.date)
391
+ children: I(e.date)
193
392
  }), /* @__PURE__ */ T("p", {
194
393
  className: "text-xs capitalize text-text-secondary",
195
394
  children: e.condition
@@ -199,7 +398,7 @@ var N = (e) => {
199
398
  children: [
200
399
  /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
201
400
  className: "text-xs text-text-secondary",
202
- children: m("healthybowl.weather.history.record.temperature", "Temperature")
401
+ children: v("healthybowl.weather.history.record.temperature", "Temperature")
203
402
  }), /* @__PURE__ */ E("p", {
204
403
  className: "text-sm font-medium text-text-primary",
205
404
  children: [
@@ -216,28 +415,28 @@ var N = (e) => {
216
415
  })] }),
217
416
  /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
218
417
  className: "text-xs text-text-secondary",
219
- children: m("healthybowl.weather.history.record.humidity", "Humidity")
418
+ children: v("healthybowl.weather.history.record.humidity", "Humidity")
220
419
  }), /* @__PURE__ */ E("p", {
221
420
  className: "text-sm font-medium text-text-primary",
222
421
  children: [e.humidity, "%"]
223
422
  })] }),
224
423
  /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
225
424
  className: "text-xs text-text-secondary",
226
- children: m("healthybowl.weather.history.record.rainfall", "Rainfall")
425
+ children: v("healthybowl.weather.history.record.rainfall", "Rainfall")
227
426
  }), /* @__PURE__ */ E("p", {
228
427
  className: "text-sm font-medium text-text-primary",
229
428
  children: [e.rainfall, " mm"]
230
429
  })] }),
231
430
  /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
232
431
  className: "text-xs text-text-secondary",
233
- children: m("healthybowl.weather.history.record.wind", "Wind")
432
+ children: v("healthybowl.weather.history.record.wind", "Wind")
234
433
  }), /* @__PURE__ */ E("p", {
235
434
  className: "text-sm font-medium text-text-primary",
236
435
  children: [e.windSpeed, " km/h"]
237
436
  })] }),
238
437
  /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
239
438
  className: "text-xs text-text-secondary",
240
- children: m("healthybowl.weather.history.record.uvIndex", "UV Index")
439
+ children: v("healthybowl.weather.history.record.uvIndex", "UV Index")
241
440
  }), /* @__PURE__ */ T("p", {
242
441
  className: "text-sm font-medium text-text-primary",
243
442
  children: e.uvIndex
@@ -251,25 +450,25 @@ var N = (e) => {
251
450
  children: [/* @__PURE__ */ E("span", {
252
451
  className: "flex items-center gap-1",
253
452
  children: [
254
- /* @__PURE__ */ T(v, { className: "h-3.5 w-3.5 text-warning" }),
453
+ /* @__PURE__ */ T(pe, { className: "h-3.5 w-3.5 text-warning" }),
255
454
  " ",
256
455
  e.sunrise
257
456
  ]
258
457
  }), /* @__PURE__ */ E("span", {
259
458
  className: "flex items-center gap-1",
260
459
  children: [
261
- /* @__PURE__ */ T(y, { className: "h-3.5 w-3.5 text-warning" }),
460
+ /* @__PURE__ */ T(me, { className: "h-3.5 w-3.5 text-warning" }),
262
461
  " ",
263
462
  e.sunset
264
463
  ]
265
464
  })]
266
- }), /* @__PURE__ */ T("span", { children: m("healthybowl.weather.history.record.pressure", "Pressure: {{pressure}} hPa", { pressure: e.pressure }) })]
465
+ }), /* @__PURE__ */ T("span", { children: v("healthybowl.weather.history.record.pressure", "Pressure: {{pressure}} hPa", { pressure: e.pressure }) })]
267
466
  })]
268
467
  }, e.id))
269
468
  }),
270
- U === "monthly" && /* @__PURE__ */ T("div", {
469
+ B === "monthly" && /* @__PURE__ */ T("div", {
271
470
  className: "grid grid-cols-1 gap-4 md:grid-cols-3",
272
- children: F.map((e) => /* @__PURE__ */ E("div", {
471
+ children: L.map((e) => /* @__PURE__ */ E("div", {
273
472
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
274
473
  children: [/* @__PURE__ */ E("h3", {
275
474
  className: "text-base font-semibold text-text-primary",
@@ -285,7 +484,7 @@ var N = (e) => {
285
484
  className: "flex items-center justify-between",
286
485
  children: [/* @__PURE__ */ T("span", {
287
486
  className: "text-sm text-text-secondary",
288
- children: m("healthybowl.weather.history.monthly.avgTemperature", "Average Temperature")
487
+ children: v("healthybowl.weather.history.monthly.avgTemperature", "Average Temperature")
289
488
  }), /* @__PURE__ */ E("span", {
290
489
  className: "text-sm font-medium text-text-primary",
291
490
  children: [e.avgTemp, "°C"]
@@ -295,7 +494,7 @@ var N = (e) => {
295
494
  className: "flex items-center justify-between",
296
495
  children: [/* @__PURE__ */ T("span", {
297
496
  className: "text-sm text-text-secondary",
298
- children: m("healthybowl.weather.history.monthly.totalRainfall", "Total Rainfall")
497
+ children: v("healthybowl.weather.history.monthly.totalRainfall", "Total Rainfall")
299
498
  }), /* @__PURE__ */ E("span", {
300
499
  className: "text-sm font-medium text-text-primary",
301
500
  children: [e.totalRainfall, " mm"]
@@ -305,7 +504,7 @@ var N = (e) => {
305
504
  className: "flex items-center justify-between",
306
505
  children: [/* @__PURE__ */ T("span", {
307
506
  className: "text-sm text-text-secondary",
308
- children: m("healthybowl.weather.history.monthly.rainyDays", "Rainy Days")
507
+ children: v("healthybowl.weather.history.monthly.rainyDays", "Rainy Days")
309
508
  }), /* @__PURE__ */ E("span", {
310
509
  className: "text-sm font-medium text-text-primary",
311
510
  children: [e.rainyDays, " days"]
@@ -315,7 +514,7 @@ var N = (e) => {
315
514
  className: "flex items-center justify-between",
316
515
  children: [/* @__PURE__ */ T("span", {
317
516
  className: "text-sm text-text-secondary",
318
- children: m("healthybowl.weather.history.monthly.sunnyDays", "Sunny Days")
517
+ children: v("healthybowl.weather.history.monthly.sunnyDays", "Sunny Days")
319
518
  }), /* @__PURE__ */ E("span", {
320
519
  className: "text-sm font-medium text-text-primary",
321
520
  children: [e.sunnyDays, " days"]
@@ -325,7 +524,7 @@ var N = (e) => {
325
524
  className: "flex items-center justify-between",
326
525
  children: [/* @__PURE__ */ T("span", {
327
526
  className: "text-sm text-text-secondary",
328
- children: m("healthybowl.weather.history.monthly.avgHumidity", "Avg Humidity")
527
+ children: v("healthybowl.weather.history.monthly.avgHumidity", "Avg Humidity")
329
528
  }), /* @__PURE__ */ E("span", {
330
529
  className: "text-sm font-medium text-text-primary",
331
530
  children: [e.avgHumidity, "%"]
@@ -335,7 +534,7 @@ var N = (e) => {
335
534
  className: "mt-2 rounded-md border border-status-error-border/30 bg-status-error-bg/5 p-2",
336
535
  children: /* @__PURE__ */ E("p", {
337
536
  className: "flex items-center gap-1 text-sm text-text-primary",
338
- children: [/* @__PURE__ */ T(u, { className: "h-3.5 w-3.5 text-status-error-text" }), e.extremeEvents > 1 ? m("healthybowl.weather.history.monthly.extremeEvents.plural", "{{count}} extreme weather events", { count: e.extremeEvents }) : m("healthybowl.weather.history.monthly.extremeEvents.singular", "{{count}} extreme weather event", { count: e.extremeEvents })]
537
+ children: [/* @__PURE__ */ T(le, { className: "h-3.5 w-3.5 text-status-error-text" }), e.extremeEvents > 1 ? v("healthybowl.weather.history.monthly.extremeEvents.plural", "{{count}} extreme weather events", { count: e.extremeEvents }) : v("healthybowl.weather.history.monthly.extremeEvents.singular", "{{count}} extreme weather event", { count: e.extremeEvents })]
339
538
  })
340
539
  })
341
540
  ]
@@ -349,15 +548,15 @@ var N = (e) => {
349
548
  className: "mb-4 flex items-center justify-between",
350
549
  children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
351
550
  className: "text-base font-semibold text-text-primary",
352
- children: m("healthybowl.weather.history.trends.title", "Temperature Trends")
551
+ children: v("healthybowl.weather.history.trends.title", "Temperature Trends")
353
552
  }), /* @__PURE__ */ T("p", {
354
553
  className: "text-xs text-text-secondary",
355
- children: m("healthybowl.weather.history.trends.subtitle", "Daily temperature variations")
356
- })] }), /* @__PURE__ */ T(d, { className: "h-5 w-5 text-text-secondary" })]
554
+ children: v("healthybowl.weather.history.trends.subtitle", "Daily temperature variations")
555
+ })] }), /* @__PURE__ */ T(g, { className: "h-5 w-5 text-text-secondary" })]
357
556
  }),
358
557
  /* @__PURE__ */ T("div", {
359
558
  className: "flex h-48 items-end justify-between gap-2",
360
- children: [...q].reverse().map((e) => /* @__PURE__ */ E("div", {
559
+ children: [...Z].reverse().map((e) => /* @__PURE__ */ E("div", {
361
560
  className: "flex flex-1 flex-col items-center",
362
561
  children: [/* @__PURE__ */ E("div", {
363
562
  className: "flex w-full flex-col items-center gap-1",
@@ -383,13 +582,13 @@ var N = (e) => {
383
582
  className: "flex items-center gap-2",
384
583
  children: [/* @__PURE__ */ T("div", { className: "h-3 w-3 rounded bg-status-error-bg" }), /* @__PURE__ */ T("span", {
385
584
  className: "text-sm text-text-secondary",
386
- children: m("healthybowl.weather.history.trends.legend.maxTemp", "Max Temp")
585
+ children: v("healthybowl.weather.history.trends.legend.maxTemp", "Max Temp")
387
586
  })]
388
587
  }), /* @__PURE__ */ E("div", {
389
588
  className: "flex items-center gap-2",
390
589
  children: [/* @__PURE__ */ T("div", { className: "h-3 w-3 rounded bg-info" }), /* @__PURE__ */ T("span", {
391
590
  className: "text-sm text-text-secondary",
392
- children: m("healthybowl.weather.history.trends.legend.minTemp", "Min Temp")
591
+ children: v("healthybowl.weather.history.trends.legend.minTemp", "Min Temp")
393
592
  })]
394
593
  })]
395
594
  })
@@ -404,21 +603,21 @@ var N = (e) => {
404
603
  className: "flex items-center justify-between",
405
604
  children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
406
605
  className: "text-sm font-medium text-text-primary",
407
- children: m("healthybowl.weather.history.quickActions.patterns.title", "Weather Patterns")
606
+ children: v("healthybowl.weather.history.quickActions.patterns.title", "Weather Patterns")
408
607
  }), /* @__PURE__ */ T("p", {
409
608
  className: "mt-1 text-xs text-text-secondary",
410
- children: m("healthybowl.weather.history.quickActions.patterns.description", "Analyze seasonal trends")
609
+ children: v("healthybowl.weather.history.quickActions.patterns.description", "Analyze seasonal trends")
411
610
  })] }), /* @__PURE__ */ E(D, {
412
611
  variant: "outline",
413
- onClick: () => V({
414
- title: m("healthybowl.weather.history.toast.patterns.title", "Weather Patterns"),
415
- description: m("healthybowl.weather.history.toast.patterns.description", "Seasonal trend analysis coming soon."),
612
+ onClick: () => z({
613
+ title: v("healthybowl.weather.history.toast.patterns.title", "Weather Patterns"),
614
+ description: v("healthybowl.weather.history.toast.patterns.description", "Seasonal trend analysis coming soon."),
416
615
  variant: "info"
417
616
  }),
418
617
  children: [
419
- /* @__PURE__ */ T(x, { className: "h-4 w-4" }),
618
+ /* @__PURE__ */ T(ge, { className: "h-4 w-4" }),
420
619
  " ",
421
- m("healthybowl.weather.history.quickActions.patterns.action", "Analyze")
620
+ v("healthybowl.weather.history.quickActions.patterns.action", "Analyze")
422
621
  ]
423
622
  })]
424
623
  })
@@ -429,21 +628,21 @@ var N = (e) => {
429
628
  className: "flex items-center justify-between",
430
629
  children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
431
630
  className: "text-sm font-medium text-text-primary",
432
- children: m("healthybowl.weather.history.quickActions.compareYears.title", "Compare Years")
631
+ children: v("healthybowl.weather.history.quickActions.compareYears.title", "Compare Years")
433
632
  }), /* @__PURE__ */ T("p", {
434
633
  className: "mt-1 text-xs text-text-secondary",
435
- children: m("healthybowl.weather.history.quickActions.compareYears.description", "Year-over-year analysis")
634
+ children: v("healthybowl.weather.history.quickActions.compareYears.description", "Year-over-year analysis")
436
635
  })] }), /* @__PURE__ */ E(D, {
437
636
  variant: "outline",
438
- onClick: () => V({
439
- title: m("healthybowl.weather.history.toast.compareYears.title", "Compare Years"),
440
- description: m("healthybowl.weather.history.toast.compareYears.description", "Year-over-year comparison coming soon."),
637
+ onClick: () => z({
638
+ title: v("healthybowl.weather.history.toast.compareYears.title", "Compare Years"),
639
+ description: v("healthybowl.weather.history.toast.compareYears.description", "Year-over-year comparison coming soon."),
441
640
  variant: "info"
442
641
  }),
443
642
  children: [
444
- /* @__PURE__ */ T(d, { className: "h-4 w-4" }),
643
+ /* @__PURE__ */ T(g, { className: "h-4 w-4" }),
445
644
  " ",
446
- m("healthybowl.weather.history.quickActions.compareYears.action", "Compare")
645
+ v("healthybowl.weather.history.quickActions.compareYears.action", "Compare")
447
646
  ]
448
647
  })]
449
648
  })
@@ -454,21 +653,21 @@ var N = (e) => {
454
653
  className: "flex items-center justify-between",
455
654
  children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
456
655
  className: "text-sm font-medium text-text-primary",
457
- children: m("healthybowl.weather.history.quickActions.report.title", "Weather Report")
656
+ children: v("healthybowl.weather.history.quickActions.report.title", "Weather Report")
458
657
  }), /* @__PURE__ */ T("p", {
459
658
  className: "mt-1 text-xs text-text-secondary",
460
- children: m("healthybowl.weather.history.quickActions.report.description", "Generate custom report")
659
+ children: v("healthybowl.weather.history.quickActions.report.description", "Generate custom report")
461
660
  })] }), /* @__PURE__ */ E(D, {
462
661
  variant: "outline",
463
- onClick: () => V({
464
- title: m("healthybowl.weather.history.toast.report.title", "Report Generation"),
465
- description: m("healthybowl.weather.history.toast.report.description", "Custom weather report generation coming soon."),
662
+ onClick: () => z({
663
+ title: v("healthybowl.weather.history.toast.report.title", "Report Generation"),
664
+ description: v("healthybowl.weather.history.toast.report.description", "Custom weather report generation coming soon."),
466
665
  variant: "info"
467
666
  }),
468
667
  children: [
469
- /* @__PURE__ */ T(g, { className: "h-4 w-4" }),
668
+ /* @__PURE__ */ T(b, { className: "h-4 w-4" }),
470
669
  " ",
471
- m("healthybowl.weather.history.quickActions.report.action", "Generate")
670
+ v("healthybowl.weather.history.quickActions.report.action", "Generate")
472
671
  ]
473
672
  })]
474
673
  })
@@ -478,17 +677,17 @@ var N = (e) => {
478
677
  /* @__PURE__ */ T("div", { children: /* @__PURE__ */ E(D, {
479
678
  variant: "ghost",
480
679
  size: "sm",
481
- onClick: () => z(".."),
680
+ onClick: () => R(".."),
482
681
  className: "gap-1 text-text-secondary hover:text-text-primary",
483
- children: ["← ", m("healthybowl.weather.history.backToDashboard", "Back to Weather Dashboard")]
682
+ children: ["← ", v("healthybowl.weather.history.backToDashboard", "Back to Weather Dashboard")]
484
683
  }) })
485
- ] }), /* @__PURE__ */ T(r, {
486
- toasts: B,
487
- onDismiss: H
684
+ ] }), /* @__PURE__ */ T(a, {
685
+ toasts: xe,
686
+ onDismiss: Se
488
687
  })]
489
688
  });
490
689
  };
491
690
  //#endregion
492
- export { F as WeatherHistoryPage };
691
+ export { L as WeatherHistoryPage };
493
692
 
494
693
  //# sourceMappingURL=WeatherHistoryPage.js.map