@idmwx/idmui-gl4 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var Vo = Object.defineProperty;
|
|
|
2
2
|
var Yo = (o, e, t) => e in o ? Vo(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
3
|
var le = (o, e, t) => (Yo(o, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import Ie from "axios";
|
|
5
|
-
import { openBlock as y, createElementBlock as M, withDirectives as He, createElementVNode as l, vShow as Ge, toDisplayString as C, normalizeStyle as Q, createCommentVNode as O, resolveComponent as w, createVNode as h, withCtx as g, mergeProps as j, normalizeClass as
|
|
5
|
+
import { openBlock as y, createElementBlock as M, withDirectives as He, createElementVNode as l, vShow as Ge, toDisplayString as C, normalizeStyle as Q, createCommentVNode as O, resolveComponent as w, createVNode as h, withCtx as g, mergeProps as j, normalizeClass as je, createTextVNode as U, Fragment as fe, renderList as _e, createBlock as V, withModifiers as Zo } from "vue";
|
|
6
6
|
import Pe from "mapbox-gl";
|
|
7
7
|
import { LngLatHelper as ae, TropicalHelper as Ho, LaneHelper as Be } from "@idm-plugin/geo";
|
|
8
8
|
import * as F from "@turf/turf";
|
|
@@ -1669,7 +1669,7 @@ function mi(o, e, t, i, a, r) {
|
|
|
1669
1669
|
}, 8, ["text"])
|
|
1670
1670
|
], 4),
|
|
1671
1671
|
l("div", {
|
|
1672
|
-
class:
|
|
1672
|
+
class: je(["available-layers transition", a.toggle ? "right-bar" : ""]),
|
|
1673
1673
|
style: Q({ top: t.top + "px", right: a.toggle ? "0px" : "-280px" })
|
|
1674
1674
|
}, [
|
|
1675
1675
|
l("div", Ka, [
|
|
@@ -1720,7 +1720,7 @@ function mi(o, e, t, i, a, r) {
|
|
|
1720
1720
|
onClick: (ne) => r.handleToggleMapFeather(I)
|
|
1721
1721
|
}, [
|
|
1722
1722
|
l("div", {
|
|
1723
|
-
class:
|
|
1723
|
+
class: je([a.mapFeather === I.value ? "active" : "", "img-box"])
|
|
1724
1724
|
}, [
|
|
1725
1725
|
I.value === "dark" ? (y(), M("img", ti)) : I.value === "nautical" ? (y(), M("img", oi)) : I.value === "satellite" ? (y(), M("img", ai)) : (y(), M("img", ii))
|
|
1726
1726
|
], 2),
|
|
@@ -2639,7 +2639,7 @@ function fi(o, e, t, i, a, r) {
|
|
|
2639
2639
|
default: g(() => [
|
|
2640
2640
|
l("div", ui, [
|
|
2641
2641
|
l("i", {
|
|
2642
|
-
class:
|
|
2642
|
+
class: je(["iconfont", r.barbsIconName[f]]),
|
|
2643
2643
|
style: Q({ color: t.theme === "dark" ? "#fff" : "#000" })
|
|
2644
2644
|
}, null, 6),
|
|
2645
2645
|
l("span", gi, C(Number(b) < 10 ? `00${b}kts` : Number(b) < 100 ? `0${b}kts` : `${b}kts`), 1)
|
|
@@ -5415,7 +5415,7 @@ function Gr(o, e, t, i, a, r) {
|
|
|
5415
5415
|
}, 8, ["text"])
|
|
5416
5416
|
], 4),
|
|
5417
5417
|
l("div", {
|
|
5418
|
-
class:
|
|
5418
|
+
class: je(["available-layers transition flex-center", a.toggle ? "right-bar" : ""]),
|
|
5419
5419
|
style: Q({ top: t.top + "px", right: a.toggle ? "0px" : "-280px" })
|
|
5420
5420
|
}, [
|
|
5421
5421
|
l("div", Cr, [
|
|
@@ -5447,7 +5447,7 @@ function Gr(o, e, t, i, a, r) {
|
|
|
5447
5447
|
}, 8, ["onClick"])
|
|
5448
5448
|
]),
|
|
5449
5449
|
l("div", {
|
|
5450
|
-
class:
|
|
5450
|
+
class: je(["list-box scroll pl-4 pr-2 overflow-y-auto", a.autoActive ? "" : "cursor-not-allowed"])
|
|
5451
5451
|
}, [
|
|
5452
5452
|
h(f, {
|
|
5453
5453
|
class: "menu-card mx-auto my-3",
|
|
@@ -6110,18 +6110,18 @@ class Go {
|
|
|
6110
6110
|
}
|
|
6111
6111
|
static pickHourly(e, t) {
|
|
6112
6112
|
var i, a, r, s, c, n, u, d, m, b, f, L, S, P, E, T, k, v, _, z, x, R, H, Y, G, W, $, ee, K, se, me, pe, he, q, I, ne, ge, be, ke, ze, Se, Me, Te, te, de, we, Re, J, Ce, xe;
|
|
6113
|
-
const ie = typeof t == "string" ? D(t) : t, ue = e == null ? void 0 : e.weather, N = e == null ? void 0 : e.marine, Le = D((a = (i = ue == null ? void 0 : ue[0]) == null ? void 0 : i.hourly) == null ? void 0 : a.date).utc(), oe = Le.clone().add((c = (s = (r = ue == null ? void 0 : ue[0]) == null ? void 0 : r.hourly) == null ? void 0 : s.time) == null ? void 0 : c.at(0), "h"), re = Le.clone().add((d = (u = (n = ue == null ? void 0 : ue[0]) == null ? void 0 : n.hourly) == null ? void 0 : u.time) == null ? void 0 : d.at(-1), "h"),
|
|
6113
|
+
const ie = typeof t == "string" ? D(t) : t, ue = e == null ? void 0 : e.weather, N = e == null ? void 0 : e.marine, Le = D((a = (i = ue == null ? void 0 : ue[0]) == null ? void 0 : i.hourly) == null ? void 0 : a.date).utc(), oe = Le.clone().add((c = (s = (r = ue == null ? void 0 : ue[0]) == null ? void 0 : r.hourly) == null ? void 0 : s.time) == null ? void 0 : c.at(0), "h"), re = Le.clone().add((d = (u = (n = ue == null ? void 0 : ue[0]) == null ? void 0 : n.hourly) == null ? void 0 : u.time) == null ? void 0 : d.at(-1), "h"), Ee = [];
|
|
6114
6114
|
if (ie.isBetween(oe, re, "millisecond", "[]")) {
|
|
6115
6115
|
const B = ie.utc().diff(oe, "h", !1);
|
|
6116
6116
|
let ye, Oe;
|
|
6117
6117
|
if (ue) {
|
|
6118
|
-
let
|
|
6118
|
+
let Fe = 0, Ne = 0;
|
|
6119
6119
|
for (const A of ue) {
|
|
6120
6120
|
const Z = A == null ? void 0 : A.hourly;
|
|
6121
6121
|
for (let Ae = B - (B - 1) % 3; Ae <= B; Ae++)
|
|
6122
|
-
|
|
6122
|
+
Fe += (m = Z == null ? void 0 : Z.precipitation) == null ? void 0 : m.at(Ae);
|
|
6123
6123
|
for (let Ae = B - (B - 1) % 6; Ae <= B; Ae++)
|
|
6124
|
-
|
|
6124
|
+
Ne += (b = Z == null ? void 0 : Z.precipitation) == null ? void 0 : b.at(Ae);
|
|
6125
6125
|
ye = {
|
|
6126
6126
|
temp: (f = Z == null ? void 0 : Z.temperature_2m) == null ? void 0 : f.at(B),
|
|
6127
6127
|
apparentTemp: (L = Z == null ? void 0 : Z.apparent_temperature) == null ? void 0 : L.at(B),
|
|
@@ -6130,8 +6130,8 @@ class Go {
|
|
|
6130
6130
|
precip: {
|
|
6131
6131
|
probability: (E = Z == null ? void 0 : Z.precipitation_probability) == null ? void 0 : E.at(B),
|
|
6132
6132
|
sum: (T = Z == null ? void 0 : Z.precipitation) == null ? void 0 : T.at(B),
|
|
6133
|
-
sum3Hours: Math.round(
|
|
6134
|
-
sum6Hours: Math.round(
|
|
6133
|
+
sum3Hours: Math.round(Fe * 100) / 100,
|
|
6134
|
+
sum6Hours: Math.round(Ne * 100) / 100
|
|
6135
6135
|
},
|
|
6136
6136
|
pmsl: (k = Z == null ? void 0 : Z.pressure_msl) == null ? void 0 : k.at(B),
|
|
6137
6137
|
psurf: (v = Z == null ? void 0 : Z.surface_pressure) == null ? void 0 : v.at(B),
|
|
@@ -6147,7 +6147,7 @@ class Go {
|
|
|
6147
6147
|
isDay: ($ = Z == null ? void 0 : Z.is_day) == null ? void 0 : $.at(B)
|
|
6148
6148
|
};
|
|
6149
6149
|
const { name: Ye, url: Ze, bg: Xe } = this.parseWeatherCode(ye.code, ye.isDay);
|
|
6150
|
-
ye.name = Ye, ye.url = Ze, ye.bg = Xe, ye.wind.scale = this.beaufort(this.kts2ms(ye.wind.kts)), ye.wind.direction = this.degree2Direction(ye.wind.degree),
|
|
6150
|
+
ye.name = Ye, ye.url = Ze, ye.bg = Xe, ye.wind.scale = this.beaufort(this.kts2ms(ye.wind.kts)), ye.wind.direction = this.degree2Direction(ye.wind.degree), Ee.push({
|
|
6151
6151
|
utc: oe.add(B, "h").format(),
|
|
6152
6152
|
model: A.model,
|
|
6153
6153
|
weather: { ...ye }
|
|
@@ -6155,9 +6155,9 @@ class Go {
|
|
|
6155
6155
|
}
|
|
6156
6156
|
}
|
|
6157
6157
|
if (N) {
|
|
6158
|
-
let
|
|
6159
|
-
for (const
|
|
6160
|
-
const A =
|
|
6158
|
+
let Fe = 0;
|
|
6159
|
+
for (const Ne of N) {
|
|
6160
|
+
const A = Ne == null ? void 0 : Ne.hourly;
|
|
6161
6161
|
Oe = {
|
|
6162
6162
|
wave: {
|
|
6163
6163
|
sig: {
|
|
@@ -6189,11 +6189,11 @@ class Go {
|
|
|
6189
6189
|
},
|
|
6190
6190
|
sst: (Ce = A == null ? void 0 : A.sea_surface_temperature) == null ? void 0 : Ce.at(B),
|
|
6191
6191
|
height: (xe = A == null ? void 0 : A.sea_level_height_msl) == null ? void 0 : xe.at(B)
|
|
6192
|
-
}, Oe.wave = this.parseWave(Oe.wave, ye == null ? void 0 : ye.wind), Oe.current.direction = this.degree2Direction(Oe.current.degree), Object.assign(
|
|
6192
|
+
}, Oe.wave = this.parseWave(Oe.wave, ye == null ? void 0 : ye.wind), Oe.current.direction = this.degree2Direction(Oe.current.degree), Object.assign(Ee[Fe], Oe), Fe++;
|
|
6193
6193
|
}
|
|
6194
6194
|
}
|
|
6195
6195
|
}
|
|
6196
|
-
return
|
|
6196
|
+
return Ee;
|
|
6197
6197
|
}
|
|
6198
6198
|
static toLegacy(e) {
|
|
6199
6199
|
var t, i, a, r, s, c, n, u, d, m;
|
|
@@ -6258,8 +6258,8 @@ class Go {
|
|
|
6258
6258
|
bearing: ((W = oe.wind_direction_10m_dominant) == null ? void 0 : W.at(N)) !== null ? ((($ = oe.wind_direction_10m_dominant) == null ? void 0 : $.at(N)) + 180) % 360 : null
|
|
6259
6259
|
}
|
|
6260
6260
|
};
|
|
6261
|
-
const { name: re, url:
|
|
6262
|
-
ie.name = re, ie.url =
|
|
6261
|
+
const { name: re, url: Ee, bg: B } = this.parseWeatherCode(ie.code, !0);
|
|
6262
|
+
ie.name = re, ie.url = Ee, ie.bg = B, ie.wind.scale = this.beaufort(this.kts2ms(ie.wind.kts)), ie.wind.direction = this.degree2Direction(ie.wind.degree), xe.push({
|
|
6263
6263
|
utc: J.add(N, "d").utc().format(),
|
|
6264
6264
|
model: Le.model,
|
|
6265
6265
|
weather: { ...ie }
|
|
@@ -7399,7 +7399,7 @@ function il(o, e, t, i, a, r) {
|
|
|
7399
7399
|
var R, H, Y, G;
|
|
7400
7400
|
return y(), M("div", {
|
|
7401
7401
|
key: x,
|
|
7402
|
-
class:
|
|
7402
|
+
class: je([
|
|
7403
7403
|
"model",
|
|
7404
7404
|
z.disabled ? "" : "active",
|
|
7405
7405
|
x > 0 && x < ((H = (R = a.activeTropicals) == null ? void 0 : R.forecasts) == null ? void 0 : H.length) - 1 && ((G = (Y = a.activeTropicals) == null ? void 0 : Y.forecasts) == null ? void 0 : G.length) > 2 ? "center-child" : ""
|
|
@@ -7407,7 +7407,7 @@ function il(o, e, t, i, a, r) {
|
|
|
7407
7407
|
onClick: (W) => r.handleForecastToggle(z)
|
|
7408
7408
|
}, [
|
|
7409
7409
|
l("span", {
|
|
7410
|
-
class:
|
|
7410
|
+
class: je(z.model)
|
|
7411
7411
|
}, C(z.model), 3)
|
|
7412
7412
|
], 10, al);
|
|
7413
7413
|
}), 128))
|
|
@@ -7883,6 +7883,11 @@ const hl = {
|
|
|
7883
7883
|
this.form.forecastModel = this.forecastModel;
|
|
7884
7884
|
},
|
|
7885
7885
|
immediate: !0
|
|
7886
|
+
},
|
|
7887
|
+
"form.forecastModel": {
|
|
7888
|
+
handler(o, e) {
|
|
7889
|
+
!o && e && (this.form.forecastModel = e === "GFS" ? "ECMWF" : "GFS");
|
|
7890
|
+
}
|
|
7886
7891
|
}
|
|
7887
7892
|
},
|
|
7888
7893
|
mounted() {
|
|
@@ -8308,7 +8313,7 @@ function Cl(o, e, t, i, a, r) {
|
|
|
8308
8313
|
density: "compact",
|
|
8309
8314
|
height: "30",
|
|
8310
8315
|
value: "GFS",
|
|
8311
|
-
class: "text-none flex-1-1-0 nop-btn-border",
|
|
8316
|
+
class: je(["text-none flex-1-1-0", a.form.forecastModel === "GFS" ? "" : "nop-btn-border"]),
|
|
8312
8317
|
color: a.form.forecastModel === "GFS" ? "primary" : "",
|
|
8313
8318
|
"base-color": ""
|
|
8314
8319
|
}, {
|
|
@@ -8317,11 +8322,11 @@ function Cl(o, e, t, i, a, r) {
|
|
|
8317
8322
|
])),
|
|
8318
8323
|
_: 1,
|
|
8319
8324
|
__: [19]
|
|
8320
|
-
}, 8, ["color"]),
|
|
8325
|
+
}, 8, ["class", "color"]),
|
|
8321
8326
|
h(s, {
|
|
8322
8327
|
density: "compact",
|
|
8323
8328
|
height: "30",
|
|
8324
|
-
class: "text-none flex-1-1-0 nop-btn-border",
|
|
8329
|
+
class: je(["text-none flex-1-1-0", a.form.forecastModel === "ECMWF" ? "" : "nop-btn-border"]),
|
|
8325
8330
|
color: a.form.forecastModel === "ECMWF" ? "primary" : "",
|
|
8326
8331
|
"base-color": "",
|
|
8327
8332
|
value: "ECMWF"
|
|
@@ -8331,7 +8336,7 @@ function Cl(o, e, t, i, a, r) {
|
|
|
8331
8336
|
])),
|
|
8332
8337
|
_: 1,
|
|
8333
8338
|
__: [20]
|
|
8334
|
-
}, 8, ["color"])
|
|
8339
|
+
}, 8, ["class", "color"])
|
|
8335
8340
|
]),
|
|
8336
8341
|
_: 1
|
|
8337
8342
|
}, 8, ["modelValue"])
|
|
@@ -8393,7 +8398,7 @@ function Cl(o, e, t, i, a, r) {
|
|
|
8393
8398
|
var v, _;
|
|
8394
8399
|
return [
|
|
8395
8400
|
l("div", Ll, [
|
|
8396
|
-
e[23] || (e[23] = l("i", { class: "iconfont icon-a-Spotweather text-h5 map-icon-
|
|
8401
|
+
e[23] || (e[23] = l("i", { class: "iconfont icon-a-Spotweather text-h5 map-icon-aqua" }, null, -1)),
|
|
8397
8402
|
l("div", Pl, C(r.computeLat((v = a.currentHourData) == null ? void 0 : v.lat)) + "," + C(r.computeLng((_ = a.currentHourData) == null ? void 0 : _.lng)), 1)
|
|
8398
8403
|
]),
|
|
8399
8404
|
h(s, {
|
|
@@ -9537,7 +9542,7 @@ class ql {
|
|
|
9537
9542
|
le(this, "hi");
|
|
9538
9543
|
le(this, "td");
|
|
9539
9544
|
le(this, "windy");
|
|
9540
|
-
var t, i, a, r, s, c, n, u, d, m, b, f, L, S, P, E, T, k, v, _, z, x, R, H, Y, G, W, $, ee, K, se, me, pe, he, q, I, ne, ge, be, ke, ze, Se, Me, Te, te, de, we, Re, J, Ce, xe, ie, ue, N, Le, oe, re,
|
|
9545
|
+
var t, i, a, r, s, c, n, u, d, m, b, f, L, S, P, E, T, k, v, _, z, x, R, H, Y, G, W, $, ee, K, se, me, pe, he, q, I, ne, ge, be, ke, ze, Se, Me, Te, te, de, we, Re, J, Ce, xe, ie, ue, N, Le, oe, re, Ee, B, ye, Oe, Fe, Ne, A, Z, Ye, Ze, Xe, Ae, Qe, $e, et, tt, ot, at, it, rt, lt, st, nt, ct, mt, ht, dt, pt, ut, gt, ft, bt, yt, wt, xt, vt, _t, kt, zt, Lt, Pt, Ct, St, Mt, Tt, Rt, It, At, Dt, Ot, Bt, jt, Et, Ft, Nt, Ht, Gt, Wt, Ut, Vt, Yt, Zt, Xt, qt, Kt, Jt, Qt, eo, to, oo, ao, io, ro, lo, so, no, co, mo, ho, po, uo, go, fo, bo, yo, wo, xo, vo, _o, ko, zo, Lo, Po, Co, So, Mo, To, Ro, Io, Ao, Do, Oo, Bo, jo, Eo, Fo, No;
|
|
9541
9546
|
this.i4 = {
|
|
9542
9547
|
source: {
|
|
9543
9548
|
type: "raster",
|
|
@@ -71571,10 +71576,10 @@ class ql {
|
|
|
71571
71576
|
(ie = (xe = this.originStyle) == null ? void 0 : xe.dark.layers) == null ? void 0 : ie.find((p) => p.id === "empty-layer-1"),
|
|
71572
71577
|
(N = (ue = this.originStyle) == null ? void 0 : ue.dark.layers) == null ? void 0 : N.find((p) => p.id === "country-boundaries"),
|
|
71573
71578
|
(oe = (Le = this.originStyle) == null ? void 0 : Le.dark.layers) == null ? void 0 : oe.find((p) => p.id === "water-outline"),
|
|
71574
|
-
(
|
|
71579
|
+
(Ee = (re = this.originStyle) == null ? void 0 : re.dark.layers) == null ? void 0 : Ee.find((p) => p.id === "empty-layer-2"),
|
|
71575
71580
|
(ye = (B = this.originStyle) == null ? void 0 : B.dark.layers) == null ? void 0 : ye.find((p) => p.id === "empty-layer-3"),
|
|
71576
|
-
(
|
|
71577
|
-
(A = (
|
|
71581
|
+
(Fe = (Oe = this.originStyle) == null ? void 0 : Oe.dark.layers) == null ? void 0 : Fe.find((p) => p.id === "empty-layer-4"),
|
|
71582
|
+
(A = (Ne = this.originStyle) == null ? void 0 : Ne.dark.layers) == null ? void 0 : A.find((p) => p.id === "water-line-label"),
|
|
71578
71583
|
(Ye = (Z = this.originStyle) == null ? void 0 : Z.dark.layers) == null ? void 0 : Ye.find((p) => p.id === "water-point-label"),
|
|
71579
71584
|
(Xe = (Ze = this.originStyle) == null ? void 0 : Ze.dark.layers) == null ? void 0 : Xe.find((p) => p.id === "world-12nm-v4-20231025"),
|
|
71580
71585
|
(Qe = (Ae = this.originStyle) == null ? void 0 : Ae.dark.layers) == null ? void 0 : Qe.find((p) => p.id === "ne-10m-outline"),
|