@idmwx/idmui-gl3 4.0.7 → 4.0.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 +225 -223
- package/dist/index.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -535,8 +535,8 @@ class Oe {
|
|
|
535
535
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
536
536
|
*/
|
|
537
537
|
getBoundPixel() {
|
|
538
|
-
const e = this.map.getBounds(), t = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o, n] = this.convertNLng(r[0]), [s, c] = this.convertNLng(i[0]), [h, d] = this.mercator.px([o, r[1]], t), [p,
|
|
539
|
-
return [p,
|
|
538
|
+
const e = this.map.getBounds(), t = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o, n] = this.convertNLng(r[0]), [s, c] = this.convertNLng(i[0]), [h, d] = this.mercator.px([o, r[1]], t), [p, g] = this.mercator.px([s, i[1]], t), u = Math.round(this.mercator.size * Math.pow(2, t) * (n + c));
|
|
539
|
+
return [p, g, h + u, d];
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
542
542
|
* [视窗边界像素宽度]
|
|
@@ -707,14 +707,14 @@ class we {
|
|
|
707
707
|
if (t && r) {
|
|
708
708
|
e.resize(), t == null || t.viewport(0, 0, (c = t == null ? void 0 : t.canvas) == null ? void 0 : c.width, (h = t == null ? void 0 : t.canvas) == null ? void 0 : h.height), t.clearColor(0, 0, 0, 0), t.clear(t.COLOR_BUFFER_BIT | t.DEPTH_BUFFER_BIT);
|
|
709
709
|
try {
|
|
710
|
-
const d = t.getUniformLocation(r, "u_resolution"), p = t.getUniformLocation(r, "u_image"),
|
|
711
|
-
if (t.useProgram(r), t.uniform2f(d, t.canvas.width * e.ratio, t.canvas.height * e.ratio), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(p, 0), t.activeTexture(t.TEXTURE1), t.bindTexture(t.TEXTURE_2D, o), t.uniform1i(
|
|
712
|
-
const
|
|
713
|
-
t.uniform2f(
|
|
710
|
+
const d = t.getUniformLocation(r, "u_resolution"), p = t.getUniformLocation(r, "u_image"), g = t.getUniformLocation(r, "u_color");
|
|
711
|
+
if (t.useProgram(r), t.uniform2f(d, t.canvas.width * e.ratio, t.canvas.height * e.ratio), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(p, 0), t.activeTexture(t.TEXTURE1), t.bindTexture(t.TEXTURE_2D, o), t.uniform1i(g, 1), s != null && s.uvRange && (s != null && s.sRange)) {
|
|
712
|
+
const m = t.getUniformLocation(r, "u_range_u_v"), v = t.getUniformLocation(r, "u_range_s");
|
|
713
|
+
t.uniform2f(m, s.uvRange[0], s.uvRange[1]), t.uniform2f(v, s.sRange[0], s.sRange[1]);
|
|
714
714
|
}
|
|
715
|
-
const
|
|
716
|
-
for (const
|
|
717
|
-
const v = (
|
|
715
|
+
const u = e.getBoundPixel(), y = e.map.getZoom() + 1, f = e.getWorldCopy(u, y);
|
|
716
|
+
for (const m of f) {
|
|
717
|
+
const v = (m[0] - u[0]) * e.ratio, b = (m[1] - u[3]) * e.ratio, w = m[2] * e.ratio, [k, _, D, A] = [v, w + v, b, w + b], B = new Float32Array([k, D, _, D, k, A, k, A, _, D, _, A]);
|
|
718
718
|
t.bindBuffer(t.ARRAY_BUFFER, n), t.bufferData(t.ARRAY_BUFFER, B, t.STATIC_DRAW), t.drawArrays(t.TRIANGLES, 0, 6);
|
|
719
719
|
}
|
|
720
720
|
} catch (d) {
|
|
@@ -3663,20 +3663,20 @@ const Wa = {
|
|
|
3663
3663
|
var h;
|
|
3664
3664
|
let n = 0, s;
|
|
3665
3665
|
const c = a.filter((d) => {
|
|
3666
|
-
var p,
|
|
3667
|
-
return ((
|
|
3666
|
+
var p, g;
|
|
3667
|
+
return ((g = (p = d.properties) == null ? void 0 : p.category) == null ? void 0 : g.split("-")[0]) === o;
|
|
3668
3668
|
});
|
|
3669
3669
|
(h = c.filter((d) => {
|
|
3670
|
-
var p,
|
|
3671
|
-
return ((p = d.geometry) == null ? void 0 : p.type) === "LineString" && ((
|
|
3670
|
+
var p, g;
|
|
3671
|
+
return ((p = d.geometry) == null ? void 0 : p.type) === "LineString" && ((g = d.properties) == null ? void 0 : g.type) === "forecast";
|
|
3672
3672
|
})[0]) == null || h.properties.model, c.forEach((d, p) => {
|
|
3673
|
-
var
|
|
3674
|
-
((
|
|
3673
|
+
var g, u, y, f, m, v;
|
|
3674
|
+
((g = d.geometry) == null ? void 0 : g.type) === "Point" && ((u = d.properties) == null ? void 0 : u.type) === "history" && (n = p, s = s === void 0 ? p : s), ((y = d.geometry) == null ? void 0 : y.type) === "Point" && ((f = d.properties) == null ? void 0 : f.type) === "forecast" && s === void 0 && (s = p), ((m = d.geometry) == null ? void 0 : m.type) === "LineString" && ((v = d.properties) == null || v.type);
|
|
3675
3675
|
}), c.map((d, p) => {
|
|
3676
|
-
var
|
|
3677
|
-
if (((
|
|
3676
|
+
var g, u, y, f, m, v, b;
|
|
3677
|
+
if (((g = d.geometry) == null ? void 0 : g.type) === "LineString" && ((u = d.properties) == null || u.type), ((y = d.geometry) == null ? void 0 : y.type) === "Point" && ((f = d.properties) == null ? void 0 : f.type) === "forecast" && (d.properties.name = o, d.properties.format = Z(d.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((m = d.geometry) == null ? void 0 : m.type) === "Point" && ((v = d.properties) == null ? void 0 : v.type) === "history") {
|
|
3678
3678
|
d.properties.format = Z(d.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
3679
|
-
const w = Z((
|
|
3679
|
+
const w = Z((b = d.properties) == null ? void 0 : b.date).utc().format("HHmm") === Z().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm");
|
|
3680
3680
|
d.properties.showHistoryLabel = w || p === n, d.properties.showNameLabel = p === n, d.properties.name = o;
|
|
3681
3681
|
}
|
|
3682
3682
|
return d;
|
|
@@ -3721,9 +3721,9 @@ const Wa = {
|
|
|
3721
3721
|
}, 500);
|
|
3722
3722
|
else {
|
|
3723
3723
|
if (this.tropicals) {
|
|
3724
|
-
const
|
|
3725
|
-
let
|
|
3726
|
-
(a = this.map) != null && a.getSource(this.source) ? ((t = this.map) == null || t.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty),
|
|
3724
|
+
const g = (/* @__PURE__ */ new Date()).valueOf();
|
|
3725
|
+
let u = 0, y = 0;
|
|
3726
|
+
(a = this.map) != null && a.getSource(this.source) ? ((t = this.map) == null || t.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty), y = (/* @__PURE__ */ new Date()).valueOf() - (g + u), console.log("[tropicals] update elapsed: ", y, ", total: ", u += y)) : (this.map.addSource(this.source, {
|
|
3727
3727
|
type: "geojson",
|
|
3728
3728
|
data: (r = this.tropicals) != null && r.active ? (i = this.tropicals) == null ? void 0 : i.data : this.empty
|
|
3729
3729
|
}), this.map.addLayer({
|
|
@@ -3820,7 +3820,7 @@ const Wa = {
|
|
|
3820
3820
|
],
|
|
3821
3821
|
"text-halo-width": 4
|
|
3822
3822
|
}
|
|
3823
|
-
}),
|
|
3823
|
+
}), y = (/* @__PURE__ */ new Date()).valueOf() - (g + u), console.log("[tropical] add elapsed: ", y, ", total: ", u += y)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((s = this.map) == null || s.getSource(this.clusterSource).setData((n = this.tropicals) != null && n.active ? this.tropicals.data : this.empty), y = (/* @__PURE__ */ new Date()).valueOf() - (g + u), console.log("[tropical] update elapsed: ", y, ", total: ", u += y)) : (this.map.addSource(this.clusterSource, {
|
|
3824
3824
|
type: "geojson",
|
|
3825
3825
|
data: (c = this.tropicals) != null && c.active ? (h = this.tropicals) == null ? void 0 : h.data : this.empty
|
|
3826
3826
|
// cluster: true,
|
|
@@ -3937,11 +3937,13 @@ const Wa = {
|
|
|
3937
3937
|
"text-halo-color": "#0033ff",
|
|
3938
3938
|
"text-halo-width": 4
|
|
3939
3939
|
}
|
|
3940
|
-
}),
|
|
3940
|
+
}), y = (/* @__PURE__ */ new Date()).valueOf() - (g + u), console.log("[tropical] add elapsed: ", y, ", total: ", u += y));
|
|
3941
3941
|
}
|
|
3942
3942
|
this.handleDrawCircle();
|
|
3943
3943
|
const d = qe.interpolate(this.tropicals, 1);
|
|
3944
|
-
this.interpolateData = JSON.parse(JSON.stringify(d))
|
|
3944
|
+
this.interpolateData = JSON.parse(JSON.stringify(d));
|
|
3945
|
+
const p = this.interpolateData.filter((g) => g.properties.name === "kristy" && g.properties.model === "ecmwf");
|
|
3946
|
+
console.log(p), this.handleDateChange();
|
|
3945
3947
|
}
|
|
3946
3948
|
},
|
|
3947
3949
|
handleClear() {
|
|
@@ -3949,7 +3951,7 @@ const Wa = {
|
|
|
3949
3951
|
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), (a = this.interpolateMarkers) == null || a.forEach((e) => e == null ? void 0 : e.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));
|
|
3950
3952
|
},
|
|
3951
3953
|
handleDateChange() {
|
|
3952
|
-
var a, e, t, r, i, o, n, s, c, h, d, p,
|
|
3954
|
+
var a, e, t, r, i, o, n, s, c, h, d, p, g, u, y, f, m, v, b, w, k, _, D, A, B, W, O, J, de, pe, me, ue, ye, fe, ge, ae;
|
|
3953
3955
|
if ((a = this.interpolateMarkers) == null || a.forEach((X) => X == null ? void 0 : X.remove()), this.circleSourceData.features = [], (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
3954
3956
|
const X = Z(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), Y = this.interpolateData.filter((E) => E.properties.date === X.format() && !E.properties.disabled), be = this.handleComputePolygons(Y), Q = C.featureCollection([...Y]);
|
|
3955
3957
|
be.forEach((E) => {
|
|
@@ -3971,7 +3973,7 @@ const Wa = {
|
|
|
3971
3973
|
for (const E of Y)
|
|
3972
3974
|
if (!E.properties.disabled) {
|
|
3973
3975
|
let U = "#f44336";
|
|
3974
|
-
((s = (n = E.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 || !((h = (c = E.properties) == null ? void 0 : c.wind) != null && h.spd) ? U = "#03f869" : ((p = (d = E.properties) == null ? void 0 : d.wind) == null ? void 0 : p.spd) >= 17.2 && ((
|
|
3976
|
+
((s = (n = E.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 || !((h = (c = E.properties) == null ? void 0 : c.wind) != null && h.spd) ? U = "#03f869" : ((p = (d = E.properties) == null ? void 0 : d.wind) == null ? void 0 : p.spd) >= 17.2 && ((u = (g = E.properties) == null ? void 0 : g.wind) == null ? void 0 : u.spd) < 24.5 ? U = "#f2f202" : ((f = (y = E.properties) == null ? void 0 : y.wind) == null ? void 0 : f.spd) >= 24.5 && ((v = (m = E.properties) == null ? void 0 : m.wind) == null ? void 0 : v.spd) < 32.7 ? U = "#ff9100" : ((w = (b = E.properties) == null ? void 0 : b.wind) == null ? void 0 : w.spd) >= 32.7 && ((_ = (k = E.properties) == null ? void 0 : k.wind) == null ? void 0 : _.spd) < 41.5 ? U = "#f44336" : ((A = (D = E.properties) == null ? void 0 : D.wind) == null ? void 0 : A.spd) >= 41.5 && ((W = (B = E.properties) == null ? void 0 : B.wind) == null ? void 0 : W.spd) < 51 ? U = "#f903d0" : ((J = (O = E.properties) == null ? void 0 : O.wind) == null ? void 0 : J.spd) >= 51 ? U = "#8702f9" : U = "#f44336";
|
|
3975
3977
|
const ve = `<svg t="1719918955501"
|
|
3976
3978
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
3977
3979
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -4005,28 +4007,28 @@ const Wa = {
|
|
|
4005
4007
|
(ge = this.map) != null && ge.getSource(this.interpolateSource) && ((ae = this.map) == null || ae.getSource(this.interpolateSource).setData(this.empty));
|
|
4006
4008
|
},
|
|
4007
4009
|
handleClick(a) {
|
|
4008
|
-
var o, n, s, c, h, d, p,
|
|
4010
|
+
var o, n, s, c, h, d, p, g;
|
|
4009
4011
|
const e = a.features[0], t = (n = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : n.features.filter(
|
|
4010
|
-
(
|
|
4011
|
-
var
|
|
4012
|
-
return
|
|
4012
|
+
(u) => {
|
|
4013
|
+
var y;
|
|
4014
|
+
return u.geometry.type === "LineString" && u.properties.type === "forecast" && u.properties.name === ((y = e == null ? void 0 : e.properties) == null ? void 0 : y.name);
|
|
4013
4015
|
}
|
|
4014
4016
|
);
|
|
4015
|
-
t.sort((
|
|
4016
|
-
var
|
|
4017
|
-
return ((
|
|
4017
|
+
t.sort((u, y) => {
|
|
4018
|
+
var f, m, v, b;
|
|
4019
|
+
return ((f = u.properties) == null ? void 0 : f.model) === "cma" ? -1 : ((m = u.properties) == null ? void 0 : m.model) === "jma" ? ((v = y.properties) == null ? void 0 : v.model) === "cma" ? 1 : -1 : u.properties.model === "ecmwf" ? ["jma", "cma"].includes((b = y.properties) == null ? void 0 : b.model) ? 1 : -1 : 0;
|
|
4018
4020
|
});
|
|
4019
4021
|
const r = (c = (s = this.tropicals) == null ? void 0 : s.data) == null ? void 0 : c.features.filter(
|
|
4020
|
-
(
|
|
4021
|
-
var
|
|
4022
|
-
return
|
|
4022
|
+
(u) => {
|
|
4023
|
+
var y;
|
|
4024
|
+
return u.geometry.type === "LineString" && u.properties.type === "history" && u.properties.name === ((y = e == null ? void 0 : e.properties) == null ? void 0 : y.name);
|
|
4023
4025
|
}
|
|
4024
4026
|
);
|
|
4025
4027
|
this.activeTropicals = {
|
|
4026
4028
|
name: (h = e == null ? void 0 : e.properties) == null ? void 0 : h.name,
|
|
4027
|
-
forecasts: t.map((
|
|
4029
|
+
forecasts: t.map((u) => u.properties),
|
|
4028
4030
|
history: (d = r[0]) == null ? void 0 : d.properties,
|
|
4029
|
-
showCircle: (
|
|
4031
|
+
showCircle: (g = (p = t[0]) == null ? void 0 : p.properties) == null ? void 0 : g.showCircle
|
|
4030
4032
|
}, this.showTropicals = !0;
|
|
4031
4033
|
const i = document.getElementById("active-tropical");
|
|
4032
4034
|
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([a.lngLat.lng, a.lngLat.lat]) : this.activeTropicalsMarker = new ne.Marker(i).setLngLat([a.lngLat.lng, a.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
@@ -4114,7 +4116,7 @@ const Wa = {
|
|
|
4114
4116
|
return C.lineToPolygon(i, { properties: t });
|
|
4115
4117
|
}
|
|
4116
4118
|
}
|
|
4117
|
-
}, je = (a) => (H("data-v-
|
|
4119
|
+
}, je = (a) => (H("data-v-d9e29e39"), a = a(), G(), a), Oa = {
|
|
4118
4120
|
id: "active-tropical",
|
|
4119
4121
|
class: "active-tropical"
|
|
4120
4122
|
}, ja = { class: "header-box" }, Fa = { class: "main" }, Ua = { key: 0 }, Va = { class: "sub" }, Za = {
|
|
@@ -4129,9 +4131,9 @@ const Wa = {
|
|
|
4129
4131
|
}, Ya = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", null, "Pressure : ", -1)), Qa = { class: "row" }, Ka = {
|
|
4130
4132
|
class: "col col-24",
|
|
4131
4133
|
style: { "justify-content": "flex-start" }
|
|
4132
|
-
}, ei = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), ti = { class: "forecast-models" }, ai = ["onClick"], ii = /* @__PURE__ */ it('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-
|
|
4134
|
+
}, ei = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), ti = { class: "forecast-models" }, ai = ["onClick"], ii = /* @__PURE__ */ it('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-d9e29e39></div><div class="row" style="padding:2px 10px;" data-v-d9e29e39><div class="legend" data-v-d9e29e39><div class="icon td" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TD</div></div><div class="legend" data-v-d9e29e39><div class="icon ts" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TS</div></div><div class="legend" data-v-d9e29e39><div class="icon sts" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>STS</div></div><div class="legend" data-v-d9e29e39><div class="icon ty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TY</div></div><div class="legend" data-v-d9e29e39><div class="icon sty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>STY</div></div><div class="legend" data-v-d9e29e39><div class="icon supper-ty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-d9e29e39><div class="legend" data-v-d9e29e39><div class="icon history" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>History</div></div><div class="legend" data-v-d9e29e39><div class="icon r7" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>35kts Radii</div></div><div class="legend" data-v-d9e29e39><div class="icon r10" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>50kts Radii</div></div></div>', 3), ri = { class: "more" };
|
|
4133
4135
|
function oi(a, e, t, r, i, o) {
|
|
4134
|
-
var n, s, c, h, d, p,
|
|
4136
|
+
var n, s, c, h, d, p, g, u, y, f, m, v, b, w, k;
|
|
4135
4137
|
return Me((L(), x("div", Oa, [
|
|
4136
4138
|
l("div", ja, [
|
|
4137
4139
|
l("div", {
|
|
@@ -4142,18 +4144,18 @@ function oi(a, e, t, r, i, o) {
|
|
|
4142
4144
|
(s = (n = i.activeTropicals) == null ? void 0 : n.history) != null && s.level ? (L(), x("span", Ua, S((h = (c = i.activeTropicals) == null ? void 0 : c.history) == null ? void 0 : h.level) + " , ", 1)) : $("", !0),
|
|
4143
4145
|
Xe(S((d = i.activeTropicals) == null ? void 0 : d.name), 1)
|
|
4144
4146
|
]),
|
|
4145
|
-
l("div", Va, " Last update: " + S(o.computeTime(((
|
|
4147
|
+
l("div", Va, " Last update: " + S(o.computeTime(((g = (p = i.activeTropicals) == null ? void 0 : p.history) == null ? void 0 : g.updated) || ((f = (y = (u = i.activeTropicals) == null ? void 0 : u.forecasts) == null ? void 0 : y.filter((_) => !_.disabled)[0]) == null ? void 0 : f.date))), 1)
|
|
4146
4148
|
]),
|
|
4147
4149
|
l("div", Za, [
|
|
4148
4150
|
l("div", Ha, [
|
|
4149
4151
|
l("div", Ga, [
|
|
4150
4152
|
l("div", Ja, [
|
|
4151
4153
|
Xa,
|
|
4152
|
-
l("span", null, S(((v = (
|
|
4154
|
+
l("span", null, S(((v = (m = i.activeTropicals) == null ? void 0 : m.history) == null ? void 0 : v.kts) || "-") + "[kts]", 1)
|
|
4153
4155
|
]),
|
|
4154
4156
|
l("div", qa, [
|
|
4155
4157
|
Ya,
|
|
4156
|
-
l("span", null, S(((w = (
|
|
4158
|
+
l("span", null, S(((w = (b = i.activeTropicals) == null ? void 0 : b.history) == null ? void 0 : w.pressure) || "-") + "[hPa]", 1)
|
|
4157
4159
|
])
|
|
4158
4160
|
]),
|
|
4159
4161
|
l("div", Qa, [
|
|
@@ -4192,7 +4194,7 @@ function oi(a, e, t, r, i, o) {
|
|
|
4192
4194
|
[$e, i.showTropicals && !a.$attrs.hideTropicalsLegend]
|
|
4193
4195
|
]);
|
|
4194
4196
|
}
|
|
4195
|
-
const Ye = /* @__PURE__ */ T(Wa, [["render", oi], ["__scopeId", "data-v-
|
|
4197
|
+
const Ye = /* @__PURE__ */ T(Wa, [["render", oi], ["__scopeId", "data-v-d9e29e39"]]);
|
|
4196
4198
|
const si = {
|
|
4197
4199
|
name: "IdmPrecip3h",
|
|
4198
4200
|
props: {
|
|
@@ -4833,7 +4835,7 @@ const dr = {
|
|
|
4833
4835
|
return function(a) {
|
|
4834
4836
|
if (a) {
|
|
4835
4837
|
const e = Z(a).utc().utcOffset(this.timeZone), t = this.timeZone < 0 ? this.timeZone : "+" + this.timeZone;
|
|
4836
|
-
return `${e.format("MMM-DD,HHmm
|
|
4838
|
+
return `${e.format("MMM-DD,HHmm")} ( UTC ${t} )`;
|
|
4837
4839
|
}
|
|
4838
4840
|
return "-";
|
|
4839
4841
|
};
|
|
@@ -4872,7 +4874,7 @@ const dr = {
|
|
|
4872
4874
|
}
|
|
4873
4875
|
}
|
|
4874
4876
|
}
|
|
4875
|
-
}, q = (a) => (H("data-v-
|
|
4877
|
+
}, q = (a) => (H("data-v-22c5d8c1"), a = a(), G(), a), pr = {
|
|
4876
4878
|
id: "point-meteo",
|
|
4877
4879
|
class: "point-meteo"
|
|
4878
4880
|
}, mr = { class: "meteo-box" }, ur = { class: "header-box" }, yr = { class: "main" }, fr = { class: "sub" }, gr = { class: "main-box" }, br = { class: "flex-space" }, vr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Wind", -1)), _r = { class: "flex-space" }, wr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Wind.Wave", -1)), Lr = { class: "flex-space" }, xr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Swell", -1)), Cr = { class: "flex-space" }, Sr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Sig.Wave", -1)), kr = { class: "flex-space" }, zr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Current", -1)), Pr = { class: "flex-space" }, Tr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Precip", -1)), Er = { class: "flex-space" }, Ir = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Visibility", -1)), Rr = { class: "flex-space" }, Dr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Temp", -1)), Ar = { class: "flex-space" }, Mr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Water Temp", -1)), $r = {
|
|
@@ -4883,7 +4885,7 @@ const dr = {
|
|
|
4883
4885
|
Br
|
|
4884
4886
|
];
|
|
4885
4887
|
function Wr(a, e, t, r, i, o) {
|
|
4886
|
-
var n, s, c, h, d, p,
|
|
4888
|
+
var n, s, c, h, d, p, g, u, y, f, m, v, b, w, k, _, D, A, B, W, O, J, de, pe, me, ue, ye, fe, ge, ae, X, Y, be, Q, E, U, ve, K, _e, ie, re, oe, ke, ze, Pe, Te, Ee;
|
|
4887
4889
|
return Me((L(), x("div", pr, [
|
|
4888
4890
|
l("div", mr, [
|
|
4889
4891
|
l("div", ur, [
|
|
@@ -4897,11 +4899,11 @@ function Wr(a, e, t, r, i, o) {
|
|
|
4897
4899
|
l("div", gr, [
|
|
4898
4900
|
l("div", br, [
|
|
4899
4901
|
vr,
|
|
4900
|
-
l("span", null, S(((d = (h = t.meteo) == null ? void 0 : h.wind) == null ? void 0 : d.direction) || "-") + "/" + S(o.roundPrecision((
|
|
4902
|
+
l("span", null, S(((d = (h = t.meteo) == null ? void 0 : h.wind) == null ? void 0 : d.direction) || "-") + "/" + S(o.roundPrecision((g = (p = t.meteo) == null ? void 0 : p.wind) == null ? void 0 : g.kts, 1)) + "[kts]/" + S((y = (u = t.meteo) == null ? void 0 : u.wind) == null ? void 0 : y.scale) + "[BF]/" + S(o.roundPrecision((m = (f = t.meteo) == null ? void 0 : f.gusts) == null ? void 0 : m.kts, 1)) + "[kts]", 1)
|
|
4901
4903
|
]),
|
|
4902
4904
|
l("div", _r, [
|
|
4903
4905
|
wr,
|
|
4904
|
-
l("span", null, S(((w = (
|
|
4906
|
+
l("span", null, S(((w = (b = (v = t.meteo) == null ? void 0 : v.wave) == null ? void 0 : b.wd) == null ? void 0 : w.direction) || "-") + "/" + S(o.roundPrecision((D = (_ = (k = t.meteo) == null ? void 0 : k.wave) == null ? void 0 : _.wd) == null ? void 0 : D.height, 1)) + "[m]/" + S(o.roundPrecision((W = (B = (A = t.meteo) == null ? void 0 : A.wave) == null ? void 0 : B.wd) == null ? void 0 : W.period, 1)) + "[s]", 1)
|
|
4905
4907
|
]),
|
|
4906
4908
|
l("div", Lr, [
|
|
4907
4909
|
xr,
|
|
@@ -4938,7 +4940,7 @@ function Wr(a, e, t, r, i, o) {
|
|
|
4938
4940
|
[$e, i.showMeteo]
|
|
4939
4941
|
]);
|
|
4940
4942
|
}
|
|
4941
|
-
const Or = /* @__PURE__ */ T(dr, [["render", Wr], ["__scopeId", "data-v-
|
|
4943
|
+
const Or = /* @__PURE__ */ T(dr, [["render", Wr], ["__scopeId", "data-v-22c5d8c1"]]), jr = {
|
|
4942
4944
|
name: "IdmWarZone",
|
|
4943
4945
|
props: {
|
|
4944
4946
|
map: {
|
|
@@ -6222,24 +6224,24 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6222
6224
|
var t, r, i, o, n, s, c, h, d, p;
|
|
6223
6225
|
const e = (r = (t = a.target) == null ? void 0 : t._element) == null ? void 0 : r.id;
|
|
6224
6226
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6225
|
-
const
|
|
6226
|
-
this.pointMarkers[
|
|
6227
|
+
const g = this.geojson.filter((m) => m.id === e.split("-")[0])[0];
|
|
6228
|
+
this.pointMarkers[g.id].filter((m) => {
|
|
6227
6229
|
var v;
|
|
6228
|
-
return ((v =
|
|
6230
|
+
return ((v = m._element) == null ? void 0 : v.id) === e;
|
|
6229
6231
|
})[0].setLngLat([(o = (i = a.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (s = (n = a.target) == null ? void 0 : n._lngLat) == null ? void 0 : s.lat]);
|
|
6230
|
-
let
|
|
6231
|
-
|
|
6232
|
-
if (
|
|
6233
|
-
|
|
6232
|
+
let y;
|
|
6233
|
+
g.features.forEach((m, v) => {
|
|
6234
|
+
if (m.geometry.type === "Point" && m.properties.id == e.split("-")[1]) {
|
|
6235
|
+
y = v;
|
|
6234
6236
|
return;
|
|
6235
6237
|
}
|
|
6236
6238
|
});
|
|
6237
|
-
const
|
|
6239
|
+
const f = g.features.filter((m) => m.geometry.type === "Point");
|
|
6238
6240
|
this.handleTmpPointUpdate(
|
|
6239
|
-
|
|
6240
|
-
y
|
|
6241
|
-
{ lng: (h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, lat: (p = (d = a.target) == null ? void 0 : d._lngLat) == null ? void 0 : p.lat, properties: y
|
|
6242
|
-
|
|
6241
|
+
g,
|
|
6242
|
+
f[y - 1],
|
|
6243
|
+
{ lng: (h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, lat: (p = (d = a.target) == null ? void 0 : d._lngLat) == null ? void 0 : p.lat, properties: f[y].properties },
|
|
6244
|
+
y === f.length - 1 ? void 0 : f[y + 1]
|
|
6243
6245
|
);
|
|
6244
6246
|
}
|
|
6245
6247
|
},
|
|
@@ -6247,13 +6249,13 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6247
6249
|
var t, r, i, o, n, s, c, h, d, p;
|
|
6248
6250
|
const e = (r = (t = a.target) == null ? void 0 : t._element) == null ? void 0 : r.id;
|
|
6249
6251
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6250
|
-
const
|
|
6251
|
-
this.pointMarkers[
|
|
6252
|
-
var
|
|
6253
|
-
return ((
|
|
6252
|
+
const g = this.geojson.filter((f) => f.id === e.split("-")[0])[0];
|
|
6253
|
+
this.pointMarkers[g.id].filter((f) => {
|
|
6254
|
+
var m;
|
|
6255
|
+
return ((m = f._element) == null ? void 0 : m.id) === e;
|
|
6254
6256
|
})[0].setLngLat([(o = (i = a.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (s = (n = a.target) == null ? void 0 : n._lngLat) == null ? void 0 : s.lat]);
|
|
6255
|
-
const
|
|
6256
|
-
|
|
6257
|
+
const y = g.features.filter((f) => f.geometry.type === "Point" && f.properties.id == e.split("-")[1])[0];
|
|
6258
|
+
y.geometry.coordinates = [(h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, (p = (d = a.target) == null ? void 0 : d._lngLat) == null ? void 0 : p.lat], g.features = g.features.filter((f) => f.geometry.type === "Point"), this.handlePointUpdate(g);
|
|
6257
6259
|
}
|
|
6258
6260
|
},
|
|
6259
6261
|
handleContextmenu(a) {
|
|
@@ -6302,10 +6304,10 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6302
6304
|
for (let i = 1; i < e.length; i++) {
|
|
6303
6305
|
const o = e[i - 1], n = e[i], s = o.properties, c = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, h = { lng: n.geometry.coordinates[0], lat: n.geometry.coordinates[1] }, d = te.calculateDistance(c, h, s.mode === "RL", 2), p = te.calculateBearing(c, h, s.mode === "RL", 2);
|
|
6304
6306
|
t = j.roundPrecision(t + d, 2);
|
|
6305
|
-
let
|
|
6306
|
-
s.mode === "RL" ?
|
|
6307
|
-
const
|
|
6308
|
-
|
|
6307
|
+
let g;
|
|
6308
|
+
s.mode === "RL" ? g = j.convertToMonotonicLng([c, h]) : g = j.convertToMonotonicLng(te.interpolateCoordinates(c, h, 200));
|
|
6309
|
+
const u = C.lineString(g.map((y) => [y.lng, y.lat]));
|
|
6310
|
+
u.properties.dist = d, u.properties.bearing = p, u.properties.total = t, r.push(u);
|
|
6309
6311
|
}
|
|
6310
6312
|
e.push(...r), a.total = t;
|
|
6311
6313
|
}
|
|
@@ -6319,16 +6321,16 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6319
6321
|
o = te.calculateDistance(h, d, c.mode === "RL", 2), n = te.calculateBearing(h, d, c.mode === "RL", 2);
|
|
6320
6322
|
let p;
|
|
6321
6323
|
c.mode === "RL" ? p = j.convertToMonotonicLng([h, d]) : p = j.convertToMonotonicLng(te.interpolateCoordinates(h, d, 200));
|
|
6322
|
-
const
|
|
6323
|
-
|
|
6324
|
+
const g = C.lineString(p.map((u) => [u.lng, u.lat]));
|
|
6325
|
+
g.properties.dist = o, g.properties.bearing = n, i.features.push(g);
|
|
6324
6326
|
}
|
|
6325
6327
|
if (r) {
|
|
6326
6328
|
const c = t.properties, h = t, d = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
6327
6329
|
o = te.calculateDistance(h, d, c.mode === "RL", 2), n = te.calculateBearing(h, d, c.mode === "RL", 2);
|
|
6328
6330
|
let p;
|
|
6329
6331
|
c.mode === "RL" ? p = j.convertToMonotonicLng([h, d]) : p = j.convertToMonotonicLng(te.interpolateCoordinates(h, d, 200));
|
|
6330
|
-
const
|
|
6331
|
-
|
|
6332
|
+
const g = C.lineString(p.map((u) => [u.lng, u.lat]));
|
|
6333
|
+
g.properties.dist = o, g.properties.bearing = n, i.features.push(g);
|
|
6332
6334
|
}
|
|
6333
6335
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(i) : this.map.addSource(this.tmpSource, {
|
|
6334
6336
|
type: "geojson",
|
|
@@ -6440,11 +6442,11 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6440
6442
|
}
|
|
6441
6443
|
},
|
|
6442
6444
|
handleClear(a, e = !0) {
|
|
6443
|
-
var o, n, s, c, h, d, p,
|
|
6445
|
+
var o, n, s, c, h, d, p, g, u;
|
|
6444
6446
|
const t = `${a.id}-${this.source}`, r = `${a.id}-${this.layer}`, i = `${a.id}-${this.labelLayer}`;
|
|
6445
|
-
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (n = this.map) != null && n.getLayer(i) && this.map.removeLayer(i), (s = this.map) != null && s.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (c = this.map) != null && c.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (h = this.closeMarkers[a.id]) == null || h.remove(), this.closeMarkers[a.id] = void 0, (d = this.pointMarkers[a.id]) == null || d.forEach((
|
|
6446
|
-
|
|
6447
|
-
}), this.pointMarkers[a.id] = [], (p = this.tipMarker) == null || p.remove(), this.tipMarker = void 0, e && ((
|
|
6447
|
+
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (n = this.map) != null && n.getLayer(i) && this.map.removeLayer(i), (s = this.map) != null && s.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (c = this.map) != null && c.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (h = this.closeMarkers[a.id]) == null || h.remove(), this.closeMarkers[a.id] = void 0, (d = this.pointMarkers[a.id]) == null || d.forEach((y) => {
|
|
6448
|
+
y == null || y.remove();
|
|
6449
|
+
}), this.pointMarkers[a.id] = [], (p = this.tipMarker) == null || p.remove(), this.tipMarker = void 0, e && ((g = this.map) != null && g.getSource(t)) && this.map.removeSource(t), e && ((u = this.map) != null && u.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
6448
6450
|
}
|
|
6449
6451
|
}
|
|
6450
6452
|
};
|
|
@@ -6631,10 +6633,10 @@ const Ho = {
|
|
|
6631
6633
|
},
|
|
6632
6634
|
activeWeatherLayers: {
|
|
6633
6635
|
handler() {
|
|
6634
|
-
var a, e, t, r, i, o, n, s, c, h, d, p,
|
|
6636
|
+
var a, e, t, r, i, o, n, s, c, h, d, p, g, u, y, f, m, v;
|
|
6635
6637
|
if (!this.map)
|
|
6636
6638
|
return !1;
|
|
6637
|
-
this.activeWeatherLayers.length > 0 ? ((e = (a = this.map) == null ? void 0 : a.getLayer(this.enc)) == null || e.setLayoutProperty("visibility", "none"), (r = (t = this.map) == null ? void 0 : t.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || r.setLayoutProperty("visibility", "visible"), (o = this.map) != null && o.getLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer) && ((n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((c = this.map) == null || c.moveLayer((s = this.viewport) == null ? void 0 : s.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (d = this.map) != null && d.getLayer((h = this.viewport) == null ? void 0 : h.particleLayer) && ((p = this.map) != null && p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((
|
|
6639
|
+
this.activeWeatherLayers.length > 0 ? ((e = (a = this.map) == null ? void 0 : a.getLayer(this.enc)) == null || e.setLayoutProperty("visibility", "none"), (r = (t = this.map) == null ? void 0 : t.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || r.setLayoutProperty("visibility", "visible"), (o = this.map) != null && o.getLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer) && ((n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((c = this.map) == null || c.moveLayer((s = this.viewport) == null ? void 0 : s.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (d = this.map) != null && d.getLayer((h = this.viewport) == null ? void 0 : h.particleLayer) && ((p = this.map) != null && p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((u = this.map) == null || u.moveLayer((g = this.viewport) == null ? void 0 : g.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : ((f = (y = this.map) == null ? void 0 : y.getLayer(this.enc)) == null || f.setLayoutProperty("visibility", "visible"), (v = (m = this.map) == null ? void 0 : m.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || v.setLayoutProperty("visibility", "none"));
|
|
6638
6640
|
},
|
|
6639
6641
|
immediate: !0
|
|
6640
6642
|
}
|
|
@@ -6685,32 +6687,32 @@ const Ho = {
|
|
|
6685
6687
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
6686
6688
|
let t = 0, r = 0;
|
|
6687
6689
|
if (this.map) {
|
|
6688
|
-
const
|
|
6690
|
+
const g = ((i = this.map) == null ? void 0 : i.getZoom()) + 1, u = (o = this.map) == null ? void 0 : o.getBounds(), y = `${u._sw.lng},${u._sw.lat},${u._ne.lng},${u._ne.lat}`;
|
|
6689
6691
|
if (this.handleRampColorState(), this.particleFactor) {
|
|
6690
|
-
const
|
|
6692
|
+
const f = We.WEATHER_LAYERS.find((m) => {
|
|
6691
6693
|
var v;
|
|
6692
|
-
return ((v =
|
|
6694
|
+
return ((v = m.peer) == null ? void 0 : v.weight) === this.particleFactor.weight;
|
|
6693
6695
|
});
|
|
6694
|
-
this.particleFactor.particle ? this.weatherWeight = this.weatherWeight &
|
|
6696
|
+
this.particleFactor.particle ? this.weatherWeight = this.weatherWeight & f.weight ? this.weatherWeight : this.weatherWeight + f.weight : this.weatherWeight = this.weatherWeight & f.weight ? this.weatherWeight - f.weight : this.weatherWeight;
|
|
6695
6697
|
}
|
|
6696
6698
|
if (this.weatherWeight > 0) {
|
|
6697
|
-
let
|
|
6698
|
-
if (a.tropicals || this.weatherWeight & 256 && (
|
|
6699
|
-
const v = await se.get(`${this.gateway}/api/arc/weather/layers/links?l=${
|
|
6699
|
+
let f = this.weatherWeight, m;
|
|
6700
|
+
if (a.tropicals || this.weatherWeight & 256 && (m = this.weatherLayers.tropicals, m && (f -= 256, m.version = Math.random() + 1)), f > 0) {
|
|
6701
|
+
const v = await se.get(`${this.gateway}/api/arc/weather/layers/links?l=${f}&v=${this.source}&z=${g}&bbox=${y}&t=${this.ts}`, {
|
|
6700
6702
|
headers: {
|
|
6701
6703
|
Authorization: this.token || this.defaultMeteoToken
|
|
6702
6704
|
}
|
|
6703
6705
|
});
|
|
6704
6706
|
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + t), console.log("weather links elapsed: ", r, ", total: ", t += r), ((n = v == null ? void 0 : v.data) == null ? void 0 : n.code) === 0) {
|
|
6705
|
-
const
|
|
6706
|
-
for (const _ in
|
|
6707
|
-
_ === "ice-edge" && (
|
|
6708
|
-
se.get(
|
|
6707
|
+
const b = (s = v == null ? void 0 : v.data) == null ? void 0 : s.data, w = [];
|
|
6708
|
+
for (const _ in b)
|
|
6709
|
+
_ === "ice-edge" && (b[_] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), _ !== "tropicals" && w.push(
|
|
6710
|
+
se.get(b[_], {
|
|
6709
6711
|
headers: {
|
|
6710
6712
|
Authorization: this.token || this.defaultMeteoToken,
|
|
6711
6713
|
key: _
|
|
6712
6714
|
},
|
|
6713
|
-
responseType: /\.(jpg|png)$/.test(
|
|
6715
|
+
responseType: /\.(jpg|png)$/.test(b[_]) ? "blob" : "json"
|
|
6714
6716
|
}).catch((D) => {
|
|
6715
6717
|
console.log(`[${_}] fetch layer error: ${D}`);
|
|
6716
6718
|
})
|
|
@@ -6724,7 +6726,7 @@ const Ho = {
|
|
|
6724
6726
|
type: ((J = _ == null ? void 0 : _.config) == null ? void 0 : J.responseType) === "blob" ? "image" : "json",
|
|
6725
6727
|
etime: this.ts
|
|
6726
6728
|
});
|
|
6727
|
-
}),
|
|
6729
|
+
}), b.tropicals && se.get(b.tropicals, {
|
|
6728
6730
|
headers: {
|
|
6729
6731
|
Authorization: this.token || this.defaultMeteoToken,
|
|
6730
6732
|
key: "tropicals"
|
|
@@ -6743,25 +6745,25 @@ const Ho = {
|
|
|
6743
6745
|
});
|
|
6744
6746
|
}
|
|
6745
6747
|
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + t), console.log("weather layers elapsed: ", r, ", total: ", t += r), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
|
|
6746
|
-
const
|
|
6748
|
+
const b = (c = this.weatherLayers["swell-direction"]) == null ? void 0 : c.raw, w = (h = this.weatherLayers["swell-height"]) == null ? void 0 : h.raw;
|
|
6747
6749
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
6748
6750
|
type: "json",
|
|
6749
|
-
direction:
|
|
6751
|
+
direction: b,
|
|
6750
6752
|
height: { raw: w },
|
|
6751
6753
|
etime: this.ts
|
|
6752
6754
|
};
|
|
6753
6755
|
}
|
|
6754
6756
|
if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
|
|
6755
|
-
const
|
|
6757
|
+
const b = (d = this.weatherLayers["current-direction"]) == null ? void 0 : d.raw, w = (p = this.weatherLayers["current-speed"]) == null ? void 0 : p.raw;
|
|
6756
6758
|
delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
|
|
6757
6759
|
type: "json",
|
|
6758
|
-
direction:
|
|
6760
|
+
direction: b,
|
|
6759
6761
|
speed: { raw: w },
|
|
6760
6762
|
etime: this.ts
|
|
6761
6763
|
};
|
|
6762
6764
|
}
|
|
6763
6765
|
}
|
|
6764
|
-
|
|
6766
|
+
m && (m.etime = this.ts, m.cached = !0, this.weatherLayers.tropicals = m);
|
|
6765
6767
|
}
|
|
6766
6768
|
this.handleWeatherLayerToggle(), this.handleDragEndWithZoom4Json();
|
|
6767
6769
|
}
|
|
@@ -6793,9 +6795,9 @@ const Ho = {
|
|
|
6793
6795
|
);
|
|
6794
6796
|
const d = await Promise.all(h);
|
|
6795
6797
|
this.otherLayers = { enc: n }, d.map((p) => {
|
|
6796
|
-
var
|
|
6797
|
-
const
|
|
6798
|
-
this.otherLayers[
|
|
6798
|
+
var y, f, m;
|
|
6799
|
+
const g = ((y = p == null ? void 0 : p.data) == null ? void 0 : y.data) || (p == null ? void 0 : p.data), u = (m = (f = p == null ? void 0 : p.config) == null ? void 0 : f.headers) == null ? void 0 : m.key;
|
|
6800
|
+
this.otherLayers[u] = g;
|
|
6799
6801
|
});
|
|
6800
6802
|
}
|
|
6801
6803
|
} else if (a.dayNight && o & 1024) {
|
|
@@ -6816,9 +6818,9 @@ const Ho = {
|
|
|
6816
6818
|
})
|
|
6817
6819
|
);
|
|
6818
6820
|
(await Promise.all(h)).map((p) => {
|
|
6819
|
-
var
|
|
6820
|
-
const
|
|
6821
|
-
this.otherLayers[
|
|
6821
|
+
var y, f, m;
|
|
6822
|
+
const g = ((y = p == null ? void 0 : p.data) == null ? void 0 : y.data) || (p == null ? void 0 : p.data), u = (m = (f = p == null ? void 0 : p.config) == null ? void 0 : f.headers) == null ? void 0 : m.key;
|
|
6823
|
+
this.otherLayers[u] = g;
|
|
6822
6824
|
});
|
|
6823
6825
|
}
|
|
6824
6826
|
}
|
|
@@ -6873,186 +6875,186 @@ const Ho = {
|
|
|
6873
6875
|
);
|
|
6874
6876
|
},
|
|
6875
6877
|
handleDragEndWithZoom4Json() {
|
|
6876
|
-
var h, d, p,
|
|
6878
|
+
var h, d, p, g;
|
|
6877
6879
|
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
6878
6880
|
let e = 0, t = 0;
|
|
6879
6881
|
const r = (h = this.map) == null ? void 0 : h.getBounds(), i = this.map.getZoom(), o = Ie(r._sw.lng), n = Ie(r._ne.lng), s = Math.floor(r._sw.lat), c = Math.ceil(r._ne.lat);
|
|
6880
|
-
for (const
|
|
6881
|
-
if (this.weatherLayers[
|
|
6882
|
-
this.weatherLayers[
|
|
6883
|
-
let
|
|
6884
|
-
if (["swell", "current"].includes(
|
|
6885
|
-
const
|
|
6886
|
-
for (const
|
|
6887
|
-
if (
|
|
6888
|
-
const v =
|
|
6889
|
-
o > n ? v.forEach((
|
|
6882
|
+
for (const u in this.weatherLayers)
|
|
6883
|
+
if (this.weatherLayers[u].active && this.weatherLayers[u].type === "json") {
|
|
6884
|
+
this.weatherLayers[u].active = !1, this.weatherLayers[u].version = Math.random() + 1;
|
|
6885
|
+
let y = [];
|
|
6886
|
+
if (["swell", "current"].includes(u)) {
|
|
6887
|
+
const f = ((d = this.weatherLayers[u]) == null ? void 0 : d.direction) || {};
|
|
6888
|
+
for (const m in f)
|
|
6889
|
+
if (m > s && m < c && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6890
|
+
const v = f[m].lng;
|
|
6891
|
+
o > n ? v.forEach((b, w) => {
|
|
6890
6892
|
var k;
|
|
6891
|
-
if ((
|
|
6892
|
-
const _ = C.point([
|
|
6893
|
-
val:
|
|
6894
|
-
spd: (k =
|
|
6893
|
+
if ((b >= o && b <= 180 || b >= -180 && b <= n) && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6894
|
+
const _ = C.point([b, m], {
|
|
6895
|
+
val: f[m].val[w],
|
|
6896
|
+
spd: (k = f[m].spd) == null ? void 0 : k[w]
|
|
6895
6897
|
});
|
|
6896
|
-
|
|
6898
|
+
y.push(_);
|
|
6897
6899
|
}
|
|
6898
|
-
}) : v.forEach((
|
|
6900
|
+
}) : v.forEach((b, w) => {
|
|
6899
6901
|
var k;
|
|
6900
|
-
if (
|
|
6901
|
-
const _ = C.point([
|
|
6902
|
-
val:
|
|
6903
|
-
spd: (k =
|
|
6902
|
+
if (b >= o && b <= n && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6903
|
+
const _ = C.point([b, m], {
|
|
6904
|
+
val: f[m].val[w],
|
|
6905
|
+
spd: (k = f[m].spd) == null ? void 0 : k[w]
|
|
6904
6906
|
});
|
|
6905
|
-
|
|
6907
|
+
y.push(_);
|
|
6906
6908
|
}
|
|
6907
6909
|
});
|
|
6908
6910
|
}
|
|
6909
|
-
if (t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("direction elapsed: ", t, ", total: ", e += t),
|
|
6910
|
-
const
|
|
6911
|
-
if (
|
|
6912
|
-
if (!
|
|
6911
|
+
if (t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("direction elapsed: ", t, ", total: ", e += t), u === "swell") {
|
|
6912
|
+
const m = this.weatherLayers[u].height;
|
|
6913
|
+
if (m) {
|
|
6914
|
+
if (!m.data) {
|
|
6913
6915
|
const v = [];
|
|
6914
|
-
for (const
|
|
6915
|
-
const w =
|
|
6916
|
+
for (const b in (p = m.raw) == null ? void 0 : p.LineString) {
|
|
6917
|
+
const w = m.raw.LineString[b];
|
|
6916
6918
|
for (const k of w)
|
|
6917
6919
|
v.push(
|
|
6918
6920
|
C.lineString(k, {
|
|
6919
|
-
val: Number(
|
|
6921
|
+
val: Number(b)
|
|
6920
6922
|
})
|
|
6921
6923
|
);
|
|
6922
|
-
|
|
6924
|
+
m.data = C.featureCollection(v);
|
|
6923
6925
|
}
|
|
6924
6926
|
}
|
|
6925
|
-
if (
|
|
6926
|
-
const v = this.handleBboxClip(
|
|
6927
|
-
|
|
6927
|
+
if (m.data) {
|
|
6928
|
+
const v = this.handleBboxClip(m.data, r);
|
|
6929
|
+
y = y.concat(v);
|
|
6928
6930
|
}
|
|
6929
6931
|
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("height elapsed: ", t, ", total: ", e += t);
|
|
6930
6932
|
}
|
|
6931
6933
|
}
|
|
6932
|
-
if (
|
|
6933
|
-
const
|
|
6934
|
-
if (
|
|
6935
|
-
if (!
|
|
6936
|
-
const
|
|
6937
|
-
for (const w in (
|
|
6938
|
-
const k =
|
|
6934
|
+
if (u === "current") {
|
|
6935
|
+
const m = this.weatherLayers[u].speed;
|
|
6936
|
+
if (m) {
|
|
6937
|
+
if (!m.data) {
|
|
6938
|
+
const b = [];
|
|
6939
|
+
for (const w in (g = m.raw) == null ? void 0 : g.Polygon) {
|
|
6940
|
+
const k = m.raw.Polygon[w];
|
|
6939
6941
|
for (const _ of k)
|
|
6940
|
-
|
|
6942
|
+
b.push(
|
|
6941
6943
|
C.polygon(_, {
|
|
6942
6944
|
val: Number(w)
|
|
6943
6945
|
})
|
|
6944
6946
|
);
|
|
6945
6947
|
}
|
|
6946
|
-
|
|
6948
|
+
m.data = C.featureCollection(b);
|
|
6947
6949
|
}
|
|
6948
|
-
const v = i < this.zoom ?
|
|
6949
|
-
|
|
6950
|
+
const v = i < this.zoom ? m.data.features.filter((b) => b.properties.val > 0.5) : m.data.features;
|
|
6951
|
+
y = y.concat(v), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("speed elapsed: ", t, ", total: ", e += t);
|
|
6950
6952
|
}
|
|
6951
6953
|
}
|
|
6952
|
-
} else if (
|
|
6953
|
-
const
|
|
6954
|
-
for (const
|
|
6955
|
-
if (
|
|
6956
|
-
const v =
|
|
6957
|
-
o > n ? v.forEach((
|
|
6958
|
-
if ((
|
|
6959
|
-
const k = C.point([
|
|
6960
|
-
val:
|
|
6961
|
-
spd:
|
|
6954
|
+
} else if (u === "wind") {
|
|
6955
|
+
const f = this.weatherLayers.wind.raw;
|
|
6956
|
+
for (const m in f)
|
|
6957
|
+
if (m > s && m < c && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6958
|
+
const v = f[m].lng;
|
|
6959
|
+
o > n ? v.forEach((b, w) => {
|
|
6960
|
+
if ((b >= o && b <= 180 || b >= -180 && b <= n) && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6961
|
+
const k = C.point([b, m], {
|
|
6962
|
+
val: f[m].val[w],
|
|
6963
|
+
spd: f[m].spd[w]
|
|
6962
6964
|
});
|
|
6963
|
-
|
|
6965
|
+
y.push(k);
|
|
6964
6966
|
}
|
|
6965
|
-
}) : v.forEach((
|
|
6966
|
-
if (
|
|
6967
|
-
const k = C.point([
|
|
6968
|
-
val:
|
|
6969
|
-
spd:
|
|
6967
|
+
}) : v.forEach((b, w) => {
|
|
6968
|
+
if (b >= o && b <= n && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6969
|
+
const k = C.point([b, m], {
|
|
6970
|
+
val: f[m].val[w],
|
|
6971
|
+
spd: f[m].spd[w]
|
|
6970
6972
|
});
|
|
6971
|
-
|
|
6973
|
+
y.push(k);
|
|
6972
6974
|
}
|
|
6973
6975
|
});
|
|
6974
6976
|
}
|
|
6975
6977
|
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("wind barb elapsed: ", t, ", total: ", e += t);
|
|
6976
|
-
} else if (
|
|
6977
|
-
if (this.weatherLayers[
|
|
6978
|
-
|
|
6978
|
+
} else if (u === "sig-wave-height") {
|
|
6979
|
+
if (this.weatherLayers[u].data)
|
|
6980
|
+
y = this.weatherLayers[u].data;
|
|
6979
6981
|
else {
|
|
6980
|
-
const
|
|
6981
|
-
if (
|
|
6982
|
-
const
|
|
6983
|
-
for (const v in
|
|
6984
|
-
const
|
|
6985
|
-
for (const w of
|
|
6986
|
-
|
|
6982
|
+
const f = this.weatherLayers[u].raw;
|
|
6983
|
+
if (f) {
|
|
6984
|
+
const m = [];
|
|
6985
|
+
for (const v in f.Polygon) {
|
|
6986
|
+
const b = f.Polygon[v];
|
|
6987
|
+
for (const w of b)
|
|
6988
|
+
m.push(
|
|
6987
6989
|
C.polygon(w, {
|
|
6988
6990
|
val: Number(v)
|
|
6989
6991
|
})
|
|
6990
6992
|
);
|
|
6991
6993
|
}
|
|
6992
|
-
for (const v in
|
|
6993
|
-
const
|
|
6994
|
-
for (const w of
|
|
6995
|
-
|
|
6994
|
+
for (const v in f.Point) {
|
|
6995
|
+
const b = f.Point[v];
|
|
6996
|
+
for (const w of b)
|
|
6997
|
+
m.push(
|
|
6996
6998
|
...C.points(w, {
|
|
6997
6999
|
val: Number(v)
|
|
6998
7000
|
}).features
|
|
6999
7001
|
);
|
|
7000
7002
|
}
|
|
7001
|
-
|
|
7003
|
+
y = y.concat(m);
|
|
7002
7004
|
}
|
|
7003
7005
|
}
|
|
7004
7006
|
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("sigWave elapsed: ", t, ", total: ", e += t);
|
|
7005
|
-
} else if (
|
|
7006
|
-
if (this.weatherLayers[
|
|
7007
|
-
|
|
7007
|
+
} else if (u === "prmsl") {
|
|
7008
|
+
if (this.weatherLayers[u].data)
|
|
7009
|
+
y = this.weatherLayers[u].data;
|
|
7008
7010
|
else {
|
|
7009
|
-
const
|
|
7010
|
-
if (
|
|
7011
|
-
const
|
|
7012
|
-
for (const v in
|
|
7013
|
-
const
|
|
7014
|
-
for (const w of
|
|
7015
|
-
|
|
7011
|
+
const f = this.weatherLayers[u].raw;
|
|
7012
|
+
if (f) {
|
|
7013
|
+
const m = [];
|
|
7014
|
+
for (const v in f.LineString) {
|
|
7015
|
+
const b = f.LineString[v];
|
|
7016
|
+
for (const w of b)
|
|
7017
|
+
m.push(
|
|
7016
7018
|
C.lineString(w, {
|
|
7017
7019
|
val: Number(v)
|
|
7018
7020
|
})
|
|
7019
7021
|
);
|
|
7020
7022
|
}
|
|
7021
|
-
for (const v in
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
C.point([
|
|
7025
|
-
val:
|
|
7026
|
-
type:
|
|
7023
|
+
for (const v in f.Point)
|
|
7024
|
+
f.Point[v].lng.forEach((b, w) => {
|
|
7025
|
+
b = Ie(b), m.push(
|
|
7026
|
+
C.point([b, v], {
|
|
7027
|
+
val: f.Point[v].val[w],
|
|
7028
|
+
type: f.Point[v].type[w]
|
|
7027
7029
|
})
|
|
7028
7030
|
);
|
|
7029
7031
|
});
|
|
7030
|
-
|
|
7032
|
+
y = y.concat(m);
|
|
7031
7033
|
}
|
|
7032
7034
|
}
|
|
7033
7035
|
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("prmsl elapsed: ", t, ", total: ", e += t);
|
|
7034
|
-
} else if (
|
|
7035
|
-
if (this.weatherLayers[
|
|
7036
|
-
|
|
7036
|
+
} else if (u === "arctic" || u === "iceberg") {
|
|
7037
|
+
if (this.weatherLayers[u].data)
|
|
7038
|
+
y = this.weatherLayers[u].data;
|
|
7037
7039
|
else {
|
|
7038
|
-
const
|
|
7039
|
-
if (
|
|
7040
|
-
const
|
|
7041
|
-
for (const v in
|
|
7042
|
-
const
|
|
7043
|
-
for (const w of
|
|
7044
|
-
|
|
7040
|
+
const f = this.weatherLayers[u].raw;
|
|
7041
|
+
if (f) {
|
|
7042
|
+
const m = [];
|
|
7043
|
+
for (const v in f.LineString) {
|
|
7044
|
+
const b = f.LineString[v];
|
|
7045
|
+
for (const w of b)
|
|
7046
|
+
m.push(
|
|
7045
7047
|
C.lineString(w, {
|
|
7046
7048
|
val: Number(v)
|
|
7047
7049
|
})
|
|
7048
7050
|
);
|
|
7049
7051
|
}
|
|
7050
|
-
|
|
7052
|
+
y = y.concat(m);
|
|
7051
7053
|
}
|
|
7052
7054
|
}
|
|
7053
7055
|
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e);
|
|
7054
7056
|
}
|
|
7055
|
-
console.log(
|
|
7057
|
+
console.log(u, " elapsed: ", t, ", total: ", e += t), y.length && (this.weatherLayers[u].data = C.featureCollection(y)), this.weatherLayers[u].active = !0, this.weatherLayers[u].version = Math.random() + 1;
|
|
7056
7058
|
}
|
|
7057
7059
|
},
|
|
7058
7060
|
handleDragEndWithZoom4Image() {
|
|
@@ -7085,8 +7087,8 @@ const Ho = {
|
|
|
7085
7087
|
this.handleBeforeLayerToggle();
|
|
7086
7088
|
},
|
|
7087
7089
|
handleBeforeLayerToggle() {
|
|
7088
|
-
var a, e, t, r, i, o, n, s, c, h, d, p,
|
|
7089
|
-
(a = this.map) != null && a.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (t = this.otherLayers) != null && t["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (n = this.otherLayers) != null && n["time-zones"] || (s = this.otherLayers) != null && s.pirates || (c = this.otherLayers) != null && c.ports || (h = this.otherLayers) != null && h.enc || (d = this.otherLayers) != null && d["voluntary-reporting-area"] || (p = this.otherLayers) != null && p["eca-zones"] || (
|
|
7090
|
+
var a, e, t, r, i, o, n, s, c, h, d, p, g;
|
|
7091
|
+
(a = this.map) != null && a.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (t = this.otherLayers) != null && t["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (n = this.otherLayers) != null && n["time-zones"] || (s = this.otherLayers) != null && s.pirates || (c = this.otherLayers) != null && c.ports || (h = this.otherLayers) != null && h.enc || (d = this.otherLayers) != null && d["voluntary-reporting-area"] || (p = this.otherLayers) != null && p["eca-zones"] || (g = this.otherLayers) != null && g["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
7090
7092
|
},
|
|
7091
7093
|
handleDateChange(a = { tropicals: !1 }) {
|
|
7092
7094
|
this.fetchWeatherLayers(a), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -7133,8 +7135,8 @@ const Ho = {
|
|
|
7133
7135
|
});
|
|
7134
7136
|
},
|
|
7135
7137
|
handle3dToggle(a) {
|
|
7136
|
-
var e, t, r, i, o, n, s, c, h, d, p,
|
|
7137
|
-
a ? (this.map.setProjection("globe"), this.mapProjection = "globe", (t = this.map) != null && t.getLayer((e = this.viewport) == null ? void 0 : e.rampColorLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (s = this.map) != null && s.getLayer((n = this.viewport) == null ? void 0 : n.particleLayer) && ((c = this.map) != null && c.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((d = this.map) == null || d.moveLayer((h = this.viewport) == null ? void 0 : h.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(), (
|
|
7138
|
+
var e, t, r, i, o, n, s, c, h, d, p, g, u, y, f, m, v, b, w, k;
|
|
7139
|
+
a ? (this.map.setProjection("globe"), this.mapProjection = "globe", (t = this.map) != null && t.getLayer((e = this.viewport) == null ? void 0 : e.rampColorLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (s = this.map) != null && s.getLayer((n = this.viewport) == null ? void 0 : n.particleLayer) && ((c = this.map) != null && c.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((d = this.map) == null || d.moveLayer((h = this.viewport) == null ? void 0 : h.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(), (g = this.map) != null && g.getLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer) && ((u = this.map) != null && u.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((f = this.map) == null || f.moveLayer((y = this.viewport) == null ? void 0 : y.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (v = this.map) != null && v.getLayer((m = this.viewport) == null ? void 0 : m.particleLayer) && ((b = this.map) != null && b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((k = this.map) == null || k.moveLayer((w = this.viewport) == null ? void 0 : w.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
7138
7140
|
},
|
|
7139
7141
|
handleParticle(a) {
|
|
7140
7142
|
this.particleFactor = a, this.fetchWeatherLayers({ tropicals: !1 });
|
|
@@ -7146,7 +7148,7 @@ const Ho = {
|
|
|
7146
7148
|
};
|
|
7147
7149
|
function Jo(a, e, t, r, i, o) {
|
|
7148
7150
|
var ae, X, Y, be, Q, E, U, ve, K, _e, ie, re, oe, ke, ze, Pe, Te, Ee, Ne, Fe, Ue, Ve, Ze, He, Ge, Je;
|
|
7149
|
-
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"), d = z("IdmPrmsl"), p = z("IdmIceberg"),
|
|
7151
|
+
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"), d = z("IdmPrmsl"), p = z("IdmIceberg"), g = z("IdmTropicals"), u = z("IdmCurrents"), y = z("IdmCurrentParticle"), f = z("IdmWindBarb"), m = z("IdmWindParticle"), v = z("IdmPrecip3h"), b = z("IdmVisibility"), w = z("IdmWaterTemp"), k = z("IdmTemp"), _ = z("IdmArctic"), D = z("IdmWarZone"), A = z("IdmGmdssArea"), B = z("IdmEcaZone"), W = z("IdmAlertZone"), O = z("IdmPort"), J = z("IdmLoadLine"), de = z("IdmTimezone"), pe = z("IdmVRA"), me = z("IdmSpecialArea"), ue = z("IdmTerminator"), ye = z("IdmLatLng"), fe = z("IdmMeasure"), ge = z("IdmPoint");
|
|
7150
7152
|
return t.map ? (L(), x("div", Go, [
|
|
7151
7153
|
P(n, I({
|
|
7152
7154
|
ref: "layer",
|
|
@@ -7191,13 +7193,13 @@ function Jo(a, e, t, r, i, o) {
|
|
|
7191
7193
|
iceberg: (Q = i.weatherLayers) == null ? void 0 : Q.iceberg,
|
|
7192
7194
|
"before-layer": t.beforeLayer
|
|
7193
7195
|
}, a.$attrs), null, 16, ["map", "iceberg", "before-layer"]),
|
|
7194
|
-
P(
|
|
7196
|
+
P(g, I({
|
|
7195
7197
|
map: t.map,
|
|
7196
7198
|
date: t.ts,
|
|
7197
7199
|
tropicals: (E = i.weatherLayers) == null ? void 0 : E.tropicals,
|
|
7198
7200
|
"before-layer": t.beforeLayer
|
|
7199
7201
|
}, a.$attrs), null, 16, ["map", "date", "tropicals", "before-layer"]),
|
|
7200
|
-
P(
|
|
7202
|
+
P(u, I({
|
|
7201
7203
|
map: t.map,
|
|
7202
7204
|
"map-projection": i.mapProjection,
|
|
7203
7205
|
current: (U = i.weatherLayers) == null ? void 0 : U.current,
|
|
@@ -7207,13 +7209,13 @@ function Jo(a, e, t, r, i, o) {
|
|
|
7207
7209
|
"toggle-version": i.toggleVersion,
|
|
7208
7210
|
"weather-layers": i.weatherLayers
|
|
7209
7211
|
}, a.$attrs, { onParticle: o.handleParticle }), null, 16, ["map", "map-projection", "current", "before-layer", "show-particle", "margin-bottom", "toggle-version", "weather-layers", "onParticle"]),
|
|
7210
|
-
P(
|
|
7212
|
+
P(y, I({
|
|
7211
7213
|
viewport: i.viewport,
|
|
7212
7214
|
factor: (ve = i.weatherLayers) == null ? void 0 : ve["current-particle"],
|
|
7213
7215
|
"before-layer": t.beforeLayer,
|
|
7214
7216
|
"toggle-version": i.toggleVersion
|
|
7215
7217
|
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7216
|
-
P(
|
|
7218
|
+
P(f, I({
|
|
7217
7219
|
ref: "windBarb",
|
|
7218
7220
|
map: t.map,
|
|
7219
7221
|
"map-projection": i.mapProjection,
|
|
@@ -7227,7 +7229,7 @@ function Jo(a, e, t, r, i, o) {
|
|
|
7227
7229
|
"weather-layers": i.weatherLayers,
|
|
7228
7230
|
onParticle: o.handleParticle
|
|
7229
7231
|
}), null, 16, ["map", "map-projection", "wind", "current", "before-layer", "margin-bottom", "show-particle", "toggle-version", "weather-layers", "onParticle"]),
|
|
7230
|
-
P(
|
|
7232
|
+
P(m, I({
|
|
7231
7233
|
viewport: i.viewport,
|
|
7232
7234
|
factor: (ie = i.weatherLayers) == null ? void 0 : ie["wind-particle"],
|
|
7233
7235
|
"before-layer": t.beforeLayer,
|
|
@@ -7239,7 +7241,7 @@ function Jo(a, e, t, r, i, o) {
|
|
|
7239
7241
|
"before-layer": t.beforeLayer,
|
|
7240
7242
|
"toggle-version": i.toggleVersion
|
|
7241
7243
|
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7242
|
-
P(
|
|
7244
|
+
P(b, I({
|
|
7243
7245
|
viewport: i.viewport,
|
|
7244
7246
|
factor: (oe = i.weatherLayers) == null ? void 0 : oe.visibility,
|
|
7245
7247
|
"before-layer": t.beforeLayer,
|