@idmui/spot 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,156 +1,188 @@
1
1
  import T from "moment";
2
- import q from "moment-timezone";
3
- import { Search as xe } from "@element-plus/icons-vue";
4
- import { LngLatHelper as ae } from "@idm-plugin/geo";
5
- import * as ue from "echarts";
6
- import { markRaw as be, resolveComponent as ie, openBlock as n, createElementBlock as o, createElementVNode as i, createVNode as ne, withCtx as oe, Fragment as f, renderList as y, createBlock as _e, toDisplayString as x, createCommentVNode as re, createTextVNode as b, normalizeClass as _, normalizeStyle as ee } from "vue";
7
- import me from "axios";
8
- class we {
2
+ import X from "moment-timezone";
3
+ import { Search as be } from "@element-plus/icons-vue";
4
+ import { LngLatHelper as re } from "@idm-plugin/geo";
5
+ import * as ge from "echarts";
6
+ import { markRaw as ke, resolveComponent as le, openBlock as n, createElementBlock as o, createElementVNode as i, createVNode as de, withCtx as he, Fragment as f, renderList as y, createBlock as De, toDisplayString as x, createCommentVNode as ce, createTextVNode as _, normalizeClass as b, normalizeStyle as ie } from "vue";
7
+ import ve from "axios";
8
+ class fe {
9
9
  static pickHourly(e, t) {
10
- var h, s, g, I, M, D, z, S, L, C, P, a, r, Z, k, R, A, E, G, F, B, V, O, U, H, J, W, Y, w, v, m, c, N, d, Q, K, le, de;
11
- const he = typeof t == "string" ? T(t) : t, $ = e.weather, ge = e.marine, ce = T($[0].hourly.date).utc(), te = ce.clone().add($[0].hourly.time.at(0), "h"), ve = ce.clone().add($[0].hourly.time.at(-1), "h"), pe = [];
12
- if (he.isBetween(te, ve, "millisecond", "[]")) {
13
- const p = he.utc().diff(te, "h", !1);
14
- let j, X;
15
- for (const se of $) {
16
- const u = se.hourly;
17
- j = {
18
- temp: (h = u.temperature_2m) == null ? void 0 : h.at(p),
19
- apparentTemp: (s = u.apparent_temperature) == null ? void 0 : s.at(p),
20
- rh: (g = u.relative_humidity_2m) == null ? void 0 : g.at(p),
21
- dp: (I = u.dew_point_2m) == null ? void 0 : I.at(p),
22
- precip: {
23
- probability: (M = u.precipitation_probability) == null ? void 0 : M.at(p),
24
- sum: (D = u.precipitation) == null ? void 0 : D.at(p)
25
- },
26
- code: (z = u.weather_code) == null ? void 0 : z.at(p),
27
- visibility: this.m2nm((S = u.visibility) == null ? void 0 : S.at(p)),
28
- wind: {
29
- speed: (L = u.wind_speed_10m) == null ? void 0 : L.at(p),
30
- kts: (C = u.wind_speed_10m) == null ? void 0 : C.at(p),
31
- degree: (P = u.wind_direction_10m) == null ? void 0 : P.at(p),
32
- bearing: ((a = u.wind_direction_10m) == null ? void 0 : a.at(p)) !== null ? (((r = u.wind_direction_10m) == null ? void 0 : r.at(p)) + 180) % 360 : null,
33
- gusts: (Z = u.wind_gusts_10m) == null ? void 0 : Z.at(p)
34
- },
35
- isDay: (k = u.is_day) == null ? void 0 : k.at(p)
36
- };
37
- const { name: fe, url: ye } = this.parseWeatherCode(j.code, j.isDay);
38
- j.name = fe, j.url = ye, j.wind.scale = this.beaufort(this.kts2ms(j.wind.kts)), j.wind.direction = this.degree2Direction(j.wind.degree);
39
- }
40
- for (const se of ge) {
41
- const u = se.hourly;
42
- X = {
43
- wave: {
44
- sig: {
45
- height: (R = u.wave_height) == null ? void 0 : R.at(p),
46
- degree: (A = u.wave_direction) == null ? void 0 : A.at(p),
47
- bearing: ((E = u.wave_direction) == null ? void 0 : E.at(p)) !== null ? (((G = u.wave_direction) == null ? void 0 : G.at(p)) + 180) % 360 : null,
48
- period: (F = u.wave_period) == null ? void 0 : F.at(p)
10
+ var d, s, v, M, C, S, L, N, I, P, H, a, r, K, z, R, A, E, G, F, B, V, O, U, J, Z, Y, q, w, D, m, k, W, u, j, p, $, g, se, ae;
11
+ const ue = typeof t == "string" ? T(t) : t, te = e.weather, pe = e.marine, me = T(te[0].hourly.date).utc(), ne = me.clone().add(te[0].hourly.time.at(0), "h"), ye = me.clone().add(te[0].hourly.time.at(-1), "h"), we = [];
12
+ if (ue.isBetween(ne, ye, "millisecond", "[]")) {
13
+ const h = ue.utc().diff(ne, "h", !1);
14
+ let Q, ee;
15
+ if (te)
16
+ for (const oe of te) {
17
+ const c = oe.hourly;
18
+ Q = {
19
+ temp: (d = c.temperature_2m) == null ? void 0 : d.at(h),
20
+ apparentTemp: (s = c.apparent_temperature) == null ? void 0 : s.at(h),
21
+ rh: (v = c.relative_humidity_2m) == null ? void 0 : v.at(h),
22
+ dp: (M = c.dew_point_2m) == null ? void 0 : M.at(h),
23
+ precip: {
24
+ probability: (C = c.precipitation_probability) == null ? void 0 : C.at(h),
25
+ sum: (S = c.precipitation) == null ? void 0 : S.at(h)
49
26
  },
50
- swell: {
51
- height: (B = u.swell_wave_height) == null ? void 0 : B.at(p),
52
- degree: (V = u.swell_wave_direction) == null ? void 0 : V.at(p),
53
- bearing: ((O = u.swell_wave_direction) == null ? void 0 : O.at(p)) !== null ? (((U = u.swell_wave_direction) == null ? void 0 : U.at(p)) + 180) % 360 : null,
54
- period: (H = u.swell_wave_period) == null ? void 0 : H.at(p),
55
- peakPeriod: (J = u.swell_wave_peak_period) == null ? void 0 : J.at(p)
27
+ pmsl: (L = c.pressure_msl) == null ? void 0 : L.at(h),
28
+ psurf: (N = c.surface_pressure) == null ? void 0 : N.at(h),
29
+ code: (I = c.weather_code) == null ? void 0 : I.at(h),
30
+ visibility: this.m2nm((P = c.visibility) == null ? void 0 : P.at(h)),
31
+ wind: {
32
+ speed: (H = c.wind_speed_10m) == null ? void 0 : H.at(h),
33
+ kts: (a = c.wind_speed_10m) == null ? void 0 : a.at(h),
34
+ degree: (r = c.wind_direction_10m) == null ? void 0 : r.at(h),
35
+ bearing: ((K = c.wind_direction_10m) == null ? void 0 : K.at(h)) !== null ? (((z = c.wind_direction_10m) == null ? void 0 : z.at(h)) + 180) % 360 : null,
36
+ gusts: (R = c.wind_gusts_10m) == null ? void 0 : R.at(h)
56
37
  },
57
- wd: {
58
- height: (W = u.wind_wave_height) == null ? void 0 : W.at(p),
59
- degree: (Y = u.wind_wave_direction) == null ? void 0 : Y.at(p),
60
- bearing: ((w = u.wind_wave_direction) == null ? void 0 : w.at(p)) !== null ? (((v = u.wind_wave_direction) == null ? void 0 : v.at(p)) + 180) % 360 : null,
61
- period: (m = u.wind_wave_period) == null ? void 0 : m.at(p),
62
- peakPeriod: (c = u.wind_wave_peak_period) == null ? void 0 : c.at(p)
63
- }
64
- },
65
- current: {
66
- speed: (N = u.ocean_current_velocity) == null ? void 0 : N.at(p),
67
- kts: (d = u.ocean_current_velocity) == null ? void 0 : d.at(p),
68
- degree: (Q = u.ocean_current_direction) == null ? void 0 : Q.at(p),
69
- bearing: ((K = u.ocean_current_direction) == null ? void 0 : K.at(p)) ?? null
70
- },
71
- sst: (le = u.sea_surface_temperature) == null ? void 0 : le.at(p),
72
- height: (de = u.sea_level_height_msl) == null ? void 0 : de.at(p)
73
- }, X.wave = this.parseWave(X.wave), X.current.direction = this.degree2Direction(X.current.degree);
74
- }
75
- pe.push({
76
- utc: te.add(p, "h").format(),
77
- weather: { ...j },
78
- ...X
38
+ isDay: (A = c.is_day) == null ? void 0 : A.at(h)
39
+ };
40
+ const { name: xe, url: _e } = this.parseWeatherCode(Q.code, Q.isDay);
41
+ Q.name = xe, Q.url = _e, Q.wind.scale = this.beaufort(this.kts2ms(Q.wind.kts)), Q.wind.direction = this.degree2Direction(Q.wind.degree);
42
+ }
43
+ if (pe)
44
+ for (const oe of pe) {
45
+ const c = oe.hourly;
46
+ ee = {
47
+ wave: {
48
+ sig: {
49
+ height: (E = c.wave_height) == null ? void 0 : E.at(h),
50
+ degree: (G = c.wave_direction) == null ? void 0 : G.at(h),
51
+ bearing: ((F = c.wave_direction) == null ? void 0 : F.at(h)) !== null ? (((B = c.wave_direction) == null ? void 0 : B.at(h)) + 180) % 360 : null,
52
+ period: (V = c.wave_period) == null ? void 0 : V.at(h)
53
+ },
54
+ swell: {
55
+ height: (O = c.swell_wave_height) == null ? void 0 : O.at(h),
56
+ degree: (U = c.swell_wave_direction) == null ? void 0 : U.at(h),
57
+ bearing: ((J = c.swell_wave_direction) == null ? void 0 : J.at(h)) !== null ? (((Z = c.swell_wave_direction) == null ? void 0 : Z.at(h)) + 180) % 360 : null,
58
+ period: (Y = c.swell_wave_period) == null ? void 0 : Y.at(h),
59
+ peakPeriod: (q = c.swell_wave_peak_period) == null ? void 0 : q.at(h)
60
+ },
61
+ wd: {
62
+ height: (w = c.wind_wave_height) == null ? void 0 : w.at(h),
63
+ degree: (D = c.wind_wave_direction) == null ? void 0 : D.at(h),
64
+ bearing: ((m = c.wind_wave_direction) == null ? void 0 : m.at(h)) !== null ? (((k = c.wind_wave_direction) == null ? void 0 : k.at(h)) + 180) % 360 : null,
65
+ period: (W = c.wind_wave_period) == null ? void 0 : W.at(h),
66
+ peakPeriod: (u = c.wind_wave_peak_period) == null ? void 0 : u.at(h)
67
+ }
68
+ },
69
+ current: {
70
+ speed: (j = c.ocean_current_velocity) == null ? void 0 : j.at(h),
71
+ kts: (p = c.ocean_current_velocity) == null ? void 0 : p.at(h),
72
+ degree: ($ = c.ocean_current_direction) == null ? void 0 : $.at(h),
73
+ bearing: ((g = c.ocean_current_direction) == null ? void 0 : g.at(h)) ?? null
74
+ },
75
+ sst: (se = c.sea_surface_temperature) == null ? void 0 : se.at(h),
76
+ height: (ae = c.sea_level_height_msl) == null ? void 0 : ae.at(h)
77
+ }, ee.wave = this.parseWave(ee.wave), ee.current.direction = this.degree2Direction(ee.current.degree);
78
+ }
79
+ we.push({
80
+ utc: ne.add(h, "h").format(),
81
+ weather: { ...Q },
82
+ ...ee
79
83
  });
80
84
  }
81
- return pe;
85
+ return we;
86
+ }
87
+ static toLegacy(e) {
88
+ return {
89
+ wind: e.weather.wind,
90
+ visibility: e.weather.visibility,
91
+ temp: e.weather.temp,
92
+ prmsl: e.weather.pmsl,
93
+ gusts: {
94
+ kts: e.weather.wind.gusts
95
+ },
96
+ precip: e.weather.precip,
97
+ code: e.weather.code,
98
+ name: e.weather.name,
99
+ url: e.weather.url,
100
+ wave: e.wave,
101
+ current: e.current,
102
+ sst: e.sst,
103
+ height: e.height,
104
+ utc: e.utc
105
+ };
82
106
  }
83
107
  static pickDaily(e, t) {
84
- var h, s, g, I, M, D, z, S, L, C, P, a, r, Z, k, R, A, E, G, F, B, V, O;
85
- const U = typeof t == "string" ? T(t) : t, H = e.weather, J = e.marine, W = T(H[0].daily.time.at(0)), Y = T(H[0].daily.time.at(-1)), w = [];
86
- if (U.isBetween(W, Y, "millisecond", "[]")) {
87
- let v, m;
88
- const c = U.diff(W, "d", !1);
89
- for (const N of H) {
90
- const d = N.daily;
91
- v = {
92
- code: (h = d.weather_code) == null ? void 0 : h.at(c),
93
- temp: {
94
- max: (s = d.temperature_2m_max) == null ? void 0 : s.at(c),
95
- min: (g = d.temperature_2m_min) == null ? void 0 : g.at(c)
96
- },
97
- apparentTemp: {
98
- max: (I = d.apparent_temperature_max) == null ? void 0 : I.at(c),
99
- min: (M = d.apparent_temperature_min) == null ? void 0 : M.at(c)
100
- },
101
- precip: {
102
- sum: (D = d.precipitation_sum) == null ? void 0 : D.at(c),
103
- hours: (z = d.precipitation_hours) == null ? void 0 : z.at(c),
104
- probability: (S = d.precipitation_probability_max) == null ? void 0 : S.at(c)
105
- },
106
- wind: {
107
- speed: (L = d.wind_speed_10m_max) == null ? void 0 : L.at(c),
108
- kts: (C = d.wind_speed_10m_max) == null ? void 0 : C.at(c),
109
- degree: (P = d.wind_direction_10m_dominant) == null ? void 0 : P.at(c),
110
- gusts: (a = d.wind_gusts_10m_max) == null ? void 0 : a.at(c)
111
- }
112
- };
113
- const { name: Q, url: K } = this.parseWeatherCode(v.code, !0);
114
- v.name = Q, v.url = K, v.wind.scale = this.beaufort(this.kts2ms(v.wind.kts)), v.wind.direction = this.degree2Direction(v.wind.degree);
115
- }
116
- for (const N of J) {
117
- const d = N.daily;
118
- m = {
119
- wave: {
120
- sig: {
121
- height: (r = d.wave_height_max) == null ? void 0 : r.at(c),
122
- degree: (Z = d.wave_direction_dominant) == null ? void 0 : Z.at(c),
123
- period: (k = d.wave_period_max) == null ? void 0 : k.at(c)
108
+ var d, s, v, M, C, S, L, N, I, P, H, a, r, K, z, R, A, E, G, F, B, V, O, U, J, Z, Y;
109
+ const q = typeof t == "string" ? T(t) : t, w = e.weather, D = e.marine, m = T(w[0].daily.time.at(0)), k = T(w[0].daily.time.at(-1)), W = [];
110
+ if (q.isBetween(m, k, "millisecond", "[]")) {
111
+ let u, j;
112
+ const p = q.diff(m, "d", !1);
113
+ if (w)
114
+ for (const $ of w) {
115
+ const g = $.daily;
116
+ u = {
117
+ code: (d = g.weather_code) == null ? void 0 : d.at(p),
118
+ temp: {
119
+ max: (s = g.temperature_2m_max) == null ? void 0 : s.at(p),
120
+ min: (v = g.temperature_2m_min) == null ? void 0 : v.at(p),
121
+ mean: (M = g.temperature_2m_mean) == null ? void 0 : M.at(p)
124
122
  },
125
- swell: {
126
- height: (R = d.swell_wave_height_max) == null ? void 0 : R.at(c),
127
- degree: (A = d.wave_direction_dominant) == null ? void 0 : A.at(c),
128
- period: (E = d.swell_wave_period_max) == null ? void 0 : E.at(c),
129
- peakPeriod: (G = d.swell_wave_peak_period_max) == null ? void 0 : G.at(c)
123
+ apparentTemp: {
124
+ max: (C = g.apparent_temperature_max) == null ? void 0 : C.at(p),
125
+ min: (S = g.apparent_temperature_min) == null ? void 0 : S.at(p)
130
126
  },
131
- wd: {
132
- height: (F = d.wind_wave_height_max) == null ? void 0 : F.at(c),
133
- degree: (B = d.wind_wave_direction_dominant) == null ? void 0 : B.at(c),
134
- period: (V = d.wind_wave_period_max) == null ? void 0 : V.at(c),
135
- peakPeriod: (O = d.wind_wave_peak_period_max) == null ? void 0 : O.at(c)
127
+ precip: {
128
+ sum: (L = g.precipitation_sum) == null ? void 0 : L.at(p),
129
+ hours: (N = g.precipitation_hours) == null ? void 0 : N.at(p),
130
+ probability: (I = g.precipitation_probability_max) == null ? void 0 : I.at(p)
131
+ },
132
+ rh: {
133
+ max: (P = g.relative_humidity_2m_max) == null ? void 0 : P.at(p),
134
+ min: (H = g.relative_humidity_2m_min) == null ? void 0 : H.at(p),
135
+ mean: (a = g.relative_humidity_2m_mean) == null ? void 0 : a.at(p)
136
+ },
137
+ wind: {
138
+ speed: (r = g.wind_speed_10m_max) == null ? void 0 : r.at(p),
139
+ kts: (K = g.wind_speed_10m_max) == null ? void 0 : K.at(p),
140
+ degree: (z = g.wind_direction_10m_dominant) == null ? void 0 : z.at(p),
141
+ gusts: (R = g.wind_gusts_10m_max) == null ? void 0 : R.at(p)
136
142
  }
137
- }
138
- }, m.wave = this.parseWave(m.wave);
139
- }
140
- w.push({
141
- utc: W.add(c, "d").utc().format(),
142
- weather: { ...v },
143
- ...m
143
+ };
144
+ const { name: se, url: ae } = this.parseWeatherCode(u.code, !0);
145
+ u.name = se, u.url = ae, u.wind.scale = this.beaufort(this.kts2ms(u.wind.kts)), u.wind.direction = this.degree2Direction(u.wind.degree);
146
+ }
147
+ if (D)
148
+ for (const $ of D) {
149
+ const g = $.daily;
150
+ j = {
151
+ wave: {
152
+ sig: {
153
+ height: (A = g.wave_height_max) == null ? void 0 : A.at(p),
154
+ degree: (E = g.wave_direction_dominant) == null ? void 0 : E.at(p),
155
+ period: (G = g.wave_period_max) == null ? void 0 : G.at(p)
156
+ },
157
+ swell: {
158
+ height: (F = g.swell_wave_height_max) == null ? void 0 : F.at(p),
159
+ degree: (B = g.wave_direction_dominant) == null ? void 0 : B.at(p),
160
+ period: (V = g.swell_wave_period_max) == null ? void 0 : V.at(p),
161
+ peakPeriod: (O = g.swell_wave_peak_period_max) == null ? void 0 : O.at(p)
162
+ },
163
+ wd: {
164
+ height: (U = g.wind_wave_height_max) == null ? void 0 : U.at(p),
165
+ degree: (J = g.wind_wave_direction_dominant) == null ? void 0 : J.at(p),
166
+ period: (Z = g.wind_wave_period_max) == null ? void 0 : Z.at(p),
167
+ peakPeriod: (Y = g.wind_wave_peak_period_max) == null ? void 0 : Y.at(p)
168
+ }
169
+ }
170
+ }, j.wave = this.parseWave(j.wave);
171
+ }
172
+ W.push({
173
+ utc: m.add(p, "d").utc().format(),
174
+ weather: { ...u },
175
+ ...j
144
176
  });
145
177
  }
146
- return w;
178
+ return W;
147
179
  }
148
180
  static parseWave(e) {
149
181
  return e.sig.direction = this.degree2Direction(e.sig.degree), e.swell.direction = this.degree2Direction(e.swell.degree), e.wd.direction = this.degree2Direction(e.wd.degree), e.sig.scale = this.douglas(e.sig.height), e.swell.scale = this.douglas(e.swell.height), e.wd.scale = this.douglas(e.wd.height), e;
150
182
  }
151
183
  static parseWeatherCode(e, t) {
152
- const h = this.weatherCode(e);
153
- return t ? h.day : h.night;
184
+ const d = this.weatherCode(e);
185
+ return (t ? d.day : d.night) || {};
154
186
  }
155
187
  static weatherCode(e) {
156
188
  const t = {
@@ -413,19 +445,19 @@ class we {
413
445
  return t;
414
446
  }
415
447
  static kts2ms(e) {
416
- return isNaN(e) ? e : Math.round(e * 1852 / 3600 * 1e4) / 1e4;
448
+ return isNaN(e) || e === null ? e : Math.round(e * 1852 / 3600 * 1e4) / 1e4;
417
449
  }
418
450
  static kts2kmh(e) {
419
- return isNaN(e) ? e : e * 1.852;
451
+ return isNaN(e) || e === null ? e : e * 1.852;
420
452
  }
421
453
  static m2nm(e) {
422
- return isNaN(e) ? e : Math.round(e / 1e3 / 1.852 * 1e4) / 1e4;
454
+ return isNaN(e) || e === null ? e : Math.round(e / 1e3 / 1.852 * 1e4) / 1e4;
423
455
  }
424
456
  static kmh2kts(e) {
425
- return isNaN(e) ? e : this.ms2kts(e * 1e3 / 3600);
457
+ return isNaN(e) || e === null ? e : this.ms2kts(e * 1e3 / 3600);
426
458
  }
427
459
  static ms2kts(e) {
428
- return isNaN(e) ? e : Math.round(e * 3600 / 1852 * 1e4) / 1e4;
460
+ return isNaN(e) || e === null ? e : Math.round(e * 3600 / 1852 * 1e4) / 1e4;
429
461
  }
430
462
  /**
431
463
  * 角度转为弧度
@@ -446,9 +478,9 @@ class we {
446
478
  const t = this.degree2Radian(e);
447
479
  if (isNaN(t) || t === null)
448
480
  return null;
449
- let h = "N/A";
481
+ let d = "N/A";
450
482
  const s = Math.PI / 16;
451
- return t < s ? h = "N" : t >= s && t < 3 * s ? h = "NNE" : t >= 3 * s && t < 5 * s ? h = "NE" : t >= 5 * s && t < 7 * s ? h = "ENE" : t >= 7 * s && t < 9 * s ? h = "E" : t >= 9 * s && t < 11 * s ? h = "ESE" : t >= 11 * s && t < 13 * s ? h = "SE" : t >= 13 * s && t < 15 * s ? h = "SSE" : t >= 15 * s && t < 17 * s ? h = "S" : t >= 17 * s && t < 19 * s ? h = "SSW" : t >= 19 * s && t < 21 * s ? h = "SW" : t >= 21 * s && t < 23 * s ? h = "WSW" : t >= 23 * s && t < 25 * s ? h = "W" : t >= 25 * s && t < 27 * s ? h = "WNW" : t >= 27 * s && t < 29 * s ? h = "NW" : t >= 29 * s && t < 31 * s ? h = "NNW" : t >= 31 * s && t < 32 * s && (h = "N"), h;
483
+ return t < s ? d = "N" : t >= s && t < 3 * s ? d = "NNE" : t >= 3 * s && t < 5 * s ? d = "NE" : t >= 5 * s && t < 7 * s ? d = "ENE" : t >= 7 * s && t < 9 * s ? d = "E" : t >= 9 * s && t < 11 * s ? d = "ESE" : t >= 11 * s && t < 13 * s ? d = "SE" : t >= 13 * s && t < 15 * s ? d = "SSE" : t >= 15 * s && t < 17 * s ? d = "S" : t >= 17 * s && t < 19 * s ? d = "SSW" : t >= 19 * s && t < 21 * s ? d = "SW" : t >= 21 * s && t < 23 * s ? d = "WSW" : t >= 23 * s && t < 25 * s ? d = "W" : t >= 25 * s && t < 27 * s ? d = "WNW" : t >= 27 * s && t < 29 * s ? d = "NW" : t >= 29 * s && t < 31 * s ? d = "NNW" : t >= 31 * s && t < 32 * s && (d = "N"), d;
452
484
  }
453
485
  /**
454
486
  * 计算风力蒲福等级
@@ -468,12 +500,12 @@ class we {
468
500
  return isNaN(e) || e <= 0.1 ? t = "Calm" : e <= 0.5 ? t = "Smooth" : e <= 1.25 ? t = "Slight" : e <= 2.5 ? t = "Moderate" : e <= 4 ? t = "Rough" : e <= 6 ? t = "VeryRough" : e <= 9 ? t = "High" : e <= 14 ? t = "VeryHigh" : t = "Precipitous", t;
469
501
  }
470
502
  }
471
- const ke = (l, e) => {
503
+ const ze = (l, e) => {
472
504
  const t = l.__vccOpts || l;
473
- for (const [h, s] of e)
474
- t[h] = s;
505
+ for (const [d, s] of e)
506
+ t[d] = s;
475
507
  return t;
476
- }, De = {
508
+ }, Se = {
477
509
  name: "SpotReport",
478
510
  // components: { Search }, //Download
479
511
  props: {
@@ -498,7 +530,7 @@ const ke = (l, e) => {
498
530
  return {
499
531
  placeholder: "search for port name or coordinates",
500
532
  searchName: void 0,
501
- rawSearchIcon: be(xe),
533
+ rawSearchIcon: ke(be),
502
534
  positionGmt: void 0,
503
535
  issuedDate: void 0,
504
536
  meteoData: {},
@@ -517,7 +549,7 @@ const ke = (l, e) => {
517
549
  computed: {
518
550
  computeHourL() {
519
551
  return function(l) {
520
- return l ? `${q(l).tz(this.positionGmt).format("HH")}` : "-";
552
+ return l ? `${X(l).tz(this.positionGmt).format("HH")}` : "-";
521
553
  };
522
554
  },
523
555
  computeHourZ() {
@@ -527,27 +559,27 @@ const ke = (l, e) => {
527
559
  },
528
560
  computeWeek() {
529
561
  return function(l) {
530
- return l ? `${q(l).tz(this.positionGmt).format("dddd")}` : "-";
562
+ return l ? `${X(l).tz(this.positionGmt).format("dddd")}` : "-";
531
563
  };
532
564
  },
533
565
  computeMMMDD() {
534
566
  return function(l) {
535
- return l ? `${q(l).tz(this.positionGmt).format("MMM-DD")}` : "-";
567
+ return l ? `${X(l).tz(this.positionGmt).format("MMM-DD")}` : "-";
536
568
  };
537
569
  },
538
570
  computeLat() {
539
571
  return function(l, e = 4) {
540
- return ae.lat2pretty(l, e).pretty;
572
+ return re.lat2pretty(l, e).pretty;
541
573
  };
542
574
  },
543
575
  computeLng() {
544
576
  return function(l, e = 4) {
545
- return ae.lng2pretty(l, e).pretty;
577
+ return re.lng2pretty(l, e).pretty;
546
578
  };
547
579
  },
548
580
  roundPrecision() {
549
581
  return function(l, e = 4) {
550
- return isNaN(l) ? "-" : ae.roundPrecision(l, e);
582
+ return isNaN(l) ? "-" : re.roundPrecision(l, e);
551
583
  };
552
584
  }
553
585
  },
@@ -572,13 +604,13 @@ const ke = (l, e) => {
572
604
  },
573
605
  initInfo() {
574
606
  var l, e;
575
- this.loading = !1, this.positionGmt = (e = (l = this.meteoData.weather) == null ? void 0 : l[0]) == null ? void 0 : e.timezone, this.issuedDate = T(this.ts).utc().format("MMM-DD/HHmm[Z], YYYY"), this.activeIndex = q(this.ts).tz(this.positionGmt).hour(), this.pickedDate = q(this.ts).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.collectList = JSON.parse(localStorage.getItem("idmCollectList") || "[]"), this.positionList = JSON.parse(JSON.stringify(this.collectList)), this.isCollected = this.collectList.some((t) => {
576
- var h;
577
- return t.name === ((h = this.position) == null ? void 0 : h.name);
607
+ this.loading = !1, this.positionGmt = (e = (l = this.meteoData.weather) == null ? void 0 : l[0]) == null ? void 0 : e.timezone, this.issuedDate = T(this.ts).utc().format("MMM-DD/HHmm[Z], YYYY"), this.activeIndex = X(this.ts).tz(this.positionGmt).hour(), this.pickedDate = X(this.ts).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.collectList = JSON.parse(localStorage.getItem("idmCollectList") || "[]"), this.positionList = JSON.parse(JSON.stringify(this.collectList)), this.isCollected = this.collectList.some((t) => {
608
+ var d;
609
+ return t.name === ((d = this.position) == null ? void 0 : d.name);
578
610
  });
579
611
  },
580
612
  initTableData() {
581
- var l, e, t, h, s, g, I, M, D, z, S, L, C, P, a, r, Z, k, R, A, E, G, F, B, V, O, U, H, J, W, Y, w, v, m;
613
+ var l, e, t, d, s, v, M, C, S, L, N, I, P, H, a, r, K, z, R, A, E, G, F, B, V, O, U, J, Z, Y, q, w, D, m;
582
614
  this.tableData = {
583
615
  hours: [],
584
616
  utcHours: [],
@@ -605,52 +637,52 @@ const ke = (l, e) => {
605
637
  seaLevel: [],
606
638
  seaTemp: []
607
639
  };
608
- for (let c = 0; c < 24; c++) {
609
- const N = T(this.pickedDate).clone().add(c, "h").format();
610
- this.tableData.hours.push(N);
611
- const d = ((l = we.pickHourly(this.meteoData, N)) == null ? void 0 : l[0]) || {};
612
- this.tableData.weatherUrls.push((e = d.weather) == null ? void 0 : e.url), this.tableData.weatherNames.push(((t = d.weather) == null ? void 0 : t.name) ?? "-"), this.tableData.temp.push(this.roundPrecision((h = d.weather) == null ? void 0 : h.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((g = (s = d.weather) == null ? void 0 : s.precip) == null ? void 0 : g.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((M = (I = d.weather) == null ? void 0 : I.precip) == null ? void 0 : M.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((D = d.weather) == null ? void 0 : D.visibility, 0) ?? "-"), this.tableData.humidity.push(this.roundPrecision((z = d.weather) == null ? void 0 : z.rh, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((L = (S = d.weather) == null ? void 0 : S.wind) == null ? void 0 : L.kts, 1)), this.tableData.windDir.push((P = (C = d.weather) == null ? void 0 : C.wind) == null ? void 0 : P.bearing), this.tableData.windGust.push(this.roundPrecision((r = (a = d.weather) == null ? void 0 : a.wind) == null ? void 0 : r.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((k = (Z = d.wave) == null ? void 0 : Z.sig) == null ? void 0 : k.height, 1) ?? "-"), this.tableData.sigwaveDir.push((A = (R = d.wave) == null ? void 0 : R.sig) == null ? void 0 : A.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((G = (E = d.wave) == null ? void 0 : E.wd) == null ? void 0 : G.height, 1) ?? "-"), this.tableData.windwaveDir.push((B = (F = d.wave) == null ? void 0 : F.wd) == null ? void 0 : B.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((O = (V = d.wave) == null ? void 0 : V.wd) == null ? void 0 : O.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((H = (U = d.wave) == null ? void 0 : U.swell) == null ? void 0 : H.height, 1) ?? "-"), this.tableData.swellDir.push((W = (J = d.wave) == null ? void 0 : J.swell) == null ? void 0 : W.bearing), this.tableData.swellPeriod.push(this.roundPrecision((w = (Y = d.wave) == null ? void 0 : Y.swell) == null ? void 0 : w.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((v = d.current) == null ? void 0 : v.speed, 1) ?? "-"), this.tableData.currentDir.push((m = d.current) == null ? void 0 : m.bearing), this.tableData.seaLevel.push(this.roundPrecision(d.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(d.sst, 0) ?? "-");
640
+ for (let k = 0; k < 24; k++) {
641
+ const W = T(this.pickedDate).clone().add(k, "h").format();
642
+ this.tableData.hours.push(W);
643
+ const u = ((l = fe.pickHourly(this.meteoData, W)) == null ? void 0 : l[0]) || {};
644
+ this.tableData.weatherUrls.push((e = u.weather) == null ? void 0 : e.url), this.tableData.weatherNames.push(((t = u.weather) == null ? void 0 : t.name) ?? "-"), this.tableData.temp.push(this.roundPrecision((d = u.weather) == null ? void 0 : d.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((v = (s = u.weather) == null ? void 0 : s.precip) == null ? void 0 : v.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((C = (M = u.weather) == null ? void 0 : M.precip) == null ? void 0 : C.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((S = u.weather) == null ? void 0 : S.visibility, 0) ?? "-"), this.tableData.humidity.push(this.roundPrecision((L = u.weather) == null ? void 0 : L.rh, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((I = (N = u.weather) == null ? void 0 : N.wind) == null ? void 0 : I.kts, 1)), this.tableData.windDir.push((H = (P = u.weather) == null ? void 0 : P.wind) == null ? void 0 : H.bearing), this.tableData.windGust.push(this.roundPrecision((r = (a = u.weather) == null ? void 0 : a.wind) == null ? void 0 : r.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((z = (K = u.wave) == null ? void 0 : K.sig) == null ? void 0 : z.height, 1) ?? "-"), this.tableData.sigwaveDir.push((A = (R = u.wave) == null ? void 0 : R.sig) == null ? void 0 : A.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((G = (E = u.wave) == null ? void 0 : E.wd) == null ? void 0 : G.height, 1) ?? "-"), this.tableData.windwaveDir.push((B = (F = u.wave) == null ? void 0 : F.wd) == null ? void 0 : B.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((O = (V = u.wave) == null ? void 0 : V.wd) == null ? void 0 : O.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((J = (U = u.wave) == null ? void 0 : U.swell) == null ? void 0 : J.height, 1) ?? "-"), this.tableData.swellDir.push((Y = (Z = u.wave) == null ? void 0 : Z.swell) == null ? void 0 : Y.bearing), this.tableData.swellPeriod.push(this.roundPrecision((w = (q = u.wave) == null ? void 0 : q.swell) == null ? void 0 : w.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((D = u.current) == null ? void 0 : D.speed, 1) ?? "-"), this.tableData.currentDir.push((m = u.current) == null ? void 0 : m.bearing), this.tableData.seaLevel.push(this.roundPrecision(u.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(u.sst, 0) ?? "-");
613
645
  }
614
646
  },
615
647
  initEchart() {
616
- var R, A, E, G, F, B, V, O, U, H, J, W, Y;
617
- const l = [], e = [], t = [], h = [], s = [], g = [], I = [], M = [], D = [], z = [], S = {};
648
+ var R, A, E, G, F, B, V, O, U, J, Z, Y, q;
649
+ const l = [], e = [], t = [], d = [], s = [], v = [], M = [], C = [], S = [], L = [], N = {};
618
650
  for (let w = 0; w < 7; w++) {
619
- const v = T(this.pickedDate).clone().add(w, "d");
620
- l.push(q(v).tz(this.positionGmt).format("yyyy-MM-DD")), e.push(this.computeMMMDD(v)), t.push(w === 0 ? "Today" : this.computeWeek(v));
621
- const m = ((R = we.pickDaily(this.meteoData, v)) == null ? void 0 : R[0]) || {};
622
- h.push(this.roundPrecision((E = (A = m.weather) == null ? void 0 : A.temp) == null ? void 0 : E.min, 0)), s.push(this.roundPrecision((F = (G = m.weather) == null ? void 0 : G.temp) == null ? void 0 : F.max, 0)), M.push(this.roundPrecision((V = (B = m.weather) == null ? void 0 : B.wind) == null ? void 0 : V.kts, 1) ?? "- kts"), z.push(this.roundPrecision((U = (O = m.weather) == null ? void 0 : O.precip) == null ? void 0 : U.sum, 0) ?? "- mm"), g.push({ symbol: "image://" + ((H = m.weather) == null ? void 0 : H.url) }), I.push((J = m.weather) == null ? void 0 : J.name), D.push((Y = (W = m.weather) == null ? void 0 : W.wind) == null ? void 0 : Y.degree);
651
+ const D = T(this.pickedDate).clone().add(w, "d");
652
+ l.push(X(D).tz(this.positionGmt).format("yyyy-MM-DD")), e.push(this.computeMMMDD(D)), t.push(w === 0 ? "Today" : this.computeWeek(D));
653
+ const m = ((R = fe.pickDaily(this.meteoData, D)) == null ? void 0 : R[0]) || {};
654
+ d.push(this.roundPrecision((E = (A = m.weather) == null ? void 0 : A.temp) == null ? void 0 : E.min, 0)), s.push(this.roundPrecision((F = (G = m.weather) == null ? void 0 : G.temp) == null ? void 0 : F.max, 0)), C.push(this.roundPrecision((V = (B = m.weather) == null ? void 0 : B.wind) == null ? void 0 : V.kts, 1) ?? "- kts"), L.push(this.roundPrecision((U = (O = m.weather) == null ? void 0 : O.precip) == null ? void 0 : U.sum, 0) ?? "- mm"), v.push({ symbol: "image://" + ((J = m.weather) == null ? void 0 : J.url) }), M.push((Z = m.weather) == null ? void 0 : Z.name), S.push((q = (Y = m.weather) == null ? void 0 : Y.wind) == null ? void 0 : q.degree);
623
655
  }
624
- const L = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) - Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))), C = Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))) - 1.5 * L, P = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) + 2 * L, a = 4 + 0.5 / l.length * 92 + "%", r = "data:image/svg+xml;base64," + window.btoa(
656
+ const I = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) - Math.min(...d.filter((w) => typeof w == "number" && !isNaN(w))), P = Math.min(...d.filter((w) => typeof w == "number" && !isNaN(w))) - 1.5 * I, H = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) + 2 * I, a = 4 + 0.5 / l.length * 92 + "%", r = "data:image/svg+xml;base64," + window.btoa(
625
657
  unescape(
626
658
  encodeURIComponent(
627
659
  '<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>'
628
660
  )
629
661
  )
630
- ), Z = "data:image/svg+xml;base64," + window.btoa(
662
+ ), K = "data:image/svg+xml;base64," + window.btoa(
631
663
  unescape(
632
664
  encodeURIComponent(
633
665
  '<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="#ffffff" p-id="10798"></path></svg>'
634
666
  )
635
667
  )
636
- ), k = new Image(64, 64);
637
- k.src = Z, k.onload = () => {
668
+ ), z = new Image(64, 64);
669
+ z.src = K, z.onload = () => {
638
670
  for (let m = 0; m < 7; m++) {
639
- const c = document.createElement("canvas"), N = c.getContext("2d");
640
- c.width = k.width, c.height = k.height;
641
- const Q = D[m] * (Math.PI / 180);
642
- N.translate(c.width / 2, c.height / 2), N.rotate(Q), N.translate(-k.width / 2, -k.height / 2), N.drawImage(k, 0, 0, 64, 64);
643
- const K = c.toDataURL();
644
- S[`WindIcon${m}`] = {
671
+ const k = document.createElement("canvas"), W = k.getContext("2d");
672
+ k.width = z.width, k.height = z.height;
673
+ const j = S[m] * (Math.PI / 180);
674
+ W.translate(k.width / 2, k.height / 2), W.rotate(j), W.translate(-z.width / 2, -z.height / 2), W.drawImage(z, 0, 0, 64, 64);
675
+ const p = k.toDataURL();
676
+ N[`WindIcon${m}`] = {
645
677
  height: 12,
646
678
  width: 12,
647
679
  align: "left",
648
680
  backgroundColor: {
649
- image: K
681
+ image: p
650
682
  }
651
683
  };
652
684
  }
653
- const w = ue.init(document.getElementById("weather-chart")), v = {
685
+ const w = ge.init(document.getElementById("weather-chart")), D = {
654
686
  grid: {
655
687
  bottom: 0,
656
688
  top: 0,
@@ -662,7 +694,7 @@ const ke = (l, e) => {
662
694
  show: !0,
663
695
  position: "right",
664
696
  formatter: function(m) {
665
- return m.seriesName === "Weather Icon" ? I[m.dataIndex] : !1;
697
+ return m.seriesName === "Weather Icon" ? M[m.dataIndex] : !1;
666
698
  }
667
699
  },
668
700
  legend: {
@@ -813,8 +845,8 @@ const ke = (l, e) => {
813
845
  type: "value",
814
846
  name: "温度(℃)",
815
847
  show: !1,
816
- min: C,
817
- max: P,
848
+ min: P,
849
+ max: H,
818
850
  axisLabel: {
819
851
  formatter: "{value} °C"
820
852
  }
@@ -850,13 +882,13 @@ const ke = (l, e) => {
850
882
  singleAxisIndex: 2,
851
883
  coordinateSystem: "singleAxis",
852
884
  type: "scatter",
853
- data: g,
885
+ data: v,
854
886
  symbolSize: 36
855
887
  },
856
888
  {
857
889
  name: "温度(℃)",
858
890
  type: "line",
859
- data: h,
891
+ data: d,
860
892
  smooth: !0,
861
893
  itemStyle: {
862
894
  color: "rgba(255,255,255,0.7)"
@@ -904,13 +936,13 @@ const ke = (l, e) => {
904
936
  singleAxisIndex: 3,
905
937
  coordinateSystem: "singleAxis",
906
938
  type: "scatter",
907
- data: M,
939
+ data: C,
908
940
  label: {
909
941
  show: !0,
910
942
  color: "#fff",
911
943
  // formatter: '{c}'
912
944
  rich: {
913
- ...S,
945
+ ...N,
914
946
  title: {
915
947
  align: "center",
916
948
  vertical: "center"
@@ -926,7 +958,7 @@ const ke = (l, e) => {
926
958
  singleAxisIndex: 4,
927
959
  coordinateSystem: "singleAxis",
928
960
  type: "scatter",
929
- data: z,
961
+ data: L,
930
962
  label: {
931
963
  show: !0,
932
964
  color: "#fff",
@@ -953,23 +985,23 @@ const ke = (l, e) => {
953
985
  }
954
986
  ]
955
987
  };
956
- w.setOption(v), w.on("click", (m) => {
957
- const c = m.dataIndex;
958
- this.pickedDate = q(l[c]).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.pickedWeek = c === 0 ? "Today" : this.computeWeek(this.pickedDate), this.activeIndex = c === 0 ? q(this.ts).tz(this.positionGmt).hour() : void 0, this.initTableData(), v.series[3].markArea = {
988
+ w.setOption(D), w.on("click", (m) => {
989
+ const k = m.dataIndex;
990
+ this.pickedDate = X(l[k]).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.pickedWeek = k === 0 ? "Today" : this.computeWeek(this.pickedDate), this.activeIndex = k === 0 ? X(this.ts).tz(this.positionGmt).hour() : void 0, this.initTableData(), D.series[3].markArea = {
959
991
  itemStyle: {
960
992
  color: "rgb(71,143,206)"
961
993
  },
962
994
  data: [
963
995
  [
964
996
  {
965
- x: 4 + c / l.length * 92 + "%"
997
+ x: 4 + k / l.length * 92 + "%"
966
998
  },
967
999
  {
968
- x: 4 + (c + 1) / l.length * 92 + "%"
1000
+ x: 4 + (k + 1) / l.length * 92 + "%"
969
1001
  }
970
1002
  ]
971
1003
  ]
972
- }, w.setOption(v);
1004
+ }, w.setOption(D);
973
1005
  });
974
1006
  };
975
1007
  },
@@ -977,25 +1009,25 @@ const ke = (l, e) => {
977
1009
  this.isCollected = !this.isCollected, this.isCollected ? this.collectList.push({ name: this.position.name, lat: this.position.lat, lng: this.position.lng }) : this.collectList = this.collectList.filter((l) => l.name !== this.position.name), localStorage.setItem("idmCollectList", JSON.stringify(this.collectList));
978
1010
  },
979
1011
  async fetchSuggestPosition(l) {
980
- var h;
1012
+ var d;
981
1013
  const e = l.replaceAll(",", ",");
982
1014
  if (!e)
983
1015
  return this.positionList = this.collectList, !1;
984
- const t = await me.get(`https://cbe.idmwx.com/api/arc/ports/suggest?n=${e}`, {
1016
+ const t = await ve.get(`https://cbe.idmwx.com/api/arc/ports/suggest?n=${e}`, {
985
1017
  headers: {
986
1018
  Authorization: this.token
987
1019
  }
988
1020
  });
989
- (t == null ? void 0 : t.data.code) === 0 && (this.positionList = (h = t == null ? void 0 : t.data.data) == null ? void 0 : h.map((s) => (s.name = s.id ? s.name : this.computeLat(s.lat) + ", " + this.computeLng(s.lng), s)));
1021
+ (t == null ? void 0 : t.data.code) === 0 && (this.positionList = (d = t == null ? void 0 : t.data.data) == null ? void 0 : d.map((s) => (s.name = s.id ? s.name : this.computeLat(s.lat) + ", " + this.computeLng(s.lng), s)));
990
1022
  },
991
1023
  async handleFetchMeteo() {
992
- var t, h, s;
1024
+ var t, d, s;
993
1025
  if (!this.searchName)
994
1026
  return !1;
995
1027
  this.position = {
996
- portId: (t = this.positionList.find((g) => g.name === this.searchName)) == null ? void 0 : t.id,
997
- lat: (h = this.positionList.find((g) => g.name === this.searchName)) == null ? void 0 : h.lat,
998
- lng: (s = this.positionList.find((g) => g.name === this.searchName)) == null ? void 0 : s.lng,
1028
+ portId: (t = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : t.id,
1029
+ lat: (d = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : d.lat,
1030
+ lng: (s = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : s.lng,
999
1031
  name: this.searchName
1000
1032
  }, this.handleClear();
1001
1033
  const l = {
@@ -1004,7 +1036,7 @@ const ke = (l, e) => {
1004
1036
  datetime: this.ts ? T(this.ts).utc().add(-1, "d").format() : T().add(-1, "d").utc().format(),
1005
1037
  forecastDays: 8,
1006
1038
  selfHosted: !1
1007
- }, e = await me.post("https://cbe.idmwx.com/api/arc/meteo2/spot/forecast", l, {
1039
+ }, e = await ve.post("https://cbe.idmwx.com/api/arc/meteo2/spot/forecast", l, {
1008
1040
  headers: {
1009
1041
  Authorization: this.token
1010
1042
  }
@@ -1014,36 +1046,36 @@ const ke = (l, e) => {
1014
1046
  }), this.handleRender();
1015
1047
  },
1016
1048
  handleClear() {
1017
- this.loading = !0, this.meteoData = {}, this.isCollected = !1, ue.dispose(document.getElementById("weather-chart"));
1049
+ this.loading = !0, this.meteoData = {}, this.isCollected = !1, ge.dispose(document.getElementById("weather-chart"));
1018
1050
  }
1019
1051
  }
1020
- }, ze = { class: "spot-report" }, Se = { class: "header-box flex-between" }, Le = { class: "bg" }, Ne = { class: "search-box flex-start" }, Ie = { class: "content-box" }, Me = { class: "title-box flex-between" }, Ce = { class: "main-title" }, Pe = { class: "sub-title" }, He = { class: "flex-end" }, We = {
1052
+ }, Le = { class: "spot-report" }, Ne = { class: "header-box flex-between" }, Ie = { class: "bg" }, Me = { class: "search-box flex-start" }, Ce = { class: "content-box" }, Pe = { class: "title-box flex-between" }, He = { class: "main-title" }, We = { class: "sub-title" }, Te = { class: "flex-end" }, Re = {
1021
1053
  key: 0,
1022
1054
  id: "weather-chart"
1023
- }, Te = {
1055
+ }, Ae = {
1024
1056
  key: 1,
1025
1057
  class: "weather-chart flex-center"
1026
- }, Re = {
1058
+ }, Ee = {
1027
1059
  key: 2,
1028
1060
  class: "weather-chart flex-center"
1029
- }, Ae = {
1061
+ }, Ge = {
1030
1062
  key: 3,
1031
1063
  class: "card-box"
1032
- }, Ee = { class: "date" }, Ge = { class: "basic-table" }, Fe = { class: "day" }, Be = { class: "hour" }, Ve = { class: "icon" }, Oe = ["src"], Ue = { class: "text" }, Ze = { class: "text" }, Je = { class: "text" }, Ye = { class: "text" }, je = { class: "text" }, qe = { class: "text" }, Qe = { key: 1 }, Ke = { class: "text" }, Xe = { class: "text" }, $e = { class: "wave-current-table" }, et = { class: "text" }, tt = { class: "text" }, st = { key: 1 }, at = { class: "text" }, it = { class: "text" }, nt = { class: "text" }, ot = { key: 1 }, rt = { class: "text" }, lt = { class: "text" }, dt = { class: "text" }, ht = { key: 1 }, ct = { class: "text" }, pt = { class: "sea-table" }, ut = { class: "text" }, mt = { class: "text" }, wt = {
1064
+ }, Fe = { class: "date" }, Be = { class: "basic-table" }, Ve = { class: "day" }, Oe = { class: "hour" }, Ue = { class: "icon" }, Je = ["src"], Ze = { class: "text" }, Ye = { class: "text" }, qe = { class: "text" }, Ke = { class: "text" }, Qe = { class: "text" }, je = { class: "text" }, Xe = { key: 1 }, $e = { class: "text" }, et = { class: "text" }, tt = { class: "wave-current-table" }, st = { class: "text" }, at = { class: "text" }, it = { key: 1 }, nt = { class: "text" }, ot = { class: "text" }, rt = { class: "text" }, lt = { key: 1 }, dt = { class: "text" }, ht = { class: "text" }, ct = { class: "text" }, ut = { key: 1 }, pt = { class: "text" }, mt = { class: "sea-table" }, wt = { class: "text" }, gt = { class: "text" }, vt = {
1033
1065
  key: 4,
1034
1066
  class: "card-box flex-center"
1035
- }, gt = {
1067
+ }, ft = {
1036
1068
  key: 5,
1037
1069
  class: "card-box flex-center"
1038
1070
  };
1039
- function vt(l, e, t, h, s, g) {
1040
- var z, S, L, C, P;
1041
- const I = ie("ElOption"), M = ie("ElSelect"), D = ie("ElTooltip");
1042
- return n(), o("div", ze, [
1043
- i("div", Se, [
1044
- i("div", Le, [
1045
- i("div", Ne, [
1046
- ne(M, {
1071
+ function yt(l, e, t, d, s, v) {
1072
+ var L, N, I, P, H;
1073
+ const M = le("ElOption"), C = le("ElSelect"), S = le("ElTooltip");
1074
+ return n(), o("div", Le, [
1075
+ i("div", Ne, [
1076
+ i("div", Ie, [
1077
+ i("div", Me, [
1078
+ de(C, {
1047
1079
  modelValue: s.searchName,
1048
1080
  "onUpdate:modelValue": e[0] || (e[0] = (a) => s.searchName = a),
1049
1081
  filterable: "",
@@ -1055,11 +1087,11 @@ function vt(l, e, t, h, s, g) {
1055
1087
  "remote-show-suffix": "",
1056
1088
  onFocus: e[1] || (e[1] = (a) => s.placeholder = ""),
1057
1089
  onBlur: e[2] || (e[2] = (a) => s.placeholder = "search for port name or coordinates"),
1058
- "remote-method": g.fetchSuggestPosition,
1059
- onChange: g.handleFetchMeteo
1090
+ "remote-method": v.fetchSuggestPosition,
1091
+ onChange: v.handleFetchMeteo
1060
1092
  }, {
1061
- default: oe(() => [
1062
- (n(!0), o(f, null, y(s.positionList, (a) => (n(), _e(I, {
1093
+ default: he(() => [
1094
+ (n(!0), o(f, null, y(s.positionList, (a) => (n(), De(M, {
1063
1095
  key: a.name,
1064
1096
  label: a.name,
1065
1097
  value: a.name
@@ -1070,447 +1102,447 @@ function vt(l, e, t, h, s, g) {
1070
1102
  ])
1071
1103
  ])
1072
1104
  ]),
1073
- i("div", Ie, [
1074
- i("div", Me, [
1105
+ i("div", Ce, [
1106
+ i("div", Pe, [
1075
1107
  i("div", null, [
1076
- i("div", Ce, "Weather forecast for " + x(((z = s.position) == null ? void 0 : z.name) || "-") + " ( " + x(s.positionGmt) + " )", 1),
1077
- i("div", Pe, "At " + x((S = s.position) != null && S.portId ? "port" : "coordinates") + ", issued " + x(s.issuedDate), 1)
1108
+ i("div", He, "Weather forecast for " + x(((L = s.position) == null ? void 0 : L.name) || "-") + " ( " + x(s.positionGmt) + " )", 1),
1109
+ i("div", We, "At " + x((N = s.position) != null && N.portId ? "port" : "coordinates") + ", issued " + x(s.issuedDate), 1)
1078
1110
  ]),
1079
- i("div", He, [
1080
- ne(D, {
1111
+ i("div", Te, [
1112
+ de(S, {
1081
1113
  placement: "left",
1082
1114
  effect: "light",
1083
1115
  content: s.isCollected ? "remove the port/coordinate from the search list" : "add the port/coordinate to the search list",
1084
1116
  "show-after": 1e3
1085
1117
  }, {
1086
- default: oe(() => [
1118
+ default: he(() => [
1087
1119
  s.isCollected ? (n(), o("span", {
1088
1120
  key: 0,
1089
1121
  class: "iconfont icon active",
1090
- onClick: e[3] || (e[3] = (...a) => g.handleCollect && g.handleCollect(...a))
1122
+ onClick: e[3] || (e[3] = (...a) => v.handleCollect && v.handleCollect(...a))
1091
1123
  }, "")) : (n(), o("span", {
1092
1124
  key: 1,
1093
1125
  class: "iconfont icon",
1094
- onClick: e[4] || (e[4] = (...a) => g.handleCollect && g.handleCollect(...a))
1126
+ onClick: e[4] || (e[4] = (...a) => v.handleCollect && v.handleCollect(...a))
1095
1127
  }, ""))
1096
1128
  ]),
1097
1129
  _: 1
1098
1130
  }, 8, ["content"])
1099
1131
  ])
1100
1132
  ]),
1101
- (L = s.position) != null && L.name && !s.loading ? (n(), o("div", We)) : s.loading ? (n(), o("div", Te, "Loading....")) : s.position.name ? re("", !0) : (n(), o("div", Re, "No Data")),
1102
- (C = s.position) != null && C.name && !s.loading ? (n(), o("div", Ae, [
1103
- i("div", Ee, x(s.pickedWeek) + " " + x(g.computeMMMDD(s.pickedDate)), 1),
1104
- i("table", Ge, [
1105
- i("tr", Fe, [
1133
+ (I = s.position) != null && I.name && !s.loading ? (n(), o("div", Re)) : s.loading ? (n(), o("div", Ae, "Loading....")) : s.position.name ? ce("", !0) : (n(), o("div", Ee, "No Data")),
1134
+ (P = s.position) != null && P.name && !s.loading ? (n(), o("div", Ge, [
1135
+ i("div", Fe, x(s.pickedWeek) + " " + x(v.computeMMMDD(s.pickedDate)), 1),
1136
+ i("table", Be, [
1137
+ i("tr", Ve, [
1106
1138
  e[5] || (e[5] = i("th", {
1107
1139
  rowspan: "1",
1108
1140
  colspan: "1",
1109
1141
  class: "tr-title"
1110
1142
  }, [
1111
- b("Local time"),
1143
+ _("Local time"),
1112
1144
  i("span", { class: "unit" }, "(LT)")
1113
1145
  ], -1)),
1114
1146
  (n(!0), o(f, null, y(s.tableData.hours, (a, r) => (n(), o("th", {
1115
1147
  rowspan: "1",
1116
1148
  colspan: "1",
1117
- class: _(s.activeIndex === r ? "active" : ""),
1149
+ class: b(s.activeIndex === r ? "active" : ""),
1118
1150
  key: Math.random() + "local"
1119
- }, x(g.computeHourL(a)), 3))), 128))
1151
+ }, x(v.computeHourL(a)), 3))), 128))
1120
1152
  ]),
1121
- i("tr", Be, [
1153
+ i("tr", Oe, [
1122
1154
  e[6] || (e[6] = i("th", {
1123
1155
  rowspan: "1",
1124
1156
  colspan: "1",
1125
1157
  class: "tr-title"
1126
1158
  }, [
1127
- b("UTC"),
1159
+ _("UTC"),
1128
1160
  i("span", { class: "unit" })
1129
1161
  ], -1)),
1130
1162
  (n(!0), o(f, null, y(s.tableData.hours, (a, r) => (n(), o("th", {
1131
1163
  rowspan: "1",
1132
1164
  colspan: "1",
1133
- class: _(s.activeIndex === r ? "active" : ""),
1165
+ class: b(s.activeIndex === r ? "active" : ""),
1134
1166
  key: Math.random() + "z"
1135
- }, x(g.computeHourZ(a)), 3))), 128))
1167
+ }, x(v.computeHourZ(a)), 3))), 128))
1136
1168
  ]),
1137
- i("tr", Ve, [
1169
+ i("tr", Ue, [
1138
1170
  e[7] || (e[7] = i("td", {
1139
1171
  rowspan: "1",
1140
1172
  colspan: "1",
1141
1173
  class: "tr-title"
1142
1174
  }, [
1143
- b("Weather"),
1175
+ _("Weather"),
1144
1176
  i("span", { class: "unit" })
1145
1177
  ], -1)),
1146
1178
  (n(!0), o(f, null, y(s.tableData.weatherUrls, (a, r) => (n(), o("td", {
1147
1179
  rowspan: "1",
1148
1180
  colspan: "1",
1149
- class: _(s.activeIndex === r ? "active" : ""),
1181
+ class: b(s.activeIndex === r ? "active" : ""),
1150
1182
  key: Math.random() + "url"
1151
1183
  }, [
1152
- ne(D, {
1184
+ de(S, {
1153
1185
  placement: "top",
1154
1186
  effect: "light",
1155
1187
  content: s.tableData.weatherNames[r],
1156
1188
  "show-after": 500
1157
1189
  }, {
1158
- default: oe(() => [
1190
+ default: he(() => [
1159
1191
  a ? (n(), o("img", {
1160
1192
  key: 0,
1161
1193
  class: "iconfont weather-icon",
1162
1194
  src: a
1163
- }, null, 8, Oe)) : re("", !0)
1195
+ }, null, 8, Je)) : ce("", !0)
1164
1196
  ]),
1165
1197
  _: 2
1166
1198
  }, 1032, ["content"])
1167
1199
  ], 2))), 128))
1168
1200
  ]),
1169
- i("tr", Ue, [
1201
+ i("tr", Ze, [
1170
1202
  e[8] || (e[8] = i("td", {
1171
1203
  rowspan: "1",
1172
1204
  colspan: "1",
1173
1205
  class: "tr-title"
1174
1206
  }, [
1175
- b("Temperature"),
1207
+ _("Temperature"),
1176
1208
  i("span", { class: "unit" }, "°C")
1177
1209
  ], -1)),
1178
1210
  (n(!0), o(f, null, y(s.tableData.temp, (a, r) => (n(), o("td", {
1179
1211
  rowspan: "1",
1180
1212
  colspan: "1",
1181
- class: _(s.activeIndex === r ? "active" : ""),
1213
+ class: b(s.activeIndex === r ? "active" : ""),
1182
1214
  key: Math.random() + a
1183
1215
  }, x(a), 3))), 128))
1184
1216
  ]),
1185
- i("tr", Ze, [
1217
+ i("tr", Ye, [
1186
1218
  e[9] || (e[9] = i("td", {
1187
1219
  rowspan: "1",
1188
1220
  colspan: "1",
1189
1221
  class: "tr-title"
1190
1222
  }, [
1191
- b("Precipitation Probability"),
1223
+ _("Precipitation Probability"),
1192
1224
  i("span", { class: "unit" }, "%")
1193
1225
  ], -1)),
1194
1226
  (n(!0), o(f, null, y(s.tableData.precipProbability, (a, r) => (n(), o("td", {
1195
1227
  rowspan: "1",
1196
1228
  colspan: "1",
1197
- class: _(s.activeIndex === r ? "active" : ""),
1229
+ class: b(s.activeIndex === r ? "active" : ""),
1198
1230
  key: Math.random() + a
1199
1231
  }, x(a), 3))), 128))
1200
1232
  ]),
1201
- i("tr", Je, [
1233
+ i("tr", qe, [
1202
1234
  e[10] || (e[10] = i("td", {
1203
1235
  rowspan: "1",
1204
1236
  colspan: "1",
1205
1237
  class: "tr-title"
1206
1238
  }, [
1207
- b("Precipitation 1h"),
1239
+ _("Precipitation 1h"),
1208
1240
  i("span", { class: "unit" }, "mm")
1209
1241
  ], -1)),
1210
1242
  (n(!0), o(f, null, y(s.tableData.precip1h, (a, r) => (n(), o("td", {
1211
1243
  rowspan: "1",
1212
1244
  colspan: "1",
1213
- class: _(s.activeIndex === r ? "active" : ""),
1245
+ class: b(s.activeIndex === r ? "active" : ""),
1214
1246
  key: Math.random() + a
1215
1247
  }, x(a), 3))), 128))
1216
1248
  ]),
1217
- i("tr", Ye, [
1249
+ i("tr", Ke, [
1218
1250
  e[11] || (e[11] = i("td", {
1219
1251
  rowspan: "1",
1220
1252
  colspan: "1",
1221
1253
  class: "tr-title"
1222
1254
  }, [
1223
- b("Visibility"),
1255
+ _("Visibility"),
1224
1256
  i("span", { class: "unit" }, "nm")
1225
1257
  ], -1)),
1226
1258
  (n(!0), o(f, null, y(s.tableData.visibility, (a, r) => (n(), o("td", {
1227
1259
  rowspan: "1",
1228
1260
  colspan: "1",
1229
- class: _(s.activeIndex === r ? "active" : ""),
1261
+ class: b(s.activeIndex === r ? "active" : ""),
1230
1262
  key: Math.random() + a
1231
1263
  }, x(a), 3))), 128))
1232
1264
  ]),
1233
- i("tr", je, [
1265
+ i("tr", Qe, [
1234
1266
  e[12] || (e[12] = i("td", {
1235
1267
  rowspan: "1",
1236
1268
  colspan: "1",
1237
1269
  class: "tr-title"
1238
1270
  }, [
1239
- b("Relative Humidity"),
1271
+ _("Relative Humidity"),
1240
1272
  i("span", { class: "unit" }, "%")
1241
1273
  ], -1)),
1242
1274
  (n(!0), o(f, null, y(s.tableData.humidity, (a, r) => (n(), o("td", {
1243
1275
  rowspan: "1",
1244
1276
  colspan: "1",
1245
- class: _(s.activeIndex === r ? "active" : ""),
1277
+ class: b(s.activeIndex === r ? "active" : ""),
1246
1278
  key: Math.random() + a
1247
1279
  }, x(a), 3))), 128))
1248
1280
  ]),
1249
- i("tr", qe, [
1281
+ i("tr", je, [
1250
1282
  e[13] || (e[13] = i("td", {
1251
1283
  rowspan: "1",
1252
1284
  colspan: "1",
1253
1285
  class: "tr-title"
1254
1286
  }, [
1255
- b("Wind direction"),
1287
+ _("Wind direction"),
1256
1288
  i("span", { class: "unit" })
1257
1289
  ], -1)),
1258
1290
  (n(!0), o(f, null, y(s.tableData.windDir, (a, r) => (n(), o("td", {
1259
1291
  rowspan: "1",
1260
1292
  colspan: "1",
1261
- class: _(s.activeIndex === r ? "active" : ""),
1293
+ class: b(s.activeIndex === r ? "active" : ""),
1262
1294
  key: Math.random() + a
1263
1295
  }, [
1264
- isNaN(a) ? (n(), o("span", Qe, "-")) : (n(), o("span", {
1296
+ isNaN(a) ? (n(), o("span", Xe, "-")) : (n(), o("span", {
1265
1297
  key: 0,
1266
1298
  class: "iconfont icon",
1267
- style: ee({ display: "inline-block", transform: `rotate(${a}deg)` })
1299
+ style: ie({ display: "inline-block", transform: `rotate(${a}deg)` })
1268
1300
  }, "", 4))
1269
1301
  ], 2))), 128))
1270
1302
  ]),
1271
- i("tr", Ke, [
1303
+ i("tr", $e, [
1272
1304
  e[14] || (e[14] = i("td", {
1273
1305
  rowspan: "1",
1274
1306
  colspan: "1",
1275
1307
  class: "tr-title"
1276
1308
  }, [
1277
- b("Wind speed"),
1309
+ _("Wind speed"),
1278
1310
  i("span", { class: "unit" }, "kts")
1279
1311
  ], -1)),
1280
1312
  (n(!0), o(f, null, y(s.tableData.windSpeed, (a, r) => (n(), o("td", {
1281
1313
  rowspan: "1",
1282
1314
  colspan: "1",
1283
- class: _(s.activeIndex === r ? "active" : ""),
1315
+ class: b(s.activeIndex === r ? "active" : ""),
1284
1316
  key: Math.random() + a
1285
1317
  }, x(a), 3))), 128))
1286
1318
  ]),
1287
- i("tr", Xe, [
1319
+ i("tr", et, [
1288
1320
  e[15] || (e[15] = i("td", {
1289
1321
  rowspan: "1",
1290
1322
  colspan: "1",
1291
1323
  class: "tr-title"
1292
1324
  }, [
1293
- b("Wind gust"),
1325
+ _("Wind gust"),
1294
1326
  i("span", { class: "unit" }, "kts")
1295
1327
  ], -1)),
1296
1328
  (n(!0), o(f, null, y(s.tableData.windGust, (a, r) => (n(), o("td", {
1297
1329
  rowspan: "1",
1298
1330
  colspan: "1",
1299
- class: _(s.activeIndex === r ? "active" : ""),
1331
+ class: b(s.activeIndex === r ? "active" : ""),
1300
1332
  key: Math.random() + a
1301
1333
  }, x(a), 3))), 128))
1302
1334
  ])
1303
1335
  ]),
1304
1336
  e[27] || (e[27] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
1305
- i("table", $e, [
1306
- i("tr", et, [
1337
+ i("table", tt, [
1338
+ i("tr", st, [
1307
1339
  e[16] || (e[16] = i("td", {
1308
1340
  rowspan: "1",
1309
1341
  colspan: "1",
1310
1342
  class: "tr-title"
1311
1343
  }, [
1312
- b("Wind wave height"),
1344
+ _("Wind wave height"),
1313
1345
  i("span", { class: "unit" }, "m")
1314
1346
  ], -1)),
1315
1347
  (n(!0), o(f, null, y(s.tableData.windwaveHeight, (a, r) => (n(), o("td", {
1316
1348
  rowspan: "1",
1317
1349
  colspan: "1",
1318
- class: _(s.activeIndex === r ? "active" : ""),
1350
+ class: b(s.activeIndex === r ? "active" : ""),
1319
1351
  key: Math.random() + a
1320
1352
  }, x(a), 3))), 128))
1321
1353
  ]),
1322
- i("tr", tt, [
1354
+ i("tr", at, [
1323
1355
  e[17] || (e[17] = i("td", {
1324
1356
  rowspan: "1",
1325
1357
  colspan: "1",
1326
1358
  class: "tr-title"
1327
1359
  }, [
1328
- b("Wind wave direction"),
1360
+ _("Wind wave direction"),
1329
1361
  i("span", { class: "unit" })
1330
1362
  ], -1)),
1331
1363
  (n(!0), o(f, null, y(s.tableData.windwaveDir, (a, r) => (n(), o("td", {
1332
1364
  rowspan: "1",
1333
1365
  colspan: "1",
1334
- class: _(s.activeIndex === r ? "active" : ""),
1366
+ class: b(s.activeIndex === r ? "active" : ""),
1335
1367
  key: Math.random() + a
1336
1368
  }, [
1337
- isNaN(a) ? (n(), o("span", st, "-")) : (n(), o("span", {
1369
+ isNaN(a) ? (n(), o("span", it, "-")) : (n(), o("span", {
1338
1370
  key: 0,
1339
1371
  class: "iconfont icon",
1340
- style: ee({ display: "inline-block", transform: `rotate(${a}deg)` })
1372
+ style: ie({ display: "inline-block", transform: `rotate(${a}deg)` })
1341
1373
  }, "", 4))
1342
1374
  ], 2))), 128))
1343
1375
  ]),
1344
- i("tr", at, [
1376
+ i("tr", nt, [
1345
1377
  e[18] || (e[18] = i("td", {
1346
1378
  rowspan: "1",
1347
1379
  colspan: "1",
1348
1380
  class: "tr-title"
1349
1381
  }, [
1350
- b("Wind wave period"),
1382
+ _("Wind wave period"),
1351
1383
  i("span", { class: "unit" }, "s")
1352
1384
  ], -1)),
1353
1385
  (n(!0), o(f, null, y(s.tableData.windwavePeriod, (a, r) => (n(), o("td", {
1354
1386
  rowspan: "1",
1355
1387
  colspan: "1",
1356
- class: _(s.activeIndex === r ? "active" : ""),
1388
+ class: b(s.activeIndex === r ? "active" : ""),
1357
1389
  key: Math.random() + a
1358
1390
  }, x(a), 3))), 128))
1359
1391
  ]),
1360
- i("tr", it, [
1392
+ i("tr", ot, [
1361
1393
  e[19] || (e[19] = i("td", {
1362
1394
  rowspan: "1",
1363
1395
  colspan: "1",
1364
1396
  class: "tr-title"
1365
1397
  }, [
1366
- b("Swell height"),
1398
+ _("Swell height"),
1367
1399
  i("span", { class: "unit" }, "m")
1368
1400
  ], -1)),
1369
1401
  (n(!0), o(f, null, y(s.tableData.swellHeight, (a, r) => (n(), o("td", {
1370
1402
  rowspan: "1",
1371
1403
  colspan: "1",
1372
- class: _(s.activeIndex === r ? "active" : ""),
1404
+ class: b(s.activeIndex === r ? "active" : ""),
1373
1405
  key: Math.random() + a
1374
1406
  }, x(a), 3))), 128))
1375
1407
  ]),
1376
- i("tr", nt, [
1408
+ i("tr", rt, [
1377
1409
  e[20] || (e[20] = i("td", {
1378
1410
  rowspan: "1",
1379
1411
  colspan: "1",
1380
1412
  class: "tr-title"
1381
1413
  }, [
1382
- b("Swell direction"),
1414
+ _("Swell direction"),
1383
1415
  i("span", { class: "unit" })
1384
1416
  ], -1)),
1385
1417
  (n(!0), o(f, null, y(s.tableData.swellDir, (a, r) => (n(), o("td", {
1386
1418
  rowspan: "1",
1387
1419
  colspan: "1",
1388
- class: _(s.activeIndex === r ? "active" : ""),
1420
+ class: b(s.activeIndex === r ? "active" : ""),
1389
1421
  key: Math.random() + a
1390
1422
  }, [
1391
- isNaN(a) ? (n(), o("span", ot, "-")) : (n(), o("span", {
1423
+ isNaN(a) ? (n(), o("span", lt, "-")) : (n(), o("span", {
1392
1424
  key: 0,
1393
1425
  class: "iconfont icon",
1394
- style: ee({ display: "inline-block", transform: `rotate(${a}deg)` })
1426
+ style: ie({ display: "inline-block", transform: `rotate(${a}deg)` })
1395
1427
  }, "", 4))
1396
1428
  ], 2))), 128))
1397
1429
  ]),
1398
- i("tr", rt, [
1430
+ i("tr", dt, [
1399
1431
  e[21] || (e[21] = i("td", {
1400
1432
  rowspan: "1",
1401
1433
  colspan: "1",
1402
1434
  class: "tr-title"
1403
1435
  }, [
1404
- b("Swell period"),
1436
+ _("Swell period"),
1405
1437
  i("span", { class: "unit" }, "s")
1406
1438
  ], -1)),
1407
1439
  (n(!0), o(f, null, y(s.tableData.swellPeriod, (a, r) => (n(), o("td", {
1408
1440
  rowspan: "1",
1409
1441
  colspan: "1",
1410
- class: _(s.activeIndex === r ? "active" : ""),
1442
+ class: b(s.activeIndex === r ? "active" : ""),
1411
1443
  key: Math.random() + a
1412
1444
  }, x(a), 3))), 128))
1413
1445
  ]),
1414
- i("tr", lt, [
1446
+ i("tr", ht, [
1415
1447
  e[22] || (e[22] = i("td", {
1416
1448
  rowspan: "1",
1417
1449
  colspan: "1",
1418
1450
  class: "tr-title"
1419
1451
  }, [
1420
- b("Sig wave height"),
1452
+ _("Sig wave height"),
1421
1453
  i("span", { class: "unit" }, "m")
1422
1454
  ], -1)),
1423
1455
  (n(!0), o(f, null, y(s.tableData.sigwaveHeight, (a, r) => (n(), o("td", {
1424
1456
  rowspan: "1",
1425
1457
  colspan: "1",
1426
- class: _(s.activeIndex === r ? "active" : ""),
1458
+ class: b(s.activeIndex === r ? "active" : ""),
1427
1459
  key: Math.random() + a
1428
1460
  }, x(a), 3))), 128))
1429
1461
  ]),
1430
- i("tr", dt, [
1462
+ i("tr", ct, [
1431
1463
  e[23] || (e[23] = i("td", {
1432
1464
  rowspan: "1",
1433
1465
  colspan: "1",
1434
1466
  class: "tr-title"
1435
1467
  }, [
1436
- b("Current direction"),
1468
+ _("Current direction"),
1437
1469
  i("span", { class: "unit" })
1438
1470
  ], -1)),
1439
1471
  (n(!0), o(f, null, y(s.tableData.currentDir, (a, r) => (n(), o("td", {
1440
1472
  rowspan: "1",
1441
1473
  colspan: "1",
1442
- class: _(s.activeIndex === r ? "active" : ""),
1474
+ class: b(s.activeIndex === r ? "active" : ""),
1443
1475
  key: Math.random() + a
1444
1476
  }, [
1445
- isNaN(a) ? (n(), o("span", ht, "-")) : (n(), o("span", {
1477
+ isNaN(a) ? (n(), o("span", ut, "-")) : (n(), o("span", {
1446
1478
  key: 0,
1447
1479
  class: "iconfont icon",
1448
- style: ee({ display: "inline-block", transform: `rotate(${a}deg)` })
1480
+ style: ie({ display: "inline-block", transform: `rotate(${a}deg)` })
1449
1481
  }, "", 4))
1450
1482
  ], 2))), 128))
1451
1483
  ]),
1452
- i("tr", ct, [
1484
+ i("tr", pt, [
1453
1485
  e[24] || (e[24] = i("td", {
1454
1486
  rowspan: "1",
1455
1487
  colspan: "1",
1456
1488
  class: "tr-title"
1457
1489
  }, [
1458
- b("Current speed"),
1490
+ _("Current speed"),
1459
1491
  i("span", { class: "unit" }, "kts")
1460
1492
  ], -1)),
1461
1493
  (n(!0), o(f, null, y(s.tableData.currentSpeed, (a, r) => (n(), o("td", {
1462
1494
  rowspan: "1",
1463
1495
  colspan: "1",
1464
- class: _(s.activeIndex === r ? "active" : ""),
1496
+ class: b(s.activeIndex === r ? "active" : ""),
1465
1497
  key: Math.random() + a
1466
1498
  }, x(a), 3))), 128))
1467
1499
  ])
1468
1500
  ]),
1469
1501
  e[28] || (e[28] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
1470
- i("table", pt, [
1471
- i("tr", ut, [
1502
+ i("table", mt, [
1503
+ i("tr", wt, [
1472
1504
  e[25] || (e[25] = i("td", {
1473
1505
  rowspan: "1",
1474
1506
  colspan: "1",
1475
1507
  class: "tr-title"
1476
1508
  }, [
1477
- b("Sea level height"),
1509
+ _("Sea level height"),
1478
1510
  i("span", { class: "unit" }, "m")
1479
1511
  ], -1)),
1480
1512
  (n(!0), o(f, null, y(s.tableData.seaLevel, (a, r) => (n(), o("td", {
1481
1513
  rowspan: "1",
1482
1514
  colspan: "1",
1483
- class: _(s.activeIndex === r ? "active" : ""),
1515
+ class: b(s.activeIndex === r ? "active" : ""),
1484
1516
  key: Math.random() + a
1485
1517
  }, x(a), 3))), 128))
1486
1518
  ]),
1487
- i("tr", mt, [
1519
+ i("tr", gt, [
1488
1520
  e[26] || (e[26] = i("td", {
1489
1521
  rowspan: "1",
1490
1522
  colspan: "1",
1491
1523
  class: "tr-title"
1492
1524
  }, [
1493
- b("Sea surface temperature"),
1525
+ _("Sea surface temperature"),
1494
1526
  i("span", { class: "unit" }, "°C")
1495
1527
  ], -1)),
1496
1528
  (n(!0), o(f, null, y(s.tableData.seaTemp, (a, r) => (n(), o("td", {
1497
1529
  rowspan: "1",
1498
1530
  colspan: "1",
1499
- class: _(s.activeIndex === r ? "active" : ""),
1531
+ class: b(s.activeIndex === r ? "active" : ""),
1500
1532
  key: Math.random() + a
1501
1533
  }, x(a), 3))), 128))
1502
1534
  ])
1503
1535
  ])
1504
- ])) : s.loading ? (n(), o("div", wt, "Loading....")) : (P = s.position) != null && P.name ? re("", !0) : (n(), o("div", gt, "No Data"))
1536
+ ])) : s.loading ? (n(), o("div", vt, "Loading....")) : (H = s.position) != null && H.name ? ce("", !0) : (n(), o("div", ft, "No Data"))
1505
1537
  ])
1506
1538
  ]);
1507
1539
  }
1508
- const ft = /* @__PURE__ */ ke(De, [["render", vt], ["__scopeId", "data-v-961e1c0d"]]), zt = {
1540
+ const xt = /* @__PURE__ */ ze(Se, [["render", yt], ["__scopeId", "data-v-e4818d13"]]), Lt = {
1509
1541
  install(l) {
1510
- l.component("SpotReport", ft);
1542
+ l.component("SpotReport", xt);
1511
1543
  }
1512
1544
  };
1513
1545
  export {
1514
- ft as SpotReport,
1515
- zt as SpotReportPlugin
1546
+ xt as SpotReport,
1547
+ Lt as SpotReportPlugin
1516
1548
  };