@idmwx/idmui-gl3 5.6.2 → 5.6.3
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 +546 -646
- package/dist/index.umd.cjs +4 -4
- package/dist/mapbox/src/helper.d.ts +333 -333
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,13 +5,13 @@ import { LayerHelper as Je, CompanyHelper as qe } from "@idm-plugin/tag";
|
|
|
5
5
|
import Y from "moment";
|
|
6
6
|
import le from "axios";
|
|
7
7
|
import Ue from "moment-timezone";
|
|
8
|
-
import { resolveComponent as z, openBlock as A, createElementBlock as f, createElementVNode as s, normalizeStyle as X, createVNode as k, withCtx as ae, normalizeClass as R, Fragment as j, renderList as F, toDisplayString as I, createCommentVNode as N, createBlock as pt, createTextVNode as V, withDirectives as fe, createStaticVNode as ut, vShow as ye, defineComponent as mt, withModifiers as Ke, mergeProps as
|
|
8
|
+
import { resolveComponent as z, openBlock as A, createElementBlock as f, createElementVNode as s, normalizeStyle as X, createVNode as k, withCtx as ae, normalizeClass as R, Fragment as j, renderList as F, toDisplayString as I, createCommentVNode as N, createBlock as pt, createTextVNode as V, withDirectives as fe, createStaticVNode as ut, vShow as ye, defineComponent as mt, withModifiers as Ke, mergeProps as S } from "vue";
|
|
9
9
|
import * as P from "@turf/turf";
|
|
10
10
|
import gt from "@mapbox/sphericalmercator";
|
|
11
11
|
import ve from "mapbox-gl";
|
|
12
12
|
import { TropicalHelper as nt, LngLatHelper as K, LaneHelper as be } from "@idm-plugin/geo";
|
|
13
13
|
import { TidesAssist as Xe, Meteo2Assist as Ye } from "@idm-plugin/meteo";
|
|
14
|
-
const
|
|
14
|
+
const T = (t, e) => {
|
|
15
15
|
const a = t.__vccOpts || t;
|
|
16
16
|
for (const [r, i] of e)
|
|
17
17
|
a[r] = i;
|
|
@@ -307,14 +307,14 @@ const _ = (t, e) => {
|
|
|
307
307
|
class: "radio-tip"
|
|
308
308
|
};
|
|
309
309
|
function $t(t, e, a, r, i, o) {
|
|
310
|
-
const
|
|
310
|
+
const l = z("ElTooltip"), c = z("ElRadio"), h = z("ElRadioGroup"), u = z("ElScrollbar");
|
|
311
311
|
return A(), f("div", ft, [
|
|
312
312
|
s("div", {
|
|
313
313
|
class: "menu-bar-box",
|
|
314
314
|
style: X({ top: a.top + 10 + "px", right: i.right + "px" })
|
|
315
315
|
}, [
|
|
316
316
|
s("div", yt, [
|
|
317
|
-
k(
|
|
317
|
+
k(l, {
|
|
318
318
|
placement: "left",
|
|
319
319
|
effect: "light",
|
|
320
320
|
content: "Menu",
|
|
@@ -323,7 +323,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
323
323
|
default: ae(() => [
|
|
324
324
|
s("div", {
|
|
325
325
|
class: R(a.layerToggle ? "menu-icon active" : "menu-icon"),
|
|
326
|
-
onClick: e[0] || (e[0] = (...
|
|
326
|
+
onClick: e[0] || (e[0] = (...n) => o.handleMenuToggle && o.handleMenuToggle(...n))
|
|
327
327
|
}, e[17] || (e[17] = [
|
|
328
328
|
s("span", { class: "iconfont" }, "", -1)
|
|
329
329
|
]), 2)
|
|
@@ -337,7 +337,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
337
337
|
style: X({ top: a.top + 160 + "px", right: i.right + "px" })
|
|
338
338
|
}, [
|
|
339
339
|
s("div", wt, [
|
|
340
|
-
k(
|
|
340
|
+
k(l, {
|
|
341
341
|
placement: "left",
|
|
342
342
|
effect: "light",
|
|
343
343
|
content: "Measure",
|
|
@@ -346,14 +346,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
346
346
|
default: ae(() => [
|
|
347
347
|
s("div", {
|
|
348
348
|
class: R(i.showMeasure ? "menu-icon active" : "menu-icon"),
|
|
349
|
-
onClick: e[1] || (e[1] = (...
|
|
349
|
+
onClick: e[1] || (e[1] = (...n) => o.handleMeasureToggle && o.handleMeasureToggle(...n))
|
|
350
350
|
}, e[18] || (e[18] = [
|
|
351
351
|
s("span", { class: "iconfont" }, "", -1)
|
|
352
352
|
]), 2)
|
|
353
353
|
]),
|
|
354
354
|
_: 1
|
|
355
355
|
}),
|
|
356
|
-
k(
|
|
356
|
+
k(l, {
|
|
357
357
|
placement: "left",
|
|
358
358
|
effect: "light",
|
|
359
359
|
content: "Point Meteo",
|
|
@@ -362,14 +362,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
362
362
|
default: ae(() => [
|
|
363
363
|
s("div", {
|
|
364
364
|
class: R(i.showPoint ? "menu-icon active" : "menu-icon"),
|
|
365
|
-
onClick: e[2] || (e[2] = (...
|
|
365
|
+
onClick: e[2] || (e[2] = (...n) => o.handlePointToggle && o.handlePointToggle(...n))
|
|
366
366
|
}, e[19] || (e[19] = [
|
|
367
367
|
s("span", { class: "iconfont" }, "", -1)
|
|
368
368
|
]), 2)
|
|
369
369
|
]),
|
|
370
370
|
_: 1
|
|
371
371
|
}),
|
|
372
|
-
k(
|
|
372
|
+
k(l, {
|
|
373
373
|
placement: "left",
|
|
374
374
|
effect: "light",
|
|
375
375
|
content: "Grid",
|
|
@@ -378,14 +378,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
378
378
|
default: ae(() => [
|
|
379
379
|
s("div", {
|
|
380
380
|
class: R(i.showCoord ? "menu-icon active" : "menu-icon"),
|
|
381
|
-
onClick: e[3] || (e[3] = (...
|
|
381
|
+
onClick: e[3] || (e[3] = (...n) => o.handleCoordToggle && o.handleCoordToggle(...n))
|
|
382
382
|
}, e[20] || (e[20] = [
|
|
383
383
|
s("span", { class: "iconfont" }, "", -1)
|
|
384
384
|
]), 2)
|
|
385
385
|
]),
|
|
386
386
|
_: 1
|
|
387
387
|
}),
|
|
388
|
-
k(
|
|
388
|
+
k(l, {
|
|
389
389
|
placement: "left",
|
|
390
390
|
effect: "light",
|
|
391
391
|
content: "3D",
|
|
@@ -394,7 +394,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
394
394
|
default: ae(() => [
|
|
395
395
|
s("div", {
|
|
396
396
|
class: R(i.show3d ? "menu-icon active" : "menu-icon"),
|
|
397
|
-
onClick: e[4] || (e[4] = (...
|
|
397
|
+
onClick: e[4] || (e[4] = (...n) => o.handle3DToggle && o.handle3DToggle(...n))
|
|
398
398
|
}, e[21] || (e[21] = [
|
|
399
399
|
s("span", { class: "iconfont" }, "", -1)
|
|
400
400
|
]), 2)
|
|
@@ -413,41 +413,41 @@ function $t(t, e, a, r, i, o) {
|
|
|
413
413
|
s("div", {
|
|
414
414
|
class: "switch flex-center",
|
|
415
415
|
style: { "font-size": "28px", "margin-right": "0" },
|
|
416
|
-
onClick: e[5] || (e[5] = (...
|
|
416
|
+
onClick: e[5] || (e[5] = (...n) => o.toggleAutoActive && o.toggleAutoActive(...n))
|
|
417
417
|
}, [
|
|
418
418
|
i.autoActive ? (A(), f("i", vt, "")) : (A(), f("i", Lt, ""))
|
|
419
419
|
])
|
|
420
420
|
]),
|
|
421
|
-
(A(!0), f(j, null, F(i.layers.weather.filter((
|
|
422
|
-
key:
|
|
423
|
-
class: R(o.computeLayerClass(
|
|
421
|
+
(A(!0), f(j, null, F(i.layers.weather.filter((n) => n.collected), (n) => (A(), f("div", {
|
|
422
|
+
key: n.key,
|
|
423
|
+
class: R(o.computeLayerClass(n, i.activeWeatherLayersCollected))
|
|
424
424
|
}, [
|
|
425
425
|
s("div", {
|
|
426
426
|
class: "checkbox",
|
|
427
|
-
onClick: (
|
|
427
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
428
428
|
}, null, 8, Ct),
|
|
429
429
|
s("span", {
|
|
430
430
|
class: "name",
|
|
431
|
-
onClick: (
|
|
432
|
-
}, I(
|
|
433
|
-
|
|
431
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
432
|
+
}, I(n.name), 9, xt),
|
|
433
|
+
n.key === "wind" && i.activeWeatherLayersCollected.some((d) => d.key === n.key) ? (A(), f("div", Bt, [
|
|
434
434
|
s("i", {
|
|
435
435
|
class: R(["iconfont sub-layer-icon", i.showWindParticleCollected ? "active" : ""]),
|
|
436
|
-
onClick: e[6] || (e[6] = (
|
|
436
|
+
onClick: e[6] || (e[6] = (d) => o.handleToggleWindParticle())
|
|
437
437
|
}, "", 2),
|
|
438
438
|
s("i", {
|
|
439
439
|
class: R(["iconfont sub-layer-icon", i.showWindFeatherCollected ? "active" : ""]),
|
|
440
|
-
onClick: e[7] || (e[7] = (
|
|
440
|
+
onClick: e[7] || (e[7] = (d) => o.handleToggleWindFeather())
|
|
441
441
|
}, "", 2)
|
|
442
442
|
])) : N("", !0),
|
|
443
|
-
|
|
443
|
+
n.key === "current" && i.activeWeatherLayersCollected.some((d) => d.key === n.key) ? (A(), f("div", It, [
|
|
444
444
|
s("i", {
|
|
445
445
|
class: R(["iconfont sub-layer-icon", i.showCurrentParticleCollected ? "active" : ""]),
|
|
446
|
-
onClick: e[8] || (e[8] = (
|
|
446
|
+
onClick: e[8] || (e[8] = (d) => o.handleToggleCurrentParticle())
|
|
447
447
|
}, "", 2),
|
|
448
448
|
s("i", {
|
|
449
449
|
class: R(["iconfont sub-layer-icon", i.showCurrentIsobandCollected ? "active" : ""]),
|
|
450
|
-
onClick: e[9] || (e[9] = (
|
|
450
|
+
onClick: e[9] || (e[9] = (d) => o.handleToggleCurrentIsoband())
|
|
451
451
|
}, "", 2)
|
|
452
452
|
])) : N("", !0)
|
|
453
453
|
], 2))), 128))
|
|
@@ -463,7 +463,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
463
463
|
e[23] || (e[23] = s("div", null, "Layers", -1)),
|
|
464
464
|
s("div", {
|
|
465
465
|
class: "iconfont close-btn",
|
|
466
|
-
onClick: e[10] || (e[10] = (...
|
|
466
|
+
onClick: e[10] || (e[10] = (...n) => o.handleMenuToggle && o.handleMenuToggle(...n))
|
|
467
467
|
}, "")
|
|
468
468
|
]),
|
|
469
469
|
k(u, { style: { flex: "1" } }, {
|
|
@@ -474,53 +474,53 @@ function $t(t, e, a, r, i, o) {
|
|
|
474
474
|
s("div", {
|
|
475
475
|
class: "switch flex-center",
|
|
476
476
|
style: { "margin-right": "0" },
|
|
477
|
-
onClick: e[11] || (e[11] = (...
|
|
477
|
+
onClick: e[11] || (e[11] = (...n) => o.toggleAutoActive && o.toggleAutoActive(...n))
|
|
478
478
|
}, [
|
|
479
479
|
i.autoActive ? (A(), f("i", kt, "")) : (A(), f("i", Mt, ""))
|
|
480
480
|
])
|
|
481
481
|
]),
|
|
482
482
|
s("div", zt, [
|
|
483
|
-
(A(!0), f(j, null, F(i.layers.weather, (
|
|
484
|
-
key:
|
|
483
|
+
(A(!0), f(j, null, F(i.layers.weather, (n) => (A(), f(j, {
|
|
484
|
+
key: n.key
|
|
485
485
|
}, [
|
|
486
|
-
|
|
486
|
+
n.hide ? N("", !0) : (A(), f("div", {
|
|
487
487
|
key: 0,
|
|
488
|
-
class: R(o.computeLayerClass(
|
|
488
|
+
class: R(o.computeLayerClass(n, i.activeWeatherLayersCollected))
|
|
489
489
|
}, [
|
|
490
490
|
s("div", Tt, [
|
|
491
491
|
s("div", {
|
|
492
492
|
class: "checkbox",
|
|
493
|
-
onClick: (
|
|
493
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
494
494
|
}, null, 8, Qt),
|
|
495
495
|
s("span", {
|
|
496
496
|
class: "name",
|
|
497
|
-
onClick: (
|
|
498
|
-
}, I(
|
|
499
|
-
|
|
497
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
498
|
+
}, I(n.name), 9, St),
|
|
499
|
+
n.key === "wind" && i.activeWeatherLayersCollected.some((d) => d.key === n.key) ? (A(), f("div", _t, [
|
|
500
500
|
s("i", {
|
|
501
501
|
class: R(["iconfont sub-layer-icon", i.showWindParticleCollected ? "active" : ""]),
|
|
502
|
-
onClick: e[12] || (e[12] = (
|
|
502
|
+
onClick: e[12] || (e[12] = (d) => o.handleToggleWindParticle())
|
|
503
503
|
}, "", 2),
|
|
504
504
|
s("i", {
|
|
505
505
|
class: R(["iconfont sub-layer-icon", i.showWindFeatherCollected ? "active" : ""]),
|
|
506
|
-
onClick: e[13] || (e[13] = (
|
|
506
|
+
onClick: e[13] || (e[13] = (d) => o.handleToggleWindFeather())
|
|
507
507
|
}, "", 2)
|
|
508
508
|
])) : N("", !0),
|
|
509
|
-
|
|
509
|
+
n.key === "current" && i.activeWeatherLayersCollected.some((d) => d.key === n.key) ? (A(), f("div", Ht, [
|
|
510
510
|
s("i", {
|
|
511
511
|
class: R(["iconfont sub-layer-icon", i.showCurrentParticleCollected ? "active" : ""]),
|
|
512
|
-
onClick: e[14] || (e[14] = (
|
|
512
|
+
onClick: e[14] || (e[14] = (d) => o.handleToggleCurrentParticle())
|
|
513
513
|
}, "", 2),
|
|
514
514
|
s("i", {
|
|
515
515
|
class: R(["iconfont sub-layer-icon", i.showCurrentIsobandCollected ? "active" : ""]),
|
|
516
|
-
onClick: e[15] || (e[15] = (
|
|
516
|
+
onClick: e[15] || (e[15] = (d) => o.handleToggleCurrentIsoband())
|
|
517
517
|
}, "", 2)
|
|
518
518
|
])) : N("", !0)
|
|
519
519
|
]),
|
|
520
520
|
s("div", {
|
|
521
|
-
onClick: (
|
|
521
|
+
onClick: (d) => o.handleWeatherLayerCollect(n)
|
|
522
522
|
}, [
|
|
523
|
-
|
|
523
|
+
n.collected ? (A(), f("i", Nt, "")) : (A(), f("i", jt, ""))
|
|
524
524
|
], 8, Ot)
|
|
525
525
|
], 2))
|
|
526
526
|
], 64))), 128)),
|
|
@@ -536,18 +536,18 @@ function $t(t, e, a, r, i, o) {
|
|
|
536
536
|
s("div", Rt, [
|
|
537
537
|
e[26] || (e[26] = s("div", { class: "layers-title" }, "Other Layers", -1)),
|
|
538
538
|
s("div", Ft, [
|
|
539
|
-
(A(!0), f(j, null, F(i.layers.other, (
|
|
540
|
-
var
|
|
539
|
+
(A(!0), f(j, null, F(i.layers.other, (n) => {
|
|
540
|
+
var d;
|
|
541
541
|
return A(), f("div", {
|
|
542
|
-
key:
|
|
543
|
-
class: R(["layer flex-between", o.computeLayerClass(
|
|
544
|
-
onClick: (w) => o.handleOtherLayerPick(
|
|
542
|
+
key: n.key,
|
|
543
|
+
class: R(["layer flex-between", o.computeLayerClass(n, i.activeOtherLayers)]),
|
|
544
|
+
onClick: (w) => o.handleOtherLayerPick(n)
|
|
545
545
|
}, [
|
|
546
546
|
s("div", Wt, [
|
|
547
547
|
s("div", Ut, [
|
|
548
|
-
(
|
|
548
|
+
(d = o.computeLayerClass(n, i.activeOtherLayers)) != null && d.includes("active") ? (A(), f("i", Yt, "")) : (A(), f("i", Kt, ""))
|
|
549
549
|
]),
|
|
550
|
-
s("span", null, I(
|
|
550
|
+
s("span", null, I(n.name), 1)
|
|
551
551
|
])
|
|
552
552
|
], 10, Gt);
|
|
553
553
|
}), 128))
|
|
@@ -558,21 +558,21 @@ function $t(t, e, a, r, i, o) {
|
|
|
558
558
|
s("div", Jt, [
|
|
559
559
|
k(h, {
|
|
560
560
|
modelValue: i.source,
|
|
561
|
-
"onUpdate:modelValue": e[16] || (e[16] = (
|
|
561
|
+
"onUpdate:modelValue": e[16] || (e[16] = (n) => i.source = n),
|
|
562
562
|
class: "layer-radio flex-col-start-start",
|
|
563
563
|
style: { width: "180px", "align-items": "flex-start" }
|
|
564
564
|
}, {
|
|
565
565
|
default: ae(() => [
|
|
566
|
-
(A(!0), f(j, null, F(i.sourceList, (
|
|
567
|
-
key: `source${
|
|
568
|
-
value:
|
|
566
|
+
(A(!0), f(j, null, F(i.sourceList, (n, d) => (A(), pt(c, {
|
|
567
|
+
key: `source${n.name}`,
|
|
568
|
+
value: n.name
|
|
569
569
|
}, {
|
|
570
570
|
default: ae(() => {
|
|
571
|
-
var w, b, g, v, y,
|
|
571
|
+
var w, b, g, v, y, p;
|
|
572
572
|
return [
|
|
573
|
-
V(I(
|
|
574
|
-
|
|
575
|
-
|
|
573
|
+
V(I(n.name) + " ", 1),
|
|
574
|
+
d !== 0 ? (A(), f("span", qt, I(n.resolution) + "km " + I(n.length) + "days", 1)) : N("", !0),
|
|
575
|
+
d === 0 ? (A(), f("div", Vt, "Provides the best forecast")) : (g = (b = (w = n == null ? void 0 : n.update) == null ? void 0 : w.default) == null ? void 0 : b.meta) != null && g.initialisationTime ? (A(), f("div", Zt, "Update: " + I(o.computeDateZ((p = (y = (v = n == null ? void 0 : n.update) == null ? void 0 : v.default) == null ? void 0 : y.meta) == null ? void 0 : p.initialisationTime)), 1)) : N("", !0)
|
|
576
576
|
];
|
|
577
577
|
}),
|
|
578
578
|
_: 2
|
|
@@ -589,7 +589,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
589
589
|
], 4)
|
|
590
590
|
]);
|
|
591
591
|
}
|
|
592
|
-
const ea = /* @__PURE__ */
|
|
592
|
+
const ea = /* @__PURE__ */ T(At, [["render", $t]]);
|
|
593
593
|
const ta = {
|
|
594
594
|
name: "IdmWindBarb",
|
|
595
595
|
props: {
|
|
@@ -667,28 +667,28 @@ const ta = {
|
|
|
667
667
|
}, 500);
|
|
668
668
|
else if (this.wind) {
|
|
669
669
|
const i = (/* @__PURE__ */ new Date()).valueOf();
|
|
670
|
-
let o = 0,
|
|
670
|
+
let o = 0, l = 0, c = this.empty;
|
|
671
671
|
if ((t = this.wind) != null && t.active && (c = (e = this.wind) == null ? void 0 : e.data), (a = this.map) != null && a.getSource(this.source))
|
|
672
|
-
(r = this.map) == null || r.getSource(this.source).setData(c),
|
|
672
|
+
(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);
|
|
673
673
|
else {
|
|
674
674
|
this.map.addSource(this.source, { type: "geojson", data: c });
|
|
675
675
|
for (let h = 0; h < (this.barbs ?? []).length - 1; h++) {
|
|
676
|
-
const u = (this.barbs ?? [])[h] || 0,
|
|
676
|
+
const u = (this.barbs ?? [])[h] || 0, n = (this.barbs ?? [])[h + 1] || 0, d = u < 10 ? `00${u}kts` : u < 100 ? `0${u}kts` : `${u}kts`;
|
|
677
677
|
this.map.addLayer(
|
|
678
678
|
{
|
|
679
|
-
id:
|
|
679
|
+
id: d,
|
|
680
680
|
type: "symbol",
|
|
681
681
|
filter: [
|
|
682
682
|
"all",
|
|
683
683
|
// @ts-ignore
|
|
684
684
|
[">=", "spd", u],
|
|
685
685
|
// @ts-ignore
|
|
686
|
-
["<", "spd",
|
|
686
|
+
["<", "spd", n]
|
|
687
687
|
],
|
|
688
688
|
source: this.source,
|
|
689
689
|
layout: {
|
|
690
690
|
"symbol-placement": "point",
|
|
691
|
-
"icon-image":
|
|
691
|
+
"icon-image": d,
|
|
692
692
|
// mapbox sprite
|
|
693
693
|
"icon-size": 0.14,
|
|
694
694
|
"icon-offset": [0, -20],
|
|
@@ -710,7 +710,7 @@ const ta = {
|
|
|
710
710
|
this.beforeLayer
|
|
711
711
|
);
|
|
712
712
|
}
|
|
713
|
-
this.windBarbLoaded = !0,
|
|
713
|
+
this.windBarbLoaded = !0, l = (/* @__PURE__ */ new Date()).valueOf() - (i + o), console.log("[wind] add elapsed: ", l, ", total: ", o += l);
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
716
|
},
|
|
@@ -735,7 +735,7 @@ const ta = {
|
|
|
735
735
|
function aa(t, e, a, r, i, o) {
|
|
736
736
|
return null;
|
|
737
737
|
}
|
|
738
|
-
const ia = /* @__PURE__ */
|
|
738
|
+
const ia = /* @__PURE__ */ T(ta, [["render", aa]]);
|
|
739
739
|
class Ve {
|
|
740
740
|
constructor(e) {
|
|
741
741
|
U(this, "map");
|
|
@@ -781,8 +781,8 @@ class Ve {
|
|
|
781
781
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
782
782
|
*/
|
|
783
783
|
getBoundPixel() {
|
|
784
|
-
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,
|
|
785
|
-
return [
|
|
784
|
+
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]), [u, n] = this.mercator.px([o, r[1]], a), [d, w] = this.mercator.px([c, i[1]], a), b = Math.round(this.mercator.size * Math.pow(2, a) * (l + h));
|
|
785
|
+
return [d, w, u + b, n];
|
|
786
786
|
}
|
|
787
787
|
/**
|
|
788
788
|
* [视窗边界像素宽度]
|
|
@@ -797,13 +797,13 @@ class Ve {
|
|
|
797
797
|
* @param zoom
|
|
798
798
|
*/
|
|
799
799
|
getWorldCopy(e, a) {
|
|
800
|
-
const r = 2 ** a, [i, o,
|
|
801
|
-
for (let
|
|
802
|
-
for (let
|
|
803
|
-
h.push([
|
|
804
|
-
return h.map((
|
|
805
|
-
const
|
|
806
|
-
return [
|
|
800
|
+
const r = 2 ** a, [i, o, l, c] = e.map((n) => ~~(n / (r * 256))), h = [];
|
|
801
|
+
for (let n = c; n <= o; n++)
|
|
802
|
+
for (let d = i; d <= l; d++)
|
|
803
|
+
h.push([d, n]);
|
|
804
|
+
return h.map((n) => {
|
|
805
|
+
const d = 2 ** a * 256;
|
|
806
|
+
return [n[0] * d, n[1] * d, d];
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
809
|
resize() {
|
|
@@ -844,9 +844,9 @@ class Le {
|
|
|
844
844
|
* @param width??
|
|
845
845
|
* @param height??
|
|
846
846
|
*/
|
|
847
|
-
createTexture(e, a, r, i, o,
|
|
847
|
+
createTexture(e, a, r, i, o, l, c) {
|
|
848
848
|
const h = e.createTexture();
|
|
849
|
-
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,
|
|
849
|
+
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;
|
|
850
850
|
}
|
|
851
851
|
/**
|
|
852
852
|
* 创建数据资源
|
|
@@ -869,8 +869,8 @@ class Le {
|
|
|
869
869
|
* @param fragmentSchema
|
|
870
870
|
*/
|
|
871
871
|
createProgram(e, a, r) {
|
|
872
|
-
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER, a),
|
|
873
|
-
if (i && o &&
|
|
872
|
+
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER, a), l = this.createShader(e, e.FRAGMENT_SHADER, r);
|
|
873
|
+
if (i && o && l && (e.attachShader(i, o), e.attachShader(i, l), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)))
|
|
874
874
|
throw new Error(e.getProgramInfoLog(i) || "error happened while creating ramp color program");
|
|
875
875
|
return i;
|
|
876
876
|
}
|
|
@@ -883,8 +883,8 @@ class Le {
|
|
|
883
883
|
createProgramWrapper(e, a, r) {
|
|
884
884
|
const i = this.createProgram(e, a, r);
|
|
885
885
|
if (i) {
|
|
886
|
-
const o = { program: i },
|
|
887
|
-
for (let h = 0; h <
|
|
886
|
+
const o = { program: i }, l = e.getProgramParameter(i, e.ACTIVE_ATTRIBUTES);
|
|
887
|
+
for (let h = 0; h < l; h++) {
|
|
888
888
|
const u = e.getActiveAttrib(i, h);
|
|
889
889
|
o[u.name] = e.getAttribLocation(i, u.name);
|
|
890
890
|
}
|
|
@@ -901,21 +901,21 @@ class Le {
|
|
|
901
901
|
* @param colors
|
|
902
902
|
*/
|
|
903
903
|
setup(e, a, r = !1, i, o) {
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
const c =
|
|
904
|
+
const l = document.createElement("canvas");
|
|
905
|
+
l.width = 256, l.height = 1;
|
|
906
|
+
const c = l.getContext("2d");
|
|
907
907
|
if (c && e) {
|
|
908
908
|
const h = c == null ? void 0 : c.createLinearGradient(0, 0, 256, 0);
|
|
909
|
-
return a.forEach(([u,
|
|
910
|
-
h.addColorStop(u,
|
|
909
|
+
return a.forEach(([u, n]) => {
|
|
910
|
+
h.addColorStop(u, n);
|
|
911
911
|
}), c.fillStyle = h, c.fillRect(0, 0, 256, 1), {
|
|
912
|
-
canvas:
|
|
912
|
+
canvas: l,
|
|
913
913
|
texture: this.createTexture(
|
|
914
914
|
e,
|
|
915
915
|
e.LINEAR,
|
|
916
916
|
e.LINEAR,
|
|
917
917
|
e.CLAMP_TO_EDGE,
|
|
918
|
-
r ? new Uint8Array(c.getImageData(0, 0, 256, 1).data) :
|
|
918
|
+
r ? new Uint8Array(c.getImageData(0, 0, 256, 1).data) : l,
|
|
919
919
|
i,
|
|
920
920
|
o
|
|
921
921
|
)
|
|
@@ -924,19 +924,19 @@ class Le {
|
|
|
924
924
|
}
|
|
925
925
|
setupParticle(e, a = 1e3) {
|
|
926
926
|
const r = Math.ceil(Math.sqrt(a)), i = r * r, o = new Uint8Array(i * 4);
|
|
927
|
-
for (let
|
|
928
|
-
o[
|
|
929
|
-
const
|
|
930
|
-
for (let
|
|
931
|
-
h[
|
|
927
|
+
for (let n = 0; n < o.length; n++)
|
|
928
|
+
o[n] = Math.floor(Math.random() * 256);
|
|
929
|
+
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);
|
|
930
|
+
for (let n = 0; n < i; n++)
|
|
931
|
+
h[n] = n;
|
|
932
932
|
const u = this.createDataBuffer(e, "array", h);
|
|
933
|
-
return { resolution: r, total: i, texture0:
|
|
933
|
+
return { resolution: r, total: i, texture0: l, texture1: c, indexBuffer: u };
|
|
934
934
|
}
|
|
935
935
|
bind(e, a, r) {
|
|
936
936
|
const i = this.createProgram(e, a, r);
|
|
937
937
|
if (i) {
|
|
938
|
-
const o = this.createDataBuffer(e, "array", void 0),
|
|
939
|
-
e.enableVertexAttribArray(
|
|
938
|
+
const o = this.createDataBuffer(e, "array", void 0), l = e.getAttribLocation(i, "a_position");
|
|
939
|
+
e.enableVertexAttribArray(l), e.vertexAttribPointer(l, 2, e.FLOAT, !1, 0, 0);
|
|
940
940
|
const c = new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
|
|
941
941
|
this.createDataBuffer(e, "array", c);
|
|
942
942
|
const h = e.getAttribLocation(i, "a_texCoord");
|
|
@@ -944,35 +944,38 @@ class Le {
|
|
|
944
944
|
}
|
|
945
945
|
return {};
|
|
946
946
|
}
|
|
947
|
-
bindParticle(e, a, r, i, o,
|
|
948
|
-
const c = this.createProgramWrapper(e, a, r), h = this.createProgramWrapper(e, i, o), u = this.createProgramWrapper(e, i,
|
|
949
|
-
return { particle: c, screen: h, update: u, quadBuffer:
|
|
947
|
+
bindParticle(e, a, r, i, o, l) {
|
|
948
|
+
const c = this.createProgramWrapper(e, a, r), h = this.createProgramWrapper(e, i, o), u = 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();
|
|
949
|
+
return { particle: c, screen: h, update: u, quadBuffer: n, frameBuffer: d };
|
|
950
950
|
}
|
|
951
|
-
draw(e, a, r, i, o,
|
|
951
|
+
draw(e, a, r, i, o, l, c) {
|
|
952
952
|
var h, u;
|
|
953
953
|
if (a && r) {
|
|
954
954
|
e.resize(), a == null || a.viewport(0, 0, (h = a == null ? void 0 : a.canvas) == null ? void 0 : h.width, (u = a == null ? void 0 : a.canvas) == null ? void 0 : u.height), a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT | a.DEPTH_BUFFER_BIT);
|
|
955
955
|
try {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
a.
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
956
|
+
a.useProgram(r);
|
|
957
|
+
const n = {
|
|
958
|
+
resolution: a.getUniformLocation(r, "u_resolution"),
|
|
959
|
+
image: a.getUniformLocation(r, "u_image"),
|
|
960
|
+
color: a.getUniformLocation(r, "u_color"),
|
|
961
|
+
scale: a.getUniformLocation(r, "u_scale"),
|
|
962
|
+
uvRange: a.getUniformLocation(r, "u_range_u_v"),
|
|
963
|
+
sRange: a.getUniformLocation(r, "u_range_s")
|
|
964
|
+
};
|
|
965
|
+
n.resolution && a.uniform2f(n.resolution, a.canvas.width * e.ratio, a.canvas.height * e.ratio), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, i), n.image && a.uniform1i(n.image, 0), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, o), n.color && a.uniform1i(n.color, 1), c != null && c.uvRange && (c != null && c.sRange) && (n.uvRange && a.uniform2f(n.uvRange, c.uvRange[0], c.uvRange[1]), n.sRange && a.uniform2f(n.sRange, c.sRange[0], c.sRange[1])), n.scale && a.uniform1f(n.scale, (c == null ? void 0 : c.scale) || 1);
|
|
966
|
+
const d = e.getBoundPixel(), w = e.map.getZoom() + 1, b = e.getWorldCopy(d, w);
|
|
967
|
+
for (const g of b) {
|
|
968
|
+
const v = (g[0] - d[0]) * e.ratio, y = (g[1] - d[3]) * e.ratio, p = g[2] * e.ratio, [C, m, x, M] = [v, p + v, y, p + y], E = new Float32Array([C, x, m, x, C, M, C, M, m, x, m, M]);
|
|
969
|
+
a.bindBuffer(a.ARRAY_BUFFER, l), a.bufferData(a.ARRAY_BUFFER, E, a.STATIC_DRAW), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
967
970
|
}
|
|
968
|
-
} catch (
|
|
969
|
-
console.log(`render failed...${
|
|
971
|
+
} catch (n) {
|
|
972
|
+
console.log(`render failed...${n}`);
|
|
970
973
|
}
|
|
971
974
|
}
|
|
972
975
|
}
|
|
973
976
|
drawParticle(e, a, r, i, o) {
|
|
974
|
-
var
|
|
975
|
-
a && (a == null || a.viewport(0, 0, (
|
|
977
|
+
var l, c;
|
|
978
|
+
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));
|
|
976
979
|
}
|
|
977
980
|
renderScreen(e, a, r, i) {
|
|
978
981
|
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);
|
|
@@ -990,11 +993,11 @@ class Le {
|
|
|
990
993
|
}
|
|
991
994
|
}
|
|
992
995
|
updateParticles(e, a, r, i) {
|
|
993
|
-
var
|
|
996
|
+
var l, c;
|
|
994
997
|
if (a) {
|
|
995
998
|
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);
|
|
996
999
|
const h = e.getBoundRange();
|
|
997
|
-
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, (
|
|
1000
|
+
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);
|
|
998
1001
|
}
|
|
999
1002
|
const o = r.texture0;
|
|
1000
1003
|
r.texture0 = r.texture1, r.texture1 = o;
|
|
@@ -1392,23 +1395,8 @@ class ra {
|
|
|
1392
1395
|
paint: {
|
|
1393
1396
|
"line-color": "hsl(2, 88%, 55%)",
|
|
1394
1397
|
"line-opacity": 0.62,
|
|
1395
|
-
"line-width": [
|
|
1396
|
-
|
|
1397
|
-
[
|
|
1398
|
-
"linear"
|
|
1399
|
-
],
|
|
1400
|
-
[
|
|
1401
|
-
"zoom"
|
|
1402
|
-
],
|
|
1403
|
-
0,
|
|
1404
|
-
2,
|
|
1405
|
-
22,
|
|
1406
|
-
2
|
|
1407
|
-
],
|
|
1408
|
-
"line-translate": [
|
|
1409
|
-
0,
|
|
1410
|
-
0
|
|
1411
|
-
]
|
|
1398
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 0, 2, 22, 2],
|
|
1399
|
+
"line-translate": [0, 0]
|
|
1412
1400
|
}
|
|
1413
1401
|
},
|
|
1414
1402
|
worldMarineLine: {
|
|
@@ -1424,23 +1412,8 @@ class ra {
|
|
|
1424
1412
|
paint: {
|
|
1425
1413
|
"line-color": "hsl(0, 0.60%, 34.70%)",
|
|
1426
1414
|
"line-opacity": 1,
|
|
1427
|
-
"line-width": [
|
|
1428
|
-
|
|
1429
|
-
[
|
|
1430
|
-
"linear"
|
|
1431
|
-
],
|
|
1432
|
-
[
|
|
1433
|
-
"zoom"
|
|
1434
|
-
],
|
|
1435
|
-
0,
|
|
1436
|
-
2,
|
|
1437
|
-
22,
|
|
1438
|
-
2
|
|
1439
|
-
],
|
|
1440
|
-
"line-translate": [
|
|
1441
|
-
0,
|
|
1442
|
-
0
|
|
1443
|
-
]
|
|
1415
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 0, 2, 22, 2],
|
|
1416
|
+
"line-translate": [0, 0]
|
|
1444
1417
|
}
|
|
1445
1418
|
},
|
|
1446
1419
|
worldMarineLabel: {
|
|
@@ -1450,13 +1423,7 @@ class ra {
|
|
|
1450
1423
|
"source-layer": "ne_10m_geography_marine_polys-3968bv",
|
|
1451
1424
|
minzoom: 1,
|
|
1452
1425
|
layout: {
|
|
1453
|
-
"text-field": [
|
|
1454
|
-
"to-string",
|
|
1455
|
-
[
|
|
1456
|
-
"get",
|
|
1457
|
-
"name"
|
|
1458
|
-
]
|
|
1459
|
-
],
|
|
1426
|
+
"text-field": ["to-string", ["get", "name"]],
|
|
1460
1427
|
"text-size": 13,
|
|
1461
1428
|
visibility: "none"
|
|
1462
1429
|
},
|
|
@@ -1475,19 +1442,7 @@ class ra {
|
|
|
1475
1442
|
visibility: "none"
|
|
1476
1443
|
},
|
|
1477
1444
|
paint: {
|
|
1478
|
-
"line-color": [
|
|
1479
|
-
"interpolate",
|
|
1480
|
-
[
|
|
1481
|
-
"linear"
|
|
1482
|
-
],
|
|
1483
|
-
[
|
|
1484
|
-
"zoom"
|
|
1485
|
-
],
|
|
1486
|
-
0,
|
|
1487
|
-
"rgb(2,196,140)",
|
|
1488
|
-
22,
|
|
1489
|
-
"rgb(2,196,140)"
|
|
1490
|
-
],
|
|
1445
|
+
"line-color": ["interpolate", ["linear"], ["zoom"], 0, "rgb(2,196,140)", 22, "rgb(2,196,140)"],
|
|
1491
1446
|
"line-width": 2
|
|
1492
1447
|
}
|
|
1493
1448
|
},
|
|
@@ -1496,18 +1451,7 @@ class ra {
|
|
|
1496
1451
|
type: "fill",
|
|
1497
1452
|
source: "composite",
|
|
1498
1453
|
"source-layer": "china_route-bdtx5d",
|
|
1499
|
-
filter: [
|
|
1500
|
-
"match",
|
|
1501
|
-
[
|
|
1502
|
-
"get",
|
|
1503
|
-
"featureType"
|
|
1504
|
-
],
|
|
1505
|
-
[
|
|
1506
|
-
"route"
|
|
1507
|
-
],
|
|
1508
|
-
!0,
|
|
1509
|
-
!1
|
|
1510
|
-
],
|
|
1454
|
+
filter: ["match", ["get", "featureType"], ["route"], !0, !1],
|
|
1511
1455
|
layout: {
|
|
1512
1456
|
visibility: "none"
|
|
1513
1457
|
},
|
|
@@ -1522,13 +1466,7 @@ class ra {
|
|
|
1522
1466
|
source: "composite",
|
|
1523
1467
|
"source-layer": "china_route-bdtx5d",
|
|
1524
1468
|
layout: {
|
|
1525
|
-
"text-field": [
|
|
1526
|
-
"to-string",
|
|
1527
|
-
[
|
|
1528
|
-
"get",
|
|
1529
|
-
"RouteName"
|
|
1530
|
-
]
|
|
1531
|
-
],
|
|
1469
|
+
"text-field": ["to-string", ["get", "RouteName"]],
|
|
1532
1470
|
"text-size": 12,
|
|
1533
1471
|
visibility: "none"
|
|
1534
1472
|
},
|
|
@@ -3005,23 +2943,8 @@ class ra {
|
|
|
3005
2943
|
paint: {
|
|
3006
2944
|
"line-color": "hsl(2, 88%, 55%)",
|
|
3007
2945
|
"line-opacity": 0.62,
|
|
3008
|
-
"line-width": [
|
|
3009
|
-
|
|
3010
|
-
[
|
|
3011
|
-
"linear"
|
|
3012
|
-
],
|
|
3013
|
-
[
|
|
3014
|
-
"zoom"
|
|
3015
|
-
],
|
|
3016
|
-
0,
|
|
3017
|
-
2,
|
|
3018
|
-
22,
|
|
3019
|
-
2
|
|
3020
|
-
],
|
|
3021
|
-
"line-translate": [
|
|
3022
|
-
0,
|
|
3023
|
-
0
|
|
3024
|
-
]
|
|
2946
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 0, 2, 22, 2],
|
|
2947
|
+
"line-translate": [0, 0]
|
|
3025
2948
|
}
|
|
3026
2949
|
},
|
|
3027
2950
|
{
|
|
@@ -3036,19 +2959,7 @@ class ra {
|
|
|
3036
2959
|
paint: {
|
|
3037
2960
|
"line-color": "hsl(2, 88%, 55%)",
|
|
3038
2961
|
"line-opacity": 0.62,
|
|
3039
|
-
"line-width": [
|
|
3040
|
-
"interpolate",
|
|
3041
|
-
[
|
|
3042
|
-
"linear"
|
|
3043
|
-
],
|
|
3044
|
-
[
|
|
3045
|
-
"zoom"
|
|
3046
|
-
],
|
|
3047
|
-
0,
|
|
3048
|
-
2,
|
|
3049
|
-
22,
|
|
3050
|
-
2
|
|
3051
|
-
]
|
|
2962
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 0, 2, 22, 2]
|
|
3052
2963
|
}
|
|
3053
2964
|
},
|
|
3054
2965
|
{
|
|
@@ -3069,13 +2980,7 @@ class ra {
|
|
|
3069
2980
|
source: "composite",
|
|
3070
2981
|
"source-layer": "ne_10m_geography_marine_polys-3968bv",
|
|
3071
2982
|
layout: {
|
|
3072
|
-
"text-field": [
|
|
3073
|
-
"to-string",
|
|
3074
|
-
[
|
|
3075
|
-
"get",
|
|
3076
|
-
"name"
|
|
3077
|
-
]
|
|
3078
|
-
],
|
|
2983
|
+
"text-field": ["to-string", ["get", "name"]],
|
|
3079
2984
|
"text-size": 13,
|
|
3080
2985
|
visibility: "none"
|
|
3081
2986
|
},
|
|
@@ -3094,19 +2999,7 @@ class ra {
|
|
|
3094
2999
|
visibility: "none"
|
|
3095
3000
|
},
|
|
3096
3001
|
paint: {
|
|
3097
|
-
"line-color": [
|
|
3098
|
-
"interpolate",
|
|
3099
|
-
[
|
|
3100
|
-
"linear"
|
|
3101
|
-
],
|
|
3102
|
-
[
|
|
3103
|
-
"zoom"
|
|
3104
|
-
],
|
|
3105
|
-
0,
|
|
3106
|
-
"rgb(11, 168, 121)",
|
|
3107
|
-
22,
|
|
3108
|
-
"rgb(11, 168, 121)"
|
|
3109
|
-
],
|
|
3002
|
+
"line-color": ["interpolate", ["linear"], ["zoom"], 0, "rgb(11, 168, 121)", 22, "rgb(11, 168, 121)"],
|
|
3110
3003
|
"line-width": 2
|
|
3111
3004
|
}
|
|
3112
3005
|
},
|
|
@@ -3115,18 +3008,7 @@ class ra {
|
|
|
3115
3008
|
type: "fill",
|
|
3116
3009
|
source: "composite",
|
|
3117
3010
|
"source-layer": "china_route-bdtx5d",
|
|
3118
|
-
filter: [
|
|
3119
|
-
"match",
|
|
3120
|
-
[
|
|
3121
|
-
"get",
|
|
3122
|
-
"featureType"
|
|
3123
|
-
],
|
|
3124
|
-
[
|
|
3125
|
-
"route"
|
|
3126
|
-
],
|
|
3127
|
-
!0,
|
|
3128
|
-
!1
|
|
3129
|
-
],
|
|
3011
|
+
filter: ["match", ["get", "featureType"], ["route"], !0, !1],
|
|
3130
3012
|
layout: {
|
|
3131
3013
|
visibility: "none"
|
|
3132
3014
|
},
|
|
@@ -3141,13 +3023,7 @@ class ra {
|
|
|
3141
3023
|
source: "composite",
|
|
3142
3024
|
"source-layer": "china_route-bdtx5d",
|
|
3143
3025
|
layout: {
|
|
3144
|
-
"text-field": [
|
|
3145
|
-
"to-string",
|
|
3146
|
-
[
|
|
3147
|
-
"get",
|
|
3148
|
-
"RouteName"
|
|
3149
|
-
]
|
|
3150
|
-
],
|
|
3026
|
+
"text-field": ["to-string", ["get", "RouteName"]],
|
|
3151
3027
|
"text-size": 12,
|
|
3152
3028
|
visibility: "none"
|
|
3153
3029
|
},
|
|
@@ -3239,8 +3115,8 @@ const oa = {
|
|
|
3239
3115
|
}
|
|
3240
3116
|
},
|
|
3241
3117
|
handleClear() {
|
|
3242
|
-
var t, e, a, r, i, o,
|
|
3243
|
-
(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 = (
|
|
3118
|
+
var t, e, a, r, i, o, l, c;
|
|
3119
|
+
(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();
|
|
3244
3120
|
},
|
|
3245
3121
|
handleSetup() {
|
|
3246
3122
|
if (!this.context) {
|
|
@@ -3298,15 +3174,18 @@ const oa = {
|
|
|
3298
3174
|
}
|
|
3299
3175
|
},
|
|
3300
3176
|
async handleDraw() {
|
|
3301
|
-
this.handleSetup(), this.etime
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
this.
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3177
|
+
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
3178
|
+
this.etime = this.factor.etime;
|
|
3179
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
3180
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t), this.particleTexture = this.webgl.createTexture(
|
|
3181
|
+
this.particleContext,
|
|
3182
|
+
this.particleContext.NEAREST,
|
|
3183
|
+
this.particleContext.LINEAR,
|
|
3184
|
+
this.particleContext.CLAMP_TO_EDGE,
|
|
3185
|
+
t
|
|
3186
|
+
), this.wrapper.image = t;
|
|
3187
|
+
}
|
|
3188
|
+
this.initial && (this.initial = !1, this.handlePlay()), this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer, this.particleOptions), this.viewport.toggle(!0);
|
|
3310
3189
|
},
|
|
3311
3190
|
handleResize() {
|
|
3312
3191
|
this.wrapper = { ...this.wrapper, ...this.webgl.resize(this.viewport, this.particleContext) };
|
|
@@ -3322,8 +3201,8 @@ const oa = {
|
|
|
3322
3201
|
}
|
|
3323
3202
|
}, sa = { key: 0 };
|
|
3324
3203
|
function na(t, e, a, r, i, o) {
|
|
3325
|
-
var
|
|
3326
|
-
return (
|
|
3204
|
+
var l;
|
|
3205
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", sa, [
|
|
3327
3206
|
s("div", {
|
|
3328
3207
|
class: "legend-bars flex-center",
|
|
3329
3208
|
style: X([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -3339,7 +3218,7 @@ function na(t, e, a, r, i, o) {
|
|
|
3339
3218
|
]), 4)
|
|
3340
3219
|
])) : N("", !0);
|
|
3341
3220
|
}
|
|
3342
|
-
const la = /* @__PURE__ */
|
|
3221
|
+
const la = /* @__PURE__ */ T(oa, [["render", na], ["__scopeId", "data-v-14070127"]]);
|
|
3343
3222
|
const ca = {
|
|
3344
3223
|
name: "IdmCurrent",
|
|
3345
3224
|
props: {
|
|
@@ -3493,7 +3372,7 @@ const ca = {
|
|
|
3493
3372
|
function ha(t, e, a, r, i, o) {
|
|
3494
3373
|
return null;
|
|
3495
3374
|
}
|
|
3496
|
-
const da = /* @__PURE__ */
|
|
3375
|
+
const da = /* @__PURE__ */ T(ca, [["render", ha]]);
|
|
3497
3376
|
const pa = {
|
|
3498
3377
|
name: "IdmCurrentParticle",
|
|
3499
3378
|
props: {
|
|
@@ -3573,8 +3452,8 @@ const pa = {
|
|
|
3573
3452
|
}
|
|
3574
3453
|
},
|
|
3575
3454
|
handleClear() {
|
|
3576
|
-
var t, e, a, r, i, o,
|
|
3577
|
-
(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 = (
|
|
3455
|
+
var t, e, a, r, i, o, l, c;
|
|
3456
|
+
(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();
|
|
3578
3457
|
},
|
|
3579
3458
|
handleSetup() {
|
|
3580
3459
|
if (!this.context) {
|
|
@@ -3628,15 +3507,18 @@ const pa = {
|
|
|
3628
3507
|
}
|
|
3629
3508
|
},
|
|
3630
3509
|
async handleDraw() {
|
|
3631
|
-
this.handleSetup(), this.etime
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
this.
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3510
|
+
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
3511
|
+
this.etime = this.factor.etime;
|
|
3512
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
3513
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t), this.particleTexture = this.webgl.createTexture(
|
|
3514
|
+
this.particleContext,
|
|
3515
|
+
this.particleContext.NEAREST,
|
|
3516
|
+
this.particleContext.LINEAR,
|
|
3517
|
+
this.particleContext.CLAMP_TO_EDGE,
|
|
3518
|
+
t
|
|
3519
|
+
), this.wrapper.image = t;
|
|
3520
|
+
}
|
|
3521
|
+
this.initial && (this.initial = !1, this.handlePlay()), this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer, this.particleOptions), this.viewport.toggle(!0);
|
|
3640
3522
|
},
|
|
3641
3523
|
handleResize() {
|
|
3642
3524
|
this.wrapper = { ...this.wrapper, ...this.webgl.resize(this.viewport, this.particleContext) };
|
|
@@ -3652,8 +3534,8 @@ const pa = {
|
|
|
3652
3534
|
}
|
|
3653
3535
|
}, ua = { key: 0 };
|
|
3654
3536
|
function ma(t, e, a, r, i, o) {
|
|
3655
|
-
var
|
|
3656
|
-
return (
|
|
3537
|
+
var l;
|
|
3538
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", ua, [
|
|
3657
3539
|
s("div", {
|
|
3658
3540
|
class: "legend-bars flex-center",
|
|
3659
3541
|
style: X([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -3668,7 +3550,7 @@ function ma(t, e, a, r, i, o) {
|
|
|
3668
3550
|
]), 4)
|
|
3669
3551
|
])) : N("", !0);
|
|
3670
3552
|
}
|
|
3671
|
-
const ga = /* @__PURE__ */
|
|
3553
|
+
const ga = /* @__PURE__ */ T(pa, [["render", ma], ["__scopeId", "data-v-02a8206f"]]), Aa = {
|
|
3672
3554
|
name: "IdmSigWave",
|
|
3673
3555
|
props: {
|
|
3674
3556
|
map: {
|
|
@@ -3789,7 +3671,7 @@ const ga = /* @__PURE__ */ _(pa, [["render", ma], ["__scopeId", "data-v-a9741758
|
|
|
3789
3671
|
function fa(t, e, a, r, i, o) {
|
|
3790
3672
|
return A(), f("div");
|
|
3791
3673
|
}
|
|
3792
|
-
const ya = /* @__PURE__ */
|
|
3674
|
+
const ya = /* @__PURE__ */ T(Aa, [["render", fa]]), wa = {
|
|
3793
3675
|
name: "IdmSwell",
|
|
3794
3676
|
props: {
|
|
3795
3677
|
map: {
|
|
@@ -3947,7 +3829,7 @@ const ya = /* @__PURE__ */ _(Aa, [["render", fa]]), wa = {
|
|
|
3947
3829
|
function ba(t, e, a, r, i, o) {
|
|
3948
3830
|
return A(), f("div");
|
|
3949
3831
|
}
|
|
3950
|
-
const va = /* @__PURE__ */
|
|
3832
|
+
const va = /* @__PURE__ */ T(wa, [["render", ba]]), La = {
|
|
3951
3833
|
name: "IdmPrmsl",
|
|
3952
3834
|
props: {
|
|
3953
3835
|
map: {
|
|
@@ -4002,8 +3884,8 @@ const va = /* @__PURE__ */ _(wa, [["render", ba]]), La = {
|
|
|
4002
3884
|
}, 500);
|
|
4003
3885
|
else if (this.prmsl) {
|
|
4004
3886
|
const r = (/* @__PURE__ */ new Date()).valueOf();
|
|
4005
|
-
let i = 0, o = 0,
|
|
4006
|
-
this.prmsl.active && (
|
|
3887
|
+
let i = 0, o = 0, l = this.empty;
|
|
3888
|
+
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(
|
|
4007
3889
|
{
|
|
4008
3890
|
id: this.layer,
|
|
4009
3891
|
type: "line",
|
|
@@ -4086,7 +3968,7 @@ const va = /* @__PURE__ */ _(wa, [["render", ba]]), La = {
|
|
|
4086
3968
|
function Ca(t, e, a, r, i, o) {
|
|
4087
3969
|
return A(), f("div");
|
|
4088
3970
|
}
|
|
4089
|
-
const xa = /* @__PURE__ */
|
|
3971
|
+
const xa = /* @__PURE__ */ T(La, [["render", Ca]]);
|
|
4090
3972
|
const Ba = {
|
|
4091
3973
|
name: "IdmCover",
|
|
4092
3974
|
props: {
|
|
@@ -4181,8 +4063,8 @@ const Ba = {
|
|
|
4181
4063
|
}
|
|
4182
4064
|
}, Ia = { key: 0 };
|
|
4183
4065
|
function Ea(t, e, a, r, i, o) {
|
|
4184
|
-
var
|
|
4185
|
-
return (
|
|
4066
|
+
var l;
|
|
4067
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", Ia, [
|
|
4186
4068
|
s("div", {
|
|
4187
4069
|
class: "legend-bars flex-center",
|
|
4188
4070
|
style: X([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -4196,7 +4078,7 @@ function Ea(t, e, a, r, i, o) {
|
|
|
4196
4078
|
]), 4)
|
|
4197
4079
|
])) : N("", !0);
|
|
4198
4080
|
}
|
|
4199
|
-
const Da = /* @__PURE__ */
|
|
4081
|
+
const Da = /* @__PURE__ */ T(Ba, [["render", Ea], ["__scopeId", "data-v-efce05ef"]]);
|
|
4200
4082
|
const Pa = {
|
|
4201
4083
|
name: "IdmThickness",
|
|
4202
4084
|
props: {
|
|
@@ -4289,15 +4171,18 @@ const Pa = {
|
|
|
4289
4171
|
}
|
|
4290
4172
|
},
|
|
4291
4173
|
async handleDraw() {
|
|
4292
|
-
this.handleSetup(), this.etime
|
|
4293
|
-
|
|
4294
|
-
|
|
4174
|
+
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4175
|
+
this.etime = this.factor.etime;
|
|
4176
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
4177
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
4178
|
+
}
|
|
4179
|
+
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4295
4180
|
}
|
|
4296
4181
|
}
|
|
4297
4182
|
}, ka = { key: 0 };
|
|
4298
4183
|
function Ma(t, e, a, r, i, o) {
|
|
4299
|
-
var
|
|
4300
|
-
return (
|
|
4184
|
+
var l;
|
|
4185
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", ka, [
|
|
4301
4186
|
s("div", {
|
|
4302
4187
|
class: "legend-bars flex-center",
|
|
4303
4188
|
style: X([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -4312,7 +4197,7 @@ function Ma(t, e, a, r, i, o) {
|
|
|
4312
4197
|
]), 4)
|
|
4313
4198
|
])) : N("", !0);
|
|
4314
4199
|
}
|
|
4315
|
-
const za = /* @__PURE__ */
|
|
4200
|
+
const za = /* @__PURE__ */ T(Pa, [["render", Ma], ["__scopeId", "data-v-348d48fb"]]);
|
|
4316
4201
|
const Ta = {
|
|
4317
4202
|
name: "IdmTropicals",
|
|
4318
4203
|
props: {
|
|
@@ -4400,29 +4285,29 @@ const Ta = {
|
|
|
4400
4285
|
var r, i;
|
|
4401
4286
|
const t = ((i = (r = this.tropicals) == null ? void 0 : r.data) == null ? void 0 : i.features) || [], e = Y().utc().hour(), a = [];
|
|
4402
4287
|
t.forEach((o) => {
|
|
4403
|
-
var
|
|
4404
|
-
(
|
|
4288
|
+
var l, c, h;
|
|
4289
|
+
(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);
|
|
4405
4290
|
}), a.forEach((o) => {
|
|
4406
4291
|
var u;
|
|
4407
|
-
let
|
|
4408
|
-
const h = t.filter((
|
|
4409
|
-
var
|
|
4410
|
-
return ((w = (
|
|
4292
|
+
let l = 0, c;
|
|
4293
|
+
const h = t.filter((n) => {
|
|
4294
|
+
var d, w;
|
|
4295
|
+
return ((w = (d = n.properties) == null ? void 0 : d.category) == null ? void 0 : w.split("-")[0]) === o;
|
|
4411
4296
|
});
|
|
4412
|
-
(u = h.filter((
|
|
4413
|
-
var
|
|
4414
|
-
return ((
|
|
4415
|
-
})[0]) == null || u.properties.model, h.forEach((
|
|
4416
|
-
var w, b, g, v, y,
|
|
4417
|
-
((w =
|
|
4418
|
-
}), h.map((
|
|
4419
|
-
var w, b, g, v, y,
|
|
4420
|
-
if (((w =
|
|
4421
|
-
|
|
4422
|
-
const m = Y((C =
|
|
4423
|
-
|
|
4297
|
+
(u = h.filter((n) => {
|
|
4298
|
+
var d, w;
|
|
4299
|
+
return ((d = n.geometry) == null ? void 0 : d.type) === "LineString" && ((w = n.properties) == null ? void 0 : w.type) === "forecast";
|
|
4300
|
+
})[0]) == null || u.properties.model, h.forEach((n, d) => {
|
|
4301
|
+
var w, b, g, v, y, p;
|
|
4302
|
+
((w = n.geometry) == null ? void 0 : w.type) === "Point" && ((b = n.properties) == null ? void 0 : b.type) === "history" && (l = d, c = c === void 0 ? d : c), ((g = n.geometry) == null ? void 0 : g.type) === "Point" && ((v = n.properties) == null ? void 0 : v.type) === "forecast" && c === void 0 && (c = d), ((y = n.geometry) == null ? void 0 : y.type) === "LineString" && ((p = n.properties) == null || p.type);
|
|
4303
|
+
}), h.map((n, d) => {
|
|
4304
|
+
var w, b, g, v, y, p, C;
|
|
4305
|
+
if (((w = n.geometry) == null ? void 0 : w.type) === "LineString" && ((b = n.properties) == null || b.type), ((g = n.geometry) == null ? void 0 : g.type) === "Point" && ((v = n.properties) == null ? void 0 : v.type) === "forecast" && (n.properties.name = o, n.properties.format = Y(n.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((y = n.geometry) == null ? void 0 : y.type) === "Point" && ((p = n.properties) == null ? void 0 : p.type) === "history") {
|
|
4306
|
+
n.properties.format = Y(n.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
4307
|
+
const m = Y((C = n.properties) == null ? void 0 : C.date).utc().format("HHmm") === Y().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm");
|
|
4308
|
+
n.properties.showHistoryLabel = m || d === l, n.properties.showNameLabel = d === l, n.properties.name = o;
|
|
4424
4309
|
}
|
|
4425
|
-
return
|
|
4310
|
+
return n;
|
|
4426
4311
|
});
|
|
4427
4312
|
}), this.handleInit();
|
|
4428
4313
|
},
|
|
@@ -4457,16 +4342,16 @@ const Ta = {
|
|
|
4457
4342
|
));
|
|
4458
4343
|
},
|
|
4459
4344
|
handleRender() {
|
|
4460
|
-
var t, e, a, r, i, o,
|
|
4345
|
+
var t, e, a, r, i, o, l, c, h, u;
|
|
4461
4346
|
if (!this.map)
|
|
4462
4347
|
setTimeout(() => {
|
|
4463
4348
|
this.handleRender();
|
|
4464
4349
|
}, 500);
|
|
4465
4350
|
else {
|
|
4466
4351
|
if (this.tropicals) {
|
|
4467
|
-
const
|
|
4352
|
+
const d = (/* @__PURE__ */ new Date()).valueOf();
|
|
4468
4353
|
let w = 0, b = 0;
|
|
4469
|
-
(t = this.map) != null && t.getSource(this.source) ? ((a = this.map) == null || a.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty), b = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4354
|
+
(t = this.map) != null && t.getSource(this.source) ? ((a = this.map) == null || a.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty), b = (/* @__PURE__ */ new Date()).valueOf() - (d + w), console.log("[tropicals] update elapsed: ", b, ", total: ", w += b)) : (this.map.addSource(this.source, {
|
|
4470
4355
|
type: "geojson",
|
|
4471
4356
|
data: (r = this.tropicals) != null && r.active ? (i = this.tropicals) == null ? void 0 : i.data : this.empty
|
|
4472
4357
|
}), this.map.addLayer({
|
|
@@ -4563,7 +4448,7 @@ const Ta = {
|
|
|
4563
4448
|
],
|
|
4564
4449
|
"text-halo-width": 4
|
|
4565
4450
|
}
|
|
4566
|
-
}), b = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4451
|
+
}), b = (/* @__PURE__ */ new Date()).valueOf() - (d + w), console.log("[tropical] add elapsed: ", b, ", total: ", w += b)), (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), b = (/* @__PURE__ */ new Date()).valueOf() - (d + w), console.log("[tropical] update elapsed: ", b, ", total: ", w += b)) : (this.map.addSource(this.clusterSource, {
|
|
4567
4452
|
type: "geojson",
|
|
4568
4453
|
data: (h = this.tropicals) != null && h.active ? (u = this.tropicals) == null ? void 0 : u.data : this.empty
|
|
4569
4454
|
// cluster: true,
|
|
@@ -4680,11 +4565,11 @@ const Ta = {
|
|
|
4680
4565
|
"text-halo-color": "#0033ff",
|
|
4681
4566
|
"text-halo-width": 4
|
|
4682
4567
|
}
|
|
4683
|
-
}), b = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4568
|
+
}), b = (/* @__PURE__ */ new Date()).valueOf() - (d + w), console.log("[tropical] add elapsed: ", b, ", total: ", w += b));
|
|
4684
4569
|
}
|
|
4685
4570
|
this.handleDrawCircle();
|
|
4686
|
-
const
|
|
4687
|
-
this.interpolateData = JSON.parse(JSON.stringify(
|
|
4571
|
+
const n = nt.interpolate(this.tropicals, 1);
|
|
4572
|
+
this.interpolateData = JSON.parse(JSON.stringify(n)), this.interpolateData.filter((d) => d.properties.name === "kristy" && d.properties.model === "ecmwf"), this.handleDateChange();
|
|
4688
4573
|
}
|
|
4689
4574
|
},
|
|
4690
4575
|
handleClear() {
|
|
@@ -4692,11 +4577,11 @@ const Ta = {
|
|
|
4692
4577
|
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));
|
|
4693
4578
|
},
|
|
4694
4579
|
handleDateChange() {
|
|
4695
|
-
var t, e, a, r, i, o,
|
|
4580
|
+
var t, e, a, r, i, o, l, c, h, u, n, d, w, b, g, v, y, p, C, m, x, M, E, _, O, Q, G, W, ee, ce, he, de, pe, ue, me, ge;
|
|
4696
4581
|
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) {
|
|
4697
|
-
const te = Y(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), oe = this.interpolateData.filter((
|
|
4698
|
-
we.forEach((
|
|
4699
|
-
ie.features.push(
|
|
4582
|
+
const te = Y(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), oe = this.interpolateData.filter((H) => H.properties.date === te.format() && !H.properties.disabled), we = this.handleComputePolygons(oe), ie = P.featureCollection([...oe]);
|
|
4583
|
+
we.forEach((H) => {
|
|
4584
|
+
ie.features.push(H);
|
|
4700
4585
|
}), (a = this.map) != null && a.getSource(this.interpolateSource) ? (r = this.map) == null || r.getSource(this.interpolateSource).setData(ie) : ((i = this.map) == null || i.addSource(this.interpolateSource, {
|
|
4701
4586
|
type: "geojson",
|
|
4702
4587
|
data: ie
|
|
@@ -4711,10 +4596,10 @@ const Ta = {
|
|
|
4711
4596
|
"line-width": 1
|
|
4712
4597
|
}
|
|
4713
4598
|
})), this.interpolateMarkers = [];
|
|
4714
|
-
for (const
|
|
4715
|
-
if (!
|
|
4599
|
+
for (const H of oe)
|
|
4600
|
+
if (!H.properties.disabled) {
|
|
4716
4601
|
let Z = "#f44336";
|
|
4717
|
-
((c = (
|
|
4602
|
+
((c = (l = H.properties) == null ? void 0 : l.wind) == null ? void 0 : c.spd) < 17.2 || !((u = (h = H.properties) == null ? void 0 : h.wind) != null && u.spd) ? Z = "#03f869" : ((d = (n = H.properties) == null ? void 0 : n.wind) == null ? void 0 : d.spd) >= 17.2 && ((b = (w = H.properties) == null ? void 0 : w.wind) == null ? void 0 : b.spd) < 24.5 ? Z = "#f2f202" : ((v = (g = H.properties) == null ? void 0 : g.wind) == null ? void 0 : v.spd) >= 24.5 && ((p = (y = H.properties) == null ? void 0 : y.wind) == null ? void 0 : p.spd) < 32.7 ? Z = "#ff9100" : ((m = (C = H.properties) == null ? void 0 : C.wind) == null ? void 0 : m.spd) >= 32.7 && ((M = (x = H.properties) == null ? void 0 : x.wind) == null ? void 0 : M.spd) < 41.5 ? Z = "#f44336" : ((_ = (E = H.properties) == null ? void 0 : E.wind) == null ? void 0 : _.spd) >= 41.5 && ((Q = (O = H.properties) == null ? void 0 : O.wind) == null ? void 0 : Q.spd) < 51 ? Z = "#f903d0" : ((W = (G = H.properties) == null ? void 0 : G.wind) == null ? void 0 : W.spd) >= 51 ? Z = "#8702f9" : Z = "#f44336";
|
|
4718
4603
|
const Ae = `<svg t="1719918955501"
|
|
4719
4604
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
4720
4605
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -4730,10 +4615,10 @@ const Ta = {
|
|
|
4730
4615
|
d="M420.66666667 959.17a16.08 16.08 0 0 1-15.91-13.49A15.89 15.89 0 0 1 415.50666667 928c1.49-0.55 38.88-14.76 72.79-65.52A354.55 354.55 0 0 1 162.66666667 509.17a450.14 450.14 0 0 1 450.5-450.5 16.07 16.07 0 0 1 15.91 13.48 15.88 15.88 0 0 1-10.75 17.66c-1.58 0.58-39.13 14.9-73.07 65.95A354.22 354.22 0 0 1 871.66666667 509.17a16 16 0 0 1-0.52 4.05A450.14 450.14 0 0 1 420.66666667 959.17zM554.80666667 94.72C351.57666667 123.2 194.66666667 298.21 194.66666667 509.17c0 177.08 144.06 321.74 321.13 322.48a16 16 0 0 1 14.07 23.49c-16.11 30.42-34.27 52.37-50.85 68C682.25666667 894.63 839.16666667 719.63 839.16666667 508.67a15.94 15.94 0 0 1 0.47-3.86C837.30666667 329.33 693.82666667 187 517.80666667 186.67A16 16 0 0 1 503.66666667 163.21c16.21-30.69 34.47-52.79 51.14-68.49z"
|
|
4731
4616
|
fill="#ffffff" p-id="18386"></path>
|
|
4732
4617
|
</svg>`, re = document.createElement("div");
|
|
4733
|
-
re.className = "hurricane-hourly-marker", re.innerHTML = `<div class="${
|
|
4734
|
-
const se = new ve.Marker(re).setLngLat(
|
|
4735
|
-
if (this.interpolateMarkers.push(se), (ee =
|
|
4736
|
-
const ne = { radius: 100, coordinates:
|
|
4618
|
+
re.className = "hurricane-hourly-marker", re.innerHTML = `<div class="${H.geometry.coordinates[1] >= 0 ? "center north" : "center south"}">${Ae}</div>`;
|
|
4619
|
+
const se = new ve.Marker(re).setLngLat(H.geometry.coordinates).addTo(this.map);
|
|
4620
|
+
if (this.interpolateMarkers.push(se), (ee = H.properties) != null && ee.showCircle) {
|
|
4621
|
+
const ne = { radius: 100, coordinates: H.geometry.coordinates }, B = { radius: 200, coordinates: H.geometry.coordinates }, Ce = { radius: 500, coordinates: H.geometry.coordinates };
|
|
4737
4622
|
(ce = this.circleSourceData) == null || ce.features.push(
|
|
4738
4623
|
P.circle(ne.coordinates, ne.radius, { steps: 100, units: "kilometers", properties: { type: "tropicalCircle" } })
|
|
4739
4624
|
), (he = this.circleSourceData) == null || he.features.push(
|
|
@@ -4748,16 +4633,16 @@ const Ta = {
|
|
|
4748
4633
|
(me = this.map) != null && me.getSource(this.interpolateSource) && ((ge = this.map) == null || ge.getSource(this.interpolateSource).setData(this.empty));
|
|
4749
4634
|
},
|
|
4750
4635
|
handleClick(t) {
|
|
4751
|
-
var o,
|
|
4752
|
-
const e = t.features[0], a = (
|
|
4636
|
+
var o, l, c, h, u, n, d, w;
|
|
4637
|
+
const e = t.features[0], a = (l = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : l.features.filter(
|
|
4753
4638
|
(b) => {
|
|
4754
4639
|
var g;
|
|
4755
4640
|
return b.geometry.type === "LineString" && b.properties.type === "forecast" && b.properties.name === ((g = e == null ? void 0 : e.properties) == null ? void 0 : g.name);
|
|
4756
4641
|
}
|
|
4757
4642
|
);
|
|
4758
4643
|
a.sort((b, g) => {
|
|
4759
|
-
var v, y,
|
|
4760
|
-
return ((v = b.properties) == null ? void 0 : v.model) === "cma" ? -1 : ((y = b.properties) == null ? void 0 : y.model) === "jma" ? ((
|
|
4644
|
+
var v, y, p, C;
|
|
4645
|
+
return ((v = b.properties) == null ? void 0 : v.model) === "cma" ? -1 : ((y = b.properties) == null ? void 0 : y.model) === "jma" ? ((p = g.properties) == null ? void 0 : p.model) === "cma" ? 1 : -1 : b.properties.model === "ecmwf" ? ["jma", "cma"].includes((C = g.properties) == null ? void 0 : C.model) ? 1 : -1 : 0;
|
|
4761
4646
|
});
|
|
4762
4647
|
const r = (h = (c = this.tropicals) == null ? void 0 : c.data) == null ? void 0 : h.features.filter(
|
|
4763
4648
|
(b) => {
|
|
@@ -4768,21 +4653,21 @@ const Ta = {
|
|
|
4768
4653
|
this.activeTropicals = {
|
|
4769
4654
|
name: (u = e == null ? void 0 : e.properties) == null ? void 0 : u.name,
|
|
4770
4655
|
forecasts: a.map((b) => b.properties),
|
|
4771
|
-
history: (
|
|
4772
|
-
showCircle: (w = (
|
|
4656
|
+
history: (n = r[0]) == null ? void 0 : n.properties,
|
|
4657
|
+
showCircle: (w = (d = a[0]) == null ? void 0 : d.properties) == null ? void 0 : w.showCircle
|
|
4773
4658
|
}, this.showTropicals = !0;
|
|
4774
4659
|
const i = document.getElementById("active-tropical");
|
|
4775
4660
|
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);
|
|
4776
4661
|
},
|
|
4777
4662
|
handleForecastToggle(t) {
|
|
4778
|
-
var r, i, o,
|
|
4663
|
+
var r, i, o, l, c, h;
|
|
4779
4664
|
t.disabled = !t.disabled;
|
|
4780
4665
|
const e = `${t.name}-${t.model}`, a = (i = (r = this.map) == null ? void 0 : r.getSource(this.source)._data) == null ? void 0 : i.features;
|
|
4781
4666
|
a.forEach((u) => {
|
|
4782
4667
|
u.properties.category === e && (u.properties.disabled = t.disabled);
|
|
4783
4668
|
}), this.interpolateData.forEach((u) => {
|
|
4784
4669
|
u.properties.category === e && (u.properties.disabled = t.disabled);
|
|
4785
|
-
}), (
|
|
4670
|
+
}), (l = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || l.setData(P.featureCollection(a)), (h = (c = this.map) == null ? void 0 : c.getSource(this.clusterSource)) == null || h.setData(P.featureCollection(a)), this.handleDateChange();
|
|
4786
4671
|
},
|
|
4787
4672
|
handleStrikeProbability(t) {
|
|
4788
4673
|
this.$emit("tropicalProbability", t);
|
|
@@ -4821,12 +4706,12 @@ const Ta = {
|
|
|
4821
4706
|
nw: r.r7nw >= 0 ? r.r7nw : void 0
|
|
4822
4707
|
}, o = this.handleComputeArc(a.geometry.coordinates, i, { ...a.properties, level: 7 });
|
|
4823
4708
|
e.push(o);
|
|
4824
|
-
const
|
|
4709
|
+
const l = {
|
|
4825
4710
|
ne: r.r10ne >= 0 ? r.r10ne : void 0,
|
|
4826
4711
|
se: r.r10se >= 0 ? r.r10se : void 0,
|
|
4827
4712
|
sw: r.r10sw >= 0 ? r.r10sw : void 0,
|
|
4828
4713
|
nw: r.r10nw >= 0 ? r.r10nw : void 0
|
|
4829
|
-
}, c = this.handleComputeArc(a.geometry.coordinates,
|
|
4714
|
+
}, c = this.handleComputeArc(a.geometry.coordinates, l, { ...a.properties, level: 10 });
|
|
4830
4715
|
e.push(c);
|
|
4831
4716
|
}
|
|
4832
4717
|
return e;
|
|
@@ -4834,10 +4719,10 @@ const Ta = {
|
|
|
4834
4719
|
handleComputeArc(t, e, a) {
|
|
4835
4720
|
var o;
|
|
4836
4721
|
const r = [];
|
|
4837
|
-
for (const
|
|
4838
|
-
const c = e[
|
|
4722
|
+
for (const l in e) {
|
|
4723
|
+
const c = e[l] ?? 0;
|
|
4839
4724
|
let h;
|
|
4840
|
-
switch (
|
|
4725
|
+
switch (l) {
|
|
4841
4726
|
case "ne":
|
|
4842
4727
|
h = P.lineArc(t, c * 1.852, 0, 90, { steps: c > 0 ? 64 : 1 });
|
|
4843
4728
|
break;
|
|
@@ -4874,7 +4759,7 @@ const Ta = {
|
|
|
4874
4759
|
style: { "justify-content": "flex-start" }
|
|
4875
4760
|
}, Ya = { class: "forecast-models" }, Ka = ["onClick"], Xa = { class: "more" };
|
|
4876
4761
|
function Ja(t, e, a, r, i, o) {
|
|
4877
|
-
var
|
|
4762
|
+
var l, c, h, u, n, d, w, b, g, v, y, p, C, m, x;
|
|
4878
4763
|
return fe((A(), f("div", Qa, [
|
|
4879
4764
|
s("div", Sa, [
|
|
4880
4765
|
s("div", {
|
|
@@ -4882,17 +4767,17 @@ function Ja(t, e, a, r, i, o) {
|
|
|
4882
4767
|
onClick: e[0] || (e[0] = (M) => i.showTropicals = !1)
|
|
4883
4768
|
}, ""),
|
|
4884
4769
|
s("div", _a, [
|
|
4885
|
-
(c = (
|
|
4886
|
-
V(I((
|
|
4770
|
+
(c = (l = i.activeTropicals) == null ? void 0 : l.history) != null && c.level ? (A(), f("span", Ha, I((u = (h = i.activeTropicals) == null ? void 0 : h.history) == null ? void 0 : u.level) + " , ", 1)) : N("", !0),
|
|
4771
|
+
V(I((n = i.activeTropicals) == null ? void 0 : n.name), 1)
|
|
4887
4772
|
]),
|
|
4888
|
-
s("div", Oa, " Last update: " + I(o.computeTime(((w = (
|
|
4773
|
+
s("div", Oa, " Last update: " + I(o.computeTime(((w = (d = i.activeTropicals) == null ? void 0 : d.history) == null ? void 0 : w.updated) || ((v = (g = (b = i.activeTropicals) == null ? void 0 : b.forecasts) == null ? void 0 : g.filter((M) => !M.disabled)[0]) == null ? void 0 : v.date))), 1)
|
|
4889
4774
|
]),
|
|
4890
4775
|
s("div", Na, [
|
|
4891
4776
|
s("div", ja, [
|
|
4892
4777
|
s("div", Ra, [
|
|
4893
4778
|
s("div", Fa, [
|
|
4894
4779
|
e[2] || (e[2] = s("label", null, "Wind speed : ", -1)),
|
|
4895
|
-
s("span", null, I(((
|
|
4780
|
+
s("span", null, I(((p = (y = i.activeTropicals) == null ? void 0 : y.history) == null ? void 0 : p.kts) || "-") + "[kts]", 1)
|
|
4896
4781
|
]),
|
|
4897
4782
|
s("div", Ga, [
|
|
4898
4783
|
e[3] || (e[3] = s("label", null, "Pressure : ", -1)),
|
|
@@ -4904,13 +4789,13 @@ function Ja(t, e, a, r, i, o) {
|
|
|
4904
4789
|
e[4] || (e[4] = s("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)),
|
|
4905
4790
|
s("div", Ya, [
|
|
4906
4791
|
(A(!0), f(j, null, F((x = i.activeTropicals) == null ? void 0 : x.forecasts, (M, E) => {
|
|
4907
|
-
var
|
|
4792
|
+
var _, O, Q, G;
|
|
4908
4793
|
return A(), f("div", {
|
|
4909
4794
|
key: E,
|
|
4910
4795
|
class: R([
|
|
4911
4796
|
"model",
|
|
4912
4797
|
M.disabled ? "" : "active",
|
|
4913
|
-
E > 0 && E < ((
|
|
4798
|
+
E > 0 && E < ((O = (_ = i.activeTropicals) == null ? void 0 : _.forecasts) == null ? void 0 : O.length) - 1 && ((G = (Q = i.activeTropicals) == null ? void 0 : Q.forecasts) == null ? void 0 : G.length) > 2 ? "center-child" : ""
|
|
4914
4799
|
]),
|
|
4915
4800
|
onClick: (W) => o.handleForecastToggle(M)
|
|
4916
4801
|
}, [
|
|
@@ -4935,7 +4820,7 @@ function Ja(t, e, a, r, i, o) {
|
|
|
4935
4820
|
[ye, i.showTropicals && !t.$attrs.hideTropicalsLegend]
|
|
4936
4821
|
]);
|
|
4937
4822
|
}
|
|
4938
|
-
const lt = /* @__PURE__ */
|
|
4823
|
+
const lt = /* @__PURE__ */ T(Ta, [["render", Ja], ["__scopeId", "data-v-44a4e671"]]);
|
|
4939
4824
|
const qa = {
|
|
4940
4825
|
name: "IdmPrecip3h",
|
|
4941
4826
|
props: {
|
|
@@ -5029,15 +4914,18 @@ const qa = {
|
|
|
5029
4914
|
}
|
|
5030
4915
|
},
|
|
5031
4916
|
async handleDraw() {
|
|
5032
|
-
this.handleSetup(), this.etime
|
|
5033
|
-
|
|
5034
|
-
|
|
4917
|
+
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4918
|
+
this.etime = this.factor.etime;
|
|
4919
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
4920
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
4921
|
+
}
|
|
4922
|
+
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
5035
4923
|
}
|
|
5036
4924
|
}
|
|
5037
4925
|
}, Va = { key: 0 };
|
|
5038
4926
|
function Za(t, e, a, r, i, o) {
|
|
5039
|
-
var
|
|
5040
|
-
return (
|
|
4927
|
+
var l;
|
|
4928
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", Va, [
|
|
5041
4929
|
s("div", {
|
|
5042
4930
|
class: "legend-bars flex-center",
|
|
5043
4931
|
style: X([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5053,7 +4941,7 @@ function Za(t, e, a, r, i, o) {
|
|
|
5053
4941
|
]), 4)
|
|
5054
4942
|
])) : N("", !0);
|
|
5055
4943
|
}
|
|
5056
|
-
const $a = /* @__PURE__ */
|
|
4944
|
+
const $a = /* @__PURE__ */ T(qa, [["render", Za], ["__scopeId", "data-v-e83717bd"]]);
|
|
5057
4945
|
const ei = {
|
|
5058
4946
|
name: "IdmVisibility",
|
|
5059
4947
|
props: {
|
|
@@ -5140,15 +5028,18 @@ const ei = {
|
|
|
5140
5028
|
}
|
|
5141
5029
|
},
|
|
5142
5030
|
async handleDraw() {
|
|
5143
|
-
this.handleSetup(), this.etime
|
|
5144
|
-
|
|
5145
|
-
|
|
5031
|
+
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
5032
|
+
this.etime = this.factor.etime;
|
|
5033
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
5034
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
5035
|
+
}
|
|
5036
|
+
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
5146
5037
|
}
|
|
5147
5038
|
}
|
|
5148
5039
|
}, ti = { key: 0 };
|
|
5149
5040
|
function ai(t, e, a, r, i, o) {
|
|
5150
|
-
var
|
|
5151
|
-
return (
|
|
5041
|
+
var l;
|
|
5042
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", ti, [
|
|
5152
5043
|
s("div", {
|
|
5153
5044
|
class: "legend-bars flex-center",
|
|
5154
5045
|
style: X([{ position: "absolute" }, { right: t.right + "px", bottom: a.bottom }])
|
|
@@ -5162,7 +5053,7 @@ function ai(t, e, a, r, i, o) {
|
|
|
5162
5053
|
]), 4)
|
|
5163
5054
|
])) : N("", !0);
|
|
5164
5055
|
}
|
|
5165
|
-
const ii = /* @__PURE__ */
|
|
5056
|
+
const ii = /* @__PURE__ */ T(ei, [["render", ai], ["__scopeId", "data-v-1c8a9237"]]);
|
|
5166
5057
|
const ri = {
|
|
5167
5058
|
name: "IdmWaterTemp",
|
|
5168
5059
|
props: {
|
|
@@ -5257,15 +5148,18 @@ const ri = {
|
|
|
5257
5148
|
}
|
|
5258
5149
|
},
|
|
5259
5150
|
async handleDraw() {
|
|
5260
|
-
this.handleSetup(), this.etime
|
|
5261
|
-
|
|
5262
|
-
|
|
5151
|
+
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
5152
|
+
this.etime = this.factor.etime;
|
|
5153
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
5154
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
5155
|
+
}
|
|
5156
|
+
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
5263
5157
|
}
|
|
5264
5158
|
}
|
|
5265
5159
|
}, oi = { key: 0 };
|
|
5266
5160
|
function si(t, e, a, r, i, o) {
|
|
5267
|
-
var
|
|
5268
|
-
return (
|
|
5161
|
+
var l;
|
|
5162
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", oi, [
|
|
5269
5163
|
s("div", {
|
|
5270
5164
|
class: "legend-bars flex-center",
|
|
5271
5165
|
style: X([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5279,7 +5173,7 @@ function si(t, e, a, r, i, o) {
|
|
|
5279
5173
|
]), 4)
|
|
5280
5174
|
])) : N("", !0);
|
|
5281
5175
|
}
|
|
5282
|
-
const ni = /* @__PURE__ */
|
|
5176
|
+
const ni = /* @__PURE__ */ T(ri, [["render", si], ["__scopeId", "data-v-8974924d"]]);
|
|
5283
5177
|
const li = {
|
|
5284
5178
|
name: "IdmTemp",
|
|
5285
5179
|
props: {
|
|
@@ -5377,15 +5271,18 @@ const li = {
|
|
|
5377
5271
|
}
|
|
5378
5272
|
},
|
|
5379
5273
|
async handleDraw() {
|
|
5380
|
-
this.handleSetup(), this.etime
|
|
5381
|
-
|
|
5382
|
-
|
|
5274
|
+
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
5275
|
+
this.etime = this.factor.etime;
|
|
5276
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
5277
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
5278
|
+
}
|
|
5279
|
+
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
5383
5280
|
}
|
|
5384
5281
|
}
|
|
5385
5282
|
}, ci = { key: 0 };
|
|
5386
5283
|
function hi(t, e, a, r, i, o) {
|
|
5387
|
-
var
|
|
5388
|
-
return (
|
|
5284
|
+
var l;
|
|
5285
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", ci, [
|
|
5389
5286
|
s("div", {
|
|
5390
5287
|
class: "legend-bars flex-center",
|
|
5391
5288
|
style: X([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5401,7 +5298,7 @@ function hi(t, e, a, r, i, o) {
|
|
|
5401
5298
|
]), 4)
|
|
5402
5299
|
])) : N("", !0);
|
|
5403
5300
|
}
|
|
5404
|
-
const di = /* @__PURE__ */
|
|
5301
|
+
const di = /* @__PURE__ */ T(li, [["render", hi], ["__scopeId", "data-v-d709ba86"]]);
|
|
5405
5302
|
const pi = {
|
|
5406
5303
|
name: "IdmArctic",
|
|
5407
5304
|
props: {
|
|
@@ -5490,15 +5387,18 @@ const pi = {
|
|
|
5490
5387
|
}
|
|
5491
5388
|
},
|
|
5492
5389
|
async handleDraw() {
|
|
5493
|
-
this.handleSetup(), this.etime
|
|
5494
|
-
|
|
5495
|
-
|
|
5390
|
+
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
5391
|
+
this.etime = this.factor.etime;
|
|
5392
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
5393
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
5394
|
+
}
|
|
5395
|
+
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
5496
5396
|
}
|
|
5497
5397
|
}
|
|
5498
5398
|
}, ui = { key: 0 };
|
|
5499
5399
|
function mi(t, e, a, r, i, o) {
|
|
5500
|
-
var
|
|
5501
|
-
return (
|
|
5400
|
+
var l;
|
|
5401
|
+
return (l = a.factor) != null && l.active ? (A(), f("div", ui, [
|
|
5502
5402
|
s("div", {
|
|
5503
5403
|
class: "legend-bars flex-center",
|
|
5504
5404
|
style: X([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5512,7 +5412,7 @@ function mi(t, e, a, r, i, o) {
|
|
|
5512
5412
|
]), 4)
|
|
5513
5413
|
])) : N("", !0);
|
|
5514
5414
|
}
|
|
5515
|
-
const gi = /* @__PURE__ */
|
|
5415
|
+
const gi = /* @__PURE__ */ T(pi, [["render", mi], ["__scopeId", "data-v-71587f65"]]);
|
|
5516
5416
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
5517
5417
|
var Ai = /* @__PURE__ */ mt({
|
|
5518
5418
|
name: "LocationFilled",
|
|
@@ -5642,8 +5542,8 @@ const wi = {
|
|
|
5642
5542
|
if (this.showMeteo && this.ts) {
|
|
5643
5543
|
const e = Y(), a = (t = Y(this.ts)) == null ? void 0 : t.diff(e, "d", !0), i = [0, 1, 2, 3, 4, 5, 6, 7].every((o) => {
|
|
5644
5544
|
var c;
|
|
5645
|
-
const
|
|
5646
|
-
return (c = Ye.pickHourly(this.meteoData,
|
|
5545
|
+
const l = Ue(this.ts).tz(this.positionGmt).add(3 * o, "h").format();
|
|
5546
|
+
return (c = Ye.pickHourly(this.meteoData, l)) == null ? void 0 : c[0];
|
|
5647
5547
|
});
|
|
5648
5548
|
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) {
|
|
5649
5549
|
const o = Xe.pickDailyExtremes(this.tideData, this.ts);
|
|
@@ -5690,14 +5590,14 @@ const wi = {
|
|
|
5690
5590
|
this.loading = !0, this.meteoData = [];
|
|
5691
5591
|
let r = e ? Y(e).utc().format() : Y().utc().format();
|
|
5692
5592
|
const { weatherModels: i, marineModels: o } = Ye.autoPickMeteoModel(this.forecastModel);
|
|
5693
|
-
let
|
|
5593
|
+
let l = {
|
|
5694
5594
|
lat: t.lat,
|
|
5695
5595
|
lng: t.lng,
|
|
5696
5596
|
datetime: r,
|
|
5697
5597
|
forecastDays: a ?? 7,
|
|
5698
5598
|
weatherModels: i,
|
|
5699
5599
|
marineModels: o
|
|
5700
|
-
}, c = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`,
|
|
5600
|
+
}, c = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, l, {
|
|
5701
5601
|
headers: {
|
|
5702
5602
|
Authorization: this.token || this.defaultMeteoToken
|
|
5703
5603
|
}
|
|
@@ -5714,17 +5614,17 @@ const wi = {
|
|
|
5714
5614
|
pastDays: 1,
|
|
5715
5615
|
weatherModels: r,
|
|
5716
5616
|
marineModels: i
|
|
5717
|
-
},
|
|
5617
|
+
}, l = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, o, {
|
|
5718
5618
|
headers: {
|
|
5719
5619
|
Authorization: this.token || this.defaultMeteoToken
|
|
5720
5620
|
}
|
|
5721
5621
|
});
|
|
5722
|
-
(
|
|
5622
|
+
(l == null ? void 0 : l.data.code) === 0 && (this.meteoData = l == null ? void 0 : l.data.data, this.loading = !1);
|
|
5723
5623
|
},
|
|
5724
5624
|
initTableData(t) {
|
|
5725
|
-
var e, a, r, i, o,
|
|
5726
|
-
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 = (
|
|
5727
|
-
var
|
|
5625
|
+
var e, a, r, i, o, l, c, h, u;
|
|
5626
|
+
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 = Ue(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : l.format("MMM-DD/HHmm[LT]"), this.currentHourData = (c = Ye.pickHourly(t, Y(this.ts))) == null ? void 0 : c[0], ((u = (h = this.currentHourData) == null ? void 0 : h.weather) == null ? void 0 : u.isDay) === 0 ? this.isDay = !1 : this.isDay = !0, this.$nextTick(() => {
|
|
5627
|
+
var d, w, b, g, v, y, p, C, m, x, M, E, _, O, Q, G, W, ee, ce, he, de, pe, ue, me, ge, te, oe, we, ie, H, Z, Ae, re;
|
|
5728
5628
|
if (!document.getElementById("meteoMainBox"))
|
|
5729
5629
|
return !1;
|
|
5730
5630
|
if (!this.currentHourData)
|
|
@@ -5732,8 +5632,8 @@ const wi = {
|
|
|
5732
5632
|
for (let se = 0; se < 8; se++) {
|
|
5733
5633
|
const ne = Ue(this.ts).tz(this.positionGmt).add(3 * se, "h").format();
|
|
5734
5634
|
this.tableData.hours.push(ne);
|
|
5735
|
-
const B = ((
|
|
5736
|
-
this.tableData.temp.push(this.roundPrecision((w = B == null ? void 0 : B.weather) == null ? void 0 : w.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((g = (b = B == null ? void 0 : B.weather) == null ? void 0 : b.precip) == null ? void 0 : g.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((y = (v = B == null ? void 0 : B.weather) == null ? void 0 : v.precip) == null ? void 0 : y.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((
|
|
5635
|
+
const B = ((d = Ye.pickHourly(t, ne)) == null ? void 0 : d[0]) || {};
|
|
5636
|
+
this.tableData.temp.push(this.roundPrecision((w = B == null ? void 0 : B.weather) == null ? void 0 : w.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((g = (b = B == null ? void 0 : B.weather) == null ? void 0 : b.precip) == null ? void 0 : g.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((y = (v = B == null ? void 0 : B.weather) == null ? void 0 : v.precip) == null ? void 0 : y.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((p = B == null ? void 0 : B.weather) == null ? void 0 : p.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((m = (C = B == null ? void 0 : B.weather) == null ? void 0 : C.wind) == null ? void 0 : m.kts, 1) ?? "-"), this.tableData.windDir.push((M = (x = B == null ? void 0 : B.weather) == null ? void 0 : x.wind) == null ? void 0 : M.bearing), this.tableData.windGust.push(this.roundPrecision((_ = (E = B == null ? void 0 : B.weather) == null ? void 0 : E.wind) == null ? void 0 : _.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((Q = (O = B == null ? void 0 : B.wave) == null ? void 0 : O.sig) == null ? void 0 : Q.height, 1) ?? "-"), this.tableData.sigwaveDir.push((W = (G = B == null ? void 0 : B.wave) == null ? void 0 : G.sig) == null ? void 0 : W.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((ce = (ee = B == null ? void 0 : B.wave) == null ? void 0 : ee.wd) == null ? void 0 : ce.height, 1) ?? "-"), this.tableData.windwaveDir.push((de = (he = B == null ? void 0 : B.wave) == null ? void 0 : he.wd) == null ? void 0 : de.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((ue = (pe = B == null ? void 0 : B.wave) == null ? void 0 : pe.wd) == null ? void 0 : ue.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((ge = (me = B == null ? void 0 : B.wave) == null ? void 0 : me.swell) == null ? void 0 : ge.height, 1) ?? "-"), this.tableData.swellDir.push((oe = (te = B == null ? void 0 : B.wave) == null ? void 0 : te.swell) == null ? void 0 : oe.bearing), this.tableData.swellPeriod.push(this.roundPrecision((ie = (we = B == null ? void 0 : B.wave) == null ? void 0 : we.swell) == null ? void 0 : ie.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((H = B == null ? void 0 : B.current) == null ? void 0 : H.speed, 1) ?? "-"), this.tableData.currentDir.push((Z = B == null ? void 0 : B.current) == null ? void 0 : Z.bearing), this.tableData.seaLevel.push(this.roundPrecision(B == null ? void 0 : B.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(B == null ? void 0 : B.sst, 0) ?? "-"), this.tableData.weatherUrls.push((Ae = B == null ? void 0 : B.weather) == null ? void 0 : Ae.url), this.tableData.weatherNames.push(((re = B == null ? void 0 : B.weather) == null ? void 0 : re.name) ?? "-");
|
|
5737
5637
|
}
|
|
5738
5638
|
});
|
|
5739
5639
|
},
|
|
@@ -5783,8 +5683,8 @@ const wi = {
|
|
|
5783
5683
|
});
|
|
5784
5684
|
if ((o == null ? void 0 : o.data.code) === 0) {
|
|
5785
5685
|
this.tideData = (o == null ? void 0 : o.data.data) || {}, this.tideLoading = !1;
|
|
5786
|
-
const
|
|
5787
|
-
this.tideTableData =
|
|
5686
|
+
const l = Xe.pickDailyExtremes(this.tideData, this.ts);
|
|
5687
|
+
this.tideTableData = l;
|
|
5788
5688
|
}
|
|
5789
5689
|
},
|
|
5790
5690
|
handleBind() {
|
|
@@ -5856,19 +5756,19 @@ const wi = {
|
|
|
5856
5756
|
class: "main-box flex-center"
|
|
5857
5757
|
};
|
|
5858
5758
|
function kr(t, e, a, r, i, o) {
|
|
5859
|
-
var u,
|
|
5860
|
-
const
|
|
5759
|
+
var u, n, d, w, b, g, v, y, p, C, m, x, M, E, _, O, Q, G, W, ee, ce, he, de, pe, ue, me, ge, te, oe, we, ie, H, Z, Ae, re, se, ne, B, Ce, xe, Be, Ie, Ee, De, Pe, ke, Me, ze, Te, Qe, Se, _e, He, Oe, Ne, je, Re, Fe, Ge, We, q, Ze, $e, et, tt, at, it, rt;
|
|
5760
|
+
const l = z("LocationFilled"), c = z("ElIcon"), h = z("ElTooltip");
|
|
5861
5761
|
return fe((A(), f("div", bi, [
|
|
5862
5762
|
s("div", vi, [
|
|
5863
5763
|
s("div", Li, [
|
|
5864
5764
|
s("div", Ci, [
|
|
5865
5765
|
k(c, { size: "22" }, {
|
|
5866
5766
|
default: ae(() => [
|
|
5867
|
-
k(
|
|
5767
|
+
k(l)
|
|
5868
5768
|
]),
|
|
5869
5769
|
_: 1
|
|
5870
5770
|
}),
|
|
5871
|
-
s("div", xi, I(o.computeLat((u = i.point) == null ? void 0 : u.lat)) + "," + I(o.computeLng((
|
|
5771
|
+
s("div", xi, I(o.computeLat((u = i.point) == null ? void 0 : u.lat)) + "," + I(o.computeLng((n = i.point) == null ? void 0 : n.lng)), 1)
|
|
5872
5772
|
]),
|
|
5873
5773
|
s("div", Bi, [
|
|
5874
5774
|
i.showTables ? (A(), f("div", {
|
|
@@ -5898,7 +5798,7 @@ function kr(t, e, a, r, i, o) {
|
|
|
5898
5798
|
k(h, {
|
|
5899
5799
|
placement: "top",
|
|
5900
5800
|
effect: "light",
|
|
5901
|
-
content: (w = (
|
|
5801
|
+
content: (w = (d = i.currentHourData) == null ? void 0 : d.weather) == null ? void 0 : w.name,
|
|
5902
5802
|
"show-after": 1e3
|
|
5903
5803
|
}, {
|
|
5904
5804
|
default: ae(() => {
|
|
@@ -5923,7 +5823,7 @@ function kr(t, e, a, r, i, o) {
|
|
|
5923
5823
|
s("div", Mi, [
|
|
5924
5824
|
s("div", zi, [
|
|
5925
5825
|
e[9] || (e[9] = s("label", null, "Precip : ", -1)),
|
|
5926
|
-
s("span", null, I(o.roundPrecision((
|
|
5826
|
+
s("span", null, I(o.roundPrecision((p = (y = (v = i.currentHourData) == null ? void 0 : v.weather) == null ? void 0 : y.precip) == null ? void 0 : p.sum, 0)) + " mm", 1)
|
|
5927
5827
|
]),
|
|
5928
5828
|
s("div", Ti, [
|
|
5929
5829
|
e[10] || (e[10] = s("label", null, "Visibility : ", -1)),
|
|
@@ -6329,7 +6229,7 @@ function kr(t, e, a, r, i, o) {
|
|
|
6329
6229
|
[ye, i.activeIndex === 4]
|
|
6330
6230
|
])
|
|
6331
6231
|
], 512), [
|
|
6332
|
-
[ye, ((
|
|
6232
|
+
[ye, ((O = (_ = i.tableData) == null ? void 0 : _.hours) == null ? void 0 : O.length) > 0 && i.showTables]
|
|
6333
6233
|
]),
|
|
6334
6234
|
fe(s("div", ur, [
|
|
6335
6235
|
s("div", mr, [
|
|
@@ -6339,7 +6239,7 @@ function kr(t, e, a, r, i, o) {
|
|
|
6339
6239
|
]),
|
|
6340
6240
|
s("div", Ar, [
|
|
6341
6241
|
e[33] || (e[33] = s("div", null, "Sig wave", -1)),
|
|
6342
|
-
s("div", null, I((ie = (we = (oe = i.currentHourData) == null ? void 0 : oe.wave) == null ? void 0 : we.sig) == null ? void 0 : ie.direction) + "/" + I(o.roundPrecision((Ae = (Z = (
|
|
6242
|
+
s("div", null, I((ie = (we = (oe = i.currentHourData) == null ? void 0 : oe.wave) == null ? void 0 : we.sig) == null ? void 0 : ie.direction) + "/" + I(o.roundPrecision((Ae = (Z = (H = i.currentHourData) == null ? void 0 : H.wave) == null ? void 0 : Z.sig) == null ? void 0 : Ae.height, 1)) + "m/" + I(o.roundPrecision((ne = (se = (re = i.currentHourData) == null ? void 0 : re.wave) == null ? void 0 : se.sig) == null ? void 0 : ne.period, 1)) + "s", 1)
|
|
6343
6243
|
])
|
|
6344
6244
|
]),
|
|
6345
6245
|
s("div", fr, [
|
|
@@ -6395,7 +6295,7 @@ function kr(t, e, a, r, i, o) {
|
|
|
6395
6295
|
[ye, i.showMeteo]
|
|
6396
6296
|
]);
|
|
6397
6297
|
}
|
|
6398
|
-
const Mr = /* @__PURE__ */
|
|
6298
|
+
const Mr = /* @__PURE__ */ T(wi, [["render", kr], ["__scopeId", "data-v-cdc6da70"]]), zr = {
|
|
6399
6299
|
name: "IdmWarZone",
|
|
6400
6300
|
props: {
|
|
6401
6301
|
map: {
|
|
@@ -6488,7 +6388,7 @@ const Mr = /* @__PURE__ */ _(wi, [["render", kr], ["__scopeId", "data-v-cdc6da70
|
|
|
6488
6388
|
function Tr(t, e, a, r, i, o) {
|
|
6489
6389
|
return A(), f("div");
|
|
6490
6390
|
}
|
|
6491
|
-
const Qr = /* @__PURE__ */
|
|
6391
|
+
const Qr = /* @__PURE__ */ T(zr, [["render", Tr]]), Sr = {
|
|
6492
6392
|
name: "IdmGmdssArea",
|
|
6493
6393
|
props: {
|
|
6494
6394
|
map: {
|
|
@@ -6611,7 +6511,7 @@ const Qr = /* @__PURE__ */ _(zr, [["render", Tr]]), Sr = {
|
|
|
6611
6511
|
function _r(t, e, a, r, i, o) {
|
|
6612
6512
|
return A(), f("div");
|
|
6613
6513
|
}
|
|
6614
|
-
const Hr = /* @__PURE__ */
|
|
6514
|
+
const Hr = /* @__PURE__ */ T(Sr, [["render", _r]]), Or = {
|
|
6615
6515
|
name: "IdmEcaZone",
|
|
6616
6516
|
props: {
|
|
6617
6517
|
map: {
|
|
@@ -6702,7 +6602,7 @@ const Hr = /* @__PURE__ */ _(Sr, [["render", _r]]), Or = {
|
|
|
6702
6602
|
function Nr(t, e, a, r, i, o) {
|
|
6703
6603
|
return A(), f("div");
|
|
6704
6604
|
}
|
|
6705
|
-
const jr = /* @__PURE__ */
|
|
6605
|
+
const jr = /* @__PURE__ */ T(Or, [["render", Nr]]);
|
|
6706
6606
|
const Rr = {
|
|
6707
6607
|
name: "IdmAlertZone",
|
|
6708
6608
|
props: {
|
|
@@ -6835,7 +6735,7 @@ const Rr = {
|
|
|
6835
6735
|
}
|
|
6836
6736
|
}, Fr = { id: "idm-gl3-zone-info" }, Gr = ["innerHTML"];
|
|
6837
6737
|
function Wr(t, e, a, r, i, o) {
|
|
6838
|
-
var
|
|
6738
|
+
var l;
|
|
6839
6739
|
return fe((A(), f("div", Fr, [
|
|
6840
6740
|
s("div", {
|
|
6841
6741
|
class: "iconfont close",
|
|
@@ -6843,13 +6743,13 @@ function Wr(t, e, a, r, i, o) {
|
|
|
6843
6743
|
}, ""),
|
|
6844
6744
|
s("div", {
|
|
6845
6745
|
class: "rich-context",
|
|
6846
|
-
innerHTML: (
|
|
6746
|
+
innerHTML: (l = i.form) == null ? void 0 : l.name
|
|
6847
6747
|
}, null, 8, Gr)
|
|
6848
6748
|
], 512)), [
|
|
6849
6749
|
[ye, i.showZone]
|
|
6850
6750
|
]);
|
|
6851
6751
|
}
|
|
6852
|
-
const Ur = /* @__PURE__ */
|
|
6752
|
+
const Ur = /* @__PURE__ */ T(Rr, [["render", Wr]]);
|
|
6853
6753
|
const Yr = {
|
|
6854
6754
|
name: "IdmPort",
|
|
6855
6755
|
props: {
|
|
@@ -6956,7 +6856,7 @@ function eo(t, e, a, r, i, o) {
|
|
|
6956
6856
|
return fe((A(), f("div", Kr, [
|
|
6957
6857
|
s("div", {
|
|
6958
6858
|
class: "close iconfont",
|
|
6959
|
-
onClick: e[0] || (e[0] = (
|
|
6859
|
+
onClick: e[0] || (e[0] = (l) => i.showPort = !1)
|
|
6960
6860
|
}, ""),
|
|
6961
6861
|
s("div", Xr, [
|
|
6962
6862
|
s("div", Jr, [
|
|
@@ -6977,7 +6877,7 @@ function eo(t, e, a, r, i, o) {
|
|
|
6977
6877
|
]),
|
|
6978
6878
|
s("div", $r, [
|
|
6979
6879
|
s("span", {
|
|
6980
|
-
onClick: e[1] || (e[1] = (
|
|
6880
|
+
onClick: e[1] || (e[1] = (l) => o.handleClickMeteo(i.form))
|
|
6981
6881
|
}, "Meteo Forecast")
|
|
6982
6882
|
])
|
|
6983
6883
|
])
|
|
@@ -6985,7 +6885,7 @@ function eo(t, e, a, r, i, o) {
|
|
|
6985
6885
|
[ye, i.showPort]
|
|
6986
6886
|
]);
|
|
6987
6887
|
}
|
|
6988
|
-
const to = /* @__PURE__ */
|
|
6888
|
+
const to = /* @__PURE__ */ T(Yr, [["render", eo], ["__scopeId", "data-v-2fc5fc5e"]]), ao = {
|
|
6989
6889
|
name: "IdmLoadLine",
|
|
6990
6890
|
props: {
|
|
6991
6891
|
map: {
|
|
@@ -7058,7 +6958,7 @@ const to = /* @__PURE__ */ _(Yr, [["render", eo], ["__scopeId", "data-v-2fc5fc5e
|
|
|
7058
6958
|
function io(t, e, a, r, i, o) {
|
|
7059
6959
|
return A(), f("div");
|
|
7060
6960
|
}
|
|
7061
|
-
const ro = /* @__PURE__ */
|
|
6961
|
+
const ro = /* @__PURE__ */ T(ao, [["render", io]]), oo = {
|
|
7062
6962
|
name: "IdmTimezone",
|
|
7063
6963
|
props: {
|
|
7064
6964
|
map: {
|
|
@@ -7226,7 +7126,7 @@ const ro = /* @__PURE__ */ _(ao, [["render", io]]), oo = {
|
|
|
7226
7126
|
function so(t, e, a, r, i, o) {
|
|
7227
7127
|
return A(), f("div");
|
|
7228
7128
|
}
|
|
7229
|
-
const no = /* @__PURE__ */
|
|
7129
|
+
const no = /* @__PURE__ */ T(oo, [["render", so]]), lo = {
|
|
7230
7130
|
name: "IdmVoluntaryReportingArea",
|
|
7231
7131
|
props: {
|
|
7232
7132
|
map: {
|
|
@@ -7317,7 +7217,7 @@ const no = /* @__PURE__ */ _(oo, [["render", so]]), lo = {
|
|
|
7317
7217
|
function co(t, e, a, r, i, o) {
|
|
7318
7218
|
return A(), f("div");
|
|
7319
7219
|
}
|
|
7320
|
-
const ho = /* @__PURE__ */
|
|
7220
|
+
const ho = /* @__PURE__ */ T(lo, [["render", co]]), po = {
|
|
7321
7221
|
name: "IdmSpecialArea",
|
|
7322
7222
|
props: {
|
|
7323
7223
|
map: {
|
|
@@ -7410,7 +7310,7 @@ const ho = /* @__PURE__ */ _(lo, [["render", co]]), po = {
|
|
|
7410
7310
|
function uo(t, e, a, r, i, o) {
|
|
7411
7311
|
return A(), f("div");
|
|
7412
7312
|
}
|
|
7413
|
-
const mo = /* @__PURE__ */
|
|
7313
|
+
const mo = /* @__PURE__ */ T(po, [["render", uo]]), go = {
|
|
7414
7314
|
name: "IdmTerminator",
|
|
7415
7315
|
props: {
|
|
7416
7316
|
map: {
|
|
@@ -7462,7 +7362,7 @@ const mo = /* @__PURE__ */ _(po, [["render", uo]]), go = {
|
|
|
7462
7362
|
function Ao(t, e, a, r, i, o) {
|
|
7463
7363
|
return A(), f("div");
|
|
7464
7364
|
}
|
|
7465
|
-
const fo = /* @__PURE__ */
|
|
7365
|
+
const fo = /* @__PURE__ */ T(go, [["render", Ao]]);
|
|
7466
7366
|
const yo = {
|
|
7467
7367
|
name: "IdmLatLng",
|
|
7468
7368
|
props: {
|
|
@@ -7630,7 +7530,7 @@ function wo(t, e, a, r, i, o) {
|
|
|
7630
7530
|
s("span", null, I(i.lngLat.lng.pretty), 1)
|
|
7631
7531
|
], 4)) : N("", !0);
|
|
7632
7532
|
}
|
|
7633
|
-
const ct = /* @__PURE__ */
|
|
7533
|
+
const ct = /* @__PURE__ */ T(yo, [["render", wo], ["__scopeId", "data-v-ad66a24c"]]), bo = {
|
|
7634
7534
|
name: "IdmMeasure",
|
|
7635
7535
|
props: {
|
|
7636
7536
|
map: {
|
|
@@ -7696,18 +7596,18 @@ const ct = /* @__PURE__ */ _(yo, [["render", wo], ["__scopeId", "data-v-ad66a24c
|
|
|
7696
7596
|
}
|
|
7697
7597
|
},
|
|
7698
7598
|
handleDrag(t) {
|
|
7699
|
-
var a, r, i, o,
|
|
7599
|
+
var a, r, i, o, l, c, h, u, n, d;
|
|
7700
7600
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
7701
7601
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7702
7602
|
const w = this.geojson.filter((y) => y.id === e.split("-")[0])[0];
|
|
7703
7603
|
this.pointMarkers[w.id].filter((y) => {
|
|
7704
|
-
var
|
|
7705
|
-
return ((
|
|
7706
|
-
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (
|
|
7604
|
+
var p;
|
|
7605
|
+
return ((p = y._element) == null ? void 0 : p.id) === e;
|
|
7606
|
+
})[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]);
|
|
7707
7607
|
let g;
|
|
7708
|
-
w.features.forEach((y,
|
|
7608
|
+
w.features.forEach((y, p) => {
|
|
7709
7609
|
if (y.geometry.type === "Point" && y.properties.id == e.split("-")[1]) {
|
|
7710
|
-
g =
|
|
7610
|
+
g = p;
|
|
7711
7611
|
return;
|
|
7712
7612
|
}
|
|
7713
7613
|
});
|
|
@@ -7715,22 +7615,22 @@ const ct = /* @__PURE__ */ _(yo, [["render", wo], ["__scopeId", "data-v-ad66a24c
|
|
|
7715
7615
|
this.handleTmpPointUpdate(
|
|
7716
7616
|
w,
|
|
7717
7617
|
v[g - 1],
|
|
7718
|
-
{ lng: (u = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : u.lng, lat: (
|
|
7618
|
+
{ lng: (u = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : u.lng, lat: (d = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : d.lat, properties: v[g].properties },
|
|
7719
7619
|
g === v.length - 1 ? void 0 : v[g + 1]
|
|
7720
7620
|
);
|
|
7721
7621
|
}
|
|
7722
7622
|
},
|
|
7723
7623
|
handleDragEnd(t) {
|
|
7724
|
-
var a, r, i, o,
|
|
7624
|
+
var a, r, i, o, l, c, h, u, n, d;
|
|
7725
7625
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
7726
7626
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7727
7627
|
const w = this.geojson.filter((v) => v.id === e.split("-")[0])[0];
|
|
7728
7628
|
this.pointMarkers[w.id].filter((v) => {
|
|
7729
7629
|
var y;
|
|
7730
7630
|
return ((y = v._element) == null ? void 0 : y.id) === e;
|
|
7731
|
-
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (
|
|
7631
|
+
})[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]);
|
|
7732
7632
|
const g = w.features.filter((v) => v.geometry.type === "Point" && v.properties.id == e.split("-")[1])[0];
|
|
7733
|
-
g.geometry.coordinates = [(u = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : u.lng, (
|
|
7633
|
+
g.geometry.coordinates = [(u = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : u.lng, (d = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : d.lat], w.features = w.features.filter((v) => v.geometry.type === "Point"), this.handlePointUpdate(w);
|
|
7734
7634
|
}
|
|
7735
7635
|
},
|
|
7736
7636
|
handleContextmenu(t) {
|
|
@@ -7746,18 +7646,18 @@ const ct = /* @__PURE__ */ _(yo, [["render", wo], ["__scopeId", "data-v-ad66a24c
|
|
|
7746
7646
|
}
|
|
7747
7647
|
},
|
|
7748
7648
|
handleClick(t) {
|
|
7749
|
-
var a, r, i, o,
|
|
7649
|
+
var a, r, i, o, l, c;
|
|
7750
7650
|
(a = this.contextmenu) == null || a.remove();
|
|
7751
7651
|
const e = t.originalEvent.target.className;
|
|
7752
7652
|
if (e === "marker-close") {
|
|
7753
|
-
const h = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, u = this.geojson.filter((
|
|
7754
|
-
u && this.handleClear(u, !0), this.geojson = this.geojson.filter((
|
|
7653
|
+
const h = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, u = this.geojson.filter((n) => n.id === h)[0];
|
|
7654
|
+
u && this.handleClear(u, !0), this.geojson = this.geojson.filter((n) => n.id !== h), !this.show && !((o = this.geojson) != null && o.some((n) => n.closed)) && this.handleUnbind();
|
|
7755
7655
|
} else if (e === "del-point") {
|
|
7756
|
-
const h = (c = (
|
|
7757
|
-
u.features = u.features.filter((
|
|
7656
|
+
const h = (c = (l = t.originalEvent.target.id) == null ? void 0 : l.replace("del-", "")) == null ? void 0 : c.split("-"), u = this.geojson.filter((n) => n.id === h[0])[0];
|
|
7657
|
+
u.features = u.features.filter((n) => n.geometry.type === "Point" && n.properties.id !== h[1]), this.handlePointUpdate(u);
|
|
7758
7658
|
} else if (e !== "marker-label" && this.show) {
|
|
7759
7659
|
let h = this.geojson.at(-1);
|
|
7760
|
-
h || (h = P.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(h)), h.features = h.features.filter((
|
|
7660
|
+
h || (h = P.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(h)), h.features = h.features.filter((n) => n.geometry.type === "Point");
|
|
7761
7661
|
const u = P.feature(
|
|
7762
7662
|
{
|
|
7763
7663
|
type: "Point",
|
|
@@ -7777,12 +7677,12 @@ const ct = /* @__PURE__ */ _(yo, [["render", wo], ["__scopeId", "data-v-ad66a24c
|
|
|
7777
7677
|
let a = 0;
|
|
7778
7678
|
const r = [];
|
|
7779
7679
|
for (let i = 1; i < e.length; i++) {
|
|
7780
|
-
const o = e[i - 1],
|
|
7781
|
-
a = K.roundPrecision(a +
|
|
7680
|
+
const o = e[i - 1], l = e[i], c = o.properties, h = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, u = { lng: l.geometry.coordinates[0], lat: l.geometry.coordinates[1] }, n = be.calculateDistance(h, u, c.mode === "RL", 2), d = be.calculateBearing(h, u, c.mode === "RL", 2);
|
|
7681
|
+
a = K.roundPrecision(a + n, 2);
|
|
7782
7682
|
let w;
|
|
7783
7683
|
c.mode === "RL" ? w = K.convertToMonotonicLng([h, u]) : w = K.convertToMonotonicLng(be.interpolateCoordinates(h, u, 200));
|
|
7784
7684
|
const b = P.lineString(w.map((g) => [g.lng, g.lat]));
|
|
7785
|
-
b.properties.dist =
|
|
7685
|
+
b.properties.dist = n, b.properties.bearing = d, b.properties.total = a, r.push(b);
|
|
7786
7686
|
}
|
|
7787
7687
|
e.push(...r), t.total = a;
|
|
7788
7688
|
}
|
|
@@ -7790,22 +7690,22 @@ const ct = /* @__PURE__ */ _(yo, [["render", wo], ["__scopeId", "data-v-ad66a24c
|
|
|
7790
7690
|
},
|
|
7791
7691
|
handleTmpPointUpdate(t, e, a, r) {
|
|
7792
7692
|
const i = P.featureCollection([]);
|
|
7793
|
-
let o,
|
|
7693
|
+
let o, l;
|
|
7794
7694
|
if (e) {
|
|
7795
|
-
const h = e.properties, u = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] },
|
|
7796
|
-
o = be.calculateDistance(u,
|
|
7797
|
-
let
|
|
7798
|
-
h.mode === "RL" ?
|
|
7799
|
-
const w = P.lineString(
|
|
7800
|
-
w.properties.dist = o, w.properties.bearing =
|
|
7695
|
+
const h = e.properties, u = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, n = { lng: a.lng, lat: a.lat };
|
|
7696
|
+
o = be.calculateDistance(u, n, h.mode === "RL", 2), l = be.calculateBearing(u, n, h.mode === "RL", 2);
|
|
7697
|
+
let d;
|
|
7698
|
+
h.mode === "RL" ? d = K.convertToMonotonicLng([u, n]) : d = K.convertToMonotonicLng(be.interpolateCoordinates(u, n, 200));
|
|
7699
|
+
const w = P.lineString(d.map((b) => [b.lng, b.lat]));
|
|
7700
|
+
w.properties.dist = o, w.properties.bearing = l, i.features.push(w);
|
|
7801
7701
|
}
|
|
7802
7702
|
if (r) {
|
|
7803
|
-
const h = a.properties, u = a,
|
|
7804
|
-
o = be.calculateDistance(u,
|
|
7805
|
-
let
|
|
7806
|
-
h.mode === "RL" ?
|
|
7807
|
-
const w = P.lineString(
|
|
7808
|
-
w.properties.dist = o, w.properties.bearing =
|
|
7703
|
+
const h = a.properties, u = a, n = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
7704
|
+
o = be.calculateDistance(u, n, h.mode === "RL", 2), l = be.calculateBearing(u, n, h.mode === "RL", 2);
|
|
7705
|
+
let d;
|
|
7706
|
+
h.mode === "RL" ? d = K.convertToMonotonicLng([u, n]) : d = K.convertToMonotonicLng(be.interpolateCoordinates(u, n, 200));
|
|
7707
|
+
const w = P.lineString(d.map((b) => [b.lng, b.lat]));
|
|
7708
|
+
w.properties.dist = o, w.properties.bearing = l, i.features.push(w);
|
|
7809
7709
|
}
|
|
7810
7710
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(i) : this.map.addSource(this.tmpSource, {
|
|
7811
7711
|
type: "geojson",
|
|
@@ -7845,7 +7745,7 @@ const ct = /* @__PURE__ */ _(yo, [["render", wo], ["__scopeId", "data-v-ad66a24c
|
|
|
7845
7745
|
}
|
|
7846
7746
|
});
|
|
7847
7747
|
let c;
|
|
7848
|
-
if (r ? c = '<div class="marker-label">Drag and drop</div>' : c = `<div class="marker-label">Total distance: <b>${K.roundPrecision((t.total ?? 0) + o, 2)}</b>nm, bearing: <b>${
|
|
7748
|
+
if (r ? c = '<div class="marker-label">Drag and drop</div>' : c = `<div class="marker-label">Total distance: <b>${K.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)
|
|
7849
7749
|
this.tipMarker._element.innerHTML = c, this.tipMarker.setLngLat([a.lng, a.lat]);
|
|
7850
7750
|
else {
|
|
7851
7751
|
const h = document.createElement("div");
|
|
@@ -7903,32 +7803,32 @@ const ct = /* @__PURE__ */ _(yo, [["render", wo], ["__scopeId", "data-v-ad66a24c
|
|
|
7903
7803
|
"text-halo-blur": 0
|
|
7904
7804
|
}
|
|
7905
7805
|
});
|
|
7906
|
-
const o = t.features.filter((
|
|
7907
|
-
for (const
|
|
7806
|
+
const o = t.features.filter((l) => l.geometry.type === "Point");
|
|
7807
|
+
for (const l of o) {
|
|
7908
7808
|
const c = document.createElement("div");
|
|
7909
|
-
c.id = `${t.id}-${
|
|
7910
|
-
const h = new ve.Marker({ element: c, draggable: !0, contextmenu: !0 }).setLngLat(
|
|
7809
|
+
c.id = `${t.id}-${l.properties.id}`, c.className = `${t.closed ? "point-marker closed" : "point-marker"}`, c.innerHTML = '<div class="marker-circle"></div>';
|
|
7810
|
+
const h = new ve.Marker({ element: c, draggable: !0, contextmenu: !0 }).setLngLat(l.geometry.coordinates).addTo(this.map);
|
|
7911
7811
|
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];
|
|
7912
7812
|
}
|
|
7913
7813
|
if (t.closed) {
|
|
7914
|
-
const
|
|
7915
|
-
u.className = "point-summary-marker", u.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(u).setOffset([60, 0]).setLngLat(
|
|
7814
|
+
const l = o.at(-1), h = t.features.filter((n) => n.geometry.type === "LineString").at(-1), u = document.createElement("div");
|
|
7815
|
+
u.className = "point-summary-marker", u.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(u).setOffset([60, 0]).setLngLat(l.geometry.coordinates).addTo(this.map);
|
|
7916
7816
|
}
|
|
7917
7817
|
}
|
|
7918
7818
|
},
|
|
7919
7819
|
handleClear(t, e = !0) {
|
|
7920
|
-
var o,
|
|
7820
|
+
var o, l, c, h, u, n, d, w, b;
|
|
7921
7821
|
const a = `${t.id}-${this.source}`, r = `${t.id}-${this.layer}`, i = `${t.id}-${this.labelLayer}`;
|
|
7922
|
-
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (
|
|
7822
|
+
(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), (u = this.closeMarkers[t.id]) == null || u.remove(), this.closeMarkers[t.id] = void 0, (n = this.pointMarkers[t.id]) == null || n.forEach((g) => {
|
|
7923
7823
|
g == null || g.remove();
|
|
7924
|
-
}), this.pointMarkers[t.id] = [], (
|
|
7824
|
+
}), this.pointMarkers[t.id] = [], (d = this.tipMarker) == null || d.remove(), this.tipMarker = void 0, e && ((w = this.map) != null && w.getSource(a)) && this.map.removeSource(a), e && ((b = this.map) != null && b.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
7925
7825
|
}
|
|
7926
7826
|
}
|
|
7927
7827
|
};
|
|
7928
7828
|
function vo(t, e, a, r, i, o) {
|
|
7929
7829
|
return A(), f("div");
|
|
7930
7830
|
}
|
|
7931
|
-
const Lo = /* @__PURE__ */
|
|
7831
|
+
const Lo = /* @__PURE__ */ T(bo, [["render", vo]]);
|
|
7932
7832
|
const Co = {
|
|
7933
7833
|
name: "IdmENC",
|
|
7934
7834
|
props: {
|
|
@@ -7983,14 +7883,14 @@ const Co = {
|
|
|
7983
7883
|
methods: {}
|
|
7984
7884
|
}, xo = { key: 0 }, Bo = { class: "bar-item" };
|
|
7985
7885
|
function Io(t, e, a, r, i, o) {
|
|
7986
|
-
const
|
|
7886
|
+
const l = z("ElTooltip");
|
|
7987
7887
|
return a.enabled && a.permission & i.helper.LEVEL.Supper ? (A(), f("div", xo, [
|
|
7988
7888
|
s("div", {
|
|
7989
7889
|
class: "menu-bar-box",
|
|
7990
7890
|
style: X({ position: "absolute", right: i.right + "px", bottom: a.bottom })
|
|
7991
7891
|
}, [
|
|
7992
7892
|
s("div", Bo, [
|
|
7993
|
-
k(
|
|
7893
|
+
k(l, {
|
|
7994
7894
|
placement: "left",
|
|
7995
7895
|
effect: "light",
|
|
7996
7896
|
content: "Hifleet",
|
|
@@ -8006,7 +7906,7 @@ function Io(t, e, a, r, i, o) {
|
|
|
8006
7906
|
]),
|
|
8007
7907
|
_: 1
|
|
8008
7908
|
}),
|
|
8009
|
-
k(
|
|
7909
|
+
k(l, {
|
|
8010
7910
|
placement: "left",
|
|
8011
7911
|
effect: "light",
|
|
8012
7912
|
content: "I4insight",
|
|
@@ -8026,7 +7926,7 @@ function Io(t, e, a, r, i, o) {
|
|
|
8026
7926
|
], 4)
|
|
8027
7927
|
])) : N("", !0);
|
|
8028
7928
|
}
|
|
8029
|
-
const Eo = /* @__PURE__ */
|
|
7929
|
+
const Eo = /* @__PURE__ */ T(Co, [["render", Io], ["__scopeId", "data-v-7301123d"]]), Do = {
|
|
8030
7930
|
name: "IdmWorld12nm",
|
|
8031
7931
|
props: {
|
|
8032
7932
|
map: {
|
|
@@ -8085,7 +7985,7 @@ const Eo = /* @__PURE__ */ _(Co, [["render", Io], ["__scopeId", "data-v-7301123d
|
|
|
8085
7985
|
function Po(t, e, a, r, i, o) {
|
|
8086
7986
|
return null;
|
|
8087
7987
|
}
|
|
8088
|
-
const ko = /* @__PURE__ */
|
|
7988
|
+
const ko = /* @__PURE__ */ T(Do, [["render", Po]]);
|
|
8089
7989
|
const Mo = {
|
|
8090
7990
|
name: "IdmWorldMarine",
|
|
8091
7991
|
props: {
|
|
@@ -8126,7 +8026,7 @@ const Mo = {
|
|
|
8126
8026
|
function zo(t, e, a, r, i, o) {
|
|
8127
8027
|
return null;
|
|
8128
8028
|
}
|
|
8129
|
-
const To = /* @__PURE__ */
|
|
8029
|
+
const To = /* @__PURE__ */ T(Mo, [["render", zo]]), Qo = {
|
|
8130
8030
|
name: "IdmChinaRoute",
|
|
8131
8031
|
props: {
|
|
8132
8032
|
map: {
|
|
@@ -8167,7 +8067,7 @@ const To = /* @__PURE__ */ _(Mo, [["render", zo]]), Qo = {
|
|
|
8167
8067
|
function So(t, e, a, r, i, o) {
|
|
8168
8068
|
return null;
|
|
8169
8069
|
}
|
|
8170
|
-
const _o = /* @__PURE__ */
|
|
8070
|
+
const _o = /* @__PURE__ */ T(Qo, [["render", So]]);
|
|
8171
8071
|
const Ho = {
|
|
8172
8072
|
name: "IdmGLV2",
|
|
8173
8073
|
components: {
|
|
@@ -8270,23 +8170,23 @@ const Ho = {
|
|
|
8270
8170
|
},
|
|
8271
8171
|
map: {
|
|
8272
8172
|
handler() {
|
|
8273
|
-
this.map && (this.map.on("
|
|
8173
|
+
this.map && (this.map.on("move", this.handleDragEndWithZoom4Image), this.viewport = new Ve(this.map), this.handleRampColorInitial());
|
|
8274
8174
|
},
|
|
8275
8175
|
immediate: !0
|
|
8276
8176
|
},
|
|
8277
8177
|
enc: {
|
|
8278
8178
|
handler(t, e) {
|
|
8279
|
-
var a, r, i, o,
|
|
8280
|
-
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 = (
|
|
8179
|
+
var a, r, i, o, l, c, h, u;
|
|
8180
|
+
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"), (u = (h = this.map) == null ? void 0 : h.getLayer("hi")) == null || u.setLayoutProperty("visibility", "none"));
|
|
8281
8181
|
}
|
|
8282
8182
|
},
|
|
8283
8183
|
activeWeatherLayers: {
|
|
8284
8184
|
handler() {
|
|
8285
|
-
var a, r, i, o,
|
|
8185
|
+
var a, r, i, o, l, c, h, u, n, d, w, b, g, v, y, p, C;
|
|
8286
8186
|
if (!this.map)
|
|
8287
8187
|
return !1;
|
|
8288
8188
|
const t = this.activeWeatherLayers.some((m) => m.key === "wind" && m.particle === !0 || m.key === "current" && m.particle === !0 || m.key === "ice-thickness" || m.key === "ice-cover" || m.key === "temp" || m.key === "water-temp"), e = this.activeWeatherLayers.some((m) => m.key === "visibility" || m.key === "precip3h");
|
|
8289
|
-
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 = (
|
|
8189
|
+
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"), (u = this.map) != null && u.getLayer((h = this.viewport) == null ? void 0 : h.rampColorLayer) && ((n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((w = this.map) == null || w.moveLayer((d = this.viewport) == null ? void 0 : d.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), e && ((g = this.map) == null || g.moveLayer(this.helper.mapboxCustomer.layers.countryBoundary.id, (b = this.viewport) == null ? void 0 : b.rampColorLayer))) : ((y = (v = this.map) == null ? void 0 : v.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || y.setLayoutProperty("visibility", "none"), (C = (p = this.map) == null ? void 0 : p.getLayer(this.enc)) == null || C.setLayoutProperty("visibility", "visible")), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
|
|
8290
8190
|
},
|
|
8291
8191
|
immediate: !0
|
|
8292
8192
|
},
|
|
@@ -8338,21 +8238,21 @@ const Ho = {
|
|
|
8338
8238
|
},
|
|
8339
8239
|
methods: {
|
|
8340
8240
|
async fetchWeatherLayers(t = { tropicals: !1 }) {
|
|
8341
|
-
var i, o,
|
|
8241
|
+
var i, o, l, c, h, u, n, d, w;
|
|
8342
8242
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
8343
8243
|
let a = 0, r = 0;
|
|
8344
8244
|
if (this.map) {
|
|
8345
8245
|
const b = ((i = this.map) == null ? void 0 : i.getZoom()) + 1, g = (o = this.map) == null ? void 0 : o.getBounds(), v = `${g._sw.lng},${g._sw.lat},${g._ne.lng},${g._ne.lat}`;
|
|
8346
|
-
if (this.particleFactor && ((
|
|
8347
|
-
const y = Je.WEATHER_LAYERS.find((
|
|
8246
|
+
if (this.particleFactor && ((l = this.$refs.layer) != null && l.autoActive)) {
|
|
8247
|
+
const y = Je.WEATHER_LAYERS.find((p) => {
|
|
8348
8248
|
var C;
|
|
8349
|
-
return ((C =
|
|
8249
|
+
return ((C = p.peer) == null ? void 0 : C.weight) === this.particleFactor.weight;
|
|
8350
8250
|
});
|
|
8351
8251
|
this.particleFactor.particle && (this.showWindParticle || this.showCurrentParticle) ? this.weatherWeight = this.weatherWeight & y.weight ? this.weatherWeight : this.weatherWeight + y.weight : this.weatherWeight = this.weatherWeight & y.weight ? this.weatherWeight - y.weight : this.weatherWeight;
|
|
8352
8252
|
}
|
|
8353
8253
|
if (this.weatherWeight > 0) {
|
|
8354
|
-
let y = this.weatherWeight,
|
|
8355
|
-
if (t.tropicals || this.weatherWeight & 256 && (
|
|
8254
|
+
let y = this.weatherWeight, p;
|
|
8255
|
+
if (t.tropicals || this.weatherWeight & 256 && (p = this.weatherLayers.tropicals, p && (y -= 256, p.version = Math.random() + 1)), y > 0) {
|
|
8356
8256
|
const C = await le.get(`${this.gateway}/api/arc/weather/layers2/links?l=${y}&v=${this.source}&z=${b}&bbox=${v}&t=${this.ts}`, {
|
|
8357
8257
|
headers: {
|
|
8358
8258
|
Authorization: this.token || this.defaultMeteoToken
|
|
@@ -8368,18 +8268,18 @@ const Ho = {
|
|
|
8368
8268
|
key: E
|
|
8369
8269
|
},
|
|
8370
8270
|
responseType: /\.(jpg|png)$/.test(m[E]) ? "blob" : "json"
|
|
8371
|
-
}).catch((
|
|
8372
|
-
console.log(`[${E}] fetch layer error: ${
|
|
8271
|
+
}).catch((_) => {
|
|
8272
|
+
console.log(`[${E}] fetch layer error: ${_}`);
|
|
8373
8273
|
})
|
|
8374
8274
|
);
|
|
8375
8275
|
const M = await Promise.all(x);
|
|
8376
8276
|
this.weatherLayers = {}, M.map((E) => {
|
|
8377
8277
|
var Q, G, W, ee;
|
|
8378
|
-
const
|
|
8379
|
-
|
|
8380
|
-
raw:
|
|
8278
|
+
const _ = ((Q = E == null ? void 0 : E.data) == null ? void 0 : Q.data) || (E == null ? void 0 : E.data), O = (W = (G = E == null ? void 0 : E.config) == null ? void 0 : G.headers) == null ? void 0 : W.key;
|
|
8279
|
+
O && _ && (this.weatherLayers[O] = {
|
|
8280
|
+
raw: _,
|
|
8381
8281
|
type: ((ee = E == null ? void 0 : E.config) == null ? void 0 : ee.responseType) === "blob" ? "image" : "json",
|
|
8382
|
-
etime:
|
|
8282
|
+
etime: C.data.etime
|
|
8383
8283
|
});
|
|
8384
8284
|
}), m.tropicals && le.get(m.tropicals, {
|
|
8385
8285
|
headers: {
|
|
@@ -8388,37 +8288,37 @@ const Ho = {
|
|
|
8388
8288
|
}
|
|
8389
8289
|
}).then((E) => {
|
|
8390
8290
|
var Q, G, W;
|
|
8391
|
-
const
|
|
8392
|
-
this.weatherLayers[
|
|
8393
|
-
data:
|
|
8291
|
+
const _ = nt.convert2Geojson(((Q = E == null ? void 0 : E.data) == null ? void 0 : Q.data) || (E == null ? void 0 : E.data)), O = (W = (G = E == null ? void 0 : E.config) == null ? void 0 : G.headers) == null ? void 0 : W.key;
|
|
8292
|
+
this.weatherLayers[O] = {
|
|
8293
|
+
data: _,
|
|
8394
8294
|
active: !0,
|
|
8395
8295
|
cached: !1,
|
|
8396
8296
|
type: "json",
|
|
8397
|
-
etime:
|
|
8297
|
+
etime: C.data.etime,
|
|
8398
8298
|
version: Math.random() + 1
|
|
8399
8299
|
};
|
|
8400
8300
|
});
|
|
8401
8301
|
}
|
|
8402
8302
|
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"]) {
|
|
8403
|
-
const m = (u = this.weatherLayers["swell-direction"]) == null ? void 0 : u.raw, x = (
|
|
8303
|
+
const m = (u = this.weatherLayers["swell-direction"]) == null ? void 0 : u.raw, x = (n = this.weatherLayers["swell-height"]) == null ? void 0 : n.raw;
|
|
8404
8304
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
8405
8305
|
type: "json",
|
|
8406
8306
|
direction: m,
|
|
8407
8307
|
height: { raw: x },
|
|
8408
|
-
etime:
|
|
8308
|
+
etime: C.data.etime
|
|
8409
8309
|
};
|
|
8410
8310
|
}
|
|
8411
8311
|
if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
|
|
8412
|
-
const m = (
|
|
8312
|
+
const m = (d = this.weatherLayers["current-direction"]) == null ? void 0 : d.raw, x = (w = this.weatherLayers["current-speed"]) == null ? void 0 : w.raw;
|
|
8413
8313
|
delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
|
|
8414
8314
|
type: "json",
|
|
8415
8315
|
direction: m,
|
|
8416
8316
|
speed: { raw: x },
|
|
8417
|
-
etime:
|
|
8317
|
+
etime: C.data.etime
|
|
8418
8318
|
};
|
|
8419
8319
|
}
|
|
8420
8320
|
}
|
|
8421
|
-
|
|
8321
|
+
p && (p.etime = this.ts, p.cached = !0, this.weatherLayers.tropicals = p);
|
|
8422
8322
|
}
|
|
8423
8323
|
this.handleWeatherLayerToggle(), this.handleDragEndWithZoom4Json();
|
|
8424
8324
|
}
|
|
@@ -8429,19 +8329,19 @@ const Ho = {
|
|
|
8429
8329
|
if (this.map) {
|
|
8430
8330
|
let o = this.otherWeight;
|
|
8431
8331
|
if (o) {
|
|
8432
|
-
let
|
|
8433
|
-
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048,
|
|
8332
|
+
let l = !1, c = !1, h = !1, u = !1;
|
|
8333
|
+
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, u = !0), o) {
|
|
8434
8334
|
if (t.all) {
|
|
8435
|
-
const
|
|
8335
|
+
const n = await le.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
|
|
8436
8336
|
headers: {
|
|
8437
8337
|
Authorization: this.token || this.defaultMeteoToken
|
|
8438
8338
|
}
|
|
8439
8339
|
});
|
|
8440
|
-
if (((e =
|
|
8441
|
-
const
|
|
8442
|
-
for (const g in
|
|
8340
|
+
if (((e = n == null ? void 0 : n.data) == null ? void 0 : e.code) === 0) {
|
|
8341
|
+
const d = (a = n == null ? void 0 : n.data) == null ? void 0 : a.data, w = [];
|
|
8342
|
+
for (const g in d)
|
|
8443
8343
|
w.push(
|
|
8444
|
-
le.get(
|
|
8344
|
+
le.get(d[g], {
|
|
8445
8345
|
headers: {
|
|
8446
8346
|
Authorization: this.token || this.defaultMeteoToken,
|
|
8447
8347
|
key: g
|
|
@@ -8449,23 +8349,23 @@ const Ho = {
|
|
|
8449
8349
|
})
|
|
8450
8350
|
);
|
|
8451
8351
|
const b = await Promise.all(w);
|
|
8452
|
-
this.otherLayers = { enc:
|
|
8453
|
-
var
|
|
8454
|
-
const v = ((
|
|
8352
|
+
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute: u }, b.map((g) => {
|
|
8353
|
+
var p, C, m;
|
|
8354
|
+
const v = ((p = g == null ? void 0 : g.data) == null ? void 0 : p.data) || (g == null ? void 0 : g.data), y = (m = (C = g == null ? void 0 : g.config) == null ? void 0 : C.headers) == null ? void 0 : m.key;
|
|
8455
8355
|
this.otherLayers[y] = v;
|
|
8456
8356
|
});
|
|
8457
8357
|
}
|
|
8458
8358
|
} else if (t.dayNight && o & 1024) {
|
|
8459
|
-
const
|
|
8359
|
+
const n = await le.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
|
|
8460
8360
|
headers: {
|
|
8461
8361
|
Authorization: this.token || this.defaultMeteoToken
|
|
8462
8362
|
}
|
|
8463
8363
|
});
|
|
8464
|
-
if (((r =
|
|
8465
|
-
const
|
|
8466
|
-
for (const g in
|
|
8364
|
+
if (((r = n == null ? void 0 : n.data) == null ? void 0 : r.code) === 0) {
|
|
8365
|
+
const d = (i = n == null ? void 0 : n.data) == null ? void 0 : i.data, w = [];
|
|
8366
|
+
for (const g in d)
|
|
8467
8367
|
w.push(
|
|
8468
|
-
le.get(
|
|
8368
|
+
le.get(d[g], {
|
|
8469
8369
|
headers: {
|
|
8470
8370
|
Authorization: this.token || this.defaultMeteoToken,
|
|
8471
8371
|
key: g
|
|
@@ -8473,14 +8373,14 @@ const Ho = {
|
|
|
8473
8373
|
})
|
|
8474
8374
|
);
|
|
8475
8375
|
(await Promise.all(w)).map((g) => {
|
|
8476
|
-
var
|
|
8477
|
-
const v = ((
|
|
8376
|
+
var p, C, m;
|
|
8377
|
+
const v = ((p = g == null ? void 0 : g.data) == null ? void 0 : p.data) || (g == null ? void 0 : g.data), y = (m = (C = g == null ? void 0 : g.config) == null ? void 0 : C.headers) == null ? void 0 : m.key;
|
|
8478
8378
|
this.otherLayers[y] = v;
|
|
8479
8379
|
});
|
|
8480
8380
|
}
|
|
8481
8381
|
}
|
|
8482
8382
|
} else
|
|
8483
|
-
this.otherLayers = { enc:
|
|
8383
|
+
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute: u };
|
|
8484
8384
|
} else
|
|
8485
8385
|
this.otherLayers = {};
|
|
8486
8386
|
this.handleBeforeLayerToggle();
|
|
@@ -8496,7 +8396,7 @@ const Ho = {
|
|
|
8496
8396
|
this.activeWindLayer = !!this.activeWeatherLayers.find((e) => e.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
8497
8397
|
},
|
|
8498
8398
|
handleRampColorInitial() {
|
|
8499
|
-
var t, e, a, r, i, o,
|
|
8399
|
+
var t, e, a, r, i, o, l, c, h, u, n, d;
|
|
8500
8400
|
this.viewport.map.getSource((t = this.viewport) == null ? void 0 : t.rampColorSource) || this.viewport.map.addSource((e = this.viewport) == null ? void 0 : e.rampColorSource, {
|
|
8501
8401
|
type: "canvas",
|
|
8502
8402
|
canvas: (a = this.viewport) == null ? void 0 : a.rampColorCanvas,
|
|
@@ -8512,7 +8412,7 @@ const Ho = {
|
|
|
8512
8412
|
}
|
|
8513
8413
|
},
|
|
8514
8414
|
this.beforeLayer
|
|
8515
|
-
), this.viewport.map.getSource((
|
|
8415
|
+
), this.viewport.map.getSource((l = this.viewport) == null ? void 0 : l.particleSource) || this.viewport.map.addSource((c = this.viewport) == null ? void 0 : c.particleSource, {
|
|
8516
8416
|
type: "canvas",
|
|
8517
8417
|
canvas: (h = this.viewport) == null ? void 0 : h.particleCanvas,
|
|
8518
8418
|
animate: !0,
|
|
@@ -8520,8 +8420,8 @@ const Ho = {
|
|
|
8520
8420
|
}), this.viewport.map.getLayer((u = this.viewport) == null ? void 0 : u.particleLayer) || this.viewport.map.addLayer(
|
|
8521
8421
|
{
|
|
8522
8422
|
type: "raster",
|
|
8523
|
-
id: (
|
|
8524
|
-
source: (
|
|
8423
|
+
id: (n = this.viewport) == null ? void 0 : n.particleLayer,
|
|
8424
|
+
source: (d = this.viewport) == null ? void 0 : d.particleSource,
|
|
8525
8425
|
layout: {
|
|
8526
8426
|
visibility: "none"
|
|
8527
8427
|
}
|
|
@@ -8530,85 +8430,85 @@ const Ho = {
|
|
|
8530
8430
|
);
|
|
8531
8431
|
},
|
|
8532
8432
|
handleDragEndWithZoom4Json() {
|
|
8533
|
-
var u,
|
|
8433
|
+
var u, n, d, w, b;
|
|
8534
8434
|
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
8535
8435
|
let e = 0, a = 0;
|
|
8536
|
-
const r = (u = this.map) == null ? void 0 : u.getBounds(), i = this.map.getZoom(), o = K.convertToStdLng(r._sw.lng),
|
|
8436
|
+
const r = (u = this.map) == null ? void 0 : u.getBounds(), i = this.map.getZoom(), o = K.convertToStdLng(r._sw.lng), l = K.convertToStdLng(r._ne.lng), c = Math.floor(r._sw.lat), h = Math.ceil(r._ne.lat);
|
|
8537
8437
|
for (const g in this.weatherLayers)
|
|
8538
8438
|
if (this.weatherLayers[g].active && this.weatherLayers[g].type === "json") {
|
|
8539
8439
|
this.weatherLayers[g].active = !1, this.weatherLayers[g].version = Math.random() + 1;
|
|
8540
8440
|
let v = [];
|
|
8541
8441
|
if (["swell", "current"].includes(g)) {
|
|
8542
|
-
const y = ((
|
|
8543
|
-
for (const
|
|
8544
|
-
if (
|
|
8545
|
-
const C = y[
|
|
8546
|
-
o >
|
|
8547
|
-
var M, E,
|
|
8442
|
+
const y = ((n = this.weatherLayers[g]) == null ? void 0 : n.direction) || {};
|
|
8443
|
+
for (const p in y)
|
|
8444
|
+
if (p > c && p < h && (!(i <= this.zoom) || p % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8445
|
+
const C = y[p].lng;
|
|
8446
|
+
o > l ? C.forEach((m, x) => {
|
|
8447
|
+
var M, E, _, O, Q, G;
|
|
8548
8448
|
if (i < 2) {
|
|
8549
8449
|
if ((m >= 0 && m <= 360 || m >= -360 && m <= 0) && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8550
|
-
const W = P.point([m,
|
|
8551
|
-
val: ((M = y[
|
|
8552
|
-
spd: (
|
|
8450
|
+
const W = P.point([m, p], {
|
|
8451
|
+
val: ((M = y[p].val) == null ? void 0 : M[x]) || ((E = y[p].dir) == null ? void 0 : E[x]),
|
|
8452
|
+
spd: (_ = y[p].spd) == null ? void 0 : _[x]
|
|
8553
8453
|
});
|
|
8554
8454
|
v.push(W);
|
|
8555
8455
|
}
|
|
8556
|
-
} else if ((m >= o && m <= 180 || m >= -180 && m <=
|
|
8557
|
-
const W = P.point([m,
|
|
8558
|
-
val: ((
|
|
8559
|
-
spd: (G = y[
|
|
8456
|
+
} else if ((m >= o && m <= 180 || m >= -180 && m <= l) && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8457
|
+
const W = P.point([m, p], {
|
|
8458
|
+
val: ((O = y[p].val) == null ? void 0 : O[x]) || ((Q = y[p].dir) == null ? void 0 : Q[x]),
|
|
8459
|
+
spd: (G = y[p].spd) == null ? void 0 : G[x]
|
|
8560
8460
|
});
|
|
8561
8461
|
v.push(W);
|
|
8562
8462
|
}
|
|
8563
8463
|
}) : C.forEach((m, x) => {
|
|
8564
|
-
var M, E,
|
|
8464
|
+
var M, E, _, O, Q, G;
|
|
8565
8465
|
if (o < 2) {
|
|
8566
8466
|
if ((m >= 0 && m <= 360 || m >= -360 && m <= 0) && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8567
|
-
const W = P.point([m,
|
|
8568
|
-
val: ((M = y[
|
|
8569
|
-
spd: (
|
|
8467
|
+
const W = P.point([m, p], {
|
|
8468
|
+
val: ((M = y[p].val) == null ? void 0 : M[x]) || ((E = y[p].dir) == null ? void 0 : E[x]),
|
|
8469
|
+
spd: (_ = y[p].spd) == null ? void 0 : _[x]
|
|
8570
8470
|
});
|
|
8571
8471
|
v.push(W);
|
|
8572
8472
|
}
|
|
8573
|
-
} else if (m >= o && m <=
|
|
8574
|
-
const W = P.point([m,
|
|
8575
|
-
val: ((
|
|
8576
|
-
spd: (G = y[
|
|
8473
|
+
} else if (m >= o && m <= l && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8474
|
+
const W = P.point([m, p], {
|
|
8475
|
+
val: ((O = y[p].val) == null ? void 0 : O[x]) || ((Q = y[p].dir) == null ? void 0 : Q[x]),
|
|
8476
|
+
spd: (G = y[p].spd) == null ? void 0 : G[x]
|
|
8577
8477
|
});
|
|
8578
8478
|
v.push(W);
|
|
8579
8479
|
}
|
|
8580
8480
|
});
|
|
8581
8481
|
}
|
|
8582
8482
|
if (a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("direction elapsed: ", a, ", total: ", e += a), g === "swell") {
|
|
8583
|
-
const
|
|
8584
|
-
if (
|
|
8585
|
-
if (!
|
|
8483
|
+
const p = this.weatherLayers[g].height;
|
|
8484
|
+
if (p) {
|
|
8485
|
+
if (!p.data) {
|
|
8586
8486
|
const C = [];
|
|
8587
|
-
for (const m in (
|
|
8588
|
-
const x =
|
|
8487
|
+
for (const m in (d = p.raw) == null ? void 0 : d.LineString) {
|
|
8488
|
+
const x = p.raw.LineString[m];
|
|
8589
8489
|
for (const M of x)
|
|
8590
8490
|
C.push(
|
|
8591
8491
|
P.lineString(M, {
|
|
8592
8492
|
val: Number(m)
|
|
8593
8493
|
})
|
|
8594
8494
|
);
|
|
8595
|
-
|
|
8495
|
+
p.data = P.featureCollection(C);
|
|
8596
8496
|
}
|
|
8597
8497
|
}
|
|
8598
|
-
if (
|
|
8599
|
-
const C = this.handleBboxClip(
|
|
8498
|
+
if (p.data) {
|
|
8499
|
+
const C = this.handleBboxClip(p.data, r);
|
|
8600
8500
|
v = v.concat(C);
|
|
8601
8501
|
}
|
|
8602
8502
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("height elapsed: ", a, ", total: ", e += a);
|
|
8603
8503
|
}
|
|
8604
8504
|
}
|
|
8605
8505
|
if (g === "current") {
|
|
8606
|
-
const
|
|
8607
|
-
if (
|
|
8608
|
-
if (!
|
|
8506
|
+
const p = this.weatherLayers[g].speed;
|
|
8507
|
+
if (p) {
|
|
8508
|
+
if (!p.data) {
|
|
8609
8509
|
const m = [];
|
|
8610
|
-
for (const x in (w =
|
|
8611
|
-
const M =
|
|
8510
|
+
for (const x in (w = p.raw) == null ? void 0 : w.Polygon) {
|
|
8511
|
+
const M = p.raw.Polygon[x];
|
|
8612
8512
|
for (const E of M)
|
|
8613
8513
|
m.push(
|
|
8614
8514
|
P.polygon(E, {
|
|
@@ -8616,48 +8516,48 @@ const Ho = {
|
|
|
8616
8516
|
})
|
|
8617
8517
|
);
|
|
8618
8518
|
}
|
|
8619
|
-
|
|
8519
|
+
p.data = P.featureCollection(m);
|
|
8620
8520
|
}
|
|
8621
|
-
const C = i < this.zoom ?
|
|
8521
|
+
const C = i < this.zoom ? p.data.features.filter((m) => m.properties.val > 0.5) : p.data.features;
|
|
8622
8522
|
v = v.concat(C), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("speed elapsed: ", a, ", total: ", e += a);
|
|
8623
8523
|
}
|
|
8624
8524
|
}
|
|
8625
8525
|
} else if (g === "wind") {
|
|
8626
8526
|
const y = this.weatherLayers.wind.raw;
|
|
8627
|
-
for (const
|
|
8628
|
-
if (
|
|
8629
|
-
const C = y[
|
|
8630
|
-
o >
|
|
8631
|
-
var M, E,
|
|
8527
|
+
for (const p in y)
|
|
8528
|
+
if (p > c && p < h && (!(i <= this.zoom) || p % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8529
|
+
const C = y[p].lng;
|
|
8530
|
+
o > l ? C.forEach((m, x) => {
|
|
8531
|
+
var M, E, _, O;
|
|
8632
8532
|
if (i < 2) {
|
|
8633
8533
|
if ((m >= 0 && m <= 360 || m >= -360 && m <= 0) && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8634
|
-
const Q = P.point([m,
|
|
8635
|
-
dir: ((M = y[
|
|
8636
|
-
spd: y[
|
|
8534
|
+
const Q = P.point([m, p], {
|
|
8535
|
+
dir: ((M = y[p].val) == null ? void 0 : M[x]) || ((E = y[p].dir) == null ? void 0 : E[x]),
|
|
8536
|
+
spd: y[p].spd[x]
|
|
8637
8537
|
});
|
|
8638
8538
|
v.push(Q);
|
|
8639
8539
|
}
|
|
8640
|
-
} else if ((m >= o && m <= 180 || m >= -180 && m <=
|
|
8641
|
-
const Q = P.point([m,
|
|
8642
|
-
dir: ((
|
|
8643
|
-
spd: y[
|
|
8540
|
+
} else if ((m >= o && m <= 180 || m >= -180 && m <= l) && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8541
|
+
const Q = P.point([m, p], {
|
|
8542
|
+
dir: ((_ = y[p].val) == null ? void 0 : _[x]) || ((O = y[p].dir) == null ? void 0 : O[x]),
|
|
8543
|
+
spd: y[p].spd[x]
|
|
8644
8544
|
});
|
|
8645
8545
|
v.push(Q);
|
|
8646
8546
|
}
|
|
8647
8547
|
}) : C.forEach((m, x) => {
|
|
8648
|
-
var M, E,
|
|
8548
|
+
var M, E, _, O;
|
|
8649
8549
|
if (i < 2) {
|
|
8650
8550
|
if ((m >= 0 && m <= 360 || m >= -360 && m <= 0) && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8651
|
-
const Q = P.point([m,
|
|
8652
|
-
dir: ((M = y[
|
|
8653
|
-
spd: y[
|
|
8551
|
+
const Q = P.point([m, p], {
|
|
8552
|
+
dir: ((M = y[p].val) == null ? void 0 : M[x]) || ((E = y[p].dir) == null ? void 0 : E[x]),
|
|
8553
|
+
spd: y[p].spd[x]
|
|
8654
8554
|
});
|
|
8655
8555
|
v.push(Q);
|
|
8656
8556
|
}
|
|
8657
|
-
} else if (m >= o && m <=
|
|
8658
|
-
const Q = P.point([m,
|
|
8659
|
-
dir: ((
|
|
8660
|
-
spd: y[
|
|
8557
|
+
} else if (m >= o && m <= l && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8558
|
+
const Q = P.point([m, p], {
|
|
8559
|
+
dir: ((_ = y[p].val) == null ? void 0 : _[x]) || ((O = y[p].dir) == null ? void 0 : O[x]),
|
|
8560
|
+
spd: y[p].spd[x]
|
|
8661
8561
|
});
|
|
8662
8562
|
v.push(Q);
|
|
8663
8563
|
}
|
|
@@ -8670,11 +8570,11 @@ const Ho = {
|
|
|
8670
8570
|
else {
|
|
8671
8571
|
const y = this.weatherLayers[g].raw;
|
|
8672
8572
|
if (y) {
|
|
8673
|
-
const
|
|
8573
|
+
const p = [];
|
|
8674
8574
|
for (const C in y.Polygon) {
|
|
8675
8575
|
const m = y.Polygon[C];
|
|
8676
8576
|
for (const x of m)
|
|
8677
|
-
|
|
8577
|
+
p.push(
|
|
8678
8578
|
P.polygon(x, {
|
|
8679
8579
|
val: Number(C)
|
|
8680
8580
|
})
|
|
@@ -8683,13 +8583,13 @@ const Ho = {
|
|
|
8683
8583
|
for (const C in y.Point) {
|
|
8684
8584
|
const m = y.Point[C];
|
|
8685
8585
|
for (let x = 0; x < ((b = m.lng) == null ? void 0 : b.length); x++)
|
|
8686
|
-
|
|
8586
|
+
p.push(
|
|
8687
8587
|
P.point([m.lng[x], C], {
|
|
8688
8588
|
val: Number(m.val[x])
|
|
8689
8589
|
})
|
|
8690
8590
|
);
|
|
8691
8591
|
}
|
|
8692
|
-
v = v.concat(
|
|
8592
|
+
v = v.concat(p);
|
|
8693
8593
|
}
|
|
8694
8594
|
}
|
|
8695
8595
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("sigWave elapsed: ", a, ", total: ", e += a);
|
|
@@ -8699,11 +8599,11 @@ const Ho = {
|
|
|
8699
8599
|
else {
|
|
8700
8600
|
const y = this.weatherLayers[g].raw;
|
|
8701
8601
|
if (y) {
|
|
8702
|
-
const
|
|
8602
|
+
const p = [];
|
|
8703
8603
|
for (const C in y.LineString) {
|
|
8704
8604
|
const m = y.LineString[C];
|
|
8705
8605
|
for (const x of m)
|
|
8706
|
-
|
|
8606
|
+
p.push(
|
|
8707
8607
|
P.lineString(x, {
|
|
8708
8608
|
val: Number(C)
|
|
8709
8609
|
})
|
|
@@ -8711,14 +8611,14 @@ const Ho = {
|
|
|
8711
8611
|
}
|
|
8712
8612
|
for (const C in y.Point)
|
|
8713
8613
|
y.Point[C].lng.forEach((m, x) => {
|
|
8714
|
-
m = K.convertToStdLng(m),
|
|
8614
|
+
m = K.convertToStdLng(m), p.push(
|
|
8715
8615
|
P.point([m, C], {
|
|
8716
8616
|
val: y.Point[C].val[x],
|
|
8717
8617
|
type: y.Point[C].type[x]
|
|
8718
8618
|
})
|
|
8719
8619
|
);
|
|
8720
8620
|
});
|
|
8721
|
-
v = v.concat(
|
|
8621
|
+
v = v.concat(p);
|
|
8722
8622
|
}
|
|
8723
8623
|
}
|
|
8724
8624
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("prmsl elapsed: ", a, ", total: ", e += a);
|
|
@@ -8728,17 +8628,17 @@ const Ho = {
|
|
|
8728
8628
|
else {
|
|
8729
8629
|
const y = this.weatherLayers[g].raw;
|
|
8730
8630
|
if (y) {
|
|
8731
|
-
const
|
|
8631
|
+
const p = [];
|
|
8732
8632
|
for (const C in y.LineString) {
|
|
8733
8633
|
const m = y.LineString[C];
|
|
8734
8634
|
for (const x of m)
|
|
8735
|
-
|
|
8635
|
+
p.push(
|
|
8736
8636
|
P.lineString(x, {
|
|
8737
8637
|
val: Number(C)
|
|
8738
8638
|
})
|
|
8739
8639
|
);
|
|
8740
8640
|
}
|
|
8741
|
-
v = v.concat(
|
|
8641
|
+
v = v.concat(p);
|
|
8742
8642
|
}
|
|
8743
8643
|
}
|
|
8744
8644
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e);
|
|
@@ -8755,10 +8655,10 @@ const Ho = {
|
|
|
8755
8655
|
return t.features.forEach((o) => {
|
|
8756
8656
|
if (o.geometry.type !== "Point")
|
|
8757
8657
|
if (r > i) {
|
|
8758
|
-
let
|
|
8759
|
-
c.geometry.coordinates.length && a.push(c),
|
|
8658
|
+
let l = [r, e._sw.lat, 180, e._ne.lat], c = P.bboxClip(o, l);
|
|
8659
|
+
c.geometry.coordinates.length && a.push(c), l = [-180, e._sw.lat, i, e._ne.lat], c = P.bboxClip(o, l), c.geometry.coordinates.length && a.push(c);
|
|
8760
8660
|
} else {
|
|
8761
|
-
const
|
|
8661
|
+
const l = [r, e._sw.lat, i, e._ne.lat], c = P.bboxClip(o, l);
|
|
8762
8662
|
c.geometry.coordinates.length && a.push(c);
|
|
8763
8663
|
}
|
|
8764
8664
|
else
|
|
@@ -8776,8 +8676,8 @@ const Ho = {
|
|
|
8776
8676
|
this.handleBeforeLayerToggle();
|
|
8777
8677
|
},
|
|
8778
8678
|
handleBeforeLayerToggle() {
|
|
8779
|
-
var t, e, a, r, i, o,
|
|
8780
|
-
(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"] || (
|
|
8679
|
+
var t, e, a, r, i, o, l, c, h, u, n, d, w, b, g, v;
|
|
8680
|
+
(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 || (u = this.otherLayers) != null && u.enc || (n = this.otherLayers) != null && n.world12nm || (d = this.otherLayers) != null && d.worldMarine || (w = this.otherLayers) != null && w.chinaRoute || (b = this.otherLayers) != null && b["voluntary-reporting-area"] || (g = this.otherLayers) != null && g["eca-zones"] || (v = this.otherLayers) != null && v["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
8781
8681
|
},
|
|
8782
8682
|
handleDateChange(t = { tropicals: !1 }) {
|
|
8783
8683
|
this.fetchWeatherLayers(t), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -8787,14 +8687,14 @@ const Ho = {
|
|
|
8787
8687
|
this.activeWeatherLayers = JSON.parse(JSON.stringify(t));
|
|
8788
8688
|
const a = this.activeWeatherLayers.some(
|
|
8789
8689
|
(o) => {
|
|
8790
|
-
var
|
|
8791
|
-
return ["wind", "current"].includes(o.key) && (!((
|
|
8690
|
+
var l;
|
|
8691
|
+
return ["wind", "current"].includes(o.key) && (!((l = Object.keys(o)) != null && l.some((c) => c === "particle")) || !!o.particle);
|
|
8792
8692
|
}
|
|
8793
8693
|
), r = this.activeWeatherLayers.some((o) => ["png", "jpg"].includes(o.type));
|
|
8794
8694
|
a && !r ? (this.activeWeatherLayers.forEach((o) => {
|
|
8795
8695
|
o.key === "wind" && o.particle && (this.particleFactor = o, this.showWindParticle = !0), o.key === "current" && o.particle && (this.particleFactor = o, this.showCurrentParticle = !0);
|
|
8796
8696
|
}), this.particleFactor.particle = !0) : r && this.particleFactor && (this.particleFactor.particle = !1);
|
|
8797
|
-
const i = t == null ? void 0 : t.reduce((o,
|
|
8697
|
+
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);
|
|
8798
8698
|
this.weatherWeight !== i || this.source !== e ? (this.source = e, this.weatherWeight = i, this.fetchWeatherLayers({ tropicals: !1 })) : this.handleWeatherLayerToggle();
|
|
8799
8699
|
}) : setTimeout(() => {
|
|
8800
8700
|
this.handleWeatherLayerChange(t, e);
|
|
@@ -8811,8 +8711,8 @@ const Ho = {
|
|
|
8811
8711
|
}
|
|
8812
8712
|
},
|
|
8813
8713
|
handle3dToggle(t) {
|
|
8814
|
-
var e, a, r, i, o,
|
|
8815
|
-
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((
|
|
8714
|
+
var e, a, r, i, o, l, c, h, u, n, d, w, b, g, v, y, p, C, m, x;
|
|
8715
|
+
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((u = this.viewport) == null ? void 0 : u.particleLayer, this.helper.mapboxCustomer.layers.water.id)), this.map.off("move", this.handleDragEndWithZoom4Image)) : (this.map.setProjection("mercator"), this.mapProjection = "mercator", this.map.on("move", this.handleDragEndWithZoom4Image), this.handleDragEndWithZoom4Image(), (w = this.map) != null && w.getLayer((d = this.viewport) == null ? void 0 : d.rampColorLayer) && ((b = this.map) != null && b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((v = this.map) == null || v.moveLayer((g = this.viewport) == null ? void 0 : g.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (p = this.map) != null && p.getLayer((y = this.viewport) == null ? void 0 : y.particleLayer) && ((C = this.map) != null && C.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((x = this.map) == null || x.moveLayer((m = this.viewport) == null ? void 0 : m.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
8816
8716
|
},
|
|
8817
8717
|
handleParticle(t) {
|
|
8818
8718
|
this.particleFactor = t, this.weatherLayers[t.key] && (this.weatherLayers[t.key].particle = t.particle), this.activeWeatherLayers.map((r) => {
|
|
@@ -8836,10 +8736,10 @@ const Ho = {
|
|
|
8836
8736
|
className: "map-gl-home"
|
|
8837
8737
|
};
|
|
8838
8738
|
function No(t, e, a, r, i, o) {
|
|
8839
|
-
var ie,
|
|
8840
|
-
const
|
|
8739
|
+
var ie, H, Z, Ae, re, se, ne, B, Ce, xe, Be, Ie, Ee, De, Pe, ke, Me, ze, Te, Qe, Se, _e, He, Oe, Ne, je, Re, Fe, Ge, We;
|
|
8740
|
+
const l = z("IdmGlLayer"), c = z("IdmENC"), h = z("IdmWorld12nm"), u = z("IdmWorldMarine"), n = z("IdmChinaRoute"), d = z("IdmSigWave"), w = z("IdmSwell"), b = z("IdmPrmsl"), g = z("IdmIceCover"), v = z("IdmIceThickness"), y = z("IdmTropicals"), p = z("IdmCurrents"), C = z("IdmCurrentParticle"), m = z("IdmWindBarb"), x = z("IdmWindParticle"), M = z("IdmPrecip3h"), E = z("IdmVisibility"), _ = z("IdmWaterTemp"), O = z("IdmTemp"), Q = z("IdmArctic"), G = z("IdmWarZone"), W = z("IdmGmdssArea"), ee = z("IdmEcaZone"), ce = z("IdmAlertZone"), he = z("IdmPort"), de = z("IdmLoadLine"), pe = z("IdmTimezone"), ue = z("IdmVRA"), me = z("IdmSpecialArea"), ge = z("IdmTerminator"), te = z("IdmLatLng"), oe = z("IdmMeasure"), we = z("IdmPoint");
|
|
8841
8741
|
return a.map ? (A(), f("div", Oo, [
|
|
8842
|
-
k(
|
|
8742
|
+
k(l, S({
|
|
8843
8743
|
ref: "layer",
|
|
8844
8744
|
map: a.map,
|
|
8845
8745
|
"toggle-version": a.toggleVersion,
|
|
@@ -8866,7 +8766,7 @@ function No(t, e, a, r, i, o) {
|
|
|
8866
8766
|
on3d: o.handle3dToggle,
|
|
8867
8767
|
onHandleToggleVersion: o.handleToggleVersion
|
|
8868
8768
|
}), null, 16, ["map", "toggle-version", "map-projection", "show-wind-feather", "show-wind-particle", "show-current-isoband", "show-current-particle", "token", "gateway", "forecast-model", "onWeather", "onOther", "on3d", "onHandleToggleVersion"]),
|
|
8869
|
-
k(c,
|
|
8769
|
+
k(c, S({
|
|
8870
8770
|
map: a.map,
|
|
8871
8771
|
token: a.token,
|
|
8872
8772
|
enabled: (ie = i.otherLayers) == null ? void 0 : ie.enc,
|
|
@@ -8874,82 +8774,82 @@ function No(t, e, a, r, i, o) {
|
|
|
8874
8774
|
}, t.$attrs, {
|
|
8875
8775
|
onEnc: e[9] || (e[9] = (q) => i.enc = q)
|
|
8876
8776
|
}), null, 16, ["map", "token", "enabled", "toggle-version"]),
|
|
8877
|
-
k(h,
|
|
8777
|
+
k(h, S({
|
|
8878
8778
|
map: a.map,
|
|
8879
8779
|
token: a.token,
|
|
8880
8780
|
"weather-layers": i.weatherLayers,
|
|
8881
|
-
enabled: (
|
|
8781
|
+
enabled: (H = i.otherLayers) == null ? void 0 : H.world12nm
|
|
8882
8782
|
}, t.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
8883
|
-
k(u,
|
|
8783
|
+
k(u, S({
|
|
8884
8784
|
map: a.map,
|
|
8885
8785
|
token: a.token,
|
|
8886
8786
|
"weather-layers": i.weatherLayers,
|
|
8887
8787
|
enabled: (Z = i.otherLayers) == null ? void 0 : Z.worldMarine
|
|
8888
8788
|
}, t.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
8889
|
-
k(
|
|
8789
|
+
k(n, S({
|
|
8890
8790
|
map: a.map,
|
|
8891
8791
|
token: a.token,
|
|
8892
8792
|
"weather-layers": i.weatherLayers,
|
|
8893
8793
|
enabled: (Ae = i.otherLayers) == null ? void 0 : Ae.chinaRoute
|
|
8894
8794
|
}, t.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
8895
|
-
k(
|
|
8795
|
+
k(d, S({
|
|
8896
8796
|
map: a.map,
|
|
8897
8797
|
"sig-wave": (re = i.weatherLayers) == null ? void 0 : re["sig-wave-height"],
|
|
8898
8798
|
"before-layer": a.beforeLayer,
|
|
8899
8799
|
"active-weather-layers": i.activeWeatherLayers
|
|
8900
8800
|
}, t.$attrs), null, 16, ["map", "sig-wave", "before-layer", "active-weather-layers"]),
|
|
8901
|
-
k(w,
|
|
8801
|
+
k(w, S({
|
|
8902
8802
|
map: a.map,
|
|
8903
8803
|
swell: (se = i.weatherLayers) == null ? void 0 : se.swell,
|
|
8904
8804
|
"before-layer": a.beforeLayer,
|
|
8905
8805
|
"active-weather-layers": i.activeWeatherLayers
|
|
8906
8806
|
}, t.$attrs), null, 16, ["map", "swell", "before-layer", "active-weather-layers"]),
|
|
8907
|
-
k(b,
|
|
8807
|
+
k(b, S({
|
|
8908
8808
|
map: a.map,
|
|
8909
8809
|
prmsl: (ne = i.weatherLayers) == null ? void 0 : ne.prmsl,
|
|
8910
8810
|
"before-layer": a.beforeLayer,
|
|
8911
8811
|
"active-weather-layers": i.activeWeatherLayers
|
|
8912
8812
|
}, t.$attrs), null, 16, ["map", "prmsl", "before-layer", "active-weather-layers"]),
|
|
8913
|
-
k(g,
|
|
8813
|
+
k(g, S({
|
|
8914
8814
|
viewport: i.viewport,
|
|
8915
8815
|
factor: (B = i.weatherLayers) == null ? void 0 : B["ice-cover"],
|
|
8916
8816
|
"toggle-version": a.toggleVersion,
|
|
8917
8817
|
"before-layer": a.beforeLayer
|
|
8918
8818
|
}, t.$attrs), null, 16, ["viewport", "factor", "toggle-version", "before-layer"]),
|
|
8919
|
-
k(v,
|
|
8819
|
+
k(v, S({
|
|
8920
8820
|
viewport: i.viewport,
|
|
8921
8821
|
factor: (Ce = i.weatherLayers) == null ? void 0 : Ce["ice-thickness"],
|
|
8922
8822
|
"toggle-version": a.toggleVersion,
|
|
8923
8823
|
"before-layer": a.beforeLayer
|
|
8924
8824
|
}, t.$attrs), null, 16, ["viewport", "factor", "toggle-version", "before-layer"]),
|
|
8925
|
-
k(y,
|
|
8825
|
+
k(y, S({
|
|
8926
8826
|
map: a.map,
|
|
8927
8827
|
date: a.ts,
|
|
8928
8828
|
tropicals: (xe = i.weatherLayers) == null ? void 0 : xe.tropicals,
|
|
8929
8829
|
"before-layer": a.beforeLayer
|
|
8930
8830
|
}, t.$attrs), null, 16, ["map", "date", "tropicals", "before-layer"]),
|
|
8931
|
-
k(
|
|
8831
|
+
k(p, S({
|
|
8932
8832
|
map: a.map,
|
|
8933
8833
|
"map-projection": i.mapProjection,
|
|
8934
8834
|
current: (Be = i.weatherLayers) == null ? void 0 : Be.current,
|
|
8935
8835
|
"before-layer": a.beforeLayer,
|
|
8936
8836
|
"show-current-isoband": i.showCurrentIsoband,
|
|
8937
8837
|
"show-current-particle": i.showCurrentParticle,
|
|
8938
|
-
|
|
8838
|
+
"toggle-partice-version": i.toggleCurrentParticeVersion,
|
|
8939
8839
|
"margin-bottom": i.activeWindLayer ? i.showRampColor ? "84px" : "56px" : i.showRampColor ? "56px" : "30px",
|
|
8940
8840
|
"toggle-version": a.toggleVersion,
|
|
8941
8841
|
"weather-layers": i.weatherLayers
|
|
8942
8842
|
}, t.$attrs, {
|
|
8943
8843
|
onParticle: o.handleParticle,
|
|
8944
8844
|
onHandleToggleVersion: o.handleToggleVersion
|
|
8945
|
-
}), null, 16, ["map", "map-projection", "current", "before-layer", "show-current-isoband", "show-current-particle", "
|
|
8946
|
-
k(C,
|
|
8845
|
+
}), null, 16, ["map", "map-projection", "current", "before-layer", "show-current-isoband", "show-current-particle", "toggle-partice-version", "margin-bottom", "toggle-version", "weather-layers", "onParticle", "onHandleToggleVersion"]),
|
|
8846
|
+
k(C, S({
|
|
8947
8847
|
viewport: i.viewport,
|
|
8948
8848
|
factor: (Ie = i.weatherLayers) == null ? void 0 : Ie["current-particle"],
|
|
8949
8849
|
"before-layer": a.beforeLayer,
|
|
8950
8850
|
"toggle-version": a.toggleVersion
|
|
8951
8851
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
8952
|
-
k(m,
|
|
8852
|
+
k(m, S({
|
|
8953
8853
|
ref: "windBarb",
|
|
8954
8854
|
map: a.map,
|
|
8955
8855
|
"map-projection": i.mapProjection,
|
|
@@ -8959,108 +8859,108 @@ function No(t, e, a, r, i, o) {
|
|
|
8959
8859
|
"margin-bottom": i.showRampColor ? "56px" : "30px",
|
|
8960
8860
|
"show-wind-feather": i.showWindFeather,
|
|
8961
8861
|
"show-wind-particle": i.showWindParticle,
|
|
8962
|
-
|
|
8862
|
+
"toggle-partice-version": i.toggleWindParticeVersion
|
|
8963
8863
|
}, t.$attrs, {
|
|
8964
8864
|
"toggle-version": a.toggleVersion,
|
|
8965
8865
|
"weather-layers": i.weatherLayers,
|
|
8966
8866
|
onParticle: o.handleParticle
|
|
8967
|
-
}), null, 16, ["map", "map-projection", "wind", "current", "before-layer", "margin-bottom", "show-wind-feather", "show-wind-particle", "
|
|
8968
|
-
k(x,
|
|
8867
|
+
}), null, 16, ["map", "map-projection", "wind", "current", "before-layer", "margin-bottom", "show-wind-feather", "show-wind-particle", "toggle-partice-version", "toggle-version", "weather-layers", "onParticle"]),
|
|
8868
|
+
k(x, S({
|
|
8969
8869
|
viewport: i.viewport,
|
|
8970
8870
|
factor: (Pe = i.weatherLayers) == null ? void 0 : Pe["wind-particle"],
|
|
8971
8871
|
"before-layer": a.beforeLayer,
|
|
8972
8872
|
"toggle-version": a.toggleVersion
|
|
8973
8873
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
8974
|
-
k(M,
|
|
8874
|
+
k(M, S({
|
|
8975
8875
|
viewport: i.viewport,
|
|
8976
8876
|
factor: (ke = i.weatherLayers) == null ? void 0 : ke.precip3h,
|
|
8977
8877
|
"before-layer": a.beforeLayer,
|
|
8978
8878
|
"toggle-version": a.toggleVersion
|
|
8979
8879
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
8980
|
-
k(E,
|
|
8880
|
+
k(E, S({
|
|
8981
8881
|
viewport: i.viewport,
|
|
8982
8882
|
factor: (Me = i.weatherLayers) == null ? void 0 : Me.visibility,
|
|
8983
8883
|
"before-layer": a.beforeLayer,
|
|
8984
8884
|
"toggle-version": a.toggleVersion
|
|
8985
8885
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
8986
|
-
k(
|
|
8886
|
+
k(_, S({
|
|
8987
8887
|
viewport: i.viewport,
|
|
8988
8888
|
factor: (ze = i.weatherLayers) == null ? void 0 : ze["water-temp"],
|
|
8989
8889
|
"before-layer": a.beforeLayer,
|
|
8990
8890
|
"toggle-version": a.toggleVersion
|
|
8991
8891
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
8992
|
-
k(
|
|
8892
|
+
k(O, S({
|
|
8993
8893
|
viewport: i.viewport,
|
|
8994
8894
|
factor: (Te = i.weatherLayers) == null ? void 0 : Te.temp,
|
|
8995
8895
|
"before-layer": a.beforeLayer,
|
|
8996
8896
|
"toggle-version": a.toggleVersion
|
|
8997
8897
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
8998
|
-
k(Q,
|
|
8898
|
+
k(Q, S({
|
|
8999
8899
|
viewport: i.viewport,
|
|
9000
8900
|
factor: (Qe = i.weatherLayers) == null ? void 0 : Qe.arctic,
|
|
9001
8901
|
"before-layer": a.beforeLayer,
|
|
9002
8902
|
"toggle-version": a.toggleVersion
|
|
9003
8903
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
9004
|
-
k(G,
|
|
8904
|
+
k(G, S({
|
|
9005
8905
|
map: a.map,
|
|
9006
8906
|
zone: (Se = i.otherLayers) == null ? void 0 : Se["war-zones"],
|
|
9007
8907
|
"before-layer": a.beforeLayer
|
|
9008
8908
|
}, t.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
9009
|
-
k(W,
|
|
8909
|
+
k(W, S({
|
|
9010
8910
|
map: a.map,
|
|
9011
8911
|
area: (_e = i.otherLayers) == null ? void 0 : _e["gmdss-areas"],
|
|
9012
8912
|
"before-layer": a.beforeLayer
|
|
9013
8913
|
}, t.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
9014
|
-
k(ee,
|
|
8914
|
+
k(ee, S({
|
|
9015
8915
|
map: a.map,
|
|
9016
8916
|
zone: (He = i.otherLayers) == null ? void 0 : He["eca-zones"],
|
|
9017
8917
|
"before-layer": a.beforeLayer
|
|
9018
8918
|
}, t.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
9019
|
-
k(ce,
|
|
8919
|
+
k(ce, S({
|
|
9020
8920
|
map: a.map,
|
|
9021
8921
|
zone: (Oe = i.otherLayers) == null ? void 0 : Oe["alert-zones"],
|
|
9022
8922
|
"before-layer": a.beforeLayer
|
|
9023
8923
|
}, t.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
9024
|
-
k(he,
|
|
8924
|
+
k(he, S({
|
|
9025
8925
|
map: a.map,
|
|
9026
8926
|
port: (Ne = i.otherLayers) == null ? void 0 : Ne.ports,
|
|
9027
8927
|
"before-layer": a.beforeLayer,
|
|
9028
8928
|
"forecast-model": a.forecastModel
|
|
9029
8929
|
}, t.$attrs), null, 16, ["map", "port", "before-layer", "forecast-model"]),
|
|
9030
|
-
k(de,
|
|
8930
|
+
k(de, S({
|
|
9031
8931
|
map: a.map,
|
|
9032
8932
|
line: (je = i.otherLayers) == null ? void 0 : je["load-lines"],
|
|
9033
8933
|
"before-layer": a.beforeLayer
|
|
9034
8934
|
}, t.$attrs), null, 16, ["map", "line", "before-layer"]),
|
|
9035
|
-
k(pe,
|
|
8935
|
+
k(pe, S({
|
|
9036
8936
|
map: a.map,
|
|
9037
8937
|
zone: (Re = i.otherLayers) == null ? void 0 : Re["time-zones"],
|
|
9038
8938
|
"before-layer": a.beforeLayer
|
|
9039
8939
|
}, t.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
9040
|
-
k(ue,
|
|
8940
|
+
k(ue, S({
|
|
9041
8941
|
map: a.map,
|
|
9042
8942
|
area: (Fe = i.otherLayers) == null ? void 0 : Fe["voluntary-reporting-area"],
|
|
9043
8943
|
"before-layer": a.beforeLayer
|
|
9044
8944
|
}, t.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
9045
|
-
k(me,
|
|
8945
|
+
k(me, S({
|
|
9046
8946
|
map: a.map,
|
|
9047
8947
|
area: (Ge = i.otherLayers) == null ? void 0 : Ge["special-area"],
|
|
9048
8948
|
"before-layer": a.beforeLayer
|
|
9049
8949
|
}, t.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
9050
|
-
k(ge,
|
|
8950
|
+
k(ge, S({
|
|
9051
8951
|
map: a.map,
|
|
9052
8952
|
area: (We = i.otherLayers) == null ? void 0 : We["day-night"]
|
|
9053
8953
|
}, t.$attrs), null, 16, ["map", "area"]),
|
|
9054
|
-
k(te,
|
|
8954
|
+
k(te, S({
|
|
9055
8955
|
map: a.map,
|
|
9056
8956
|
show: i.showCoord,
|
|
9057
8957
|
"toggle-version": a.toggleVersion
|
|
9058
8958
|
}, t.$attrs), null, 16, ["map", "show", "toggle-version"]),
|
|
9059
|
-
k(oe,
|
|
8959
|
+
k(oe, S({
|
|
9060
8960
|
map: a.map,
|
|
9061
8961
|
show: i.showMeasure
|
|
9062
8962
|
}, t.$attrs), null, 16, ["map", "show"]),
|
|
9063
|
-
k(we,
|
|
8963
|
+
k(we, S({
|
|
9064
8964
|
ref: "idmPoint",
|
|
9065
8965
|
map: a.map,
|
|
9066
8966
|
show: i.showPoint,
|
|
@@ -9072,7 +8972,7 @@ function No(t, e, a, r, i, o) {
|
|
|
9072
8972
|
}, t.$attrs), null, 16, ["map", "show", "meteo", "ts", "token", "gateway", "forecast-model"])
|
|
9073
8973
|
], 512)) : N("", !0);
|
|
9074
8974
|
}
|
|
9075
|
-
const jo = /* @__PURE__ */
|
|
8975
|
+
const jo = /* @__PURE__ */ T(Ho, [["render", No]]), Vo = {
|
|
9076
8976
|
install(t) {
|
|
9077
8977
|
t.component("MapboxGL", jo), t.component("TropicalGL", lt), t.component("LatLngGL", ct);
|
|
9078
8978
|
}
|