zhihao-ui 1.3.58-alpha.2 → 1.3.58-alpha.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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as ct, openBlock as at, createElementBlock as dt, createElementVNode as lt, ref as ge, computed as Ke, h as me, createVNode as st, render as qt, reactive as Kt, onMounted as _t, onUnmounted as jt } from "vue";
1
+ import { defineComponent as ct, openBlock as at, createElementBlock as dt, createElementVNode as lt, ref as ge, computed as Ke, h as ye, createVNode as st, render as qt, reactive as Kt, onMounted as _t, onUnmounted as jt } from "vue";
2
2
  import { S as Qt, M as wt, T as Ne, X as ze, t as se, V as Jt, u as Ut, D as ut, v as Tt, j as St, w as gt, x as It, y as Ve, F as ue, z as te, O as Ce, P as de, A as He, B as Ft, L as je, G as eo, H as xt, I as ie, J as ve, K as he, N as pe, Q as Je, R as ke, U as to, W as oo, Y as no, Z as Rt, _ as Qe, $ as it, a0 as bt, a1 as ro, a2 as lo, a3 as so, a4 as pt } from "./vendor-MMWA2y7U.js";
3
3
  import { _ as ft } from "./Button-B2Z_WKdq.js";
4
4
  import { w as io } from "./utils-vqG84sMo.js";
@@ -69,9 +69,9 @@ const co = { id: "scale-line-container" }, ao = /* @__PURE__ */ ct({
69
69
  data: "EPSG:4326",
70
70
  // 墨卡托投影坐标 渲染坐标
71
71
  mercator: "EPSG:3857"
72
- }, yo = [114.84, 30.52], $t = "https://static.zhihaoscm.cn/", Ue = 2003750834e-2;
72
+ }, mo = [114.84, 30.52], $t = "https://static.zhihaoscm.cn/", Ue = 2003750834e-2;
73
73
  var Te = ((e) => (e.vectorTile = `https://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${_e}`, e.vectorTileMark = `https://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${_e}`, e.satelliteImgTile = `https://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${_e}`, e.satelliteImgTileMark = `https://t0.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${_e}`, e.greenTile = `${$t}/map/tile/{z}/{x}/{y}.png`, e))(Te || {}), Oe = /* @__PURE__ */ ((e) => (e[e.M = 1] = "M", e[e.KM = 2] = "KM", e[e.NM = 3] = "NM", e))(Oe || {}), le = /* @__PURE__ */ ((e) => (e.PORT = "port", e.SHIP = "ship", e.TRACK = "track", e.DELETE = "delete", e))(le || {});
74
- function mo() {
74
+ function yo() {
75
75
  const e = ge(), l = ge(!0), o = () => e.value, n = () => o().getView(), a = (f) => {
76
76
  l.value = f;
77
77
  }, c = () => l.value, s = () => {
@@ -117,21 +117,21 @@ function mo() {
117
117
  ],
118
118
  view: new Jt(u)
119
119
  };
120
- const m = new wt(h);
120
+ const y = new wt(h);
121
121
  if (r()) {
122
- const y = new ut({
122
+ const m = new ut({
123
123
  handleEvent: function(x) {
124
124
  if (x.type === "dblclick") {
125
125
  console.log("IOS Browser---dblclick"), x.originalEvent.preventDefault();
126
- const $ = m.getView(), _ = $.getZoom();
126
+ const $ = y.getView(), _ = $.getZoom();
127
127
  return $.setZoom(_ + 1), !1;
128
128
  }
129
129
  return !0;
130
130
  }
131
131
  });
132
- m.addInteraction(y);
132
+ y.addInteraction(m);
133
133
  }
134
- e.value = m;
134
+ e.value = y;
135
135
  }, T = (f) => {
136
136
  C.set("vectorTile", new Ne({
137
137
  source: new ze({ url: Te.vectorTile }),
@@ -294,10 +294,10 @@ const Co = (e) => {
294
294
  className: "track-label-popup"
295
295
  });
296
296
  let p, k, t, r, C, R = !1, T = Date.now(), f, i = 0, u = null, h = 20;
297
- const m = 8, y = [], x = (d) => {
297
+ const y = 8, m = [], x = (d) => {
298
298
  var v;
299
- for (y.unshift(d); y.length > m; ) {
300
- const w = y.pop(), M = l.get(w);
299
+ for (m.unshift(d); m.length > y; ) {
300
+ const w = m.pop(), M = l.get(w);
301
301
  M && ((v = M.getSource()) == null || v.clear(), e == null || e.removeLayer(M), l.delete(w), delete o[w]);
302
302
  }
303
303
  };
@@ -306,9 +306,9 @@ const Co = (e) => {
306
306
  if (n && o[n] && l.get(n).getVisible()) {
307
307
  console.log("reRenderTrackLine------------"), await we(n);
308
308
  const d = V(n, o[n]);
309
- D(n, d);
309
+ H(n, d);
310
310
  }
311
- }, 100), H = () => n && o[n] && l.get(n).getVisible(), V = (d, v) => {
311
+ }, 100), D = () => n && o[n] && l.get(n).getVisible(), V = (d, v) => {
312
312
  let w = [];
313
313
  const M = Math.max(1, Math.floor(v.length / h));
314
314
  return w = v.filter((F, S) => S % M === 0).map((F, S) => {
@@ -327,7 +327,7 @@ const Co = (e) => {
327
327
  return;
328
328
  x(d), n = d, o[d] = v, h = b;
329
329
  const W = Object.keys(o).findIndex((F) => F === d) || 0;
330
- $ = w || _[W > 10 ? 10 : W], await q(), await yt(n);
330
+ $ = w || _[W > 10 ? 10 : W], await q(), await mt(n);
331
331
  }, O = (d) => {
332
332
  const v = new he();
333
333
  return new ve({
@@ -490,10 +490,10 @@ const Co = (e) => {
490
490
  }
491
491
  return null;
492
492
  }
493
- const D = async (d, v) => {
493
+ const H = async (d, v) => {
494
494
  const w = E(v);
495
495
  console.log("simplifiedPoints", w.length, "list", v.length);
496
- const M = w.map((S) => Q(S)), b = w.map((S) => ye(S, $)), W = Ye(d, w, v, $);
496
+ const M = w.map((S) => Q(S)), b = w.map((S) => me(S, $)), W = De(d, w, v, $);
497
497
  l.get(d).getSource().addFeatures([...M, ...b, ...W]);
498
498
  }, Q = (d) => {
499
499
  const v = new ie({
@@ -504,7 +504,7 @@ const Co = (e) => {
504
504
  let w = [
505
505
  ...tt(d, $)
506
506
  ];
507
- return (d.index === 0 || d.index === o[d.id].length - 1) && (w = [...At(d)], v.set("type", "track_begin")), d.state !== void 0 && d.state !== null && (w = [...De(d)], v.set("type", "track_icon")), v.setStyle(w), v;
507
+ return (d.index === 0 || d.index === o[d.id].length - 1) && (w = [...At(d)], v.set("type", "track_begin")), d.state !== void 0 && d.state !== null && (w = [...Ye(d)], v.set("type", "track_icon")), v.setStyle(w), v;
508
508
  }, J = window.devicePixelRatio || 1, B = /* @__PURE__ */ new Map();
509
509
  let G = null, z = null;
510
510
  function xe(d, v) {
@@ -534,7 +534,7 @@ const Co = (e) => {
534
534
  const qe = M.toDataURL("image/png");
535
535
  return B.set(w, qe), qe;
536
536
  }
537
- const ye = (d, v) => {
537
+ const me = (d, v) => {
538
538
  const w = xe(d.time, v), M = new ie({
539
539
  geometry: new de(d.centerPoint),
540
540
  data: d
@@ -574,7 +574,7 @@ const Co = (e) => {
574
574
  })
575
575
  })
576
576
  // textStyle,
577
- ], De = (d) => {
577
+ ], Ye = (d) => {
578
578
  const v = "#E31818", w = "#1890FF", M = "&#xe6d2", b = new te({
579
579
  text: new Ve({
580
580
  font: "Normal 22px map-iconfont",
@@ -587,7 +587,7 @@ const Co = (e) => {
587
587
  zIndex: 99
588
588
  }), F = Ct(""), Y = Ct(""), X = [];
589
589
  return Number(d.state) === 0 ? X.push(F) : Number(d.state) === 1 && X.push(Y), X.push(b), X;
590
- }, Ye = (d, v, w, M) => {
590
+ }, De = (d, v, w, M) => {
591
591
  const b = v || [], W = v.length;
592
592
  W || (b.push(w[0]), b.push(w[w.length - 1]));
593
593
  const F = new Set(v.map((Y) => `${Y.centerPoint[0]},${Y.centerPoint[1]}`)), S = [];
@@ -615,7 +615,7 @@ const Co = (e) => {
615
615
  font: "700 12px map-iconfont",
616
616
  text: Se(""),
617
617
  fill: new ue({ color: M }),
618
- rotation: mt(
618
+ rotation: yt(
619
619
  v[Y].center,
620
620
  v[Y + 1].center
621
621
  ) * (Math.PI / 180)
@@ -626,7 +626,7 @@ const Co = (e) => {
626
626
  }
627
627
  }
628
628
  return S;
629
- }, yt = (d) => {
629
+ }, mt = (d) => {
630
630
  var W, F;
631
631
  const v = e.getView(), w = (W = l == null ? void 0 : l.get(d)) == null ? void 0 : W.getSource(), M = u || (d ? w == null ? void 0 : w.getFeatureById(d) : null);
632
632
  if (!M) return;
@@ -686,8 +686,8 @@ const Co = (e) => {
686
686
  ), W = new je(b);
687
687
  return w.length = wo(W, v) || "--", w;
688
688
  }, Ht = (d, v) => {
689
- Dt(String(d), v);
690
- }, Dt = (d, v) => {
689
+ Yt(String(d), v);
690
+ }, Yt = (d, v) => {
691
691
  const w = o[String(d)], M = w == null ? void 0 : w.map((b) => [b.lon, b.lat]);
692
692
  M && Xt(M, v);
693
693
  }, ot = new te({
@@ -698,7 +698,7 @@ const Co = (e) => {
698
698
  rotation: 0
699
699
  // 初始旋转角度
700
700
  })
701
- }), Yt = (d, v) => {
701
+ }), Dt = (d, v) => {
702
702
  var P, K;
703
703
  const w = Number(50 * v), M = ((P = d.frameState) == null ? void 0 : P.time) ?? Date.now(), b = M - T;
704
704
  if (i = (i + w * b / 1e6) % 2, T = M, i >= 1) {
@@ -711,7 +711,7 @@ const Co = (e) => {
711
711
  i > 1 ? i - 0.01 : i
712
712
  ), S = k.getCoordinateAt(
713
713
  i > 1 ? 2 - i : i + 0.01
714
- ), X = mt(
714
+ ), X = yt(
715
715
  kt(F, "array"),
716
716
  kt(S, "array")
717
717
  ) * Math.PI / 180;
@@ -744,8 +744,8 @@ const Co = (e) => {
744
744
  source: new he({
745
745
  features: [C]
746
746
  })
747
- }), e == null || e.addLayer(f), c = (M) => Yt(M, v), Bt();
748
- }, mt = (d, v, w) => {
747
+ }), e == null || e.addLayer(f), c = (M) => Dt(M, v), Bt();
748
+ }, yt = (d, v, w) => {
749
749
  function M(P) {
750
750
  return 180 * (P % (2 * Math.PI)) / Math.PI;
751
751
  }
@@ -797,12 +797,12 @@ const Co = (e) => {
797
797
  render: N,
798
798
  remove: Zt,
799
799
  play: Ht,
800
- setCenter: yt,
800
+ setCenter: mt,
801
801
  close: Wt,
802
802
  getLength: Gt,
803
803
  handleTrackMapEvent: oe,
804
804
  reRenderTrackLine: ee,
805
- getTrackStatus: H
805
+ getTrackStatus: D
806
806
  };
807
807
  };
808
808
  function ko(e) {
@@ -853,22 +853,22 @@ function ko(e) {
853
853
  overflow: "visible",
854
854
  left: "-20px"
855
855
  }));
856
- return () => me("div", {
856
+ return () => ye("div", {
857
857
  ref: l,
858
858
  class: "ship-overlay-container",
859
859
  style: o.value
860
860
  }, [
861
- me(
861
+ ye(
862
862
  "div",
863
863
  {
864
864
  class: "ship-overlay-content",
865
865
  style: n.value
866
866
  },
867
867
  [
868
- me("div", {
868
+ ye("div", {
869
869
  style: e.selected ? a.value : {}
870
870
  }, ""),
871
- me("div", {
871
+ ye("div", {
872
872
  class: "text",
873
873
  style: {
874
874
  fontSize: "12px",
@@ -876,28 +876,28 @@ function ko(e) {
876
876
  fontFamily: "Arial"
877
877
  }
878
878
  }, e.name || "未命名船舶"),
879
- me("div", {
879
+ ye("div", {
880
880
  class: "icons",
881
881
  style: {
882
882
  color: "#3370ff",
883
883
  marginLeft: "6px"
884
884
  }
885
885
  }, [
886
- e.existDevice ? me("i", {
886
+ e.existDevice ? ye("i", {
887
887
  class: "map-iconfont icon-camera",
888
888
  style: {
889
889
  fontSize: "12px",
890
890
  marginRight: "6px"
891
891
  }
892
892
  }) : "",
893
- e.existMobile ? me("i", {
893
+ e.existMobile ? ye("i", {
894
894
  class: "map-iconfont icon-tele",
895
895
  style: {
896
896
  fontSize: "12px",
897
897
  marginRight: "6px"
898
898
  }
899
899
  }) : "",
900
- e.existWaterGauge ? me("i", {
900
+ e.existWaterGauge ? ye("i", {
901
901
  class: "map-iconfont icon-ruler",
902
902
  style: {
903
903
  fontSize: "12px",
@@ -907,13 +907,13 @@ function ko(e) {
907
907
  ])
908
908
  ]
909
909
  ),
910
- me("svg", {
910
+ ye("svg", {
911
911
  class: "ship-overlay-line",
912
912
  style: c.value,
913
913
  viewBox: "0 0 20 20",
914
914
  xmlns: "http://www.w3.org/2000/svg"
915
915
  }, [
916
- me("line", {
916
+ ye("line", {
917
917
  x1: "0",
918
918
  y1: "20",
919
919
  x2: "20",
@@ -1103,33 +1103,33 @@ function $o(e, l, o = "left-bottom", n = 10) {
1103
1103
  s.font = r;
1104
1104
  const T = s.measureText(e).width;
1105
1105
  s.font = C;
1106
- const f = l.map((j) => ({ width: s.measureText(Se(j)).width, height: 14 })), i = f.reduce((j, oe) => j + oe.width, 0), u = l.length * n, h = p + T + i + u + p, m = L + 14 + L * 2;
1107
- let y, x, $ = 0, _ = 0, ee = 0, H = 0, V = 0, N = 0;
1108
- switch (y = k + h, o) {
1106
+ const f = l.map((j) => ({ width: s.measureText(Se(j)).width, height: 14 })), i = f.reduce((j, oe) => j + oe.width, 0), u = l.length * n, h = p + T + i + u + p, y = L + 14 + L * 2;
1107
+ let m, x, $ = 0, _ = 0, ee = 0, D = 0, V = 0, N = 0;
1108
+ switch (m = k + h, o) {
1109
1109
  case "right-top":
1110
- x = k + m, $ = 0, _ = k + m, ee = k, H = 0, V = k, N = 0;
1110
+ x = k + y, $ = 0, _ = k + y, ee = k, D = 0, V = k, N = 0;
1111
1111
  break;
1112
1112
  case "right-middle":
1113
- x = m, $ = 0, _ = m / 2, ee = k, H = m / 2, V = k, N = 0;
1113
+ x = y, $ = 0, _ = y / 2, ee = k, D = y / 2, V = k, N = 0;
1114
1114
  break;
1115
1115
  case "right-bottom":
1116
- x = k + m, $ = 0, _ = 0, ee = k, H = k, V = k, N = k;
1116
+ x = k + y, $ = 0, _ = 0, ee = k, D = k, V = k, N = k;
1117
1117
  break;
1118
1118
  case "left-top":
1119
- x = k + m, $ = h, _ = k, ee = h + k, H = m + k, V = 0, N = 0;
1119
+ x = k + y, $ = h, _ = k, ee = h + k, D = y + k, V = 0, N = 0;
1120
1120
  break;
1121
1121
  case "left-middle":
1122
- x = m, $ = h, _ = m / 2, ee = h + k, H = m / 2, V = 0, N = 0;
1122
+ x = y, $ = h, _ = y / 2, ee = h + k, D = y / 2, V = 0, N = 0;
1123
1123
  break;
1124
1124
  case "left-bottom":
1125
- x = k + m, $ = h, _ = m, ee = h + k, H = 0, V = 0, N = k;
1125
+ x = k + y, $ = h, _ = y, ee = h + k, D = 0, V = 0, N = k;
1126
1126
  break;
1127
1127
  }
1128
- x = x + L, c.width = Math.round(y * t), c.height = Math.round(x * t), s.scale(t, t), s.clearRect(0, 0, y, x), s.beginPath(), s.moveTo($, _), s.lineTo(ee, H), s.strokeStyle = "#FFF", s.lineWidth = 1, s.stroke(), s.fillStyle = "#FFF", s.fillRect(V, N, h, m), s.font = r, s.textBaseline = "middle";
1129
- const O = N + L / 2 + m / 2;
1128
+ x = x + L, c.width = Math.round(m * t), c.height = Math.round(x * t), s.scale(t, t), s.clearRect(0, 0, m, x), s.beginPath(), s.moveTo($, _), s.lineTo(ee, D), s.strokeStyle = "#FFF", s.lineWidth = 1, s.stroke(), s.fillStyle = "#FFF", s.fillRect(V, N, h, y), s.font = r, s.textBaseline = "middle";
1129
+ const O = N + L / 2 + y / 2;
1130
1130
  s.strokeStyle = "#ffffff", s.lineWidth = 1, s.strokeText(e, V + p, O), s.fillStyle = "#000000", s.fillText(e, V + p, O), s.font = C, s.fillStyle = "#3370ff";
1131
1131
  let A = V + p + T + n;
1132
- const q = N + m / 2;
1132
+ const q = N + y / 2;
1133
1133
  l.length > 0 && l.forEach((j, oe) => {
1134
1134
  s.fillText(Se(j), A, q), A += f[oe].width + n;
1135
1135
  });
@@ -1197,10 +1197,10 @@ const Et = (e, l) => {
1197
1197
  if (!g || !e) return;
1198
1198
  const E = (o == null ? void 0 : o.id) || (l == null ? void 0 : l.get("id"));
1199
1199
  if (o) {
1200
- const Z = g.filter((D) => D.id === E);
1200
+ const Z = g.filter((H) => H.id === E);
1201
1201
  Z.length === 0 ? g.push(o) : o = Z[0];
1202
1202
  }
1203
- x(), U(g), m(), i(g);
1203
+ x(), U(g), y(), i(g);
1204
1204
  }, i = (g) => {
1205
1205
  Array.from(We.keys()).forEach((E) => {
1206
1206
  const Z = E.split("_")[0];
@@ -1212,7 +1212,7 @@ const Et = (e, l) => {
1212
1212
  });
1213
1213
  }, h = (g) => {
1214
1214
  var z;
1215
- const E = (o == null ? void 0 : o.id) || (l == null ? void 0 : l.get("id")), Z = se([g == null ? void 0 : g.lon, g == null ? void 0 : g.lat]), D = ((z = T[g.id]) == null ? void 0 : z.blinkColors) || [], J = D[D.length - 1] || g.fill || "#04C900", B = zt(g), G = new ie({
1215
+ const E = (o == null ? void 0 : o.id) || (l == null ? void 0 : l.get("id")), Z = se([g == null ? void 0 : g.lon, g == null ? void 0 : g.lat]), H = ((z = T[g.id]) == null ? void 0 : z.blinkColors) || [], J = H[H.length - 1] || g.fill || "#04C900", B = zt(g), G = new ie({
1216
1216
  geometry: new de(Z),
1217
1217
  // 船舶数据
1218
1218
  shipData: g,
@@ -1229,7 +1229,7 @@ const Et = (e, l) => {
1229
1229
  isHighlight: !1
1230
1230
  });
1231
1231
  return G.set("clickGeometry", new Rt(Z)), G;
1232
- }, m = () => {
1232
+ }, y = () => {
1233
1233
  if (o && e && o) {
1234
1234
  L.getFeatures().length > 0 && L.clear();
1235
1235
  const g = se([o == null ? void 0 : o.lon, o == null ? void 0 : o.lat]), E = new ie({
@@ -1238,18 +1238,18 @@ const Et = (e, l) => {
1238
1238
  });
1239
1239
  E.setStyle(Lt(e, o)), L.addFeature(E);
1240
1240
  }
1241
- }, y = () => {
1241
+ }, m = () => {
1242
1242
  const g = n.getFeatures(), E = 100;
1243
1243
  let Z = 0;
1244
- const D = () => {
1244
+ const H = () => {
1245
1245
  const B = Math.min(Z + E, g.length);
1246
1246
  for (; Z < B; Z++) {
1247
1247
  const G = g[Z], z = $e(e, G);
1248
1248
  G.setStyle(z);
1249
1249
  }
1250
- Z < g.length && requestAnimationFrame(D);
1250
+ Z < g.length && requestAnimationFrame(H);
1251
1251
  };
1252
- D();
1252
+ H();
1253
1253
  const J = L.getFeatures()[0];
1254
1254
  if (J && o) {
1255
1255
  const B = Lt(e, o);
@@ -1266,24 +1266,24 @@ const Et = (e, l) => {
1266
1266
  }
1267
1267
  }, _ = (g, E) => {
1268
1268
  R = g, T = E;
1269
- const Z = e.getOverlays().getArray(), D = n.getFeatures();
1269
+ const Z = e.getOverlays().getArray(), H = n.getFeatures();
1270
1270
  for (const Q in R) {
1271
- const J = R[Q], B = Z.find((z) => (z == null ? void 0 : z.getId()) === "label-" + Q), G = D.find((z) => Q === z.get("id"));
1271
+ const J = R[Q], B = Z.find((z) => (z == null ? void 0 : z.getId()) === "label-" + Q), G = H.find((z) => Q === z.get("id"));
1272
1272
  if (B && G) {
1273
- const z = E[Q].blinkColors || [], { shipData: xe, name: ye, color: we } = G.getProperties();
1273
+ const z = E[Q].blinkColors || [], { shipData: xe, name: me, color: we } = G.getProperties();
1274
1274
  G.set("blinking", J), z[(z == null ? void 0 : z.length) - 1] && we !== z[(z == null ? void 0 : z.length) - 1] && (G.set("color", z[(z == null ? void 0 : z.length) - 1] || ""), G.setStyle($e(e, G)));
1275
1275
  const tt = {
1276
1276
  ...xe,
1277
1277
  blinking: J,
1278
1278
  blinkingColors: z || [],
1279
- name: ye + "(" + E[Q].shipState + ")"
1280
- }, De = B.getElement(), Ye = Vt(tt);
1281
- De && De !== Ye && B.setElement(Ye);
1279
+ name: me + "(" + E[Q].shipState + ")"
1280
+ }, Ye = B.getElement(), De = Vt(tt);
1281
+ Ye && Ye !== De && B.setElement(De);
1282
1282
  }
1283
1283
  }
1284
1284
  }, ee = (g) => {
1285
1285
  if (!e) return;
1286
- const E = n.getFeatures(), Z = c.getFeatures(), D = l ? l.get("id") : "", Q = E.filter((z) => z.get("id") !== D), J = Z == null ? void 0 : Z.filter((z) => z.get("id") !== D), B = /* @__PURE__ */ new Map();
1286
+ const E = n.getFeatures(), Z = c.getFeatures(), H = l ? l.get("id") : "", Q = E.filter((z) => z.get("id") !== H), J = Z == null ? void 0 : Z.filter((z) => z.get("id") !== H), B = /* @__PURE__ */ new Map();
1287
1287
  g.forEach((z) => {
1288
1288
  B.set(z.id, !0);
1289
1289
  });
@@ -1296,22 +1296,22 @@ const Et = (e, l) => {
1296
1296
  const we = z.getStyle();
1297
1297
  (we == null ? void 0 : we.length) == 0 && z.setStyle($e(e, z));
1298
1298
  }
1299
- const ye = G.find((we) => we.getId() === "label-" + xe);
1300
- ye && ye.setPosition(void 0);
1299
+ const me = G.find((we) => we.getId() === "label-" + xe);
1300
+ me && me.setPosition(void 0);
1301
1301
  }), J.forEach((z) => {
1302
1302
  const xe = z.get("id");
1303
1303
  if (!B.has(xe))
1304
1304
  z.setStyle([]);
1305
1305
  else {
1306
- const ye = z.getStyle();
1307
- (ye == null ? void 0 : ye.length) == 0 && z.setStyle(Et(z, g.length));
1306
+ const me = z.getStyle();
1307
+ (me == null ? void 0 : me.length) == 0 && z.setStyle(Et(z, g.length));
1308
1308
  }
1309
1309
  });
1310
- }, H = (g) => {
1310
+ }, D = (g) => {
1311
1311
  if (g) {
1312
1312
  console.log("选中", g);
1313
- const E = n.getFeatures().find((D) => D.get("id") === g.id), Z = c.getFeatures().find((D) => D.get("id") === g.id);
1314
- E && (l = E), Z && Z.set("selected", !0), o = g, m();
1313
+ const E = n.getFeatures().find((H) => H.get("id") === g.id), Z = c.getFeatures().find((H) => H.get("id") === g.id);
1314
+ E && (l = E), Z && Z.set("selected", !0), o = g, y();
1315
1315
  } else
1316
1316
  console.log("取消选中"), o = null, l = null, A(), u();
1317
1317
  }, V = (g, E, Z) => {
@@ -1319,16 +1319,16 @@ const Et = (e, l) => {
1319
1319
  }, N = no((g, E, Z) => {
1320
1320
  try {
1321
1321
  if (g) {
1322
- const D = g.get("shipData"), Q = g.get("id");
1323
- if (E === "click" && (H(D), Z && Z(Q)), E === "hover") {
1322
+ const H = g.get("shipData"), Q = g.get("id");
1323
+ if (E === "click" && (D(H), Z && Z(Q)), E === "hover") {
1324
1324
  C && C !== Q && O(), C = Q;
1325
1325
  const J = n.getFeatures().find((B) => B.get("id") === C);
1326
1326
  J == null || J.set("isHighlight", !0), J == null || J.setStyle($e(e, J));
1327
1327
  }
1328
1328
  } else
1329
1329
  O();
1330
- } catch (D) {
1331
- console.log("handleShipMapEvent", D);
1330
+ } catch (H) {
1331
+ console.log("handleShipMapEvent", H);
1332
1332
  }
1333
1333
  }, 10), O = () => {
1334
1334
  const g = C ? n.getFeatures().find((E) => E.get("id") === C) : null;
@@ -1340,7 +1340,7 @@ const Et = (e, l) => {
1340
1340
  console.log(g);
1341
1341
  }
1342
1342
  }, q = (g, E) => {
1343
- const Z = se([g == null ? void 0 : g.lon, g == null ? void 0 : g.lat]), D = new ie({
1343
+ const Z = se([g == null ? void 0 : g.lon, g == null ? void 0 : g.lat]), H = new ie({
1344
1344
  geometry: new de(Z),
1345
1345
  name: g.cnname || g.enname || g.name || g.id || "未命名船舶",
1346
1346
  // 图标
@@ -1348,17 +1348,17 @@ const Et = (e, l) => {
1348
1348
  selected: (g == null ? void 0 : g.id) === (o == null ? void 0 : o.id),
1349
1349
  shipData: g
1350
1350
  });
1351
- D.set("id", g.id);
1352
- const Q = Et(D, E);
1353
- return D.setStyle(Q), D;
1351
+ H.set("id", g.id);
1352
+ const Q = Et(H, E);
1353
+ return H.setStyle(Q), H;
1354
1354
  }, U = (g) => {
1355
- const E = e.getView().getZoom(), Z = [], D = [];
1355
+ const E = e.getView().getZoom(), Z = [], H = [];
1356
1356
  g.forEach((G) => {
1357
1357
  const z = h(G);
1358
- z.setStyle($e(e, z)), n.addFeature(z), R[G.id] && Z.push(G), (o == null ? void 0 : o.id) == G.id && (o = G), !R[G.id] && (o == null ? void 0 : o.id) !== G.id && D.push(G);
1358
+ z.setStyle($e(e, z)), n.addFeature(z), R[G.id] && Z.push(G), (o == null ? void 0 : o.id) == G.id && (o = G), !R[G.id] && (o == null ? void 0 : o.id) !== G.id && H.push(G);
1359
1359
  }), (r !== null ? r : (o == null ? void 0 : o.id) && R[o == null ? void 0 : o.id] || E && E >= ae.shipModelMin) && Z.map((G) => {
1360
1360
  oe(G);
1361
- }), o && (k !== null ? k : !0) && !R[o == null ? void 0 : o.id] && j(o, g), (t !== null ? t : E && E >= ae.shipModelMin) && D.map((G) => {
1361
+ }), o && (k !== null ? k : !0) && !R[o == null ? void 0 : o.id] && j(o, g), (t !== null ? t : E && E >= ae.shipModelMin) && H.map((G) => {
1362
1362
  j(G, g);
1363
1363
  });
1364
1364
  }, j = (g, E) => {
@@ -1366,7 +1366,7 @@ const Et = (e, l) => {
1366
1366
  c.addFeature(Z);
1367
1367
  }, oe = (g) => {
1368
1368
  if (g.id && T[g == null ? void 0 : g.id]) {
1369
- const E = T[g == null ? void 0 : g.id] || {}, Z = (E == null ? void 0 : E.blinkColors) || [], D = (E == null ? void 0 : E.shipState) || "", Q = (g.cnname || g.enname || g.name || g.id || "未命名船舶") + "(" + D + ")", J = {
1369
+ const E = T[g == null ? void 0 : g.id] || {}, Z = (E == null ? void 0 : E.blinkColors) || [], H = (E == null ? void 0 : E.shipState) || "", Q = (g.cnname || g.enname || g.name || g.id || "未命名船舶") + "(" + H + ")", J = {
1370
1370
  ...g,
1371
1371
  name: Q,
1372
1372
  blinking: R[g.id],
@@ -1377,13 +1377,13 @@ const Et = (e, l) => {
1377
1377
  };
1378
1378
  return {
1379
1379
  render: f,
1380
- selected: H,
1380
+ selected: D,
1381
1381
  filter: ee,
1382
1382
  blinking: _,
1383
1383
  clear: x,
1384
1384
  setLableStatus: V,
1385
1385
  handleShipMapEvent: N,
1386
- changeShipScale: y
1386
+ changeShipScale: m
1387
1387
  };
1388
1388
  }, zo = (e) => {
1389
1389
  const l = () => e == null ? void 0 : e.getLayers(), o = ge("vector"), n = () => o.value, a = (p) => {
@@ -1447,27 +1447,27 @@ const Et = (e, l) => {
1447
1447
  }), e == null || e.addLayer(o));
1448
1448
  }
1449
1449
  }, L = (i) => {
1450
- const u = e == null ? void 0 : e.getView().getZoom(), [h, m] = i.latLon.split(","), y = new ie({
1451
- geometry: new de(se([Number(h), Number(m)]))
1450
+ const u = e == null ? void 0 : e.getView().getZoom(), [h, y] = i.latLon.split(","), m = new ie({
1451
+ geometry: new de(se([Number(h), Number(y)]))
1452
1452
  });
1453
- y.setStyle(p(i, u, i.id === (c == null ? void 0 : c.id))), y.set("loactionData", i), n.addFeature(y);
1453
+ m.setStyle(p(i, u, i.id === (c == null ? void 0 : c.id))), m.set("loactionData", i), n.addFeature(m);
1454
1454
  }, p = (i, u, h) => {
1455
- let m = {
1455
+ let y = {
1456
1456
  src: h && i.selectedPath || i.defaultPath
1457
1457
  };
1458
- i != null && i.width && (i != null && i.height) ? m = {
1459
- ...m,
1458
+ i != null && i.width && (i != null && i.height) ? y = {
1459
+ ...y,
1460
1460
  width: i.width,
1461
1461
  height: i.height
1462
- } : m = {
1463
- ...m,
1462
+ } : y = {
1463
+ ...y,
1464
1464
  scale: 0.5 * u / 10
1465
1465
  };
1466
- let y = {
1467
- image: new ke(m)
1466
+ let m = {
1467
+ image: new ke(y)
1468
1468
  };
1469
- return i.name && (y = {
1470
- ...y,
1469
+ return i.name && (m = {
1470
+ ...m,
1471
1471
  text: new Ve({
1472
1472
  text: i.name,
1473
1473
  font: "12px sans-serif",
@@ -1479,7 +1479,7 @@ const Et = (e, l) => {
1479
1479
  }),
1480
1480
  offsetY: 30
1481
1481
  })
1482
- }), new te(y);
1482
+ }), new te(m);
1483
1483
  }, k = () => {
1484
1484
  if (a) {
1485
1485
  const i = a.get("loactionData").id;
@@ -1489,10 +1489,10 @@ const Et = (e, l) => {
1489
1489
  } else
1490
1490
  n.clear();
1491
1491
  }, t = () => {
1492
- var m;
1493
- const i = a == null ? void 0 : a.get("loactionData"), u = (m = e == null ? void 0 : e.getView()) == null ? void 0 : m.getZoom();
1494
- n.getFeatures().forEach((y) => {
1495
- y.get("loactionData").id === i.id && (y == null || y.setStyle(p(i, u, !1)));
1492
+ var y;
1493
+ const i = a == null ? void 0 : a.get("loactionData"), u = (y = e == null ? void 0 : e.getView()) == null ? void 0 : y.getZoom();
1494
+ n.getFeatures().forEach((m) => {
1495
+ m.get("loactionData").id === i.id && (m == null || m.setStyle(p(i, u, !1)));
1496
1496
  }), c = null, a = null;
1497
1497
  }, r = (i) => {
1498
1498
  i ? (C(), R(i)) : t();
@@ -1508,11 +1508,11 @@ const Et = (e, l) => {
1508
1508
  };
1509
1509
  return {
1510
1510
  render: s,
1511
- renderHtml: (i, u, h, m) => {
1512
- const y = document.createElement("div");
1513
- y.innerHTML = h;
1511
+ renderHtml: (i, u, h, y) => {
1512
+ const m = document.createElement("div");
1513
+ m.innerHTML = h;
1514
1514
  let x = {
1515
- element: y,
1515
+ element: m,
1516
1516
  // 覆盖层的DOM元素
1517
1517
  positioning: "top-center",
1518
1518
  // 相对于位置点的定位
@@ -1521,9 +1521,9 @@ const Et = (e, l) => {
1521
1521
  offset: [0, -20],
1522
1522
  id: "position-" + i
1523
1523
  };
1524
- m && (x = {
1524
+ y && (x = {
1525
1525
  ...x,
1526
- ...m
1526
+ ...y
1527
1527
  });
1528
1528
  const $ = new Ce(x);
1529
1529
  $.setPosition(se(u)), e.addOverlay($);
@@ -1548,8 +1548,8 @@ const Et = (e, l) => {
1548
1548
  const o = e.getViewport();
1549
1549
  o && (o.style.cursor = l);
1550
1550
  }, Wo = (e, l) => {
1551
- const o = ge([]), n = ge("km"), a = (H) => {
1552
- n.value = H;
1551
+ const o = ge([]), n = ge("km"), a = (D) => {
1552
+ n.value = D;
1553
1553
  };
1554
1554
  let c, s = "close";
1555
1555
  const L = () => {
@@ -1572,11 +1572,11 @@ const Et = (e, l) => {
1572
1572
  }), e == null || e.addLayer(k);
1573
1573
  };
1574
1574
  let r, C;
1575
- const R = (H) => {
1576
- if (H.dragging)
1575
+ const R = (D) => {
1576
+ if (D.dragging)
1577
1577
  return;
1578
1578
  let V = "点击选择起点";
1579
- r && (V = "单击继续,双击结束"), c && (c.innerHTML = V, C.setPosition(H.coordinate), c.classList.remove("hidden"));
1579
+ r && (V = "单击继续,双击结束"), c && (c.innerHTML = V, C.setPosition(D.coordinate), c.classList.remove("hidden"));
1580
1580
  };
1581
1581
  let T;
1582
1582
  const f = () => {
@@ -1603,14 +1603,14 @@ const Et = (e, l) => {
1603
1603
  })
1604
1604
  }),
1605
1605
  // 添加条件函数,判断是否应该出发点绘制
1606
- condition: (V) => V.originalEvent.target.tagName !== "DIV"
1607
- }), e == null || e.addInteraction(T), m(), y();
1608
- let H;
1606
+ condition: (V) => V.originalEvent.target.className !== "ol-tooltip-measure"
1607
+ }), e == null || e.addInteraction(T), y(), m();
1608
+ let D;
1609
1609
  T.on("drawstart", function(V) {
1610
1610
  var O;
1611
1611
  r = V.feature, r.set("randomId", i());
1612
1612
  let N;
1613
- H = (O = r.getGeometry()) == null ? void 0 : O.on("change", function(A) {
1613
+ D = (O = r.getGeometry()) == null ? void 0 : O.on("change", function(A) {
1614
1614
  const q = A.target, U = Ot(q, n.value);
1615
1615
  N = q.getLastCoordinate(), u && U && (u.innerHTML = U), h.setPosition(N);
1616
1616
  });
@@ -1625,11 +1625,11 @@ const Et = (e, l) => {
1625
1625
  A.preventDefault(), A.stopPropagation();
1626
1626
  const q = (U = A.target) == null ? void 0 : U.getAttribute("data-id");
1627
1627
  q && $(q);
1628
- }), h.setOffset([0, -7]), r = null, u = null, m(), H && it(H), (O = (N = l.getProps()) == null ? void 0 : N.lineDrawEnd) == null || O.call(N, o.value);
1628
+ }), h.setOffset([0, -7]), r = null, u = null, y(), D && it(D), (O = (N = l.getProps()) == null ? void 0 : N.lineDrawEnd) == null || O.call(N, o.value);
1629
1629
  });
1630
1630
  }, i = () => Math.random().toString(36).substring(2, 9);
1631
1631
  let u, h;
1632
- const m = () => {
1632
+ const y = () => {
1633
1633
  u != null && u.parentNode && u.parentNode.removeChild(u), u = document.createElement("div"), u.className = "ol-tooltip ol-tooltip-measure", h = new Ce({
1634
1634
  element: u,
1635
1635
  offset: [0, -15],
@@ -1637,26 +1637,24 @@ const Et = (e, l) => {
1637
1637
  stopEvent: !1,
1638
1638
  insertFirst: !1
1639
1639
  }), e == null || e.addOverlay(h);
1640
- }, y = () => {
1641
- c != null && c.parentNode && (c.parentNode.removeChild(c), c.parentNode.addEventListener("click", (H) => {
1642
- H.preventDefault(), H.stopPropagation();
1643
- })), c = document.createElement("div"), c.className = "ol-tooltip hidden pointer-none", C = new Ce({
1640
+ }, m = () => {
1641
+ c != null && c.parentNode && c.parentNode.removeChild(c), c = document.createElement("div"), c.className = "ol-tooltip hidden", C = new Ce({
1644
1642
  element: c,
1645
1643
  offset: [15, 0],
1646
1644
  positioning: "center-left",
1647
- stopEvent: !0
1645
+ stopEvent: !1
1648
1646
  }), e == null || e.addOverlay(C);
1649
1647
  }, x = () => {
1650
- o.value.forEach((H, V) => {
1648
+ o.value.forEach((D, V) => {
1651
1649
  var A, q;
1652
1650
  const N = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
1653
1651
  N[V] && ((q = (A = N[V]) == null ? void 0 : A.parentNode) == null || q.removeChild(N[V]));
1654
1652
  const O = p.getFeatures();
1655
1653
  O[V] && p.removeFeature(O[V]);
1656
1654
  }), _(), Zo(e), s = "close", Me(e, "grab");
1657
- }, $ = (H) => {
1655
+ }, $ = (D) => {
1658
1656
  var N, O, A, q;
1659
- const V = o.value.findIndex((U) => U.id === H);
1657
+ const V = o.value.findIndex((U) => U.id === D);
1660
1658
  if (V !== -1) {
1661
1659
  o.value.splice(V, 1);
1662
1660
  const U = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
@@ -1666,12 +1664,12 @@ const Et = (e, l) => {
1666
1664
  }
1667
1665
  (q = (A = l.getProps()) == null ? void 0 : A.lineDrawEnd) == null || q.call(A, o.value);
1668
1666
  }, _ = () => {
1669
- if (o.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((H) => {
1667
+ if (o.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((D) => {
1670
1668
  var V;
1671
- (V = H == null ? void 0 : H.parentNode) == null || V.removeChild(H);
1669
+ (V = D == null ? void 0 : D.parentNode) == null || V.removeChild(D);
1672
1670
  }), p == null || p.clear(), T) {
1673
- const H = e.getInteractions().getArray().find((V) => bt(V) === bt(T));
1674
- H && e.removeInteraction(H);
1671
+ const D = e.getInteractions().getArray().find((V) => bt(V) === bt(T));
1672
+ D && e.removeInteraction(D);
1675
1673
  }
1676
1674
  e.removeLayer(k), c != null && c.parentNode && c.parentNode.removeChild(c), u != null && u.parentNode && u.parentNode.removeChild(u);
1677
1675
  };
@@ -1700,9 +1698,9 @@ const Et = (e, l) => {
1700
1698
  }, Go = (e, l) => {
1701
1699
  let o, n, a = "close", c = "area", s;
1702
1700
  const L = (N, O) => {
1703
- c = N, s = O, H(), a = "open", p(), Me(e, "crosshair");
1701
+ c = N, s = O, D(), a = "open", p(), Me(e, "crosshair");
1704
1702
  }, p = () => {
1705
- r(), y(), _(), i();
1703
+ r(), m(), _(), i();
1706
1704
  };
1707
1705
  let k = null, t = null;
1708
1706
  const r = () => {
@@ -1738,7 +1736,7 @@ const Et = (e, l) => {
1738
1736
  <span class="text">面积:${A}${f ? '<span class="error pl-12">超出可以绘画的距离</span>' : ""}</span>
1739
1737
  `), h && (h.innerHTML += '<span class="delete-icon" ><i class="map-iconfont icon-delete" /></div>');
1740
1738
  const q = O.getCoordinates(), U = q[0][q[0].length - 2];
1741
- if (m.setPosition(U), k) {
1739
+ if (y.setPosition(U), k) {
1742
1740
  const oe = k.getSource();
1743
1741
  oe && o && (oe.clear(), oe.addFeature(o));
1744
1742
  }
@@ -1783,11 +1781,11 @@ const Et = (e, l) => {
1783
1781
  C = O.feature, n = (A = C.getGeometry()) == null ? void 0 : A.on("change", (q) => {
1784
1782
  const U = q.target, j = u(U, "nm"), g = U.getCoordinates()[0], E = new je([g[g.length - 2], g[g.length - 1]]), Z = Ot(E, "nm");
1785
1783
  if (f = Number(gt(E) / 1e3) > 150, !j) return;
1786
- const D = '<span class="error pl-4">超出可以绘画的距离</span>';
1784
+ const H = '<span class="error pl-4">超出可以绘画的距离</span>';
1787
1785
  h && (h.innerHTML = `
1788
1786
  <div class="text">
1789
1787
  面积:${j}
1790
- ${f ? D : ""}
1788
+ ${f ? H : ""}
1791
1789
  </div>
1792
1790
  `), x && (x.innerHTML = `
1793
1791
  <div class="text">
@@ -1795,7 +1793,7 @@ const Et = (e, l) => {
1795
1793
  </div>
1796
1794
  <div class="text ${f ? "error" : ""}">
1797
1795
  线段 ${g.length - 2}: ${Z}
1798
- ${f ? D : ""}
1796
+ ${f ? H : ""}
1799
1797
  </div>
1800
1798
  <div>
1801
1799
  <span class="text">单击继续,双击结束</span>
@@ -1803,7 +1801,7 @@ const Et = (e, l) => {
1803
1801
  `);
1804
1802
  });
1805
1803
  }), T.on("drawend", (O) => {
1806
- var Z, D, Q, J;
1804
+ var Z, H, Q, J;
1807
1805
  const A = O.feature.getGeometry();
1808
1806
  if (!A) return;
1809
1807
  const j = A.getCoordinates()[0].map((B) => Tt(B)).map((B) => ({
@@ -1812,11 +1810,11 @@ const Et = (e, l) => {
1812
1810
  }));
1813
1811
  if (c === "fence")
1814
1812
  return console.log("polygonPoints--------------", j), s && s(j), j;
1815
- h && !o && (h.innerHTML += '<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'), o = O.feature, m.setOffset([10, 0]);
1813
+ h && !o && (h.innerHTML += '<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'), o = O.feature, y.setOffset([10, 0]);
1816
1814
  const g = O.feature.getGeometry().getCoordinates(), E = g[0][g[0].length - 2];
1817
- if (m.setPosition(E), x != null && x.parentNode && x.parentNode.removeChild(x), (Z = l.getProps()) != null && Z.areaDrawEnd) {
1815
+ if (y.setPosition(E), x != null && x.parentNode && x.parentNode.removeChild(x), (Z = l.getProps()) != null && Z.areaDrawEnd) {
1818
1816
  const B = g[0].map((G) => He(G, ce.mercator, ce.data));
1819
- (Q = (D = l.getProps()) == null ? void 0 : D.areaDrawEnd) == null || Q.call(D, B);
1817
+ (Q = (H = l.getProps()) == null ? void 0 : H.areaDrawEnd) == null || Q.call(H, B);
1820
1818
  }
1821
1819
  T && (T.setActive(!1), e == null || e.removeInteraction(T), (e == null ? void 0 : e.getInteractions()).forEach((G) => {
1822
1820
  G instanceof Qe && (G.setActive(!1), e == null || e.removeInteraction(G));
@@ -1838,15 +1836,15 @@ const Et = (e, l) => {
1838
1836
  }
1839
1837
  }
1840
1838
  };
1841
- let h, m;
1842
- const y = () => {
1843
- h != null && h.parentNode && h.parentNode.removeChild(h), h = document.createElement("div"), h.style.display = "flex", h.className = "ol-tooltip ol-tooltip-draw-polygon", m = new Ce({
1839
+ let h, y;
1840
+ const m = () => {
1841
+ h != null && h.parentNode && h.parentNode.removeChild(h), h = document.createElement("div"), h.style.display = "flex", h.className = "ol-tooltip ol-tooltip-draw-polygon", y = new Ce({
1844
1842
  element: h,
1845
1843
  offset: [0, -15],
1846
1844
  positioning: "bottom-center",
1847
1845
  stopEvent: !1,
1848
1846
  insertFirst: !1
1849
- }), e == null || e.addOverlay(m);
1847
+ }), e == null || e.addOverlay(y);
1850
1848
  };
1851
1849
  let x, $;
1852
1850
  const _ = () => {
@@ -1856,22 +1854,22 @@ const Et = (e, l) => {
1856
1854
  element: x,
1857
1855
  offset: [15, 0],
1858
1856
  positioning: "center-left",
1859
- stopEvent: !0
1857
+ stopEvent: !1
1860
1858
  }), e == null || e.addOverlay($);
1861
1859
  }, ee = () => {
1862
1860
  o = null, L();
1863
- }, H = () => {
1861
+ }, D = () => {
1864
1862
  a = "close", e.un("pointermove", R), C = null, T && (T.abortDrawing(), console.log("abortDrawing"), T.setActive(!1), (e == null ? void 0 : e.getInteractions()).forEach((O) => {
1865
1863
  O instanceof Qe && (O.setActive(!1), e == null || e.removeInteraction(O));
1866
- }), T = null), n && it(n), n = void 0, t == null || t.clear(), t = null, k && e.getAllLayers().includes(k) && (e.removeLayer(k), k = null), x != null && x.parentElement && (x.innerHTML = "", x.parentElement.removeChild(x), x = null), h != null && h.parentElement && (h.innerHTML = "", h.parentElement.removeChild(h), h = null), $ && e.removeOverlay($), m && e.removeOverlay(m), Me(e, "grab");
1864
+ }), T = null), n && it(n), n = void 0, t == null || t.clear(), t = null, k && e.getAllLayers().includes(k) && (e.removeLayer(k), k = null), x != null && x.parentElement && (x.innerHTML = "", x.parentElement.removeChild(x), x = null), h != null && h.parentElement && (h.innerHTML = "", h.parentElement.removeChild(h), h = null), $ && e.removeOverlay($), y && e.removeOverlay(y), Me(e, "grab");
1867
1865
  };
1868
1866
  return {
1869
1867
  open: L,
1870
- close: H,
1868
+ close: D,
1871
1869
  reset: ee,
1872
1870
  getState: () => a
1873
1871
  };
1874
- }, Ho = "zh-map-port-layer", Do = (e) => {
1872
+ }, Ho = "zh-map-port-layer", Yo = (e) => {
1875
1873
  const l = new he(), o = new ve({
1876
1874
  className: Ho,
1877
1875
  source: l,
@@ -1885,17 +1883,17 @@ const Et = (e, l) => {
1885
1883
  const c = (i, u = !0) => {
1886
1884
  if (!i || i.length === 0) return;
1887
1885
  if (l.clear(), a) {
1888
- const m = i.find((y) => y.id === (a == null ? void 0 : a.id));
1889
- m ? a = m : i.push(a);
1886
+ const y = i.find((m) => m.id === (a == null ? void 0 : a.id));
1887
+ y ? a = y : i.push(a);
1890
1888
  }
1891
1889
  const h = [];
1892
- i.forEach((m) => {
1893
- const [y, x] = m.latLon.split(","), $ = new ie({
1894
- geometry: new de(se([Number(y), Number(x)])),
1895
- portData: m,
1896
- id: m.id,
1897
- select: m.id === (a == null ? void 0 : a.id),
1898
- showTitle: m.id === (a == null ? void 0 : a.id) || u
1890
+ i.forEach((y) => {
1891
+ const [m, x] = y.latLon.split(","), $ = new ie({
1892
+ geometry: new de(se([Number(m), Number(x)])),
1893
+ portData: y,
1894
+ id: y.id,
1895
+ select: y.id === (a == null ? void 0 : a.id),
1896
+ showTitle: y.id === (a == null ? void 0 : a.id) || u
1899
1897
  }), _ = t($);
1900
1898
  $.setStyle(_), h.push($);
1901
1899
  }), l.addFeatures(h);
@@ -1908,19 +1906,19 @@ const Et = (e, l) => {
1908
1906
  const h = `${i}-${u}`;
1909
1907
  if (p.has(h))
1910
1908
  return p.get(h);
1911
- const m = s, y = L;
1912
- if (!y) return "";
1913
- m.width = 0, m.height = 0;
1909
+ const y = s, m = L;
1910
+ if (!m) return "";
1911
+ y.width = 0, y.height = 0;
1914
1912
  const x = 2, $ = 8, _ = window.devicePixelRatio || 1, ee = "12px sans-serif";
1915
- y.font = ee;
1916
- const V = y.measureText(i).width, N = $ + V + $, O = x + 12 + x * 2;
1917
- m.width = Math.round(N * _), m.height = Math.round(O * _), y.scale(_, _), y.clearRect(0, 0, N, O), y.fillStyle = u ? "#F32D2D" : "#FFF", y.beginPath(), y.roundRect(0, 0, N, O, 4), y.fill(), y.font = ee, y.textBaseline = "middle";
1913
+ m.font = ee;
1914
+ const V = m.measureText(i).width, N = $ + V + $, O = x + 12 + x * 2;
1915
+ y.width = Math.round(N * _), y.height = Math.round(O * _), m.scale(_, _), m.clearRect(0, 0, N, O), m.fillStyle = u ? "#F32D2D" : "#FFF", m.beginPath(), m.roundRect(0, 0, N, O, 4), m.fill(), m.font = ee, m.textBaseline = "middle";
1918
1916
  const A = O / 2;
1919
- y.strokeStyle = u ? "#000" : "#ffffff", y.lineWidth = 1, y.strokeText(i, $, A), y.fillStyle = u ? "#FFF" : "#000000", y.fillText(i, $, A);
1920
- const q = m.toDataURL("image/png");
1917
+ m.strokeStyle = u ? "#000" : "#ffffff", m.lineWidth = 1, m.strokeText(i, $, A), m.fillStyle = u ? "#FFF" : "#000000", m.fillText(i, $, A);
1918
+ const q = y.toDataURL("image/png");
1921
1919
  return p.set(h, q), q;
1922
1920
  }, t = (i) => {
1923
- const { select: u, showTitle: h } = i.getProperties(), m = (V) => `<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
1921
+ const { select: u, showTitle: h } = i.getProperties(), y = (V) => `<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
1924
1922
  <path fill-rule="evenodd" clip-rule="evenodd" d="M22.6563 44.9304C22.5453 44.8844 22.4445 44.817 22.3595 44.7321C22.3595 44.7321 9.36986 31.7424 9.32952 31.6913C7.09059 29.0791 5.64794 25.8802 5.17255 22.4736C4.69716 19.0671 5.20896 15.5957 6.64728 12.471C8.08561 9.34625 10.3902 6.69909 13.2878 4.84325C16.1855 2.98741 19.5548 2.00068 22.9965 2C26.4381 1.99932 29.8078 2.98473 32.7062 4.83943C35.6046 6.69414 37.9102 9.34039 39.3498 12.4646C40.7893 15.5888 41.3025 19.0599 40.8284 22.4666C40.3544 25.8734 38.913 29.0729 36.6751 31.686C36.6401 31.737 23.6531 44.7321 23.6531 44.7321C23.5682 44.817 23.4674 44.8844 23.3564 44.9304C23.2454 44.9763 23.1265 45 23.0063 45C22.8862 45 22.7673 44.9763 22.6563 44.9304Z" fill="${V}"/>
1925
1923
  <g clip-path="url(#clip0_10059_122082)">
1926
1924
  <path d="M34.8624 22.8687L32.5874 25.6313L33.4812 25.7125C33.4812 25.7125 30.5562 28.0687 27.9562 28.2312C25.3562 28.3937 24.1374 24.9 24.1374 24.9V19.1312H27.6312V17.425H24.2999V15.15C25.7624 14.6625 26.7374 13.2812 26.7374 11.6562C26.7374 9.625 25.1124 8 23.0812 8H22.9999C20.9687 8 19.3437 9.625 19.3437 11.6562C19.3437 13.2812 20.3999 14.6625 21.7812 15.15V17.425H18.4499V19.1312H21.9437V24.9C21.9437 24.9 20.6437 28.3125 18.0437 28.2312C15.4437 28.0687 12.5187 25.7125 12.5187 25.7125L13.4124 25.6313L11.0562 22.8687L10.2437 26.2812L11.2187 26.0375C11.2187 26.0375 13.1687 29.5313 16.1749 30.8313C19.1812 32.2125 22.1874 33.9187 22.8374 34C23.4874 33.9187 26.4937 32.2125 29.4187 30.8313C32.3437 29.45 34.3749 26.0375 34.3749 26.0375L35.3499 26.2812L34.8624 22.8687ZM23.0812 13.6875C21.9437 13.6875 21.0499 12.7937 21.0499 11.6562C21.0499 10.6 21.9437 9.70625 22.9999 9.70625H23.0812C24.1374 9.70625 25.0312 10.6 25.0312 11.6562C25.1124 12.7937 24.1374 13.6875 23.0812 13.6875Z" fill="white"/>
@@ -1931,13 +1929,13 @@ const Et = (e, l) => {
1931
1929
  </clipPath>
1932
1930
  </defs>
1933
1931
  </svg>
1934
- `, y = () => `data:image/svg+xml;utf8,${encodeURIComponent(m(u ? "#F32D2D" : "#3370FF"))}`, x = e.getView().getZoom(), $ = i.get("portData"), _ = window.devicePixelRatio || 1, ee = new te({
1932
+ `, m = () => `data:image/svg+xml;utf8,${encodeURIComponent(y(u ? "#F32D2D" : "#3370FF"))}`, x = e.getView().getZoom(), $ = i.get("portData"), _ = window.devicePixelRatio || 1, ee = new te({
1935
1933
  image: new ke({
1936
- src: y(),
1934
+ src: m(),
1937
1935
  scale: 0.5 * x / 10
1938
1936
  }),
1939
1937
  zIndex: u ? 110 : 100
1940
- }), H = new te({
1938
+ }), D = new te({
1941
1939
  image: new ke({
1942
1940
  src: k($.shortName, u),
1943
1941
  anchor: [0.5, 0.5],
@@ -1959,7 +1957,7 @@ const Et = (e, l) => {
1959
1957
  // offsetY: 30,
1960
1958
  // }),
1961
1959
  });
1962
- return !h && !u ? ee : [ee, H];
1960
+ return !h && !u ? ee : [ee, D];
1963
1961
  }, r = () => {
1964
1962
  if (l)
1965
1963
  if (n) {
@@ -1979,7 +1977,7 @@ const Et = (e, l) => {
1979
1977
  }, R = () => {
1980
1978
  var i;
1981
1979
  if (n) {
1982
- const u = n == null ? void 0 : n.get("portData"), h = (i = l.getFeatures()) == null ? void 0 : i.find((m) => m.get("portData").id === u.id);
1980
+ const u = n == null ? void 0 : n.get("portData"), h = (i = l.getFeatures()) == null ? void 0 : i.find((y) => y.get("portData").id === u.id);
1983
1981
  h && (h.set("select", !1), h.setStyle(t(h)), n = null, a = null);
1984
1982
  }
1985
1983
  }, T = (i) => {
@@ -1995,7 +1993,7 @@ const Et = (e, l) => {
1995
1993
  i && i.get("portData") ? Me(e, "pointer") : Me(e, "grab");
1996
1994
  }
1997
1995
  };
1998
- }, Yo = (e) => {
1996
+ }, Do = (e) => {
1999
1997
  const l = new ve({
2000
1998
  source: new he(),
2001
1999
  zIndex: 99
@@ -2018,12 +2016,12 @@ const Et = (e, l) => {
2018
2016
  function c(f) {
2019
2017
  const i = f.getCoordinates()[0];
2020
2018
  let u = -1 / 0, h = [];
2021
- for (const y of i)
2022
- y[0] > u ? (u = y[0], h = [y]) : y[0] === u && h.push(y);
2023
- let m = h[0];
2024
- for (const y of h)
2025
- y[1] > m[1] && (m = y);
2026
- return m;
2019
+ for (const m of i)
2020
+ m[0] > u ? (u = m[0], h = [m]) : m[0] === u && h.push(m);
2021
+ let y = h[0];
2022
+ for (const m of h)
2023
+ m[1] > y[1] && (y = m);
2024
+ return y;
2027
2025
  }
2028
2026
  function s(f, i) {
2029
2027
  const u = Math.PI / 4;
@@ -2041,14 +2039,14 @@ const Et = (e, l) => {
2041
2039
  offset: [0, 0]
2042
2040
  })
2043
2041
  }), p = (f) => {
2044
- var m;
2042
+ var y;
2045
2043
  let i;
2046
- const u = (m = f.coordinates) == null ? void 0 : m.map((y) => se([y.lng, y.lat]));
2044
+ const u = (y = f.coordinates) == null ? void 0 : y.map((m) => se([m.lng, m.lat]));
2047
2045
  if (f != null && f.radius)
2048
2046
  i = s(u[0], f.radius);
2049
2047
  else {
2050
- const y = new pt([u]), x = y.getExtent(), $ = [x[2], x[3]];
2051
- i = $, y.intersectsCoordinate($) || (i = c(y));
2048
+ const m = new pt([u]), x = m.getExtent(), $ = [x[2], x[3]];
2049
+ i = $, m.intersectsCoordinate($) || (i = c(m));
2052
2050
  }
2053
2051
  return new ie({
2054
2052
  geometry: new de(i),
@@ -2056,36 +2054,36 @@ const Et = (e, l) => {
2056
2054
  polygonData: f
2057
2055
  });
2058
2056
  }, k = (f, i) => {
2059
- var y, x;
2060
- const u = (y = f.coordinates) == null ? void 0 : y.map(($) => se([$.lng, $.lat])), h = new pt([u]), m = new ie({
2057
+ var m, x;
2058
+ const u = (m = f.coordinates) == null ? void 0 : m.map(($) => se([$.lng, $.lat])), h = new pt([u]), y = new ie({
2061
2059
  geometry: h,
2062
2060
  id: f.id
2063
2061
  });
2064
- console.log(m), m.setStyle(a(i)), (x = l.getSource()) == null || x.addFeature(m), f.isEdit && t(f);
2062
+ console.log(y), y.setStyle(a(i)), (x = l.getSource()) == null || x.addFeature(y), f.isEdit && t(f);
2065
2063
  }, t = (f) => {
2066
2064
  var u;
2067
2065
  const i = p(f);
2068
2066
  i.setStyle(L()), (u = o.getSource()) == null || u.addFeature(i);
2069
2067
  };
2070
2068
  function r(f, i) {
2071
- var y;
2069
+ var m;
2072
2070
  const u = se([f.coordinates[0].lng, f.coordinates[0].lat]), h = new Rt(
2073
2071
  u,
2074
2072
  f.radius
2075
2073
  // 半径(米)
2076
- ), m = new ie({
2074
+ ), y = new ie({
2077
2075
  geometry: h,
2078
2076
  id: f.id
2079
2077
  });
2080
- m.setStyle(a(i)), (y = l.getSource()) == null || y.addFeature(m), f.isEdit && t(f);
2078
+ y.setStyle(a(i)), (m = l.getSource()) == null || m.addFeature(y), f.isEdit && t(f);
2081
2079
  }
2082
2080
  return {
2083
2081
  createPolygon: k,
2084
2082
  createCircle: r,
2085
2083
  deletePolygon: (f) => {
2086
- var h, m, y, x;
2087
- const i = (h = l.getSource()) == null ? void 0 : h.getFeatures().find(($) => $.getProperties().id === f), u = (m = o.getSource()) == null ? void 0 : m.getFeatures().find(($) => $.getProperties().id === "poly-delete-" + f);
2088
- (y = l.getSource()) == null || y.removeFeature(i), (x = o.getSource()) == null || x.removeFeature(u);
2084
+ var h, y, m, x;
2085
+ const i = (h = l.getSource()) == null ? void 0 : h.getFeatures().find(($) => $.getProperties().id === f), u = (y = o.getSource()) == null ? void 0 : y.getFeatures().find(($) => $.getProperties().id === "poly-delete-" + f);
2086
+ (m = l.getSource()) == null || m.removeFeature(i), (x = o.getSource()) == null || x.removeFeature(u);
2089
2087
  },
2090
2088
  updatePolygon: (f) => {
2091
2089
  var i;
@@ -2145,12 +2143,12 @@ const Et = (e, l) => {
2145
2143
  try {
2146
2144
  f && f.length > 0 && f.forEach((i) => {
2147
2145
  if (T) return;
2148
- const u = p == null ? void 0 : p.getEventPixel(C.originalEvent), h = i == null ? void 0 : i.get("layerType"), m = p == null ? void 0 : p.forEachFeatureAtPixel(u, (y) => y, {
2149
- layerFilter: (y) => y === i,
2146
+ const u = p == null ? void 0 : p.getEventPixel(C.originalEvent), h = i == null ? void 0 : i.get("layerType"), y = p == null ? void 0 : p.forEachFeatureAtPixel(u, (m) => m, {
2147
+ layerFilter: (m) => m === i,
2150
2148
  // 严格图层过滤
2151
2149
  hitTolerance: 5
2152
2150
  });
2153
- m !== k[h] && (k[h] && r(h, k[h]), k[h] = m, m && (t(h, m, C), T = !0)), m && (R = !0);
2151
+ y !== k[h] && (k[h] && r(h, k[h]), k[h] = y, y && (t(h, y, C), T = !0)), y && (R = !0);
2154
2152
  }), R ? Me(p, "pointer") : Me(p, "grab");
2155
2153
  } catch (i) {
2156
2154
  console.log("pointermove--forEachFeatureAtPixel----", i);
@@ -2167,7 +2165,7 @@ const Et = (e, l) => {
2167
2165
  var i, u, h;
2168
2166
  if (!R)
2169
2167
  try {
2170
- const m = p == null ? void 0 : p.getEventPixel(C.originalEvent), y = p == null ? void 0 : p.forEachFeatureAtPixel(m, (x) => {
2168
+ const y = p == null ? void 0 : p.getEventPixel(C.originalEvent), m = p == null ? void 0 : p.forEachFeatureAtPixel(y, (x) => {
2171
2169
  if (x.get("shipData") || x.get("portData") || x.get("polygonData"))
2172
2170
  return x;
2173
2171
  }, {
@@ -2175,20 +2173,20 @@ const Et = (e, l) => {
2175
2173
  // 严格图层过滤
2176
2174
  hitTolerance: 10
2177
2175
  });
2178
- if (console.log("clickFeature", y), y) {
2179
- if (y != null && y.get("shipData"))
2180
- console.log("trackManager.getTrackStatus()---", o.getTrackStatus()), o.getTrackStatus() || n.handleShipMapEvent(y, "click", (i = l.getProps()) == null ? void 0 : i.selectShip);
2181
- else if (y != null && y.get("portData")) {
2182
- const x = y == null ? void 0 : y.get("portData");
2176
+ if (console.log("clickFeature", m), m) {
2177
+ if (m != null && m.get("shipData"))
2178
+ console.log("trackManager.getTrackStatus()---", o.getTrackStatus()), o.getTrackStatus() || n.handleShipMapEvent(m, "click", (i = l.getProps()) == null ? void 0 : i.selectShip);
2179
+ else if (m != null && m.get("portData")) {
2180
+ const x = m == null ? void 0 : m.get("portData");
2183
2181
  a.selected(x), (h = (u = l.getProps()) == null ? void 0 : u.selectPort) == null || h.call(u, x);
2184
- } else if (y != null && y.get("polygonData")) {
2185
- const x = y.get("polygonData");
2182
+ } else if (m != null && m.get("polygonData")) {
2183
+ const x = m.get("polygonData");
2186
2184
  L.deletePolygon(x == null ? void 0 : x.id);
2187
2185
  }
2188
2186
  R = !0, C.preventDefault(), C.stopPropagation();
2189
2187
  }
2190
- } catch (m) {
2191
- console.log("click----forEachFeatureAtPixel", m);
2188
+ } catch (y) {
2189
+ console.log("click----forEachFeatureAtPixel", y);
2192
2190
  }
2193
2191
  });
2194
2192
  } catch (R) {
@@ -2201,15 +2199,15 @@ const Et = (e, l) => {
2201
2199
  const e = Kt([]);
2202
2200
  return {
2203
2201
  createInstance: (n, a) => {
2204
- const c = mo();
2202
+ const c = yo();
2205
2203
  c.initMap(n, a);
2206
2204
  const s = c.getInstall(), L = zo(s), p = Vo();
2207
2205
  p.setProps(a), L.setShowLayerType(a.layerType), L.setGreenTileVisible(a.showGreenLayer);
2208
- const k = Co(s), t = po(s, k), r = No(s), C = Oo(s), R = Wo(s, p), T = Go(s, p), f = Do(s), i = Yo(s);
2206
+ const k = Co(s), t = po(s, k), r = No(s), C = Oo(s), R = Wo(s, p), T = Go(s, p), f = Yo(s), i = Do(s);
2209
2207
  Bo(c, p, k, r, f, R, T, i);
2210
2208
  const u = () => {
2211
- const m = s.getView().calculateExtent(c.getSize()), y = He([m[0], m[1]], ce.mercator, ce.data), x = He([m[2], m[3]], ce.mercator, ce.data);
2212
- return [y[0], y[1], x[0], x[1]];
2209
+ const y = s.getView().calculateExtent(c.getSize()), m = He([y[0], y[1]], ce.mercator, ce.data), x = He([y[2], y[3]], ce.mercator, ce.data);
2210
+ return [m[0], m[1], x[0], x[1]];
2213
2211
  }, h = {
2214
2212
  id: Symbol("map-instance"),
2215
2213
  innerMap: null,
@@ -2255,7 +2253,7 @@ const Et = (e, l) => {
2255
2253
  __name: "Map",
2256
2254
  props: {
2257
2255
  zoom: { default: ae.default },
2258
- center: { default: yo },
2256
+ center: { default: mo },
2259
2257
  layerType: { default: "vector" },
2260
2258
  showGreenLayer: { type: Boolean, default: !1 },
2261
2259
  showScale: { type: Boolean, default: !0 },