tg-map-vue3 3.3.5 → 3.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tg-map.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(> div > img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.element-overlay{position:absolute}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- var pr = Object.defineProperty;
3
- var ur = (i, e, t) => e in i ? pr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
4
- var p = (i, e, t) => (ur(i, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { createCommentVNode as Ge, computed as Bt, defineComponent as x, markRaw as gr, openBlock as Z, createElementBlock as W, mergeProps as le, createElementVNode as mr, normalizeClass as Be, renderSlot as R, normalizeStyle as fr, getCurrentInstance as yr, inject as vr, onMounted as _r, onBeforeUnmount as Mr, watch as br, withDirectives as Tr, vShow as Or } from "vue";
2
+ var ur = Object.defineProperty;
3
+ var gr = (i, e, t) => e in i ? ur(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
4
+ var p = (i, e, t) => (gr(i, typeof e != "symbol" ? e + "" : e, t), t);
5
+ import { createCommentVNode as Ge, computed as Bt, defineComponent as x, markRaw as mr, watch as At, openBlock as Z, createElementBlock as W, mergeProps as le, createElementVNode as fr, normalizeClass as Be, renderSlot as R, normalizeStyle as yr, getCurrentInstance as vr, inject as _r, onMounted as Mr, onBeforeUnmount as br, withDirectives as Tr, vShow as Or } from "vue";
6
6
  function U(i, e, t) {
7
7
  Object.keys(i).forEach((r) => {
8
8
  r.startsWith("update:") || t != null && t.includes(r) || e.addEventListener(r, i[r]);
@@ -15,15 +15,15 @@ function Cr() {
15
15
  function we(i, e) {
16
16
  return e.__id__ || (e.__id__ = Cr()), `${i}::${e.__id__}`;
17
17
  }
18
- var At = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
18
+ var $t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
19
19
  function Ue(i) {
20
20
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
21
21
  }
22
- var $t = { exports: {} };
22
+ var Rt = { exports: {} };
23
23
  (function(i) {
24
24
  (function(e, t) {
25
25
  i.exports ? i.exports = t() : e.coordtransform = t();
26
- })(At, function() {
26
+ })($t, function() {
27
27
  var e = 52.35987755982988, t = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
28
28
  function n(g, m, v, O) {
29
29
  this.west = Math.min(g, v), this.north = Math.max(m, O), this.east = Math.max(g, v), this.south = Math.min(m, O);
@@ -115,8 +115,8 @@ var $t = { exports: {} };
115
115
  }
116
116
  };
117
117
  });
118
- })($t);
119
- var xr = $t.exports;
118
+ })(Rt);
119
+ var xr = Rt.exports;
120
120
  const re = /* @__PURE__ */ Ue(xr);
121
121
  function se(i, e) {
122
122
  if (!i)
@@ -128,7 +128,7 @@ function Ze(i) {
128
128
  function C(i) {
129
129
  throw new Error(i);
130
130
  }
131
- function Rt(i) {
131
+ function zt(i) {
132
132
  throw new Error(`Unsupported: ${i}`);
133
133
  }
134
134
  function rs(i) {
@@ -348,7 +348,7 @@ function Rr(i) {
348
348
  function Ot(i) {
349
349
  return Object.keys(i).concat(Rr(i));
350
350
  }
351
- function zt(i, e) {
351
+ function Nt(i, e) {
352
352
  try {
353
353
  return e in i;
354
354
  } catch {
@@ -356,14 +356,14 @@ function zt(i, e) {
356
356
  }
357
357
  }
358
358
  function zr(i, e) {
359
- return zt(i, e) && !(Object.hasOwnProperty.call(i, e) && Object.propertyIsEnumerable.call(i, e));
359
+ return Nt(i, e) && !(Object.hasOwnProperty.call(i, e) && Object.propertyIsEnumerable.call(i, e));
360
360
  }
361
361
  function Nr(i, e, t) {
362
362
  var r = {};
363
363
  return t.isMergeableObject(i) && Ot(i).forEach(function(s) {
364
364
  r[s] = ge(i[s], t);
365
365
  }), Ot(e).forEach(function(s) {
366
- zr(i, s) || (zt(i, s) && t.isMergeableObject(e[s]) ? r[s] = $r(s, t)(i[s], e[s], t) : r[s] = ge(e[s], t));
366
+ zr(i, s) || (Nt(i, s) && t.isMergeableObject(e[s]) ? r[s] = $r(s, t)(i[s], e[s], t) : r[s] = ge(e[s], t));
367
367
  }), r;
368
368
  }
369
369
  function oe(i, e, t) {
@@ -379,7 +379,7 @@ oe.all = function(e, t) {
379
379
  }, {});
380
380
  };
381
381
  var Dr = oe, Gr = Dr;
382
- const Nt = /* @__PURE__ */ Ue(Gr), Ce = ["3.0"], Zr = {
382
+ const Dt = /* @__PURE__ */ Ue(Gr), Ce = ["3.0"], Zr = {
383
383
  baidu: {
384
384
  version: "3.0",
385
385
  // 在build时会被静态替换, 导致使用者不能无法设置它
@@ -398,12 +398,12 @@ const Nt = /* @__PURE__ */ Ue(Gr), Ce = ["3.0"], Zr = {
398
398
  key: ""
399
399
  }
400
400
  };
401
- let Dt;
402
- function Gt() {
403
- return Dt || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
401
+ let Gt;
402
+ function Zt() {
403
+ return Gt || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
404
404
  }
405
405
  function Wr(i) {
406
- i != null && (Dt = Nt(Zr, i));
406
+ i != null && (Gt = Dt(Zr, i));
407
407
  }
408
408
  var We;
409
409
  ((i) => {
@@ -463,7 +463,7 @@ function Me(i, e) {
463
463
  function ls(i) {
464
464
  return i;
465
465
  }
466
- function Zt(i, e, t) {
466
+ function Wt(i, e, t) {
467
467
  return i.addListener(e, t).remove;
468
468
  }
469
469
  function jr(i, e, t) {
@@ -475,7 +475,7 @@ function Vr(i, e, t, r) {
475
475
  function wt(i, e, t) {
476
476
  return i.addEventListener(e, t), () => i.removeEventListener(e, t);
477
477
  }
478
- class Wt {
478
+ class jt {
479
479
  constructor(e, t) {
480
480
  p(this, "eventMap", /* @__PURE__ */ new Map());
481
481
  p(this, "target", void 0);
@@ -485,7 +485,7 @@ class Wt {
485
485
  return this.target = e, this;
486
486
  }
487
487
  }
488
- const Tt = class extends Wt {
488
+ const Tt = class extends jt {
489
489
  addEventListener(e, t) {
490
490
  const r = we(e, t);
491
491
  if (this.eventMap.get(r)) {
@@ -520,7 +520,7 @@ p(Q, "EVENT_TYPE_MAP", {
520
520
  "map-mouseup": "mouseup",
521
521
  "map-dblclick": "dblclick"
522
522
  });
523
- const Se = class extends Wt {
523
+ const Se = class extends jt {
524
524
  addEventListener(e, t) {
525
525
  const r = we(e, t);
526
526
  if (this.eventMap.get(r)) {
@@ -701,9 +701,9 @@ class Ur {
701
701
  this.position = e;
702
702
  }
703
703
  }
704
- class jt {
704
+ class Vt {
705
705
  }
706
- class Ye extends jt {
706
+ class Ye extends Vt {
707
707
  constructor(e, t) {
708
708
  super(), this.inner = e, this.position = t;
709
709
  }
@@ -726,7 +726,7 @@ class Ye extends jt {
726
726
  e.innerMap.removeControl(this.inner);
727
727
  }
728
728
  }
729
- class qe extends jt {
729
+ class qe extends Vt {
730
730
  constructor(t, r) {
731
731
  super();
732
732
  p(this, "visible", !1);
@@ -763,7 +763,7 @@ class qe extends jt {
763
763
  });
764
764
  }
765
765
  }
766
- var Vt = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(Vt || {});
766
+ var Ht = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(Ht || {});
767
767
  class P {
768
768
  constructor(e, t, r, s) {
769
769
  this.id = e, this.baidu = t, this.google = r, this.googleCoordType = s;
@@ -785,7 +785,7 @@ class P {
785
785
  return this.google();
786
786
  }
787
787
  asGoogleMapType() {
788
- Rt("google的内置地图没有对应的实例");
788
+ zt("google的内置地图没有对应的实例");
789
789
  }
790
790
  }
791
791
  class Yr {
@@ -810,11 +810,11 @@ var I;
810
810
  google.maps.MapTypeId.TERRAIN
811
811
  ), J.wgs84), i.BUILD_IN_MAP_TYPES = new Fr([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
812
812
  })(I || (I = {}));
813
- var Ht = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Ht || {});
814
- const Ft = [I.NORMAL, I.SATELLITE, I.HYBRID];
813
+ var Ft = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Ft || {});
814
+ const Ut = [I.NORMAL, I.SATELLITE, I.HYBRID];
815
815
  class Ke extends Ye {
816
816
  static create(e) {
817
- const t = e.mapTypes ?? Ft, r = {
817
+ const t = e.mapTypes ?? Ut, r = {
818
818
  default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
819
819
  horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
820
820
  dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
@@ -826,7 +826,7 @@ class Ke extends Ye {
826
826
  }
827
827
  }
828
828
  const ie = class extends qe {
829
- constructor(e = "default", t = k.TOP_LEFT, r = Ft) {
829
+ constructor(e = "default", t = k.TOP_LEFT, r = Ut) {
830
830
  super("mapType", t), this.type = e, this.mapTypes = r, ie.type2google || (ie.type2google = {
831
831
  default: google.maps.MapTypeControlStyle.DEFAULT,
832
832
  horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
@@ -900,7 +900,7 @@ const ee = {
900
900
  return Et ?? (Et = new google.maps.LatLng({ lat: 0, lng: 0 }));
901
901
  }
902
902
  };
903
- function Ut(i, e = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
903
+ function Yt(i, e = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
904
904
  for (const t of i)
905
905
  for (const r of t.types)
906
906
  switch (r) {
@@ -925,9 +925,9 @@ function Ut(i, e = { country: "", province: "", city: "", district: "", street:
925
925
  }
926
926
  return e;
927
927
  }
928
- function Yt(i, e) {
928
+ function qt(i, e) {
929
929
  var r;
930
- const t = i.address_components && Ut(i.address_components);
930
+ const t = i.address_components && Yt(i.address_components);
931
931
  return {
932
932
  country: (t == null ? void 0 : t.country) ?? "",
933
933
  province: (t == null ? void 0 : t.province) ?? "",
@@ -938,9 +938,9 @@ function Yt(i, e) {
938
938
  title: i.name ?? ""
939
939
  };
940
940
  }
941
- class qt {
941
+ class Kt {
942
942
  }
943
- class Kr extends qt {
943
+ class Kr extends Kt {
944
944
  constructor(t, r) {
945
945
  super();
946
946
  p(this, "inner");
@@ -956,7 +956,7 @@ class Kr extends qt {
956
956
  this.inner.setBounds(t.toGoogle(this.map.coordType));
957
957
  }
958
958
  addResultListener(t) {
959
- return Zt(this.inner, "place_changed", () => {
959
+ return Wt(this.inner, "place_changed", () => {
960
960
  const r = this.inner.getPlace(), s = {
961
961
  title: r.name ?? "",
962
962
  province: "",
@@ -966,11 +966,11 @@ class Kr extends qt {
966
966
  streetNumber: "",
967
967
  country: ""
968
968
  };
969
- r.address_components && Ut(r.address_components, s), t(s);
969
+ r.address_components && Yt(r.address_components, s), t(s);
970
970
  });
971
971
  }
972
972
  }
973
- class Xr extends qt {
973
+ class Xr extends Kt {
974
974
  constructor(t, r) {
975
975
  super();
976
976
  p(this, "inner");
@@ -1015,9 +1015,9 @@ class Xr extends qt {
1015
1015
  };
1016
1016
  }
1017
1017
  }
1018
- let Jr = class Kt {
1018
+ let Jr = class Xt {
1019
1019
  constructor(e, t, r) {
1020
- this.extend(Kt, google.maps.OverlayView), this.map_ = e, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
1020
+ this.extend(Xt, google.maps.OverlayView), this.map_ = e, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
1021
1021
  var s = r || {};
1022
1022
  this.zIndex_ = s.zIndex || google.maps.Marker.MAX_ZINDEX + 1, this.gridSize_ = s.gridSize || 60, this.minClusterSize_ = s.minimumClusterSize || 2, this.maxZoom_ = s.maxZoom || null, this.styles_ = s.styles || [], this.imagePath_ = s.imagePath || this.MARKER_CLUSTER_IMAGE_PATH_, this.imageExtension_ = s.imageExtension || this.MARKER_CLUSTER_IMAGE_EXTENSION_, this.zoomOnClick_ = !0, s.zoomOnClick != null && (this.zoomOnClick_ = s.zoomOnClick), this.averageCenter_ = !1, s.averageCenter != null && (this.averageCenter_ = s.averageCenter), this.setupStyles_(), this.setMap(e), this.prevZoom_ = this.map_.getZoom();
1023
1023
  var n = this;
@@ -1722,11 +1722,11 @@ class tt {
1722
1722
  ), t.join("");
1723
1723
  }
1724
1724
  }
1725
- var Xt = { exports: {} };
1725
+ var Jt = { exports: {} };
1726
1726
  (function(i, e) {
1727
1727
  (function(t, r) {
1728
1728
  i.exports = r();
1729
- })(At, function() {
1729
+ })($t, function() {
1730
1730
  var t, r = t = r || { version: "1.3.8" }, s = {};
1731
1731
  r.guid = "$BAIDU$", s[r.guid] = s[r.guid] || {}, r.dom = r.dom || {}, r.dom.g = function(o) {
1732
1732
  return typeof o == "string" || o instanceof String ? document.getElementById(o) : o && o.nodeName && (o.nodeType == 1 || o.nodeType == 9) ? o : null;
@@ -1915,10 +1915,10 @@ var Xt = { exports: {} };
1915
1915
  });
1916
1916
  }, c;
1917
1917
  });
1918
- })(Xt);
1919
- var ei = Xt.exports;
1918
+ })(Jt);
1919
+ var ei = Jt.exports;
1920
1920
  const Lt = /* @__PURE__ */ Ue(ei);
1921
- var Jt = function(i, e, t) {
1921
+ var Qt = function(i, e, t) {
1922
1922
  e = ti(e);
1923
1923
  var r = i.pointToPixel(e.getNorthEast()), s = i.pointToPixel(e.getSouthWest());
1924
1924
  r.x += t, r.y -= t, s.x -= t, s.y += t;
@@ -1929,11 +1929,11 @@ var Jt = function(i, e, t) {
1929
1929
  return new BMap.Bounds(new BMap.Point(t, s), new BMap.Point(e, r));
1930
1930
  }, be = function(i, e, t) {
1931
1931
  return e && (i = Math.max(i, e)), t && (i = Math.min(i, t)), i;
1932
- }, Qt = function(i) {
1932
+ }, er = function(i) {
1933
1933
  return Object.prototype.toString.call(i) === "[object Array]";
1934
- }, er = function(i, e) {
1934
+ }, tr = function(i, e) {
1935
1935
  var t = -1;
1936
- if (Qt(e)) {
1936
+ if (er(e)) {
1937
1937
  if (e.indexOf)
1938
1938
  t = e.indexOf(i);
1939
1939
  else
@@ -1961,7 +1961,7 @@ var Jt = function(i, e, t) {
1961
1961
  r._redraw();
1962
1962
  });
1963
1963
  var s = t.markers;
1964
- Qt(s) && this.addMarkers(s);
1964
+ er(s) && this.addMarkers(s);
1965
1965
  }
1966
1966
  };
1967
1967
  T.prototype.addMarkers = function(i) {
@@ -1972,7 +1972,7 @@ T.prototype.addMarkers = function(i) {
1972
1972
  }
1973
1973
  };
1974
1974
  T.prototype._pushMarkerTo = function(i) {
1975
- var e = er(i, this._markers);
1975
+ var e = tr(i, this._markers);
1976
1976
  e === -1 && (i.isInCluster = !1, this._markers.push(i));
1977
1977
  };
1978
1978
  T.prototype.addMarker = function(i) {
@@ -1981,7 +1981,7 @@ T.prototype.addMarker = function(i) {
1981
1981
  T.prototype._createClusters = function() {
1982
1982
  var i = this._map.getBounds();
1983
1983
  if (i.getCenter()) {
1984
- for (var e = Jt(this._map, i, this._gridSize), t = 0, r; r = this._markers[t]; t++)
1984
+ for (var e = Qt(this._map, i, this._gridSize), t = 0, r; r = this._markers[t]; t++)
1985
1985
  !r.isInCluster && e.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
1986
1986
  for (var s = this._markers.length, t = 0; t < s; t++)
1987
1987
  this._clusters[t] && this._clusters[t].render();
@@ -2021,7 +2021,7 @@ T.prototype._removeMarkersFromMap = function() {
2021
2021
  }
2022
2022
  };
2023
2023
  T.prototype._removeMarker = function(i) {
2024
- var e = er(i, this._markers);
2024
+ var e = tr(i, this._markers);
2025
2025
  return e === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(e, 1), !0);
2026
2026
  };
2027
2027
  T.prototype.removeMarker = function(i) {
@@ -2145,7 +2145,7 @@ B.prototype.isReal = function(i) {
2145
2145
  };
2146
2146
  B.prototype.updateGridBounds = function() {
2147
2147
  var i = new BMap.Bounds(this._center, this._center);
2148
- this._gridBounds = Jt(this._map, i, this._markerClusterer.getGridSize());
2148
+ this._gridBounds = Qt(this._map, i, this._markerClusterer.getGridSize());
2149
2149
  };
2150
2150
  B.prototype.updateClusterMarker = function() {
2151
2151
  if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
@@ -2201,7 +2201,7 @@ var Le;
2201
2201
  }
2202
2202
  i.toGoogle = t;
2203
2203
  })(Le || (Le = {}));
2204
- class tr {
2204
+ class rr {
2205
2205
  constructor(e) {
2206
2206
  p(this, "inner");
2207
2207
  this.map = e;
@@ -2227,7 +2227,7 @@ class tr {
2227
2227
  return this.inner.removeMarkers(e.map((t) => t.innerOverlay));
2228
2228
  }
2229
2229
  }
2230
- class ri extends tr {
2230
+ class ri extends rr {
2231
2231
  constructor(e, t) {
2232
2232
  var s;
2233
2233
  super(e), this.inner = new T(e.innerMap, {
@@ -2247,7 +2247,7 @@ class ri extends tr {
2247
2247
  this.inner._redraw();
2248
2248
  }
2249
2249
  }
2250
- class ii extends tr {
2250
+ class ii extends rr {
2251
2251
  constructor(e, t) {
2252
2252
  var s, n;
2253
2253
  super(e), this.inner = new Jr(
@@ -2274,11 +2274,11 @@ class ii extends tr {
2274
2274
  this.inner.repaint();
2275
2275
  }
2276
2276
  }
2277
- class rr {
2277
+ class ir {
2278
2278
  constructor() {
2279
2279
  }
2280
2280
  }
2281
- class si extends rr {
2281
+ class si extends ir {
2282
2282
  constructor(t, r) {
2283
2283
  super();
2284
2284
  p(this, "inner");
@@ -2312,7 +2312,7 @@ class si extends rr {
2312
2312
  switch (c) {
2313
2313
  case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:
2314
2314
  case google.maps.places.PlacesServiceStatus.OK: {
2315
- const o = (a ?? []).map((l) => Yt(l, this.map));
2315
+ const o = (a ?? []).map((l) => qt(l, this.map));
2316
2316
  s(o);
2317
2317
  break;
2318
2318
  }
@@ -2324,7 +2324,7 @@ class si extends rr {
2324
2324
  });
2325
2325
  }
2326
2326
  }
2327
- class ni extends rr {
2327
+ class ni extends ir {
2328
2328
  constructor(t, r) {
2329
2329
  super();
2330
2330
  p(this, "searchRequestMap", /* @__PURE__ */ new Map());
@@ -2356,7 +2356,7 @@ class ni extends rr {
2356
2356
  return new Promise((s, n) => {
2357
2357
  const a = new BMap.LocalSearch(t ?? this.map.innerMap, {
2358
2358
  onSearchComplete: (c) => {
2359
- Array.isArray(c) && Rt("当前只支持一次搜索一条数据");
2359
+ Array.isArray(c) && zt("当前只支持一次搜索一条数据");
2360
2360
  const o = a.getStatus();
2361
2361
  switch (o) {
2362
2362
  case BMAP_STATUS_SUCCESS: {
@@ -2390,7 +2390,7 @@ class ni extends rr {
2390
2390
  });
2391
2391
  }
2392
2392
  }
2393
- class ir {
2393
+ class sr {
2394
2394
  constructor(e, t) {
2395
2395
  p(this, "onData");
2396
2396
  p(this, "onError");
@@ -2405,23 +2405,23 @@ class ir {
2405
2405
  return this.onData && C("setSearchListener只能调用一次"), this.onData = e, this.onError = t, ue;
2406
2406
  }
2407
2407
  }
2408
- class oi extends ir {
2408
+ class oi extends sr {
2409
2409
  constructor(t, r) {
2410
2410
  super(t, r.input);
2411
2411
  p(this, "searchBox");
2412
2412
  this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", t.innerMap);
2413
2413
  }
2414
2414
  setSearchListener(t, r) {
2415
- return super.setSearchListener(t, r), Zt(this.searchBox, "places_changed", () => {
2415
+ return super.setSearchListener(t, r), Wt(this.searchBox, "places_changed", () => {
2416
2416
  const s = this.searchBox.getPlaces();
2417
- t((s ?? []).map((n) => Yt(n, this.map)));
2417
+ t((s ?? []).map((n) => qt(n, this.map)));
2418
2418
  });
2419
2419
  }
2420
2420
  search() {
2421
2421
  this.input.value && (google.maps.event.trigger(this.input, "focus", {}), google.maps.event.trigger(this.input, "keydown", { keyCode: 13 }));
2422
2422
  }
2423
2423
  }
2424
- class ai extends ir {
2424
+ class ai extends sr {
2425
2425
  constructor(t, r) {
2426
2426
  super(t, r.input);
2427
2427
  p(this, "autocomplete");
@@ -2483,6 +2483,7 @@ class rt {
2483
2483
  getZoom() {
2484
2484
  return this.innerMap.getZoom() ?? 0;
2485
2485
  }
2486
+ /** @see setCenter */
2486
2487
  setZoom(e) {
2487
2488
  this.innerMap.setZoom(e);
2488
2489
  }
@@ -2505,7 +2506,7 @@ function hi(i) {
2505
2506
  function kt(i) {
2506
2507
  return hi(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
2507
2508
  }
2508
- function sr(i) {
2509
+ function nr(i) {
2509
2510
  var e, t;
2510
2511
  return !(kt(i) === !1 || (e = i.constructor, typeof e != "function") || (t = e.prototype, kt(t) === !1) || t.hasOwnProperty("isPrototypeOf") === !1);
2511
2512
  }
@@ -2524,7 +2525,7 @@ var me;
2524
2525
  }
2525
2526
  i.toJsonSafely = r;
2526
2527
  function s(c) {
2527
- sr(c) && Object.keys(c).forEach((o) => {
2528
+ nr(c) && Object.keys(c).forEach((o) => {
2528
2529
  c[o] === void 0 ? delete c[o] : s(c[o]);
2529
2530
  });
2530
2531
  }
@@ -2559,13 +2560,13 @@ var D = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "g
2559
2560
  function e(t) {
2560
2561
  me.deleteUndefinedPropertyOnPlainObjectDeeply(t);
2561
2562
  const r = { center: y.ZERO, zoom: 5 };
2562
- return Nt(r, t || {}, {
2563
- isMergeableObject: sr
2563
+ return Dt(r, t || {}, {
2564
+ isMergeableObject: nr
2564
2565
  });
2565
2566
  }
2566
2567
  i.create = e;
2567
2568
  })(Ve || (Ve = {}));
2568
- class nr {
2569
+ class or {
2569
2570
  constructor(e, t, r, s) {
2570
2571
  p(this, "addEventListener");
2571
2572
  p(this, "removeEventListener");
@@ -2575,7 +2576,7 @@ class nr {
2575
2576
  this.map.removeOverlay(this);
2576
2577
  }
2577
2578
  }
2578
- class it extends nr {
2579
+ class it extends or {
2579
2580
  constructor(e, t, r) {
2580
2581
  super(e, t, r, new Q(e, r));
2581
2582
  }
@@ -2586,7 +2587,7 @@ class it extends nr {
2586
2587
  this.innerOverlay.setVisible(e);
2587
2588
  }
2588
2589
  }
2589
- class Ae extends nr {
2590
+ class Ae extends or {
2590
2591
  constructor(e, t, r) {
2591
2592
  super(e, t, r, new ne(e, r));
2592
2593
  }
@@ -2709,7 +2710,7 @@ class at extends nt {
2709
2710
  return this.innerOverlay.getRadius();
2710
2711
  }
2711
2712
  }
2712
- function or() {
2713
+ function ar() {
2713
2714
  BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
2714
2715
  }
2715
2716
  var F;
@@ -2721,7 +2722,7 @@ function di(i, e, t, r, s, n) {
2721
2722
  return Ne || (Ne = pi()), new Ne(i, e, t, r, s, n);
2722
2723
  }
2723
2724
  function pi() {
2724
- or();
2725
+ ar();
2725
2726
  const i = new BMap.Point(0, 0);
2726
2727
  return class extends BMap.OverlayV3 {
2727
2728
  constructor(r, s = i, n = F.ZERO, a, c = 654, o = "") {
@@ -3843,7 +3844,7 @@ class vi extends rt {
3843
3844
  p(this, "map");
3844
3845
  p(this, "defaultLayers");
3845
3846
  this.mapOptions = r;
3846
- const s = Gt().here;
3847
+ const s = Zt().here;
3847
3848
  Ce.includes(s.version) || C(`不支持${s.version}, HereMap当前只支持如下版本: ${Ce}`);
3848
3849
  const n = new H.service.Platform({
3849
3850
  app_id: s.key.split(",")[0],
@@ -4109,7 +4110,7 @@ function Oi(i) {
4109
4110
  function gs(i) {
4110
4111
  return Oi(i);
4111
4112
  }
4112
- function ar() {
4113
+ function lr() {
4113
4114
  return Ge();
4114
4115
  }
4115
4116
  function Te(i, e) {
@@ -4177,7 +4178,7 @@ const ys = {
4177
4178
  }
4178
4179
  },
4179
4180
  render() {
4180
- return ar();
4181
+ return lr();
4181
4182
  }
4182
4183
  }), Ci = x({
4183
4184
  name: "tg-map",
@@ -4221,7 +4222,7 @@ const ys = {
4221
4222
  minZoom: f(Number),
4222
4223
  maxZoom: f(Number),
4223
4224
  mapStyle: f(Object),
4224
- mapTypeId: G(Vt),
4225
+ mapTypeId: G(Ht),
4225
4226
  /** 地图类型对象, 优先级比mapTypeId高 */
4226
4227
  mapType: f(Object),
4227
4228
  hideLogo: f(Boolean),
@@ -4254,13 +4255,6 @@ const ys = {
4254
4255
  }
4255
4256
  },
4256
4257
  watch: {
4257
- center(i) {
4258
- this.map && (this.map.getCenter().equals(i) || (console.debug("<tg-map> setCenter", i), this.map.setCenter(i)));
4259
- },
4260
- zoom(i) {
4261
- var e;
4262
- (e = this.map) == null || e.setZoom(i);
4263
- },
4264
4258
  gestureHandling(i) {
4265
4259
  var e;
4266
4260
  i && ((e = this.map) == null || e.setGestureHandling(i));
@@ -4289,7 +4283,7 @@ const ys = {
4289
4283
  async mounted() {
4290
4284
  const i = this.type;
4291
4285
  try {
4292
- await _i({ type: i, config: Gt()[i] });
4286
+ await _i({ type: i, config: Zt()[i] });
4293
4287
  } catch (s) {
4294
4288
  this.$emit("error", s);
4295
4289
  return;
@@ -4313,12 +4307,18 @@ const ys = {
4313
4307
  buildInMapTypeId: this.mapTypeId
4314
4308
  }
4315
4309
  );
4316
- if (this.map = gr(e), this.mapType && e.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), U(
4310
+ if (this.map = mr(e), this.mapType && e.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), U(
4317
4311
  this.attrs.listeners,
4318
4312
  e,
4319
4313
  /* excludes: */
4320
4314
  ["load"]
4321
- ), this.$emit("load", e), "update:center" in this.attrs.listenerProps) {
4315
+ ), this.$emit("load", e), At([
4316
+ () => this.zoom,
4317
+ () => this.center
4318
+ //
4319
+ ], ([s, n], [a, c]) => {
4320
+ s !== a && e.setZoom(s), n !== c && (e.getCenter().equals(n) || e.setCenter(n));
4321
+ }), "update:center" in this.attrs.listenerProps) {
4322
4322
  const s = () => this.$emit("update:center", e.getCenter());
4323
4323
  e.addEventListener("center-changed", () => {
4324
4324
  this.centerSyncDelay > 0 ? (clearTimeout(this.centerSyncTimeoutId), this.centerSyncTimeoutId = setTimeout(s, this.centerSyncDelay)) : s();
@@ -4348,7 +4348,7 @@ const j = (i, e) => {
4348
4348
  };
4349
4349
  function xi(i, e, t, r, s, n) {
4350
4350
  return Z(), W("div", le({ class: "tg-map" }, i.attrs.binds), [
4351
- mr("div", {
4351
+ fr("div", {
4352
4352
  ref: "map",
4353
4353
  class: Be({
4354
4354
  "tg-map__map": !0,
@@ -4404,7 +4404,7 @@ const ki = x({
4404
4404
  function Pi(i, e, t, r, s, n) {
4405
4405
  return Z(), W("div", {
4406
4406
  class: Be(i.$options.name),
4407
- style: fr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
4407
+ style: yr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
4408
4408
  }, [
4409
4409
  R(i.$slots, "default")
4410
4410
  ], 6);
@@ -4450,7 +4450,7 @@ const _s = /* @__PURE__ */ j(Ii, [["render", Si]]), Ms = x({
4450
4450
  mixins: [L],
4451
4451
  props: {
4452
4452
  position: G(k, k.TOP_LEFT),
4453
- type: G(Ht),
4453
+ type: G(Ft),
4454
4454
  mapTypes: f(Array)
4455
4455
  },
4456
4456
  setup() {
@@ -4501,9 +4501,9 @@ const _s = /* @__PURE__ */ j(Ii, [["render", Si]]), Ms = x({
4501
4501
  this.$map.removeControl(this.control);
4502
4502
  }
4503
4503
  });
4504
- function lr() {
4504
+ function hr() {
4505
4505
  var t;
4506
- const i = (t = yr()) == null ? void 0 : t.type;
4506
+ const i = (t = vr()) == null ? void 0 : t.type;
4507
4507
  let e = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
4508
4508
  if (!e) {
4509
4509
  const r = i == null ? void 0 : i.__file;
@@ -4512,9 +4512,9 @@ function lr() {
4512
4512
  return e;
4513
4513
  }
4514
4514
  function Bi() {
4515
- const i = vr(Mt);
4515
+ const i = _r(Mt);
4516
4516
  let e, t;
4517
- return i == null && C(`<${lr() || "unknown"}>必须作为<tg-map>的子代组件`), {
4517
+ return i == null && C(`<${hr() || "unknown"}>必须作为<tg-map>的子代组件`), {
4518
4518
  mapRef: i,
4519
4519
  /** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
4520
4520
  get map() {
@@ -4522,11 +4522,11 @@ function Bi() {
4522
4522
  },
4523
4523
  /** 地图元素创建回调 */
4524
4524
  [ve](r) {
4525
- _r(r), e && C(`${ve}只能调用一次`), e = r;
4525
+ Mr(r), e && C(`${ve}只能调用一次`), e = r;
4526
4526
  },
4527
4527
  /** 地图元素销毁回调 */
4528
4528
  [_e](r) {
4529
- Mr(r), t && C(`${_e}只能调用一次`), t = r;
4529
+ br(r), t && C(`${_e}只能调用一次`), t = r;
4530
4530
  },
4531
4531
  /** 重新创建地图元素 */
4532
4532
  recreate() {
@@ -4546,9 +4546,9 @@ const Ts = x({
4546
4546
  e = t.createZoomControl(i), t.addControl(e);
4547
4547
  }), s(() => {
4548
4548
  t.removeControl(e);
4549
- }), br(() => i.position, (n) => {
4549
+ }), At(() => i.position, (n) => {
4550
4550
  e.setPosition(n);
4551
- }), ar;
4551
+ }), lr;
4552
4552
  }
4553
4553
  }), Ai = x({
4554
4554
  name: "tg-marker-clusterer",
@@ -4722,7 +4722,7 @@ class zi {
4722
4722
  asBaidu() {
4723
4723
  if (!this.baidu) {
4724
4724
  const e = this;
4725
- or();
4725
+ ar();
4726
4726
  class t extends BMap.OverlayV3 {
4727
4727
  initialize(n) {
4728
4728
  const a = e.create(), c = n.getPanes();
@@ -5278,7 +5278,7 @@ const Ls = /* @__PURE__ */ j(Ui, [["render", Yi]]), ks = x({
5278
5278
  if (e.enable !== !1) {
5279
5279
  const t = x({
5280
5280
  beforeCreate() {
5281
- const r = lr() ?? "", n = (e.nameRegex || /^[A-Z]/).test(r) ? (a) => {
5281
+ const r = hr() ?? "", n = (e.nameRegex || /^[A-Z]/).test(r) ? (a) => {
5282
5282
  e.hookNames ? e.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : qi.includes(a) || console.debug("[lifecycle]", r, a);
5283
5283
  } : ue;
5284
5284
  n("beforeCreate"), this.__life_impl = n;
@@ -5341,14 +5341,14 @@ function Ji(i, e, t) {
5341
5341
  let v = 0, O = 0, E = 0, w = t / (s * g), q = 2 * Math.PI;
5342
5342
  for (; Math.abs(w - q) > 1e-12; ) {
5343
5343
  v = Math.cos(2 * u + w), O = Math.sin(w), E = Math.cos(w);
5344
- const dr = m * O * (v + m / 4 * (E * (-1 + 2 * v * v) - m / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
5345
- q = w, w = t / (s * g) + dr;
5344
+ const pr = m * O * (v + m / 4 * (E * (-1 + 2 * v * v) - m / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
5345
+ q = w, w = t / (s * g) + pr;
5346
5346
  }
5347
5347
  const te = d * O - h * E * o, $e = Math.atan2(
5348
5348
  d * E + h * O * o,
5349
5349
  (1 - n) * Math.sqrt(_ * _ + te * te)
5350
- ), hr = Math.atan2(O * c, h * E - d * O * o), Re = n / 16 * b * (4 + n * (4 - 3 * b)), cr = hr - (1 - Re) * n * _ * (w + Re * O * (v + Re * E * (-1 + 2 * v * v)));
5351
- return { lng: i.lng + St(cr), lat: St($e) };
5350
+ ), cr = Math.atan2(O * c, h * E - d * O * o), Re = n / 16 * b * (4 + n * (4 - 3 * b)), dr = cr - (1 - Re) * n * _ * (w + Re * O * (v + Re * E * (-1 + 2 * v * v)));
5351
+ return { lng: i.lng + St(dr), lat: St($e) };
5352
5352
  }
5353
5353
  const Ss = {
5354
5354
  getDistance: Xi,
@@ -5361,10 +5361,10 @@ const Ss = {
5361
5361
  }
5362
5362
  };
5363
5363
  export {
5364
- jt as AbstractControl,
5364
+ Vt as AbstractControl,
5365
5365
  rt as AbstractMap,
5366
5366
  xe as Arrays,
5367
- qt as Autocomplete,
5367
+ Kt as Autocomplete,
5368
5368
  Xr as BaiduAutocomplete,
5369
5369
  ot as BaiduCircle,
5370
5370
  Ye as BaiduControl,
@@ -5412,14 +5412,14 @@ export {
5412
5412
  Mt as MIXIN_MAP_NAME,
5413
5413
  Ee as MVCArrays,
5414
5414
  L as MapMixin,
5415
- Ht as MapTypeControlType,
5415
+ Ft as MapTypeControlType,
5416
5416
  li as MapZoom,
5417
- tr as MarkerClusterer,
5417
+ rr as MarkerClusterer,
5418
5418
  me as Objects,
5419
- nr as Overlay,
5420
- rr as PlacesService,
5419
+ or as Overlay,
5420
+ ir as PlacesService,
5421
5421
  F as Point,
5422
- ir as SearchBox,
5422
+ sr as SearchBox,
5423
5423
  Ss as SphericalUtils,
5424
5424
  fe as Strings,
5425
5425
  Ie as SymbolIcon,
@@ -5447,7 +5447,7 @@ export {
5447
5447
  Ze as assertNever,
5448
5448
  Te as callHook,
5449
5449
  us as computedSaveOnThis,
5450
- ar as createEmptyVNode,
5450
+ lr as createEmptyVNode,
5451
5451
  Oi as createPropertyObject,
5452
5452
  gs as createPropertyObjectTyped,
5453
5453
  is as debug,
@@ -5457,7 +5457,7 @@ export {
5457
5457
  fs as extractVNodeFromSlotsByComponent,
5458
5458
  ms as findByComponentType,
5459
5459
  Ji as getDestination,
5460
- Gt as getTgMapConfig,
5460
+ Zt as getTgMapConfig,
5461
5461
  ss as isDef,
5462
5462
  os as isInstanceOf,
5463
5463
  ns as lateinit,
@@ -5472,7 +5472,7 @@ export {
5472
5472
  G as stringEnumProp,
5473
5473
  Ti as stringUnionPropFromValues,
5474
5474
  C as throwError,
5475
- Rt as throwUnsupported,
5475
+ zt as throwUnsupported,
5476
5476
  rs as todo,
5477
5477
  je as typed,
5478
5478
  ls as unwrapStringEnumValue,