@idmwx/idmui-gl3 5.3.5 → 5.3.6
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
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
var i1 = Object.defineProperty;
|
|
2
|
-
var r1 = (
|
|
3
|
-
var Z = (
|
|
2
|
+
var r1 = (z, M, b) => M in z ? i1(z, M, { enumerable: !0, configurable: !0, writable: !0, value: b }) : z[M] = b;
|
|
3
|
+
var Z = (z, M, b) => (r1(z, typeof M != "symbol" ? M + "" : M, b), b);
|
|
4
4
|
import { LayerHelper as _0, CompanyHelper as j0 } from "@idm-plugin/tag";
|
|
5
5
|
import Y from "moment";
|
|
6
6
|
import N0 from "axios";
|
|
7
|
-
import { resolveComponent as P, openBlock as W, createElementBlock as l, createElementVNode as c, normalizeStyle as
|
|
7
|
+
import { resolveComponent as P, openBlock as W, createElementBlock as l, createElementVNode as c, normalizeStyle as e0, createVNode as E, withCtx as u0, normalizeClass as G, Fragment as F, renderList as J, toDisplayString as y, createCommentVNode as U, createBlock as n1, createTextVNode as c0, withDirectives as X0, createStaticVNode as d1, vShow as w0, defineComponent as s1, withModifiers as Q0, mergeProps as H } from "vue";
|
|
8
8
|
import * as T from "@turf/turf";
|
|
9
9
|
import W1 from "@mapbox/sphericalmercator";
|
|
10
10
|
import C0 from "mapbox-gl";
|
|
11
11
|
import { TropicalHelper as A1, LngLatHelper as o0, LaneHelper as v0 } from "@idm-plugin/geo";
|
|
12
12
|
import { TidesAssist as H0, Meteo2Assist as S0 } from "@idm-plugin/meteo";
|
|
13
13
|
var l1 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
14
|
-
function f1(
|
|
15
|
-
return
|
|
14
|
+
function f1(z) {
|
|
15
|
+
return z && z.__esModule && Object.prototype.hasOwnProperty.call(z, "default") ? z.default : z;
|
|
16
16
|
}
|
|
17
17
|
var e1 = { exports: {} }, t1 = { exports: {} };
|
|
18
|
-
(function(
|
|
18
|
+
(function(z) {
|
|
19
19
|
//! moment-timezone.js
|
|
20
20
|
//! version : 0.5.47
|
|
21
21
|
//! Copyright (c) JS Foundation and other contributors
|
|
22
22
|
//! license : MIT
|
|
23
23
|
//! github.com/moment/moment-timezone
|
|
24
|
-
(function(M,
|
|
25
|
-
|
|
24
|
+
(function(M, b) {
|
|
25
|
+
z.exports ? z.exports = b(Y) : b(M.moment);
|
|
26
26
|
})(l1, function(M) {
|
|
27
27
|
M.version === void 0 && M.default && (M = M.default);
|
|
28
|
-
var
|
|
29
|
-
(!M || typeof M.version != "string") &&
|
|
28
|
+
var b = "0.5.47", O = {}, p = {}, o = {}, A = {}, a = {}, q;
|
|
29
|
+
(!M || typeof M.version != "string") && t0("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
|
|
30
30
|
var i = M.version.split("."), e = +i[0], r = +i[1];
|
|
31
|
-
(e < 2 || e === 2 && r < 6) &&
|
|
31
|
+
(e < 2 || e === 2 && r < 6) && t0("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
|
|
32
32
|
function s(t) {
|
|
33
33
|
return t > 96 ? t - 87 : t > 64 ? t - 29 : t - 48;
|
|
34
34
|
}
|
|
@@ -106,7 +106,7 @@ var e1 = { exports: {} }, t1 = { exports: {} };
|
|
|
106
106
|
return this.abbrs[this._index(t)];
|
|
107
107
|
},
|
|
108
108
|
offset: function(t) {
|
|
109
|
-
return
|
|
109
|
+
return t0("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(t)];
|
|
110
110
|
},
|
|
111
111
|
utcOffset: function(t) {
|
|
112
112
|
return this.offsets[this._index(t)];
|
|
@@ -166,7 +166,7 @@ var e1 = { exports: {} }, t1 = { exports: {} };
|
|
|
166
166
|
var f = A[i0(t)];
|
|
167
167
|
if (f)
|
|
168
168
|
return f;
|
|
169
|
-
|
|
169
|
+
t0("Moment Timezone found " + t + " from the Intl api, but did not have that data loaded.");
|
|
170
170
|
}
|
|
171
171
|
} catch {
|
|
172
172
|
}
|
|
@@ -236,20 +236,20 @@ var e1 = { exports: {} }, t1 = { exports: {} };
|
|
|
236
236
|
l0(t.zones), f0(t.links), r0(t.countries), I.dataVersion = t.version;
|
|
237
237
|
}
|
|
238
238
|
function S(t) {
|
|
239
|
-
return S.didShowError || (S.didShowError = !0,
|
|
239
|
+
return S.didShowError || (S.didShowError = !0, t0("moment.tz.zoneExists('" + t + "') has been deprecated in favor of !moment.tz.zone('" + t + "')")), !!O0(t);
|
|
240
240
|
}
|
|
241
241
|
function b0(t) {
|
|
242
242
|
var f = t._f === "X" || t._f === "x";
|
|
243
243
|
return !!(t._a && t._tzm === void 0 && !f);
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function t0(t) {
|
|
246
246
|
typeof console < "u" && typeof console.error == "function" && console.error(t);
|
|
247
247
|
}
|
|
248
248
|
function I(t) {
|
|
249
249
|
var f = Array.prototype.slice.call(arguments, 0, -1), u = arguments[arguments.length - 1], B = M.utc.apply(null, f), C;
|
|
250
250
|
return !M.isMoment(t) && b0(B) && (C = O0(u)) && B.add(C.parse(B), "minutes"), B.tz(u), B;
|
|
251
251
|
}
|
|
252
|
-
I.version =
|
|
252
|
+
I.version = b, I.dataVersion = "", I._zones = O, I._links = p, I._names = A, I._countries = o, I.add = l0, I.link = f0, I.load = s0, I.zone = O0, I.zoneExists = S, I.guess = h0, I.names = R0, I.Zone = R, I.unpack = h, I.unpackBase60 = n, I.needsOffset = b0, I.moveInvalidForward = !0, I.moveAmbiguousForward = !1, I.countries = m0, I.zonesForCountry = B0;
|
|
253
253
|
var M0 = M.fn;
|
|
254
254
|
M.tz = I, M.defaultZone = null, M.updateOffset = function(t, f) {
|
|
255
255
|
var u = M.defaultZone, B;
|
|
@@ -263,7 +263,7 @@ var e1 = { exports: {} }, t1 = { exports: {} };
|
|
|
263
263
|
if (t) {
|
|
264
264
|
if (typeof t != "string")
|
|
265
265
|
throw new Error("Time zone name must be a string, got " + t + " [" + typeof t + "]");
|
|
266
|
-
return this._z = O0(t), this._z ? M.updateOffset(this, f) :
|
|
266
|
+
return this._z = O0(t), this._z ? M.updateOffset(this, f) : t0("Moment Timezone has no data for " + t + ". See http://momentjs.com/timezone/docs/#/data-loading/."), this;
|
|
267
267
|
}
|
|
268
268
|
if (this._z)
|
|
269
269
|
return this._z.name;
|
|
@@ -284,7 +284,7 @@ var e1 = { exports: {} }, t1 = { exports: {} };
|
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
286
|
M0.zoneName = W0(M0.zoneName), M0.zoneAbbr = W0(M0.zoneAbbr), M0.utc = N(M0.utc), M0.local = N(M0.local), M0.utcOffset = y0(M0.utcOffset), M.tz.setDefault = function(t) {
|
|
287
|
-
return (e < 2 || e === 2 && r < 9) &&
|
|
287
|
+
return (e < 2 || e === 2 && r < 9) && t0("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = t ? O0(t) : null, M;
|
|
288
288
|
};
|
|
289
289
|
var g0 = M.momentProperties;
|
|
290
290
|
return Object.prototype.toString.call(g0) === "[object Array]" ? (g0.push("_z"), g0.push("_a")) : g0 && (g0._z = null), M;
|
|
@@ -1147,11 +1147,11 @@ var g1 = e1.exports = u1;
|
|
|
1147
1147
|
g1.tz.load(B1);
|
|
1148
1148
|
var N1 = e1.exports;
|
|
1149
1149
|
const k0 = /* @__PURE__ */ f1(N1);
|
|
1150
|
-
const Q = (
|
|
1151
|
-
const
|
|
1150
|
+
const Q = (z, M) => {
|
|
1151
|
+
const b = z.__vccOpts || z;
|
|
1152
1152
|
for (const [O, p] of M)
|
|
1153
|
-
|
|
1154
|
-
return
|
|
1153
|
+
b[O] = p;
|
|
1154
|
+
return b;
|
|
1155
1155
|
}, y1 = {
|
|
1156
1156
|
name: "IdmGlLayer",
|
|
1157
1157
|
props: {
|
|
@@ -1199,15 +1199,15 @@ const Q = (b, M) => {
|
|
|
1199
1199
|
default: void 0
|
|
1200
1200
|
}
|
|
1201
1201
|
},
|
|
1202
|
-
emits: ["weather", "other", "toggleWindParticle", "toggleWindFeather", "toggleCurrentParticle", "toggleCurrentIsoband", "coordinate", "measure", "point", "3d", "layerToggle", "handleToggleVersion", "login", "forecastModel"],
|
|
1202
|
+
emits: ["weather", "other", "toggleWindParticle", "toggleWindFeather", "toggleCurrentParticle", "toggleCurrentIsoband", "toggleParticeVersion", "coordinate", "measure", "point", "3d", "layerToggle", "handleToggleVersion", "login", "forecastModel"],
|
|
1203
1203
|
data() {
|
|
1204
1204
|
return {
|
|
1205
1205
|
autoActive: !0,
|
|
1206
1206
|
layers: {
|
|
1207
1207
|
weather: [
|
|
1208
|
-
..._0.WEATHER_LAYERS.filter((
|
|
1208
|
+
..._0.WEATHER_LAYERS.filter((z) => !["swell-height", "swell-direction", "current-direction", "current-speed"].includes(z.key))
|
|
1209
1209
|
],
|
|
1210
|
-
other: [..._0.OTHER_LAYERS.filter((
|
|
1210
|
+
other: [..._0.OTHER_LAYERS.filter((z) => z.enabled)]
|
|
1211
1211
|
},
|
|
1212
1212
|
activeWeatherLayers: [],
|
|
1213
1213
|
activeOtherLayers: [],
|
|
@@ -1234,22 +1234,22 @@ const Q = (b, M) => {
|
|
|
1234
1234
|
},
|
|
1235
1235
|
computed: {
|
|
1236
1236
|
computeLayerClass() {
|
|
1237
|
-
return function(
|
|
1237
|
+
return function(z, M) {
|
|
1238
1238
|
var O;
|
|
1239
|
-
let
|
|
1240
|
-
return M.some((p) => p.key ===
|
|
1239
|
+
let b = "layer flex-between";
|
|
1240
|
+
return M.some((p) => p.key === z.key) && (b = b + " active"), (!z.enabled || (O = this.layers.weather) != null && O.some((p) => p.key === z.key) && !this.autoActive || this.rampColorLayers.includes(z.key) && this.mapProjection === "globe") && (b = b + " disabled"), b;
|
|
1241
1241
|
};
|
|
1242
1242
|
},
|
|
1243
1243
|
hasCollectedLayers() {
|
|
1244
|
-
var
|
|
1245
|
-
return ((
|
|
1244
|
+
var z;
|
|
1245
|
+
return ((z = this.layers.weather.filter((M) => M.collected)) == null ? void 0 : z.length) > 0;
|
|
1246
1246
|
},
|
|
1247
1247
|
computeDateZ() {
|
|
1248
|
-
return function(
|
|
1248
|
+
return function(z) {
|
|
1249
1249
|
var M;
|
|
1250
|
-
if (
|
|
1251
|
-
const
|
|
1252
|
-
return `${(M =
|
|
1250
|
+
if (z) {
|
|
1251
|
+
const b = Y(z);
|
|
1252
|
+
return `${(M = b == null ? void 0 : b.utc()) == null ? void 0 : M.format("MMM-DD/HHmm")}Z`;
|
|
1253
1253
|
}
|
|
1254
1254
|
return "-";
|
|
1255
1255
|
};
|
|
@@ -1259,14 +1259,14 @@ const Q = (b, M) => {
|
|
|
1259
1259
|
toggleVersion: {
|
|
1260
1260
|
handler() {
|
|
1261
1261
|
this.$nextTick(() => {
|
|
1262
|
-
var
|
|
1263
|
-
this.right = (((
|
|
1262
|
+
var z;
|
|
1263
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
1264
1264
|
});
|
|
1265
1265
|
}
|
|
1266
1266
|
},
|
|
1267
1267
|
source: {
|
|
1268
|
-
handler(
|
|
1269
|
-
|
|
1268
|
+
handler(z, M) {
|
|
1269
|
+
z && z !== M && this.$emit("forecastModel", this.source), z && M && z !== M && this.handleConfirm();
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
1272
1272
|
},
|
|
@@ -1277,76 +1277,76 @@ const Q = (b, M) => {
|
|
|
1277
1277
|
async fetchMeteoSource() {
|
|
1278
1278
|
var M;
|
|
1279
1279
|
this.sourceList = [];
|
|
1280
|
-
let
|
|
1280
|
+
let z = await N0.get(`${this.gateway}/api/arc/meteo2/models`, {
|
|
1281
1281
|
headers: {
|
|
1282
1282
|
Authorization: this.token
|
|
1283
1283
|
}
|
|
1284
1284
|
});
|
|
1285
|
-
(
|
|
1285
|
+
(z == null ? void 0 : z.data.code) === 0 && (this.sourceList = (M = z == null ? void 0 : z.data.data) == null ? void 0 : M.weather);
|
|
1286
1286
|
},
|
|
1287
1287
|
fetchCache() {
|
|
1288
|
-
const
|
|
1289
|
-
this.version.v !==
|
|
1288
|
+
const z = localStorage.getItem(this.version.k);
|
|
1289
|
+
this.version.v !== z && (localStorage.removeItem(this.activeWeatherLayersCache), localStorage.removeItem(this.collectedLayerCache), localStorage.removeItem(this.activeOtherLayersCache), localStorage.removeItem(this.windFeatherCache), localStorage.removeItem(this.currentIsobandCache), localStorage.setItem(this.version.k, this.version.v));
|
|
1290
1290
|
let M = localStorage.getItem(this.autoActiveCache);
|
|
1291
1291
|
this.autoActive = M !== "false", M = localStorage.getItem(this.collectedLayerCache);
|
|
1292
|
-
let
|
|
1292
|
+
let b = JSON.parse(
|
|
1293
1293
|
M || '[{"weight": 16, "name": "Sig Waves", "key": "sig-wave-height", "collected": true},{"weight": 1, "name": "Wind", "key": "wind", "h5": true, "collected": true},{"weight": 96, "name": "Current", "key": "current", "collected": true},{"weight": 256,"name": "Tropicals","key": "tropicals", "collected": true}]'
|
|
1294
1294
|
);
|
|
1295
1295
|
this.layers.weather.forEach((O) => {
|
|
1296
|
-
O.collected = !!
|
|
1296
|
+
O.collected = !!b.some((p) => p.key === O.key && p.collected);
|
|
1297
1297
|
}), M = localStorage.getItem(this.activeWeatherLayersCache), M || localStorage.setItem(this.activeWeatherLayersCache, JSON.stringify(
|
|
1298
1298
|
[
|
|
1299
1299
|
{ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 },
|
|
1300
1300
|
{ weight: 4096, name: "Pressure", key: "prmsl", enabled: !0, type: "json" },
|
|
1301
1301
|
{ weight: 256, name: "Tropicals", key: "tropicals", enabled: !0, type: "json" }
|
|
1302
1302
|
]
|
|
1303
|
-
)), M = localStorage.getItem(this.activeWeatherLayersCache),
|
|
1303
|
+
)), M = localStorage.getItem(this.activeWeatherLayersCache), b = JSON.parse(M), this.autoActive && (this.activeWeatherLayers = [...b]), b.some((O) => O.key === "wind" && O.particle) && this.$emit("toggleWindParticle", !0), localStorage.getItem(this.windFeatherCache) === "true" && this.$emit("toggleWindFeather", !0), b.some((O) => O.key === "current" && O.particle) && this.$emit("toggleCurrentParticle", !0), localStorage.getItem(this.currentIsobandCache) === "true" && this.$emit("toggleCurrentIsoband", !0), b.some((O) => O.key === "wind" && !O.particle && localStorage.getItem(this.windFeatherCache) === "false") && (b = b.filter((O) => O.key !== "wind")), b.some((O) => O.key === "current" && !O.particle && localStorage.getItem(this.currentIsobandCache) === "false") && (b = b.filter((O) => O.key !== "current")), M = localStorage.getItem(this.activeOtherLayersCache), b = JSON.parse(M || '[{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}, {"weight": 2048,"name": "ENC","key": "enc","h5": true,"enabled": true,"type": "origin"}]'), this.activeOtherLayers = b, M = localStorage.getItem(this.sourceCache), this.source = M ? M === "CMEMS" ? "ECMWF" : M : this.source, this.$emit("forecastModel", this.source);
|
|
1304
1304
|
},
|
|
1305
1305
|
handleConfirm() {
|
|
1306
1306
|
var M;
|
|
1307
|
-
const
|
|
1308
|
-
this.$emit("weather", this.activeWeatherLayers,
|
|
1307
|
+
const z = (M = this.sourceList.find((b) => b.name === this.source)) == null ? void 0 : M.code;
|
|
1308
|
+
this.$emit("weather", this.activeWeatherLayers, z), this.$emit("other", this.activeOtherLayers), localStorage.setItem(this.autoActiveCache, this.autoActive), localStorage.setItem(this.sourceCache, this.source);
|
|
1309
1309
|
},
|
|
1310
|
-
handleWeatherLayerPick(
|
|
1311
|
-
var
|
|
1312
|
-
if (this.activeWeatherLayers = JSON.parse(localStorage.getItem(this.activeWeatherLayersCache)), this.rampColorLayers.includes(
|
|
1310
|
+
handleWeatherLayerPick(z) {
|
|
1311
|
+
var b;
|
|
1312
|
+
if (this.activeWeatherLayers = JSON.parse(localStorage.getItem(this.activeWeatherLayersCache)), this.rampColorLayers.includes(z.key) && this.mapProjection === "globe" || !this.autoActive)
|
|
1313
1313
|
return !1;
|
|
1314
|
-
(
|
|
1315
|
-
(O.key === "wind" && this.showWindFeather ||
|
|
1316
|
-
}), this.activeWeatherLayers = this.activeWeatherLayers.filter((O) => O.type === "json" && !(["wind", "current"].includes(O.key) && O.particle))) :
|
|
1314
|
+
(z.key === "wind" && !this.showWindFeather || z.key === "current" && !this.showCurrentIsoband) && (z.particle = !0), this.activeWeatherLayers.some((O) => O.key === z.key) ? this.activeWeatherLayers = this.activeWeatherLayers.filter((O) => O.key !== z.key) : this.activeWeatherLayers.length < 6 && z.enabled && (["png", "jpg"].includes(z.type) ? (this.activeWeatherLayers.forEach((O) => {
|
|
1315
|
+
(O.key === "wind" && this.showWindFeather || z.key === "current" && this.showCurrentIsoband) && (O.particle = !1);
|
|
1316
|
+
}), this.activeWeatherLayers = this.activeWeatherLayers.filter((O) => O.type === "json" && !(["wind", "current"].includes(O.key) && O.particle))) : z.key === "wind" ? (this.activeWeatherLayers.forEach((O) => {
|
|
1317
1317
|
O.key === "current" && this.showCurrentIsoband && (O.particle = !1);
|
|
1318
|
-
}), this.activeWeatherLayers = this.activeWeatherLayers.filter((O) => O.type === "json" && !(["wind", "current"].includes(O.key) && O.particle))) :
|
|
1318
|
+
}), this.activeWeatherLayers = this.activeWeatherLayers.filter((O) => O.type === "json" && !(["wind", "current"].includes(O.key) && O.particle))) : z.key === "current" && (this.activeWeatherLayers.forEach((O) => {
|
|
1319
1319
|
O.key === "wind" && this.showWindFeather && (O.particle = !1);
|
|
1320
|
-
}), this.activeWeatherLayers = this.activeWeatherLayers.filter((O) => O.type === "json" && !(["wind", "current"].includes(O.key) && O.particle))), this.activeWeatherLayers.push(
|
|
1321
|
-
const M = (
|
|
1320
|
+
}), this.activeWeatherLayers = this.activeWeatherLayers.filter((O) => O.type === "json" && !(["wind", "current"].includes(O.key) && O.particle))), this.activeWeatherLayers.push(z));
|
|
1321
|
+
const M = (b = this.sourceList.find((O) => O.name === this.source)) == null ? void 0 : b.code;
|
|
1322
1322
|
this.$emit("weather", this.activeWeatherLayers, M), localStorage.setItem(this.activeWeatherLayersCache, JSON.stringify(this.activeWeatherLayers));
|
|
1323
1323
|
},
|
|
1324
|
-
handleWeatherLayerCollect(
|
|
1324
|
+
handleWeatherLayerCollect(z) {
|
|
1325
1325
|
var M;
|
|
1326
|
-
!
|
|
1326
|
+
!z.collected && ((M = this.layers.weather.filter((b) => b.collected)) == null ? void 0 : M.length) >= 6 && (this.layers.weather.filter((b) => b.collected)[0].collected = !1), z.collected = !z.collected, localStorage.setItem(this.collectedLayerCache, JSON.stringify(this.layers.weather)), this.$emit("handleToggleVersion");
|
|
1327
1327
|
},
|
|
1328
1328
|
handleToggleWindParticle() {
|
|
1329
|
-
!this.showWindFeather && this.showWindParticle ? this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 }) : (this.showCurrentParticle && (this.$emit("toggleCurrentParticle", !1), this.showCurrentIsoband || (this.activeWeatherLayers = this.activeWeatherLayers.filter((
|
|
1329
|
+
!this.showWindFeather && this.showWindParticle ? this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 }) : (this.showCurrentParticle && (this.$emit("toggleCurrentParticle", !1), this.showCurrentIsoband || (this.activeWeatherLayers = this.activeWeatherLayers.filter((z) => z.key !== "current"), localStorage.setItem(this.activeWeatherLayersCache, JSON.stringify(this.activeWeatherLayers)))), this.$emit("toggleWindParticle", !this.showWindParticle), this.$emit("toggleParticeVersion"));
|
|
1330
1330
|
},
|
|
1331
1331
|
handleToggleWindFeather() {
|
|
1332
1332
|
this.showWindFeather && !this.showWindParticle && this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 }), this.$emit("toggleWindFeather", !this.showWindFeather), localStorage.setItem(this.windFeatherCache, !this.showWindFeather);
|
|
1333
1333
|
},
|
|
1334
1334
|
handleToggleCurrentParticle() {
|
|
1335
|
-
!this.showCurrentIsoband && this.showCurrentParticle ? this.handleWeatherLayerPick({ weight: 96, name: "Current", key: "current", vendor: "cmems", merge: !0, h5: !0, enabled: !0 }) : (this.showWindParticle && (this.$emit("toggleWindParticle", !1), this.showWindFeather || (this.activeWeatherLayers = this.activeWeatherLayers.filter((
|
|
1335
|
+
!this.showCurrentIsoband && this.showCurrentParticle ? this.handleWeatherLayerPick({ weight: 96, name: "Current", key: "current", vendor: "cmems", merge: !0, h5: !0, enabled: !0 }) : (this.showWindParticle && (this.$emit("toggleWindParticle", !1), this.$emit("toggleParticeVersion"), this.showWindFeather || (this.activeWeatherLayers = this.activeWeatherLayers.filter((z) => z.key !== "wind"), localStorage.setItem(this.activeWeatherLayersCache, JSON.stringify(this.activeWeatherLayers)))), this.$emit("toggleCurrentParticle", !this.showCurrentParticle), this.$emit("toggleParticeVersion"));
|
|
1336
1336
|
},
|
|
1337
1337
|
handleToggleCurrentIsoband() {
|
|
1338
1338
|
this.showCurrentIsoband && !this.showCurrentParticle && this.handleWeatherLayerPick({ weight: 96, name: "Current", key: "current", vendor: "cmems", merge: !0, h5: !0, enabled: !0 }), this.$emit("toggleCurrentIsoband", !this.showCurrentIsoband), localStorage.setItem(this.currentIsobandCache, !this.showCurrentIsoband);
|
|
1339
1339
|
},
|
|
1340
|
-
handleOtherLayerPick(
|
|
1341
|
-
this.activeOtherLayers.some((M) => M.key ===
|
|
1340
|
+
handleOtherLayerPick(z) {
|
|
1341
|
+
this.activeOtherLayers.some((M) => M.key === z.key) ? this.activeOtherLayers = this.activeOtherLayers.filter((M) => M.key !== z.key) : z.enabled && this.activeOtherLayers.push(z), localStorage.setItem(this.activeOtherLayersCache, JSON.stringify(this.activeOtherLayers)), this.$emit("other", this.activeOtherLayers);
|
|
1342
1342
|
},
|
|
1343
1343
|
handleMenuToggle() {
|
|
1344
1344
|
this.$emit("layerToggle", !this.layerToggle);
|
|
1345
1345
|
},
|
|
1346
1346
|
toggleAutoActive() {
|
|
1347
1347
|
var M;
|
|
1348
|
-
const
|
|
1349
|
-
this.autoActive = !this.autoActive, localStorage.setItem(this.autoActiveCache, this.autoActive), this.autoActive ? this.$emit("weather", this.activeWeatherLayers,
|
|
1348
|
+
const z = (M = this.sourceList.find((b) => b.name === this.source)) == null ? void 0 : M.code;
|
|
1349
|
+
this.autoActive = !this.autoActive, localStorage.setItem(this.autoActiveCache, this.autoActive), this.autoActive ? this.$emit("weather", this.activeWeatherLayers, z) : this.$emit("weather", [], z);
|
|
1350
1350
|
},
|
|
1351
1351
|
handleCoordToggle() {
|
|
1352
1352
|
this.showCoord = !this.showCoord, this.$emit("coordinate", this.showCoord);
|
|
@@ -1404,12 +1404,12 @@ const Q = (b, M) => {
|
|
|
1404
1404
|
key: 2,
|
|
1405
1405
|
class: "radio-tip"
|
|
1406
1406
|
};
|
|
1407
|
-
function q2(
|
|
1407
|
+
function q2(z, M, b, O, p, o) {
|
|
1408
1408
|
const A = P("ElTooltip"), a = P("ElRadio"), q = P("ElRadioGroup"), i = P("ElScrollbar");
|
|
1409
1409
|
return W(), l("div", X1, [
|
|
1410
1410
|
c("div", {
|
|
1411
1411
|
class: "menu-bar-box",
|
|
1412
|
-
style:
|
|
1412
|
+
style: e0({ top: b.top + 10 + "px", right: p.right + "px" })
|
|
1413
1413
|
}, [
|
|
1414
1414
|
c("div", w1, [
|
|
1415
1415
|
E(A, {
|
|
@@ -1420,7 +1420,7 @@ function q2(b, M, z, O, p, o) {
|
|
|
1420
1420
|
}, {
|
|
1421
1421
|
default: u0(() => [
|
|
1422
1422
|
c("div", {
|
|
1423
|
-
class: G(
|
|
1423
|
+
class: G(b.layerToggle ? "menu-icon active" : "menu-icon"),
|
|
1424
1424
|
onClick: M[0] || (M[0] = (...e) => o.handleMenuToggle && o.handleMenuToggle(...e))
|
|
1425
1425
|
}, M[17] || (M[17] = [
|
|
1426
1426
|
c("span", { class: "iconfont" }, "", -1)
|
|
@@ -1432,7 +1432,7 @@ function q2(b, M, z, O, p, o) {
|
|
|
1432
1432
|
], 4),
|
|
1433
1433
|
c("div", {
|
|
1434
1434
|
class: "menu-bar-box",
|
|
1435
|
-
style:
|
|
1435
|
+
style: e0({ top: b.top + 160 + "px", right: p.right + "px" })
|
|
1436
1436
|
}, [
|
|
1437
1437
|
c("div", v1, [
|
|
1438
1438
|
E(A, {
|
|
@@ -1504,7 +1504,7 @@ function q2(b, M, z, O, p, o) {
|
|
|
1504
1504
|
o.hasCollectedLayers ? (W(), l("div", {
|
|
1505
1505
|
key: 0,
|
|
1506
1506
|
class: "active-layers",
|
|
1507
|
-
style:
|
|
1507
|
+
style: e0({ right: p.right + "px", bottom: "100px" })
|
|
1508
1508
|
}, [
|
|
1509
1509
|
c("div", C1, [
|
|
1510
1510
|
M[22] || (M[22] = c("div", { style: { margin: "2px 5px" } }, "Weather Layers", -1)),
|
|
@@ -1530,21 +1530,21 @@ function q2(b, M, z, O, p, o) {
|
|
|
1530
1530
|
}, y(e.name), 9, I1),
|
|
1531
1531
|
e.key === "wind" && p.activeWeatherLayers.some((r) => r.key === e.key) ? (W(), l("div", D1, [
|
|
1532
1532
|
c("i", {
|
|
1533
|
-
class: G(["iconfont sub-layer-icon",
|
|
1533
|
+
class: G(["iconfont sub-layer-icon", b.showWindParticle ? "active" : ""]),
|
|
1534
1534
|
onClick: M[6] || (M[6] = (r) => o.handleToggleWindParticle())
|
|
1535
1535
|
}, "", 2),
|
|
1536
1536
|
c("i", {
|
|
1537
|
-
class: G(["iconfont sub-layer-icon",
|
|
1537
|
+
class: G(["iconfont sub-layer-icon", b.showWindFeather ? "active" : ""]),
|
|
1538
1538
|
onClick: M[7] || (M[7] = (r) => o.handleToggleWindFeather())
|
|
1539
1539
|
}, "", 2)
|
|
1540
1540
|
])) : U("", !0),
|
|
1541
1541
|
e.key === "current" && p.activeWeatherLayers.some((r) => r.key === e.key) ? (W(), l("div", P1, [
|
|
1542
1542
|
c("i", {
|
|
1543
|
-
class: G(["iconfont sub-layer-icon",
|
|
1543
|
+
class: G(["iconfont sub-layer-icon", b.showCurrentParticle ? "active" : ""]),
|
|
1544
1544
|
onClick: M[8] || (M[8] = (r) => o.handleToggleCurrentParticle())
|
|
1545
1545
|
}, "", 2),
|
|
1546
1546
|
c("i", {
|
|
1547
|
-
class: G(["iconfont sub-layer-icon",
|
|
1547
|
+
class: G(["iconfont sub-layer-icon", b.showCurrentIsoband ? "active" : ""]),
|
|
1548
1548
|
onClick: M[9] || (M[9] = (r) => o.handleToggleCurrentIsoband())
|
|
1549
1549
|
}, "", 2)
|
|
1550
1550
|
])) : U("", !0)
|
|
@@ -1552,10 +1552,10 @@ function q2(b, M, z, O, p, o) {
|
|
|
1552
1552
|
], 4)) : U("", !0),
|
|
1553
1553
|
c("div", {
|
|
1554
1554
|
class: "available-layers flex-center",
|
|
1555
|
-
style:
|
|
1555
|
+
style: e0({ top: b.top + "px", right: b.layerToggle ? "0px" : "-240px" })
|
|
1556
1556
|
}, [
|
|
1557
1557
|
c("div", {
|
|
1558
|
-
class: G(["list-box",
|
|
1558
|
+
class: G(["list-box", b.layerToggle ? "right-bar" : ""])
|
|
1559
1559
|
}, [
|
|
1560
1560
|
c("div", S1, [
|
|
1561
1561
|
M[23] || (M[23] = c("div", null, "Layers", -1)),
|
|
@@ -1596,21 +1596,21 @@ function q2(b, M, z, O, p, o) {
|
|
|
1596
1596
|
}, y(e.name), 9, U1),
|
|
1597
1597
|
e.key === "wind" && p.activeWeatherLayers.some((r) => r.key === e.key) ? (W(), l("div", K1, [
|
|
1598
1598
|
c("i", {
|
|
1599
|
-
class: G(["iconfont sub-layer-icon",
|
|
1599
|
+
class: G(["iconfont sub-layer-icon", b.showWindParticle ? "active" : ""]),
|
|
1600
1600
|
onClick: M[12] || (M[12] = (r) => o.handleToggleWindParticle())
|
|
1601
1601
|
}, "", 2),
|
|
1602
1602
|
c("i", {
|
|
1603
|
-
class: G(["iconfont sub-layer-icon",
|
|
1603
|
+
class: G(["iconfont sub-layer-icon", b.showWindFeather ? "active" : ""]),
|
|
1604
1604
|
onClick: M[13] || (M[13] = (r) => o.handleToggleWindFeather())
|
|
1605
1605
|
}, "", 2)
|
|
1606
1606
|
])) : U("", !0),
|
|
1607
1607
|
e.key === "current" && p.activeWeatherLayers.some((r) => r.key === e.key) ? (W(), l("div", J1, [
|
|
1608
1608
|
c("i", {
|
|
1609
|
-
class: G(["iconfont sub-layer-icon",
|
|
1609
|
+
class: G(["iconfont sub-layer-icon", b.showCurrentParticle ? "active" : ""]),
|
|
1610
1610
|
onClick: M[14] || (M[14] = (r) => o.handleToggleCurrentParticle())
|
|
1611
1611
|
}, "", 2),
|
|
1612
1612
|
c("i", {
|
|
1613
|
-
class: G(["iconfont sub-layer-icon",
|
|
1613
|
+
class: G(["iconfont sub-layer-icon", b.showCurrentIsoband ? "active" : ""]),
|
|
1614
1614
|
onClick: M[15] || (M[15] = (r) => o.handleToggleCurrentIsoband())
|
|
1615
1615
|
}, "", 2)
|
|
1616
1616
|
])) : U("", !0)
|
|
@@ -1714,7 +1714,7 @@ const r2 = {
|
|
|
1714
1714
|
type: Boolean,
|
|
1715
1715
|
default: !1
|
|
1716
1716
|
},
|
|
1717
|
-
|
|
1717
|
+
toggleParticeVersion: {
|
|
1718
1718
|
type: Number
|
|
1719
1719
|
},
|
|
1720
1720
|
toggleVersion: {
|
|
@@ -1735,12 +1735,12 @@ const r2 = {
|
|
|
1735
1735
|
watch: {
|
|
1736
1736
|
"wind.version": {
|
|
1737
1737
|
handler() {
|
|
1738
|
-
var
|
|
1739
|
-
(
|
|
1738
|
+
var z;
|
|
1739
|
+
(z = this.wind) != null && z.active && this.showWindFeather ? this.handleRender() : this.handleClear();
|
|
1740
1740
|
},
|
|
1741
1741
|
deep: !0
|
|
1742
1742
|
},
|
|
1743
|
-
|
|
1743
|
+
toggleParticeVersion: {
|
|
1744
1744
|
handler() {
|
|
1745
1745
|
this.handleParticle();
|
|
1746
1746
|
}
|
|
@@ -1758,7 +1758,7 @@ const r2 = {
|
|
|
1758
1758
|
this.$emit("particle", { particle: this.showWindParticle, key: "wind", weight: 1 });
|
|
1759
1759
|
},
|
|
1760
1760
|
handleRender() {
|
|
1761
|
-
var
|
|
1761
|
+
var z, M, b, O;
|
|
1762
1762
|
if (!this.map)
|
|
1763
1763
|
setTimeout(() => {
|
|
1764
1764
|
this.handleRender();
|
|
@@ -1766,7 +1766,7 @@ const r2 = {
|
|
|
1766
1766
|
else if (this.wind) {
|
|
1767
1767
|
const p = (/* @__PURE__ */ new Date()).valueOf();
|
|
1768
1768
|
let o = 0, A = 0, a = this.empty;
|
|
1769
|
-
if ((
|
|
1769
|
+
if ((z = this.wind) != null && z.active && (a = (M = this.wind) == null ? void 0 : M.data), (b = this.map) != null && b.getSource(this.source))
|
|
1770
1770
|
(O = this.map) == null || O.getSource(this.source).setData(a), A = (/* @__PURE__ */ new Date()).valueOf() - (p + o), console.log("[wind] update elapsed: ", A, ", total: ", o += A);
|
|
1771
1771
|
else {
|
|
1772
1772
|
this.map.addSource(this.source, { type: "geojson", data: a });
|
|
@@ -1816,21 +1816,21 @@ const r2 = {
|
|
|
1816
1816
|
if (!this.windBarbLoaded)
|
|
1817
1817
|
this.handleRender();
|
|
1818
1818
|
else
|
|
1819
|
-
for (const
|
|
1820
|
-
const M =
|
|
1819
|
+
for (const z of this.barbs ?? []) {
|
|
1820
|
+
const M = z < 10 ? `00${z}kts` : z < 100 ? `0${z}kts` : `${z}kts`;
|
|
1821
1821
|
this.map.getLayer(M) && this.map.setLayoutProperty(M, "visibility", this.showWindFeather ? "visible" : "none");
|
|
1822
1822
|
}
|
|
1823
1823
|
},
|
|
1824
1824
|
handleClear() {
|
|
1825
|
-
for (const
|
|
1826
|
-
const M =
|
|
1825
|
+
for (const z of this.barbs ?? []) {
|
|
1826
|
+
const M = z < 10 ? `00${z}kts` : z < 100 ? `0${z}kts` : `${z}kts`;
|
|
1827
1827
|
this.map.getLayer(M) && this.map.removeLayer(M);
|
|
1828
1828
|
}
|
|
1829
1829
|
this.map.getSource(this.source) && this.map.removeSource(this.source), this.windBarbLoaded = !1;
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
1832
|
};
|
|
1833
|
-
function n2(
|
|
1833
|
+
function n2(z, M, b, O, p, o) {
|
|
1834
1834
|
return null;
|
|
1835
1835
|
}
|
|
1836
1836
|
const d2 = /* @__PURE__ */ Q(r2, [["render", n2]]);
|
|
@@ -1852,8 +1852,8 @@ class F0 {
|
|
|
1852
1852
|
* @param lng
|
|
1853
1853
|
* @param n
|
|
1854
1854
|
*/
|
|
1855
|
-
convertNLng(M,
|
|
1856
|
-
return M > 180 ? this.convertNLng(M - 360,
|
|
1855
|
+
convertNLng(M, b = 0) {
|
|
1856
|
+
return M > 180 ? this.convertNLng(M - 360, b + 1) : M < -180 ? this.convertNLng(M + 360, b + 1) : [M, b];
|
|
1857
1857
|
}
|
|
1858
1858
|
/**
|
|
1859
1859
|
* [4326坐标]
|
|
@@ -1879,28 +1879,28 @@ class F0 {
|
|
|
1879
1879
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
1880
1880
|
*/
|
|
1881
1881
|
getBoundPixel() {
|
|
1882
|
-
const M = this.map.getBounds(),
|
|
1882
|
+
const M = this.map.getBounds(), b = this.map.getZoom() + 1, O = [M._ne.lng, M._ne.lat], p = [M._sw.lng, M._sw.lat], [o, A] = this.convertNLng(O[0]), [a, q] = this.convertNLng(p[0]), [i, e] = this.mercator.px([o, O[1]], b), [r, s] = this.mercator.px([a, p[1]], b), n = Math.round(this.mercator.size * Math.pow(2, b) * (A + q));
|
|
1883
1883
|
return [r, s, i + n, e];
|
|
1884
1884
|
}
|
|
1885
1885
|
/**
|
|
1886
1886
|
* [视窗边界像素宽度]
|
|
1887
1887
|
*/
|
|
1888
1888
|
getBoundRange() {
|
|
1889
|
-
const M = this.map.getZoom() + 1,
|
|
1890
|
-
return [O[0] /
|
|
1889
|
+
const M = this.map.getZoom() + 1, b = this.mercator.size * Math.pow(2, M), O = this.getBoundPixel();
|
|
1890
|
+
return [O[0] / b, O[2] / b, O[3] / b, O[1] / b];
|
|
1891
1891
|
}
|
|
1892
1892
|
/**
|
|
1893
1893
|
* 获取视窗世界(多世界复本)
|
|
1894
1894
|
* @param pixels
|
|
1895
1895
|
* @param zoom
|
|
1896
1896
|
*/
|
|
1897
|
-
getWorldCopy(M,
|
|
1898
|
-
const O = 2 **
|
|
1897
|
+
getWorldCopy(M, b) {
|
|
1898
|
+
const O = 2 ** b, [p, o, A, a] = M.map((e) => ~~(e / (O * 256))), q = [];
|
|
1899
1899
|
for (let e = a; e <= o; e++)
|
|
1900
1900
|
for (let r = p; r <= A; r++)
|
|
1901
1901
|
q.push([r, e]);
|
|
1902
1902
|
return q.map((e) => {
|
|
1903
|
-
const r = 2 **
|
|
1903
|
+
const r = 2 ** b * 256;
|
|
1904
1904
|
return [e[0] * r, e[1] * r, r];
|
|
1905
1905
|
});
|
|
1906
1906
|
}
|
|
@@ -1909,12 +1909,12 @@ class F0 {
|
|
|
1909
1909
|
M.setCoordinates(this.getBoundLngLat()), M = this.map.getSource(this.particleSource), M.setCoordinates(this.getBoundLngLat()), this.rampColorCanvas.width = this.map._canvas.clientWidth, this.rampColorCanvas.height = this.map._canvas.clientHeight, this.particleCanvas.width = this.map._canvas.clientWidth, this.particleCanvas.height = this.map._canvas.clientHeight;
|
|
1910
1910
|
}
|
|
1911
1911
|
toggle(M) {
|
|
1912
|
-
const
|
|
1913
|
-
|
|
1912
|
+
const b = this.map.getLayoutProperty(this.rampColorLayer, "visibility"), O = M ? "visible" : "none";
|
|
1913
|
+
b !== O && this.map.setLayoutProperty(this.rampColorLayer, "visibility", O);
|
|
1914
1914
|
}
|
|
1915
1915
|
toggleParticle(M) {
|
|
1916
|
-
const
|
|
1917
|
-
|
|
1916
|
+
const b = this.map.getLayoutProperty(this.particleLayer, "visibility"), O = M ? "visible" : "none";
|
|
1917
|
+
b !== O && this.map.setLayoutProperty(this.particleLayer, "visibility", O);
|
|
1918
1918
|
}
|
|
1919
1919
|
}
|
|
1920
1920
|
class T0 {
|
|
@@ -1925,8 +1925,8 @@ class T0 {
|
|
|
1925
1925
|
* @param type [VERTEX_SHADER, FRAGMENT_SHADER]
|
|
1926
1926
|
* @param schema 着色器渲染代码[GLSL]
|
|
1927
1927
|
*/
|
|
1928
|
-
createShader(M,
|
|
1929
|
-
const p = M.createShader(
|
|
1928
|
+
createShader(M, b, O) {
|
|
1929
|
+
const p = M.createShader(b);
|
|
1930
1930
|
if (p && (M.shaderSource(p, O), M.compileShader(p), !M.getShaderParameter(p, M.COMPILE_STATUS)))
|
|
1931
1931
|
throw new Error(M.getShaderInfoLog(p) || "error happened while create shader...");
|
|
1932
1932
|
return p;
|
|
@@ -1942,9 +1942,9 @@ class T0 {
|
|
|
1942
1942
|
* @param width??
|
|
1943
1943
|
* @param height??
|
|
1944
1944
|
*/
|
|
1945
|
-
createTexture(M,
|
|
1945
|
+
createTexture(M, b, O, p, o, A, a) {
|
|
1946
1946
|
const q = M.createTexture();
|
|
1947
|
-
return M.bindTexture(M.TEXTURE_2D, q), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MIN_FILTER,
|
|
1947
|
+
return M.bindTexture(M.TEXTURE_2D, q), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MIN_FILTER, b), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MAG_FILTER, O), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_WRAP_S, p), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_WRAP_T, p), o instanceof Uint8Array ? M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, A, a, 0, M.RGBA, M.UNSIGNED_BYTE, o) : M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, M.RGBA, M.UNSIGNED_BYTE, o), M.bindTexture(M.TEXTURE_2D, null), q;
|
|
1948
1948
|
}
|
|
1949
1949
|
/**
|
|
1950
1950
|
* 创建数据资源
|
|
@@ -1953,10 +1953,10 @@ class T0 {
|
|
|
1953
1953
|
* element: ELEMENT_ARRAY_BUFFER
|
|
1954
1954
|
* @param resource 顶点数据
|
|
1955
1955
|
*/
|
|
1956
|
-
createDataBuffer(M,
|
|
1956
|
+
createDataBuffer(M, b, O) {
|
|
1957
1957
|
if (M) {
|
|
1958
1958
|
const p = M.createBuffer();
|
|
1959
|
-
return
|
|
1959
|
+
return b === "array" ? (M.bindBuffer(M.ARRAY_BUFFER, p), O && M.bufferData(M.ARRAY_BUFFER, O, M.STATIC_DRAW)) : b === "element" && (M.bindBuffer(M.ELEMENT_ARRAY_BUFFER, p), O && M.bufferData(M.ELEMENT_ARRAY_BUFFER, O, M.STATIC_DRAW)), p;
|
|
1960
1960
|
}
|
|
1961
1961
|
return null;
|
|
1962
1962
|
}
|
|
@@ -1966,8 +1966,8 @@ class T0 {
|
|
|
1966
1966
|
* @param vertexSchema
|
|
1967
1967
|
* @param fragmentSchema
|
|
1968
1968
|
*/
|
|
1969
|
-
createProgram(M,
|
|
1970
|
-
const p = M.createProgram(), o = this.createShader(M, M.VERTEX_SHADER,
|
|
1969
|
+
createProgram(M, b, O) {
|
|
1970
|
+
const p = M.createProgram(), o = this.createShader(M, M.VERTEX_SHADER, b), A = this.createShader(M, M.FRAGMENT_SHADER, O);
|
|
1971
1971
|
if (p && o && A && (M.attachShader(p, o), M.attachShader(p, A), M.linkProgram(p), !M.getProgramParameter(p, M.LINK_STATUS)))
|
|
1972
1972
|
throw new Error(M.getProgramInfoLog(p) || "error happened while creating ramp color program");
|
|
1973
1973
|
return p;
|
|
@@ -1978,8 +1978,8 @@ class T0 {
|
|
|
1978
1978
|
* @param vertexSchema
|
|
1979
1979
|
* @param fragmentSchema
|
|
1980
1980
|
*/
|
|
1981
|
-
createProgramWrapper(M,
|
|
1982
|
-
const p = this.createProgram(M,
|
|
1981
|
+
createProgramWrapper(M, b, O) {
|
|
1982
|
+
const p = this.createProgram(M, b, O);
|
|
1983
1983
|
if (p) {
|
|
1984
1984
|
const o = { program: p }, A = M.getProgramParameter(p, M.ACTIVE_ATTRIBUTES);
|
|
1985
1985
|
for (let q = 0; q < A; q++) {
|
|
@@ -1998,13 +1998,13 @@ class T0 {
|
|
|
1998
1998
|
* 初始化渐变色纹理
|
|
1999
1999
|
* @param colors
|
|
2000
2000
|
*/
|
|
2001
|
-
setup(M,
|
|
2001
|
+
setup(M, b, O = !1, p, o) {
|
|
2002
2002
|
const A = document.createElement("canvas");
|
|
2003
2003
|
A.width = 256, A.height = 1;
|
|
2004
2004
|
const a = A.getContext("2d");
|
|
2005
2005
|
if (a && M) {
|
|
2006
2006
|
const q = a == null ? void 0 : a.createLinearGradient(0, 0, 256, 0);
|
|
2007
|
-
return
|
|
2007
|
+
return b.forEach(([i, e]) => {
|
|
2008
2008
|
q.addColorStop(i, e);
|
|
2009
2009
|
}), a.fillStyle = q, a.fillRect(0, 0, 256, 1), {
|
|
2010
2010
|
canvas: A,
|
|
@@ -2020,8 +2020,8 @@ class T0 {
|
|
|
2020
2020
|
};
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
|
-
setupParticle(M,
|
|
2024
|
-
const O = Math.ceil(Math.sqrt(
|
|
2023
|
+
setupParticle(M, b = 1e3) {
|
|
2024
|
+
const O = Math.ceil(Math.sqrt(b)), p = O * O, o = new Uint8Array(p * 4);
|
|
2025
2025
|
for (let e = 0; e < o.length; e++)
|
|
2026
2026
|
o[e] = Math.floor(Math.random() * 256);
|
|
2027
2027
|
const A = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O), a = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O), q = new Float32Array(p);
|
|
@@ -2030,8 +2030,8 @@ class T0 {
|
|
|
2030
2030
|
const i = this.createDataBuffer(M, "array", q);
|
|
2031
2031
|
return { resolution: O, total: p, texture0: A, texture1: a, indexBuffer: i };
|
|
2032
2032
|
}
|
|
2033
|
-
bind(M,
|
|
2034
|
-
const p = this.createProgram(M,
|
|
2033
|
+
bind(M, b, O) {
|
|
2034
|
+
const p = this.createProgram(M, b, O);
|
|
2035
2035
|
if (p) {
|
|
2036
2036
|
const o = this.createDataBuffer(M, "array", void 0), A = M.getAttribLocation(p, "a_position");
|
|
2037
2037
|
M.enableVertexAttribArray(A), M.vertexAttribPointer(A, 2, M.FLOAT, !1, 0, 0);
|
|
@@ -2042,68 +2042,68 @@ class T0 {
|
|
|
2042
2042
|
}
|
|
2043
2043
|
return {};
|
|
2044
2044
|
}
|
|
2045
|
-
bindParticle(M,
|
|
2046
|
-
const a = this.createProgramWrapper(M,
|
|
2045
|
+
bindParticle(M, b, O, p, o, A) {
|
|
2046
|
+
const a = this.createProgramWrapper(M, b, O), q = this.createProgramWrapper(M, p, o), i = this.createProgramWrapper(M, p, A), e = this.createDataBuffer(M, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), r = M.createFramebuffer();
|
|
2047
2047
|
return { particle: a, screen: q, update: i, quadBuffer: e, frameBuffer: r };
|
|
2048
2048
|
}
|
|
2049
|
-
draw(M,
|
|
2049
|
+
draw(M, b, O, p, o, A, a) {
|
|
2050
2050
|
var q, i;
|
|
2051
|
-
if (
|
|
2052
|
-
M.resize(),
|
|
2051
|
+
if (b && O) {
|
|
2052
|
+
M.resize(), b == null || b.viewport(0, 0, (q = b == null ? void 0 : b.canvas) == null ? void 0 : q.width, (i = b == null ? void 0 : b.canvas) == null ? void 0 : i.height), b.clearColor(0, 0, 0, 0), b.clear(b.COLOR_BUFFER_BIT | b.DEPTH_BUFFER_BIT);
|
|
2053
2053
|
try {
|
|
2054
|
-
const e =
|
|
2055
|
-
if (
|
|
2056
|
-
const d =
|
|
2057
|
-
|
|
2054
|
+
const e = b.getUniformLocation(O, "u_resolution"), r = b.getUniformLocation(O, "u_image"), s = b.getUniformLocation(O, "u_color");
|
|
2055
|
+
if (b.useProgram(O), b.uniform2f(e, b.canvas.width * M.ratio, b.canvas.height * M.ratio), b.activeTexture(b.TEXTURE0), b.bindTexture(b.TEXTURE_2D, p), b.uniform1i(r, 0), b.activeTexture(b.TEXTURE1), b.bindTexture(b.TEXTURE_2D, o), b.uniform1i(s, 1), a != null && a.uvRange && (a != null && a.sRange)) {
|
|
2056
|
+
const d = b.getUniformLocation(O, "u_range_u_v"), h = b.getUniformLocation(O, "u_range_s");
|
|
2057
|
+
b.uniform2f(d, a.uvRange[0], a.uvRange[1]), b.uniform2f(h, a.sRange[0], a.sRange[1]);
|
|
2058
2058
|
}
|
|
2059
2059
|
const n = M.getBoundPixel(), m = M.map.getZoom() + 1, L = M.getWorldCopy(n, m);
|
|
2060
2060
|
for (const d of L) {
|
|
2061
2061
|
const h = (d[0] - n[0]) * M.ratio, R = (d[1] - n[3]) * M.ratio, w = d[2] * M.ratio, [x, X, _, V] = [h, w + h, R, w + R], $ = new Float32Array([x, _, X, _, x, V, x, V, X, _, X, V]);
|
|
2062
|
-
|
|
2062
|
+
b.bindBuffer(b.ARRAY_BUFFER, A), b.bufferData(b.ARRAY_BUFFER, $, b.STATIC_DRAW), b.drawArrays(b.TRIANGLES, 0, 6);
|
|
2063
2063
|
}
|
|
2064
2064
|
} catch (e) {
|
|
2065
2065
|
console.log(`render failed...${e}`);
|
|
2066
2066
|
}
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
|
-
drawParticle(M,
|
|
2069
|
+
drawParticle(M, b, O, p, o) {
|
|
2070
2070
|
var A, a;
|
|
2071
|
-
|
|
2071
|
+
b && (b == null || b.viewport(0, 0, (A = b == null ? void 0 : b.canvas) == null ? void 0 : A.width, (a = b == null ? void 0 : b.canvas) == null ? void 0 : a.height), b.disable(b.DEPTH_TEST), b.disable(b.STENCIL_TEST), b.activeTexture(b.TEXTURE0), b.bindTexture(b.TEXTURE_2D, O), b.activeTexture(b.TEXTURE1), b.bindTexture(b.TEXTURE_2D, p.texture0), this.renderScreen(M, b, p, o), this.updateParticles(M, b, p, o));
|
|
2072
2072
|
}
|
|
2073
|
-
renderScreen(M,
|
|
2074
|
-
|
|
2073
|
+
renderScreen(M, b, O, p) {
|
|
2074
|
+
b.bindFramebuffer(b.FRAMEBUFFER, O.frameBuffer), b.framebufferTexture2D(b.FRAMEBUFFER, b.COLOR_ATTACHMENT0, b.TEXTURE_2D, O.screenTexture, 0), b.viewport(0, 0, b.canvas.width, b.canvas.height), this.renderScreenTexture(b, O.backgroundTexture, O.screen, O.quadBuffer, 0.95), this.renderParticles(M, b, O, p), b.bindFramebuffer(b.FRAMEBUFFER, null), this.renderScreenTexture(b, O.screenTexture, O.screen, O.quadBuffer, 1);
|
|
2075
2075
|
const o = O.backgroundTexture;
|
|
2076
2076
|
O.backgroundTexture = O.screenTexture, O.screenTexture = o;
|
|
2077
2077
|
}
|
|
2078
|
-
renderScreenTexture(M,
|
|
2079
|
-
M && (M.useProgram(O.program), M.bindBuffer(M.ARRAY_BUFFER, p), M.enableVertexAttribArray(O.a_pos), M.vertexAttribPointer(O.a_pos, 2, M.FLOAT, !1, 0, 0), M.activeTexture(M.TEXTURE2), M.bindTexture(M.TEXTURE_2D,
|
|
2078
|
+
renderScreenTexture(M, b, O, p, o) {
|
|
2079
|
+
M && (M.useProgram(O.program), M.bindBuffer(M.ARRAY_BUFFER, p), M.enableVertexAttribArray(O.a_pos), M.vertexAttribPointer(O.a_pos, 2, M.FLOAT, !1, 0, 0), M.activeTexture(M.TEXTURE2), M.bindTexture(M.TEXTURE_2D, b), M.uniform1i(O.u_screen, 2), M.uniform1f(O.u_opacity, o), M.drawArrays(M.TRIANGLES, 0, 6));
|
|
2080
2080
|
}
|
|
2081
|
-
renderParticles(M,
|
|
2082
|
-
if (
|
|
2083
|
-
|
|
2081
|
+
renderParticles(M, b, O, p) {
|
|
2082
|
+
if (b) {
|
|
2083
|
+
b.useProgram(O.particle.program), b.bindBuffer(b.ARRAY_BUFFER, O.indexBuffer), b.enableVertexAttribArray(O.particle.a_index), b.vertexAttribPointer(O.particle.a_index, 1, b.FLOAT, !1, 0, 0), b.activeTexture(b.TEXTURE2), b.bindTexture(b.TEXTURE_2D, O.color.texture), b.uniform1i(O.particle.u_factor, 0), b.uniform1i(O.particle.u_particles, 1), b.uniform1i(O.particle.u_color_ramp, 2), b.uniform1f(O.particle.u_particles_resolution, O.resolution * M.ratio), b.uniform1f(O.particle.u_point, M.ratio);
|
|
2084
2084
|
const o = M.getBoundRange();
|
|
2085
|
-
|
|
2085
|
+
b.uniform4f(O.particle.u_viewport, o[0], o[1], o[2], o[3]), b.uniform2f(O.particle.u_factor_min, p.uvRange[0], p.uvRange[0]), b.uniform2f(O.particle.u_factor_max, p.uvRange[1], p.uvRange[1]), b.drawArrays(b.POINTS, 0, O.total);
|
|
2086
2086
|
}
|
|
2087
2087
|
}
|
|
2088
|
-
updateParticles(M,
|
|
2088
|
+
updateParticles(M, b, O, p) {
|
|
2089
2089
|
var A, a;
|
|
2090
|
-
if (
|
|
2091
|
-
|
|
2090
|
+
if (b) {
|
|
2091
|
+
b.bindFramebuffer(b.FRAMEBUFFER, O.frameBuffer), b.framebufferTexture2D(b.FRAMEBUFFER, b.COLOR_ATTACHMENT0, b.TEXTURE_2D, O.texture1, 0), b.viewport(0, 0, O.resolution, O.resolution), b.useProgram(O.update.program), b.bindBuffer(b.ARRAY_BUFFER, O.quadBuffer), b.enableVertexAttribArray(O.update.a_pos), b.vertexAttribPointer(O.update.a_pos, 2, b.FLOAT, !1, 0, 0), b.uniform1i(O.update.u_factor, 0), b.uniform1i(O.update.u_particles, 1);
|
|
2092
2092
|
const q = M.getBoundRange();
|
|
2093
|
-
|
|
2093
|
+
b.uniform4f(O.update.u_viewport, q[0], q[1], q[2], q[3]), b.uniform1f(O.update.u_rand_seed, Math.random()), b.uniform2f(O.update.u_factor_res, (A = O == null ? void 0 : O.image) == null ? void 0 : A.width, (a = O == null ? void 0 : O.image) == null ? void 0 : a.height), b.uniform2f(O.update.u_factor_min, p.uvRange[0], p.uvRange[0]), b.uniform2f(O.update.u_factor_max, p.uvRange[1], p.uvRange[1]), b.uniform1f(O.update.u_speed_factor, p.speedFactor * M.ratio), b.uniform1f(O.update.u_drop_rate, p.dropRate), b.uniform1f(O.update.u_drop_rate_bump, p.dropRateBump), b.drawArrays(b.TRIANGLES, 0, 6);
|
|
2094
2094
|
}
|
|
2095
2095
|
const o = O.texture0;
|
|
2096
2096
|
O.texture0 = O.texture1, O.texture1 = o;
|
|
2097
2097
|
}
|
|
2098
|
-
resize(M,
|
|
2098
|
+
resize(M, b) {
|
|
2099
2099
|
M.resize();
|
|
2100
|
-
const O = new Uint8Array(
|
|
2100
|
+
const O = new Uint8Array(b.canvas.width * b.canvas.height * 4).fill(0, 0, b.canvas.width * b.canvas.height * 4), p = this.createTexture(b, b.NEAREST, b.NEAREST, b.CLAMP_TO_EDGE, O, b.canvas.width, b.canvas.height), o = this.createTexture(b, b.NEAREST, b.NEAREST, b.CLAMP_TO_EDGE, O, b.canvas.width, b.canvas.height);
|
|
2101
2101
|
return { screenTexture: p, backgroundTexture: o };
|
|
2102
2102
|
}
|
|
2103
2103
|
async loadImg(M) {
|
|
2104
|
-
return new Promise((
|
|
2104
|
+
return new Promise((b) => {
|
|
2105
2105
|
const O = new Blob([M], { type: M.type }), p = URL.createObjectURL(O), o = new Image();
|
|
2106
|
-
o.crossOrigin = "anonymous", o.src = p, o.onload = () =>
|
|
2106
|
+
o.crossOrigin = "anonymous", o.src = p, o.onload = () => b(o);
|
|
2107
2107
|
});
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
@@ -4061,15 +4061,15 @@ const W2 = {
|
|
|
4061
4061
|
watch: {
|
|
4062
4062
|
"factor.version": {
|
|
4063
4063
|
handler() {
|
|
4064
|
-
var
|
|
4065
|
-
(
|
|
4064
|
+
var z;
|
|
4065
|
+
(z = this.factor) != null && z.active ? this.handleRender() : this.handleClear();
|
|
4066
4066
|
},
|
|
4067
4067
|
deep: !0
|
|
4068
4068
|
},
|
|
4069
4069
|
toggleVersion: {
|
|
4070
4070
|
handler() {
|
|
4071
|
-
var
|
|
4072
|
-
this.right = (((
|
|
4071
|
+
var z;
|
|
4072
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
4073
4073
|
},
|
|
4074
4074
|
immediate: !0
|
|
4075
4075
|
}
|
|
@@ -4081,19 +4081,19 @@ const W2 = {
|
|
|
4081
4081
|
this.handleRender();
|
|
4082
4082
|
}, 500);
|
|
4083
4083
|
else if (this.factor) {
|
|
4084
|
-
const
|
|
4085
|
-
let M = 0,
|
|
4086
|
-
this.handleDraw(),
|
|
4084
|
+
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
4085
|
+
let M = 0, b = 0;
|
|
4086
|
+
this.handleDraw(), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("[wind-particle] add elapsed: ", b, ", total: ", M += b);
|
|
4087
4087
|
}
|
|
4088
4088
|
},
|
|
4089
4089
|
handleClear() {
|
|
4090
|
-
var
|
|
4091
|
-
(
|
|
4090
|
+
var z, M, b, O, p, o, A, a;
|
|
4091
|
+
(z = this.viewport) == null || z.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (b = this.viewport) == null ? void 0 : b.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (a = (A = this.viewport) == null ? void 0 : A.map) == null || a.off("moveend", this.handlePlay), this.handlePause();
|
|
4092
4092
|
},
|
|
4093
4093
|
handleSetup() {
|
|
4094
4094
|
if (!this.context) {
|
|
4095
4095
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4096
|
-
const
|
|
4096
|
+
const z = [
|
|
4097
4097
|
[0, "rgb(98, 113, 184, 0.8)"],
|
|
4098
4098
|
// 0
|
|
4099
4099
|
[12 / 255, "rgb(98, 113, 184)"],
|
|
@@ -4122,16 +4122,16 @@ const W2 = {
|
|
|
4122
4122
|
// 30m/s
|
|
4123
4123
|
[1, "rgb(91, 136, 161)"]
|
|
4124
4124
|
];
|
|
4125
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4126
|
-
const { program: M, aPositionBuffer:
|
|
4127
|
-
this.program = M, this.aPositionBuffer =
|
|
4125
|
+
this.rampColor = this.webgl.setup(this.context, z);
|
|
4126
|
+
const { program: M, aPositionBuffer: b } = this.webgl.bind(this.context, a0.vertexSchema, a0.uvFragmentSchema);
|
|
4127
|
+
this.program = M, this.aPositionBuffer = b;
|
|
4128
4128
|
}
|
|
4129
4129
|
this.handleParticleSetup();
|
|
4130
4130
|
},
|
|
4131
4131
|
handleParticleSetup() {
|
|
4132
4132
|
if (!this.particleContext) {
|
|
4133
4133
|
this.particleContext = this.viewport.particleCanvas.getContext("webgl");
|
|
4134
|
-
const
|
|
4134
|
+
const z = [
|
|
4135
4135
|
[0, "rgb(183,224,224)"],
|
|
4136
4136
|
[1, "rgb(217,220,220)"]
|
|
4137
4137
|
];
|
|
@@ -4142,20 +4142,20 @@ const W2 = {
|
|
|
4142
4142
|
n0.quadVertSchema,
|
|
4143
4143
|
n0.screenFragmentSchema,
|
|
4144
4144
|
n0.updateFragmentSchema
|
|
4145
|
-
), this.wrapper.color = this.webgl.setup(this.particleContext,
|
|
4145
|
+
), this.wrapper.color = this.webgl.setup(this.particleContext, z, !0, 16, 16), this.wrapper = { ...this.wrapper, ...this.webgl.setupParticle(this.particleContext, 9e3), ...this.webgl.resize(this.viewport, this.particleContext) }, this.viewport.map.on("resize", this.handleResize), this.viewport.map.on("movestart", this.handlePause), this.viewport.map.on("moveend", this.handlePlay);
|
|
4146
4146
|
}
|
|
4147
4147
|
},
|
|
4148
4148
|
async handleDraw() {
|
|
4149
4149
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4150
4150
|
this.etime = this.factor.etime;
|
|
4151
|
-
const
|
|
4152
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4151
|
+
const z = await this.webgl.loadImg(this.factor.raw);
|
|
4152
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, z), this.particleTexture = this.webgl.createTexture(
|
|
4153
4153
|
this.particleContext,
|
|
4154
4154
|
this.particleContext.NEAREST,
|
|
4155
4155
|
this.particleContext.LINEAR,
|
|
4156
4156
|
this.particleContext.CLAMP_TO_EDGE,
|
|
4157
|
-
|
|
4158
|
-
), this.wrapper.image =
|
|
4157
|
+
z
|
|
4158
|
+
), this.wrapper.image = z;
|
|
4159
4159
|
}
|
|
4160
4160
|
this.initial && (this.initial = !1, this.handlePlay()), this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer, this.particleOptions), this.viewport.toggle(!0);
|
|
4161
4161
|
},
|
|
@@ -4172,12 +4172,12 @@ const W2 = {
|
|
|
4172
4172
|
}
|
|
4173
4173
|
}
|
|
4174
4174
|
}, l2 = { key: 0 };
|
|
4175
|
-
function f2(
|
|
4175
|
+
function f2(z, M, b, O, p, o) {
|
|
4176
4176
|
var A;
|
|
4177
|
-
return (A =
|
|
4177
|
+
return (A = b.factor) != null && A.active ? (W(), l("div", l2, [
|
|
4178
4178
|
c("div", {
|
|
4179
4179
|
class: "legend-bars flex-center",
|
|
4180
|
-
style:
|
|
4180
|
+
style: e0([{ position: "absolute" }, { right: p.right + "px", bottom: b.bottom }])
|
|
4181
4181
|
}, M[0] || (M[0] = [
|
|
4182
4182
|
c("span", null, "kts", -1),
|
|
4183
4183
|
c("span", null, "0", -1),
|
|
@@ -4218,7 +4218,7 @@ const L2 = {
|
|
|
4218
4218
|
type: String,
|
|
4219
4219
|
default: "30px"
|
|
4220
4220
|
},
|
|
4221
|
-
|
|
4221
|
+
toggleParticeVersion: {
|
|
4222
4222
|
type: Number
|
|
4223
4223
|
},
|
|
4224
4224
|
toggleVersion: {
|
|
@@ -4240,12 +4240,12 @@ const L2 = {
|
|
|
4240
4240
|
watch: {
|
|
4241
4241
|
"current.version": {
|
|
4242
4242
|
handler() {
|
|
4243
|
-
var
|
|
4244
|
-
(
|
|
4243
|
+
var z;
|
|
4244
|
+
(z = this.current) != null && z.active ? this.handleRender() : this.handleClear(), this.$emit("handleToggleVersion");
|
|
4245
4245
|
},
|
|
4246
4246
|
deep: !0
|
|
4247
4247
|
},
|
|
4248
|
-
|
|
4248
|
+
toggleParticeVersion: {
|
|
4249
4249
|
handler() {
|
|
4250
4250
|
this.handleParticle();
|
|
4251
4251
|
}
|
|
@@ -4263,15 +4263,15 @@ const L2 = {
|
|
|
4263
4263
|
this.$emit("particle", { particle: this.showCurrentParticle, key: "current", weight: 96 });
|
|
4264
4264
|
},
|
|
4265
4265
|
handleRender() {
|
|
4266
|
-
var
|
|
4266
|
+
var z, M;
|
|
4267
4267
|
if (!this.map)
|
|
4268
4268
|
setTimeout(() => {
|
|
4269
4269
|
this.handleRender();
|
|
4270
4270
|
}, 500);
|
|
4271
4271
|
else if (this.current) {
|
|
4272
|
-
const
|
|
4272
|
+
const b = (/* @__PURE__ */ new Date()).valueOf();
|
|
4273
4273
|
let O = 0, p = 0, o = this.empty;
|
|
4274
|
-
this.current.active && (o = this.current.data), (
|
|
4274
|
+
this.current.active && (o = this.current.data), (z = this.map) != null && z.getSource(this.source) ? ((M = this.map) == null || M.getSource(this.source).setData(o), p = (/* @__PURE__ */ new Date()).valueOf() - (b + O), console.log("[current] update elapsed: ", p, ", total: ", O += p)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
4275
4275
|
{
|
|
4276
4276
|
id: this.speedLayer,
|
|
4277
4277
|
type: "fill",
|
|
@@ -4330,7 +4330,7 @@ const L2 = {
|
|
|
4330
4330
|
}
|
|
4331
4331
|
},
|
|
4332
4332
|
this.beforeLayer
|
|
4333
|
-
), p = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4333
|
+
), p = (/* @__PURE__ */ new Date()).valueOf() - (b + O), console.log("[current] add elapsed: ", p, ", total: ", O += p)), this.handleToggle();
|
|
4334
4334
|
}
|
|
4335
4335
|
},
|
|
4336
4336
|
handleToggle() {
|
|
@@ -4341,7 +4341,7 @@ const L2 = {
|
|
|
4341
4341
|
}
|
|
4342
4342
|
}
|
|
4343
4343
|
};
|
|
4344
|
-
function h2(
|
|
4344
|
+
function h2(z, M, b, O, p, o) {
|
|
4345
4345
|
return null;
|
|
4346
4346
|
}
|
|
4347
4347
|
const R2 = /* @__PURE__ */ Q(L2, [["render", h2]]);
|
|
@@ -4397,15 +4397,15 @@ const m2 = {
|
|
|
4397
4397
|
watch: {
|
|
4398
4398
|
"factor.version": {
|
|
4399
4399
|
handler() {
|
|
4400
|
-
var
|
|
4401
|
-
(
|
|
4400
|
+
var z;
|
|
4401
|
+
(z = this.factor) != null && z.active ? this.handleRender() : this.handleClear();
|
|
4402
4402
|
},
|
|
4403
4403
|
deep: !0
|
|
4404
4404
|
},
|
|
4405
4405
|
toggleVersion: {
|
|
4406
4406
|
handler() {
|
|
4407
|
-
var
|
|
4408
|
-
this.right = (((
|
|
4407
|
+
var z;
|
|
4408
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
4409
4409
|
},
|
|
4410
4410
|
immediate: !0
|
|
4411
4411
|
}
|
|
@@ -4417,19 +4417,19 @@ const m2 = {
|
|
|
4417
4417
|
this.handleRender();
|
|
4418
4418
|
}, 500);
|
|
4419
4419
|
else if (this.factor) {
|
|
4420
|
-
const
|
|
4421
|
-
let M = 0,
|
|
4422
|
-
this.handleDraw(),
|
|
4420
|
+
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
4421
|
+
let M = 0, b = 0;
|
|
4422
|
+
this.handleDraw(), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("[current-particle] add elapsed: ", b, ", total: ", M += b);
|
|
4423
4423
|
}
|
|
4424
4424
|
},
|
|
4425
4425
|
handleClear() {
|
|
4426
|
-
var
|
|
4427
|
-
(
|
|
4426
|
+
var z, M, b, O, p, o, A, a;
|
|
4427
|
+
(z = this.viewport) == null || z.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (b = this.viewport) == null ? void 0 : b.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (a = (A = this.viewport) == null ? void 0 : A.map) == null || a.off("moveend", this.handlePlay), this.handlePause();
|
|
4428
4428
|
},
|
|
4429
4429
|
handleSetup() {
|
|
4430
4430
|
if (!this.context) {
|
|
4431
4431
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4432
|
-
const
|
|
4432
|
+
const z = [
|
|
4433
4433
|
[0 / 255, "rgba(95, 143, 197,1)"],
|
|
4434
4434
|
[5 / 255, "rgba(64,127,115,1)"],
|
|
4435
4435
|
[10 / 255, "rgb(58,164,58)"],
|
|
@@ -4449,16 +4449,16 @@ const m2 = {
|
|
|
4449
4449
|
// 2.54
|
|
4450
4450
|
[1, "rgb(195,194,194)"]
|
|
4451
4451
|
];
|
|
4452
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4453
|
-
const { program: M, aPositionBuffer:
|
|
4454
|
-
this.program = M, this.aPositionBuffer =
|
|
4452
|
+
this.rampColor = this.webgl.setup(this.context, z);
|
|
4453
|
+
const { program: M, aPositionBuffer: b } = this.webgl.bind(this.context, a0.vertexSchema, a0.uvFragmentSchema);
|
|
4454
|
+
this.program = M, this.aPositionBuffer = b;
|
|
4455
4455
|
}
|
|
4456
4456
|
this.handleParticleSetup();
|
|
4457
4457
|
},
|
|
4458
4458
|
handleParticleSetup() {
|
|
4459
4459
|
if (!this.particleContext) {
|
|
4460
4460
|
this.particleContext = this.viewport.particleCanvas.getContext("webgl");
|
|
4461
|
-
const
|
|
4461
|
+
const z = [
|
|
4462
4462
|
[0, "rgb(183,224,224)"],
|
|
4463
4463
|
[1, "rgb(199,202,202)"]
|
|
4464
4464
|
];
|
|
@@ -4469,7 +4469,7 @@ const m2 = {
|
|
|
4469
4469
|
n0.quadVertSchema,
|
|
4470
4470
|
n0.screenFragmentSchema,
|
|
4471
4471
|
n0.updateFragmentSchema
|
|
4472
|
-
), this.wrapper.color = this.webgl.setup(this.particleContext,
|
|
4472
|
+
), this.wrapper.color = this.webgl.setup(this.particleContext, z, !0, 16, 16), this.wrapper = {
|
|
4473
4473
|
...this.wrapper,
|
|
4474
4474
|
...this.webgl.setupParticle(this.particleContext, 12e3),
|
|
4475
4475
|
...this.webgl.resize(this.viewport, this.particleContext)
|
|
@@ -4479,14 +4479,14 @@ const m2 = {
|
|
|
4479
4479
|
async handleDraw() {
|
|
4480
4480
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4481
4481
|
this.etime = this.factor.etime;
|
|
4482
|
-
const
|
|
4483
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4482
|
+
const z = await this.webgl.loadImg(this.factor.raw);
|
|
4483
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, z), this.particleTexture = this.webgl.createTexture(
|
|
4484
4484
|
this.particleContext,
|
|
4485
4485
|
this.particleContext.NEAREST,
|
|
4486
4486
|
this.particleContext.LINEAR,
|
|
4487
4487
|
this.particleContext.CLAMP_TO_EDGE,
|
|
4488
|
-
|
|
4489
|
-
), this.wrapper.image =
|
|
4488
|
+
z
|
|
4489
|
+
), this.wrapper.image = z;
|
|
4490
4490
|
}
|
|
4491
4491
|
this.initial && (this.initial = !1, this.handlePlay()), this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer, this.particleOptions), this.viewport.toggle(!0);
|
|
4492
4492
|
},
|
|
@@ -4503,12 +4503,12 @@ const m2 = {
|
|
|
4503
4503
|
}
|
|
4504
4504
|
}
|
|
4505
4505
|
}, B2 = { key: 0 };
|
|
4506
|
-
function g2(
|
|
4506
|
+
function g2(z, M, b, O, p, o) {
|
|
4507
4507
|
var A;
|
|
4508
|
-
return (A =
|
|
4508
|
+
return (A = b.factor) != null && A.active ? (W(), l("div", B2, [
|
|
4509
4509
|
c("div", {
|
|
4510
4510
|
class: "legend-bars flex-center",
|
|
4511
|
-
style:
|
|
4511
|
+
style: e0([{ position: "absolute" }, { right: p.right + "px", bottom: b.bottom }])
|
|
4512
4512
|
}, M[0] || (M[0] = [
|
|
4513
4513
|
c("span", null, "kts", -1),
|
|
4514
4514
|
c("span", null, "0", -1),
|
|
@@ -4547,23 +4547,23 @@ const N2 = /* @__PURE__ */ Q(m2, [["render", g2], ["__scopeId", "data-v-163d1f9a
|
|
|
4547
4547
|
watch: {
|
|
4548
4548
|
"sigWave.version": {
|
|
4549
4549
|
handler() {
|
|
4550
|
-
var
|
|
4551
|
-
(
|
|
4550
|
+
var z;
|
|
4551
|
+
(z = this.sigWave) != null && z.active ? (this.handleRender(), this.handleMove()) : this.handleClear();
|
|
4552
4552
|
},
|
|
4553
4553
|
deep: !0
|
|
4554
4554
|
}
|
|
4555
4555
|
},
|
|
4556
4556
|
methods: {
|
|
4557
4557
|
handleRender() {
|
|
4558
|
-
var
|
|
4558
|
+
var z, M;
|
|
4559
4559
|
if (!this.map)
|
|
4560
4560
|
setTimeout(() => {
|
|
4561
4561
|
this.handleRender();
|
|
4562
4562
|
}, 500);
|
|
4563
4563
|
else if (this.sigWave) {
|
|
4564
|
-
const
|
|
4564
|
+
const b = (/* @__PURE__ */ new Date()).valueOf();
|
|
4565
4565
|
let O = 0, p = 0, o = this.empty;
|
|
4566
|
-
this.sigWave.active && (o = this.sigWave.data), (
|
|
4566
|
+
this.sigWave.active && (o = this.sigWave.data), (z = this.map) != null && z.getSource(this.source) ? ((M = this.map) == null || M.getSource(this.source).setData(o), p = (/* @__PURE__ */ new Date()).valueOf() - (b + O), console.log("[sig.wave] update elapsed: ", p, ", total: ", O += p)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
4567
4567
|
{
|
|
4568
4568
|
id: this.heightLayer,
|
|
4569
4569
|
type: "fill",
|
|
@@ -4626,20 +4626,20 @@ const N2 = /* @__PURE__ */ Q(m2, [["render", g2], ["__scopeId", "data-v-163d1f9a
|
|
|
4626
4626
|
}
|
|
4627
4627
|
},
|
|
4628
4628
|
this.beforeLayer
|
|
4629
|
-
), p = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4629
|
+
), p = (/* @__PURE__ */ new Date()).valueOf() - (b + O), console.log("[sig.wave] add elapsed: ", p, ", total: ", O += p));
|
|
4630
4630
|
}
|
|
4631
4631
|
},
|
|
4632
4632
|
handleMove() {
|
|
4633
|
-
var
|
|
4634
|
-
(M = (
|
|
4633
|
+
var z, M;
|
|
4634
|
+
(M = (z = this.map) == null ? void 0 : z.getLayer("country-boundaries")) == null || M.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");
|
|
4635
4635
|
},
|
|
4636
4636
|
handleClear() {
|
|
4637
|
-
var
|
|
4638
|
-
((
|
|
4637
|
+
var z, M, b;
|
|
4638
|
+
((z = this.activeWeatherLayers) == null ? void 0 : z.length) === 0 && ((b = (M = this.map) == null ? void 0 : M.getLayer("country-boundaries")) == null || b.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);
|
|
4639
4639
|
}
|
|
4640
4640
|
}
|
|
4641
4641
|
};
|
|
4642
|
-
function X2(
|
|
4642
|
+
function X2(z, M, b, O, p, o) {
|
|
4643
4643
|
return W(), l("div");
|
|
4644
4644
|
}
|
|
4645
4645
|
const w2 = /* @__PURE__ */ Q(y2, [["render", X2]]), v2 = {
|
|
@@ -4670,8 +4670,8 @@ const w2 = /* @__PURE__ */ Q(y2, [["render", X2]]), v2 = {
|
|
|
4670
4670
|
watch: {
|
|
4671
4671
|
"swell.version": {
|
|
4672
4672
|
handler() {
|
|
4673
|
-
var
|
|
4674
|
-
(
|
|
4673
|
+
var z;
|
|
4674
|
+
(z = this.swell) != null && z.active ? (this.handleRender(), this.handleMove()) : this.handleClear();
|
|
4675
4675
|
},
|
|
4676
4676
|
deep: !0
|
|
4677
4677
|
},
|
|
@@ -4687,15 +4687,15 @@ const w2 = /* @__PURE__ */ Q(y2, [["render", X2]]), v2 = {
|
|
|
4687
4687
|
},
|
|
4688
4688
|
methods: {
|
|
4689
4689
|
handleRender() {
|
|
4690
|
-
var
|
|
4690
|
+
var z, M;
|
|
4691
4691
|
if (!this.map)
|
|
4692
4692
|
setTimeout(() => {
|
|
4693
4693
|
this.handleRender();
|
|
4694
4694
|
}, 500);
|
|
4695
4695
|
else if (this.swell) {
|
|
4696
|
-
const
|
|
4696
|
+
const b = (/* @__PURE__ */ new Date()).valueOf();
|
|
4697
4697
|
let O = 0, p = 0, o = this.empty;
|
|
4698
|
-
this.swell.active && (o = this.swell.data), (
|
|
4698
|
+
this.swell.active && (o = this.swell.data), (z = this.map) != null && z.getSource(this.source) ? ((M = this.map) == null || M.getSource(this.source).setData(o), p = (/* @__PURE__ */ new Date()).valueOf() - (b + O), console.log("[swell] update elapsed: ", p, ", total: ", O += p)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
4699
4699
|
{
|
|
4700
4700
|
id: this.heightLayer,
|
|
4701
4701
|
type: "line",
|
|
@@ -4784,20 +4784,20 @@ const w2 = /* @__PURE__ */ Q(y2, [["render", X2]]), v2 = {
|
|
|
4784
4784
|
}
|
|
4785
4785
|
},
|
|
4786
4786
|
this.beforeLayer
|
|
4787
|
-
), p = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4787
|
+
), p = (/* @__PURE__ */ new Date()).valueOf() - (b + O), console.log("[swell] add elapsed: ", p, ", total: ", O += p));
|
|
4788
4788
|
}
|
|
4789
4789
|
},
|
|
4790
4790
|
handleMove() {
|
|
4791
|
-
var
|
|
4792
|
-
(M = (
|
|
4791
|
+
var z, M;
|
|
4792
|
+
(M = (z = this.map) == null ? void 0 : z.getLayer("country-boundaries")) == null || M.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");
|
|
4793
4793
|
},
|
|
4794
4794
|
handleClear() {
|
|
4795
|
-
var
|
|
4796
|
-
this.activeWeatherLayers.length === 0 && ((M = (
|
|
4795
|
+
var z, M;
|
|
4796
|
+
this.activeWeatherLayers.length === 0 && ((M = (z = this.map) == null ? void 0 : z.getLayer("country-boundaries")) == null || M.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);
|
|
4797
4797
|
}
|
|
4798
4798
|
}
|
|
4799
4799
|
};
|
|
4800
|
-
function C2(
|
|
4800
|
+
function C2(z, M, b, O, p, o) {
|
|
4801
4801
|
return W(), l("div");
|
|
4802
4802
|
}
|
|
4803
4803
|
const T2 = /* @__PURE__ */ Q(v2, [["render", C2]]), E2 = {
|
|
@@ -4831,8 +4831,8 @@ const T2 = /* @__PURE__ */ Q(v2, [["render", C2]]), E2 = {
|
|
|
4831
4831
|
watch: {
|
|
4832
4832
|
"prmsl.version": {
|
|
4833
4833
|
handler() {
|
|
4834
|
-
var
|
|
4835
|
-
(
|
|
4834
|
+
var z;
|
|
4835
|
+
(z = this.prmsl) != null && z.active ? (this.handleRender(), this.handleMove()) : this.handleClear();
|
|
4836
4836
|
},
|
|
4837
4837
|
deep: !0
|
|
4838
4838
|
},
|
|
@@ -4848,7 +4848,7 @@ const T2 = /* @__PURE__ */ Q(v2, [["render", C2]]), E2 = {
|
|
|
4848
4848
|
},
|
|
4849
4849
|
methods: {
|
|
4850
4850
|
handleRender() {
|
|
4851
|
-
var
|
|
4851
|
+
var z, M, b;
|
|
4852
4852
|
if (!this.map)
|
|
4853
4853
|
setTimeout(() => {
|
|
4854
4854
|
this.handleRender();
|
|
@@ -4856,7 +4856,7 @@ const T2 = /* @__PURE__ */ Q(v2, [["render", C2]]), E2 = {
|
|
|
4856
4856
|
else if (this.prmsl) {
|
|
4857
4857
|
const O = (/* @__PURE__ */ new Date()).valueOf();
|
|
4858
4858
|
let p = 0, o = 0, A = this.empty;
|
|
4859
|
-
this.prmsl.active && (A = this.prmsl.data), (
|
|
4859
|
+
this.prmsl.active && (A = this.prmsl.data), (z = this.map) != null && z.getSource(this.source) ? ((M = this.map) == null || M.getSource(this.source).setData(A), o = (/* @__PURE__ */ new Date()).valueOf() - (O + p), console.log("[prmsl] update elapsed: ", o, ", total: ", p += o)) : (this.map.addSource(this.source, { type: "geojson", data: A }), this.map.addLayer(
|
|
4860
4860
|
{
|
|
4861
4861
|
id: this.layer,
|
|
4862
4862
|
type: "line",
|
|
@@ -4869,7 +4869,7 @@ const T2 = /* @__PURE__ */ Q(v2, [["render", C2]]), E2 = {
|
|
|
4869
4869
|
}
|
|
4870
4870
|
}
|
|
4871
4871
|
// this.beforeLayer,
|
|
4872
|
-
), (
|
|
4872
|
+
), (b = this.map) == null || b.addLayer(
|
|
4873
4873
|
{
|
|
4874
4874
|
id: this.labelLayer,
|
|
4875
4875
|
type: "symbol",
|
|
@@ -4927,16 +4927,16 @@ const T2 = /* @__PURE__ */ Q(v2, [["render", C2]]), E2 = {
|
|
|
4927
4927
|
}
|
|
4928
4928
|
},
|
|
4929
4929
|
handleMove() {
|
|
4930
|
-
var
|
|
4931
|
-
(M = (
|
|
4930
|
+
var z, M;
|
|
4931
|
+
(M = (z = this.map) == null ? void 0 : z.getLayer("country-boundaries")) == null || M.setLayoutProperty("visibility", "visible");
|
|
4932
4932
|
},
|
|
4933
4933
|
handleClear() {
|
|
4934
|
-
var
|
|
4935
|
-
this.activeWeatherLayers.length === 0 && ((M = (
|
|
4934
|
+
var z, M;
|
|
4935
|
+
this.activeWeatherLayers.length === 0 && ((M = (z = this.map) == null ? void 0 : z.getLayer("country-boundaries")) == null || M.setLayoutProperty("visibility", "none")), this.map.getLayer(this.pointLabelLayer) && this.map.removeLayer(this.pointLabelLayer), this.map.getLayer(this.labelLayer) && this.map.removeLayer(this.labelLayer), this.map.getLayer(this.layer) && this.map.removeLayer(this.layer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
4936
4936
|
}
|
|
4937
4937
|
}
|
|
4938
4938
|
};
|
|
4939
|
-
function x2(
|
|
4939
|
+
function x2(z, M, b, O, p, o) {
|
|
4940
4940
|
return W(), l("div");
|
|
4941
4941
|
}
|
|
4942
4942
|
const I2 = /* @__PURE__ */ Q(E2, [["render", x2]]), D2 = {
|
|
@@ -4962,23 +4962,23 @@ const I2 = /* @__PURE__ */ Q(E2, [["render", x2]]), D2 = {
|
|
|
4962
4962
|
watch: {
|
|
4963
4963
|
"iceberg.version": {
|
|
4964
4964
|
handler() {
|
|
4965
|
-
var
|
|
4966
|
-
(
|
|
4965
|
+
var z;
|
|
4966
|
+
(z = this.iceberg) != null && z.active ? this.handleRender() : this.handleClear();
|
|
4967
4967
|
},
|
|
4968
4968
|
deep: !0
|
|
4969
4969
|
}
|
|
4970
4970
|
},
|
|
4971
4971
|
methods: {
|
|
4972
4972
|
handleRender() {
|
|
4973
|
-
var
|
|
4973
|
+
var z, M;
|
|
4974
4974
|
if (!this.map)
|
|
4975
4975
|
setTimeout(() => {
|
|
4976
4976
|
this.handleRender();
|
|
4977
4977
|
}, 500);
|
|
4978
4978
|
else if (this.iceberg) {
|
|
4979
|
-
const
|
|
4979
|
+
const b = (/* @__PURE__ */ new Date()).valueOf();
|
|
4980
4980
|
let O = 0, p = 0, o = this.empty;
|
|
4981
|
-
this.iceberg.active && (o = this.iceberg.data), (
|
|
4981
|
+
this.iceberg.active && (o = this.iceberg.data), (z = this.map) != null && z.getSource(this.source) ? ((M = this.map) == null || M.getSource(this.source).setData(o), p = (/* @__PURE__ */ new Date()).valueOf() - (b + O), console.log("[iceberg] update elapsed: ", p, ", total: ", O += p)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer({
|
|
4982
4982
|
id: this.layer,
|
|
4983
4983
|
type: "line",
|
|
4984
4984
|
source: this.source,
|
|
@@ -4988,7 +4988,7 @@ const I2 = /* @__PURE__ */ Q(E2, [["render", x2]]), D2 = {
|
|
|
4988
4988
|
"line-width": 2,
|
|
4989
4989
|
"line-opacity": 1
|
|
4990
4990
|
}
|
|
4991
|
-
}), p = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4991
|
+
}), p = (/* @__PURE__ */ new Date()).valueOf() - (b + O), console.log("[iceberg] add elapsed: ", p, ", total: ", O += p));
|
|
4992
4992
|
}
|
|
4993
4993
|
},
|
|
4994
4994
|
handleClear() {
|
|
@@ -4996,7 +4996,7 @@ const I2 = /* @__PURE__ */ Q(E2, [["render", x2]]), D2 = {
|
|
|
4996
4996
|
}
|
|
4997
4997
|
}
|
|
4998
4998
|
};
|
|
4999
|
-
function P2(
|
|
4999
|
+
function P2(z, M, b, O, p, o) {
|
|
5000
5000
|
return W(), l("div");
|
|
5001
5001
|
}
|
|
5002
5002
|
const S2 = /* @__PURE__ */ Q(D2, [["render", P2]]);
|
|
@@ -5046,10 +5046,10 @@ const k2 = {
|
|
|
5046
5046
|
},
|
|
5047
5047
|
computed: {
|
|
5048
5048
|
computeTime() {
|
|
5049
|
-
return function(
|
|
5050
|
-
if (
|
|
5051
|
-
const M = Y(
|
|
5052
|
-
return `${M.format("MMM-DD,HHmm")}[ UTC ${
|
|
5049
|
+
return function(z) {
|
|
5050
|
+
if (z) {
|
|
5051
|
+
const M = Y(z).utc().utcOffset(this.timeZone), b = this.timeZone < 0 ? this.timeZone : "+" + this.timeZone;
|
|
5052
|
+
return `${M.format("MMM-DD,HHmm")}[ UTC ${b} ] ( ${M == null ? void 0 : M.fromNow()} )`;
|
|
5053
5053
|
}
|
|
5054
5054
|
return "-";
|
|
5055
5055
|
};
|
|
@@ -5085,14 +5085,14 @@ const k2 = {
|
|
|
5085
5085
|
methods: {
|
|
5086
5086
|
handleRefresh() {
|
|
5087
5087
|
var O, p;
|
|
5088
|
-
const
|
|
5089
|
-
|
|
5088
|
+
const z = ((p = (O = this.tropicals) == null ? void 0 : O.data) == null ? void 0 : p.features) || [], M = Y().utc().hour(), b = [];
|
|
5089
|
+
z.forEach((o) => {
|
|
5090
5090
|
var A, a, q;
|
|
5091
|
-
(A = o.properties) != null && A.name && !
|
|
5092
|
-
}),
|
|
5091
|
+
(A = o.properties) != null && A.name && !b.includes((a = o.properties) == null ? void 0 : a.name) && b.push((q = o.properties) == null ? void 0 : q.name);
|
|
5092
|
+
}), b.forEach((o) => {
|
|
5093
5093
|
var i;
|
|
5094
5094
|
let A = 0, a;
|
|
5095
|
-
const q =
|
|
5095
|
+
const q = z.filter((e) => {
|
|
5096
5096
|
var r, s;
|
|
5097
5097
|
return ((s = (r = e.properties) == null ? void 0 : r.category) == null ? void 0 : s.split("-")[0]) === o;
|
|
5098
5098
|
});
|
|
@@ -5114,8 +5114,8 @@ const k2 = {
|
|
|
5114
5114
|
}), this.handleInit();
|
|
5115
5115
|
},
|
|
5116
5116
|
handleInit() {
|
|
5117
|
-
var
|
|
5118
|
-
this.tropicals && this.tropicals.active ? (this.handleRender(), (
|
|
5117
|
+
var z, M;
|
|
5118
|
+
this.tropicals && this.tropicals.active ? (this.handleRender(), (z = this.map) == null || z.on(
|
|
5119
5119
|
"click",
|
|
5120
5120
|
[
|
|
5121
5121
|
this.forecastNameLayer,
|
|
@@ -5144,7 +5144,7 @@ const k2 = {
|
|
|
5144
5144
|
));
|
|
5145
5145
|
},
|
|
5146
5146
|
handleRender() {
|
|
5147
|
-
var
|
|
5147
|
+
var z, M, b, O, p, o, A, a, q, i;
|
|
5148
5148
|
if (!this.map)
|
|
5149
5149
|
setTimeout(() => {
|
|
5150
5150
|
this.handleRender();
|
|
@@ -5153,7 +5153,7 @@ const k2 = {
|
|
|
5153
5153
|
if (this.tropicals) {
|
|
5154
5154
|
const r = (/* @__PURE__ */ new Date()).valueOf();
|
|
5155
5155
|
let s = 0, n = 0;
|
|
5156
|
-
(
|
|
5156
|
+
(z = this.map) != null && z.getSource(this.source) ? ((b = this.map) == null || b.getSource(this.source).setData((M = this.tropicals) != null && M.active ? this.tropicals.data : this.empty), n = (/* @__PURE__ */ new Date()).valueOf() - (r + s), console.log("[tropicals] update elapsed: ", n, ", total: ", s += n)) : (this.map.addSource(this.source, {
|
|
5157
5157
|
type: "geojson",
|
|
5158
5158
|
data: (O = this.tropicals) != null && O.active ? (p = this.tropicals) == null ? void 0 : p.data : this.empty
|
|
5159
5159
|
}), this.map.addLayer({
|
|
@@ -5375,16 +5375,16 @@ const k2 = {
|
|
|
5375
5375
|
}
|
|
5376
5376
|
},
|
|
5377
5377
|
handleClear() {
|
|
5378
|
-
var
|
|
5379
|
-
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), (
|
|
5378
|
+
var z;
|
|
5379
|
+
this.map && (this.map.getLayer(this.historyLayer) && this.map.removeLayer(this.historyLayer), this.map.getLayer(this.forecastLayer) && this.map.removeLayer(this.forecastLayer), this.map.getLayer(this.forecastModelLayer) && this.map.removeLayer(this.forecastModelLayer), this.map.getLayer(this.forecastNameLayer) && this.map.removeLayer(this.forecastNameLayer), this.map.getLayer(this.pointCircleLayer) && this.map.removeLayer(this.pointCircleLayer), this.map.getLayer(this.pointCircleLayer + "-border") && this.map.removeLayer(this.pointCircleLayer + "-border"), this.map.getLayer(this.pointLabelLayer) && this.map.removeLayer(this.pointLabelLayer), this.map.getLayer(this.historyPointCircleLayer) && this.map.removeLayer(this.historyPointCircleLayer), this.map.getLayer(this.historyPointCircleLayer + "-border") && this.map.removeLayer(this.historyPointCircleLayer + "-border"), this.map.getLayer(this.historyPointCircleLayer + "-inner") && this.map.removeLayer(this.historyPointCircleLayer + "-inner"), this.map.getLayer(this.historyPointLabelLayer) && this.map.removeLayer(this.historyPointLabelLayer), this.map.getLayer(this.interpolateLineLayer) && this.map.removeLayer(this.interpolateLineLayer), (z = this.interpolateMarkers) == null || z.forEach((M) => M == null ? void 0 : M.remove()), this.map.getSource(this.source) && this.map.removeSource(this.source), this.map.getSource(this.clusterSource) && this.map.removeSource(this.clusterSource), this.map.getSource(this.interpolateSource) && this.map.removeSource(this.interpolateSource), this.map.getLayer(this.circleLayer) && this.map.removeLayer(this.circleLayer), this.map.getSource(this.circleSource) && this.map.removeSource(this.circleSource));
|
|
5380
5380
|
},
|
|
5381
5381
|
handleDateChange() {
|
|
5382
|
-
var
|
|
5383
|
-
if ((
|
|
5382
|
+
var z, M, b, O, p, o, A, a, q, i, e, r, s, n, m, L, d, h, R, w, x, X, _, V, $, z0, p0, q0, L0, h0, i0, l0, O0, R0, m0, f0;
|
|
5383
|
+
if ((z = this.interpolateMarkers) == null || z.forEach((r0) => r0 == null ? void 0 : r0.remove()), this.circleSourceData.features = [], (M = this.interpolateData) != null && M.length && this.tropicals.active) {
|
|
5384
5384
|
const r0 = Y(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), d0 = this.interpolateData.filter((S) => S.properties.date === r0.format() && !S.properties.disabled), B0 = this.handleComputePolygons(d0), s0 = T.featureCollection([...d0]);
|
|
5385
5385
|
B0.forEach((S) => {
|
|
5386
5386
|
s0.features.push(S);
|
|
5387
|
-
}), (
|
|
5387
|
+
}), (b = this.map) != null && b.getSource(this.interpolateSource) ? (O = this.map) == null || O.getSource(this.interpolateSource).setData(s0) : ((p = this.map) == null || p.addSource(this.interpolateSource, {
|
|
5388
5388
|
type: "geojson",
|
|
5389
5389
|
data: s0
|
|
5390
5390
|
}), (o = this.map) == null || o.addLayer({
|
|
@@ -5402,7 +5402,7 @@ const k2 = {
|
|
|
5402
5402
|
if (!S.properties.disabled) {
|
|
5403
5403
|
let b0 = "#f44336";
|
|
5404
5404
|
((a = (A = S.properties) == null ? void 0 : A.wind) == null ? void 0 : a.spd) < 17.2 || !((i = (q = S.properties) == null ? void 0 : q.wind) != null && i.spd) ? b0 = "#03f869" : ((r = (e = S.properties) == null ? void 0 : e.wind) == null ? void 0 : r.spd) >= 17.2 && ((n = (s = S.properties) == null ? void 0 : s.wind) == null ? void 0 : n.spd) < 24.5 ? b0 = "#f2f202" : ((L = (m = S.properties) == null ? void 0 : m.wind) == null ? void 0 : L.spd) >= 24.5 && ((h = (d = S.properties) == null ? void 0 : d.wind) == null ? void 0 : h.spd) < 32.7 ? b0 = "#ff9100" : ((w = (R = S.properties) == null ? void 0 : R.wind) == null ? void 0 : w.spd) >= 32.7 && ((X = (x = S.properties) == null ? void 0 : x.wind) == null ? void 0 : X.spd) < 41.5 ? b0 = "#f44336" : ((V = (_ = S.properties) == null ? void 0 : _.wind) == null ? void 0 : V.spd) >= 41.5 && ((z0 = ($ = S.properties) == null ? void 0 : $.wind) == null ? void 0 : z0.spd) < 51 ? b0 = "#f903d0" : ((q0 = (p0 = S.properties) == null ? void 0 : p0.wind) == null ? void 0 : q0.spd) >= 51 ? b0 = "#8702f9" : b0 = "#f44336";
|
|
5405
|
-
const
|
|
5405
|
+
const t0 = `<svg t="1719918955501"
|
|
5406
5406
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
5407
5407
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
5408
5408
|
<path
|
|
@@ -5417,7 +5417,7 @@ const k2 = {
|
|
|
5417
5417
|
d="M420.66666667 959.17a16.08 16.08 0 0 1-15.91-13.49A15.89 15.89 0 0 1 415.50666667 928c1.49-0.55 38.88-14.76 72.79-65.52A354.55 354.55 0 0 1 162.66666667 509.17a450.14 450.14 0 0 1 450.5-450.5 16.07 16.07 0 0 1 15.91 13.48 15.88 15.88 0 0 1-10.75 17.66c-1.58 0.58-39.13 14.9-73.07 65.95A354.22 354.22 0 0 1 871.66666667 509.17a16 16 0 0 1-0.52 4.05A450.14 450.14 0 0 1 420.66666667 959.17zM554.80666667 94.72C351.57666667 123.2 194.66666667 298.21 194.66666667 509.17c0 177.08 144.06 321.74 321.13 322.48a16 16 0 0 1 14.07 23.49c-16.11 30.42-34.27 52.37-50.85 68C682.25666667 894.63 839.16666667 719.63 839.16666667 508.67a15.94 15.94 0 0 1 0.47-3.86C837.30666667 329.33 693.82666667 187 517.80666667 186.67A16 16 0 0 1 503.66666667 163.21c16.21-30.69 34.47-52.79 51.14-68.49z"
|
|
5418
5418
|
fill="#ffffff" p-id="18386"></path>
|
|
5419
5419
|
</svg>`, I = document.createElement("div");
|
|
5420
|
-
I.className = "hurricane-hourly-marker", I.innerHTML = `<div class="${S.geometry.coordinates[1] >= 0 ? "center north" : "center south"}">${
|
|
5420
|
+
I.className = "hurricane-hourly-marker", I.innerHTML = `<div class="${S.geometry.coordinates[1] >= 0 ? "center north" : "center south"}">${t0}</div>`;
|
|
5421
5421
|
const M0 = new C0.Marker(I).setLngLat(S.geometry.coordinates).addTo(this.map);
|
|
5422
5422
|
if (this.interpolateMarkers.push(M0), (L0 = S.properties) != null && L0.showCircle) {
|
|
5423
5423
|
const W0 = { radius: 100, coordinates: S.geometry.coordinates }, N = { radius: 200, coordinates: S.geometry.coordinates }, y0 = { radius: 500, coordinates: S.geometry.coordinates };
|
|
@@ -5434,15 +5434,15 @@ const k2 = {
|
|
|
5434
5434
|
} else
|
|
5435
5435
|
(m0 = this.map) != null && m0.getSource(this.interpolateSource) && ((f0 = this.map) == null || f0.getSource(this.interpolateSource).setData(this.empty));
|
|
5436
5436
|
},
|
|
5437
|
-
handleClick(
|
|
5437
|
+
handleClick(z) {
|
|
5438
5438
|
var o, A, a, q, i, e, r, s;
|
|
5439
|
-
const M =
|
|
5439
|
+
const M = z.features[0], b = (A = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : A.features.filter(
|
|
5440
5440
|
(n) => {
|
|
5441
5441
|
var m;
|
|
5442
5442
|
return n.geometry.type === "LineString" && n.properties.type === "forecast" && n.properties.name === ((m = M == null ? void 0 : M.properties) == null ? void 0 : m.name);
|
|
5443
5443
|
}
|
|
5444
5444
|
);
|
|
5445
|
-
|
|
5445
|
+
b.sort((n, m) => {
|
|
5446
5446
|
var L, d, h, R;
|
|
5447
5447
|
return ((L = n.properties) == null ? void 0 : L.model) === "cma" ? -1 : ((d = n.properties) == null ? void 0 : d.model) === "jma" ? ((h = m.properties) == null ? void 0 : h.model) === "cma" ? 1 : -1 : n.properties.model === "ecmwf" ? ["jma", "cma"].includes((R = m.properties) == null ? void 0 : R.model) ? 1 : -1 : 0;
|
|
5448
5448
|
});
|
|
@@ -5454,35 +5454,35 @@ const k2 = {
|
|
|
5454
5454
|
);
|
|
5455
5455
|
this.activeTropicals = {
|
|
5456
5456
|
name: (i = M == null ? void 0 : M.properties) == null ? void 0 : i.name,
|
|
5457
|
-
forecasts:
|
|
5457
|
+
forecasts: b.map((n) => n.properties),
|
|
5458
5458
|
history: (e = O[0]) == null ? void 0 : e.properties,
|
|
5459
|
-
showCircle: (s = (r =
|
|
5459
|
+
showCircle: (s = (r = b[0]) == null ? void 0 : r.properties) == null ? void 0 : s.showCircle
|
|
5460
5460
|
}, this.showTropicals = !0;
|
|
5461
5461
|
const p = document.getElementById("active-tropical");
|
|
5462
|
-
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([
|
|
5462
|
+
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([z.lngLat.lng, z.lngLat.lat]) : this.activeTropicalsMarker = new C0.Marker(p).setLngLat([z.lngLat.lng, z.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
5463
5463
|
},
|
|
5464
|
-
handleForecastToggle(
|
|
5464
|
+
handleForecastToggle(z) {
|
|
5465
5465
|
var O, p, o, A, a, q;
|
|
5466
|
-
|
|
5467
|
-
const M = `${
|
|
5468
|
-
|
|
5469
|
-
i.properties.category === M && (i.properties.disabled =
|
|
5466
|
+
z.disabled = !z.disabled;
|
|
5467
|
+
const M = `${z.name}-${z.model}`, b = (p = (O = this.map) == null ? void 0 : O.getSource(this.source)._data) == null ? void 0 : p.features;
|
|
5468
|
+
b.forEach((i) => {
|
|
5469
|
+
i.properties.category === M && (i.properties.disabled = z.disabled);
|
|
5470
5470
|
}), this.interpolateData.forEach((i) => {
|
|
5471
|
-
i.properties.category === M && (i.properties.disabled =
|
|
5472
|
-
}), (A = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || A.setData(T.featureCollection(
|
|
5471
|
+
i.properties.category === M && (i.properties.disabled = z.disabled);
|
|
5472
|
+
}), (A = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || A.setData(T.featureCollection(b)), (q = (a = this.map) == null ? void 0 : a.getSource(this.clusterSource)) == null || q.setData(T.featureCollection(b)), this.handleDateChange();
|
|
5473
5473
|
},
|
|
5474
|
-
handleStrikeProbability(
|
|
5475
|
-
this.$emit("tropicalProbability",
|
|
5474
|
+
handleStrikeProbability(z) {
|
|
5475
|
+
this.$emit("tropicalProbability", z);
|
|
5476
5476
|
},
|
|
5477
|
-
handleToggleCircles(
|
|
5478
|
-
var M,
|
|
5479
|
-
|
|
5480
|
-
O.properties.name ===
|
|
5477
|
+
handleToggleCircles(z) {
|
|
5478
|
+
var M, b;
|
|
5479
|
+
z.showCircle = !z.showCircle, (b = (M = this.tropicals.data) == null ? void 0 : M.features) == null || b.forEach((O) => {
|
|
5480
|
+
O.properties.name === z.name && (O.properties.showCircle = z.showCircle);
|
|
5481
5481
|
}), this.handleRender();
|
|
5482
5482
|
},
|
|
5483
5483
|
handleDrawCircle() {
|
|
5484
|
-
var
|
|
5485
|
-
(
|
|
5484
|
+
var z, M;
|
|
5485
|
+
(z = this.map) != null && z.getSource(this.circleSource) ? (M = this.map) == null || M.getSource(this.circleSource).setData(this.circleSourceData) : (this.map.addSource(this.circleSource, {
|
|
5486
5486
|
type: "geojson",
|
|
5487
5487
|
data: this.circleSourceData
|
|
5488
5488
|
}), this.map.addLayer({
|
|
@@ -5498,27 +5498,27 @@ const k2 = {
|
|
|
5498
5498
|
}
|
|
5499
5499
|
}));
|
|
5500
5500
|
},
|
|
5501
|
-
handleComputePolygons(
|
|
5501
|
+
handleComputePolygons(z) {
|
|
5502
5502
|
const M = [];
|
|
5503
|
-
for (const
|
|
5504
|
-
const O =
|
|
5503
|
+
for (const b of z) {
|
|
5504
|
+
const O = b.properties.wind, p = {
|
|
5505
5505
|
ne: O.r7ne >= 0 ? O.r7ne : void 0,
|
|
5506
5506
|
se: O.r7se >= 0 ? O.r7se : void 0,
|
|
5507
5507
|
sw: O.r7sw >= 0 ? O.r7sw : void 0,
|
|
5508
5508
|
nw: O.r7nw >= 0 ? O.r7nw : void 0
|
|
5509
|
-
}, o = this.handleComputeArc(
|
|
5509
|
+
}, o = this.handleComputeArc(b.geometry.coordinates, p, { ...b.properties, level: 7 });
|
|
5510
5510
|
M.push(o);
|
|
5511
5511
|
const A = {
|
|
5512
5512
|
ne: O.r10ne >= 0 ? O.r10ne : void 0,
|
|
5513
5513
|
se: O.r10se >= 0 ? O.r10se : void 0,
|
|
5514
5514
|
sw: O.r10sw >= 0 ? O.r10sw : void 0,
|
|
5515
5515
|
nw: O.r10nw >= 0 ? O.r10nw : void 0
|
|
5516
|
-
}, a = this.handleComputeArc(
|
|
5516
|
+
}, a = this.handleComputeArc(b.geometry.coordinates, A, { ...b.properties, level: 10 });
|
|
5517
5517
|
M.push(a);
|
|
5518
5518
|
}
|
|
5519
5519
|
return M;
|
|
5520
5520
|
},
|
|
5521
|
-
handleComputeArc(
|
|
5521
|
+
handleComputeArc(z, M, b) {
|
|
5522
5522
|
var o;
|
|
5523
5523
|
const O = [];
|
|
5524
5524
|
for (const A in M) {
|
|
@@ -5526,22 +5526,22 @@ const k2 = {
|
|
|
5526
5526
|
let q;
|
|
5527
5527
|
switch (A) {
|
|
5528
5528
|
case "ne":
|
|
5529
|
-
q = T.lineArc(
|
|
5529
|
+
q = T.lineArc(z, a * 1.852, 0, 90, { steps: a > 0 ? 64 : 1 });
|
|
5530
5530
|
break;
|
|
5531
5531
|
case "se":
|
|
5532
|
-
q = T.lineArc(
|
|
5532
|
+
q = T.lineArc(z, a * 1.852, 90, 180, { steps: a > 0 ? 64 : 1 });
|
|
5533
5533
|
break;
|
|
5534
5534
|
case "sw":
|
|
5535
|
-
q = T.lineArc(
|
|
5535
|
+
q = T.lineArc(z, a * 1.852, 180, 270, { steps: a > 0 ? 64 : 1 });
|
|
5536
5536
|
break;
|
|
5537
5537
|
case "nw":
|
|
5538
|
-
q = T.lineArc(
|
|
5538
|
+
q = T.lineArc(z, a * 1.852, 270, 360, { steps: a > 0 ? 64 : 1 });
|
|
5539
5539
|
break;
|
|
5540
5540
|
}
|
|
5541
5541
|
O.push(...(o = q == null ? void 0 : q.geometry) == null ? void 0 : o.coordinates);
|
|
5542
5542
|
}
|
|
5543
5543
|
const p = T.lineString(O);
|
|
5544
|
-
return T.lineToPolygon(p, { properties:
|
|
5544
|
+
return T.lineToPolygon(p, { properties: b });
|
|
5545
5545
|
}
|
|
5546
5546
|
}
|
|
5547
5547
|
}, Q2 = {
|
|
@@ -5560,7 +5560,7 @@ const k2 = {
|
|
|
5560
5560
|
class: "col col-24",
|
|
5561
5561
|
style: { "justify-content": "flex-start" }
|
|
5562
5562
|
}, $2 = { class: "forecast-models" }, MM = ["onClick"], bM = { class: "more" };
|
|
5563
|
-
function zM(
|
|
5563
|
+
function zM(z, M, b, O, p, o) {
|
|
5564
5564
|
var A, a, q, i, e, r, s, n, m, L, d, h, R, w, x;
|
|
5565
5565
|
return X0((W(), l("div", Q2, [
|
|
5566
5566
|
c("div", H2, [
|
|
@@ -5619,7 +5619,7 @@ function zM(b, M, z, O, p, o) {
|
|
|
5619
5619
|
])
|
|
5620
5620
|
])
|
|
5621
5621
|
], 512)), [
|
|
5622
|
-
[w0, p.showTropicals && !
|
|
5622
|
+
[w0, p.showTropicals && !z.$attrs.hideTropicalsLegend]
|
|
5623
5623
|
]);
|
|
5624
5624
|
}
|
|
5625
5625
|
const a1 = /* @__PURE__ */ Q(k2, [["render", zM], ["__scopeId", "data-v-44a4e671"]]);
|
|
@@ -5659,15 +5659,15 @@ const pM = {
|
|
|
5659
5659
|
watch: {
|
|
5660
5660
|
"factor.version": {
|
|
5661
5661
|
handler() {
|
|
5662
|
-
var
|
|
5663
|
-
(
|
|
5662
|
+
var z;
|
|
5663
|
+
(z = this.factor) != null && z.active ? this.handleRender() : this.handleClear();
|
|
5664
5664
|
},
|
|
5665
5665
|
deep: !0
|
|
5666
5666
|
},
|
|
5667
5667
|
toggleVersion: {
|
|
5668
5668
|
handler() {
|
|
5669
|
-
var
|
|
5670
|
-
this.right = (((
|
|
5669
|
+
var z;
|
|
5670
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
5671
5671
|
},
|
|
5672
5672
|
immediate: !0
|
|
5673
5673
|
}
|
|
@@ -5679,9 +5679,9 @@ const pM = {
|
|
|
5679
5679
|
this.handleRender();
|
|
5680
5680
|
}, 500);
|
|
5681
5681
|
else if (this.factor) {
|
|
5682
|
-
const
|
|
5683
|
-
let M = 0,
|
|
5684
|
-
this.handleDraw(),
|
|
5682
|
+
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
5683
|
+
let M = 0, b = 0;
|
|
5684
|
+
this.handleDraw(), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("[precip3h] add elapsed: ", b, ", total: ", M += b);
|
|
5685
5685
|
}
|
|
5686
5686
|
},
|
|
5687
5687
|
handleClear() {
|
|
@@ -5690,7 +5690,7 @@ const pM = {
|
|
|
5690
5690
|
handleSetup() {
|
|
5691
5691
|
if (!this.context) {
|
|
5692
5692
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
5693
|
-
const
|
|
5693
|
+
const z = [
|
|
5694
5694
|
[0, "rgba(59, 126, 162, 0)"],
|
|
5695
5695
|
[14 / 255, "rgba(84,170,230, 0)"],
|
|
5696
5696
|
//1.4mm
|
|
@@ -5710,27 +5710,27 @@ const pM = {
|
|
|
5710
5710
|
//30mm
|
|
5711
5711
|
[1, "rgba(197,5,58,0.8)"]
|
|
5712
5712
|
];
|
|
5713
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
5714
|
-
const { program: M, aPositionBuffer:
|
|
5715
|
-
this.program = M, this.aPositionBuffer =
|
|
5713
|
+
this.rampColor = this.webgl.setup(this.context, z);
|
|
5714
|
+
const { program: M, aPositionBuffer: b } = this.webgl.bind(this.context, a0.vertexSchema, a0.fragmentSchema);
|
|
5715
|
+
this.program = M, this.aPositionBuffer = b;
|
|
5716
5716
|
}
|
|
5717
5717
|
},
|
|
5718
5718
|
async handleDraw() {
|
|
5719
5719
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
5720
5720
|
this.etime = this.factor.etime;
|
|
5721
|
-
const
|
|
5722
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
5721
|
+
const z = await this.webgl.loadImg(this.factor.raw);
|
|
5722
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, z);
|
|
5723
5723
|
}
|
|
5724
5724
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
5725
5725
|
}
|
|
5726
5726
|
}
|
|
5727
5727
|
}, OM = { key: 0 };
|
|
5728
|
-
function oM(
|
|
5728
|
+
function oM(z, M, b, O, p, o) {
|
|
5729
5729
|
var A;
|
|
5730
|
-
return (A =
|
|
5730
|
+
return (A = b.factor) != null && A.active ? (W(), l("div", OM, [
|
|
5731
5731
|
c("div", {
|
|
5732
5732
|
class: "legend-bars flex-center",
|
|
5733
|
-
style:
|
|
5733
|
+
style: e0([{ position: "absolute" }, { right: p.right + "px", bottom: b.bottom }])
|
|
5734
5734
|
}, M[0] || (M[0] = [
|
|
5735
5735
|
c("span", null, "mm", -1),
|
|
5736
5736
|
c("span", null, "1.5", -1),
|
|
@@ -5779,15 +5779,15 @@ const AM = {
|
|
|
5779
5779
|
watch: {
|
|
5780
5780
|
"factor.version": {
|
|
5781
5781
|
handler() {
|
|
5782
|
-
var
|
|
5783
|
-
(
|
|
5782
|
+
var z;
|
|
5783
|
+
(z = this.factor) != null && z.active ? this.handleRender() : this.handleClear();
|
|
5784
5784
|
},
|
|
5785
5785
|
deep: !0
|
|
5786
5786
|
},
|
|
5787
5787
|
toggleVersion: {
|
|
5788
5788
|
handler() {
|
|
5789
|
-
var
|
|
5790
|
-
this.right = (((
|
|
5789
|
+
var z;
|
|
5790
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
5791
5791
|
},
|
|
5792
5792
|
immediate: !0
|
|
5793
5793
|
}
|
|
@@ -5799,9 +5799,9 @@ const AM = {
|
|
|
5799
5799
|
this.handleRender();
|
|
5800
5800
|
}, 500);
|
|
5801
5801
|
else if (this.factor) {
|
|
5802
|
-
const
|
|
5803
|
-
let M = 0,
|
|
5804
|
-
this.handleDraw(),
|
|
5802
|
+
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
5803
|
+
let M = 0, b = 0;
|
|
5804
|
+
this.handleDraw(), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("[visibility] add elapsed: ", b, ", total: ", M += b);
|
|
5805
5805
|
}
|
|
5806
5806
|
},
|
|
5807
5807
|
handleClear() {
|
|
@@ -5810,7 +5810,7 @@ const AM = {
|
|
|
5810
5810
|
handleSetup() {
|
|
5811
5811
|
if (!this.context) {
|
|
5812
5812
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
5813
|
-
const
|
|
5813
|
+
const z = [
|
|
5814
5814
|
[0, "rgba(189,50,160,0.8)"],
|
|
5815
5815
|
[8 / 255, "rgba(208,56,56,0.8)"],
|
|
5816
5816
|
//0.8km
|
|
@@ -5824,27 +5824,27 @@ const AM = {
|
|
|
5824
5824
|
//16km
|
|
5825
5825
|
[1, "rgba(144,144,144,0)"]
|
|
5826
5826
|
];
|
|
5827
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
5828
|
-
const { program: M, aPositionBuffer:
|
|
5829
|
-
this.program = M, this.aPositionBuffer =
|
|
5827
|
+
this.rampColor = this.webgl.setup(this.context, z);
|
|
5828
|
+
const { program: M, aPositionBuffer: b } = this.webgl.bind(this.context, a0.vertexSchema, a0.fragmentSchema);
|
|
5829
|
+
this.program = M, this.aPositionBuffer = b;
|
|
5830
5830
|
}
|
|
5831
5831
|
},
|
|
5832
5832
|
async handleDraw() {
|
|
5833
5833
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
5834
5834
|
this.etime = this.factor.etime;
|
|
5835
|
-
const
|
|
5836
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
5835
|
+
const z = await this.webgl.loadImg(this.factor.raw);
|
|
5836
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, z);
|
|
5837
5837
|
}
|
|
5838
5838
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
5839
5839
|
}
|
|
5840
5840
|
}
|
|
5841
5841
|
}, eM = { key: 0 };
|
|
5842
|
-
function tM(
|
|
5842
|
+
function tM(z, M, b, O, p, o) {
|
|
5843
5843
|
var A;
|
|
5844
|
-
return (A =
|
|
5844
|
+
return (A = b.factor) != null && A.active ? (W(), l("div", eM, [
|
|
5845
5845
|
c("div", {
|
|
5846
5846
|
class: "legend-bars flex-center",
|
|
5847
|
-
style:
|
|
5847
|
+
style: e0([{ position: "absolute" }, { right: z.right + "px", bottom: b.bottom }])
|
|
5848
5848
|
}, M[0] || (M[0] = [
|
|
5849
5849
|
c("span", null, "nm", -1),
|
|
5850
5850
|
c("span", null, "0", -1),
|
|
@@ -5892,15 +5892,15 @@ const qM = {
|
|
|
5892
5892
|
watch: {
|
|
5893
5893
|
"factor.version": {
|
|
5894
5894
|
handler() {
|
|
5895
|
-
var
|
|
5896
|
-
(
|
|
5895
|
+
var z;
|
|
5896
|
+
(z = this.factor) != null && z.active ? this.handleRender() : this.handleClear();
|
|
5897
5897
|
},
|
|
5898
5898
|
deep: !0
|
|
5899
5899
|
},
|
|
5900
5900
|
toggleVersion: {
|
|
5901
5901
|
handler() {
|
|
5902
|
-
var
|
|
5903
|
-
this.right = (((
|
|
5902
|
+
var z;
|
|
5903
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
5904
5904
|
},
|
|
5905
5905
|
immediate: !0
|
|
5906
5906
|
}
|
|
@@ -5912,9 +5912,9 @@ const qM = {
|
|
|
5912
5912
|
this.handleRender();
|
|
5913
5913
|
}, 500);
|
|
5914
5914
|
else if (this.factor) {
|
|
5915
|
-
const
|
|
5916
|
-
let M = 0,
|
|
5917
|
-
this.handleDraw(),
|
|
5915
|
+
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
5916
|
+
let M = 0, b = 0;
|
|
5917
|
+
this.handleDraw(), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("[water-temp] add elapsed: ", b, ", total: ", M += b);
|
|
5918
5918
|
}
|
|
5919
5919
|
},
|
|
5920
5920
|
handleClear() {
|
|
@@ -5923,7 +5923,7 @@ const qM = {
|
|
|
5923
5923
|
handleSetup() {
|
|
5924
5924
|
if (!this.context) {
|
|
5925
5925
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
5926
|
-
const
|
|
5926
|
+
const z = [
|
|
5927
5927
|
[0, "rgba(95, 143, 197)"],
|
|
5928
5928
|
// -10°C
|
|
5929
5929
|
[46 / 255, "rgba(95, 143, 197)"],
|
|
@@ -5944,27 +5944,27 @@ const qM = {
|
|
|
5944
5944
|
[1, "rgb(138, 43, 10)"]
|
|
5945
5945
|
//
|
|
5946
5946
|
];
|
|
5947
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
5948
|
-
const { program: M, aPositionBuffer:
|
|
5949
|
-
this.program = M, this.aPositionBuffer =
|
|
5947
|
+
this.rampColor = this.webgl.setup(this.context, z);
|
|
5948
|
+
const { program: M, aPositionBuffer: b } = this.webgl.bind(this.context, a0.vertexSchema, a0.fragmentSchema);
|
|
5949
|
+
this.program = M, this.aPositionBuffer = b;
|
|
5950
5950
|
}
|
|
5951
5951
|
},
|
|
5952
5952
|
async handleDraw() {
|
|
5953
5953
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
5954
5954
|
this.etime = this.factor.etime;
|
|
5955
|
-
const
|
|
5956
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
5955
|
+
const z = await this.webgl.loadImg(this.factor.raw);
|
|
5956
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, z);
|
|
5957
5957
|
}
|
|
5958
5958
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
5959
5959
|
}
|
|
5960
5960
|
}
|
|
5961
5961
|
}, iM = { key: 0 };
|
|
5962
|
-
function rM(
|
|
5962
|
+
function rM(z, M, b, O, p, o) {
|
|
5963
5963
|
var A;
|
|
5964
|
-
return (A =
|
|
5964
|
+
return (A = b.factor) != null && A.active ? (W(), l("div", iM, [
|
|
5965
5965
|
c("div", {
|
|
5966
5966
|
class: "legend-bars flex-center",
|
|
5967
|
-
style:
|
|
5967
|
+
style: e0([{ position: "absolute" }, { right: p.right + "px", bottom: b.bottom }])
|
|
5968
5968
|
}, M[0] || (M[0] = [
|
|
5969
5969
|
c("span", null, "°C", -1),
|
|
5970
5970
|
c("span", null, "0", -1),
|
|
@@ -6012,15 +6012,15 @@ const dM = {
|
|
|
6012
6012
|
watch: {
|
|
6013
6013
|
"factor.version": {
|
|
6014
6014
|
handler() {
|
|
6015
|
-
var
|
|
6016
|
-
(
|
|
6015
|
+
var z;
|
|
6016
|
+
(z = this.factor) != null && z.active ? this.handleRender() : this.handleClear();
|
|
6017
6017
|
},
|
|
6018
6018
|
deep: !0
|
|
6019
6019
|
},
|
|
6020
6020
|
toggleVersion: {
|
|
6021
6021
|
handler() {
|
|
6022
|
-
var
|
|
6023
|
-
this.right = (((
|
|
6022
|
+
var z;
|
|
6023
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
6024
6024
|
},
|
|
6025
6025
|
immediate: !0
|
|
6026
6026
|
}
|
|
@@ -6032,9 +6032,9 @@ const dM = {
|
|
|
6032
6032
|
this.handleRender();
|
|
6033
6033
|
}, 500);
|
|
6034
6034
|
else if (this.factor) {
|
|
6035
|
-
const
|
|
6036
|
-
let M = 0,
|
|
6037
|
-
this.handleDraw(),
|
|
6035
|
+
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
6036
|
+
let M = 0, b = 0;
|
|
6037
|
+
this.handleDraw(), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("[water-temp] add elapsed: ", b, ", total: ", M += b);
|
|
6038
6038
|
}
|
|
6039
6039
|
},
|
|
6040
6040
|
handleClear() {
|
|
@@ -6043,7 +6043,7 @@ const dM = {
|
|
|
6043
6043
|
handleSetup() {
|
|
6044
6044
|
if (!this.context) {
|
|
6045
6045
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
6046
|
-
const
|
|
6046
|
+
const z = [
|
|
6047
6047
|
[0, "rgb(149, 137, 211)"],
|
|
6048
6048
|
[100 / 255, "rgb(149, 137, 211)"],
|
|
6049
6049
|
// -20°C
|
|
@@ -6067,27 +6067,27 @@ const dM = {
|
|
|
6067
6067
|
// 40
|
|
6068
6068
|
[1, "rgb(138, 43, 10)"]
|
|
6069
6069
|
];
|
|
6070
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
6071
|
-
const { program: M, aPositionBuffer:
|
|
6072
|
-
this.program = M, this.aPositionBuffer =
|
|
6070
|
+
this.rampColor = this.webgl.setup(this.context, z);
|
|
6071
|
+
const { program: M, aPositionBuffer: b } = this.webgl.bind(this.context, a0.vertexSchema, a0.fragmentSchema);
|
|
6072
|
+
this.program = M, this.aPositionBuffer = b;
|
|
6073
6073
|
}
|
|
6074
6074
|
},
|
|
6075
6075
|
async handleDraw() {
|
|
6076
6076
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
6077
6077
|
this.etime = this.factor.etime;
|
|
6078
|
-
const
|
|
6079
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
6078
|
+
const z = await this.webgl.loadImg(this.factor.raw);
|
|
6079
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, z);
|
|
6080
6080
|
}
|
|
6081
6081
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
6082
6082
|
}
|
|
6083
6083
|
}
|
|
6084
6084
|
}, sM = { key: 0 };
|
|
6085
|
-
function WM(
|
|
6085
|
+
function WM(z, M, b, O, p, o) {
|
|
6086
6086
|
var A;
|
|
6087
|
-
return (A =
|
|
6087
|
+
return (A = b.factor) != null && A.active ? (W(), l("div", sM, [
|
|
6088
6088
|
c("div", {
|
|
6089
6089
|
class: "legend-bars flex-center",
|
|
6090
|
-
style:
|
|
6090
|
+
style: e0([{ position: "absolute" }, { right: p.right + "px", bottom: b.bottom }])
|
|
6091
6091
|
}, M[0] || (M[0] = [
|
|
6092
6092
|
c("span", null, "°C", -1),
|
|
6093
6093
|
c("span", null, "-20", -1),
|
|
@@ -6137,15 +6137,15 @@ const fM = {
|
|
|
6137
6137
|
watch: {
|
|
6138
6138
|
"factor.version": {
|
|
6139
6139
|
handler() {
|
|
6140
|
-
var
|
|
6141
|
-
(
|
|
6140
|
+
var z;
|
|
6141
|
+
(z = this.factor) != null && z.active ? this.handleRender() : this.handleClear();
|
|
6142
6142
|
},
|
|
6143
6143
|
deep: !0
|
|
6144
6144
|
},
|
|
6145
6145
|
toggleVersion: {
|
|
6146
6146
|
handler() {
|
|
6147
|
-
var
|
|
6148
|
-
this.right = (((
|
|
6147
|
+
var z;
|
|
6148
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
6149
6149
|
},
|
|
6150
6150
|
immediate: !0
|
|
6151
6151
|
}
|
|
@@ -6157,9 +6157,9 @@ const fM = {
|
|
|
6157
6157
|
this.handleRender();
|
|
6158
6158
|
}, 500);
|
|
6159
6159
|
else if (this.factor) {
|
|
6160
|
-
const
|
|
6161
|
-
let M = 0,
|
|
6162
|
-
this.handleDraw(),
|
|
6160
|
+
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
6161
|
+
let M = 0, b = 0;
|
|
6162
|
+
this.handleDraw(), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("[water-temp] add elapsed: ", b, ", total: ", M += b);
|
|
6163
6163
|
}
|
|
6164
6164
|
},
|
|
6165
6165
|
handleClear() {
|
|
@@ -6168,7 +6168,7 @@ const fM = {
|
|
|
6168
6168
|
handleSetup() {
|
|
6169
6169
|
if (!this.context) {
|
|
6170
6170
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
6171
|
-
const
|
|
6171
|
+
const z = [
|
|
6172
6172
|
[0, "rgba(76, 165, 228, 0)"],
|
|
6173
6173
|
[50 / 255, "rgba(76, 165, 228, 0)"],
|
|
6174
6174
|
// 0m
|
|
@@ -6183,27 +6183,27 @@ const fM = {
|
|
|
6183
6183
|
[1, "rgb(180, 209, 216)"]
|
|
6184
6184
|
// 2m
|
|
6185
6185
|
];
|
|
6186
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
6187
|
-
const { program: M, aPositionBuffer:
|
|
6188
|
-
this.program = M, this.aPositionBuffer =
|
|
6186
|
+
this.rampColor = this.webgl.setup(this.context, z);
|
|
6187
|
+
const { program: M, aPositionBuffer: b } = this.webgl.bind(this.context, a0.vertexSchema, a0.fragmentSchema);
|
|
6188
|
+
this.program = M, this.aPositionBuffer = b;
|
|
6189
6189
|
}
|
|
6190
6190
|
},
|
|
6191
6191
|
async handleDraw() {
|
|
6192
6192
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
6193
6193
|
this.etime = this.factor.etime;
|
|
6194
|
-
const
|
|
6195
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
6194
|
+
const z = await this.webgl.loadImg(this.factor.raw);
|
|
6195
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, z);
|
|
6196
6196
|
}
|
|
6197
6197
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
6198
6198
|
}
|
|
6199
6199
|
}
|
|
6200
6200
|
}, uM = { key: 0 };
|
|
6201
|
-
function LM(
|
|
6201
|
+
function LM(z, M, b, O, p, o) {
|
|
6202
6202
|
var A;
|
|
6203
|
-
return (A =
|
|
6203
|
+
return (A = b.factor) != null && A.active ? (W(), l("div", uM, [
|
|
6204
6204
|
c("div", {
|
|
6205
6205
|
class: "legend-bars flex-center",
|
|
6206
|
-
style:
|
|
6206
|
+
style: e0([{ position: "absolute" }, { right: p.right + "px", bottom: b.bottom }])
|
|
6207
6207
|
}, M[0] || (M[0] = [
|
|
6208
6208
|
c("span", null, "m", -1),
|
|
6209
6209
|
c("span", null, "0", -1),
|
|
@@ -6219,8 +6219,8 @@ const hM = /* @__PURE__ */ Q(fM, [["render", LM], ["__scopeId", "data-v-5bb73794
|
|
|
6219
6219
|
var RM = /* @__PURE__ */ s1({
|
|
6220
6220
|
name: "LocationFilled",
|
|
6221
6221
|
__name: "location-filled",
|
|
6222
|
-
setup(
|
|
6223
|
-
return (M,
|
|
6222
|
+
setup(z) {
|
|
6223
|
+
return (M, b) => (W(), l("svg", {
|
|
6224
6224
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6225
6225
|
viewBox: "0 0 1024 1024"
|
|
6226
6226
|
}, [
|
|
@@ -6317,21 +6317,21 @@ const gM = {
|
|
|
6317
6317
|
},
|
|
6318
6318
|
forecastModel: {
|
|
6319
6319
|
async handler() {
|
|
6320
|
-
var
|
|
6320
|
+
var z;
|
|
6321
6321
|
if (this.showMeteo && this.ts) {
|
|
6322
6322
|
this.handleRender();
|
|
6323
6323
|
const M = Y();
|
|
6324
|
-
((
|
|
6324
|
+
((z = Y(this.ts)) == null ? void 0 : z.diff(M, "d", !0)) >= 0 ? await this.fetchMeteoData(this.point, this.ts, 7) : await this.fetchHistoryData(this.point, this.ts), this.initTableData(this.meteoData);
|
|
6325
6325
|
}
|
|
6326
6326
|
}
|
|
6327
6327
|
},
|
|
6328
6328
|
point: {
|
|
6329
6329
|
async handler() {
|
|
6330
|
-
var
|
|
6330
|
+
var z;
|
|
6331
6331
|
if (this.showMeteo = !0, this.tideData = {}, this.meteoData = {}, this.showMeteo && this.ts) {
|
|
6332
6332
|
this.handleRender();
|
|
6333
6333
|
const M = Y();
|
|
6334
|
-
if (((
|
|
6334
|
+
if (((z = Y(this.ts)) == null ? void 0 : z.diff(M, "d", !0)) >= 0 ? await this.fetchMeteoData(this.point, this.ts, 7) : await this.fetchHistoryData(this.point, this.ts), this.initTableData(this.meteoData), this.activeIndex === 4) {
|
|
6335
6335
|
const O = H0.pickDailyExtremes(this.tideData, this.ts);
|
|
6336
6336
|
(O == null ? void 0 : O.length) > 0 ? this.tideTableData = O : await this.fetchTidesData(this.point, this.ts, 7);
|
|
6337
6337
|
}
|
|
@@ -6340,14 +6340,14 @@ const gM = {
|
|
|
6340
6340
|
},
|
|
6341
6341
|
ts: {
|
|
6342
6342
|
async handler() {
|
|
6343
|
-
var
|
|
6343
|
+
var z;
|
|
6344
6344
|
if (this.showMeteo && this.ts) {
|
|
6345
|
-
const M = Y(),
|
|
6345
|
+
const M = Y(), b = (z = Y(this.ts)) == null ? void 0 : z.diff(M, "d", !0), p = [0, 1, 2, 3, 4, 5, 6, 7].every((o) => {
|
|
6346
6346
|
var a;
|
|
6347
6347
|
const A = k0(this.ts).tz(this.positionGmt).add(3 * o, "h").format();
|
|
6348
6348
|
return (a = S0.pickHourly(this.meteoData, A)) == null ? void 0 : a[0];
|
|
6349
6349
|
});
|
|
6350
|
-
if (this.meteoData && p ? this.initTableData(this.meteoData) : (this.loading || (
|
|
6350
|
+
if (this.meteoData && p ? this.initTableData(this.meteoData) : (this.loading || (b >= 0 ? await this.fetchMeteoData(this.point, this.ts, 7) : await this.fetchHistoryData(this.point, this.ts)), this.initTableData(this.meteoData)), this.activeIndex === 4) {
|
|
6351
6351
|
const o = H0.pickDailyExtremes(this.tideData, this.ts);
|
|
6352
6352
|
(o == null ? void 0 : o.length) > 0 ? this.tideTableData = o : await this.fetchTidesData(this.point, this.ts, 7);
|
|
6353
6353
|
}
|
|
@@ -6357,46 +6357,46 @@ const gM = {
|
|
|
6357
6357
|
},
|
|
6358
6358
|
computed: {
|
|
6359
6359
|
computeHourL() {
|
|
6360
|
-
return function(
|
|
6361
|
-
return
|
|
6360
|
+
return function(z) {
|
|
6361
|
+
return z ? `${k0(z).tz(this.positionGmt).format("HH")}` : "-";
|
|
6362
6362
|
};
|
|
6363
6363
|
},
|
|
6364
6364
|
computeHourZ() {
|
|
6365
|
-
return function(
|
|
6366
|
-
return
|
|
6365
|
+
return function(z) {
|
|
6366
|
+
return z ? `${Y(z).utc().format("HH")}Z` : "-";
|
|
6367
6367
|
};
|
|
6368
6368
|
},
|
|
6369
6369
|
computeHourHmmLT() {
|
|
6370
|
-
return function(
|
|
6371
|
-
return
|
|
6370
|
+
return function(z) {
|
|
6371
|
+
return z ? `${k0(z).tz(this.positionGmt).format("H:mm")}` : "-";
|
|
6372
6372
|
};
|
|
6373
6373
|
},
|
|
6374
6374
|
computeLat() {
|
|
6375
|
-
return function(
|
|
6376
|
-
return o0.lat2pretty(
|
|
6375
|
+
return function(z, M = 4) {
|
|
6376
|
+
return o0.lat2pretty(z, M).pretty;
|
|
6377
6377
|
};
|
|
6378
6378
|
},
|
|
6379
6379
|
computeLng() {
|
|
6380
|
-
return function(
|
|
6381
|
-
return o0.lng2pretty(
|
|
6380
|
+
return function(z, M = 4) {
|
|
6381
|
+
return o0.lng2pretty(z, M).pretty;
|
|
6382
6382
|
};
|
|
6383
6383
|
},
|
|
6384
6384
|
roundPrecision() {
|
|
6385
|
-
return function(
|
|
6386
|
-
return isNaN(
|
|
6385
|
+
return function(z, M = 4) {
|
|
6386
|
+
return isNaN(z) ? "-" : o0.roundPrecision(z, M);
|
|
6387
6387
|
};
|
|
6388
6388
|
}
|
|
6389
6389
|
},
|
|
6390
6390
|
methods: {
|
|
6391
|
-
async fetchMeteoData(
|
|
6391
|
+
async fetchMeteoData(z, M, b) {
|
|
6392
6392
|
this.loading = !0, this.meteoData = [];
|
|
6393
6393
|
let O = M ? Y(M).utc().format() : Y().utc().format();
|
|
6394
6394
|
const { weatherModels: p, marineModels: o } = S0.autoPickMeteoModel(this.forecastModel);
|
|
6395
6395
|
let A = {
|
|
6396
|
-
lat:
|
|
6397
|
-
lng:
|
|
6396
|
+
lat: z.lat,
|
|
6397
|
+
lng: z.lng,
|
|
6398
6398
|
datetime: O,
|
|
6399
|
-
forecastDays:
|
|
6399
|
+
forecastDays: b ?? 7,
|
|
6400
6400
|
weatherModels: p,
|
|
6401
6401
|
marineModels: o
|
|
6402
6402
|
}, a = await N0.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, A, {
|
|
@@ -6406,12 +6406,12 @@ const gM = {
|
|
|
6406
6406
|
});
|
|
6407
6407
|
(a == null ? void 0 : a.data.code) === 0 && (this.meteoData = a == null ? void 0 : a.data.data, this.loading = !1);
|
|
6408
6408
|
},
|
|
6409
|
-
async fetchHistoryData(
|
|
6409
|
+
async fetchHistoryData(z, M) {
|
|
6410
6410
|
this.loading = !0, this.meteoData = [];
|
|
6411
|
-
const
|
|
6412
|
-
lat:
|
|
6413
|
-
lng:
|
|
6414
|
-
datetime:
|
|
6411
|
+
const b = M ? Y(M).utc().format() : Y().utc().format(), { weatherModels: O, marineModels: p } = S0.autoPickMeteoModel(this.forecastModel), o = {
|
|
6412
|
+
lat: z.lat,
|
|
6413
|
+
lng: z.lng,
|
|
6414
|
+
datetime: b,
|
|
6415
6415
|
forecastDays: 3,
|
|
6416
6416
|
pastDays: 1,
|
|
6417
6417
|
weatherModels: O,
|
|
@@ -6423,10 +6423,10 @@ const gM = {
|
|
|
6423
6423
|
});
|
|
6424
6424
|
(A == null ? void 0 : A.data.code) === 0 && (this.meteoData = A == null ? void 0 : A.data.data, this.loading = !1);
|
|
6425
6425
|
},
|
|
6426
|
-
initTableData(
|
|
6427
|
-
var M,
|
|
6428
|
-
this.clearTable(), this.positionGmt = (
|
|
6429
|
-
var r, s, n, m, L, d, h, R, w, x, X, _, V, $, z0, p0, q0, L0, h0, i0, l0, O0, R0, m0, f0, r0, d0, B0, s0, S, b0,
|
|
6426
|
+
initTableData(z) {
|
|
6427
|
+
var M, b, O, p, o, A, a, q, i;
|
|
6428
|
+
this.clearTable(), this.positionGmt = (b = (M = z == null ? void 0 : z.weather) == null ? void 0 : M[0]) == null ? void 0 : b.timezone, this.positionOffset = (p = (O = z == null ? void 0 : z.weather) == null ? void 0 : O[0]) == null ? void 0 : p.offset, this.localDate = (A = (o = k0(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : A.format("MMM-DD/HHmm[LT]"), this.currentHourData = (a = S0.pickHourly(z, Y(this.ts))) == null ? void 0 : a[0], ((i = (q = this.currentHourData) == null ? void 0 : q.weather) == null ? void 0 : i.isDay) === 0 ? this.isDay = !1 : this.isDay = !0, this.$nextTick(() => {
|
|
6429
|
+
var r, s, n, m, L, d, h, R, w, x, X, _, V, $, z0, p0, q0, L0, h0, i0, l0, O0, R0, m0, f0, r0, d0, B0, s0, S, b0, t0, I;
|
|
6430
6430
|
if (!document.getElementById("meteoMainBox"))
|
|
6431
6431
|
return !1;
|
|
6432
6432
|
if (!this.currentHourData)
|
|
@@ -6434,8 +6434,8 @@ const gM = {
|
|
|
6434
6434
|
for (let M0 = 0; M0 < 8; M0++) {
|
|
6435
6435
|
const W0 = k0(this.ts).tz(this.positionGmt).add(3 * M0, "h").format();
|
|
6436
6436
|
this.tableData.hours.push(W0);
|
|
6437
|
-
const N = ((r = S0.pickHourly(
|
|
6438
|
-
this.tableData.temp.push(this.roundPrecision((s = N == null ? void 0 : N.weather) == null ? void 0 : s.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((m = (n = N == null ? void 0 : N.weather) == null ? void 0 : n.precip) == null ? void 0 : m.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((d = (L = N == null ? void 0 : N.weather) == null ? void 0 : L.precip) == null ? void 0 : d.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((h = N == null ? void 0 : N.weather) == null ? void 0 : h.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((w = (R = N == null ? void 0 : N.weather) == null ? void 0 : R.wind) == null ? void 0 : w.kts, 1) ?? "-"), this.tableData.windDir.push((X = (x = N == null ? void 0 : N.weather) == null ? void 0 : x.wind) == null ? void 0 : X.bearing), this.tableData.windGust.push(this.roundPrecision((V = (_ = N == null ? void 0 : N.weather) == null ? void 0 : _.wind) == null ? void 0 : V.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((z0 = ($ = N == null ? void 0 : N.wave) == null ? void 0 : $.sig) == null ? void 0 : z0.height, 1) ?? "-"), this.tableData.sigwaveDir.push((q0 = (p0 = N == null ? void 0 : N.wave) == null ? void 0 : p0.sig) == null ? void 0 : q0.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((h0 = (L0 = N == null ? void 0 : N.wave) == null ? void 0 : L0.wd) == null ? void 0 : h0.height, 1) ?? "-"), this.tableData.windwaveDir.push((l0 = (i0 = N == null ? void 0 : N.wave) == null ? void 0 : i0.wd) == null ? void 0 : l0.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((R0 = (O0 = N == null ? void 0 : N.wave) == null ? void 0 : O0.wd) == null ? void 0 : R0.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((f0 = (m0 = N == null ? void 0 : N.wave) == null ? void 0 : m0.swell) == null ? void 0 : f0.height, 1) ?? "-"), this.tableData.swellDir.push((d0 = (r0 = N == null ? void 0 : N.wave) == null ? void 0 : r0.swell) == null ? void 0 : d0.bearing), this.tableData.swellPeriod.push(this.roundPrecision((s0 = (B0 = N == null ? void 0 : N.wave) == null ? void 0 : B0.swell) == null ? void 0 : s0.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((S = N == null ? void 0 : N.current) == null ? void 0 : S.speed, 1) ?? "-"), this.tableData.currentDir.push((b0 = N == null ? void 0 : N.current) == null ? void 0 : b0.bearing), this.tableData.seaLevel.push(this.roundPrecision(N == null ? void 0 : N.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(N == null ? void 0 : N.sst, 0) ?? "-"), this.tableData.weatherUrls.push((
|
|
6437
|
+
const N = ((r = S0.pickHourly(z, W0)) == null ? void 0 : r[0]) || {};
|
|
6438
|
+
this.tableData.temp.push(this.roundPrecision((s = N == null ? void 0 : N.weather) == null ? void 0 : s.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((m = (n = N == null ? void 0 : N.weather) == null ? void 0 : n.precip) == null ? void 0 : m.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((d = (L = N == null ? void 0 : N.weather) == null ? void 0 : L.precip) == null ? void 0 : d.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((h = N == null ? void 0 : N.weather) == null ? void 0 : h.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((w = (R = N == null ? void 0 : N.weather) == null ? void 0 : R.wind) == null ? void 0 : w.kts, 1) ?? "-"), this.tableData.windDir.push((X = (x = N == null ? void 0 : N.weather) == null ? void 0 : x.wind) == null ? void 0 : X.bearing), this.tableData.windGust.push(this.roundPrecision((V = (_ = N == null ? void 0 : N.weather) == null ? void 0 : _.wind) == null ? void 0 : V.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((z0 = ($ = N == null ? void 0 : N.wave) == null ? void 0 : $.sig) == null ? void 0 : z0.height, 1) ?? "-"), this.tableData.sigwaveDir.push((q0 = (p0 = N == null ? void 0 : N.wave) == null ? void 0 : p0.sig) == null ? void 0 : q0.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((h0 = (L0 = N == null ? void 0 : N.wave) == null ? void 0 : L0.wd) == null ? void 0 : h0.height, 1) ?? "-"), this.tableData.windwaveDir.push((l0 = (i0 = N == null ? void 0 : N.wave) == null ? void 0 : i0.wd) == null ? void 0 : l0.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((R0 = (O0 = N == null ? void 0 : N.wave) == null ? void 0 : O0.wd) == null ? void 0 : R0.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((f0 = (m0 = N == null ? void 0 : N.wave) == null ? void 0 : m0.swell) == null ? void 0 : f0.height, 1) ?? "-"), this.tableData.swellDir.push((d0 = (r0 = N == null ? void 0 : N.wave) == null ? void 0 : r0.swell) == null ? void 0 : d0.bearing), this.tableData.swellPeriod.push(this.roundPrecision((s0 = (B0 = N == null ? void 0 : N.wave) == null ? void 0 : B0.swell) == null ? void 0 : s0.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((S = N == null ? void 0 : N.current) == null ? void 0 : S.speed, 1) ?? "-"), this.tableData.currentDir.push((b0 = N == null ? void 0 : N.current) == null ? void 0 : b0.bearing), this.tableData.seaLevel.push(this.roundPrecision(N == null ? void 0 : N.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(N == null ? void 0 : N.sst, 0) ?? "-"), this.tableData.weatherUrls.push((t0 = N == null ? void 0 : N.weather) == null ? void 0 : t0.url), this.tableData.weatherNames.push(((I = N == null ? void 0 : N.weather) == null ? void 0 : I.name) ?? "-");
|
|
6439
6439
|
}
|
|
6440
6440
|
});
|
|
6441
6441
|
},
|
|
@@ -6466,16 +6466,16 @@ const gM = {
|
|
|
6466
6466
|
seaTemp: []
|
|
6467
6467
|
};
|
|
6468
6468
|
},
|
|
6469
|
-
async handleSelectTab(
|
|
6470
|
-
this.activeIndex =
|
|
6469
|
+
async handleSelectTab(z) {
|
|
6470
|
+
this.activeIndex = z, this.activeIndex === 4 && await this.fetchTidesData(this.point, this.ts, 7);
|
|
6471
6471
|
},
|
|
6472
|
-
async fetchTidesData(
|
|
6472
|
+
async fetchTidesData(z, M, b) {
|
|
6473
6473
|
this.tideLoading = !0, this.tideData = {};
|
|
6474
6474
|
let O = M ? Y(M).utc().format() : Y().utc().format(), p = {
|
|
6475
|
-
lat:
|
|
6476
|
-
lng:
|
|
6475
|
+
lat: z.lat,
|
|
6476
|
+
lng: z.lng,
|
|
6477
6477
|
date: O,
|
|
6478
|
-
forecastDays:
|
|
6478
|
+
forecastDays: b ?? 7,
|
|
6479
6479
|
extremes: !0,
|
|
6480
6480
|
heights: !1
|
|
6481
6481
|
}, o = await N0.post(`${this.gateway}/api/arc/meteo2/spot/tides/forecast`, p, {
|
|
@@ -6490,12 +6490,12 @@ const gM = {
|
|
|
6490
6490
|
}
|
|
6491
6491
|
},
|
|
6492
6492
|
handleBind() {
|
|
6493
|
-
var
|
|
6494
|
-
this.show ? ((
|
|
6493
|
+
var z, M;
|
|
6494
|
+
this.show ? ((z = this.map) == null || z.on("click", this.handleClick), this.map.getCanvas().style.cursor = "pointer") : ((M = this.map) == null || M.off("click", this.handleClick), this.showMeteo = !1);
|
|
6495
6495
|
},
|
|
6496
|
-
handleClick(
|
|
6497
|
-
if (
|
|
6498
|
-
this.point =
|
|
6496
|
+
handleClick(z) {
|
|
6497
|
+
if (z.originalEvent.stopPropagation(), z.originalEvent.target.className === "mapboxgl-canvas")
|
|
6498
|
+
this.point = z.lngLat;
|
|
6499
6499
|
else
|
|
6500
6500
|
return !1;
|
|
6501
6501
|
},
|
|
@@ -6508,8 +6508,8 @@ const gM = {
|
|
|
6508
6508
|
handleRender() {
|
|
6509
6509
|
this.$nextTick(() => {
|
|
6510
6510
|
var M;
|
|
6511
|
-
const
|
|
6512
|
-
this.point && (this.meteoMarker ? (M = this.meteoMarker) == null || M.setLngLat([this.point.lng, this.point.lat]) : this.meteoMarker = new C0.Marker(
|
|
6511
|
+
const z = document.getElementById("point-meteo");
|
|
6512
|
+
this.point && (this.meteoMarker ? (M = this.meteoMarker) == null || M.setLngLat([this.point.lng, this.point.lat]) : this.meteoMarker = new C0.Marker(z).setLngLat([this.point.lng, this.point.lat]).addTo(this.map));
|
|
6513
6513
|
});
|
|
6514
6514
|
}
|
|
6515
6515
|
}
|
|
@@ -6557,8 +6557,8 @@ const gM = {
|
|
|
6557
6557
|
key: 1,
|
|
6558
6558
|
class: "main-box flex-center"
|
|
6559
6559
|
};
|
|
6560
|
-
function Db(
|
|
6561
|
-
var i, e, r, s, n, m, L, d, h, R, w, x, X, _, V, $, z0, p0, q0, L0, h0, i0, l0, O0, R0, m0, f0, r0, d0, B0, s0, S, b0,
|
|
6560
|
+
function Db(z, M, b, O, p, o) {
|
|
6561
|
+
var i, e, r, s, n, m, L, d, h, R, w, x, X, _, V, $, z0, p0, q0, L0, h0, i0, l0, O0, R0, m0, f0, r0, d0, B0, s0, S, b0, t0, I, M0, W0, N, y0, g0, t, f, u, B, C, D, K, k, j, E0, x0, I0, D0, P0, A0, G0, U0, K0, J0, Y0, V0, Z0, $0, M1, b1, z1, p1, O1;
|
|
6562
6562
|
const A = P("LocationFilled"), a = P("ElIcon"), q = P("ElTooltip");
|
|
6563
6563
|
return X0((W(), l("div", NM, [
|
|
6564
6564
|
c("div", yM, [
|
|
@@ -6782,7 +6782,7 @@ function Db(b, M, z, O, p, o) {
|
|
|
6782
6782
|
isNaN(p.tableData.windDir[v]) ? U("", !0) : (W(), l("span", {
|
|
6783
6783
|
key: 0,
|
|
6784
6784
|
class: "iconfont icon blue",
|
|
6785
|
-
style:
|
|
6785
|
+
style: e0({ display: "inline-block", transform: `rotate(${p.tableData.windDir[v]}deg)` })
|
|
6786
6786
|
}, "", 4)),
|
|
6787
6787
|
c("span", null, y(g), 1)
|
|
6788
6788
|
]))), 128))
|
|
@@ -6838,7 +6838,7 @@ function Db(b, M, z, O, p, o) {
|
|
|
6838
6838
|
isNaN(p.tableData.windDir[v]) ? U("", !0) : (W(), l("span", {
|
|
6839
6839
|
key: 0,
|
|
6840
6840
|
class: "iconfont icon wind",
|
|
6841
|
-
style:
|
|
6841
|
+
style: e0({ display: "inline-block", transform: `rotate(${p.tableData.windDir[v]}deg)` })
|
|
6842
6842
|
}, "", 4)),
|
|
6843
6843
|
c("span", null, y(g), 1)
|
|
6844
6844
|
]))), 128))
|
|
@@ -6860,7 +6860,7 @@ function Db(b, M, z, O, p, o) {
|
|
|
6860
6860
|
isNaN(p.tableData.sigwaveDir[v]) ? U("", !0) : (W(), l("span", {
|
|
6861
6861
|
key: 0,
|
|
6862
6862
|
class: "iconfont icon sigwave",
|
|
6863
|
-
style:
|
|
6863
|
+
style: e0({ display: "inline-block", transform: `rotate(${p.tableData.sigwaveDir[v]}deg)` })
|
|
6864
6864
|
}, "", 4)),
|
|
6865
6865
|
c("span", null, y(g), 1)
|
|
6866
6866
|
]))), 128))
|
|
@@ -6882,7 +6882,7 @@ function Db(b, M, z, O, p, o) {
|
|
|
6882
6882
|
isNaN(p.tableData.sigwaveDir[v]) ? U("", !0) : (W(), l("span", {
|
|
6883
6883
|
key: 0,
|
|
6884
6884
|
class: "iconfont icon windwave",
|
|
6885
|
-
style:
|
|
6885
|
+
style: e0({ display: "inline-block", transform: `rotate(${p.tableData.windwaveDir[v]}deg)` })
|
|
6886
6886
|
}, "", 4)),
|
|
6887
6887
|
c("span", null, y(g), 1)
|
|
6888
6888
|
]))), 128))
|
|
@@ -6904,7 +6904,7 @@ function Db(b, M, z, O, p, o) {
|
|
|
6904
6904
|
isNaN(p.tableData.swellDir[v]) ? U("", !0) : (W(), l("span", {
|
|
6905
6905
|
key: 0,
|
|
6906
6906
|
class: "iconfont icon swell",
|
|
6907
|
-
style:
|
|
6907
|
+
style: e0({ display: "inline-block", transform: `rotate(${p.tableData.swellDir[v]}deg)` })
|
|
6908
6908
|
}, "", 4)),
|
|
6909
6909
|
c("span", null, y(g), 1)
|
|
6910
6910
|
]))), 128))
|
|
@@ -6927,7 +6927,7 @@ function Db(b, M, z, O, p, o) {
|
|
|
6927
6927
|
key: 0,
|
|
6928
6928
|
class: "iconfont icon current",
|
|
6929
6929
|
id: "meteoGrayIcon",
|
|
6930
|
-
style:
|
|
6930
|
+
style: e0({ display: "inline-block", transform: `rotate(${p.tableData.currentDir[v]}deg)` })
|
|
6931
6931
|
}, "", 4)),
|
|
6932
6932
|
c("span", null, y(g), 1)
|
|
6933
6933
|
]))), 128))
|
|
@@ -7041,7 +7041,7 @@ function Db(b, M, z, O, p, o) {
|
|
|
7041
7041
|
]),
|
|
7042
7042
|
c("div", Rb, [
|
|
7043
7043
|
M[33] || (M[33] = c("div", null, "Sig wave", -1)),
|
|
7044
|
-
c("div", null, y((s0 = (B0 = (d0 = p.currentHourData) == null ? void 0 : d0.wave) == null ? void 0 : B0.sig) == null ? void 0 : s0.direction) + "/" + y(o.roundPrecision((
|
|
7044
|
+
c("div", null, y((s0 = (B0 = (d0 = p.currentHourData) == null ? void 0 : d0.wave) == null ? void 0 : B0.sig) == null ? void 0 : s0.direction) + "/" + y(o.roundPrecision((t0 = (b0 = (S = p.currentHourData) == null ? void 0 : S.wave) == null ? void 0 : b0.sig) == null ? void 0 : t0.height, 1)) + "m/" + y(o.roundPrecision((W0 = (M0 = (I = p.currentHourData) == null ? void 0 : I.wave) == null ? void 0 : M0.sig) == null ? void 0 : W0.period, 1)) + "s", 1)
|
|
7045
7045
|
])
|
|
7046
7046
|
]),
|
|
7047
7047
|
c("div", mb, [
|
|
@@ -7051,7 +7051,7 @@ function Db(b, M, z, O, p, o) {
|
|
|
7051
7051
|
]),
|
|
7052
7052
|
c("div", gb, [
|
|
7053
7053
|
M[35] || (M[35] = c("div", null, "Swell", -1)),
|
|
7054
|
-
c("div", null, y((j = (k = (K = p.currentHourData) == null ? void 0 : K.wave) == null ? void 0 : k.swell) == null ? void 0 : j.direction) + "/" + y(o.roundPrecision((I0 = (x0 = (E0 = p.currentHourData) == null ? void 0 : E0.wave) == null ? void 0 : x0.swell) == null ? void 0 : I0.height, 1)) + "m/" + y(o.roundPrecision((
|
|
7054
|
+
c("div", null, y((j = (k = (K = p.currentHourData) == null ? void 0 : K.wave) == null ? void 0 : k.swell) == null ? void 0 : j.direction) + "/" + y(o.roundPrecision((I0 = (x0 = (E0 = p.currentHourData) == null ? void 0 : E0.wave) == null ? void 0 : x0.swell) == null ? void 0 : I0.height, 1)) + "m/" + y(o.roundPrecision((A0 = (P0 = (D0 = p.currentHourData) == null ? void 0 : D0.wave) == null ? void 0 : P0.swell) == null ? void 0 : A0.period, 1)) + "s", 1)
|
|
7055
7055
|
])
|
|
7056
7056
|
]),
|
|
7057
7057
|
c("div", Nb, [
|
|
@@ -7187,7 +7187,7 @@ const Pb = /* @__PURE__ */ Q(gM, [["render", Db], ["__scopeId", "data-v-f05f6db2
|
|
|
7187
7187
|
}
|
|
7188
7188
|
}
|
|
7189
7189
|
};
|
|
7190
|
-
function kb(
|
|
7190
|
+
function kb(z, M, b, O, p, o) {
|
|
7191
7191
|
return W(), l("div");
|
|
7192
7192
|
}
|
|
7193
7193
|
const Qb = /* @__PURE__ */ Q(Sb, [["render", kb]]), Hb = {
|
|
@@ -7310,7 +7310,7 @@ const Qb = /* @__PURE__ */ Q(Sb, [["render", kb]]), Hb = {
|
|
|
7310
7310
|
}
|
|
7311
7311
|
}
|
|
7312
7312
|
};
|
|
7313
|
-
function _b(
|
|
7313
|
+
function _b(z, M, b, O, p, o) {
|
|
7314
7314
|
return W(), l("div");
|
|
7315
7315
|
}
|
|
7316
7316
|
const jb = /* @__PURE__ */ Q(Hb, [["render", _b]]), Fb = {
|
|
@@ -7342,8 +7342,8 @@ const jb = /* @__PURE__ */ Q(Hb, [["render", _b]]), Fb = {
|
|
|
7342
7342
|
},
|
|
7343
7343
|
methods: {
|
|
7344
7344
|
handleRender() {
|
|
7345
|
-
var
|
|
7346
|
-
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (
|
|
7345
|
+
var z;
|
|
7346
|
+
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (z = this.map) == null || z.getSource(this.source).setData(this.zone) : (this.map.addSource(this.source, {
|
|
7347
7347
|
type: "geojson",
|
|
7348
7348
|
data: this.zone
|
|
7349
7349
|
}), this.map.addLayer({
|
|
@@ -7401,7 +7401,7 @@ const jb = /* @__PURE__ */ Q(Hb, [["render", _b]]), Fb = {
|
|
|
7401
7401
|
}
|
|
7402
7402
|
}
|
|
7403
7403
|
};
|
|
7404
|
-
function Gb(
|
|
7404
|
+
function Gb(z, M, b, O, p, o) {
|
|
7405
7405
|
return W(), l("div");
|
|
7406
7406
|
}
|
|
7407
7407
|
const Ub = /* @__PURE__ */ Q(Fb, [["render", Gb]]);
|
|
@@ -7433,27 +7433,27 @@ const Kb = {
|
|
|
7433
7433
|
watch: {
|
|
7434
7434
|
zone: {
|
|
7435
7435
|
handler() {
|
|
7436
|
-
var
|
|
7437
|
-
this.zone ? (this.handleRender(), (
|
|
7436
|
+
var z, M;
|
|
7437
|
+
this.zone ? (this.handleRender(), (z = this.map) == null || z.on("click", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleClick)) : (this.handleClear(), (M = this.map) == null || M.off("click", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleClick));
|
|
7438
7438
|
}
|
|
7439
7439
|
}
|
|
7440
7440
|
},
|
|
7441
7441
|
methods: {
|
|
7442
|
-
handleClick(
|
|
7442
|
+
handleClick(z) {
|
|
7443
7443
|
var O;
|
|
7444
|
-
const M =
|
|
7444
|
+
const M = z.features[0], b = (O = this.zone) == null ? void 0 : O.features.filter((p) => {
|
|
7445
7445
|
var o;
|
|
7446
7446
|
return p.properties.id === ((o = M == null ? void 0 : M.properties) == null ? void 0 : o.id);
|
|
7447
7447
|
})[0];
|
|
7448
|
-
if (
|
|
7449
|
-
this.showZone = !0, this.form = { ...
|
|
7448
|
+
if (b) {
|
|
7449
|
+
this.showZone = !0, this.form = { ...b.properties };
|
|
7450
7450
|
const p = document.getElementById("idm-gl3-zone-info");
|
|
7451
|
-
this.marker ? this.marker.setLngLat([
|
|
7451
|
+
this.marker ? this.marker.setLngLat([z.lngLat.lng, z.lngLat.lat]) : this.marker = new C0.Marker(p).setLngLat([z.lngLat.lng, z.lngLat.lat]).setOffset([0, 0]).addTo(this.map);
|
|
7452
7452
|
}
|
|
7453
7453
|
},
|
|
7454
7454
|
handleRender() {
|
|
7455
|
-
var
|
|
7456
|
-
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (
|
|
7455
|
+
var z;
|
|
7456
|
+
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (z = this.map) == null || z.getSource(this.source).setData(this.zone) : (this.map.addSource(this.source, {
|
|
7457
7457
|
type: "geojson",
|
|
7458
7458
|
data: this.zone
|
|
7459
7459
|
}), this.map.addLayer({
|
|
@@ -7536,7 +7536,7 @@ const Kb = {
|
|
|
7536
7536
|
}
|
|
7537
7537
|
}
|
|
7538
7538
|
}, Jb = { id: "idm-gl3-zone-info" }, Yb = ["innerHTML"];
|
|
7539
|
-
function Vb(
|
|
7539
|
+
function Vb(z, M, b, O, p, o) {
|
|
7540
7540
|
var A;
|
|
7541
7541
|
return X0((W(), l("div", Jb, [
|
|
7542
7542
|
c("div", {
|
|
@@ -7580,40 +7580,40 @@ const $b = {
|
|
|
7580
7580
|
},
|
|
7581
7581
|
computed: {
|
|
7582
7582
|
computeLat() {
|
|
7583
|
-
return function(
|
|
7584
|
-
return o0.lat2pretty(
|
|
7583
|
+
return function(z) {
|
|
7584
|
+
return o0.lat2pretty(z, 4).pretty;
|
|
7585
7585
|
};
|
|
7586
7586
|
},
|
|
7587
7587
|
computeLng() {
|
|
7588
|
-
return function(
|
|
7589
|
-
return o0.lng2pretty(
|
|
7588
|
+
return function(z) {
|
|
7589
|
+
return o0.lng2pretty(z, 4).pretty;
|
|
7590
7590
|
};
|
|
7591
7591
|
}
|
|
7592
7592
|
},
|
|
7593
7593
|
watch: {
|
|
7594
7594
|
port: {
|
|
7595
7595
|
handler() {
|
|
7596
|
-
var
|
|
7597
|
-
this.port ? (this.handleRender(), (
|
|
7596
|
+
var z, M;
|
|
7597
|
+
this.port ? (this.handleRender(), (z = this.map) == null || z.on("click", [this.layer], this.handleClick)) : (this.handleClear(), (M = this.map) == null || M.off("click", [this.layer], this.handleClick));
|
|
7598
7598
|
}
|
|
7599
7599
|
}
|
|
7600
7600
|
},
|
|
7601
7601
|
methods: {
|
|
7602
|
-
handleClick(
|
|
7602
|
+
handleClick(z) {
|
|
7603
7603
|
var O;
|
|
7604
|
-
const M =
|
|
7604
|
+
const M = z.features[0], b = (O = this.port) == null ? void 0 : O.features.filter((p) => {
|
|
7605
7605
|
var o;
|
|
7606
7606
|
return p.properties.id === ((o = M == null ? void 0 : M.properties) == null ? void 0 : o.id);
|
|
7607
7607
|
})[0];
|
|
7608
|
-
if (
|
|
7609
|
-
this.showPort = !0, this.form = { ...
|
|
7608
|
+
if (b) {
|
|
7609
|
+
this.showPort = !0, this.form = { ...b.properties }, this.form.lng = b.geometry.coordinates[0], this.form.lat = b.geometry.coordinates[1];
|
|
7610
7610
|
const p = document.getElementById("port-info");
|
|
7611
|
-
this.marker ? this.marker.setLngLat([
|
|
7611
|
+
this.marker ? this.marker.setLngLat([z.lngLat.lng, z.lngLat.lat]) : this.marker = new C0.Marker(p).setLngLat([z.lngLat.lng, z.lngLat.lat]).setOffset([0, -85]).addTo(this.map);
|
|
7612
7612
|
}
|
|
7613
7613
|
},
|
|
7614
7614
|
handleRender() {
|
|
7615
|
-
var
|
|
7616
|
-
this.map ? this.port && (this.map.getSource(this.source) ? (
|
|
7615
|
+
var z;
|
|
7616
|
+
this.map ? this.port && (this.map.getSource(this.source) ? (z = this.map) == null || z.getSource(this.source).setData(this.port) : (this.map.addSource(this.source, {
|
|
7617
7617
|
type: "geojson",
|
|
7618
7618
|
data: this.port
|
|
7619
7619
|
}), this.map.addLayer({
|
|
@@ -7643,8 +7643,8 @@ const $b = {
|
|
|
7643
7643
|
handleClear() {
|
|
7644
7644
|
this.showPort = !1, this.map.getLayer(this.layer) && this.map.removeLayer(this.layer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
7645
7645
|
},
|
|
7646
|
-
handleClickMeteo(
|
|
7647
|
-
|
|
7646
|
+
handleClickMeteo(z) {
|
|
7647
|
+
z.forecastModel = this.forecastModel, this.$emit("meteoMore", z);
|
|
7648
7648
|
}
|
|
7649
7649
|
}
|
|
7650
7650
|
}, Mz = {
|
|
@@ -7654,7 +7654,7 @@ const $b = {
|
|
|
7654
7654
|
class: "flex-start",
|
|
7655
7655
|
style: { "align-items": "flex-start" }
|
|
7656
7656
|
}, cz = { class: "meteo-forecast flex-end" };
|
|
7657
|
-
function Az(
|
|
7657
|
+
function Az(z, M, b, O, p, o) {
|
|
7658
7658
|
return X0((W(), l("div", Mz, [
|
|
7659
7659
|
c("div", {
|
|
7660
7660
|
class: "close iconfont",
|
|
@@ -7757,7 +7757,7 @@ const ez = /* @__PURE__ */ Q($b, [["render", Az], ["__scopeId", "data-v-2fc5fc5e
|
|
|
7757
7757
|
}
|
|
7758
7758
|
}
|
|
7759
7759
|
};
|
|
7760
|
-
function az(
|
|
7760
|
+
function az(z, M, b, O, p, o) {
|
|
7761
7761
|
return W(), l("div");
|
|
7762
7762
|
}
|
|
7763
7763
|
const qz = /* @__PURE__ */ Q(tz, [["render", az]]), iz = {
|
|
@@ -7925,7 +7925,7 @@ const qz = /* @__PURE__ */ Q(tz, [["render", az]]), iz = {
|
|
|
7925
7925
|
}
|
|
7926
7926
|
}
|
|
7927
7927
|
};
|
|
7928
|
-
function rz(
|
|
7928
|
+
function rz(z, M, b, O, p, o) {
|
|
7929
7929
|
return W(), l("div");
|
|
7930
7930
|
}
|
|
7931
7931
|
const nz = /* @__PURE__ */ Q(iz, [["render", rz]]), dz = {
|
|
@@ -8016,7 +8016,7 @@ const nz = /* @__PURE__ */ Q(iz, [["render", rz]]), dz = {
|
|
|
8016
8016
|
}
|
|
8017
8017
|
}
|
|
8018
8018
|
};
|
|
8019
|
-
function sz(
|
|
8019
|
+
function sz(z, M, b, O, p, o) {
|
|
8020
8020
|
return W(), l("div");
|
|
8021
8021
|
}
|
|
8022
8022
|
const Wz = /* @__PURE__ */ Q(dz, [["render", sz]]), lz = {
|
|
@@ -8048,8 +8048,8 @@ const Wz = /* @__PURE__ */ Q(dz, [["render", sz]]), lz = {
|
|
|
8048
8048
|
},
|
|
8049
8049
|
methods: {
|
|
8050
8050
|
handleRender() {
|
|
8051
|
-
this.map ? (this.handleClear(), this.area && (this.area.features.forEach((
|
|
8052
|
-
|
|
8051
|
+
this.map ? (this.handleClear(), this.area && (this.area.features.forEach((z) => {
|
|
8052
|
+
z.geometry.type === "Polygon" && z.geometry.coordinates.forEach((M) => o0.convertToMonotonicLng2(M));
|
|
8053
8053
|
}), this.map.addSource(this.source, {
|
|
8054
8054
|
type: "geojson",
|
|
8055
8055
|
data: this.area
|
|
@@ -8109,7 +8109,7 @@ const Wz = /* @__PURE__ */ Q(dz, [["render", sz]]), lz = {
|
|
|
8109
8109
|
}
|
|
8110
8110
|
}
|
|
8111
8111
|
};
|
|
8112
|
-
function fz(
|
|
8112
|
+
function fz(z, M, b, O, p, o) {
|
|
8113
8113
|
return W(), l("div");
|
|
8114
8114
|
}
|
|
8115
8115
|
const uz = /* @__PURE__ */ Q(lz, [["render", fz]]), Lz = {
|
|
@@ -8161,7 +8161,7 @@ const uz = /* @__PURE__ */ Q(lz, [["render", fz]]), Lz = {
|
|
|
8161
8161
|
}
|
|
8162
8162
|
}
|
|
8163
8163
|
};
|
|
8164
|
-
function hz(
|
|
8164
|
+
function hz(z, M, b, O, p, o) {
|
|
8165
8165
|
return W(), l("div");
|
|
8166
8166
|
}
|
|
8167
8167
|
const Rz = /* @__PURE__ */ Q(Lz, [["render", hz]]);
|
|
@@ -8204,37 +8204,37 @@ const mz = {
|
|
|
8204
8204
|
},
|
|
8205
8205
|
map: {
|
|
8206
8206
|
handler() {
|
|
8207
|
-
var
|
|
8208
|
-
this.map && ((
|
|
8207
|
+
var z;
|
|
8208
|
+
this.map && ((z = this.map) == null || z.on("mousemove", this.handleMouseMove));
|
|
8209
8209
|
},
|
|
8210
8210
|
immediate: !0
|
|
8211
8211
|
},
|
|
8212
8212
|
toggleVersion: {
|
|
8213
8213
|
handler() {
|
|
8214
|
-
var
|
|
8215
|
-
this.right = (((
|
|
8214
|
+
var z, M;
|
|
8215
|
+
this.right = (((z = document.getElementsByClassName("legend-bars")[0]) == null ? void 0 : z.clientWidth) || -10) + (((M = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : M.clientWidth) || 0) + 20;
|
|
8216
8216
|
},
|
|
8217
8217
|
immediate: !0
|
|
8218
8218
|
}
|
|
8219
8219
|
},
|
|
8220
8220
|
methods: {
|
|
8221
8221
|
handleBind() {
|
|
8222
|
-
var
|
|
8223
|
-
this.show ? ((
|
|
8222
|
+
var z, M;
|
|
8223
|
+
this.show ? ((z = this.map) == null || z.on("zoomend", this.handleZoomEnd), this.handleRender()) : (this.handleClear(), (M = this.map) == null || M.off("zoomend", this.handleZoomEnd));
|
|
8224
8224
|
},
|
|
8225
|
-
handleMouseMove(
|
|
8226
|
-
const M =
|
|
8227
|
-
this.lngLat = { lng:
|
|
8225
|
+
handleMouseMove(z) {
|
|
8226
|
+
const M = z.lngLat, b = o0.lng2pretty(M.lng, 2), O = o0.lat2pretty(M.lat, 2);
|
|
8227
|
+
this.lngLat = { lng: b, lat: O };
|
|
8228
8228
|
},
|
|
8229
8229
|
handleComputeLatLngs() {
|
|
8230
8230
|
var O;
|
|
8231
|
-
const
|
|
8232
|
-
console.log(
|
|
8231
|
+
const z = (O = this.map) == null ? void 0 : O.getZoom();
|
|
8232
|
+
console.log(z);
|
|
8233
8233
|
let M = 30;
|
|
8234
|
-
|
|
8235
|
-
const
|
|
8234
|
+
z > 4 ? M = 10 : z > 3 && (M = 15);
|
|
8235
|
+
const b = [];
|
|
8236
8236
|
for (let p = -60; p < 90; p += M)
|
|
8237
|
-
|
|
8237
|
+
b.push({
|
|
8238
8238
|
type: "Feature",
|
|
8239
8239
|
geometry: {
|
|
8240
8240
|
type: "LineString",
|
|
@@ -8245,7 +8245,7 @@ const mz = {
|
|
|
8245
8245
|
}
|
|
8246
8246
|
});
|
|
8247
8247
|
for (let p = -180; p < 180; p += M)
|
|
8248
|
-
|
|
8248
|
+
b.push({
|
|
8249
8249
|
type: "Feature",
|
|
8250
8250
|
geometry: {
|
|
8251
8251
|
type: "LineString",
|
|
@@ -8257,7 +8257,7 @@ const mz = {
|
|
|
8257
8257
|
});
|
|
8258
8258
|
for (let p = 180; p > -180; p -= M)
|
|
8259
8259
|
for (let o = -60; o < 90; o += M)
|
|
8260
|
-
|
|
8260
|
+
b.push({
|
|
8261
8261
|
type: "Feature",
|
|
8262
8262
|
geometry: {
|
|
8263
8263
|
type: "Point",
|
|
@@ -8267,21 +8267,21 @@ const mz = {
|
|
|
8267
8267
|
val: `${o > 0 ? o + " N" : o === 0 ? o : o * -1 + " S"}, ${p > 0 ? p + " E" : p * -1 + " W"}`
|
|
8268
8268
|
}
|
|
8269
8269
|
});
|
|
8270
|
-
return
|
|
8270
|
+
return b;
|
|
8271
8271
|
},
|
|
8272
8272
|
handleZoomEnd() {
|
|
8273
8273
|
var M;
|
|
8274
|
-
const
|
|
8275
|
-
(M = this.map) == null || M.getSource(this.source).setData(T.featureCollection(
|
|
8274
|
+
const z = this.handleComputeLatLngs();
|
|
8275
|
+
(M = this.map) == null || M.getSource(this.source).setData(T.featureCollection(z));
|
|
8276
8276
|
},
|
|
8277
8277
|
handleRender() {
|
|
8278
8278
|
if (this.map) {
|
|
8279
|
-
const
|
|
8279
|
+
const z = this.handleComputeLatLngs();
|
|
8280
8280
|
this.map.addSource(this.source, {
|
|
8281
8281
|
type: "geojson",
|
|
8282
8282
|
data: {
|
|
8283
8283
|
type: "FeatureCollection",
|
|
8284
|
-
features:
|
|
8284
|
+
features: z
|
|
8285
8285
|
}
|
|
8286
8286
|
}), this.map.addLayer({
|
|
8287
8287
|
id: this.layer,
|
|
@@ -8316,16 +8316,16 @@ const mz = {
|
|
|
8316
8316
|
}
|
|
8317
8317
|
},
|
|
8318
8318
|
handleClear() {
|
|
8319
|
-
var
|
|
8320
|
-
(
|
|
8319
|
+
var z, M, b, O, p, o;
|
|
8320
|
+
(z = this.map) != null && z.getLayer(this.layer) && ((M = this.map) == null || M.removeLayer(this.layer)), (b = this.map) != null && b.getLayer(this.labelLayer) && ((O = this.map) == null || O.removeLayer(this.labelLayer)), (p = this.map) != null && p.getSource(this.source) && ((o = this.map) == null || o.removeSource(this.source));
|
|
8321
8321
|
}
|
|
8322
8322
|
}
|
|
8323
8323
|
};
|
|
8324
|
-
function Bz(
|
|
8324
|
+
function Bz(z, M, b, O, p, o) {
|
|
8325
8325
|
return p.lngLat ? (W(), l("div", {
|
|
8326
8326
|
key: 0,
|
|
8327
8327
|
class: "lat-lng-tip",
|
|
8328
|
-
style:
|
|
8328
|
+
style: e0({ right: p.right + "px", bottom: b.bottom })
|
|
8329
8329
|
}, [
|
|
8330
8330
|
c("span", null, y(p.lngLat.lat.pretty), 1),
|
|
8331
8331
|
M[0] || (M[0] = c("span", null, ", ", -1)),
|
|
@@ -8361,11 +8361,11 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8361
8361
|
watch: {
|
|
8362
8362
|
show: {
|
|
8363
8363
|
handler() {
|
|
8364
|
-
var
|
|
8364
|
+
var z, M, b;
|
|
8365
8365
|
if (this.show)
|
|
8366
8366
|
this.handleBind();
|
|
8367
8367
|
else {
|
|
8368
|
-
(
|
|
8368
|
+
(z = this.map) == null || z.getCanvas().removeEventListener("keydown", this.handleKeydown), (M = this.map) == null || M.off("mousemove", this.handleMove), (b = this.map) == null || b.off("dblclick", this.handleDblClick), this.map && (this.map.getCanvas().style.cursor = "grab");
|
|
8369
8369
|
let O = this.geojson.find((p) => !p.closed);
|
|
8370
8370
|
O && this.handleClear(O, !0), this.geojson = this.geojson.filter((p) => !!p.closed), O = T.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(O);
|
|
8371
8371
|
}
|
|
@@ -8380,32 +8380,32 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8380
8380
|
},
|
|
8381
8381
|
methods: {
|
|
8382
8382
|
handleBind() {
|
|
8383
|
-
var
|
|
8384
|
-
(
|
|
8383
|
+
var z, M, b, O, p;
|
|
8384
|
+
(z = this.map) == null || z.getCanvas().addEventListener("keydown", this.handleKeydown), (M = this.map) == null || M.on("mousemove", this.handleMove), (b = this.map) == null || b.on("dblclick", this.handleDblClick), (O = this.map) == null || O.on("click", this.handleClick), (p = this.map) == null || p.on("contextmenu", this.handleContextmenu), this.map && (this.map.getCanvas().style.cursor = "crosshair");
|
|
8385
8385
|
},
|
|
8386
8386
|
handleUnbind() {
|
|
8387
|
-
var
|
|
8388
|
-
(
|
|
8387
|
+
var z, M, b, O, p;
|
|
8388
|
+
(z = this.map) == null || z.getCanvas().removeEventListener("keydown", this.handleKeydown), (M = this.map) == null || M.off("mousemove", this.handleMove), (b = this.map) == null || b.off("dblclick", this.handleDblClick), (O = this.map) == null || O.off("click", this.handleClick), (p = this.map) == null || p.off("contextmenu", this.handleContextmenu);
|
|
8389
8389
|
for (const o of this.geojson)
|
|
8390
8390
|
this.handleClear(o, !0);
|
|
8391
8391
|
this.geojson = [], this.map && (this.map.getCanvas().style.cursor = "grab");
|
|
8392
8392
|
},
|
|
8393
|
-
handleKeydown(
|
|
8394
|
-
if (
|
|
8393
|
+
handleKeydown(z) {
|
|
8394
|
+
if (z.key === "Shift") {
|
|
8395
8395
|
this.navigation = this.navigation === "RL" ? "GC" : "RL";
|
|
8396
|
-
const M = this.geojson.at(-1),
|
|
8397
|
-
|
|
8396
|
+
const M = this.geojson.at(-1), b = M.features.filter((O) => O.geometry.type === "Point");
|
|
8397
|
+
b.length && (b.at(-1).properties.mode = this.navigation), this.handleRender(M);
|
|
8398
8398
|
}
|
|
8399
8399
|
},
|
|
8400
|
-
handleDrag(
|
|
8401
|
-
var
|
|
8402
|
-
const M = (O = (
|
|
8400
|
+
handleDrag(z) {
|
|
8401
|
+
var b, O, p, o, A, a, q, i, e, r;
|
|
8402
|
+
const M = (O = (b = z.target) == null ? void 0 : b._element) == null ? void 0 : O.id;
|
|
8403
8403
|
if ((M == null ? void 0 : M.split("-").length) === 2) {
|
|
8404
8404
|
const s = this.geojson.filter((d) => d.id === M.split("-")[0])[0];
|
|
8405
8405
|
this.pointMarkers[s.id].filter((d) => {
|
|
8406
8406
|
var h;
|
|
8407
8407
|
return ((h = d._element) == null ? void 0 : h.id) === M;
|
|
8408
|
-
})[0].setLngLat([(o = (p =
|
|
8408
|
+
})[0].setLngLat([(o = (p = z.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (a = (A = z.target) == null ? void 0 : A._lngLat) == null ? void 0 : a.lat]);
|
|
8409
8409
|
let m;
|
|
8410
8410
|
s.features.forEach((d, h) => {
|
|
8411
8411
|
if (d.geometry.type === "Point" && d.properties.id == M.split("-")[1]) {
|
|
@@ -8417,45 +8417,45 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8417
8417
|
this.handleTmpPointUpdate(
|
|
8418
8418
|
s,
|
|
8419
8419
|
L[m - 1],
|
|
8420
|
-
{ lng: (i = (q =
|
|
8420
|
+
{ lng: (i = (q = z.target) == null ? void 0 : q._lngLat) == null ? void 0 : i.lng, lat: (r = (e = z.target) == null ? void 0 : e._lngLat) == null ? void 0 : r.lat, properties: L[m].properties },
|
|
8421
8421
|
m === L.length - 1 ? void 0 : L[m + 1]
|
|
8422
8422
|
);
|
|
8423
8423
|
}
|
|
8424
8424
|
},
|
|
8425
|
-
handleDragEnd(
|
|
8426
|
-
var
|
|
8427
|
-
const M = (O = (
|
|
8425
|
+
handleDragEnd(z) {
|
|
8426
|
+
var b, O, p, o, A, a, q, i, e, r;
|
|
8427
|
+
const M = (O = (b = z.target) == null ? void 0 : b._element) == null ? void 0 : O.id;
|
|
8428
8428
|
if ((M == null ? void 0 : M.split("-").length) === 2) {
|
|
8429
8429
|
const s = this.geojson.filter((L) => L.id === M.split("-")[0])[0];
|
|
8430
8430
|
this.pointMarkers[s.id].filter((L) => {
|
|
8431
8431
|
var d;
|
|
8432
8432
|
return ((d = L._element) == null ? void 0 : d.id) === M;
|
|
8433
|
-
})[0].setLngLat([(o = (p =
|
|
8433
|
+
})[0].setLngLat([(o = (p = z.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (a = (A = z.target) == null ? void 0 : A._lngLat) == null ? void 0 : a.lat]);
|
|
8434
8434
|
const m = s.features.filter((L) => L.geometry.type === "Point" && L.properties.id == M.split("-")[1])[0];
|
|
8435
|
-
m.geometry.coordinates = [(i = (q =
|
|
8435
|
+
m.geometry.coordinates = [(i = (q = z.target) == null ? void 0 : q._lngLat) == null ? void 0 : i.lng, (r = (e = z.target) == null ? void 0 : e._lngLat) == null ? void 0 : r.lat], s.features = s.features.filter((L) => L.geometry.type === "Point"), this.handlePointUpdate(s);
|
|
8436
8436
|
}
|
|
8437
8437
|
},
|
|
8438
|
-
handleContextmenu(
|
|
8439
|
-
var
|
|
8440
|
-
|
|
8441
|
-
const M = (o = (p = (O =
|
|
8438
|
+
handleContextmenu(z) {
|
|
8439
|
+
var b, O, p, o;
|
|
8440
|
+
z.preventDefault(), (b = this.contextmenu) == null || b.remove();
|
|
8441
|
+
const M = (o = (p = (O = z.originalEvent) == null ? void 0 : O.target) == null ? void 0 : p.parentElement) == null ? void 0 : o.id;
|
|
8442
8442
|
if ((M == null ? void 0 : M.split("-").length) === 2) {
|
|
8443
8443
|
const a = this.geojson.filter((q) => q.id === M.split("-")[0])[0].features.filter((q) => q.geometry.type === "Point");
|
|
8444
8444
|
if (a.length > 2 && a.filter((i) => i.properties.id === (M == null ? void 0 : M.split("-")[1]))[0]) {
|
|
8445
8445
|
const i = document.createElement("div");
|
|
8446
|
-
i.className = "point-contextmenu-marker", i.innerHTML = `<span id="del-${M}" class="del-point">Del</span>`, this.contextmenu = new C0.Marker(i).setOffset([24, 0]).setLngLat([
|
|
8446
|
+
i.className = "point-contextmenu-marker", i.innerHTML = `<span id="del-${M}" class="del-point">Del</span>`, this.contextmenu = new C0.Marker(i).setOffset([24, 0]).setLngLat([z.lngLat.lng, z.lngLat.lat]).addTo(this.map);
|
|
8447
8447
|
}
|
|
8448
8448
|
}
|
|
8449
8449
|
},
|
|
8450
|
-
handleClick(
|
|
8451
|
-
var
|
|
8452
|
-
(
|
|
8453
|
-
const M =
|
|
8450
|
+
handleClick(z) {
|
|
8451
|
+
var b, O, p, o, A, a;
|
|
8452
|
+
(b = this.contextmenu) == null || b.remove();
|
|
8453
|
+
const M = z.originalEvent.target.className;
|
|
8454
8454
|
if (M === "marker-close") {
|
|
8455
|
-
const q = (p = (O =
|
|
8455
|
+
const q = (p = (O = z.originalEvent) == null ? void 0 : O.srcElement) == null ? void 0 : p.id, i = this.geojson.filter((e) => e.id === q)[0];
|
|
8456
8456
|
i && this.handleClear(i, !0), this.geojson = this.geojson.filter((e) => e.id !== q), !this.show && !((o = this.geojson) != null && o.some((e) => e.closed)) && this.handleUnbind();
|
|
8457
8457
|
} else if (M === "del-point") {
|
|
8458
|
-
const q = (a = (A =
|
|
8458
|
+
const q = (a = (A = z.originalEvent.target.id) == null ? void 0 : A.replace("del-", "")) == null ? void 0 : a.split("-"), i = this.geojson.filter((e) => e.id === q[0])[0];
|
|
8459
8459
|
i.features = i.features.filter((e) => e.geometry.type === "Point" && e.properties.id !== q[1]), this.handlePointUpdate(i);
|
|
8460
8460
|
} else if (M !== "marker-label" && this.show) {
|
|
8461
8461
|
let q = this.geojson.at(-1);
|
|
@@ -8463,7 +8463,7 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8463
8463
|
const i = T.feature(
|
|
8464
8464
|
{
|
|
8465
8465
|
type: "Point",
|
|
8466
|
-
coordinates: [
|
|
8466
|
+
coordinates: [z.lngLat.lng, z.lngLat.lat]
|
|
8467
8467
|
},
|
|
8468
8468
|
{
|
|
8469
8469
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
@@ -8473,28 +8473,28 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8473
8473
|
q.features.push(i), this.handlePointUpdate(q);
|
|
8474
8474
|
}
|
|
8475
8475
|
},
|
|
8476
|
-
handlePointUpdate(
|
|
8477
|
-
const M =
|
|
8476
|
+
handlePointUpdate(z) {
|
|
8477
|
+
const M = z.features;
|
|
8478
8478
|
if (M.length > 1) {
|
|
8479
|
-
let
|
|
8479
|
+
let b = 0;
|
|
8480
8480
|
const O = [];
|
|
8481
8481
|
for (let p = 1; p < M.length; p++) {
|
|
8482
8482
|
const o = M[p - 1], A = M[p], a = o.properties, q = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, i = { lng: A.geometry.coordinates[0], lat: A.geometry.coordinates[1] }, e = v0.calculateDistance(q, i, a.mode === "RL", 2), r = v0.calculateBearing(q, i, a.mode === "RL", 2);
|
|
8483
|
-
|
|
8483
|
+
b = o0.roundPrecision(b + e, 2);
|
|
8484
8484
|
let s;
|
|
8485
8485
|
a.mode === "RL" ? s = o0.convertToMonotonicLng([q, i]) : s = o0.convertToMonotonicLng(v0.interpolateCoordinates(q, i, 200));
|
|
8486
8486
|
const n = T.lineString(s.map((m) => [m.lng, m.lat]));
|
|
8487
|
-
n.properties.dist = e, n.properties.bearing = r, n.properties.total =
|
|
8487
|
+
n.properties.dist = e, n.properties.bearing = r, n.properties.total = b, O.push(n);
|
|
8488
8488
|
}
|
|
8489
|
-
M.push(...O),
|
|
8489
|
+
M.push(...O), z.total = b;
|
|
8490
8490
|
}
|
|
8491
|
-
return this.handleRender(
|
|
8491
|
+
return this.handleRender(z), z;
|
|
8492
8492
|
},
|
|
8493
|
-
handleTmpPointUpdate(
|
|
8493
|
+
handleTmpPointUpdate(z, M, b, O) {
|
|
8494
8494
|
const p = T.featureCollection([]);
|
|
8495
8495
|
let o, A;
|
|
8496
8496
|
if (M) {
|
|
8497
|
-
const q = M.properties, i = { lng: M.geometry.coordinates[0], lat: M.geometry.coordinates[1] }, e = { lng:
|
|
8497
|
+
const q = M.properties, i = { lng: M.geometry.coordinates[0], lat: M.geometry.coordinates[1] }, e = { lng: b.lng, lat: b.lat };
|
|
8498
8498
|
o = v0.calculateDistance(i, e, q.mode === "RL", 2), A = v0.calculateBearing(i, e, q.mode === "RL", 2);
|
|
8499
8499
|
let r;
|
|
8500
8500
|
q.mode === "RL" ? r = o0.convertToMonotonicLng([i, e]) : r = o0.convertToMonotonicLng(v0.interpolateCoordinates(i, e, 200));
|
|
@@ -8502,7 +8502,7 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8502
8502
|
s.properties.dist = o, s.properties.bearing = A, p.features.push(s);
|
|
8503
8503
|
}
|
|
8504
8504
|
if (O) {
|
|
8505
|
-
const q =
|
|
8505
|
+
const q = b.properties, i = b, e = { lng: O.geometry.coordinates[0], lat: O.geometry.coordinates[1] };
|
|
8506
8506
|
o = v0.calculateDistance(i, e, q.mode === "RL", 2), A = v0.calculateBearing(i, e, q.mode === "RL", 2);
|
|
8507
8507
|
let r;
|
|
8508
8508
|
q.mode === "RL" ? r = o0.convertToMonotonicLng([i, e]) : r = o0.convertToMonotonicLng(v0.interpolateCoordinates(i, e, 200));
|
|
@@ -8547,36 +8547,36 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8547
8547
|
}
|
|
8548
8548
|
});
|
|
8549
8549
|
let a;
|
|
8550
|
-
if (O ? a = '<div class="marker-label">Drag and drop</div>' : a = `<div class="marker-label">Total distance: <b>${o0.roundPrecision((
|
|
8551
|
-
this.tipMarker._element.innerHTML = a, this.tipMarker.setLngLat([
|
|
8550
|
+
if (O ? a = '<div class="marker-label">Drag and drop</div>' : a = `<div class="marker-label">Total distance: <b>${o0.roundPrecision((z.total ?? 0) + o, 2)}</b>nm, bearing: <b>${A}</b>°</div><div class="marker-label">${this.navigation === "RL" ? "RL" : "GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`, this.tipMarker)
|
|
8551
|
+
this.tipMarker._element.innerHTML = a, this.tipMarker.setLngLat([b.lng, b.lat]);
|
|
8552
8552
|
else {
|
|
8553
8553
|
const q = document.createElement("div");
|
|
8554
|
-
q.className = "tip-marker", q.innerHTML = a, this.tipMarker = new C0.Marker(q).setOffset([140, 0]).setLngLat([
|
|
8554
|
+
q.className = "tip-marker", q.innerHTML = a, this.tipMarker = new C0.Marker(q).setOffset([140, 0]).setLngLat([b.lng, b.lat]).addTo(this.map);
|
|
8555
8555
|
}
|
|
8556
8556
|
},
|
|
8557
|
-
handleMove(
|
|
8557
|
+
handleMove(z) {
|
|
8558
8558
|
this.map.getCanvas().style.cursor = "crosshair";
|
|
8559
8559
|
let M = this.geojson.at(-1);
|
|
8560
8560
|
M || (M = T.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(M));
|
|
8561
|
-
const
|
|
8562
|
-
|
|
8561
|
+
const b = M.features.filter((O) => O.geometry.type === "Point");
|
|
8562
|
+
b != null && b.length && this.handleTmpPointUpdate(M, b.at(-1), { lng: z.lngLat.lng, lat: z.lngLat.lat });
|
|
8563
8563
|
},
|
|
8564
|
-
handleDblClick(
|
|
8565
|
-
|
|
8564
|
+
handleDblClick(z) {
|
|
8565
|
+
z.preventDefault();
|
|
8566
8566
|
let M = this.geojson.at(-1);
|
|
8567
8567
|
M.closed = !0, this.handleRender(M), M = T.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(M);
|
|
8568
8568
|
},
|
|
8569
|
-
handleRender(
|
|
8569
|
+
handleRender(z) {
|
|
8570
8570
|
var M;
|
|
8571
|
-
if ((M =
|
|
8572
|
-
const
|
|
8573
|
-
this.map.getSource(
|
|
8571
|
+
if ((M = z == null ? void 0 : z.features) != null && M.length) {
|
|
8572
|
+
const b = `${z.id}-${this.source}`, O = `${z.id}-${this.layer}`, p = `${z.id}-${this.labelLayer}`;
|
|
8573
|
+
this.map.getSource(b) ? this.map.getSource(b).setData(z) : this.map.addSource(b, {
|
|
8574
8574
|
type: "geojson",
|
|
8575
|
-
data:
|
|
8576
|
-
}), this.handleClear(
|
|
8575
|
+
data: z
|
|
8576
|
+
}), this.handleClear(z, !1), this.map.addLayer({
|
|
8577
8577
|
id: O,
|
|
8578
8578
|
type: "line",
|
|
8579
|
-
source:
|
|
8579
|
+
source: b,
|
|
8580
8580
|
filter: ["==", "$type", "LineString"],
|
|
8581
8581
|
layout: {
|
|
8582
8582
|
"line-cap": "round",
|
|
@@ -8589,7 +8589,7 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8589
8589
|
}), this.map.addLayer({
|
|
8590
8590
|
id: p,
|
|
8591
8591
|
type: "symbol",
|
|
8592
|
-
source:
|
|
8592
|
+
source: b,
|
|
8593
8593
|
filter: ["==", "$type", "LineString"],
|
|
8594
8594
|
layout: {
|
|
8595
8595
|
"symbol-placement": "line-center",
|
|
@@ -8605,29 +8605,29 @@ const q1 = /* @__PURE__ */ Q(mz, [["render", Bz], ["__scopeId", "data-v-ad66a24c
|
|
|
8605
8605
|
"text-halo-blur": 0
|
|
8606
8606
|
}
|
|
8607
8607
|
});
|
|
8608
|
-
const o =
|
|
8608
|
+
const o = z.features.filter((A) => A.geometry.type === "Point");
|
|
8609
8609
|
for (const A of o) {
|
|
8610
8610
|
const a = document.createElement("div");
|
|
8611
|
-
a.id = `${
|
|
8611
|
+
a.id = `${z.id}-${A.properties.id}`, a.className = `${z.closed ? "point-marker closed" : "point-marker"}`, a.innerHTML = '<div class="marker-circle"></div>';
|
|
8612
8612
|
const q = new C0.Marker({ element: a, draggable: !0, contextmenu: !0 }).setLngLat(A.geometry.coordinates).addTo(this.map);
|
|
8613
|
-
q.on("drag", this.handleDrag), q.on("dragend", this.handleDragEnd), this.pointMarkers[
|
|
8613
|
+
q.on("drag", this.handleDrag), q.on("dragend", this.handleDragEnd), this.pointMarkers[z.id] ? this.pointMarkers[z.id].push(q) : this.pointMarkers[z.id] = [q];
|
|
8614
8614
|
}
|
|
8615
|
-
if (
|
|
8616
|
-
const A = o.at(-1), q =
|
|
8617
|
-
i.className = "point-summary-marker", i.innerHTML = `<div id="${
|
|
8615
|
+
if (z.closed) {
|
|
8616
|
+
const A = o.at(-1), q = z.features.filter((e) => e.geometry.type === "LineString").at(-1), i = document.createElement("div");
|
|
8617
|
+
i.className = "point-summary-marker", i.innerHTML = `<div id="${z.id}" class="marker-close">×</div><div class="marker-label">Tol: ${q.properties.total}nm</div>`, this.closeMarkers[z.id] = new C0.Marker(i).setOffset([60, 0]).setLngLat(A.geometry.coordinates).addTo(this.map);
|
|
8618
8618
|
}
|
|
8619
8619
|
}
|
|
8620
8620
|
},
|
|
8621
|
-
handleClear(
|
|
8621
|
+
handleClear(z, M = !0) {
|
|
8622
8622
|
var o, A, a, q, i, e, r, s, n;
|
|
8623
|
-
const
|
|
8624
|
-
(o = this.map) != null && o.getLayer(O) && this.map.removeLayer(O), (A = this.map) != null && A.getLayer(p) && this.map.removeLayer(p), (a = this.map) != null && a.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (q = this.map) != null && q.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (i = this.closeMarkers[
|
|
8623
|
+
const b = `${z.id}-${this.source}`, O = `${z.id}-${this.layer}`, p = `${z.id}-${this.labelLayer}`;
|
|
8624
|
+
(o = this.map) != null && o.getLayer(O) && this.map.removeLayer(O), (A = this.map) != null && A.getLayer(p) && this.map.removeLayer(p), (a = this.map) != null && a.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (q = this.map) != null && q.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (i = this.closeMarkers[z.id]) == null || i.remove(), this.closeMarkers[z.id] = void 0, (e = this.pointMarkers[z.id]) == null || e.forEach((m) => {
|
|
8625
8625
|
m == null || m.remove();
|
|
8626
|
-
}), this.pointMarkers[
|
|
8626
|
+
}), this.pointMarkers[z.id] = [], (r = this.tipMarker) == null || r.remove(), this.tipMarker = void 0, M && ((s = this.map) != null && s.getSource(b)) && this.map.removeSource(b), M && ((n = this.map) != null && n.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
8627
8627
|
}
|
|
8628
8628
|
}
|
|
8629
8629
|
};
|
|
8630
|
-
function Nz(
|
|
8630
|
+
function Nz(z, M, b, O, p, o) {
|
|
8631
8631
|
return W(), l("div");
|
|
8632
8632
|
}
|
|
8633
8633
|
const yz = /* @__PURE__ */ Q(gz, [["render", Nz]]);
|
|
@@ -8676,20 +8676,20 @@ const Xz = {
|
|
|
8676
8676
|
},
|
|
8677
8677
|
toggleVersion: {
|
|
8678
8678
|
handler() {
|
|
8679
|
-
var
|
|
8680
|
-
this.right = (((
|
|
8679
|
+
var z;
|
|
8680
|
+
this.right = (((z = document.getElementsByClassName("right-bar")[0]) == null ? void 0 : z.clientWidth) || 0) + 10;
|
|
8681
8681
|
},
|
|
8682
8682
|
immediate: !0
|
|
8683
8683
|
}
|
|
8684
8684
|
},
|
|
8685
8685
|
methods: {}
|
|
8686
8686
|
}, wz = { key: 0 }, vz = { class: "bar-item" };
|
|
8687
|
-
function Cz(
|
|
8687
|
+
function Cz(z, M, b, O, p, o) {
|
|
8688
8688
|
const A = P("ElTooltip");
|
|
8689
|
-
return
|
|
8689
|
+
return b.enabled && b.permission & p.helper.LEVEL.Supper ? (W(), l("div", wz, [
|
|
8690
8690
|
c("div", {
|
|
8691
8691
|
class: "menu-bar-box",
|
|
8692
|
-
style:
|
|
8692
|
+
style: e0({ position: "absolute", right: p.right + "px", bottom: b.bottom })
|
|
8693
8693
|
}, [
|
|
8694
8694
|
c("div", vz, [
|
|
8695
8695
|
E(A, {
|
|
@@ -8774,18 +8774,18 @@ const Ez = {
|
|
|
8774
8774
|
},
|
|
8775
8775
|
methods: {
|
|
8776
8776
|
handleRender() {
|
|
8777
|
-
var
|
|
8778
|
-
this.map ? (console.log(this.map.style._layers), (
|
|
8777
|
+
var z;
|
|
8778
|
+
this.map ? (console.log(this.map.style._layers), (z = this.map) != null && z.getLayer(this.layer) && (this.map.setLayoutProperty(this.layer, "visibility", "visible"), this.map.setPaintProperty(this.layer, "line-color", "rgb(210,54,83)"), this.map.setPaintProperty(this.layer, "line-width", 2))) : setTimeout(() => {
|
|
8779
8779
|
this.handleRender();
|
|
8780
8780
|
}, 500);
|
|
8781
8781
|
},
|
|
8782
8782
|
handleClear() {
|
|
8783
|
-
var
|
|
8784
|
-
(
|
|
8783
|
+
var z;
|
|
8784
|
+
(z = this.map) != null && z.getLayer(this.layer) && this.map.setLayoutProperty(this.layer, "visibility", "none");
|
|
8785
8785
|
}
|
|
8786
8786
|
}
|
|
8787
8787
|
};
|
|
8788
|
-
function xz(
|
|
8788
|
+
function xz(z, M, b, O, p, o) {
|
|
8789
8789
|
return null;
|
|
8790
8790
|
}
|
|
8791
8791
|
const Iz = /* @__PURE__ */ Q(Ez, [["render", xz]]);
|
|
@@ -8869,10 +8869,9 @@ const Dz = {
|
|
|
8869
8869
|
activeWindLayer: !1,
|
|
8870
8870
|
showWindFeather: !1,
|
|
8871
8871
|
showWindParticle: !1,
|
|
8872
|
-
|
|
8872
|
+
toggleParticeVersion: 0,
|
|
8873
8873
|
showCurrentIsoband: !1,
|
|
8874
8874
|
showCurrentParticle: !1,
|
|
8875
|
-
currentParticeVersion: 0,
|
|
8876
8875
|
enc: "",
|
|
8877
8876
|
defaultMeteoToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg",
|
|
8878
8877
|
helper: new s2()
|
|
@@ -8880,8 +8879,8 @@ const Dz = {
|
|
|
8880
8879
|
},
|
|
8881
8880
|
watch: {
|
|
8882
8881
|
ts: {
|
|
8883
|
-
handler(
|
|
8884
|
-
|
|
8882
|
+
handler(z, M) {
|
|
8883
|
+
z && M && Y(z).utc().format("yyyy-MM-DD HH") !== Y(M).utc().format("yyyy-MM-DD HH") && this.$nextTick(() => {
|
|
8885
8884
|
this.handleDateChange({ tropicals: !1 });
|
|
8886
8885
|
});
|
|
8887
8886
|
},
|
|
@@ -8894,17 +8893,17 @@ const Dz = {
|
|
|
8894
8893
|
immediate: !0
|
|
8895
8894
|
},
|
|
8896
8895
|
enc: {
|
|
8897
|
-
handler(
|
|
8898
|
-
var
|
|
8899
|
-
|
|
8896
|
+
handler(z, M) {
|
|
8897
|
+
var b, O, p, o, A, a, q, i;
|
|
8898
|
+
z ? ((O = (b = this.map) == null ? void 0 : b.getLayer(z)) == null || O.setLayoutProperty("visibility", "visible"), (o = (p = this.map) == null ? void 0 : p.getLayer(M)) == null || o.setLayoutProperty("visibility", "none")) : ((a = (A = this.map) == null ? void 0 : A.getLayer("i4")) == null || a.setLayoutProperty("visibility", "none"), (i = (q = this.map) == null ? void 0 : q.getLayer("hi")) == null || i.setLayoutProperty("visibility", "none"));
|
|
8900
8899
|
}
|
|
8901
8900
|
},
|
|
8902
8901
|
activeWeatherLayers: {
|
|
8903
8902
|
handler() {
|
|
8904
|
-
var
|
|
8903
|
+
var z, M, b, O, p, o, A, a, q, i, e, r, s, n, m, L, d, h;
|
|
8905
8904
|
if (!this.map)
|
|
8906
8905
|
return !1;
|
|
8907
|
-
this.activeWeatherLayers.length > 0 ? ((M = (
|
|
8906
|
+
this.activeWeatherLayers.length > 0 ? ((M = (z = this.map) == null ? void 0 : z.getLayer(this.enc)) == null || M.setLayoutProperty("visibility", "none"), (O = (b = this.map) == null ? void 0 : b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || O.setLayoutProperty("visibility", "visible"), (o = this.map) != null && o.getLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer) && ((A = this.map) != null && A.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((q = this.map) == null || q.moveLayer((a = this.viewport) == null ? void 0 : a.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (e = this.map) != null && e.getLayer((i = this.viewport) == null ? void 0 : i.particleLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((n = this.map) == null || n.moveLayer((s = this.viewport) == null ? void 0 : s.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : ((L = (m = this.map) == null ? void 0 : m.getLayer(this.enc)) == null || L.setLayoutProperty("visibility", "visible"), (h = (d = this.map) == null ? void 0 : d.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || h.setLayoutProperty("visibility", "none")), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
|
|
8908
8907
|
},
|
|
8909
8908
|
immediate: !0
|
|
8910
8909
|
},
|
|
@@ -8955,10 +8954,10 @@ const Dz = {
|
|
|
8955
8954
|
// },
|
|
8956
8955
|
},
|
|
8957
8956
|
methods: {
|
|
8958
|
-
async fetchWeatherLayers(
|
|
8957
|
+
async fetchWeatherLayers(z = { tropicals: !1 }) {
|
|
8959
8958
|
var p, o, A, a, q, i, e, r;
|
|
8960
8959
|
const M = (/* @__PURE__ */ new Date()).valueOf();
|
|
8961
|
-
let
|
|
8960
|
+
let b = 0, O = 0;
|
|
8962
8961
|
if (this.map) {
|
|
8963
8962
|
const s = ((p = this.map) == null ? void 0 : p.getZoom()) + 1, n = (o = this.map) == null ? void 0 : o.getBounds(), m = `${n._sw.lng},${n._sw.lat},${n._ne.lng},${n._ne.lat}`;
|
|
8964
8963
|
if (this.particleFactor) {
|
|
@@ -8970,13 +8969,13 @@ const Dz = {
|
|
|
8970
8969
|
}
|
|
8971
8970
|
if (this.weatherWeight > 0) {
|
|
8972
8971
|
let L = this.weatherWeight, d;
|
|
8973
|
-
if (
|
|
8972
|
+
if (z.tropicals || this.weatherWeight & 256 && (d = this.weatherLayers.tropicals, d && (L -= 256, d.version = Math.random() + 1)), L > 0) {
|
|
8974
8973
|
const h = await N0.get(`${this.gateway}/api/arc/weather/layers/links?l=${L}&v=${this.source}&z=${s}&bbox=${m}&t=${this.ts}`, {
|
|
8975
8974
|
headers: {
|
|
8976
8975
|
Authorization: this.token || this.defaultMeteoToken
|
|
8977
8976
|
}
|
|
8978
8977
|
});
|
|
8979
|
-
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M +
|
|
8978
|
+
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + b), console.log("weather links elapsed: ", O, ", total: ", b += O), ((A = h == null ? void 0 : h.data) == null ? void 0 : A.code) === 0) {
|
|
8980
8979
|
const R = (a = h == null ? void 0 : h.data) == null ? void 0 : a.data, w = [];
|
|
8981
8980
|
for (const X in R)
|
|
8982
8981
|
X === "ice-edge" && (R[X] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), X !== "tropicals" && w.push(
|
|
@@ -9017,7 +9016,7 @@ const Dz = {
|
|
|
9017
9016
|
};
|
|
9018
9017
|
});
|
|
9019
9018
|
}
|
|
9020
|
-
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M +
|
|
9019
|
+
if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + b), console.log("weather layers elapsed: ", O, ", total: ", b += O), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
|
|
9021
9020
|
const R = (q = this.weatherLayers["swell-direction"]) == null ? void 0 : q.raw, w = (i = this.weatherLayers["swell-height"]) == null ? void 0 : i.raw;
|
|
9022
9021
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
9023
9022
|
type: "json",
|
|
@@ -9042,21 +9041,21 @@ const Dz = {
|
|
|
9042
9041
|
}
|
|
9043
9042
|
this.$emit("toggleVersion", Math.random());
|
|
9044
9043
|
},
|
|
9045
|
-
async fetchOtherLayers(
|
|
9046
|
-
var M,
|
|
9044
|
+
async fetchOtherLayers(z = { all: !1, dayNight: !1, enc: !1, world12nm: !1 }) {
|
|
9045
|
+
var M, b, O, p;
|
|
9047
9046
|
if (this.map) {
|
|
9048
9047
|
let o = this.otherWeight;
|
|
9049
9048
|
if (o) {
|
|
9050
9049
|
let A = !1, a = !1;
|
|
9051
9050
|
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, A = !0), this.otherWeight & 8192 && (o = o - 8192, a = !0), o) {
|
|
9052
|
-
if (
|
|
9051
|
+
if (z.all) {
|
|
9053
9052
|
const q = await N0.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
|
|
9054
9053
|
headers: {
|
|
9055
9054
|
Authorization: this.token || this.defaultMeteoToken
|
|
9056
9055
|
}
|
|
9057
9056
|
});
|
|
9058
9057
|
if (((M = q == null ? void 0 : q.data) == null ? void 0 : M.code) === 0) {
|
|
9059
|
-
const i = (
|
|
9058
|
+
const i = (b = q == null ? void 0 : q.data) == null ? void 0 : b.data, e = [];
|
|
9060
9059
|
for (const s in i)
|
|
9061
9060
|
e.push(
|
|
9062
9061
|
N0.get(i[s], {
|
|
@@ -9073,7 +9072,7 @@ const Dz = {
|
|
|
9073
9072
|
this.otherLayers[m] = n;
|
|
9074
9073
|
});
|
|
9075
9074
|
}
|
|
9076
|
-
} else if (
|
|
9075
|
+
} else if (z.dayNight && o & 1024) {
|
|
9077
9076
|
const q = await N0.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
|
|
9078
9077
|
headers: {
|
|
9079
9078
|
Authorization: this.token || this.defaultMeteoToken
|
|
@@ -9105,8 +9104,8 @@ const Dz = {
|
|
|
9105
9104
|
}
|
|
9106
9105
|
},
|
|
9107
9106
|
handleRampColorState() {
|
|
9108
|
-
var
|
|
9109
|
-
if (this.showRampColor = !1, this.showWindParticle = !1, this.showCurrentParticle = !1, (
|
|
9107
|
+
var z;
|
|
9108
|
+
if (this.showRampColor = !1, this.showWindParticle = !1, this.showCurrentParticle = !1, (z = this.particleFactor) != null && z.particle)
|
|
9110
9109
|
this.showRampColor = !0, this.particleFactor.key === "wind" && (this.showWindParticle = !0), this.particleFactor.key === "current" && (this.showCurrentParticle = !0);
|
|
9111
9110
|
else
|
|
9112
9111
|
for (const M of this.activeWeatherLayers)
|
|
@@ -9114,10 +9113,10 @@ const Dz = {
|
|
|
9114
9113
|
this.activeWindLayer = !!this.activeWeatherLayers.find((M) => M.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
9115
9114
|
},
|
|
9116
9115
|
handleRampColorInitial() {
|
|
9117
|
-
var
|
|
9118
|
-
this.viewport.map.getSource((
|
|
9116
|
+
var z, M, b, O, p, o, A, a, q, i, e, r;
|
|
9117
|
+
this.viewport.map.getSource((z = this.viewport) == null ? void 0 : z.rampColorSource) || this.viewport.map.addSource((M = this.viewport) == null ? void 0 : M.rampColorSource, {
|
|
9119
9118
|
type: "canvas",
|
|
9120
|
-
canvas: (
|
|
9119
|
+
canvas: (b = this.viewport) == null ? void 0 : b.rampColorCanvas,
|
|
9121
9120
|
animate: !0,
|
|
9122
9121
|
coordinates: this.viewport.getBoundLngLat()
|
|
9123
9122
|
}), this.viewport.map.getLayer((O = this.viewport) == null ? void 0 : O.rampColorLayer) || this.viewport.map.addLayer(
|
|
@@ -9149,8 +9148,8 @@ const Dz = {
|
|
|
9149
9148
|
},
|
|
9150
9149
|
handleDragEndWithZoom4Json() {
|
|
9151
9150
|
var i, e, r, s;
|
|
9152
|
-
const
|
|
9153
|
-
let M = 0,
|
|
9151
|
+
const z = (/* @__PURE__ */ new Date()).valueOf();
|
|
9152
|
+
let M = 0, b = 0;
|
|
9154
9153
|
const O = (i = this.map) == null ? void 0 : i.getBounds(), p = this.map.getZoom(), o = o0.convertToStdLng(O._sw.lng), A = o0.convertToStdLng(O._ne.lng), a = Math.floor(O._sw.lat), q = Math.ceil(O._ne.lat);
|
|
9155
9154
|
for (const n in this.weatherLayers)
|
|
9156
9155
|
if (this.weatherLayers[n].active && this.weatherLayers[n].type === "json") {
|
|
@@ -9181,7 +9180,7 @@ const Dz = {
|
|
|
9181
9180
|
}
|
|
9182
9181
|
});
|
|
9183
9182
|
}
|
|
9184
|
-
if (
|
|
9183
|
+
if (b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("direction elapsed: ", b, ", total: ", M += b), n === "swell") {
|
|
9185
9184
|
const d = this.weatherLayers[n].height;
|
|
9186
9185
|
if (d) {
|
|
9187
9186
|
if (!d.data) {
|
|
@@ -9201,7 +9200,7 @@ const Dz = {
|
|
|
9201
9200
|
const h = this.handleBboxClip(d.data, O);
|
|
9202
9201
|
m = m.concat(h);
|
|
9203
9202
|
}
|
|
9204
|
-
|
|
9203
|
+
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("height elapsed: ", b, ", total: ", M += b);
|
|
9205
9204
|
}
|
|
9206
9205
|
}
|
|
9207
9206
|
if (n === "current") {
|
|
@@ -9221,7 +9220,7 @@ const Dz = {
|
|
|
9221
9220
|
d.data = T.featureCollection(R);
|
|
9222
9221
|
}
|
|
9223
9222
|
const h = p < this.zoom ? d.data.features.filter((R) => R.properties.val > 0.5) : d.data.features;
|
|
9224
|
-
m = m.concat(h),
|
|
9223
|
+
m = m.concat(h), b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("speed elapsed: ", b, ", total: ", M += b);
|
|
9225
9224
|
}
|
|
9226
9225
|
}
|
|
9227
9226
|
} else if (n === "wind") {
|
|
@@ -9247,7 +9246,7 @@ const Dz = {
|
|
|
9247
9246
|
}
|
|
9248
9247
|
});
|
|
9249
9248
|
}
|
|
9250
|
-
|
|
9249
|
+
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("wind barb elapsed: ", b, ", total: ", M += b);
|
|
9251
9250
|
} else if (n === "sig-wave-height") {
|
|
9252
9251
|
if (this.weatherLayers[n].data)
|
|
9253
9252
|
m = this.weatherLayers[n].data;
|
|
@@ -9276,7 +9275,7 @@ const Dz = {
|
|
|
9276
9275
|
m = m.concat(d);
|
|
9277
9276
|
}
|
|
9278
9277
|
}
|
|
9279
|
-
|
|
9278
|
+
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("sigWave elapsed: ", b, ", total: ", M += b);
|
|
9280
9279
|
} else if (n === "prmsl") {
|
|
9281
9280
|
if (this.weatherLayers[n].data)
|
|
9282
9281
|
m = this.weatherLayers[n].data;
|
|
@@ -9305,7 +9304,7 @@ const Dz = {
|
|
|
9305
9304
|
m = m.concat(d);
|
|
9306
9305
|
}
|
|
9307
9306
|
}
|
|
9308
|
-
|
|
9307
|
+
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M), console.log("prmsl elapsed: ", b, ", total: ", M += b);
|
|
9309
9308
|
} else if (n === "arctic" || n === "iceberg") {
|
|
9310
9309
|
if (this.weatherLayers[n].data)
|
|
9311
9310
|
m = this.weatherLayers[n].data;
|
|
@@ -9325,90 +9324,90 @@ const Dz = {
|
|
|
9325
9324
|
m = m.concat(d);
|
|
9326
9325
|
}
|
|
9327
9326
|
}
|
|
9328
|
-
|
|
9327
|
+
b = (/* @__PURE__ */ new Date()).valueOf() - (z + M);
|
|
9329
9328
|
}
|
|
9330
|
-
console.log(n, " elapsed: ",
|
|
9329
|
+
console.log(n, " elapsed: ", b, ", total: ", M += b), m.length && (this.weatherLayers[n].data = T.featureCollection(m)), this.weatherLayers[n].active = !0, this.weatherLayers[n].version = Math.random() + 1;
|
|
9331
9330
|
}
|
|
9332
9331
|
},
|
|
9333
9332
|
handleDragEndWithZoom4Image() {
|
|
9334
|
-
for (const
|
|
9335
|
-
this.weatherLayers[
|
|
9333
|
+
for (const z in this.weatherLayers)
|
|
9334
|
+
this.weatherLayers[z].active && this.weatherLayers[z].type === "image" && (this.weatherLayers[z].active = !0, this.weatherLayers[z].version = Math.random() + 1);
|
|
9336
9335
|
},
|
|
9337
|
-
handleBboxClip(
|
|
9338
|
-
const
|
|
9339
|
-
return
|
|
9336
|
+
handleBboxClip(z, M) {
|
|
9337
|
+
const b = [], O = o0.convertToStdLng(M._sw.lng), p = o0.convertToStdLng(M._ne.lng);
|
|
9338
|
+
return z.features.forEach((o) => {
|
|
9340
9339
|
if (o.geometry.type !== "Point")
|
|
9341
9340
|
if (O > p) {
|
|
9342
9341
|
let A = [O, M._sw.lat, 180, M._ne.lat], a = T.bboxClip(o, A);
|
|
9343
|
-
a.geometry.coordinates.length &&
|
|
9342
|
+
a.geometry.coordinates.length && b.push(a), A = [-180, M._sw.lat, p, M._ne.lat], a = T.bboxClip(o, A), a.geometry.coordinates.length && b.push(a);
|
|
9344
9343
|
} else {
|
|
9345
9344
|
const A = [O, M._sw.lat, p, M._ne.lat], a = T.bboxClip(o, A);
|
|
9346
|
-
a.geometry.coordinates.length &&
|
|
9345
|
+
a.geometry.coordinates.length && b.push(a);
|
|
9347
9346
|
}
|
|
9348
9347
|
else
|
|
9349
|
-
|
|
9350
|
-
}),
|
|
9348
|
+
b.push(o);
|
|
9349
|
+
}), b;
|
|
9351
9350
|
},
|
|
9352
9351
|
handleWeatherLayerToggle() {
|
|
9353
|
-
var
|
|
9352
|
+
var z;
|
|
9354
9353
|
for (const M in this.weatherLayers)
|
|
9355
9354
|
this.weatherLayers[M].active = !1, this.weatherLayers[M].version = Math.random() + 1;
|
|
9356
9355
|
for (const M of this.activeWeatherLayers) {
|
|
9357
|
-
let
|
|
9358
|
-
|
|
9356
|
+
let b = M.key;
|
|
9357
|
+
b.indexOf("swell") > -1 ? b = "swell" : b.indexOf("current") > -1 && (b = "current"), this.weatherLayers[b] && (this.weatherLayers[b].active = !0, this.weatherLayers[b].version = Math.random() + 1, ((z = this.particleFactor) == null ? void 0 : z.key) === b && this.weatherLayers[`${b}-particle`] && (this.weatherLayers[`${b}-particle`].active = this.particleFactor.particle));
|
|
9359
9358
|
}
|
|
9360
9359
|
this.handleBeforeLayerToggle();
|
|
9361
9360
|
},
|
|
9362
9361
|
handleBeforeLayerToggle() {
|
|
9363
|
-
var
|
|
9364
|
-
(
|
|
9362
|
+
var z, M, b, O, p, o, A, a, q, i, e, r, s, n;
|
|
9363
|
+
(z = this.map) != null && z.getLayer(this.beforeLayer) && ((M = this.activeWeatherLayers) != null && M.length || (b = this.otherLayers) != null && b["war-zones"] || (O = this.otherLayers) != null && O["gmdss-areas"] || (p = this.otherLayers) != null && p["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (A = this.otherLayers) != null && A["time-zones"] || (a = this.otherLayers) != null && a.pirates || (q = this.otherLayers) != null && q.ports || (i = this.otherLayers) != null && i.enc || (e = this.otherLayers) != null && e.world12nm || (r = this.otherLayers) != null && r["voluntary-reporting-area"] || (s = this.otherLayers) != null && s["eca-zones"] || (n = this.otherLayers) != null && n["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
9365
9364
|
},
|
|
9366
|
-
handleDateChange(
|
|
9367
|
-
console.log(999, "handleDateChange"), this.fetchWeatherLayers(
|
|
9365
|
+
handleDateChange(z = { tropicals: !1 }) {
|
|
9366
|
+
console.log(999, "handleDateChange"), this.fetchWeatherLayers(z), this.fetchOtherLayers({ dayNight: !0 });
|
|
9368
9367
|
},
|
|
9369
|
-
handleWeatherLayerChange(
|
|
9368
|
+
handleWeatherLayerChange(z, M) {
|
|
9370
9369
|
this.showWindParticle = !1, this.showCurrentParticle = !1, this.map ? setTimeout(() => {
|
|
9371
|
-
this.activeWeatherLayers = JSON.parse(JSON.stringify(
|
|
9372
|
-
const
|
|
9370
|
+
this.activeWeatherLayers = JSON.parse(JSON.stringify(z));
|
|
9371
|
+
const b = this.activeWeatherLayers.some(
|
|
9373
9372
|
(o) => {
|
|
9374
9373
|
var A;
|
|
9375
9374
|
return ["wind", "current"].includes(o.key) && (!((A = Object.keys(o)) != null && A.some((a) => a === "particle")) || !!o.particle);
|
|
9376
9375
|
}
|
|
9377
9376
|
), O = this.activeWeatherLayers.some((o) => ["png", "jpg"].includes(o.type));
|
|
9378
|
-
|
|
9377
|
+
b && !O ? (this.activeWeatherLayers.forEach((o) => {
|
|
9379
9378
|
o.key === "wind" && o.particle && (this.particleFactor = o, this.showWindParticle = !0), o.key === "current" && o.particle && (this.particleFactor = o, this.showCurrentParticle = !0);
|
|
9380
9379
|
}), this.particleFactor.particle = !0) : O && this.particleFactor && (this.particleFactor.particle = !1);
|
|
9381
|
-
const p =
|
|
9380
|
+
const p = z == null ? void 0 : z.reduce((o, A) => o + (o & (A == null ? void 0 : A.weight) ? 0 : A == null ? void 0 : A.weight), 0);
|
|
9382
9381
|
this.weatherWeight !== p || this.source !== M ? (this.source = M, this.weatherWeight = p, console.log(999, "handleWeatherLayerChange"), this.fetchWeatherLayers({ tropicals: !1 })) : this.handleWeatherLayerToggle();
|
|
9383
9382
|
}) : setTimeout(() => {
|
|
9384
|
-
this.handleWeatherLayerChange(
|
|
9383
|
+
this.handleWeatherLayerChange(z, M);
|
|
9385
9384
|
}, 500);
|
|
9386
9385
|
},
|
|
9387
|
-
handleOtherLayerChange(
|
|
9386
|
+
handleOtherLayerChange(z) {
|
|
9388
9387
|
if (!this.map)
|
|
9389
9388
|
setTimeout(() => {
|
|
9390
|
-
this.handleOtherLayerChange(
|
|
9389
|
+
this.handleOtherLayerChange(z);
|
|
9391
9390
|
}, 500);
|
|
9392
9391
|
else {
|
|
9393
|
-
const M =
|
|
9394
|
-
|
|
9392
|
+
const M = z == null ? void 0 : z.reduce((b, O) => b + (O == null ? void 0 : O.weight), 0);
|
|
9393
|
+
z.find((b) => b.key === "enc") ? this.enc = "i4" : this.enc = "", this.otherWeight != M && (this.otherWeight = M, this.fetchOtherLayers({ all: !0 }));
|
|
9395
9394
|
}
|
|
9396
9395
|
},
|
|
9397
|
-
handle3dToggle(
|
|
9398
|
-
var M,
|
|
9399
|
-
|
|
9396
|
+
handle3dToggle(z) {
|
|
9397
|
+
var M, b, O, p, o, A, a, q, i, e, r, s, n, m, L, d, h, R, w, x;
|
|
9398
|
+
z ? (this.map.setProjection("globe"), this.mapProjection = "globe", (b = this.map) != null && b.getLayer((M = this.viewport) == null ? void 0 : M.rampColorLayer) && ((O = this.map) != null && O.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (a = this.map) != null && a.getLayer((A = this.viewport) == null ? void 0 : A.particleLayer) && ((q = this.map) != null && q.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((e = this.map) == null || e.moveLayer((i = this.viewport) == null ? void 0 : i.particleLayer, this.helper.mapboxCustomer.layers.water.id)), this.map.off("zoomend", this.handleDragEndWithZoom4Json), this.map.off("dragend", this.handleDragEndWithZoom4Json), this.map.off("move", this.handleDragEndWithZoom4Image)) : (this.map.setProjection("mercator"), this.mapProjection = "mercator", this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.handleDragEndWithZoom4Image(), this.handleDragEndWithZoom4Json(), (s = this.map) != null && s.getLayer((r = this.viewport) == null ? void 0 : r.rampColorLayer) && ((n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((L = this.map) == null || L.moveLayer((m = this.viewport) == null ? void 0 : m.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (h = this.map) != null && h.getLayer((d = this.viewport) == null ? void 0 : d.particleLayer) && ((R = this.map) != null && R.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((x = this.map) == null || x.moveLayer((w = this.viewport) == null ? void 0 : w.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
9400
9399
|
},
|
|
9401
|
-
handleParticle(
|
|
9402
|
-
this.particleFactor =
|
|
9400
|
+
handleParticle(z) {
|
|
9401
|
+
this.particleFactor = z, this.weatherLayers[z.key] && (this.weatherLayers[z.key].particle = z.particle), this.activeWeatherLayers.map((O) => {
|
|
9403
9402
|
var p;
|
|
9404
|
-
return O.key ===
|
|
9403
|
+
return O.key === z.key ? O.particle = z.particle : (p = Object.keys(O)) != null && p.some((o) => o === "particle") && (O.particle = !1), O;
|
|
9405
9404
|
});
|
|
9406
9405
|
let M = localStorage.getItem("activeWeatherLayersCache");
|
|
9407
|
-
const
|
|
9408
|
-
|
|
9406
|
+
const b = JSON.parse(M) || [];
|
|
9407
|
+
b == null || b.forEach((O) => {
|
|
9409
9408
|
var p;
|
|
9410
|
-
O.key ===
|
|
9411
|
-
}), localStorage.setItem("activeWeatherLayersCache", JSON.stringify(
|
|
9409
|
+
O.key === z.key ? O.particle = z.particle : (p = Object.keys(O)) != null && p.some((o) => o === "particle") && (O.particle = !1);
|
|
9410
|
+
}), localStorage.setItem("activeWeatherLayersCache", JSON.stringify(b)), console.log(999, "handleParticle"), this.fetchWeatherLayers({ tropicals: !1 });
|
|
9412
9411
|
},
|
|
9413
9412
|
handleToggleVersion() {
|
|
9414
9413
|
this.$emit("toggleVersion", Math.random());
|
|
@@ -9419,229 +9418,228 @@ const Dz = {
|
|
|
9419
9418
|
ref: "mapGlHome",
|
|
9420
9419
|
className: "map-gl-home"
|
|
9421
9420
|
};
|
|
9422
|
-
function Sz(
|
|
9423
|
-
var r0, d0, B0, s0, S, b0,
|
|
9421
|
+
function Sz(z, M, b, O, p, o) {
|
|
9422
|
+
var r0, d0, B0, s0, S, b0, t0, I, M0, W0, N, y0, g0, t, f, u, B, C, D, K, k, j, E0, x0, I0, D0, P0;
|
|
9424
9423
|
const A = P("IdmGlLayer"), a = P("IdmENC"), q = P("IdmWorld12nm"), i = P("IdmSigWave"), e = P("IdmSwell"), r = P("IdmPrmsl"), s = P("IdmIceberg"), n = P("IdmTropicals"), m = P("IdmCurrents"), L = P("IdmCurrentParticle"), d = P("IdmWindBarb"), h = P("IdmWindParticle"), R = P("IdmPrecip3h"), w = P("IdmVisibility"), x = P("IdmWaterTemp"), X = P("IdmTemp"), _ = P("IdmArctic"), V = P("IdmWarZone"), $ = P("IdmGmdssArea"), z0 = P("IdmEcaZone"), p0 = P("IdmAlertZone"), q0 = P("IdmPort"), L0 = P("IdmLoadLine"), h0 = P("IdmTimezone"), i0 = P("IdmVRA"), l0 = P("IdmSpecialArea"), O0 = P("IdmTerminator"), R0 = P("IdmLatLng"), m0 = P("IdmMeasure"), f0 = P("IdmPoint");
|
|
9425
|
-
return
|
|
9424
|
+
return b.map ? (W(), l("div", Pz, [
|
|
9426
9425
|
E(A, H({
|
|
9427
9426
|
ref: "layer",
|
|
9428
|
-
map:
|
|
9429
|
-
"toggle-version":
|
|
9427
|
+
map: b.map,
|
|
9428
|
+
"toggle-version": b.toggleVersion,
|
|
9430
9429
|
"map-projection": p.mapProjection,
|
|
9431
9430
|
showWindFeather: p.showWindFeather,
|
|
9432
9431
|
showWindParticle: p.showWindParticle,
|
|
9433
9432
|
showCurrentIsoband: p.showCurrentIsoband,
|
|
9434
9433
|
showCurrentParticle: p.showCurrentParticle,
|
|
9435
|
-
token:
|
|
9434
|
+
token: b.token,
|
|
9436
9435
|
gateway: p.gateway
|
|
9437
|
-
},
|
|
9438
|
-
forecastModel:
|
|
9436
|
+
}, z.$attrs, {
|
|
9437
|
+
forecastModel: b.forecastModel,
|
|
9439
9438
|
onWeather: o.handleWeatherLayerChange,
|
|
9440
9439
|
onOther: o.handleOtherLayerChange,
|
|
9441
|
-
onToggleWindParticle: M[0] || (M[0] = (
|
|
9442
|
-
p.showWindParticle =
|
|
9443
|
-
}),
|
|
9444
|
-
onToggleWindFeather: M[1] || (M[1] = (t0) => p.showWindFeather = t0),
|
|
9445
|
-
onToggleCurrentParticle: M[2] || (M[2] = (t0) => {
|
|
9446
|
-
p.showCurrentParticle = t0, p.currentParticeVersion = Math.random();
|
|
9440
|
+
onToggleWindParticle: M[0] || (M[0] = (A0) => {
|
|
9441
|
+
p.showWindParticle = A0;
|
|
9447
9442
|
}),
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9443
|
+
onToggleWindFeather: M[1] || (M[1] = (A0) => p.showWindFeather = A0),
|
|
9444
|
+
onToggleCurrentParticle: M[2] || (M[2] = (A0) => p.showCurrentParticle = A0),
|
|
9445
|
+
onToggleCurrentIsoband: M[3] || (M[3] = (A0) => p.showCurrentIsoband = A0),
|
|
9446
|
+
onToggleParticeVersion: M[4] || (M[4] = (A0) => p.toggleParticeVersion = Math.random()),
|
|
9447
|
+
onCoordinate: M[5] || (M[5] = (A0) => p.showCoord = A0),
|
|
9448
|
+
onMeasure: M[6] || (M[6] = (A0) => p.showMeasure = A0),
|
|
9449
|
+
onPoint: M[7] || (M[7] = (A0) => p.showPoint = A0),
|
|
9452
9450
|
on3d: o.handle3dToggle,
|
|
9453
9451
|
onHandleToggleVersion: o.handleToggleVersion
|
|
9454
9452
|
}), null, 16, ["map", "toggle-version", "map-projection", "showWindFeather", "showWindParticle", "showCurrentIsoband", "showCurrentParticle", "token", "gateway", "forecastModel", "onWeather", "onOther", "on3d", "onHandleToggleVersion"]),
|
|
9455
9453
|
E(a, H({
|
|
9456
|
-
map:
|
|
9457
|
-
token:
|
|
9454
|
+
map: b.map,
|
|
9455
|
+
token: b.token,
|
|
9458
9456
|
enabled: (r0 = p.otherLayers) == null ? void 0 : r0.enc,
|
|
9459
|
-
"toggle-version":
|
|
9460
|
-
},
|
|
9461
|
-
onEnc: M[
|
|
9457
|
+
"toggle-version": b.toggleVersion
|
|
9458
|
+
}, z.$attrs, {
|
|
9459
|
+
onEnc: M[8] || (M[8] = (A0) => p.enc = A0)
|
|
9462
9460
|
}), null, 16, ["map", "token", "enabled", "toggle-version"]),
|
|
9463
9461
|
E(q, H({
|
|
9464
|
-
map:
|
|
9465
|
-
token:
|
|
9462
|
+
map: b.map,
|
|
9463
|
+
token: b.token,
|
|
9466
9464
|
"weather-layers": p.weatherLayers,
|
|
9467
9465
|
enabled: (d0 = p.otherLayers) == null ? void 0 : d0.world12nm
|
|
9468
|
-
},
|
|
9466
|
+
}, z.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
9469
9467
|
E(i, H({
|
|
9470
|
-
map:
|
|
9468
|
+
map: b.map,
|
|
9471
9469
|
"sig-wave": (B0 = p.weatherLayers) == null ? void 0 : B0["sig-wave-height"],
|
|
9472
|
-
"before-layer":
|
|
9470
|
+
"before-layer": b.beforeLayer,
|
|
9473
9471
|
activeWeatherLayers: p.activeWeatherLayers
|
|
9474
|
-
},
|
|
9472
|
+
}, z.$attrs), null, 16, ["map", "sig-wave", "before-layer", "activeWeatherLayers"]),
|
|
9475
9473
|
E(e, H({
|
|
9476
|
-
map:
|
|
9474
|
+
map: b.map,
|
|
9477
9475
|
swell: (s0 = p.weatherLayers) == null ? void 0 : s0.swell,
|
|
9478
|
-
"before-layer":
|
|
9476
|
+
"before-layer": b.beforeLayer,
|
|
9479
9477
|
activeWeatherLayers: p.activeWeatherLayers
|
|
9480
|
-
},
|
|
9478
|
+
}, z.$attrs), null, 16, ["map", "swell", "before-layer", "activeWeatherLayers"]),
|
|
9481
9479
|
E(r, H({
|
|
9482
|
-
map:
|
|
9480
|
+
map: b.map,
|
|
9483
9481
|
prmsl: (S = p.weatherLayers) == null ? void 0 : S.prmsl,
|
|
9484
|
-
"before-layer":
|
|
9482
|
+
"before-layer": b.beforeLayer,
|
|
9485
9483
|
"active-weather-layers": p.activeWeatherLayers
|
|
9486
|
-
},
|
|
9484
|
+
}, z.$attrs), null, 16, ["map", "prmsl", "before-layer", "active-weather-layers"]),
|
|
9487
9485
|
E(s, H({
|
|
9488
|
-
map:
|
|
9486
|
+
map: b.map,
|
|
9489
9487
|
iceberg: (b0 = p.weatherLayers) == null ? void 0 : b0.iceberg,
|
|
9490
|
-
"before-layer":
|
|
9491
|
-
},
|
|
9488
|
+
"before-layer": b.beforeLayer
|
|
9489
|
+
}, z.$attrs), null, 16, ["map", "iceberg", "before-layer"]),
|
|
9492
9490
|
E(n, H({
|
|
9493
|
-
map:
|
|
9494
|
-
date:
|
|
9495
|
-
tropicals: (
|
|
9496
|
-
"before-layer":
|
|
9497
|
-
},
|
|
9491
|
+
map: b.map,
|
|
9492
|
+
date: b.ts,
|
|
9493
|
+
tropicals: (t0 = p.weatherLayers) == null ? void 0 : t0.tropicals,
|
|
9494
|
+
"before-layer": b.beforeLayer
|
|
9495
|
+
}, z.$attrs), null, 16, ["map", "date", "tropicals", "before-layer"]),
|
|
9498
9496
|
E(m, H({
|
|
9499
|
-
map:
|
|
9497
|
+
map: b.map,
|
|
9500
9498
|
"map-projection": p.mapProjection,
|
|
9501
9499
|
current: (I = p.weatherLayers) == null ? void 0 : I.current,
|
|
9502
|
-
"before-layer":
|
|
9500
|
+
"before-layer": b.beforeLayer,
|
|
9503
9501
|
showCurrentIsoband: p.showCurrentIsoband,
|
|
9504
9502
|
showCurrentParticle: p.showCurrentParticle,
|
|
9505
|
-
|
|
9503
|
+
toggleParticeVersion: p.toggleParticeVersion,
|
|
9506
9504
|
"margin-bottom": p.activeWindLayer ? p.showRampColor ? "84px" : "56px" : p.showRampColor ? "56px" : "30px",
|
|
9507
|
-
"toggle-version":
|
|
9505
|
+
"toggle-version": b.toggleVersion,
|
|
9508
9506
|
"weather-layers": p.weatherLayers
|
|
9509
|
-
},
|
|
9507
|
+
}, z.$attrs, {
|
|
9510
9508
|
onParticle: o.handleParticle,
|
|
9511
9509
|
onHandleToggleVersion: o.handleToggleVersion
|
|
9512
|
-
}), null, 16, ["map", "map-projection", "current", "before-layer", "showCurrentIsoband", "showCurrentParticle", "
|
|
9510
|
+
}), null, 16, ["map", "map-projection", "current", "before-layer", "showCurrentIsoband", "showCurrentParticle", "toggleParticeVersion", "margin-bottom", "toggle-version", "weather-layers", "onParticle", "onHandleToggleVersion"]),
|
|
9513
9511
|
E(L, H({
|
|
9514
9512
|
viewport: p.viewport,
|
|
9515
9513
|
factor: (M0 = p.weatherLayers) == null ? void 0 : M0["current-particle"],
|
|
9516
|
-
"before-layer":
|
|
9517
|
-
"toggle-version":
|
|
9518
|
-
},
|
|
9514
|
+
"before-layer": b.beforeLayer,
|
|
9515
|
+
"toggle-version": b.toggleVersion
|
|
9516
|
+
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9519
9517
|
E(d, H({
|
|
9520
9518
|
ref: "windBarb",
|
|
9521
|
-
map:
|
|
9519
|
+
map: b.map,
|
|
9522
9520
|
"map-projection": p.mapProjection,
|
|
9523
9521
|
wind: (W0 = p.weatherLayers) == null ? void 0 : W0.wind,
|
|
9524
9522
|
current: (N = p.weatherLayers) == null ? void 0 : N.current,
|
|
9525
|
-
"before-layer":
|
|
9523
|
+
"before-layer": b.beforeLayer,
|
|
9526
9524
|
"margin-bottom": p.showRampColor ? "56px" : "30px",
|
|
9527
9525
|
showWindFeather: p.showWindFeather,
|
|
9528
9526
|
showWindParticle: p.showWindParticle,
|
|
9529
|
-
|
|
9530
|
-
},
|
|
9531
|
-
"toggle-version":
|
|
9527
|
+
toggleParticeVersion: p.toggleParticeVersion
|
|
9528
|
+
}, z.$attrs, {
|
|
9529
|
+
"toggle-version": b.toggleVersion,
|
|
9532
9530
|
"weather-layers": p.weatherLayers,
|
|
9533
9531
|
onParticle: o.handleParticle
|
|
9534
|
-
}), null, 16, ["map", "map-projection", "wind", "current", "before-layer", "margin-bottom", "showWindFeather", "showWindParticle", "
|
|
9532
|
+
}), null, 16, ["map", "map-projection", "wind", "current", "before-layer", "margin-bottom", "showWindFeather", "showWindParticle", "toggleParticeVersion", "toggle-version", "weather-layers", "onParticle"]),
|
|
9535
9533
|
E(h, H({
|
|
9536
9534
|
viewport: p.viewport,
|
|
9537
9535
|
factor: (y0 = p.weatherLayers) == null ? void 0 : y0["wind-particle"],
|
|
9538
|
-
"before-layer":
|
|
9539
|
-
"toggle-version":
|
|
9540
|
-
},
|
|
9536
|
+
"before-layer": b.beforeLayer,
|
|
9537
|
+
"toggle-version": b.toggleVersion
|
|
9538
|
+
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9541
9539
|
E(R, H({
|
|
9542
9540
|
viewport: p.viewport,
|
|
9543
9541
|
factor: (g0 = p.weatherLayers) == null ? void 0 : g0.precip3h,
|
|
9544
|
-
"before-layer":
|
|
9545
|
-
"toggle-version":
|
|
9546
|
-
},
|
|
9542
|
+
"before-layer": b.beforeLayer,
|
|
9543
|
+
"toggle-version": b.toggleVersion
|
|
9544
|
+
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9547
9545
|
E(w, H({
|
|
9548
9546
|
viewport: p.viewport,
|
|
9549
9547
|
factor: (t = p.weatherLayers) == null ? void 0 : t.visibility,
|
|
9550
|
-
"before-layer":
|
|
9551
|
-
"toggle-version":
|
|
9552
|
-
},
|
|
9548
|
+
"before-layer": b.beforeLayer,
|
|
9549
|
+
"toggle-version": b.toggleVersion
|
|
9550
|
+
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9553
9551
|
E(x, H({
|
|
9554
9552
|
viewport: p.viewport,
|
|
9555
9553
|
factor: (f = p.weatherLayers) == null ? void 0 : f["water-temp"],
|
|
9556
|
-
"before-layer":
|
|
9557
|
-
"toggle-version":
|
|
9558
|
-
},
|
|
9554
|
+
"before-layer": b.beforeLayer,
|
|
9555
|
+
"toggle-version": b.toggleVersion
|
|
9556
|
+
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9559
9557
|
E(X, H({
|
|
9560
9558
|
viewport: p.viewport,
|
|
9561
9559
|
factor: (u = p.weatherLayers) == null ? void 0 : u.temp,
|
|
9562
|
-
"before-layer":
|
|
9563
|
-
"toggle-version":
|
|
9564
|
-
},
|
|
9560
|
+
"before-layer": b.beforeLayer,
|
|
9561
|
+
"toggle-version": b.toggleVersion
|
|
9562
|
+
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9565
9563
|
E(_, H({
|
|
9566
9564
|
viewport: p.viewport,
|
|
9567
9565
|
factor: (B = p.weatherLayers) == null ? void 0 : B.arctic,
|
|
9568
|
-
"before-layer":
|
|
9569
|
-
"toggle-version":
|
|
9570
|
-
},
|
|
9566
|
+
"before-layer": b.beforeLayer,
|
|
9567
|
+
"toggle-version": b.toggleVersion
|
|
9568
|
+
}, z.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9571
9569
|
E(V, H({
|
|
9572
|
-
map:
|
|
9570
|
+
map: b.map,
|
|
9573
9571
|
zone: (C = p.otherLayers) == null ? void 0 : C["war-zones"],
|
|
9574
|
-
"before-layer":
|
|
9575
|
-
},
|
|
9572
|
+
"before-layer": b.beforeLayer
|
|
9573
|
+
}, z.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
9576
9574
|
E($, H({
|
|
9577
|
-
map:
|
|
9575
|
+
map: b.map,
|
|
9578
9576
|
area: (D = p.otherLayers) == null ? void 0 : D["gmdss-areas"],
|
|
9579
|
-
"before-layer":
|
|
9580
|
-
},
|
|
9577
|
+
"before-layer": b.beforeLayer
|
|
9578
|
+
}, z.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
9581
9579
|
E(z0, H({
|
|
9582
|
-
map:
|
|
9580
|
+
map: b.map,
|
|
9583
9581
|
zone: (K = p.otherLayers) == null ? void 0 : K["eca-zones"],
|
|
9584
|
-
"before-layer":
|
|
9585
|
-
},
|
|
9582
|
+
"before-layer": b.beforeLayer
|
|
9583
|
+
}, z.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
9586
9584
|
E(p0, H({
|
|
9587
|
-
map:
|
|
9585
|
+
map: b.map,
|
|
9588
9586
|
zone: (k = p.otherLayers) == null ? void 0 : k["alert-zones"],
|
|
9589
|
-
"before-layer":
|
|
9590
|
-
},
|
|
9587
|
+
"before-layer": b.beforeLayer
|
|
9588
|
+
}, z.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
9591
9589
|
E(q0, H({
|
|
9592
|
-
map:
|
|
9590
|
+
map: b.map,
|
|
9593
9591
|
port: (j = p.otherLayers) == null ? void 0 : j.ports,
|
|
9594
|
-
"before-layer":
|
|
9595
|
-
forecastModel:
|
|
9596
|
-
},
|
|
9592
|
+
"before-layer": b.beforeLayer,
|
|
9593
|
+
forecastModel: b.forecastModel
|
|
9594
|
+
}, z.$attrs), null, 16, ["map", "port", "before-layer", "forecastModel"]),
|
|
9597
9595
|
E(L0, H({
|
|
9598
|
-
map:
|
|
9596
|
+
map: b.map,
|
|
9599
9597
|
line: (E0 = p.otherLayers) == null ? void 0 : E0["load-lines"],
|
|
9600
|
-
"before-layer":
|
|
9601
|
-
},
|
|
9598
|
+
"before-layer": b.beforeLayer
|
|
9599
|
+
}, z.$attrs), null, 16, ["map", "line", "before-layer"]),
|
|
9602
9600
|
E(h0, H({
|
|
9603
|
-
map:
|
|
9601
|
+
map: b.map,
|
|
9604
9602
|
zone: (x0 = p.otherLayers) == null ? void 0 : x0["time-zones"],
|
|
9605
|
-
"before-layer":
|
|
9606
|
-
},
|
|
9603
|
+
"before-layer": b.beforeLayer
|
|
9604
|
+
}, z.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
9607
9605
|
E(i0, H({
|
|
9608
|
-
map:
|
|
9606
|
+
map: b.map,
|
|
9609
9607
|
area: (I0 = p.otherLayers) == null ? void 0 : I0["voluntary-reporting-area"],
|
|
9610
|
-
"before-layer":
|
|
9611
|
-
},
|
|
9608
|
+
"before-layer": b.beforeLayer
|
|
9609
|
+
}, z.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
9612
9610
|
E(l0, H({
|
|
9613
|
-
map:
|
|
9611
|
+
map: b.map,
|
|
9614
9612
|
area: (D0 = p.otherLayers) == null ? void 0 : D0["special-area"],
|
|
9615
|
-
"before-layer":
|
|
9616
|
-
},
|
|
9613
|
+
"before-layer": b.beforeLayer
|
|
9614
|
+
}, z.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
9617
9615
|
E(O0, H({
|
|
9618
|
-
map:
|
|
9616
|
+
map: b.map,
|
|
9619
9617
|
area: (P0 = p.otherLayers) == null ? void 0 : P0["day-night"]
|
|
9620
|
-
},
|
|
9618
|
+
}, z.$attrs), null, 16, ["map", "area"]),
|
|
9621
9619
|
E(R0, H({
|
|
9622
|
-
map:
|
|
9620
|
+
map: b.map,
|
|
9623
9621
|
show: p.showCoord,
|
|
9624
|
-
"toggle-version":
|
|
9625
|
-
},
|
|
9622
|
+
"toggle-version": b.toggleVersion
|
|
9623
|
+
}, z.$attrs), null, 16, ["map", "show", "toggle-version"]),
|
|
9626
9624
|
E(m0, H({
|
|
9627
|
-
map:
|
|
9625
|
+
map: b.map,
|
|
9628
9626
|
show: p.showMeasure
|
|
9629
|
-
},
|
|
9627
|
+
}, z.$attrs), null, 16, ["map", "show"]),
|
|
9630
9628
|
E(f0, H({
|
|
9631
9629
|
ref: "idmPoint",
|
|
9632
|
-
map:
|
|
9630
|
+
map: b.map,
|
|
9633
9631
|
show: p.showPoint,
|
|
9634
9632
|
meteo: p.meteo,
|
|
9635
|
-
ts:
|
|
9636
|
-
token:
|
|
9633
|
+
ts: b.ts,
|
|
9634
|
+
token: b.token,
|
|
9637
9635
|
gateway: p.gateway,
|
|
9638
|
-
forecastModel:
|
|
9639
|
-
},
|
|
9636
|
+
forecastModel: b.forecastModel
|
|
9637
|
+
}, z.$attrs), null, 16, ["map", "show", "meteo", "ts", "token", "gateway", "forecastModel"])
|
|
9640
9638
|
], 512)) : U("", !0);
|
|
9641
9639
|
}
|
|
9642
9640
|
const kz = /* @__PURE__ */ Q(Dz, [["render", Sz]]), Yz = {
|
|
9643
|
-
install(
|
|
9644
|
-
|
|
9641
|
+
install(z) {
|
|
9642
|
+
z.component("MapboxGL", kz), z.component("TropicalGL", a1), z.component("LatLngGL", q1);
|
|
9645
9643
|
}
|
|
9646
9644
|
};
|
|
9647
9645
|
export {
|