zhihao-ui 1.3.26 → 1.3.27

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.
@@ -26,7 +26,7 @@ const Qt = { id: "scale-line-container" }, Jt = /* @__PURE__ */ Ae({
26
26
  setup(e) {
27
27
  const l = e;
28
28
  console.log("props", l);
29
- const n = () => {
29
+ const r = () => {
30
30
  console.log("props");
31
31
  const { setZoom: a, getZoom: o, getInstall: f } = l.mapInstance.methods;
32
32
  if (!f()) return;
@@ -41,7 +41,7 @@ const Qt = { id: "scale-line-container" }, Jt = /* @__PURE__ */ Ae({
41
41
  return (a, o) => (We(), Ye("div", _t, [
42
42
  Ze("div", {
43
43
  class: "button big-button",
44
- onClick: n
44
+ onClick: r
45
45
  }, " + "),
46
46
  Ze("div", {
47
47
  class: "button small-button",
@@ -72,23 +72,23 @@ const Qt = { id: "scale-line-container" }, Jt = /* @__PURE__ */ Ae({
72
72
  }, eo = [114.84, 30.52], it = "https://static.zhihaoscm.cn/", $e = 2003750834e-2;
73
73
  var de = ((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=${Fe}`, 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=${Fe}`, 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=${Fe}`, 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=${Fe}`, e.greenTile = `${it}/map/tile/{z}/{x}/{y}.png`, e))(de || {}), we = /* @__PURE__ */ ((e) => (e[e.M = 1] = "M", e[e.KM = 2] = "KM", e[e.NM = 3] = "NM", e))(we || {});
74
74
  function to() {
75
- const e = U(), l = () => e.value, n = () => l().getView(), s = () => {
75
+ const e = U(), l = () => e.value, r = () => l().getView(), s = () => {
76
76
  var y;
77
- return (y = n()) == null ? void 0 : y.getZoom();
77
+ return (y = r()) == null ? void 0 : y.getZoom();
78
78
  }, a = (y) => {
79
79
  var P;
80
- (P = n()) == null || P.setZoom(y);
80
+ (P = r()) == null || P.setZoom(y);
81
81
  }, o = (y, P) => {
82
82
  var N;
83
- (N = n()) == null || N.setCenter(I([y, P]));
83
+ (N = r()) == null || N.setCenter(I([y, P]));
84
84
  }, f = () => {
85
85
  var P;
86
- const y = (P = n()) == null ? void 0 : P.getCenter();
86
+ const y = (P = r()) == null ? void 0 : P.getCenter();
87
87
  return Zt(y);
88
88
  }, b = () => {
89
89
  var y;
90
90
  return (y = l()) == null ? void 0 : y.getSize();
91
- }, t = new Ue(), r = (y, P) => {
91
+ }, t = new Ue(), n = (y, P) => {
92
92
  m(P);
93
93
  const N = {
94
94
  zoom: P.zoom,
@@ -146,25 +146,25 @@ function to() {
146
146
  };
147
147
  return {
148
148
  getInstall: l,
149
- getView: n,
149
+ getView: r,
150
150
  getZoom: s,
151
151
  setZoom: a,
152
152
  setCenter: o,
153
153
  getCenter: f,
154
154
  getSize: b,
155
- initMap: r,
155
+ initMap: n,
156
156
  setBaseLayerMap: m
157
157
  };
158
158
  }
159
159
  const Xe = function(e, l) {
160
- const n = Number(l) / 6e5;
161
- return [Number(e) / 6e5, n];
160
+ const r = Number(l) / 6e5;
161
+ return [Number(e) / 6e5, r];
162
162
  }, oo = (e, l) => {
163
- const n = I(e), s = l * 1e3, a = [
164
- n[0] - s,
165
- n[1] - s,
166
- n[0] + s,
167
- n[1] + s
163
+ const r = I(e), s = l * 1e3, a = [
164
+ r[0] - s,
165
+ r[1] - s,
166
+ r[0] + s,
167
+ r[1] + s
168
168
  ], o = Dt(a, J.mercator, J.data);
169
169
  return {
170
170
  leftTopPoint: { lng: o[0], lat: o[3] },
@@ -190,12 +190,12 @@ const Xe = function(e, l) {
190
190
  };
191
191
  function no(e) {
192
192
  const l = e[0] * $e / 180;
193
- let n = Math.log(Math.tan((90 + e[1]) * Math.PI / 360)) / (Math.PI / 180);
194
- return n = n * $e / 180, [l, n];
193
+ let r = Math.log(Math.tan((90 + e[1]) * Math.PI / 360)) / (Math.PI / 180);
194
+ return r = r * $e / 180, [l, r];
195
195
  }
196
196
  function ge(e = "") {
197
197
  let l = e.replace(/&?/g, "&");
198
- return l = l.replace(/&#x([0-9a-fA-F]+);?/g, (n, s) => {
198
+ return l = l.replace(/&#x([0-9a-fA-F]+);?/g, (r, s) => {
199
199
  const a = parseInt(s, 16);
200
200
  return String.fromCodePoint(a);
201
201
  }), l;
@@ -212,15 +212,15 @@ const tt = (e) => {
212
212
  zIndex: 100
213
213
  });
214
214
  }, ot = (e, l = "lonlat") => {
215
- const n = { lon: 0, lat: 0 }, s = e[0] / $e * 180;
215
+ const r = { lon: 0, lat: 0 }, s = e[0] / $e * 180;
216
216
  let a = e[1] / $e * 180;
217
- return a = 180 / Math.PI * (2 * Math.atan(Math.exp(a * Math.PI / 180)) - Math.PI / 2), n.lon = s, n.lat = a, l === "lonlat" ? n : [s, a];
217
+ return a = 180 / Math.PI * (2 * Math.atan(Math.exp(a * Math.PI / 180)) - Math.PI / 2), r.lon = s, r.lat = a, l === "lonlat" ? r : [s, a];
218
218
  }, lo = (e) => {
219
- const l = lt.duration(e, "minutes"), n = Math.floor(l.asDays()), s = l.hours(), a = l.minutes();
219
+ const l = lt.duration(e, "minutes"), r = Math.floor(l.asDays()), s = l.hours(), a = l.minutes();
220
220
  let o = `${String(a).padStart(2, "0")}分`;
221
- return s !== 0 && (o = `${String(s).padStart(2, "0")}时${o}`), n !== 0 && (o = `${String(n).padStart(2, "0")}天${o}`), o;
221
+ return s !== 0 && (o = `${String(s).padStart(2, "0")}时${o}`), r !== 0 && (o = `${String(r).padStart(2, "0")}天${o}`), o;
222
222
  }, so = (e, l) => {
223
- let n = null;
223
+ let r = null;
224
224
  const s = async (m) => {
225
225
  if (!e || (console.log("vehicleInfo", m), !(m != null && m.lon && (m != null && m.lat)))) return;
226
226
  const y = Math.abs(Number(m.lon)) > 180 ? Xe(m.lon, m.lat) : [m.lon, m.lat];
@@ -229,21 +229,21 @@ const tt = (e) => {
229
229
  P.setCenter(xe(N.getCoordinates(), J.data, J.mercator));
230
230
  }, a = (m, y) => {
231
231
  const P = `${it}map/car-icon.gif`;
232
- n || (n = new ie({
232
+ r || (r = new ie({
233
233
  element: document.createElement("div"),
234
234
  positioning: "center-center",
235
235
  stopEvent: !1
236
236
  // 允许交互事件穿透
237
- }), e.addOverlay(n));
238
- const N = n.getElement();
237
+ }), e.addOverlay(r));
238
+ const N = r.getElement();
239
239
  N.style.backgroundImage = `url(${P})`, N.style.width = "80px", N.style.height = "80px";
240
240
  const v = (m == null ? void 0 : m.drc) || "";
241
- N.style.transform = `rotate(${v}deg)`, N.style.backgroundSize = "cover", n == null || n.setPosition(y);
241
+ N.style.transform = `rotate(${v}deg)`, N.style.backgroundSize = "cover", r == null || r.setPosition(y);
242
242
  };
243
243
  return {
244
244
  location: s,
245
245
  remove: () => {
246
- const m = n == null ? void 0 : n.getElement();
246
+ const m = r == null ? void 0 : r.getElement();
247
247
  m && (m.innerHTML = "");
248
248
  },
249
249
  renderTrack: (m, y, P) => {
@@ -262,7 +262,7 @@ const tt = (e) => {
262
262
  };
263
263
  var ct = /* @__PURE__ */ ((e) => (e[e.发动机使用中 = 0] = "发动机使用中", e[e.锚泊 = 1] = "锚泊", e[e.未操作 = 2] = "未操作", e[e.操纵能力受限 = 3] = "操纵能力受限", e[e.吃水受限 = 4] = "吃水受限", e[e.系泊 = 5] = "系泊", e[e.搁浅 = 6] = "搁浅", e[e.从事捕捞 = 7] = "从事捕捞", e[e.航行中 = 8] = "航行中", e[e.留作将来修正导航状态 = 9] = "留作将来修正导航状态", e[e.高速船留用 = 10] = "高速船留用", e[e.机动船尾推作业 = 11] = "机动船尾推作业", e[e.机动船顶推或侧推作业 = 12] = "机动船顶推或侧推作业", e[e.飞翼船留用 = 13] = "飞翼船留用", e[e.现行的 = 14] = "现行的", e[e.未定义 = 15] = "未定义", e))(ct || {}), te = /* @__PURE__ */ ((e) => (e.left = "left", e.right = "right", e.front = "front", e.up = "up", e.down = "down", e.back = "back", e))(te || {});
264
264
  const io = (e) => {
265
- const l = /* @__PURE__ */ new Map(), n = {};
265
+ const l = /* @__PURE__ */ new Map(), r = {};
266
266
  let s = null;
267
267
  const a = "--";
268
268
  let o = null;
@@ -272,19 +272,19 @@ const io = (e) => {
272
272
  stopEvent: !1,
273
273
  className: "track-label-popup"
274
274
  });
275
- let t, r, m, y, P, N = !1, v = Date.now(), w, F = 0, p = null, x = 20, G = !1;
275
+ let t, n, m, y, P, N = !1, v = Date.now(), w, F = 0, p = null, x = 20, G = !1;
276
276
  const W = 5, B = [], X = (c) => {
277
277
  var d;
278
278
  for (B.unshift(c); B.length > W; ) {
279
279
  const g = B.pop(), M = l.get(g);
280
- M && ((d = M.getSource()) == null || d.clear(), e == null || e.removeLayer(M), l.delete(g), delete n[g]);
280
+ M && ((d = M.getSource()) == null || d.clear(), e == null || e.removeLayer(M), l.delete(g), delete r[g]);
281
281
  }
282
282
  };
283
283
  let O = "";
284
284
  const D = ["#ff0000", "#00ff00", "#0079ff", "#ffa500", "#800080", "#008080", "#ffc0cb", "#800000", "#000080", "#808000"], i = qe(() => {
285
- if (s && n[s] && l.get(s).getVisible() && G) {
285
+ if (s && r[s] && l.get(s).getVisible() && G) {
286
286
  console.log("reRenderTrackLine------------");
287
- const c = At(u(s, n[s]));
287
+ const c = At(u(s, r[s]));
288
288
  ze(s, c);
289
289
  }
290
290
  }, 300), u = (c, d) => {
@@ -298,10 +298,10 @@ const io = (e) => {
298
298
  return E.center = [E.lon, E.lat], E.centerPoint = no(E.center), E.time = lt(E.createdAt).format("YYYY-MM-DD HH:mm:ss"), E.id = c, E.index = R, E;
299
299
  }), g;
300
300
  }, h = async (c, d, g, M = "ship", L = 200) => {
301
- if (console.log("renderTrackLine--------", c, d, g), !e || JSON.stringify(n[c]) === JSON.stringify(d) && s === c || (d = d == null ? void 0 : d.reverse(), b && M === "ship" && (e != null && e.getOverlays().getArray().includes(b) || e.addOverlay(b)), (d == null ? void 0 : d.length) < 2))
301
+ if (console.log("renderTrackLine--------", c, d, g), !e || JSON.stringify(r[c]) === JSON.stringify(d) && s === c || (d = d == null ? void 0 : d.reverse(), b && M === "ship" && (e != null && e.getOverlays().getArray().includes(b) || e.addOverlay(b)), (d == null ? void 0 : d.length) < 2))
302
302
  return;
303
- X(c), s = c, n[c] = d, x = L;
304
- const E = Object.keys(n).findIndex((R) => R === c) || 0;
303
+ X(c), s = c, r[c] = d, x = L;
304
+ const E = Object.keys(r).findIndex((R) => R === c) || 0;
305
305
  O = g || D[E > 10 ? 10 : E], G = !0, await S(), await Je(s);
306
306
  }, C = (c) => {
307
307
  const d = new ae();
@@ -326,7 +326,7 @@ const io = (e) => {
326
326
  l.set(c, E);
327
327
  }
328
328
  await k(c);
329
- const d = O || "", g = n[c] || [];
329
+ const d = O || "", g = r[c] || [];
330
330
  if (!(g && g.length > 1)) return [];
331
331
  let M = [];
332
332
  M = u(c, g);
@@ -476,7 +476,7 @@ const io = (e) => {
476
476
  let g = [
477
477
  ...vt(c, O)
478
478
  ];
479
- return (c.index === 0 || c.index === n[c.id].length - 1) && (g = [...mt(c)], d.set("type", "track_begin")), c.state !== void 0 && c.state !== null && (g = [...ht(c)], d.set("type", "track_icon")), d.setStyle(g), d;
479
+ return (c.index === 0 || c.index === r[c.id].length - 1) && (g = [...mt(c)], d.set("type", "track_begin")), c.state !== void 0 && c.state !== null && (g = [...ht(c)], d.set("type", "track_icon")), d.setStyle(g), d;
480
480
  }, pe = (c, d, g) => {
481
481
  const M = document.createElement("div");
482
482
  M.className = "track-overlay-label", M.style.position = "relative", M.style.backgroundColor = "rgba(255,255,255,0.8)", M.style.border = `1px solid ${d}`, M.style.fontSize = "12px", M.innerHTML = `
@@ -605,8 +605,8 @@ const io = (e) => {
605
605
  console.log("清除所有的轨迹-----"), Me(), l.forEach((d) => {
606
606
  var g;
607
607
  (g = d.getSource()) == null || g.clear(), e == null || e.removeLayer(d);
608
- }), Object.keys(n).forEach((d) => {
609
- l.delete(d), delete n[d];
608
+ }), Object.keys(r).forEach((d) => {
609
+ l.delete(d), delete r[d];
610
610
  }), G = !1, Qe();
611
611
  }, xt = (c) => {
612
612
  const d = l.get(c || s);
@@ -621,14 +621,14 @@ const io = (e) => {
621
621
  const g = {
622
622
  id: c,
623
623
  length: "--"
624
- }, L = (n[c] || []).map(
624
+ }, L = (r[c] || []).map(
625
625
  (R) => xe([R.lon, R.lat], J.data, J.mercator)
626
626
  ), E = new Pe(L);
627
627
  return g.length = ro(E, d) || "--", g;
628
628
  }, kt = (c, d) => {
629
629
  pt(String(c), d);
630
630
  }, pt = (c, d) => {
631
- const g = n[String(c)], M = g == null ? void 0 : g.map((L) => [L.lon, L.lat]);
631
+ const g = r[String(c)], M = g == null ? void 0 : g.map((L) => [L.lon, L.lat]);
632
632
  M && Lt(M, d);
633
633
  }, Oe = new H({
634
634
  text: new ue({
@@ -645,11 +645,11 @@ const io = (e) => {
645
645
  Me();
646
646
  return;
647
647
  }
648
- const E = r.getCoordinateAt(
648
+ const E = n.getCoordinateAt(
649
649
  F > 1 ? 2 - F : F
650
- ), R = r.getCoordinateAt(
650
+ ), R = n.getCoordinateAt(
651
651
  F > 1 ? F - 0.01 : F
652
- ), $ = r.getCoordinateAt(
652
+ ), $ = n.getCoordinateAt(
653
653
  F > 1 ? 2 - F : F + 0.01
654
654
  ), q = Ke(
655
655
  ot(R, "array"),
@@ -666,14 +666,14 @@ const io = (e) => {
666
666
  }, Lt = (c, d) => {
667
667
  N && Me(), t = new Ie({
668
668
  factor: 1e6
669
- }).writeGeometry(new Pe(c)), r = new Ie({
669
+ }).writeGeometry(new Pe(c)), n = new Ie({
670
670
  factor: 1e6
671
671
  }).readGeometry(t, {
672
672
  dataProjection: J.data,
673
673
  featureProjection: J.mercator
674
674
  }), m = new se({
675
675
  type: "icon",
676
- geometry: new ne(r.getFirstCoordinate())
676
+ geometry: new ne(n.getFirstCoordinate())
677
677
  });
678
678
  const g = m.getGeometry();
679
679
  y = g ? g.clone() : new ne([0, 0]), P = new se({
@@ -746,7 +746,7 @@ const io = (e) => {
746
746
  };
747
747
  function co(e) {
748
748
  console.log("useShipOverlay", e);
749
- const l = U(null), n = Te(() => ({
749
+ const l = U(null), r = Te(() => ({
750
750
  "--overlay-color": "#FFF",
751
751
  "--bg-color1": e.colors && e.colors[0] ? e.colors[0] : "#ffffff",
752
752
  // 默认第一个颜色
@@ -795,7 +795,7 @@ function co(e) {
795
795
  return () => re("div", {
796
796
  ref: l,
797
797
  class: "ship-overlay-container",
798
- style: n.value
798
+ style: r.value
799
799
  }, [
800
800
  re(
801
801
  "div",
@@ -860,10 +860,10 @@ function co(e) {
860
860
  ]);
861
861
  }
862
862
  U([]);
863
- function ao(e, l, n, s) {
863
+ function ao(e, l, r, s) {
864
864
  if (l) {
865
865
  const a = new ie({
866
- element: n,
866
+ element: r,
867
867
  positioning: "top-left",
868
868
  id: "label-" + (s == null ? void 0 : s.id),
869
869
  offset: [20, -20],
@@ -875,21 +875,21 @@ function ao(e, l, n, s) {
875
875
  }
876
876
  }
877
877
  const uo = (e) => {
878
- const { spd: l, hdg: n, cog: s } = e;
879
- return l ? n !== null && +n != 511 && s !== null ? s - +n >= 3 ? te.right : s - +n <= -3 ? te.left : te.front : te.front : "";
878
+ const { spd: l, hdg: r, cog: s } = e;
879
+ return l ? r !== null && +r != 511 && s !== null ? s - +r >= 3 ? te.right : s - +r <= -3 ? te.left : te.front : te.front : "";
880
880
  }, he = (e, l) => {
881
- const { shipData: n } = l.getProperties(), s = at(e), a = je(e, n, s);
881
+ const { shipData: r } = l.getProperties(), s = at(e), a = je(e, r, s);
882
882
  return go(l, a, s);
883
883
  }, at = (e) => {
884
884
  const l = e == null ? void 0 : e.getView().getZoom();
885
885
  return l <= ee.shipModelMax && l >= ee.shipTriggleMin ? "ship" : "triangle";
886
- }, je = (e, l, n) => {
887
- if (n === "ship") {
888
- const { len: s, wid: a } = l, o = 97, f = 20, t = 1 / (e == null ? void 0 : e.getView().getResolution()), r = s * t / o, m = a * t / f, y = Math.min(r, m);
886
+ }, je = (e, l, r) => {
887
+ if (r === "ship") {
888
+ const { len: s, wid: a } = l, o = 97, f = 20, t = 1 / (e == null ? void 0 : e.getView().getResolution()), n = s * t / o, m = a * t / f, y = Math.min(n, m);
889
889
  return y < 0.2 ? 0.2 : y > 2 ? 2 : y;
890
890
  }
891
891
  return ee.scaleNum;
892
- }, go = (e, l, n) => {
892
+ }, go = (e, l, r) => {
893
893
  const { color: s, direct: a, isHighlight: o, shipData: f } = e.getProperties(), b = ((f == null ? void 0 : f.cog) - 90 + 360) % 360;
894
894
  return new H({
895
895
  image: new be({
@@ -901,10 +901,10 @@ const uo = (e) => {
901
901
  })
902
902
  });
903
903
  function t() {
904
- return `data:image/svg+xml;utf8,${encodeURIComponent(r())}`;
904
+ return `data:image/svg+xml;utf8,${encodeURIComponent(n())}`;
905
905
  }
906
- function r() {
907
- switch (n) {
906
+ function n() {
907
+ switch (r) {
908
908
  case "triangle":
909
909
  return `<svg width="41" height="24" viewBox="0 0 41 24" fill="none" xmlns="http://www.w3.org/2000/svg">
910
910
  <path d="M30.8843 12.6777L2.21343 21.7067C1.75559 21.8509 1.28947 21.509 1.28947 21.029L1.28947 2.97103C1.28947 2.49102 1.75558 2.14913 2.21342 2.29331L30.8843 11.3223C31.5471 11.531 31.5471 12.469 30.8843 12.6777Z"
@@ -931,8 +931,8 @@ const uo = (e) => {
931
931
  }
932
932
  }
933
933
  }, fo = (e, l) => {
934
- const n = dt(e, l), s = l.id, { lon: a, lat: o } = l, f = new ie({
935
- element: n,
934
+ const r = dt(e, l), s = l.id, { lon: a, lat: o } = l, f = new ie({
935
+ element: r,
936
936
  position: I([a, o]),
937
937
  id: "selected-" + s,
938
938
  positioning: "center-center",
@@ -941,7 +941,7 @@ const uo = (e) => {
941
941
  });
942
942
  return f.set("class", "ship-overlay-selected"), f;
943
943
  }, dt = (e, l) => {
944
- const n = at(e), s = je(e, l, n), a = n === "ship" ? 109 : 49, o = `
944
+ const r = at(e), s = je(e, l, r), a = r === "ship" ? 109 : 49, o = `
945
945
  <svg style="transform:scale(${s});" xmlns="http://www.w3.org/2000/svg" width="${a}" height="${a}" viewBox="0 0 49 49" fill="none">
946
946
  <path d="M1.99982 46.9998L1.99982 1.99982L46.9998 1.99982L46.9998 46.9998L1.99982 46.9998Z" fill="#FF2424" fill-opacity="0.2"/>
947
947
  <path fill-rule="evenodd" clip-rule="evenodd" d="M19.9998 0.5V3.5L3.49976 3.5V20H0.499756V0.500002L19.9998 0.5ZM45.4998 3.5H28.9998V0.5H48.4998V20H45.4998V3.5ZM48.4998 29L48.4998 48.5H28.9998V45.5H45.4998L45.4998 29H48.4998ZM3.49976 45.5L3.49976 29H0.499756L0.499758 48.5L19.9998 48.5V45.5L3.49976 45.5Z" fill="#FF2424"/>
@@ -949,15 +949,15 @@ const uo = (e) => {
949
949
  `, f = document.createElement("div");
950
950
  return f.className = "ship-overlay-selected", f.innerHTML = o, f;
951
951
  }, vo = (e, l) => {
952
- const { lon: n, lat: s, blinking: a } = l, o = ut(l);
953
- n && s && ao(e, I([n, s]), o, { ...l, blinking: a });
952
+ const { lon: r, lat: s, blinking: a } = l, o = ut(l);
953
+ r && s && ao(e, I([r, s]), o, { ...l, blinking: a });
954
954
  }, ut = (e) => {
955
955
  const l = document.createElement("div");
956
956
  l.className = "ship-overlay-box", l.style.position = "relative";
957
- const { lon: n, lat: s, blinking: a, blinkingColors: o, name: f } = e, b = De({
957
+ const { lon: r, lat: s, blinking: a, blinkingColors: o, name: f } = e, b = De({
958
958
  setup() {
959
959
  return co({
960
- position: [n + 2e-3, s + 2e-3],
960
+ position: [r + 2e-3, s + 2e-3],
961
961
  selected: a,
962
962
  name: f,
963
963
  colors: o || [],
@@ -984,16 +984,16 @@ function ho() {
984
984
  return e[Math.floor(Math.random() * e.length)];
985
985
  }
986
986
  const yo = window.devicePixelRatio || 1;
987
- function mo(e, l, n = "left-bottom", s = 2) {
987
+ function mo(e, l, r = "left-bottom", s = 2) {
988
988
  const a = document.createElement("canvas"), o = a.getContext("2d");
989
989
  if (!o) return "";
990
- const f = 2, b = 8, t = 16, r = window.devicePixelRatio || 1, m = "500 12px Arial", y = "14px map-iconfont";
990
+ const f = 2, b = 8, t = 16, n = window.devicePixelRatio || 1, m = "500 12px Arial", y = "14px map-iconfont";
991
991
  o.font = m;
992
992
  const N = o.measureText(e).width;
993
993
  o.font = y;
994
994
  const v = l.map((k) => ({ width: o.measureText(ge(k)).width, height: 14 })), w = v.reduce((k, S) => k + S.width, 0), F = (l.length - 1) * s, p = b + N + w + F + b, x = f + 14 + f * 2;
995
995
  let G, W, B = 0, X = 0, O = 0, D = 0, i = 0, u = 0;
996
- switch (G = t + p, n) {
996
+ switch (G = t + p, r) {
997
997
  case "right-top":
998
998
  W = t + x, B = 0, X = t + x, O = t, D = 0, i = t, u = 0;
999
999
  break;
@@ -1013,7 +1013,7 @@ function mo(e, l, n = "left-bottom", s = 2) {
1013
1013
  W = t + x, B = p, X = x, O = p + t, D = 0, i = 0, u = t;
1014
1014
  break;
1015
1015
  }
1016
- a.width = Math.round(G * r), a.height = Math.round(W * r), o.scale(r, r), o.clearRect(0, 0, G, W), o.beginPath(), o.moveTo(B, X), o.lineTo(O, D), o.strokeStyle = "#FFF", o.lineWidth = 1, o.stroke(), o.fillStyle = "#FFF", o.fillRect(i, u, p, x), o.font = m, o.textBaseline = "middle";
1016
+ a.width = Math.round(G * n), a.height = Math.round(W * n), o.scale(n, n), o.clearRect(0, 0, G, W), o.beginPath(), o.moveTo(B, X), o.lineTo(O, D), o.strokeStyle = "#FFF", o.lineWidth = 1, o.stroke(), o.fillStyle = "#FFF", o.fillRect(i, u, p, x), o.font = m, o.textBaseline = "middle";
1017
1017
  const h = u + f + x / 2;
1018
1018
  o.strokeStyle = "#ffffff", o.lineWidth = 1, o.strokeText(e, i + b, h), o.fillStyle = "#000000", o.fillText(e, i + b, h), o.font = y, o.fillStyle = "#3370ff";
1019
1019
  let C = i + b + N + s;
@@ -1023,7 +1023,7 @@ function mo(e, l, n = "left-bottom", s = 2) {
1023
1023
  }), a.toDataURL("image/png");
1024
1024
  }
1025
1025
  const nt = (e, l) => {
1026
- const { name: n, rightIcons: s, selected: a } = e.getProperties(), o = l !== 1 ? ho() : "right-top", f = mo(n, s, o);
1026
+ const { name: r, rightIcons: s, selected: a } = e.getProperties(), o = l !== 1 ? ho() : "right-top", f = mo(r, s, o);
1027
1027
  let b = [0, 0];
1028
1028
  switch (o) {
1029
1029
  case "right-top":
@@ -1057,7 +1057,7 @@ const nt = (e, l) => {
1057
1057
  zIndex: a ? 100 : 10
1058
1058
  });
1059
1059
  }, wo = (e) => {
1060
- let l = null, n = null;
1060
+ let l = null, r = null;
1061
1061
  const s = new ae(), a = new Yt({
1062
1062
  source: s,
1063
1063
  className: "zh-map--ship-layer",
@@ -1072,18 +1072,18 @@ const nt = (e, l) => {
1072
1072
  declutter: !0
1073
1073
  });
1074
1074
  e == null || e.addLayer(a), e == null || e.addLayer(f);
1075
- let b = null, t = "", r = {}, m = {};
1075
+ let b = null, t = "", n = {}, m = {};
1076
1076
  const y = (i) => {
1077
1077
  if (!i || !e) return;
1078
- const u = (n == null ? void 0 : n.id) || (l == null ? void 0 : l.get("id"));
1079
- if (n) {
1078
+ const u = (r == null ? void 0 : r.id) || (l == null ? void 0 : l.get("id"));
1079
+ if (r) {
1080
1080
  const h = i.filter((C) => C.id === u);
1081
- h.length === 0 ? i.push(n) : n = h[0];
1081
+ h.length === 0 ? i.push(r) : r = h[0];
1082
1082
  }
1083
1083
  w(), F(!0), D(i), N();
1084
1084
  }, P = (i) => {
1085
1085
  var V;
1086
- const u = (n == null ? void 0 : n.id) || (l == null ? void 0 : l.get("id")), h = I([i == null ? void 0 : i.lon, i == null ? void 0 : i.lat]), C = ((V = m[i.id]) == null ? void 0 : V.blinkColors) || [], S = C[C.length - 1] || i.fill || "#04C900", z = uo(i), Z = new se({
1086
+ const u = (r == null ? void 0 : r.id) || (l == null ? void 0 : l.get("id")), h = I([i == null ? void 0 : i.lon, i == null ? void 0 : i.lat]), C = ((V = m[i.id]) == null ? void 0 : V.blinkColors) || [], S = C[C.length - 1] || i.fill || "#04C900", z = uo(i), Z = new se({
1087
1087
  geometry: new ne(h),
1088
1088
  // 船舶数据
1089
1089
  shipData: i,
@@ -1105,13 +1105,13 @@ const nt = (e, l) => {
1105
1105
  });
1106
1106
  return Z.set("clickGeometry", new Bt(h)), Z;
1107
1107
  }, N = async () => {
1108
- if (!n || !e) return;
1108
+ if (!r || !e) return;
1109
1109
  let u = e.getOverlays().getArray().find((h) => h.get("class") == "ship-overlay-selected");
1110
1110
  if (u) {
1111
- const h = dt(e, n);
1112
- await u.setElement(h), await u.setPosition(I([n.lon, n.lat]));
1111
+ const h = dt(e, r);
1112
+ await u.setElement(h), await u.setPosition(I([r.lon, r.lat]));
1113
1113
  } else
1114
- u = fo(e, n), u && e.addOverlay(u);
1114
+ u = fo(e, r), u && e.addOverlay(u);
1115
1115
  setTimeout(() => {
1116
1116
  var h;
1117
1117
  u && ((h = u.get("element")) != null && h.parentElement) && (u.get("element").parentElement.style.display = "block");
@@ -1124,7 +1124,7 @@ const nt = (e, l) => {
1124
1124
  });
1125
1125
  const C = (e == null ? void 0 : e.getOverlays().getArray()).find((k) => k.get("class") == "ship-overlay-selected");
1126
1126
  if (C) {
1127
- const k = C.getElement(), S = je(e, n, "ship");
1127
+ const k = C.getElement(), S = je(e, r, "ship");
1128
1128
  console.log("scaleFactor", S), k.style.transform = `scale(${S})`;
1129
1129
  }
1130
1130
  b = requestAnimationFrame(u);
@@ -1144,10 +1144,10 @@ const nt = (e, l) => {
1144
1144
  }
1145
1145
  }
1146
1146
  }, p = (i, u) => {
1147
- r = i, m = u, console.log("attentionShips", r, "attentionShipsColor", u);
1147
+ n = i, m = u, console.log("attentionShips", n, "attentionShipsColor", u);
1148
1148
  const h = e.getOverlays().getArray(), C = s.getFeatures();
1149
- for (const k in r) {
1150
- const S = r[k], z = h.find((V) => V.getId() === "label-" + k), Z = C.find((V) => k === V.get("id"));
1149
+ for (const k in n) {
1150
+ const S = n[k], z = h.find((V) => V.getId() === "label-" + k), Z = C.find((V) => k === V.get("id"));
1151
1151
  if (z && Z) {
1152
1152
  const V = u[k].blinkColors || [], { shipData: ce, name: oe, color: le } = Z == null ? void 0 : Z.getProperties();
1153
1153
  Z.set("blinking", S), V[(V == null ? void 0 : V.length) - 1] && le !== V[(V == null ? void 0 : V.length) - 1] && (Z.set("color", V[(V == null ? void 0 : V.length) - 1] || ""), Z.setStyle(he(e, Z)));
@@ -1190,9 +1190,9 @@ const nt = (e, l) => {
1190
1190
  if (i) {
1191
1191
  console.log("选中", i);
1192
1192
  const u = s.getFeatures().find((C) => C.get("id") === i.id), h = o.getFeatures().find((C) => C.get("id") === i.id);
1193
- u && (l = u), h && h.set("selected", !0), n = i, N();
1193
+ u && (l = u), h && h.set("selected", !0), r = i, N();
1194
1194
  } else
1195
- console.log("取消选中"), n = null, l = null, X();
1195
+ console.log("取消选中"), r = null, l = null, X();
1196
1196
  }, W = qe((i, u, h) => {
1197
1197
  try {
1198
1198
  if (i) {
@@ -1223,7 +1223,7 @@ const nt = (e, l) => {
1223
1223
  name: i.cnname || i.enname || i.name || i.id || "未命名船舶",
1224
1224
  // 图标
1225
1225
  rightIcons: rt(i),
1226
- selected: (i == null ? void 0 : i.id) === (n == null ? void 0 : n.id),
1226
+ selected: (i == null ? void 0 : i.id) === (r == null ? void 0 : r.id),
1227
1227
  shipData: i
1228
1228
  });
1229
1229
  C.set("id", i.id);
@@ -1233,13 +1233,13 @@ const nt = (e, l) => {
1233
1233
  const u = e.getView().getZoom();
1234
1234
  i.forEach((h) => {
1235
1235
  const C = P(h);
1236
- if (C.setStyle(he(e, C)), s.addFeature(C), (n == null ? void 0 : n.id) == h.id || u >= ee.shipModelMin)
1237
- if (r[h.id]) {
1236
+ if (C.setStyle(he(e, C)), s.addFeature(C), (r == null ? void 0 : r.id) == h.id || u >= ee.shipModelMin)
1237
+ if (n[h.id]) {
1238
1238
  if (h.id && m[h == null ? void 0 : h.id]) {
1239
1239
  const k = m[h == null ? void 0 : h.id] || {}, S = (k == null ? void 0 : k.blinkColors) || [], z = (k == null ? void 0 : k.shipState) || "", Z = (h.cnname || h.enname || h.name || h.id || "未命名船舶") + "(" + z + ")", V = {
1240
1240
  ...h,
1241
1241
  name: Z,
1242
- blinking: r[h.id],
1242
+ blinking: n[h.id],
1243
1243
  blinkingColors: S || []
1244
1244
  };
1245
1245
  vo(e, V);
@@ -1260,10 +1260,10 @@ const nt = (e, l) => {
1260
1260
  changeShipScale: v
1261
1261
  };
1262
1262
  }, xo = (e) => {
1263
- const l = () => e == null ? void 0 : e.getLayers(), n = U("vector"), s = () => n.value, a = (t) => {
1264
- n.value = t;
1265
- const r = l();
1266
- r && (r == null || r.getArray().forEach((m) => {
1263
+ const l = () => e == null ? void 0 : e.getLayers(), r = U("vector"), s = () => r.value, a = (t) => {
1264
+ r.value = t;
1265
+ const n = l();
1266
+ n && (n == null || n.getArray().forEach((m) => {
1267
1267
  (m.className_ === "vector" || m.className_ === "satellite") && m.setVisible(m.className_ === t);
1268
1268
  }));
1269
1269
  }, o = U(!1);
@@ -1273,19 +1273,19 @@ const nt = (e, l) => {
1273
1273
  setGreenTileVisible: (t) => {
1274
1274
  if (t !== o.value) {
1275
1275
  if (t) {
1276
- const r = l();
1277
- if (!r.getArray().find((y) => y.className_ === "greenTile")) {
1276
+ const n = l();
1277
+ if (!n.getArray().find((y) => y.className_ === "greenTile")) {
1278
1278
  const y = new ye({
1279
1279
  source: new me({ url: de.greenTile }),
1280
1280
  visible: t,
1281
1281
  zIndex: 2,
1282
1282
  className: "greenTile"
1283
1283
  });
1284
- r.push(y);
1284
+ n.push(y);
1285
1285
  }
1286
1286
  } else {
1287
- const r = l(), m = r.getArray().find((y) => y.className_ === "greenTile");
1288
- m && r.remove(m);
1287
+ const n = l(), m = n.getArray().find((y) => y.className_ === "greenTile");
1288
+ m && n.remove(m);
1289
1289
  }
1290
1290
  o.value = t;
1291
1291
  }
@@ -1303,7 +1303,7 @@ const nt = (e, l) => {
1303
1303
  };
1304
1304
  }, ko = (e) => {
1305
1305
  const l = "zh-map-location-layer";
1306
- let n, s, a = null, o = null;
1306
+ let r, s, a = null, o = null;
1307
1307
  const f = (v) => {
1308
1308
  if (!(!v || v.length === 0)) {
1309
1309
  if (s || (s = new ae()), s.clear(), o) {
@@ -1312,11 +1312,11 @@ const nt = (e, l) => {
1312
1312
  }
1313
1313
  v.forEach((w) => {
1314
1314
  b(w);
1315
- }), n || (n = new ve({
1315
+ }), r || (r = new ve({
1316
1316
  className: l,
1317
1317
  source: s,
1318
1318
  zIndex: 100
1319
- }), e == null || e.addLayer(n));
1319
+ }), e == null || e.addLayer(r));
1320
1320
  }
1321
1321
  }, b = (v) => {
1322
1322
  const w = e == null ? void 0 : e.getView().getZoom(), [F, p] = v.latLon.split(","), x = new se({
@@ -1341,7 +1341,7 @@ const nt = (e, l) => {
1341
1341
  }),
1342
1342
  offsetY: 30
1343
1343
  })), new H(p);
1344
- }, r = () => {
1344
+ }, n = () => {
1345
1345
  if (a) {
1346
1346
  const v = a.get("loactionData").id;
1347
1347
  s.getFeatures().forEach((w) => {
@@ -1371,7 +1371,7 @@ const nt = (e, l) => {
1371
1371
  render: f,
1372
1372
  selected: y,
1373
1373
  clearSelected: m,
1374
- clear: r
1374
+ clear: n
1375
1375
  };
1376
1376
  }, po = (e) => {
1377
1377
  e.getInteractions().forEach((l) => {
@@ -1382,10 +1382,10 @@ const nt = (e, l) => {
1382
1382
  l instanceof st && l.setActive(!0);
1383
1383
  });
1384
1384
  }, Ve = (e, l) => {
1385
- const n = e.getViewport();
1386
- n && (n.style.cursor = l);
1385
+ const r = e.getViewport();
1386
+ r && (r.style.cursor = l);
1387
1387
  }, Co = (e, l) => {
1388
- const n = U([]), s = U("km"), a = (i) => {
1388
+ const r = U([]), s = U("km"), a = (i) => {
1389
1389
  s.value = i;
1390
1390
  };
1391
1391
  let o;
@@ -1394,9 +1394,9 @@ const nt = (e, l) => {
1394
1394
  o && o.classList.add("hidden");
1395
1395
  }), w(), f.value = !0;
1396
1396
  };
1397
- let t, r;
1397
+ let t, n;
1398
1398
  const m = () => {
1399
- t = new ae(), r = new ve({
1399
+ t = new ae(), n = new ve({
1400
1400
  source: t,
1401
1401
  zIndex: 1e3,
1402
1402
  style: {
@@ -1406,7 +1406,7 @@ const nt = (e, l) => {
1406
1406
  "circle-radius": 7,
1407
1407
  "circle-fill-color": "#ffcc33"
1408
1408
  }
1409
- }), e == null || e.addLayer(r);
1409
+ }), e == null || e.addLayer(n);
1410
1410
  };
1411
1411
  let y, P;
1412
1412
  const N = (i) => {
@@ -1455,14 +1455,14 @@ const nt = (e, l) => {
1455
1455
  var u, h, C;
1456
1456
  if (p && (p.className = "ol-tooltip ol-tooltip-static ol-tooltip-measure"), p != null && p.innerHTML) {
1457
1457
  const k = (y == null ? void 0 : y.get("randomId")) || F();
1458
- n.value.push({ id: k, value: p == null ? void 0 : p.innerHTML }), p.innerHTML = `${p.innerHTML}<div class="ol-tooltip-delete-button" data-id="${k}"><i class="map-iconfont icon-delete"></i></div>`;
1458
+ r.value.push({ id: k, value: p == null ? void 0 : p.innerHTML }), p.innerHTML = `${p.innerHTML}<div class="ol-tooltip-delete-button" data-id="${k}"><i class="map-iconfont icon-delete"></i></div>`;
1459
1459
  }
1460
1460
  (u = document.querySelector(".ol-selectable:has(.ol-tooltip-delete-button):last-child .ol-tooltip-delete-button")) == null || u.addEventListener("click", (k) => {
1461
1461
  var z;
1462
1462
  k.preventDefault(), k.stopPropagation();
1463
1463
  const S = (z = k.target) == null ? void 0 : z.getAttribute("data-id");
1464
1464
  S && X(S);
1465
- }), x.setOffset([0, -7]), y = null, p = null, G(), i && Ge(i), (C = (h = l.getProps()) == null ? void 0 : h.lineDrawEnd) == null || C.call(h, n.value);
1465
+ }), x.setOffset([0, -7]), y = null, p = null, G(), i && Ge(i), (C = (h = l.getProps()) == null ? void 0 : h.lineDrawEnd) == null || C.call(h, r.value);
1466
1466
  });
1467
1467
  }, F = () => Math.random().toString(36).substring(2, 9);
1468
1468
  let p, x;
@@ -1481,7 +1481,7 @@ const nt = (e, l) => {
1481
1481
  positioning: "center-left"
1482
1482
  }), e == null || e.addOverlay(P);
1483
1483
  }, B = () => {
1484
- n.value.forEach((i, u) => {
1484
+ r.value.forEach((i, u) => {
1485
1485
  var k, S;
1486
1486
  const h = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
1487
1487
  h[u] && ((S = (k = h[u]) == null ? void 0 : k.parentNode) == null || S.removeChild(h[u]));
@@ -1490,24 +1490,24 @@ const nt = (e, l) => {
1490
1490
  }), O(), Mo(e), f.value = !1, Ve(e, "pointer");
1491
1491
  }, X = (i) => {
1492
1492
  var h, C, k, S;
1493
- const u = n.value.findIndex((z) => z.id === i);
1493
+ const u = r.value.findIndex((z) => z.id === i);
1494
1494
  if (u !== -1) {
1495
- n.value.splice(u, 1);
1495
+ r.value.splice(u, 1);
1496
1496
  const z = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
1497
1497
  z[u] && ((C = (h = z[u]) == null ? void 0 : h.parentNode) == null || C.removeChild(z[u]));
1498
1498
  const Z = t.getFeatures();
1499
1499
  Z[u] && t.removeFeature(Z[u]);
1500
1500
  }
1501
- (S = (k = l.getProps()) == null ? void 0 : k.lineDrawEnd) == null || S.call(k, n.value);
1501
+ (S = (k = l.getProps()) == null ? void 0 : k.lineDrawEnd) == null || S.call(k, r.value);
1502
1502
  }, O = () => {
1503
- if (n.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((i) => {
1503
+ if (r.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((i) => {
1504
1504
  var u;
1505
1505
  (u = i == null ? void 0 : i.parentNode) == null || u.removeChild(i);
1506
1506
  }), t.clear(), v) {
1507
1507
  const i = e.getInteractions().getArray().find((u) => et(u) === et(v));
1508
1508
  i && e.removeInteraction(i);
1509
1509
  }
1510
- e.removeLayer(r), o != null && o.parentNode && o.parentNode.removeChild(o), p != null && p.parentNode && p.parentNode.removeChild(p);
1510
+ e.removeLayer(n), o != null && o.parentNode && o.parentNode.removeChild(o), p != null && p.parentNode && p.parentNode.removeChild(p);
1511
1511
  };
1512
1512
  return {
1513
1513
  open: b,
@@ -1532,7 +1532,7 @@ const nt = (e, l) => {
1532
1532
  }
1533
1533
  return a;
1534
1534
  }, Lo = (e, l) => {
1535
- let n, s;
1535
+ let r, s;
1536
1536
  const a = () => {
1537
1537
  o(), Ve(e, "crosshair");
1538
1538
  }, o = () => {
@@ -1554,17 +1554,17 @@ const nt = (e, l) => {
1554
1554
  y && (i.stopPropagation(), i.preventDefault());
1555
1555
  });
1556
1556
  };
1557
- let r;
1557
+ let n;
1558
1558
  const m = (O) => {
1559
1559
  if (O.dragging) return;
1560
- const D = r ? "单击继续,双击结束" : "点击选择起点";
1560
+ const D = n ? "单击继续,双击结束" : "点击选择起点";
1561
1561
  x && (x.innerHTML = D, G.setPosition(O.coordinate));
1562
1562
  };
1563
1563
  let y, P = !1;
1564
1564
  const N = () => {
1565
- if (n) {
1565
+ if (r) {
1566
1566
  x != null && x.parentNode && x.parentNode.removeChild(x);
1567
- const O = n.getGeometry();
1567
+ const O = r.getGeometry();
1568
1568
  if (!O) return;
1569
1569
  const D = v(O, "nm");
1570
1570
  w && (w.innerHTML = `
@@ -1573,7 +1573,7 @@ const nt = (e, l) => {
1573
1573
  const i = O.getCoordinates(), u = i[0][i[0].length - 2];
1574
1574
  if (F.setPosition(u), f) {
1575
1575
  const C = f.getSource();
1576
- C && n && (C.clear(), C.addFeature(n));
1576
+ C && r && (C.clear(), C.addFeature(r));
1577
1577
  }
1578
1578
  setTimeout(() => {
1579
1579
  var C;
@@ -1582,7 +1582,7 @@ const nt = (e, l) => {
1582
1582
  console.log("delete"), B(), (S = (k = l.getProps()) == null ? void 0 : k.areaDrawEnd) == null || S.call(k, []);
1583
1583
  });
1584
1584
  }, 0);
1585
- const h = Ht(n.getGeometry().getExtent());
1585
+ const h = Ht(r.getGeometry().getExtent());
1586
1586
  e == null || e.getView().setCenter(h);
1587
1587
  return;
1588
1588
  }
@@ -1613,7 +1613,7 @@ const nt = (e, l) => {
1613
1613
  })]
1614
1614
  }), e == null || e.addInteraction(y), y.on("drawstart", (O) => {
1615
1615
  var D;
1616
- r = O.feature, s = (D = r.getGeometry()) == null ? void 0 : D.on("change", (i) => {
1616
+ n = O.feature, s = (D = n.getGeometry()) == null ? void 0 : D.on("change", (i) => {
1617
1617
  const u = i.target, h = v(u, "nm"), k = u.getCoordinates()[0], S = new Pe([k[k.length - 2], k[k.length - 1]]), z = gt(S, "nm");
1618
1618
  if (P = Number(Be(S) / 1e3) > 150, !h) return;
1619
1619
  const Z = '<span class="error pl-4">超出可以绘画的距离</span>';
@@ -1639,7 +1639,7 @@ const nt = (e, l) => {
1639
1639
  }), y.on("drawend", (O) => {
1640
1640
  var h, C, k, S;
1641
1641
  if (!O.feature.getGeometry()) return;
1642
- n = O.feature, w && (w.innerHTML += '<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'), F.setOffset([10, 0]);
1642
+ r = O.feature, w && (w.innerHTML += '<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'), F.setOffset([10, 0]);
1643
1643
  const i = O.feature.getGeometry().getCoordinates(), u = i[0][i[0].length - 2];
1644
1644
  if (F.setPosition(u), x != null && x.parentNode && x.parentNode.removeChild(x), (h = l.getProps()) != null && h.areaDrawEnd) {
1645
1645
  const z = i[0].map((Z) => xe(Z, J.mercator, J.data));
@@ -1679,33 +1679,34 @@ const nt = (e, l) => {
1679
1679
  positioning: "center-left"
1680
1680
  }), e == null || e.addOverlay(G);
1681
1681
  }, B = () => {
1682
- b == null || b.clear(), n = null, p(), W(), N();
1682
+ b == null || b.clear(), r = null, p(), W(), N();
1683
1683
  };
1684
1684
  return {
1685
1685
  open: a,
1686
1686
  close: () => {
1687
- b == null || b.clear(), b = null, f && (e.removeLayer(f), f = null), r = null, y && (y.setActive(!1), (e == null ? void 0 : e.getInteractions()).forEach((D) => {
1687
+ b == null || b.clear(), b = null, f && (e.removeLayer(f), f = null), n = null, y && (y.setActive(!1), (e == null ? void 0 : e.getInteractions()).forEach((D) => {
1688
1688
  D instanceof Se && (D.setActive(!1), e == null || e.removeInteraction(D));
1689
1689
  }), y = null), s && Ge(s), x != null && x.parentElement && x.parentElement.removeChild(x), w != null && w.parentElement && w.parentElement.removeChild(w), G && e.removeOverlay(G), F && e.removeOverlay(F), Ve(e, "pointer");
1690
1690
  },
1691
1691
  reset: B
1692
1692
  };
1693
1693
  }, Eo = "zh-map-port-layer", To = (e) => {
1694
- const l = e.getInstall();
1695
- let n, s, a = null, o = null;
1694
+ const l = e.getInstall(), r = new ae(), s = new ve({
1695
+ className: Eo,
1696
+ source: r,
1697
+ zIndex: 100
1698
+ });
1699
+ l == null || l.addLayer(s);
1700
+ let a = null, o = null;
1696
1701
  const f = (v, w = !0) => {
1697
1702
  if (!(!v || v.length === 0)) {
1698
- if (s || (s = new ae()), s.clear(), o) {
1703
+ if (r.clear(), o) {
1699
1704
  const F = v.find((p) => p.id === o.id);
1700
1705
  F ? o = F : v.push(o);
1701
1706
  }
1702
1707
  v.forEach((F) => {
1703
1708
  b(F, w);
1704
- }), n || (n = new ve({
1705
- className: Eo,
1706
- source: s,
1707
- zIndex: 100
1708
- }), l.addLayer(n));
1709
+ });
1709
1710
  }
1710
1711
  }, b = (v, w = !0) => {
1711
1712
  const F = e.getZoom(), [p, x] = v.latLon.split(","), G = new se({
@@ -1714,7 +1715,7 @@ const nt = (e, l) => {
1714
1715
  select: v.id === (o == null ? void 0 : o.id),
1715
1716
  showTitle: v.id === (o == null ? void 0 : o.id) || w
1716
1717
  });
1717
- G.setStyle(t(G, F)), s.addFeature(G);
1718
+ G.setStyle(t(G, F)), r.addFeature(G);
1718
1719
  }, t = (v, w) => {
1719
1720
  const F = (B) => `<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
1720
1721
  <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="${B}"/>
@@ -1752,18 +1753,18 @@ const nt = (e, l) => {
1752
1753
  }),
1753
1754
  zIndex: x ? 110 : 100
1754
1755
  }));
1755
- }, r = () => {
1756
- if (s)
1756
+ }, n = () => {
1757
+ if (r)
1757
1758
  if (a) {
1758
1759
  console.log("清除非选中的港口");
1759
1760
  const v = a.get("portData").id;
1760
- s.getFeatures().forEach((w) => {
1761
- w.get("portData").id !== v && s.removeFeature(w);
1761
+ r.getFeatures().forEach((w) => {
1762
+ w.get("portData").id !== v && r.removeFeature(w);
1762
1763
  });
1763
1764
  } else
1764
- console.log("清除所有港口", s), s == null || s.clear();
1765
+ console.log("清除所有港口", r), r == null || r.clear();
1765
1766
  }, m = (v) => {
1766
- if (s) {
1767
+ if (r) {
1767
1768
  if (!v)
1768
1769
  return y();
1769
1770
  (a == null ? void 0 : a.get("portData").id) !== v.id && (y(), P(v));
@@ -1771,42 +1772,42 @@ const nt = (e, l) => {
1771
1772
  }, y = () => {
1772
1773
  if (a) {
1773
1774
  const v = a == null ? void 0 : a.get("portData"), w = e.getZoom();
1774
- s.getFeatures().forEach((p) => {
1775
+ r.getFeatures().forEach((p) => {
1775
1776
  p.get("portData").id === v.id && (p.setStyle(t(p, w)), p.set("select", !1), a = null);
1776
1777
  });
1777
1778
  }
1778
1779
  }, P = (v) => {
1779
- if (!s) return;
1780
- const w = s.getFeatures();
1780
+ if (!r) return;
1781
+ const w = r.getFeatures();
1781
1782
  o = v, a = w.find((F) => F.get("portData").id === v.id), a && (a.set("select", !0), a.setStyle(t(a, e.getZoom())));
1782
1783
  };
1783
1784
  return {
1784
1785
  render: f,
1785
- clear: r,
1786
+ clear: n,
1786
1787
  selected: m,
1787
1788
  handlePortHover: (v) => {
1788
1789
  const w = l == null ? void 0 : l.getTargetElement();
1789
1790
  v && v.get("portData") && w && (w.style.cursor = "pointer");
1790
1791
  }
1791
1792
  };
1792
- }, Fo = (e, l, n, s, a, o) => {
1793
+ }, Fo = (e, l, r, s, a, o) => {
1793
1794
  const f = e.getInstall();
1794
1795
  f.on("moveend", () => {
1795
1796
  var b, t;
1796
1797
  try {
1797
- const r = e.getZoom();
1798
- (t = (b = l.getProps()).mapMoveEnd) == null || t.call(b, r), n.reRenderTrackLine(), r <= ee.shipModelMax && r >= ee.shipTriggleMin && s.changeShipScale("end");
1799
- } catch (r) {
1800
- console.log("moveend---catch", r);
1798
+ const n = e.getZoom();
1799
+ (t = (b = l.getProps()).mapMoveEnd) == null || t.call(b, n), r.reRenderTrackLine(), n <= ee.shipModelMax && n >= ee.shipTriggleMin && s.changeShipScale("end");
1800
+ } catch (n) {
1801
+ console.log("moveend---catch", n);
1801
1802
  }
1802
1803
  }), f.on("pointermove", (b) => {
1803
1804
  try {
1804
1805
  const t = f == null ? void 0 : f.getEventPixel(b.originalEvent);
1805
1806
  if (!t || !f) return;
1806
- const r = f == null ? void 0 : f.forEachFeatureAtPixel(t, (m) => m, {
1807
+ const n = f == null ? void 0 : f.forEachFeatureAtPixel(t, (m) => m, {
1807
1808
  layerFilter: (m) => m.getVisible()
1808
1809
  });
1809
- s == null || s.handleShipMapEvent(r, "hover"), n == null || n.handleTrackMapEvent(r, "hover", b), r && (a == null || a.handlePortHover(r));
1810
+ s == null || s.handleShipMapEvent(n, "hover"), r == null || r.handleTrackMapEvent(n, "hover", b), n && (a == null || a.handlePortHover(n));
1810
1811
  } catch (t) {
1811
1812
  console.log("pointermove---catch", t);
1812
1813
  }
@@ -1818,7 +1819,7 @@ const nt = (e, l) => {
1818
1819
  console.log("movestart---catch", b);
1819
1820
  }
1820
1821
  }), f.on("click", qe((b) => {
1821
- var t, r, m;
1822
+ var t, n, m;
1822
1823
  try {
1823
1824
  if (console.log("1", o.getState()), o.getState()) return;
1824
1825
  const y = f.getEventPixel(b.originalEvent), P = f.forEachFeatureAtPixel(
@@ -1833,7 +1834,7 @@ const nt = (e, l) => {
1833
1834
  s.handleShipMapEvent(P, "click", (t = l.getProps()) == null ? void 0 : t.selectShip);
1834
1835
  else if (P.get("portData")) {
1835
1836
  const N = P.get("portData");
1836
- a.selected(N), (m = (r = l.getProps()) == null ? void 0 : r.selectPort) == null || m.call(r, N);
1837
+ a.selected(N), (m = (n = l.getProps()) == null ? void 0 : n.selectPort) == null || m.call(n, N);
1837
1838
  }
1838
1839
  b.preventDefault(), b.stopPropagation();
1839
1840
  } catch (y) {
@@ -1848,8 +1849,8 @@ const nt = (e, l) => {
1848
1849
  o.initMap(s, a);
1849
1850
  const f = o.getInstall(), b = xo(f), t = bo();
1850
1851
  t.setProps(a), b.setShowLayerType(a.layerType), b.setGreenTileVisible(a.showGreenLayer);
1851
- const r = io(f), m = so(f, r), y = wo(f), P = ko(f), N = Co(f, t), v = Lo(f, t), w = To(o);
1852
- Fo(o, t, r, y, w, N);
1852
+ const n = io(f), m = so(f, n), y = wo(f), P = ko(f), N = Co(f, t), v = Lo(f, t), w = To(o);
1853
+ Fo(o, t, n, y, w, N);
1853
1854
  const F = () => {
1854
1855
  const x = f.getView().calculateExtent(o.getSize()), G = xe([x[0], x[1]], J.mercator, J.data), W = xe([x[2], x[3]], J.mercator, J.data);
1855
1856
  return [G[0], G[1], W[0], W[1]];
@@ -1864,7 +1865,7 @@ const nt = (e, l) => {
1864
1865
  ...o,
1865
1866
  layer: b,
1866
1867
  ship: y,
1867
- track: r,
1868
+ track: n,
1868
1869
  carTrack: m,
1869
1870
  port: {
1870
1871
  render: w.render,
@@ -1913,24 +1914,24 @@ const nt = (e, l) => {
1913
1914
  } }
1914
1915
  },
1915
1916
  setup(e, { expose: l }) {
1916
- const n = U(), s = U(), a = Po(), o = U(), f = e, b = U({
1917
+ const r = U(), s = U(), a = Po(), o = U(), f = e, b = U({
1917
1918
  getInstall() {
1918
1919
  }
1919
1920
  });
1920
1921
  return $t(() => {
1921
1922
  var t;
1922
- o.value = a.createInstance(n.value, f), b.value = o.value.methods, (t = s.value) == null || t.setScaleLine(o.value.map, f.scaleLineUnit);
1923
+ o.value = a.createInstance(r.value, f), b.value = o.value.methods, (t = s.value) == null || t.setScaleLine(o.value.map, f.scaleLineUnit);
1923
1924
  }), Vt(() => {
1924
- var t, r;
1925
- a.destroyInstance((t = o == null ? void 0 : o.value) == null ? void 0 : t.id), (r = o.value) == null || r.destroy();
1925
+ var t, n;
1926
+ a.destroyInstance((t = o == null ? void 0 : o.value) == null ? void 0 : t.id), (n = o.value) == null || n.destroy();
1926
1927
  }), l({
1927
1928
  getZoom: () => {
1928
1929
  var t;
1929
1930
  return (t = o.value) == null ? void 0 : t.methods.getZoom();
1930
1931
  },
1931
1932
  setZoom: (t) => {
1932
- var r;
1933
- return (r = o.value) == null ? void 0 : r.methods.setZoom(t);
1933
+ var n;
1934
+ return (n = o.value) == null ? void 0 : n.methods.setZoom(t);
1934
1935
  },
1935
1936
  getInstall: () => {
1936
1937
  var t;
@@ -1940,22 +1941,22 @@ const nt = (e, l) => {
1940
1941
  var t;
1941
1942
  return (t = o.value) == null ? void 0 : t.methods.getView();
1942
1943
  },
1943
- setCenter: (t, r) => {
1944
+ setCenter: (t, n) => {
1944
1945
  var m;
1945
- return (m = o.value) == null ? void 0 : m.methods.setCenter(t, r);
1946
+ return (m = o.value) == null ? void 0 : m.methods.setCenter(t, n);
1946
1947
  },
1947
1948
  getSize: () => {
1948
1949
  var t;
1949
1950
  return (t = o.value) == null ? void 0 : t.methods.getSize();
1950
1951
  },
1951
- getCenter: (t, r) => {
1952
+ getCenter: (t, n) => {
1952
1953
  var m;
1953
1954
  return (m = o.value) == null ? void 0 : m.methods.getCenter();
1954
1955
  },
1955
1956
  layer: {
1956
1957
  setGreenTileVisible: (t) => {
1957
- var r;
1958
- return (r = o.value) == null ? void 0 : r.methods.layer.setGreenTileVisible(t);
1958
+ var n;
1959
+ return (n = o.value) == null ? void 0 : n.methods.layer.setGreenTileVisible(t);
1959
1960
  },
1960
1961
  getGreenTileVisible: () => {
1961
1962
  var t;
@@ -1966,26 +1967,26 @@ const nt = (e, l) => {
1966
1967
  return (t = o.value) == null ? void 0 : t.methods.layer.getShowLayerType();
1967
1968
  },
1968
1969
  setShowLayerType: (t) => {
1969
- var r;
1970
- return (r = o.value) == null ? void 0 : r.methods.layer.setShowLayerType(t);
1970
+ var n;
1971
+ return (n = o.value) == null ? void 0 : n.methods.layer.setShowLayerType(t);
1971
1972
  }
1972
1973
  },
1973
1974
  ship: {
1974
1975
  render: (...t) => {
1975
- var r;
1976
- return (r = o.value) == null ? void 0 : r.methods.ship.render(...t);
1976
+ var n;
1977
+ return (n = o.value) == null ? void 0 : n.methods.ship.render(...t);
1977
1978
  },
1978
1979
  selected: (...t) => {
1979
- var r;
1980
- return (r = o.value) == null ? void 0 : r.methods.ship.selected(...t);
1980
+ var n;
1981
+ return (n = o.value) == null ? void 0 : n.methods.ship.selected(...t);
1981
1982
  },
1982
1983
  filter: (...t) => {
1983
- var r;
1984
- return (r = o.value) == null ? void 0 : r.methods.ship.filter(...t);
1984
+ var n;
1985
+ return (n = o.value) == null ? void 0 : n.methods.ship.filter(...t);
1985
1986
  },
1986
1987
  blinking: (...t) => {
1987
- var r;
1988
- return (r = o.value) == null ? void 0 : r.methods.ship.blinking(...t);
1988
+ var n;
1989
+ return (n = o.value) == null ? void 0 : n.methods.ship.blinking(...t);
1989
1990
  },
1990
1991
  clear: () => {
1991
1992
  var t;
@@ -1994,82 +1995,82 @@ const nt = (e, l) => {
1994
1995
  },
1995
1996
  track: {
1996
1997
  render: (...t) => {
1997
- var r;
1998
- return (r = o.value) == null ? void 0 : r.methods.track.render(...t);
1998
+ var n;
1999
+ return (n = o.value) == null ? void 0 : n.methods.track.render(...t);
1999
2000
  },
2000
2001
  remove: (...t) => {
2001
- var r;
2002
- return (r = o.value) == null ? void 0 : r.methods.track.remove(...t);
2002
+ var n;
2003
+ return (n = o.value) == null ? void 0 : n.methods.track.remove(...t);
2003
2004
  },
2004
2005
  play: (...t) => {
2005
- var r;
2006
- return (r = o.value) == null ? void 0 : r.methods.track.play(...t);
2006
+ var n;
2007
+ return (n = o.value) == null ? void 0 : n.methods.track.play(...t);
2007
2008
  },
2008
2009
  setCenter: (...t) => {
2009
- var r;
2010
- return (r = o.value) == null ? void 0 : r.methods.track.setCenter(...t);
2010
+ var n;
2011
+ return (n = o.value) == null ? void 0 : n.methods.track.setCenter(...t);
2011
2012
  },
2012
2013
  close: (...t) => {
2013
- var r;
2014
- return (r = o.value) == null ? void 0 : r.methods.track.close(...t);
2014
+ var n;
2015
+ return (n = o.value) == null ? void 0 : n.methods.track.close(...t);
2015
2016
  },
2016
2017
  getLength: (...t) => {
2017
- var r;
2018
- return (r = o.value) == null ? void 0 : r.methods.track.getLength(...t);
2018
+ var n;
2019
+ return (n = o.value) == null ? void 0 : n.methods.track.getLength(...t);
2019
2020
  }
2020
2021
  },
2021
2022
  carTrack: {
2022
2023
  location: (...t) => {
2023
- var r;
2024
- return (r = o.value) == null ? void 0 : r.methods.carTrack.location(...t);
2024
+ var n;
2025
+ return (n = o.value) == null ? void 0 : n.methods.carTrack.location(...t);
2025
2026
  },
2026
2027
  remove: (...t) => {
2027
- var r;
2028
- return (r = o.value) == null ? void 0 : r.methods.carTrack.remove(...t);
2028
+ var n;
2029
+ return (n = o.value) == null ? void 0 : n.methods.carTrack.remove(...t);
2029
2030
  },
2030
2031
  renderTrack: (...t) => {
2031
- var r;
2032
- return (r = o.value) == null ? void 0 : r.methods.carTrack.renderTrack(...t);
2032
+ var n;
2033
+ return (n = o.value) == null ? void 0 : n.methods.carTrack.renderTrack(...t);
2033
2034
  },
2034
2035
  setCenter: (...t) => {
2035
- var r;
2036
- return (r = o.value) == null ? void 0 : r.methods.carTrack.setCenter(...t);
2036
+ var n;
2037
+ return (n = o.value) == null ? void 0 : n.methods.carTrack.setCenter(...t);
2037
2038
  },
2038
2039
  closeTrack: () => {
2039
2040
  var t;
2040
2041
  return (t = o.value) == null ? void 0 : t.methods.carTrack.closeTrack();
2041
2042
  },
2042
2043
  playTrack: (...t) => {
2043
- var r;
2044
- return (r = o.value) == null ? void 0 : r.methods.carTrack.playTrack(...t);
2044
+ var n;
2045
+ return (n = o.value) == null ? void 0 : n.methods.carTrack.playTrack(...t);
2045
2046
  }
2046
2047
  },
2047
2048
  port: {
2048
- render: (t, r) => {
2049
+ render: (t, n) => {
2049
2050
  var m;
2050
- return (m = o.value) == null ? void 0 : m.methods.port.render(t, r);
2051
+ return (m = o.value) == null ? void 0 : m.methods.port.render(t, n);
2051
2052
  },
2052
2053
  clear: () => {
2053
2054
  var t;
2054
2055
  return (t = o.value) == null ? void 0 : t.methods.port.clear();
2055
2056
  },
2056
2057
  selected: (t) => {
2057
- var r;
2058
- return (r = o.value) == null ? void 0 : r.methods.port.selected(t);
2058
+ var n;
2059
+ return (n = o.value) == null ? void 0 : n.methods.port.selected(t);
2059
2060
  }
2060
2061
  },
2061
2062
  position: {
2062
2063
  render: (...t) => {
2063
- var r;
2064
- return (r = o.value) == null ? void 0 : r.methods.position.render(...t);
2064
+ var n;
2065
+ return (n = o.value) == null ? void 0 : n.methods.position.render(...t);
2065
2066
  },
2066
2067
  selected: (...t) => {
2067
- var r;
2068
- return (r = o.value) == null ? void 0 : r.methods.position.selected(...t);
2068
+ var n;
2069
+ return (n = o.value) == null ? void 0 : n.methods.position.selected(...t);
2069
2070
  },
2070
2071
  clearSelected: (...t) => {
2071
- var r;
2072
- return (r = o.value) == null ? void 0 : r.methods.position.clearSelected(...t);
2072
+ var n;
2073
+ return (n = o.value) == null ? void 0 : n.methods.position.clearSelected(...t);
2073
2074
  },
2074
2075
  clear: () => {
2075
2076
  var t;
@@ -2086,12 +2087,12 @@ const nt = (e, l) => {
2086
2087
  return (t = o.value) == null ? void 0 : t.methods.drawLine.close();
2087
2088
  },
2088
2089
  deleteLine: (t) => {
2089
- var r;
2090
- return (r = o.value) == null ? void 0 : r.methods.drawLine.deleteLine(t);
2090
+ var n;
2091
+ return (n = o.value) == null ? void 0 : n.methods.drawLine.deleteLine(t);
2091
2092
  },
2092
2093
  setUnit: (t) => {
2093
- var r;
2094
- return (r = o.value) == null ? void 0 : r.methods.drawLine.setUnit(t);
2094
+ var n;
2095
+ return (n = o.value) == null ? void 0 : n.methods.drawLine.setUnit(t);
2095
2096
  },
2096
2097
  getState: () => {
2097
2098
  var t;
@@ -2115,23 +2116,23 @@ const nt = (e, l) => {
2115
2116
  // 子模块
2116
2117
  utils: {
2117
2118
  getCalculateExtent: (...t) => {
2118
- var r;
2119
- return (r = o.value) == null ? void 0 : r.methods.utils.getCalculateExtent(...t);
2119
+ var n;
2120
+ return (n = o.value) == null ? void 0 : n.methods.utils.getCalculateExtent(...t);
2120
2121
  },
2121
2122
  convertSixHundredThousandToLatLng: (...t) => {
2122
- var r;
2123
- return (r = o.value) == null ? void 0 : r.methods.utils.convertSixHundredThousandToLatLng(...t);
2123
+ var n;
2124
+ return (n = o.value) == null ? void 0 : n.methods.utils.convertSixHundredThousandToLatLng(...t);
2124
2125
  },
2125
- calculateCirclePoints: (t, r) => {
2126
+ calculateCirclePoints: (t, n) => {
2126
2127
  var m;
2127
- return (m = o.value) == null ? void 0 : m.methods.utils.calculateCirclePoints(t, r);
2128
+ return (m = o.value) == null ? void 0 : m.methods.utils.calculateCirclePoints(t, n);
2128
2129
  }
2129
2130
  }
2130
- }), (t, r) => (We(), Ye("div", So, [
2131
+ }), (t, n) => (We(), Ye("div", So, [
2131
2132
  Ze("div", {
2132
2133
  id: "map",
2133
2134
  ref_key: "zhMapRef",
2134
- ref: n,
2135
+ ref: r,
2135
2136
  class: "zh-map"
2136
2137
  }, null, 512),
2137
2138
  De(Kt, {
package/dist/es/index.js CHANGED
@@ -17,7 +17,7 @@ import { Z as B } from "./BaseInfo-BhnEjLKF.js";
17
17
  import { Z as g } from "./DetailHeader-DaabNj_4.js";
18
18
  import { Z as x } from "./DiyDataTable-D-UZVciZ.js";
19
19
  import { D as V } from "./DiyDataTable-D-UZVciZ.js";
20
- import { Z as G } from "./Map-DspfFYsn.js";
20
+ import { Z as G } from "./Map-Ta-l8rxN.js";
21
21
  import { Z as M } from "./Table-B_3YA1mb.js";
22
22
  import { Z as $ } from "./BaseItem-C4NJy1i4.js";
23
23
  const A = [
@@ -220,7 +220,7 @@ he.version="2.30.1",UB(Tt),he.fn=le,he.min=LV,he.max=AV,he.now=FV,he.utc=mi,he.u
220
220
  <div>
221
221
  <span class="text">单击继续,双击结束</span>
222
222
  </div>
223
- `)})}),f.on("drawend",v=>{var M,O,N,B;if(!v.feature.getGeometry())return;n=v.feature,m&&(m.innerHTML+='<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'),y.setOffset([10,0]);const x=v.feature.getGeometry().getCoordinates(),T=x[0][x[0].length-2];if(y.setPosition(T),w!=null&&w.parentNode&&w.parentNode.removeChild(w),(M=e.getProps())!=null&&M.areaDrawEnd){const I=x[0].map(D=>eo(D,Yn.mercator,Yn.data));(N=(O=e.getProps())==null?void 0:O.areaDrawEnd)==null||N.call(O,I)}f&&(f.setActive(!1),t==null||t.removeInteraction(f),(t==null?void 0:t.getInteractions()).forEach(D=>{D instanceof vf&&(D.setActive(!1),t==null||t.removeInteraction(D))})),r&&Cu(r),(B=document.querySelector(".delete-icon"))==null||B.addEventListener("click",()=>{var I,D;C(),(D=(I=e.getProps())==null?void 0:I.areaDrawEnd)==null||D.call(I,[])})})},h=(v,k)=>{const x=wE(v);switch(k){case"km":return x>1e4?Math.round(x/1e6*100)/100+" km<sup>2</sup>":Math.round(x*100)/100+" m<sup>2</sup>";case"nm":return x>1e4?Math.round(x/1e6/Math.pow(1.852,2)*100)/100+" nm<sup>2</sup>":Math.round(x*100)/100+" m<sup>2</sup>"}};let m,y;const _=()=>{m!=null&&m.parentNode&&m.parentNode.removeChild(m),m=document.createElement("div"),m.style.display="flex",m.className="ol-tooltip ol-tooltip-draw-polygon",y=new mo({element:m,offset:[0,-15],positioning:"bottom-center",stopEvent:!1,insertFirst:!1}),t==null||t.addOverlay(y)};let w,E;const b=()=>{w!=null&&w.parentNode&&w.parentNode.removeChild(w),w=document.createElement("div"),w.className="ol-tooltip ol-help-tooltip",E=new mo({element:w,offset:[15,0],positioning:"center-left"}),t==null||t.addOverlay(E)},C=()=>{l==null||l.clear(),n=null,_(),b(),g()};return{open:o,close:()=>{l==null||l.clear(),l=null,a&&(t.removeLayer(a),a=null),d=null,f&&(f.setActive(!1),(t==null?void 0:t.getInteractions()).forEach(k=>{k instanceof vf&&(k.setActive(!1),t==null||t.removeInteraction(k))}),f=null),r&&Cu(r),w!=null&&w.parentElement&&w.parentElement.removeChild(w),m!=null&&m.parentElement&&m.parentElement.removeChild(m),E&&t.removeOverlay(E),y&&t.removeOverlay(y),xf(t,"pointer")},reset:C}},z7="zh-map-port-layer",Y7=t=>{const e=t.getInstall();let n,r,o=null,s=null;const a=(h,m=!0)=>{if(!(!h||h.length===0)){if(r||(r=new ho),r.clear(),s){const y=h.find(_=>_.id===s.id);y?s=y:h.push(s)}h.forEach(y=>{l(y,m)}),n||(n=new Go({className:z7,source:r,zIndex:100}),e.addLayer(n))}},l=(h,m=!0)=>{const y=t.getZoom(),[_,w]=h.latLon.split(","),E=new sn({geometry:new an(rr([Number(_),Number(w)])),portData:h,select:h.id===(s==null?void 0:s.id),showTitle:h.id===(s==null?void 0:s.id)||m});E.setStyle(c(E,y)),r.addFeature(E)},c=(h,m)=>{const y=C=>`<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
223
+ `)})}),f.on("drawend",v=>{var M,O,N,B;if(!v.feature.getGeometry())return;n=v.feature,m&&(m.innerHTML+='<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'),y.setOffset([10,0]);const x=v.feature.getGeometry().getCoordinates(),T=x[0][x[0].length-2];if(y.setPosition(T),w!=null&&w.parentNode&&w.parentNode.removeChild(w),(M=e.getProps())!=null&&M.areaDrawEnd){const I=x[0].map(D=>eo(D,Yn.mercator,Yn.data));(N=(O=e.getProps())==null?void 0:O.areaDrawEnd)==null||N.call(O,I)}f&&(f.setActive(!1),t==null||t.removeInteraction(f),(t==null?void 0:t.getInteractions()).forEach(D=>{D instanceof vf&&(D.setActive(!1),t==null||t.removeInteraction(D))})),r&&Cu(r),(B=document.querySelector(".delete-icon"))==null||B.addEventListener("click",()=>{var I,D;C(),(D=(I=e.getProps())==null?void 0:I.areaDrawEnd)==null||D.call(I,[])})})},h=(v,k)=>{const x=wE(v);switch(k){case"km":return x>1e4?Math.round(x/1e6*100)/100+" km<sup>2</sup>":Math.round(x*100)/100+" m<sup>2</sup>";case"nm":return x>1e4?Math.round(x/1e6/Math.pow(1.852,2)*100)/100+" nm<sup>2</sup>":Math.round(x*100)/100+" m<sup>2</sup>"}};let m,y;const _=()=>{m!=null&&m.parentNode&&m.parentNode.removeChild(m),m=document.createElement("div"),m.style.display="flex",m.className="ol-tooltip ol-tooltip-draw-polygon",y=new mo({element:m,offset:[0,-15],positioning:"bottom-center",stopEvent:!1,insertFirst:!1}),t==null||t.addOverlay(y)};let w,E;const b=()=>{w!=null&&w.parentNode&&w.parentNode.removeChild(w),w=document.createElement("div"),w.className="ol-tooltip ol-help-tooltip",E=new mo({element:w,offset:[15,0],positioning:"center-left"}),t==null||t.addOverlay(E)},C=()=>{l==null||l.clear(),n=null,_(),b(),g()};return{open:o,close:()=>{l==null||l.clear(),l=null,a&&(t.removeLayer(a),a=null),d=null,f&&(f.setActive(!1),(t==null?void 0:t.getInteractions()).forEach(k=>{k instanceof vf&&(k.setActive(!1),t==null||t.removeInteraction(k))}),f=null),r&&Cu(r),w!=null&&w.parentElement&&w.parentElement.removeChild(w),m!=null&&m.parentElement&&m.parentElement.removeChild(m),E&&t.removeOverlay(E),y&&t.removeOverlay(y),xf(t,"pointer")},reset:C}},z7="zh-map-port-layer",Y7=t=>{const e=t.getInstall(),n=new ho,r=new Go({className:z7,source:n,zIndex:100});e==null||e.addLayer(r);let o=null,s=null;const a=(h,m=!0)=>{if(!(!h||h.length===0)){if(n.clear(),s){const y=h.find(_=>_.id===s.id);y?s=y:h.push(s)}h.forEach(y=>{l(y,m)})}},l=(h,m=!0)=>{const y=t.getZoom(),[_,w]=h.latLon.split(","),E=new sn({geometry:new an(rr([Number(_),Number(w)])),portData:h,select:h.id===(s==null?void 0:s.id),showTitle:h.id===(s==null?void 0:s.id)||m});E.setStyle(c(E,y)),n.addFeature(E)},c=(h,m)=>{const y=C=>`<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
224
224
  <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="${C}"/>
225
225
  <g clip-path="url(#clip0_10059_122082)">
226
226
  <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"/>
@@ -231,7 +231,7 @@ he.version="2.30.1",UB(Tt),he.fn=le,he.min=LV,he.max=AV,he.now=FV,he.utc=mi,he.u
231
231
  </clipPath>
232
232
  </defs>
233
233
  </svg>
234
- `,_=()=>`data:image/svg+xml;utf8,${encodeURIComponent(y(w?"#FF5733":"#3370FF"))}`,w=h.get("select"),E=h.get("showTitle"),b=h.get("portData");return!E&&!w?new Ct({image:new ao({src:_(),scale:.5*m/10}),zIndex:w?110:100}):(console.log("showTitle",b.shortName,w),new Ct({text:new xi({text:b.shortName,font:"12px sans-serif",fill:new zt({color:w?"#ffffff":"#000000"}),backgroundFill:new zt({color:w?"#FF5733":"#FFFFFF"}),offsetY:30}),image:new ao({src:_(),scale:.5*m/10}),zIndex:w?110:100}))},d=()=>{if(r)if(o){console.log("清除非选中的港口");const h=o.get("portData").id;r.getFeatures().forEach(m=>{m.get("portData").id!==h&&r.removeFeature(m)})}else console.log("清除所有港口",r),r==null||r.clear()},u=h=>{if(r){if(!h)return f();(o==null?void 0:o.get("portData").id)!==h.id&&(f(),p(h))}},f=()=>{if(o){const h=o==null?void 0:o.get("portData"),m=t.getZoom();r.getFeatures().forEach(_=>{_.get("portData").id===h.id&&(_.setStyle(c(_,m)),_.set("select",!1),o=null)})}},p=h=>{if(!r)return;const m=r.getFeatures();s=h,o=m.find(y=>y.get("portData").id===h.id),o&&(o.set("select",!0),o.setStyle(c(o,t.getZoom())))};return{render:a,clear:d,selected:u,handlePortHover:h=>{const m=e==null?void 0:e.getTargetElement();h&&h.get("portData")&&m&&(m.style.cursor="pointer")}}},W7=(t,e,n,r,o,s)=>{const a=t.getInstall();a.on("moveend",()=>{var l,c;try{const d=t.getZoom();(c=(l=e.getProps()).mapMoveEnd)==null||c.call(l,d),n.reRenderTrackLine(),d<=Mr.shipModelMax&&d>=Mr.shipTriggleMin&&r.changeShipScale("end")}catch(d){console.log("moveend---catch",d)}}),a.on("pointermove",l=>{try{const c=a==null?void 0:a.getEventPixel(l.originalEvent);if(!c||!a)return;const d=a==null?void 0:a.forEachFeatureAtPixel(c,u=>u,{layerFilter:u=>u.getVisible()});r==null||r.handleShipMapEvent(d,"hover"),n==null||n.handleTrackMapEvent(d,"hover",l),d&&(o==null||o.handlePortHover(d))}catch(c){console.log("pointermove---catch",c)}}),a.on("movestart",()=>{try{const l=a==null?void 0:a.getView().getZoom();l&&l<=Mr.shipModelMax&&l>=Mr.shipTriggleMin&&r.changeShipScale("start")}catch(l){console.log("movestart---catch",l)}}),a.on("click",li(l=>{var c,d,u;try{if(console.log("1",s.getState()),s.getState())return;const f=a.getEventPixel(l.originalEvent),p=a.forEachFeatureAtPixel(f,g=>{if(g!=null&&g.get("shipData")||g!=null&&g.get("portData"))return g});if(console.log("2",p),!p)return;if(p.get("shipData"))r.handleShipMapEvent(p,"click",(c=e.getProps())==null?void 0:c.selectShip);else if(p.get("portData")){const g=p.get("portData");o.selected(g),(u=(d=e.getProps())==null?void 0:d.selectPort)==null||u.call(d,g)}l.preventDefault(),l.stopPropagation()}catch(f){console.log("click---catch",f)}},150))},G7=()=>{const t=i.reactive([]);return{createInstance:(r,o)=>{const s=e7();s.initMap(r,o);const a=s.getInstall(),l=D7(a),c=I7();c.setProps(o),l.setShowLayerType(o.layerType),l.setGreenTileVisible(o.showGreenLayer);const d=y7(a),u=o7(a,d),f=R7(a),p=P7(a),g=V7(a,c),h=$7(a,c),m=Y7(s);W7(s,c,d,f,m,g);const y=()=>{const w=a.getView().calculateExtent(s.getSize()),E=eo([w[0],w[1]],Yn.mercator,Yn.data),b=eo([w[2],w[3]],Yn.mercator,Yn.data);return[E[0],E[1],b[0],b[1]]},_={id:Symbol("map-instance"),innerMap:null,map:s.getInstall(),destroy:()=>{t.splice(t.indexOf(_),1)},methods:{...s,layer:l,ship:f,track:d,carTrack:u,port:{render:m.render,clear:m.clear,selected:m.selected},position:p,drawLine:g,drawPolygon:h,utils:{getCalculateExtent:y,convertSixHundredThousandToLatLng:_0,calculateCirclePoints:t7}}};return t.push(_),_},destroyInstance:r=>{const o=t.findIndex(s=>s.id===r);o>-1&&(t[o].destroy(),t.splice(o,1))},destroyAll:()=>{t.forEach(r=>r.destroy()),t.splice(0,t.length)},getAllInstances:()=>[...t]}},j7={class:"zh-map-box"},H7=i.defineComponent({__name:"Map",props:{zoom:{default:Mr.default},center:{default:NG},layerType:{default:"vector"},showGreenLayer:{type:Boolean,default:!1},showScale:{type:Boolean,default:!0},scaleLineUnit:{default:"metric"},mapMoveEnd:{type:Function,default:()=>{}},lineDrawEnd:{},areaDrawEnd:{type:Function,default:()=>{}},selectShip:{type:Function,default:()=>{}},selectPort:{type:Function,default:()=>{}}},setup(t,{expose:e}){const n=i.ref(),r=i.ref(),o=G7(),s=i.ref(),a=t,l=i.ref({getInstall(){}});return i.onMounted(()=>{var c;s.value=o.createInstance(n.value,a),l.value=s.value.methods,(c=r.value)==null||c.setScaleLine(s.value.map,a.scaleLineUnit)}),i.onUnmounted(()=>{var c,d;o.destroyInstance((c=s==null?void 0:s.value)==null?void 0:c.id),(d=s.value)==null||d.destroy()}),e({getZoom:()=>{var c;return(c=s.value)==null?void 0:c.methods.getZoom()},setZoom:c=>{var d;return(d=s.value)==null?void 0:d.methods.setZoom(c)},getInstall:()=>{var c;return(c=s.value)==null?void 0:c.methods.getInstall()},getView:()=>{var c;return(c=s.value)==null?void 0:c.methods.getView()},setCenter:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.setCenter(c,d)},getSize:()=>{var c;return(c=s.value)==null?void 0:c.methods.getSize()},getCenter:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.getCenter()},layer:{setGreenTileVisible:c=>{var d;return(d=s.value)==null?void 0:d.methods.layer.setGreenTileVisible(c)},getGreenTileVisible:()=>{var c;return(c=s.value)==null?void 0:c.methods.layer.getGreenTileVisible()},getShowLayerType:()=>{var c;return(c=s.value)==null?void 0:c.methods.layer.getShowLayerType()},setShowLayerType:c=>{var d;return(d=s.value)==null?void 0:d.methods.layer.setShowLayerType(c)}},ship:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.render(...c)},selected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.selected(...c)},filter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.filter(...c)},blinking:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.blinking(...c)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.ship.clear()}},track:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.render(...c)},remove:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.remove(...c)},play:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.play(...c)},setCenter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.setCenter(...c)},close:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.close(...c)},getLength:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.getLength(...c)}},carTrack:{location:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.location(...c)},remove:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.remove(...c)},renderTrack:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.renderTrack(...c)},setCenter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.setCenter(...c)},closeTrack:()=>{var c;return(c=s.value)==null?void 0:c.methods.carTrack.closeTrack()},playTrack:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.playTrack(...c)}},port:{render:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.port.render(c,d)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.port.clear()},selected:c=>{var d;return(d=s.value)==null?void 0:d.methods.port.selected(c)}},position:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.render(...c)},selected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.selected(...c)},clearSelected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.clearSelected(...c)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.position.clear()}},drawLine:{open:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.open()},close:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.close()},deleteLine:c=>{var d;return(d=s.value)==null?void 0:d.methods.drawLine.deleteLine(c)},setUnit:c=>{var d;return(d=s.value)==null?void 0:d.methods.drawLine.setUnit(c)},getState:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.getState()}},drawPolygon:{open:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.open()},close:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.close()},reset:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.reset()}},utils:{getCalculateExtent:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.utils.getCalculateExtent(...c)},convertSixHundredThousandToLatLng:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.utils.convertSixHundredThousandToLatLng(...c)},calculateCirclePoints:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.utils.calculateCirclePoints(c,d)}}}),(c,d)=>(i.openBlock(),i.createElementBlock("div",j7,[i.createElementVNode("div",{id:"map",ref_key:"zhMapRef",ref:n,class:"zh-map"},null,512),i.createVNode(lG,{ref_key:"scaleLineRef",ref:r},null,512),i.createVNode(dG,{ref:"zoomControlRef","map-instance":s.value},null,8,["map-instance"])]))}}),W2=Rt(Ft(H7,[["__scopeId","data-v-5724a05d"]]));var U7={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};/**!
234
+ `,_=()=>`data:image/svg+xml;utf8,${encodeURIComponent(y(w?"#FF5733":"#3370FF"))}`,w=h.get("select"),E=h.get("showTitle"),b=h.get("portData");return!E&&!w?new Ct({image:new ao({src:_(),scale:.5*m/10}),zIndex:w?110:100}):(console.log("showTitle",b.shortName,w),new Ct({text:new xi({text:b.shortName,font:"12px sans-serif",fill:new zt({color:w?"#ffffff":"#000000"}),backgroundFill:new zt({color:w?"#FF5733":"#FFFFFF"}),offsetY:30}),image:new ao({src:_(),scale:.5*m/10}),zIndex:w?110:100}))},d=()=>{if(n)if(o){console.log("清除非选中的港口");const h=o.get("portData").id;n.getFeatures().forEach(m=>{m.get("portData").id!==h&&n.removeFeature(m)})}else console.log("清除所有港口",n),n==null||n.clear()},u=h=>{if(n){if(!h)return f();(o==null?void 0:o.get("portData").id)!==h.id&&(f(),p(h))}},f=()=>{if(o){const h=o==null?void 0:o.get("portData"),m=t.getZoom();n.getFeatures().forEach(_=>{_.get("portData").id===h.id&&(_.setStyle(c(_,m)),_.set("select",!1),o=null)})}},p=h=>{if(!n)return;const m=n.getFeatures();s=h,o=m.find(y=>y.get("portData").id===h.id),o&&(o.set("select",!0),o.setStyle(c(o,t.getZoom())))};return{render:a,clear:d,selected:u,handlePortHover:h=>{const m=e==null?void 0:e.getTargetElement();h&&h.get("portData")&&m&&(m.style.cursor="pointer")}}},W7=(t,e,n,r,o,s)=>{const a=t.getInstall();a.on("moveend",()=>{var l,c;try{const d=t.getZoom();(c=(l=e.getProps()).mapMoveEnd)==null||c.call(l,d),n.reRenderTrackLine(),d<=Mr.shipModelMax&&d>=Mr.shipTriggleMin&&r.changeShipScale("end")}catch(d){console.log("moveend---catch",d)}}),a.on("pointermove",l=>{try{const c=a==null?void 0:a.getEventPixel(l.originalEvent);if(!c||!a)return;const d=a==null?void 0:a.forEachFeatureAtPixel(c,u=>u,{layerFilter:u=>u.getVisible()});r==null||r.handleShipMapEvent(d,"hover"),n==null||n.handleTrackMapEvent(d,"hover",l),d&&(o==null||o.handlePortHover(d))}catch(c){console.log("pointermove---catch",c)}}),a.on("movestart",()=>{try{const l=a==null?void 0:a.getView().getZoom();l&&l<=Mr.shipModelMax&&l>=Mr.shipTriggleMin&&r.changeShipScale("start")}catch(l){console.log("movestart---catch",l)}}),a.on("click",li(l=>{var c,d,u;try{if(console.log("1",s.getState()),s.getState())return;const f=a.getEventPixel(l.originalEvent),p=a.forEachFeatureAtPixel(f,g=>{if(g!=null&&g.get("shipData")||g!=null&&g.get("portData"))return g});if(console.log("2",p),!p)return;if(p.get("shipData"))r.handleShipMapEvent(p,"click",(c=e.getProps())==null?void 0:c.selectShip);else if(p.get("portData")){const g=p.get("portData");o.selected(g),(u=(d=e.getProps())==null?void 0:d.selectPort)==null||u.call(d,g)}l.preventDefault(),l.stopPropagation()}catch(f){console.log("click---catch",f)}},150))},G7=()=>{const t=i.reactive([]);return{createInstance:(r,o)=>{const s=e7();s.initMap(r,o);const a=s.getInstall(),l=D7(a),c=I7();c.setProps(o),l.setShowLayerType(o.layerType),l.setGreenTileVisible(o.showGreenLayer);const d=y7(a),u=o7(a,d),f=R7(a),p=P7(a),g=V7(a,c),h=$7(a,c),m=Y7(s);W7(s,c,d,f,m,g);const y=()=>{const w=a.getView().calculateExtent(s.getSize()),E=eo([w[0],w[1]],Yn.mercator,Yn.data),b=eo([w[2],w[3]],Yn.mercator,Yn.data);return[E[0],E[1],b[0],b[1]]},_={id:Symbol("map-instance"),innerMap:null,map:s.getInstall(),destroy:()=>{t.splice(t.indexOf(_),1)},methods:{...s,layer:l,ship:f,track:d,carTrack:u,port:{render:m.render,clear:m.clear,selected:m.selected},position:p,drawLine:g,drawPolygon:h,utils:{getCalculateExtent:y,convertSixHundredThousandToLatLng:_0,calculateCirclePoints:t7}}};return t.push(_),_},destroyInstance:r=>{const o=t.findIndex(s=>s.id===r);o>-1&&(t[o].destroy(),t.splice(o,1))},destroyAll:()=>{t.forEach(r=>r.destroy()),t.splice(0,t.length)},getAllInstances:()=>[...t]}},j7={class:"zh-map-box"},H7=i.defineComponent({__name:"Map",props:{zoom:{default:Mr.default},center:{default:NG},layerType:{default:"vector"},showGreenLayer:{type:Boolean,default:!1},showScale:{type:Boolean,default:!0},scaleLineUnit:{default:"metric"},mapMoveEnd:{type:Function,default:()=>{}},lineDrawEnd:{},areaDrawEnd:{type:Function,default:()=>{}},selectShip:{type:Function,default:()=>{}},selectPort:{type:Function,default:()=>{}}},setup(t,{expose:e}){const n=i.ref(),r=i.ref(),o=G7(),s=i.ref(),a=t,l=i.ref({getInstall(){}});return i.onMounted(()=>{var c;s.value=o.createInstance(n.value,a),l.value=s.value.methods,(c=r.value)==null||c.setScaleLine(s.value.map,a.scaleLineUnit)}),i.onUnmounted(()=>{var c,d;o.destroyInstance((c=s==null?void 0:s.value)==null?void 0:c.id),(d=s.value)==null||d.destroy()}),e({getZoom:()=>{var c;return(c=s.value)==null?void 0:c.methods.getZoom()},setZoom:c=>{var d;return(d=s.value)==null?void 0:d.methods.setZoom(c)},getInstall:()=>{var c;return(c=s.value)==null?void 0:c.methods.getInstall()},getView:()=>{var c;return(c=s.value)==null?void 0:c.methods.getView()},setCenter:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.setCenter(c,d)},getSize:()=>{var c;return(c=s.value)==null?void 0:c.methods.getSize()},getCenter:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.getCenter()},layer:{setGreenTileVisible:c=>{var d;return(d=s.value)==null?void 0:d.methods.layer.setGreenTileVisible(c)},getGreenTileVisible:()=>{var c;return(c=s.value)==null?void 0:c.methods.layer.getGreenTileVisible()},getShowLayerType:()=>{var c;return(c=s.value)==null?void 0:c.methods.layer.getShowLayerType()},setShowLayerType:c=>{var d;return(d=s.value)==null?void 0:d.methods.layer.setShowLayerType(c)}},ship:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.render(...c)},selected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.selected(...c)},filter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.filter(...c)},blinking:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.blinking(...c)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.ship.clear()}},track:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.render(...c)},remove:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.remove(...c)},play:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.play(...c)},setCenter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.setCenter(...c)},close:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.close(...c)},getLength:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.getLength(...c)}},carTrack:{location:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.location(...c)},remove:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.remove(...c)},renderTrack:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.renderTrack(...c)},setCenter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.setCenter(...c)},closeTrack:()=>{var c;return(c=s.value)==null?void 0:c.methods.carTrack.closeTrack()},playTrack:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.playTrack(...c)}},port:{render:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.port.render(c,d)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.port.clear()},selected:c=>{var d;return(d=s.value)==null?void 0:d.methods.port.selected(c)}},position:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.render(...c)},selected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.selected(...c)},clearSelected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.clearSelected(...c)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.position.clear()}},drawLine:{open:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.open()},close:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.close()},deleteLine:c=>{var d;return(d=s.value)==null?void 0:d.methods.drawLine.deleteLine(c)},setUnit:c=>{var d;return(d=s.value)==null?void 0:d.methods.drawLine.setUnit(c)},getState:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.getState()}},drawPolygon:{open:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.open()},close:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.close()},reset:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.reset()}},utils:{getCalculateExtent:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.utils.getCalculateExtent(...c)},convertSixHundredThousandToLatLng:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.utils.convertSixHundredThousandToLatLng(...c)},calculateCirclePoints:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.utils.calculateCirclePoints(c,d)}}}),(c,d)=>(i.openBlock(),i.createElementBlock("div",j7,[i.createElementVNode("div",{id:"map",ref_key:"zhMapRef",ref:n,class:"zh-map"},null,512),i.createVNode(lG,{ref_key:"scaleLineRef",ref:r},null,512),i.createVNode(dG,{ref:"zoomControlRef","map-instance":s.value},null,8,["map-instance"])]))}}),W2=Rt(Ft(H7,[["__scopeId","data-v-5724a05d"]]));var U7={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};/**!
235
235
  * Sortable 1.15.6
236
236
  * @author RubaXa <trash@rubaxa.org>
237
237
  * @author owenm <owen23355@gmail.com>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zhihao-ui",
3
- "version": "1.3.26",
3
+ "version": "1.3.27",
4
4
  "description": "components",
5
5
  "type": "module",
6
6
  "main": "./dist/umd/index.umd.cjs",