@idmwx/idmui-gl3 4.8.7 → 4.8.9
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 +212 -202
- package/dist/index.umd.cjs +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -80,7 +80,7 @@ const k = (z, M) => {
|
|
|
80
80
|
showPoint: !1,
|
|
81
81
|
show3d: !1,
|
|
82
82
|
version: {
|
|
83
|
-
v: "0.0.
|
|
83
|
+
v: "0.0.8",
|
|
84
84
|
k: "glCacheVersion"
|
|
85
85
|
},
|
|
86
86
|
source: "",
|
|
@@ -126,11 +126,17 @@ const k = (z, M) => {
|
|
|
126
126
|
let M = localStorage.getItem(this.autoActiveCache);
|
|
127
127
|
this.autoActive = M !== "false", M = localStorage.getItem(this.collectedLayerCache);
|
|
128
128
|
let b = JSON.parse(
|
|
129
|
-
M || '[{"weight": 16, "name": "Sig Waves", "key": "sig-wave-height", "collected": true},{"weight": 1, "name": "Wind", "key": "wind", "h5": true, "collected": true},{"weight": 96, "name": "Current", "key": "current", "collected": true},{"weight":
|
|
129
|
+
M || '[{"weight": 16, "name": "Sig Waves", "key": "sig-wave-height", "collected": true},{"weight": 1, "name": "Wind", "key": "wind", "h5": true, "collected": true},{"weight": 96, "name": "Current", "key": "current", "collected": true},{"weight": 256,"name": "Tropicals","key": "tropicals", "collected": true}]'
|
|
130
130
|
);
|
|
131
131
|
this.layers.weather.forEach((O) => {
|
|
132
132
|
O.collected = !!b.some((p) => p.key === O.key && p.collected);
|
|
133
|
-
}), M = localStorage.getItem(this.activeWeatherLayersCache), M || localStorage.setItem(this.activeWeatherLayersCache, JSON.stringify(
|
|
133
|
+
}), M = localStorage.getItem(this.activeWeatherLayersCache), M || localStorage.setItem(this.activeWeatherLayersCache, JSON.stringify(
|
|
134
|
+
[
|
|
135
|
+
{ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 },
|
|
136
|
+
{ weight: 4096, name: "Pressure", key: "prmsl", enabled: !0, type: "json" },
|
|
137
|
+
{ weight: 256, name: "Tropicals", key: "tropicals", enabled: !0, type: "json" }
|
|
138
|
+
]
|
|
139
|
+
)), M = localStorage.getItem(this.activeWeatherLayersCache), b = JSON.parse(M), this.autoActive && (this.activeWeatherLayers = [...b]), b.some((O) => O.key === "wind" && O.particle) && this.$emit("toggleWindParticle", !0), localStorage.getItem(this.windFeatherCache) === "true" && this.$emit("toggleWindFeather", !0), b.some((O) => O.key === "current" && O.particle) && this.$emit("toggleCurrentParticle", !0), localStorage.getItem(this.currentIsobandCache) === "true" && this.$emit("toggleCurrentIsoband", !0), M = localStorage.getItem(this.activeOtherLayersCache), b = JSON.parse(M || '[{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}, {"weight": 2048,"name": "ENC","key": "enc","h5": true,"enabled": true,"type": "origin"}]'), this.activeOtherLayers = b, M = localStorage.getItem(this.sourceCache), this.source = M || "GFS";
|
|
134
140
|
},
|
|
135
141
|
handleConfirm() {
|
|
136
142
|
this.$emit("weather", this.activeWeatherLayers, this.source), this.$emit("other", this.activeOtherLayers), localStorage.setItem(this.autoActiveCache, this.autoActive), localStorage.setItem(this.sourceCache, this.source);
|
|
@@ -324,7 +330,7 @@ function T1(z, M, b, O, p, o) {
|
|
|
324
330
|
style: o0({ right: p.right + "px", bottom: "100px" })
|
|
325
331
|
}, [
|
|
326
332
|
c("div", p1, [
|
|
327
|
-
M[22] || (M[22] = c("div", { style: { margin: "2px 5px" } }, "
|
|
333
|
+
M[22] || (M[22] = c("div", { style: { margin: "2px 5px" } }, "Weather Layers", -1)),
|
|
328
334
|
c("div", {
|
|
329
335
|
class: "switch flex-center",
|
|
330
336
|
style: { "font-size": "28px", "margin-right": "0" },
|
|
@@ -456,7 +462,7 @@ function T1(z, M, b, O, p, o) {
|
|
|
456
462
|
return l(), f("div", {
|
|
457
463
|
key: a.key,
|
|
458
464
|
class: Y(["layer flex-between", o.computeLayerClass(a, p.activeOtherLayers)]),
|
|
459
|
-
onClick: (
|
|
465
|
+
onClick: (s) => o.handleOtherLayerPick(a)
|
|
460
466
|
}, [
|
|
461
467
|
c("div", N1, [
|
|
462
468
|
c("div", y1, [
|
|
@@ -700,8 +706,8 @@ class D0 {
|
|
|
700
706
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
701
707
|
*/
|
|
702
708
|
getBoundPixel() {
|
|
703
|
-
const M = this.map.getBounds(), b = this.map.getZoom() + 1, O = [M._ne.lng, M._ne.lat], p = [M._sw.lng, M._sw.lat], [o, A] = this.convertNLng(O[0]), [t, q] = this.convertNLng(p[0]), [r, a] = this.mercator.px([o, O[1]], b), [n,
|
|
704
|
-
return [n,
|
|
709
|
+
const M = this.map.getBounds(), b = this.map.getZoom() + 1, O = [M._ne.lng, M._ne.lat], p = [M._sw.lng, M._sw.lat], [o, A] = this.convertNLng(O[0]), [t, q] = this.convertNLng(p[0]), [r, a] = this.mercator.px([o, O[1]], b), [n, s] = this.mercator.px([t, p[1]], b), d = Math.round(this.mercator.size * Math.pow(2, b) * (A + q));
|
|
710
|
+
return [n, s, r + d, a];
|
|
705
711
|
}
|
|
706
712
|
/**
|
|
707
713
|
* [视窗边界像素宽度]
|
|
@@ -872,14 +878,14 @@ class C0 {
|
|
|
872
878
|
if (b && O) {
|
|
873
879
|
M.resize(), b == null || b.viewport(0, 0, (q = b == null ? void 0 : b.canvas) == null ? void 0 : q.width, (r = b == null ? void 0 : b.canvas) == null ? void 0 : r.height), b.clearColor(0, 0, 0, 0), b.clear(b.COLOR_BUFFER_BIT | b.DEPTH_BUFFER_BIT);
|
|
874
880
|
try {
|
|
875
|
-
const a = b.getUniformLocation(O, "u_resolution"), n = b.getUniformLocation(O, "u_image"),
|
|
876
|
-
if (b.useProgram(O), b.uniform2f(a, b.canvas.width * M.ratio, b.canvas.height * M.ratio), b.activeTexture(b.TEXTURE0), b.bindTexture(b.TEXTURE_2D, p), b.uniform1i(n, 0), b.activeTexture(b.TEXTURE1), b.bindTexture(b.TEXTURE_2D, o), b.uniform1i(
|
|
877
|
-
const
|
|
878
|
-
b.uniform2f(
|
|
881
|
+
const a = b.getUniformLocation(O, "u_resolution"), n = b.getUniformLocation(O, "u_image"), s = b.getUniformLocation(O, "u_color");
|
|
882
|
+
if (b.useProgram(O), b.uniform2f(a, b.canvas.width * M.ratio, b.canvas.height * M.ratio), b.activeTexture(b.TEXTURE0), b.bindTexture(b.TEXTURE_2D, p), b.uniform1i(n, 0), b.activeTexture(b.TEXTURE1), b.bindTexture(b.TEXTURE_2D, o), b.uniform1i(s, 1), t != null && t.uvRange && (t != null && t.sRange)) {
|
|
883
|
+
const W = b.getUniformLocation(O, "u_range_u_v"), h = b.getUniformLocation(O, "u_range_s");
|
|
884
|
+
b.uniform2f(W, t.uvRange[0], t.uvRange[1]), b.uniform2f(h, t.sRange[0], t.sRange[1]);
|
|
879
885
|
}
|
|
880
886
|
const d = M.getBoundPixel(), m = M.map.getZoom() + 1, L = M.getWorldCopy(d, m);
|
|
881
|
-
for (const
|
|
882
|
-
const
|
|
887
|
+
for (const W of L) {
|
|
888
|
+
const h = (W[0] - d[0]) * M.ratio, R = (W[1] - d[3]) * M.ratio, y = W[2] * M.ratio, [T, N, H, K] = [h, y + h, R, y + R], V = new Float32Array([T, H, N, H, T, K, T, K, N, H, N, K]);
|
|
883
889
|
b.bindBuffer(b.ARRAY_BUFFER, A), b.bufferData(b.ARRAY_BUFFER, V, b.STATIC_DRAW), b.drawArrays(b.TRIANGLES, 0, 6);
|
|
884
890
|
}
|
|
885
891
|
} catch (a) {
|
|
@@ -1370,6 +1376,8 @@ class S1 {
|
|
|
1370
1376
|
id: "i4",
|
|
1371
1377
|
type: "raster",
|
|
1372
1378
|
source: "i4",
|
|
1379
|
+
minzoom: 3,
|
|
1380
|
+
maxzoom: 12,
|
|
1373
1381
|
layout: {
|
|
1374
1382
|
visibility: "none"
|
|
1375
1383
|
}
|
|
@@ -1393,6 +1401,8 @@ class S1 {
|
|
|
1393
1401
|
id: "hi",
|
|
1394
1402
|
type: "raster",
|
|
1395
1403
|
source: "hi",
|
|
1404
|
+
minZoom: 3,
|
|
1405
|
+
maxZoom: 12,
|
|
1396
1406
|
layout: {
|
|
1397
1407
|
visibility: "none"
|
|
1398
1408
|
}
|
|
@@ -3916,20 +3926,20 @@ const a2 = {
|
|
|
3916
3926
|
var r;
|
|
3917
3927
|
let A = 0, t;
|
|
3918
3928
|
const q = z.filter((a) => {
|
|
3919
|
-
var n,
|
|
3920
|
-
return ((
|
|
3929
|
+
var n, s;
|
|
3930
|
+
return ((s = (n = a.properties) == null ? void 0 : n.category) == null ? void 0 : s.split("-")[0]) === o;
|
|
3921
3931
|
});
|
|
3922
3932
|
(r = q.filter((a) => {
|
|
3923
|
-
var n,
|
|
3924
|
-
return ((n = a.geometry) == null ? void 0 : n.type) === "LineString" && ((
|
|
3933
|
+
var n, s;
|
|
3934
|
+
return ((n = a.geometry) == null ? void 0 : n.type) === "LineString" && ((s = a.properties) == null ? void 0 : s.type) === "forecast";
|
|
3925
3935
|
})[0]) == null || r.properties.model, q.forEach((a, n) => {
|
|
3926
|
-
var
|
|
3927
|
-
((
|
|
3936
|
+
var s, d, m, L, W, h;
|
|
3937
|
+
((s = a.geometry) == null ? void 0 : s.type) === "Point" && ((d = a.properties) == null ? void 0 : d.type) === "history" && (A = n, t = t === void 0 ? n : t), ((m = a.geometry) == null ? void 0 : m.type) === "Point" && ((L = a.properties) == null ? void 0 : L.type) === "forecast" && t === void 0 && (t = n), ((W = a.geometry) == null ? void 0 : W.type) === "LineString" && ((h = a.properties) == null || h.type);
|
|
3928
3938
|
}), q.map((a, n) => {
|
|
3929
|
-
var
|
|
3930
|
-
if (((
|
|
3939
|
+
var s, d, m, L, W, h, R;
|
|
3940
|
+
if (((s = a.geometry) == null ? void 0 : s.type) === "LineString" && ((d = a.properties) == null || d.type), ((m = a.geometry) == null ? void 0 : m.type) === "Point" && ((L = a.properties) == null ? void 0 : L.type) === "forecast" && (a.properties.name = o, a.properties.format = F(a.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((W = a.geometry) == null ? void 0 : W.type) === "Point" && ((h = a.properties) == null ? void 0 : h.type) === "history") {
|
|
3931
3941
|
a.properties.format = F(a.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
3932
|
-
const y = F((
|
|
3942
|
+
const y = F((R = a.properties) == null ? void 0 : R.date).utc().format("HHmm") === F().utc().hour(Math.floor(M / 6) * 6).minute("00").format("HHmm");
|
|
3933
3943
|
a.properties.showHistoryLabel = y || n === A, a.properties.showNameLabel = n === A, a.properties.name = o;
|
|
3934
3944
|
}
|
|
3935
3945
|
return a;
|
|
@@ -3975,8 +3985,8 @@ const a2 = {
|
|
|
3975
3985
|
else {
|
|
3976
3986
|
if (this.tropicals) {
|
|
3977
3987
|
const n = (/* @__PURE__ */ new Date()).valueOf();
|
|
3978
|
-
let
|
|
3979
|
-
(z = this.map) != null && z.getSource(this.source) ? ((b = this.map) == null || b.getSource(this.source).setData((M = this.tropicals) != null && M.active ? this.tropicals.data : this.empty), d = (/* @__PURE__ */ new Date()).valueOf() - (n +
|
|
3988
|
+
let s = 0, d = 0;
|
|
3989
|
+
(z = this.map) != null && z.getSource(this.source) ? ((b = this.map) == null || b.getSource(this.source).setData((M = this.tropicals) != null && M.active ? this.tropicals.data : this.empty), d = (/* @__PURE__ */ new Date()).valueOf() - (n + s), console.log("[tropicals] update elapsed: ", d, ", total: ", s += d)) : (this.map.addSource(this.source, {
|
|
3980
3990
|
type: "geojson",
|
|
3981
3991
|
data: (O = this.tropicals) != null && O.active ? (p = this.tropicals) == null ? void 0 : p.data : this.empty
|
|
3982
3992
|
}), this.map.addLayer({
|
|
@@ -4073,7 +4083,7 @@ const a2 = {
|
|
|
4073
4083
|
],
|
|
4074
4084
|
"text-halo-width": 4
|
|
4075
4085
|
}
|
|
4076
|
-
}), d = (/* @__PURE__ */ new Date()).valueOf() - (n +
|
|
4086
|
+
}), d = (/* @__PURE__ */ new Date()).valueOf() - (n + s), console.log("[tropical] add elapsed: ", d, ", total: ", s += d)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((t = this.map) == null || t.getSource(this.clusterSource).setData((A = this.tropicals) != null && A.active ? this.tropicals.data : this.empty), d = (/* @__PURE__ */ new Date()).valueOf() - (n + s), console.log("[tropical] update elapsed: ", d, ", total: ", s += d)) : (this.map.addSource(this.clusterSource, {
|
|
4077
4087
|
type: "geojson",
|
|
4078
4088
|
data: (q = this.tropicals) != null && q.active ? (r = this.tropicals) == null ? void 0 : r.data : this.empty
|
|
4079
4089
|
// cluster: true,
|
|
@@ -4190,7 +4200,7 @@ const a2 = {
|
|
|
4190
4200
|
"text-halo-color": "#0033ff",
|
|
4191
4201
|
"text-halo-width": 4
|
|
4192
4202
|
}
|
|
4193
|
-
}), d = (/* @__PURE__ */ new Date()).valueOf() - (n +
|
|
4203
|
+
}), d = (/* @__PURE__ */ new Date()).valueOf() - (n + s), console.log("[tropical] add elapsed: ", d, ", total: ", s += d));
|
|
4194
4204
|
}
|
|
4195
4205
|
this.handleDrawCircle();
|
|
4196
4206
|
const a = _0.interpolate(this.tropicals, 1);
|
|
@@ -4202,7 +4212,7 @@ const a2 = {
|
|
|
4202
4212
|
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), (z = this.interpolateMarkers) == null || z.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));
|
|
4203
4213
|
},
|
|
4204
4214
|
handleDateChange() {
|
|
4205
|
-
var z, M, b, O, p, o, A, t, q, r, a, n,
|
|
4215
|
+
var z, M, b, O, p, o, A, t, q, r, a, n, s, d, m, L, W, h, R, y, T, N, H, K, V, $, g, x, n0, d0, i0, u0, O0, h0, m0, L0;
|
|
4206
4216
|
if ((z = this.interpolateMarkers) == null || z.forEach((r0) => r0 == null ? void 0 : r0.remove()), this.circleSourceData.features = [], (M = this.interpolateData) != null && M.length && this.tropicals.active) {
|
|
4207
4217
|
const r0 = F(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), s0 = this.interpolateData.filter((P) => P.properties.date === r0.format() && !P.properties.disabled), B0 = this.handleComputePolygons(s0), W0 = C.featureCollection([...s0]);
|
|
4208
4218
|
B0.forEach((P) => {
|
|
@@ -4224,7 +4234,7 @@ const a2 = {
|
|
|
4224
4234
|
for (const P of s0)
|
|
4225
4235
|
if (!P.properties.disabled) {
|
|
4226
4236
|
let z0 = "#f44336";
|
|
4227
|
-
((t = (A = P.properties) == null ? void 0 : A.wind) == null ? void 0 : t.spd) < 17.2 || !((r = (q = P.properties) == null ? void 0 : q.wind) != null && r.spd) ? z0 = "#03f869" : ((n = (a = P.properties) == null ? void 0 : a.wind) == null ? void 0 : n.spd) >= 17.2 && ((d = (
|
|
4237
|
+
((t = (A = P.properties) == null ? void 0 : A.wind) == null ? void 0 : t.spd) < 17.2 || !((r = (q = P.properties) == null ? void 0 : q.wind) != null && r.spd) ? z0 = "#03f869" : ((n = (a = P.properties) == null ? void 0 : a.wind) == null ? void 0 : n.spd) >= 17.2 && ((d = (s = P.properties) == null ? void 0 : s.wind) == null ? void 0 : d.spd) < 24.5 ? z0 = "#f2f202" : ((L = (m = P.properties) == null ? void 0 : m.wind) == null ? void 0 : L.spd) >= 24.5 && ((h = (W = P.properties) == null ? void 0 : W.wind) == null ? void 0 : h.spd) < 32.7 ? z0 = "#ff9100" : ((y = (R = P.properties) == null ? void 0 : R.wind) == null ? void 0 : y.spd) >= 32.7 && ((N = (T = P.properties) == null ? void 0 : T.wind) == null ? void 0 : N.spd) < 41.5 ? z0 = "#f44336" : ((K = (H = P.properties) == null ? void 0 : H.wind) == null ? void 0 : K.spd) >= 41.5 && (($ = (V = P.properties) == null ? void 0 : V.wind) == null ? void 0 : $.spd) < 51 ? z0 = "#f903d0" : ((x = (g = P.properties) == null ? void 0 : g.wind) == null ? void 0 : x.spd) >= 51 ? z0 = "#8702f9" : z0 = "#f44336";
|
|
4228
4238
|
const t0 = `<svg t="1719918955501"
|
|
4229
4239
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
4230
4240
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -4258,7 +4268,7 @@ const a2 = {
|
|
|
4258
4268
|
(m0 = this.map) != null && m0.getSource(this.interpolateSource) && ((L0 = this.map) == null || L0.getSource(this.interpolateSource).setData(this.empty));
|
|
4259
4269
|
},
|
|
4260
4270
|
handleClick(z) {
|
|
4261
|
-
var o, A, t, q, r, a, n,
|
|
4271
|
+
var o, A, t, q, r, a, n, s;
|
|
4262
4272
|
const M = z.features[0], b = (A = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : A.features.filter(
|
|
4263
4273
|
(d) => {
|
|
4264
4274
|
var m;
|
|
@@ -4266,8 +4276,8 @@ const a2 = {
|
|
|
4266
4276
|
}
|
|
4267
4277
|
);
|
|
4268
4278
|
b.sort((d, m) => {
|
|
4269
|
-
var L,
|
|
4270
|
-
return ((L = d.properties) == null ? void 0 : L.model) === "cma" ? -1 : ((
|
|
4279
|
+
var L, W, h, R;
|
|
4280
|
+
return ((L = d.properties) == null ? void 0 : L.model) === "cma" ? -1 : ((W = d.properties) == null ? void 0 : W.model) === "jma" ? ((h = m.properties) == null ? void 0 : h.model) === "cma" ? 1 : -1 : d.properties.model === "ecmwf" ? ["jma", "cma"].includes((R = m.properties) == null ? void 0 : R.model) ? 1 : -1 : 0;
|
|
4271
4281
|
});
|
|
4272
4282
|
const O = (q = (t = this.tropicals) == null ? void 0 : t.data) == null ? void 0 : q.features.filter(
|
|
4273
4283
|
(d) => {
|
|
@@ -4279,7 +4289,7 @@ const a2 = {
|
|
|
4279
4289
|
name: (r = M == null ? void 0 : M.properties) == null ? void 0 : r.name,
|
|
4280
4290
|
forecasts: b.map((d) => d.properties),
|
|
4281
4291
|
history: (a = O[0]) == null ? void 0 : a.properties,
|
|
4282
|
-
showCircle: (
|
|
4292
|
+
showCircle: (s = (n = b[0]) == null ? void 0 : n.properties) == null ? void 0 : s.showCircle
|
|
4283
4293
|
}, this.showTropicals = !0;
|
|
4284
4294
|
const p = document.getElementById("active-tropical");
|
|
4285
4295
|
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([z.lngLat.lng, z.lngLat.lat]) : this.activeTropicalsMarker = new w0.Marker(p).setLngLat([z.lngLat.lng, z.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
@@ -4384,7 +4394,7 @@ const a2 = {
|
|
|
4384
4394
|
style: { "justify-content": "flex-start" }
|
|
4385
4395
|
}, h2 = { class: "forecast-models" }, m2 = ["onClick"], B2 = { class: "more" };
|
|
4386
4396
|
function g2(z, M, b, O, p, o) {
|
|
4387
|
-
var A, t, q, r, a, n,
|
|
4397
|
+
var A, t, q, r, a, n, s, d, m, L, W, h, R, y, T;
|
|
4388
4398
|
return y0((l(), f("div", q2, [
|
|
4389
4399
|
c("div", i2, [
|
|
4390
4400
|
c("div", {
|
|
@@ -4395,18 +4405,18 @@ function g2(z, M, b, O, p, o) {
|
|
|
4395
4405
|
(t = (A = p.activeTropicals) == null ? void 0 : A.history) != null && t.level ? (l(), f("span", n2, v((r = (q = p.activeTropicals) == null ? void 0 : q.history) == null ? void 0 : r.level) + " , ", 1)) : _("", !0),
|
|
4396
4406
|
b0(v((a = p.activeTropicals) == null ? void 0 : a.name), 1)
|
|
4397
4407
|
]),
|
|
4398
|
-
c("div", d2, " Last update: " + v(o.computeTime(((
|
|
4408
|
+
c("div", d2, " Last update: " + v(o.computeTime(((s = (n = p.activeTropicals) == null ? void 0 : n.history) == null ? void 0 : s.updated) || ((L = (m = (d = p.activeTropicals) == null ? void 0 : d.forecasts) == null ? void 0 : m.filter((N) => !N.disabled)[0]) == null ? void 0 : L.date))), 1)
|
|
4399
4409
|
]),
|
|
4400
4410
|
c("div", s2, [
|
|
4401
4411
|
c("div", W2, [
|
|
4402
4412
|
c("div", l2, [
|
|
4403
4413
|
c("div", f2, [
|
|
4404
4414
|
M[2] || (M[2] = c("label", null, "Wind speed : ", -1)),
|
|
4405
|
-
c("span", null, v(((
|
|
4415
|
+
c("span", null, v(((h = (W = p.activeTropicals) == null ? void 0 : W.history) == null ? void 0 : h.kts) || "-") + "[kts]", 1)
|
|
4406
4416
|
]),
|
|
4407
4417
|
c("div", u2, [
|
|
4408
4418
|
M[3] || (M[3] = c("label", null, "Pressure : ", -1)),
|
|
4409
|
-
c("span", null, v(((y = (
|
|
4419
|
+
c("span", null, v(((y = (R = p.activeTropicals) == null ? void 0 : R.history) == null ? void 0 : y.pressure) || "-") + "[hPa]", 1)
|
|
4410
4420
|
])
|
|
4411
4421
|
]),
|
|
4412
4422
|
c("div", L2, [
|
|
@@ -5072,15 +5082,15 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
5072
5082
|
(!M || typeof M.version != "string") && t0("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
|
|
5073
5083
|
var r = M.version.split("."), a = +r[0], n = +r[1];
|
|
5074
5084
|
(a < 2 || a === 2 && n < 6) && t0("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
|
|
5075
|
-
function
|
|
5085
|
+
function s(e) {
|
|
5076
5086
|
return e > 96 ? e - 87 : e > 64 ? e - 29 : e - 48;
|
|
5077
5087
|
}
|
|
5078
5088
|
function d(e) {
|
|
5079
5089
|
var i = 0, u = e.split("."), B = u[0], X = u[1] || "", D = 1, Z, S = 0, G = 1;
|
|
5080
5090
|
for (e.charCodeAt(0) === 45 && (i = 1, G = -1), i; i < B.length; i++)
|
|
5081
|
-
Z =
|
|
5091
|
+
Z = s(B.charCodeAt(i)), S = 60 * S + Z;
|
|
5082
5092
|
for (i = 0; i < X.length; i++)
|
|
5083
|
-
D = D / 60, Z =
|
|
5093
|
+
D = D / 60, Z = s(X.charCodeAt(i)), S += Z * D;
|
|
5084
5094
|
return S * G;
|
|
5085
5095
|
}
|
|
5086
5096
|
function m(e) {
|
|
@@ -5092,24 +5102,24 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
5092
5102
|
e[u] = Math.round((e[u - 1] || 0) + e[u] * 6e4);
|
|
5093
5103
|
e[i - 1] = 1 / 0;
|
|
5094
5104
|
}
|
|
5095
|
-
function
|
|
5105
|
+
function W(e, i) {
|
|
5096
5106
|
var u = [], B;
|
|
5097
5107
|
for (B = 0; B < i.length; B++)
|
|
5098
5108
|
u[B] = e[i[B]];
|
|
5099
5109
|
return u;
|
|
5100
5110
|
}
|
|
5101
|
-
function
|
|
5111
|
+
function h(e) {
|
|
5102
5112
|
var i = e.split("|"), u = i[2].split(" "), B = i[3].split(""), X = i[4].split(" ");
|
|
5103
5113
|
return m(u), m(B), m(X), L(X, B.length), {
|
|
5104
5114
|
name: i[0],
|
|
5105
|
-
abbrs:
|
|
5106
|
-
offsets:
|
|
5115
|
+
abbrs: W(i[1].split(" "), B),
|
|
5116
|
+
offsets: W(u, B),
|
|
5107
5117
|
untils: X,
|
|
5108
5118
|
population: i[5] | 0
|
|
5109
5119
|
};
|
|
5110
5120
|
}
|
|
5111
|
-
function
|
|
5112
|
-
e && this._set(
|
|
5121
|
+
function R(e) {
|
|
5122
|
+
e && this._set(h(e));
|
|
5113
5123
|
}
|
|
5114
5124
|
function y(e, i) {
|
|
5115
5125
|
var u = i.length;
|
|
@@ -5123,7 +5133,7 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
5123
5133
|
B = Math.floor((X + D) / 2), i[B] <= e ? X = B : D = B;
|
|
5124
5134
|
return D;
|
|
5125
5135
|
}
|
|
5126
|
-
|
|
5136
|
+
R.prototype = {
|
|
5127
5137
|
_set: function(e) {
|
|
5128
5138
|
this.name = e.name, this.abbrs = e.abbrs, this.untils = e.untils, this.offsets = e.offsets, this.population = e.population;
|
|
5129
5139
|
},
|
|
@@ -5235,7 +5245,7 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
5235
5245
|
function O0(e, i) {
|
|
5236
5246
|
e = i0(e);
|
|
5237
5247
|
var u = O[e], B;
|
|
5238
|
-
return u instanceof
|
|
5248
|
+
return u instanceof R ? u : typeof u == "string" ? (u = new R(u), O[e] = u, u) : p[e] && i !== O0 && (B = O0(p[e], O0)) ? (u = O[e] = new R(), u._set(B), u.name = A[e], u) : null;
|
|
5239
5249
|
}
|
|
5240
5250
|
function h0() {
|
|
5241
5251
|
var e, i = [];
|
|
@@ -5292,7 +5302,7 @@ var F0 = { exports: {} }, G0 = { exports: {} };
|
|
|
5292
5302
|
var i = Array.prototype.slice.call(arguments, 0, -1), u = arguments[arguments.length - 1], B = M.utc.apply(null, i), X;
|
|
5293
5303
|
return !M.isMoment(e) && z0(B) && (X = O0(u)) && B.add(X.parse(B), "minutes"), B.tz(u), B;
|
|
5294
5304
|
}
|
|
5295
|
-
I.version = b, I.dataVersion = "", I._zones = O, I._links = p, I._names = A, I._countries = o, I.add = u0, I.link = L0, I.load = W0, I.zone = O0, I.zoneExists = P, I.guess = d0, I.names = h0, I.Zone =
|
|
5305
|
+
I.version = b, I.dataVersion = "", I._zones = O, I._links = p, I._names = A, I._countries = o, I.add = u0, I.link = L0, I.load = W0, I.zone = O0, I.zoneExists = P, I.guess = d0, I.names = h0, I.Zone = R, I.unpack = h, I.unpackBase60 = d, I.needsOffset = z0, I.moveInvalidForward = !0, I.moveAmbiguousForward = !1, I.countries = m0, I.zonesForCountry = B0;
|
|
5296
5306
|
var p0 = M.fn;
|
|
5297
5307
|
M.tz = I, M.defaultZone = null, M.updateOffset = function(e, i) {
|
|
5298
5308
|
var u = M.defaultZone, B;
|
|
@@ -6352,11 +6362,11 @@ const cM = {
|
|
|
6352
6362
|
initTableData(z) {
|
|
6353
6363
|
var M, b, O, p, o, A, t;
|
|
6354
6364
|
this.clearTable(), this.currentHourData = ((M = H0.pickHourly(z, this.ts ? F(this.ts) : F())) == null ? void 0 : M[0]) || {}, this.positionGmt = (O = (b = z == null ? void 0 : z.weather) == null ? void 0 : b[0]) == null ? void 0 : O.timezone, this.positionOffset = (o = (p = z == null ? void 0 : z.weather) == null ? void 0 : p[0]) == null ? void 0 : o.offset, this.localDate = (t = (A = E0(this.ts)) == null ? void 0 : A.tz(this.positionGmt)) == null ? void 0 : t.format("MMM-DD/HHmm[LT]"), this.$nextTick(() => {
|
|
6355
|
-
var r, a, n,
|
|
6365
|
+
var r, a, n, s, d, m, L, W, h, R, y, T, N, H, K, V, $, g, x, n0, d0, i0, u0, O0, h0, m0, L0, r0, s0, B0, W0, P, z0, t0, I, p0, l0, f0, R0;
|
|
6356
6366
|
const q = document.getElementById("meteoMainBox");
|
|
6357
6367
|
if (!q)
|
|
6358
6368
|
return !1;
|
|
6359
|
-
if (q.className = "main-box", q.style.backgroundImage = null, q.style.backgroundPosition = "top left", ((a = (r = this.currentHourData) == null ? void 0 : r.weather) == null ? void 0 : a.code) === 0 && ((
|
|
6369
|
+
if (q.className = "main-box", q.style.backgroundImage = null, q.style.backgroundPosition = "top left", ((a = (r = this.currentHourData) == null ? void 0 : r.weather) == null ? void 0 : a.code) === 0 && ((s = (n = this.currentHourData) == null ? void 0 : n.weather) == null ? void 0 : s.isDay) === 0)
|
|
6360
6370
|
q.className = "main-box night-bg";
|
|
6361
6371
|
else {
|
|
6362
6372
|
const c0 = (m = (d = this.currentHourData) == null ? void 0 : d.weather) == null ? void 0 : m.bg;
|
|
@@ -6366,7 +6376,7 @@ const cM = {
|
|
|
6366
6376
|
const e = E0(this.ts).tz(this.positionGmt).add(3 * c0, "h").format();
|
|
6367
6377
|
this.tableData.hours.push(e);
|
|
6368
6378
|
const i = ((L = H0.pickHourly(z, e)) == null ? void 0 : L[0]) || {};
|
|
6369
|
-
this.tableData.temp.push(this.roundPrecision((
|
|
6379
|
+
this.tableData.temp.push(this.roundPrecision((W = i == null ? void 0 : i.weather) == null ? void 0 : W.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((R = (h = i == null ? void 0 : i.weather) == null ? void 0 : h.precip) == null ? void 0 : R.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((T = (y = i == null ? void 0 : i.weather) == null ? void 0 : y.precip) == null ? void 0 : T.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((N = i == null ? void 0 : i.weather) == null ? void 0 : N.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((K = (H = i == null ? void 0 : i.weather) == null ? void 0 : H.wind) == null ? void 0 : K.kts, 1) ?? "-"), this.tableData.windDir.push(($ = (V = i == null ? void 0 : i.weather) == null ? void 0 : V.wind) == null ? void 0 : $.bearing), this.tableData.windGust.push(this.roundPrecision((x = (g = i == null ? void 0 : i.weather) == null ? void 0 : g.wind) == null ? void 0 : x.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((d0 = (n0 = i == null ? void 0 : i.wave) == null ? void 0 : n0.sig) == null ? void 0 : d0.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((h0 = (O0 = i == null ? void 0 : i.wave) == null ? void 0 : O0.wd) == null ? void 0 : h0.height, 1) ?? "-"), this.tableData.windwaveDir.push((L0 = (m0 = i == null ? void 0 : i.wave) == null ? void 0 : m0.wd) == null ? void 0 : L0.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((s0 = (r0 = i == null ? void 0 : i.wave) == null ? void 0 : r0.wd) == null ? void 0 : s0.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((W0 = (B0 = i == null ? void 0 : i.wave) == null ? void 0 : B0.swell) == null ? void 0 : W0.height, 1) ?? "-"), this.tableData.swellDir.push((z0 = (P = i == null ? void 0 : i.wave) == null ? void 0 : P.swell) == null ? void 0 : z0.bearing), this.tableData.swellPeriod.push(this.roundPrecision((I = (t0 = i == null ? void 0 : i.wave) == null ? void 0 : t0.swell) == null ? void 0 : I.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((p0 = i == null ? void 0 : i.current) == null ? void 0 : p0.speed, 1) ?? "-"), this.tableData.currentDir.push((l0 = i == null ? void 0 : i.current) == null ? void 0 : l0.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((f0 = i == null ? void 0 : i.weather) == null ? void 0 : f0.url), this.tableData.weatherNames.push(((R0 = i == null ? void 0 : i.weather) == null ? void 0 : R0.name) ?? "-");
|
|
6370
6380
|
}
|
|
6371
6381
|
});
|
|
6372
6382
|
},
|
|
@@ -6440,7 +6450,7 @@ const cM = {
|
|
|
6440
6450
|
class: "main-box flex-center"
|
|
6441
6451
|
};
|
|
6442
6452
|
function bb(z, M, b, O, p, o) {
|
|
6443
|
-
var r, a, n,
|
|
6453
|
+
var r, a, n, s, d, m, L, W, h, R, y, T, N, H, K, V, $;
|
|
6444
6454
|
const A = E("LocationFilled"), t = E("ElIcon"), q = E("ElTooltip");
|
|
6445
6455
|
return l(), f("div", null, [
|
|
6446
6456
|
y0(c("div", AM, [
|
|
@@ -6468,7 +6478,7 @@ function bb(z, M, b, O, p, o) {
|
|
|
6468
6478
|
w(q, {
|
|
6469
6479
|
placement: "top",
|
|
6470
6480
|
effect: "light",
|
|
6471
|
-
content: (
|
|
6481
|
+
content: (s = (n = p.currentHourData) == null ? void 0 : n.weather) == null ? void 0 : s.name,
|
|
6472
6482
|
"show-after": 1e3
|
|
6473
6483
|
}, {
|
|
6474
6484
|
default: e0(() => {
|
|
@@ -6493,11 +6503,11 @@ function bb(z, M, b, O, p, o) {
|
|
|
6493
6503
|
c("div", lM, [
|
|
6494
6504
|
c("div", fM, [
|
|
6495
6505
|
M[5] || (M[5] = c("label", null, "Precip : ", -1)),
|
|
6496
|
-
c("span", null, v(o.roundPrecision((
|
|
6506
|
+
c("span", null, v(o.roundPrecision((h = (W = (L = p.currentHourData) == null ? void 0 : L.weather) == null ? void 0 : W.precip) == null ? void 0 : h.sum, 0)) + " mm", 1)
|
|
6497
6507
|
]),
|
|
6498
6508
|
c("div", uM, [
|
|
6499
6509
|
M[6] || (M[6] = c("label", null, "Visibility : ", -1)),
|
|
6500
|
-
c("span", null, v(o.roundPrecision((y = (
|
|
6510
|
+
c("span", null, v(o.roundPrecision((y = (R = p.currentHourData) == null ? void 0 : R.weather) == null ? void 0 : y.visibility, 0)) + " nm", 1)
|
|
6501
6511
|
]),
|
|
6502
6512
|
c("div", LM, [
|
|
6503
6513
|
M[7] || (M[7] = c("label", null, "Wind : ", -1)),
|
|
@@ -8225,21 +8235,21 @@ const U0 = /* @__PURE__ */ k(Qb, [["render", Hb], ["__scopeId", "data-v-ad66a24c
|
|
|
8225
8235
|
var b, O, p, o, A, t, q, r, a, n;
|
|
8226
8236
|
const M = (O = (b = z.target) == null ? void 0 : b._element) == null ? void 0 : O.id;
|
|
8227
8237
|
if ((M == null ? void 0 : M.split("-").length) === 2) {
|
|
8228
|
-
const
|
|
8229
|
-
this.pointMarkers[
|
|
8230
|
-
var
|
|
8231
|
-
return ((
|
|
8238
|
+
const s = this.geojson.filter((W) => W.id === M.split("-")[0])[0];
|
|
8239
|
+
this.pointMarkers[s.id].filter((W) => {
|
|
8240
|
+
var h;
|
|
8241
|
+
return ((h = W._element) == null ? void 0 : h.id) === M;
|
|
8232
8242
|
})[0].setLngLat([(o = (p = z.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (t = (A = z.target) == null ? void 0 : A._lngLat) == null ? void 0 : t.lat]);
|
|
8233
8243
|
let m;
|
|
8234
|
-
|
|
8235
|
-
if (
|
|
8236
|
-
m =
|
|
8244
|
+
s.features.forEach((W, h) => {
|
|
8245
|
+
if (W.geometry.type === "Point" && W.properties.id == M.split("-")[1]) {
|
|
8246
|
+
m = h;
|
|
8237
8247
|
return;
|
|
8238
8248
|
}
|
|
8239
8249
|
});
|
|
8240
|
-
const L =
|
|
8250
|
+
const L = s.features.filter((W) => W.geometry.type === "Point");
|
|
8241
8251
|
this.handleTmpPointUpdate(
|
|
8242
|
-
|
|
8252
|
+
s,
|
|
8243
8253
|
L[m - 1],
|
|
8244
8254
|
{ lng: (r = (q = z.target) == null ? void 0 : q._lngLat) == null ? void 0 : r.lng, lat: (n = (a = z.target) == null ? void 0 : a._lngLat) == null ? void 0 : n.lat, properties: L[m].properties },
|
|
8245
8255
|
m === L.length - 1 ? void 0 : L[m + 1]
|
|
@@ -8250,13 +8260,13 @@ const U0 = /* @__PURE__ */ k(Qb, [["render", Hb], ["__scopeId", "data-v-ad66a24c
|
|
|
8250
8260
|
var b, O, p, o, A, t, q, r, a, n;
|
|
8251
8261
|
const M = (O = (b = z.target) == null ? void 0 : b._element) == null ? void 0 : O.id;
|
|
8252
8262
|
if ((M == null ? void 0 : M.split("-").length) === 2) {
|
|
8253
|
-
const
|
|
8254
|
-
this.pointMarkers[
|
|
8255
|
-
var
|
|
8256
|
-
return ((
|
|
8263
|
+
const s = this.geojson.filter((L) => L.id === M.split("-")[0])[0];
|
|
8264
|
+
this.pointMarkers[s.id].filter((L) => {
|
|
8265
|
+
var W;
|
|
8266
|
+
return ((W = L._element) == null ? void 0 : W.id) === M;
|
|
8257
8267
|
})[0].setLngLat([(o = (p = z.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (t = (A = z.target) == null ? void 0 : A._lngLat) == null ? void 0 : t.lat]);
|
|
8258
|
-
const m =
|
|
8259
|
-
m.geometry.coordinates = [(r = (q = z.target) == null ? void 0 : q._lngLat) == null ? void 0 : r.lng, (n = (a = z.target) == null ? void 0 : a._lngLat) == null ? void 0 : n.lat],
|
|
8268
|
+
const m = s.features.filter((L) => L.geometry.type === "Point" && L.properties.id == M.split("-")[1])[0];
|
|
8269
|
+
m.geometry.coordinates = [(r = (q = z.target) == null ? void 0 : q._lngLat) == null ? void 0 : r.lng, (n = (a = z.target) == null ? void 0 : a._lngLat) == null ? void 0 : n.lat], s.features = s.features.filter((L) => L.geometry.type === "Point"), this.handlePointUpdate(s);
|
|
8260
8270
|
}
|
|
8261
8271
|
},
|
|
8262
8272
|
handleContextmenu(z) {
|
|
@@ -8305,9 +8315,9 @@ const U0 = /* @__PURE__ */ k(Qb, [["render", Hb], ["__scopeId", "data-v-ad66a24c
|
|
|
8305
8315
|
for (let p = 1; p < M.length; p++) {
|
|
8306
8316
|
const o = M[p - 1], A = M[p], t = o.properties, q = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, r = { lng: A.geometry.coordinates[0], lat: A.geometry.coordinates[1] }, a = g0.calculateDistance(q, r, t.mode === "RL", 2), n = g0.calculateBearing(q, r, t.mode === "RL", 2);
|
|
8307
8317
|
b = M0.roundPrecision(b + a, 2);
|
|
8308
|
-
let
|
|
8309
|
-
t.mode === "RL" ?
|
|
8310
|
-
const d = C.lineString(
|
|
8318
|
+
let s;
|
|
8319
|
+
t.mode === "RL" ? s = M0.convertToMonotonicLng([q, r]) : s = M0.convertToMonotonicLng(g0.interpolateCoordinates(q, r, 200));
|
|
8320
|
+
const d = C.lineString(s.map((m) => [m.lng, m.lat]));
|
|
8311
8321
|
d.properties.dist = a, d.properties.bearing = n, d.properties.total = b, O.push(d);
|
|
8312
8322
|
}
|
|
8313
8323
|
M.push(...O), z.total = b;
|
|
@@ -8322,16 +8332,16 @@ const U0 = /* @__PURE__ */ k(Qb, [["render", Hb], ["__scopeId", "data-v-ad66a24c
|
|
|
8322
8332
|
o = g0.calculateDistance(r, a, q.mode === "RL", 2), A = g0.calculateBearing(r, a, q.mode === "RL", 2);
|
|
8323
8333
|
let n;
|
|
8324
8334
|
q.mode === "RL" ? n = M0.convertToMonotonicLng([r, a]) : n = M0.convertToMonotonicLng(g0.interpolateCoordinates(r, a, 200));
|
|
8325
|
-
const
|
|
8326
|
-
|
|
8335
|
+
const s = C.lineString(n.map((d) => [d.lng, d.lat]));
|
|
8336
|
+
s.properties.dist = o, s.properties.bearing = A, p.features.push(s);
|
|
8327
8337
|
}
|
|
8328
8338
|
if (O) {
|
|
8329
8339
|
const q = b.properties, r = b, a = { lng: O.geometry.coordinates[0], lat: O.geometry.coordinates[1] };
|
|
8330
8340
|
o = g0.calculateDistance(r, a, q.mode === "RL", 2), A = g0.calculateBearing(r, a, q.mode === "RL", 2);
|
|
8331
8341
|
let n;
|
|
8332
8342
|
q.mode === "RL" ? n = M0.convertToMonotonicLng([r, a]) : n = M0.convertToMonotonicLng(g0.interpolateCoordinates(r, a, 200));
|
|
8333
|
-
const
|
|
8334
|
-
|
|
8343
|
+
const s = C.lineString(n.map((d) => [d.lng, d.lat]));
|
|
8344
|
+
s.properties.dist = o, s.properties.bearing = A, p.features.push(s);
|
|
8335
8345
|
}
|
|
8336
8346
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(p) : this.map.addSource(this.tmpSource, {
|
|
8337
8347
|
type: "geojson",
|
|
@@ -8443,11 +8453,11 @@ const U0 = /* @__PURE__ */ k(Qb, [["render", Hb], ["__scopeId", "data-v-ad66a24c
|
|
|
8443
8453
|
}
|
|
8444
8454
|
},
|
|
8445
8455
|
handleClear(z, M = !0) {
|
|
8446
|
-
var o, A, t, q, r, a, n,
|
|
8456
|
+
var o, A, t, q, r, a, n, s, d;
|
|
8447
8457
|
const b = `${z.id}-${this.source}`, O = `${z.id}-${this.layer}`, p = `${z.id}-${this.labelLayer}`;
|
|
8448
8458
|
(o = this.map) != null && o.getLayer(O) && this.map.removeLayer(O), (A = this.map) != null && A.getLayer(p) && this.map.removeLayer(p), (t = this.map) != null && t.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (q = this.map) != null && q.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (r = this.closeMarkers[z.id]) == null || r.remove(), this.closeMarkers[z.id] = void 0, (a = this.pointMarkers[z.id]) == null || a.forEach((m) => {
|
|
8449
8459
|
m == null || m.remove();
|
|
8450
|
-
}), this.pointMarkers[z.id] = [], (n = this.tipMarker) == null || n.remove(), this.tipMarker = void 0, M && ((
|
|
8460
|
+
}), this.pointMarkers[z.id] = [], (n = this.tipMarker) == null || n.remove(), this.tipMarker = void 0, M && ((s = this.map) != null && s.getSource(b)) && this.map.removeSource(b), M && ((d = this.map) != null && d.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
8451
8461
|
}
|
|
8452
8462
|
}
|
|
8453
8463
|
};
|
|
@@ -8720,10 +8730,10 @@ const Mz = {
|
|
|
8720
8730
|
},
|
|
8721
8731
|
activeWeatherLayers: {
|
|
8722
8732
|
handler() {
|
|
8723
|
-
var z, M, b, O, p, o, A, t, q, r, a, n,
|
|
8733
|
+
var z, M, b, O, p, o, A, t, q, r, a, n, s, d;
|
|
8724
8734
|
if (!this.map)
|
|
8725
8735
|
return !1;
|
|
8726
|
-
this.activeWeatherLayers.length > 0 ? ((M = (z = this.map) == null ? void 0 : z.getLayer(this.
|
|
8736
|
+
this.activeWeatherLayers.length > 0 ? ((M = (z = this.map) == null ? void 0 : z.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || M.setLayoutProperty("visibility", "visible"), (O = this.map) != null && O.getLayer((b = this.viewport) == null ? void 0 : b.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)), (q = this.map) != null && q.getLayer((t = this.viewport) == null ? void 0 : t.particleLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((n = this.map) == null || n.moveLayer((a = this.viewport) == null ? void 0 : a.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : (d = (s = this.map) == null ? void 0 : s.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || d.setLayoutProperty("visibility", "none"), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
|
|
8727
8737
|
},
|
|
8728
8738
|
immediate: !0
|
|
8729
8739
|
},
|
|
@@ -8779,32 +8789,32 @@ const Mz = {
|
|
|
8779
8789
|
const M = (/* @__PURE__ */ new Date()).valueOf();
|
|
8780
8790
|
let b = 0, O = 0;
|
|
8781
8791
|
if (this.map) {
|
|
8782
|
-
const
|
|
8792
|
+
const s = ((p = this.map) == null ? void 0 : p.getZoom()) + 1, d = (o = this.map) == null ? void 0 : o.getBounds(), m = `${d._sw.lng},${d._sw.lat},${d._ne.lng},${d._ne.lat}`;
|
|
8783
8793
|
if (this.particleFactor) {
|
|
8784
|
-
const L = x0.WEATHER_LAYERS.find((
|
|
8785
|
-
var
|
|
8786
|
-
return ((
|
|
8794
|
+
const L = x0.WEATHER_LAYERS.find((W) => {
|
|
8795
|
+
var h;
|
|
8796
|
+
return ((h = W.peer) == null ? void 0 : h.weight) === this.particleFactor.weight;
|
|
8787
8797
|
});
|
|
8788
8798
|
this.particleFactor.particle ? this.weatherWeight = this.weatherWeight & L.weight ? this.weatherWeight : this.weatherWeight + L.weight : this.weatherWeight = this.weatherWeight & L.weight ? this.weatherWeight - L.weight : this.weatherWeight;
|
|
8789
8799
|
}
|
|
8790
8800
|
if (this.weatherWeight > 0) {
|
|
8791
|
-
let L = this.weatherWeight,
|
|
8792
|
-
if (z.tropicals || this.weatherWeight & 256 && (
|
|
8793
|
-
const
|
|
8801
|
+
let L = this.weatherWeight, W;
|
|
8802
|
+
if (z.tropicals || this.weatherWeight & 256 && (W = this.weatherLayers.tropicals, W && (L -= 256, W.version = Math.random() + 1)), L > 0) {
|
|
8803
|
+
const h = await N0.get(`${this.gateway}/api/arc/weather/layers/links?l=${L}&v=${this.source}&z=${s}&bbox=${m}&t=${this.ts}`, {
|
|
8794
8804
|
headers: {
|
|
8795
8805
|
Authorization: this.token || this.defaultMeteoToken
|
|
8796
8806
|
}
|
|
8797
8807
|
});
|
|
8798
|
-
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + b), console.log("weather links elapsed: ", O, ", total: ", b += O), ((A =
|
|
8799
|
-
const
|
|
8800
|
-
for (const N in
|
|
8801
|
-
N === "ice-edge" && (
|
|
8802
|
-
N0.get(
|
|
8808
|
+
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + b), console.log("weather links elapsed: ", O, ", total: ", b += O), ((A = h == null ? void 0 : h.data) == null ? void 0 : A.code) === 0) {
|
|
8809
|
+
const R = (t = h == null ? void 0 : h.data) == null ? void 0 : t.data, y = [];
|
|
8810
|
+
for (const N in R)
|
|
8811
|
+
N === "ice-edge" && (R[N] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), N !== "tropicals" && y.push(
|
|
8812
|
+
N0.get(R[N], {
|
|
8803
8813
|
headers: {
|
|
8804
8814
|
Authorization: this.token || this.defaultMeteoToken,
|
|
8805
8815
|
key: N
|
|
8806
8816
|
},
|
|
8807
|
-
responseType: /\.(jpg|png)$/.test(
|
|
8817
|
+
responseType: /\.(jpg|png)$/.test(R[N]) ? "blob" : "json"
|
|
8808
8818
|
}).catch((H) => {
|
|
8809
8819
|
console.log(`[${N}] fetch layer error: ${H}`);
|
|
8810
8820
|
})
|
|
@@ -8818,7 +8828,7 @@ const Mz = {
|
|
|
8818
8828
|
type: ((x = N == null ? void 0 : N.config) == null ? void 0 : x.responseType) === "blob" ? "image" : "json",
|
|
8819
8829
|
etime: this.ts
|
|
8820
8830
|
});
|
|
8821
|
-
}),
|
|
8831
|
+
}), R.tropicals && N0.get(R.tropicals, {
|
|
8822
8832
|
headers: {
|
|
8823
8833
|
Authorization: this.token || this.defaultMeteoToken,
|
|
8824
8834
|
key: "tropicals"
|
|
@@ -8837,25 +8847,25 @@ const Mz = {
|
|
|
8837
8847
|
});
|
|
8838
8848
|
}
|
|
8839
8849
|
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + b), console.log("weather layers elapsed: ", O, ", total: ", b += O), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
|
|
8840
|
-
const
|
|
8850
|
+
const R = (q = this.weatherLayers["swell-direction"]) == null ? void 0 : q.raw, y = (r = this.weatherLayers["swell-height"]) == null ? void 0 : r.raw;
|
|
8841
8851
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
8842
8852
|
type: "json",
|
|
8843
|
-
direction:
|
|
8853
|
+
direction: R,
|
|
8844
8854
|
height: { raw: y },
|
|
8845
8855
|
etime: this.ts
|
|
8846
8856
|
};
|
|
8847
8857
|
}
|
|
8848
8858
|
if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
|
|
8849
|
-
const
|
|
8859
|
+
const R = (a = this.weatherLayers["current-direction"]) == null ? void 0 : a.raw, y = (n = this.weatherLayers["current-speed"]) == null ? void 0 : n.raw;
|
|
8850
8860
|
delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
|
|
8851
8861
|
type: "json",
|
|
8852
|
-
direction:
|
|
8862
|
+
direction: R,
|
|
8853
8863
|
speed: { raw: y },
|
|
8854
8864
|
etime: this.ts
|
|
8855
8865
|
};
|
|
8856
8866
|
}
|
|
8857
8867
|
}
|
|
8858
|
-
|
|
8868
|
+
W && (W.etime = this.ts, W.cached = !0, this.weatherLayers.tropicals = W);
|
|
8859
8869
|
}
|
|
8860
8870
|
this.handleWeatherLayerToggle(), this.handleDragEndWithZoom4Json();
|
|
8861
8871
|
}
|
|
@@ -8876,19 +8886,19 @@ const Mz = {
|
|
|
8876
8886
|
});
|
|
8877
8887
|
if (((M = q == null ? void 0 : q.data) == null ? void 0 : M.code) === 0) {
|
|
8878
8888
|
const r = (b = q == null ? void 0 : q.data) == null ? void 0 : b.data, a = [];
|
|
8879
|
-
for (const
|
|
8889
|
+
for (const s in r)
|
|
8880
8890
|
a.push(
|
|
8881
|
-
N0.get(r[
|
|
8891
|
+
N0.get(r[s], {
|
|
8882
8892
|
headers: {
|
|
8883
8893
|
Authorization: this.token || this.defaultMeteoToken,
|
|
8884
|
-
key:
|
|
8894
|
+
key: s
|
|
8885
8895
|
}
|
|
8886
8896
|
})
|
|
8887
8897
|
);
|
|
8888
8898
|
const n = await Promise.all(a);
|
|
8889
|
-
this.otherLayers = { enc: A, world12nm: t }, n.map((
|
|
8890
|
-
var L,
|
|
8891
|
-
const d = ((L =
|
|
8899
|
+
this.otherLayers = { enc: A, world12nm: t }, n.map((s) => {
|
|
8900
|
+
var L, W, h;
|
|
8901
|
+
const d = ((L = s == null ? void 0 : s.data) == null ? void 0 : L.data) || (s == null ? void 0 : s.data), m = (h = (W = s == null ? void 0 : s.config) == null ? void 0 : W.headers) == null ? void 0 : h.key;
|
|
8892
8902
|
this.otherLayers[m] = d;
|
|
8893
8903
|
});
|
|
8894
8904
|
}
|
|
@@ -8900,18 +8910,18 @@ const Mz = {
|
|
|
8900
8910
|
});
|
|
8901
8911
|
if (((O = q == null ? void 0 : q.data) == null ? void 0 : O.code) === 0) {
|
|
8902
8912
|
const r = (p = q == null ? void 0 : q.data) == null ? void 0 : p.data, a = [];
|
|
8903
|
-
for (const
|
|
8913
|
+
for (const s in r)
|
|
8904
8914
|
a.push(
|
|
8905
|
-
N0.get(r[
|
|
8915
|
+
N0.get(r[s], {
|
|
8906
8916
|
headers: {
|
|
8907
8917
|
Authorization: this.token || this.defaultMeteoToken,
|
|
8908
|
-
key:
|
|
8918
|
+
key: s
|
|
8909
8919
|
}
|
|
8910
8920
|
})
|
|
8911
8921
|
);
|
|
8912
|
-
(await Promise.all(a)).map((
|
|
8913
|
-
var L,
|
|
8914
|
-
const d = ((L =
|
|
8922
|
+
(await Promise.all(a)).map((s) => {
|
|
8923
|
+
var L, W, h;
|
|
8924
|
+
const d = ((L = s == null ? void 0 : s.data) == null ? void 0 : L.data) || (s == null ? void 0 : s.data), m = (h = (W = s == null ? void 0 : s.config) == null ? void 0 : W.headers) == null ? void 0 : h.key;
|
|
8915
8925
|
this.otherLayers[m] = d;
|
|
8916
8926
|
});
|
|
8917
8927
|
}
|
|
@@ -8967,7 +8977,7 @@ const Mz = {
|
|
|
8967
8977
|
);
|
|
8968
8978
|
},
|
|
8969
8979
|
handleDragEndWithZoom4Json() {
|
|
8970
|
-
var r, a, n,
|
|
8980
|
+
var r, a, n, s;
|
|
8971
8981
|
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
8972
8982
|
let M = 0, b = 0;
|
|
8973
8983
|
const O = (r = this.map) == null ? void 0 : r.getBounds(), p = this.map.getZoom(), o = M0.convertToStdLng(O._sw.lng), A = M0.convertToStdLng(O._ne.lng), t = Math.floor(O._sw.lat), q = Math.ceil(O._ne.lat);
|
|
@@ -8977,90 +8987,90 @@ const Mz = {
|
|
|
8977
8987
|
let m = [];
|
|
8978
8988
|
if (["swell", "current"].includes(d)) {
|
|
8979
8989
|
const L = ((a = this.weatherLayers[d]) == null ? void 0 : a.direction) || {};
|
|
8980
|
-
for (const
|
|
8981
|
-
if (
|
|
8982
|
-
const
|
|
8983
|
-
o > A ?
|
|
8990
|
+
for (const W in L)
|
|
8991
|
+
if (W > t && W < q && (!(p <= this.zoom) || W % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8992
|
+
const h = L[W].lng;
|
|
8993
|
+
o > A ? h.forEach((R, y) => {
|
|
8984
8994
|
var T;
|
|
8985
|
-
if ((
|
|
8986
|
-
const N = C.point([
|
|
8987
|
-
val: L[
|
|
8988
|
-
spd: (T = L[
|
|
8995
|
+
if ((R >= o && R <= 180 || R >= -180 && R <= A) && (!(p <= this.zoom) || R % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8996
|
+
const N = C.point([R, W], {
|
|
8997
|
+
val: L[W].val[y],
|
|
8998
|
+
spd: (T = L[W].spd) == null ? void 0 : T[y]
|
|
8989
8999
|
});
|
|
8990
9000
|
m.push(N);
|
|
8991
9001
|
}
|
|
8992
|
-
}) :
|
|
9002
|
+
}) : h.forEach((R, y) => {
|
|
8993
9003
|
var T;
|
|
8994
|
-
if (
|
|
8995
|
-
const N = C.point([
|
|
8996
|
-
val: L[
|
|
8997
|
-
spd: (T = L[
|
|
9004
|
+
if (R >= o && R <= A && (!(p <= this.zoom) || R % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
9005
|
+
const N = C.point([R, W], {
|
|
9006
|
+
val: L[W].val[y],
|
|
9007
|
+
spd: (T = L[W].spd) == null ? void 0 : T[y]
|
|
8998
9008
|
});
|
|
8999
9009
|
m.push(N);
|
|
9000
9010
|
}
|
|
9001
9011
|
});
|
|
9002
9012
|
}
|
|
9003
9013
|
if (b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("direction elapsed: ", b, ", total: ", M += b), d === "swell") {
|
|
9004
|
-
const
|
|
9005
|
-
if (
|
|
9006
|
-
if (!
|
|
9007
|
-
const
|
|
9008
|
-
for (const
|
|
9009
|
-
const y =
|
|
9014
|
+
const W = this.weatherLayers[d].height;
|
|
9015
|
+
if (W) {
|
|
9016
|
+
if (!W.data) {
|
|
9017
|
+
const h = [];
|
|
9018
|
+
for (const R in (n = W.raw) == null ? void 0 : n.LineString) {
|
|
9019
|
+
const y = W.raw.LineString[R];
|
|
9010
9020
|
for (const T of y)
|
|
9011
|
-
|
|
9021
|
+
h.push(
|
|
9012
9022
|
C.lineString(T, {
|
|
9013
|
-
val: Number(
|
|
9023
|
+
val: Number(R)
|
|
9014
9024
|
})
|
|
9015
9025
|
);
|
|
9016
|
-
|
|
9026
|
+
W.data = C.featureCollection(h);
|
|
9017
9027
|
}
|
|
9018
9028
|
}
|
|
9019
|
-
if (
|
|
9020
|
-
const
|
|
9021
|
-
m = m.concat(
|
|
9029
|
+
if (W.data) {
|
|
9030
|
+
const h = this.handleBboxClip(W.data, O);
|
|
9031
|
+
m = m.concat(h);
|
|
9022
9032
|
}
|
|
9023
9033
|
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("height elapsed: ", b, ", total: ", M += b);
|
|
9024
9034
|
}
|
|
9025
9035
|
}
|
|
9026
9036
|
if (d === "current") {
|
|
9027
|
-
const
|
|
9028
|
-
if (
|
|
9029
|
-
if (!
|
|
9030
|
-
const
|
|
9031
|
-
for (const y in (
|
|
9032
|
-
const T =
|
|
9037
|
+
const W = this.weatherLayers[d].speed;
|
|
9038
|
+
if (W) {
|
|
9039
|
+
if (!W.data) {
|
|
9040
|
+
const R = [];
|
|
9041
|
+
for (const y in (s = W.raw) == null ? void 0 : s.Polygon) {
|
|
9042
|
+
const T = W.raw.Polygon[y];
|
|
9033
9043
|
for (const N of T)
|
|
9034
|
-
|
|
9044
|
+
R.push(
|
|
9035
9045
|
C.polygon(N, {
|
|
9036
9046
|
val: Number(y)
|
|
9037
9047
|
})
|
|
9038
9048
|
);
|
|
9039
9049
|
}
|
|
9040
|
-
|
|
9050
|
+
W.data = C.featureCollection(R);
|
|
9041
9051
|
}
|
|
9042
|
-
const
|
|
9043
|
-
m = m.concat(
|
|
9052
|
+
const h = p < this.zoom ? W.data.features.filter((R) => R.properties.val > 0.5) : W.data.features;
|
|
9053
|
+
m = m.concat(h), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("speed elapsed: ", b, ", total: ", M += b);
|
|
9044
9054
|
}
|
|
9045
9055
|
}
|
|
9046
9056
|
} else if (d === "wind") {
|
|
9047
9057
|
const L = this.weatherLayers.wind.raw;
|
|
9048
|
-
for (const
|
|
9049
|
-
if (
|
|
9050
|
-
const
|
|
9051
|
-
o > A ?
|
|
9052
|
-
if ((
|
|
9053
|
-
const T = C.point([
|
|
9054
|
-
val: L[
|
|
9055
|
-
spd: L[
|
|
9058
|
+
for (const W in L)
|
|
9059
|
+
if (W > t && W < q && (!(p <= this.zoom) || W % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
9060
|
+
const h = L[W].lng;
|
|
9061
|
+
o > A ? h.forEach((R, y) => {
|
|
9062
|
+
if ((R >= o && R <= 180 || R >= -180 && R <= A) && (!(p <= this.zoom) || R % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
9063
|
+
const T = C.point([R, W], {
|
|
9064
|
+
val: L[W].val[y],
|
|
9065
|
+
spd: L[W].spd[y]
|
|
9056
9066
|
});
|
|
9057
9067
|
m.push(T);
|
|
9058
9068
|
}
|
|
9059
|
-
}) :
|
|
9060
|
-
if (
|
|
9061
|
-
const T = C.point([
|
|
9062
|
-
val: L[
|
|
9063
|
-
spd: L[
|
|
9069
|
+
}) : h.forEach((R, y) => {
|
|
9070
|
+
if (R >= o && R <= A && (!(p <= this.zoom) || R % (p < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
9071
|
+
const T = C.point([R, W], {
|
|
9072
|
+
val: L[W].val[y],
|
|
9073
|
+
spd: L[W].spd[y]
|
|
9064
9074
|
});
|
|
9065
9075
|
m.push(T);
|
|
9066
9076
|
}
|
|
@@ -9073,26 +9083,26 @@ const Mz = {
|
|
|
9073
9083
|
else {
|
|
9074
9084
|
const L = this.weatherLayers[d].raw;
|
|
9075
9085
|
if (L) {
|
|
9076
|
-
const
|
|
9077
|
-
for (const
|
|
9078
|
-
const
|
|
9079
|
-
for (const y of
|
|
9080
|
-
|
|
9086
|
+
const W = [];
|
|
9087
|
+
for (const h in L.Polygon) {
|
|
9088
|
+
const R = L.Polygon[h];
|
|
9089
|
+
for (const y of R)
|
|
9090
|
+
W.push(
|
|
9081
9091
|
C.polygon(y, {
|
|
9082
|
-
val: Number(
|
|
9092
|
+
val: Number(h)
|
|
9083
9093
|
})
|
|
9084
9094
|
);
|
|
9085
9095
|
}
|
|
9086
|
-
for (const
|
|
9087
|
-
const
|
|
9088
|
-
for (const y of
|
|
9089
|
-
|
|
9096
|
+
for (const h in L.Point) {
|
|
9097
|
+
const R = L.Point[h];
|
|
9098
|
+
for (const y of R)
|
|
9099
|
+
W.push(
|
|
9090
9100
|
...C.points(y, {
|
|
9091
|
-
val: Number(
|
|
9101
|
+
val: Number(h)
|
|
9092
9102
|
}).features
|
|
9093
9103
|
);
|
|
9094
9104
|
}
|
|
9095
|
-
m = m.concat(
|
|
9105
|
+
m = m.concat(W);
|
|
9096
9106
|
}
|
|
9097
9107
|
}
|
|
9098
9108
|
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("sigWave elapsed: ", b, ", total: ", M += b);
|
|
@@ -9102,26 +9112,26 @@ const Mz = {
|
|
|
9102
9112
|
else {
|
|
9103
9113
|
const L = this.weatherLayers[d].raw;
|
|
9104
9114
|
if (L) {
|
|
9105
|
-
const
|
|
9106
|
-
for (const
|
|
9107
|
-
const
|
|
9108
|
-
for (const y of
|
|
9109
|
-
|
|
9115
|
+
const W = [];
|
|
9116
|
+
for (const h in L.LineString) {
|
|
9117
|
+
const R = L.LineString[h];
|
|
9118
|
+
for (const y of R)
|
|
9119
|
+
W.push(
|
|
9110
9120
|
C.lineString(y, {
|
|
9111
|
-
val: Number(
|
|
9121
|
+
val: Number(h)
|
|
9112
9122
|
})
|
|
9113
9123
|
);
|
|
9114
9124
|
}
|
|
9115
|
-
for (const
|
|
9116
|
-
L.Point[
|
|
9117
|
-
|
|
9118
|
-
C.point([
|
|
9119
|
-
val: L.Point[
|
|
9120
|
-
type: L.Point[
|
|
9125
|
+
for (const h in L.Point)
|
|
9126
|
+
L.Point[h].lng.forEach((R, y) => {
|
|
9127
|
+
R = M0.convertToStdLng(R), W.push(
|
|
9128
|
+
C.point([R, h], {
|
|
9129
|
+
val: L.Point[h].val[y],
|
|
9130
|
+
type: L.Point[h].type[y]
|
|
9121
9131
|
})
|
|
9122
9132
|
);
|
|
9123
9133
|
});
|
|
9124
|
-
m = m.concat(
|
|
9134
|
+
m = m.concat(W);
|
|
9125
9135
|
}
|
|
9126
9136
|
}
|
|
9127
9137
|
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("prmsl elapsed: ", b, ", total: ", M += b);
|
|
@@ -9131,17 +9141,17 @@ const Mz = {
|
|
|
9131
9141
|
else {
|
|
9132
9142
|
const L = this.weatherLayers[d].raw;
|
|
9133
9143
|
if (L) {
|
|
9134
|
-
const
|
|
9135
|
-
for (const
|
|
9136
|
-
const
|
|
9137
|
-
for (const y of
|
|
9138
|
-
|
|
9144
|
+
const W = [];
|
|
9145
|
+
for (const h in L.LineString) {
|
|
9146
|
+
const R = L.LineString[h];
|
|
9147
|
+
for (const y of R)
|
|
9148
|
+
W.push(
|
|
9139
9149
|
C.lineString(y, {
|
|
9140
|
-
val: Number(
|
|
9150
|
+
val: Number(h)
|
|
9141
9151
|
})
|
|
9142
9152
|
);
|
|
9143
9153
|
}
|
|
9144
|
-
m = m.concat(
|
|
9154
|
+
m = m.concat(W);
|
|
9145
9155
|
}
|
|
9146
9156
|
}
|
|
9147
9157
|
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M);
|
|
@@ -9179,8 +9189,8 @@ const Mz = {
|
|
|
9179
9189
|
this.handleBeforeLayerToggle();
|
|
9180
9190
|
},
|
|
9181
9191
|
handleBeforeLayerToggle() {
|
|
9182
|
-
var z, M, b, O, p, o, A, t, q, r, a, n,
|
|
9183
|
-
(z = this.map) != null && z.getLayer(this.beforeLayer) && ((M = this.activeWeatherLayers) != null && M.length || (b = this.otherLayers) != null && b["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"] || (t = this.otherLayers) != null && t.pirates || (q = this.otherLayers) != null && q.ports || (r = this.otherLayers) != null && r.enc || (a = this.otherLayers) != null && a.world12nm || (n = this.otherLayers) != null && n["voluntary-reporting-area"] || (
|
|
9192
|
+
var z, M, b, O, p, o, A, t, q, r, a, n, s, d;
|
|
9193
|
+
(z = this.map) != null && z.getLayer(this.beforeLayer) && ((M = this.activeWeatherLayers) != null && M.length || (b = this.otherLayers) != null && b["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"] || (t = this.otherLayers) != null && t.pirates || (q = this.otherLayers) != null && q.ports || (r = this.otherLayers) != null && r.enc || (a = this.otherLayers) != null && a.world12nm || (n = this.otherLayers) != null && n["voluntary-reporting-area"] || (s = this.otherLayers) != null && s["eca-zones"] || (d = this.otherLayers) != null && d["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
9184
9194
|
},
|
|
9185
9195
|
handleDateChange(z = { tropicals: !1 }) {
|
|
9186
9196
|
this.fetchWeatherLayers(z), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -9214,8 +9224,8 @@ const Mz = {
|
|
|
9214
9224
|
}
|
|
9215
9225
|
},
|
|
9216
9226
|
handle3dToggle(z) {
|
|
9217
|
-
var M, b, O, p, o, A, t, q, r, a, n,
|
|
9218
|
-
z ? (this.map.setProjection("globe"), this.mapProjection = "globe", (b = this.map) != null && b.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)), (t = this.map) != null && t.getLayer((A = this.viewport) == null ? void 0 : A.particleLayer) && ((q = this.map) != null && q.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((a = this.map) == null || a.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(), (
|
|
9227
|
+
var M, b, O, p, o, A, t, q, r, a, n, s, d, m, L, W, h, R, y, T;
|
|
9228
|
+
z ? (this.map.setProjection("globe"), this.mapProjection = "globe", (b = this.map) != null && b.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)), (t = this.map) != null && t.getLayer((A = this.viewport) == null ? void 0 : A.particleLayer) && ((q = this.map) != null && q.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((a = this.map) == null || a.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(), (s = this.map) != null && s.getLayer((n = this.viewport) == null ? void 0 : n.rampColorLayer) && ((d = this.map) != null && d.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((L = this.map) == null || L.moveLayer((m = this.viewport) == null ? void 0 : m.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (h = this.map) != null && h.getLayer((W = this.viewport) == null ? void 0 : W.particleLayer) && ((R = this.map) != null && R.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((T = this.map) == null || T.moveLayer((y = this.viewport) == null ? void 0 : y.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
9219
9229
|
},
|
|
9220
9230
|
handleParticle(z) {
|
|
9221
9231
|
this.particleFactor = z, this.weatherLayers[z.key] && (this.weatherLayers[z.key].particle = z.particle), this.activeWeatherLayers.map((O) => {
|
|
@@ -9239,7 +9249,7 @@ const Mz = {
|
|
|
9239
9249
|
};
|
|
9240
9250
|
function zz(z, M, b, O, p, o) {
|
|
9241
9251
|
var r0, s0, B0, W0, P, z0, t0, I, p0, l0, f0, R0, c0, e, i, u, B, X, D, Z, S, G, v0, P0, S0, k0, Q0;
|
|
9242
|
-
const A = E("IdmGlLayer"), t = E("IdmENC"), q = E("IdmWorld12nm"), r = E("IdmSigWave"), a = E("IdmSwell"), n = E("IdmPrmsl"),
|
|
9252
|
+
const A = E("IdmGlLayer"), t = E("IdmENC"), q = E("IdmWorld12nm"), r = E("IdmSigWave"), a = E("IdmSwell"), n = E("IdmPrmsl"), s = E("IdmIceberg"), d = E("IdmTropicals"), m = E("IdmCurrents"), L = E("IdmCurrentParticle"), W = E("IdmWindBarb"), h = E("IdmWindParticle"), R = E("IdmPrecip3h"), y = E("IdmVisibility"), T = E("IdmWaterTemp"), N = E("IdmTemp"), H = E("IdmArctic"), K = E("IdmWarZone"), V = E("IdmGmdssArea"), $ = E("IdmEcaZone"), g = E("IdmAlertZone"), x = E("IdmPort"), n0 = E("IdmLoadLine"), d0 = E("IdmTimezone"), i0 = E("IdmVRA"), u0 = E("IdmSpecialArea"), O0 = E("IdmTerminator"), h0 = E("IdmLatLng"), m0 = E("IdmMeasure"), L0 = E("IdmPoint");
|
|
9243
9253
|
return b.map ? (l(), f("div", bz, [
|
|
9244
9254
|
w(A, Q({
|
|
9245
9255
|
ref: "layer",
|
|
@@ -9295,7 +9305,7 @@ function zz(z, M, b, O, p, o) {
|
|
|
9295
9305
|
"before-layer": b.beforeLayer,
|
|
9296
9306
|
"active-weather-layers": p.activeWeatherLayers
|
|
9297
9307
|
}, z.$attrs), null, 16, ["map", "prmsl", "before-layer", "active-weather-layers"]),
|
|
9298
|
-
w(
|
|
9308
|
+
w(s, Q({
|
|
9299
9309
|
map: b.map,
|
|
9300
9310
|
iceberg: (z0 = p.weatherLayers) == null ? void 0 : z0.iceberg,
|
|
9301
9311
|
"before-layer": b.beforeLayer
|
|
@@ -9326,7 +9336,7 @@ function zz(z, M, b, O, p, o) {
|
|
|
9326
9336
|
"before-layer": b.beforeLayer,
|
|
9327
9337
|
"toggle-version": b.toggleVersion
|
|
9328
9338
|
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9329
|
-
w(
|
|
9339
|
+
w(W, Q({
|
|
9330
9340
|
ref: "windBarb",
|
|
9331
9341
|
map: b.map,
|
|
9332
9342
|
"map-projection": p.mapProjection,
|
|
@@ -9341,13 +9351,13 @@ function zz(z, M, b, O, p, o) {
|
|
|
9341
9351
|
"weather-layers": p.weatherLayers,
|
|
9342
9352
|
onParticle: o.handleParticle
|
|
9343
9353
|
}), null, 16, ["map", "map-projection", "wind", "current", "before-layer", "margin-bottom", "showWindFeather", "showWindParticle", "toggle-version", "weather-layers", "onParticle"]),
|
|
9344
|
-
w(
|
|
9354
|
+
w(h, Q({
|
|
9345
9355
|
viewport: p.viewport,
|
|
9346
9356
|
factor: (R0 = p.weatherLayers) == null ? void 0 : R0["wind-particle"],
|
|
9347
9357
|
"before-layer": b.beforeLayer,
|
|
9348
9358
|
"toggle-version": b.toggleVersion
|
|
9349
9359
|
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9350
|
-
w(
|
|
9360
|
+
w(R, Q({
|
|
9351
9361
|
viewport: p.viewport,
|
|
9352
9362
|
factor: (c0 = p.weatherLayers) == null ? void 0 : c0.precip3h,
|
|
9353
9363
|
"before-layer": b.beforeLayer,
|