@idmwx/idmui-gl3 5.5.2 → 5.5.4
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 +383 -374
- package/dist/index.umd.cjs +4 -4
- package/dist/mapbox/src/components/layer.vue.d.ts +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { LayerHelper as Ke, CompanyHelper as Xe } from "@idm-plugin/tag";
|
|
|
5
5
|
import F from "moment";
|
|
6
6
|
import le from "axios";
|
|
7
7
|
import Ge from "moment-timezone";
|
|
8
|
-
import { resolveComponent as z, openBlock as g, createElementBlock as
|
|
8
|
+
import { resolveComponent as z, openBlock as g, createElementBlock as f, createElementVNode as s, normalizeStyle as J, createVNode as k, withCtx as ae, normalizeClass as H, Fragment as _, renderList as N, toDisplayString as B, createCommentVNode as O, createBlock as pt, createTextVNode as U, withDirectives as fe, createStaticVNode as mt, vShow as we, defineComponent as ut, withModifiers as Ue, mergeProps as S } from "vue";
|
|
9
9
|
import * as D from "@turf/turf";
|
|
10
10
|
import gt from "@mapbox/sphericalmercator";
|
|
11
11
|
import ve from "mapbox-gl";
|
|
@@ -74,20 +74,21 @@ const T = (t, e) => {
|
|
|
74
74
|
other: [...Ke.OTHER_LAYERS.filter((t) => t.enabled)]
|
|
75
75
|
},
|
|
76
76
|
activeWeatherLayers: [],
|
|
77
|
+
activeWeatherLayersCollected: [],
|
|
77
78
|
activeOtherLayers: [],
|
|
78
79
|
autoActiveCache: "autoActiveCache",
|
|
79
80
|
activeWeatherLayersCache: "activeWeatherLayersCache",
|
|
80
81
|
activeOtherLayersCache: "activeOtherLayersCache",
|
|
81
82
|
collectedLayerCache: "collectedLayerCache",
|
|
82
83
|
sourceCache: "defaultSourceCache",
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
windFeatherCollectedCache: "windFeatherCollectedCache",
|
|
85
|
+
currentIsobandCollectedCache: "currentIsobandCollectedCache",
|
|
85
86
|
showCoord: !1,
|
|
86
87
|
showMeasure: !1,
|
|
87
88
|
showPoint: !1,
|
|
88
89
|
show3d: !1,
|
|
89
90
|
version: {
|
|
90
|
-
v: "0.0
|
|
91
|
+
v: "0.1.0",
|
|
91
92
|
k: "glCacheVersion"
|
|
92
93
|
},
|
|
93
94
|
source: "GFS",
|
|
@@ -137,6 +138,11 @@ const T = (t, e) => {
|
|
|
137
138
|
t && t !== e && this.$emit("forecastModel", this.source), t && e && t !== e && this.handleConfirm();
|
|
138
139
|
}
|
|
139
140
|
},
|
|
141
|
+
activeWeatherLayers: {
|
|
142
|
+
handler(t, e) {
|
|
143
|
+
this.autoActive && (this.activeWeatherLayersCollected = this.activeWeatherLayers, localStorage.setItem(this.activeWeatherLayersCache, JSON.stringify(this.activeWeatherLayers)), console.log(999999));
|
|
144
|
+
}
|
|
145
|
+
},
|
|
140
146
|
showWindParticle: {
|
|
141
147
|
handler(t, e) {
|
|
142
148
|
this.autoActive && (this.showWindParticleCollected = this.showWindParticle);
|
|
@@ -144,7 +150,7 @@ const T = (t, e) => {
|
|
|
144
150
|
},
|
|
145
151
|
showWindFeather: {
|
|
146
152
|
handler(t, e) {
|
|
147
|
-
this.autoActive && (this.showWindFeatherCollected = this.showWindFeather);
|
|
153
|
+
this.autoActive && (this.showWindFeatherCollected = this.showWindFeather, localStorage.setItem(this.windFeatherCollectedCache, this.showWindFeatherCollected));
|
|
148
154
|
}
|
|
149
155
|
},
|
|
150
156
|
showCurrentParticle: {
|
|
@@ -154,7 +160,7 @@ const T = (t, e) => {
|
|
|
154
160
|
},
|
|
155
161
|
showCurrentIsoband: {
|
|
156
162
|
handler(t, e) {
|
|
157
|
-
this.autoActive && (this.showCurrentIsobandCollected = this.showCurrentIsoband);
|
|
163
|
+
this.autoActive && (this.showCurrentIsobandCollected = this.showCurrentIsoband, localStorage.setItem(this.currentIsobandCollectedCache, this.showCurrentIsobandCollected));
|
|
158
164
|
}
|
|
159
165
|
}
|
|
160
166
|
},
|
|
@@ -174,7 +180,7 @@ const T = (t, e) => {
|
|
|
174
180
|
},
|
|
175
181
|
fetchCache() {
|
|
176
182
|
const t = localStorage.getItem(this.version.k);
|
|
177
|
-
this.version.v !== t && (localStorage.removeItem(this.activeWeatherLayersCache), localStorage.removeItem(this.collectedLayerCache), localStorage.removeItem(this.activeOtherLayersCache), localStorage.removeItem(this.
|
|
183
|
+
this.version.v !== t && (localStorage.removeItem(this.autoActiveCache), localStorage.removeItem(this.activeWeatherLayersCache), localStorage.removeItem(this.collectedLayerCache), localStorage.removeItem(this.activeOtherLayersCache), localStorage.removeItem(this.windFeatherCollectedCache), localStorage.removeItem(this.currentIsobandCollectedCache), localStorage.setItem(this.version.k, this.version.v));
|
|
178
184
|
let e = localStorage.getItem(this.autoActiveCache);
|
|
179
185
|
this.autoActive = e !== "false", e = localStorage.getItem(this.collectedLayerCache);
|
|
180
186
|
let a = JSON.parse(
|
|
@@ -188,12 +194,15 @@ const T = (t, e) => {
|
|
|
188
194
|
{ weight: 4096, name: "Pressure", key: "prmsl", enabled: !0, type: "json" },
|
|
189
195
|
{ weight: 256, name: "Tropicals", key: "tropicals", enabled: !0, type: "json" }
|
|
190
196
|
]
|
|
191
|
-
)), e = localStorage.getItem(this.activeWeatherLayersCache), a = JSON.parse(e), this.autoActive
|
|
197
|
+
)), e = localStorage.getItem(this.activeWeatherLayersCache), a = JSON.parse(e), this.autoActive ? this.activeWeatherLayers = [...a] : this.activeWeatherLayersCollected = [...a], a.some((r) => r.key === "wind" && r.particle) && (this.$emit("toggleWindParticle", !0), this.showWindParticleCollected = !0), a.some((r) => r.key === "current" && r.particle) && (this.$emit("toggleCurrentParticle", !0), this.showCurrentParticleCollected = !0), this.showWindFeatherCollected = JSON.parse(localStorage.getItem(this.windFeatherCollectedCache)), this.showCurrentIsobandCollected = JSON.parse(localStorage.getItem(this.currentIsobandCollectedCache)), this.autoActive && (this.$emit("toggleWindFeather", this.showWindFeatherCollected), this.$emit("toggleCurrentIsoband", this.showCurrentIsobandCollected)), a.some((r) => r.key === "wind" && !r.particle && !this.showWindFeatherCollected) && (a = a.filter((r) => r.key !== "wind")), a.some((r) => r.key === "current" && !r.particle && !this.showCurrentIsobandCollected) && (a = a.filter((r) => r.key !== "current")), e = localStorage.getItem(this.activeOtherLayersCache), a = JSON.parse(e || '[{"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 = a, e = localStorage.getItem(this.sourceCache), this.source = e ? e === "CMEMS" ? "ECMWF" : e : this.source, this.$emit("forecastModel", this.source);
|
|
192
198
|
},
|
|
193
199
|
handleConfirm() {
|
|
194
|
-
var
|
|
195
|
-
|
|
196
|
-
|
|
200
|
+
var t;
|
|
201
|
+
if (this.autoActive) {
|
|
202
|
+
const e = (t = this.sourceList.find((a) => a.name === this.source)) == null ? void 0 : t.code;
|
|
203
|
+
this.$emit("weather", JSON.parse(localStorage.getItem(this.activeWeatherLayersCache)), e);
|
|
204
|
+
}
|
|
205
|
+
this.$emit("other", this.activeOtherLayers), localStorage.setItem(this.autoActiveCache, this.autoActive), localStorage.setItem(this.sourceCache, this.source);
|
|
197
206
|
},
|
|
198
207
|
handleWeatherLayerPick(t) {
|
|
199
208
|
var a;
|
|
@@ -207,23 +216,23 @@ const T = (t, e) => {
|
|
|
207
216
|
r.key === "wind" && this.showWindFeather && (r.particle = !1);
|
|
208
217
|
}), this.activeWeatherLayers = this.activeWeatherLayers.filter((r) => r.type === "json" && !(["wind", "current"].includes(r.key) && r.particle))), this.activeWeatherLayers.push(t));
|
|
209
218
|
const e = (a = this.sourceList.find((r) => r.name === this.source)) == null ? void 0 : a.code;
|
|
210
|
-
this.$emit("weather", this.activeWeatherLayers, e)
|
|
219
|
+
this.$emit("weather", this.activeWeatherLayers, e);
|
|
211
220
|
},
|
|
212
221
|
handleWeatherLayerCollect(t) {
|
|
213
222
|
var e;
|
|
214
223
|
!t.collected && ((e = this.layers.weather.filter((a) => a.collected)) == null ? void 0 : e.length) >= 6 && (this.layers.weather.filter((a) => a.collected)[0].collected = !1), t.collected = !t.collected, localStorage.setItem(this.collectedLayerCache, JSON.stringify(this.layers.weather)), this.$emit("handleToggleVersion");
|
|
215
224
|
},
|
|
216
225
|
handleToggleWindParticle() {
|
|
217
|
-
!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((t) => t.key !== "current")
|
|
226
|
+
!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((t) => t.key !== "current"))), this.$emit("toggleWindParticle", !this.showWindParticle), this.$emit("toggleParticeVersion"));
|
|
218
227
|
},
|
|
219
228
|
handleToggleWindFeather() {
|
|
220
|
-
this.showWindFeather && !this.showWindParticle && this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 }), this.$emit("toggleWindFeather", !this.showWindFeather)
|
|
229
|
+
this.showWindFeather && !this.showWindParticle && this.handleWeatherLayerPick({ weight: 1, name: "Wind", key: "wind", enabled: !0, type: "json", particle: !0 }), this.$emit("toggleWindFeather", !this.showWindFeather);
|
|
221
230
|
},
|
|
222
231
|
handleToggleCurrentParticle() {
|
|
223
|
-
!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((t) => t.key !== "wind")
|
|
232
|
+
!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((t) => t.key !== "wind"))), this.$emit("toggleCurrentParticle", !this.showCurrentParticle), this.$emit("toggleParticeVersion"));
|
|
224
233
|
},
|
|
225
234
|
handleToggleCurrentIsoband() {
|
|
226
|
-
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)
|
|
235
|
+
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);
|
|
227
236
|
},
|
|
228
237
|
handleOtherLayerPick(t) {
|
|
229
238
|
this.activeOtherLayers.some((e) => e.key === t.key) ? this.activeOtherLayers = this.activeOtherLayers.filter((e) => e.key !== t.key) : t.enabled && this.activeOtherLayers.push(t), localStorage.setItem(this.activeOtherLayersCache, JSON.stringify(this.activeOtherLayers)), this.$emit("other", this.activeOtherLayers);
|
|
@@ -234,7 +243,7 @@ const T = (t, e) => {
|
|
|
234
243
|
toggleAutoActive() {
|
|
235
244
|
var e;
|
|
236
245
|
const t = (e = this.sourceList.find((a) => a.name === this.source)) == null ? void 0 : e.code;
|
|
237
|
-
this.autoActive = !this.autoActive, localStorage.setItem(this.autoActiveCache, this.autoActive), this.autoActive ? this.$emit("weather", this.
|
|
246
|
+
this.autoActive = !this.autoActive, localStorage.setItem(this.autoActiveCache, this.autoActive), this.autoActive ? (this.$emit("weather", this.activeWeatherLayersCollected, t), this.$emit("toggleWindFeather", localStorage.getItem(this.windFeatherCollectedCache) === "true"), this.$emit("toggleCurrentIsoband", localStorage.getItem(this.currentIsobandCollectedCache) === "true")) : (this.$emit("weather", [], t), this.$emit("toggleWindFeather", !1), this.$emit("toggleCurrentIsoband", !1));
|
|
238
247
|
},
|
|
239
248
|
handleCoordToggle() {
|
|
240
249
|
this.showCoord = !this.showCoord, this.$emit("coordinate", this.showCoord);
|
|
@@ -293,14 +302,14 @@ const T = (t, e) => {
|
|
|
293
302
|
class: "radio-tip"
|
|
294
303
|
};
|
|
295
304
|
function $t(t, e, a, r, i, o) {
|
|
296
|
-
const
|
|
297
|
-
return g(),
|
|
305
|
+
const l = z("ElTooltip"), c = z("ElRadio"), h = z("ElRadioGroup"), p = z("ElScrollbar");
|
|
306
|
+
return g(), f("div", yt, [
|
|
298
307
|
s("div", {
|
|
299
308
|
class: "menu-bar-box",
|
|
300
309
|
style: J({ top: a.top + 10 + "px", right: i.right + "px" })
|
|
301
310
|
}, [
|
|
302
311
|
s("div", ft, [
|
|
303
|
-
k(
|
|
312
|
+
k(l, {
|
|
304
313
|
placement: "left",
|
|
305
314
|
effect: "light",
|
|
306
315
|
content: "Menu",
|
|
@@ -309,7 +318,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
309
318
|
default: ae(() => [
|
|
310
319
|
s("div", {
|
|
311
320
|
class: H(a.layerToggle ? "menu-icon active" : "menu-icon"),
|
|
312
|
-
onClick: e[0] || (e[0] = (...
|
|
321
|
+
onClick: e[0] || (e[0] = (...n) => o.handleMenuToggle && o.handleMenuToggle(...n))
|
|
313
322
|
}, e[17] || (e[17] = [
|
|
314
323
|
s("span", { class: "iconfont" }, "", -1)
|
|
315
324
|
]), 2)
|
|
@@ -323,7 +332,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
323
332
|
style: J({ top: a.top + 160 + "px", right: i.right + "px" })
|
|
324
333
|
}, [
|
|
325
334
|
s("div", wt, [
|
|
326
|
-
k(
|
|
335
|
+
k(l, {
|
|
327
336
|
placement: "left",
|
|
328
337
|
effect: "light",
|
|
329
338
|
content: "Measure",
|
|
@@ -332,14 +341,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
332
341
|
default: ae(() => [
|
|
333
342
|
s("div", {
|
|
334
343
|
class: H(i.showMeasure ? "menu-icon active" : "menu-icon"),
|
|
335
|
-
onClick: e[1] || (e[1] = (...
|
|
344
|
+
onClick: e[1] || (e[1] = (...n) => o.handleMeasureToggle && o.handleMeasureToggle(...n))
|
|
336
345
|
}, e[18] || (e[18] = [
|
|
337
346
|
s("span", { class: "iconfont" }, "", -1)
|
|
338
347
|
]), 2)
|
|
339
348
|
]),
|
|
340
349
|
_: 1
|
|
341
350
|
}),
|
|
342
|
-
k(
|
|
351
|
+
k(l, {
|
|
343
352
|
placement: "left",
|
|
344
353
|
effect: "light",
|
|
345
354
|
content: "Point Meteo",
|
|
@@ -348,14 +357,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
348
357
|
default: ae(() => [
|
|
349
358
|
s("div", {
|
|
350
359
|
class: H(i.showPoint ? "menu-icon active" : "menu-icon"),
|
|
351
|
-
onClick: e[2] || (e[2] = (...
|
|
360
|
+
onClick: e[2] || (e[2] = (...n) => o.handlePointToggle && o.handlePointToggle(...n))
|
|
352
361
|
}, e[19] || (e[19] = [
|
|
353
362
|
s("span", { class: "iconfont" }, "", -1)
|
|
354
363
|
]), 2)
|
|
355
364
|
]),
|
|
356
365
|
_: 1
|
|
357
366
|
}),
|
|
358
|
-
k(
|
|
367
|
+
k(l, {
|
|
359
368
|
placement: "left",
|
|
360
369
|
effect: "light",
|
|
361
370
|
content: "Grid",
|
|
@@ -364,14 +373,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
364
373
|
default: ae(() => [
|
|
365
374
|
s("div", {
|
|
366
375
|
class: H(i.showCoord ? "menu-icon active" : "menu-icon"),
|
|
367
|
-
onClick: e[3] || (e[3] = (...
|
|
376
|
+
onClick: e[3] || (e[3] = (...n) => o.handleCoordToggle && o.handleCoordToggle(...n))
|
|
368
377
|
}, e[20] || (e[20] = [
|
|
369
378
|
s("span", { class: "iconfont" }, "", -1)
|
|
370
379
|
]), 2)
|
|
371
380
|
]),
|
|
372
381
|
_: 1
|
|
373
382
|
}),
|
|
374
|
-
k(
|
|
383
|
+
k(l, {
|
|
375
384
|
placement: "left",
|
|
376
385
|
effect: "light",
|
|
377
386
|
content: "3D",
|
|
@@ -380,7 +389,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
380
389
|
default: ae(() => [
|
|
381
390
|
s("div", {
|
|
382
391
|
class: H(i.show3d ? "menu-icon active" : "menu-icon"),
|
|
383
|
-
onClick: e[4] || (e[4] = (...
|
|
392
|
+
onClick: e[4] || (e[4] = (...n) => o.handle3DToggle && o.handle3DToggle(...n))
|
|
384
393
|
}, e[21] || (e[21] = [
|
|
385
394
|
s("span", { class: "iconfont" }, "", -1)
|
|
386
395
|
]), 2)
|
|
@@ -389,7 +398,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
389
398
|
})
|
|
390
399
|
])
|
|
391
400
|
], 4),
|
|
392
|
-
o.hasCollectedLayers ? (g(),
|
|
401
|
+
o.hasCollectedLayers ? (g(), f("div", {
|
|
393
402
|
key: 0,
|
|
394
403
|
class: "active-layers",
|
|
395
404
|
style: J({ right: i.right + "px", bottom: "100px" })
|
|
@@ -399,24 +408,24 @@ function $t(t, e, a, r, i, o) {
|
|
|
399
408
|
s("div", {
|
|
400
409
|
class: "switch flex-center",
|
|
401
410
|
style: { "font-size": "28px", "margin-right": "0" },
|
|
402
|
-
onClick: e[5] || (e[5] = (...
|
|
411
|
+
onClick: e[5] || (e[5] = (...n) => o.toggleAutoActive && o.toggleAutoActive(...n))
|
|
403
412
|
}, [
|
|
404
|
-
i.autoActive ? (g(),
|
|
413
|
+
i.autoActive ? (g(), f("i", vt, "")) : (g(), f("i", Lt, ""))
|
|
405
414
|
])
|
|
406
415
|
]),
|
|
407
|
-
(g(!0),
|
|
408
|
-
key:
|
|
409
|
-
class: H(o.computeLayerClass(
|
|
416
|
+
(g(!0), f(_, null, N(i.layers.weather.filter((n) => n.collected), (n) => (g(), f("div", {
|
|
417
|
+
key: n.key,
|
|
418
|
+
class: H(o.computeLayerClass(n, i.activeWeatherLayersCollected))
|
|
410
419
|
}, [
|
|
411
420
|
s("div", {
|
|
412
421
|
class: "checkbox",
|
|
413
|
-
onClick: (d) => o.handleWeatherLayerPick(
|
|
422
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
414
423
|
}, null, 8, Ct),
|
|
415
424
|
s("span", {
|
|
416
425
|
class: "name",
|
|
417
|
-
onClick: (d) => o.handleWeatherLayerPick(
|
|
418
|
-
}, B(
|
|
419
|
-
|
|
426
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
427
|
+
}, B(n.name), 9, xt),
|
|
428
|
+
n.key === "wind" && i.activeWeatherLayersCollected.some((d) => d.key === n.key) ? (g(), f("div", Bt, [
|
|
420
429
|
s("i", {
|
|
421
430
|
class: H(["iconfont sub-layer-icon", i.showWindParticleCollected ? "active" : ""]),
|
|
422
431
|
onClick: e[6] || (e[6] = (d) => o.handleToggleWindParticle())
|
|
@@ -426,7 +435,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
426
435
|
onClick: e[7] || (e[7] = (d) => o.handleToggleWindFeather())
|
|
427
436
|
}, "", 2)
|
|
428
437
|
])) : O("", !0),
|
|
429
|
-
|
|
438
|
+
n.key === "current" && i.activeWeatherLayersCollected.some((d) => d.key === n.key) ? (g(), f("div", It, [
|
|
430
439
|
s("i", {
|
|
431
440
|
class: H(["iconfont sub-layer-icon", i.showCurrentParticleCollected ? "active" : ""]),
|
|
432
441
|
onClick: e[8] || (e[8] = (d) => o.handleToggleCurrentParticle())
|
|
@@ -449,7 +458,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
449
458
|
e[23] || (e[23] = s("div", null, "Layers", -1)),
|
|
450
459
|
s("div", {
|
|
451
460
|
class: "iconfont close-btn",
|
|
452
|
-
onClick: e[10] || (e[10] = (...
|
|
461
|
+
onClick: e[10] || (e[10] = (...n) => o.handleMenuToggle && o.handleMenuToggle(...n))
|
|
453
462
|
}, "")
|
|
454
463
|
]),
|
|
455
464
|
k(p, { style: { flex: "1" } }, {
|
|
@@ -460,29 +469,29 @@ function $t(t, e, a, r, i, o) {
|
|
|
460
469
|
s("div", {
|
|
461
470
|
class: "switch flex-center",
|
|
462
471
|
style: { "margin-right": "0" },
|
|
463
|
-
onClick: e[11] || (e[11] = (...
|
|
472
|
+
onClick: e[11] || (e[11] = (...n) => o.toggleAutoActive && o.toggleAutoActive(...n))
|
|
464
473
|
}, [
|
|
465
|
-
i.autoActive ? (g(),
|
|
474
|
+
i.autoActive ? (g(), f("i", kt, "")) : (g(), f("i", zt, ""))
|
|
466
475
|
])
|
|
467
476
|
]),
|
|
468
477
|
s("div", Mt, [
|
|
469
|
-
(g(!0),
|
|
470
|
-
key:
|
|
478
|
+
(g(!0), f(_, null, N(i.layers.weather, (n) => (g(), f(_, {
|
|
479
|
+
key: n.key
|
|
471
480
|
}, [
|
|
472
|
-
|
|
481
|
+
n.hide ? O("", !0) : (g(), f("div", {
|
|
473
482
|
key: 0,
|
|
474
|
-
class: H(o.computeLayerClass(
|
|
483
|
+
class: H(o.computeLayerClass(n, i.activeWeatherLayersCollected))
|
|
475
484
|
}, [
|
|
476
485
|
s("div", Tt, [
|
|
477
486
|
s("div", {
|
|
478
487
|
class: "checkbox",
|
|
479
|
-
onClick: (d) => o.handleWeatherLayerPick(
|
|
488
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
480
489
|
}, null, 8, Qt),
|
|
481
490
|
s("span", {
|
|
482
491
|
class: "name",
|
|
483
|
-
onClick: (d) => o.handleWeatherLayerPick(
|
|
484
|
-
}, B(
|
|
485
|
-
|
|
492
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
493
|
+
}, B(n.name), 9, St),
|
|
494
|
+
n.key === "wind" && i.activeWeatherLayersCollected.some((d) => d.key === n.key) ? (g(), f("div", _t, [
|
|
486
495
|
s("i", {
|
|
487
496
|
class: H(["iconfont sub-layer-icon", i.showWindParticleCollected ? "active" : ""]),
|
|
488
497
|
onClick: e[12] || (e[12] = (d) => o.handleToggleWindParticle())
|
|
@@ -492,7 +501,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
492
501
|
onClick: e[13] || (e[13] = (d) => o.handleToggleWindFeather())
|
|
493
502
|
}, "", 2)
|
|
494
503
|
])) : O("", !0),
|
|
495
|
-
|
|
504
|
+
n.key === "current" && i.activeWeatherLayersCollected.some((d) => d.key === n.key) ? (g(), f("div", Ht, [
|
|
496
505
|
s("i", {
|
|
497
506
|
class: H(["iconfont sub-layer-icon", i.showCurrentParticleCollected ? "active" : ""]),
|
|
498
507
|
onClick: e[14] || (e[14] = (d) => o.handleToggleCurrentParticle())
|
|
@@ -504,9 +513,9 @@ function $t(t, e, a, r, i, o) {
|
|
|
504
513
|
])) : O("", !0)
|
|
505
514
|
]),
|
|
506
515
|
s("div", {
|
|
507
|
-
onClick: (d) => o.handleWeatherLayerCollect(
|
|
516
|
+
onClick: (d) => o.handleWeatherLayerCollect(n)
|
|
508
517
|
}, [
|
|
509
|
-
|
|
518
|
+
n.collected ? (g(), f("i", Nt, "")) : (g(), f("i", jt, ""))
|
|
510
519
|
], 8, Ot)
|
|
511
520
|
], 2))
|
|
512
521
|
], 64))), 128)),
|
|
@@ -522,18 +531,18 @@ function $t(t, e, a, r, i, o) {
|
|
|
522
531
|
s("div", Rt, [
|
|
523
532
|
e[26] || (e[26] = s("div", { class: "layers-title" }, "Other Layers", -1)),
|
|
524
533
|
s("div", Ft, [
|
|
525
|
-
(g(!0),
|
|
534
|
+
(g(!0), f(_, null, N(i.layers.other, (n) => {
|
|
526
535
|
var d;
|
|
527
|
-
return g(),
|
|
528
|
-
key:
|
|
529
|
-
class: H(["layer flex-between", o.computeLayerClass(
|
|
530
|
-
onClick: (b) => o.handleOtherLayerPick(
|
|
536
|
+
return g(), f("div", {
|
|
537
|
+
key: n.key,
|
|
538
|
+
class: H(["layer flex-between", o.computeLayerClass(n, i.activeOtherLayers)]),
|
|
539
|
+
onClick: (b) => o.handleOtherLayerPick(n)
|
|
531
540
|
}, [
|
|
532
541
|
s("div", Wt, [
|
|
533
542
|
s("div", Ut, [
|
|
534
|
-
(d = o.computeLayerClass(
|
|
543
|
+
(d = o.computeLayerClass(n, i.activeOtherLayers)) != null && d.includes("active") ? (g(), f("i", Yt, "")) : (g(), f("i", Kt, ""))
|
|
535
544
|
]),
|
|
536
|
-
s("span", null, B(
|
|
545
|
+
s("span", null, B(n.name), 1)
|
|
537
546
|
])
|
|
538
547
|
], 10, Gt);
|
|
539
548
|
}), 128))
|
|
@@ -544,21 +553,21 @@ function $t(t, e, a, r, i, o) {
|
|
|
544
553
|
s("div", Jt, [
|
|
545
554
|
k(h, {
|
|
546
555
|
modelValue: i.source,
|
|
547
|
-
"onUpdate:modelValue": e[16] || (e[16] = (
|
|
556
|
+
"onUpdate:modelValue": e[16] || (e[16] = (n) => i.source = n),
|
|
548
557
|
class: "layer-radio flex-col-start-start",
|
|
549
558
|
style: { width: "180px", "align-items": "flex-start" }
|
|
550
559
|
}, {
|
|
551
560
|
default: ae(() => [
|
|
552
|
-
(g(!0),
|
|
553
|
-
key: `source${
|
|
554
|
-
value:
|
|
561
|
+
(g(!0), f(_, null, N(i.sourceList, (n, d) => (g(), pt(c, {
|
|
562
|
+
key: `source${n.name}`,
|
|
563
|
+
value: n.name
|
|
555
564
|
}, {
|
|
556
565
|
default: ae(() => {
|
|
557
566
|
var b, u, A, w, m, v;
|
|
558
567
|
return [
|
|
559
|
-
U(B(
|
|
560
|
-
d !== 0 ? (g(),
|
|
561
|
-
d === 0 ? (g(),
|
|
568
|
+
U(B(n.name) + " ", 1),
|
|
569
|
+
d !== 0 ? (g(), f("span", qt, B(n.resolution) + "km " + B(n.length) + "days", 1)) : O("", !0),
|
|
570
|
+
d === 0 ? (g(), f("div", Vt, "Provides the best forecast")) : (A = (u = (b = n == null ? void 0 : n.update) == null ? void 0 : b.default) == null ? void 0 : u.meta) != null && A.initialisationTime ? (g(), f("div", Zt, "Update: " + B(o.computeDateZ((v = (m = (w = n == null ? void 0 : n.update) == null ? void 0 : w.default) == null ? void 0 : m.meta) == null ? void 0 : v.initialisationTime)), 1)) : O("", !0)
|
|
562
571
|
];
|
|
563
572
|
}),
|
|
564
573
|
_: 2
|
|
@@ -653,13 +662,13 @@ const ta = {
|
|
|
653
662
|
}, 500);
|
|
654
663
|
else if (this.wind) {
|
|
655
664
|
const i = (/* @__PURE__ */ new Date()).valueOf();
|
|
656
|
-
let o = 0,
|
|
665
|
+
let o = 0, l = 0, c = this.empty;
|
|
657
666
|
if ((t = this.wind) != null && t.active && (c = (e = this.wind) == null ? void 0 : e.data), (a = this.map) != null && a.getSource(this.source))
|
|
658
|
-
(r = this.map) == null || r.getSource(this.source).setData(c),
|
|
667
|
+
(r = this.map) == null || r.getSource(this.source).setData(c), l = (/* @__PURE__ */ new Date()).valueOf() - (i + o), console.log("[wind] update elapsed: ", l, ", total: ", o += l);
|
|
659
668
|
else {
|
|
660
669
|
this.map.addSource(this.source, { type: "geojson", data: c });
|
|
661
670
|
for (let h = 0; h < (this.barbs ?? []).length - 1; h++) {
|
|
662
|
-
const p = (this.barbs ?? [])[h] || 0,
|
|
671
|
+
const p = (this.barbs ?? [])[h] || 0, n = (this.barbs ?? [])[h + 1] || 0, d = p < 10 ? `00${p}kts` : p < 100 ? `0${p}kts` : `${p}kts`;
|
|
663
672
|
this.map.addLayer(
|
|
664
673
|
{
|
|
665
674
|
id: d,
|
|
@@ -669,7 +678,7 @@ const ta = {
|
|
|
669
678
|
// @ts-ignore
|
|
670
679
|
[">=", "spd", p],
|
|
671
680
|
// @ts-ignore
|
|
672
|
-
["<", "spd",
|
|
681
|
+
["<", "spd", n]
|
|
673
682
|
],
|
|
674
683
|
source: this.source,
|
|
675
684
|
layout: {
|
|
@@ -696,7 +705,7 @@ const ta = {
|
|
|
696
705
|
this.beforeLayer
|
|
697
706
|
);
|
|
698
707
|
}
|
|
699
|
-
this.windBarbLoaded = !0,
|
|
708
|
+
this.windBarbLoaded = !0, l = (/* @__PURE__ */ new Date()).valueOf() - (i + o), console.log("[wind] add elapsed: ", l, ", total: ", o += l);
|
|
700
709
|
}
|
|
701
710
|
}
|
|
702
711
|
},
|
|
@@ -767,8 +776,8 @@ class Je {
|
|
|
767
776
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
768
777
|
*/
|
|
769
778
|
getBoundPixel() {
|
|
770
|
-
const e = this.map.getBounds(), a = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o,
|
|
771
|
-
return [d, b, p + u,
|
|
779
|
+
const e = this.map.getBounds(), a = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o, l] = this.convertNLng(r[0]), [c, h] = this.convertNLng(i[0]), [p, n] = this.mercator.px([o, r[1]], a), [d, b] = this.mercator.px([c, i[1]], a), u = Math.round(this.mercator.size * Math.pow(2, a) * (l + h));
|
|
780
|
+
return [d, b, p + u, n];
|
|
772
781
|
}
|
|
773
782
|
/**
|
|
774
783
|
* [视窗边界像素宽度]
|
|
@@ -783,13 +792,13 @@ class Je {
|
|
|
783
792
|
* @param zoom
|
|
784
793
|
*/
|
|
785
794
|
getWorldCopy(e, a) {
|
|
786
|
-
const r = 2 ** a, [i, o,
|
|
787
|
-
for (let
|
|
788
|
-
for (let d = i; d <=
|
|
789
|
-
h.push([d,
|
|
790
|
-
return h.map((
|
|
795
|
+
const r = 2 ** a, [i, o, l, c] = e.map((n) => ~~(n / (r * 256))), h = [];
|
|
796
|
+
for (let n = c; n <= o; n++)
|
|
797
|
+
for (let d = i; d <= l; d++)
|
|
798
|
+
h.push([d, n]);
|
|
799
|
+
return h.map((n) => {
|
|
791
800
|
const d = 2 ** a * 256;
|
|
792
|
-
return [
|
|
801
|
+
return [n[0] * d, n[1] * d, d];
|
|
793
802
|
});
|
|
794
803
|
}
|
|
795
804
|
resize() {
|
|
@@ -830,9 +839,9 @@ class Ce {
|
|
|
830
839
|
* @param width??
|
|
831
840
|
* @param height??
|
|
832
841
|
*/
|
|
833
|
-
createTexture(e, a, r, i, o,
|
|
842
|
+
createTexture(e, a, r, i, o, l, c) {
|
|
834
843
|
const h = e.createTexture();
|
|
835
|
-
return e.bindTexture(e.TEXTURE_2D, h), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, a), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, r), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, i), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, i), o instanceof Uint8Array ? e.texImage2D(e.TEXTURE_2D, 0, e.RGBA,
|
|
844
|
+
return e.bindTexture(e.TEXTURE_2D, h), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, a), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, r), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, i), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, i), o instanceof Uint8Array ? e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, l, c, 0, e.RGBA, e.UNSIGNED_BYTE, o) : e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, o), e.bindTexture(e.TEXTURE_2D, null), h;
|
|
836
845
|
}
|
|
837
846
|
/**
|
|
838
847
|
* 创建数据资源
|
|
@@ -855,8 +864,8 @@ class Ce {
|
|
|
855
864
|
* @param fragmentSchema
|
|
856
865
|
*/
|
|
857
866
|
createProgram(e, a, r) {
|
|
858
|
-
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER, a),
|
|
859
|
-
if (i && o &&
|
|
867
|
+
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER, a), l = this.createShader(e, e.FRAGMENT_SHADER, r);
|
|
868
|
+
if (i && o && l && (e.attachShader(i, o), e.attachShader(i, l), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)))
|
|
860
869
|
throw new Error(e.getProgramInfoLog(i) || "error happened while creating ramp color program");
|
|
861
870
|
return i;
|
|
862
871
|
}
|
|
@@ -869,8 +878,8 @@ class Ce {
|
|
|
869
878
|
createProgramWrapper(e, a, r) {
|
|
870
879
|
const i = this.createProgram(e, a, r);
|
|
871
880
|
if (i) {
|
|
872
|
-
const o = { program: i },
|
|
873
|
-
for (let h = 0; h <
|
|
881
|
+
const o = { program: i }, l = e.getProgramParameter(i, e.ACTIVE_ATTRIBUTES);
|
|
882
|
+
for (let h = 0; h < l; h++) {
|
|
874
883
|
const p = e.getActiveAttrib(i, h);
|
|
875
884
|
o[p.name] = e.getAttribLocation(i, p.name);
|
|
876
885
|
}
|
|
@@ -887,21 +896,21 @@ class Ce {
|
|
|
887
896
|
* @param colors
|
|
888
897
|
*/
|
|
889
898
|
setup(e, a, r = !1, i, o) {
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
const c =
|
|
899
|
+
const l = document.createElement("canvas");
|
|
900
|
+
l.width = 256, l.height = 1;
|
|
901
|
+
const c = l.getContext("2d");
|
|
893
902
|
if (c && e) {
|
|
894
903
|
const h = c == null ? void 0 : c.createLinearGradient(0, 0, 256, 0);
|
|
895
|
-
return a.forEach(([p,
|
|
896
|
-
h.addColorStop(p,
|
|
904
|
+
return a.forEach(([p, n]) => {
|
|
905
|
+
h.addColorStop(p, n);
|
|
897
906
|
}), c.fillStyle = h, c.fillRect(0, 0, 256, 1), {
|
|
898
|
-
canvas:
|
|
907
|
+
canvas: l,
|
|
899
908
|
texture: this.createTexture(
|
|
900
909
|
e,
|
|
901
910
|
e.LINEAR,
|
|
902
911
|
e.LINEAR,
|
|
903
912
|
e.CLAMP_TO_EDGE,
|
|
904
|
-
r ? new Uint8Array(c.getImageData(0, 0, 256, 1).data) :
|
|
913
|
+
r ? new Uint8Array(c.getImageData(0, 0, 256, 1).data) : l,
|
|
905
914
|
i,
|
|
906
915
|
o
|
|
907
916
|
)
|
|
@@ -910,19 +919,19 @@ class Ce {
|
|
|
910
919
|
}
|
|
911
920
|
setupParticle(e, a = 1e3) {
|
|
912
921
|
const r = Math.ceil(Math.sqrt(a)), i = r * r, o = new Uint8Array(i * 4);
|
|
913
|
-
for (let
|
|
914
|
-
o[
|
|
915
|
-
const
|
|
916
|
-
for (let
|
|
917
|
-
h[
|
|
922
|
+
for (let n = 0; n < o.length; n++)
|
|
923
|
+
o[n] = Math.floor(Math.random() * 256);
|
|
924
|
+
const l = this.createTexture(e, e.NEAREST, e.NEAREST, e.CLAMP_TO_EDGE, o, r, r), c = this.createTexture(e, e.NEAREST, e.NEAREST, e.CLAMP_TO_EDGE, o, r, r), h = new Float32Array(i);
|
|
925
|
+
for (let n = 0; n < i; n++)
|
|
926
|
+
h[n] = n;
|
|
918
927
|
const p = this.createDataBuffer(e, "array", h);
|
|
919
|
-
return { resolution: r, total: i, texture0:
|
|
928
|
+
return { resolution: r, total: i, texture0: l, texture1: c, indexBuffer: p };
|
|
920
929
|
}
|
|
921
930
|
bind(e, a, r) {
|
|
922
931
|
const i = this.createProgram(e, a, r);
|
|
923
932
|
if (i) {
|
|
924
|
-
const o = this.createDataBuffer(e, "array", void 0),
|
|
925
|
-
e.enableVertexAttribArray(
|
|
933
|
+
const o = this.createDataBuffer(e, "array", void 0), l = e.getAttribLocation(i, "a_position");
|
|
934
|
+
e.enableVertexAttribArray(l), e.vertexAttribPointer(l, 2, e.FLOAT, !1, 0, 0);
|
|
926
935
|
const c = new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
|
|
927
936
|
this.createDataBuffer(e, "array", c);
|
|
928
937
|
const h = e.getAttribLocation(i, "a_texCoord");
|
|
@@ -930,33 +939,33 @@ class Ce {
|
|
|
930
939
|
}
|
|
931
940
|
return {};
|
|
932
941
|
}
|
|
933
|
-
bindParticle(e, a, r, i, o,
|
|
934
|
-
const c = this.createProgramWrapper(e, a, r), h = this.createProgramWrapper(e, i, o), p = this.createProgramWrapper(e, i,
|
|
935
|
-
return { particle: c, screen: h, update: p, quadBuffer:
|
|
942
|
+
bindParticle(e, a, r, i, o, l) {
|
|
943
|
+
const c = this.createProgramWrapper(e, a, r), h = this.createProgramWrapper(e, i, o), p = this.createProgramWrapper(e, i, l), n = this.createDataBuffer(e, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), d = e.createFramebuffer();
|
|
944
|
+
return { particle: c, screen: h, update: p, quadBuffer: n, frameBuffer: d };
|
|
936
945
|
}
|
|
937
|
-
draw(e, a, r, i, o,
|
|
946
|
+
draw(e, a, r, i, o, l, c) {
|
|
938
947
|
var h, p;
|
|
939
948
|
if (a && r) {
|
|
940
949
|
e.resize(), a == null || a.viewport(0, 0, (h = a == null ? void 0 : a.canvas) == null ? void 0 : h.width, (p = a == null ? void 0 : a.canvas) == null ? void 0 : p.height), a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT | a.DEPTH_BUFFER_BIT);
|
|
941
950
|
try {
|
|
942
|
-
const
|
|
943
|
-
if (a.useProgram(r), a.uniform2f(
|
|
951
|
+
const n = a.getUniformLocation(r, "u_resolution"), d = a.getUniformLocation(r, "u_image"), b = a.getUniformLocation(r, "u_color");
|
|
952
|
+
if (a.useProgram(r), a.uniform2f(n, a.canvas.width * e.ratio, a.canvas.height * e.ratio), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, i), a.uniform1i(d, 0), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, o), a.uniform1i(b, 1), c != null && c.uvRange && (c != null && c.sRange)) {
|
|
944
953
|
const m = a.getUniformLocation(r, "u_range_u_v"), v = a.getUniformLocation(r, "u_range_s");
|
|
945
954
|
a.uniform2f(m, c.uvRange[0], c.uvRange[1]), a.uniform2f(v, c.sRange[0], c.sRange[1]);
|
|
946
955
|
}
|
|
947
956
|
const u = e.getBoundPixel(), A = e.map.getZoom() + 1, w = e.getWorldCopy(u, A);
|
|
948
957
|
for (const m of w) {
|
|
949
|
-
const v = (m[0] - u[0]) * e.ratio,
|
|
950
|
-
a.bindBuffer(a.ARRAY_BUFFER,
|
|
958
|
+
const v = (m[0] - u[0]) * e.ratio, y = (m[1] - u[3]) * e.ratio, L = m[2] * e.ratio, [P, M, I, j] = [v, L + v, y, L + y], W = new Float32Array([P, I, M, I, P, j, P, j, M, I, M, j]);
|
|
959
|
+
a.bindBuffer(a.ARRAY_BUFFER, l), a.bufferData(a.ARRAY_BUFFER, W, a.STATIC_DRAW), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
951
960
|
}
|
|
952
|
-
} catch (
|
|
953
|
-
console.log(`render failed...${
|
|
961
|
+
} catch (n) {
|
|
962
|
+
console.log(`render failed...${n}`);
|
|
954
963
|
}
|
|
955
964
|
}
|
|
956
965
|
}
|
|
957
966
|
drawParticle(e, a, r, i, o) {
|
|
958
|
-
var
|
|
959
|
-
a && (a == null || a.viewport(0, 0, (
|
|
967
|
+
var l, c;
|
|
968
|
+
a && (a == null || a.viewport(0, 0, (l = a == null ? void 0 : a.canvas) == null ? void 0 : l.width, (c = a == null ? void 0 : a.canvas) == null ? void 0 : c.height), a.disable(a.DEPTH_TEST), a.disable(a.STENCIL_TEST), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, r), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, i.texture0), this.renderScreen(e, a, i, o), this.updateParticles(e, a, i, o));
|
|
960
969
|
}
|
|
961
970
|
renderScreen(e, a, r, i) {
|
|
962
971
|
a.bindFramebuffer(a.FRAMEBUFFER, r.frameBuffer), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, r.screenTexture, 0), a.viewport(0, 0, a.canvas.width, a.canvas.height), this.renderScreenTexture(a, r.backgroundTexture, r.screen, r.quadBuffer, 0.95), this.renderParticles(e, a, r, i), a.bindFramebuffer(a.FRAMEBUFFER, null), this.renderScreenTexture(a, r.screenTexture, r.screen, r.quadBuffer, 1);
|
|
@@ -974,11 +983,11 @@ class Ce {
|
|
|
974
983
|
}
|
|
975
984
|
}
|
|
976
985
|
updateParticles(e, a, r, i) {
|
|
977
|
-
var
|
|
986
|
+
var l, c;
|
|
978
987
|
if (a) {
|
|
979
988
|
a.bindFramebuffer(a.FRAMEBUFFER, r.frameBuffer), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, r.texture1, 0), a.viewport(0, 0, r.resolution, r.resolution), a.useProgram(r.update.program), a.bindBuffer(a.ARRAY_BUFFER, r.quadBuffer), a.enableVertexAttribArray(r.update.a_pos), a.vertexAttribPointer(r.update.a_pos, 2, a.FLOAT, !1, 0, 0), a.uniform1i(r.update.u_factor, 0), a.uniform1i(r.update.u_particles, 1);
|
|
980
989
|
const h = e.getBoundRange();
|
|
981
|
-
a.uniform4f(r.update.u_viewport, h[0], h[1], h[2], h[3]), a.uniform1f(r.update.u_rand_seed, Math.random()), a.uniform2f(r.update.u_factor_res, (
|
|
990
|
+
a.uniform4f(r.update.u_viewport, h[0], h[1], h[2], h[3]), a.uniform1f(r.update.u_rand_seed, Math.random()), a.uniform2f(r.update.u_factor_res, (l = r == null ? void 0 : r.image) == null ? void 0 : l.width, (c = r == null ? void 0 : r.image) == null ? void 0 : c.height), a.uniform2f(r.update.u_factor_min, i.uvRange[0], i.uvRange[0]), a.uniform2f(r.update.u_factor_max, i.uvRange[1], i.uvRange[1]), a.uniform1f(r.update.u_speed_factor, i.speedFactor * e.ratio), a.uniform1f(r.update.u_drop_rate, i.dropRate), a.uniform1f(r.update.u_drop_rate_bump, i.dropRateBump), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
982
991
|
}
|
|
983
992
|
const o = r.texture0;
|
|
984
993
|
r.texture0 = r.texture1, r.texture1 = o;
|
|
@@ -3222,8 +3231,8 @@ const oa = {
|
|
|
3222
3231
|
}
|
|
3223
3232
|
},
|
|
3224
3233
|
handleClear() {
|
|
3225
|
-
var t, e, a, r, i, o,
|
|
3226
|
-
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (c = (
|
|
3234
|
+
var t, e, a, r, i, o, l, c;
|
|
3235
|
+
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (c = (l = this.viewport) == null ? void 0 : l.map) == null || c.off("moveend", this.handlePlay), this.handlePause();
|
|
3227
3236
|
},
|
|
3228
3237
|
handleSetup() {
|
|
3229
3238
|
if (!this.context) {
|
|
@@ -3308,8 +3317,8 @@ const oa = {
|
|
|
3308
3317
|
}
|
|
3309
3318
|
}, sa = { key: 0 };
|
|
3310
3319
|
function na(t, e, a, r, i, o) {
|
|
3311
|
-
var
|
|
3312
|
-
return (
|
|
3320
|
+
var l;
|
|
3321
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", sa, [
|
|
3313
3322
|
s("div", {
|
|
3314
3323
|
class: "legend-bars flex-center",
|
|
3315
3324
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -3558,8 +3567,8 @@ const pa = {
|
|
|
3558
3567
|
}
|
|
3559
3568
|
},
|
|
3560
3569
|
handleClear() {
|
|
3561
|
-
var t, e, a, r, i, o,
|
|
3562
|
-
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (c = (
|
|
3570
|
+
var t, e, a, r, i, o, l, c;
|
|
3571
|
+
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (c = (l = this.viewport) == null ? void 0 : l.map) == null || c.off("moveend", this.handlePlay), this.handlePause();
|
|
3563
3572
|
},
|
|
3564
3573
|
handleSetup() {
|
|
3565
3574
|
if (!this.context) {
|
|
@@ -3639,8 +3648,8 @@ const pa = {
|
|
|
3639
3648
|
}
|
|
3640
3649
|
}, ma = { key: 0 };
|
|
3641
3650
|
function ua(t, e, a, r, i, o) {
|
|
3642
|
-
var
|
|
3643
|
-
return (
|
|
3651
|
+
var l;
|
|
3652
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", ma, [
|
|
3644
3653
|
s("div", {
|
|
3645
3654
|
class: "legend-bars flex-center",
|
|
3646
3655
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -3775,7 +3784,7 @@ const ga = /* @__PURE__ */ T(pa, [["render", ua], ["__scopeId", "data-v-163d1f9a
|
|
|
3775
3784
|
}
|
|
3776
3785
|
};
|
|
3777
3786
|
function ya(t, e, a, r, i, o) {
|
|
3778
|
-
return g(),
|
|
3787
|
+
return g(), f("div");
|
|
3779
3788
|
}
|
|
3780
3789
|
const fa = /* @__PURE__ */ T(Aa, [["render", ya]]), wa = {
|
|
3781
3790
|
name: "IdmSwell",
|
|
@@ -3933,7 +3942,7 @@ const fa = /* @__PURE__ */ T(Aa, [["render", ya]]), wa = {
|
|
|
3933
3942
|
}
|
|
3934
3943
|
};
|
|
3935
3944
|
function ba(t, e, a, r, i, o) {
|
|
3936
|
-
return g(),
|
|
3945
|
+
return g(), f("div");
|
|
3937
3946
|
}
|
|
3938
3947
|
const va = /* @__PURE__ */ T(wa, [["render", ba]]), La = {
|
|
3939
3948
|
name: "IdmPrmsl",
|
|
@@ -3990,8 +3999,8 @@ const va = /* @__PURE__ */ T(wa, [["render", ba]]), La = {
|
|
|
3990
3999
|
}, 500);
|
|
3991
4000
|
else if (this.prmsl) {
|
|
3992
4001
|
const r = (/* @__PURE__ */ new Date()).valueOf();
|
|
3993
|
-
let i = 0, o = 0,
|
|
3994
|
-
this.prmsl.active && (
|
|
4002
|
+
let i = 0, o = 0, l = this.empty;
|
|
4003
|
+
this.prmsl.active && (l = this.prmsl.data), (t = this.map) != null && t.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(l), o = (/* @__PURE__ */ new Date()).valueOf() - (r + i), console.log("[prmsl] update elapsed: ", o, ", total: ", i += o)) : (this.map.addSource(this.source, { type: "geojson", data: l }), this.map.addLayer(
|
|
3995
4004
|
{
|
|
3996
4005
|
id: this.layer,
|
|
3997
4006
|
type: "line",
|
|
@@ -4072,7 +4081,7 @@ const va = /* @__PURE__ */ T(wa, [["render", ba]]), La = {
|
|
|
4072
4081
|
}
|
|
4073
4082
|
};
|
|
4074
4083
|
function Ca(t, e, a, r, i, o) {
|
|
4075
|
-
return g(),
|
|
4084
|
+
return g(), f("div");
|
|
4076
4085
|
}
|
|
4077
4086
|
const xa = /* @__PURE__ */ T(La, [["render", Ca]]), Ba = {
|
|
4078
4087
|
name: "IdmIceberg",
|
|
@@ -4132,7 +4141,7 @@ const xa = /* @__PURE__ */ T(La, [["render", Ca]]), Ba = {
|
|
|
4132
4141
|
}
|
|
4133
4142
|
};
|
|
4134
4143
|
function Ia(t, e, a, r, i, o) {
|
|
4135
|
-
return g(),
|
|
4144
|
+
return g(), f("div");
|
|
4136
4145
|
}
|
|
4137
4146
|
const Ea = /* @__PURE__ */ T(Ba, [["render", Ia]]);
|
|
4138
4147
|
const Da = {
|
|
@@ -4222,29 +4231,29 @@ const Da = {
|
|
|
4222
4231
|
var r, i;
|
|
4223
4232
|
const t = ((i = (r = this.tropicals) == null ? void 0 : r.data) == null ? void 0 : i.features) || [], e = F().utc().hour(), a = [];
|
|
4224
4233
|
t.forEach((o) => {
|
|
4225
|
-
var
|
|
4226
|
-
(
|
|
4234
|
+
var l, c, h;
|
|
4235
|
+
(l = o.properties) != null && l.name && !a.includes((c = o.properties) == null ? void 0 : c.name) && a.push((h = o.properties) == null ? void 0 : h.name);
|
|
4227
4236
|
}), a.forEach((o) => {
|
|
4228
4237
|
var p;
|
|
4229
|
-
let
|
|
4230
|
-
const h = t.filter((
|
|
4238
|
+
let l = 0, c;
|
|
4239
|
+
const h = t.filter((n) => {
|
|
4231
4240
|
var d, b;
|
|
4232
|
-
return ((b = (d =
|
|
4241
|
+
return ((b = (d = n.properties) == null ? void 0 : d.category) == null ? void 0 : b.split("-")[0]) === o;
|
|
4233
4242
|
});
|
|
4234
|
-
(p = h.filter((
|
|
4243
|
+
(p = h.filter((n) => {
|
|
4235
4244
|
var d, b;
|
|
4236
|
-
return ((d =
|
|
4237
|
-
})[0]) == null || p.properties.model, h.forEach((
|
|
4245
|
+
return ((d = n.geometry) == null ? void 0 : d.type) === "LineString" && ((b = n.properties) == null ? void 0 : b.type) === "forecast";
|
|
4246
|
+
})[0]) == null || p.properties.model, h.forEach((n, d) => {
|
|
4238
4247
|
var b, u, A, w, m, v;
|
|
4239
|
-
((b =
|
|
4240
|
-
}), h.map((
|
|
4241
|
-
var b, u, A, w, m, v,
|
|
4242
|
-
if (((b =
|
|
4243
|
-
|
|
4244
|
-
const L = F((
|
|
4245
|
-
|
|
4248
|
+
((b = n.geometry) == null ? void 0 : b.type) === "Point" && ((u = n.properties) == null ? void 0 : u.type) === "history" && (l = d, c = c === void 0 ? d : c), ((A = n.geometry) == null ? void 0 : A.type) === "Point" && ((w = n.properties) == null ? void 0 : w.type) === "forecast" && c === void 0 && (c = d), ((m = n.geometry) == null ? void 0 : m.type) === "LineString" && ((v = n.properties) == null || v.type);
|
|
4249
|
+
}), h.map((n, d) => {
|
|
4250
|
+
var b, u, A, w, m, v, y;
|
|
4251
|
+
if (((b = n.geometry) == null ? void 0 : b.type) === "LineString" && ((u = n.properties) == null || u.type), ((A = n.geometry) == null ? void 0 : A.type) === "Point" && ((w = n.properties) == null ? void 0 : w.type) === "forecast" && (n.properties.name = o, n.properties.format = F(n.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((m = n.geometry) == null ? void 0 : m.type) === "Point" && ((v = n.properties) == null ? void 0 : v.type) === "history") {
|
|
4252
|
+
n.properties.format = F(n.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
4253
|
+
const L = F((y = n.properties) == null ? void 0 : y.date).utc().format("HHmm") === F().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm");
|
|
4254
|
+
n.properties.showHistoryLabel = L || d === l, n.properties.showNameLabel = d === l, n.properties.name = o;
|
|
4246
4255
|
}
|
|
4247
|
-
return
|
|
4256
|
+
return n;
|
|
4248
4257
|
});
|
|
4249
4258
|
}), this.handleInit();
|
|
4250
4259
|
},
|
|
@@ -4279,7 +4288,7 @@ const Da = {
|
|
|
4279
4288
|
));
|
|
4280
4289
|
},
|
|
4281
4290
|
handleRender() {
|
|
4282
|
-
var t, e, a, r, i, o,
|
|
4291
|
+
var t, e, a, r, i, o, l, c, h, p;
|
|
4283
4292
|
if (!this.map)
|
|
4284
4293
|
setTimeout(() => {
|
|
4285
4294
|
this.handleRender();
|
|
@@ -4385,7 +4394,7 @@ const Da = {
|
|
|
4385
4394
|
],
|
|
4386
4395
|
"text-halo-width": 4
|
|
4387
4396
|
}
|
|
4388
|
-
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d + b), console.log("[tropical] add elapsed: ", u, ", total: ", b += u)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((c = this.map) == null || c.getSource(this.clusterSource).setData((
|
|
4397
|
+
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d + b), console.log("[tropical] add elapsed: ", u, ", total: ", b += u)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((c = this.map) == null || c.getSource(this.clusterSource).setData((l = this.tropicals) != null && l.active ? this.tropicals.data : this.empty), u = (/* @__PURE__ */ new Date()).valueOf() - (d + b), console.log("[tropical] update elapsed: ", u, ", total: ", b += u)) : (this.map.addSource(this.clusterSource, {
|
|
4389
4398
|
type: "geojson",
|
|
4390
4399
|
data: (h = this.tropicals) != null && h.active ? (p = this.tropicals) == null ? void 0 : p.data : this.empty
|
|
4391
4400
|
// cluster: true,
|
|
@@ -4505,8 +4514,8 @@ const Da = {
|
|
|
4505
4514
|
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d + b), console.log("[tropical] add elapsed: ", u, ", total: ", b += u));
|
|
4506
4515
|
}
|
|
4507
4516
|
this.handleDrawCircle();
|
|
4508
|
-
const
|
|
4509
|
-
this.interpolateData = JSON.parse(JSON.stringify(
|
|
4517
|
+
const n = nt.interpolate(this.tropicals, 1);
|
|
4518
|
+
this.interpolateData = JSON.parse(JSON.stringify(n)), this.interpolateData.filter((d) => d.properties.name === "kristy" && d.properties.model === "ecmwf"), this.handleDateChange();
|
|
4510
4519
|
}
|
|
4511
4520
|
},
|
|
4512
4521
|
handleClear() {
|
|
@@ -4514,7 +4523,7 @@ const Da = {
|
|
|
4514
4523
|
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), (t = this.interpolateMarkers) == null || t.forEach((e) => e == null ? void 0 : e.remove()), this.map.getSource(this.source) && this.map.removeSource(this.source), this.map.getSource(this.clusterSource) && this.map.removeSource(this.clusterSource), this.map.getSource(this.interpolateSource) && this.map.removeSource(this.interpolateSource), this.map.getLayer(this.circleLayer) && this.map.removeLayer(this.circleLayer), this.map.getSource(this.circleSource) && this.map.removeSource(this.circleSource));
|
|
4515
4524
|
},
|
|
4516
4525
|
handleDateChange() {
|
|
4517
|
-
var t, e, a, r, i, o,
|
|
4526
|
+
var t, e, a, r, i, o, l, c, h, p, n, d, b, u, A, w, m, v, y, L, P, M, I, j, W, Y, K, V, ee, ce, he, de, pe, me, ue, ge;
|
|
4518
4527
|
if ((t = this.interpolateMarkers) == null || t.forEach((te) => te == null ? void 0 : te.remove()), this.circleSourceData.features = [], (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
4519
4528
|
const te = F(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), oe = this.interpolateData.filter((Q) => Q.properties.date === te.format() && !Q.properties.disabled), Ae = this.handleComputePolygons(oe), ie = D.featureCollection([...oe]);
|
|
4520
4529
|
Ae.forEach((Q) => {
|
|
@@ -4536,7 +4545,7 @@ const Da = {
|
|
|
4536
4545
|
for (const Q of oe)
|
|
4537
4546
|
if (!Q.properties.disabled) {
|
|
4538
4547
|
let q = "#f44336";
|
|
4539
|
-
((c = (
|
|
4548
|
+
((c = (l = Q.properties) == null ? void 0 : l.wind) == null ? void 0 : c.spd) < 17.2 || !((p = (h = Q.properties) == null ? void 0 : h.wind) != null && p.spd) ? q = "#03f869" : ((d = (n = Q.properties) == null ? void 0 : n.wind) == null ? void 0 : d.spd) >= 17.2 && ((u = (b = Q.properties) == null ? void 0 : b.wind) == null ? void 0 : u.spd) < 24.5 ? q = "#f2f202" : ((w = (A = Q.properties) == null ? void 0 : A.wind) == null ? void 0 : w.spd) >= 24.5 && ((v = (m = Q.properties) == null ? void 0 : m.wind) == null ? void 0 : v.spd) < 32.7 ? q = "#ff9100" : ((L = (y = Q.properties) == null ? void 0 : y.wind) == null ? void 0 : L.spd) >= 32.7 && ((M = (P = Q.properties) == null ? void 0 : P.wind) == null ? void 0 : M.spd) < 41.5 ? q = "#f44336" : ((j = (I = Q.properties) == null ? void 0 : I.wind) == null ? void 0 : j.spd) >= 41.5 && ((Y = (W = Q.properties) == null ? void 0 : W.wind) == null ? void 0 : Y.spd) < 51 ? q = "#f903d0" : ((V = (K = Q.properties) == null ? void 0 : K.wind) == null ? void 0 : V.spd) >= 51 ? q = "#8702f9" : q = "#f44336";
|
|
4540
4549
|
const ye = `<svg t="1719918955501"
|
|
4541
4550
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
4542
4551
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -4570,16 +4579,16 @@ const Da = {
|
|
|
4570
4579
|
(ue = this.map) != null && ue.getSource(this.interpolateSource) && ((ge = this.map) == null || ge.getSource(this.interpolateSource).setData(this.empty));
|
|
4571
4580
|
},
|
|
4572
4581
|
handleClick(t) {
|
|
4573
|
-
var o,
|
|
4574
|
-
const e = t.features[0], a = (
|
|
4582
|
+
var o, l, c, h, p, n, d, b;
|
|
4583
|
+
const e = t.features[0], a = (l = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : l.features.filter(
|
|
4575
4584
|
(u) => {
|
|
4576
4585
|
var A;
|
|
4577
4586
|
return u.geometry.type === "LineString" && u.properties.type === "forecast" && u.properties.name === ((A = e == null ? void 0 : e.properties) == null ? void 0 : A.name);
|
|
4578
4587
|
}
|
|
4579
4588
|
);
|
|
4580
4589
|
a.sort((u, A) => {
|
|
4581
|
-
var w, m, v,
|
|
4582
|
-
return ((w = u.properties) == null ? void 0 : w.model) === "cma" ? -1 : ((m = u.properties) == null ? void 0 : m.model) === "jma" ? ((v = A.properties) == null ? void 0 : v.model) === "cma" ? 1 : -1 : u.properties.model === "ecmwf" ? ["jma", "cma"].includes((
|
|
4590
|
+
var w, m, v, y;
|
|
4591
|
+
return ((w = u.properties) == null ? void 0 : w.model) === "cma" ? -1 : ((m = u.properties) == null ? void 0 : m.model) === "jma" ? ((v = A.properties) == null ? void 0 : v.model) === "cma" ? 1 : -1 : u.properties.model === "ecmwf" ? ["jma", "cma"].includes((y = A.properties) == null ? void 0 : y.model) ? 1 : -1 : 0;
|
|
4583
4592
|
});
|
|
4584
4593
|
const r = (h = (c = this.tropicals) == null ? void 0 : c.data) == null ? void 0 : h.features.filter(
|
|
4585
4594
|
(u) => {
|
|
@@ -4590,21 +4599,21 @@ const Da = {
|
|
|
4590
4599
|
this.activeTropicals = {
|
|
4591
4600
|
name: (p = e == null ? void 0 : e.properties) == null ? void 0 : p.name,
|
|
4592
4601
|
forecasts: a.map((u) => u.properties),
|
|
4593
|
-
history: (
|
|
4602
|
+
history: (n = r[0]) == null ? void 0 : n.properties,
|
|
4594
4603
|
showCircle: (b = (d = a[0]) == null ? void 0 : d.properties) == null ? void 0 : b.showCircle
|
|
4595
4604
|
}, this.showTropicals = !0;
|
|
4596
4605
|
const i = document.getElementById("active-tropical");
|
|
4597
4606
|
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([t.lngLat.lng, t.lngLat.lat]) : this.activeTropicalsMarker = new ve.Marker(i).setLngLat([t.lngLat.lng, t.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
4598
4607
|
},
|
|
4599
4608
|
handleForecastToggle(t) {
|
|
4600
|
-
var r, i, o,
|
|
4609
|
+
var r, i, o, l, c, h;
|
|
4601
4610
|
t.disabled = !t.disabled;
|
|
4602
4611
|
const e = `${t.name}-${t.model}`, a = (i = (r = this.map) == null ? void 0 : r.getSource(this.source)._data) == null ? void 0 : i.features;
|
|
4603
4612
|
a.forEach((p) => {
|
|
4604
4613
|
p.properties.category === e && (p.properties.disabled = t.disabled);
|
|
4605
4614
|
}), this.interpolateData.forEach((p) => {
|
|
4606
4615
|
p.properties.category === e && (p.properties.disabled = t.disabled);
|
|
4607
|
-
}), (
|
|
4616
|
+
}), (l = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || l.setData(D.featureCollection(a)), (h = (c = this.map) == null ? void 0 : c.getSource(this.clusterSource)) == null || h.setData(D.featureCollection(a)), this.handleDateChange();
|
|
4608
4617
|
},
|
|
4609
4618
|
handleStrikeProbability(t) {
|
|
4610
4619
|
this.$emit("tropicalProbability", t);
|
|
@@ -4643,12 +4652,12 @@ const Da = {
|
|
|
4643
4652
|
nw: r.r7nw >= 0 ? r.r7nw : void 0
|
|
4644
4653
|
}, o = this.handleComputeArc(a.geometry.coordinates, i, { ...a.properties, level: 7 });
|
|
4645
4654
|
e.push(o);
|
|
4646
|
-
const
|
|
4655
|
+
const l = {
|
|
4647
4656
|
ne: r.r10ne >= 0 ? r.r10ne : void 0,
|
|
4648
4657
|
se: r.r10se >= 0 ? r.r10se : void 0,
|
|
4649
4658
|
sw: r.r10sw >= 0 ? r.r10sw : void 0,
|
|
4650
4659
|
nw: r.r10nw >= 0 ? r.r10nw : void 0
|
|
4651
|
-
}, c = this.handleComputeArc(a.geometry.coordinates,
|
|
4660
|
+
}, c = this.handleComputeArc(a.geometry.coordinates, l, { ...a.properties, level: 10 });
|
|
4652
4661
|
e.push(c);
|
|
4653
4662
|
}
|
|
4654
4663
|
return e;
|
|
@@ -4656,10 +4665,10 @@ const Da = {
|
|
|
4656
4665
|
handleComputeArc(t, e, a) {
|
|
4657
4666
|
var o;
|
|
4658
4667
|
const r = [];
|
|
4659
|
-
for (const
|
|
4660
|
-
const c = e[
|
|
4668
|
+
for (const l in e) {
|
|
4669
|
+
const c = e[l] ?? 0;
|
|
4661
4670
|
let h;
|
|
4662
|
-
switch (
|
|
4671
|
+
switch (l) {
|
|
4663
4672
|
case "ne":
|
|
4664
4673
|
h = D.lineArc(t, c * 1.852, 0, 90, { steps: c > 0 ? 64 : 1 });
|
|
4665
4674
|
break;
|
|
@@ -4696,16 +4705,16 @@ const Da = {
|
|
|
4696
4705
|
style: { "justify-content": "flex-start" }
|
|
4697
4706
|
}, Ra = { class: "forecast-models" }, Fa = ["onClick"], Ga = { class: "more" };
|
|
4698
4707
|
function Wa(t, e, a, r, i, o) {
|
|
4699
|
-
var
|
|
4700
|
-
return fe((g(),
|
|
4708
|
+
var l, c, h, p, n, d, b, u, A, w, m, v, y, L, P;
|
|
4709
|
+
return fe((g(), f("div", Pa, [
|
|
4701
4710
|
s("div", ka, [
|
|
4702
4711
|
s("div", {
|
|
4703
4712
|
class: "iconfont close-btn",
|
|
4704
4713
|
onClick: e[0] || (e[0] = (M) => i.showTropicals = !1)
|
|
4705
4714
|
}, ""),
|
|
4706
4715
|
s("div", za, [
|
|
4707
|
-
(c = (
|
|
4708
|
-
U(B((
|
|
4716
|
+
(c = (l = i.activeTropicals) == null ? void 0 : l.history) != null && c.level ? (g(), f("span", Ma, B((p = (h = i.activeTropicals) == null ? void 0 : h.history) == null ? void 0 : p.level) + " , ", 1)) : O("", !0),
|
|
4717
|
+
U(B((n = i.activeTropicals) == null ? void 0 : n.name), 1)
|
|
4709
4718
|
]),
|
|
4710
4719
|
s("div", Ta, " Last update: " + B(o.computeTime(((b = (d = i.activeTropicals) == null ? void 0 : d.history) == null ? void 0 : b.updated) || ((w = (A = (u = i.activeTropicals) == null ? void 0 : u.forecasts) == null ? void 0 : A.filter((M) => !M.disabled)[0]) == null ? void 0 : w.date))), 1)
|
|
4711
4720
|
]),
|
|
@@ -4718,16 +4727,16 @@ function Wa(t, e, a, r, i, o) {
|
|
|
4718
4727
|
]),
|
|
4719
4728
|
s("div", Oa, [
|
|
4720
4729
|
e[3] || (e[3] = s("label", null, "Pressure : ", -1)),
|
|
4721
|
-
s("span", null, B(((L = (
|
|
4730
|
+
s("span", null, B(((L = (y = i.activeTropicals) == null ? void 0 : y.history) == null ? void 0 : L.pressure) || "-") + "[hPa]", 1)
|
|
4722
4731
|
])
|
|
4723
4732
|
]),
|
|
4724
4733
|
s("div", Na, [
|
|
4725
4734
|
s("div", ja, [
|
|
4726
4735
|
e[4] || (e[4] = s("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)),
|
|
4727
4736
|
s("div", Ra, [
|
|
4728
|
-
(g(!0),
|
|
4737
|
+
(g(!0), f(_, null, N((P = i.activeTropicals) == null ? void 0 : P.forecasts, (M, I) => {
|
|
4729
4738
|
var j, W, Y, K;
|
|
4730
|
-
return g(),
|
|
4739
|
+
return g(), f("div", {
|
|
4731
4740
|
key: I,
|
|
4732
4741
|
class: H([
|
|
4733
4742
|
"model",
|
|
@@ -4861,8 +4870,8 @@ const Ua = {
|
|
|
4861
4870
|
}
|
|
4862
4871
|
}, Ya = { key: 0 };
|
|
4863
4872
|
function Ka(t, e, a, r, i, o) {
|
|
4864
|
-
var
|
|
4865
|
-
return (
|
|
4873
|
+
var l;
|
|
4874
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", Ya, [
|
|
4866
4875
|
s("div", {
|
|
4867
4876
|
class: "legend-bars flex-center",
|
|
4868
4877
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -4975,8 +4984,8 @@ const Ja = {
|
|
|
4975
4984
|
}
|
|
4976
4985
|
}, qa = { key: 0 };
|
|
4977
4986
|
function Va(t, e, a, r, i, o) {
|
|
4978
|
-
var
|
|
4979
|
-
return (
|
|
4987
|
+
var l;
|
|
4988
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", qa, [
|
|
4980
4989
|
s("div", {
|
|
4981
4990
|
class: "legend-bars flex-center",
|
|
4982
4991
|
style: J([{ position: "absolute" }, { right: t.right + "px", bottom: a.bottom }])
|
|
@@ -5095,8 +5104,8 @@ const $a = {
|
|
|
5095
5104
|
}
|
|
5096
5105
|
}, ei = { key: 0 };
|
|
5097
5106
|
function ti(t, e, a, r, i, o) {
|
|
5098
|
-
var
|
|
5099
|
-
return (
|
|
5107
|
+
var l;
|
|
5108
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", ei, [
|
|
5100
5109
|
s("div", {
|
|
5101
5110
|
class: "legend-bars flex-center",
|
|
5102
5111
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5218,8 +5227,8 @@ const ii = {
|
|
|
5218
5227
|
}
|
|
5219
5228
|
}, ri = { key: 0 };
|
|
5220
5229
|
function oi(t, e, a, r, i, o) {
|
|
5221
|
-
var
|
|
5222
|
-
return (
|
|
5230
|
+
var l;
|
|
5231
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", ri, [
|
|
5223
5232
|
s("div", {
|
|
5224
5233
|
class: "legend-bars flex-center",
|
|
5225
5234
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5334,8 +5343,8 @@ const ni = {
|
|
|
5334
5343
|
}
|
|
5335
5344
|
}, li = { key: 0 };
|
|
5336
5345
|
function ci(t, e, a, r, i, o) {
|
|
5337
|
-
var
|
|
5338
|
-
return (
|
|
5346
|
+
var l;
|
|
5347
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", li, [
|
|
5339
5348
|
s("div", {
|
|
5340
5349
|
class: "legend-bars flex-center",
|
|
5341
5350
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5355,7 +5364,7 @@ var di = /* @__PURE__ */ ut({
|
|
|
5355
5364
|
name: "LocationFilled",
|
|
5356
5365
|
__name: "location-filled",
|
|
5357
5366
|
setup(t) {
|
|
5358
|
-
return (e, a) => (g(),
|
|
5367
|
+
return (e, a) => (g(), f("svg", {
|
|
5359
5368
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5360
5369
|
viewBox: "0 0 1024 1024"
|
|
5361
5370
|
}, [
|
|
@@ -5479,8 +5488,8 @@ const ui = {
|
|
|
5479
5488
|
if (this.showMeteo && this.ts) {
|
|
5480
5489
|
const e = F(), a = (t = F(this.ts)) == null ? void 0 : t.diff(e, "d", !0), i = [0, 1, 2, 3, 4, 5, 6, 7].every((o) => {
|
|
5481
5490
|
var c;
|
|
5482
|
-
const
|
|
5483
|
-
return (c = We.pickHourly(this.meteoData,
|
|
5491
|
+
const l = Ge(this.ts).tz(this.positionGmt).add(3 * o, "h").format();
|
|
5492
|
+
return (c = We.pickHourly(this.meteoData, l)) == null ? void 0 : c[0];
|
|
5484
5493
|
});
|
|
5485
5494
|
if (this.meteoData && i ? this.initTableData(this.meteoData) : (this.loading || (a >= 0 ? await this.fetchMeteoData(this.point, this.ts, 7) : await this.fetchHistoryData(this.point, this.ts)), this.initTableData(this.meteoData)), this.activeIndex === 4) {
|
|
5486
5495
|
const o = Ye.pickDailyExtremes(this.tideData, this.ts);
|
|
@@ -5527,14 +5536,14 @@ const ui = {
|
|
|
5527
5536
|
this.loading = !0, this.meteoData = [];
|
|
5528
5537
|
let r = e ? F(e).utc().format() : F().utc().format();
|
|
5529
5538
|
const { weatherModels: i, marineModels: o } = We.autoPickMeteoModel(this.forecastModel);
|
|
5530
|
-
let
|
|
5539
|
+
let l = {
|
|
5531
5540
|
lat: t.lat,
|
|
5532
5541
|
lng: t.lng,
|
|
5533
5542
|
datetime: r,
|
|
5534
5543
|
forecastDays: a ?? 7,
|
|
5535
5544
|
weatherModels: i,
|
|
5536
5545
|
marineModels: o
|
|
5537
|
-
}, c = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`,
|
|
5546
|
+
}, c = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, l, {
|
|
5538
5547
|
headers: {
|
|
5539
5548
|
Authorization: this.token || this.defaultMeteoToken
|
|
5540
5549
|
}
|
|
@@ -5551,17 +5560,17 @@ const ui = {
|
|
|
5551
5560
|
pastDays: 1,
|
|
5552
5561
|
weatherModels: r,
|
|
5553
5562
|
marineModels: i
|
|
5554
|
-
},
|
|
5563
|
+
}, l = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, o, {
|
|
5555
5564
|
headers: {
|
|
5556
5565
|
Authorization: this.token || this.defaultMeteoToken
|
|
5557
5566
|
}
|
|
5558
5567
|
});
|
|
5559
|
-
(
|
|
5568
|
+
(l == null ? void 0 : l.data.code) === 0 && (this.meteoData = l == null ? void 0 : l.data.data, this.loading = !1);
|
|
5560
5569
|
},
|
|
5561
5570
|
initTableData(t) {
|
|
5562
|
-
var e, a, r, i, o,
|
|
5563
|
-
this.clearTable(), this.positionGmt = (a = (e = t == null ? void 0 : t.weather) == null ? void 0 : e[0]) == null ? void 0 : a.timezone, this.positionOffset = (i = (r = t == null ? void 0 : t.weather) == null ? void 0 : r[0]) == null ? void 0 : i.offset, this.localDate = (
|
|
5564
|
-
var d, b, u, A, w, m, v,
|
|
5571
|
+
var e, a, r, i, o, l, c, h, p;
|
|
5572
|
+
this.clearTable(), this.positionGmt = (a = (e = t == null ? void 0 : t.weather) == null ? void 0 : e[0]) == null ? void 0 : a.timezone, this.positionOffset = (i = (r = t == null ? void 0 : t.weather) == null ? void 0 : r[0]) == null ? void 0 : i.offset, this.localDate = (l = (o = Ge(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : l.format("MMM-DD/HHmm[LT]"), this.currentHourData = (c = We.pickHourly(t, F(this.ts))) == null ? void 0 : c[0], ((p = (h = this.currentHourData) == null ? void 0 : h.weather) == null ? void 0 : p.isDay) === 0 ? this.isDay = !1 : this.isDay = !0, this.$nextTick(() => {
|
|
5573
|
+
var d, b, u, A, w, m, v, y, L, P, M, I, j, W, Y, K, V, ee, ce, he, de, pe, me, ue, ge, te, oe, Ae, ie, Q, q, ye, re;
|
|
5565
5574
|
if (!document.getElementById("meteoMainBox"))
|
|
5566
5575
|
return !1;
|
|
5567
5576
|
if (!this.currentHourData)
|
|
@@ -5570,7 +5579,7 @@ const ui = {
|
|
|
5570
5579
|
const ne = Ge(this.ts).tz(this.positionGmt).add(3 * se, "h").format();
|
|
5571
5580
|
this.tableData.hours.push(ne);
|
|
5572
5581
|
const x = ((d = We.pickHourly(t, ne)) == null ? void 0 : d[0]) || {};
|
|
5573
|
-
this.tableData.temp.push(this.roundPrecision((b = x == null ? void 0 : x.weather) == null ? void 0 : b.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((A = (u = x == null ? void 0 : x.weather) == null ? void 0 : u.precip) == null ? void 0 : A.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((m = (w = x == null ? void 0 : x.weather) == null ? void 0 : w.precip) == null ? void 0 : m.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((v = x == null ? void 0 : x.weather) == null ? void 0 : v.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((L = (
|
|
5582
|
+
this.tableData.temp.push(this.roundPrecision((b = x == null ? void 0 : x.weather) == null ? void 0 : b.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((A = (u = x == null ? void 0 : x.weather) == null ? void 0 : u.precip) == null ? void 0 : A.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((m = (w = x == null ? void 0 : x.weather) == null ? void 0 : w.precip) == null ? void 0 : m.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((v = x == null ? void 0 : x.weather) == null ? void 0 : v.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((L = (y = x == null ? void 0 : x.weather) == null ? void 0 : y.wind) == null ? void 0 : L.kts, 1) ?? "-"), this.tableData.windDir.push((M = (P = x == null ? void 0 : x.weather) == null ? void 0 : P.wind) == null ? void 0 : M.bearing), this.tableData.windGust.push(this.roundPrecision((j = (I = x == null ? void 0 : x.weather) == null ? void 0 : I.wind) == null ? void 0 : j.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((Y = (W = x == null ? void 0 : x.wave) == null ? void 0 : W.sig) == null ? void 0 : Y.height, 1) ?? "-"), this.tableData.sigwaveDir.push((V = (K = x == null ? void 0 : x.wave) == null ? void 0 : K.sig) == null ? void 0 : V.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((ce = (ee = x == null ? void 0 : x.wave) == null ? void 0 : ee.wd) == null ? void 0 : ce.height, 1) ?? "-"), this.tableData.windwaveDir.push((de = (he = x == null ? void 0 : x.wave) == null ? void 0 : he.wd) == null ? void 0 : de.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((me = (pe = x == null ? void 0 : x.wave) == null ? void 0 : pe.wd) == null ? void 0 : me.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((ge = (ue = x == null ? void 0 : x.wave) == null ? void 0 : ue.swell) == null ? void 0 : ge.height, 1) ?? "-"), this.tableData.swellDir.push((oe = (te = x == null ? void 0 : x.wave) == null ? void 0 : te.swell) == null ? void 0 : oe.bearing), this.tableData.swellPeriod.push(this.roundPrecision((ie = (Ae = x == null ? void 0 : x.wave) == null ? void 0 : Ae.swell) == null ? void 0 : ie.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((Q = x == null ? void 0 : x.current) == null ? void 0 : Q.speed, 1) ?? "-"), this.tableData.currentDir.push((q = x == null ? void 0 : x.current) == null ? void 0 : q.bearing), this.tableData.seaLevel.push(this.roundPrecision(x == null ? void 0 : x.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(x == null ? void 0 : x.sst, 0) ?? "-"), this.tableData.weatherUrls.push((ye = x == null ? void 0 : x.weather) == null ? void 0 : ye.url), this.tableData.weatherNames.push(((re = x == null ? void 0 : x.weather) == null ? void 0 : re.name) ?? "-");
|
|
5574
5583
|
}
|
|
5575
5584
|
});
|
|
5576
5585
|
},
|
|
@@ -5620,8 +5629,8 @@ const ui = {
|
|
|
5620
5629
|
});
|
|
5621
5630
|
if ((o == null ? void 0 : o.data.code) === 0) {
|
|
5622
5631
|
this.tideData = (o == null ? void 0 : o.data.data) || {}, this.tideLoading = !1;
|
|
5623
|
-
const
|
|
5624
|
-
this.tideTableData =
|
|
5632
|
+
const l = Ye.pickDailyExtremes(this.tideData, this.ts);
|
|
5633
|
+
this.tideTableData = l;
|
|
5625
5634
|
}
|
|
5626
5635
|
},
|
|
5627
5636
|
handleBind() {
|
|
@@ -5693,26 +5702,26 @@ const ui = {
|
|
|
5693
5702
|
class: "main-box flex-center"
|
|
5694
5703
|
};
|
|
5695
5704
|
function Br(t, e, a, r, i, o) {
|
|
5696
|
-
var p,
|
|
5697
|
-
const
|
|
5698
|
-
return fe((g(),
|
|
5705
|
+
var p, n, d, b, u, A, w, m, v, y, L, P, M, I, j, W, Y, K, V, ee, ce, he, de, pe, me, ue, ge, te, oe, Ae, ie, Q, q, ye, re, se, ne, x, Le, xe, Be, Ie, Ee, De, Pe, ke, ze, Me, Te, Qe, Se, _e, He, Oe, Ne, je, Re, Fe, X, qe, Ve, Ze, $e, et, tt, at, it, rt;
|
|
5706
|
+
const l = z("LocationFilled"), c = z("ElIcon"), h = z("ElTooltip");
|
|
5707
|
+
return fe((g(), f("div", gi, [
|
|
5699
5708
|
s("div", Ai, [
|
|
5700
5709
|
s("div", yi, [
|
|
5701
5710
|
s("div", fi, [
|
|
5702
5711
|
k(c, { size: "22" }, {
|
|
5703
5712
|
default: ae(() => [
|
|
5704
|
-
k(
|
|
5713
|
+
k(l)
|
|
5705
5714
|
]),
|
|
5706
5715
|
_: 1
|
|
5707
5716
|
}),
|
|
5708
|
-
s("div", wi, B(o.computeLat((p = i.point) == null ? void 0 : p.lat)) + "," + B(o.computeLng((
|
|
5717
|
+
s("div", wi, B(o.computeLat((p = i.point) == null ? void 0 : p.lat)) + "," + B(o.computeLng((n = i.point) == null ? void 0 : n.lng)), 1)
|
|
5709
5718
|
]),
|
|
5710
5719
|
s("div", bi, [
|
|
5711
|
-
i.showTables ? (g(),
|
|
5720
|
+
i.showTables ? (g(), f("div", {
|
|
5712
5721
|
key: 0,
|
|
5713
5722
|
class: "iconfont toggle",
|
|
5714
5723
|
onClick: e[0] || (e[0] = (C) => i.showTables = !i.showTables)
|
|
5715
|
-
}, "")) : (g(),
|
|
5724
|
+
}, "")) : (g(), f("div", {
|
|
5716
5725
|
key: 1,
|
|
5717
5726
|
class: "iconfont toggle",
|
|
5718
5727
|
onClick: e[1] || (e[1] = (C) => i.showTables = !i.showTables)
|
|
@@ -5723,9 +5732,9 @@ function Br(t, e, a, r, i, o) {
|
|
|
5723
5732
|
}, "")
|
|
5724
5733
|
])
|
|
5725
5734
|
]),
|
|
5726
|
-
i.loading ? (g(),
|
|
5735
|
+
i.loading ? (g(), f("div", xr, e[42] || (e[42] = [
|
|
5727
5736
|
s("img", { src: mi }, null, -1)
|
|
5728
|
-
]))) : (g(),
|
|
5737
|
+
]))) : (g(), f("div", {
|
|
5729
5738
|
key: 0,
|
|
5730
5739
|
class: H(["main-box", i.isDay ? "day-bg" : "night-bg"]),
|
|
5731
5740
|
id: "meteoMainBox"
|
|
@@ -5741,12 +5750,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
5741
5750
|
default: ae(() => {
|
|
5742
5751
|
var C, E, ot, st;
|
|
5743
5752
|
return [
|
|
5744
|
-
(E = (C = i.currentHourData) == null ? void 0 : C.weather) != null && E.url ? (g(),
|
|
5753
|
+
(E = (C = i.currentHourData) == null ? void 0 : C.weather) != null && E.url ? (g(), f("img", {
|
|
5745
5754
|
key: 0,
|
|
5746
5755
|
class: "iconfont icon",
|
|
5747
5756
|
style: { "margin-right": "5px" },
|
|
5748
5757
|
src: (st = (ot = i.currentHourData) == null ? void 0 : ot.weather) == null ? void 0 : st.url
|
|
5749
|
-
}, null, 8, Ci)) : (g(),
|
|
5758
|
+
}, null, 8, Ci)) : (g(), f("span", xi))
|
|
5750
5759
|
];
|
|
5751
5760
|
}),
|
|
5752
5761
|
_: 1
|
|
@@ -5764,7 +5773,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5764
5773
|
]),
|
|
5765
5774
|
s("div", Di, [
|
|
5766
5775
|
e[10] || (e[10] = s("label", null, "Visibility : ", -1)),
|
|
5767
|
-
s("span", null, B(o.roundPrecision((L = (
|
|
5776
|
+
s("span", null, B(o.roundPrecision((L = (y = i.currentHourData) == null ? void 0 : y.weather) == null ? void 0 : L.visibility, 0)) + " nm", 1)
|
|
5768
5777
|
]),
|
|
5769
5778
|
s("div", Pi, [
|
|
5770
5779
|
e[11] || (e[11] = s("label", null, "Wind : ", -1)),
|
|
@@ -5806,7 +5815,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5806
5815
|
U("Hours"),
|
|
5807
5816
|
s("span", { class: "unit" }, "(LT)")
|
|
5808
5817
|
], -1)),
|
|
5809
|
-
(g(!0),
|
|
5818
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C) => (g(), f("th", {
|
|
5810
5819
|
rowspan: "1",
|
|
5811
5820
|
colspan: "1",
|
|
5812
5821
|
key: `HourL${C}`
|
|
@@ -5821,7 +5830,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5821
5830
|
U("UTC"),
|
|
5822
5831
|
s("span", { class: "unit" })
|
|
5823
5832
|
], -1)),
|
|
5824
|
-
(g(!0),
|
|
5833
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C) => (g(), f("th", {
|
|
5825
5834
|
rowspan: "1",
|
|
5826
5835
|
colspan: "1",
|
|
5827
5836
|
key: `HourZ${C}`
|
|
@@ -5833,7 +5842,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5833
5842
|
colspan: "1",
|
|
5834
5843
|
class: "tr-title"
|
|
5835
5844
|
}, null, -1)),
|
|
5836
|
-
(g(!0),
|
|
5845
|
+
(g(!0), f(_, null, N(i.tableData.weatherUrls, (C, E) => (g(), f("th", {
|
|
5837
5846
|
rowspan: "1",
|
|
5838
5847
|
colspan: "1",
|
|
5839
5848
|
key: `weatherUrls${E}${C}`
|
|
@@ -5845,7 +5854,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5845
5854
|
"show-after": 500
|
|
5846
5855
|
}, {
|
|
5847
5856
|
default: ae(() => [
|
|
5848
|
-
C ? (g(),
|
|
5857
|
+
C ? (g(), f("img", {
|
|
5849
5858
|
key: 0,
|
|
5850
5859
|
class: "iconfont weather-icon",
|
|
5851
5860
|
src: C
|
|
@@ -5864,7 +5873,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5864
5873
|
U("Temp"),
|
|
5865
5874
|
s("span", { class: "unit" }, "°C")
|
|
5866
5875
|
], -1)),
|
|
5867
|
-
(g(!0),
|
|
5876
|
+
(g(!0), f(_, null, N(i.tableData.temp, (C, E) => (g(), f("td", {
|
|
5868
5877
|
rowspan: "1",
|
|
5869
5878
|
colspan: "1",
|
|
5870
5879
|
key: `weatherUrls${E}${C}`
|
|
@@ -5879,7 +5888,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5879
5888
|
U("Precip"),
|
|
5880
5889
|
s("span", { class: "unit" }, "mm")
|
|
5881
5890
|
], -1)),
|
|
5882
|
-
(g(!0),
|
|
5891
|
+
(g(!0), f(_, null, N(i.tableData.precip1h, (C, E) => (g(), f("td", {
|
|
5883
5892
|
rowspan: "1",
|
|
5884
5893
|
colspan: "1",
|
|
5885
5894
|
key: `precip1h${E}${C}`
|
|
@@ -5894,7 +5903,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5894
5903
|
U("Visibility"),
|
|
5895
5904
|
s("span", { class: "unit" }, "nm")
|
|
5896
5905
|
], -1)),
|
|
5897
|
-
(g(!0),
|
|
5906
|
+
(g(!0), f(_, null, N(i.tableData.visibility, (C, E) => (g(), f("td", {
|
|
5898
5907
|
rowspan: "1",
|
|
5899
5908
|
colspan: "1",
|
|
5900
5909
|
key: `visibility${E}${C}`
|
|
@@ -5909,12 +5918,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
5909
5918
|
U("Wind gust"),
|
|
5910
5919
|
s("span", { class: "unit" }, "kts")
|
|
5911
5920
|
], -1)),
|
|
5912
|
-
(g(!0),
|
|
5921
|
+
(g(!0), f(_, null, N(i.tableData.windGust, (C, E) => (g(), f("td", {
|
|
5913
5922
|
rowspan: "1",
|
|
5914
5923
|
colspan: "1",
|
|
5915
5924
|
key: `windGust${E}${C}`
|
|
5916
5925
|
}, [
|
|
5917
|
-
isNaN(i.tableData.windDir[E]) ? O("", !0) : (g(),
|
|
5926
|
+
isNaN(i.tableData.windDir[E]) ? O("", !0) : (g(), f("span", {
|
|
5918
5927
|
key: 0,
|
|
5919
5928
|
class: "iconfont icon blue",
|
|
5920
5929
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.windDir[E]}deg)` })
|
|
@@ -5935,7 +5944,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5935
5944
|
U("Hours"),
|
|
5936
5945
|
s("span", { class: "unit" }, "(LT)")
|
|
5937
5946
|
], -1)),
|
|
5938
|
-
(g(!0),
|
|
5947
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C, E) => (g(), f("th", {
|
|
5939
5948
|
rowspan: "1",
|
|
5940
5949
|
colspan: "1",
|
|
5941
5950
|
key: `currenthoursL${E}${C}`
|
|
@@ -5950,7 +5959,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5950
5959
|
U("UTC"),
|
|
5951
5960
|
s("span", { class: "unit" })
|
|
5952
5961
|
], -1)),
|
|
5953
|
-
(g(!0),
|
|
5962
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C, E) => (g(), f("th", {
|
|
5954
5963
|
rowspan: "1",
|
|
5955
5964
|
colspan: "1",
|
|
5956
5965
|
key: `currenthoursZ${E}${C}`
|
|
@@ -5965,12 +5974,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
5965
5974
|
U("Wind"),
|
|
5966
5975
|
s("span", { class: "unit" }, "kts")
|
|
5967
5976
|
], -1)),
|
|
5968
|
-
(g(!0),
|
|
5977
|
+
(g(!0), f(_, null, N(i.tableData.windSpeed, (C, E) => (g(), f("td", {
|
|
5969
5978
|
rowspan: "1",
|
|
5970
5979
|
colspan: "1",
|
|
5971
5980
|
key: `windSpeed${E}${C}`
|
|
5972
5981
|
}, [
|
|
5973
|
-
isNaN(i.tableData.windDir[E]) ? O("", !0) : (g(),
|
|
5982
|
+
isNaN(i.tableData.windDir[E]) ? O("", !0) : (g(), f("span", {
|
|
5974
5983
|
key: 0,
|
|
5975
5984
|
class: "iconfont icon wind",
|
|
5976
5985
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.windDir[E]}deg)` })
|
|
@@ -5987,12 +5996,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
5987
5996
|
U("Sig Wave"),
|
|
5988
5997
|
s("span", { class: "unit" }, "m")
|
|
5989
5998
|
], -1)),
|
|
5990
|
-
(g(!0),
|
|
5999
|
+
(g(!0), f(_, null, N(i.tableData.sigwaveHeight, (C, E) => (g(), f("td", {
|
|
5991
6000
|
rowspan: "1",
|
|
5992
6001
|
colspan: "1",
|
|
5993
6002
|
key: `sigwaveHeight${E}${C}`
|
|
5994
6003
|
}, [
|
|
5995
|
-
isNaN(i.tableData.sigwaveDir[E]) ? O("", !0) : (g(),
|
|
6004
|
+
isNaN(i.tableData.sigwaveDir[E]) ? O("", !0) : (g(), f("span", {
|
|
5996
6005
|
key: 0,
|
|
5997
6006
|
class: "iconfont icon sigwave",
|
|
5998
6007
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.sigwaveDir[E]}deg)` })
|
|
@@ -6009,12 +6018,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
6009
6018
|
U("Wind Wave"),
|
|
6010
6019
|
s("span", { class: "unit" }, "m")
|
|
6011
6020
|
], -1)),
|
|
6012
|
-
(g(!0),
|
|
6021
|
+
(g(!0), f(_, null, N(i.tableData.windwaveHeight, (C, E) => (g(), f("td", {
|
|
6013
6022
|
rowspan: "1",
|
|
6014
6023
|
colspan: "1",
|
|
6015
6024
|
key: `windwaveHeight${E}${C}`
|
|
6016
6025
|
}, [
|
|
6017
|
-
isNaN(i.tableData.sigwaveDir[E]) ? O("", !0) : (g(),
|
|
6026
|
+
isNaN(i.tableData.sigwaveDir[E]) ? O("", !0) : (g(), f("span", {
|
|
6018
6027
|
key: 0,
|
|
6019
6028
|
class: "iconfont icon windwave",
|
|
6020
6029
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.windwaveDir[E]}deg)` })
|
|
@@ -6031,12 +6040,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
6031
6040
|
U("Swell"),
|
|
6032
6041
|
s("span", { class: "unit" }, "m")
|
|
6033
6042
|
], -1)),
|
|
6034
|
-
(g(!0),
|
|
6043
|
+
(g(!0), f(_, null, N(i.tableData.swellHeight, (C, E) => (g(), f("td", {
|
|
6035
6044
|
rowspan: "1",
|
|
6036
6045
|
colspan: "1",
|
|
6037
6046
|
key: `swellHeight${E}${C}`
|
|
6038
6047
|
}, [
|
|
6039
|
-
isNaN(i.tableData.swellDir[E]) ? O("", !0) : (g(),
|
|
6048
|
+
isNaN(i.tableData.swellDir[E]) ? O("", !0) : (g(), f("span", {
|
|
6040
6049
|
key: 0,
|
|
6041
6050
|
class: "iconfont icon swell",
|
|
6042
6051
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.swellDir[E]}deg)` })
|
|
@@ -6053,12 +6062,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
6053
6062
|
U("Current"),
|
|
6054
6063
|
s("span", { class: "unit" }, "kts")
|
|
6055
6064
|
], -1)),
|
|
6056
|
-
(g(!0),
|
|
6065
|
+
(g(!0), f(_, null, N(i.tableData.currentSpeed, (C, E) => (g(), f("td", {
|
|
6057
6066
|
rowspan: "1",
|
|
6058
6067
|
colspan: "1",
|
|
6059
6068
|
key: `currentSpeed${E}${C}`
|
|
6060
6069
|
}, [
|
|
6061
|
-
isNaN(i.tableData.currentDir[E]) ? O("", !0) : (g(),
|
|
6070
|
+
isNaN(i.tableData.currentDir[E]) ? O("", !0) : (g(), f("span", {
|
|
6062
6071
|
key: 0,
|
|
6063
6072
|
class: "iconfont icon current",
|
|
6064
6073
|
id: "meteoGrayIcon",
|
|
@@ -6080,7 +6089,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
6080
6089
|
U("Hours"),
|
|
6081
6090
|
s("span", { class: "unit" }, "(LT)")
|
|
6082
6091
|
], -1)),
|
|
6083
|
-
(g(!0),
|
|
6092
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C, E) => (g(), f("th", {
|
|
6084
6093
|
rowspan: "1",
|
|
6085
6094
|
colspan: "1",
|
|
6086
6095
|
key: `seahoursL${E}${C}`
|
|
@@ -6095,7 +6104,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
6095
6104
|
U("UTC"),
|
|
6096
6105
|
s("span", { class: "unit" })
|
|
6097
6106
|
], -1)),
|
|
6098
|
-
(g(!0),
|
|
6107
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C, E) => (g(), f("th", {
|
|
6099
6108
|
rowspan: "1",
|
|
6100
6109
|
colspan: "1",
|
|
6101
6110
|
key: `seahoursZ${E}${C}`
|
|
@@ -6110,7 +6119,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
6110
6119
|
U("SeaLevel"),
|
|
6111
6120
|
s("span", { class: "unit" }, "m")
|
|
6112
6121
|
], -1)),
|
|
6113
|
-
(g(!0),
|
|
6122
|
+
(g(!0), f(_, null, N(i.tableData.seaLevel, (C, E) => (g(), f("td", {
|
|
6114
6123
|
rowspan: "1",
|
|
6115
6124
|
colspan: "1",
|
|
6116
6125
|
key: `SeaLevel${E}${C}`
|
|
@@ -6125,7 +6134,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
6125
6134
|
U("SeaTemp"),
|
|
6126
6135
|
s("span", { class: "unit" }, "°C")
|
|
6127
6136
|
], -1)),
|
|
6128
|
-
(g(!0),
|
|
6137
|
+
(g(!0), f(_, null, N(i.tableData.seaTemp, (C, E) => (g(), f("td", {
|
|
6129
6138
|
rowspan: "1",
|
|
6130
6139
|
colspan: "1",
|
|
6131
6140
|
key: `SeaTemp${E}${C}`
|
|
@@ -6134,26 +6143,26 @@ function Br(t, e, a, r, i, o) {
|
|
|
6134
6143
|
], 512), [
|
|
6135
6144
|
[we, i.activeIndex === 3]
|
|
6136
6145
|
]),
|
|
6137
|
-
i.activeIndex === 3 ? (g(),
|
|
6146
|
+
i.activeIndex === 3 ? (g(), f("div", ir, e[30] || (e[30] = [
|
|
6138
6147
|
s("p", { style: { "font-size": "12px", padding: "12px 20px 0 20px", "line-height": "16px" } }, "*Sea level height accounts for tides, barometer effects, and global variations. Based on mean sea level, accuracy is limited in coastal areas. For coastal navigation, use data from Tides Tab.", -1)
|
|
6139
6148
|
]))) : O("", !0),
|
|
6140
6149
|
fe(s("table", rr, [
|
|
6141
6150
|
s("tr", or, [
|
|
6142
|
-
(g(!0),
|
|
6151
|
+
(g(!0), f(_, null, N(i.tideTableData, (C, E) => (g(), f("th", {
|
|
6143
6152
|
rowspan: "1",
|
|
6144
6153
|
colspan: "1",
|
|
6145
6154
|
key: `Tide-tr-${E}${C}`
|
|
6146
6155
|
}, B(C.type) + " Tide", 1))), 128))
|
|
6147
6156
|
]),
|
|
6148
6157
|
s("tr", sr, [
|
|
6149
|
-
(g(!0),
|
|
6158
|
+
(g(!0), f(_, null, N(i.tideTableData, (C, E) => (g(), f("td", {
|
|
6150
6159
|
rowspan: "1",
|
|
6151
6160
|
colspan: "1",
|
|
6152
6161
|
key: `Tide-date-${E}${C}`
|
|
6153
6162
|
}, B(o.computeHourHmmLT(C == null ? void 0 : C.date)), 1))), 128))
|
|
6154
6163
|
]),
|
|
6155
6164
|
s("tr", nr, [
|
|
6156
|
-
(g(!0),
|
|
6165
|
+
(g(!0), f(_, null, N(i.tideTableData, (C, E) => (g(), f("td", {
|
|
6157
6166
|
rowspan: "1",
|
|
6158
6167
|
colspan: "1",
|
|
6159
6168
|
key: `Tide-height-${E}${C}`
|
|
@@ -6323,7 +6332,7 @@ const Ir = /* @__PURE__ */ T(ui, [["render", Br], ["__scopeId", "data-v-cdc6da70
|
|
|
6323
6332
|
}
|
|
6324
6333
|
};
|
|
6325
6334
|
function Dr(t, e, a, r, i, o) {
|
|
6326
|
-
return g(),
|
|
6335
|
+
return g(), f("div");
|
|
6327
6336
|
}
|
|
6328
6337
|
const Pr = /* @__PURE__ */ T(Er, [["render", Dr]]), kr = {
|
|
6329
6338
|
name: "IdmGmdssArea",
|
|
@@ -6446,7 +6455,7 @@ const Pr = /* @__PURE__ */ T(Er, [["render", Dr]]), kr = {
|
|
|
6446
6455
|
}
|
|
6447
6456
|
};
|
|
6448
6457
|
function zr(t, e, a, r, i, o) {
|
|
6449
|
-
return g(),
|
|
6458
|
+
return g(), f("div");
|
|
6450
6459
|
}
|
|
6451
6460
|
const Mr = /* @__PURE__ */ T(kr, [["render", zr]]), Tr = {
|
|
6452
6461
|
name: "IdmEcaZone",
|
|
@@ -6537,7 +6546,7 @@ const Mr = /* @__PURE__ */ T(kr, [["render", zr]]), Tr = {
|
|
|
6537
6546
|
}
|
|
6538
6547
|
};
|
|
6539
6548
|
function Qr(t, e, a, r, i, o) {
|
|
6540
|
-
return g(),
|
|
6549
|
+
return g(), f("div");
|
|
6541
6550
|
}
|
|
6542
6551
|
const Sr = /* @__PURE__ */ T(Tr, [["render", Qr]]);
|
|
6543
6552
|
const _r = {
|
|
@@ -6672,15 +6681,15 @@ const _r = {
|
|
|
6672
6681
|
}
|
|
6673
6682
|
}, Hr = { id: "idm-gl3-zone-info" }, Or = ["innerHTML"];
|
|
6674
6683
|
function Nr(t, e, a, r, i, o) {
|
|
6675
|
-
var
|
|
6676
|
-
return fe((g(),
|
|
6684
|
+
var l;
|
|
6685
|
+
return fe((g(), f("div", Hr, [
|
|
6677
6686
|
s("div", {
|
|
6678
6687
|
class: "iconfont close",
|
|
6679
6688
|
onClick: e[0] || (e[0] = (c) => i.showZone = !1)
|
|
6680
6689
|
}, ""),
|
|
6681
6690
|
s("div", {
|
|
6682
6691
|
class: "rich-context",
|
|
6683
|
-
innerHTML: (
|
|
6692
|
+
innerHTML: (l = i.form) == null ? void 0 : l.name
|
|
6684
6693
|
}, null, 8, Or)
|
|
6685
6694
|
], 512)), [
|
|
6686
6695
|
[we, i.showZone]
|
|
@@ -6790,10 +6799,10 @@ const Rr = {
|
|
|
6790
6799
|
style: { "align-items": "flex-start" }
|
|
6791
6800
|
}, Xr = { class: "meteo-forecast flex-end" };
|
|
6792
6801
|
function Jr(t, e, a, r, i, o) {
|
|
6793
|
-
return fe((g(),
|
|
6802
|
+
return fe((g(), f("div", Fr, [
|
|
6794
6803
|
s("div", {
|
|
6795
6804
|
class: "close iconfont",
|
|
6796
|
-
onClick: e[0] || (e[0] = (
|
|
6805
|
+
onClick: e[0] || (e[0] = (l) => i.showPort = !1)
|
|
6797
6806
|
}, ""),
|
|
6798
6807
|
s("div", Gr, [
|
|
6799
6808
|
s("div", Wr, [
|
|
@@ -6814,7 +6823,7 @@ function Jr(t, e, a, r, i, o) {
|
|
|
6814
6823
|
]),
|
|
6815
6824
|
s("div", Xr, [
|
|
6816
6825
|
s("span", {
|
|
6817
|
-
onClick: e[1] || (e[1] = (
|
|
6826
|
+
onClick: e[1] || (e[1] = (l) => o.handleClickMeteo(i.form))
|
|
6818
6827
|
}, "Meteo Forecast")
|
|
6819
6828
|
])
|
|
6820
6829
|
])
|
|
@@ -6893,7 +6902,7 @@ const qr = /* @__PURE__ */ T(Rr, [["render", Jr], ["__scopeId", "data-v-2fc5fc5e
|
|
|
6893
6902
|
}
|
|
6894
6903
|
};
|
|
6895
6904
|
function Zr(t, e, a, r, i, o) {
|
|
6896
|
-
return g(),
|
|
6905
|
+
return g(), f("div");
|
|
6897
6906
|
}
|
|
6898
6907
|
const $r = /* @__PURE__ */ T(Vr, [["render", Zr]]), eo = {
|
|
6899
6908
|
name: "IdmTimezone",
|
|
@@ -7061,7 +7070,7 @@ const $r = /* @__PURE__ */ T(Vr, [["render", Zr]]), eo = {
|
|
|
7061
7070
|
}
|
|
7062
7071
|
};
|
|
7063
7072
|
function to(t, e, a, r, i, o) {
|
|
7064
|
-
return g(),
|
|
7073
|
+
return g(), f("div");
|
|
7065
7074
|
}
|
|
7066
7075
|
const ao = /* @__PURE__ */ T(eo, [["render", to]]), io = {
|
|
7067
7076
|
name: "IdmVoluntaryReportingArea",
|
|
@@ -7152,7 +7161,7 @@ const ao = /* @__PURE__ */ T(eo, [["render", to]]), io = {
|
|
|
7152
7161
|
}
|
|
7153
7162
|
};
|
|
7154
7163
|
function ro(t, e, a, r, i, o) {
|
|
7155
|
-
return g(),
|
|
7164
|
+
return g(), f("div");
|
|
7156
7165
|
}
|
|
7157
7166
|
const oo = /* @__PURE__ */ T(io, [["render", ro]]), so = {
|
|
7158
7167
|
name: "IdmSpecialArea",
|
|
@@ -7245,7 +7254,7 @@ const oo = /* @__PURE__ */ T(io, [["render", ro]]), so = {
|
|
|
7245
7254
|
}
|
|
7246
7255
|
};
|
|
7247
7256
|
function no(t, e, a, r, i, o) {
|
|
7248
|
-
return g(),
|
|
7257
|
+
return g(), f("div");
|
|
7249
7258
|
}
|
|
7250
7259
|
const lo = /* @__PURE__ */ T(so, [["render", no]]), co = {
|
|
7251
7260
|
name: "IdmTerminator",
|
|
@@ -7297,7 +7306,7 @@ const lo = /* @__PURE__ */ T(so, [["render", no]]), co = {
|
|
|
7297
7306
|
}
|
|
7298
7307
|
};
|
|
7299
7308
|
function ho(t, e, a, r, i, o) {
|
|
7300
|
-
return g(),
|
|
7309
|
+
return g(), f("div");
|
|
7301
7310
|
}
|
|
7302
7311
|
const po = /* @__PURE__ */ T(co, [["render", ho]]);
|
|
7303
7312
|
const mo = {
|
|
@@ -7457,7 +7466,7 @@ const mo = {
|
|
|
7457
7466
|
}
|
|
7458
7467
|
};
|
|
7459
7468
|
function uo(t, e, a, r, i, o) {
|
|
7460
|
-
return i.lngLat ? (g(),
|
|
7469
|
+
return i.lngLat ? (g(), f("div", {
|
|
7461
7470
|
key: 0,
|
|
7462
7471
|
class: "lat-lng-tip",
|
|
7463
7472
|
style: J({ right: i.right + "px", bottom: a.bottom })
|
|
@@ -7533,14 +7542,14 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7533
7542
|
}
|
|
7534
7543
|
},
|
|
7535
7544
|
handleDrag(t) {
|
|
7536
|
-
var a, r, i, o,
|
|
7545
|
+
var a, r, i, o, l, c, h, p, n, d;
|
|
7537
7546
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
7538
7547
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7539
7548
|
const b = this.geojson.filter((m) => m.id === e.split("-")[0])[0];
|
|
7540
7549
|
this.pointMarkers[b.id].filter((m) => {
|
|
7541
7550
|
var v;
|
|
7542
7551
|
return ((v = m._element) == null ? void 0 : v.id) === e;
|
|
7543
|
-
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (
|
|
7552
|
+
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (l = t.target) == null ? void 0 : l._lngLat) == null ? void 0 : c.lat]);
|
|
7544
7553
|
let A;
|
|
7545
7554
|
b.features.forEach((m, v) => {
|
|
7546
7555
|
if (m.geometry.type === "Point" && m.properties.id == e.split("-")[1]) {
|
|
@@ -7552,22 +7561,22 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7552
7561
|
this.handleTmpPointUpdate(
|
|
7553
7562
|
b,
|
|
7554
7563
|
w[A - 1],
|
|
7555
|
-
{ lng: (p = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : p.lng, lat: (d = (
|
|
7564
|
+
{ lng: (p = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : p.lng, lat: (d = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : d.lat, properties: w[A].properties },
|
|
7556
7565
|
A === w.length - 1 ? void 0 : w[A + 1]
|
|
7557
7566
|
);
|
|
7558
7567
|
}
|
|
7559
7568
|
},
|
|
7560
7569
|
handleDragEnd(t) {
|
|
7561
|
-
var a, r, i, o,
|
|
7570
|
+
var a, r, i, o, l, c, h, p, n, d;
|
|
7562
7571
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
7563
7572
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7564
7573
|
const b = this.geojson.filter((w) => w.id === e.split("-")[0])[0];
|
|
7565
7574
|
this.pointMarkers[b.id].filter((w) => {
|
|
7566
7575
|
var m;
|
|
7567
7576
|
return ((m = w._element) == null ? void 0 : m.id) === e;
|
|
7568
|
-
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (
|
|
7577
|
+
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (l = t.target) == null ? void 0 : l._lngLat) == null ? void 0 : c.lat]);
|
|
7569
7578
|
const A = b.features.filter((w) => w.geometry.type === "Point" && w.properties.id == e.split("-")[1])[0];
|
|
7570
|
-
A.geometry.coordinates = [(p = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : p.lng, (d = (
|
|
7579
|
+
A.geometry.coordinates = [(p = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : p.lng, (d = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : d.lat], b.features = b.features.filter((w) => w.geometry.type === "Point"), this.handlePointUpdate(b);
|
|
7571
7580
|
}
|
|
7572
7581
|
},
|
|
7573
7582
|
handleContextmenu(t) {
|
|
@@ -7583,18 +7592,18 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7583
7592
|
}
|
|
7584
7593
|
},
|
|
7585
7594
|
handleClick(t) {
|
|
7586
|
-
var a, r, i, o,
|
|
7595
|
+
var a, r, i, o, l, c;
|
|
7587
7596
|
(a = this.contextmenu) == null || a.remove();
|
|
7588
7597
|
const e = t.originalEvent.target.className;
|
|
7589
7598
|
if (e === "marker-close") {
|
|
7590
|
-
const h = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, p = this.geojson.filter((
|
|
7591
|
-
p && this.handleClear(p, !0), this.geojson = this.geojson.filter((
|
|
7599
|
+
const h = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, p = this.geojson.filter((n) => n.id === h)[0];
|
|
7600
|
+
p && this.handleClear(p, !0), this.geojson = this.geojson.filter((n) => n.id !== h), !this.show && !((o = this.geojson) != null && o.some((n) => n.closed)) && this.handleUnbind();
|
|
7592
7601
|
} else if (e === "del-point") {
|
|
7593
|
-
const h = (c = (
|
|
7594
|
-
p.features = p.features.filter((
|
|
7602
|
+
const h = (c = (l = t.originalEvent.target.id) == null ? void 0 : l.replace("del-", "")) == null ? void 0 : c.split("-"), p = this.geojson.filter((n) => n.id === h[0])[0];
|
|
7603
|
+
p.features = p.features.filter((n) => n.geometry.type === "Point" && n.properties.id !== h[1]), this.handlePointUpdate(p);
|
|
7595
7604
|
} else if (e !== "marker-label" && this.show) {
|
|
7596
7605
|
let h = this.geojson.at(-1);
|
|
7597
|
-
h || (h = D.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(h)), h.features = h.features.filter((
|
|
7606
|
+
h || (h = D.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(h)), h.features = h.features.filter((n) => n.geometry.type === "Point");
|
|
7598
7607
|
const p = D.feature(
|
|
7599
7608
|
{
|
|
7600
7609
|
type: "Point",
|
|
@@ -7614,12 +7623,12 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7614
7623
|
let a = 0;
|
|
7615
7624
|
const r = [];
|
|
7616
7625
|
for (let i = 1; i < e.length; i++) {
|
|
7617
|
-
const o = e[i - 1],
|
|
7618
|
-
a = G.roundPrecision(a +
|
|
7626
|
+
const o = e[i - 1], l = e[i], c = o.properties, h = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, p = { lng: l.geometry.coordinates[0], lat: l.geometry.coordinates[1] }, n = be.calculateDistance(h, p, c.mode === "RL", 2), d = be.calculateBearing(h, p, c.mode === "RL", 2);
|
|
7627
|
+
a = G.roundPrecision(a + n, 2);
|
|
7619
7628
|
let b;
|
|
7620
7629
|
c.mode === "RL" ? b = G.convertToMonotonicLng([h, p]) : b = G.convertToMonotonicLng(be.interpolateCoordinates(h, p, 200));
|
|
7621
7630
|
const u = D.lineString(b.map((A) => [A.lng, A.lat]));
|
|
7622
|
-
u.properties.dist =
|
|
7631
|
+
u.properties.dist = n, u.properties.bearing = d, u.properties.total = a, r.push(u);
|
|
7623
7632
|
}
|
|
7624
7633
|
e.push(...r), t.total = a;
|
|
7625
7634
|
}
|
|
@@ -7627,22 +7636,22 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7627
7636
|
},
|
|
7628
7637
|
handleTmpPointUpdate(t, e, a, r) {
|
|
7629
7638
|
const i = D.featureCollection([]);
|
|
7630
|
-
let o,
|
|
7639
|
+
let o, l;
|
|
7631
7640
|
if (e) {
|
|
7632
|
-
const h = e.properties, p = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] },
|
|
7633
|
-
o = be.calculateDistance(p,
|
|
7641
|
+
const h = e.properties, p = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, n = { lng: a.lng, lat: a.lat };
|
|
7642
|
+
o = be.calculateDistance(p, n, h.mode === "RL", 2), l = be.calculateBearing(p, n, h.mode === "RL", 2);
|
|
7634
7643
|
let d;
|
|
7635
|
-
h.mode === "RL" ? d = G.convertToMonotonicLng([p,
|
|
7644
|
+
h.mode === "RL" ? d = G.convertToMonotonicLng([p, n]) : d = G.convertToMonotonicLng(be.interpolateCoordinates(p, n, 200));
|
|
7636
7645
|
const b = D.lineString(d.map((u) => [u.lng, u.lat]));
|
|
7637
|
-
b.properties.dist = o, b.properties.bearing =
|
|
7646
|
+
b.properties.dist = o, b.properties.bearing = l, i.features.push(b);
|
|
7638
7647
|
}
|
|
7639
7648
|
if (r) {
|
|
7640
|
-
const h = a.properties, p = a,
|
|
7641
|
-
o = be.calculateDistance(p,
|
|
7649
|
+
const h = a.properties, p = a, n = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
7650
|
+
o = be.calculateDistance(p, n, h.mode === "RL", 2), l = be.calculateBearing(p, n, h.mode === "RL", 2);
|
|
7642
7651
|
let d;
|
|
7643
|
-
h.mode === "RL" ? d = G.convertToMonotonicLng([p,
|
|
7652
|
+
h.mode === "RL" ? d = G.convertToMonotonicLng([p, n]) : d = G.convertToMonotonicLng(be.interpolateCoordinates(p, n, 200));
|
|
7644
7653
|
const b = D.lineString(d.map((u) => [u.lng, u.lat]));
|
|
7645
|
-
b.properties.dist = o, b.properties.bearing =
|
|
7654
|
+
b.properties.dist = o, b.properties.bearing = l, i.features.push(b);
|
|
7646
7655
|
}
|
|
7647
7656
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(i) : this.map.addSource(this.tmpSource, {
|
|
7648
7657
|
type: "geojson",
|
|
@@ -7682,7 +7691,7 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7682
7691
|
}
|
|
7683
7692
|
});
|
|
7684
7693
|
let c;
|
|
7685
|
-
if (r ? c = '<div class="marker-label">Drag and drop</div>' : c = `<div class="marker-label">Total distance: <b>${G.roundPrecision((t.total ?? 0) + o, 2)}</b>nm, bearing: <b>${
|
|
7694
|
+
if (r ? c = '<div class="marker-label">Drag and drop</div>' : c = `<div class="marker-label">Total distance: <b>${G.roundPrecision((t.total ?? 0) + o, 2)}</b>nm, bearing: <b>${l}</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)
|
|
7686
7695
|
this.tipMarker._element.innerHTML = c, this.tipMarker.setLngLat([a.lng, a.lat]);
|
|
7687
7696
|
else {
|
|
7688
7697
|
const h = document.createElement("div");
|
|
@@ -7740,30 +7749,30 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7740
7749
|
"text-halo-blur": 0
|
|
7741
7750
|
}
|
|
7742
7751
|
});
|
|
7743
|
-
const o = t.features.filter((
|
|
7744
|
-
for (const
|
|
7752
|
+
const o = t.features.filter((l) => l.geometry.type === "Point");
|
|
7753
|
+
for (const l of o) {
|
|
7745
7754
|
const c = document.createElement("div");
|
|
7746
|
-
c.id = `${t.id}-${
|
|
7747
|
-
const h = new ve.Marker({ element: c, draggable: !0, contextmenu: !0 }).setLngLat(
|
|
7755
|
+
c.id = `${t.id}-${l.properties.id}`, c.className = `${t.closed ? "point-marker closed" : "point-marker"}`, c.innerHTML = '<div class="marker-circle"></div>';
|
|
7756
|
+
const h = new ve.Marker({ element: c, draggable: !0, contextmenu: !0 }).setLngLat(l.geometry.coordinates).addTo(this.map);
|
|
7748
7757
|
h.on("drag", this.handleDrag), h.on("dragend", this.handleDragEnd), this.pointMarkers[t.id] ? this.pointMarkers[t.id].push(h) : this.pointMarkers[t.id] = [h];
|
|
7749
7758
|
}
|
|
7750
7759
|
if (t.closed) {
|
|
7751
|
-
const
|
|
7752
|
-
p.className = "point-summary-marker", p.innerHTML = `<div id="${t.id}" class="marker-close">×</div><div class="marker-label">Tol: ${h.properties.total}nm</div>`, this.closeMarkers[t.id] = new ve.Marker(p).setOffset([60, 0]).setLngLat(
|
|
7760
|
+
const l = o.at(-1), h = t.features.filter((n) => n.geometry.type === "LineString").at(-1), p = document.createElement("div");
|
|
7761
|
+
p.className = "point-summary-marker", p.innerHTML = `<div id="${t.id}" class="marker-close">×</div><div class="marker-label">Tol: ${h.properties.total}nm</div>`, this.closeMarkers[t.id] = new ve.Marker(p).setOffset([60, 0]).setLngLat(l.geometry.coordinates).addTo(this.map);
|
|
7753
7762
|
}
|
|
7754
7763
|
}
|
|
7755
7764
|
},
|
|
7756
7765
|
handleClear(t, e = !0) {
|
|
7757
|
-
var o,
|
|
7766
|
+
var o, l, c, h, p, n, d, b, u;
|
|
7758
7767
|
const a = `${t.id}-${this.source}`, r = `${t.id}-${this.layer}`, i = `${t.id}-${this.labelLayer}`;
|
|
7759
|
-
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (
|
|
7768
|
+
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (l = this.map) != null && l.getLayer(i) && this.map.removeLayer(i), (c = this.map) != null && c.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (h = this.map) != null && h.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (p = this.closeMarkers[t.id]) == null || p.remove(), this.closeMarkers[t.id] = void 0, (n = this.pointMarkers[t.id]) == null || n.forEach((A) => {
|
|
7760
7769
|
A == null || A.remove();
|
|
7761
7770
|
}), this.pointMarkers[t.id] = [], (d = this.tipMarker) == null || d.remove(), this.tipMarker = void 0, e && ((b = this.map) != null && b.getSource(a)) && this.map.removeSource(a), e && ((u = this.map) != null && u.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
7762
7771
|
}
|
|
7763
7772
|
}
|
|
7764
7773
|
};
|
|
7765
7774
|
function Ao(t, e, a, r, i, o) {
|
|
7766
|
-
return g(),
|
|
7775
|
+
return g(), f("div");
|
|
7767
7776
|
}
|
|
7768
7777
|
const yo = /* @__PURE__ */ T(go, [["render", Ao]]);
|
|
7769
7778
|
const fo = {
|
|
@@ -7820,14 +7829,14 @@ const fo = {
|
|
|
7820
7829
|
methods: {}
|
|
7821
7830
|
}, wo = { key: 0 }, bo = { class: "bar-item" };
|
|
7822
7831
|
function vo(t, e, a, r, i, o) {
|
|
7823
|
-
const
|
|
7824
|
-
return a.enabled && a.permission & i.helper.LEVEL.Supper ? (g(),
|
|
7832
|
+
const l = z("ElTooltip");
|
|
7833
|
+
return a.enabled && a.permission & i.helper.LEVEL.Supper ? (g(), f("div", wo, [
|
|
7825
7834
|
s("div", {
|
|
7826
7835
|
class: "menu-bar-box",
|
|
7827
7836
|
style: J({ position: "absolute", right: i.right + "px", bottom: a.bottom })
|
|
7828
7837
|
}, [
|
|
7829
7838
|
s("div", bo, [
|
|
7830
|
-
k(
|
|
7839
|
+
k(l, {
|
|
7831
7840
|
placement: "left",
|
|
7832
7841
|
effect: "light",
|
|
7833
7842
|
content: "Hifleet",
|
|
@@ -7843,7 +7852,7 @@ function vo(t, e, a, r, i, o) {
|
|
|
7843
7852
|
]),
|
|
7844
7853
|
_: 1
|
|
7845
7854
|
}),
|
|
7846
|
-
k(
|
|
7855
|
+
k(l, {
|
|
7847
7856
|
placement: "left",
|
|
7848
7857
|
effect: "light",
|
|
7849
7858
|
content: "I4insight",
|
|
@@ -8112,16 +8121,17 @@ const Mo = {
|
|
|
8112
8121
|
},
|
|
8113
8122
|
enc: {
|
|
8114
8123
|
handler(t, e) {
|
|
8115
|
-
var a, r, i, o,
|
|
8116
|
-
t ? ((r = (a = this.map) == null ? void 0 : a.getLayer(t)) == null || r.setLayoutProperty("visibility", "visible"), (o = (i = this.map) == null ? void 0 : i.getLayer(e)) == null || o.setLayoutProperty("visibility", "none")) : ((c = (
|
|
8124
|
+
var a, r, i, o, l, c, h, p;
|
|
8125
|
+
t ? ((r = (a = this.map) == null ? void 0 : a.getLayer(t)) == null || r.setLayoutProperty("visibility", "visible"), (o = (i = this.map) == null ? void 0 : i.getLayer(e)) == null || o.setLayoutProperty("visibility", "none")) : ((c = (l = this.map) == null ? void 0 : l.getLayer("i4")) == null || c.setLayoutProperty("visibility", "none"), (p = (h = this.map) == null ? void 0 : h.getLayer("hi")) == null || p.setLayoutProperty("visibility", "none"));
|
|
8117
8126
|
}
|
|
8118
8127
|
},
|
|
8119
8128
|
activeWeatherLayers: {
|
|
8120
8129
|
handler() {
|
|
8121
|
-
var
|
|
8130
|
+
var a, r, i, o, l, c, h, p, n, d, b, u, A, w, m, v, y;
|
|
8122
8131
|
if (!this.map)
|
|
8123
8132
|
return !1;
|
|
8124
|
-
|
|
8133
|
+
const t = this.activeWeatherLayers.some((L) => L.key === "wind" && L.particle === !0 || L.key === "current" && L.particle === !0 || L.key === "temp" || L.key === "water-temp"), e = this.activeWeatherLayers.some((L) => L.key === "visibility" || L.key === "precip3h");
|
|
8134
|
+
this.activeWeatherLayers.length > 0 ? (t ? (r = (a = this.map) == null ? void 0 : a.getLayer(this.enc)) == null || r.setLayoutProperty("visibility", "none") : (o = (i = this.map) == null ? void 0 : i.getLayer(this.enc)) == null || o.setLayoutProperty("visibility", "visible"), (c = (l = this.map) == null ? void 0 : l.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || c.setLayoutProperty("visibility", "visible"), (p = this.map) != null && p.getLayer((h = this.viewport) == null ? void 0 : h.rampColorLayer) && ((n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((b = this.map) == null || b.moveLayer((d = this.viewport) == null ? void 0 : d.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), e && ((A = this.map) == null || A.moveLayer(this.helper.mapboxCustomer.layers.countryBoundary.id, (u = this.viewport) == null ? void 0 : u.rampColorLayer))) : ((m = (w = this.map) == null ? void 0 : w.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || m.setLayoutProperty("visibility", "none"), (y = (v = this.map) == null ? void 0 : v.getLayer(this.enc)) == null || y.setLayoutProperty("visibility", "visible")), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
|
|
8125
8135
|
},
|
|
8126
8136
|
immediate: !0
|
|
8127
8137
|
},
|
|
@@ -8173,28 +8183,28 @@ const Mo = {
|
|
|
8173
8183
|
},
|
|
8174
8184
|
methods: {
|
|
8175
8185
|
async fetchWeatherLayers(t = { tropicals: !1 }) {
|
|
8176
|
-
var i, o,
|
|
8186
|
+
var i, o, l, c, h, p, n, d, b;
|
|
8177
8187
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
8178
8188
|
let a = 0, r = 0;
|
|
8179
8189
|
if (this.map) {
|
|
8180
8190
|
const u = ((i = this.map) == null ? void 0 : i.getZoom()) + 1, A = (o = this.map) == null ? void 0 : o.getBounds(), w = `${A._sw.lng},${A._sw.lat},${A._ne.lng},${A._ne.lat}`;
|
|
8181
|
-
if (this.particleFactor && ((
|
|
8191
|
+
if (this.particleFactor && ((l = this.$refs.layer) != null && l.autoActive)) {
|
|
8182
8192
|
const m = Ke.WEATHER_LAYERS.find((v) => {
|
|
8183
|
-
var
|
|
8184
|
-
return ((
|
|
8193
|
+
var y;
|
|
8194
|
+
return ((y = v.peer) == null ? void 0 : y.weight) === this.particleFactor.weight;
|
|
8185
8195
|
});
|
|
8186
8196
|
this.particleFactor.particle && (this.showWindParticle || this.showCurrentParticle) ? this.weatherWeight = this.weatherWeight & m.weight ? this.weatherWeight : this.weatherWeight + m.weight : this.weatherWeight = this.weatherWeight & m.weight ? this.weatherWeight - m.weight : this.weatherWeight;
|
|
8187
8197
|
}
|
|
8188
8198
|
if (this.weatherWeight > 0) {
|
|
8189
8199
|
let m = this.weatherWeight, v;
|
|
8190
8200
|
if (t.tropicals || this.weatherWeight & 256 && (v = this.weatherLayers.tropicals, v && (m -= 256, v.version = Math.random() + 1)), m > 0) {
|
|
8191
|
-
const
|
|
8201
|
+
const y = await le.get(`${this.gateway}/api/arc/weather/layers/links?l=${m}&v=${this.source}&z=${u}&bbox=${w}&t=${this.ts}`, {
|
|
8192
8202
|
headers: {
|
|
8193
8203
|
Authorization: this.token || this.defaultMeteoToken
|
|
8194
8204
|
}
|
|
8195
8205
|
});
|
|
8196
|
-
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + a), console.log("weather links elapsed: ", r, ", total: ", a += r), ((c =
|
|
8197
|
-
const L = (h =
|
|
8206
|
+
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + a), console.log("weather links elapsed: ", r, ", total: ", a += r), ((c = y == null ? void 0 : y.data) == null ? void 0 : c.code) === 0) {
|
|
8207
|
+
const L = (h = y == null ? void 0 : y.data) == null ? void 0 : h.data, P = [];
|
|
8198
8208
|
for (const I in L)
|
|
8199
8209
|
I === "ice-edge" && (L[I] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), I !== "tropicals" && P.push(
|
|
8200
8210
|
le.get(L[I], {
|
|
@@ -8235,7 +8245,7 @@ const Mo = {
|
|
|
8235
8245
|
});
|
|
8236
8246
|
}
|
|
8237
8247
|
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + a), console.log("weather layers elapsed: ", r, ", total: ", a += r), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
|
|
8238
|
-
const L = (p = this.weatherLayers["swell-direction"]) == null ? void 0 : p.raw, P = (
|
|
8248
|
+
const L = (p = this.weatherLayers["swell-direction"]) == null ? void 0 : p.raw, P = (n = this.weatherLayers["swell-height"]) == null ? void 0 : n.raw;
|
|
8239
8249
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
8240
8250
|
type: "json",
|
|
8241
8251
|
direction: L,
|
|
@@ -8264,16 +8274,16 @@ const Mo = {
|
|
|
8264
8274
|
if (this.map) {
|
|
8265
8275
|
let o = this.otherWeight;
|
|
8266
8276
|
if (o) {
|
|
8267
|
-
let
|
|
8268
|
-
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048,
|
|
8277
|
+
let l = !1, c = !1, h = !1, p = !1;
|
|
8278
|
+
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, l = !0), this.otherWeight & 8192 && (o = o - 8192, c = !0), this.otherWeight & 16384 && (o = o - 16384, h = !0), this.otherWeight & 32768 && (o = o - 32768, p = !0), o) {
|
|
8269
8279
|
if (t.all) {
|
|
8270
|
-
const
|
|
8280
|
+
const n = await le.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
|
|
8271
8281
|
headers: {
|
|
8272
8282
|
Authorization: this.token || this.defaultMeteoToken
|
|
8273
8283
|
}
|
|
8274
8284
|
});
|
|
8275
|
-
if (((e =
|
|
8276
|
-
const d = (a =
|
|
8285
|
+
if (((e = n == null ? void 0 : n.data) == null ? void 0 : e.code) === 0) {
|
|
8286
|
+
const d = (a = n == null ? void 0 : n.data) == null ? void 0 : a.data, b = [];
|
|
8277
8287
|
for (const A in d)
|
|
8278
8288
|
b.push(
|
|
8279
8289
|
le.get(d[A], {
|
|
@@ -8284,20 +8294,20 @@ const Mo = {
|
|
|
8284
8294
|
})
|
|
8285
8295
|
);
|
|
8286
8296
|
const u = await Promise.all(b);
|
|
8287
|
-
this.otherLayers = { enc:
|
|
8288
|
-
var v,
|
|
8289
|
-
const w = ((v = A == null ? void 0 : A.data) == null ? void 0 : v.data) || (A == null ? void 0 : A.data), m = (L = (
|
|
8297
|
+
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute: p }, u.map((A) => {
|
|
8298
|
+
var v, y, L;
|
|
8299
|
+
const w = ((v = A == null ? void 0 : A.data) == null ? void 0 : v.data) || (A == null ? void 0 : A.data), m = (L = (y = A == null ? void 0 : A.config) == null ? void 0 : y.headers) == null ? void 0 : L.key;
|
|
8290
8300
|
this.otherLayers[m] = w;
|
|
8291
8301
|
});
|
|
8292
8302
|
}
|
|
8293
8303
|
} else if (t.dayNight && o & 1024) {
|
|
8294
|
-
const
|
|
8304
|
+
const n = await le.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
|
|
8295
8305
|
headers: {
|
|
8296
8306
|
Authorization: this.token || this.defaultMeteoToken
|
|
8297
8307
|
}
|
|
8298
8308
|
});
|
|
8299
|
-
if (((r =
|
|
8300
|
-
const d = (i =
|
|
8309
|
+
if (((r = n == null ? void 0 : n.data) == null ? void 0 : r.code) === 0) {
|
|
8310
|
+
const d = (i = n == null ? void 0 : n.data) == null ? void 0 : i.data, b = [];
|
|
8301
8311
|
for (const A in d)
|
|
8302
8312
|
b.push(
|
|
8303
8313
|
le.get(d[A], {
|
|
@@ -8308,14 +8318,14 @@ const Mo = {
|
|
|
8308
8318
|
})
|
|
8309
8319
|
);
|
|
8310
8320
|
(await Promise.all(b)).map((A) => {
|
|
8311
|
-
var v,
|
|
8312
|
-
const w = ((v = A == null ? void 0 : A.data) == null ? void 0 : v.data) || (A == null ? void 0 : A.data), m = (L = (
|
|
8321
|
+
var v, y, L;
|
|
8322
|
+
const w = ((v = A == null ? void 0 : A.data) == null ? void 0 : v.data) || (A == null ? void 0 : A.data), m = (L = (y = A == null ? void 0 : A.config) == null ? void 0 : y.headers) == null ? void 0 : L.key;
|
|
8313
8323
|
this.otherLayers[m] = w;
|
|
8314
8324
|
});
|
|
8315
8325
|
}
|
|
8316
8326
|
}
|
|
8317
8327
|
} else
|
|
8318
|
-
this.otherLayers = { enc:
|
|
8328
|
+
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute: p };
|
|
8319
8329
|
} else
|
|
8320
8330
|
this.otherLayers = {};
|
|
8321
8331
|
this.handleBeforeLayerToggle();
|
|
@@ -8331,7 +8341,7 @@ const Mo = {
|
|
|
8331
8341
|
this.activeWindLayer = !!this.activeWeatherLayers.find((e) => e.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
8332
8342
|
},
|
|
8333
8343
|
handleRampColorInitial() {
|
|
8334
|
-
var t, e, a, r, i, o,
|
|
8344
|
+
var t, e, a, r, i, o, l, c, h, p, n, d;
|
|
8335
8345
|
this.viewport.map.getSource((t = this.viewport) == null ? void 0 : t.rampColorSource) || this.viewport.map.addSource((e = this.viewport) == null ? void 0 : e.rampColorSource, {
|
|
8336
8346
|
type: "canvas",
|
|
8337
8347
|
canvas: (a = this.viewport) == null ? void 0 : a.rampColorCanvas,
|
|
@@ -8347,7 +8357,7 @@ const Mo = {
|
|
|
8347
8357
|
}
|
|
8348
8358
|
},
|
|
8349
8359
|
this.beforeLayer
|
|
8350
|
-
), this.viewport.map.getSource((
|
|
8360
|
+
), this.viewport.map.getSource((l = this.viewport) == null ? void 0 : l.particleSource) || this.viewport.map.addSource((c = this.viewport) == null ? void 0 : c.particleSource, {
|
|
8351
8361
|
type: "canvas",
|
|
8352
8362
|
canvas: (h = this.viewport) == null ? void 0 : h.particleCanvas,
|
|
8353
8363
|
animate: !0,
|
|
@@ -8355,7 +8365,7 @@ const Mo = {
|
|
|
8355
8365
|
}), this.viewport.map.getLayer((p = this.viewport) == null ? void 0 : p.particleLayer) || this.viewport.map.addLayer(
|
|
8356
8366
|
{
|
|
8357
8367
|
type: "raster",
|
|
8358
|
-
id: (
|
|
8368
|
+
id: (n = this.viewport) == null ? void 0 : n.particleLayer,
|
|
8359
8369
|
source: (d = this.viewport) == null ? void 0 : d.particleSource,
|
|
8360
8370
|
layout: {
|
|
8361
8371
|
visibility: "none"
|
|
@@ -8365,49 +8375,48 @@ const Mo = {
|
|
|
8365
8375
|
);
|
|
8366
8376
|
},
|
|
8367
8377
|
handleDragEndWithZoom4Json() {
|
|
8368
|
-
var p,
|
|
8378
|
+
var p, n, d, b;
|
|
8369
8379
|
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
8370
8380
|
let e = 0, a = 0;
|
|
8371
|
-
const r = (p = this.map) == null ? void 0 : p.getBounds(), i = this.map.getZoom(), o = G.convertToStdLng(r._sw.lng),
|
|
8372
|
-
console.log(o, n, i);
|
|
8381
|
+
const r = (p = this.map) == null ? void 0 : p.getBounds(), i = this.map.getZoom(), o = G.convertToStdLng(r._sw.lng), l = G.convertToStdLng(r._ne.lng), c = Math.floor(r._sw.lat), h = Math.ceil(r._ne.lat);
|
|
8373
8382
|
for (const u in this.weatherLayers)
|
|
8374
8383
|
if (this.weatherLayers[u].active && this.weatherLayers[u].type === "json") {
|
|
8375
8384
|
this.weatherLayers[u].active = !1, this.weatherLayers[u].version = Math.random() + 1;
|
|
8376
8385
|
let A = [];
|
|
8377
8386
|
if (["swell", "current"].includes(u)) {
|
|
8378
|
-
const w = ((
|
|
8387
|
+
const w = ((n = this.weatherLayers[u]) == null ? void 0 : n.direction) || {};
|
|
8379
8388
|
for (const m in w)
|
|
8380
8389
|
if (m > c && m < h && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8381
8390
|
const v = w[m].lng;
|
|
8382
|
-
o >
|
|
8391
|
+
o > l ? v.forEach((y, L) => {
|
|
8383
8392
|
var P, M;
|
|
8384
8393
|
if (i < 2) {
|
|
8385
|
-
if ((
|
|
8386
|
-
const I = D.point([
|
|
8394
|
+
if ((y >= 0 && y <= 360 || y >= -360 && y <= 0) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8395
|
+
const I = D.point([y, m], {
|
|
8387
8396
|
val: w[m].val[L],
|
|
8388
8397
|
spd: (P = w[m].spd) == null ? void 0 : P[L]
|
|
8389
8398
|
});
|
|
8390
8399
|
A.push(I);
|
|
8391
8400
|
}
|
|
8392
|
-
} else if ((
|
|
8393
|
-
const I = D.point([
|
|
8401
|
+
} else if ((y >= o && y <= 180 || y >= -180 && y <= l) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8402
|
+
const I = D.point([y, m], {
|
|
8394
8403
|
val: w[m].val[L],
|
|
8395
8404
|
spd: (M = w[m].spd) == null ? void 0 : M[L]
|
|
8396
8405
|
});
|
|
8397
8406
|
A.push(I);
|
|
8398
8407
|
}
|
|
8399
|
-
}) : v.forEach((
|
|
8408
|
+
}) : v.forEach((y, L) => {
|
|
8400
8409
|
var P, M;
|
|
8401
8410
|
if (o < 2) {
|
|
8402
|
-
if ((
|
|
8403
|
-
const I = D.point([
|
|
8411
|
+
if ((y >= 0 && y <= 360 || y >= -360 && y <= 0) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8412
|
+
const I = D.point([y, m], {
|
|
8404
8413
|
val: w[m].val[L],
|
|
8405
8414
|
spd: (P = w[m].spd) == null ? void 0 : P[L]
|
|
8406
8415
|
});
|
|
8407
8416
|
A.push(I);
|
|
8408
8417
|
}
|
|
8409
|
-
} else if (
|
|
8410
|
-
const I = D.point([
|
|
8418
|
+
} else if (y >= o && y <= l && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8419
|
+
const I = D.point([y, m], {
|
|
8411
8420
|
val: w[m].val[L],
|
|
8412
8421
|
spd: (M = w[m].spd) == null ? void 0 : M[L]
|
|
8413
8422
|
});
|
|
@@ -8420,12 +8429,12 @@ const Mo = {
|
|
|
8420
8429
|
if (m) {
|
|
8421
8430
|
if (!m.data) {
|
|
8422
8431
|
const v = [];
|
|
8423
|
-
for (const
|
|
8424
|
-
const L = m.raw.LineString[
|
|
8432
|
+
for (const y in (d = m.raw) == null ? void 0 : d.LineString) {
|
|
8433
|
+
const L = m.raw.LineString[y];
|
|
8425
8434
|
for (const P of L)
|
|
8426
8435
|
v.push(
|
|
8427
8436
|
D.lineString(P, {
|
|
8428
|
-
val: Number(
|
|
8437
|
+
val: Number(y)
|
|
8429
8438
|
})
|
|
8430
8439
|
);
|
|
8431
8440
|
m.data = D.featureCollection(v);
|
|
@@ -8442,19 +8451,19 @@ const Mo = {
|
|
|
8442
8451
|
const m = this.weatherLayers[u].speed;
|
|
8443
8452
|
if (m) {
|
|
8444
8453
|
if (!m.data) {
|
|
8445
|
-
const
|
|
8454
|
+
const y = [];
|
|
8446
8455
|
for (const L in (b = m.raw) == null ? void 0 : b.Polygon) {
|
|
8447
8456
|
const P = m.raw.Polygon[L];
|
|
8448
8457
|
for (const M of P)
|
|
8449
|
-
|
|
8458
|
+
y.push(
|
|
8450
8459
|
D.polygon(M, {
|
|
8451
8460
|
val: Number(L)
|
|
8452
8461
|
})
|
|
8453
8462
|
);
|
|
8454
8463
|
}
|
|
8455
|
-
m.data = D.featureCollection(
|
|
8464
|
+
m.data = D.featureCollection(y);
|
|
8456
8465
|
}
|
|
8457
|
-
const v = i < this.zoom ? m.data.features.filter((
|
|
8466
|
+
const v = i < this.zoom ? m.data.features.filter((y) => y.properties.val > 0.5) : m.data.features;
|
|
8458
8467
|
A = A.concat(v), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("speed elapsed: ", a, ", total: ", e += a);
|
|
8459
8468
|
}
|
|
8460
8469
|
}
|
|
@@ -8463,33 +8472,33 @@ const Mo = {
|
|
|
8463
8472
|
for (const m in w)
|
|
8464
8473
|
if (m > c && m < h && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8465
8474
|
const v = w[m].lng;
|
|
8466
|
-
o >
|
|
8475
|
+
o > l ? v.forEach((y, L) => {
|
|
8467
8476
|
if (i < 2) {
|
|
8468
|
-
if ((
|
|
8469
|
-
const P = D.point([
|
|
8477
|
+
if ((y >= 0 && y <= 360 || y >= -360 && y <= 0) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8478
|
+
const P = D.point([y, m], {
|
|
8470
8479
|
val: w[m].val[L],
|
|
8471
8480
|
spd: w[m].spd[L]
|
|
8472
8481
|
});
|
|
8473
8482
|
A.push(P);
|
|
8474
8483
|
}
|
|
8475
|
-
} else if ((
|
|
8476
|
-
const P = D.point([
|
|
8484
|
+
} else if ((y >= o && y <= 180 || y >= -180 && y <= l) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8485
|
+
const P = D.point([y, m], {
|
|
8477
8486
|
val: w[m].val[L],
|
|
8478
8487
|
spd: w[m].spd[L]
|
|
8479
8488
|
});
|
|
8480
8489
|
A.push(P);
|
|
8481
8490
|
}
|
|
8482
|
-
}) : v.forEach((
|
|
8491
|
+
}) : v.forEach((y, L) => {
|
|
8483
8492
|
if (i < 2) {
|
|
8484
|
-
if ((
|
|
8485
|
-
const P = D.point([
|
|
8493
|
+
if ((y >= 0 && y <= 360 || y >= -360 && y <= 0) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8494
|
+
const P = D.point([y, m], {
|
|
8486
8495
|
val: w[m].val[L],
|
|
8487
8496
|
spd: w[m].spd[L]
|
|
8488
8497
|
});
|
|
8489
8498
|
A.push(P);
|
|
8490
8499
|
}
|
|
8491
|
-
} else if (
|
|
8492
|
-
const P = D.point([
|
|
8500
|
+
} else if (y >= o && y <= l && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8501
|
+
const P = D.point([y, m], {
|
|
8493
8502
|
val: w[m].val[L],
|
|
8494
8503
|
spd: w[m].spd[L]
|
|
8495
8504
|
});
|
|
@@ -8506,8 +8515,8 @@ const Mo = {
|
|
|
8506
8515
|
if (w) {
|
|
8507
8516
|
const m = [];
|
|
8508
8517
|
for (const v in w.Polygon) {
|
|
8509
|
-
const
|
|
8510
|
-
for (const L of
|
|
8518
|
+
const y = w.Polygon[v];
|
|
8519
|
+
for (const L of y)
|
|
8511
8520
|
m.push(
|
|
8512
8521
|
D.polygon(L, {
|
|
8513
8522
|
val: Number(v)
|
|
@@ -8515,8 +8524,8 @@ const Mo = {
|
|
|
8515
8524
|
);
|
|
8516
8525
|
}
|
|
8517
8526
|
for (const v in w.Point) {
|
|
8518
|
-
const
|
|
8519
|
-
for (const L of
|
|
8527
|
+
const y = w.Point[v];
|
|
8528
|
+
for (const L of y)
|
|
8520
8529
|
m.push(
|
|
8521
8530
|
...D.points(L, {
|
|
8522
8531
|
val: Number(v)
|
|
@@ -8535,8 +8544,8 @@ const Mo = {
|
|
|
8535
8544
|
if (w) {
|
|
8536
8545
|
const m = [];
|
|
8537
8546
|
for (const v in w.LineString) {
|
|
8538
|
-
const
|
|
8539
|
-
for (const L of
|
|
8547
|
+
const y = w.LineString[v];
|
|
8548
|
+
for (const L of y)
|
|
8540
8549
|
m.push(
|
|
8541
8550
|
D.lineString(L, {
|
|
8542
8551
|
val: Number(v)
|
|
@@ -8544,9 +8553,9 @@ const Mo = {
|
|
|
8544
8553
|
);
|
|
8545
8554
|
}
|
|
8546
8555
|
for (const v in w.Point)
|
|
8547
|
-
w.Point[v].lng.forEach((
|
|
8548
|
-
|
|
8549
|
-
D.point([
|
|
8556
|
+
w.Point[v].lng.forEach((y, L) => {
|
|
8557
|
+
y = G.convertToStdLng(y), m.push(
|
|
8558
|
+
D.point([y, v], {
|
|
8550
8559
|
val: w.Point[v].val[L],
|
|
8551
8560
|
type: w.Point[v].type[L]
|
|
8552
8561
|
})
|
|
@@ -8564,8 +8573,8 @@ const Mo = {
|
|
|
8564
8573
|
if (w) {
|
|
8565
8574
|
const m = [];
|
|
8566
8575
|
for (const v in w.LineString) {
|
|
8567
|
-
const
|
|
8568
|
-
for (const L of
|
|
8576
|
+
const y = w.LineString[v];
|
|
8577
|
+
for (const L of y)
|
|
8569
8578
|
m.push(
|
|
8570
8579
|
D.lineString(L, {
|
|
8571
8580
|
val: Number(v)
|
|
@@ -8589,10 +8598,10 @@ const Mo = {
|
|
|
8589
8598
|
return t.features.forEach((o) => {
|
|
8590
8599
|
if (o.geometry.type !== "Point")
|
|
8591
8600
|
if (r > i) {
|
|
8592
|
-
let
|
|
8593
|
-
c.geometry.coordinates.length && a.push(c),
|
|
8601
|
+
let l = [r, e._sw.lat, 180, e._ne.lat], c = D.bboxClip(o, l);
|
|
8602
|
+
c.geometry.coordinates.length && a.push(c), l = [-180, e._sw.lat, i, e._ne.lat], c = D.bboxClip(o, l), c.geometry.coordinates.length && a.push(c);
|
|
8594
8603
|
} else {
|
|
8595
|
-
const
|
|
8604
|
+
const l = [r, e._sw.lat, i, e._ne.lat], c = D.bboxClip(o, l);
|
|
8596
8605
|
c.geometry.coordinates.length && a.push(c);
|
|
8597
8606
|
}
|
|
8598
8607
|
else
|
|
@@ -8610,8 +8619,8 @@ const Mo = {
|
|
|
8610
8619
|
this.handleBeforeLayerToggle();
|
|
8611
8620
|
},
|
|
8612
8621
|
handleBeforeLayerToggle() {
|
|
8613
|
-
var t, e, a, r, i, o,
|
|
8614
|
-
(t = this.map) != null && t.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (a = this.otherLayers) != null && a["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (
|
|
8622
|
+
var t, e, a, r, i, o, l, c, h, p, n, d, b, u, A, w;
|
|
8623
|
+
(t = this.map) != null && t.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (a = this.otherLayers) != null && a["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (l = this.otherLayers) != null && l["time-zones"] || (c = this.otherLayers) != null && c.pirates || (h = this.otherLayers) != null && h.ports || (p = this.otherLayers) != null && p.enc || (n = this.otherLayers) != null && n.world12nm || (d = this.otherLayers) != null && d.worldMarine || (b = this.otherLayers) != null && b.chinaRoute || (u = this.otherLayers) != null && u["voluntary-reporting-area"] || (A = this.otherLayers) != null && A["eca-zones"] || (w = this.otherLayers) != null && w["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
8615
8624
|
},
|
|
8616
8625
|
handleDateChange(t = { tropicals: !1 }) {
|
|
8617
8626
|
this.fetchWeatherLayers(t), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -8621,14 +8630,14 @@ const Mo = {
|
|
|
8621
8630
|
this.activeWeatherLayers = JSON.parse(JSON.stringify(t));
|
|
8622
8631
|
const a = this.activeWeatherLayers.some(
|
|
8623
8632
|
(o) => {
|
|
8624
|
-
var
|
|
8625
|
-
return ["wind", "current"].includes(o.key) && (!((
|
|
8633
|
+
var l;
|
|
8634
|
+
return ["wind", "current"].includes(o.key) && (!((l = Object.keys(o)) != null && l.some((c) => c === "particle")) || !!o.particle);
|
|
8626
8635
|
}
|
|
8627
8636
|
), r = this.activeWeatherLayers.some((o) => ["png", "jpg"].includes(o.type));
|
|
8628
8637
|
a && !r ? (this.activeWeatherLayers.forEach((o) => {
|
|
8629
8638
|
o.key === "wind" && o.particle && (this.particleFactor = o, this.showWindParticle = !0), o.key === "current" && o.particle && (this.particleFactor = o, this.showCurrentParticle = !0);
|
|
8630
8639
|
}), this.particleFactor.particle = !0) : r && this.particleFactor && (this.particleFactor.particle = !1);
|
|
8631
|
-
const i = t == null ? void 0 : t.reduce((o,
|
|
8640
|
+
const i = t == null ? void 0 : t.reduce((o, l) => o + (o & (l == null ? void 0 : l.weight) ? 0 : l == null ? void 0 : l.weight), 0);
|
|
8632
8641
|
this.weatherWeight !== i || this.source !== e ? (this.source = e, this.weatherWeight = i, this.fetchWeatherLayers({ tropicals: !1 })) : this.handleWeatherLayerToggle();
|
|
8633
8642
|
}) : setTimeout(() => {
|
|
8634
8643
|
this.handleWeatherLayerChange(t, e);
|
|
@@ -8645,8 +8654,8 @@ const Mo = {
|
|
|
8645
8654
|
}
|
|
8646
8655
|
},
|
|
8647
8656
|
handle3dToggle(t) {
|
|
8648
|
-
var e, a, r, i, o,
|
|
8649
|
-
t ? (this.map.setProjection("globe"), this.mapProjection = "globe", (a = this.map) != null && a.getLayer((e = this.viewport) == null ? void 0 : e.rampColorLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (c = this.map) != null && c.getLayer((
|
|
8657
|
+
var e, a, r, i, o, l, c, h, p, n, d, b, u, A, w, m, v, y, L, P;
|
|
8658
|
+
t ? (this.map.setProjection("globe"), this.mapProjection = "globe", (a = this.map) != null && a.getLayer((e = this.viewport) == null ? void 0 : e.rampColorLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (c = this.map) != null && c.getLayer((l = this.viewport) == null ? void 0 : l.particleLayer) && ((h = this.map) != null && h.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((n = this.map) == null || n.moveLayer((p = this.viewport) == null ? void 0 : p.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(), (b = this.map) != null && b.getLayer((d = this.viewport) == null ? void 0 : d.rampColorLayer) && ((u = this.map) != null && u.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((w = this.map) == null || w.moveLayer((A = this.viewport) == null ? void 0 : A.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (v = this.map) != null && v.getLayer((m = this.viewport) == null ? void 0 : m.particleLayer) && ((y = this.map) != null && y.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((P = this.map) == null || P.moveLayer((L = this.viewport) == null ? void 0 : L.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
8650
8659
|
},
|
|
8651
8660
|
handleParticle(t) {
|
|
8652
8661
|
this.particleFactor = t, this.weatherLayers[t.key] && (this.weatherLayers[t.key].particle = t.particle), this.activeWeatherLayers.map((r) => {
|
|
@@ -8671,9 +8680,9 @@ const Mo = {
|
|
|
8671
8680
|
};
|
|
8672
8681
|
function Qo(t, e, a, r, i, o) {
|
|
8673
8682
|
var Ae, ie, Q, q, ye, re, se, ne, x, Le, xe, Be, Ie, Ee, De, Pe, ke, ze, Me, Te, Qe, Se, _e, He, Oe, Ne, je, Re, Fe;
|
|
8674
|
-
const
|
|
8675
|
-
return a.map ? (g(),
|
|
8676
|
-
k(
|
|
8683
|
+
const l = z("IdmGlLayer"), c = z("IdmENC"), h = z("IdmWorld12nm"), p = z("IdmWorldMarine"), n = z("IdmChinaRoute"), d = z("IdmSigWave"), b = z("IdmSwell"), u = z("IdmPrmsl"), A = z("IdmIceberg"), w = z("IdmTropicals"), m = z("IdmCurrents"), v = z("IdmCurrentParticle"), y = z("IdmWindBarb"), L = z("IdmWindParticle"), P = z("IdmPrecip3h"), M = z("IdmVisibility"), I = z("IdmWaterTemp"), j = z("IdmTemp"), W = z("IdmArctic"), Y = z("IdmWarZone"), K = z("IdmGmdssArea"), V = z("IdmEcaZone"), ee = z("IdmAlertZone"), ce = z("IdmPort"), he = z("IdmLoadLine"), de = z("IdmTimezone"), pe = z("IdmVRA"), me = z("IdmSpecialArea"), ue = z("IdmTerminator"), ge = z("IdmLatLng"), te = z("IdmMeasure"), oe = z("IdmPoint");
|
|
8684
|
+
return a.map ? (g(), f("div", To, [
|
|
8685
|
+
k(l, S({
|
|
8677
8686
|
ref: "layer",
|
|
8678
8687
|
map: a.map,
|
|
8679
8688
|
"toggle-version": a.toggleVersion,
|
|
@@ -8719,7 +8728,7 @@ function Qo(t, e, a, r, i, o) {
|
|
|
8719
8728
|
"weather-layers": i.weatherLayers,
|
|
8720
8729
|
enabled: (Q = i.otherLayers) == null ? void 0 : Q.worldMarine
|
|
8721
8730
|
}, t.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
8722
|
-
k(
|
|
8731
|
+
k(n, S({
|
|
8723
8732
|
map: a.map,
|
|
8724
8733
|
token: a.token,
|
|
8725
8734
|
"weather-layers": i.weatherLayers,
|
|
@@ -8775,7 +8784,7 @@ function Qo(t, e, a, r, i, o) {
|
|
|
8775
8784
|
"before-layer": a.beforeLayer,
|
|
8776
8785
|
"toggle-version": a.toggleVersion
|
|
8777
8786
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
8778
|
-
k(
|
|
8787
|
+
k(y, S({
|
|
8779
8788
|
ref: "windBarb",
|
|
8780
8789
|
map: a.map,
|
|
8781
8790
|
"map-projection": i.mapProjection,
|