@8wave/ai-elements 0.119.0-beta.20 → 0.119.0-beta.22

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 (28) hide show
  1. package/dist/_chunks/PkToolShowWeather-DfLsFayn.js +340 -0
  2. package/dist/_chunks/PkToolShowWeather-DfLsFayn.js.map +1 -0
  3. package/dist/ai-elements.es.js +5 -3
  4. package/dist/ai-elements.es.js.map +1 -1
  5. package/dist-vue/PkChatbot.js +1 -1
  6. package/dist-vue/PkChatbotMessages.js +1 -1
  7. package/dist-vue/PkChatbotViewChat.js +1 -1
  8. package/dist-vue/_chunks/{PkChatbot-CM9ST43I.js → PkChatbot-536vsOfp.js} +2 -2
  9. package/dist-vue/_chunks/{PkChatbot-CM9ST43I.js.map → PkChatbot-536vsOfp.js.map} +1 -1
  10. package/dist-vue/_chunks/{PkChatbotMessages-D9uf0NMI.js → PkChatbotMessages-CnI3e9wF.js} +3 -3
  11. package/dist-vue/_chunks/{PkChatbotMessages-D9uf0NMI.js.map → PkChatbotMessages-CnI3e9wF.js.map} +1 -1
  12. package/dist-vue/_chunks/{PkChatbotViewChat-B_7IdZIz.js → PkChatbotViewChat-CVT6OUIv.js} +3 -3
  13. package/dist-vue/_chunks/{PkChatbotViewChat-B_7IdZIz.js.map → PkChatbotViewChat-CVT6OUIv.js.map} +1 -1
  14. package/dist-vue/_chunks/{PkToolShowDiagram-BJ_ryTsD.js → PkToolShowDiagram-7WxDObZ6.js} +2 -2
  15. package/dist-vue/_chunks/{PkToolShowDiagram-BJ_ryTsD.js.map → PkToolShowDiagram-7WxDObZ6.js.map} +1 -1
  16. package/dist-vue/_chunks/PkToolShowWeather-BOuNrvY2.js +339 -0
  17. package/dist-vue/_chunks/PkToolShowWeather-BOuNrvY2.js.map +1 -0
  18. package/dist-vue/composables.js +4 -2
  19. package/dist-vue/composables.js.map +1 -1
  20. package/dist-vue/index.js +3 -3
  21. package/dist-vue/locales.js +2 -0
  22. package/dist-vue/packages/models/src/schema/AgentApiTool.d.ts +8 -0
  23. package/dist-vue/packages/models/src/schema/Weather.d.ts +7 -0
  24. package/package.json +1 -1
  25. package/dist/_chunks/PkToolShowWeather-BFOlS1AS.js +0 -280
  26. package/dist/_chunks/PkToolShowWeather-BFOlS1AS.js.map +0 -1
  27. package/dist-vue/_chunks/PkToolShowWeather-BH-FtLpk.js +0 -279
  28. package/dist-vue/_chunks/PkToolShowWeather-BH-FtLpk.js.map +0 -1
@@ -0,0 +1,340 @@
1
+ import { _ as e, b as t, g as n, o as r } from "./zod-Dd1GFq_6.js";
2
+ import { $ as i, C as a, Ct as o, Dt as s, L as c, O as l, St as u, X as d, _ as f, b as p, d as m, g as ee, h, it as g, m as _, mt as v, r as y, t as b, v as x, wt as S, x as C, z as w } from "./vue.runtime.esm-bundler-DKVd2gci.js";
3
+ import { r as te } from "./vue-i18n-CooVjJjT.js";
4
+ import "./src-Dt4rhhPN.js";
5
+ import { n as ne, t as re } from "./index.es-dTcgyeM4.js";
6
+ //#region ../../packages/models/src/schema/Weather.ts
7
+ var T = e({
8
+ temperature: n().describe("Temperature in °C"),
9
+ feelsLike: n().describe("Apparent temperature in °C"),
10
+ humidity: n().describe("Relative humidity in %"),
11
+ precipitation: n().describe("Precipitation in mm"),
12
+ weatherCode: n().describe("WMO weather interpretation code"),
13
+ windSpeed: n().describe("Wind speed in km/h"),
14
+ windDirection: n().describe("Wind direction in degrees"),
15
+ uvIndex: n().describe("UV index")
16
+ }), E = e({
17
+ time: t(),
18
+ temperature: n(),
19
+ precipitationProbability: n(),
20
+ precipitation: n(),
21
+ weatherCode: n(),
22
+ windSpeed: n()
23
+ }), D = e({
24
+ date: t(),
25
+ maxTemp: n(),
26
+ minTemp: n(),
27
+ weatherCode: n(),
28
+ precipitationSum: n(),
29
+ precipitationProbabilityMax: n(),
30
+ uvIndexMax: n(),
31
+ sunrise: t(),
32
+ sunset: t()
33
+ }), O = e({
34
+ aqi: n().describe("European AQI index"),
35
+ pm10: n().describe("PM10 in µg/m³"),
36
+ pm25: n().describe("PM2.5 in µg/m³"),
37
+ no2: n().describe("NO₂ in µg/m³"),
38
+ ozone: n().describe("Ozone in µg/m³")
39
+ });
40
+ e({
41
+ locationName: t(),
42
+ latitude: n(),
43
+ longitude: n(),
44
+ timezone: t(),
45
+ current: T.nullable().describe("Current conditions — null when viewing a future date range"),
46
+ hourly: r(E).describe("Hourly forecast for the requested range"),
47
+ daily: r(D).describe("Daily forecast for the requested range"),
48
+ airQuality: O.nullable()
49
+ });
50
+ function k(e) {
51
+ if (!e || typeof e != "object") return !1;
52
+ let { current: t, hourly: n, daily: r } = e;
53
+ return typeof t?.temperature == "number" || Array.isArray(n) && n.length > 0 || Array.isArray(r) && r.length > 0;
54
+ }
55
+ //#endregion
56
+ //#region ../../packages/utils/src/weather.ts
57
+ function ie(e) {
58
+ return e === void 0 ? "unknown" : e === 0 ? "clear" : e === 1 ? "mainlyClear" : e === 2 ? "partlyCloudy" : e === 3 ? "overcast" : e === 45 || e === 48 ? "fog" : e >= 51 && e <= 55 ? "drizzle" : e === 56 || e === 57 ? "freezingDrizzle" : e >= 61 && e <= 65 ? "rain" : e === 66 || e === 67 ? "freezingRain" : e >= 71 && e <= 77 ? "snow" : e >= 80 && e <= 82 ? "rainShowers" : e === 85 || e === 86 ? "snowShowers" : e === 95 ? "thunderstorm" : e === 96 || e === 99 ? "thunderstormHail" : "unknown";
59
+ }
60
+ function ae(e) {
61
+ return e <= 20 ? {
62
+ index: 0,
63
+ key: "good"
64
+ } : e <= 40 ? {
65
+ index: 1,
66
+ key: "fair"
67
+ } : e <= 60 ? {
68
+ index: 2,
69
+ key: "moderate"
70
+ } : e <= 80 ? {
71
+ index: 3,
72
+ key: "poor"
73
+ } : e <= 100 ? {
74
+ index: 4,
75
+ key: "veryPoor"
76
+ } : {
77
+ index: 5,
78
+ key: "hazardous"
79
+ };
80
+ }
81
+ //#endregion
82
+ //#region ../../packages/components/src/chat/PkToolShowWeather.vue?vue&type=script&setup=true&lang.ts
83
+ l(), g(), o(), y();
84
+ var A = {
85
+ key: 0,
86
+ class: "text-12 text-danger flex items-center gap-6 py-8"
87
+ }, j = {
88
+ key: 1,
89
+ class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface"
90
+ }, M = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40" }, N = { class: "font-bold truncate" }, P = { class: "ml-auto shrink-0 capitalize" }, F = {
91
+ key: 0,
92
+ class: "px-sm py-md flex items-center gap-md flex-wrap"
93
+ }, I = { class: "flex items-center gap-8" }, L = { class: "text-48 font-light leading-none text-word-1" }, R = { class: "flex flex-col gap-4 text-12 text-word-3" }, z = { class: "flex items-center gap-6" }, B = { class: "flex items-center gap-6" }, V = { class: "flex items-center gap-6" }, H = {
94
+ key: 0,
95
+ class: "flex items-center gap-6"
96
+ }, U = {
97
+ key: 1,
98
+ class: "px-sm py-md flex items-center gap-md flex-wrap"
99
+ }, W = { class: "flex items-center gap-8" }, G = { class: "flex flex-col leading-none" }, K = { class: "text-48 font-light text-word-1" }, q = { class: "text-20 text-word-3" }, J = { class: "flex flex-col gap-4 text-12 text-word-3" }, oe = {
100
+ key: 0,
101
+ class: "flex items-center gap-6"
102
+ }, se = {
103
+ key: 1,
104
+ class: "flex items-center gap-6"
105
+ }, ce = { class: "flex items-center gap-6" }, le = {
106
+ key: 0,
107
+ class: "border-t border-surface-3"
108
+ }, ue = { class: "flex overflow-x-auto gap-2 px-sm py-8 light-scrollbar" }, de = { class: "text-word-3" }, fe = { class: "font-medium text-word-1" }, pe = {
109
+ key: 0,
110
+ class: "text-word-5 text-smaller"
111
+ }, me = ["onClick"], he = { class: "w-48 shrink-0 text-word-3 capitalize" }, ge = {
112
+ key: 0,
113
+ class: "text-word-5 text-11 w-32 shrink-0"
114
+ }, _e = {
115
+ key: 1,
116
+ class: "w-32 shrink-0"
117
+ }, Y = { class: "ml-auto flex items-center gap-8 text-word-3" }, ve = { class: "text-word-1 font-semibold" }, ye = {
118
+ key: 2,
119
+ class: "border-t border-surface-3 px-sm py-8 flex items-center gap-8 text-12"
120
+ }, be = { class: "text-word-3" }, X = /* @__PURE__ */ a({
121
+ __name: "PkToolShowWeather",
122
+ props: { part: { type: null } },
123
+ setup(e) {
124
+ let t = e, { t: n, d: r, n: a } = te({ useScope: "global" }), o = _(() => t.part), l = _(() => {
125
+ let { output: e, input: t } = o.value;
126
+ return k(e) ? e : k(t) ? t : null;
127
+ }), g = _(() => !l.value && o.value.state !== "input-streaming" && o.value.state !== "input-available"), y = v(0), T = v(!l.value?.current);
128
+ d(y, (e) => {
129
+ e > 0 && (T.value = !0);
130
+ });
131
+ let E = _(() => l.value?.daily?.[y.value]), D = _(() => {
132
+ if (!l.value?.hourly?.length || !E.value) return l.value?.hourly ?? [];
133
+ let e = E.value.date;
134
+ return l.value.hourly.filter((t) => t.time.startsWith(e));
135
+ });
136
+ function O(e) {
137
+ let t = new Date(e);
138
+ if (!Number.isNaN(t.getTime())) return t;
139
+ if (/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}/.test(e)) {
140
+ let t = new Date(e.replace(" ", "T"));
141
+ if (!Number.isNaN(t.getTime())) return t;
142
+ }
143
+ let n = e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);
144
+ if (n) {
145
+ let e = /* @__PURE__ */ new Date();
146
+ return e.setHours(Number(n[1]), Number(n[2]), Number(n[3] ?? 0), 0), e;
147
+ }
148
+ if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
149
+ let t = /* @__PURE__ */ new Date(e + "T12:00:00");
150
+ if (!Number.isNaN(t.getTime())) return t;
151
+ }
152
+ return /* @__PURE__ */ new Date(NaN);
153
+ }
154
+ let X = {
155
+ clear: "wi:day-sunny",
156
+ mainlyClear: "wi:day-sunny-overcast",
157
+ partlyCloudy: "wi:day-cloudy",
158
+ overcast: "wi:cloudy",
159
+ fog: "wi:fog",
160
+ drizzle: "wi:sprinkle",
161
+ freezingDrizzle: "wi:sleet",
162
+ rain: "wi:rain",
163
+ freezingRain: "wi:rain-mix",
164
+ snow: "wi:snow",
165
+ rainShowers: "wi:showers",
166
+ snowShowers: "wi:snow-wind",
167
+ thunderstorm: "wi:thunderstorm",
168
+ thunderstormHail: "wi:storm-showers",
169
+ unknown: "wi:na"
170
+ };
171
+ function Z(e) {
172
+ return X[ie(e)];
173
+ }
174
+ function Q(e, t, i) {
175
+ let a = O(e + "T12:00:00");
176
+ if (!Number.isNaN(a.getTime())) {
177
+ let e = /* @__PURE__ */ new Date();
178
+ return e.setHours(12, 0, 0, 0), Math.round((a.getTime() - e.getTime()) / 864e5) === 0 ? n("weather.today") : r(a, "weekday-day");
179
+ }
180
+ if (t === 0 && i <= 7) return n("weather.today");
181
+ let o = /* @__PURE__ */ new Date();
182
+ return o.setDate(o.getDate() + t), r(o, "weekday-day");
183
+ }
184
+ let xe = _(() => {
185
+ if (E.value) {
186
+ let e = O(E.value.date + "T12:00:00");
187
+ if (!Number.isNaN(e.getTime())) return Q(E.value.date, y.value, l.value?.daily?.length ?? 1);
188
+ }
189
+ return Q((/* @__PURE__ */ new Date()).toISOString().slice(0, 10), 0, 1);
190
+ }), Se = {
191
+ good: {
192
+ labelKey: "weather.aqiGood",
193
+ class: "text-green-600 bg-green-50"
194
+ },
195
+ fair: {
196
+ labelKey: "weather.aqiFair",
197
+ class: "text-lime-600 bg-lime-50"
198
+ },
199
+ moderate: {
200
+ labelKey: "weather.aqiModerate",
201
+ class: "text-yellow-600 bg-yellow-50"
202
+ },
203
+ poor: {
204
+ labelKey: "weather.aqiPoor",
205
+ class: "text-orange-600 bg-orange-50"
206
+ },
207
+ veryPoor: {
208
+ labelKey: "weather.aqiVeryPoor",
209
+ class: "text-red-600 bg-red-50"
210
+ },
211
+ hazardous: {
212
+ labelKey: "weather.aqiHazardous",
213
+ class: "text-purple-700 bg-purple-50"
214
+ }
215
+ };
216
+ function $(e) {
217
+ let { labelKey: t, class: r } = Se[ae(e).key];
218
+ return {
219
+ label: n(t),
220
+ class: r
221
+ };
222
+ }
223
+ function Ce(e) {
224
+ return [
225
+ "N",
226
+ "NE",
227
+ "E",
228
+ "SE",
229
+ "S",
230
+ "SO",
231
+ "O",
232
+ "NO"
233
+ ][Math.round(e / 45) % 8];
234
+ }
235
+ return (e, t) => {
236
+ let o = re, d = ne;
237
+ return g.value ? (c(), x("div", A, [C(o, {
238
+ name: "ri:error-warning-line",
239
+ class: "w-16 h-16 shrink-0"
240
+ }), h("span", null, s(u(n)("weather.unavailable")), 1)])) : l.value ? (c(), x("div", j, [
241
+ h("div", M, [
242
+ C(o, {
243
+ name: "ri:temp-cold-line",
244
+ class: "text-16"
245
+ }),
246
+ h("strong", N, s(l.value.locationName), 1),
247
+ h("span", P, s(xe.value), 1)
248
+ ]),
249
+ l.value.current && y.value === 0 ? (c(), x("div", F, [h("div", I, [C(o, {
250
+ name: Z(l.value.current.weatherCode),
251
+ class: "text-48 text-word-2 shrink-0"
252
+ }, null, 8, ["name"]), h("span", L, s(u(a)(l.value.current.temperature, "integer")) + "° ", 1)]), h("div", R, [
253
+ h("div", z, s(u(n)("weather.feelsLike")) + " " + s(u(a)(l.value.current.feelsLike, "integer")) + "° ", 1),
254
+ h("div", B, [C(o, {
255
+ name: "ri:water-percent-line",
256
+ class: "text-14"
257
+ }), p(" " + s(l.value.current.humidity) + "% ", 1)]),
258
+ h("div", V, [C(o, {
259
+ name: "ri:windy-line",
260
+ class: "text-14"
261
+ }), p(" " + s(u(a)(l.value.current.windSpeed, "integer")) + " km/h " + s(Ce(l.value.current.windDirection)), 1)]),
262
+ l.value.current.uvIndex > 0 ? (c(), x("div", H, [C(o, {
263
+ name: "ri:sun-line",
264
+ class: "text-14"
265
+ }), p(" UV " + s(u(a)(l.value.current.uvIndex, "integer")), 1)])) : f("", !0)
266
+ ])])) : E.value ? (c(), x("div", U, [h("div", W, [C(o, {
267
+ name: Z(E.value.weatherCode),
268
+ class: "text-48 text-word-2 shrink-0"
269
+ }, null, 8, ["name"]), h("div", G, [h("span", K, s(u(a)(E.value.maxTemp, "integer")) + "° ", 1), h("span", q, s(u(a)(E.value.minTemp, "integer")) + "° ", 1)])]), h("div", J, [
270
+ E.value.precipitationProbabilityMax > 0 ? (c(), x("div", oe, [C(o, {
271
+ name: "ri:drop-line",
272
+ class: "text-14"
273
+ }), p(" " + s(E.value.precipitationProbabilityMax) + "% (" + s(E.value.precipitationSum) + " mm) ", 1)])) : f("", !0),
274
+ E.value.uvIndexMax > 0 ? (c(), x("div", se, [C(o, {
275
+ name: "ri:sun-line",
276
+ class: "text-14"
277
+ }), p(" UV " + s(u(a)(E.value.uvIndexMax, "integer")), 1)])) : f("", !0),
278
+ h("div", ce, [C(o, {
279
+ name: "ri:sun-foggy-line",
280
+ class: "text-14"
281
+ }), p(" " + s(u(r)(O(E.value.sunrise), "time")) + " – " + s(u(r)(O(E.value.sunset), "time")), 1)])
282
+ ])])) : f("", !0),
283
+ C(b, null, {
284
+ default: i(() => [D.value.length > 0 ? (c(), x("div", le, [h("div", ue, [(c(!0), x(m, null, w(D.value, (e) => (c(), x("div", {
285
+ key: e.time,
286
+ class: "flex flex-col items-center gap-4 min-w-48 px-4 py-6 rounded-xl text-11 text-word-3 shrink-0"
287
+ }, [
288
+ h("span", de, s(Number.isNaN(O(e.time).getTime()) ? e.time : u(r)(O(e.time), "time")), 1),
289
+ C(o, {
290
+ name: Z(e.weatherCode),
291
+ class: "text-20 text-word-2"
292
+ }, null, 8, ["name"]),
293
+ h("span", fe, s(u(a)(e.temperature, "integer")) + "° ", 1),
294
+ e.precipitationProbability > 0 ? (c(), x("span", pe, s(e.precipitationProbability) + "% ", 1)) : f("", !0)
295
+ ]))), 128))])])) : f("", !0)]),
296
+ _: 1
297
+ }),
298
+ C(b, null, {
299
+ default: i(() => [l.value.daily?.length > 1 ? (c(), ee(d, {
300
+ key: 0,
301
+ modelValue: T.value,
302
+ "onUpdate:modelValue": t[0] ||= (e) => T.value = e,
303
+ modifiers: "details no-padding",
304
+ title: u(n)("weather.dailyForecast"),
305
+ class: "border-t border-surface-3"
306
+ }, {
307
+ default: i(() => [(c(!0), x(m, null, w(l.value.daily, (e, t) => (c(), x("button", {
308
+ key: e.date,
309
+ type: "button",
310
+ class: S(["flex items-center gap-sm px-sm py-8 text-12 w-full text-left transition-colors cursor-pointer border-t border-surface-3", t === y.value ? "bg-surface-2" : "hover:bg-surface-1"]),
311
+ onClick: (e) => y.value = t
312
+ }, [
313
+ h("span", he, s(Q(e.date, t, l.value.daily.length)), 1),
314
+ C(o, {
315
+ name: Z(e.weatherCode),
316
+ class: "text-18 text-word-2 shrink-0"
317
+ }, null, 8, ["name"]),
318
+ e.precipitationProbabilityMax > 0 ? (c(), x("span", ge, s(e.precipitationProbabilityMax) + "% ", 1)) : (c(), x("span", _e)),
319
+ h("div", Y, [h("span", ve, s(u(a)(e.maxTemp, "integer")) + "° ", 1), h("span", null, s(u(a)(e.minTemp, "integer")) + "°", 1)])
320
+ ], 10, me))), 128))]),
321
+ _: 1
322
+ }, 8, ["modelValue", "title"])) : f("", !0)]),
323
+ _: 1
324
+ }),
325
+ l.value.airQuality ? (c(), x("div", ye, [
326
+ C(o, {
327
+ name: "ri:windy-line",
328
+ class: "text-14 text-word-3"
329
+ }),
330
+ h("span", be, s(u(n)("weather.airQuality")), 1),
331
+ h("span", { class: S(["ml-auto px-8 py-2 text-11 font-semibold", $(l.value.airQuality.aqi).class]) }, s($(l.value.airQuality.aqi).label) + " (" + s(l.value.airQuality.aqi) + ") ", 3)
332
+ ])) : f("", !0)
333
+ ])) : f("", !0);
334
+ };
335
+ }
336
+ });
337
+ //#endregion
338
+ export { X as default };
339
+
340
+ //# sourceMappingURL=PkToolShowWeather-DfLsFayn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PkToolShowWeather-DfLsFayn.js","names":["z.object","z.number","z.string","z.array","__unplugin_components_0","__unplugin_components_1","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_unref","_createTextVNode","_createCommentVNode","_Transition","_withCtx","_Fragment","_renderList","_createBlock","_normalizeClass","_sfc_main","object","string","number","array","withCtx","defineComponent","init_shared_esm_bundler","toDisplayString","openBlock","init_runtime_core_esm_bundler","unref","watch","createCommentVNode","createTextVNode","Fragment","createBlock","init_reactivity_esm_bundler","computed","ref","init_runtime_dom_esm_bundler","Transition","createElementBlock","normalizeClass","createVNode","renderList","useI18n","Ar","Ae","WeatherCurrentSchema","WeatherHourlySchema","WeatherDailySchema","AirQualitySchema","hasWeatherForecast","value","current","hourly","daily","wmoCategory","code","aqiBand","aqi","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","PkToolShowWeather_default","props","__props","$t","$d","$n","toolPart","data","output","input","isUnavailable","selectedDayIndex","dailyOpen","index","selectedDay","filteredHourly","dayDate","h","safeDate","direct","withT","timeOnly","today","noon","WMO_ICON","wmoToIcon","formatDay","parsed","isoDate","total","fallback","headerDate","AQI_PRESENTATION","aqiInfo","cssClass","labelKey","windDirectionLabel","deg","_component_VvIcon","_component_VvAccordion","createBaseVNode","hour","_cache","$event","day"],"sources":["../../../../packages/models/src/schema/Weather.ts","../../../../packages/utils/src/weather.ts","../../../../packages/components/src/chat/PkToolShowWeather.vue","../../../../packages/components/src/chat/PkToolShowWeather.vue"],"sourcesContent":["import { z } from 'zod'\n\n/**\n * The weather data contract shared by the `getWeather`/`showWeather` backend\n * tools, the web widget (`PkToolShowWeather.vue`), and the platform card\n * renderer. Single source of truth — do not redeclare these shapes elsewhere.\n */\n\nconst WeatherCurrentSchema = z.object({\n temperature: z.number().describe('Temperature in °C'),\n feelsLike: z.number().describe('Apparent temperature in °C'),\n humidity: z.number().describe('Relative humidity in %'),\n precipitation: z.number().describe('Precipitation in mm'),\n weatherCode: z.number().describe('WMO weather interpretation code'),\n windSpeed: z.number().describe('Wind speed in km/h'),\n windDirection: z.number().describe('Wind direction in degrees'),\n uvIndex: z.number().describe('UV index'),\n})\n\nconst WeatherHourlySchema = z.object({\n time: z.string(),\n temperature: z.number(),\n precipitationProbability: z.number(),\n precipitation: z.number(),\n weatherCode: z.number(),\n windSpeed: z.number(),\n})\n\nconst WeatherDailySchema = z.object({\n date: z.string(),\n maxTemp: z.number(),\n minTemp: z.number(),\n weatherCode: z.number(),\n precipitationSum: z.number(),\n precipitationProbabilityMax: z.number(),\n uvIndexMax: z.number(),\n sunrise: z.string(),\n sunset: z.string(),\n})\n\nconst AirQualitySchema = z.object({\n aqi: z.number().describe('European AQI index'),\n pm10: z.number().describe('PM10 in µg/m³'),\n pm25: z.number().describe('PM2.5 in µg/m³'),\n no2: z.number().describe('NO₂ in µg/m³'),\n ozone: z.number().describe('Ozone in µg/m³'),\n})\n\nexport const WeatherDataSchema = z.object({\n locationName: z.string(),\n latitude: z.number(),\n longitude: z.number(),\n timezone: z.string(),\n current: WeatherCurrentSchema.nullable().describe(\n 'Current conditions — null when viewing a future date range',\n ),\n hourly: z\n .array(WeatherHourlySchema)\n .describe('Hourly forecast for the requested range'),\n daily: z\n .array(WeatherDailySchema)\n .describe('Daily forecast for the requested range'),\n airQuality: AirQualitySchema.nullable(),\n})\n\nexport type WeatherData = z.infer<typeof WeatherDataSchema>\n\n/**\n * Whether a value carries something the weather card can draw: current\n * conditions, or at least one hourly or daily entry. `showWeather` takes only\n * a `weatherKey`, so its input is a forecast only in conversations from before\n * the key, and a call that failed (a mangled key, expired data) has no output.\n */\nexport function hasWeatherForecast(value: unknown): value is WeatherData {\n if (!value || typeof value !== 'object') {\n return false\n }\n const { current, hourly, daily } = value as Partial<WeatherData>\n return (\n typeof current?.temperature === 'number' ||\n (Array.isArray(hourly) && hourly.length > 0) ||\n (Array.isArray(daily) && daily.length > 0)\n )\n}\n","/**\n * Framework-agnostic weather presentation primitives. They classify raw\n * open-meteo values into canonical categories; each consumer (web widget,\n * platform card renderer) maps a category to its own representation (an\n * Iconify name, an emoji, a CSS class, an i18n key). Keeping the classification\n * here means the WMO code bands and AQI thresholds live in exactly one place.\n */\n\n/** Canonical WMO weather-code category (resolution matches the web widget). */\nexport type WmoCategory =\n | 'clear'\n | 'mainlyClear'\n | 'partlyCloudy'\n | 'overcast'\n | 'fog'\n | 'drizzle'\n | 'freezingDrizzle'\n | 'rain'\n | 'freezingRain'\n | 'snow'\n | 'rainShowers'\n | 'snowShowers'\n | 'thunderstorm'\n | 'thunderstormHail'\n | 'unknown'\n\n/** Map a WMO weather interpretation code to a canonical category. */\nexport function wmoCategory(code: number | undefined): WmoCategory {\n if (code === undefined) {\n return 'unknown'\n }\n if (code === 0) {\n return 'clear'\n }\n if (code === 1) {\n return 'mainlyClear'\n }\n if (code === 2) {\n return 'partlyCloudy'\n }\n if (code === 3) {\n return 'overcast'\n }\n if (code === 45 || code === 48) {\n return 'fog'\n }\n if (code >= 51 && code <= 55) {\n return 'drizzle'\n }\n if (code === 56 || code === 57) {\n return 'freezingDrizzle'\n }\n if (code >= 61 && code <= 65) {\n return 'rain'\n }\n if (code === 66 || code === 67) {\n return 'freezingRain'\n }\n if (code >= 71 && code <= 77) {\n return 'snow'\n }\n if (code >= 80 && code <= 82) {\n return 'rainShowers'\n }\n if (code === 85 || code === 86) {\n return 'snowShowers'\n }\n if (code === 95) {\n return 'thunderstorm'\n }\n if (code === 96 || code === 99) {\n return 'thunderstormHail'\n }\n return 'unknown'\n}\n\n/** Emoji per category (used by the language-neutral platform card renderer). */\nconst WMO_EMOJI: Record<WmoCategory, string> = {\n clear: '☀️',\n mainlyClear: '⛅',\n partlyCloudy: '⛅',\n overcast: '⛅',\n fog: '🌫️',\n drizzle: '🌦️',\n freezingDrizzle: '🌦️',\n rain: '🌧️',\n freezingRain: '🌧️',\n snow: '❄️',\n rainShowers: '🌧️',\n snowShowers: '🌨️',\n thunderstorm: '⛈️',\n thunderstormHail: '⛈️',\n unknown: '🌡️',\n}\n\n/** WMO code → emoji (convenience for non-UI consumers). */\nexport function wmoEmoji(code: number | undefined): string {\n return WMO_EMOJI[wmoCategory(code)]\n}\n\n/** Canonical European-AQI band, ordered best → worst. */\nexport type AqiBandKey =\n 'good' | 'fair' | 'moderate' | 'poor' | 'veryPoor' | 'hazardous'\n\n/** Classify a European AQI value into a band (index + canonical key). */\nexport function aqiBand(aqi: number): { index: number; key: AqiBandKey } {\n if (aqi <= 20) {\n return { index: 0, key: 'good' }\n }\n if (aqi <= 40) {\n return { index: 1, key: 'fair' }\n }\n if (aqi <= 60) {\n return { index: 2, key: 'moderate' }\n }\n if (aqi <= 80) {\n return { index: 3, key: 'poor' }\n }\n if (aqi <= 100) {\n return { index: 4, key: 'veryPoor' }\n }\n return { index: 5, key: 'hazardous' }\n}\n\n/** Colored dot per AQI band index (used by the platform card renderer). */\nconst AQI_DOTS = ['🟢', '🟡', '🟠', '🔴', '🟣', '⚫']\n\n/** AQI value → colored dot (convenience for non-UI consumers). */\nexport function aqiDot(aqi: number): string {\n return AQI_DOTS[aqiBand(aqi).index]\n}\n","<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { hasWeatherForecast } from 'models'\n import {\n aqiBand,\n wmoCategory,\n type AqiBandKey,\n type WmoCategory,\n } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { t: $t, d: $d, n: $n } = useI18n({ useScope: 'global' })\n\n const toolPart = computed(() => {\n return props.part as {\n state?: string\n input?: unknown\n output?: unknown\n }\n })\n\n const data = computed(() => {\n const { output, input } = toolPart.value\n if (hasWeatherForecast(output)) {\n return output\n }\n // Conversations from before `weatherKey` passed the whole forecast\n return hasWeatherForecast(input) ? input : null\n })\n\n /**\n * The call is over and left nothing to draw: a mangled or expired key\n * fails the tool, and its input is only the key. Without this the card\n * drew a thermometer and \"Oggi\" around nothing. While the call runs there\n * is nothing to draw yet, and nothing has failed either: the card waits.\n */\n const isUnavailable = computed(\n () =>\n !data.value &&\n toolPart.value.state !== 'input-streaming' &&\n toolPart.value.state !== 'input-available',\n )\n\n const selectedDayIndex = ref(0)\n\n const dailyOpen = ref(!data.value?.current)\n\n watch(selectedDayIndex, (index) => {\n if (index > 0) {\n dailyOpen.value = true\n }\n })\n\n const selectedDay = computed(\n () => data.value?.daily?.[selectedDayIndex.value],\n )\n\n /** Hourly entries filtered to the selected day's date */\n const filteredHourly = computed(() => {\n if (!data.value?.hourly?.length || !selectedDay.value) {\n return data.value?.hourly ?? []\n }\n const dayDate = selectedDay.value.date\n return data.value.hourly.filter((h) => h.time.startsWith(dayDate))\n })\n\n /**\n * Parses a date/time string in various formats the LLM might produce.\n * Tries ISO, space-separated, time-only, and common human-readable formats.\n */\n function safeDate(value: string): Date {\n // 1. Try native parsing (works for ISO 8601 and many standard formats)\n const direct = new Date(value)\n if (!Number.isNaN(direct.getTime())) {\n return direct\n }\n\n // 2. Replace space separator → T (\"2024-04-15 14:00\" → \"2024-04-15T14:00\")\n if (/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}/.test(value)) {\n const withT = new Date(value.replace(' ', 'T'))\n if (!Number.isNaN(withT.getTime())) {\n return withT\n }\n }\n\n // 3. Time-only (\"14:00\" or \"14:00:00\") → today at that hour\n const timeOnly = value.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/)\n if (timeOnly) {\n const today = new Date()\n today.setHours(\n Number(timeOnly[1]),\n Number(timeOnly[2]),\n Number(timeOnly[3] ?? 0),\n 0,\n )\n return today\n }\n\n // 4. Date-only (\"2024-04-15\") → noon to avoid timezone edge\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) {\n const noon = new Date(value + 'T12:00:00')\n if (!Number.isNaN(noon.getTime())) {\n return noon\n }\n }\n\n // Last resort: return an obviously invalid sentinel so callers can handle it\n return new Date(NaN)\n }\n\n /** Iconify `wi:` icon per canonical WMO category. */\n const WMO_ICON: Record<WmoCategory, string> = {\n clear: 'wi:day-sunny',\n mainlyClear: 'wi:day-sunny-overcast',\n partlyCloudy: 'wi:day-cloudy',\n overcast: 'wi:cloudy',\n fog: 'wi:fog',\n drizzle: 'wi:sprinkle',\n freezingDrizzle: 'wi:sleet',\n rain: 'wi:rain',\n freezingRain: 'wi:rain-mix',\n snow: 'wi:snow',\n rainShowers: 'wi:showers',\n snowShowers: 'wi:snow-wind',\n thunderstorm: 'wi:thunderstorm',\n thunderstormHail: 'wi:storm-showers',\n unknown: 'wi:na',\n }\n\n /** Maps WMO weather code to an Iconify wi: icon name */\n function wmoToIcon(code: number): string {\n return WMO_ICON[wmoCategory(code)]\n }\n\n /**\n * Returns a formatted day label for daily forecast.\n * When daily has 1-2 entries, use the date string directly.\n * Otherwise, use index-based computation from today.\n */\n function formatDay(isoDate: string, index: number, total: number): string {\n const parsed = safeDate(isoDate + 'T12:00:00')\n if (!Number.isNaN(parsed.getTime())) {\n const today = new Date()\n today.setHours(12, 0, 0, 0)\n const diffDays = Math.round(\n (parsed.getTime() - today.getTime()) / 86_400_000,\n )\n if (diffDays === 0) {\n return $t('weather.today')\n }\n return $d(parsed, 'weekday-day')\n }\n if (index === 0 && total <= 7) {\n return $t('weather.today')\n }\n const fallback = new Date()\n fallback.setDate(fallback.getDate() + index)\n return $d(fallback, 'weekday-day')\n }\n\n const headerDate = computed(() => {\n if (selectedDay.value) {\n const parsed = safeDate(selectedDay.value.date + 'T12:00:00')\n if (!Number.isNaN(parsed.getTime())) {\n return formatDay(\n selectedDay.value.date,\n selectedDayIndex.value,\n data.value?.daily?.length ?? 1,\n )\n }\n }\n return formatDay(new Date().toISOString().slice(0, 10), 0, 1)\n })\n\n /** i18n label key + CSS class per canonical AQI band. */\n const AQI_PRESENTATION: Record<\n AqiBandKey,\n { labelKey: string; class: string }\n > = {\n good: {\n labelKey: 'weather.aqiGood',\n class: 'text-green-600 bg-green-50',\n },\n fair: {\n labelKey: 'weather.aqiFair',\n class: 'text-lime-600 bg-lime-50',\n },\n moderate: {\n labelKey: 'weather.aqiModerate',\n class: 'text-yellow-600 bg-yellow-50',\n },\n poor: {\n labelKey: 'weather.aqiPoor',\n class: 'text-orange-600 bg-orange-50',\n },\n veryPoor: {\n labelKey: 'weather.aqiVeryPoor',\n class: 'text-red-600 bg-red-50',\n },\n hazardous: {\n labelKey: 'weather.aqiHazardous',\n class: 'text-purple-700 bg-purple-50',\n },\n }\n\n /** Returns AQI label and CSS class for European AQI */\n function aqiInfo(aqi: number): { label: string; class: string } {\n const { labelKey, class: cssClass } = AQI_PRESENTATION[aqiBand(aqi).key]\n return { label: $t(labelKey), class: cssClass }\n }\n\n /** Formats wind direction degrees to compass label */\n function windDirectionLabel(deg: number): string {\n const dirs = ['N', 'NE', 'E', 'SE', 'S', 'SO', 'O', 'NO']\n return dirs[Math.round(deg / 45) % 8]\n }\n</script>\n\n<template>\n <div\n v-if=\"isUnavailable\"\n class=\"text-12 text-danger flex items-center gap-6 py-8\">\n <VvIcon name=\"ri:error-warning-line\" class=\"w-16 h-16 shrink-0\" />\n <span>{{ $t('weather.unavailable') }}</span>\n </div>\n <div\n v-else-if=\"data\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <!-- Header -->\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:temp-cold-line\" class=\"text-16\" />\n <strong class=\"font-bold truncate\">\n {{ data.locationName }}\n </strong>\n <span class=\"ml-auto shrink-0 capitalize\">\n {{ headerDate }}\n </span>\n </div>\n\n <!-- Current conditions (only when real-time current is available AND first day is selected) -->\n <div\n v-if=\"data.current && selectedDayIndex === 0\"\n class=\"px-sm py-md flex items-center gap-md flex-wrap\">\n <div class=\"flex items-center gap-8\">\n <VvIcon\n :name=\"wmoToIcon(data.current.weatherCode)\"\n class=\"text-48 text-word-2 shrink-0\" />\n <span class=\"text-48 font-light leading-none text-word-1\">\n {{ $n(data.current.temperature, 'integer') }}&deg;\n </span>\n </div>\n <div class=\"flex flex-col gap-4 text-12 text-word-3\">\n <div class=\"flex items-center gap-6\">\n {{ $t('weather.feelsLike') }}\n {{ $n(data.current.feelsLike, 'integer') }}&deg;\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:water-percent-line\" class=\"text-14\" />\n {{ data.current.humidity }}%\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:windy-line\" class=\"text-14\" />\n {{ $n(data.current.windSpeed, 'integer') }} km/h\n {{ windDirectionLabel(data.current.windDirection) }}\n </div>\n <div\n v-if=\"data.current.uvIndex > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-line\" class=\"text-14\" />\n UV {{ $n(data.current.uvIndex, 'integer') }}\n </div>\n </div>\n </div>\n\n <!-- Day summary (when no real-time current, or a non-today day is selected) -->\n <div\n v-else-if=\"selectedDay\"\n class=\"px-sm py-md flex items-center gap-md flex-wrap\">\n <div class=\"flex items-center gap-8\">\n <VvIcon\n :name=\"wmoToIcon(selectedDay.weatherCode)\"\n class=\"text-48 text-word-2 shrink-0\" />\n <div class=\"flex flex-col leading-none\">\n <span class=\"text-48 font-light text-word-1\">\n {{ $n(selectedDay.maxTemp, 'integer') }}&deg;\n </span>\n <span class=\"text-20 text-word-3\">\n {{ $n(selectedDay.minTemp, 'integer') }}&deg;\n </span>\n </div>\n </div>\n <div class=\"flex flex-col gap-4 text-12 text-word-3\">\n <div\n v-if=\"selectedDay.precipitationProbabilityMax > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:drop-line\" class=\"text-14\" />\n {{ selectedDay.precipitationProbabilityMax }}% ({{\n selectedDay.precipitationSum\n }}\n mm)\n </div>\n <div\n v-if=\"selectedDay.uvIndexMax > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-line\" class=\"text-14\" />\n UV {{ $n(selectedDay.uvIndexMax, 'integer') }}\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-foggy-line\" class=\"text-14\" />\n {{ $d(safeDate(selectedDay.sunrise), 'time') }}\n –\n {{ $d(safeDate(selectedDay.sunset), 'time') }}\n </div>\n </div>\n </div>\n\n <!-- Hourly forecast (filtered to selected day) -->\n <transition>\n <div\n v-if=\"filteredHourly.length > 0\"\n class=\"border-t border-surface-3\">\n <div\n class=\"flex overflow-x-auto gap-2 px-sm py-8 light-scrollbar\">\n <div\n v-for=\"hour in filteredHourly\"\n :key=\"hour.time\"\n class=\"flex flex-col items-center gap-4 min-w-48 px-4 py-6 rounded-xl text-11 text-word-3 shrink-0\">\n <span class=\"text-word-3\">{{\n Number.isNaN(safeDate(hour.time).getTime())\n ? hour.time\n : $d(safeDate(hour.time), 'time')\n }}</span>\n <VvIcon\n :name=\"wmoToIcon(hour.weatherCode)\"\n class=\"text-20 text-word-2\" />\n <span class=\"font-medium text-word-1\">\n {{ $n(hour.temperature, 'integer') }}&deg;\n </span>\n <span\n v-if=\"hour.precipitationProbability > 0\"\n class=\"text-word-5 text-smaller\">\n {{ hour.precipitationProbability }}%\n </span>\n </div>\n </div>\n </div>\n </transition>\n\n <!-- Daily forecast (clickable, inside accordion) -->\n <transition>\n <VvAccordion\n v-if=\"data.daily?.length > 1\"\n v-model=\"dailyOpen\"\n modifiers=\"details no-padding\"\n :title=\"$t('weather.dailyForecast')\"\n class=\"border-t border-surface-3\">\n <button\n v-for=\"(day, index) in data.daily\"\n :key=\"day.date\"\n type=\"button\"\n class=\"flex items-center gap-sm px-sm py-8 text-12 w-full text-left transition-colors cursor-pointer border-t border-surface-3\"\n :class=\"\n index === selectedDayIndex\n ? 'bg-surface-2'\n : 'hover:bg-surface-1'\n \"\n @click=\"selectedDayIndex = index\">\n <span class=\"w-48 shrink-0 text-word-3 capitalize\">\n {{ formatDay(day.date, index, data.daily.length) }}\n </span>\n <VvIcon\n :name=\"wmoToIcon(day.weatherCode)\"\n class=\"text-18 text-word-2 shrink-0\" />\n <span\n v-if=\"day.precipitationProbabilityMax > 0\"\n class=\"text-word-5 text-11 w-32 shrink-0\">\n {{ day.precipitationProbabilityMax }}%\n </span>\n <span v-else class=\"w-32 shrink-0\" />\n <div class=\"ml-auto flex items-center gap-8 text-word-3\">\n <span class=\"text-word-1 font-semibold\">\n {{ $n(day.maxTemp, 'integer') }}&deg;\n </span>\n <span>{{ $n(day.minTemp, 'integer') }}&deg;</span>\n </div>\n </button>\n </VvAccordion>\n </transition>\n\n <!-- Air quality -->\n <div\n v-if=\"data.airQuality\"\n class=\"border-t border-surface-3 px-sm py-8 flex items-center gap-8 text-12\">\n <VvIcon name=\"ri:windy-line\" class=\"text-14 text-word-3\" />\n <span class=\"text-word-3\">{{ $t('weather.airQuality') }}</span>\n <span\n :class=\"[\n 'ml-auto px-8 py-2 text-11 font-semibold',\n aqiInfo(data.airQuality.aqi).class,\n ]\">\n {{ aqiInfo(data.airQuality.aqi).label }}\n ({{ data.airQuality.aqi }})\n </span>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { hasWeatherForecast } from 'models'\n import {\n aqiBand,\n wmoCategory,\n type AqiBandKey,\n type WmoCategory,\n } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { t: $t, d: $d, n: $n } = useI18n({ useScope: 'global' })\n\n const toolPart = computed(() => {\n return props.part as {\n state?: string\n input?: unknown\n output?: unknown\n }\n })\n\n const data = computed(() => {\n const { output, input } = toolPart.value\n if (hasWeatherForecast(output)) {\n return output\n }\n // Conversations from before `weatherKey` passed the whole forecast\n return hasWeatherForecast(input) ? input : null\n })\n\n /**\n * The call is over and left nothing to draw: a mangled or expired key\n * fails the tool, and its input is only the key. Without this the card\n * drew a thermometer and \"Oggi\" around nothing. While the call runs there\n * is nothing to draw yet, and nothing has failed either: the card waits.\n */\n const isUnavailable = computed(\n () =>\n !data.value &&\n toolPart.value.state !== 'input-streaming' &&\n toolPart.value.state !== 'input-available',\n )\n\n const selectedDayIndex = ref(0)\n\n const dailyOpen = ref(!data.value?.current)\n\n watch(selectedDayIndex, (index) => {\n if (index > 0) {\n dailyOpen.value = true\n }\n })\n\n const selectedDay = computed(\n () => data.value?.daily?.[selectedDayIndex.value],\n )\n\n /** Hourly entries filtered to the selected day's date */\n const filteredHourly = computed(() => {\n if (!data.value?.hourly?.length || !selectedDay.value) {\n return data.value?.hourly ?? []\n }\n const dayDate = selectedDay.value.date\n return data.value.hourly.filter((h) => h.time.startsWith(dayDate))\n })\n\n /**\n * Parses a date/time string in various formats the LLM might produce.\n * Tries ISO, space-separated, time-only, and common human-readable formats.\n */\n function safeDate(value: string): Date {\n // 1. Try native parsing (works for ISO 8601 and many standard formats)\n const direct = new Date(value)\n if (!Number.isNaN(direct.getTime())) {\n return direct\n }\n\n // 2. Replace space separator → T (\"2024-04-15 14:00\" → \"2024-04-15T14:00\")\n if (/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}/.test(value)) {\n const withT = new Date(value.replace(' ', 'T'))\n if (!Number.isNaN(withT.getTime())) {\n return withT\n }\n }\n\n // 3. Time-only (\"14:00\" or \"14:00:00\") → today at that hour\n const timeOnly = value.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/)\n if (timeOnly) {\n const today = new Date()\n today.setHours(\n Number(timeOnly[1]),\n Number(timeOnly[2]),\n Number(timeOnly[3] ?? 0),\n 0,\n )\n return today\n }\n\n // 4. Date-only (\"2024-04-15\") → noon to avoid timezone edge\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) {\n const noon = new Date(value + 'T12:00:00')\n if (!Number.isNaN(noon.getTime())) {\n return noon\n }\n }\n\n // Last resort: return an obviously invalid sentinel so callers can handle it\n return new Date(NaN)\n }\n\n /** Iconify `wi:` icon per canonical WMO category. */\n const WMO_ICON: Record<WmoCategory, string> = {\n clear: 'wi:day-sunny',\n mainlyClear: 'wi:day-sunny-overcast',\n partlyCloudy: 'wi:day-cloudy',\n overcast: 'wi:cloudy',\n fog: 'wi:fog',\n drizzle: 'wi:sprinkle',\n freezingDrizzle: 'wi:sleet',\n rain: 'wi:rain',\n freezingRain: 'wi:rain-mix',\n snow: 'wi:snow',\n rainShowers: 'wi:showers',\n snowShowers: 'wi:snow-wind',\n thunderstorm: 'wi:thunderstorm',\n thunderstormHail: 'wi:storm-showers',\n unknown: 'wi:na',\n }\n\n /** Maps WMO weather code to an Iconify wi: icon name */\n function wmoToIcon(code: number): string {\n return WMO_ICON[wmoCategory(code)]\n }\n\n /**\n * Returns a formatted day label for daily forecast.\n * When daily has 1-2 entries, use the date string directly.\n * Otherwise, use index-based computation from today.\n */\n function formatDay(isoDate: string, index: number, total: number): string {\n const parsed = safeDate(isoDate + 'T12:00:00')\n if (!Number.isNaN(parsed.getTime())) {\n const today = new Date()\n today.setHours(12, 0, 0, 0)\n const diffDays = Math.round(\n (parsed.getTime() - today.getTime()) / 86_400_000,\n )\n if (diffDays === 0) {\n return $t('weather.today')\n }\n return $d(parsed, 'weekday-day')\n }\n if (index === 0 && total <= 7) {\n return $t('weather.today')\n }\n const fallback = new Date()\n fallback.setDate(fallback.getDate() + index)\n return $d(fallback, 'weekday-day')\n }\n\n const headerDate = computed(() => {\n if (selectedDay.value) {\n const parsed = safeDate(selectedDay.value.date + 'T12:00:00')\n if (!Number.isNaN(parsed.getTime())) {\n return formatDay(\n selectedDay.value.date,\n selectedDayIndex.value,\n data.value?.daily?.length ?? 1,\n )\n }\n }\n return formatDay(new Date().toISOString().slice(0, 10), 0, 1)\n })\n\n /** i18n label key + CSS class per canonical AQI band. */\n const AQI_PRESENTATION: Record<\n AqiBandKey,\n { labelKey: string; class: string }\n > = {\n good: {\n labelKey: 'weather.aqiGood',\n class: 'text-green-600 bg-green-50',\n },\n fair: {\n labelKey: 'weather.aqiFair',\n class: 'text-lime-600 bg-lime-50',\n },\n moderate: {\n labelKey: 'weather.aqiModerate',\n class: 'text-yellow-600 bg-yellow-50',\n },\n poor: {\n labelKey: 'weather.aqiPoor',\n class: 'text-orange-600 bg-orange-50',\n },\n veryPoor: {\n labelKey: 'weather.aqiVeryPoor',\n class: 'text-red-600 bg-red-50',\n },\n hazardous: {\n labelKey: 'weather.aqiHazardous',\n class: 'text-purple-700 bg-purple-50',\n },\n }\n\n /** Returns AQI label and CSS class for European AQI */\n function aqiInfo(aqi: number): { label: string; class: string } {\n const { labelKey, class: cssClass } = AQI_PRESENTATION[aqiBand(aqi).key]\n return { label: $t(labelKey), class: cssClass }\n }\n\n /** Formats wind direction degrees to compass label */\n function windDirectionLabel(deg: number): string {\n const dirs = ['N', 'NE', 'E', 'SE', 'S', 'SO', 'O', 'NO']\n return dirs[Math.round(deg / 45) % 8]\n }\n</script>\n\n<template>\n <div\n v-if=\"isUnavailable\"\n class=\"text-12 text-danger flex items-center gap-6 py-8\">\n <VvIcon name=\"ri:error-warning-line\" class=\"w-16 h-16 shrink-0\" />\n <span>{{ $t('weather.unavailable') }}</span>\n </div>\n <div\n v-else-if=\"data\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <!-- Header -->\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:temp-cold-line\" class=\"text-16\" />\n <strong class=\"font-bold truncate\">\n {{ data.locationName }}\n </strong>\n <span class=\"ml-auto shrink-0 capitalize\">\n {{ headerDate }}\n </span>\n </div>\n\n <!-- Current conditions (only when real-time current is available AND first day is selected) -->\n <div\n v-if=\"data.current && selectedDayIndex === 0\"\n class=\"px-sm py-md flex items-center gap-md flex-wrap\">\n <div class=\"flex items-center gap-8\">\n <VvIcon\n :name=\"wmoToIcon(data.current.weatherCode)\"\n class=\"text-48 text-word-2 shrink-0\" />\n <span class=\"text-48 font-light leading-none text-word-1\">\n {{ $n(data.current.temperature, 'integer') }}&deg;\n </span>\n </div>\n <div class=\"flex flex-col gap-4 text-12 text-word-3\">\n <div class=\"flex items-center gap-6\">\n {{ $t('weather.feelsLike') }}\n {{ $n(data.current.feelsLike, 'integer') }}&deg;\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:water-percent-line\" class=\"text-14\" />\n {{ data.current.humidity }}%\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:windy-line\" class=\"text-14\" />\n {{ $n(data.current.windSpeed, 'integer') }} km/h\n {{ windDirectionLabel(data.current.windDirection) }}\n </div>\n <div\n v-if=\"data.current.uvIndex > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-line\" class=\"text-14\" />\n UV {{ $n(data.current.uvIndex, 'integer') }}\n </div>\n </div>\n </div>\n\n <!-- Day summary (when no real-time current, or a non-today day is selected) -->\n <div\n v-else-if=\"selectedDay\"\n class=\"px-sm py-md flex items-center gap-md flex-wrap\">\n <div class=\"flex items-center gap-8\">\n <VvIcon\n :name=\"wmoToIcon(selectedDay.weatherCode)\"\n class=\"text-48 text-word-2 shrink-0\" />\n <div class=\"flex flex-col leading-none\">\n <span class=\"text-48 font-light text-word-1\">\n {{ $n(selectedDay.maxTemp, 'integer') }}&deg;\n </span>\n <span class=\"text-20 text-word-3\">\n {{ $n(selectedDay.minTemp, 'integer') }}&deg;\n </span>\n </div>\n </div>\n <div class=\"flex flex-col gap-4 text-12 text-word-3\">\n <div\n v-if=\"selectedDay.precipitationProbabilityMax > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:drop-line\" class=\"text-14\" />\n {{ selectedDay.precipitationProbabilityMax }}% ({{\n selectedDay.precipitationSum\n }}\n mm)\n </div>\n <div\n v-if=\"selectedDay.uvIndexMax > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-line\" class=\"text-14\" />\n UV {{ $n(selectedDay.uvIndexMax, 'integer') }}\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-foggy-line\" class=\"text-14\" />\n {{ $d(safeDate(selectedDay.sunrise), 'time') }}\n –\n {{ $d(safeDate(selectedDay.sunset), 'time') }}\n </div>\n </div>\n </div>\n\n <!-- Hourly forecast (filtered to selected day) -->\n <transition>\n <div\n v-if=\"filteredHourly.length > 0\"\n class=\"border-t border-surface-3\">\n <div\n class=\"flex overflow-x-auto gap-2 px-sm py-8 light-scrollbar\">\n <div\n v-for=\"hour in filteredHourly\"\n :key=\"hour.time\"\n class=\"flex flex-col items-center gap-4 min-w-48 px-4 py-6 rounded-xl text-11 text-word-3 shrink-0\">\n <span class=\"text-word-3\">{{\n Number.isNaN(safeDate(hour.time).getTime())\n ? hour.time\n : $d(safeDate(hour.time), 'time')\n }}</span>\n <VvIcon\n :name=\"wmoToIcon(hour.weatherCode)\"\n class=\"text-20 text-word-2\" />\n <span class=\"font-medium text-word-1\">\n {{ $n(hour.temperature, 'integer') }}&deg;\n </span>\n <span\n v-if=\"hour.precipitationProbability > 0\"\n class=\"text-word-5 text-smaller\">\n {{ hour.precipitationProbability }}%\n </span>\n </div>\n </div>\n </div>\n </transition>\n\n <!-- Daily forecast (clickable, inside accordion) -->\n <transition>\n <VvAccordion\n v-if=\"data.daily?.length > 1\"\n v-model=\"dailyOpen\"\n modifiers=\"details no-padding\"\n :title=\"$t('weather.dailyForecast')\"\n class=\"border-t border-surface-3\">\n <button\n v-for=\"(day, index) in data.daily\"\n :key=\"day.date\"\n type=\"button\"\n class=\"flex items-center gap-sm px-sm py-8 text-12 w-full text-left transition-colors cursor-pointer border-t border-surface-3\"\n :class=\"\n index === selectedDayIndex\n ? 'bg-surface-2'\n : 'hover:bg-surface-1'\n \"\n @click=\"selectedDayIndex = index\">\n <span class=\"w-48 shrink-0 text-word-3 capitalize\">\n {{ formatDay(day.date, index, data.daily.length) }}\n </span>\n <VvIcon\n :name=\"wmoToIcon(day.weatherCode)\"\n class=\"text-18 text-word-2 shrink-0\" />\n <span\n v-if=\"day.precipitationProbabilityMax > 0\"\n class=\"text-word-5 text-11 w-32 shrink-0\">\n {{ day.precipitationProbabilityMax }}%\n </span>\n <span v-else class=\"w-32 shrink-0\" />\n <div class=\"ml-auto flex items-center gap-8 text-word-3\">\n <span class=\"text-word-1 font-semibold\">\n {{ $n(day.maxTemp, 'integer') }}&deg;\n </span>\n <span>{{ $n(day.minTemp, 'integer') }}&deg;</span>\n </div>\n </button>\n </VvAccordion>\n </transition>\n\n <!-- Air quality -->\n <div\n v-if=\"data.airQuality\"\n class=\"border-t border-surface-3 px-sm py-8 flex items-center gap-8 text-12\">\n <VvIcon name=\"ri:windy-line\" class=\"text-14 text-word-3\" />\n <span class=\"text-word-3\">{{ $t('weather.airQuality') }}</span>\n <span\n :class=\"[\n 'ml-auto px-8 py-2 text-11 font-semibold',\n aqiInfo(data.airQuality.aqi).class,\n ]\">\n {{ aqiInfo(data.airQuality.aqi).label }}\n ({{ data.airQuality.aqi }})\n </span>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;AAQA,IAAMiD,IAAuBjD,EAAS;CAClC,aAAaC,EAAS,CAAC,CAAC,SAAS,mBAAmB;CACpD,WAAWA,EAAS,CAAC,CAAC,SAAS,4BAA4B;CAC3D,UAAUA,EAAS,CAAC,CAAC,SAAS,wBAAwB;CACtD,eAAeA,EAAS,CAAC,CAAC,SAAS,qBAAqB;CACxD,aAAaA,EAAS,CAAC,CAAC,SAAS,iCAAiC;CAClE,WAAWA,EAAS,CAAC,CAAC,SAAS,oBAAoB;CACnD,eAAeA,EAAS,CAAC,CAAC,SAAS,2BAA2B;CAC9D,SAASA,EAAS,CAAC,CAAC,SAAS,UAAU;AAC3C,CAAC,GAEKiD,IAAsBlD,EAAS;CACjC,MAAME,EAAS;CACf,aAAaD,EAAS;CACtB,0BAA0BA,EAAS;CACnC,eAA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AAUkB,EAAI,MAAM/B,GAAON,EAAA,MAAK,MAAM,MAAM,CAAA,GAAA,CAAA;OAEnDhG,EAE2C+H,GAAA;QADtC,MAAMb,EAAUmB,EAAI,WAAW;QAChC,OAAM;;OAEAA,EAAI,8BAA2B,KADzCvI,EAAA,GAAAC,EAIO,QAJPoF,IAIOjF,EADAmI,EAAI,2BAA2B,IAAG,MACzC,CAAA,MACAvI,EAAA,GAAAC,EAAqC,QAArCqF,EAAqC;OACrCnF,EAKM,OALNoF,GAKM,CAJFpF,EAEO,QAFPqF,IAEOpF,EADAC,EAAA2F,CAAA,CAAE,CAACuC,EAAI,SAAO,SAAA,CAAA,IAAe,MACpC,CAAA,GACApI,EAAkD,QAAA,MAAAC,EAAzCC,EAAA2F,CAAA,CAAE,CAACuC,EAAI,SAAO,SAAA,CAAA,IAAe,KAAK,CAAA,CAAA,CAAA;;;;;;IAQjDrC,EAAA,MAAK,cADflG,EAAA,GAAAC,EAaM,OAbNwF,IAaM;KAVFvF,EAA2D+H,GAAA;MAAnD,MAAK;MAAgB,OAAM;;KACnC9H,EAA+D,QAA/DuF,IAA+DtF,EAAlCC,EAAAyF,CAAA,CAAE,CAAA,oBAAA,CAAA,GAAA,CAAA;KAC/B3F,EAOO,QAAA,EANF,OAAKU,EAAA,CAAA,2CAAuF+G,EAAQ1B,EAAA,MAAK,WAAW,GAAG,CAAA,CAAE,KAAA,CAAA,EAIvH,GAAA9F,EAAAwH,EAAQ1B,EAAA,MAAK,WAAW,GAAG,CAAA,CAAE,KAAK,IAAG,OACvC9F,EAAG8F,EAAA,MAAK,WAAW,GAAG,IAAG,MAC9B,CAAA"}
@@ -1922,7 +1922,8 @@ var Kn = {
1922
1922
  aqiVeryPoor: "Molto scarsa",
1923
1923
  dailyForecast: "Previsioni giornaliere",
1924
1924
  feelsLike: "Percepita",
1925
- today: "Oggi"
1925
+ today: "Oggi",
1926
+ unavailable: "Le previsioni meteo non sono disponibili."
1926
1927
  },
1927
1928
  unsubscribe: {
1928
1929
  title: "Disiscriviti dalle mail",
@@ -3565,7 +3566,8 @@ var Kn = {
3565
3566
  aqiVeryPoor: "Very poor",
3566
3567
  dailyForecast: "Daily forecast",
3567
3568
  feelsLike: "Feels like",
3568
- today: "Today"
3569
+ today: "Today",
3570
+ unavailable: "The weather forecast is not available."
3569
3571
  },
3570
3572
  unsubscribe: {
3571
3573
  title: "Unsubscribe from these emails",
@@ -11960,7 +11962,7 @@ var dm = {
11960
11962
  showSources: M(() => import("./_chunks/PkToolShowSources-BJ-XFrLD.js")),
11961
11963
  showSuggestedReply: M(() => import("./_chunks/PkToolShowSuggestedReply-0KahUIlw.js")),
11962
11964
  showVideo: M(() => import("./_chunks/PkToolShowVideo-_V_d-PDr.js")),
11963
- showWeather: M(() => import("./_chunks/PkToolShowWeather-BFOlS1AS.js")),
11965
+ showWeather: M(() => import("./_chunks/PkToolShowWeather-DfLsFayn.js")),
11964
11966
  showWebPages: M(() => import("./_chunks/PkToolShowWebPages-D55VEPjK.js"))
11965
11967
  };
11966
11968
  //#endregion