@idmwx/idmui-gl3 5.2.1 → 5.2.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 +386 -380
- package/dist/index.umd.cjs +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25,38 +25,38 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
25
25
|
b.exports ? b.exports = z(K) : z(M.moment);
|
|
26
26
|
})(b1, function(M) {
|
|
27
27
|
M.version === void 0 && M.default && (M = M.default);
|
|
28
|
-
var z = "0.5.47", O = {}, p = {}, o = {}, A = {},
|
|
28
|
+
var z = "0.5.47", O = {}, p = {}, o = {}, A = {}, q = {}, a;
|
|
29
29
|
(!M || typeof M.version != "string") && e0("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
|
|
30
|
-
var r = M.version.split("."),
|
|
31
|
-
(
|
|
32
|
-
function l(
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
function d(
|
|
36
|
-
var i = 0, L =
|
|
37
|
-
for (
|
|
30
|
+
var r = M.version.split("."), e = +r[0], n = +r[1];
|
|
31
|
+
(e < 2 || e === 2 && n < 6) && e0("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
|
|
32
|
+
function l(t) {
|
|
33
|
+
return t > 96 ? t - 87 : t > 64 ? t - 29 : t - 48;
|
|
34
|
+
}
|
|
35
|
+
function d(t) {
|
|
36
|
+
var i = 0, L = t.split("."), N = L[0], w = L[1] || "", D = 1, Z, S = 0, G = 1;
|
|
37
|
+
for (t.charCodeAt(0) === 45 && (i = 1, G = -1), i; i < N.length; i++)
|
|
38
38
|
Z = l(N.charCodeAt(i)), S = 60 * S + Z;
|
|
39
39
|
for (i = 0; i < w.length; i++)
|
|
40
40
|
D = D / 60, Z = l(w.charCodeAt(i)), S += Z * D;
|
|
41
41
|
return S * G;
|
|
42
42
|
}
|
|
43
|
-
function B(
|
|
44
|
-
for (var i = 0; i <
|
|
45
|
-
|
|
43
|
+
function B(t) {
|
|
44
|
+
for (var i = 0; i < t.length; i++)
|
|
45
|
+
t[i] = d(t[i]);
|
|
46
46
|
}
|
|
47
|
-
function R(
|
|
47
|
+
function R(t, i) {
|
|
48
48
|
for (var L = 0; L < i; L++)
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
t[L] = Math.round((t[L - 1] || 0) + t[L] * 6e4);
|
|
50
|
+
t[i - 1] = 1 / 0;
|
|
51
51
|
}
|
|
52
|
-
function f(
|
|
52
|
+
function f(t, i) {
|
|
53
53
|
var L = [], N;
|
|
54
54
|
for (N = 0; N < i.length; N++)
|
|
55
|
-
L[N] =
|
|
55
|
+
L[N] = t[i[N]];
|
|
56
56
|
return L;
|
|
57
57
|
}
|
|
58
|
-
function h(
|
|
59
|
-
var i =
|
|
58
|
+
function h(t) {
|
|
59
|
+
var i = t.split("|"), L = i[2].split(" "), N = i[3].split(""), w = i[4].split(" ");
|
|
60
60
|
return B(L), B(N), B(w), R(w, N.length), {
|
|
61
61
|
name: i[0],
|
|
62
62
|
abbrs: f(i[1].split(" "), N),
|
|
@@ -65,92 +65,92 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
65
65
|
population: i[5] | 0
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function m(
|
|
69
|
-
|
|
68
|
+
function m(t) {
|
|
69
|
+
t && this._set(h(t));
|
|
70
70
|
}
|
|
71
|
-
function X(
|
|
71
|
+
function X(t, i) {
|
|
72
72
|
var L = i.length;
|
|
73
|
-
if (
|
|
73
|
+
if (t < i[0])
|
|
74
74
|
return 0;
|
|
75
|
-
if (L > 1 && i[L - 1] === 1 / 0 &&
|
|
75
|
+
if (L > 1 && i[L - 1] === 1 / 0 && t >= i[L - 2])
|
|
76
76
|
return L - 1;
|
|
77
|
-
if (
|
|
77
|
+
if (t >= i[L - 1])
|
|
78
78
|
return -1;
|
|
79
79
|
for (var N, w = 0, D = L - 1; D - w > 1; )
|
|
80
|
-
N = Math.floor((w + D) / 2), i[N] <=
|
|
80
|
+
N = Math.floor((w + D) / 2), i[N] <= t ? w = N : D = N;
|
|
81
81
|
return D;
|
|
82
82
|
}
|
|
83
83
|
m.prototype = {
|
|
84
|
-
_set: function(
|
|
85
|
-
this.name =
|
|
84
|
+
_set: function(t) {
|
|
85
|
+
this.name = t.name, this.abbrs = t.abbrs, this.untils = t.untils, this.offsets = t.offsets, this.population = t.population;
|
|
86
86
|
},
|
|
87
|
-
_index: function(
|
|
88
|
-
var i = +
|
|
87
|
+
_index: function(t) {
|
|
88
|
+
var i = +t, L = this.untils, N;
|
|
89
89
|
if (N = X(i, L), N >= 0)
|
|
90
90
|
return N;
|
|
91
91
|
},
|
|
92
92
|
countries: function() {
|
|
93
|
-
var
|
|
93
|
+
var t = this.name;
|
|
94
94
|
return Object.keys(o).filter(function(i) {
|
|
95
|
-
return o[i].zones.indexOf(
|
|
95
|
+
return o[i].zones.indexOf(t) !== -1;
|
|
96
96
|
});
|
|
97
97
|
},
|
|
98
|
-
parse: function(
|
|
99
|
-
var i = +
|
|
98
|
+
parse: function(t) {
|
|
99
|
+
var i = +t, L = this.offsets, N = this.untils, w = N.length - 1, D, Z, S, G;
|
|
100
100
|
for (G = 0; G < w; G++)
|
|
101
101
|
if (D = L[G], Z = L[G + 1], S = L[G && G - 1], D < Z && I.moveAmbiguousForward ? D = Z : D > S && I.moveInvalidForward && (D = S), i < N[G] - D * 6e4)
|
|
102
102
|
return L[G];
|
|
103
103
|
return L[w];
|
|
104
104
|
},
|
|
105
|
-
abbr: function(
|
|
106
|
-
return this.abbrs[this._index(
|
|
105
|
+
abbr: function(t) {
|
|
106
|
+
return this.abbrs[this._index(t)];
|
|
107
107
|
},
|
|
108
|
-
offset: function(
|
|
109
|
-
return e0("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(
|
|
108
|
+
offset: function(t) {
|
|
109
|
+
return e0("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(t)];
|
|
110
110
|
},
|
|
111
|
-
utcOffset: function(
|
|
112
|
-
return this.offsets[this._index(
|
|
111
|
+
utcOffset: function(t) {
|
|
112
|
+
return this.offsets[this._index(t)];
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
-
function E(
|
|
116
|
-
this.name =
|
|
115
|
+
function E(t, i) {
|
|
116
|
+
this.name = t, this.zones = i;
|
|
117
117
|
}
|
|
118
|
-
function y(
|
|
119
|
-
var i =
|
|
120
|
-
L && L[0] ? (L = L[0].match(/[A-Z]/g), L = L ? L.join("") : void 0) : (L = i.match(/[A-Z]{3,5}/g), L = L ? L[0] : void 0), L === "GMT" && (L = void 0), this.at = +
|
|
118
|
+
function y(t) {
|
|
119
|
+
var i = t.toTimeString(), L = i.match(/\([a-z ]+\)/i);
|
|
120
|
+
L && L[0] ? (L = L[0].match(/[A-Z]/g), L = L ? L.join("") : void 0) : (L = i.match(/[A-Z]{3,5}/g), L = L ? L[0] : void 0), L === "GMT" && (L = void 0), this.at = +t, this.abbr = L, this.offset = t.getTimezoneOffset();
|
|
121
121
|
}
|
|
122
|
-
function F(
|
|
123
|
-
this.zone =
|
|
122
|
+
function F(t) {
|
|
123
|
+
this.zone = t, this.offsetScore = 0, this.abbrScore = 0;
|
|
124
124
|
}
|
|
125
|
-
F.prototype.scoreOffsetAt = function(
|
|
126
|
-
this.offsetScore += Math.abs(this.zone.utcOffset(
|
|
125
|
+
F.prototype.scoreOffsetAt = function(t) {
|
|
126
|
+
this.offsetScore += Math.abs(this.zone.utcOffset(t.at) - t.offset), this.zone.abbr(t.at).replace(/[^A-Z]/g, "") !== t.abbr && this.abbrScore++;
|
|
127
127
|
};
|
|
128
|
-
function J(
|
|
129
|
-
for (var L, N; N = ((i.at -
|
|
130
|
-
L = new y(new Date(
|
|
131
|
-
return
|
|
128
|
+
function J(t, i) {
|
|
129
|
+
for (var L, N; N = ((i.at - t.at) / 12e4 | 0) * 6e4; )
|
|
130
|
+
L = new y(new Date(t.at + N)), L.offset === t.offset ? t = L : i = L;
|
|
131
|
+
return t;
|
|
132
132
|
}
|
|
133
133
|
function V() {
|
|
134
|
-
var
|
|
134
|
+
var t = (/* @__PURE__ */ new Date()).getFullYear() - 2, i = new y(new Date(t, 0, 1)), L = i.offset, N = [i], w, D, Z, S;
|
|
135
135
|
for (S = 1; S < 48; S++)
|
|
136
|
-
Z = new Date(
|
|
136
|
+
Z = new Date(t, S, 1).getTimezoneOffset(), Z !== L && (D = new y(new Date(t, S, 1)), w = J(i, D), N.push(w), N.push(new y(new Date(w.at + 6e4))), i = D, L = Z);
|
|
137
137
|
for (S = 0; S < 4; S++)
|
|
138
|
-
N.push(new y(new Date(
|
|
138
|
+
N.push(new y(new Date(t + S, 0, 1))), N.push(new y(new Date(t + S, 6, 1)));
|
|
139
139
|
return N;
|
|
140
140
|
}
|
|
141
|
-
function u(
|
|
142
|
-
return
|
|
141
|
+
function u(t, i) {
|
|
142
|
+
return t.offsetScore !== i.offsetScore ? t.offsetScore - i.offsetScore : t.abbrScore !== i.abbrScore ? t.abbrScore - i.abbrScore : t.zone.population !== i.zone.population ? i.zone.population - t.zone.population : i.zone.name.localeCompare(t.zone.name);
|
|
143
143
|
}
|
|
144
|
-
function g(
|
|
144
|
+
function g(t, i) {
|
|
145
145
|
var L, N;
|
|
146
146
|
for (B(i), L = 0; L < i.length; L++)
|
|
147
|
-
N = i[L],
|
|
147
|
+
N = i[L], q[N] = q[N] || {}, q[N][t] = !0;
|
|
148
148
|
}
|
|
149
|
-
function A0(
|
|
150
|
-
var i =
|
|
149
|
+
function A0(t) {
|
|
150
|
+
var i = t.length, L = {}, N = [], w = {}, D, Z, S, G;
|
|
151
151
|
for (D = 0; D < i; D++)
|
|
152
|
-
if (S =
|
|
153
|
-
G =
|
|
152
|
+
if (S = t[D].offset, !w.hasOwnProperty(S)) {
|
|
153
|
+
G = q[S] || {};
|
|
154
154
|
for (Z in G)
|
|
155
155
|
G.hasOwnProperty(Z) && (L[Z] = !0);
|
|
156
156
|
w[S] = !0;
|
|
@@ -161,12 +161,12 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
161
161
|
}
|
|
162
162
|
function n0() {
|
|
163
163
|
try {
|
|
164
|
-
var
|
|
165
|
-
if (
|
|
166
|
-
var i = A[i0(
|
|
164
|
+
var t = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
165
|
+
if (t && t.length > 3) {
|
|
166
|
+
var i = A[i0(t)];
|
|
167
167
|
if (i)
|
|
168
168
|
return i;
|
|
169
|
-
e0("Moment Timezone found " +
|
|
169
|
+
e0("Moment Timezone found " + t + " from the Intl api, but did not have that data loaded.");
|
|
170
170
|
}
|
|
171
171
|
} catch {
|
|
172
172
|
}
|
|
@@ -178,52 +178,52 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
178
178
|
}
|
|
179
179
|
return D.sort(u), D.length > 0 ? D[0].zone.name : void 0;
|
|
180
180
|
}
|
|
181
|
-
function h0(
|
|
182
|
-
return (!
|
|
181
|
+
function h0(t) {
|
|
182
|
+
return (!a || t) && (a = n0()), a;
|
|
183
183
|
}
|
|
184
|
-
function i0(
|
|
185
|
-
return (
|
|
184
|
+
function i0(t) {
|
|
185
|
+
return (t || "").toLowerCase().replace(/\//g, "_");
|
|
186
186
|
}
|
|
187
|
-
function u0(
|
|
187
|
+
function u0(t) {
|
|
188
188
|
var i, L, N, w;
|
|
189
|
-
for (typeof
|
|
190
|
-
N =
|
|
189
|
+
for (typeof t == "string" && (t = [t]), i = 0; i < t.length; i++)
|
|
190
|
+
N = t[i].split("|"), L = N[0], w = i0(L), O[w] = t[i], A[w] = L, g(w, N[2].split(" "));
|
|
191
191
|
}
|
|
192
|
-
function p0(
|
|
193
|
-
|
|
194
|
-
var L = O[
|
|
195
|
-
return L instanceof m ? L : typeof L == "string" ? (L = new m(L), O[
|
|
192
|
+
function p0(t, i) {
|
|
193
|
+
t = i0(t);
|
|
194
|
+
var L = O[t], N;
|
|
195
|
+
return L instanceof m ? L : typeof L == "string" ? (L = new m(L), O[t] = L, L) : p[t] && i !== p0 && (N = p0(p[t], p0)) ? (L = O[t] = new m(), L._set(N), L.name = A[t], L) : null;
|
|
196
196
|
}
|
|
197
197
|
function m0() {
|
|
198
|
-
var
|
|
199
|
-
for (
|
|
200
|
-
A.hasOwnProperty(
|
|
198
|
+
var t, i = [];
|
|
199
|
+
for (t in A)
|
|
200
|
+
A.hasOwnProperty(t) && (O[t] || O[p[t]]) && A[t] && i.push(A[t]);
|
|
201
201
|
return i.sort();
|
|
202
202
|
}
|
|
203
203
|
function B0() {
|
|
204
204
|
return Object.keys(o);
|
|
205
205
|
}
|
|
206
|
-
function L0(
|
|
206
|
+
function L0(t) {
|
|
207
207
|
var i, L, N, w;
|
|
208
|
-
for (typeof
|
|
209
|
-
L =
|
|
208
|
+
for (typeof t == "string" && (t = [t]), i = 0; i < t.length; i++)
|
|
209
|
+
L = t[i].split("|"), N = i0(L[0]), w = i0(L[1]), p[N] = w, A[N] = L[0], p[w] = N, A[w] = L[1];
|
|
210
210
|
}
|
|
211
|
-
function r0(
|
|
211
|
+
function r0(t) {
|
|
212
212
|
var i, L, N, w;
|
|
213
|
-
if (!(!
|
|
214
|
-
for (i = 0; i <
|
|
215
|
-
w =
|
|
213
|
+
if (!(!t || !t.length))
|
|
214
|
+
for (i = 0; i < t.length; i++)
|
|
215
|
+
w = t[i].split("|"), L = w[0].toUpperCase(), N = w[1].split(" "), o[L] = new E(
|
|
216
216
|
L,
|
|
217
217
|
N
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
|
-
function d0(
|
|
221
|
-
return
|
|
220
|
+
function d0(t) {
|
|
221
|
+
return t = t.toUpperCase(), o[t] || null;
|
|
222
222
|
}
|
|
223
|
-
function g0(
|
|
224
|
-
if (
|
|
223
|
+
function g0(t, i) {
|
|
224
|
+
if (t = d0(t), !t)
|
|
225
225
|
return null;
|
|
226
|
-
var L =
|
|
226
|
+
var L = t.zones.sort();
|
|
227
227
|
return i ? L.map(function(N) {
|
|
228
228
|
var w = p0(N);
|
|
229
229
|
return {
|
|
@@ -232,59 +232,59 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
232
232
|
};
|
|
233
233
|
}) : L;
|
|
234
234
|
}
|
|
235
|
-
function s0(
|
|
236
|
-
u0(
|
|
235
|
+
function s0(t) {
|
|
236
|
+
u0(t.zones), L0(t.links), r0(t.countries), I.dataVersion = t.version;
|
|
237
237
|
}
|
|
238
|
-
function P(
|
|
239
|
-
return P.didShowError || (P.didShowError = !0, e0("moment.tz.zoneExists('" +
|
|
238
|
+
function P(t) {
|
|
239
|
+
return P.didShowError || (P.didShowError = !0, e0("moment.tz.zoneExists('" + t + "') has been deprecated in favor of !moment.tz.zone('" + t + "')")), !!p0(t);
|
|
240
240
|
}
|
|
241
|
-
function M0(
|
|
242
|
-
var i =
|
|
243
|
-
return !!(
|
|
241
|
+
function M0(t) {
|
|
242
|
+
var i = t._f === "X" || t._f === "x";
|
|
243
|
+
return !!(t._a && t._tzm === void 0 && !i);
|
|
244
244
|
}
|
|
245
|
-
function e0(
|
|
246
|
-
typeof console < "u" && typeof console.error == "function" && console.error(
|
|
245
|
+
function e0(t) {
|
|
246
|
+
typeof console < "u" && typeof console.error == "function" && console.error(t);
|
|
247
247
|
}
|
|
248
|
-
function I(
|
|
248
|
+
function I(t) {
|
|
249
249
|
var i = Array.prototype.slice.call(arguments, 0, -1), L = arguments[arguments.length - 1], N = M.utc.apply(null, i), w;
|
|
250
|
-
return !M.isMoment(
|
|
250
|
+
return !M.isMoment(t) && M0(N) && (w = p0(L)) && N.add(w.parse(N), "minutes"), N.tz(L), N;
|
|
251
251
|
}
|
|
252
252
|
I.version = z, I.dataVersion = "", I._zones = O, I._links = p, I._names = A, I._countries = o, I.add = u0, I.link = L0, I.load = s0, I.zone = p0, I.zoneExists = P, I.guess = h0, I.names = m0, I.Zone = m, I.unpack = h, I.unpackBase60 = d, I.needsOffset = M0, I.moveInvalidForward = !0, I.moveAmbiguousForward = !1, I.countries = B0, I.zonesForCountry = g0;
|
|
253
253
|
var b0 = M.fn;
|
|
254
|
-
M.tz = I, M.defaultZone = null, M.updateOffset = function(
|
|
254
|
+
M.tz = I, M.defaultZone = null, M.updateOffset = function(t, i) {
|
|
255
255
|
var L = M.defaultZone, N;
|
|
256
|
-
if (
|
|
257
|
-
if (N =
|
|
258
|
-
var w =
|
|
259
|
-
|
|
256
|
+
if (t._z === void 0 && (L && M0(t) && !t._isUTC && t.isValid() && (t._d = M.utc(t._a)._d, t.utc().add(L.parse(t), "minutes")), t._z = L), t._z)
|
|
257
|
+
if (N = t._z.utcOffset(t), Math.abs(N) < 16 && (N = N / 60), t.utcOffset !== void 0) {
|
|
258
|
+
var w = t._z;
|
|
259
|
+
t.utcOffset(-N, i), t._z = w;
|
|
260
260
|
} else
|
|
261
|
-
|
|
262
|
-
}, b0.tz = function(
|
|
263
|
-
if (
|
|
264
|
-
if (typeof
|
|
265
|
-
throw new Error("Time zone name must be a string, got " +
|
|
266
|
-
return this._z = p0(
|
|
261
|
+
t.zone(N, i);
|
|
262
|
+
}, b0.tz = function(t, i) {
|
|
263
|
+
if (t) {
|
|
264
|
+
if (typeof t != "string")
|
|
265
|
+
throw new Error("Time zone name must be a string, got " + t + " [" + typeof t + "]");
|
|
266
|
+
return this._z = p0(t), this._z ? M.updateOffset(this, i) : e0("Moment Timezone has no data for " + t + ". See http://momentjs.com/timezone/docs/#/data-loading/."), this;
|
|
267
267
|
}
|
|
268
268
|
if (this._z)
|
|
269
269
|
return this._z.name;
|
|
270
270
|
};
|
|
271
|
-
function W0(
|
|
271
|
+
function W0(t) {
|
|
272
272
|
return function() {
|
|
273
|
-
return this._z ? this._z.abbr(this) :
|
|
273
|
+
return this._z ? this._z.abbr(this) : t.call(this);
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
function l0(
|
|
276
|
+
function l0(t) {
|
|
277
277
|
return function() {
|
|
278
|
-
return this._z = null,
|
|
278
|
+
return this._z = null, t.apply(this, arguments);
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
function R0(
|
|
281
|
+
function R0(t) {
|
|
282
282
|
return function() {
|
|
283
|
-
return arguments.length > 0 && (this._z = null),
|
|
283
|
+
return arguments.length > 0 && (this._z = null), t.apply(this, arguments);
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
|
-
b0.zoneName = W0(b0.zoneName), b0.zoneAbbr = W0(b0.zoneAbbr), b0.utc = l0(b0.utc), b0.local = l0(b0.local), b0.utcOffset = R0(b0.utcOffset), M.tz.setDefault = function(
|
|
287
|
-
return (
|
|
286
|
+
b0.zoneName = W0(b0.zoneName), b0.zoneAbbr = W0(b0.zoneAbbr), b0.utc = l0(b0.utc), b0.local = l0(b0.local), b0.utcOffset = R0(b0.utcOffset), M.tz.setDefault = function(t) {
|
|
287
|
+
return (e < 2 || e === 2 && n < 9) && e0("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = t ? p0(t) : null, M;
|
|
288
288
|
};
|
|
289
289
|
var o0 = M.momentProperties;
|
|
290
290
|
return Object.prototype.toString.call(o0) === "[object Array]" ? (o0.push("_z"), o0.push("_a")) : o0 && (o0._z = null), M;
|
|
@@ -1405,7 +1405,7 @@ const k = (b, M) => {
|
|
|
1405
1405
|
class: "radio-tip"
|
|
1406
1406
|
};
|
|
1407
1407
|
function K1(b, M, z, O, p, o) {
|
|
1408
|
-
const A = x("ElTooltip"),
|
|
1408
|
+
const A = x("ElTooltip"), q = x("ElRadio"), a = x("ElRadioGroup"), r = x("ElScrollbar");
|
|
1409
1409
|
return s(), W("div", i1, [
|
|
1410
1410
|
c("div", {
|
|
1411
1411
|
class: "menu-bar-box",
|
|
@@ -1421,7 +1421,7 @@ function K1(b, M, z, O, p, o) {
|
|
|
1421
1421
|
default: a0(() => [
|
|
1422
1422
|
c("div", {
|
|
1423
1423
|
class: U(z.layerToggle ? "menu-icon active" : "menu-icon"),
|
|
1424
|
-
onClick: M[0] || (M[0] = (...
|
|
1424
|
+
onClick: M[0] || (M[0] = (...e) => o.handleMenuToggle && o.handleMenuToggle(...e))
|
|
1425
1425
|
}, M[17] || (M[17] = [
|
|
1426
1426
|
c("span", { class: "iconfont" }, "", -1)
|
|
1427
1427
|
]), 2)
|
|
@@ -1444,7 +1444,7 @@ function K1(b, M, z, O, p, o) {
|
|
|
1444
1444
|
default: a0(() => [
|
|
1445
1445
|
c("div", {
|
|
1446
1446
|
class: U(p.showMeasure ? "menu-icon active" : "menu-icon"),
|
|
1447
|
-
onClick: M[1] || (M[1] = (...
|
|
1447
|
+
onClick: M[1] || (M[1] = (...e) => o.handleMeasureToggle && o.handleMeasureToggle(...e))
|
|
1448
1448
|
}, M[18] || (M[18] = [
|
|
1449
1449
|
c("span", { class: "iconfont" }, "", -1)
|
|
1450
1450
|
]), 2)
|
|
@@ -1460,7 +1460,7 @@ function K1(b, M, z, O, p, o) {
|
|
|
1460
1460
|
default: a0(() => [
|
|
1461
1461
|
c("div", {
|
|
1462
1462
|
class: U(p.showPoint ? "menu-icon active" : "menu-icon"),
|
|
1463
|
-
onClick: M[2] || (M[2] = (...
|
|
1463
|
+
onClick: M[2] || (M[2] = (...e) => o.handlePointToggle && o.handlePointToggle(...e))
|
|
1464
1464
|
}, M[19] || (M[19] = [
|
|
1465
1465
|
c("span", { class: "iconfont" }, "", -1)
|
|
1466
1466
|
]), 2)
|
|
@@ -1476,7 +1476,7 @@ function K1(b, M, z, O, p, o) {
|
|
|
1476
1476
|
default: a0(() => [
|
|
1477
1477
|
c("div", {
|
|
1478
1478
|
class: U(p.showCoord ? "menu-icon active" : "menu-icon"),
|
|
1479
|
-
onClick: M[3] || (M[3] = (...
|
|
1479
|
+
onClick: M[3] || (M[3] = (...e) => o.handleCoordToggle && o.handleCoordToggle(...e))
|
|
1480
1480
|
}, M[20] || (M[20] = [
|
|
1481
1481
|
c("span", { class: "iconfont" }, "", -1)
|
|
1482
1482
|
]), 2)
|
|
@@ -1492,7 +1492,7 @@ function K1(b, M, z, O, p, o) {
|
|
|
1492
1492
|
default: a0(() => [
|
|
1493
1493
|
c("div", {
|
|
1494
1494
|
class: U(p.show3d ? "menu-icon active" : "menu-icon"),
|
|
1495
|
-
onClick: M[4] || (M[4] = (...
|
|
1495
|
+
onClick: M[4] || (M[4] = (...e) => o.handle3DToggle && o.handle3DToggle(...e))
|
|
1496
1496
|
}, M[21] || (M[21] = [
|
|
1497
1497
|
c("span", { class: "iconfont" }, "", -1)
|
|
1498
1498
|
]), 2)
|
|
@@ -1511,24 +1511,24 @@ function K1(b, M, z, O, p, o) {
|
|
|
1511
1511
|
c("div", {
|
|
1512
1512
|
class: "switch flex-center",
|
|
1513
1513
|
style: { "font-size": "28px", "margin-right": "0" },
|
|
1514
|
-
onClick: M[5] || (M[5] = (...
|
|
1514
|
+
onClick: M[5] || (M[5] = (...e) => o.toggleAutoActive && o.toggleAutoActive(...e))
|
|
1515
1515
|
}, [
|
|
1516
1516
|
p.autoActive ? (s(), W("i", s1, "")) : (s(), W("i", W1, ""))
|
|
1517
1517
|
])
|
|
1518
1518
|
]),
|
|
1519
|
-
(s(!0), W(H, null, _(p.layers.weather.filter((
|
|
1520
|
-
key:
|
|
1521
|
-
class: U(o.computeLayerClass(
|
|
1519
|
+
(s(!0), W(H, null, _(p.layers.weather.filter((e) => e.collected), (e) => (s(), W("div", {
|
|
1520
|
+
key: e.key,
|
|
1521
|
+
class: U(o.computeLayerClass(e, p.activeWeatherLayers))
|
|
1522
1522
|
}, [
|
|
1523
1523
|
c("div", {
|
|
1524
1524
|
class: "checkbox",
|
|
1525
|
-
onClick: (n) => o.handleWeatherLayerPick(
|
|
1525
|
+
onClick: (n) => o.handleWeatherLayerPick(e)
|
|
1526
1526
|
}, null, 8, l1),
|
|
1527
1527
|
c("span", {
|
|
1528
1528
|
class: "name",
|
|
1529
|
-
onClick: (n) => o.handleWeatherLayerPick(
|
|
1530
|
-
}, C(
|
|
1531
|
-
|
|
1529
|
+
onClick: (n) => o.handleWeatherLayerPick(e)
|
|
1530
|
+
}, C(e.name), 9, f1),
|
|
1531
|
+
e.key === "wind" && p.activeWeatherLayers.some((n) => n.key === e.key) ? (s(), W("div", u1, [
|
|
1532
1532
|
c("i", {
|
|
1533
1533
|
class: U(["iconfont sub-layer-icon", z.showWindParticle ? "active" : ""]),
|
|
1534
1534
|
onClick: M[6] || (M[6] = (n) => o.handleToggleWindParticle())
|
|
@@ -1538,7 +1538,7 @@ function K1(b, M, z, O, p, o) {
|
|
|
1538
1538
|
onClick: M[7] || (M[7] = (n) => o.handleToggleWindFeather())
|
|
1539
1539
|
}, "", 2)
|
|
1540
1540
|
])) : j("", !0),
|
|
1541
|
-
|
|
1541
|
+
e.key === "current" && p.activeWeatherLayers.some((n) => n.key === e.key) ? (s(), W("div", L1, [
|
|
1542
1542
|
c("i", {
|
|
1543
1543
|
class: U(["iconfont sub-layer-icon", z.showCurrentParticle ? "active" : ""]),
|
|
1544
1544
|
onClick: M[8] || (M[8] = (n) => o.handleToggleCurrentParticle())
|
|
@@ -1561,7 +1561,7 @@ function K1(b, M, z, O, p, o) {
|
|
|
1561
1561
|
M[23] || (M[23] = c("div", null, "Layers", -1)),
|
|
1562
1562
|
c("div", {
|
|
1563
1563
|
class: "iconfont close-btn",
|
|
1564
|
-
onClick: M[10] || (M[10] = (...
|
|
1564
|
+
onClick: M[10] || (M[10] = (...e) => o.handleMenuToggle && o.handleMenuToggle(...e))
|
|
1565
1565
|
}, "")
|
|
1566
1566
|
]),
|
|
1567
1567
|
T(r, { style: { flex: "1" } }, {
|
|
@@ -1572,29 +1572,29 @@ function K1(b, M, z, O, p, o) {
|
|
|
1572
1572
|
c("div", {
|
|
1573
1573
|
class: "switch flex-center",
|
|
1574
1574
|
style: { "margin-right": "0" },
|
|
1575
|
-
onClick: M[11] || (M[11] = (...
|
|
1575
|
+
onClick: M[11] || (M[11] = (...e) => o.toggleAutoActive && o.toggleAutoActive(...e))
|
|
1576
1576
|
}, [
|
|
1577
1577
|
p.autoActive ? (s(), W("i", B1, "")) : (s(), W("i", g1, ""))
|
|
1578
1578
|
])
|
|
1579
1579
|
]),
|
|
1580
1580
|
c("div", N1, [
|
|
1581
|
-
(s(!0), W(H, null, _(p.layers.weather, (
|
|
1582
|
-
key:
|
|
1581
|
+
(s(!0), W(H, null, _(p.layers.weather, (e) => (s(), W(H, {
|
|
1582
|
+
key: e.key
|
|
1583
1583
|
}, [
|
|
1584
|
-
|
|
1584
|
+
e.hide ? j("", !0) : (s(), W("div", {
|
|
1585
1585
|
key: 0,
|
|
1586
|
-
class: U(o.computeLayerClass(
|
|
1586
|
+
class: U(o.computeLayerClass(e, p.activeWeatherLayers))
|
|
1587
1587
|
}, [
|
|
1588
1588
|
c("div", y1, [
|
|
1589
1589
|
c("div", {
|
|
1590
1590
|
class: "checkbox",
|
|
1591
|
-
onClick: (n) => o.handleWeatherLayerPick(
|
|
1591
|
+
onClick: (n) => o.handleWeatherLayerPick(e)
|
|
1592
1592
|
}, null, 8, X1),
|
|
1593
1593
|
c("span", {
|
|
1594
1594
|
class: "name",
|
|
1595
|
-
onClick: (n) => o.handleWeatherLayerPick(
|
|
1596
|
-
}, C(
|
|
1597
|
-
|
|
1595
|
+
onClick: (n) => o.handleWeatherLayerPick(e)
|
|
1596
|
+
}, C(e.name), 9, w1),
|
|
1597
|
+
e.key === "wind" && p.activeWeatherLayers.some((n) => n.key === e.key) ? (s(), W("div", C1, [
|
|
1598
1598
|
c("i", {
|
|
1599
1599
|
class: U(["iconfont sub-layer-icon", z.showWindParticle ? "active" : ""]),
|
|
1600
1600
|
onClick: M[12] || (M[12] = (n) => o.handleToggleWindParticle())
|
|
@@ -1604,7 +1604,7 @@ function K1(b, M, z, O, p, o) {
|
|
|
1604
1604
|
onClick: M[13] || (M[13] = (n) => o.handleToggleWindFeather())
|
|
1605
1605
|
}, "", 2)
|
|
1606
1606
|
])) : j("", !0),
|
|
1607
|
-
|
|
1607
|
+
e.key === "current" && p.activeWeatherLayers.some((n) => n.key === e.key) ? (s(), W("div", v1, [
|
|
1608
1608
|
c("i", {
|
|
1609
1609
|
class: U(["iconfont sub-layer-icon", z.showCurrentParticle ? "active" : ""]),
|
|
1610
1610
|
onClick: M[14] || (M[14] = (n) => o.handleToggleCurrentParticle())
|
|
@@ -1616,9 +1616,9 @@ function K1(b, M, z, O, p, o) {
|
|
|
1616
1616
|
])) : j("", !0)
|
|
1617
1617
|
]),
|
|
1618
1618
|
c("div", {
|
|
1619
|
-
onClick: (n) => o.handleWeatherLayerCollect(
|
|
1619
|
+
onClick: (n) => o.handleWeatherLayerCollect(e)
|
|
1620
1620
|
}, [
|
|
1621
|
-
|
|
1621
|
+
e.collected ? (s(), W("i", E1, "")) : (s(), W("i", x1, ""))
|
|
1622
1622
|
], 8, T1)
|
|
1623
1623
|
], 2))
|
|
1624
1624
|
], 64))), 128)),
|
|
@@ -1634,18 +1634,18 @@ function K1(b, M, z, O, p, o) {
|
|
|
1634
1634
|
c("div", I1, [
|
|
1635
1635
|
M[26] || (M[26] = c("div", { class: "layers-title" }, "Other Layers", -1)),
|
|
1636
1636
|
c("div", D1, [
|
|
1637
|
-
(s(!0), W(H, null, _(p.layers.other, (
|
|
1637
|
+
(s(!0), W(H, null, _(p.layers.other, (e) => {
|
|
1638
1638
|
var n;
|
|
1639
1639
|
return s(), W("div", {
|
|
1640
|
-
key:
|
|
1641
|
-
class: U(["layer flex-between", o.computeLayerClass(
|
|
1642
|
-
onClick: (l) => o.handleOtherLayerPick(
|
|
1640
|
+
key: e.key,
|
|
1641
|
+
class: U(["layer flex-between", o.computeLayerClass(e, p.activeOtherLayers)]),
|
|
1642
|
+
onClick: (l) => o.handleOtherLayerPick(e)
|
|
1643
1643
|
}, [
|
|
1644
1644
|
c("div", S1, [
|
|
1645
1645
|
c("div", k1, [
|
|
1646
|
-
(n = o.computeLayerClass(
|
|
1646
|
+
(n = o.computeLayerClass(e, p.activeOtherLayers)) != null && n.includes("active") ? (s(), W("i", Q1, "")) : (s(), W("i", H1, ""))
|
|
1647
1647
|
]),
|
|
1648
|
-
c("span", null, C(
|
|
1648
|
+
c("span", null, C(e.name), 1)
|
|
1649
1649
|
])
|
|
1650
1650
|
], 10, P1);
|
|
1651
1651
|
}), 128))
|
|
@@ -1654,23 +1654,23 @@ function K1(b, M, z, O, p, o) {
|
|
|
1654
1654
|
c("div", _1, [
|
|
1655
1655
|
M[27] || (M[27] = c("span", { class: "layers-title" }, "Forecast Model", -1)),
|
|
1656
1656
|
c("div", j1, [
|
|
1657
|
-
T(
|
|
1657
|
+
T(a, {
|
|
1658
1658
|
modelValue: p.source,
|
|
1659
|
-
"onUpdate:modelValue": M[16] || (M[16] = (
|
|
1659
|
+
"onUpdate:modelValue": M[16] || (M[16] = (e) => p.source = e),
|
|
1660
1660
|
class: "layer-radio flex-col-start-start",
|
|
1661
1661
|
style: { width: "180px", "align-items": "flex-start" }
|
|
1662
1662
|
}, {
|
|
1663
1663
|
default: a0(() => [
|
|
1664
|
-
(s(!0), W(H, null, _(p.sourceList, (
|
|
1665
|
-
key: `source${
|
|
1666
|
-
value:
|
|
1664
|
+
(s(!0), W(H, null, _(p.sourceList, (e, n) => (s(), V0(q, {
|
|
1665
|
+
key: `source${e.name}`,
|
|
1666
|
+
value: e.name
|
|
1667
1667
|
}, {
|
|
1668
1668
|
default: a0(() => {
|
|
1669
1669
|
var l, d, B, R, f, h;
|
|
1670
1670
|
return [
|
|
1671
|
-
z0(C(
|
|
1672
|
-
n !== 0 ? (s(), W("span", F1, C(
|
|
1673
|
-
n === 0 ? (s(), W("div", G1, "Provides the best forecast")) : (B = (d = (l =
|
|
1671
|
+
z0(C(e.name) + " ", 1),
|
|
1672
|
+
n !== 0 ? (s(), W("span", F1, C(e.resolution) + "km " + C(e.length) + "days", 1)) : j("", !0),
|
|
1673
|
+
n === 0 ? (s(), W("div", G1, "Provides the best forecast")) : (B = (d = (l = e == null ? void 0 : e.update) == null ? void 0 : l.default) == null ? void 0 : d.meta) != null && B.initialisationTime ? (s(), W("div", U1, "Update: " + C(o.computeDateZ((h = (f = (R = e == null ? void 0 : e.update) == null ? void 0 : R.default) == null ? void 0 : f.meta) == null ? void 0 : h.initialisationTime)), 1)) : j("", !0)
|
|
1674
1674
|
];
|
|
1675
1675
|
}),
|
|
1676
1676
|
_: 2
|
|
@@ -1771,13 +1771,13 @@ const Y1 = {
|
|
|
1771
1771
|
}, 500);
|
|
1772
1772
|
else if (this.wind) {
|
|
1773
1773
|
const p = (/* @__PURE__ */ new Date()).valueOf();
|
|
1774
|
-
let o = 0, A = 0,
|
|
1775
|
-
if ((b = this.wind) != null && b.active && (
|
|
1776
|
-
(O = this.map) == null || O.getSource(this.source).setData(
|
|
1774
|
+
let o = 0, A = 0, q = this.empty;
|
|
1775
|
+
if ((b = this.wind) != null && b.active && (q = (M = this.wind) == null ? void 0 : M.data), (z = this.map) != null && z.getSource(this.source))
|
|
1776
|
+
(O = this.map) == null || O.getSource(this.source).setData(q), A = (/* @__PURE__ */ new Date()).valueOf() - (p + o), console.log("[wind] update elapsed: ", A, ", total: ", o += A);
|
|
1777
1777
|
else {
|
|
1778
|
-
this.map.addSource(this.source, { type: "geojson", data:
|
|
1779
|
-
for (let
|
|
1780
|
-
const r = (this.barbs ?? [])[
|
|
1778
|
+
this.map.addSource(this.source, { type: "geojson", data: q });
|
|
1779
|
+
for (let a = 0; a < (this.barbs ?? []).length - 1; a++) {
|
|
1780
|
+
const r = (this.barbs ?? [])[a] || 0, e = (this.barbs ?? [])[a + 1] || 0, n = r < 10 ? `00${r}kts` : r < 100 ? `0${r}kts` : `${r}kts`;
|
|
1781
1781
|
this.map.addLayer(
|
|
1782
1782
|
{
|
|
1783
1783
|
id: n,
|
|
@@ -1787,7 +1787,7 @@ const Y1 = {
|
|
|
1787
1787
|
// @ts-ignore
|
|
1788
1788
|
[">=", "spd", r],
|
|
1789
1789
|
// @ts-ignore
|
|
1790
|
-
["<", "spd",
|
|
1790
|
+
["<", "spd", e]
|
|
1791
1791
|
],
|
|
1792
1792
|
source: this.source,
|
|
1793
1793
|
layout: {
|
|
@@ -1886,8 +1886,8 @@ class S0 {
|
|
|
1886
1886
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
1887
1887
|
*/
|
|
1888
1888
|
getBoundPixel() {
|
|
1889
|
-
const M = this.map.getBounds(), z = this.map.getZoom() + 1, O = [M._ne.lng, M._ne.lat], p = [M._sw.lng, M._sw.lat], [o, A] = this.convertNLng(O[0]), [
|
|
1890
|
-
return [n, l, r + d,
|
|
1889
|
+
const M = this.map.getBounds(), z = this.map.getZoom() + 1, O = [M._ne.lng, M._ne.lat], p = [M._sw.lng, M._sw.lat], [o, A] = this.convertNLng(O[0]), [q, a] = this.convertNLng(p[0]), [r, e] = this.mercator.px([o, O[1]], z), [n, l] = this.mercator.px([q, p[1]], z), d = Math.round(this.mercator.size * Math.pow(2, z) * (A + a));
|
|
1890
|
+
return [n, l, r + d, e];
|
|
1891
1891
|
}
|
|
1892
1892
|
/**
|
|
1893
1893
|
* [视窗边界像素宽度]
|
|
@@ -1902,13 +1902,13 @@ class S0 {
|
|
|
1902
1902
|
* @param zoom
|
|
1903
1903
|
*/
|
|
1904
1904
|
getWorldCopy(M, z) {
|
|
1905
|
-
const O = 2 ** z, [p, o, A,
|
|
1906
|
-
for (let
|
|
1905
|
+
const O = 2 ** z, [p, o, A, q] = M.map((e) => ~~(e / (O * 256))), a = [];
|
|
1906
|
+
for (let e = q; e <= o; e++)
|
|
1907
1907
|
for (let n = p; n <= A; n++)
|
|
1908
|
-
|
|
1909
|
-
return
|
|
1908
|
+
a.push([n, e]);
|
|
1909
|
+
return a.map((e) => {
|
|
1910
1910
|
const n = 2 ** z * 256;
|
|
1911
|
-
return [
|
|
1911
|
+
return [e[0] * n, e[1] * n, n];
|
|
1912
1912
|
});
|
|
1913
1913
|
}
|
|
1914
1914
|
resize() {
|
|
@@ -1949,9 +1949,9 @@ class C0 {
|
|
|
1949
1949
|
* @param width??
|
|
1950
1950
|
* @param height??
|
|
1951
1951
|
*/
|
|
1952
|
-
createTexture(M, z, O, p, o, A,
|
|
1953
|
-
const
|
|
1954
|
-
return M.bindTexture(M.TEXTURE_2D,
|
|
1952
|
+
createTexture(M, z, O, p, o, A, q) {
|
|
1953
|
+
const a = M.createTexture();
|
|
1954
|
+
return M.bindTexture(M.TEXTURE_2D, a), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MIN_FILTER, z), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MAG_FILTER, O), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_WRAP_S, p), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_WRAP_T, p), o instanceof Uint8Array ? M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, A, q, 0, M.RGBA, M.UNSIGNED_BYTE, o) : M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, M.RGBA, M.UNSIGNED_BYTE, o), M.bindTexture(M.TEXTURE_2D, null), a;
|
|
1955
1955
|
}
|
|
1956
1956
|
/**
|
|
1957
1957
|
* 创建数据资源
|
|
@@ -1989,13 +1989,13 @@ class C0 {
|
|
|
1989
1989
|
const p = this.createProgram(M, z, O);
|
|
1990
1990
|
if (p) {
|
|
1991
1991
|
const o = { program: p }, A = M.getProgramParameter(p, M.ACTIVE_ATTRIBUTES);
|
|
1992
|
-
for (let
|
|
1993
|
-
const r = M.getActiveAttrib(p,
|
|
1992
|
+
for (let a = 0; a < A; a++) {
|
|
1993
|
+
const r = M.getActiveAttrib(p, a);
|
|
1994
1994
|
o[r.name] = M.getAttribLocation(p, r.name);
|
|
1995
1995
|
}
|
|
1996
|
-
const
|
|
1997
|
-
for (let
|
|
1998
|
-
const r = M.getActiveUniform(p,
|
|
1996
|
+
const q = M.getProgramParameter(p, M.ACTIVE_UNIFORMS);
|
|
1997
|
+
for (let a = 0; a < q; a++) {
|
|
1998
|
+
const r = M.getActiveUniform(p, a);
|
|
1999
1999
|
o[r.name] = M.getUniformLocation(p, r.name);
|
|
2000
2000
|
}
|
|
2001
2001
|
return o;
|
|
@@ -2008,19 +2008,19 @@ class C0 {
|
|
|
2008
2008
|
setup(M, z, O = !1, p, o) {
|
|
2009
2009
|
const A = document.createElement("canvas");
|
|
2010
2010
|
A.width = 256, A.height = 1;
|
|
2011
|
-
const
|
|
2012
|
-
if (
|
|
2013
|
-
const
|
|
2014
|
-
return z.forEach(([r,
|
|
2015
|
-
|
|
2016
|
-
}),
|
|
2011
|
+
const q = A.getContext("2d");
|
|
2012
|
+
if (q && M) {
|
|
2013
|
+
const a = q == null ? void 0 : q.createLinearGradient(0, 0, 256, 0);
|
|
2014
|
+
return z.forEach(([r, e]) => {
|
|
2015
|
+
a.addColorStop(r, e);
|
|
2016
|
+
}), q.fillStyle = a, q.fillRect(0, 0, 256, 1), {
|
|
2017
2017
|
canvas: A,
|
|
2018
2018
|
texture: this.createTexture(
|
|
2019
2019
|
M,
|
|
2020
2020
|
M.LINEAR,
|
|
2021
2021
|
M.LINEAR,
|
|
2022
2022
|
M.CLAMP_TO_EDGE,
|
|
2023
|
-
O ? new Uint8Array(
|
|
2023
|
+
O ? new Uint8Array(q.getImageData(0, 0, 256, 1).data) : A,
|
|
2024
2024
|
p,
|
|
2025
2025
|
o
|
|
2026
2026
|
)
|
|
@@ -2029,53 +2029,53 @@ class C0 {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
setupParticle(M, z = 1e3) {
|
|
2031
2031
|
const O = Math.ceil(Math.sqrt(z)), p = O * O, o = new Uint8Array(p * 4);
|
|
2032
|
-
for (let
|
|
2033
|
-
o[
|
|
2034
|
-
const A = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O),
|
|
2035
|
-
for (let
|
|
2036
|
-
|
|
2037
|
-
const r = this.createDataBuffer(M, "array",
|
|
2038
|
-
return { resolution: O, total: p, texture0: A, texture1:
|
|
2032
|
+
for (let e = 0; e < o.length; e++)
|
|
2033
|
+
o[e] = Math.floor(Math.random() * 256);
|
|
2034
|
+
const A = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O), q = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O), a = new Float32Array(p);
|
|
2035
|
+
for (let e = 0; e < p; e++)
|
|
2036
|
+
a[e] = e;
|
|
2037
|
+
const r = this.createDataBuffer(M, "array", a);
|
|
2038
|
+
return { resolution: O, total: p, texture0: A, texture1: q, indexBuffer: r };
|
|
2039
2039
|
}
|
|
2040
2040
|
bind(M, z, O) {
|
|
2041
2041
|
const p = this.createProgram(M, z, O);
|
|
2042
2042
|
if (p) {
|
|
2043
2043
|
const o = this.createDataBuffer(M, "array", void 0), A = M.getAttribLocation(p, "a_position");
|
|
2044
2044
|
M.enableVertexAttribArray(A), M.vertexAttribPointer(A, 2, M.FLOAT, !1, 0, 0);
|
|
2045
|
-
const
|
|
2046
|
-
this.createDataBuffer(M, "array",
|
|
2047
|
-
const
|
|
2048
|
-
return M.enableVertexAttribArray(
|
|
2045
|
+
const q = new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
|
|
2046
|
+
this.createDataBuffer(M, "array", q);
|
|
2047
|
+
const a = M.getAttribLocation(p, "a_texCoord");
|
|
2048
|
+
return M.enableVertexAttribArray(a), M.vertexAttribPointer(a, 2, M.FLOAT, !1, 0, 0), { program: p, aPositionBuffer: o };
|
|
2049
2049
|
}
|
|
2050
2050
|
return {};
|
|
2051
2051
|
}
|
|
2052
2052
|
bindParticle(M, z, O, p, o, A) {
|
|
2053
|
-
const
|
|
2054
|
-
return { particle:
|
|
2053
|
+
const q = this.createProgramWrapper(M, z, O), a = this.createProgramWrapper(M, p, o), r = this.createProgramWrapper(M, p, A), e = this.createDataBuffer(M, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), n = M.createFramebuffer();
|
|
2054
|
+
return { particle: q, screen: a, update: r, quadBuffer: e, frameBuffer: n };
|
|
2055
2055
|
}
|
|
2056
|
-
draw(M, z, O, p, o, A,
|
|
2057
|
-
var
|
|
2056
|
+
draw(M, z, O, p, o, A, q) {
|
|
2057
|
+
var a, r;
|
|
2058
2058
|
if (z && O) {
|
|
2059
|
-
M.resize(), z == null || z.viewport(0, 0, (
|
|
2059
|
+
M.resize(), z == null || z.viewport(0, 0, (a = z == null ? void 0 : z.canvas) == null ? void 0 : a.width, (r = z == null ? void 0 : z.canvas) == null ? void 0 : r.height), z.clearColor(0, 0, 0, 0), z.clear(z.COLOR_BUFFER_BIT | z.DEPTH_BUFFER_BIT);
|
|
2060
2060
|
try {
|
|
2061
|
-
const
|
|
2062
|
-
if (z.useProgram(O), z.uniform2f(
|
|
2061
|
+
const e = z.getUniformLocation(O, "u_resolution"), n = z.getUniformLocation(O, "u_image"), l = z.getUniformLocation(O, "u_color");
|
|
2062
|
+
if (z.useProgram(O), z.uniform2f(e, z.canvas.width * M.ratio, z.canvas.height * M.ratio), z.activeTexture(z.TEXTURE0), z.bindTexture(z.TEXTURE_2D, p), z.uniform1i(n, 0), z.activeTexture(z.TEXTURE1), z.bindTexture(z.TEXTURE_2D, o), z.uniform1i(l, 1), q != null && q.uvRange && (q != null && q.sRange)) {
|
|
2063
2063
|
const f = z.getUniformLocation(O, "u_range_u_v"), h = z.getUniformLocation(O, "u_range_s");
|
|
2064
|
-
z.uniform2f(f,
|
|
2064
|
+
z.uniform2f(f, q.uvRange[0], q.uvRange[1]), z.uniform2f(h, q.sRange[0], q.sRange[1]);
|
|
2065
2065
|
}
|
|
2066
2066
|
const d = M.getBoundPixel(), B = M.map.getZoom() + 1, R = M.getWorldCopy(d, B);
|
|
2067
2067
|
for (const f of R) {
|
|
2068
2068
|
const h = (f[0] - d[0]) * M.ratio, m = (f[1] - d[3]) * M.ratio, X = f[2] * M.ratio, [E, y, F, J] = [h, X + h, m, X + m], V = new Float32Array([E, F, y, F, E, J, E, J, y, F, y, J]);
|
|
2069
2069
|
z.bindBuffer(z.ARRAY_BUFFER, A), z.bufferData(z.ARRAY_BUFFER, V, z.STATIC_DRAW), z.drawArrays(z.TRIANGLES, 0, 6);
|
|
2070
2070
|
}
|
|
2071
|
-
} catch (
|
|
2072
|
-
console.log(`render failed...${
|
|
2071
|
+
} catch (e) {
|
|
2072
|
+
console.log(`render failed...${e}`);
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
2075
|
}
|
|
2076
2076
|
drawParticle(M, z, O, p, o) {
|
|
2077
|
-
var A,
|
|
2078
|
-
z && (z == null || z.viewport(0, 0, (A = z == null ? void 0 : z.canvas) == null ? void 0 : A.width, (
|
|
2077
|
+
var A, q;
|
|
2078
|
+
z && (z == null || z.viewport(0, 0, (A = z == null ? void 0 : z.canvas) == null ? void 0 : A.width, (q = z == null ? void 0 : z.canvas) == null ? void 0 : q.height), z.disable(z.DEPTH_TEST), z.disable(z.STENCIL_TEST), z.activeTexture(z.TEXTURE0), z.bindTexture(z.TEXTURE_2D, O), z.activeTexture(z.TEXTURE1), z.bindTexture(z.TEXTURE_2D, p.texture0), this.renderScreen(M, z, p, o), this.updateParticles(M, z, p, o));
|
|
2079
2079
|
}
|
|
2080
2080
|
renderScreen(M, z, O, p) {
|
|
2081
2081
|
z.bindFramebuffer(z.FRAMEBUFFER, O.frameBuffer), z.framebufferTexture2D(z.FRAMEBUFFER, z.COLOR_ATTACHMENT0, z.TEXTURE_2D, O.screenTexture, 0), z.viewport(0, 0, z.canvas.width, z.canvas.height), this.renderScreenTexture(z, O.backgroundTexture, O.screen, O.quadBuffer, 0.95), this.renderParticles(M, z, O, p), z.bindFramebuffer(z.FRAMEBUFFER, null), this.renderScreenTexture(z, O.screenTexture, O.screen, O.quadBuffer, 1);
|
|
@@ -2093,11 +2093,11 @@ class C0 {
|
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
2095
|
updateParticles(M, z, O, p) {
|
|
2096
|
-
var A,
|
|
2096
|
+
var A, q;
|
|
2097
2097
|
if (z) {
|
|
2098
2098
|
z.bindFramebuffer(z.FRAMEBUFFER, O.frameBuffer), z.framebufferTexture2D(z.FRAMEBUFFER, z.COLOR_ATTACHMENT0, z.TEXTURE_2D, O.texture1, 0), z.viewport(0, 0, O.resolution, O.resolution), z.useProgram(O.update.program), z.bindBuffer(z.ARRAY_BUFFER, O.quadBuffer), z.enableVertexAttribArray(O.update.a_pos), z.vertexAttribPointer(O.update.a_pos, 2, z.FLOAT, !1, 0, 0), z.uniform1i(O.update.u_factor, 0), z.uniform1i(O.update.u_particles, 1);
|
|
2099
|
-
const
|
|
2100
|
-
z.uniform4f(O.update.u_viewport,
|
|
2099
|
+
const a = M.getBoundRange();
|
|
2100
|
+
z.uniform4f(O.update.u_viewport, a[0], a[1], a[2], a[3]), z.uniform1f(O.update.u_rand_seed, Math.random()), z.uniform2f(O.update.u_factor_res, (A = O == null ? void 0 : O.image) == null ? void 0 : A.width, (q = O == null ? void 0 : O.image) == null ? void 0 : q.height), z.uniform2f(O.update.u_factor_min, p.uvRange[0], p.uvRange[0]), z.uniform2f(O.update.u_factor_max, p.uvRange[1], p.uvRange[1]), z.uniform1f(O.update.u_speed_factor, p.speedFactor * M.ratio), z.uniform1f(O.update.u_drop_rate, p.dropRate), z.uniform1f(O.update.u_drop_rate_bump, p.dropRateBump), z.drawArrays(z.TRIANGLES, 0, 6);
|
|
2101
2101
|
}
|
|
2102
2102
|
const o = O.texture0;
|
|
2103
2103
|
O.texture0 = O.texture1, O.texture1 = o;
|
|
@@ -4094,8 +4094,8 @@ const b2 = {
|
|
|
4094
4094
|
}
|
|
4095
4095
|
},
|
|
4096
4096
|
handleClear() {
|
|
4097
|
-
var b, M, z, O, p, o, A,
|
|
4098
|
-
(b = this.viewport) == null || b.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (z = this.viewport) == null ? void 0 : z.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (
|
|
4097
|
+
var b, M, z, O, p, o, A, q;
|
|
4098
|
+
(b = this.viewport) == null || b.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (z = this.viewport) == null ? void 0 : z.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (q = (A = this.viewport) == null ? void 0 : A.map) == null || q.off("moveend", this.handlePlay), this.handlePause();
|
|
4099
4099
|
},
|
|
4100
4100
|
handleSetup() {
|
|
4101
4101
|
if (!this.context) {
|
|
@@ -4435,8 +4435,8 @@ const t2 = {
|
|
|
4435
4435
|
}
|
|
4436
4436
|
},
|
|
4437
4437
|
handleClear() {
|
|
4438
|
-
var b, M, z, O, p, o, A,
|
|
4439
|
-
(b = this.viewport) == null || b.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (z = this.viewport) == null ? void 0 : z.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (
|
|
4438
|
+
var b, M, z, O, p, o, A, q;
|
|
4439
|
+
(b = this.viewport) == null || b.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (z = this.viewport) == null ? void 0 : z.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (q = (A = this.viewport) == null ? void 0 : A.map) == null || q.off("moveend", this.handlePlay), this.handlePause();
|
|
4440
4440
|
},
|
|
4441
4441
|
handleSetup() {
|
|
4442
4442
|
if (!this.context) {
|
|
@@ -5099,29 +5099,29 @@ const B2 = {
|
|
|
5099
5099
|
var O, p;
|
|
5100
5100
|
const b = ((p = (O = this.tropicals) == null ? void 0 : O.data) == null ? void 0 : p.features) || [], M = K().utc().hour(), z = [];
|
|
5101
5101
|
b.forEach((o) => {
|
|
5102
|
-
var A,
|
|
5103
|
-
(A = o.properties) != null && A.name && !z.includes((
|
|
5102
|
+
var A, q, a;
|
|
5103
|
+
(A = o.properties) != null && A.name && !z.includes((q = o.properties) == null ? void 0 : q.name) && z.push((a = o.properties) == null ? void 0 : a.name);
|
|
5104
5104
|
}), z.forEach((o) => {
|
|
5105
5105
|
var r;
|
|
5106
|
-
let A = 0,
|
|
5107
|
-
const
|
|
5106
|
+
let A = 0, q;
|
|
5107
|
+
const a = b.filter((e) => {
|
|
5108
5108
|
var n, l;
|
|
5109
|
-
return ((l = (n =
|
|
5109
|
+
return ((l = (n = e.properties) == null ? void 0 : n.category) == null ? void 0 : l.split("-")[0]) === o;
|
|
5110
5110
|
});
|
|
5111
|
-
(r =
|
|
5111
|
+
(r = a.filter((e) => {
|
|
5112
5112
|
var n, l;
|
|
5113
|
-
return ((n =
|
|
5114
|
-
})[0]) == null || r.properties.model,
|
|
5113
|
+
return ((n = e.geometry) == null ? void 0 : n.type) === "LineString" && ((l = e.properties) == null ? void 0 : l.type) === "forecast";
|
|
5114
|
+
})[0]) == null || r.properties.model, a.forEach((e, n) => {
|
|
5115
5115
|
var l, d, B, R, f, h;
|
|
5116
|
-
((l =
|
|
5117
|
-
}),
|
|
5116
|
+
((l = e.geometry) == null ? void 0 : l.type) === "Point" && ((d = e.properties) == null ? void 0 : d.type) === "history" && (A = n, q = q === void 0 ? n : q), ((B = e.geometry) == null ? void 0 : B.type) === "Point" && ((R = e.properties) == null ? void 0 : R.type) === "forecast" && q === void 0 && (q = n), ((f = e.geometry) == null ? void 0 : f.type) === "LineString" && ((h = e.properties) == null || h.type);
|
|
5117
|
+
}), a.map((e, n) => {
|
|
5118
5118
|
var l, d, B, R, f, h, m;
|
|
5119
|
-
if (((l =
|
|
5120
|
-
|
|
5121
|
-
const X = K((m =
|
|
5122
|
-
|
|
5119
|
+
if (((l = e.geometry) == null ? void 0 : l.type) === "LineString" && ((d = e.properties) == null || d.type), ((B = e.geometry) == null ? void 0 : B.type) === "Point" && ((R = e.properties) == null ? void 0 : R.type) === "forecast" && (e.properties.name = o, e.properties.format = K(e.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((f = e.geometry) == null ? void 0 : f.type) === "Point" && ((h = e.properties) == null ? void 0 : h.type) === "history") {
|
|
5120
|
+
e.properties.format = K(e.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
5121
|
+
const X = K((m = e.properties) == null ? void 0 : m.date).utc().format("HHmm") === K().utc().hour(Math.floor(M / 6) * 6).minute("00").format("HHmm");
|
|
5122
|
+
e.properties.showHistoryLabel = X || n === A, e.properties.showNameLabel = n === A, e.properties.name = o;
|
|
5123
5123
|
}
|
|
5124
|
-
return
|
|
5124
|
+
return e;
|
|
5125
5125
|
});
|
|
5126
5126
|
}), this.handleInit();
|
|
5127
5127
|
},
|
|
@@ -5156,7 +5156,7 @@ const B2 = {
|
|
|
5156
5156
|
));
|
|
5157
5157
|
},
|
|
5158
5158
|
handleRender() {
|
|
5159
|
-
var b, M, z, O, p, o, A,
|
|
5159
|
+
var b, M, z, O, p, o, A, q, a, r;
|
|
5160
5160
|
if (!this.map)
|
|
5161
5161
|
setTimeout(() => {
|
|
5162
5162
|
this.handleRender();
|
|
@@ -5262,9 +5262,9 @@ const B2 = {
|
|
|
5262
5262
|
],
|
|
5263
5263
|
"text-halo-width": 4
|
|
5264
5264
|
}
|
|
5265
|
-
}), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] add elapsed: ", d, ", total: ", l += d)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((
|
|
5265
|
+
}), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] add elapsed: ", d, ", total: ", l += d)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((q = this.map) == null || q.getSource(this.clusterSource).setData((A = this.tropicals) != null && A.active ? this.tropicals.data : this.empty), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] update elapsed: ", d, ", total: ", l += d)) : (this.map.addSource(this.clusterSource, {
|
|
5266
5266
|
type: "geojson",
|
|
5267
|
-
data: (
|
|
5267
|
+
data: (a = this.tropicals) != null && a.active ? (r = this.tropicals) == null ? void 0 : r.data : this.empty
|
|
5268
5268
|
// cluster: true,
|
|
5269
5269
|
// clusterRadius: 10, // 聚合半径
|
|
5270
5270
|
}), this.map.addLayer({
|
|
@@ -5382,8 +5382,8 @@ const B2 = {
|
|
|
5382
5382
|
}), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] add elapsed: ", d, ", total: ", l += d));
|
|
5383
5383
|
}
|
|
5384
5384
|
this.handleDrawCircle();
|
|
5385
|
-
const
|
|
5386
|
-
this.interpolateData = JSON.parse(JSON.stringify(
|
|
5385
|
+
const e = j0.interpolate(this.tropicals, 1);
|
|
5386
|
+
this.interpolateData = JSON.parse(JSON.stringify(e)), this.interpolateData.filter((n) => n.properties.name === "kristy" && n.properties.model === "ecmwf"), this.handleDateChange();
|
|
5387
5387
|
}
|
|
5388
5388
|
},
|
|
5389
5389
|
handleClear() {
|
|
@@ -5391,7 +5391,7 @@ const B2 = {
|
|
|
5391
5391
|
this.map && (this.map.getLayer(this.historyLayer) && this.map.removeLayer(this.historyLayer), this.map.getLayer(this.forecastLayer) && this.map.removeLayer(this.forecastLayer), this.map.getLayer(this.forecastModelLayer) && this.map.removeLayer(this.forecastModelLayer), this.map.getLayer(this.forecastNameLayer) && this.map.removeLayer(this.forecastNameLayer), this.map.getLayer(this.pointCircleLayer) && this.map.removeLayer(this.pointCircleLayer), this.map.getLayer(this.pointCircleLayer + "-border") && this.map.removeLayer(this.pointCircleLayer + "-border"), this.map.getLayer(this.pointLabelLayer) && this.map.removeLayer(this.pointLabelLayer), this.map.getLayer(this.historyPointCircleLayer) && this.map.removeLayer(this.historyPointCircleLayer), this.map.getLayer(this.historyPointCircleLayer + "-border") && this.map.removeLayer(this.historyPointCircleLayer + "-border"), this.map.getLayer(this.historyPointCircleLayer + "-inner") && this.map.removeLayer(this.historyPointCircleLayer + "-inner"), this.map.getLayer(this.historyPointLabelLayer) && this.map.removeLayer(this.historyPointLabelLayer), this.map.getLayer(this.interpolateLineLayer) && this.map.removeLayer(this.interpolateLineLayer), (b = this.interpolateMarkers) == null || b.forEach((M) => M == null ? void 0 : M.remove()), this.map.getSource(this.source) && this.map.removeSource(this.source), this.map.getSource(this.clusterSource) && this.map.removeSource(this.clusterSource), this.map.getSource(this.interpolateSource) && this.map.removeSource(this.interpolateSource), this.map.getLayer(this.circleLayer) && this.map.removeLayer(this.circleLayer), this.map.getSource(this.circleSource) && this.map.removeSource(this.circleSource));
|
|
5392
5392
|
},
|
|
5393
5393
|
handleDateChange() {
|
|
5394
|
-
var b, M, z, O, p, o, A,
|
|
5394
|
+
var b, M, z, O, p, o, A, q, a, r, e, n, l, d, B, R, f, h, m, X, E, y, F, J, V, u, g, A0, n0, h0, i0, u0, p0, m0, B0, L0;
|
|
5395
5395
|
if ((b = this.interpolateMarkers) == null || b.forEach((r0) => r0 == null ? void 0 : r0.remove()), this.circleSourceData.features = [], (M = this.interpolateData) != null && M.length && this.tropicals.active) {
|
|
5396
5396
|
const r0 = K(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), d0 = this.interpolateData.filter((P) => P.properties.date === r0.format() && !P.properties.disabled), g0 = this.handleComputePolygons(d0), s0 = v.featureCollection([...d0]);
|
|
5397
5397
|
g0.forEach((P) => {
|
|
@@ -5413,7 +5413,7 @@ const B2 = {
|
|
|
5413
5413
|
for (const P of d0)
|
|
5414
5414
|
if (!P.properties.disabled) {
|
|
5415
5415
|
let M0 = "#f44336";
|
|
5416
|
-
((
|
|
5416
|
+
((q = (A = P.properties) == null ? void 0 : A.wind) == null ? void 0 : q.spd) < 17.2 || !((r = (a = P.properties) == null ? void 0 : a.wind) != null && r.spd) ? M0 = "#03f869" : ((n = (e = P.properties) == null ? void 0 : e.wind) == null ? void 0 : n.spd) >= 17.2 && ((d = (l = P.properties) == null ? void 0 : l.wind) == null ? void 0 : d.spd) < 24.5 ? M0 = "#f2f202" : ((R = (B = P.properties) == null ? void 0 : B.wind) == null ? void 0 : R.spd) >= 24.5 && ((h = (f = P.properties) == null ? void 0 : f.wind) == null ? void 0 : h.spd) < 32.7 ? M0 = "#ff9100" : ((X = (m = P.properties) == null ? void 0 : m.wind) == null ? void 0 : X.spd) >= 32.7 && ((y = (E = P.properties) == null ? void 0 : E.wind) == null ? void 0 : y.spd) < 41.5 ? M0 = "#f44336" : ((J = (F = P.properties) == null ? void 0 : F.wind) == null ? void 0 : J.spd) >= 41.5 && ((u = (V = P.properties) == null ? void 0 : V.wind) == null ? void 0 : u.spd) < 51 ? M0 = "#f903d0" : ((A0 = (g = P.properties) == null ? void 0 : g.wind) == null ? void 0 : A0.spd) >= 51 ? M0 = "#8702f9" : M0 = "#f44336";
|
|
5417
5417
|
const e0 = `<svg t="1719918955501"
|
|
5418
5418
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
5419
5419
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -5447,7 +5447,7 @@ const B2 = {
|
|
|
5447
5447
|
(B0 = this.map) != null && B0.getSource(this.interpolateSource) && ((L0 = this.map) == null || L0.getSource(this.interpolateSource).setData(this.empty));
|
|
5448
5448
|
},
|
|
5449
5449
|
handleClick(b) {
|
|
5450
|
-
var o, A,
|
|
5450
|
+
var o, A, q, a, r, e, n, l;
|
|
5451
5451
|
const M = b.features[0], z = (A = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : A.features.filter(
|
|
5452
5452
|
(d) => {
|
|
5453
5453
|
var B;
|
|
@@ -5458,7 +5458,7 @@ const B2 = {
|
|
|
5458
5458
|
var R, f, h, m;
|
|
5459
5459
|
return ((R = d.properties) == null ? void 0 : R.model) === "cma" ? -1 : ((f = d.properties) == null ? void 0 : f.model) === "jma" ? ((h = B.properties) == null ? void 0 : h.model) === "cma" ? 1 : -1 : d.properties.model === "ecmwf" ? ["jma", "cma"].includes((m = B.properties) == null ? void 0 : m.model) ? 1 : -1 : 0;
|
|
5460
5460
|
});
|
|
5461
|
-
const O = (
|
|
5461
|
+
const O = (a = (q = this.tropicals) == null ? void 0 : q.data) == null ? void 0 : a.features.filter(
|
|
5462
5462
|
(d) => {
|
|
5463
5463
|
var B;
|
|
5464
5464
|
return d.geometry.type === "LineString" && d.properties.type === "history" && d.properties.name === ((B = M == null ? void 0 : M.properties) == null ? void 0 : B.name);
|
|
@@ -5467,21 +5467,21 @@ const B2 = {
|
|
|
5467
5467
|
this.activeTropicals = {
|
|
5468
5468
|
name: (r = M == null ? void 0 : M.properties) == null ? void 0 : r.name,
|
|
5469
5469
|
forecasts: z.map((d) => d.properties),
|
|
5470
|
-
history: (
|
|
5470
|
+
history: (e = O[0]) == null ? void 0 : e.properties,
|
|
5471
5471
|
showCircle: (l = (n = z[0]) == null ? void 0 : n.properties) == null ? void 0 : l.showCircle
|
|
5472
5472
|
}, this.showTropicals = !0;
|
|
5473
5473
|
const p = document.getElementById("active-tropical");
|
|
5474
5474
|
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([b.lngLat.lng, b.lngLat.lat]) : this.activeTropicalsMarker = new w0.Marker(p).setLngLat([b.lngLat.lng, b.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
5475
5475
|
},
|
|
5476
5476
|
handleForecastToggle(b) {
|
|
5477
|
-
var O, p, o, A,
|
|
5477
|
+
var O, p, o, A, q, a;
|
|
5478
5478
|
b.disabled = !b.disabled;
|
|
5479
5479
|
const M = `${b.name}-${b.model}`, z = (p = (O = this.map) == null ? void 0 : O.getSource(this.source)._data) == null ? void 0 : p.features;
|
|
5480
5480
|
z.forEach((r) => {
|
|
5481
5481
|
r.properties.category === M && (r.properties.disabled = b.disabled);
|
|
5482
5482
|
}), this.interpolateData.forEach((r) => {
|
|
5483
5483
|
r.properties.category === M && (r.properties.disabled = b.disabled);
|
|
5484
|
-
}), (A = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || A.setData(v.featureCollection(z)), (
|
|
5484
|
+
}), (A = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || A.setData(v.featureCollection(z)), (a = (q = this.map) == null ? void 0 : q.getSource(this.clusterSource)) == null || a.setData(v.featureCollection(z)), this.handleDateChange();
|
|
5485
5485
|
},
|
|
5486
5486
|
handleStrikeProbability(b) {
|
|
5487
5487
|
this.$emit("tropicalProbability", b);
|
|
@@ -5525,8 +5525,8 @@ const B2 = {
|
|
|
5525
5525
|
se: O.r10se >= 0 ? O.r10se : void 0,
|
|
5526
5526
|
sw: O.r10sw >= 0 ? O.r10sw : void 0,
|
|
5527
5527
|
nw: O.r10nw >= 0 ? O.r10nw : void 0
|
|
5528
|
-
},
|
|
5529
|
-
M.push(
|
|
5528
|
+
}, q = this.handleComputeArc(z.geometry.coordinates, A, { ...z.properties, level: 10 });
|
|
5529
|
+
M.push(q);
|
|
5530
5530
|
}
|
|
5531
5531
|
return M;
|
|
5532
5532
|
},
|
|
@@ -5534,23 +5534,23 @@ const B2 = {
|
|
|
5534
5534
|
var o;
|
|
5535
5535
|
const O = [];
|
|
5536
5536
|
for (const A in M) {
|
|
5537
|
-
const
|
|
5538
|
-
let
|
|
5537
|
+
const q = M[A] ?? 0;
|
|
5538
|
+
let a;
|
|
5539
5539
|
switch (A) {
|
|
5540
5540
|
case "ne":
|
|
5541
|
-
|
|
5541
|
+
a = v.lineArc(b, q * 1.852, 0, 90, { steps: q > 0 ? 64 : 1 });
|
|
5542
5542
|
break;
|
|
5543
5543
|
case "se":
|
|
5544
|
-
|
|
5544
|
+
a = v.lineArc(b, q * 1.852, 90, 180, { steps: q > 0 ? 64 : 1 });
|
|
5545
5545
|
break;
|
|
5546
5546
|
case "sw":
|
|
5547
|
-
|
|
5547
|
+
a = v.lineArc(b, q * 1.852, 180, 270, { steps: q > 0 ? 64 : 1 });
|
|
5548
5548
|
break;
|
|
5549
5549
|
case "nw":
|
|
5550
|
-
|
|
5550
|
+
a = v.lineArc(b, q * 1.852, 270, 360, { steps: q > 0 ? 64 : 1 });
|
|
5551
5551
|
break;
|
|
5552
5552
|
}
|
|
5553
|
-
O.push(...(o =
|
|
5553
|
+
O.push(...(o = a == null ? void 0 : a.geometry) == null ? void 0 : o.coordinates);
|
|
5554
5554
|
}
|
|
5555
5555
|
const p = v.lineString(O);
|
|
5556
5556
|
return v.lineToPolygon(p, { properties: z });
|
|
@@ -5573,7 +5573,7 @@ const B2 = {
|
|
|
5573
5573
|
style: { "justify-content": "flex-start" }
|
|
5574
5574
|
}, P2 = { class: "forecast-models" }, S2 = ["onClick"], k2 = { class: "more" };
|
|
5575
5575
|
function Q2(b, M, z, O, p, o) {
|
|
5576
|
-
var A,
|
|
5576
|
+
var A, q, a, r, e, n, l, d, B, R, f, h, m, X, E;
|
|
5577
5577
|
return y0((s(), W("div", g2, [
|
|
5578
5578
|
c("div", N2, [
|
|
5579
5579
|
c("div", {
|
|
@@ -5581,8 +5581,8 @@ function Q2(b, M, z, O, p, o) {
|
|
|
5581
5581
|
onClick: M[0] || (M[0] = (y) => p.showTropicals = !1)
|
|
5582
5582
|
}, ""),
|
|
5583
5583
|
c("div", y2, [
|
|
5584
|
-
(
|
|
5585
|
-
z0(C((
|
|
5584
|
+
(q = (A = p.activeTropicals) == null ? void 0 : A.history) != null && q.level ? (s(), W("span", X2, C((r = (a = p.activeTropicals) == null ? void 0 : a.history) == null ? void 0 : r.level) + " , ", 1)) : j("", !0),
|
|
5585
|
+
z0(C((e = p.activeTropicals) == null ? void 0 : e.name), 1)
|
|
5586
5586
|
]),
|
|
5587
5587
|
c("div", w2, " Last update: " + C(o.computeTime(((l = (n = p.activeTropicals) == null ? void 0 : n.history) == null ? void 0 : l.updated) || ((R = (B = (d = p.activeTropicals) == null ? void 0 : d.forecasts) == null ? void 0 : B.filter((y) => !y.disabled)[0]) == null ? void 0 : R.date))), 1)
|
|
5588
5588
|
]),
|
|
@@ -6353,9 +6353,9 @@ const qM = {
|
|
|
6353
6353
|
var b;
|
|
6354
6354
|
if (this.showMeteo && this.ts) {
|
|
6355
6355
|
const M = K(), z = (b = K(this.ts)) == null ? void 0 : b.diff(M, "d", !0), p = [0, 1, 2, 3, 4, 5, 6, 7].every((o) => {
|
|
6356
|
-
var
|
|
6356
|
+
var q;
|
|
6357
6357
|
const A = T0(this.ts).tz(this.positionGmt).add(3 * o, "h").format();
|
|
6358
|
-
return (
|
|
6358
|
+
return (q = v0.pickHourly(this.meteoData, A)) == null ? void 0 : q[0];
|
|
6359
6359
|
});
|
|
6360
6360
|
if (this.meteoData && p ? this.initTableData(this.meteoData) : (this.loading || (z >= 0 ? await this.fetchMeteoData(this.point, this.ts, 7) : await this.fetchHistoryData(this.point, this.ts)), this.initTableData(this.meteoData)), this.activeIndex === 4) {
|
|
6361
6361
|
const o = I0.pickDailyExtremes(this.tideData, this.ts);
|
|
@@ -6409,12 +6409,12 @@ const qM = {
|
|
|
6409
6409
|
forecastDays: z ?? 7,
|
|
6410
6410
|
weatherModels: p,
|
|
6411
6411
|
marineModels: o
|
|
6412
|
-
},
|
|
6412
|
+
}, q = await f0.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, A, {
|
|
6413
6413
|
headers: {
|
|
6414
6414
|
Authorization: this.token || this.defaultMeteoToken
|
|
6415
6415
|
}
|
|
6416
6416
|
});
|
|
6417
|
-
(
|
|
6417
|
+
(q == null ? void 0 : q.data.code) === 0 && (this.meteoData = q == null ? void 0 : q.data.data, this.loading = !1);
|
|
6418
6418
|
},
|
|
6419
6419
|
async fetchHistoryData(b, M) {
|
|
6420
6420
|
this.loading = !0, this.meteoData = [];
|
|
@@ -6434,24 +6434,24 @@ const qM = {
|
|
|
6434
6434
|
(A == null ? void 0 : A.data.code) === 0 && (this.meteoData = A == null ? void 0 : A.data.data, this.loading = !1);
|
|
6435
6435
|
},
|
|
6436
6436
|
initTableData(b) {
|
|
6437
|
-
var M, z, O, p, o, A,
|
|
6438
|
-
this.clearTable(), this.positionGmt = (z = (M = b == null ? void 0 : b.weather) == null ? void 0 : M[0]) == null ? void 0 : z.timezone, this.positionOffset = (p = (O = b == null ? void 0 : b.weather) == null ? void 0 : O[0]) == null ? void 0 : p.offset, this.localDate = (A = (o = T0(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : A.format("MMM-DD/HHmm[LT]"), this.currentHourData = (
|
|
6439
|
-
var r,
|
|
6440
|
-
const
|
|
6441
|
-
if (!
|
|
6437
|
+
var M, z, O, p, o, A, q;
|
|
6438
|
+
this.clearTable(), this.positionGmt = (z = (M = b == null ? void 0 : b.weather) == null ? void 0 : M[0]) == null ? void 0 : z.timezone, this.positionOffset = (p = (O = b == null ? void 0 : b.weather) == null ? void 0 : O[0]) == null ? void 0 : p.offset, this.localDate = (A = (o = T0(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : A.format("MMM-DD/HHmm[LT]"), this.currentHourData = (q = v0.pickHourly(b, K(this.ts))) == null ? void 0 : q[0], this.$nextTick(() => {
|
|
6439
|
+
var r, e, n, l, d, B, R, f, h, m, X, E, y, F, J, V, u, g, A0, n0, h0, i0, u0, p0, m0, B0, L0, r0, d0, g0, s0, P, M0, e0, I, b0, W0, l0, R0;
|
|
6440
|
+
const a = document.getElementById("meteoMainBox");
|
|
6441
|
+
if (!a)
|
|
6442
6442
|
return !1;
|
|
6443
|
-
if (
|
|
6444
|
-
|
|
6443
|
+
if (a.className = "main-box", a.style.backgroundImage = null, a.style.backgroundPosition = "top left", ((e = (r = this.currentHourData) == null ? void 0 : r.weather) == null ? void 0 : e.code) === 0 && ((l = (n = this.currentHourData) == null ? void 0 : n.weather) == null ? void 0 : l.isDay) === 0)
|
|
6444
|
+
a.className = "main-box night-bg";
|
|
6445
6445
|
else {
|
|
6446
6446
|
const o0 = (B = (d = this.currentHourData) == null ? void 0 : d.weather) == null ? void 0 : B.bg;
|
|
6447
|
-
o0 ? (
|
|
6447
|
+
o0 ? (a.className = "main-box font-color-white", a.style.backgroundImage = `url(${o0})`, (o0 === "https://osshz.idmwx.com/asset/weather/bg2.png" || o0 === "https://osshz.idmwx.com/asset/weather/bg5.png") && (a.style.backgroundPosition = "right bottom")) : a.className = "main-box day-bg";
|
|
6448
6448
|
}
|
|
6449
6449
|
if (!this.currentHourData)
|
|
6450
6450
|
return this.loading = !1, this.tableData.hours = [void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0], this.handleRender(), !1;
|
|
6451
6451
|
for (let o0 = 0; o0 < 8; o0++) {
|
|
6452
|
-
const
|
|
6453
|
-
this.tableData.hours.push(
|
|
6454
|
-
const i = ((R = v0.pickHourly(b,
|
|
6452
|
+
const t = T0(this.ts).tz(this.positionGmt).add(3 * o0, "h").format();
|
|
6453
|
+
this.tableData.hours.push(t);
|
|
6454
|
+
const i = ((R = v0.pickHourly(b, t)) == null ? void 0 : R[0]) || {};
|
|
6455
6455
|
this.tableData.temp.push(this.roundPrecision((f = i == null ? void 0 : i.weather) == null ? void 0 : f.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((m = (h = i == null ? void 0 : i.weather) == null ? void 0 : h.precip) == null ? void 0 : m.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((E = (X = i == null ? void 0 : i.weather) == null ? void 0 : X.precip) == null ? void 0 : E.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((y = i == null ? void 0 : i.weather) == null ? void 0 : y.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((J = (F = i == null ? void 0 : i.weather) == null ? void 0 : F.wind) == null ? void 0 : J.kts, 1) ?? "-"), this.tableData.windDir.push((u = (V = i == null ? void 0 : i.weather) == null ? void 0 : V.wind) == null ? void 0 : u.bearing), this.tableData.windGust.push(this.roundPrecision((A0 = (g = i == null ? void 0 : i.weather) == null ? void 0 : g.wind) == null ? void 0 : A0.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((h0 = (n0 = i == null ? void 0 : i.wave) == null ? void 0 : n0.sig) == null ? void 0 : h0.height, 1) ?? "-"), this.tableData.sigwaveDir.push((u0 = (i0 = i == null ? void 0 : i.wave) == null ? void 0 : i0.sig) == null ? void 0 : u0.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((m0 = (p0 = i == null ? void 0 : i.wave) == null ? void 0 : p0.wd) == null ? void 0 : m0.height, 1) ?? "-"), this.tableData.windwaveDir.push((L0 = (B0 = i == null ? void 0 : i.wave) == null ? void 0 : B0.wd) == null ? void 0 : L0.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((d0 = (r0 = i == null ? void 0 : i.wave) == null ? void 0 : r0.wd) == null ? void 0 : d0.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((s0 = (g0 = i == null ? void 0 : i.wave) == null ? void 0 : g0.swell) == null ? void 0 : s0.height, 1) ?? "-"), this.tableData.swellDir.push((M0 = (P = i == null ? void 0 : i.wave) == null ? void 0 : P.swell) == null ? void 0 : M0.bearing), this.tableData.swellPeriod.push(this.roundPrecision((I = (e0 = i == null ? void 0 : i.wave) == null ? void 0 : e0.swell) == null ? void 0 : I.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((b0 = i == null ? void 0 : i.current) == null ? void 0 : b0.speed, 1) ?? "-"), this.tableData.currentDir.push((W0 = i == null ? void 0 : i.current) == null ? void 0 : W0.bearing), this.tableData.seaLevel.push(this.roundPrecision(i == null ? void 0 : i.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(i == null ? void 0 : i.sst, 0) ?? "-"), this.tableData.weatherUrls.push((l0 = i == null ? void 0 : i.weather) == null ? void 0 : l0.url), this.tableData.weatherNames.push(((R0 = i == null ? void 0 : i.weather) == null ? void 0 : R0.name) ?? "-");
|
|
6456
6456
|
}
|
|
6457
6457
|
});
|
|
@@ -6546,19 +6546,19 @@ const qM = {
|
|
|
6546
6546
|
class: "main-box flex-center"
|
|
6547
6547
|
};
|
|
6548
6548
|
function ab(b, M, z, O, p, o) {
|
|
6549
|
-
var r,
|
|
6550
|
-
const A = x("LocationFilled"),
|
|
6549
|
+
var r, e, n, l, d, B, R, f, h, m, X, E, y, F, J, V;
|
|
6550
|
+
const A = x("LocationFilled"), q = x("ElIcon"), a = x("ElTooltip");
|
|
6551
6551
|
return y0((s(), W("div", iM, [
|
|
6552
6552
|
c("div", rM, [
|
|
6553
6553
|
c("div", nM, [
|
|
6554
6554
|
c("div", dM, [
|
|
6555
|
-
T(
|
|
6555
|
+
T(q, { size: "22" }, {
|
|
6556
6556
|
default: a0(() => [
|
|
6557
6557
|
T(A)
|
|
6558
6558
|
]),
|
|
6559
6559
|
_: 1
|
|
6560
6560
|
}),
|
|
6561
|
-
c("div", sM, C(o.computeLat((r = p.point) == null ? void 0 : r.lat)) + "," + C(o.computeLng((
|
|
6561
|
+
c("div", sM, C(o.computeLat((r = p.point) == null ? void 0 : r.lat)) + "," + C(o.computeLng((e = p.point) == null ? void 0 : e.lng)), 1)
|
|
6562
6562
|
]),
|
|
6563
6563
|
c("div", {
|
|
6564
6564
|
class: "iconfont close",
|
|
@@ -6570,7 +6570,7 @@ function ab(b, M, z, O, p, o) {
|
|
|
6570
6570
|
]))) : (s(), W("div", WM, [
|
|
6571
6571
|
c("div", lM, [
|
|
6572
6572
|
c("div", fM, [
|
|
6573
|
-
T(
|
|
6573
|
+
T(a, {
|
|
6574
6574
|
placement: "top",
|
|
6575
6575
|
effect: "light",
|
|
6576
6576
|
content: (l = (n = p.currentHourData) == null ? void 0 : n.weather) == null ? void 0 : l.name,
|
|
@@ -6676,7 +6676,7 @@ function ab(b, M, z, O, p, o) {
|
|
|
6676
6676
|
colspan: "1",
|
|
6677
6677
|
key: `weatherUrls${g}${u}`
|
|
6678
6678
|
}, [
|
|
6679
|
-
T(
|
|
6679
|
+
T(a, {
|
|
6680
6680
|
placement: "top",
|
|
6681
6681
|
effect: "light",
|
|
6682
6682
|
content: p.tableData.weatherNames[g],
|
|
@@ -6804,7 +6804,7 @@ function ab(b, M, z, O, p, o) {
|
|
|
6804
6804
|
colspan: "1",
|
|
6805
6805
|
key: `currentweatherUrls${g}${u}`
|
|
6806
6806
|
}, [
|
|
6807
|
-
T(
|
|
6807
|
+
T(a, {
|
|
6808
6808
|
placement: "top",
|
|
6809
6809
|
effect: "light",
|
|
6810
6810
|
content: p.tableData.weatherNames[g],
|
|
@@ -6955,7 +6955,7 @@ function ab(b, M, z, O, p, o) {
|
|
|
6955
6955
|
colspan: "1",
|
|
6956
6956
|
key: `seaweatherUrls${g}${u}`
|
|
6957
6957
|
}, [
|
|
6958
|
-
T(
|
|
6958
|
+
T(a, {
|
|
6959
6959
|
placement: "top",
|
|
6960
6960
|
effect: "light",
|
|
6961
6961
|
content: p.tableData.weatherNames[g],
|
|
@@ -7518,7 +7518,7 @@ function mb(b, M, z, O, p, o) {
|
|
|
7518
7518
|
return y0((s(), W("div", Rb, [
|
|
7519
7519
|
c("div", {
|
|
7520
7520
|
class: "iconfont close",
|
|
7521
|
-
onClick: M[0] || (M[0] = (
|
|
7521
|
+
onClick: M[0] || (M[0] = (q) => p.showZone = !1)
|
|
7522
7522
|
}, ""),
|
|
7523
7523
|
c("div", {
|
|
7524
7524
|
class: "rich-context",
|
|
@@ -8338,8 +8338,14 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8338
8338
|
watch: {
|
|
8339
8339
|
show: {
|
|
8340
8340
|
handler() {
|
|
8341
|
-
var b, M, z
|
|
8342
|
-
|
|
8341
|
+
var b, M, z;
|
|
8342
|
+
if (this.show)
|
|
8343
|
+
this.handleBind();
|
|
8344
|
+
else {
|
|
8345
|
+
(b = this.map) == null || b.getCanvas().removeEventListener("keydown", this.handleKeydown), (M = this.map) == null || M.off("mousemove", this.handleMove), (z = this.map) == null || z.off("dblclick", this.handleDblClick), this.map && (this.map.getCanvas().style.cursor = "grab");
|
|
8346
|
+
let O = this.geojson.find((p) => !p.closed);
|
|
8347
|
+
O && this.handleClear(O, !0), this.geojson = this.geojson.filter((p) => !!p.closed), O = v.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(O);
|
|
8348
|
+
}
|
|
8343
8349
|
},
|
|
8344
8350
|
immediate: !0
|
|
8345
8351
|
},
|
|
@@ -8364,19 +8370,19 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8364
8370
|
handleKeydown(b) {
|
|
8365
8371
|
if (b.key === "Shift") {
|
|
8366
8372
|
this.navigation = this.navigation === "RL" ? "GC" : "RL";
|
|
8367
|
-
const
|
|
8368
|
-
z.length && (z.at(-1).properties.mode = this.navigation);
|
|
8373
|
+
const M = this.geojson.at(-1), z = M.features.filter((O) => O.geometry.type === "Point");
|
|
8374
|
+
z.length && (z.at(-1).properties.mode = this.navigation), this.handleRender(M);
|
|
8369
8375
|
}
|
|
8370
8376
|
},
|
|
8371
8377
|
handleDrag(b) {
|
|
8372
|
-
var z, O, p, o, A,
|
|
8378
|
+
var z, O, p, o, A, q, a, r, e, n;
|
|
8373
8379
|
const M = (O = (z = b.target) == null ? void 0 : z._element) == null ? void 0 : O.id;
|
|
8374
8380
|
if ((M == null ? void 0 : M.split("-").length) === 2) {
|
|
8375
8381
|
const l = this.geojson.filter((f) => f.id === M.split("-")[0])[0];
|
|
8376
8382
|
this.pointMarkers[l.id].filter((f) => {
|
|
8377
8383
|
var h;
|
|
8378
8384
|
return ((h = f._element) == null ? void 0 : h.id) === M;
|
|
8379
|
-
})[0].setLngLat([(o = (p = b.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (
|
|
8385
|
+
})[0].setLngLat([(o = (p = b.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (q = (A = b.target) == null ? void 0 : A._lngLat) == null ? void 0 : q.lat]);
|
|
8380
8386
|
let B;
|
|
8381
8387
|
l.features.forEach((f, h) => {
|
|
8382
8388
|
if (f.geometry.type === "Point" && f.properties.id == M.split("-")[1]) {
|
|
@@ -8388,22 +8394,22 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8388
8394
|
this.handleTmpPointUpdate(
|
|
8389
8395
|
l,
|
|
8390
8396
|
R[B - 1],
|
|
8391
|
-
{ lng: (r = (
|
|
8397
|
+
{ lng: (r = (a = b.target) == null ? void 0 : a._lngLat) == null ? void 0 : r.lng, lat: (n = (e = b.target) == null ? void 0 : e._lngLat) == null ? void 0 : n.lat, properties: R[B].properties },
|
|
8392
8398
|
B === R.length - 1 ? void 0 : R[B + 1]
|
|
8393
8399
|
);
|
|
8394
8400
|
}
|
|
8395
8401
|
},
|
|
8396
8402
|
handleDragEnd(b) {
|
|
8397
|
-
var z, O, p, o, A,
|
|
8403
|
+
var z, O, p, o, A, q, a, r, e, n;
|
|
8398
8404
|
const M = (O = (z = b.target) == null ? void 0 : z._element) == null ? void 0 : O.id;
|
|
8399
8405
|
if ((M == null ? void 0 : M.split("-").length) === 2) {
|
|
8400
8406
|
const l = this.geojson.filter((R) => R.id === M.split("-")[0])[0];
|
|
8401
8407
|
this.pointMarkers[l.id].filter((R) => {
|
|
8402
8408
|
var f;
|
|
8403
8409
|
return ((f = R._element) == null ? void 0 : f.id) === M;
|
|
8404
|
-
})[0].setLngLat([(o = (p = b.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (
|
|
8410
|
+
})[0].setLngLat([(o = (p = b.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (q = (A = b.target) == null ? void 0 : A._lngLat) == null ? void 0 : q.lat]);
|
|
8405
8411
|
const B = l.features.filter((R) => R.geometry.type === "Point" && R.properties.id == M.split("-")[1])[0];
|
|
8406
|
-
B.geometry.coordinates = [(r = (
|
|
8412
|
+
B.geometry.coordinates = [(r = (a = b.target) == null ? void 0 : a._lngLat) == null ? void 0 : r.lng, (n = (e = b.target) == null ? void 0 : e._lngLat) == null ? void 0 : n.lat], l.features = l.features.filter((R) => R.geometry.type === "Point"), this.handlePointUpdate(l);
|
|
8407
8413
|
}
|
|
8408
8414
|
},
|
|
8409
8415
|
handleContextmenu(b) {
|
|
@@ -8411,27 +8417,27 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8411
8417
|
b.preventDefault(), (z = this.contextmenu) == null || z.remove();
|
|
8412
8418
|
const M = (o = (p = (O = b.originalEvent) == null ? void 0 : O.target) == null ? void 0 : p.parentElement) == null ? void 0 : o.id;
|
|
8413
8419
|
if ((M == null ? void 0 : M.split("-").length) === 2) {
|
|
8414
|
-
const
|
|
8415
|
-
if (
|
|
8420
|
+
const q = this.geojson.filter((a) => a.id === M.split("-")[0])[0].features.filter((a) => a.geometry.type === "Point");
|
|
8421
|
+
if (q.length > 2 && q.filter((r) => r.properties.id === (M == null ? void 0 : M.split("-")[1]))[0]) {
|
|
8416
8422
|
const r = document.createElement("div");
|
|
8417
8423
|
r.className = "point-contextmenu-marker", r.innerHTML = `<span id="del-${M}" class="del-point">Del</span>`, this.contextmenu = new w0.Marker(r).setOffset([24, 0]).setLngLat([b.lngLat.lng, b.lngLat.lat]).addTo(this.map);
|
|
8418
8424
|
}
|
|
8419
8425
|
}
|
|
8420
8426
|
},
|
|
8421
8427
|
handleClick(b) {
|
|
8422
|
-
var z, O, p, o, A;
|
|
8428
|
+
var z, O, p, o, A, q;
|
|
8423
8429
|
(z = this.contextmenu) == null || z.remove();
|
|
8424
8430
|
const M = b.originalEvent.target.className;
|
|
8425
8431
|
if (M === "marker-close") {
|
|
8426
|
-
const a = (p = (O = b.originalEvent) == null ? void 0 : O.srcElement) == null ? void 0 : p.id,
|
|
8427
|
-
|
|
8432
|
+
const a = (p = (O = b.originalEvent) == null ? void 0 : O.srcElement) == null ? void 0 : p.id, r = this.geojson.filter((e) => e.id === a)[0];
|
|
8433
|
+
r && this.handleClear(r, !0), this.geojson = this.geojson.filter((e) => e.id !== a), !this.show && !((o = this.geojson) != null && o.some((e) => e.closed)) && this.handleUnbind();
|
|
8428
8434
|
} else if (M === "del-point") {
|
|
8429
|
-
const a = (
|
|
8430
|
-
|
|
8431
|
-
} else if (M !== "marker-label") {
|
|
8435
|
+
const a = (q = (A = b.originalEvent.target.id) == null ? void 0 : A.replace("del-", "")) == null ? void 0 : q.split("-"), r = this.geojson.filter((e) => e.id === a[0])[0];
|
|
8436
|
+
r.features = r.features.filter((e) => e.geometry.type === "Point" && e.properties.id !== a[1]), this.handlePointUpdate(r);
|
|
8437
|
+
} else if (M !== "marker-label" && this.show) {
|
|
8432
8438
|
let a = this.geojson.at(-1);
|
|
8433
|
-
a || (a = v.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(a)), a.features = a.features.filter((
|
|
8434
|
-
const
|
|
8439
|
+
a || (a = v.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(a)), a.features = a.features.filter((e) => e.geometry.type === "Point");
|
|
8440
|
+
const r = v.feature(
|
|
8435
8441
|
{
|
|
8436
8442
|
type: "Point",
|
|
8437
8443
|
coordinates: [b.lngLat.lng, b.lngLat.lat]
|
|
@@ -8441,7 +8447,7 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8441
8447
|
mode: this.navigation
|
|
8442
8448
|
}
|
|
8443
8449
|
);
|
|
8444
|
-
a.features.push(
|
|
8450
|
+
a.features.push(r), this.handlePointUpdate(a);
|
|
8445
8451
|
}
|
|
8446
8452
|
},
|
|
8447
8453
|
handlePointUpdate(b) {
|
|
@@ -8450,12 +8456,12 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8450
8456
|
let z = 0;
|
|
8451
8457
|
const O = [];
|
|
8452
8458
|
for (let p = 1; p < M.length; p++) {
|
|
8453
|
-
const o = M[p - 1], A = M[p],
|
|
8454
|
-
z = $.roundPrecision(z +
|
|
8459
|
+
const o = M[p - 1], A = M[p], q = o.properties, a = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, r = { lng: A.geometry.coordinates[0], lat: A.geometry.coordinates[1] }, e = N0.calculateDistance(a, r, q.mode === "RL", 2), n = N0.calculateBearing(a, r, q.mode === "RL", 2);
|
|
8460
|
+
z = $.roundPrecision(z + e, 2);
|
|
8455
8461
|
let l;
|
|
8456
|
-
|
|
8462
|
+
q.mode === "RL" ? l = $.convertToMonotonicLng([a, r]) : l = $.convertToMonotonicLng(N0.interpolateCoordinates(a, r, 200));
|
|
8457
8463
|
const d = v.lineString(l.map((B) => [B.lng, B.lat]));
|
|
8458
|
-
d.properties.dist =
|
|
8464
|
+
d.properties.dist = e, d.properties.bearing = n, d.properties.total = z, O.push(d);
|
|
8459
8465
|
}
|
|
8460
8466
|
M.push(...O), b.total = z;
|
|
8461
8467
|
}
|
|
@@ -8465,18 +8471,18 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8465
8471
|
const p = v.featureCollection([]);
|
|
8466
8472
|
let o, A;
|
|
8467
8473
|
if (M) {
|
|
8468
|
-
const
|
|
8469
|
-
o = N0.calculateDistance(r,
|
|
8474
|
+
const a = M.properties, r = { lng: M.geometry.coordinates[0], lat: M.geometry.coordinates[1] }, e = { lng: z.lng, lat: z.lat };
|
|
8475
|
+
o = N0.calculateDistance(r, e, a.mode === "RL", 2), A = N0.calculateBearing(r, e, a.mode === "RL", 2);
|
|
8470
8476
|
let n;
|
|
8471
|
-
|
|
8477
|
+
a.mode === "RL" ? n = $.convertToMonotonicLng([r, e]) : n = $.convertToMonotonicLng(N0.interpolateCoordinates(r, e, 200));
|
|
8472
8478
|
const l = v.lineString(n.map((d) => [d.lng, d.lat]));
|
|
8473
8479
|
l.properties.dist = o, l.properties.bearing = A, p.features.push(l);
|
|
8474
8480
|
}
|
|
8475
8481
|
if (O) {
|
|
8476
|
-
const
|
|
8477
|
-
o = N0.calculateDistance(r,
|
|
8482
|
+
const a = z.properties, r = z, e = { lng: O.geometry.coordinates[0], lat: O.geometry.coordinates[1] };
|
|
8483
|
+
o = N0.calculateDistance(r, e, a.mode === "RL", 2), A = N0.calculateBearing(r, e, a.mode === "RL", 2);
|
|
8478
8484
|
let n;
|
|
8479
|
-
|
|
8485
|
+
a.mode === "RL" ? n = $.convertToMonotonicLng([r, e]) : n = $.convertToMonotonicLng(N0.interpolateCoordinates(r, e, 200));
|
|
8480
8486
|
const l = v.lineString(n.map((d) => [d.lng, d.lat]));
|
|
8481
8487
|
l.properties.dist = o, l.properties.bearing = A, p.features.push(l);
|
|
8482
8488
|
}
|
|
@@ -8517,12 +8523,12 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8517
8523
|
"text-halo-blur": 0
|
|
8518
8524
|
}
|
|
8519
8525
|
});
|
|
8520
|
-
let
|
|
8521
|
-
if (O ?
|
|
8522
|
-
this.tipMarker._element.innerHTML =
|
|
8526
|
+
let q;
|
|
8527
|
+
if (O ? q = '<div class="marker-label">Drag and drop</div>' : q = `<div class="marker-label">Total distance: <b>${$.roundPrecision((b.total ?? 0) + o, 2)}</b>nm, bearing: <b>${A}</b>°</div><div class="marker-label">${this.navigation === "RL" ? "RL" : "GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`, this.tipMarker)
|
|
8528
|
+
this.tipMarker._element.innerHTML = q, this.tipMarker.setLngLat([z.lng, z.lat]);
|
|
8523
8529
|
else {
|
|
8524
|
-
const
|
|
8525
|
-
|
|
8530
|
+
const a = document.createElement("div");
|
|
8531
|
+
a.className = "tip-marker", a.innerHTML = q, this.tipMarker = new w0.Marker(a).setOffset([140, 0]).setLngLat([z.lng, z.lat]).addTo(this.map);
|
|
8526
8532
|
}
|
|
8527
8533
|
},
|
|
8528
8534
|
handleMove(b) {
|
|
@@ -8578,21 +8584,21 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
|
|
|
8578
8584
|
});
|
|
8579
8585
|
const o = b.features.filter((A) => A.geometry.type === "Point");
|
|
8580
8586
|
for (const A of o) {
|
|
8581
|
-
const
|
|
8582
|
-
|
|
8583
|
-
const
|
|
8584
|
-
|
|
8587
|
+
const q = document.createElement("div");
|
|
8588
|
+
q.id = `${b.id}-${A.properties.id}`, q.className = `${b.closed ? "point-marker closed" : "point-marker"}`, q.innerHTML = '<div class="marker-circle"></div>';
|
|
8589
|
+
const a = new w0.Marker({ element: q, draggable: !0, contextmenu: !0 }).setLngLat(A.geometry.coordinates).addTo(this.map);
|
|
8590
|
+
a.on("drag", this.handleDrag), a.on("dragend", this.handleDragEnd), this.pointMarkers[b.id] ? this.pointMarkers[b.id].push(a) : this.pointMarkers[b.id] = [a];
|
|
8585
8591
|
}
|
|
8586
8592
|
if (b.closed) {
|
|
8587
|
-
const A = o.at(-1),
|
|
8588
|
-
r.className = "point-summary-marker", r.innerHTML = `<div id="${b.id}" class="marker-close">×</div><div class="marker-label">Tol: ${
|
|
8593
|
+
const A = o.at(-1), a = b.features.filter((e) => e.geometry.type === "LineString").at(-1), r = document.createElement("div");
|
|
8594
|
+
r.className = "point-summary-marker", r.innerHTML = `<div id="${b.id}" class="marker-close">×</div><div class="marker-label">Tol: ${a.properties.total}nm</div>`, this.closeMarkers[b.id] = new w0.Marker(r).setOffset([60, 0]).setLngLat(A.geometry.coordinates).addTo(this.map);
|
|
8589
8595
|
}
|
|
8590
8596
|
}
|
|
8591
8597
|
},
|
|
8592
8598
|
handleClear(b, M = !0) {
|
|
8593
|
-
var o, A,
|
|
8599
|
+
var o, A, q, a, r, e, n, l, d;
|
|
8594
8600
|
const z = `${b.id}-${this.source}`, O = `${b.id}-${this.layer}`, p = `${b.id}-${this.labelLayer}`;
|
|
8595
|
-
(o = this.map) != null && o.getLayer(O) && this.map.removeLayer(O), (A = this.map) != null && A.getLayer(p) && this.map.removeLayer(p), (
|
|
8601
|
+
(o = this.map) != null && o.getLayer(O) && this.map.removeLayer(O), (A = this.map) != null && A.getLayer(p) && this.map.removeLayer(p), (q = this.map) != null && q.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (a = this.map) != null && a.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (r = this.closeMarkers[b.id]) == null || r.remove(), this.closeMarkers[b.id] = void 0, (e = this.pointMarkers[b.id]) == null || e.forEach((B) => {
|
|
8596
8602
|
B == null || B.remove();
|
|
8597
8603
|
}), this.pointMarkers[b.id] = [], (n = this.tipMarker) == null || n.remove(), this.tipMarker = void 0, M && ((l = this.map) != null && l.getSource(z)) && this.map.removeSource(z), M && ((d = this.map) != null && d.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
8598
8604
|
}
|
|
@@ -8672,7 +8678,7 @@ function oz(b, M, z, O, p, o) {
|
|
|
8672
8678
|
default: a0(() => [
|
|
8673
8679
|
c("div", {
|
|
8674
8680
|
class: U(p.vendor === "hi" ? "menu-icon active" : "menu-icon"),
|
|
8675
|
-
onClick: M[0] || (M[0] = (
|
|
8681
|
+
onClick: M[0] || (M[0] = (q) => p.vendor = "hi")
|
|
8676
8682
|
}, M[2] || (M[2] = [
|
|
8677
8683
|
c("span", { class: "iconfont" }, "HI", -1)
|
|
8678
8684
|
]), 2)
|
|
@@ -8688,7 +8694,7 @@ function oz(b, M, z, O, p, o) {
|
|
|
8688
8694
|
default: a0(() => [
|
|
8689
8695
|
c("div", {
|
|
8690
8696
|
class: U(p.vendor === "i4" ? "menu-icon active" : "menu-icon"),
|
|
8691
|
-
onClick: M[1] || (M[1] = (
|
|
8697
|
+
onClick: M[1] || (M[1] = (q) => p.vendor = "i4")
|
|
8692
8698
|
}, M[3] || (M[3] = [
|
|
8693
8699
|
c("span", { class: "iconfont" }, "I4", -1)
|
|
8694
8700
|
]), 2)
|
|
@@ -8864,16 +8870,16 @@ const az = {
|
|
|
8864
8870
|
},
|
|
8865
8871
|
enc: {
|
|
8866
8872
|
handler(b, M) {
|
|
8867
|
-
var z, O, p, o, A,
|
|
8868
|
-
b ? ((O = (z = this.map) == null ? void 0 : z.getLayer(b)) == null || O.setLayoutProperty("visibility", "visible"), (o = (p = this.map) == null ? void 0 : p.getLayer(M)) == null || o.setLayoutProperty("visibility", "none")) : ((
|
|
8873
|
+
var z, O, p, o, A, q, a, r;
|
|
8874
|
+
b ? ((O = (z = this.map) == null ? void 0 : z.getLayer(b)) == null || O.setLayoutProperty("visibility", "visible"), (o = (p = this.map) == null ? void 0 : p.getLayer(M)) == null || o.setLayoutProperty("visibility", "none")) : ((q = (A = this.map) == null ? void 0 : A.getLayer("i4")) == null || q.setLayoutProperty("visibility", "none"), (r = (a = this.map) == null ? void 0 : a.getLayer("hi")) == null || r.setLayoutProperty("visibility", "none"));
|
|
8869
8875
|
}
|
|
8870
8876
|
},
|
|
8871
8877
|
activeWeatherLayers: {
|
|
8872
8878
|
handler() {
|
|
8873
|
-
var b, M, z, O, p, o, A,
|
|
8879
|
+
var b, M, z, O, p, o, A, q, a, r, e, n, l, d;
|
|
8874
8880
|
if (!this.map)
|
|
8875
8881
|
return !1;
|
|
8876
|
-
this.activeWeatherLayers.length > 0 ? ((M = (b = this.map) == null ? void 0 : b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || M.setLayoutProperty("visibility", "visible"), (O = this.map) != null && O.getLayer((z = this.viewport) == null ? void 0 : z.rampColorLayer) && ((p = this.map) != null && p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((A = this.map) == null || A.moveLayer((o = this.viewport) == null ? void 0 : o.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (
|
|
8882
|
+
this.activeWeatherLayers.length > 0 ? ((M = (b = this.map) == null ? void 0 : b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || M.setLayoutProperty("visibility", "visible"), (O = this.map) != null && O.getLayer((z = this.viewport) == null ? void 0 : z.rampColorLayer) && ((p = this.map) != null && p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((A = this.map) == null || A.moveLayer((o = this.viewport) == null ? void 0 : o.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (a = this.map) != null && a.getLayer((q = this.viewport) == null ? void 0 : q.particleLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((n = this.map) == null || n.moveLayer((e = this.viewport) == null ? void 0 : e.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : (d = (l = this.map) == null ? void 0 : l.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || d.setLayoutProperty("visibility", "none"), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
|
|
8877
8883
|
},
|
|
8878
8884
|
immediate: !0
|
|
8879
8885
|
},
|
|
@@ -8925,7 +8931,7 @@ const az = {
|
|
|
8925
8931
|
},
|
|
8926
8932
|
methods: {
|
|
8927
8933
|
async fetchWeatherLayers(b = { tropicals: !1 }) {
|
|
8928
|
-
var p, o, A,
|
|
8934
|
+
var p, o, A, q, a, r, e, n;
|
|
8929
8935
|
const M = (/* @__PURE__ */ new Date()).valueOf();
|
|
8930
8936
|
let z = 0, O = 0;
|
|
8931
8937
|
if (this.map) {
|
|
@@ -8946,7 +8952,7 @@ const az = {
|
|
|
8946
8952
|
}
|
|
8947
8953
|
});
|
|
8948
8954
|
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + z), console.log("weather links elapsed: ", O, ", total: ", z += O), ((A = h == null ? void 0 : h.data) == null ? void 0 : A.code) === 0) {
|
|
8949
|
-
const m = (
|
|
8955
|
+
const m = (q = h == null ? void 0 : h.data) == null ? void 0 : q.data, X = [];
|
|
8950
8956
|
for (const y in m)
|
|
8951
8957
|
y === "ice-edge" && (m[y] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), y !== "tropicals" && X.push(
|
|
8952
8958
|
f0.get(m[y], {
|
|
@@ -8987,7 +8993,7 @@ const az = {
|
|
|
8987
8993
|
});
|
|
8988
8994
|
}
|
|
8989
8995
|
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + z), console.log("weather layers elapsed: ", O, ", total: ", z += O), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
|
|
8990
|
-
const m = (
|
|
8996
|
+
const m = (a = this.weatherLayers["swell-direction"]) == null ? void 0 : a.raw, X = (r = this.weatherLayers["swell-height"]) == null ? void 0 : r.raw;
|
|
8991
8997
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
8992
8998
|
type: "json",
|
|
8993
8999
|
direction: m,
|
|
@@ -8996,7 +9002,7 @@ const az = {
|
|
|
8996
9002
|
};
|
|
8997
9003
|
}
|
|
8998
9004
|
if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
|
|
8999
|
-
const m = (
|
|
9005
|
+
const m = (e = this.weatherLayers["current-direction"]) == null ? void 0 : e.raw, X = (n = this.weatherLayers["current-speed"]) == null ? void 0 : n.raw;
|
|
9000
9006
|
delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
|
|
9001
9007
|
type: "json",
|
|
9002
9008
|
direction: m,
|
|
@@ -9016,18 +9022,18 @@ const az = {
|
|
|
9016
9022
|
if (this.map) {
|
|
9017
9023
|
let o = this.otherWeight;
|
|
9018
9024
|
if (o) {
|
|
9019
|
-
let A = !1,
|
|
9020
|
-
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, A = !0), this.otherWeight & 8192 && (o = o - 8192,
|
|
9025
|
+
let A = !1, q = !1;
|
|
9026
|
+
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, A = !0), this.otherWeight & 8192 && (o = o - 8192, q = !0), o) {
|
|
9021
9027
|
if (b.all) {
|
|
9022
|
-
const
|
|
9028
|
+
const a = await f0.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
|
|
9023
9029
|
headers: {
|
|
9024
9030
|
Authorization: this.token || this.defaultMeteoToken
|
|
9025
9031
|
}
|
|
9026
9032
|
});
|
|
9027
|
-
if (((M =
|
|
9028
|
-
const r = (z =
|
|
9033
|
+
if (((M = a == null ? void 0 : a.data) == null ? void 0 : M.code) === 0) {
|
|
9034
|
+
const r = (z = a == null ? void 0 : a.data) == null ? void 0 : z.data, e = [];
|
|
9029
9035
|
for (const l in r)
|
|
9030
|
-
|
|
9036
|
+
e.push(
|
|
9031
9037
|
f0.get(r[l], {
|
|
9032
9038
|
headers: {
|
|
9033
9039
|
Authorization: this.token || this.defaultMeteoToken,
|
|
@@ -9035,23 +9041,23 @@ const az = {
|
|
|
9035
9041
|
}
|
|
9036
9042
|
})
|
|
9037
9043
|
);
|
|
9038
|
-
const n = await Promise.all(
|
|
9039
|
-
this.otherLayers = { enc: A, world12nm:
|
|
9044
|
+
const n = await Promise.all(e);
|
|
9045
|
+
this.otherLayers = { enc: A, world12nm: q }, n.map((l) => {
|
|
9040
9046
|
var R, f, h;
|
|
9041
9047
|
const d = ((R = l == null ? void 0 : l.data) == null ? void 0 : R.data) || (l == null ? void 0 : l.data), B = (h = (f = l == null ? void 0 : l.config) == null ? void 0 : f.headers) == null ? void 0 : h.key;
|
|
9042
9048
|
this.otherLayers[B] = d;
|
|
9043
9049
|
});
|
|
9044
9050
|
}
|
|
9045
9051
|
} else if (b.dayNight && o & 1024) {
|
|
9046
|
-
const
|
|
9052
|
+
const a = await f0.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
|
|
9047
9053
|
headers: {
|
|
9048
9054
|
Authorization: this.token || this.defaultMeteoToken
|
|
9049
9055
|
}
|
|
9050
9056
|
});
|
|
9051
|
-
if (((O =
|
|
9052
|
-
const r = (p =
|
|
9057
|
+
if (((O = a == null ? void 0 : a.data) == null ? void 0 : O.code) === 0) {
|
|
9058
|
+
const r = (p = a == null ? void 0 : a.data) == null ? void 0 : p.data, e = [];
|
|
9053
9059
|
for (const l in r)
|
|
9054
|
-
|
|
9060
|
+
e.push(
|
|
9055
9061
|
f0.get(r[l], {
|
|
9056
9062
|
headers: {
|
|
9057
9063
|
Authorization: this.token || this.defaultMeteoToken,
|
|
@@ -9059,7 +9065,7 @@ const az = {
|
|
|
9059
9065
|
}
|
|
9060
9066
|
})
|
|
9061
9067
|
);
|
|
9062
|
-
(await Promise.all(
|
|
9068
|
+
(await Promise.all(e)).map((l) => {
|
|
9063
9069
|
var R, f, h;
|
|
9064
9070
|
const d = ((R = l == null ? void 0 : l.data) == null ? void 0 : R.data) || (l == null ? void 0 : l.data), B = (h = (f = l == null ? void 0 : l.config) == null ? void 0 : f.headers) == null ? void 0 : h.key;
|
|
9065
9071
|
this.otherLayers[B] = d;
|
|
@@ -9067,7 +9073,7 @@ const az = {
|
|
|
9067
9073
|
}
|
|
9068
9074
|
}
|
|
9069
9075
|
} else
|
|
9070
|
-
this.otherLayers = { enc: A, world12nm:
|
|
9076
|
+
this.otherLayers = { enc: A, world12nm: q };
|
|
9071
9077
|
} else
|
|
9072
9078
|
this.otherLayers = {};
|
|
9073
9079
|
this.handleBeforeLayerToggle();
|
|
@@ -9083,7 +9089,7 @@ const az = {
|
|
|
9083
9089
|
this.activeWindLayer = !!this.activeWeatherLayers.find((M) => M.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
9084
9090
|
},
|
|
9085
9091
|
handleRampColorInitial() {
|
|
9086
|
-
var b, M, z, O, p, o, A,
|
|
9092
|
+
var b, M, z, O, p, o, A, q, a, r, e, n;
|
|
9087
9093
|
this.viewport.map.getSource((b = this.viewport) == null ? void 0 : b.rampColorSource) || this.viewport.map.addSource((M = this.viewport) == null ? void 0 : M.rampColorSource, {
|
|
9088
9094
|
type: "canvas",
|
|
9089
9095
|
canvas: (z = this.viewport) == null ? void 0 : z.rampColorCanvas,
|
|
@@ -9099,15 +9105,15 @@ const az = {
|
|
|
9099
9105
|
}
|
|
9100
9106
|
},
|
|
9101
9107
|
this.beforeLayer
|
|
9102
|
-
), this.viewport.map.getSource((A = this.viewport) == null ? void 0 : A.particleSource) || this.viewport.map.addSource((
|
|
9108
|
+
), this.viewport.map.getSource((A = this.viewport) == null ? void 0 : A.particleSource) || this.viewport.map.addSource((q = this.viewport) == null ? void 0 : q.particleSource, {
|
|
9103
9109
|
type: "canvas",
|
|
9104
|
-
canvas: (
|
|
9110
|
+
canvas: (a = this.viewport) == null ? void 0 : a.particleCanvas,
|
|
9105
9111
|
animate: !0,
|
|
9106
9112
|
coordinates: this.viewport.getBoundLngLat()
|
|
9107
9113
|
}), this.viewport.map.getLayer((r = this.viewport) == null ? void 0 : r.particleLayer) || this.viewport.map.addLayer(
|
|
9108
9114
|
{
|
|
9109
9115
|
type: "raster",
|
|
9110
|
-
id: (
|
|
9116
|
+
id: (e = this.viewport) == null ? void 0 : e.particleLayer,
|
|
9111
9117
|
source: (n = this.viewport) == null ? void 0 : n.particleSource,
|
|
9112
9118
|
layout: {
|
|
9113
9119
|
visibility: "none"
|
|
@@ -9117,18 +9123,18 @@ const az = {
|
|
|
9117
9123
|
);
|
|
9118
9124
|
},
|
|
9119
9125
|
handleDragEndWithZoom4Json() {
|
|
9120
|
-
var r,
|
|
9126
|
+
var r, e, n, l;
|
|
9121
9127
|
const b = (/* @__PURE__ */ new Date()).valueOf();
|
|
9122
9128
|
let M = 0, z = 0;
|
|
9123
|
-
const O = (r = this.map) == null ? void 0 : r.getBounds(), p = this.map.getZoom(), o = $.convertToStdLng(O._sw.lng), A = $.convertToStdLng(O._ne.lng),
|
|
9129
|
+
const O = (r = this.map) == null ? void 0 : r.getBounds(), p = this.map.getZoom(), o = $.convertToStdLng(O._sw.lng), A = $.convertToStdLng(O._ne.lng), q = Math.floor(O._sw.lat), a = Math.ceil(O._ne.lat);
|
|
9124
9130
|
for (const d in this.weatherLayers)
|
|
9125
9131
|
if (this.weatherLayers[d].active && this.weatherLayers[d].type === "json") {
|
|
9126
9132
|
this.weatherLayers[d].active = !1, this.weatherLayers[d].version = Math.random() + 1;
|
|
9127
9133
|
let B = [];
|
|
9128
9134
|
if (["swell", "current"].includes(d)) {
|
|
9129
|
-
const R = ((
|
|
9135
|
+
const R = ((e = this.weatherLayers[d]) == null ? void 0 : e.direction) || {};
|
|
9130
9136
|
for (const f in R)
|
|
9131
|
-
if (f >
|
|
9137
|
+
if (f > q && f < a && (!(p <= this.zoom) || f % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
9132
9138
|
const h = R[f].lng;
|
|
9133
9139
|
o > A ? h.forEach((m, X) => {
|
|
9134
9140
|
var E;
|
|
@@ -9196,7 +9202,7 @@ const az = {
|
|
|
9196
9202
|
} else if (d === "wind") {
|
|
9197
9203
|
const R = this.weatherLayers.wind.raw;
|
|
9198
9204
|
for (const f in R)
|
|
9199
|
-
if (f >
|
|
9205
|
+
if (f > q && f < a && (!(p <= this.zoom) || f % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
9200
9206
|
const h = R[f].lng;
|
|
9201
9207
|
o > A ? h.forEach((m, X) => {
|
|
9202
9208
|
if ((m >= o && m <= 180 || m >= -180 && m <= A) && (!(p <= this.zoom) || m % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
@@ -9308,11 +9314,11 @@ const az = {
|
|
|
9308
9314
|
return b.features.forEach((o) => {
|
|
9309
9315
|
if (o.geometry.type !== "Point")
|
|
9310
9316
|
if (O > p) {
|
|
9311
|
-
let A = [O, M._sw.lat, 180, M._ne.lat],
|
|
9312
|
-
|
|
9317
|
+
let A = [O, M._sw.lat, 180, M._ne.lat], q = v.bboxClip(o, A);
|
|
9318
|
+
q.geometry.coordinates.length && z.push(q), A = [-180, M._sw.lat, p, M._ne.lat], q = v.bboxClip(o, A), q.geometry.coordinates.length && z.push(q);
|
|
9313
9319
|
} else {
|
|
9314
|
-
const A = [O, M._sw.lat, p, M._ne.lat],
|
|
9315
|
-
|
|
9320
|
+
const A = [O, M._sw.lat, p, M._ne.lat], q = v.bboxClip(o, A);
|
|
9321
|
+
q.geometry.coordinates.length && z.push(q);
|
|
9316
9322
|
}
|
|
9317
9323
|
else
|
|
9318
9324
|
z.push(o);
|
|
@@ -9329,8 +9335,8 @@ const az = {
|
|
|
9329
9335
|
this.handleBeforeLayerToggle();
|
|
9330
9336
|
},
|
|
9331
9337
|
handleBeforeLayerToggle() {
|
|
9332
|
-
var b, M, z, O, p, o, A,
|
|
9333
|
-
(b = this.map) != null && b.getLayer(this.beforeLayer) && ((M = this.activeWeatherLayers) != null && M.length || (z = this.otherLayers) != null && z["war-zones"] || (O = this.otherLayers) != null && O["gmdss-areas"] || (p = this.otherLayers) != null && p["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (A = this.otherLayers) != null && A["time-zones"] || (
|
|
9338
|
+
var b, M, z, O, p, o, A, q, a, r, e, n, l, d;
|
|
9339
|
+
(b = this.map) != null && b.getLayer(this.beforeLayer) && ((M = this.activeWeatherLayers) != null && M.length || (z = this.otherLayers) != null && z["war-zones"] || (O = this.otherLayers) != null && O["gmdss-areas"] || (p = this.otherLayers) != null && p["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (A = this.otherLayers) != null && A["time-zones"] || (q = this.otherLayers) != null && q.pirates || (a = this.otherLayers) != null && a.ports || (r = this.otherLayers) != null && r.enc || (e = this.otherLayers) != null && e.world12nm || (n = this.otherLayers) != null && n["voluntary-reporting-area"] || (l = this.otherLayers) != null && l["eca-zones"] || (d = this.otherLayers) != null && d["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
9334
9340
|
},
|
|
9335
9341
|
handleDateChange(b = { tropicals: !1 }) {
|
|
9336
9342
|
this.fetchWeatherLayers(b), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -9341,7 +9347,7 @@ const az = {
|
|
|
9341
9347
|
const z = this.activeWeatherLayers.some(
|
|
9342
9348
|
(o) => {
|
|
9343
9349
|
var A;
|
|
9344
|
-
return ["wind", "current"].includes(o.key) && (!((A = Object.keys(o)) != null && A.some((
|
|
9350
|
+
return ["wind", "current"].includes(o.key) && (!((A = Object.keys(o)) != null && A.some((q) => q === "particle")) || !!o.particle);
|
|
9345
9351
|
}
|
|
9346
9352
|
), O = this.activeWeatherLayers.some((o) => ["png", "jpg"].includes(o.type));
|
|
9347
9353
|
z && !O ? (this.activeWeatherLayers.forEach((o) => {
|
|
@@ -9364,8 +9370,8 @@ const az = {
|
|
|
9364
9370
|
}
|
|
9365
9371
|
},
|
|
9366
9372
|
handle3dToggle(b) {
|
|
9367
|
-
var M, z, O, p, o, A,
|
|
9368
|
-
b ? (this.map.setProjection("globe"), this.mapProjection = "globe", (z = this.map) != null && z.getLayer((M = this.viewport) == null ? void 0 : M.rampColorLayer) && ((O = this.map) != null && O.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (
|
|
9373
|
+
var M, z, O, p, o, A, q, a, r, e, n, l, d, B, R, f, h, m, X, E;
|
|
9374
|
+
b ? (this.map.setProjection("globe"), this.mapProjection = "globe", (z = this.map) != null && z.getLayer((M = this.viewport) == null ? void 0 : M.rampColorLayer) && ((O = this.map) != null && O.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (q = this.map) != null && q.getLayer((A = this.viewport) == null ? void 0 : A.particleLayer) && ((a = this.map) != null && a.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((e = this.map) == null || e.moveLayer((r = this.viewport) == null ? void 0 : r.particleLayer, this.helper.mapboxCustomer.layers.water.id)), this.map.off("zoomend", this.handleDragEndWithZoom4Json), this.map.off("dragend", this.handleDragEndWithZoom4Json), this.map.off("move", this.handleDragEndWithZoom4Image)) : (this.map.setProjection("mercator"), this.mapProjection = "mercator", this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.handleDragEndWithZoom4Image(), this.handleDragEndWithZoom4Json(), (l = this.map) != null && l.getLayer((n = this.viewport) == null ? void 0 : n.rampColorLayer) && ((d = this.map) != null && d.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((R = this.map) == null || R.moveLayer((B = this.viewport) == null ? void 0 : B.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (h = this.map) != null && h.getLayer((f = this.viewport) == null ? void 0 : f.particleLayer) && ((m = this.map) != null && m.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((E = this.map) == null || E.moveLayer((X = this.viewport) == null ? void 0 : X.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
9369
9375
|
},
|
|
9370
9376
|
handleParticle(b) {
|
|
9371
9377
|
this.particleFactor = b, this.weatherLayers[b.key] && (this.weatherLayers[b.key].particle = b.particle), this.activeWeatherLayers.map((O) => {
|
|
@@ -9389,8 +9395,8 @@ const az = {
|
|
|
9389
9395
|
className: "map-gl-home"
|
|
9390
9396
|
};
|
|
9391
9397
|
function iz(b, M, z, O, p, o) {
|
|
9392
|
-
var r0, d0, g0, s0, P, M0, e0, I, b0, W0, l0, R0, o0,
|
|
9393
|
-
const A = x("IdmGlLayer"),
|
|
9398
|
+
var r0, d0, g0, s0, P, M0, e0, I, b0, W0, l0, R0, o0, t, i, L, N, w, D, Z, S, G, x0, k0, Q0, H0, _0;
|
|
9399
|
+
const A = x("IdmGlLayer"), q = x("IdmENC"), a = x("IdmWorld12nm"), r = x("IdmSigWave"), e = x("IdmSwell"), n = x("IdmPrmsl"), l = x("IdmIceberg"), d = x("IdmTropicals"), B = x("IdmCurrents"), R = x("IdmCurrentParticle"), f = x("IdmWindBarb"), h = x("IdmWindParticle"), m = x("IdmPrecip3h"), X = x("IdmVisibility"), E = x("IdmWaterTemp"), y = x("IdmTemp"), F = x("IdmArctic"), J = x("IdmWarZone"), V = x("IdmGmdssArea"), u = x("IdmEcaZone"), g = x("IdmAlertZone"), A0 = x("IdmPort"), n0 = x("IdmLoadLine"), h0 = x("IdmTimezone"), i0 = x("IdmVRA"), u0 = x("IdmSpecialArea"), p0 = x("IdmTerminator"), m0 = x("IdmLatLng"), B0 = x("IdmMeasure"), L0 = x("IdmPoint");
|
|
9394
9400
|
return z.map ? (s(), W("div", qz, [
|
|
9395
9401
|
T(A, Q({
|
|
9396
9402
|
ref: "layer",
|
|
@@ -9417,7 +9423,7 @@ function iz(b, M, z, O, p, o) {
|
|
|
9417
9423
|
on3d: o.handle3dToggle,
|
|
9418
9424
|
onHandleToggleVersion: o.handleToggleVersion
|
|
9419
9425
|
}), null, 16, ["map", "toggle-version", "map-projection", "showWindFeather", "showWindParticle", "showCurrentIsoband", "showCurrentParticle", "token", "gateway", "forecastModel", "onWeather", "onOther", "on3d", "onHandleToggleVersion"]),
|
|
9420
|
-
T(
|
|
9426
|
+
T(q, Q({
|
|
9421
9427
|
map: z.map,
|
|
9422
9428
|
token: z.token,
|
|
9423
9429
|
enabled: (r0 = p.otherLayers) == null ? void 0 : r0.enc,
|
|
@@ -9425,7 +9431,7 @@ function iz(b, M, z, O, p, o) {
|
|
|
9425
9431
|
}, b.$attrs, {
|
|
9426
9432
|
onEnc: M[7] || (M[7] = (t0) => p.enc = t0)
|
|
9427
9433
|
}), null, 16, ["map", "token", "enabled", "toggle-version"]),
|
|
9428
|
-
T(
|
|
9434
|
+
T(a, Q({
|
|
9429
9435
|
map: z.map,
|
|
9430
9436
|
token: z.token,
|
|
9431
9437
|
"weather-layers": p.weatherLayers,
|
|
@@ -9437,7 +9443,7 @@ function iz(b, M, z, O, p, o) {
|
|
|
9437
9443
|
"before-layer": z.beforeLayer,
|
|
9438
9444
|
activeWeatherLayers: p.activeWeatherLayers
|
|
9439
9445
|
}, b.$attrs), null, 16, ["map", "sig-wave", "before-layer", "activeWeatherLayers"]),
|
|
9440
|
-
T(
|
|
9446
|
+
T(e, Q({
|
|
9441
9447
|
map: z.map,
|
|
9442
9448
|
swell: (s0 = p.weatherLayers) == null ? void 0 : s0.swell,
|
|
9443
9449
|
"before-layer": z.beforeLayer,
|
|
@@ -9509,7 +9515,7 @@ function iz(b, M, z, O, p, o) {
|
|
|
9509
9515
|
}, b.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9510
9516
|
T(X, Q({
|
|
9511
9517
|
viewport: p.viewport,
|
|
9512
|
-
factor: (
|
|
9518
|
+
factor: (t = p.weatherLayers) == null ? void 0 : t.visibility,
|
|
9513
9519
|
"before-layer": z.beforeLayer,
|
|
9514
9520
|
"toggle-version": z.toggleVersion
|
|
9515
9521
|
}, b.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|