@idmui/spot 0.5.5 → 0.5.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.
- package/dist/index.js +367 -367
- package/dist/index.umd.cjs +11 -11
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import M from "moment";
|
|
2
|
-
import
|
|
2
|
+
import X from "moment-timezone";
|
|
3
3
|
import { ArrowRightBold as Ze, Calendar as Ve, Search as _e } from "@element-plus/icons-vue";
|
|
4
4
|
import { LngLatHelper as Se } from "@idm-plugin/geo";
|
|
5
5
|
import * as xe from "echarts";
|
|
6
|
-
import { markRaw as $e, resolveComponent as Ie, openBlock as n, createElementBlock as
|
|
6
|
+
import { markRaw as $e, resolveComponent as Ie, openBlock as n, createElementBlock as l, createElementVNode as s, createVNode as be, withCtx as Le, Fragment as me, renderList as ue, createBlock as Ge, normalizeClass as we, toDisplayString as p, createTextVNode as ne, createCommentVNode as Qe, withDirectives as Fe, vShow as Oe, normalizeStyle as Ce } from "vue";
|
|
7
7
|
import ze from "axios";
|
|
8
8
|
class ke {
|
|
9
9
|
static pickHourly(e, a) {
|
|
10
|
-
var r, t, h, f, b, k,
|
|
11
|
-
const u = typeof a == "string" ? M(a) : a, K = e == null ? void 0 : e.weather, D = e == null ? void 0 : e.marine, De = M((t = (r = K == null ? void 0 : K[0]) == null ? void 0 : r.hourly) == null ? void 0 : t.date).utc(), H = De.clone().add((b = (f = (h = K == null ? void 0 : K[0]) == null ? void 0 : h.hourly) == null ? void 0 : f.time) == null ? void 0 : b.at(0), "h"), oe = De.clone().add((
|
|
10
|
+
var r, t, h, f, b, k, E, S, Y, U, O, se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C, I, y, he, de, Ae, g, pe, x, Q, T, ce, A, G, ie, v, re, j, d;
|
|
11
|
+
const u = typeof a == "string" ? M(a) : a, K = e == null ? void 0 : e.weather, D = e == null ? void 0 : e.marine, De = M((t = (r = K == null ? void 0 : K[0]) == null ? void 0 : r.hourly) == null ? void 0 : t.date).utc(), H = De.clone().add((b = (f = (h = K == null ? void 0 : K[0]) == null ? void 0 : h.hourly) == null ? void 0 : f.time) == null ? void 0 : b.at(0), "h"), oe = De.clone().add((S = (E = (k = K == null ? void 0 : K[0]) == null ? void 0 : k.hourly) == null ? void 0 : E.time) == null ? void 0 : S.at(-1), "h"), fe = [];
|
|
12
12
|
if (u.isBetween(H, oe, "millisecond", "[]")) {
|
|
13
13
|
const B = u.utc().diff(H, "h", !1);
|
|
14
14
|
let i, w;
|
|
15
15
|
if (K) {
|
|
16
16
|
let ve = 0, Me = 0;
|
|
17
|
-
for (const
|
|
18
|
-
const ye =
|
|
17
|
+
for (const ge of K) {
|
|
18
|
+
const ye = ge.hourly;
|
|
19
19
|
for (let Ee = B - (B - 1) % 3; Ee <= B; Ee++)
|
|
20
|
-
ve += (
|
|
20
|
+
ve += (Y = ye.precipitation) == null ? void 0 : Y.at(Ee);
|
|
21
21
|
for (let Ee = B - (B - 1) % 6; Ee <= B; Ee++)
|
|
22
22
|
Me += (U = ye.precipitation) == null ? void 0 : U.at(Ee);
|
|
23
23
|
i = {
|
|
24
|
-
temp: (
|
|
25
|
-
apparentTemp: (
|
|
26
|
-
rh: (
|
|
24
|
+
temp: (O = ye.temperature_2m) == null ? void 0 : O.at(B),
|
|
25
|
+
apparentTemp: (se = ye.apparent_temperature) == null ? void 0 : se.at(B),
|
|
26
|
+
rh: (ae = ye.relative_humidity_2m) == null ? void 0 : ae.at(B),
|
|
27
27
|
dp: (le = ye.dew_point_2m) == null ? void 0 : le.at(B),
|
|
28
28
|
precip: {
|
|
29
|
-
probability: (
|
|
29
|
+
probability: (F = ye.precipitation_probability) == null ? void 0 : F.at(B),
|
|
30
30
|
sum: (R = ye.precipitation) == null ? void 0 : R.at(B),
|
|
31
31
|
sum3Hours: Math.round(ve * 100) / 100,
|
|
32
32
|
sum6Hours: Math.round(Me * 100) / 100
|
|
33
33
|
},
|
|
34
|
-
pmsl: (
|
|
35
|
-
psurf: (
|
|
36
|
-
code: (
|
|
37
|
-
visibility: this.m2nm((
|
|
34
|
+
pmsl: (W = ye.pressure_msl) == null ? void 0 : W.at(B),
|
|
35
|
+
psurf: (J = ye.surface_pressure) == null ? void 0 : J.at(B),
|
|
36
|
+
code: (q = ye.weather_code) == null ? void 0 : q.at(B),
|
|
37
|
+
visibility: this.m2nm((Z = ye.visibility) == null ? void 0 : Z.at(B)),
|
|
38
38
|
wind: {
|
|
39
|
-
speed: (
|
|
40
|
-
kts: (
|
|
41
|
-
degree: (
|
|
42
|
-
bearing: ((
|
|
39
|
+
speed: (V = ye.wind_speed_10m) == null ? void 0 : V.at(B),
|
|
40
|
+
kts: (_ = ye.wind_speed_10m) == null ? void 0 : _.at(B),
|
|
41
|
+
degree: ($ = ye.wind_direction_10m) == null ? void 0 : $.at(B),
|
|
42
|
+
bearing: ((ee = ye.wind_direction_10m) == null ? void 0 : ee.at(B)) !== null ? (((te = ye.wind_direction_10m) == null ? void 0 : te.at(B)) + 180) % 360 : null,
|
|
43
43
|
gusts: (c = ye.wind_gusts_10m) == null ? void 0 : c.at(B)
|
|
44
44
|
},
|
|
45
45
|
isDay: (N = ye.is_day) == null ? void 0 : N.at(B)
|
|
@@ -47,7 +47,7 @@ class ke {
|
|
|
47
47
|
const { name: Pe, url: Ne, bg: Te } = this.parseWeatherCode(i.code, i.isDay);
|
|
48
48
|
i.name = Pe, i.url = Ne, i.bg = Te, i.wind.scale = this.beaufort(this.kts2ms(i.wind.kts)), i.wind.direction = this.degree2Direction(i.wind.degree), fe.push({
|
|
49
49
|
utc: H.add(B, "h").format(),
|
|
50
|
-
model:
|
|
50
|
+
model: ge.model,
|
|
51
51
|
weather: { ...i }
|
|
52
52
|
});
|
|
53
53
|
}
|
|
@@ -55,38 +55,38 @@ class ke {
|
|
|
55
55
|
if (D) {
|
|
56
56
|
let ve = 0;
|
|
57
57
|
for (const Me of D) {
|
|
58
|
-
const
|
|
58
|
+
const ge = Me.hourly;
|
|
59
59
|
w = {
|
|
60
60
|
wave: {
|
|
61
61
|
sig: {
|
|
62
|
-
height: (z =
|
|
63
|
-
degree: (L =
|
|
64
|
-
bearing: ((m =
|
|
65
|
-
period: (C =
|
|
62
|
+
height: (z = ge.wave_height) == null ? void 0 : z.at(B),
|
|
63
|
+
degree: (L = ge.wave_direction) == null ? void 0 : L.at(B),
|
|
64
|
+
bearing: ((m = ge.wave_direction) == null ? void 0 : m.at(B)) !== null ? (((P = ge.wave_direction) == null ? void 0 : P.at(B)) + 180) % 360 : null,
|
|
65
|
+
period: (C = ge.wave_period) == null ? void 0 : C.at(B)
|
|
66
66
|
},
|
|
67
67
|
swell: {
|
|
68
|
-
height: (I =
|
|
69
|
-
degree: (y =
|
|
70
|
-
bearing: ((
|
|
71
|
-
period: (Ae =
|
|
72
|
-
peakPeriod: (g =
|
|
68
|
+
height: (I = ge.swell_wave_height) == null ? void 0 : I.at(B),
|
|
69
|
+
degree: (y = ge.swell_wave_direction) == null ? void 0 : y.at(B),
|
|
70
|
+
bearing: ((he = ge.swell_wave_direction) == null ? void 0 : he.at(B)) !== null ? (((de = ge.swell_wave_direction) == null ? void 0 : de.at(B)) + 180) % 360 : null,
|
|
71
|
+
period: (Ae = ge.swell_wave_period) == null ? void 0 : Ae.at(B),
|
|
72
|
+
peakPeriod: (g = ge.swell_wave_peak_period) == null ? void 0 : g.at(B)
|
|
73
73
|
},
|
|
74
74
|
wd: {
|
|
75
|
-
height: (pe =
|
|
76
|
-
degree: (x =
|
|
77
|
-
bearing: ((
|
|
78
|
-
period: (
|
|
79
|
-
peakPeriod: (
|
|
75
|
+
height: (pe = ge.wind_wave_height) == null ? void 0 : pe.at(B),
|
|
76
|
+
degree: (x = ge.wind_wave_direction) == null ? void 0 : x.at(B),
|
|
77
|
+
bearing: ((Q = ge.wind_wave_direction) == null ? void 0 : Q.at(B)) !== null ? (((T = ge.wind_wave_direction) == null ? void 0 : T.at(B)) + 180) % 360 : null,
|
|
78
|
+
period: (ce = ge.wind_wave_period) == null ? void 0 : ce.at(B),
|
|
79
|
+
peakPeriod: (A = ge.wind_wave_peak_period) == null ? void 0 : A.at(B)
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
current: {
|
|
83
|
-
speed: (
|
|
84
|
-
kts: (
|
|
85
|
-
degree: (v =
|
|
86
|
-
bearing: ((re =
|
|
83
|
+
speed: (G = ge.ocean_current_velocity) == null ? void 0 : G.at(B),
|
|
84
|
+
kts: (ie = ge.ocean_current_velocity) == null ? void 0 : ie.at(B),
|
|
85
|
+
degree: (v = ge.ocean_current_direction) == null ? void 0 : v.at(B),
|
|
86
|
+
bearing: ((re = ge.ocean_current_direction) == null ? void 0 : re.at(B)) ?? null
|
|
87
87
|
},
|
|
88
|
-
sst: (j =
|
|
89
|
-
height: (d =
|
|
88
|
+
sst: (j = ge.sea_surface_temperature) == null ? void 0 : j.at(B),
|
|
89
|
+
height: (d = ge.sea_level_height_msl) == null ? void 0 : d.at(B)
|
|
90
90
|
}, w.wave = this.parseWave(w.wave), w.current.direction = this.degree2Direction(w.current.degree), Object.assign(fe[ve], w), ve++;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -94,7 +94,7 @@ class ke {
|
|
|
94
94
|
return fe;
|
|
95
95
|
}
|
|
96
96
|
static toLegacy(e) {
|
|
97
|
-
var a, r, t, h, f, b, k,
|
|
97
|
+
var a, r, t, h, f, b, k, E, S, Y;
|
|
98
98
|
return {
|
|
99
99
|
wind: (a = e == null ? void 0 : e.weather) == null ? void 0 : a.wind,
|
|
100
100
|
visibility: (r = e == null ? void 0 : e.weather) == null ? void 0 : r.visibility,
|
|
@@ -104,9 +104,9 @@ class ke {
|
|
|
104
104
|
kts: (b = (f = e == null ? void 0 : e.weather) == null ? void 0 : f.wind) == null ? void 0 : b.gusts
|
|
105
105
|
},
|
|
106
106
|
precip: (k = e == null ? void 0 : e.weather) == null ? void 0 : k.precip,
|
|
107
|
-
code: (
|
|
108
|
-
name: (
|
|
109
|
-
url: (
|
|
107
|
+
code: (E = e == null ? void 0 : e.weather) == null ? void 0 : E.code,
|
|
108
|
+
name: (S = e == null ? void 0 : e.weather) == null ? void 0 : S.name,
|
|
109
|
+
url: (Y = e == null ? void 0 : e.weather) == null ? void 0 : Y.url,
|
|
110
110
|
wave: e == null ? void 0 : e.wave,
|
|
111
111
|
current: e == null ? void 0 : e.current,
|
|
112
112
|
sst: e == null ? void 0 : e.sst,
|
|
@@ -116,43 +116,43 @@ class ke {
|
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
static pickDaily(e, a) {
|
|
119
|
-
var r, t, h, f, b, k,
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
119
|
+
var r, t, h, f, b, k, E, S, Y, U, O, se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C, I, y, he, de, Ae, g, pe, x, Q, T, ce, A;
|
|
120
|
+
const G = typeof a == "string" ? M(a) : a, ie = e == null ? void 0 : e.weather, v = e == null ? void 0 : e.marine, re = M((h = (t = (r = ie == null ? void 0 : ie[0]) == null ? void 0 : r.daily) == null ? void 0 : t.time) == null ? void 0 : h.at(0)), j = M((k = (b = (f = ie == null ? void 0 : ie[0]) == null ? void 0 : f.daily) == null ? void 0 : b.time) == null ? void 0 : k.at(-1)), d = [];
|
|
121
|
+
if (G.isBetween(re, j, "millisecond", "[]")) {
|
|
122
122
|
let u, K;
|
|
123
|
-
const D =
|
|
124
|
-
if (
|
|
125
|
-
for (const De of
|
|
123
|
+
const D = G.diff(re, "d", !1);
|
|
124
|
+
if (ie)
|
|
125
|
+
for (const De of ie) {
|
|
126
126
|
const H = De.daily;
|
|
127
127
|
u = {
|
|
128
|
-
code: (
|
|
128
|
+
code: (E = H.weather_code) == null ? void 0 : E.at(D),
|
|
129
129
|
temp: {
|
|
130
|
-
max: (
|
|
131
|
-
min: (
|
|
130
|
+
max: (S = H.temperature_2m_max) == null ? void 0 : S.at(D),
|
|
131
|
+
min: (Y = H.temperature_2m_min) == null ? void 0 : Y.at(D),
|
|
132
132
|
mean: (U = H.temperature_2m_mean) == null ? void 0 : U.at(D)
|
|
133
133
|
},
|
|
134
134
|
apparentTemp: {
|
|
135
|
-
max: (
|
|
136
|
-
min: (
|
|
135
|
+
max: (O = H.apparent_temperature_max) == null ? void 0 : O.at(D),
|
|
136
|
+
min: (se = H.apparent_temperature_min) == null ? void 0 : se.at(D)
|
|
137
137
|
},
|
|
138
138
|
precip: {
|
|
139
|
-
sum: (
|
|
139
|
+
sum: (ae = H.precipitation_sum) == null ? void 0 : ae.at(D),
|
|
140
140
|
rainSum: (le = H.rain_sum) == null ? void 0 : le.at(D),
|
|
141
|
-
snowfallSum: (
|
|
141
|
+
snowfallSum: (F = H.snowfall_sum) == null ? void 0 : F.at(D),
|
|
142
142
|
showersSum: (R = H.showers_sum) == null ? void 0 : R.at(D),
|
|
143
|
-
hours: (
|
|
144
|
-
probability: (
|
|
143
|
+
hours: (W = H.precipitation_hours) == null ? void 0 : W.at(D),
|
|
144
|
+
probability: (J = H.precipitation_probability_max) == null ? void 0 : J.at(D)
|
|
145
145
|
},
|
|
146
146
|
rh: {
|
|
147
|
-
max: (
|
|
148
|
-
min: (
|
|
149
|
-
mean: (
|
|
147
|
+
max: (q = H.relative_humidity_2m_max) == null ? void 0 : q.at(D),
|
|
148
|
+
min: (Z = H.relative_humidity_2m_min) == null ? void 0 : Z.at(D),
|
|
149
|
+
mean: (V = H.relative_humidity_2m_mean) == null ? void 0 : V.at(D)
|
|
150
150
|
},
|
|
151
151
|
wind: {
|
|
152
|
-
speed: (
|
|
153
|
-
kts: (
|
|
154
|
-
degree: (
|
|
155
|
-
gusts: (
|
|
152
|
+
speed: (_ = H.wind_speed_10m_max) == null ? void 0 : _.at(D),
|
|
153
|
+
kts: ($ = H.wind_speed_10m_max) == null ? void 0 : $.at(D),
|
|
154
|
+
degree: (ee = H.wind_direction_10m_dominant) == null ? void 0 : ee.at(D),
|
|
155
|
+
gusts: (te = H.wind_gusts_10m_max) == null ? void 0 : te.at(D),
|
|
156
156
|
bearing: ((c = H.wind_direction_10m_dominant) == null ? void 0 : c.at(D)) !== null ? (((N = H.wind_direction_10m_dominant) == null ? void 0 : N.at(D)) + 180) % 360 : null
|
|
157
157
|
}
|
|
158
158
|
};
|
|
@@ -178,16 +178,16 @@ class ke {
|
|
|
178
178
|
swell: {
|
|
179
179
|
height: (I = oe.swell_wave_height_max) == null ? void 0 : I.at(D),
|
|
180
180
|
degree: (y = oe.swell_wave_direction_dominant) == null ? void 0 : y.at(D),
|
|
181
|
-
period: (
|
|
182
|
-
peakPeriod: (
|
|
181
|
+
period: (he = oe.swell_wave_period_max) == null ? void 0 : he.at(D),
|
|
182
|
+
peakPeriod: (de = oe.swell_wave_peak_period_max) == null ? void 0 : de.at(D),
|
|
183
183
|
bearing: ((Ae = oe.swell_wave_direction_dominant) == null ? void 0 : Ae.at(D)) !== null ? (((g = oe.swell_wave_direction_dominant) == null ? void 0 : g.at(D)) + 180) % 360 : null
|
|
184
184
|
},
|
|
185
185
|
wd: {
|
|
186
186
|
height: (pe = oe.wind_wave_height_max) == null ? void 0 : pe.at(D),
|
|
187
187
|
degree: (x = oe.wind_wave_direction_dominant) == null ? void 0 : x.at(D),
|
|
188
|
-
period: (
|
|
189
|
-
peakPeriod: (
|
|
190
|
-
bearing: ((
|
|
188
|
+
period: (Q = oe.wind_wave_period_max) == null ? void 0 : Q.at(D),
|
|
189
|
+
peakPeriod: (T = oe.wind_wave_peak_period_max) == null ? void 0 : T.at(D),
|
|
190
|
+
bearing: ((ce = oe.wind_wave_direction_dominant) == null ? void 0 : ce.at(D)) !== null ? (((A = oe.wind_wave_direction_dominant) == null ? void 0 : A.at(D)) + 180) % 360 : null
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}, K.wave = this.parseWave(K.wave), Object.assign(d[De], K), De++;
|
|
@@ -646,7 +646,7 @@ const et = (o, e) => {
|
|
|
646
646
|
computeHourLT() {
|
|
647
647
|
return function(o) {
|
|
648
648
|
if (o) {
|
|
649
|
-
const e =
|
|
649
|
+
const e = X(o).tz(this.positionGmt);
|
|
650
650
|
return `${e == null ? void 0 : e.format("HH")}`;
|
|
651
651
|
}
|
|
652
652
|
return "-";
|
|
@@ -664,7 +664,7 @@ const et = (o, e) => {
|
|
|
664
664
|
computeWeekLT() {
|
|
665
665
|
return function(o) {
|
|
666
666
|
if (o) {
|
|
667
|
-
const e =
|
|
667
|
+
const e = X(o).tz(this.positionGmt);
|
|
668
668
|
return `${e == null ? void 0 : e.format("dddd")}`;
|
|
669
669
|
}
|
|
670
670
|
return "-";
|
|
@@ -673,7 +673,7 @@ const et = (o, e) => {
|
|
|
673
673
|
computeMMMDDLT() {
|
|
674
674
|
return function(o) {
|
|
675
675
|
if (o) {
|
|
676
|
-
const e =
|
|
676
|
+
const e = X(o).tz(this.positionGmt);
|
|
677
677
|
return `${e == null ? void 0 : e.format("MMM-DD")}`;
|
|
678
678
|
}
|
|
679
679
|
return "-";
|
|
@@ -682,7 +682,7 @@ const et = (o, e) => {
|
|
|
682
682
|
computeMMMDDHHmmLT() {
|
|
683
683
|
return function(o) {
|
|
684
684
|
if (o) {
|
|
685
|
-
const e =
|
|
685
|
+
const e = X(o).tz(this.positionGmt);
|
|
686
686
|
return `${e == null ? void 0 : e.format("MMM-DD HHmm")}`;
|
|
687
687
|
}
|
|
688
688
|
return "-";
|
|
@@ -691,7 +691,7 @@ const et = (o, e) => {
|
|
|
691
691
|
computeMMMDDyyyyLT() {
|
|
692
692
|
return function(o) {
|
|
693
693
|
if (o) {
|
|
694
|
-
const e =
|
|
694
|
+
const e = X(o).tz(this.positionGmt);
|
|
695
695
|
return `${e == null ? void 0 : e.format("MMM-DD, yyyy")}`;
|
|
696
696
|
}
|
|
697
697
|
return "-";
|
|
@@ -800,9 +800,9 @@ const et = (o, e) => {
|
|
|
800
800
|
params: { b: 2, pn: 1, ps: 1e4 }
|
|
801
801
|
});
|
|
802
802
|
((e = o == null ? void 0 : o.data) == null ? void 0 : e.code) === 0 && ((r = (a = o.data) == null ? void 0 : a.data) == null || r.rows.forEach((t) => {
|
|
803
|
-
var f, b, k,
|
|
803
|
+
var f, b, k, E, S, Y, U, O;
|
|
804
804
|
const h = {};
|
|
805
|
-
h.followId = t.id, h.remark = t.remark, h.name = ((f = t.port) == null ? void 0 : f.name) || this.computeLat((b = t == null ? void 0 : t.coordinate) == null ? void 0 : b.lat) + ", " + this.computeLng((k = t == null ? void 0 : t.coordinate) == null ? void 0 : k.lng), h.nameRemark = h.remark ? `${h.name} ( ${h.remark} )` : h.name, h.portId = (
|
|
805
|
+
h.followId = t.id, h.remark = t.remark, h.name = ((f = t.port) == null ? void 0 : f.name) || this.computeLat((b = t == null ? void 0 : t.coordinate) == null ? void 0 : b.lat) + ", " + this.computeLng((k = t == null ? void 0 : t.coordinate) == null ? void 0 : k.lng), h.nameRemark = h.remark ? `${h.name} ( ${h.remark} )` : h.name, h.portId = (E = t.port) == null ? void 0 : E.id, h.lat = ((S = t.port) == null ? void 0 : S.lat) || ((Y = t == null ? void 0 : t.coordinate) == null ? void 0 : Y.lat), h.lng = ((U = t.port) == null ? void 0 : U.lng) || ((O = t == null ? void 0 : t.coordinate) == null ? void 0 : O.lng), this.followList.push(h);
|
|
806
806
|
}), this.followItem = this.followList.find((t) => {
|
|
807
807
|
var h, f;
|
|
808
808
|
return t.followId && ((h = this.position) == null ? void 0 : h.followId) && t.followId === ((f = this.position) == null ? void 0 : f.followId);
|
|
@@ -836,7 +836,7 @@ const et = (o, e) => {
|
|
|
836
836
|
}
|
|
837
837
|
},
|
|
838
838
|
async fetchForecastMeteo(o) {
|
|
839
|
-
var r, t, h, f, b, k,
|
|
839
|
+
var r, t, h, f, b, k, E;
|
|
840
840
|
if (this.meteoData = void 0, !this.token)
|
|
841
841
|
return !1;
|
|
842
842
|
this.loading = {
|
|
@@ -858,14 +858,14 @@ const et = (o, e) => {
|
|
|
858
858
|
});
|
|
859
859
|
(a == null ? void 0 : a.data.code) === 0 && (this.meteoData = {
|
|
860
860
|
...a == null ? void 0 : a.data.data
|
|
861
|
-
}, this.etime = (r = a == null ? void 0 : a.data) == null ? void 0 : r.etime, this.positionGmt = (f = (h = (t = this.meteoData) == null ? void 0 : t.weather) == null ? void 0 : h[0]) == null ? void 0 : f.timezone, this.positionOffset = (
|
|
861
|
+
}, this.etime = (r = a == null ? void 0 : a.data) == null ? void 0 : r.etime, this.positionGmt = (f = (h = (t = this.meteoData) == null ? void 0 : t.weather) == null ? void 0 : h[0]) == null ? void 0 : f.timezone, this.positionOffset = (E = (k = (b = this.meteoData) == null ? void 0 : b.weather) == null ? void 0 : k[0]) == null ? void 0 : E.offset, this.issuedDate = M(this.etime).utc().format("MMM-DD/HHmm[Z], YYYY"));
|
|
862
862
|
},
|
|
863
863
|
async fetchHistoryMeteo(o) {
|
|
864
|
-
var t, h, f, b, k,
|
|
864
|
+
var t, h, f, b, k, E, S;
|
|
865
865
|
if (this.meteoData = void 0, !this.token)
|
|
866
866
|
return !1;
|
|
867
867
|
this.loading.meteogramEchart = !0, this.loading.hourlyTable = !0;
|
|
868
|
-
const e =
|
|
868
|
+
const e = X(this.dateRangeZ[0] || this.etime).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0 }).format(), a = {
|
|
869
869
|
lat: this.position.lat,
|
|
870
870
|
lng: this.position.lng,
|
|
871
871
|
datetime: e,
|
|
@@ -875,7 +875,7 @@ const et = (o, e) => {
|
|
|
875
875
|
Authorization: this.token
|
|
876
876
|
}
|
|
877
877
|
});
|
|
878
|
-
(r == null ? void 0 : r.data.code) === 0 && (this.meteoData = r == null ? void 0 : r.data.data, this.meteoData.showDateSelect = !1, this.etime = (t = r == null ? void 0 : r.data) == null ? void 0 : t.etime, this.positionGmt = (b = (f = (h = this.meteoData) == null ? void 0 : h.weather) == null ? void 0 : f[0]) == null ? void 0 : b.timezone, this.positionOffset = (
|
|
878
|
+
(r == null ? void 0 : r.data.code) === 0 && (this.meteoData = r == null ? void 0 : r.data.data, this.meteoData.showDateSelect = !1, this.etime = (t = r == null ? void 0 : r.data) == null ? void 0 : t.etime, this.positionGmt = (b = (f = (h = this.meteoData) == null ? void 0 : h.weather) == null ? void 0 : f[0]) == null ? void 0 : b.timezone, this.positionOffset = (S = (E = (k = this.meteoData) == null ? void 0 : k.weather) == null ? void 0 : E[0]) == null ? void 0 : S.offset, this.issuedDate = M(this.etime).utc().format("MMM-DD/HHmm[Z], YYYY"));
|
|
879
879
|
},
|
|
880
880
|
async handleRender() {
|
|
881
881
|
if (this.disposeEcharts(), this.menuIndex === 1) {
|
|
@@ -886,20 +886,20 @@ const et = (o, e) => {
|
|
|
886
886
|
this.menuIndex === 2 ? (await this.fetchForecastMeteo(7), this.initInfo(), this.initWeatherEchart(), this.handleMeteogramData7(this.meteoData), this.initHoursTableData()) : this.menuIndex === 3 ? (await this.fetchForecastMeteo(14), this.handleMeteogramData14(this.meteoData), this.initDaysTableData(), this.initHourlyTableData(this.meteoData)) : this.menuIndex === 4 && (await this.fetchSeasonalData(), this.initSeasonalEchart());
|
|
887
887
|
},
|
|
888
888
|
initInfo() {
|
|
889
|
-
this.activeIndex =
|
|
889
|
+
this.activeIndex = X(this.etime).tz(this.positionGmt).hour(), this.pickedDate = X(this.etime).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format();
|
|
890
890
|
},
|
|
891
891
|
initDatePickerInfo() {
|
|
892
892
|
if (!this.dateRangeZ[0] || !this.dateRange[1]) {
|
|
893
893
|
this.dateRangeZ = [M(this.etime).add(-7, "day").utc().format(), M(this.etime).add(-1, "day").utc().format()];
|
|
894
894
|
const o = [
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
X(this.dateRangeZ[0]).tz(this.positionGmt).format("yyyy-MM-DD"),
|
|
896
|
+
X(this.dateRangeZ[1]).tz(this.positionGmt).format("yyyy-MM-DD")
|
|
897
897
|
];
|
|
898
898
|
this.dateRange = [M(o[0]).format(), M(o[1]).format()];
|
|
899
899
|
} else {
|
|
900
900
|
const o = [
|
|
901
|
-
|
|
902
|
-
|
|
901
|
+
X(this.dateRangeZ[0]).tz(this.positionGmt).format("yyyy-MM-DD"),
|
|
902
|
+
X(this.dateRangeZ[1]).tz(this.positionGmt).format("yyyy-MM-DD")
|
|
903
903
|
];
|
|
904
904
|
this.dateRange = [M(o[0]).format(), M(o[1]).format()];
|
|
905
905
|
}
|
|
@@ -927,7 +927,7 @@ const et = (o, e) => {
|
|
|
927
927
|
};
|
|
928
928
|
},
|
|
929
929
|
initWeatherEchart() {
|
|
930
|
-
const o = [], e = [], a = [], r = [], t = [], h = [], f = [], b = [], k = [],
|
|
930
|
+
const o = [], e = [], a = [], r = [], t = [], h = [], f = [], b = [], k = [], E = [], S = {}, Y = "data:image/svg+xml;base64," + window.btoa(
|
|
931
931
|
unescape(
|
|
932
932
|
encodeURIComponent(
|
|
933
933
|
'<svg t="1740385441519" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10951" width="200" height="200"><path d="M512 804.83593751A276.87183211 276.87183211 0 0 1 235.12816789 527.9641054Q235.12816789 375.21005376 512 13.82031251q276.87183211 361.30792288 276.87183211 514.14379289a276.87183211 276.87183211 0 0 1-276.87183211 276.87183211zM294.4461577 527.9641054a217.47202472 217.47202472 0 0 0 217.5538423 217.55384231 19.79993605 19.79993605 0 1 0 0-39.51805453 177.9539702 177.9539702 0 0 1-177.9539702-178.03578778 19.79993605 19.79993605 0 0 0-39.5998721 0z" fill="#0c73a8" p-id="10952"></path></svg>'
|
|
@@ -939,21 +939,21 @@ const et = (o, e) => {
|
|
|
939
939
|
'<svg t="1740383449285" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10797" width="200" height="200"><path d="M133.8 579l-44.4-44.4c-18.8-18.8-18.8-49.2 0-67.8L478 78c18.8-18.8 49.2-18.8 67.8 0l388.6 388.6c18.8 18.8 18.8 49.2 0 67.8L890 578.8c-19 19-50 18.6-68.6-0.8L592 337.2V912c0 26.6-21.4 48-48 48h-64c-26.6 0-48-21.4-48-48V337.2L202.4 578.2c-18.6 19.6-49.6 20-68.6 0.8z" fill="#333" p-id="10798"></path></svg>'
|
|
940
940
|
)
|
|
941
941
|
)
|
|
942
|
-
),
|
|
943
|
-
|
|
944
|
-
var J, q, Z, V, _, $, ee, te,
|
|
942
|
+
), O = new Image(64, 64);
|
|
943
|
+
O.src = U, O.onload = () => {
|
|
944
|
+
var W, J, q, Z, V, _, $, ee, te, c, N, z, L;
|
|
945
945
|
this.loading.weatherEchart = !1;
|
|
946
946
|
for (let m = 0; m < 7; m++) {
|
|
947
947
|
const P = M(this.pickedDate).clone().add(m, "d").format();
|
|
948
|
-
o.push(
|
|
949
|
-
const C = ((
|
|
950
|
-
r.push(this.roundPrecision((
|
|
948
|
+
o.push(X(P).tz(this.positionGmt).format("yyyy-MM-DD")), e.push(this.computeMMMDDLT(P)), a.push(m === 0 ? "Today" : this.computeWeekLT(P));
|
|
949
|
+
const C = ((W = ke.pickDaily(this.meteoData, P)) == null ? void 0 : W[0]) || {};
|
|
950
|
+
r.push(this.roundPrecision((q = (J = C.weather) == null ? void 0 : J.temp) == null ? void 0 : q.min, 0)), t.push(this.roundPrecision((V = (Z = C.weather) == null ? void 0 : Z.temp) == null ? void 0 : V.max, 0)), b.push(this.roundPrecision(($ = (_ = C.weather) == null ? void 0 : _.wind) == null ? void 0 : $.kts, 1) ?? "- kts"), E.push(this.roundPrecision((te = (ee = C.weather) == null ? void 0 : ee.precip) == null ? void 0 : te.sum, 1) ?? "- mm"), h.push({ symbol: "image://" + ((c = C.weather) == null ? void 0 : c.url) }), f.push((N = C.weather) == null ? void 0 : N.name), k.push((L = (z = C.weather) == null ? void 0 : z.wind) == null ? void 0 : L.bearing);
|
|
951
951
|
const I = document.createElement("canvas"), y = I.getContext("2d");
|
|
952
|
-
I.width =
|
|
953
|
-
const
|
|
954
|
-
y.translate(I.width / 2, I.height / 2), y.rotate(
|
|
952
|
+
I.width = O.width, I.height = O.height;
|
|
953
|
+
const de = k[m] * (Math.PI / 180);
|
|
954
|
+
y.translate(I.width / 2, I.height / 2), y.rotate(de), y.translate(-O.width / 2, -O.height / 2), y.drawImage(O, 0, 0, 64, 64);
|
|
955
955
|
const Ae = I.toDataURL();
|
|
956
|
-
|
|
956
|
+
S[`WindIcon${m}`] = {
|
|
957
957
|
height: 12,
|
|
958
958
|
width: 12,
|
|
959
959
|
align: "left",
|
|
@@ -962,7 +962,7 @@ const et = (o, e) => {
|
|
|
962
962
|
}
|
|
963
963
|
};
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const se = Math.max(...t.filter((m) => typeof m == "number" && !isNaN(m))) - Math.min(...r.filter((m) => typeof m == "number" && !isNaN(m))), ae = Math.min(...r.filter((m) => typeof m == "number" && !isNaN(m))) - 1.5 * se, le = Math.max(...t.filter((m) => typeof m == "number" && !isNaN(m))) + 2 * se, F = 4 + 0.5 / o.length * 92 + "%", R = {
|
|
966
966
|
grid: {
|
|
967
967
|
bottom: 0,
|
|
968
968
|
top: 0,
|
|
@@ -991,8 +991,8 @@ const et = (o, e) => {
|
|
|
991
991
|
},
|
|
992
992
|
singleAxis: [
|
|
993
993
|
{
|
|
994
|
-
left:
|
|
995
|
-
right:
|
|
994
|
+
left: F,
|
|
995
|
+
right: F,
|
|
996
996
|
type: "category",
|
|
997
997
|
show: !1,
|
|
998
998
|
axisLine: {
|
|
@@ -1017,8 +1017,8 @@ const et = (o, e) => {
|
|
|
1017
1017
|
height: "2%"
|
|
1018
1018
|
},
|
|
1019
1019
|
{
|
|
1020
|
-
left:
|
|
1021
|
-
right:
|
|
1020
|
+
left: F,
|
|
1021
|
+
right: F,
|
|
1022
1022
|
type: "category",
|
|
1023
1023
|
show: !1,
|
|
1024
1024
|
axisLine: {
|
|
@@ -1043,8 +1043,8 @@ const et = (o, e) => {
|
|
|
1043
1043
|
height: "2%"
|
|
1044
1044
|
},
|
|
1045
1045
|
{
|
|
1046
|
-
left:
|
|
1047
|
-
right:
|
|
1046
|
+
left: F,
|
|
1047
|
+
right: F,
|
|
1048
1048
|
type: "category",
|
|
1049
1049
|
show: !1,
|
|
1050
1050
|
axisLine: {
|
|
@@ -1069,8 +1069,8 @@ const et = (o, e) => {
|
|
|
1069
1069
|
height: "2%"
|
|
1070
1070
|
},
|
|
1071
1071
|
{
|
|
1072
|
-
left:
|
|
1073
|
-
right:
|
|
1072
|
+
left: F,
|
|
1073
|
+
right: F,
|
|
1074
1074
|
type: "category",
|
|
1075
1075
|
show: !1,
|
|
1076
1076
|
axisLine: {
|
|
@@ -1095,8 +1095,8 @@ const et = (o, e) => {
|
|
|
1095
1095
|
height: "2%"
|
|
1096
1096
|
},
|
|
1097
1097
|
{
|
|
1098
|
-
left:
|
|
1099
|
-
right:
|
|
1098
|
+
left: F,
|
|
1099
|
+
right: F,
|
|
1100
1100
|
type: "category",
|
|
1101
1101
|
show: !1,
|
|
1102
1102
|
axisLine: {
|
|
@@ -1125,7 +1125,7 @@ const et = (o, e) => {
|
|
|
1125
1125
|
type: "value",
|
|
1126
1126
|
name: "温度(℃)",
|
|
1127
1127
|
show: !1,
|
|
1128
|
-
min:
|
|
1128
|
+
min: ae,
|
|
1129
1129
|
max: le,
|
|
1130
1130
|
axisLabel: {
|
|
1131
1131
|
formatter: "{value} °C"
|
|
@@ -1222,7 +1222,7 @@ const et = (o, e) => {
|
|
|
1222
1222
|
color: "rgba(0,0,0,0.7)",
|
|
1223
1223
|
// formatter: '{c}'
|
|
1224
1224
|
rich: {
|
|
1225
|
-
...
|
|
1225
|
+
...S,
|
|
1226
1226
|
title: {
|
|
1227
1227
|
align: "center",
|
|
1228
1228
|
vertical: "center"
|
|
@@ -1238,7 +1238,7 @@ const et = (o, e) => {
|
|
|
1238
1238
|
singleAxisIndex: 4,
|
|
1239
1239
|
coordinateSystem: "singleAxis",
|
|
1240
1240
|
type: "scatter",
|
|
1241
|
-
data:
|
|
1241
|
+
data: E,
|
|
1242
1242
|
label: {
|
|
1243
1243
|
show: !0,
|
|
1244
1244
|
color: "rgba(0,0,0,0.7)",
|
|
@@ -1249,7 +1249,7 @@ const et = (o, e) => {
|
|
|
1249
1249
|
width: 16,
|
|
1250
1250
|
align: "left",
|
|
1251
1251
|
backgroundColor: {
|
|
1252
|
-
image:
|
|
1252
|
+
image: Y
|
|
1253
1253
|
}
|
|
1254
1254
|
},
|
|
1255
1255
|
title: {
|
|
@@ -1269,7 +1269,7 @@ const et = (o, e) => {
|
|
|
1269
1269
|
const m = xe.init(document.getElementById("weather-chart"));
|
|
1270
1270
|
m.setOption(R), m.on("click", (P) => {
|
|
1271
1271
|
const C = P.dataIndex, I = o[C].split("-");
|
|
1272
|
-
this.pickedDate =
|
|
1272
|
+
this.pickedDate = X().tz(this.positionGmt).set({ year: I[0], month: Number(I[1] - 1), date: Number(I[2]), hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.pickedWeek = C === 0 ? "Today" : this.computeWeekLT(this.pickedDate), this.activeIndex = C === 0 ? X(this.etime).tz(this.positionGmt).hour() : void 0, this.initHoursTableData(), R.series[3].markArea = {
|
|
1273
1273
|
itemStyle: {
|
|
1274
1274
|
color: "rgba(64,159,255,0.25)"
|
|
1275
1275
|
},
|
|
@@ -1316,23 +1316,23 @@ const et = (o, e) => {
|
|
|
1316
1316
|
)
|
|
1317
1317
|
), t = new Image(64, 64);
|
|
1318
1318
|
t.src = r, t.onload = () => {
|
|
1319
|
-
var f, b, k,
|
|
1319
|
+
var f, b, k, E, S, Y, U, O, se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C, I, y, he, de, Ae, g, pe, x, Q, T, ce, A;
|
|
1320
1320
|
this.loading.meteogramEchart = !1;
|
|
1321
|
-
const h =
|
|
1322
|
-
for (let
|
|
1323
|
-
const
|
|
1324
|
-
(f = this.meteogramData) == null || f.dates.push(
|
|
1325
|
-
const v = ((b = ke.pickHourly(o,
|
|
1326
|
-
if (
|
|
1321
|
+
const h = X(this.etime).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format();
|
|
1322
|
+
for (let G = 0; G < 7 * 24; G++) {
|
|
1323
|
+
const ie = M(h).clone().add(G, "h").format();
|
|
1324
|
+
(f = this.meteogramData) == null || f.dates.push(ie);
|
|
1325
|
+
const v = ((b = ke.pickHourly(o, ie)) == null ? void 0 : b[0]) || {};
|
|
1326
|
+
if (G % 12 === 0 && G % 24 !== 0 ? (k = this.meteogramData) == null || k.xDates.push(X(ie).tz(this.positionGmt).format("MMM-DD")) : (E = this.meteogramData) == null || E.xDates.push(""), G % 3 === 0 ? (S = this.meteogramData) == null || S.hours.push(this.computeHourLT(ie)) : (Y = this.meteogramData) == null || Y.hours.push(""), (O = this.meteogramData) == null || O.temperaturesX.push([ie, this.roundPrecision((U = v == null ? void 0 : v.weather) == null ? void 0 : U.temp, 0)]), (ae = this.meteogramData) == null || ae.temperaturesY.push(this.roundPrecision((se = v == null ? void 0 : v.weather) == null ? void 0 : se.temp, 0)), (R = this.meteogramData) == null || R.precip.push(this.roundPrecision((F = (le = v == null ? void 0 : v.weather) == null ? void 0 : le.precip) == null ? void 0 : F.sum, 1)), (q = this.meteogramData) == null || q.windspeed.push(this.roundPrecision((J = (W = v.weather) == null ? void 0 : W.wind) == null ? void 0 : J.kts, 1)), (_ = this.meteogramData) == null || _.windGusts.push(this.roundPrecision((V = (Z = v == null ? void 0 : v.weather) == null ? void 0 : Z.wind) == null ? void 0 : V.gusts, 1)), (te = this.meteogramData) == null || te.sigWaveHeight.push(this.roundPrecision((ee = ($ = v == null ? void 0 : v.wave) == null ? void 0 : $.sig) == null ? void 0 : ee.height)), (z = this.meteogramData) == null || z.swellHeight.push(this.roundPrecision((N = (c = v == null ? void 0 : v.wave) == null ? void 0 : c.swell) == null ? void 0 : N.height)), G % 6 === 0 ? ((m = this.meteogramData) == null || m.weatherIcons.push({ symbol: "image://" + ((L = v.weather) == null ? void 0 : L.url), symbolSize: 30 }), (C = this.meteogramData) == null || C.weatherNames.push((P = v.weather) == null ? void 0 : P.name)) : ((y = this.meteogramData) == null || y.weatherIcons.push({ symbol: "image://" + ((I = v.weather) == null ? void 0 : I.url), symbolSize: 0 }), (he = this.meteogramData) == null || he.weatherNames.push("")), G % 3 === 0 ? (g = this.meteogramData) == null || g.windDir.push((Ae = (de = v.weather) == null ? void 0 : de.wind) == null ? void 0 : Ae.bearing) : (pe = this.meteogramData) == null || pe.windDir.push(void 0), G % 3 === 0) {
|
|
1327
1327
|
const re = document.createElement("canvas"), j = re.getContext("2d");
|
|
1328
1328
|
re.width = t.width, re.height = t.height;
|
|
1329
|
-
const u = ((x = this.meteogramData) == null ? void 0 : x.windDir[
|
|
1329
|
+
const u = ((x = this.meteogramData) == null ? void 0 : x.windDir[G]) * (Math.PI / 180);
|
|
1330
1330
|
j.translate(re.width / 2, re.height / 2), j.rotate(u), j.translate(-t.width / 2, -t.height / 2), j.drawImage(t, 0, 0, 64, 64);
|
|
1331
1331
|
const K = re.toDataURL();
|
|
1332
|
-
this.meteogramData.windDirIcons[
|
|
1332
|
+
this.meteogramData.windDirIcons[G] = K;
|
|
1333
1333
|
} else
|
|
1334
|
-
this.meteogramData.windDirIcons[
|
|
1335
|
-
(
|
|
1334
|
+
this.meteogramData.windDirIcons[G] = void 0;
|
|
1335
|
+
(Q = v == null ? void 0 : v.weather) != null && Q.isDay ? a.end === void 0 && a.start >= 0 && (a.end = G) : a.start === void 0 && (a.start = G), (a.start >= 0 && a.end >= 0 || a.start >= 0 && G === 7 * 24 - 1) && ((T = this.meteogramData) == null || T.markarea.push([
|
|
1336
1336
|
{
|
|
1337
1337
|
x: 4 + a.start / (7 * 24) * 92 + "%"
|
|
1338
1338
|
},
|
|
@@ -1341,7 +1341,7 @@ const et = (o, e) => {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
]), a = { start: void 0, end: void 0 });
|
|
1343
1343
|
}
|
|
1344
|
-
this.meteogramData.offset = 4 + 0.5 / ((
|
|
1344
|
+
this.meteogramData.offset = 4 + 0.5 / ((A = (ce = this.meteogramData) == null ? void 0 : ce.dates) == null ? void 0 : A.length) * 92 + "%", this.$nextTick(() => {
|
|
1345
1345
|
this.initMeteogramEchart(7);
|
|
1346
1346
|
});
|
|
1347
1347
|
};
|
|
@@ -1375,23 +1375,23 @@ const et = (o, e) => {
|
|
|
1375
1375
|
)
|
|
1376
1376
|
), b = new Image(64, 64);
|
|
1377
1377
|
b.src = f, b.onload = () => {
|
|
1378
|
-
var
|
|
1378
|
+
var E, S, Y, U, O, se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C, I, y, he, de, Ae, g, pe, x, Q, T, ce, A, G, ie, v, re;
|
|
1379
1379
|
this.loading.meteogramEchart = !1;
|
|
1380
|
-
const k =
|
|
1380
|
+
const k = X(t).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format();
|
|
1381
1381
|
for (let j = 0; j < r * 24; j++) {
|
|
1382
1382
|
const d = M(k).clone().add(j, "h").format();
|
|
1383
|
-
(
|
|
1384
|
-
const u = ((
|
|
1385
|
-
if ((U = this.meteogramData) == null || U.temperaturesY.push(this.roundPrecision((
|
|
1383
|
+
(E = this.meteogramData) == null || E.dates.push(d);
|
|
1384
|
+
const u = ((S = ke.pickHourly(o, d)) == null ? void 0 : S[0]) || {};
|
|
1385
|
+
if ((U = this.meteogramData) == null || U.temperaturesY.push(this.roundPrecision((Y = u == null ? void 0 : u.weather) == null ? void 0 : Y.temp, 0)), (ae = this.meteogramData) == null || ae.windspeed.push(this.roundPrecision((se = (O = u.weather) == null ? void 0 : O.wind) == null ? void 0 : se.kts, 1)), (R = this.meteogramData) == null || R.windGusts.push(this.roundPrecision((F = (le = u == null ? void 0 : u.weather) == null ? void 0 : le.wind) == null ? void 0 : F.gusts, 1)), (q = this.meteogramData) == null || q.sigWaveHeight.push(this.roundPrecision((J = (W = u == null ? void 0 : u.wave) == null ? void 0 : W.sig) == null ? void 0 : J.height)), (_ = this.meteogramData) == null || _.swellHeight.push(this.roundPrecision((V = (Z = u == null ? void 0 : u.wave) == null ? void 0 : Z.swell) == null ? void 0 : V.height)), j % 3 === 0 ? ((te = this.meteogramData) == null || te.precip.push(this.roundPrecision((ee = ($ = u == null ? void 0 : u.weather) == null ? void 0 : $.precip) == null ? void 0 : ee.sum3Hours, 1)), (N = this.meteogramData) == null || N.temperaturesX.push([d, this.roundPrecision((c = u == null ? void 0 : u.weather) == null ? void 0 : c.temp, 0)])) : (z = this.meteogramData) == null || z.precip.push(null), j % 12 === 0 && j % 24 !== 0 ? (L = this.meteogramData) == null || L.xDates.push(X(d).tz(this.positionGmt).format("MMM-DD")) : (m = this.meteogramData) == null || m.xDates.push(""), j % 6 === 0 ? (P = this.meteogramData) == null || P.hours.push(this.computeHourLT(d)) : (C = this.meteogramData) == null || C.hours.push(""), j % 12 === 0 ? ((y = this.meteogramData) == null || y.weatherIcons.push({ symbol: "image://" + ((I = u.weather) == null ? void 0 : I.url), symbolSize: 30 }), (de = this.meteogramData) == null || de.weatherNames.push((he = u.weather) == null ? void 0 : he.name)) : ((g = this.meteogramData) == null || g.weatherIcons.push({ symbol: "image://" + ((Ae = u.weather) == null ? void 0 : Ae.url), symbolSize: 0 }), (pe = this.meteogramData) == null || pe.weatherNames.push("")), j % 6 === 0 ? (T = this.meteogramData) == null || T.windDir.push((Q = (x = u.weather) == null ? void 0 : x.wind) == null ? void 0 : Q.bearing) : (ce = this.meteogramData) == null || ce.windDir.push(void 0), j % 6 === 0) {
|
|
1386
1386
|
const K = document.createElement("canvas"), D = K.getContext("2d");
|
|
1387
1387
|
K.width = b.width, K.height = b.height;
|
|
1388
|
-
const H = ((
|
|
1388
|
+
const H = ((A = this.meteogramData) == null ? void 0 : A.windDir[j]) * (Math.PI / 180);
|
|
1389
1389
|
D.translate(K.width / 2, K.height / 2), D.rotate(H), D.translate(-b.width / 2, -b.height / 2), D.drawImage(b, 0, 0, 64, 64);
|
|
1390
1390
|
const oe = K.toDataURL();
|
|
1391
1391
|
this.meteogramData.windDirIcons[j] = oe;
|
|
1392
1392
|
} else
|
|
1393
1393
|
this.meteogramData.windDirIcons[j] = void 0;
|
|
1394
|
-
(
|
|
1394
|
+
(G = u == null ? void 0 : u.weather) != null && G.isDay ? h.end === void 0 && h.start >= 0 && (h.end = j) : h.start === void 0 && (h.start = j), (h.start >= 0 && h.end >= 0 || h.start >= 0 && j === r * 24 - 1) && ((ie = this.meteogramData) == null || ie.markarea.push([
|
|
1395
1395
|
{
|
|
1396
1396
|
x: 4 + h.start / (r * 24) * 92 + "%"
|
|
1397
1397
|
},
|
|
@@ -1406,7 +1406,7 @@ const et = (o, e) => {
|
|
|
1406
1406
|
};
|
|
1407
1407
|
},
|
|
1408
1408
|
initMeteogramEchart(o) {
|
|
1409
|
-
var
|
|
1409
|
+
var se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C, I, y, he, de, Ae, g, pe, x, Q, T, ce, A, G, ie, v, re, j;
|
|
1410
1410
|
const e = xe.init(document.getElementById("weather-icons")), a = {
|
|
1411
1411
|
grid: {
|
|
1412
1412
|
show: !0,
|
|
@@ -1438,12 +1438,12 @@ const et = (o, e) => {
|
|
|
1438
1438
|
top: "50%",
|
|
1439
1439
|
height: "50%",
|
|
1440
1440
|
type: "category",
|
|
1441
|
-
data: (
|
|
1441
|
+
data: (se = this.meteogramData) == null ? void 0 : se.dates,
|
|
1442
1442
|
show: !1
|
|
1443
1443
|
},
|
|
1444
1444
|
singleAxis: [
|
|
1445
1445
|
{
|
|
1446
|
-
left: (
|
|
1446
|
+
left: (ae = this.meteogramData) == null ? void 0 : ae.offset,
|
|
1447
1447
|
right: (le = this.meteogramData) == null ? void 0 : le.offset,
|
|
1448
1448
|
type: "category",
|
|
1449
1449
|
show: !1,
|
|
@@ -1464,7 +1464,7 @@ const et = (o, e) => {
|
|
|
1464
1464
|
// 隐藏分割线
|
|
1465
1465
|
},
|
|
1466
1466
|
boundaryGap: !1,
|
|
1467
|
-
data: (
|
|
1467
|
+
data: (F = this.meteogramData) == null ? void 0 : F.dates,
|
|
1468
1468
|
top: "50%",
|
|
1469
1469
|
height: "2%"
|
|
1470
1470
|
}
|
|
@@ -1481,8 +1481,8 @@ const et = (o, e) => {
|
|
|
1481
1481
|
]
|
|
1482
1482
|
};
|
|
1483
1483
|
e.setOption(a);
|
|
1484
|
-
let r = Math.max(...this.meteogramData.temperaturesY.filter((d) => typeof d == "number" && !isNaN(d))), t = Math.min(...this.meteogramData.temperaturesY.filter((d) => typeof d == "number" && !isNaN(d))) > 0 ? 0 : Math.min(...this.meteogramData.temperaturesY.filter((d) => typeof d == "number" && !isNaN(d))), h = Math.floor(t / 5) * 5, f = Math.ceil(r / 5) * 5, b = Math.ceil((f - h) / 5), k = "",
|
|
1485
|
-
o === 7 ? (k = "Precip.1h ( mm ) ",
|
|
1484
|
+
let r = Math.max(...this.meteogramData.temperaturesY.filter((d) => typeof d == "number" && !isNaN(d))), t = Math.min(...this.meteogramData.temperaturesY.filter((d) => typeof d == "number" && !isNaN(d))) > 0 ? 0 : Math.min(...this.meteogramData.temperaturesY.filter((d) => typeof d == "number" && !isNaN(d))), h = Math.floor(t / 5) * 5, f = Math.ceil(r / 5) * 5, b = Math.ceil((f - h) / 5), k = "", E = [];
|
|
1485
|
+
o === 7 ? (k = "Precip.1h ( mm ) ", E = [
|
|
1486
1486
|
{
|
|
1487
1487
|
gte: 50,
|
|
1488
1488
|
color: "rgba(197, 5, 58, 1)",
|
|
@@ -1511,7 +1511,7 @@ const et = (o, e) => {
|
|
|
1511
1511
|
color: "rgba(172, 210, 255, 1)",
|
|
1512
1512
|
label: "Light, <2mm"
|
|
1513
1513
|
}
|
|
1514
|
-
]) : (k = "Precip.3h ( mm ) ",
|
|
1514
|
+
]) : (k = "Precip.3h ( mm ) ", E = [
|
|
1515
1515
|
{
|
|
1516
1516
|
gte: 100,
|
|
1517
1517
|
color: "rgba(197, 5, 58, 1)",
|
|
@@ -1541,7 +1541,7 @@ const et = (o, e) => {
|
|
|
1541
1541
|
label: "Light, <5mm"
|
|
1542
1542
|
}
|
|
1543
1543
|
]);
|
|
1544
|
-
const
|
|
1544
|
+
const S = xe.init(document.getElementById("weather-condition")), Y = {
|
|
1545
1545
|
title: {
|
|
1546
1546
|
text: "Weather conditions",
|
|
1547
1547
|
top: "10px",
|
|
@@ -1567,13 +1567,13 @@ const et = (o, e) => {
|
|
|
1567
1567
|
show: !0,
|
|
1568
1568
|
position: "right",
|
|
1569
1569
|
formatter: (d) => {
|
|
1570
|
-
var K, D, De, H, oe, fe, B, i, w, ve, Me,
|
|
1570
|
+
var K, D, De, H, oe, fe, B, i, w, ve, Me, ge, ye, Pe, Ne, Te, Ee, Ye, je, Ke, Ue, Re, Xe, We, Je, qe;
|
|
1571
1571
|
const u = (K = d == null ? void 0 : d.find((Be) => Be.seriesType === "bar")) == null ? void 0 : K.dataIndex;
|
|
1572
1572
|
if (d.find((Be) => Be.seriesType === "scatter"))
|
|
1573
1573
|
return !1;
|
|
1574
1574
|
{
|
|
1575
1575
|
let Be = "";
|
|
1576
|
-
return o === 7 ? (((D = d[1]) == null ? void 0 : D.value) < 2 ? Be = "rgba(172, 210, 255, 1)" : ((De = d[1]) == null ? void 0 : De.value) <= 3.9 ? Be = "rgba(3, 248, 103, 1)" : ((H = d[1]) == null ? void 0 : H.value) <= 7.9 ? Be = "rgba(190, 226, 2, 18)" : ((oe = d[1]) == null ? void 0 : oe.value) <= 19.9 ? Be = "rgba(248, 1, 1, 1)" : ((fe = d[1]) == null ? void 0 : fe.value) >= 20 ? Be = "rgba(197, 5, 58, 1)" : Be = "rgba(172, 210, 255, 1)", `<div style="font-size: 13px;"><strong>${
|
|
1576
|
+
return o === 7 ? (((D = d[1]) == null ? void 0 : D.value) < 2 ? Be = "rgba(172, 210, 255, 1)" : ((De = d[1]) == null ? void 0 : De.value) <= 3.9 ? Be = "rgba(3, 248, 103, 1)" : ((H = d[1]) == null ? void 0 : H.value) <= 7.9 ? Be = "rgba(190, 226, 2, 18)" : ((oe = d[1]) == null ? void 0 : oe.value) <= 19.9 ? Be = "rgba(248, 1, 1, 1)" : ((fe = d[1]) == null ? void 0 : fe.value) >= 20 ? Be = "rgba(197, 5, 58, 1)" : Be = "rgba(172, 210, 255, 1)", `<div style="font-size: 13px;"><strong>${X((B = this.meteogramData) == null ? void 0 : B.dates[u]).tz(this.positionGmt).format("MMM-DD/HHmm[LT]")}</strong></div>
|
|
1577
1577
|
<div style="display: ${(i = this.meteogramData) != null && i.weatherNames[u] ? "block" : "none"}; font-size: 13px;">
|
|
1578
1578
|
<span>Weather : </span><strong>${(w = this.meteogramData) == null ? void 0 : w.weatherNames[u]}</strong>
|
|
1579
1579
|
</div>
|
|
@@ -1583,9 +1583,9 @@ const et = (o, e) => {
|
|
|
1583
1583
|
</div>
|
|
1584
1584
|
<div style="font-size: 13px;">
|
|
1585
1585
|
<span style="display:inline-block; height: 10px;width: 10px;border-radius: 50%;background: ${Be};"></span>
|
|
1586
|
-
<span>Precip.1h : </span><strong>${(
|
|
1586
|
+
<span>Precip.1h : </span><strong>${(ge = d[1]) == null ? void 0 : ge.value}</strong><span style="padding-left: 3px;">mm</span>
|
|
1587
1587
|
</div>`) : o === 14 ? (((ye = d[1]) == null ? void 0 : ye.value) < 5 ? Be = "rgba(172, 210, 255, 1)" : ((Pe = d[1]) == null ? void 0 : Pe.value) <= 9.9 ? Be = "rgba(3, 248, 103, 1)" : ((Ne = d[1]) == null ? void 0 : Ne.value) <= 24.9 ? Be = "rgba(190, 226, 2, 18)" : ((Te = d[1]) == null ? void 0 : Te.value) <= 49.9 ? Be = "rgba(248, 1, 1, 1)" : ((Ee = d[1]) == null ? void 0 : Ee.value) > 50 ? Be = "rgba(197, 5, 58, 1)" : Be = "rgba(172, 210, 255, 1)", `<div style="font-size: 13px;"
|
|
1588
|
-
<strong>${
|
|
1588
|
+
<strong>${X((Ye = this.meteogramData) == null ? void 0 : Ye.dates[u]).tz(this.positionGmt).format("MMM-DD/HHmm[LT]")}</strong>
|
|
1589
1589
|
</div>
|
|
1590
1590
|
<div style="display: ${(je = this.meteogramData) != null && je.weatherNames[u] ? "block" : "none"}; font-size: 13px;">
|
|
1591
1591
|
<span>Weather : </span><strong>${(Ke = this.meteogramData) == null ? void 0 : Ke.weatherNames[u]}</strong>
|
|
@@ -1622,7 +1622,7 @@ const et = (o, e) => {
|
|
|
1622
1622
|
top: "50%",
|
|
1623
1623
|
height: "50%",
|
|
1624
1624
|
type: "category",
|
|
1625
|
-
data: (
|
|
1625
|
+
data: (W = this.meteogramData) == null ? void 0 : W.dates,
|
|
1626
1626
|
axisLabel: {
|
|
1627
1627
|
show: !1
|
|
1628
1628
|
},
|
|
@@ -1642,8 +1642,8 @@ const et = (o, e) => {
|
|
|
1642
1642
|
},
|
|
1643
1643
|
singleAxis: [
|
|
1644
1644
|
{
|
|
1645
|
-
left: (
|
|
1646
|
-
right: (
|
|
1645
|
+
left: (J = this.meteogramData) == null ? void 0 : J.offset,
|
|
1646
|
+
right: (q = this.meteogramData) == null ? void 0 : q.offset,
|
|
1647
1647
|
type: "category",
|
|
1648
1648
|
show: !1,
|
|
1649
1649
|
axisLine: {
|
|
@@ -1663,13 +1663,13 @@ const et = (o, e) => {
|
|
|
1663
1663
|
// 隐藏分割线
|
|
1664
1664
|
},
|
|
1665
1665
|
boundaryGap: !1,
|
|
1666
|
-
data: (
|
|
1666
|
+
data: (Z = this.meteogramData) == null ? void 0 : Z.dates,
|
|
1667
1667
|
top: "17%",
|
|
1668
1668
|
height: "2%"
|
|
1669
1669
|
},
|
|
1670
1670
|
{
|
|
1671
|
-
left: (
|
|
1672
|
-
right: (
|
|
1671
|
+
left: (V = this.meteogramData) == null ? void 0 : V.offset,
|
|
1672
|
+
right: (_ = this.meteogramData) == null ? void 0 : _.offset,
|
|
1673
1673
|
type: "category",
|
|
1674
1674
|
show: !1,
|
|
1675
1675
|
axisLine: {
|
|
@@ -1689,13 +1689,13 @@ const et = (o, e) => {
|
|
|
1689
1689
|
// 隐藏分割线
|
|
1690
1690
|
},
|
|
1691
1691
|
boundaryGap: !1,
|
|
1692
|
-
data: (
|
|
1692
|
+
data: ($ = this.meteogramData) == null ? void 0 : $.dates,
|
|
1693
1693
|
top: "27%",
|
|
1694
1694
|
height: "2%"
|
|
1695
1695
|
},
|
|
1696
1696
|
{
|
|
1697
|
-
left: (
|
|
1698
|
-
right: (
|
|
1697
|
+
left: (ee = this.meteogramData) == null ? void 0 : ee.offset,
|
|
1698
|
+
right: (te = this.meteogramData) == null ? void 0 : te.offset,
|
|
1699
1699
|
type: "category",
|
|
1700
1700
|
show: !1,
|
|
1701
1701
|
axisLine: {
|
|
@@ -1790,7 +1790,7 @@ const et = (o, e) => {
|
|
|
1790
1790
|
top: 31,
|
|
1791
1791
|
right: "4%",
|
|
1792
1792
|
show: !0,
|
|
1793
|
-
pieces:
|
|
1793
|
+
pieces: E,
|
|
1794
1794
|
seriesIndex: 1,
|
|
1795
1795
|
dimension: 1
|
|
1796
1796
|
},
|
|
@@ -1864,8 +1864,8 @@ const et = (o, e) => {
|
|
|
1864
1864
|
}
|
|
1865
1865
|
]
|
|
1866
1866
|
};
|
|
1867
|
-
|
|
1868
|
-
const U = xe.init(document.getElementById("wave-swell")),
|
|
1867
|
+
S.setOption(Y);
|
|
1868
|
+
const U = xe.init(document.getElementById("wave-swell")), O = {
|
|
1869
1869
|
title: {
|
|
1870
1870
|
text: "Wave & Swell",
|
|
1871
1871
|
top: "10px",
|
|
@@ -1894,7 +1894,7 @@ const et = (o, e) => {
|
|
|
1894
1894
|
formatter: (d) => {
|
|
1895
1895
|
var K, D, De, H, oe, fe, B, i, w, ve;
|
|
1896
1896
|
const u = (K = d == null ? void 0 : d[0]) == null ? void 0 : K.dataIndex;
|
|
1897
|
-
return d.find((Me) => Me.seriesType === "scatter") ? !1 : `<div style="font-size: 13px;"><strong>${
|
|
1897
|
+
return d.find((Me) => Me.seriesType === "scatter") ? !1 : `<div style="font-size: 13px;"><strong>${X((D = this.meteogramData) == null ? void 0 : D.dates[u]).tz(this.positionGmt).format("MMM-DD/HHmm[LT]")}</strong></div>
|
|
1898
1898
|
<div style="font-size: 13px;display: ${isNaN((De = d[0]) == null ? void 0 : De.value) ? "none" : "block"}">
|
|
1899
1899
|
<span style="display:inline-block; height: 10px;width: 10px;border-radius: 50%;background-color: #60c43e;}"></span>
|
|
1900
1900
|
<span>Wind Speed : </span><strong>${(H = d[0]) == null ? void 0 : H.value}</strong><span style="padding-left: 3px;">kts</span>
|
|
@@ -1941,7 +1941,7 @@ const et = (o, e) => {
|
|
|
1941
1941
|
top: "50%",
|
|
1942
1942
|
height: "50%",
|
|
1943
1943
|
type: "category",
|
|
1944
|
-
data: (
|
|
1944
|
+
data: (he = this.meteogramData) == null ? void 0 : he.dates,
|
|
1945
1945
|
axisLabel: {
|
|
1946
1946
|
show: !1
|
|
1947
1947
|
},
|
|
@@ -1960,7 +1960,7 @@ const et = (o, e) => {
|
|
|
1960
1960
|
},
|
|
1961
1961
|
singleAxis: [
|
|
1962
1962
|
{
|
|
1963
|
-
left: (
|
|
1963
|
+
left: (de = this.meteogramData) == null ? void 0 : de.offset,
|
|
1964
1964
|
right: (Ae = this.meteogramData) == null ? void 0 : Ae.offset,
|
|
1965
1965
|
type: "category",
|
|
1966
1966
|
show: !1,
|
|
@@ -2007,7 +2007,7 @@ const et = (o, e) => {
|
|
|
2007
2007
|
// 隐藏分割线
|
|
2008
2008
|
},
|
|
2009
2009
|
boundaryGap: !1,
|
|
2010
|
-
data: (
|
|
2010
|
+
data: (Q = this.meteogramData) == null ? void 0 : Q.dates,
|
|
2011
2011
|
top: "92%",
|
|
2012
2012
|
height: "2%"
|
|
2013
2013
|
}
|
|
@@ -2066,7 +2066,7 @@ const et = (o, e) => {
|
|
|
2066
2066
|
name: "Wind Speed",
|
|
2067
2067
|
type: "line",
|
|
2068
2068
|
yAxisIndex: 0,
|
|
2069
|
-
data: (
|
|
2069
|
+
data: (T = this.meteogramData) == null ? void 0 : T.windspeed,
|
|
2070
2070
|
symbol: "none",
|
|
2071
2071
|
smooth: !1,
|
|
2072
2072
|
itemStyle: {
|
|
@@ -2076,7 +2076,7 @@ const et = (o, e) => {
|
|
|
2076
2076
|
itemStyle: {
|
|
2077
2077
|
color: "rgba(239,239,239,0.6)"
|
|
2078
2078
|
},
|
|
2079
|
-
data: (
|
|
2079
|
+
data: (ce = this.meteogramData) == null ? void 0 : ce.markarea,
|
|
2080
2080
|
emphasis: {
|
|
2081
2081
|
disabled: !0
|
|
2082
2082
|
},
|
|
@@ -2103,14 +2103,14 @@ const et = (o, e) => {
|
|
|
2103
2103
|
}
|
|
2104
2104
|
} : !1;
|
|
2105
2105
|
},
|
|
2106
|
-
data: (
|
|
2106
|
+
data: (A = this.meteogramData) == null ? void 0 : A.windspeed,
|
|
2107
2107
|
z: 10
|
|
2108
2108
|
},
|
|
2109
2109
|
{
|
|
2110
2110
|
name: "Wind Gusts",
|
|
2111
2111
|
type: "line",
|
|
2112
2112
|
yAxisIndex: 0,
|
|
2113
|
-
data: (
|
|
2113
|
+
data: (G = this.meteogramData) == null ? void 0 : G.windGusts,
|
|
2114
2114
|
symbol: "none",
|
|
2115
2115
|
smooth: !1,
|
|
2116
2116
|
itemStyle: {
|
|
@@ -2128,7 +2128,7 @@ const et = (o, e) => {
|
|
|
2128
2128
|
name: "Swell Height",
|
|
2129
2129
|
type: "line",
|
|
2130
2130
|
yAxisIndex: 1,
|
|
2131
|
-
data: (
|
|
2131
|
+
data: (ie = this.meteogramData) == null ? void 0 : ie.swellHeight,
|
|
2132
2132
|
symbol: "none",
|
|
2133
2133
|
smooth: !1,
|
|
2134
2134
|
itemStyle: {
|
|
@@ -2186,12 +2186,12 @@ const et = (o, e) => {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
]
|
|
2188
2188
|
};
|
|
2189
|
-
U.setOption(
|
|
2189
|
+
U.setOption(O), U.on("legendselectchanged", (d) => {
|
|
2190
2190
|
d.name === "Wind Speed" && (d.selected["Wind Direction"] = d.selected["Wind Speed"]);
|
|
2191
2191
|
});
|
|
2192
2192
|
},
|
|
2193
2193
|
async fetchSeasonalData() {
|
|
2194
|
-
var t, h, f, b, k,
|
|
2194
|
+
var t, h, f, b, k, E, S, Y, U, O, se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C;
|
|
2195
2195
|
if (!this.token)
|
|
2196
2196
|
return !1;
|
|
2197
2197
|
this.loading.seasonalEchart = !0, this.seasonalData = {
|
|
@@ -2207,19 +2207,19 @@ const et = (o, e) => {
|
|
|
2207
2207
|
precip: [],
|
|
2208
2208
|
lastYearPrecip: []
|
|
2209
2209
|
};
|
|
2210
|
-
const o =
|
|
2210
|
+
const o = X(this.etime).tz(this.positionGmt).date() >= 14 ? X(this.etime).tz(this.positionGmt).month() + 1 : X(this.etime).tz(this.positionGmt).month(), e = X(this.etime).tz(this.positionGmt).set({ month: o });
|
|
2211
2211
|
this.monthsOptions = [];
|
|
2212
2212
|
for (let I = 0; I < 6; I++)
|
|
2213
2213
|
this.monthsOptions.push({
|
|
2214
|
-
date:
|
|
2215
|
-
month:
|
|
2214
|
+
date: X(this.etime).tz(this.positionGmt).set({ year: e.year(), month: e.month() + I, date: 1, hour: 0, minute: 0, second: 0 }).format(),
|
|
2215
|
+
month: X(this.etime).tz(this.positionGmt).set({ year: e.year(), month: e.month() + I }).format("MMMM yyyy")
|
|
2216
2216
|
});
|
|
2217
2217
|
this.currentMonth = this.currentMonth ? this.currentMonth : this.monthsOptions[0];
|
|
2218
2218
|
let a = {
|
|
2219
2219
|
lat: this.position.lat,
|
|
2220
2220
|
lng: this.position.lng,
|
|
2221
|
-
startDate:
|
|
2222
|
-
endDate:
|
|
2221
|
+
startDate: X().tz(this.positionGmt).set({ year: e.year(), month: e.month(), date: 1, hour: 0, minute: 0, second: 0 }).format(),
|
|
2222
|
+
endDate: X().tz(this.positionGmt).set({ year: e.year(), month: e.month() + 1, date: 1, hour: 0, minute: 0, second: 0 }).format(),
|
|
2223
2223
|
pastYear: 1
|
|
2224
2224
|
}, r = await ze.post(`${this.gateway}/api/arc/meteo2/spot/seasonal`, a, {
|
|
2225
2225
|
headers: {
|
|
@@ -2227,32 +2227,32 @@ const et = (o, e) => {
|
|
|
2227
2227
|
}
|
|
2228
2228
|
});
|
|
2229
2229
|
if ((r == null ? void 0 : r.data.code) === 0) {
|
|
2230
|
-
this.etime = (t = r == null ? void 0 : r.data) == null ? void 0 : t.etime, this.positionGmt = (b = (f = (h = this.meteoData) == null ? void 0 : h.weather) == null ? void 0 : f[0]) == null ? void 0 : b.timezone, this.positionOffset = (
|
|
2231
|
-
let I = (
|
|
2232
|
-
const
|
|
2233
|
-
for (let x = 0; x <
|
|
2234
|
-
const
|
|
2235
|
-
(
|
|
2230
|
+
this.etime = (t = r == null ? void 0 : r.data) == null ? void 0 : t.etime, this.positionGmt = (b = (f = (h = this.meteoData) == null ? void 0 : h.weather) == null ? void 0 : f[0]) == null ? void 0 : b.timezone, this.positionOffset = (S = (E = (k = this.meteoData) == null ? void 0 : k.weather) == null ? void 0 : E[0]) == null ? void 0 : S.offset, this.issuedDate = M(this.etime).utc().format("MMM-DD/HHmm[Z], YYYY");
|
|
2231
|
+
let I = (Y = r == null ? void 0 : r.data.data) == null ? void 0 : Y.seasonal, y = X(this.etime).tz(this.positionGmt).set({ year: e.year(), month: e.month(), date: 1, hour: 0, minute: 0, second: 0 }).format();
|
|
2232
|
+
const he = M(a.endDate).diff(M(a.startDate), "day", !0);
|
|
2233
|
+
for (let x = 0; x < he; x++) {
|
|
2234
|
+
const Q = M(y).clone().add(x, "d").format(), T = ((U = ke.pickDaily(I, Q)) == null ? void 0 : U[0]) || {};
|
|
2235
|
+
(O = this.seasonalData) == null || O.dates.push(X(Q).tz(this.positionGmt).format("MMM-DD")), (se = this.seasonalData) == null || se.xDates.push(X(Q).tz(this.positionGmt).format("DD")), (F = this.seasonalData) == null || F.highTemp.push(this.roundPrecision((le = (ae = T == null ? void 0 : T.weather) == null ? void 0 : ae.temp) == null ? void 0 : le.max, 0)), (J = this.seasonalData) == null || J.lowTemp.push(this.roundPrecision((W = (R = T == null ? void 0 : T.weather) == null ? void 0 : R.temp) == null ? void 0 : W.min, 0)), (V = this.seasonalData) == null || V.windSpeed.push(this.roundPrecision((Z = (q = T.weather) == null ? void 0 : q.wind) == null ? void 0 : Z.kts, 1)), (ee = this.seasonalData) == null || ee.windDirection.push(($ = (_ = T.weather) == null ? void 0 : _.wind) == null ? void 0 : $.direction), (N = this.seasonalData) == null || N.precip.push(this.roundPrecision((c = (te = T == null ? void 0 : T.weather) == null ? void 0 : te.precip) == null ? void 0 : c.sum, 1));
|
|
2236
2236
|
}
|
|
2237
|
-
(((L = (z = r == null ? void 0 : r.data.data) == null ? void 0 : z.past) == null ? void 0 : L.reverse()) || []).forEach((x,
|
|
2238
|
-
var
|
|
2239
|
-
y =
|
|
2240
|
-
for (let H = 0; H <
|
|
2241
|
-
const oe = M(y).clone().add(H, "d").format(), fe = ((
|
|
2242
|
-
(
|
|
2237
|
+
(((L = (z = r == null ? void 0 : r.data.data) == null ? void 0 : z.past) == null ? void 0 : L.reverse()) || []).forEach((x, Q) => {
|
|
2238
|
+
var T, ce, A, G, ie, v, re, j, d, u, K, D, De;
|
|
2239
|
+
y = X(this.etime).tz(this.positionGmt).set({ year: e.year() - (Q + 1), month: e.month(), date: 1, hour: 0, minute: 0, second: 0 }).format();
|
|
2240
|
+
for (let H = 0; H < he; H++) {
|
|
2241
|
+
const oe = M(y).clone().add(H, "d").format(), fe = ((T = ke.pickDaily(x, oe)) == null ? void 0 : T[0]) || {};
|
|
2242
|
+
(G = this.seasonalData) == null || G.lastYearHighTemp.push(this.roundPrecision((A = (ce = fe == null ? void 0 : fe.weather) == null ? void 0 : ce.temp) == null ? void 0 : A.max, 0)), (re = this.seasonalData) == null || re.lastYearLowTemp.push(this.roundPrecision((v = (ie = fe == null ? void 0 : fe.weather) == null ? void 0 : ie.temp) == null ? void 0 : v.min, 0)), (u = this.seasonalData) == null || u.lastYearWindSpeed.push(this.roundPrecision((d = (j = fe.weather) == null ? void 0 : j.wind) == null ? void 0 : d.kts, 1)), (De = this.seasonalData) == null || De.lastYearPrecip.push(this.roundPrecision((D = (K = fe == null ? void 0 : fe.weather) == null ? void 0 : K.precip) == null ? void 0 : D.sum, 1));
|
|
2243
2243
|
}
|
|
2244
2244
|
}), this.seasonalData.offset = 4 + 0.5 / ((P = (m = this.seasonalData) == null ? void 0 : m.dates) == null ? void 0 : P.length) * 92 + "%", this.seasonalData.minHighTemp = Math.min(...this.seasonalData.highTemp.filter((x) => typeof x == "number" && !isNaN(x))), this.seasonalData.maxHighTemp = Math.max(...this.seasonalData.highTemp.filter((x) => typeof x == "number" && !isNaN(x))), this.seasonalData.minLowTemp = Math.min(...this.seasonalData.lowTemp.filter((x) => typeof x == "number" && !isNaN(x))), this.seasonalData.maxLowTemp = Math.max(...this.seasonalData.lowTemp.filter((x) => typeof x == "number" && !isNaN(x)));
|
|
2245
2245
|
let Ae = 0;
|
|
2246
|
-
this.seasonalData.highTemp.forEach((x,
|
|
2247
|
-
x === this.seasonalData.maxHighTemp && (Ae =
|
|
2246
|
+
this.seasonalData.highTemp.forEach((x, Q) => {
|
|
2247
|
+
x === this.seasonalData.maxHighTemp && (Ae = Q);
|
|
2248
2248
|
}), this.seasonalData.hottestDay = this.seasonalData.dates[Ae];
|
|
2249
2249
|
let g = 0;
|
|
2250
|
-
this.seasonalData.lowTemp.forEach((x,
|
|
2251
|
-
x === this.seasonalData.minLowTemp && (g =
|
|
2252
|
-
}), this.seasonalData.coldestDay = this.seasonalData.dates[g], this.seasonalData.meanWind = this.seasonalData.windSpeed.reduce((x,
|
|
2250
|
+
this.seasonalData.lowTemp.forEach((x, Q) => {
|
|
2251
|
+
x === this.seasonalData.minLowTemp && (g = Q);
|
|
2252
|
+
}), this.seasonalData.coldestDay = this.seasonalData.dates[g], this.seasonalData.meanWind = this.seasonalData.windSpeed.reduce((x, Q) => x + Q, 0) / ((C = this.seasonalData.windSpeed) == null ? void 0 : C.length), this.seasonalData.maxWindSpeed = Math.max(...this.seasonalData.windSpeed.filter((x) => typeof x == "number" && !isNaN(x)));
|
|
2253
2253
|
let pe = 0;
|
|
2254
|
-
this.seasonalData.windSpeed.forEach((x,
|
|
2255
|
-
x === this.seasonalData.maxWindSpeed && (pe =
|
|
2254
|
+
this.seasonalData.windSpeed.forEach((x, Q) => {
|
|
2255
|
+
x === this.seasonalData.maxWindSpeed && (pe = Q);
|
|
2256
2256
|
}), this.seasonalData.windiestDay = this.seasonalData.dates[pe], this.seasonalData.dominantWind = this.findMostFrequent(this.seasonalData.windDirection);
|
|
2257
2257
|
}
|
|
2258
2258
|
},
|
|
@@ -2266,7 +2266,7 @@ const et = (o, e) => {
|
|
|
2266
2266
|
return r;
|
|
2267
2267
|
},
|
|
2268
2268
|
initSeasonalEchart() {
|
|
2269
|
-
var R, J, q, Z, V, _, $, ee, te
|
|
2269
|
+
var R, W, J, q, Z, V, _, $, ee, te;
|
|
2270
2270
|
let o = Math.max(
|
|
2271
2271
|
...[...this.seasonalData.highTemp, ...this.seasonalData.lastYearHighTemp].filter((c) => typeof c == "number" && !isNaN(c))
|
|
2272
2272
|
), e = Math.min(...[...this.seasonalData.lowTemp, ...this.seasonalData.lastYearLowTemp].filter((c) => typeof c == "number" && !isNaN(c))), a = Math.ceil((o + 1) / 5) * 5, r = Math.floor((e - 1) / 5) * 5, t = Math.ceil((a - r) / 5);
|
|
@@ -2374,7 +2374,7 @@ const et = (o, e) => {
|
|
|
2374
2374
|
{
|
|
2375
2375
|
name: "High",
|
|
2376
2376
|
type: "line",
|
|
2377
|
-
data: (
|
|
2377
|
+
data: (W = this.seasonalData) == null ? void 0 : W.highTemp,
|
|
2378
2378
|
symbol: "none",
|
|
2379
2379
|
smooth: !1,
|
|
2380
2380
|
itemStyle: {
|
|
@@ -2388,7 +2388,7 @@ const et = (o, e) => {
|
|
|
2388
2388
|
name: "High, last year",
|
|
2389
2389
|
type: "line",
|
|
2390
2390
|
symbol: "none",
|
|
2391
|
-
data: (
|
|
2391
|
+
data: (J = this.seasonalData) == null ? void 0 : J.lastYearHighTemp,
|
|
2392
2392
|
itemStyle: {
|
|
2393
2393
|
color: "#f7c587"
|
|
2394
2394
|
},
|
|
@@ -2403,7 +2403,7 @@ const et = (o, e) => {
|
|
|
2403
2403
|
{
|
|
2404
2404
|
name: "Low",
|
|
2405
2405
|
type: "line",
|
|
2406
|
-
data: (
|
|
2406
|
+
data: (q = this.seasonalData) == null ? void 0 : q.lowTemp,
|
|
2407
2407
|
symbol: "none",
|
|
2408
2408
|
smooth: !1,
|
|
2409
2409
|
itemStyle: {
|
|
@@ -2417,7 +2417,7 @@ const et = (o, e) => {
|
|
|
2417
2417
|
name: "Low, last year",
|
|
2418
2418
|
type: "line",
|
|
2419
2419
|
symbol: "none",
|
|
2420
|
-
data: (
|
|
2420
|
+
data: (Z = this.seasonalData) == null ? void 0 : Z.lastYearLowTemp,
|
|
2421
2421
|
itemStyle: {
|
|
2422
2422
|
color: "#7baef7"
|
|
2423
2423
|
},
|
|
@@ -2451,8 +2451,8 @@ const et = (o, e) => {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
let b = Math.max(
|
|
2453
2453
|
...[...this.seasonalData.windSpeed, ...this.seasonalData.lastYearWindSpeed].filter((c) => typeof c == "number" && !isNaN(c))
|
|
2454
|
-
),
|
|
2455
|
-
const
|
|
2454
|
+
), E = Math.min(...[...this.seasonalData.windSpeed, ...this.seasonalData.lastYearWindSpeed].filter((c) => typeof c == "number" && !isNaN(c))) > 0 ? 0 : Math.min(...[...this.seasonalData.windSpeed, ...this.seasonalData.lastYearWindSpeed].filter((c) => typeof c == "number" && !isNaN(c))), S = Math.ceil((b + 1) / 5) * 5, Y = Math.ceil((S - E) / 5), U = Math.max(...[...this.seasonalData.precip, ...this.seasonalData.lastYearPrecip].filter((c) => typeof c == "number" && !isNaN(c))), se = 0, ae = Math.ceil(U * 2 / 5) * 5, le = Math.ceil((ae - se) / 5);
|
|
2455
|
+
const F = {
|
|
2456
2456
|
title: {
|
|
2457
2457
|
text: "Wind & Preciption",
|
|
2458
2458
|
top: "10px",
|
|
@@ -2478,22 +2478,22 @@ const et = (o, e) => {
|
|
|
2478
2478
|
show: !0,
|
|
2479
2479
|
position: "right",
|
|
2480
2480
|
formatter: (c) => {
|
|
2481
|
-
var z, L, m, P, C, I, y,
|
|
2481
|
+
var z, L, m, P, C, I, y, he, de, Ae, g, pe, x, Q, T, ce;
|
|
2482
2482
|
const N = (z = c == null ? void 0 : c[0]) == null ? void 0 : z.dataIndex;
|
|
2483
|
-
if (c.find((
|
|
2483
|
+
if (c.find((A) => A.seriesType === "scatter"))
|
|
2484
2484
|
return !1;
|
|
2485
2485
|
{
|
|
2486
|
-
let
|
|
2487
|
-
return ((L = c[2]) == null ? void 0 : L.value) < 9.9 ?
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2490
|
-
const
|
|
2491
|
-
|
|
2486
|
+
let A = { color: "", colorLastYear: "", url: "" };
|
|
2487
|
+
return ((L = c[2]) == null ? void 0 : L.value) < 9.9 ? A.color = "rgba(172, 210, 255, 1)" : ((m = c[2]) == null ? void 0 : m.value) < 24.9 ? A.color = "rgba(3, 248, 103, 1)" : ((P = c[2]) == null ? void 0 : P.value) < 49.9 ? A.color = "rgba(190, 226, 2, 18)" : ((C = c[2]) == null ? void 0 : C.value) < 99.9 ? A.color = "rgba(248, 1, 1, 1)" : ((I = c[2]) == null ? void 0 : I.value) > 100 ? A.color = "rgba(197, 5, 58, 1)" : A.color = "rgba(172, 210, 255, 1)", ((y = c[3]) == null ? void 0 : y.value) < 9.9 ? A.colorLastYear = "rgba(172, 210, 255, 1)" : ((he = c[3]) == null ? void 0 : he.value) < 24.9 ? A.colorLastYear = "rgba(3, 248, 103, 1)" : ((de = c[3]) == null ? void 0 : de.value) < 49.9 ? A.colorLastYear = "rgba(190, 226, 2, 18)" : ((Ae = c[3]) == null ? void 0 : Ae.value) < 99.9 ? A.colorLastYear = "rgba(248, 1, 1, 1)" : ((g = c[3]) == null ? void 0 : g.value) > 100 ? A.colorLastYear = "rgba(197, 5, 58, 1)" : A.colorLastYear = "rgba(172, 210, 255, 1)", A.url = (() => {
|
|
2488
|
+
const G = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
2489
|
+
G.setAttribute("width", "10"), G.setAttribute("height", "10"), G.setAttribute("viewBox", "0 0 10 10");
|
|
2490
|
+
const ie = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2491
|
+
ie.setAttribute("x", "0"), ie.setAttribute("y", "0"), ie.setAttribute("width", "10"), ie.setAttribute("height", "10"), ie.setAttribute("fill", A.colorLastYear), G.appendChild(ie);
|
|
2492
2492
|
const v = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
2493
|
-
v.setAttribute("x1", "0"), v.setAttribute("y1", "0"), v.setAttribute("x2", "10"), v.setAttribute("y2", "5"), v.setAttribute("stroke", "#fff"), v.setAttribute("stroke-width", "1"),
|
|
2493
|
+
v.setAttribute("x1", "0"), v.setAttribute("y1", "0"), v.setAttribute("x2", "10"), v.setAttribute("y2", "5"), v.setAttribute("stroke", "#fff"), v.setAttribute("stroke-width", "1"), G.appendChild(v);
|
|
2494
2494
|
const re = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
2495
|
-
re.setAttribute("x1", "0"), re.setAttribute("y1", "5"), re.setAttribute("x2", "10"), re.setAttribute("y2", "10"), re.setAttribute("stroke", "#fff"), re.setAttribute("stroke-width", "1"),
|
|
2496
|
-
const j = new XMLSerializer().serializeToString(
|
|
2495
|
+
re.setAttribute("x1", "0"), re.setAttribute("y1", "5"), re.setAttribute("x2", "10"), re.setAttribute("y2", "10"), re.setAttribute("stroke", "#fff"), re.setAttribute("stroke-width", "1"), G.appendChild(re);
|
|
2496
|
+
const j = new XMLSerializer().serializeToString(G), d = new Blob([j], { type: "image/svg+xml;charset=utf-8" });
|
|
2497
2497
|
return URL.createObjectURL(d);
|
|
2498
2498
|
})(), `<div style="font-size: 13px;"><strong>${(pe = this.seasonalData) == null ? void 0 : pe.dates[N]}</strong></div>
|
|
2499
2499
|
<div style="font-size: 13px;">
|
|
@@ -2502,15 +2502,15 @@ const et = (o, e) => {
|
|
|
2502
2502
|
</div>
|
|
2503
2503
|
<div style="font-size: 13px;">
|
|
2504
2504
|
<span style="display:inline-block; height: 10px;width: 10px;border-radius: 50%;background-color: #9af77b;}"></span>
|
|
2505
|
-
<span>Wind, last year : </span><strong>${(
|
|
2505
|
+
<span>Wind, last year : </span><strong>${(Q = c[1]) == null ? void 0 : Q.value}</strong><span style="padding-left: 3px;">kts</span>
|
|
2506
2506
|
</div>
|
|
2507
2507
|
<div style="font-size: 13px;">
|
|
2508
|
-
<span style="display:inline-block; height: 10px;width: 10px;border-radius: 50%;background-color: ${
|
|
2509
|
-
<span>Precip : </span><strong>${(
|
|
2508
|
+
<span style="display:inline-block; height: 10px;width: 10px;border-radius: 50%;background-color: ${A.color};}"></span>
|
|
2509
|
+
<span>Precip : </span><strong>${(T = c[2]) == null ? void 0 : T.value}</strong><span style="padding-left: 3px;">mm</span>
|
|
2510
2510
|
</div>
|
|
2511
2511
|
<div style="font-size: 13px;">
|
|
2512
|
-
<img src="${
|
|
2513
|
-
<span>Precip, last year : </span><strong>${(
|
|
2512
|
+
<img src="${A.url}" style="display:inline-block; height: 10px;width: 10px;border-radius: 50%;}" />
|
|
2513
|
+
<span>Precip, last year : </span><strong>${(ce = c[3]) == null ? void 0 : ce.value}</strong><span style="padding-left: 3px;">mm</span>
|
|
2514
2514
|
</div>
|
|
2515
2515
|
`;
|
|
2516
2516
|
}
|
|
@@ -2547,7 +2547,7 @@ const et = (o, e) => {
|
|
|
2547
2547
|
height: "50%",
|
|
2548
2548
|
type: "category",
|
|
2549
2549
|
boundaryGap: !0,
|
|
2550
|
-
data: (
|
|
2550
|
+
data: (V = this.seasonalData) == null ? void 0 : V.xDates,
|
|
2551
2551
|
axisLabel: {
|
|
2552
2552
|
show: !0
|
|
2553
2553
|
},
|
|
@@ -2569,9 +2569,9 @@ const et = (o, e) => {
|
|
|
2569
2569
|
type: "value",
|
|
2570
2570
|
name: "Wind speed max ( kts ) ",
|
|
2571
2571
|
show: !0,
|
|
2572
|
-
min:
|
|
2573
|
-
max:
|
|
2574
|
-
interval:
|
|
2572
|
+
min: E,
|
|
2573
|
+
max: S,
|
|
2574
|
+
interval: Y,
|
|
2575
2575
|
splitNumber: 5,
|
|
2576
2576
|
nameRotate: 90,
|
|
2577
2577
|
nameLocation: "middle",
|
|
@@ -2586,8 +2586,8 @@ const et = (o, e) => {
|
|
|
2586
2586
|
type: "value",
|
|
2587
2587
|
name: "Precipitation ( mm ) ",
|
|
2588
2588
|
show: !0,
|
|
2589
|
-
min:
|
|
2590
|
-
max:
|
|
2589
|
+
min: se,
|
|
2590
|
+
max: ae,
|
|
2591
2591
|
interval: le,
|
|
2592
2592
|
splitNumber: 5,
|
|
2593
2593
|
nameRotate: 90,
|
|
@@ -2684,7 +2684,7 @@ const et = (o, e) => {
|
|
|
2684
2684
|
{
|
|
2685
2685
|
name: "Wind",
|
|
2686
2686
|
type: "line",
|
|
2687
|
-
data: (
|
|
2687
|
+
data: (_ = this.seasonalData) == null ? void 0 : _.windSpeed,
|
|
2688
2688
|
symbol: "none",
|
|
2689
2689
|
smooth: !1,
|
|
2690
2690
|
itemStyle: {
|
|
@@ -2698,7 +2698,7 @@ const et = (o, e) => {
|
|
|
2698
2698
|
name: "Wind, last year",
|
|
2699
2699
|
type: "line",
|
|
2700
2700
|
symbol: "none",
|
|
2701
|
-
data: (
|
|
2701
|
+
data: ($ = this.seasonalData) == null ? void 0 : $.lastYearWindSpeed,
|
|
2702
2702
|
itemStyle: {
|
|
2703
2703
|
color: "#9af77b"
|
|
2704
2704
|
},
|
|
@@ -2715,7 +2715,7 @@ const et = (o, e) => {
|
|
|
2715
2715
|
type: "bar",
|
|
2716
2716
|
yAxisIndex: 1,
|
|
2717
2717
|
barWidth: "30%",
|
|
2718
|
-
data: (
|
|
2718
|
+
data: (ee = this.seasonalData) == null ? void 0 : ee.precip,
|
|
2719
2719
|
symbol: "none",
|
|
2720
2720
|
smooth: !1,
|
|
2721
2721
|
itemStyle: {
|
|
@@ -2730,7 +2730,7 @@ const et = (o, e) => {
|
|
|
2730
2730
|
type: "bar",
|
|
2731
2731
|
yAxisIndex: 1,
|
|
2732
2732
|
barWidth: "30%",
|
|
2733
|
-
data: (
|
|
2733
|
+
data: (te = this.seasonalData) == null ? void 0 : te.lastYearPrecip,
|
|
2734
2734
|
itemStyle: {
|
|
2735
2735
|
color: "rgba(12,116,168,0.5)"
|
|
2736
2736
|
},
|
|
@@ -2741,14 +2741,14 @@ const et = (o, e) => {
|
|
|
2741
2741
|
]
|
|
2742
2742
|
};
|
|
2743
2743
|
this.$nextTick(() => {
|
|
2744
|
-
xe.init(document.getElementById("wind-precip-echart")).setOption(
|
|
2744
|
+
xe.init(document.getElementById("wind-precip-echart")).setOption(F);
|
|
2745
2745
|
});
|
|
2746
2746
|
},
|
|
2747
2747
|
disposeEcharts() {
|
|
2748
2748
|
document.getElementById("weather-chart") && xe.dispose(document.getElementById("weather-chart")), document.getElementById("weather-icons") && xe.dispose(document.getElementById("weather-icons")), document.getElementById("weather-condition") && xe.dispose(document.getElementById("weather-condition")), document.getElementById("wave-swell") && xe.dispose(document.getElementById("wave-swell")), document.getElementById("temperature-echart") && xe.dispose(document.getElementById("temperature-echart")), document.getElementById("wind-precip-echart") && xe.dispose(document.getElementById("wind-precip-echart"));
|
|
2749
2749
|
},
|
|
2750
2750
|
initHoursTableData() {
|
|
2751
|
-
var o, e, a, r, t, h, f, b, k,
|
|
2751
|
+
var o, e, a, r, t, h, f, b, k, E, S, Y, U, O, se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P;
|
|
2752
2752
|
this.hoursTableData = {
|
|
2753
2753
|
hours: [],
|
|
2754
2754
|
utcHours: [],
|
|
@@ -2779,7 +2779,7 @@ const et = (o, e) => {
|
|
|
2779
2779
|
const I = M(this.pickedDate).clone().add(C, "h").format();
|
|
2780
2780
|
this.hoursTableData.hours.push(I);
|
|
2781
2781
|
const y = ((o = ke.pickHourly(this.meteoData, I)) == null ? void 0 : o[0]) || {};
|
|
2782
|
-
this.hoursTableData.weatherUrls.push((e = y.weather) == null ? void 0 : e.url), this.hoursTableData.weatherNames.push(((a = y.weather) == null ? void 0 : a.name) ?? "-"), this.hoursTableData.temp.push(this.roundPrecision((r = y.weather) == null ? void 0 : r.temp, 0) ?? "-"), this.hoursTableData.precipProbability.push(this.roundPrecision((h = (t = y.weather) == null ? void 0 : t.precip) == null ? void 0 : h.probability, 1) ?? "-"), this.hoursTableData.precip1h.push(this.roundPrecision((b = (f = y.weather) == null ? void 0 : f.precip) == null ? void 0 : b.sum, 1) ?? "-"), this.hoursTableData.visibility.push(this.roundPrecision((k = y.weather) == null ? void 0 : k.visibility, 0) ?? "-"), this.hoursTableData.humidity.push(this.roundPrecision((
|
|
2782
|
+
this.hoursTableData.weatherUrls.push((e = y.weather) == null ? void 0 : e.url), this.hoursTableData.weatherNames.push(((a = y.weather) == null ? void 0 : a.name) ?? "-"), this.hoursTableData.temp.push(this.roundPrecision((r = y.weather) == null ? void 0 : r.temp, 0) ?? "-"), this.hoursTableData.precipProbability.push(this.roundPrecision((h = (t = y.weather) == null ? void 0 : t.precip) == null ? void 0 : h.probability, 1) ?? "-"), this.hoursTableData.precip1h.push(this.roundPrecision((b = (f = y.weather) == null ? void 0 : f.precip) == null ? void 0 : b.sum, 1) ?? "-"), this.hoursTableData.visibility.push(this.roundPrecision((k = y.weather) == null ? void 0 : k.visibility, 0) ?? "-"), this.hoursTableData.humidity.push(this.roundPrecision((E = y.weather) == null ? void 0 : E.rh, 0) ?? "-"), this.hoursTableData.windSpeed.push(this.roundPrecision((Y = (S = y.weather) == null ? void 0 : S.wind) == null ? void 0 : Y.kts, 1)), this.hoursTableData.windDir.push((O = (U = y.weather) == null ? void 0 : U.wind) == null ? void 0 : O.bearing), this.hoursTableData.windGust.push(this.roundPrecision((ae = (se = y.weather) == null ? void 0 : se.wind) == null ? void 0 : ae.gusts, 1) ?? "-"), this.hoursTableData.sigwaveHeight.push(this.roundPrecision((F = (le = y.wave) == null ? void 0 : le.sig) == null ? void 0 : F.height, 1) ?? "-"), this.hoursTableData.sigwaveDir.push((W = (R = y.wave) == null ? void 0 : R.sig) == null ? void 0 : W.bearing), this.hoursTableData.windwaveHeight.push(this.roundPrecision((q = (J = y.wave) == null ? void 0 : J.wd) == null ? void 0 : q.height, 1) ?? "-"), this.hoursTableData.windwaveDir.push((V = (Z = y.wave) == null ? void 0 : Z.wd) == null ? void 0 : V.bearing), this.hoursTableData.windwavePeriod.push(this.roundPrecision(($ = (_ = y.wave) == null ? void 0 : _.wd) == null ? void 0 : $.period, 1) ?? "-"), this.hoursTableData.swellHeight.push(this.roundPrecision((te = (ee = y.wave) == null ? void 0 : ee.swell) == null ? void 0 : te.height, 1) ?? "-"), this.hoursTableData.swellDir.push((N = (c = y.wave) == null ? void 0 : c.swell) == null ? void 0 : N.bearing), this.hoursTableData.swellPeriod.push(this.roundPrecision((L = (z = y.wave) == null ? void 0 : z.swell) == null ? void 0 : L.period, 1) ?? "-"), this.hoursTableData.currentSpeed.push(this.roundPrecision((m = y.current) == null ? void 0 : m.speed, 1) ?? "-"), this.hoursTableData.currentDir.push((P = y.current) == null ? void 0 : P.bearing), this.hoursTableData.seaLevel.push(this.roundPrecision(y.height, 1) ?? "-"), this.hoursTableData.seaTemp.push(this.roundPrecision(y.sst, 0) ?? "-");
|
|
2783
2783
|
}
|
|
2784
2784
|
this.loading.hoursTable = !1;
|
|
2785
2785
|
},
|
|
@@ -2787,11 +2787,11 @@ const et = (o, e) => {
|
|
|
2787
2787
|
this.position = {}, this.meteoData = {}, this.followItem = void 0, xe && document.getElementById("weather-chart") && xe.dispose(document.getElementById("weather-chart"));
|
|
2788
2788
|
},
|
|
2789
2789
|
initDaysTableData() {
|
|
2790
|
-
var e, a, r, t, h, f, b, k,
|
|
2790
|
+
var e, a, r, t, h, f, b, k, E, S, Y, U, O, se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C, I, y, he;
|
|
2791
2791
|
this.daysTableData = [];
|
|
2792
|
-
const o =
|
|
2793
|
-
for (let
|
|
2794
|
-
const Ae = M(o).clone().add(
|
|
2792
|
+
const o = X(this.etime).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format();
|
|
2793
|
+
for (let de = 0; de < 14; de++) {
|
|
2794
|
+
const Ae = M(o).clone().add(de, "d").format(), g = ((e = ke.pickDaily(this.meteoData, Ae)) == null ? void 0 : e[0]) || {};
|
|
2795
2795
|
this.daysTableData.push({
|
|
2796
2796
|
localWeek: this.computeWeekLT(Ae),
|
|
2797
2797
|
localDate: this.computeMMMDDLT(Ae),
|
|
@@ -2799,56 +2799,56 @@ const et = (o, e) => {
|
|
|
2799
2799
|
minTemp: this.roundPrecision((t = (r = g == null ? void 0 : g.weather) == null ? void 0 : r.temp) == null ? void 0 : t.min, 0) ?? "-",
|
|
2800
2800
|
maxTemp: this.roundPrecision((f = (h = g == null ? void 0 : g.weather) == null ? void 0 : h.temp) == null ? void 0 : f.max, 0) ?? "-",
|
|
2801
2801
|
weatherName: (b = g == null ? void 0 : g.weather) == null ? void 0 : b.name,
|
|
2802
|
-
precipSum: this.roundPrecision((
|
|
2803
|
-
precipRainSum: this.roundPrecision((
|
|
2804
|
-
precipSnowfallSum: this.roundPrecision((
|
|
2805
|
-
windSpeedMax: this.roundPrecision((
|
|
2806
|
-
windSpeedDir: (
|
|
2807
|
-
gustSpeedMax: this.roundPrecision((
|
|
2808
|
-
windWaveHeight: this.roundPrecision((
|
|
2809
|
-
windWavePeriod: this.roundPrecision((
|
|
2810
|
-
windWaveDir: (
|
|
2811
|
-
swellWaveHeight: this.roundPrecision((
|
|
2802
|
+
precipSum: this.roundPrecision((E = (k = g == null ? void 0 : g.weather) == null ? void 0 : k.precip) == null ? void 0 : E.sum, 1) ?? "-",
|
|
2803
|
+
precipRainSum: this.roundPrecision((Y = (S = g == null ? void 0 : g.weather) == null ? void 0 : S.precip) == null ? void 0 : Y.rainSum, 1) ?? "-",
|
|
2804
|
+
precipSnowfallSum: this.roundPrecision((O = (U = g == null ? void 0 : g.weather) == null ? void 0 : U.precip) == null ? void 0 : O.snowfallSum, 1) ?? "-",
|
|
2805
|
+
windSpeedMax: this.roundPrecision((ae = (se = g == null ? void 0 : g.weather) == null ? void 0 : se.wind) == null ? void 0 : ae.kts, 1) ?? "-",
|
|
2806
|
+
windSpeedDir: (F = (le = g == null ? void 0 : g.weather) == null ? void 0 : le.wind) == null ? void 0 : F.bearing,
|
|
2807
|
+
gustSpeedMax: this.roundPrecision((W = (R = g == null ? void 0 : g.weather) == null ? void 0 : R.wind) == null ? void 0 : W.gusts, 1) ?? "-",
|
|
2808
|
+
windWaveHeight: this.roundPrecision((q = (J = g == null ? void 0 : g.wave) == null ? void 0 : J.wd) == null ? void 0 : q.height, 1) ?? "-",
|
|
2809
|
+
windWavePeriod: this.roundPrecision((V = (Z = g == null ? void 0 : g.wave) == null ? void 0 : Z.wd) == null ? void 0 : V.period, 1) ?? "-",
|
|
2810
|
+
windWaveDir: ($ = (_ = g == null ? void 0 : g.wave) == null ? void 0 : _.wd) == null ? void 0 : $.bearing,
|
|
2811
|
+
swellWaveHeight: this.roundPrecision((te = (ee = g == null ? void 0 : g.wave) == null ? void 0 : ee.swell) == null ? void 0 : te.height, 1) ?? "-",
|
|
2812
2812
|
swellWavePeriod: this.roundPrecision((N = (c = g == null ? void 0 : g.wave) == null ? void 0 : c.swell) == null ? void 0 : N.period, 1) ?? "-",
|
|
2813
2813
|
swellWaveDir: (L = (z = g == null ? void 0 : g.wave) == null ? void 0 : z.swell) == null ? void 0 : L.bearing,
|
|
2814
2814
|
sigWaveHeight: this.roundPrecision((P = (m = g == null ? void 0 : g.wave) == null ? void 0 : m.sig) == null ? void 0 : P.height, 1) ?? "-",
|
|
2815
2815
|
sigWavePeriod: this.roundPrecision((I = (C = g == null ? void 0 : g.wave) == null ? void 0 : C.sig) == null ? void 0 : I.period, 1) ?? "-",
|
|
2816
|
-
sigWaveDir: (
|
|
2816
|
+
sigWaveDir: (he = (y = g == null ? void 0 : g.wave) == null ? void 0 : y.sig) == null ? void 0 : he.bearing
|
|
2817
2817
|
});
|
|
2818
2818
|
}
|
|
2819
2819
|
this.loading.daysTable = !1;
|
|
2820
2820
|
},
|
|
2821
2821
|
initHourlyTableData(o, e, a, r) {
|
|
2822
|
-
var b, k,
|
|
2822
|
+
var b, k, E, S, Y, U, O, se, ae, le, F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C, I, y, he, de, Ae, g, pe, x;
|
|
2823
2823
|
this.hourlyTableData = [];
|
|
2824
|
-
const t = e || 14, h = a || this.etime, f =
|
|
2825
|
-
for (let
|
|
2826
|
-
let
|
|
2827
|
-
if (
|
|
2828
|
-
const
|
|
2824
|
+
const t = e || 14, h = a || this.etime, f = X(h).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format();
|
|
2825
|
+
for (let Q = 0; Q < t * 24; Q++) {
|
|
2826
|
+
let T, ce;
|
|
2827
|
+
if (Q % 3 === 0 && (ce = 3), r ? Q % 3 === 0 && (T = M(f).clone().add(Q, "h").format()) : Q < 3 * 24 ? T = M(f).clone().add(Q, "h").format() : Q < 7 * 24 ? Q % 3 === 0 && (T = M(f).clone().add(Q, "h").format()) : Q % 6 === 0 && (T = M(f).clone().add(Q, "h").format()), T) {
|
|
2828
|
+
const A = ((b = ke.pickHourly(o, T)) == null ? void 0 : b[0]) || {}, G = ce === 6 ? this.roundPrecision((E = (k = A == null ? void 0 : A.weather) == null ? void 0 : k.precip) == null ? void 0 : E.sum6Hours, 1) : ce === 3 ? this.roundPrecision((Y = (S = A == null ? void 0 : A.weather) == null ? void 0 : S.precip) == null ? void 0 : Y.sum3Hours, 1) : "-";
|
|
2829
2829
|
this.hourlyTableData.push({
|
|
2830
|
-
localDate: this.computeMMMDDHHmmLT(
|
|
2831
|
-
temp: this.roundPrecision((U =
|
|
2832
|
-
precipSum:
|
|
2833
|
-
visibility: this.roundPrecision((
|
|
2834
|
-
windSpeed: this.roundPrecision((
|
|
2835
|
-
windDir: (
|
|
2836
|
-
windBearing: (
|
|
2837
|
-
windBF: ((
|
|
2838
|
-
windGusts: this.roundPrecision((
|
|
2839
|
-
windWaveHeight: this.roundPrecision((
|
|
2840
|
-
windWavePeriod: this.roundPrecision((
|
|
2841
|
-
windWaveDir: (N = (c =
|
|
2842
|
-
windWaveBearing: (L = (z =
|
|
2843
|
-
sigWaveHeight: this.roundPrecision((P = (m =
|
|
2844
|
-
sigWavePeriod: this.roundPrecision((I = (C =
|
|
2845
|
-
sigWaveDir: (
|
|
2846
|
-
sigWaveBearing: (Ae = (
|
|
2847
|
-
currentDir: (g =
|
|
2848
|
-
currentSpd: this.roundPrecision((pe =
|
|
2849
|
-
currentBearing: (
|
|
2850
|
-
seaLevel: this.roundPrecision(
|
|
2851
|
-
seaSurfaceTemp: this.roundPrecision(
|
|
2830
|
+
localDate: this.computeMMMDDHHmmLT(T),
|
|
2831
|
+
temp: this.roundPrecision((U = A == null ? void 0 : A.weather) == null ? void 0 : U.temp, 0) ?? "-",
|
|
2832
|
+
precipSum: G ?? "-",
|
|
2833
|
+
visibility: this.roundPrecision((O = A == null ? void 0 : A.weather) == null ? void 0 : O.visibility, 1) ?? "-",
|
|
2834
|
+
windSpeed: this.roundPrecision((ae = (se = A == null ? void 0 : A.weather) == null ? void 0 : se.wind) == null ? void 0 : ae.kts, 1) ?? "-",
|
|
2835
|
+
windDir: (F = (le = A == null ? void 0 : A.weather) == null ? void 0 : le.wind) == null ? void 0 : F.direction,
|
|
2836
|
+
windBearing: (W = (R = A == null ? void 0 : A.weather) == null ? void 0 : R.wind) == null ? void 0 : W.bearing,
|
|
2837
|
+
windBF: ((q = (J = A == null ? void 0 : A.weather) == null ? void 0 : J.wind) == null ? void 0 : q.scale) ?? "-",
|
|
2838
|
+
windGusts: this.roundPrecision((V = (Z = A == null ? void 0 : A.weather) == null ? void 0 : Z.wind) == null ? void 0 : V.gusts, 1) ?? "-",
|
|
2839
|
+
windWaveHeight: this.roundPrecision(($ = (_ = A == null ? void 0 : A.wave) == null ? void 0 : _.wd) == null ? void 0 : $.height, 1) ?? "-",
|
|
2840
|
+
windWavePeriod: this.roundPrecision((te = (ee = A == null ? void 0 : A.wave) == null ? void 0 : ee.wd) == null ? void 0 : te.period, 1) ?? "-",
|
|
2841
|
+
windWaveDir: (N = (c = A == null ? void 0 : A.wave) == null ? void 0 : c.wd) == null ? void 0 : N.direction,
|
|
2842
|
+
windWaveBearing: (L = (z = A == null ? void 0 : A.wave) == null ? void 0 : z.wd) == null ? void 0 : L.bearing,
|
|
2843
|
+
sigWaveHeight: this.roundPrecision((P = (m = A == null ? void 0 : A.wave) == null ? void 0 : m.sig) == null ? void 0 : P.height, 1) ?? "-",
|
|
2844
|
+
sigWavePeriod: this.roundPrecision((I = (C = A == null ? void 0 : A.wave) == null ? void 0 : C.sig) == null ? void 0 : I.period, 1) ?? "-",
|
|
2845
|
+
sigWaveDir: (he = (y = A == null ? void 0 : A.wave) == null ? void 0 : y.sig) == null ? void 0 : he.direction,
|
|
2846
|
+
sigWaveBearing: (Ae = (de = A == null ? void 0 : A.wave) == null ? void 0 : de.sig) == null ? void 0 : Ae.bearing,
|
|
2847
|
+
currentDir: (g = A == null ? void 0 : A.current) == null ? void 0 : g.direction,
|
|
2848
|
+
currentSpd: this.roundPrecision((pe = A == null ? void 0 : A.current) == null ? void 0 : pe.kts, 1) ?? "-",
|
|
2849
|
+
currentBearing: (x = A == null ? void 0 : A.current) == null ? void 0 : x.bearing,
|
|
2850
|
+
seaLevel: this.roundPrecision(A == null ? void 0 : A.height, 1) ?? "-",
|
|
2851
|
+
seaSurfaceTemp: this.roundPrecision(A == null ? void 0 : A.sst, 0) ?? "-"
|
|
2852
2852
|
});
|
|
2853
2853
|
}
|
|
2854
2854
|
}
|
|
@@ -3094,9 +3094,9 @@ const et = (o, e) => {
|
|
|
3094
3094
|
class: "text"
|
|
3095
3095
|
}, La = { class: "info-box-item flex-center" };
|
|
3096
3096
|
function ka(o, e, a, r, t, h) {
|
|
3097
|
-
var
|
|
3098
|
-
const f = Ie("ElOption"), b = Ie("ElSelect"), k = Ie("ElTooltip"),
|
|
3099
|
-
return n(),
|
|
3097
|
+
var F, R, W, J, q, Z, V, _, $, ee, te, c, N, z, L, m, P, C, I, y, he, de, Ae, g, pe, x, Q, T, ce, A, G, ie, v, re, j, d, u, K, D, De, H, oe, fe, B;
|
|
3098
|
+
const f = Ie("ElOption"), b = Ie("ElSelect"), k = Ie("ElTooltip"), E = Ie("Calendar"), S = Ie("el-icon"), Y = Ie("ArrowRightBold"), U = Ie("ElIcon"), O = Ie("el-date-picker"), se = Ie("ElInput"), ae = Ie("ElButton"), le = Ie("ElDialog");
|
|
3099
|
+
return n(), l("div", st, [
|
|
3100
3100
|
s("div", at, [
|
|
3101
3101
|
s("div", it, [
|
|
3102
3102
|
s("div", ot, [
|
|
@@ -3116,7 +3116,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3116
3116
|
onChange: h.handleSearch
|
|
3117
3117
|
}, {
|
|
3118
3118
|
default: Le(() => [
|
|
3119
|
-
(n(!0),
|
|
3119
|
+
(n(!0), l(me, null, ue(t.positionList, (i) => (n(), Ge(f, {
|
|
3120
3120
|
key: i.name,
|
|
3121
3121
|
label: i.nameRemark,
|
|
3122
3122
|
value: i.name
|
|
@@ -3148,10 +3148,10 @@ function ka(o, e, a, r, t, h) {
|
|
|
3148
3148
|
s("div", rt, [
|
|
3149
3149
|
s("div", lt, [
|
|
3150
3150
|
s("div", null, [
|
|
3151
|
-
s("div", At, p(t.menuIndex === 4 ? "Seasonal" : "") + " Weather forecast for " + p(((
|
|
3151
|
+
s("div", At, p(t.menuIndex === 4 ? "Seasonal" : "") + " Weather forecast for " + p(((F = t.position) == null ? void 0 : F.name) || "-") + " ( UTC" + p(t.positionOffset) + " )", 1),
|
|
3152
3152
|
s("div", ht, [
|
|
3153
3153
|
ne(" At " + p((R = t.position) != null && R.portId ? "port" : "coordinates"), 1),
|
|
3154
|
-
(
|
|
3154
|
+
(W = t.position) != null && W.portId ? (n(), l("span", dt, ", " + p(h.computeLat(t.position.lat)) + ", " + p(h.computeLng(t.position.lng)), 1)) : Qe("", !0),
|
|
3155
3155
|
ne(", issued " + p(t.issuedDate), 1)
|
|
3156
3156
|
])
|
|
3157
3157
|
]),
|
|
@@ -3163,11 +3163,11 @@ function ka(o, e, a, r, t, h) {
|
|
|
3163
3163
|
"show-after": 1e3
|
|
3164
3164
|
}, {
|
|
3165
3165
|
default: Le(() => [
|
|
3166
|
-
t.followItem ? (n(),
|
|
3166
|
+
t.followItem ? (n(), l("span", {
|
|
3167
3167
|
key: 0,
|
|
3168
3168
|
class: "iconfont icon active",
|
|
3169
3169
|
onClick: e[6] || (e[6] = (...i) => h.handleFollowDialogOpen && h.handleFollowDialogOpen(...i))
|
|
3170
|
-
}, "")) : (n(),
|
|
3170
|
+
}, "")) : (n(), l("span", {
|
|
3171
3171
|
key: 1,
|
|
3172
3172
|
class: "iconfont icon",
|
|
3173
3173
|
onClick: e[7] || (e[7] = (...i) => h.handleFollowDialogOpen && h.handleFollowDialogOpen(...i))
|
|
@@ -3177,8 +3177,8 @@ function ka(o, e, a, r, t, h) {
|
|
|
3177
3177
|
}, 8, ["content"])
|
|
3178
3178
|
])
|
|
3179
3179
|
]),
|
|
3180
|
-
t.menuIndex === 1 || t.menuIndex === 2 || t.menuIndex === 3 ? (n(),
|
|
3181
|
-
(
|
|
3180
|
+
t.menuIndex === 1 || t.menuIndex === 2 || t.menuIndex === 3 ? (n(), l("div", ct, [
|
|
3181
|
+
(J = t.position) != null && J.name && a.token && !((q = t.loading) != null && q.meteogramEchart) ? (n(), l("div", wt, [
|
|
3182
3182
|
s("div", pt, [
|
|
3183
3183
|
e[14] || (e[14] = s("div", { style: { "margin-right": "20px" } }, "Meteogram", -1)),
|
|
3184
3184
|
Fe(s("div", {
|
|
@@ -3187,19 +3187,19 @@ function ka(o, e, a, r, t, h) {
|
|
|
3187
3187
|
style: { cursor: "pointer" },
|
|
3188
3188
|
onClick: e[8] || (e[8] = (i) => t.meteoData.showDateSelect = !t.meteoData.showDateSelect)
|
|
3189
3189
|
}, [
|
|
3190
|
-
be(
|
|
3190
|
+
be(S, {
|
|
3191
3191
|
size: "16",
|
|
3192
3192
|
style: { "margin-right": "10px" }
|
|
3193
3193
|
}, {
|
|
3194
3194
|
default: Le(() => [
|
|
3195
|
-
be(
|
|
3195
|
+
be(E)
|
|
3196
3196
|
]),
|
|
3197
3197
|
_: 1
|
|
3198
3198
|
}),
|
|
3199
3199
|
s("span", mt, p(h.computeMMMDDyyyyLT(t.dateRangeZ[0])) + " ~ " + p(h.computeMMMDDyyyyLT(t.dateRangeZ[1])), 1),
|
|
3200
3200
|
be(U, { size: "16" }, {
|
|
3201
3201
|
default: Le(() => [
|
|
3202
|
-
be(
|
|
3202
|
+
be(Y)
|
|
3203
3203
|
]),
|
|
3204
3204
|
_: 1
|
|
3205
3205
|
})
|
|
@@ -3207,7 +3207,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3207
3207
|
[Oe, t.menuIndex === 1]
|
|
3208
3208
|
]),
|
|
3209
3209
|
Fe(s("div", ut, [
|
|
3210
|
-
be(
|
|
3210
|
+
be(O, {
|
|
3211
3211
|
modelValue: t.dateRange,
|
|
3212
3212
|
"onUpdate:modelValue": e[9] || (e[9] = (i) => t.dateRange = i),
|
|
3213
3213
|
type: "daterange",
|
|
@@ -3220,29 +3220,29 @@ function ka(o, e, a, r, t, h) {
|
|
|
3220
3220
|
onChange: h.handleDateRange
|
|
3221
3221
|
}, null, 8, ["modelValue", "shortcuts", "disabledDate", "onCalendarChange", "onChange"])
|
|
3222
3222
|
], 512), [
|
|
3223
|
-
[Oe, ((
|
|
3223
|
+
[Oe, ((Z = t.meteoData) == null ? void 0 : Z.showDateSelect) && t.menuIndex === 1]
|
|
3224
3224
|
])
|
|
3225
3225
|
]),
|
|
3226
3226
|
e[15] || (e[15] = s("div", { id: "weather-icons" }, null, -1)),
|
|
3227
3227
|
e[16] || (e[16] = s("div", { id: "weather-condition" }, null, -1)),
|
|
3228
3228
|
e[17] || (e[17] = s("div", { id: "wave-swell" }, null, -1))
|
|
3229
|
-
])) : (
|
|
3229
|
+
])) : (V = t.loading) != null && V.meteogramEchart ? (n(), l("div", ft, e[18] || (e[18] = [
|
|
3230
3230
|
s("img", {
|
|
3231
3231
|
style: { height: "200px" },
|
|
3232
3232
|
src: He
|
|
3233
3233
|
}, null, -1)
|
|
3234
|
-
]))) : (n(),
|
|
3234
|
+
]))) : (n(), l("div", Dt, "No Data"))
|
|
3235
3235
|
])) : Qe("", !0),
|
|
3236
|
-
t.menuIndex === 2 ? (n(),
|
|
3237
|
-
(
|
|
3236
|
+
t.menuIndex === 2 ? (n(), l("div", yt, [
|
|
3237
|
+
(_ = t.position) != null && _.name && a.token && !(($ = t.loading) != null && $.weatherEchart) ? (n(), l("div", Bt)) : (ee = t.loading) != null && ee.weatherEchart ? (n(), l("div", xt, e[19] || (e[19] = [
|
|
3238
3238
|
s("img", {
|
|
3239
3239
|
style: { height: "200px" },
|
|
3240
3240
|
src: He
|
|
3241
3241
|
}, null, -1)
|
|
3242
|
-
]))) : (n(),
|
|
3242
|
+
]))) : (n(), l("div", vt, "No Data"))
|
|
3243
3243
|
])) : Qe("", !0),
|
|
3244
|
-
t.menuIndex === 2 ? (n(),
|
|
3245
|
-
(
|
|
3244
|
+
t.menuIndex === 2 ? (n(), l("div", Ct, [
|
|
3245
|
+
(te = t.position) != null && te.name && a.token && !((c = t.loading) != null && c.hoursTable) ? (n(), l("div", It, [
|
|
3246
3246
|
s("div", bt, p(t.pickedWeek) + " " + p(h.computeMMMDDLT(t.pickedDate)), 1),
|
|
3247
3247
|
s("table", Et, [
|
|
3248
3248
|
s("tr", Qt, [
|
|
@@ -3254,7 +3254,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3254
3254
|
ne("Local time"),
|
|
3255
3255
|
s("span", { class: "unit" }, "(LT)")
|
|
3256
3256
|
], -1)),
|
|
3257
|
-
(n(!0),
|
|
3257
|
+
(n(!0), l(me, null, ue(t.hoursTableData.hours, (i, w) => (n(), l("th", {
|
|
3258
3258
|
key: `${i}${w}hoursLT`,
|
|
3259
3259
|
rowspan: "1",
|
|
3260
3260
|
colspan: "1",
|
|
@@ -3270,7 +3270,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3270
3270
|
ne("UTC"),
|
|
3271
3271
|
s("span", { class: "unit" })
|
|
3272
3272
|
], -1)),
|
|
3273
|
-
(n(!0),
|
|
3273
|
+
(n(!0), l(me, null, ue(t.hoursTableData.hours, (i, w) => (n(), l("th", {
|
|
3274
3274
|
key: `${i}${w}hoursLZ`,
|
|
3275
3275
|
rowspan: "1",
|
|
3276
3276
|
colspan: "1",
|
|
@@ -3286,7 +3286,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3286
3286
|
ne("Weather"),
|
|
3287
3287
|
s("span", { class: "unit" })
|
|
3288
3288
|
], -1)),
|
|
3289
|
-
(n(!0),
|
|
3289
|
+
(n(!0), l(me, null, ue(t.hoursTableData.weatherUrls, (i, w) => (n(), l("td", {
|
|
3290
3290
|
key: `${i}${w}weatherUrls-weatherNames`,
|
|
3291
3291
|
rowspan: "1",
|
|
3292
3292
|
colspan: "1",
|
|
@@ -3299,7 +3299,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3299
3299
|
"show-after": 500
|
|
3300
3300
|
}, {
|
|
3301
3301
|
default: Le(() => [
|
|
3302
|
-
i ? (n(),
|
|
3302
|
+
i ? (n(), l("img", {
|
|
3303
3303
|
key: 0,
|
|
3304
3304
|
class: "iconfont weather-icon",
|
|
3305
3305
|
src: i
|
|
@@ -3318,7 +3318,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3318
3318
|
ne("Temperature"),
|
|
3319
3319
|
s("span", { class: "unit" }, "°C")
|
|
3320
3320
|
], -1)),
|
|
3321
|
-
(n(!0),
|
|
3321
|
+
(n(!0), l(me, null, ue(t.hoursTableData.temp, (i, w) => (n(), l("td", {
|
|
3322
3322
|
key: `${i}${w}temp`,
|
|
3323
3323
|
rowspan: "1",
|
|
3324
3324
|
colspan: "1",
|
|
@@ -3334,7 +3334,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3334
3334
|
ne("Precipitation Probability"),
|
|
3335
3335
|
s("span", { class: "unit" }, "%")
|
|
3336
3336
|
], -1)),
|
|
3337
|
-
(n(!0),
|
|
3337
|
+
(n(!0), l(me, null, ue(t.hoursTableData.precipProbability, (i, w) => (n(), l("td", {
|
|
3338
3338
|
key: `${i}${w}precipProbability`,
|
|
3339
3339
|
rowspan: "1",
|
|
3340
3340
|
colspan: "1",
|
|
@@ -3350,7 +3350,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3350
3350
|
ne("Precipitation 1h"),
|
|
3351
3351
|
s("span", { class: "unit" }, "mm")
|
|
3352
3352
|
], -1)),
|
|
3353
|
-
(n(!0),
|
|
3353
|
+
(n(!0), l(me, null, ue(t.hoursTableData.precip1h, (i, w) => (n(), l("td", {
|
|
3354
3354
|
key: `${i}${w}precip1h`,
|
|
3355
3355
|
rowspan: "1",
|
|
3356
3356
|
colspan: "1",
|
|
@@ -3366,7 +3366,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3366
3366
|
ne("Visibility"),
|
|
3367
3367
|
s("span", { class: "unit" }, "nm")
|
|
3368
3368
|
], -1)),
|
|
3369
|
-
(n(!0),
|
|
3369
|
+
(n(!0), l(me, null, ue(t.hoursTableData.visibility, (i, w) => (n(), l("td", {
|
|
3370
3370
|
key: `${i}${w}visibility`,
|
|
3371
3371
|
rowspan: "1",
|
|
3372
3372
|
colspan: "1",
|
|
@@ -3382,7 +3382,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3382
3382
|
ne("Relative Humidity"),
|
|
3383
3383
|
s("span", { class: "unit" }, "%")
|
|
3384
3384
|
], -1)),
|
|
3385
|
-
(n(!0),
|
|
3385
|
+
(n(!0), l(me, null, ue(t.hoursTableData.humidity, (i, w) => (n(), l("td", {
|
|
3386
3386
|
key: `${i}${w}humidity`,
|
|
3387
3387
|
rowspan: "1",
|
|
3388
3388
|
colspan: "1",
|
|
@@ -3398,13 +3398,13 @@ function ka(o, e, a, r, t, h) {
|
|
|
3398
3398
|
ne("Wind direction"),
|
|
3399
3399
|
s("span", { class: "unit" })
|
|
3400
3400
|
], -1)),
|
|
3401
|
-
(n(!0),
|
|
3401
|
+
(n(!0), l(me, null, ue(t.hoursTableData.windDir, (i, w) => (n(), l("td", {
|
|
3402
3402
|
key: `${i}${w}windDir`,
|
|
3403
3403
|
rowspan: "1",
|
|
3404
3404
|
colspan: "1",
|
|
3405
3405
|
class: we(t.activeIndex === w ? "active" : "")
|
|
3406
3406
|
}, [
|
|
3407
|
-
isNaN(i) ? (n(),
|
|
3407
|
+
isNaN(i) ? (n(), l("span", St, "-")) : (n(), l("span", {
|
|
3408
3408
|
key: 0,
|
|
3409
3409
|
class: "iconfont icon",
|
|
3410
3410
|
style: Ce({ display: "inline-block", transform: `rotate(${i}deg)` })
|
|
@@ -3420,7 +3420,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3420
3420
|
ne("Wind speed"),
|
|
3421
3421
|
s("span", { class: "unit" }, "kts")
|
|
3422
3422
|
], -1)),
|
|
3423
|
-
(n(!0),
|
|
3423
|
+
(n(!0), l(me, null, ue(t.hoursTableData.windSpeed, (i, w) => (n(), l("td", {
|
|
3424
3424
|
key: `${i}${w}windSpeed`,
|
|
3425
3425
|
rowspan: "1",
|
|
3426
3426
|
colspan: "1",
|
|
@@ -3436,7 +3436,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3436
3436
|
ne("Wind gust"),
|
|
3437
3437
|
s("span", { class: "unit" }, "kts")
|
|
3438
3438
|
], -1)),
|
|
3439
|
-
(n(!0),
|
|
3439
|
+
(n(!0), l(me, null, ue(t.hoursTableData.windGust, (i, w) => (n(), l("td", {
|
|
3440
3440
|
key: `${i}${w}windGust`,
|
|
3441
3441
|
rowspan: "1",
|
|
3442
3442
|
colspan: "1",
|
|
@@ -3455,7 +3455,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3455
3455
|
ne("Wind wave height"),
|
|
3456
3456
|
s("span", { class: "unit" }, "m")
|
|
3457
3457
|
], -1)),
|
|
3458
|
-
(n(!0),
|
|
3458
|
+
(n(!0), l(me, null, ue(t.hoursTableData.windwaveHeight, (i, w) => (n(), l("td", {
|
|
3459
3459
|
key: `${i}${w}windwaveHeight`,
|
|
3460
3460
|
rowspan: "1",
|
|
3461
3461
|
colspan: "1",
|
|
@@ -3471,13 +3471,13 @@ function ka(o, e, a, r, t, h) {
|
|
|
3471
3471
|
ne("Wind wave direction"),
|
|
3472
3472
|
s("span", { class: "unit" })
|
|
3473
3473
|
], -1)),
|
|
3474
|
-
(n(!0),
|
|
3474
|
+
(n(!0), l(me, null, ue(t.hoursTableData.windwaveDir, (i, w) => (n(), l("td", {
|
|
3475
3475
|
key: `${i}${w}windwaveDir`,
|
|
3476
3476
|
rowspan: "1",
|
|
3477
3477
|
colspan: "1",
|
|
3478
3478
|
class: we(t.activeIndex === w ? "active" : "")
|
|
3479
3479
|
}, [
|
|
3480
|
-
isNaN(i) ? (n(),
|
|
3480
|
+
isNaN(i) ? (n(), l("span", Ut, "-")) : (n(), l("span", {
|
|
3481
3481
|
key: 0,
|
|
3482
3482
|
class: "iconfont icon",
|
|
3483
3483
|
style: Ce({ display: "inline-block", transform: `rotate(${i}deg)` })
|
|
@@ -3493,7 +3493,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3493
3493
|
ne("Wind wave period"),
|
|
3494
3494
|
s("span", { class: "unit" }, "s")
|
|
3495
3495
|
], -1)),
|
|
3496
|
-
(n(!0),
|
|
3496
|
+
(n(!0), l(me, null, ue(t.hoursTableData.windwavePeriod, (i, w) => (n(), l("td", {
|
|
3497
3497
|
key: `${i}${w}windwavePeriod`,
|
|
3498
3498
|
rowspan: "1",
|
|
3499
3499
|
colspan: "1",
|
|
@@ -3509,7 +3509,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3509
3509
|
ne("Swell height"),
|
|
3510
3510
|
s("span", { class: "unit" }, "m")
|
|
3511
3511
|
], -1)),
|
|
3512
|
-
(n(!0),
|
|
3512
|
+
(n(!0), l(me, null, ue(t.hoursTableData.swellHeight, (i, w) => (n(), l("td", {
|
|
3513
3513
|
key: `${i}${w}swellHeight`,
|
|
3514
3514
|
rowspan: "1",
|
|
3515
3515
|
colspan: "1",
|
|
@@ -3525,13 +3525,13 @@ function ka(o, e, a, r, t, h) {
|
|
|
3525
3525
|
ne("Swell direction"),
|
|
3526
3526
|
s("span", { class: "unit" })
|
|
3527
3527
|
], -1)),
|
|
3528
|
-
(n(!0),
|
|
3528
|
+
(n(!0), l(me, null, ue(t.hoursTableData.swellDir, (i, w) => (n(), l("td", {
|
|
3529
3529
|
key: `${i}${w}swellDir`,
|
|
3530
3530
|
rowspan: "1",
|
|
3531
3531
|
colspan: "1",
|
|
3532
3532
|
class: we(t.activeIndex === w ? "active" : "")
|
|
3533
3533
|
}, [
|
|
3534
|
-
isNaN(i) ? (n(),
|
|
3534
|
+
isNaN(i) ? (n(), l("span", Jt, "-")) : (n(), l("span", {
|
|
3535
3535
|
key: 0,
|
|
3536
3536
|
class: "iconfont icon",
|
|
3537
3537
|
style: Ce({ display: "inline-block", transform: `rotate(${i}deg)` })
|
|
@@ -3547,7 +3547,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3547
3547
|
ne("Swell period"),
|
|
3548
3548
|
s("span", { class: "unit" }, "s")
|
|
3549
3549
|
], -1)),
|
|
3550
|
-
(n(!0),
|
|
3550
|
+
(n(!0), l(me, null, ue(t.hoursTableData.swellPeriod, (i, w) => (n(), l("td", {
|
|
3551
3551
|
key: `${i}${w}swellPeriod`,
|
|
3552
3552
|
rowspan: "1",
|
|
3553
3553
|
colspan: "1",
|
|
@@ -3563,7 +3563,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3563
3563
|
ne("Sig wave height"),
|
|
3564
3564
|
s("span", { class: "unit" }, "m")
|
|
3565
3565
|
], -1)),
|
|
3566
|
-
(n(!0),
|
|
3566
|
+
(n(!0), l(me, null, ue(t.hoursTableData.sigwaveHeight, (i, w) => (n(), l("td", {
|
|
3567
3567
|
key: `${i}${w}sigwaveHeight`,
|
|
3568
3568
|
rowspan: "1",
|
|
3569
3569
|
colspan: "1",
|
|
@@ -3579,13 +3579,13 @@ function ka(o, e, a, r, t, h) {
|
|
|
3579
3579
|
ne("Current direction"),
|
|
3580
3580
|
s("span", { class: "unit" })
|
|
3581
3581
|
], -1)),
|
|
3582
|
-
(n(!0),
|
|
3582
|
+
(n(!0), l(me, null, ue(t.hoursTableData.currentDir, (i, w) => (n(), l("td", {
|
|
3583
3583
|
key: `${i}${w}currentDir`,
|
|
3584
3584
|
rowspan: "1",
|
|
3585
3585
|
colspan: "1",
|
|
3586
3586
|
class: we(t.activeIndex === w ? "active" : "")
|
|
3587
3587
|
}, [
|
|
3588
|
-
isNaN(i) ? (n(),
|
|
3588
|
+
isNaN(i) ? (n(), l("span", _t, "-")) : (n(), l("span", {
|
|
3589
3589
|
key: 0,
|
|
3590
3590
|
class: "iconfont icon",
|
|
3591
3591
|
style: Ce({ display: "inline-block", transform: `rotate(${i}deg)` })
|
|
@@ -3601,7 +3601,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3601
3601
|
ne("Current speed"),
|
|
3602
3602
|
s("span", { class: "unit" }, "kts")
|
|
3603
3603
|
], -1)),
|
|
3604
|
-
(n(!0),
|
|
3604
|
+
(n(!0), l(me, null, ue(t.hoursTableData.currentSpeed, (i, w) => (n(), l("td", {
|
|
3605
3605
|
key: `${i}${w}currentSpeed`,
|
|
3606
3606
|
rowspan: "1",
|
|
3607
3607
|
colspan: "1",
|
|
@@ -3620,7 +3620,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3620
3620
|
ne("Sea level height"),
|
|
3621
3621
|
s("span", { class: "unit" }, "m")
|
|
3622
3622
|
], -1)),
|
|
3623
|
-
(n(!0),
|
|
3623
|
+
(n(!0), l(me, null, ue(t.hoursTableData.seaLevel, (i, w) => (n(), l("td", {
|
|
3624
3624
|
key: `${i}${w}seaLevel`,
|
|
3625
3625
|
rowspan: "1",
|
|
3626
3626
|
colspan: "1",
|
|
@@ -3636,7 +3636,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3636
3636
|
ne("Sea surface temperature"),
|
|
3637
3637
|
s("span", { class: "unit" }, "°C")
|
|
3638
3638
|
], -1)),
|
|
3639
|
-
(n(!0),
|
|
3639
|
+
(n(!0), l(me, null, ue(t.hoursTableData.seaTemp, (i, w) => (n(), l("td", {
|
|
3640
3640
|
key: `${i}${w}seaTemp`,
|
|
3641
3641
|
rowspan: "1",
|
|
3642
3642
|
colspan: "1",
|
|
@@ -3644,15 +3644,15 @@ function ka(o, e, a, r, t, h) {
|
|
|
3644
3644
|
}, p(i), 3))), 128))
|
|
3645
3645
|
])
|
|
3646
3646
|
])
|
|
3647
|
-
])) : (N = t.loading) != null && N.hoursTable ? (n(),
|
|
3647
|
+
])) : (N = t.loading) != null && N.hoursTable ? (n(), l("div", as, e[44] || (e[44] = [
|
|
3648
3648
|
s("img", {
|
|
3649
3649
|
style: { height: "200px" },
|
|
3650
3650
|
src: He
|
|
3651
3651
|
}, null, -1)
|
|
3652
|
-
]))) : (n(),
|
|
3652
|
+
]))) : (n(), l("div", is, "No Data"))
|
|
3653
3653
|
])) : Qe("", !0),
|
|
3654
|
-
t.menuIndex === 3 ? (n(),
|
|
3655
|
-
(z = t.position) != null && z.name && a.token && !((L = t.loading) != null && L.daysTable) ? (n(),
|
|
3654
|
+
t.menuIndex === 3 ? (n(), l("div", os, [
|
|
3655
|
+
(z = t.position) != null && z.name && a.token && !((L = t.loading) != null && L.daysTable) ? (n(), l("div", ns, [
|
|
3656
3656
|
e[56] || (e[56] = s("div", { class: "date" }, "Daily Forecast", -1)),
|
|
3657
3657
|
s("table", rs, [
|
|
3658
3658
|
e[54] || (e[54] = s("tr", { class: "day tr-title" }, [
|
|
@@ -3749,7 +3749,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3749
3749
|
style: { width: "75px" }
|
|
3750
3750
|
}, "Sig.wave_max")
|
|
3751
3751
|
], -1)),
|
|
3752
|
-
(n(!0),
|
|
3752
|
+
(n(!0), l(me, null, ue(t.daysTableData, (i) => (n(), l("tr", {
|
|
3753
3753
|
key: Math.random() + i.localDate,
|
|
3754
3754
|
class: "text border-bottom"
|
|
3755
3755
|
}, [
|
|
@@ -3758,7 +3758,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3758
3758
|
s("div", null, p(i.localDate), 1)
|
|
3759
3759
|
]),
|
|
3760
3760
|
s("td", As, [
|
|
3761
|
-
i.weatherUrl ? (n(),
|
|
3761
|
+
i.weatherUrl ? (n(), l("img", {
|
|
3762
3762
|
key: 0,
|
|
3763
3763
|
class: "iconfont weather-icon",
|
|
3764
3764
|
style: { width: "34px", height: "34px" },
|
|
@@ -3785,11 +3785,11 @@ function ka(o, e, a, r, t, h) {
|
|
|
3785
3785
|
s("td", ms, [
|
|
3786
3786
|
s("span", null, p(i.windSpeedMax), 1),
|
|
3787
3787
|
e[49] || (e[49] = s("span", { class: "unit" }, "kts", -1)),
|
|
3788
|
-
!isNaN(i.windSpeedDir) && !isNaN(i.windSpeedMax) ? (n(),
|
|
3788
|
+
!isNaN(i.windSpeedDir) && !isNaN(i.windSpeedMax) ? (n(), l("span", {
|
|
3789
3789
|
key: 0,
|
|
3790
3790
|
class: "iconfont icon",
|
|
3791
3791
|
style: Ce({ display: "inline-block", transform: `rotate(${i.windSpeedDir}deg)` })
|
|
3792
|
-
}, "", 4)) : (n(),
|
|
3792
|
+
}, "", 4)) : (n(), l("span", us, "-"))
|
|
3793
3793
|
]),
|
|
3794
3794
|
s("td", fs, [
|
|
3795
3795
|
s("span", null, p(i.gustSpeedMax), 1),
|
|
@@ -3798,41 +3798,41 @@ function ka(o, e, a, r, t, h) {
|
|
|
3798
3798
|
s("td", Ds, [
|
|
3799
3799
|
s("span", null, p(i.windWaveHeight), 1),
|
|
3800
3800
|
e[51] || (e[51] = s("span", { class: "unit" }, "m", -1)),
|
|
3801
|
-
!isNaN(i.windWaveDir) && !isNaN(i.windWaveHeight) ? (n(),
|
|
3801
|
+
!isNaN(i.windWaveDir) && !isNaN(i.windWaveHeight) ? (n(), l("span", {
|
|
3802
3802
|
key: 0,
|
|
3803
3803
|
class: "iconfont icon",
|
|
3804
3804
|
style: Ce({ display: "inline-block", transform: `rotate(${i.windWaveDir}deg)` })
|
|
3805
|
-
}, "", 4)) : (n(),
|
|
3805
|
+
}, "", 4)) : (n(), l("span", ys, "-"))
|
|
3806
3806
|
]),
|
|
3807
3807
|
s("td", Bs, [
|
|
3808
3808
|
s("span", null, p(i.swellWaveHeight), 1),
|
|
3809
3809
|
e[52] || (e[52] = s("span", { class: "unit" }, "m", -1)),
|
|
3810
|
-
!isNaN(i.swellWaveDir) && !isNaN(i.swellWaveHeight) ? (n(),
|
|
3810
|
+
!isNaN(i.swellWaveDir) && !isNaN(i.swellWaveHeight) ? (n(), l("span", {
|
|
3811
3811
|
key: 0,
|
|
3812
3812
|
class: "iconfont icon",
|
|
3813
3813
|
style: Ce({ display: "inline-block", transform: `rotate(${i.swellWaveDir}deg)` })
|
|
3814
|
-
}, "", 4)) : (n(),
|
|
3814
|
+
}, "", 4)) : (n(), l("span", xs, "-"))
|
|
3815
3815
|
]),
|
|
3816
3816
|
s("td", vs, [
|
|
3817
3817
|
s("span", null, p(i.sigWaveHeight), 1),
|
|
3818
3818
|
e[53] || (e[53] = s("span", { class: "unit" }, "m", -1)),
|
|
3819
|
-
!isNaN(i.sigWaveDir) && !isNaN(i.sigWaveHeight) ? (n(),
|
|
3819
|
+
!isNaN(i.sigWaveDir) && !isNaN(i.sigWaveHeight) ? (n(), l("span", {
|
|
3820
3820
|
key: 0,
|
|
3821
3821
|
class: "iconfont icon",
|
|
3822
3822
|
style: Ce({ display: "inline-block", transform: `rotate(${i.sigWaveDir}deg)` })
|
|
3823
|
-
}, "", 4)) : (n(),
|
|
3823
|
+
}, "", 4)) : (n(), l("span", Cs, "-"))
|
|
3824
3824
|
])
|
|
3825
3825
|
]))), 128))
|
|
3826
3826
|
])
|
|
3827
|
-
])) : (m = t.loading) != null && m.daysTable ? (n(),
|
|
3827
|
+
])) : (m = t.loading) != null && m.daysTable ? (n(), l("div", Is, e[57] || (e[57] = [
|
|
3828
3828
|
s("img", {
|
|
3829
3829
|
style: { height: "200px" },
|
|
3830
3830
|
src: He
|
|
3831
3831
|
}, null, -1)
|
|
3832
|
-
]))) : (n(),
|
|
3832
|
+
]))) : (n(), l("div", bs, "No Data"))
|
|
3833
3833
|
])) : Qe("", !0),
|
|
3834
|
-
t.menuIndex === 1 || t.menuIndex === 3 ? (n(),
|
|
3835
|
-
(P = t.position) != null && P.name && a.token && !((C = t.loading) != null && C.hourlyTable) ? (n(),
|
|
3834
|
+
t.menuIndex === 1 || t.menuIndex === 3 ? (n(), l("div", Es, [
|
|
3835
|
+
(P = t.position) != null && P.name && a.token && !((C = t.loading) != null && C.hourlyTable) ? (n(), l("div", Qs, [
|
|
3836
3836
|
e[60] || (e[60] = s("div", { class: "date" }, "Hourly Forecast", -1)),
|
|
3837
3837
|
s("table", Ms, [
|
|
3838
3838
|
e[58] || (e[58] = s("tr", { class: "day tr-title" }, [
|
|
@@ -3976,7 +3976,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
3976
3976
|
class: "border"
|
|
3977
3977
|
}, "Temp(°C)")
|
|
3978
3978
|
], -1)),
|
|
3979
|
-
(n(!0),
|
|
3979
|
+
(n(!0), l(me, null, ue(t.hourlyTableData, (i) => (n(), l("tr", {
|
|
3980
3980
|
key: Math.random() + i.localDate,
|
|
3981
3981
|
class: "text border-bottom"
|
|
3982
3982
|
}, [
|
|
@@ -3990,77 +3990,77 @@ function ka(o, e, a, r, t, h) {
|
|
|
3990
3990
|
s("td", Hs, p(i.visibility), 1),
|
|
3991
3991
|
s("td", Ps, [
|
|
3992
3992
|
ne(p(i.windDir) + " ", 1),
|
|
3993
|
-
!isNaN(i.windBearing) && i.windDir ? (n(),
|
|
3993
|
+
!isNaN(i.windBearing) && i.windDir ? (n(), l("span", {
|
|
3994
3994
|
key: 0,
|
|
3995
3995
|
class: "iconfont icon",
|
|
3996
3996
|
style: Ce({ display: "inline-block", transform: `rotate(${i.windBearing}deg)` })
|
|
3997
|
-
}, "", 4)) : (n(),
|
|
3997
|
+
}, "", 4)) : (n(), l("span", Ns, "-"))
|
|
3998
3998
|
]),
|
|
3999
3999
|
s("td", Ts, p(i.windSpeed), 1),
|
|
4000
4000
|
s("td", Gs, p(i.windBF), 1),
|
|
4001
4001
|
s("td", Ss, p(i.windGusts), 1),
|
|
4002
4002
|
s("td", Fs, [
|
|
4003
4003
|
ne(p(i.windWaveDir) + " ", 1),
|
|
4004
|
-
!isNaN(i.windWaveBearing) && i.windWaveDir ? (n(),
|
|
4004
|
+
!isNaN(i.windWaveBearing) && i.windWaveDir ? (n(), l("span", {
|
|
4005
4005
|
key: 0,
|
|
4006
4006
|
class: "iconfont icon",
|
|
4007
4007
|
style: Ce({ display: "inline-block", transform: `rotate(${i.windWaveBearing}deg)` })
|
|
4008
|
-
}, "", 4)) : (n(),
|
|
4008
|
+
}, "", 4)) : (n(), l("span", Os, "-"))
|
|
4009
4009
|
]),
|
|
4010
4010
|
s("td", Ys, p(i.windWaveHeight), 1),
|
|
4011
4011
|
s("td", js, p(i.windWavePeriod), 1),
|
|
4012
4012
|
s("td", Ks, [
|
|
4013
4013
|
ne(p(i.sigWaveDir) + " ", 1),
|
|
4014
|
-
!isNaN(i.sigWaveBearing) && i.sigWaveDir ? (n(),
|
|
4014
|
+
!isNaN(i.sigWaveBearing) && i.sigWaveDir ? (n(), l("span", {
|
|
4015
4015
|
key: 0,
|
|
4016
4016
|
class: "iconfont icon",
|
|
4017
4017
|
style: Ce({ display: "inline-block", transform: `rotate(${i.sigWaveBearing}deg)` })
|
|
4018
|
-
}, "", 4)) : (n(),
|
|
4018
|
+
}, "", 4)) : (n(), l("span", Us, "-"))
|
|
4019
4019
|
]),
|
|
4020
4020
|
s("td", Rs, p(i.sigWaveHeight), 1),
|
|
4021
4021
|
s("td", Xs, p(i.sigWavePeriod), 1),
|
|
4022
4022
|
s("td", Ws, [
|
|
4023
4023
|
ne(p(i.currentDir) + " ", 1),
|
|
4024
|
-
!isNaN(i.currentBearing) && i.currentDir ? (n(),
|
|
4024
|
+
!isNaN(i.currentBearing) && i.currentDir ? (n(), l("span", {
|
|
4025
4025
|
key: 0,
|
|
4026
4026
|
class: "iconfont icon",
|
|
4027
4027
|
style: Ce({ display: "inline-block", transform: `rotate(${i.currentBearing}deg)` })
|
|
4028
|
-
}, "", 4)) : (n(),
|
|
4028
|
+
}, "", 4)) : (n(), l("span", Js, "-"))
|
|
4029
4029
|
]),
|
|
4030
4030
|
s("td", qs, p(i.currentSpd), 1),
|
|
4031
4031
|
s("td", Zs, p(i.seaLevel), 1),
|
|
4032
4032
|
s("td", Vs, p(i.seaSurfaceTemp), 1)
|
|
4033
4033
|
]))), 128))
|
|
4034
4034
|
])
|
|
4035
|
-
])) : (I = t.loading) != null && I.hourlyTable ? (n(),
|
|
4035
|
+
])) : (I = t.loading) != null && I.hourlyTable ? (n(), l("div", _s, e[61] || (e[61] = [
|
|
4036
4036
|
s("img", {
|
|
4037
4037
|
style: { height: "200px" },
|
|
4038
4038
|
src: He
|
|
4039
4039
|
}, null, -1)
|
|
4040
|
-
]))) : (n(),
|
|
4040
|
+
]))) : (n(), l("div", $s, "No Data"))
|
|
4041
4041
|
])) : Qe("", !0),
|
|
4042
|
-
t.menuIndex === 4 ? (n(),
|
|
4043
|
-
(y = t.position) != null && y.name && a.token && !((
|
|
4042
|
+
t.menuIndex === 4 ? (n(), l("div", ea, [
|
|
4043
|
+
(y = t.position) != null && y.name && a.token && !((he = t.loading) != null && he.seasonalEchart) ? (n(), l("div", ta, [
|
|
4044
4044
|
s("div", sa, [
|
|
4045
4045
|
s("div", {
|
|
4046
4046
|
id: "seasonal-title",
|
|
4047
4047
|
class: "title flex-start",
|
|
4048
4048
|
onClick: e[10] || (e[10] = (i) => t.seasonalData.showMonths = !t.seasonalData.showMonths)
|
|
4049
4049
|
}, [
|
|
4050
|
-
s("div", aa, p((g = (Ae = (
|
|
4050
|
+
s("div", aa, p((g = (Ae = (de = t.currentMonth) == null ? void 0 : de.month) == null ? void 0 : Ae.split("-")) == null ? void 0 : g[0]) + " " + p((Q = (x = (pe = t.currentMonth) == null ? void 0 : pe.month) == null ? void 0 : x.split("-")) == null ? void 0 : Q[1]), 1),
|
|
4051
4051
|
s("div", ia, [
|
|
4052
4052
|
be(U, null, {
|
|
4053
4053
|
default: Le(() => [
|
|
4054
|
-
be(
|
|
4054
|
+
be(Y)
|
|
4055
4055
|
]),
|
|
4056
4056
|
_: 1
|
|
4057
4057
|
})
|
|
4058
4058
|
]),
|
|
4059
4059
|
Fe(s("div", oa, [
|
|
4060
4060
|
s("div", na, [
|
|
4061
|
-
(n(!0),
|
|
4061
|
+
(n(!0), l(me, null, ue(t.monthsOptions, (i) => {
|
|
4062
4062
|
var w;
|
|
4063
|
-
return n(),
|
|
4063
|
+
return n(), l("div", {
|
|
4064
4064
|
key: i,
|
|
4065
4065
|
class: we(["month-option", ((w = t.currentMonth) == null ? void 0 : w.month) === i.month ? "active" : ""]),
|
|
4066
4066
|
onClick: (ve) => h.handleSelectMonth(i)
|
|
@@ -4075,15 +4075,15 @@ function ka(o, e, a, r, t, h) {
|
|
|
4075
4075
|
e[63] || (e[63] = s("div", { id: "wind-precip-echart" }, null, -1))
|
|
4076
4076
|
]),
|
|
4077
4077
|
s("div", la, [
|
|
4078
|
-
s("div", Aa, p((
|
|
4078
|
+
s("div", Aa, p((T = t.currentMonth) == null ? void 0 : T.month) + " Summary", 1),
|
|
4079
4079
|
e[64] || (e[64] = s("div", { class: "label" }, "Temperature", -1)),
|
|
4080
4080
|
s("div", ha, "Avg High Temp: " + p(t.seasonalData.minHighTemp) + " to " + p(t.seasonalData.maxHighTemp) + " °C", 1),
|
|
4081
4081
|
s("div", da, "Avg Low Temp: " + p(t.seasonalData.minLowTemp) + " to " + p(t.seasonalData.maxLowTemp) + " °C", 1),
|
|
4082
4082
|
s("div", ga, "Hottest Day: " + p(t.seasonalData.hottestDay), 1),
|
|
4083
4083
|
s("div", ca, "Coldest Day: " + p(t.seasonalData.coldestDay), 1),
|
|
4084
4084
|
e[65] || (e[65] = s("div", { class: "label" }, "Precipitation", -1)),
|
|
4085
|
-
s("div", wa, "Light (<10mm): " + p((
|
|
4086
|
-
s("div", pa, "Moderate (<=24.9mm): " + p((re = (v = (
|
|
4085
|
+
s("div", wa, "Light (<10mm): " + p((G = (A = (ce = t.seasonalData) == null ? void 0 : ce.precip) == null ? void 0 : A.filter((i) => i < 10)) == null ? void 0 : G.length) + " days", 1),
|
|
4086
|
+
s("div", pa, "Moderate (<=24.9mm): " + p((re = (v = (ie = t.seasonalData) == null ? void 0 : ie.precip) == null ? void 0 : v.filter((i) => i >= 10 && i < 24.9)) == null ? void 0 : re.length) + " days", 1),
|
|
4087
4087
|
s("div", ma, "Heavy (<=49.9mm): " + p((u = (d = (j = t.seasonalData) == null ? void 0 : j.precip) == null ? void 0 : d.filter((i) => i >= 24.9 && i < 49.9)) == null ? void 0 : u.length) + " days", 1),
|
|
4088
4088
|
s("div", ua, "Rainstorm (<=99.9mm): " + p((De = (D = (K = t.seasonalData) == null ? void 0 : K.precip) == null ? void 0 : D.filter((i) => i >= 49.9 && i < 99.9)) == null ? void 0 : De.length) + " days", 1),
|
|
4089
4089
|
s("div", fa, "Heavy Rainstorm (>=100mm): " + p((fe = (oe = (H = t.seasonalData) == null ? void 0 : H.precip) == null ? void 0 : oe.filter((i) => i >= 100)) == null ? void 0 : fe.length) + " days", 1),
|
|
@@ -4092,12 +4092,12 @@ function ka(o, e, a, r, t, h) {
|
|
|
4092
4092
|
s("div", ya, "Windiest Day: " + p(t.seasonalData.windiestDay) + " ( " + p(t.seasonalData.maxWindSpeed) + "kts )", 1),
|
|
4093
4093
|
s("div", Ba, "Dominant Wind Dir: " + p(t.seasonalData.dominantWind), 1)
|
|
4094
4094
|
])
|
|
4095
|
-
])) : (B = t.loading) != null && B.seasonalEchart ? (n(),
|
|
4095
|
+
])) : (B = t.loading) != null && B.seasonalEchart ? (n(), l("div", xa, e[67] || (e[67] = [
|
|
4096
4096
|
s("img", {
|
|
4097
4097
|
style: { height: "200px" },
|
|
4098
4098
|
src: He
|
|
4099
4099
|
}, null, -1)
|
|
4100
|
-
]))) : (n(),
|
|
4100
|
+
]))) : (n(), l("div", va, "No Data"))
|
|
4101
4101
|
])) : Qe("", !0)
|
|
4102
4102
|
]),
|
|
4103
4103
|
be(le, {
|
|
@@ -4117,7 +4117,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
4117
4117
|
class: "iconfont close-btn",
|
|
4118
4118
|
onClick: e[11] || (e[11] = (i) => t.showFollowDialog = !1)
|
|
4119
4119
|
}, ""),
|
|
4120
|
-
t.position.portId ? (n(),
|
|
4120
|
+
t.position.portId ? (n(), l("div", Ca, [
|
|
4121
4121
|
e[68] || (e[68] = s("span", { class: "label" }, "Port:", -1)),
|
|
4122
4122
|
s("span", Ia, p(t.position.name), 1)
|
|
4123
4123
|
])) : Qe("", !0),
|
|
@@ -4127,7 +4127,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
4127
4127
|
]),
|
|
4128
4128
|
s("div", Qa, [
|
|
4129
4129
|
e[70] || (e[70] = s("span", { class: "label" }, "Remark:", -1)),
|
|
4130
|
-
t.followItem ? (n(),
|
|
4130
|
+
t.followItem ? (n(), l("span", Ma, p(t.position.remark || "-"), 1)) : (n(), Ge(se, {
|
|
4131
4131
|
key: 0,
|
|
4132
4132
|
modelValue: t.followRemark,
|
|
4133
4133
|
"onUpdate:modelValue": e[12] || (e[12] = (i) => t.followRemark = i),
|
|
@@ -4135,7 +4135,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
4135
4135
|
}, null, 8, ["modelValue"]))
|
|
4136
4136
|
]),
|
|
4137
4137
|
s("div", La, [
|
|
4138
|
-
t.followItem ? (n(), Ge(
|
|
4138
|
+
t.followItem ? (n(), Ge(ae, {
|
|
4139
4139
|
key: 0,
|
|
4140
4140
|
type: "info",
|
|
4141
4141
|
plain: "",
|
|
@@ -4145,7 +4145,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
4145
4145
|
ne("Remove")
|
|
4146
4146
|
])),
|
|
4147
4147
|
_: 1
|
|
4148
|
-
}, 8, ["onClick"])) : (n(), Ge(
|
|
4148
|
+
}, 8, ["onClick"])) : (n(), Ge(ae, {
|
|
4149
4149
|
key: 1,
|
|
4150
4150
|
type: "primary",
|
|
4151
4151
|
onClick: h.handleClickFollow
|
|
@@ -4162,7 +4162,7 @@ function ka(o, e, a, r, t, h) {
|
|
|
4162
4162
|
}, 8, ["modelValue", "title"])
|
|
4163
4163
|
]);
|
|
4164
4164
|
}
|
|
4165
|
-
const za = /* @__PURE__ */ et(tt, [["render", ka], ["__scopeId", "data-v-
|
|
4165
|
+
const za = /* @__PURE__ */ et(tt, [["render", ka], ["__scopeId", "data-v-65025c9e"]]), Fa = {
|
|
4166
4166
|
install(o) {
|
|
4167
4167
|
o.component("SpotReport", za);
|
|
4168
4168
|
}
|