@idmui/spot 0.0.5 → 0.0.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 CHANGED
@@ -1,149 +1,149 @@
1
- import I from "moment";
1
+ import T from "moment";
2
2
  import q from "moment-timezone";
3
3
  import { Search as xe } from "@element-plus/icons-vue";
4
4
  import { LngLatHelper as ae } from "@idm-plugin/geo";
5
5
  import * as ue from "echarts";
6
- import { markRaw as _e, resolveComponent as ie, openBlock as n, createElementBlock as o, createElementVNode as i, createVNode as ne, withCtx as oe, Fragment as g, renderList as v, createBlock as be, toDisplayString as y, createCommentVNode as re, createTextVNode as x, normalizeClass as _, normalizeStyle as ee } from "vue";
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
7
  import me from "axios";
8
8
  class we {
9
9
  static pickHourly(e, t) {
10
- var h, s, m, L, P, z, S, M, C, f, k, a, r, H, W, T, R, E, A, G, F, V, O, w, b, N, Z, j, Y, D, B, u, J, d, Q, X, le, de;
11
- const he = typeof t == "string" ? I(t) : t, $ = e.weather, ge = e.marine, ce = I($[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 = [];
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
12
  if (he.isBetween(te, ve, "millisecond", "[]")) {
13
- const c = he.utc().diff(te, "h", !1);
14
- let U, K;
13
+ const p = he.utc().diff(te, "h", !1);
14
+ let j, X;
15
15
  for (const se of $) {
16
- const p = se.hourly;
17
- U = {
18
- temp: (h = p.temperature_2m) == null ? void 0 : h.at(c),
19
- apparentTemp: (s = p.apparent_temperature) == null ? void 0 : s.at(c),
20
- rh: (m = p.relative_humidity_2m) == null ? void 0 : m.at(c),
21
- dp: (L = p.dew_point_2m) == null ? void 0 : L.at(c),
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
22
  precip: {
23
- probability: (P = p.precipitation_probability) == null ? void 0 : P.at(c),
24
- sum: (z = p.precipitation) == null ? void 0 : z.at(c)
23
+ probability: (M = u.precipitation_probability) == null ? void 0 : M.at(p),
24
+ sum: (D = u.precipitation) == null ? void 0 : D.at(p)
25
25
  },
26
- code: (S = p.weather_code) == null ? void 0 : S.at(c),
27
- visibility: this.m2nm((M = p.visibility) == null ? void 0 : M.at(c)),
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
28
  wind: {
29
- speed: (C = p.wind_speed_10m) == null ? void 0 : C.at(c),
30
- kts: (f = p.wind_speed_10m) == null ? void 0 : f.at(c),
31
- degree: (k = p.wind_direction_10m) == null ? void 0 : k.at(c),
32
- bearing: ((a = p.wind_direction_10m) == null ? void 0 : a.at(c)) !== null ? (((r = p.wind_direction_10m) == null ? void 0 : r.at(c)) + 180) % 360 : null,
33
- gusts: (H = p.wind_gusts_10m) == null ? void 0 : H.at(c)
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
34
  },
35
- isDay: (W = p.is_day) == null ? void 0 : W.at(c)
35
+ isDay: (k = u.is_day) == null ? void 0 : k.at(p)
36
36
  };
37
- const { name: ye, url: fe } = this.parseWeatherCode(U.code, U.isDay);
38
- U.name = ye, U.url = fe, U.wind.scale = this.beaufort(this.kts2ms(U.wind.kts)), U.wind.direction = this.degree2Direction(U.wind.degree);
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
39
  }
40
40
  for (const se of ge) {
41
- const p = se.hourly;
42
- K = {
41
+ const u = se.hourly;
42
+ X = {
43
43
  wave: {
44
44
  sig: {
45
- height: (T = p.wave_height) == null ? void 0 : T.at(c),
46
- degree: (R = p.wave_direction) == null ? void 0 : R.at(c),
47
- bearing: ((E = p.wave_direction) == null ? void 0 : E.at(c)) !== null ? (((A = p.wave_direction) == null ? void 0 : A.at(c)) + 180) % 360 : null,
48
- period: (G = p.wave_period) == null ? void 0 : G.at(c)
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)
49
49
  },
50
50
  swell: {
51
- height: (F = p.swell_wave_height) == null ? void 0 : F.at(c),
52
- degree: (V = p.swell_wave_direction) == null ? void 0 : V.at(c),
53
- bearing: ((O = p.swell_wave_direction) == null ? void 0 : O.at(c)) !== null ? (((w = p.swell_wave_direction) == null ? void 0 : w.at(c)) + 180) % 360 : null,
54
- period: (b = p.swell_wave_period) == null ? void 0 : b.at(c),
55
- peakPeriod: (N = p.swell_wave_peak_period) == null ? void 0 : N.at(c)
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)
56
56
  },
57
57
  wd: {
58
- height: (Z = p.wind_wave_height) == null ? void 0 : Z.at(c),
59
- degree: (j = p.wind_wave_direction) == null ? void 0 : j.at(c),
60
- bearing: ((Y = p.wind_wave_direction) == null ? void 0 : Y.at(c)) !== null ? (((D = p.wind_wave_direction) == null ? void 0 : D.at(c)) + 180) % 360 : null,
61
- period: (B = p.wind_wave_period) == null ? void 0 : B.at(c),
62
- peakPeriod: (u = p.wind_wave_peak_period) == null ? void 0 : u.at(c)
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
63
  }
64
64
  },
65
65
  current: {
66
- speed: (J = p.ocean_current_velocity) == null ? void 0 : J.at(c),
67
- kts: (d = p.ocean_current_velocity) == null ? void 0 : d.at(c),
68
- degree: (Q = p.ocean_current_direction) == null ? void 0 : Q.at(c),
69
- bearing: ((X = p.ocean_current_direction) == null ? void 0 : X.at(c)) ?? null
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
70
  },
71
- sst: (le = p.sea_surface_temperature) == null ? void 0 : le.at(c),
72
- height: (de = p.sea_level_height_msl) == null ? void 0 : de.at(c)
73
- }, K.wave = this.parseWave(K.wave), K.current.direction = this.degree2Direction(K.current.degree);
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
74
  }
75
75
  pe.push({
76
- utc: te.add(c, "h").format(),
77
- weather: { ...U },
78
- ...K
76
+ utc: te.add(p, "h").format(),
77
+ weather: { ...j },
78
+ ...X
79
79
  });
80
80
  }
81
81
  return pe;
82
82
  }
83
83
  static pickDaily(e, t) {
84
- var h, s, m, L, P, z, S, M, C, f, k, a, r, H, W, T, R, E, A, G, F, V, O;
85
- const w = typeof t == "string" ? I(t) : t, b = e.weather, N = e.marine, Z = I(b[0].daily.time.at(0)), j = I(b[0].daily.time.at(-1)), Y = [];
86
- if (w.isBetween(Z, j, "millisecond", "[]")) {
87
- let D, B;
88
- const u = w.diff(Z, "d", !1);
89
- for (const J of b) {
90
- const d = J.daily;
91
- D = {
92
- code: (h = d.weather_code) == null ? void 0 : h.at(u),
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
93
  temp: {
94
- max: (s = d.temperature_2m_max) == null ? void 0 : s.at(u),
95
- min: (m = d.temperature_2m_min) == null ? void 0 : m.at(u)
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
96
  },
97
97
  apparentTemp: {
98
- max: (L = d.apparent_temperature_max) == null ? void 0 : L.at(u),
99
- min: (P = d.apparent_temperature_min) == null ? void 0 : P.at(u)
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
100
  },
101
101
  precip: {
102
- sum: (z = d.precipitation_sum) == null ? void 0 : z.at(u),
103
- hours: (S = d.precipitation_hours) == null ? void 0 : S.at(u),
104
- probability: (M = d.precipitation_probability_max) == null ? void 0 : M.at(u)
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
105
  },
106
106
  wind: {
107
- speed: (C = d.wind_speed_10m_max) == null ? void 0 : C.at(u),
108
- kts: (f = d.wind_speed_10m_max) == null ? void 0 : f.at(u),
109
- degree: (k = d.wind_direction_10m_dominant) == null ? void 0 : k.at(u),
110
- gusts: (a = d.wind_gusts_10m_max) == null ? void 0 : a.at(u)
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
111
  }
112
112
  };
113
- const { name: Q, url: X } = this.parseWeatherCode(D.code, !0);
114
- D.name = Q, D.url = X, D.wind.scale = this.beaufort(this.kts2ms(D.wind.kts)), D.wind.direction = this.degree2Direction(D.wind.degree);
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
115
  }
116
- for (const J of N) {
117
- const d = J.daily;
118
- B = {
116
+ for (const N of J) {
117
+ const d = N.daily;
118
+ m = {
119
119
  wave: {
120
120
  sig: {
121
- height: (r = d.wave_height_max) == null ? void 0 : r.at(u),
122
- degree: (H = d.wave_direction_dominant) == null ? void 0 : H.at(u),
123
- period: (W = d.wave_period_max) == null ? void 0 : W.at(u)
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)
124
124
  },
125
125
  swell: {
126
- height: (T = d.swell_wave_height_max) == null ? void 0 : T.at(u),
127
- degree: (R = d.wave_direction_dominant) == null ? void 0 : R.at(u),
128
- period: (E = d.swell_wave_period_max) == null ? void 0 : E.at(u),
129
- peakPeriod: (A = d.swell_wave_peak_period_max) == null ? void 0 : A.at(u)
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)
130
130
  },
131
131
  wd: {
132
- height: (G = d.wind_wave_height_max) == null ? void 0 : G.at(u),
133
- degree: (F = d.wind_wave_direction_dominant) == null ? void 0 : F.at(u),
134
- period: (V = d.wind_wave_period_max) == null ? void 0 : V.at(u),
135
- peakPeriod: (O = d.wind_wave_peak_period_max) == null ? void 0 : O.at(u)
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)
136
136
  }
137
137
  }
138
- }, B.wave = this.parseWave(B.wave);
138
+ }, m.wave = this.parseWave(m.wave);
139
139
  }
140
- Y.push({
141
- utc: Z.add(u, "d").utc().format(),
142
- weather: { ...D },
143
- ...B
140
+ w.push({
141
+ utc: W.add(c, "d").utc().format(),
142
+ weather: { ...v },
143
+ ...m
144
144
  });
145
145
  }
146
- return Y;
146
+ return w;
147
147
  }
148
148
  static parseWave(e) {
149
149
  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;
@@ -483,7 +483,7 @@ const ke = (l, e) => {
483
483
  },
484
484
  ts: {
485
485
  type: String,
486
- default: I().utc().format()
486
+ default: T().utc().format()
487
487
  },
488
488
  timeZone: {
489
489
  type: Number,
@@ -498,7 +498,7 @@ const ke = (l, e) => {
498
498
  return {
499
499
  placeholder: "search for port name or coordinates",
500
500
  searchName: void 0,
501
- rawSearchIcon: _e(xe),
501
+ rawSearchIcon: be(xe),
502
502
  positionGmt: void 0,
503
503
  issuedDate: void 0,
504
504
  meteoData: {},
@@ -522,7 +522,7 @@ const ke = (l, e) => {
522
522
  },
523
523
  computeHourZ() {
524
524
  return function(l) {
525
- return l ? `${I(l).utc().format("HH")}Z` : "-";
525
+ return l ? `${T(l).utc().format("HH")}Z` : "-";
526
526
  };
527
527
  },
528
528
  computeWeek() {
@@ -572,13 +572,13 @@ const ke = (l, e) => {
572
572
  },
573
573
  initInfo() {
574
574
  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 = I(this.ts).utc().format("MMM-DD/HHmm,YYYY[Z]"), 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) => {
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,YYYY[Z]"), 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
576
  var h;
577
577
  return t.name === ((h = this.position) == null ? void 0 : h.name);
578
578
  });
579
579
  },
580
580
  initTableData() {
581
- var l, e, t, h, s, m, L, P, z, S, M, C, f, k, a, r, H, W, T, R, E, A, G, F, V, O, w, b, N, Z, j, Y, D, B;
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;
582
582
  this.tableData = {
583
583
  hours: [],
584
584
  utcHours: [],
@@ -605,309 +605,373 @@ const ke = (l, e) => {
605
605
  seaLevel: [],
606
606
  seaTemp: []
607
607
  };
608
- for (let u = 0; u < 24; u++) {
609
- const J = I(this.pickedDate).clone().add(u, "h").format();
610
- this.tableData.hours.push(J);
611
- const d = ((l = we.pickHourly(this.meteoData, J)) == 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((m = (s = d.weather) == null ? void 0 : s.precip) == null ? void 0 : m.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((P = (L = d.weather) == null ? void 0 : L.precip) == null ? void 0 : P.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((z = d.weather) == null ? void 0 : z.visibility, 0) ?? "-"), this.tableData.humidity.push(this.roundPrecision((S = d.weather) == null ? void 0 : S.rh, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((C = (M = d.weather) == null ? void 0 : M.wind) == null ? void 0 : C.kts, 1)), this.tableData.windDir.push((k = (f = d.weather) == null ? void 0 : f.wind) == null ? void 0 : k.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((W = (H = d.wave) == null ? void 0 : H.sig) == null ? void 0 : W.height, 1) ?? "-"), this.tableData.sigwaveDir.push((R = (T = d.wave) == null ? void 0 : T.sig) == null ? void 0 : R.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((A = (E = d.wave) == null ? void 0 : E.wd) == null ? void 0 : A.height, 1) ?? "-"), this.tableData.windwaveDir.push((F = (G = d.wave) == null ? void 0 : G.wd) == null ? void 0 : F.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((b = (w = d.wave) == null ? void 0 : w.swell) == null ? void 0 : b.height, 1) ?? "-"), this.tableData.swellDir.push((Z = (N = d.wave) == null ? void 0 : N.swell) == null ? void 0 : Z.bearing), this.tableData.swellPeriod.push(this.roundPrecision((Y = (j = d.wave) == null ? void 0 : j.swell) == null ? void 0 : Y.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((D = d.current) == null ? void 0 : D.speed, 1) ?? "-"), this.tableData.currentDir.push((B = d.current) == null ? void 0 : B.bearing), this.tableData.seaLevel.push(this.roundPrecision(d.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(d.sst, 1) ?? "-");
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) ?? "-");
613
613
  }
614
614
  },
615
615
  initEchart() {
616
- var r, H, W, T, R, E, A, G, F, V, O;
617
- const l = [], e = [], t = [], h = [], s = [], m = [], L = [], P = [], z = [];
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 = {};
618
618
  for (let w = 0; w < 7; w++) {
619
- const b = I(this.pickedDate).clone().add(w, "d");
620
- l.push(q(b).tz(this.positionGmt).format("yyyy-MM-DD")), e.push(this.computeMMMDD(b)), t.push(w === 0 ? "Today" : this.computeWeek(b));
621
- const N = ((r = we.pickDaily(this.meteoData, b)) == null ? void 0 : r[0]) || {};
622
- h.push(this.roundPrecision((W = (H = N.weather) == null ? void 0 : H.temp) == null ? void 0 : W.min, 0)), s.push(this.roundPrecision((R = (T = N.weather) == null ? void 0 : T.temp) == null ? void 0 : R.max, 0)), L.push(this.roundPrecision((A = (E = N.weather) == null ? void 0 : E.wind) == null ? void 0 : A.kts, 1) + " kts"), z.push(this.roundPrecision((F = (G = N.weather) == null ? void 0 : G.precip) == null ? void 0 : F.sum, 0) + " mm"), m.push({ symbol: "image://" + ((V = N.weather) == null ? void 0 : V.url) }), P.push({ symbol: "image://" + ((O = N.weather) == null ? void 0 : O.url) });
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);
623
623
  }
624
- const S = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) - Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))), M = Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))) - 1.5 * S, C = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) + 2 * S, f = 4 + 0.5 / l.length * 92 + "%", k = ue.init(document.getElementById("weather-chart")), a = {
625
- grid: {
626
- bottom: 0,
627
- top: 0,
628
- left: "4%",
629
- right: "4%"
630
- },
631
- tooltip: {
632
- trigger: "none",
633
- show: !1
634
- },
635
- legend: {
636
- show: !1
637
- },
638
- xAxis: {
639
- left: 0,
640
- right: 0,
641
- top: "50%",
642
- height: "50%",
643
- type: "category",
644
- data: l,
645
- show: !1
646
- },
647
- singleAxis: [
648
- {
649
- left: f,
650
- right: f,
651
- type: "category",
652
- show: !1,
653
- axisLine: {
654
- show: !1
655
- // 隐藏轴线
656
- },
657
- axisTick: {
658
- show: !1
659
- // 隐藏刻度
660
- },
661
- axisLabel: {
662
- show: !1
663
- // 隐藏刻度标签
664
- },
665
- splitLine: {
666
- show: !1
667
- // 隐藏分割线
668
- },
669
- boundaryGap: !1,
670
- data: l,
671
- top: "7%",
672
- height: "2%"
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(
625
+ unescape(
626
+ encodeURIComponent(
627
+ '<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="#1296db" p-id="10952"></path></svg>'
628
+ )
629
+ )
630
+ ), Z = "data:image/svg+xml;base64," + window.btoa(
631
+ unescape(
632
+ encodeURIComponent(
633
+ '<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
+ )
635
+ )
636
+ ), k = new Image(64, 64);
637
+ k.src = Z, k.onload = () => {
638
+ 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}`] = {
645
+ height: 12,
646
+ width: 12,
647
+ align: "left",
648
+ backgroundColor: {
649
+ image: K
650
+ }
651
+ };
652
+ }
653
+ const w = ue.init(document.getElementById("weather-chart")), v = {
654
+ grid: {
655
+ bottom: 0,
656
+ top: 0,
657
+ left: "4%",
658
+ right: "4%"
673
659
  },
674
- {
675
- left: f,
676
- right: f,
677
- type: "category",
678
- show: !1,
679
- axisLine: {
680
- show: !1
681
- // 隐藏轴线
682
- },
683
- axisTick: {
684
- show: !1
685
- // 隐藏刻度
686
- },
687
- axisLabel: {
688
- show: !1
689
- // 隐藏刻度标签
690
- },
691
- splitLine: {
692
- show: !1
693
- // 隐藏分割线
694
- },
695
- boundaryGap: !1,
696
- data: l,
697
- top: "16%",
698
- height: "2%"
660
+ tooltip: {
661
+ trigger: "item",
662
+ show: !0,
663
+ position: "right",
664
+ formatter: function(m) {
665
+ return m.seriesName === "Weather Icon" ? I[m.dataIndex] : !1;
666
+ }
667
+ },
668
+ legend: {
669
+ show: !1
699
670
  },
700
- {
701
- left: f,
702
- right: f,
671
+ xAxis: {
672
+ left: 0,
673
+ right: 0,
674
+ top: "50%",
675
+ height: "50%",
703
676
  type: "category",
704
- show: !1,
705
- axisLine: {
706
- show: !1
707
- // 隐藏轴线
708
- },
709
- axisTick: {
710
- show: !1
711
- // 隐藏刻度
712
- },
713
- axisLabel: {
714
- show: !1
715
- // 隐藏刻度标签
716
- },
717
- splitLine: {
718
- show: !1
719
- // 隐藏分割线
720
- },
721
- boundaryGap: !1,
722
677
  data: l,
723
- top: "27%",
724
- height: "2%"
678
+ show: !1
725
679
  },
726
- {
727
- left: f,
728
- right: f,
729
- type: "category",
730
- show: !1,
731
- axisLine: {
732
- show: !1
733
- // 隐藏轴线
680
+ singleAxis: [
681
+ {
682
+ left: a,
683
+ right: a,
684
+ type: "category",
685
+ show: !1,
686
+ axisLine: {
687
+ show: !1
688
+ // 隐藏轴线
689
+ },
690
+ axisTick: {
691
+ show: !1
692
+ // 隐藏刻度
693
+ },
694
+ axisLabel: {
695
+ show: !1
696
+ // 隐藏刻度标签
697
+ },
698
+ splitLine: {
699
+ show: !1
700
+ // 隐藏分割线
701
+ },
702
+ boundaryGap: !1,
703
+ data: l,
704
+ top: "7%",
705
+ height: "2%"
734
706
  },
735
- axisTick: {
736
- show: !1
737
- // 隐藏刻度
707
+ {
708
+ left: a,
709
+ right: a,
710
+ type: "category",
711
+ show: !1,
712
+ axisLine: {
713
+ show: !1
714
+ // 隐藏轴线
715
+ },
716
+ axisTick: {
717
+ show: !1
718
+ // 隐藏刻度
719
+ },
720
+ axisLabel: {
721
+ show: !1
722
+ // 隐藏刻度标签
723
+ },
724
+ splitLine: {
725
+ show: !1
726
+ // 隐藏分割线
727
+ },
728
+ boundaryGap: !1,
729
+ data: l,
730
+ top: "16%",
731
+ height: "2%"
738
732
  },
739
- axisLabel: {
740
- show: !1
741
- // 隐藏刻度标签
733
+ {
734
+ left: a,
735
+ right: a,
736
+ type: "category",
737
+ show: !1,
738
+ axisLine: {
739
+ show: !1
740
+ // 隐藏轴线
741
+ },
742
+ axisTick: {
743
+ show: !1
744
+ // 隐藏刻度
745
+ },
746
+ axisLabel: {
747
+ show: !1
748
+ // 隐藏刻度标签
749
+ },
750
+ splitLine: {
751
+ show: !1
752
+ // 隐藏分割线
753
+ },
754
+ boundaryGap: !1,
755
+ data: l,
756
+ top: "27%",
757
+ height: "2%"
742
758
  },
743
- splitLine: {
744
- show: !1
745
- // 隐藏分割线
759
+ {
760
+ left: a,
761
+ right: a,
762
+ type: "category",
763
+ show: !1,
764
+ axisLine: {
765
+ show: !1
766
+ // 隐藏轴线
767
+ },
768
+ axisTick: {
769
+ show: !1
770
+ // 隐藏刻度
771
+ },
772
+ axisLabel: {
773
+ show: !1
774
+ // 隐藏刻度标签
775
+ },
776
+ splitLine: {
777
+ show: !1
778
+ // 隐藏分割线
779
+ },
780
+ boundaryGap: !1,
781
+ data: l,
782
+ top: "84%",
783
+ height: "2%"
746
784
  },
747
- boundaryGap: !1,
748
- data: l,
749
- top: "84%",
750
- height: "2%"
751
- },
752
- {
753
- left: f,
754
- right: f,
755
- type: "category",
785
+ {
786
+ left: a,
787
+ right: a,
788
+ type: "category",
789
+ show: !1,
790
+ axisLine: {
791
+ show: !1
792
+ // 隐藏轴线
793
+ },
794
+ axisTick: {
795
+ show: !1
796
+ // 隐藏刻度
797
+ },
798
+ axisLabel: {
799
+ show: !1
800
+ // 隐藏刻度标签
801
+ },
802
+ splitLine: {
803
+ show: !1
804
+ // 隐藏分割线
805
+ },
806
+ boundaryGap: !1,
807
+ data: l,
808
+ top: "93%",
809
+ height: "2%"
810
+ }
811
+ ],
812
+ yAxis: {
813
+ type: "value",
814
+ name: "温度(℃)",
756
815
  show: !1,
757
- axisLine: {
758
- show: !1
759
- // 隐藏轴线
760
- },
761
- axisTick: {
762
- show: !1
763
- // 隐藏刻度
764
- },
816
+ min: C,
817
+ max: P,
765
818
  axisLabel: {
766
- show: !1
767
- // 隐藏刻度标签
768
- },
769
- splitLine: {
770
- show: !1
771
- // 隐藏分割线
772
- },
773
- boundaryGap: !1,
774
- data: l,
775
- top: "93%",
776
- height: "2%"
777
- }
778
- ],
779
- yAxis: {
780
- type: "value",
781
- name: "温度(℃)",
782
- show: !1,
783
- min: M,
784
- max: C,
785
- axisLabel: {
786
- formatter: "{value} °C"
787
- }
788
- },
789
- series: [
790
- {
791
- singleAxisIndex: 0,
792
- coordinateSystem: "singleAxis",
793
- type: "scatter",
794
- data: t,
795
- label: {
796
- show: !0,
797
- color: "#000",
798
- fontSize: 14,
799
- formatter: "{c}"
800
- },
801
- symbolSize: 0
819
+ formatter: "{value} °C"
820
+ }
802
821
  },
803
- {
804
- singleAxisIndex: 1,
805
- coordinateSystem: "singleAxis",
806
- type: "scatter",
807
- data: e,
808
- label: {
809
- show: !0,
810
- color: "#000",
811
- formatter: "{c}"
822
+ series: [
823
+ {
824
+ singleAxisIndex: 0,
825
+ coordinateSystem: "singleAxis",
826
+ type: "scatter",
827
+ data: t,
828
+ label: {
829
+ show: !0,
830
+ color: "#fff",
831
+ fontSize: 14,
832
+ formatter: "{c}"
833
+ },
834
+ symbolSize: 0
812
835
  },
813
- symbolSize: 0
814
- },
815
- {
816
- singleAxisIndex: 2,
817
- coordinateSystem: "singleAxis",
818
- type: "scatter",
819
- data: m,
820
- symbolSize: 36
821
- },
822
- {
823
- name: "温度(℃)",
824
- type: "line",
825
- data: h,
826
- smooth: !0,
827
- itemStyle: {
828
- color: "#2a57b7"
836
+ {
837
+ singleAxisIndex: 1,
838
+ coordinateSystem: "singleAxis",
839
+ type: "scatter",
840
+ data: e,
841
+ label: {
842
+ show: !0,
843
+ color: "#fff",
844
+ formatter: "{c}"
845
+ },
846
+ symbolSize: 0
829
847
  },
830
- label: {
831
- show: !0,
832
- position: [-10, 12],
833
- formatter: "{c} °C",
834
- fontSize: 10
848
+ {
849
+ name: "Weather Icon",
850
+ singleAxisIndex: 2,
851
+ coordinateSystem: "singleAxis",
852
+ type: "scatter",
853
+ data: g,
854
+ symbolSize: 36
835
855
  },
836
- markArea: {
856
+ {
857
+ name: "温度(℃)",
858
+ type: "line",
859
+ data: h,
860
+ smooth: !0,
837
861
  itemStyle: {
838
- color: "#e1f7ff"
862
+ color: "rgba(255,255,255,0.7)"
839
863
  },
840
- data: [
841
- [
842
- {
843
- x: "4%"
844
- },
845
- {
846
- x: 4 + 1 / l.length * 92 + "%"
847
- }
864
+ label: {
865
+ show: !0,
866
+ color: "rgba(255,255,255,1)",
867
+ position: [-10, 12],
868
+ formatter: "{c} °C",
869
+ fontSize: 12
870
+ },
871
+ markArea: {
872
+ itemStyle: {
873
+ color: "rgb(71,143,206)"
874
+ },
875
+ data: [
876
+ [
877
+ {
878
+ x: "4%"
879
+ },
880
+ {
881
+ x: 4 + 1 / l.length * 92 + "%"
882
+ }
883
+ ]
848
884
  ]
849
- ]
850
- }
851
- },
852
- {
853
- name: "温度(℃)",
854
- type: "line",
855
- data: s,
856
- smooth: !0,
857
- itemStyle: {
858
- color: "#a7c4ff"
885
+ }
859
886
  },
860
- label: {
861
- show: !0,
862
- position: [-10, -12],
863
- formatter: "{c} °C",
864
- fontSize: 10
865
- }
866
- },
867
- {
868
- singleAxisIndex: 3,
869
- coordinateSystem: "singleAxis",
870
- type: "scatter",
871
- data: L,
872
- label: {
873
- show: !0,
874
- color: "#000",
875
- formatter: "{c}"
887
+ {
888
+ name: "温度(℃)",
889
+ type: "line",
890
+ data: s,
891
+ smooth: !0,
892
+ itemStyle: {
893
+ color: "rgba(255,255,255,0.7)"
894
+ },
895
+ label: {
896
+ show: !0,
897
+ color: "rgba(255,255,255,1)",
898
+ position: [-10, -12],
899
+ formatter: "{c} °C",
900
+ fontSize: 12
901
+ }
876
902
  },
877
- symbolSize: 0
878
- },
879
- {
880
- singleAxisIndex: 4,
881
- coordinateSystem: "singleAxis",
882
- type: "scatter",
883
- data: z,
884
- label: {
885
- show: !0,
886
- color: "#000",
887
- formatter: "{c}"
903
+ {
904
+ singleAxisIndex: 3,
905
+ coordinateSystem: "singleAxis",
906
+ type: "scatter",
907
+ data: M,
908
+ label: {
909
+ show: !0,
910
+ color: "#fff",
911
+ // formatter: '{c}'
912
+ rich: {
913
+ ...S,
914
+ title: {
915
+ align: "center",
916
+ vertical: "center"
917
+ }
918
+ },
919
+ formatter: function(m) {
920
+ return `{WindIcon${m.dataIndex}|}{title|${m.value}}`;
921
+ }
922
+ },
923
+ symbolSize: 0
888
924
  },
889
- symbolSize: 0
890
- }
891
- ]
892
- };
893
- k.setOption(a), k.on("click", (w) => {
894
- const b = w.dataIndex;
895
- this.pickedDate = q(l[b]).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.pickedWeek = b === 0 ? "Today" : this.computeWeek(this.pickedDate), this.initTableData(), a.series[3].markArea = {
896
- itemStyle: {
897
- color: "#e1f7ff"
898
- },
899
- data: [
900
- [
901
- {
902
- x: 4 + b / l.length * 92 + "%"
925
+ {
926
+ singleAxisIndex: 4,
927
+ coordinateSystem: "singleAxis",
928
+ type: "scatter",
929
+ data: z,
930
+ label: {
931
+ show: !0,
932
+ color: "#fff",
933
+ // formatter: '{c}',
934
+ rich: {
935
+ dIcon: {
936
+ height: 16,
937
+ width: 16,
938
+ align: "left",
939
+ backgroundColor: {
940
+ image: r
941
+ }
942
+ },
943
+ title: {
944
+ align: "center",
945
+ vertical: "center"
946
+ }
947
+ },
948
+ formatter: function(m) {
949
+ return `{dIcon|}{title|${m.value}}`;
950
+ }
903
951
  },
904
- {
905
- x: 4 + (b + 1) / l.length * 92 + "%"
906
- }
907
- ]
952
+ symbolSize: 0
953
+ }
908
954
  ]
909
- }, k.setOption(a);
910
- });
955
+ };
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 = {
959
+ itemStyle: {
960
+ color: "rgb(71,143,206)"
961
+ },
962
+ data: [
963
+ [
964
+ {
965
+ x: 4 + c / l.length * 92 + "%"
966
+ },
967
+ {
968
+ x: 4 + (c + 1) / l.length * 92 + "%"
969
+ }
970
+ ]
971
+ ]
972
+ }, w.setOption(v);
973
+ });
974
+ };
911
975
  },
912
976
  handleCollect() {
913
977
  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));
@@ -929,15 +993,15 @@ const ke = (l, e) => {
929
993
  if (!this.searchName)
930
994
  return !1;
931
995
  this.position = {
932
- portId: (t = this.positionList.find((m) => m.name === this.searchName)) == null ? void 0 : t.id,
933
- lat: (h = this.positionList.find((m) => m.name === this.searchName)) == null ? void 0 : h.lat,
934
- lng: (s = this.positionList.find((m) => m.name === this.searchName)) == null ? void 0 : s.lng,
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,
935
999
  name: this.searchName
936
1000
  }, this.handleClear();
937
1001
  const l = {
938
1002
  lat: this.position.lat,
939
1003
  lng: this.position.lng,
940
- datetime: this.ts ? I(this.ts).utc().add(-1, "d").format() : I().add(-1, "d").utc().format(),
1004
+ datetime: this.ts ? T(this.ts).utc().add(-1, "d").format() : T().add(-1, "d").utc().format(),
941
1005
  forecastDays: 8,
942
1006
  selfHosted: !1
943
1007
  }, e = await me.post("https://cbe.idmwx.com/api/arc/meteo2/spot/forecast", l, {
@@ -953,7 +1017,7 @@ const ke = (l, e) => {
953
1017
  this.loading = !0, this.meteoData = {}, this.isCollected = !1, ue.dispose(document.getElementById("weather-chart"));
954
1018
  }
955
1019
  }
956
- }, ze = { class: "spot-report" }, Se = { class: "header-box flex-between" }, Ne = { class: "bg" }, Le = { class: "search-box flex-start" }, Me = { class: "content-box" }, Ce = { class: "title-box flex-between" }, Pe = { class: "main-title" }, Ie = { class: "sub-title" }, He = { class: "flex-end" }, We = {
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 = {
957
1021
  key: 0,
958
1022
  id: "weather-chart"
959
1023
  }, Te = {
@@ -962,24 +1026,24 @@ const ke = (l, e) => {
962
1026
  }, Re = {
963
1027
  key: 2,
964
1028
  class: "weather-chart flex-center"
965
- }, Ee = {
1029
+ }, Ae = {
966
1030
  key: 3,
967
1031
  class: "card-box"
968
- }, Ae = { class: "date" }, Ge = { class: "basic-table" }, Fe = { class: "day" }, Ve = { class: "hour" }, Oe = { class: "icon" }, Be = ["src"], Ue = { class: "text" }, Ze = { class: "text" }, Je = { class: "text" }, Ye = { class: "text" }, je = { class: "text" }, qe = { class: "text" }, Ke = { key: 1 }, Qe = { 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 = {
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 = {
969
1033
  key: 4,
970
1034
  class: "card-box flex-center"
971
1035
  }, gt = {
972
1036
  key: 5,
973
1037
  class: "card-box flex-center"
974
1038
  };
975
- function vt(l, e, t, h, s, m) {
976
- var S, M, C, f, k;
977
- const L = ie("ElOption"), P = ie("ElSelect"), z = ie("ElTooltip");
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");
978
1042
  return n(), o("div", ze, [
979
1043
  i("div", Se, [
980
- i("div", Ne, [
981
- i("div", Le, [
982
- ne(P, {
1044
+ i("div", Le, [
1045
+ i("div", Ne, [
1046
+ ne(M, {
983
1047
  modelValue: s.searchName,
984
1048
  "onUpdate:modelValue": e[0] || (e[0] = (a) => s.searchName = a),
985
1049
  filterable: "",
@@ -991,11 +1055,11 @@ function vt(l, e, t, h, s, m) {
991
1055
  "remote-show-suffix": "",
992
1056
  onFocus: e[1] || (e[1] = (a) => s.placeholder = ""),
993
1057
  onBlur: e[2] || (e[2] = (a) => s.placeholder = "search for port name or coordinates"),
994
- "remote-method": m.fetchSuggestPosition,
995
- onChange: m.handleFetchMeteo
1058
+ "remote-method": g.fetchSuggestPosition,
1059
+ onChange: g.handleFetchMeteo
996
1060
  }, {
997
1061
  default: oe(() => [
998
- (n(!0), o(g, null, v(s.positionList, (a) => (n(), be(L, {
1062
+ (n(!0), o(f, null, y(s.positionList, (a) => (n(), _e(I, {
999
1063
  key: a.name,
1000
1064
  label: a.name,
1001
1065
  value: a.name
@@ -1006,14 +1070,14 @@ function vt(l, e, t, h, s, m) {
1006
1070
  ])
1007
1071
  ])
1008
1072
  ]),
1009
- i("div", Me, [
1010
- i("div", Ce, [
1073
+ i("div", Ie, [
1074
+ i("div", Me, [
1011
1075
  i("div", null, [
1012
- i("div", Pe, "Weather forecast for " + y(((S = s.position) == null ? void 0 : S.name) || "-") + " ( " + y(s.positionGmt) + " )", 1),
1013
- i("div", Ie, "At " + y((M = s.position) != null && M.portId ? "port" : "coordinates") + ", issued " + y(s.issuedDate), 1)
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)
1014
1078
  ]),
1015
1079
  i("div", He, [
1016
- ne(z, {
1080
+ ne(D, {
1017
1081
  placement: "left",
1018
1082
  effect: "light",
1019
1083
  content: s.isCollected ? "remove the port/coordinate from the search list" : "add the port/coordinate to the search list",
@@ -1023,20 +1087,20 @@ function vt(l, e, t, h, s, m) {
1023
1087
  s.isCollected ? (n(), o("span", {
1024
1088
  key: 0,
1025
1089
  class: "iconfont icon active",
1026
- onClick: e[3] || (e[3] = (...a) => m.handleCollect && m.handleCollect(...a))
1090
+ onClick: e[3] || (e[3] = (...a) => g.handleCollect && g.handleCollect(...a))
1027
1091
  }, "")) : (n(), o("span", {
1028
1092
  key: 1,
1029
1093
  class: "iconfont icon",
1030
- onClick: e[4] || (e[4] = (...a) => m.handleCollect && m.handleCollect(...a))
1094
+ onClick: e[4] || (e[4] = (...a) => g.handleCollect && g.handleCollect(...a))
1031
1095
  }, ""))
1032
1096
  ]),
1033
1097
  _: 1
1034
1098
  }, 8, ["content"])
1035
1099
  ])
1036
1100
  ]),
1037
- (C = s.position) != null && C.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")),
1038
- (f = s.position) != null && f.name && !s.loading ? (n(), o("div", Ee, [
1039
- i("div", Ae, y(s.pickedWeek) + " " + y(m.computeMMMDD(s.pickedDate)), 1),
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),
1040
1104
  i("table", Ge, [
1041
1105
  i("tr", Fe, [
1042
1106
  e[5] || (e[5] = i("th", {
@@ -1044,48 +1108,48 @@ function vt(l, e, t, h, s, m) {
1044
1108
  colspan: "1",
1045
1109
  class: "tr-title"
1046
1110
  }, [
1047
- x("Local time"),
1111
+ b("Local time"),
1048
1112
  i("span", { class: "unit" }, "(LT)")
1049
1113
  ], -1)),
1050
- (n(!0), o(g, null, v(s.tableData.hours, (a, r) => (n(), o("th", {
1114
+ (n(!0), o(f, null, y(s.tableData.hours, (a, r) => (n(), o("th", {
1051
1115
  rowspan: "1",
1052
1116
  colspan: "1",
1053
1117
  class: _(s.activeIndex === r ? "active" : ""),
1054
1118
  key: Math.random() + "local"
1055
- }, y(m.computeHourL(a)), 3))), 128))
1119
+ }, x(g.computeHourL(a)), 3))), 128))
1056
1120
  ]),
1057
- i("tr", Ve, [
1121
+ i("tr", Be, [
1058
1122
  e[6] || (e[6] = i("th", {
1059
1123
  rowspan: "1",
1060
1124
  colspan: "1",
1061
1125
  class: "tr-title"
1062
1126
  }, [
1063
- x("UTC"),
1127
+ b("UTC"),
1064
1128
  i("span", { class: "unit" })
1065
1129
  ], -1)),
1066
- (n(!0), o(g, null, v(s.tableData.hours, (a, r) => (n(), o("th", {
1130
+ (n(!0), o(f, null, y(s.tableData.hours, (a, r) => (n(), o("th", {
1067
1131
  rowspan: "1",
1068
1132
  colspan: "1",
1069
1133
  class: _(s.activeIndex === r ? "active" : ""),
1070
1134
  key: Math.random() + "z"
1071
- }, y(m.computeHourZ(a)), 3))), 128))
1135
+ }, x(g.computeHourZ(a)), 3))), 128))
1072
1136
  ]),
1073
- i("tr", Oe, [
1137
+ i("tr", Ve, [
1074
1138
  e[7] || (e[7] = i("td", {
1075
1139
  rowspan: "1",
1076
1140
  colspan: "1",
1077
1141
  class: "tr-title"
1078
1142
  }, [
1079
- x("Weather"),
1143
+ b("Weather"),
1080
1144
  i("span", { class: "unit" })
1081
1145
  ], -1)),
1082
- (n(!0), o(g, null, v(s.tableData.weatherUrls, (a, r) => (n(), o("td", {
1146
+ (n(!0), o(f, null, y(s.tableData.weatherUrls, (a, r) => (n(), o("td", {
1083
1147
  rowspan: "1",
1084
1148
  colspan: "1",
1085
1149
  class: _(s.activeIndex === r ? "active" : ""),
1086
1150
  key: Math.random() + "url"
1087
1151
  }, [
1088
- ne(z, {
1152
+ ne(D, {
1089
1153
  placement: "top",
1090
1154
  effect: "light",
1091
1155
  content: s.tableData.weatherNames[r],
@@ -1096,7 +1160,7 @@ function vt(l, e, t, h, s, m) {
1096
1160
  key: 0,
1097
1161
  class: "iconfont weather-icon",
1098
1162
  src: a
1099
- }, null, 8, Be)) : re("", !0)
1163
+ }, null, 8, Oe)) : re("", !0)
1100
1164
  ]),
1101
1165
  _: 2
1102
1166
  }, 1032, ["content"])
@@ -1108,15 +1172,15 @@ function vt(l, e, t, h, s, m) {
1108
1172
  colspan: "1",
1109
1173
  class: "tr-title"
1110
1174
  }, [
1111
- x("Temperature"),
1175
+ b("Temperature"),
1112
1176
  i("span", { class: "unit" }, "°C")
1113
1177
  ], -1)),
1114
- (n(!0), o(g, null, v(s.tableData.temp, (a, r) => (n(), o("td", {
1178
+ (n(!0), o(f, null, y(s.tableData.temp, (a, r) => (n(), o("td", {
1115
1179
  rowspan: "1",
1116
1180
  colspan: "1",
1117
1181
  class: _(s.activeIndex === r ? "active" : ""),
1118
1182
  key: Math.random() + a
1119
- }, y(a), 3))), 128))
1183
+ }, x(a), 3))), 128))
1120
1184
  ]),
1121
1185
  i("tr", Ze, [
1122
1186
  e[9] || (e[9] = i("td", {
@@ -1124,15 +1188,15 @@ function vt(l, e, t, h, s, m) {
1124
1188
  colspan: "1",
1125
1189
  class: "tr-title"
1126
1190
  }, [
1127
- x("Precipitation Probability"),
1191
+ b("Precipitation Probability"),
1128
1192
  i("span", { class: "unit" }, "%")
1129
1193
  ], -1)),
1130
- (n(!0), o(g, null, v(s.tableData.precipProbability, (a, r) => (n(), o("td", {
1194
+ (n(!0), o(f, null, y(s.tableData.precipProbability, (a, r) => (n(), o("td", {
1131
1195
  rowspan: "1",
1132
1196
  colspan: "1",
1133
1197
  class: _(s.activeIndex === r ? "active" : ""),
1134
1198
  key: Math.random() + a
1135
- }, y(a), 3))), 128))
1199
+ }, x(a), 3))), 128))
1136
1200
  ]),
1137
1201
  i("tr", Je, [
1138
1202
  e[10] || (e[10] = i("td", {
@@ -1140,15 +1204,15 @@ function vt(l, e, t, h, s, m) {
1140
1204
  colspan: "1",
1141
1205
  class: "tr-title"
1142
1206
  }, [
1143
- x("Precipitation 1h"),
1207
+ b("Precipitation 1h"),
1144
1208
  i("span", { class: "unit" }, "mm")
1145
1209
  ], -1)),
1146
- (n(!0), o(g, null, v(s.tableData.precip1h, (a, r) => (n(), o("td", {
1210
+ (n(!0), o(f, null, y(s.tableData.precip1h, (a, r) => (n(), o("td", {
1147
1211
  rowspan: "1",
1148
1212
  colspan: "1",
1149
1213
  class: _(s.activeIndex === r ? "active" : ""),
1150
1214
  key: Math.random() + a
1151
- }, y(a), 3))), 128))
1215
+ }, x(a), 3))), 128))
1152
1216
  ]),
1153
1217
  i("tr", Ye, [
1154
1218
  e[11] || (e[11] = i("td", {
@@ -1156,15 +1220,15 @@ function vt(l, e, t, h, s, m) {
1156
1220
  colspan: "1",
1157
1221
  class: "tr-title"
1158
1222
  }, [
1159
- x("Visibility"),
1223
+ b("Visibility"),
1160
1224
  i("span", { class: "unit" }, "nm")
1161
1225
  ], -1)),
1162
- (n(!0), o(g, null, v(s.tableData.visibility, (a, r) => (n(), o("td", {
1226
+ (n(!0), o(f, null, y(s.tableData.visibility, (a, r) => (n(), o("td", {
1163
1227
  rowspan: "1",
1164
1228
  colspan: "1",
1165
1229
  class: _(s.activeIndex === r ? "active" : ""),
1166
1230
  key: Math.random() + a
1167
- }, y(a), 3))), 128))
1231
+ }, x(a), 3))), 128))
1168
1232
  ]),
1169
1233
  i("tr", je, [
1170
1234
  e[12] || (e[12] = i("td", {
@@ -1172,15 +1236,15 @@ function vt(l, e, t, h, s, m) {
1172
1236
  colspan: "1",
1173
1237
  class: "tr-title"
1174
1238
  }, [
1175
- x("Relative Humidity"),
1239
+ b("Relative Humidity"),
1176
1240
  i("span", { class: "unit" }, "%")
1177
1241
  ], -1)),
1178
- (n(!0), o(g, null, v(s.tableData.humidity, (a, r) => (n(), o("td", {
1242
+ (n(!0), o(f, null, y(s.tableData.humidity, (a, r) => (n(), o("td", {
1179
1243
  rowspan: "1",
1180
1244
  colspan: "1",
1181
1245
  class: _(s.activeIndex === r ? "active" : ""),
1182
1246
  key: Math.random() + a
1183
- }, y(a), 3))), 128))
1247
+ }, x(a), 3))), 128))
1184
1248
  ]),
1185
1249
  i("tr", qe, [
1186
1250
  e[13] || (e[13] = i("td", {
@@ -1188,37 +1252,37 @@ function vt(l, e, t, h, s, m) {
1188
1252
  colspan: "1",
1189
1253
  class: "tr-title"
1190
1254
  }, [
1191
- x("Wind direction"),
1255
+ b("Wind direction"),
1192
1256
  i("span", { class: "unit" })
1193
1257
  ], -1)),
1194
- (n(!0), o(g, null, v(s.tableData.windDir, (a, r) => (n(), o("td", {
1258
+ (n(!0), o(f, null, y(s.tableData.windDir, (a, r) => (n(), o("td", {
1195
1259
  rowspan: "1",
1196
1260
  colspan: "1",
1197
1261
  class: _(s.activeIndex === r ? "active" : ""),
1198
1262
  key: Math.random() + a
1199
1263
  }, [
1200
- isNaN(a) ? (n(), o("span", Ke, "-")) : (n(), o("span", {
1264
+ isNaN(a) ? (n(), o("span", Qe, "-")) : (n(), o("span", {
1201
1265
  key: 0,
1202
1266
  class: "iconfont icon",
1203
1267
  style: ee({ display: "inline-block", transform: `rotate(${a}deg)` })
1204
- }, "", 4))
1268
+ }, "", 4))
1205
1269
  ], 2))), 128))
1206
1270
  ]),
1207
- i("tr", Qe, [
1271
+ i("tr", Ke, [
1208
1272
  e[14] || (e[14] = i("td", {
1209
1273
  rowspan: "1",
1210
1274
  colspan: "1",
1211
1275
  class: "tr-title"
1212
1276
  }, [
1213
- x("Wind speed"),
1277
+ b("Wind speed"),
1214
1278
  i("span", { class: "unit" }, "kts")
1215
1279
  ], -1)),
1216
- (n(!0), o(g, null, v(s.tableData.windSpeed, (a, r) => (n(), o("td", {
1280
+ (n(!0), o(f, null, y(s.tableData.windSpeed, (a, r) => (n(), o("td", {
1217
1281
  rowspan: "1",
1218
1282
  colspan: "1",
1219
1283
  class: _(s.activeIndex === r ? "active" : ""),
1220
1284
  key: Math.random() + a
1221
- }, y(a), 3))), 128))
1285
+ }, x(a), 3))), 128))
1222
1286
  ]),
1223
1287
  i("tr", Xe, [
1224
1288
  e[15] || (e[15] = i("td", {
@@ -1226,15 +1290,15 @@ function vt(l, e, t, h, s, m) {
1226
1290
  colspan: "1",
1227
1291
  class: "tr-title"
1228
1292
  }, [
1229
- x("Wind gust"),
1293
+ b("Wind gust"),
1230
1294
  i("span", { class: "unit" }, "kts")
1231
1295
  ], -1)),
1232
- (n(!0), o(g, null, v(s.tableData.windGust, (a, r) => (n(), o("td", {
1296
+ (n(!0), o(f, null, y(s.tableData.windGust, (a, r) => (n(), o("td", {
1233
1297
  rowspan: "1",
1234
1298
  colspan: "1",
1235
1299
  class: _(s.activeIndex === r ? "active" : ""),
1236
1300
  key: Math.random() + a
1237
- }, y(a), 3))), 128))
1301
+ }, x(a), 3))), 128))
1238
1302
  ])
1239
1303
  ]),
1240
1304
  e[27] || (e[27] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
@@ -1245,15 +1309,15 @@ function vt(l, e, t, h, s, m) {
1245
1309
  colspan: "1",
1246
1310
  class: "tr-title"
1247
1311
  }, [
1248
- x("Wind wave height"),
1312
+ b("Wind wave height"),
1249
1313
  i("span", { class: "unit" }, "m")
1250
1314
  ], -1)),
1251
- (n(!0), o(g, null, v(s.tableData.windwaveHeight, (a, r) => (n(), o("td", {
1315
+ (n(!0), o(f, null, y(s.tableData.windwaveHeight, (a, r) => (n(), o("td", {
1252
1316
  rowspan: "1",
1253
1317
  colspan: "1",
1254
1318
  class: _(s.activeIndex === r ? "active" : ""),
1255
1319
  key: Math.random() + a
1256
- }, y(a), 3))), 128))
1320
+ }, x(a), 3))), 128))
1257
1321
  ]),
1258
1322
  i("tr", tt, [
1259
1323
  e[17] || (e[17] = i("td", {
@@ -1261,10 +1325,10 @@ function vt(l, e, t, h, s, m) {
1261
1325
  colspan: "1",
1262
1326
  class: "tr-title"
1263
1327
  }, [
1264
- x("Wind wave direction"),
1328
+ b("Wind wave direction"),
1265
1329
  i("span", { class: "unit" })
1266
1330
  ], -1)),
1267
- (n(!0), o(g, null, v(s.tableData.windwaveDir, (a, r) => (n(), o("td", {
1331
+ (n(!0), o(f, null, y(s.tableData.windwaveDir, (a, r) => (n(), o("td", {
1268
1332
  rowspan: "1",
1269
1333
  colspan: "1",
1270
1334
  class: _(s.activeIndex === r ? "active" : ""),
@@ -1283,15 +1347,15 @@ function vt(l, e, t, h, s, m) {
1283
1347
  colspan: "1",
1284
1348
  class: "tr-title"
1285
1349
  }, [
1286
- x("Wind wave period"),
1350
+ b("Wind wave period"),
1287
1351
  i("span", { class: "unit" }, "s")
1288
1352
  ], -1)),
1289
- (n(!0), o(g, null, v(s.tableData.windwavePeriod, (a, r) => (n(), o("td", {
1353
+ (n(!0), o(f, null, y(s.tableData.windwavePeriod, (a, r) => (n(), o("td", {
1290
1354
  rowspan: "1",
1291
1355
  colspan: "1",
1292
1356
  class: _(s.activeIndex === r ? "active" : ""),
1293
1357
  key: Math.random() + a
1294
- }, y(a), 3))), 128))
1358
+ }, x(a), 3))), 128))
1295
1359
  ]),
1296
1360
  i("tr", it, [
1297
1361
  e[19] || (e[19] = i("td", {
@@ -1299,15 +1363,15 @@ function vt(l, e, t, h, s, m) {
1299
1363
  colspan: "1",
1300
1364
  class: "tr-title"
1301
1365
  }, [
1302
- x("Swell height"),
1366
+ b("Swell height"),
1303
1367
  i("span", { class: "unit" }, "m")
1304
1368
  ], -1)),
1305
- (n(!0), o(g, null, v(s.tableData.swellHeight, (a, r) => (n(), o("td", {
1369
+ (n(!0), o(f, null, y(s.tableData.swellHeight, (a, r) => (n(), o("td", {
1306
1370
  rowspan: "1",
1307
1371
  colspan: "1",
1308
1372
  class: _(s.activeIndex === r ? "active" : ""),
1309
1373
  key: Math.random() + a
1310
- }, y(a), 3))), 128))
1374
+ }, x(a), 3))), 128))
1311
1375
  ]),
1312
1376
  i("tr", nt, [
1313
1377
  e[20] || (e[20] = i("td", {
@@ -1315,10 +1379,10 @@ function vt(l, e, t, h, s, m) {
1315
1379
  colspan: "1",
1316
1380
  class: "tr-title"
1317
1381
  }, [
1318
- x("Swell direction"),
1382
+ b("Swell direction"),
1319
1383
  i("span", { class: "unit" })
1320
1384
  ], -1)),
1321
- (n(!0), o(g, null, v(s.tableData.swellDir, (a, r) => (n(), o("td", {
1385
+ (n(!0), o(f, null, y(s.tableData.swellDir, (a, r) => (n(), o("td", {
1322
1386
  rowspan: "1",
1323
1387
  colspan: "1",
1324
1388
  class: _(s.activeIndex === r ? "active" : ""),
@@ -1337,15 +1401,15 @@ function vt(l, e, t, h, s, m) {
1337
1401
  colspan: "1",
1338
1402
  class: "tr-title"
1339
1403
  }, [
1340
- x("Swell period"),
1404
+ b("Swell period"),
1341
1405
  i("span", { class: "unit" }, "s")
1342
1406
  ], -1)),
1343
- (n(!0), o(g, null, v(s.tableData.swellPeriod, (a, r) => (n(), o("td", {
1407
+ (n(!0), o(f, null, y(s.tableData.swellPeriod, (a, r) => (n(), o("td", {
1344
1408
  rowspan: "1",
1345
1409
  colspan: "1",
1346
1410
  class: _(s.activeIndex === r ? "active" : ""),
1347
1411
  key: Math.random() + a
1348
- }, y(a), 3))), 128))
1412
+ }, x(a), 3))), 128))
1349
1413
  ]),
1350
1414
  i("tr", lt, [
1351
1415
  e[22] || (e[22] = i("td", {
@@ -1353,15 +1417,15 @@ function vt(l, e, t, h, s, m) {
1353
1417
  colspan: "1",
1354
1418
  class: "tr-title"
1355
1419
  }, [
1356
- x("Sig wave height"),
1420
+ b("Sig wave height"),
1357
1421
  i("span", { class: "unit" }, "m")
1358
1422
  ], -1)),
1359
- (n(!0), o(g, null, v(s.tableData.sigwaveHeight, (a, r) => (n(), o("td", {
1423
+ (n(!0), o(f, null, y(s.tableData.sigwaveHeight, (a, r) => (n(), o("td", {
1360
1424
  rowspan: "1",
1361
1425
  colspan: "1",
1362
1426
  class: _(s.activeIndex === r ? "active" : ""),
1363
1427
  key: Math.random() + a
1364
- }, y(a), 3))), 128))
1428
+ }, x(a), 3))), 128))
1365
1429
  ]),
1366
1430
  i("tr", dt, [
1367
1431
  e[23] || (e[23] = i("td", {
@@ -1369,10 +1433,10 @@ function vt(l, e, t, h, s, m) {
1369
1433
  colspan: "1",
1370
1434
  class: "tr-title"
1371
1435
  }, [
1372
- x("Current direction"),
1436
+ b("Current direction"),
1373
1437
  i("span", { class: "unit" })
1374
1438
  ], -1)),
1375
- (n(!0), o(g, null, v(s.tableData.currentDir, (a, r) => (n(), o("td", {
1439
+ (n(!0), o(f, null, y(s.tableData.currentDir, (a, r) => (n(), o("td", {
1376
1440
  rowspan: "1",
1377
1441
  colspan: "1",
1378
1442
  class: _(s.activeIndex === r ? "active" : ""),
@@ -1391,15 +1455,15 @@ function vt(l, e, t, h, s, m) {
1391
1455
  colspan: "1",
1392
1456
  class: "tr-title"
1393
1457
  }, [
1394
- x("Current speed"),
1458
+ b("Current speed"),
1395
1459
  i("span", { class: "unit" }, "kts")
1396
1460
  ], -1)),
1397
- (n(!0), o(g, null, v(s.tableData.currentSpeed, (a, r) => (n(), o("td", {
1461
+ (n(!0), o(f, null, y(s.tableData.currentSpeed, (a, r) => (n(), o("td", {
1398
1462
  rowspan: "1",
1399
1463
  colspan: "1",
1400
1464
  class: _(s.activeIndex === r ? "active" : ""),
1401
1465
  key: Math.random() + a
1402
- }, y(a), 3))), 128))
1466
+ }, x(a), 3))), 128))
1403
1467
  ])
1404
1468
  ]),
1405
1469
  e[28] || (e[28] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
@@ -1410,15 +1474,15 @@ function vt(l, e, t, h, s, m) {
1410
1474
  colspan: "1",
1411
1475
  class: "tr-title"
1412
1476
  }, [
1413
- x("Sea level height"),
1477
+ b("Sea level height"),
1414
1478
  i("span", { class: "unit" }, "m")
1415
1479
  ], -1)),
1416
- (n(!0), o(g, null, v(s.tableData.seaLevel, (a, r) => (n(), o("td", {
1480
+ (n(!0), o(f, null, y(s.tableData.seaLevel, (a, r) => (n(), o("td", {
1417
1481
  rowspan: "1",
1418
1482
  colspan: "1",
1419
1483
  class: _(s.activeIndex === r ? "active" : ""),
1420
1484
  key: Math.random() + a
1421
- }, y(a), 3))), 128))
1485
+ }, x(a), 3))), 128))
1422
1486
  ]),
1423
1487
  i("tr", mt, [
1424
1488
  e[26] || (e[26] = i("td", {
@@ -1426,27 +1490,27 @@ function vt(l, e, t, h, s, m) {
1426
1490
  colspan: "1",
1427
1491
  class: "tr-title"
1428
1492
  }, [
1429
- x("Sea surface temperature"),
1493
+ b("Sea surface temperature"),
1430
1494
  i("span", { class: "unit" }, "°C")
1431
1495
  ], -1)),
1432
- (n(!0), o(g, null, v(s.tableData.seaTemp, (a, r) => (n(), o("td", {
1496
+ (n(!0), o(f, null, y(s.tableData.seaTemp, (a, r) => (n(), o("td", {
1433
1497
  rowspan: "1",
1434
1498
  colspan: "1",
1435
1499
  class: _(s.activeIndex === r ? "active" : ""),
1436
1500
  key: Math.random() + a
1437
- }, y(a), 3))), 128))
1501
+ }, x(a), 3))), 128))
1438
1502
  ])
1439
1503
  ])
1440
- ])) : s.loading ? (n(), o("div", wt, "Loading....")) : (k = s.position) != null && k.name ? re("", !0) : (n(), o("div", gt, "No Data"))
1504
+ ])) : s.loading ? (n(), o("div", wt, "Loading....")) : (P = s.position) != null && P.name ? re("", !0) : (n(), o("div", gt, "No Data"))
1441
1505
  ])
1442
1506
  ]);
1443
1507
  }
1444
- const yt = /* @__PURE__ */ ke(De, [["render", vt], ["__scopeId", "data-v-7b348412"]]), zt = {
1508
+ const ft = /* @__PURE__ */ ke(De, [["render", vt], ["__scopeId", "data-v-37ed3c51"]]), zt = {
1445
1509
  install(l) {
1446
- l.component("SpotReport", yt);
1510
+ l.component("SpotReport", ft);
1447
1511
  }
1448
1512
  };
1449
1513
  export {
1450
- yt as SpotReport,
1514
+ ft as SpotReport,
1451
1515
  zt as SpotReportPlugin
1452
1516
  };