@idmwx/idmui-gl3 4.4.9 → 4.5.1
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 +77 -68
- package/dist/index.umd.cjs +4 -4
- package/dist/mapbox/src/components/layer.vue.d.ts +1 -0
- package/dist/mapbox/src/components/weather/sigWave.vue.d.ts +1 -4
- package/dist/mapbox/src/components/weather/swell.vue.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ve = Object.defineProperty;
|
|
2
2
|
var Ue = (a, e, t) => e in a ? Ve(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
3
|
var R = (a, e, t) => (Ue(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
import { resolveComponent as P, openBlock as _, createElementBlock as C, createElementVNode as n, normalizeStyle as U, createVNode as k, withCtx as X, normalizeClass as
|
|
4
|
+
import { resolveComponent as P, openBlock as _, createElementBlock as C, createElementVNode as n, normalizeStyle as U, createVNode as k, withCtx as X, normalizeClass as W, Fragment as _e, renderList as Se, toDisplayString as S, createCommentVNode as B, createTextVNode as Ie, withDirectives as Pe, createStaticVNode as Ze, vShow as ze, mergeProps as I } from "vue";
|
|
5
5
|
import * as x from "@turf/turf";
|
|
6
6
|
import He from "@mapbox/sphericalmercator";
|
|
7
7
|
import Z from "moment";
|
|
@@ -580,47 +580,50 @@ const T = (a, e) => {
|
|
|
580
580
|
},
|
|
581
581
|
showWindFeather: {
|
|
582
582
|
handler() {
|
|
583
|
-
!this.showWindFeather && !this.showWindParticle && this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 });
|
|
583
|
+
!this.showWindFeather && !this.showWindParticle && this.weatherLayers.some((a) => a.key === "wind") && (console.log(888999), this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 }));
|
|
584
584
|
}
|
|
585
585
|
},
|
|
586
586
|
showWindParticle: {
|
|
587
587
|
handler() {
|
|
588
|
-
!this.showWindFeather && !this.showWindParticle && this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 });
|
|
588
|
+
!this.showWindFeather && !this.showWindParticle && this.weatherLayers.some((a) => a.key === "wind") && (console.log(777999), this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 }));
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
showCurrentIsoband: {
|
|
592
592
|
handler() {
|
|
593
|
-
!this.showCurrentIsoband && !this.showCurrentParticle && this.handleWeatherLayerPick({ weight: 96, name: "Current", key: "current", vendor: "cmems", merge: !0, h5: !0, enabled: !0 });
|
|
593
|
+
!this.showCurrentIsoband && !this.showCurrentParticle && this.weatherLayers.some((a) => a.key === "current") && (console.log(666999), this.handleWeatherLayerPick({ weight: 96, name: "Current", key: "current", vendor: "cmems", merge: !0, h5: !0, enabled: !0 }));
|
|
594
594
|
}
|
|
595
595
|
},
|
|
596
596
|
showCurrentParticle: {
|
|
597
597
|
handler() {
|
|
598
|
-
!this.showCurrentIsoband && !this.showCurrentParticle && this.handleWeatherLayerPick({ weight: 96, name: "Current", key: "current", vendor: "cmems", merge: !0, h5: !0, enabled: !0 });
|
|
598
|
+
!this.showCurrentIsoband && !this.showCurrentParticle && this.weatherLayers.some((a) => a.key === "current") && (console.log(555999), this.handleWeatherLayerPick({ weight: 96, name: "Current", key: "current", vendor: "cmems", merge: !0, h5: !0, enabled: !0 }));
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
},
|
|
602
602
|
mounted() {
|
|
603
|
-
|
|
604
|
-
this.version.v !== a && (localStorage.removeItem(this.weatherLayersCache), localStorage.removeItem(this.collectedLayerCache), localStorage.removeItem(this.otherLayersCache), localStorage.removeItem("windFeatherCache"), localStorage.removeItem("currentJsonCache"), localStorage.setItem(this.version.k, this.version.v));
|
|
605
|
-
let e = localStorage.getItem(this.autoActiveCache);
|
|
606
|
-
this.autoActive = e !== "false", e = localStorage.getItem(this.collectedLayerCache);
|
|
607
|
-
let t = JSON.parse(
|
|
608
|
-
e || '[{"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},{"weight": 4096, "name": "Pressure", "h5": true, "key": "prmsl", "collected": true},{"weight": 6, "name": "Swell", "key": "swell", "collected": true}]'
|
|
609
|
-
);
|
|
610
|
-
this.layers.weather.forEach((r) => {
|
|
611
|
-
r.collected = !!t.some((i) => i.key === r.key && i.collected);
|
|
612
|
-
}), e = localStorage.getItem(this.weatherLayersCache), t = JSON.parse(
|
|
613
|
-
e || '[{"weight":1,"name":"Wind","key":"wind","enabled":true,"type":"json","particle":true},{"weight":4096,"name":"Pressure","key":"prmsl","enabled":true,"type":"json"},{"weight":256,"name":"Tropicals","key":"tropicals","enabled":true,"type":"json"}]'
|
|
614
|
-
), this.autoActive && (this.weatherLayers = [...t]), e = localStorage.getItem(this.otherLayersCache), t = JSON.parse(e || '[{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'), this.otherLayers = t, e = localStorage.getItem(this.sourceCache), this.source = e || "GFS", this.handleConfirm();
|
|
603
|
+
this.fetchCache(), this.handleConfirm();
|
|
615
604
|
},
|
|
616
605
|
methods: {
|
|
606
|
+
fetchCache() {
|
|
607
|
+
const a = localStorage.getItem(this.version.k);
|
|
608
|
+
this.version.v !== a && (localStorage.removeItem(this.weatherLayersCache), localStorage.removeItem(this.collectedLayerCache), localStorage.removeItem(this.otherLayersCache), localStorage.removeItem("windFeatherCache"), localStorage.removeItem("currentJsonCache"), localStorage.setItem(this.version.k, this.version.v));
|
|
609
|
+
let e = localStorage.getItem(this.autoActiveCache);
|
|
610
|
+
this.autoActive = e !== "false", e = localStorage.getItem(this.collectedLayerCache);
|
|
611
|
+
let t = JSON.parse(
|
|
612
|
+
e || '[{"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},{"weight": 4096, "name": "Pressure", "h5": true, "key": "prmsl", "collected": true},{"weight": 6, "name": "Swell", "key": "swell", "collected": true}]'
|
|
613
|
+
);
|
|
614
|
+
this.layers.weather.forEach((r) => {
|
|
615
|
+
r.collected = !!t.some((i) => i.key === r.key && i.collected);
|
|
616
|
+
}), e = localStorage.getItem(this.weatherLayersCache), t = JSON.parse(
|
|
617
|
+
e || '[{"weight":1,"name":"Wind","key":"wind","enabled":true,"type":"json","particle":true},{"weight":4096,"name":"Pressure","key":"prmsl","enabled":true,"type":"json"},{"weight":256,"name":"Tropicals","key":"tropicals","enabled":true,"type":"json"}]'
|
|
618
|
+
), this.autoActive && (this.weatherLayers = [...t]), e = localStorage.getItem(this.otherLayersCache), t = JSON.parse(e || '[{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'), this.otherLayers = t, e = localStorage.getItem(this.sourceCache), this.source = e || "GFS";
|
|
619
|
+
},
|
|
617
620
|
handleConfirm() {
|
|
618
621
|
this.$emit("weather", this.weatherLayers, this.source), this.$emit("other", this.otherLayers), localStorage.setItem(this.autoActiveCache, this.autoActive), localStorage.setItem(this.sourceCache, this.source);
|
|
619
622
|
},
|
|
620
623
|
handleWeatherLayerPick(a) {
|
|
621
624
|
if (this.rampColorLayers.includes(a.key) && this.mapProjection === "globe" || !this.autoActive)
|
|
622
625
|
return !1;
|
|
623
|
-
|
|
626
|
+
console.log(999, a.key, a), (a.key === "wind" && !this.showWindFeather || a.key === "wind" && !this.showCurrentIsoband) && (a.particle = !0), this.weatherLayers.some((e) => e.key === a.key) ? this.weatherLayers = this.weatherLayers.filter((e) => e.key !== a.key) : this.weatherLayers.length < 12 && a.enabled && (["png", "jpg"].includes(a.type) && (this.weatherLayers = this.weatherLayers.filter((e) => e.type === "json")), this.weatherLayers.push(a)), this.$emit("weather", this.weatherLayers, this.source), localStorage.setItem(this.weatherLayersCache, JSON.stringify(this.weatherLayers)), localStorage.setItem(this.sourceCache, this.source);
|
|
624
627
|
},
|
|
625
628
|
handleWeatherLayerCollect(a) {
|
|
626
629
|
var e;
|
|
@@ -671,7 +674,7 @@ function ut(a, e, t, r, i, o) {
|
|
|
671
674
|
}, {
|
|
672
675
|
default: X(() => [
|
|
673
676
|
n("div", {
|
|
674
|
-
class:
|
|
677
|
+
class: W(t.layerToggle ? "menu-icon active" : "menu-icon"),
|
|
675
678
|
onClick: e[0] || (e[0] = (...c) => o.handleMenuToggle && o.handleMenuToggle(...c))
|
|
676
679
|
}, e[9] || (e[9] = [
|
|
677
680
|
n("span", { class: "iconfont" }, "", -1)
|
|
@@ -694,7 +697,7 @@ function ut(a, e, t, r, i, o) {
|
|
|
694
697
|
}, {
|
|
695
698
|
default: X(() => [
|
|
696
699
|
n("div", {
|
|
697
|
-
class:
|
|
700
|
+
class: W(i.showMeasure ? "menu-icon active" : "menu-icon"),
|
|
698
701
|
onClick: e[1] || (e[1] = (...c) => o.handleMeasureToggle && o.handleMeasureToggle(...c))
|
|
699
702
|
}, e[10] || (e[10] = [
|
|
700
703
|
n("span", { class: "iconfont" }, "", -1)
|
|
@@ -710,7 +713,7 @@ function ut(a, e, t, r, i, o) {
|
|
|
710
713
|
}, {
|
|
711
714
|
default: X(() => [
|
|
712
715
|
n("div", {
|
|
713
|
-
class:
|
|
716
|
+
class: W(i.showPoint ? "menu-icon active" : "menu-icon"),
|
|
714
717
|
onClick: e[2] || (e[2] = (...c) => o.handlePointToggle && o.handlePointToggle(...c))
|
|
715
718
|
}, e[11] || (e[11] = [
|
|
716
719
|
n("span", { class: "iconfont" }, "", -1)
|
|
@@ -726,7 +729,7 @@ function ut(a, e, t, r, i, o) {
|
|
|
726
729
|
}, {
|
|
727
730
|
default: X(() => [
|
|
728
731
|
n("div", {
|
|
729
|
-
class:
|
|
732
|
+
class: W(i.showCoord ? "menu-icon active" : "menu-icon"),
|
|
730
733
|
onClick: e[3] || (e[3] = (...c) => o.handleCoordToggle && o.handleCoordToggle(...c))
|
|
731
734
|
}, e[12] || (e[12] = [
|
|
732
735
|
n("span", { class: "iconfont" }, "", -1)
|
|
@@ -742,7 +745,7 @@ function ut(a, e, t, r, i, o) {
|
|
|
742
745
|
}, {
|
|
743
746
|
default: X(() => [
|
|
744
747
|
n("div", {
|
|
745
|
-
class:
|
|
748
|
+
class: W(i.show3d ? "menu-icon active" : "menu-icon"),
|
|
746
749
|
onClick: e[4] || (e[4] = (...c) => o.handle3DToggle && o.handle3DToggle(...c))
|
|
747
750
|
}, e[13] || (e[13] = [
|
|
748
751
|
n("span", { class: "iconfont" }, "", -1)
|
|
@@ -754,13 +757,13 @@ function ut(a, e, t, r, i, o) {
|
|
|
754
757
|
], 4),
|
|
755
758
|
o.hasCollectedLayers ? (_(), C("div", {
|
|
756
759
|
key: 0,
|
|
757
|
-
class: "active-layers flex-between",
|
|
760
|
+
class: W(["active-layers flex-between", i.autoActive ? "active" : ""]),
|
|
758
761
|
style: U({ right: i.right + "px", bottom: "100px" })
|
|
759
762
|
}, [
|
|
760
763
|
n("div", Ke, [
|
|
761
764
|
(_(!0), C(_e, null, Se(i.layers.weather.filter((c) => c.collected), (c) => (_(), C("div", {
|
|
762
765
|
key: c.key,
|
|
763
|
-
class:
|
|
766
|
+
class: W(o.computeLayerClass(c, i.weatherLayers)),
|
|
764
767
|
onClick: (p) => o.handleWeatherLayerPick(c)
|
|
765
768
|
}, [
|
|
766
769
|
e[14] || (e[14] = n("div", { class: "checkbox" }, null, -1)),
|
|
@@ -775,13 +778,13 @@ function ut(a, e, t, r, i, o) {
|
|
|
775
778
|
n("i", { class: "iconfont open" }, "", -1),
|
|
776
779
|
n("i", { class: "iconfont close" }, "", -1)
|
|
777
780
|
]))
|
|
778
|
-
],
|
|
781
|
+
], 6)) : B("", !0),
|
|
779
782
|
n("div", {
|
|
780
783
|
class: "available-layers flex-center",
|
|
781
784
|
style: U({ top: t.top + "px", right: t.layerToggle ? "0px" : "-240px" })
|
|
782
785
|
}, [
|
|
783
786
|
n("div", {
|
|
784
|
-
class:
|
|
787
|
+
class: W(["list-box", t.layerToggle ? "right-bar" : ""])
|
|
785
788
|
}, [
|
|
786
789
|
n("div", tt, [
|
|
787
790
|
e[16] || (e[16] = n("div", null, "Layers", -1)),
|
|
@@ -794,7 +797,7 @@ function ut(a, e, t, r, i, o) {
|
|
|
794
797
|
default: X(() => [
|
|
795
798
|
n("div", at, [
|
|
796
799
|
n("div", {
|
|
797
|
-
class:
|
|
800
|
+
class: W(["layers-title flex-between", i.autoActive ? "active" : ""])
|
|
798
801
|
}, [
|
|
799
802
|
e[18] || (e[18] = n("div", null, "Weather Layers", -1)),
|
|
800
803
|
n("div", {
|
|
@@ -812,7 +815,7 @@ function ut(a, e, t, r, i, o) {
|
|
|
812
815
|
}, [
|
|
813
816
|
c.hide ? B("", !0) : (_(), C("div", {
|
|
814
817
|
key: 0,
|
|
815
|
-
class:
|
|
818
|
+
class: W(o.computeLayerClass(c, i.weatherLayers))
|
|
816
819
|
}, [
|
|
817
820
|
n("div", {
|
|
818
821
|
class: "flex-start",
|
|
@@ -842,7 +845,7 @@ function ut(a, e, t, r, i, o) {
|
|
|
842
845
|
n("div", ct, [
|
|
843
846
|
(_(!0), C(_e, null, Se(i.layers.other, (c) => (_(), C("div", {
|
|
844
847
|
key: c.key,
|
|
845
|
-
class:
|
|
848
|
+
class: W(o.computeLayerClass(c, i.otherLayers)),
|
|
846
849
|
onClick: (p) => o.handleOtherLayerPick(c)
|
|
847
850
|
}, [
|
|
848
851
|
n("div", dt, [
|
|
@@ -1041,14 +1044,14 @@ function bt(a, e, t, r, i, o) {
|
|
|
1041
1044
|
}, [
|
|
1042
1045
|
t.mapProjection === "mercator" ? (_(), C("div", {
|
|
1043
1046
|
key: 0,
|
|
1044
|
-
class:
|
|
1047
|
+
class: W(["item-bar flex-start", t.showParticle ? "active" : "inactive"]),
|
|
1045
1048
|
onClick: e[0] || (e[0] = (...l) => o.handleParticle && o.handleParticle(...l))
|
|
1046
1049
|
}, e[2] || (e[2] = [
|
|
1047
1050
|
n("div", { class: "checkbox" }, null, -1),
|
|
1048
1051
|
n("span", null, "Wind Particles", -1)
|
|
1049
1052
|
]), 2)) : B("", !0),
|
|
1050
1053
|
n("div", {
|
|
1051
|
-
class:
|
|
1054
|
+
class: W(["item-bar flex-start", i.showFeather ? "active" : "inactive"]),
|
|
1052
1055
|
onClick: e[1] || (e[1] = (l) => i.showFeather = !i.showFeather)
|
|
1053
1056
|
}, e[3] || (e[3] = [
|
|
1054
1057
|
n("div", { class: "checkbox" }, null, -1),
|
|
@@ -1282,8 +1285,8 @@ class fe {
|
|
|
1282
1285
|
}
|
|
1283
1286
|
const m = e.getBoundPixel(), b = e.map.getZoom() + 1, y = e.getWorldCopy(m, b);
|
|
1284
1287
|
for (const u of y) {
|
|
1285
|
-
const v = (u[0] - m[0]) * e.ratio, g = (u[1] - m[3]) * e.ratio, L = u[2] * e.ratio, [z, w, A, M] = [v, L + v, g, L + g],
|
|
1286
|
-
t.bindBuffer(t.ARRAY_BUFFER, s), t.bufferData(t.ARRAY_BUFFER,
|
|
1288
|
+
const v = (u[0] - m[0]) * e.ratio, g = (u[1] - m[3]) * e.ratio, L = u[2] * e.ratio, [z, w, A, M] = [v, L + v, g, L + g], j = new Float32Array([z, A, w, A, z, M, z, M, w, A, w, M]);
|
|
1289
|
+
t.bindBuffer(t.ARRAY_BUFFER, s), t.bufferData(t.ARRAY_BUFFER, j, t.STATIC_DRAW), t.drawArrays(t.TRIANGLES, 0, 6);
|
|
1287
1290
|
}
|
|
1288
1291
|
} catch (c) {
|
|
1289
1292
|
console.log(`render failed...${c}`);
|
|
@@ -3474,14 +3477,14 @@ function Pt(a, e, t, r, i, o) {
|
|
|
3474
3477
|
}, [
|
|
3475
3478
|
t.mapProjection === "mercator" ? (_(), C("div", {
|
|
3476
3479
|
key: 0,
|
|
3477
|
-
class:
|
|
3480
|
+
class: W(["flex-start item-bar", t.showParticle ? "active" : "inactive"]),
|
|
3478
3481
|
onClick: e[0] || (e[0] = (l) => o.handleParticle(!t.showParticle))
|
|
3479
3482
|
}, e[2] || (e[2] = [
|
|
3480
3483
|
n("div", { class: "checkbox" }, null, -1),
|
|
3481
3484
|
n("span", null, "Current Particles", -1)
|
|
3482
3485
|
]), 2)) : B("", !0),
|
|
3483
3486
|
n("div", {
|
|
3484
|
-
class:
|
|
3487
|
+
class: W(["flex-start item-bar", i.showJson ? "active" : "inactive"]),
|
|
3485
3488
|
onClick: e[1] || (e[1] = (l) => i.showJson = !i.showJson)
|
|
3486
3489
|
}, e[3] || (e[3] = [
|
|
3487
3490
|
n("div", { class: "checkbox" }, null, -1),
|
|
@@ -3694,14 +3697,7 @@ const Rt = /* @__PURE__ */ T(Tt, [["render", It], ["__scopeId", "data-v-6d4fd206
|
|
|
3694
3697
|
"sigWave.version": {
|
|
3695
3698
|
handler() {
|
|
3696
3699
|
var a;
|
|
3697
|
-
(a = this.sigWave) != null && a.active ? this.handleRender() : this.handleClear();
|
|
3698
|
-
},
|
|
3699
|
-
deep: !0
|
|
3700
|
-
},
|
|
3701
|
-
activeWeatherLayers: {
|
|
3702
|
-
handler() {
|
|
3703
|
-
setTimeout(() => {
|
|
3704
|
-
}, 200);
|
|
3700
|
+
(a = this.sigWave) != null && a.active ? (this.handleRender(), this.handleMove()) : this.handleClear();
|
|
3705
3701
|
},
|
|
3706
3702
|
deep: !0
|
|
3707
3703
|
}
|
|
@@ -3782,8 +3778,13 @@ const Rt = /* @__PURE__ */ T(Tt, [["render", It], ["__scopeId", "data-v-6d4fd206
|
|
|
3782
3778
|
), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[sig.wave] add elapsed: ", i, ", total: ", r += i));
|
|
3783
3779
|
}
|
|
3784
3780
|
},
|
|
3781
|
+
handleMove() {
|
|
3782
|
+
var a, e;
|
|
3783
|
+
(e = (a = this.map) == null ? void 0 : a.getLayer("country-boundaries")) == null || e.setLayoutProperty("visibility", "visible"), this.map.getLayer(this.heightLayer) && this.map.moveLayer(this.heightLayer, "country-boundaries"), this.map.getLayer(this.heightLabelLayer) && this.map.moveLayer(this.heightLabelLayer, "country-boundaries");
|
|
3784
|
+
},
|
|
3785
3785
|
handleClear() {
|
|
3786
|
-
|
|
3786
|
+
var a, e, t;
|
|
3787
|
+
((a = this.activeWeatherLayers) == null ? void 0 : a.length) === 0 && ((t = (e = this.map) == null ? void 0 : e.getLayer("country-boundaries")) == null || t.setLayoutProperty("visibility", "none")), this.map.getLayer(this.heightLayer) && this.map.removeLayer(this.heightLayer), this.map.getLayer(this.heightLabelLayer) && this.map.removeLayer(this.heightLabelLayer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
3787
3788
|
}
|
|
3788
3789
|
}
|
|
3789
3790
|
};
|
|
@@ -3819,16 +3820,18 @@ const Mt = /* @__PURE__ */ T(At, [["render", Dt]]), Wt = {
|
|
|
3819
3820
|
"swell.version": {
|
|
3820
3821
|
handler() {
|
|
3821
3822
|
var a;
|
|
3822
|
-
(a = this.swell) != null && a.active ? this.handleRender() : this.handleClear();
|
|
3823
|
+
(a = this.swell) != null && a.active ? (this.handleRender(), this.handleMove()) : this.handleClear();
|
|
3823
3824
|
},
|
|
3824
3825
|
deep: !0
|
|
3825
3826
|
},
|
|
3826
3827
|
activeWeatherLayers: {
|
|
3827
3828
|
handler() {
|
|
3828
3829
|
setTimeout(() => {
|
|
3829
|
-
|
|
3830
|
+
this.activeWeatherLayers.length > 0 ? this.handleMove() : this.handleClear();
|
|
3831
|
+
}, 500);
|
|
3830
3832
|
},
|
|
3831
|
-
deep: !0
|
|
3833
|
+
deep: !0,
|
|
3834
|
+
immediate: !0
|
|
3832
3835
|
}
|
|
3833
3836
|
},
|
|
3834
3837
|
methods: {
|
|
@@ -3933,8 +3936,13 @@ const Mt = /* @__PURE__ */ T(At, [["render", Dt]]), Wt = {
|
|
|
3933
3936
|
), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[swell] add elapsed: ", i, ", total: ", r += i));
|
|
3934
3937
|
}
|
|
3935
3938
|
},
|
|
3939
|
+
handleMove() {
|
|
3940
|
+
var a, e;
|
|
3941
|
+
(e = (a = this.map) == null ? void 0 : a.getLayer("country-boundaries")) == null || e.setLayoutProperty("visibility", "visible"), this.map.getLayer(this.heightLayer) && this.map.moveLayer(this.heightLayer, "country-boundaries"), this.map.getLayer(this.directionLayer) && this.map.moveLayer(this.directionLayer, "country-boundaries"), this.map.getLayer(this.heightLabelLayer) && this.map.moveLayer(this.heightLabelLayer, "country-boundaries");
|
|
3942
|
+
},
|
|
3936
3943
|
handleClear() {
|
|
3937
|
-
|
|
3944
|
+
var a, e;
|
|
3945
|
+
this.activeWeatherLayers.length === 0 && ((e = (a = this.map) == null ? void 0 : a.getLayer("country-boundaries")) == null || e.setLayoutProperty("visibility", "none")), this.map.getLayer(this.heightLayer) && this.map.removeLayer(this.heightLayer), this.map.getLayer(this.heightLabelLayer) && this.map.removeLayer(this.heightLabelLayer), this.map.getLayer(this.directionLayer) && this.map.removeLayer(this.directionLayer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
3938
3946
|
}
|
|
3939
3947
|
}
|
|
3940
3948
|
};
|
|
@@ -3973,14 +3981,15 @@ const Bt = /* @__PURE__ */ T(Wt, [["render", jt]]), Nt = {
|
|
|
3973
3981
|
"prmsl.version": {
|
|
3974
3982
|
handler() {
|
|
3975
3983
|
var a;
|
|
3976
|
-
(a = this.prmsl) != null && a.active ? this.handleRender() : this.handleClear();
|
|
3984
|
+
(a = this.prmsl) != null && a.active ? (this.handleRender(), this.handleMove()) : this.handleClear();
|
|
3977
3985
|
},
|
|
3978
3986
|
deep: !0
|
|
3979
3987
|
},
|
|
3980
3988
|
activeWeatherLayers: {
|
|
3981
3989
|
handler() {
|
|
3982
3990
|
setTimeout(() => {
|
|
3983
|
-
|
|
3991
|
+
this.activeWeatherLayers.length > 0 ? this.handleMove() : this.handleClear();
|
|
3992
|
+
}, 500);
|
|
3984
3993
|
},
|
|
3985
3994
|
deep: !0,
|
|
3986
3995
|
immediate: !0
|
|
@@ -4064,7 +4073,7 @@ const Bt = /* @__PURE__ */ T(Wt, [["render", jt]]), Nt = {
|
|
|
4064
4073
|
},
|
|
4065
4074
|
this.beforeLayer
|
|
4066
4075
|
);
|
|
4067
|
-
},
|
|
4076
|
+
}, 0), o = (/* @__PURE__ */ new Date()).valueOf() - (r + i), console.log("[prmsl] add elapsed: ", o, ", total: ", i += o));
|
|
4068
4077
|
}
|
|
4069
4078
|
},
|
|
4070
4079
|
handleMove() {
|
|
@@ -4520,7 +4529,7 @@ const Zt = {
|
|
|
4520
4529
|
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));
|
|
4521
4530
|
},
|
|
4522
4531
|
handleDateChange() {
|
|
4523
|
-
var a, e, t, r, i, o, s, l, h, d, c, p, f, m, b, y, u, v, g, L, z, w, A, M,
|
|
4532
|
+
var a, e, t, r, i, o, s, l, h, d, c, p, f, m, b, y, u, v, g, L, z, w, A, M, j, O, F, H, se, ne, le, ce, he, de, pe, te;
|
|
4524
4533
|
if ((a = this.interpolateMarkers) == null || a.forEach((G) => G == null ? void 0 : G.remove()), this.circleSourceData.features = [], (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
4525
4534
|
const G = Z(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), Y = this.interpolateData.filter((E) => E.properties.date === G.format() && !E.properties.disabled), me = this.handleComputePolygons(Y), q = x.featureCollection([...Y]);
|
|
4526
4535
|
me.forEach((E) => {
|
|
@@ -4542,7 +4551,7 @@ const Zt = {
|
|
|
4542
4551
|
for (const E of Y)
|
|
4543
4552
|
if (!E.properties.disabled) {
|
|
4544
4553
|
let $ = "#f44336";
|
|
4545
|
-
((l = (s = E.properties) == null ? void 0 : s.wind) == null ? void 0 : l.spd) < 17.2 || !((d = (h = E.properties) == null ? void 0 : h.wind) != null && d.spd) ? $ = "#03f869" : ((p = (c = E.properties) == null ? void 0 : c.wind) == null ? void 0 : p.spd) >= 17.2 && ((m = (f = E.properties) == null ? void 0 : f.wind) == null ? void 0 : m.spd) < 24.5 ? $ = "#f2f202" : ((y = (b = E.properties) == null ? void 0 : b.wind) == null ? void 0 : y.spd) >= 24.5 && ((v = (u = E.properties) == null ? void 0 : u.wind) == null ? void 0 : v.spd) < 32.7 ? $ = "#ff9100" : ((L = (g = E.properties) == null ? void 0 : g.wind) == null ? void 0 : L.spd) >= 32.7 && ((w = (z = E.properties) == null ? void 0 : z.wind) == null ? void 0 : w.spd) < 41.5 ? $ = "#f44336" : ((M = (A = E.properties) == null ? void 0 : A.wind) == null ? void 0 : M.spd) >= 41.5 && ((O = (
|
|
4554
|
+
((l = (s = E.properties) == null ? void 0 : s.wind) == null ? void 0 : l.spd) < 17.2 || !((d = (h = E.properties) == null ? void 0 : h.wind) != null && d.spd) ? $ = "#03f869" : ((p = (c = E.properties) == null ? void 0 : c.wind) == null ? void 0 : p.spd) >= 17.2 && ((m = (f = E.properties) == null ? void 0 : f.wind) == null ? void 0 : m.spd) < 24.5 ? $ = "#f2f202" : ((y = (b = E.properties) == null ? void 0 : b.wind) == null ? void 0 : y.spd) >= 24.5 && ((v = (u = E.properties) == null ? void 0 : u.wind) == null ? void 0 : v.spd) < 32.7 ? $ = "#ff9100" : ((L = (g = E.properties) == null ? void 0 : g.wind) == null ? void 0 : L.spd) >= 32.7 && ((w = (z = E.properties) == null ? void 0 : z.wind) == null ? void 0 : w.spd) < 41.5 ? $ = "#f44336" : ((M = (A = E.properties) == null ? void 0 : A.wind) == null ? void 0 : M.spd) >= 41.5 && ((O = (j = E.properties) == null ? void 0 : j.wind) == null ? void 0 : O.spd) < 51 ? $ = "#f903d0" : ((H = (F = E.properties) == null ? void 0 : F.wind) == null ? void 0 : H.spd) >= 51 ? $ = "#8702f9" : $ = "#f44336";
|
|
4546
4555
|
const ue = `<svg t="1719918955501"
|
|
4547
4556
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
4548
4557
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -4732,18 +4741,18 @@ function na(a, e, t, r, i, o) {
|
|
|
4732
4741
|
e[4] || (e[4] = n("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)),
|
|
4733
4742
|
n("div", ra, [
|
|
4734
4743
|
(_(!0), C(_e, null, Se((z = i.activeTropicals) == null ? void 0 : z.forecasts, (w, A) => {
|
|
4735
|
-
var M,
|
|
4744
|
+
var M, j, O, F;
|
|
4736
4745
|
return _(), C("div", {
|
|
4737
4746
|
key: A,
|
|
4738
|
-
class:
|
|
4747
|
+
class: W([
|
|
4739
4748
|
"model",
|
|
4740
4749
|
w.disabled ? "" : "active",
|
|
4741
|
-
A > 0 && A < ((
|
|
4750
|
+
A > 0 && A < ((j = (M = i.activeTropicals) == null ? void 0 : M.forecasts) == null ? void 0 : j.length) - 1 && ((F = (O = i.activeTropicals) == null ? void 0 : O.forecasts) == null ? void 0 : F.length) > 2 ? "center-child" : ""
|
|
4742
4751
|
]),
|
|
4743
4752
|
onClick: (H) => o.handleForecastToggle(w)
|
|
4744
4753
|
}, [
|
|
4745
4754
|
n("span", {
|
|
4746
|
-
class:
|
|
4755
|
+
class: W(w.model)
|
|
4747
4756
|
}, S(w.model), 3)
|
|
4748
4757
|
], 10, oa);
|
|
4749
4758
|
}), 128))
|
|
@@ -5448,7 +5457,7 @@ const za = {
|
|
|
5448
5457
|
class: "point-meteo"
|
|
5449
5458
|
}, Ea = { class: "meteo-box" }, Ia = { class: "header-box" }, Ra = { class: "main" }, Aa = { class: "sub" }, Da = { class: "main-box" }, Ma = { class: "flex-space" }, Wa = { class: "flex-space" }, ja = { class: "flex-space" }, Ba = { class: "flex-space" }, Na = { class: "flex-space" }, Oa = { class: "flex-space" }, Fa = { class: "flex-space" }, $a = { class: "flex-space" }, Va = { class: "flex-space" };
|
|
5450
5459
|
function Ua(a, e, t, r, i, o) {
|
|
5451
|
-
var s, l, h, d, c, p, f, m, b, y, u, v, g, L, z, w, A, M,
|
|
5460
|
+
var s, l, h, d, c, p, f, m, b, y, u, v, g, L, z, w, A, M, j, O, F, H, se, ne, le, ce, he, de, pe, te, G, Y, me, q, E, $, ue, Q, ye, ae, ie, re, be, ve, we, Le, xe;
|
|
5452
5461
|
return Pe((_(), C("div", Ta, [
|
|
5453
5462
|
n("div", Ea, [
|
|
5454
5463
|
n("div", Ia, [
|
|
@@ -5466,7 +5475,7 @@ function Ua(a, e, t, r, i, o) {
|
|
|
5466
5475
|
]),
|
|
5467
5476
|
n("div", Wa, [
|
|
5468
5477
|
e[2] || (e[2] = n("label", null, "Wind.Wave", -1)),
|
|
5469
|
-
n("span", null, S(((L = (g = (v = t.meteo) == null ? void 0 : v.wave) == null ? void 0 : g.wd) == null ? void 0 : L.direction) || "-") + "/" + S(o.roundPrecision((A = (w = (z = t.meteo) == null ? void 0 : z.wave) == null ? void 0 : w.wd) == null ? void 0 : A.height, 1)) + "[m]/" + S(o.roundPrecision((O = (
|
|
5478
|
+
n("span", null, S(((L = (g = (v = t.meteo) == null ? void 0 : v.wave) == null ? void 0 : g.wd) == null ? void 0 : L.direction) || "-") + "/" + S(o.roundPrecision((A = (w = (z = t.meteo) == null ? void 0 : z.wave) == null ? void 0 : w.wd) == null ? void 0 : A.height, 1)) + "[m]/" + S(o.roundPrecision((O = (j = (M = t.meteo) == null ? void 0 : M.wave) == null ? void 0 : j.wd) == null ? void 0 : O.period, 1)) + "[s]", 1)
|
|
5470
5479
|
]),
|
|
5471
5480
|
n("div", ja, [
|
|
5472
5481
|
e[3] || (e[3] = n("label", null, "Swell", -1)),
|
|
@@ -7090,7 +7099,7 @@ function Bi(a, e, t, r, i, o) {
|
|
|
7090
7099
|
}, {
|
|
7091
7100
|
default: X(() => [
|
|
7092
7101
|
n("div", {
|
|
7093
|
-
class:
|
|
7102
|
+
class: W(i.vendor === "hi" ? "menu-icon active" : "menu-icon"),
|
|
7094
7103
|
onClick: e[0] || (e[0] = (l) => i.vendor = "hi")
|
|
7095
7104
|
}, e[2] || (e[2] = [
|
|
7096
7105
|
n("span", { class: "iconfont" }, "HI", -1)
|
|
@@ -7106,7 +7115,7 @@ function Bi(a, e, t, r, i, o) {
|
|
|
7106
7115
|
}, {
|
|
7107
7116
|
default: X(() => [
|
|
7108
7117
|
n("div", {
|
|
7109
|
-
class:
|
|
7118
|
+
class: W(i.vendor === "i4" ? "menu-icon active" : "menu-icon"),
|
|
7110
7119
|
onClick: e[1] || (e[1] = (l) => i.vendor = "i4")
|
|
7111
7120
|
}, e[3] || (e[3] = [
|
|
7112
7121
|
n("span", { class: "iconfont" }, "I4", -1)
|
|
@@ -7312,8 +7321,8 @@ const Oi = {
|
|
|
7312
7321
|
);
|
|
7313
7322
|
const z = await Promise.all(L);
|
|
7314
7323
|
this.weatherLayers = {}, z.map((w) => {
|
|
7315
|
-
var
|
|
7316
|
-
const A = ((
|
|
7324
|
+
var j, O, F, H;
|
|
7325
|
+
const A = ((j = w == null ? void 0 : w.data) == null ? void 0 : j.data) || (w == null ? void 0 : w.data), M = (F = (O = w == null ? void 0 : w.config) == null ? void 0 : O.headers) == null ? void 0 : F.key;
|
|
7317
7326
|
M && A && (this.weatherLayers[M] = {
|
|
7318
7327
|
raw: A,
|
|
7319
7328
|
type: ((H = w == null ? void 0 : w.config) == null ? void 0 : H.responseType) === "blob" ? "image" : "json",
|
|
@@ -7325,8 +7334,8 @@ const Oi = {
|
|
|
7325
7334
|
key: "tropicals"
|
|
7326
7335
|
}
|
|
7327
7336
|
}).then((w) => {
|
|
7328
|
-
var
|
|
7329
|
-
const A = Oe.convert2Geojson(((
|
|
7337
|
+
var j, O, F;
|
|
7338
|
+
const A = Oe.convert2Geojson(((j = w == null ? void 0 : w.data) == null ? void 0 : j.data) || (w == null ? void 0 : w.data)), M = (F = (O = w == null ? void 0 : w.config) == null ? void 0 : O.headers) == null ? void 0 : F.key;
|
|
7330
7339
|
this.weatherLayers[M] = {
|
|
7331
7340
|
data: A,
|
|
7332
7341
|
active: !0,
|
|
@@ -7758,7 +7767,7 @@ const Oi = {
|
|
|
7758
7767
|
};
|
|
7759
7768
|
function $i(a, e, t, r, i, o) {
|
|
7760
7769
|
var te, G, Y, me, q, E, $, ue, Q, ye, ae, ie, re, be, ve, we, Le, xe, Te, Ae, De, Me, We, je, Be, Ne;
|
|
7761
|
-
const s = P("IdmGlLayer"), l = P("IdmENC"), h = P("IdmSigWave"), d = P("IdmSwell"), c = P("IdmPrmsl"), p = P("IdmIceberg"), f = P("IdmTropicals"), m = P("IdmCurrents"), b = P("IdmCurrentParticle"), y = P("IdmWindBarb"), u = P("IdmWindParticle"), v = P("IdmPrecip3h"), g = P("IdmVisibility"), L = P("IdmWaterTemp"), z = P("IdmTemp"), w = P("IdmArctic"), A = P("IdmWarZone"), M = P("IdmGmdssArea"),
|
|
7770
|
+
const s = P("IdmGlLayer"), l = P("IdmENC"), h = P("IdmSigWave"), d = P("IdmSwell"), c = P("IdmPrmsl"), p = P("IdmIceberg"), f = P("IdmTropicals"), m = P("IdmCurrents"), b = P("IdmCurrentParticle"), y = P("IdmWindBarb"), u = P("IdmWindParticle"), v = P("IdmPrecip3h"), g = P("IdmVisibility"), L = P("IdmWaterTemp"), z = P("IdmTemp"), w = P("IdmArctic"), A = P("IdmWarZone"), M = P("IdmGmdssArea"), j = P("IdmEcaZone"), O = P("IdmAlertZone"), F = P("IdmPort"), H = P("IdmLoadLine"), se = P("IdmTimezone"), ne = P("IdmVRA"), le = P("IdmSpecialArea"), ce = P("IdmTerminator"), he = P("IdmLatLng"), de = P("IdmMeasure"), pe = P("IdmPoint");
|
|
7762
7771
|
return t.map ? (_(), C("div", Fi, [
|
|
7763
7772
|
k(s, I({
|
|
7764
7773
|
ref: "layer",
|
|
@@ -7896,7 +7905,7 @@ function $i(a, e, t, r, i, o) {
|
|
|
7896
7905
|
area: (xe = i.otherLayers) == null ? void 0 : xe["gmdss-areas"],
|
|
7897
7906
|
"before-layer": t.beforeLayer
|
|
7898
7907
|
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7899
|
-
k(
|
|
7908
|
+
k(j, I({
|
|
7900
7909
|
map: t.map,
|
|
7901
7910
|
zone: (Te = i.otherLayers) == null ? void 0 : Te["eca-zones"],
|
|
7902
7911
|
"before-layer": t.beforeLayer
|