vue3-google-map 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-e7ebb206]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-d099a3a6]{display:none}.mapdiv .custom-control-wrapper[data-v-d099a3a6]{display:inline-block}.info-window-wrapper[data-v-cbe1707b]{display:none}.mapdiv .info-window-wrapper[data-v-cbe1707b]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  var Ne = Object.defineProperty;
3
- var Ue = (n, e, t) => e in n ? Ne(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
- var oe = (n, e, t) => (Ue(n, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { defineComponent as P, ref as v, provide as U, watch as S, onMounted as Ie, onBeforeUnmount as j, markRaw as x, toRef as $, openBlock as K, createElementBlock as Y, createElementVNode as se, renderSlot as J, normalizeProps as De, guardReactiveProps as Fe, computed as F, Comment as ue, inject as C, mergeProps as de, createCommentVNode as he } from "vue";
6
- const B = Symbol("map"), Z = Symbol("api"), pe = Symbol("marker"), fe = Symbol("markerCluster"), re = Symbol("CustomMarker"), Te = Symbol("mapTilesLoaded"), V = [
3
+ var De = (n, e, t) => e in n ? Ne(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
+ var oe = (n, e, t) => (De(n, typeof e != "symbol" ? e + "" : e, t), t);
5
+ import { defineComponent as P, ref as v, provide as D, watch as S, onMounted as Ie, onBeforeUnmount as j, markRaw as x, toRef as $, openBlock as U, createElementBlock as V, createElementVNode as se, renderSlot as z, normalizeProps as Fe, guardReactiveProps as Ue, computed as G, Comment as ue, inject as C, Fragment as Ve, mergeProps as de, createCommentVNode as he } from "vue";
6
+ const B = Symbol("map"), Z = Symbol("api"), pe = Symbol("marker"), fe = Symbol("markerCluster"), re = Symbol("CustomMarker"), Te = Symbol("mapTilesLoaded"), H = [
7
7
  "click",
8
8
  "dblclick",
9
9
  "drag",
@@ -30,7 +30,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
30
30
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
31
31
  PERFORMANCE OF THIS SOFTWARE.
32
32
  ***************************************************************************** */
33
- function Ve(n, e, t, s) {
33
+ function ze(n, e, t, s) {
34
34
  function r(o) {
35
35
  return o instanceof t ? o : new t(function(a) {
36
36
  a(o);
@@ -57,7 +57,7 @@ function Ve(n, e, t, s) {
57
57
  d((s = s.apply(n, e || [])).next());
58
58
  });
59
59
  }
60
- var ze = function n(e, t) {
60
+ var Ge = function n(e, t) {
61
61
  if (e === t)
62
62
  return !0;
63
63
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -109,7 +109,7 @@ class q {
109
109
  */
110
110
  constructor({ apiKey: e, authReferrerPolicy: t, channel: s, client: r, id: o = ye, language: a, libraries: l = [], mapIds: i, nonce: d, region: u, retries: c = 3, url: h = "https://maps.googleapis.com/maps/api/js", version: p }) {
111
111
  if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = s, this.client = r, this.id = o || ye, this.language = a, this.libraries = l, this.mapIds = i, this.nonce = d, this.region = u, this.retries = c, this.url = h, this.version = p, q.instance) {
112
- if (!ze(this.options, q.instance.options))
112
+ if (!Ge(this.options, q.instance.options))
113
113
  throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(q.instance.options)}`);
114
114
  return q.instance;
115
115
  }
@@ -209,7 +209,7 @@ class q {
209
209
  f = f[u] || (f[u] = {});
210
210
  const m = f.maps || (f.maps = {}), g = /* @__PURE__ */ new Set(), y = new URLSearchParams(), _ = () => (
211
211
  // @ts-ignore
212
- a || (a = new Promise((w, O) => Ve(this, void 0, void 0, function* () {
212
+ a || (a = new Promise((w, O) => ze(this, void 0, void 0, function* () {
213
213
  var b;
214
214
  yield l = p.createElement("script"), l.id = this.id, y.set("libraries", [...g] + "");
215
215
  for (i in o)
@@ -260,7 +260,7 @@ class q {
260
260
  }
261
261
  }
262
262
  }
263
- function Ge(n) {
263
+ function He(n) {
264
264
  return class extends n.OverlayView {
265
265
  constructor(s) {
266
266
  super();
@@ -356,7 +356,7 @@ const we = [
356
356
  "tilesloaded",
357
357
  "tilt_changed",
358
358
  "zoom_changed"
359
- ], He = P({
359
+ ], We = P({
360
360
  props: {
361
361
  apiPromise: {
362
362
  type: Promise
@@ -569,7 +569,7 @@ const we = [
569
569
  emits: we,
570
570
  setup(n, { emit: e }) {
571
571
  const t = v(), s = v(!1), r = v(), o = v(), a = v(!1);
572
- U(B, r), U(Z, o), U(Te, a);
572
+ D(B, r), D(Z, o), D(Te, a);
573
573
  const l = () => {
574
574
  const c = { ...n };
575
575
  Object.keys(c).forEach((m) => {
@@ -607,7 +607,7 @@ const we = [
607
607
  }
608
608
  }, u = (c) => {
609
609
  o.value = x(c.maps), r.value = x(new c.maps.Map(t.value, l()));
610
- const h = Ge(o.value);
610
+ const h = He(o.value);
611
611
  o.value[re] = h, we.forEach((f) => {
612
612
  var m;
613
613
  (m = r.value) == null || m.addListener(f, (g) => e(f, g));
@@ -639,21 +639,21 @@ const X = (n, e) => {
639
639
  for (const [s, r] of e)
640
640
  t[s] = r;
641
641
  return t;
642
- }, We = {
642
+ }, Ke = {
643
643
  ref: "mapRef",
644
644
  class: "mapdiv"
645
645
  };
646
- function Ke(n, e, t, s, r, o) {
647
- return K(), Y("div", null, [
648
- se("div", We, null, 512),
649
- J(n.$slots, "default", De(Fe({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
646
+ function Ye(n, e, t, s, r, o) {
647
+ return U(), V("div", null, [
648
+ se("div", Ke, null, 512),
649
+ z(n.$slots, "default", Fe(Ue({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
650
650
  ]);
651
651
  }
652
- const At = /* @__PURE__ */ X(He, [["render", Ke], ["__scopeId", "data-v-e7ebb206"]]);
653
- function Ye(n) {
652
+ const It = /* @__PURE__ */ X(We, [["render", Ye], ["__scopeId", "data-v-e7ebb206"]]);
653
+ function Je(n) {
654
654
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
655
655
  }
656
- var Je = function n(e, t) {
656
+ var Xe = function n(e, t) {
657
657
  if (e === t)
658
658
  return !0;
659
659
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -688,7 +688,7 @@ var Je = function n(e, t) {
688
688
  }
689
689
  return e !== e && t !== t;
690
690
  };
691
- const A = /* @__PURE__ */ Ye(Je), ke = ["click", "drag", "dragend", "dragstart", "gmp-click"], Xe = P({
691
+ const A = /* @__PURE__ */ Je(Xe), ke = ["click", "drag", "dragend", "dragstart", "gmp-click"], Qe = P({
692
692
  name: "AdvancedMarker",
693
693
  props: {
694
694
  options: {
@@ -702,10 +702,10 @@ const A = /* @__PURE__ */ Ye(Je), ke = ["click", "drag", "dragend", "dragstart",
702
702
  },
703
703
  emits: ke,
704
704
  setup(n, { emit: e, expose: t, slots: s }) {
705
- const r = v(), o = F(() => {
705
+ const r = v(), o = G(() => {
706
706
  var p;
707
- return (p = s.default) == null ? void 0 : p.call(s).some((f) => f.type !== ue);
708
- }), a = $(n, "options"), l = $(n, "pinOptions"), i = v(), d = C(B, v()), u = C(Z, v()), c = C(fe, v()), h = F(
707
+ return (p = s.content) == null ? void 0 : p.call(s).some((f) => f.type !== ue);
708
+ }), a = $(n, "options"), l = $(n, "pinOptions"), i = v(), d = C(B, v()), u = C(Z, v()), c = C(fe, v()), h = G(
709
709
  () => !!(c.value && u.value && i.value instanceof google.maps.marker.AdvancedMarkerElement)
710
710
  );
711
711
  return S(
@@ -734,22 +734,25 @@ const A = /* @__PURE__ */ Ye(Je), ke = ["click", "drag", "dragend", "dragstart",
734
734
  ), j(() => {
735
735
  var p, f;
736
736
  i.value && ((p = u.value) == null || p.event.clearInstanceListeners(i.value), h.value ? (f = c.value) == null || f.removeMarker(i.value) : i.value.map = null);
737
- }), U(pe, i), t({ marker: i }), { hasSlotContent: o, markerRef: r };
737
+ }), D(pe, i), t({ marker: i }), { hasCustomSlotContent: o, markerRef: r };
738
738
  }
739
739
  });
740
- const Qe = {
740
+ const et = {
741
741
  key: 0,
742
742
  class: "advanced-marker-wrapper"
743
743
  };
744
- function et(n, e, t, s, r, o) {
745
- return n.hasSlotContent ? (K(), Y("div", Qe, [
746
- se("div", de({ ref: "markerRef" }, n.$attrs), [
747
- J(n.$slots, "default")
748
- ], 16)
749
- ])) : he("", !0);
744
+ function tt(n, e, t, s, r, o) {
745
+ return U(), V(Ve, null, [
746
+ n.hasCustomSlotContent ? (U(), V("div", et, [
747
+ se("div", de({ ref: "markerRef" }, n.$attrs), [
748
+ z(n.$slots, "content")
749
+ ], 16)
750
+ ])) : he("", !0),
751
+ z(n.$slots, "default")
752
+ ], 64);
750
753
  }
751
- const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker", st = (n) => n === re, z = (n, e, t, s) => {
752
- const r = v(), o = C(B, v()), a = C(Z, v()), l = C(fe, v()), i = F(
754
+ const Tt = /* @__PURE__ */ X(Qe, [["render", tt]]), st = (n) => n === "Marker", rt = (n) => n === re, W = (n, e, t, s) => {
755
+ const r = v(), o = C(B, v()), a = C(Z, v()), l = C(fe, v()), i = G(
753
756
  () => !!(l.value && a.value && (r.value instanceof a.value.Marker || r.value instanceof a.value[re]))
754
757
  );
755
758
  return S(
@@ -757,9 +760,9 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
757
760
  (d, [u, c]) => {
758
761
  var p, f, m;
759
762
  const h = !A(t.value, c) || o.value !== u;
760
- !o.value || !a.value || !h || (r.value ? (r.value.setOptions(t.value), i.value && ((p = l.value) == null || p.removeMarker(r.value), (f = l.value) == null || f.addMarker(r.value))) : (tt(n) ? r.value = x(
763
+ !o.value || !a.value || !h || (r.value ? (r.value.setOptions(t.value), i.value && ((p = l.value) == null || p.removeMarker(r.value), (f = l.value) == null || f.addMarker(r.value))) : (st(n) ? r.value = x(
761
764
  new a.value[n](t.value)
762
- ) : st(n) ? r.value = x(
765
+ ) : rt(n) ? r.value = x(
763
766
  new a.value[n](t.value)
764
767
  ) : r.value = x(
765
768
  new a.value[n]({
@@ -802,7 +805,7 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
802
805
  "shape_changed",
803
806
  "title_changed",
804
807
  "visible_changed"
805
- ], Tt = P({
808
+ ], $t = P({
806
809
  name: "Marker",
807
810
  props: {
808
811
  options: {
@@ -812,13 +815,13 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
812
815
  },
813
816
  emits: Ce,
814
817
  setup(n, { emit: e, expose: t, slots: s }) {
815
- const r = $(n, "options"), o = z("Marker", Ce, r, e);
816
- return U(pe, o), t({ marker: o }), () => {
818
+ const r = $(n, "options"), o = W("Marker", Ce, r, e);
819
+ return D(pe, o), t({ marker: o }), () => {
817
820
  var a;
818
821
  return (a = s.default) == null ? void 0 : a.call(s);
819
822
  };
820
823
  }
821
- }), $t = P({
824
+ }), Rt = P({
822
825
  name: "Polyline",
823
826
  props: {
824
827
  options: {
@@ -826,13 +829,13 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
826
829
  required: !0
827
830
  }
828
831
  },
829
- emits: V,
832
+ emits: H,
830
833
  setup(n, { emit: e }) {
831
834
  const t = $(n, "options");
832
- return { polyline: z("Polyline", V, t, e) };
835
+ return { polyline: W("Polyline", H, t, e) };
833
836
  },
834
837
  render: () => null
835
- }), Rt = P({
838
+ }), qt = P({
836
839
  name: "Polygon",
837
840
  props: {
838
841
  options: {
@@ -840,13 +843,13 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
840
843
  required: !0
841
844
  }
842
845
  },
843
- emits: V,
846
+ emits: H,
844
847
  setup(n, { emit: e }) {
845
848
  const t = $(n, "options");
846
- return { polygon: z("Polygon", V, t, e) };
849
+ return { polygon: W("Polygon", H, t, e) };
847
850
  },
848
851
  render: () => null
849
- }), be = V.concat(["bounds_changed"]), qt = P({
852
+ }), be = H.concat(["bounds_changed"]), jt = P({
850
853
  name: "Rectangle",
851
854
  props: {
852
855
  options: {
@@ -857,10 +860,10 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
857
860
  emits: be,
858
861
  setup(n, { emit: e }) {
859
862
  const t = $(n, "options");
860
- return { rectangle: z("Rectangle", be, t, e) };
863
+ return { rectangle: W("Rectangle", be, t, e) };
861
864
  },
862
865
  render: () => null
863
- }), Me = V.concat(["center_changed", "radius_changed"]), jt = P({
866
+ }), Me = H.concat(["center_changed", "radius_changed"]), Bt = P({
864
867
  name: "Circle",
865
868
  props: {
866
869
  options: {
@@ -871,10 +874,10 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
871
874
  emits: Me,
872
875
  setup(n, { emit: e }) {
873
876
  const t = $(n, "options");
874
- return { circle: z("Circle", Me, t, e) };
877
+ return { circle: W("Circle", Me, t, e) };
875
878
  },
876
879
  render: () => null
877
- }), rt = P({
880
+ }), nt = P({
878
881
  props: {
879
882
  position: {
880
883
  type: String,
@@ -920,16 +923,16 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
920
923
  ), { controlRef: t };
921
924
  }
922
925
  });
923
- const nt = {
926
+ const ot = {
924
927
  ref: "controlRef",
925
928
  class: "custom-control-wrapper"
926
929
  };
927
- function ot(n, e, t, s, r, o) {
928
- return K(), Y("div", nt, [
929
- J(n.$slots, "default", {}, void 0, !0)
930
+ function it(n, e, t, s, r, o) {
931
+ return U(), V("div", ot, [
932
+ z(n.$slots, "default", {}, void 0, !0)
930
933
  ], 512);
931
934
  }
932
- const Bt = /* @__PURE__ */ X(rt, [["render", ot], ["__scopeId", "data-v-d099a3a6"]]), Oe = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], it = P({
935
+ const Zt = /* @__PURE__ */ X(nt, [["render", it], ["__scopeId", "data-v-d099a3a6"]]), Oe = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], at = P({
933
936
  inheritAttrs: !1,
934
937
  props: {
935
938
  options: {
@@ -944,7 +947,7 @@ const Bt = /* @__PURE__ */ X(rt, [["render", ot], ["__scopeId", "data-v-d099a3a6
944
947
  setup(n, { slots: e, emit: t, expose: s }) {
945
948
  const r = v(), o = v(), a = C(B, v()), l = C(Z, v()), i = C(pe, v());
946
949
  let d, u = n.modelValue;
947
- const c = F(() => {
950
+ const c = G(() => {
948
951
  var m;
949
952
  return (m = e.default) == null ? void 0 : m.call(e).some((g) => g.type !== ue);
950
953
  }), h = (m) => {
@@ -990,18 +993,18 @@ const Bt = /* @__PURE__ */ X(rt, [["render", ot], ["__scopeId", "data-v-d099a3a6
990
993
  }), s({ infoWindow: r, open: p, close: f }), { infoWindow: r, infoWindowRef: o, hasSlotContent: c, open: p, close: f };
991
994
  }
992
995
  });
993
- const at = {
996
+ const lt = {
994
997
  key: 0,
995
998
  class: "info-window-wrapper"
996
999
  };
997
- function lt(n, e, t, s, r, o) {
998
- return n.hasSlotContent ? (K(), Y("div", at, [
1000
+ function ct(n, e, t, s, r, o) {
1001
+ return n.hasSlotContent ? (U(), V("div", lt, [
999
1002
  se("div", de({ ref: "infoWindowRef" }, n.$attrs), [
1000
- J(n.$slots, "default", {}, void 0, !0)
1003
+ z(n.$slots, "default", {}, void 0, !0)
1001
1004
  ], 16)
1002
1005
  ])) : he("", !0);
1003
1006
  }
1004
- const Zt = /* @__PURE__ */ X(it, [["render", lt], ["__scopeId", "data-v-cbe1707b"]]), Ee = [
1007
+ const Nt = /* @__PURE__ */ X(at, [["render", ct], ["__scopeId", "data-v-cbe1707b"]]), Ee = [
1005
1008
  Int8Array,
1006
1009
  Uint8Array,
1007
1010
  Uint8ClampedArray,
@@ -1011,7 +1014,7 @@ const Zt = /* @__PURE__ */ X(it, [["render", lt], ["__scopeId", "data-v-cbe1707b
1011
1014
  Uint32Array,
1012
1015
  Float32Array,
1013
1016
  Float64Array
1014
- ], ie = 1, G = 8;
1017
+ ], ie = 1, K = 8;
1015
1018
  class me {
1016
1019
  /**
1017
1020
  * Creates an index from raw `ArrayBuffer` data.
@@ -1046,7 +1049,7 @@ class me {
1046
1049
  const o = Ee.indexOf(this.ArrayType), a = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, i = (8 - l % 8) % 8;
1047
1050
  if (o < 0)
1048
1051
  throw new Error(`Unexpected typed array class: ${s}.`);
1049
- r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, G, e), this.coords = new this.ArrayType(this.data, G + l + i, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(G + a + l + i), this.ids = new this.IndexArrayType(this.data, G, e), this.coords = new this.ArrayType(this.data, G + l + i, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (ie << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
1052
+ r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, K, e), this.coords = new this.ArrayType(this.data, K + l + i, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(K + a + l + i), this.ids = new this.IndexArrayType(this.data, K, e), this.coords = new this.ArrayType(this.data, K + l + i, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (ie << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
1050
1053
  }
1051
1054
  /**
1052
1055
  * Add a point to the index.
@@ -1131,16 +1134,16 @@ function $e(n, e, t, s, r, o) {
1131
1134
  }
1132
1135
  const a = e[2 * t + o];
1133
1136
  let l = s, i = r;
1134
- for (H(n, e, s, t), e[2 * r + o] > a && H(n, e, s, r); l < i; ) {
1135
- for (H(n, e, l, i), l++, i--; e[2 * l + o] < a; )
1137
+ for (Y(n, e, s, t), e[2 * r + o] > a && Y(n, e, s, r); l < i; ) {
1138
+ for (Y(n, e, l, i), l++, i--; e[2 * l + o] < a; )
1136
1139
  l++;
1137
1140
  for (; e[2 * i + o] > a; )
1138
1141
  i--;
1139
1142
  }
1140
- e[2 * s + o] === a ? H(n, e, s, i) : (i++, H(n, e, i, r)), i <= t && (s = i + 1), t <= i && (r = i - 1);
1143
+ e[2 * s + o] === a ? Y(n, e, s, i) : (i++, Y(n, e, i, r)), i <= t && (s = i + 1), t <= i && (r = i - 1);
1141
1144
  }
1142
1145
  }
1143
- function H(n, e, t, s) {
1146
+ function Y(n, e, t, s) {
1144
1147
  ae(n, t, s), ae(e, 2 * t, 2 * s), ae(e, 2 * t + 1, 2 * s + 1);
1145
1148
  }
1146
1149
  function ae(n, e, t) {
@@ -1151,7 +1154,7 @@ function Pe(n, e, t, s) {
1151
1154
  const r = n - t, o = e - s;
1152
1155
  return r * r + o * o;
1153
1156
  }
1154
- const ct = {
1157
+ const ut = {
1155
1158
  minZoom: 0,
1156
1159
  // min zoom to generate clusters on
1157
1160
  maxZoom: 16,
@@ -1177,7 +1180,7 @@ const ct = {
1177
1180
  }, Se = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), R = 2, T = 3, le = 4, I = 5, Re = 6;
1178
1181
  class qe {
1179
1182
  constructor(e) {
1180
- this.options = Object.assign(Object.create(ct), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1183
+ this.options = Object.assign(Object.create(ut), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1181
1184
  }
1182
1185
  load(e) {
1183
1186
  const { log: t, minZoom: s, maxZoom: r } = this.options;
@@ -1394,7 +1397,7 @@ function Le(n, e, t) {
1394
1397
  properties: je(n, e, t),
1395
1398
  geometry: {
1396
1399
  type: "Point",
1397
- coordinates: [ut(n[e]), dt(n[e + 1])]
1400
+ coordinates: [dt(n[e]), ht(n[e + 1])]
1398
1401
  }
1399
1402
  };
1400
1403
  }
@@ -1414,10 +1417,10 @@ function te(n) {
1414
1417
  const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1415
1418
  return t < 0 ? 0 : t > 1 ? 1 : t;
1416
1419
  }
1417
- function ut(n) {
1420
+ function dt(n) {
1418
1421
  return (n - 0.5) * 360;
1419
1422
  }
1420
- function dt(n) {
1423
+ function ht(n) {
1421
1424
  const e = (180 - n * 360) * Math.PI / 180;
1422
1425
  return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
1423
1426
  }
@@ -1470,7 +1473,7 @@ class k {
1470
1473
  return this.isAdvancedMarker(e) ? !0 : e.getVisible();
1471
1474
  }
1472
1475
  }
1473
- class W {
1476
+ class J {
1474
1477
  constructor({ markers: e, position: t }) {
1475
1478
  this.markers = e, t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
1476
1479
  }
@@ -1504,19 +1507,19 @@ class W {
1504
1507
  this.marker && (k.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1505
1508
  }
1506
1509
  }
1507
- const ht = (n, e, t, s) => {
1510
+ const pt = (n, e, t, s) => {
1508
1511
  const r = Be(n.getBounds(), e, s);
1509
1512
  return t.filter((o) => r.contains(k.getPosition(o)));
1510
1513
  }, Be = (n, e, t) => {
1511
- const { northEast: s, southWest: r } = pt(n, e), o = ft({ northEast: s, southWest: r }, t);
1512
- return mt(o, e);
1514
+ const { northEast: s, southWest: r } = ft(n, e), o = mt({ northEast: s, southWest: r }, t);
1515
+ return gt(o, e);
1513
1516
  }, xe = (n, e, t) => {
1514
1517
  const s = Be(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
1515
1518
  return [o.lng(), o.lat(), r.lng(), r.lat()];
1516
- }, pt = (n, e) => ({
1519
+ }, ft = (n, e) => ({
1517
1520
  northEast: e.fromLatLngToDivPixel(n.getNorthEast()),
1518
1521
  southWest: e.fromLatLngToDivPixel(n.getSouthWest())
1519
- }), ft = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), mt = ({ northEast: n, southWest: e }, t) => {
1522
+ }), mt = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), gt = ({ northEast: n, southWest: e }, t) => {
1520
1523
  const s = t.fromDivPixelToLatLng(e), r = t.fromDivPixelToLatLng(n);
1521
1524
  return new google.maps.LatLngBounds(s, r);
1522
1525
  };
@@ -1537,10 +1540,10 @@ class Ze {
1537
1540
  * ```
1538
1541
  */
1539
1542
  noop({ markers: e }) {
1540
- return vt(e);
1543
+ return yt(e);
1541
1544
  }
1542
1545
  }
1543
- class gt extends Ze {
1546
+ class vt extends Ze {
1544
1547
  constructor(e) {
1545
1548
  var { viewportPadding: t = 60 } = e, s = ge(e, ["viewportPadding"]);
1546
1549
  super(s), this.viewportPadding = 60, this.viewportPadding = t;
@@ -1553,18 +1556,18 @@ class gt extends Ze {
1553
1556
  changed: !1
1554
1557
  } : {
1555
1558
  clusters: this.cluster({
1556
- markers: ht(t, s, e, this.viewportPadding),
1559
+ markers: pt(t, s, e, this.viewportPadding),
1557
1560
  map: t,
1558
1561
  mapCanvasProjection: s
1559
1562
  })
1560
1563
  };
1561
1564
  }
1562
1565
  }
1563
- const vt = (n) => n.map((t) => new W({
1566
+ const yt = (n) => n.map((t) => new J({
1564
1567
  position: k.getPosition(t),
1565
1568
  markers: [t]
1566
1569
  }));
1567
- class yt extends Ze {
1570
+ class _t extends Ze {
1568
1571
  constructor(e) {
1569
1572
  var { maxZoom: t, radius: s = 60 } = e, r = ge(e, ["maxZoom", "radius"]);
1570
1573
  super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new qe(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
@@ -1594,18 +1597,18 @@ class yt extends Ze {
1594
1597
  }
1595
1598
  transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
1596
1599
  if (s.cluster)
1597
- return new W({
1600
+ return new J({
1598
1601
  markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
1599
1602
  position: { lat: t, lng: e }
1600
1603
  });
1601
1604
  const r = s.marker;
1602
- return new W({
1605
+ return new J({
1603
1606
  markers: [r],
1604
1607
  position: k.getPosition(r)
1605
1608
  });
1606
1609
  }
1607
1610
  }
1608
- class _t extends gt {
1611
+ class wt extends vt {
1609
1612
  constructor(e) {
1610
1613
  var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = ge(e, ["maxZoom", "radius", "viewportPadding"]);
1611
1614
  super({ maxZoom: t, viewportPadding: r }), this.superCluster = new qe(Object.assign({ maxZoom: this.maxZoom, radius: s }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
@@ -1642,18 +1645,18 @@ class _t extends gt {
1642
1645
  }
1643
1646
  transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
1644
1647
  if (s.cluster)
1645
- return new W({
1648
+ return new J({
1646
1649
  markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
1647
1650
  position: { lat: t, lng: e }
1648
1651
  });
1649
1652
  const r = s.marker;
1650
- return new W({
1653
+ return new J({
1651
1654
  markers: [r],
1652
1655
  position: k.getPosition(r)
1653
1656
  });
1654
1657
  }
1655
1658
  }
1656
- class wt {
1659
+ class kt {
1657
1660
  constructor(e, t) {
1658
1661
  this.markers = { sum: e.length };
1659
1662
  const s = t.map((o) => o.count), r = s.reduce((o, a) => o + a, 0);
@@ -1668,7 +1671,7 @@ class wt {
1668
1671
  };
1669
1672
  }
1670
1673
  }
1671
- class kt {
1674
+ class Ct {
1672
1675
  /**
1673
1676
  * The default render function for the library used by {@link MarkerClusterer}.
1674
1677
  *
@@ -1740,24 +1743,24 @@ class kt {
1740
1743
  return new google.maps.Marker(d);
1741
1744
  }
1742
1745
  }
1743
- function Ct(n, e) {
1746
+ function bt(n, e) {
1744
1747
  for (let t in e.prototype)
1745
1748
  n.prototype[t] = e.prototype[t];
1746
1749
  }
1747
1750
  class ve {
1748
1751
  constructor() {
1749
- Ct(ve, google.maps.OverlayView);
1752
+ bt(ve, google.maps.OverlayView);
1750
1753
  }
1751
1754
  }
1752
- var D;
1755
+ var F;
1753
1756
  (function(n) {
1754
1757
  n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click";
1755
- })(D || (D = {}));
1756
- const bt = (n, e, t) => {
1758
+ })(F || (F = {}));
1759
+ const Mt = (n, e, t) => {
1757
1760
  t.fitBounds(e.bounds);
1758
1761
  };
1759
- class Mt extends ve {
1760
- constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new yt(s), renderer: o = new kt(), onClusterClick: a = bt }) {
1762
+ class Ot extends ve {
1763
+ constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new _t(s), renderer: o = new Ct(), onClusterClick: a = Mt }) {
1761
1764
  super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = a, e && this.setMap(e);
1762
1765
  }
1763
1766
  addMarker(e, t) {
@@ -1787,7 +1790,7 @@ class Mt extends ve {
1787
1790
  render() {
1788
1791
  const e = this.getMap();
1789
1792
  if (e instanceof google.maps.Map && e.getProjection()) {
1790
- google.maps.event.trigger(this, D.CLUSTERING_BEGIN, this);
1793
+ google.maps.event.trigger(this, F.CLUSTERING_BEGIN, this);
1791
1794
  const { clusters: t, changed: s } = this.algorithm.calculate({
1792
1795
  markers: this.markers,
1793
1796
  map: e,
@@ -1802,7 +1805,7 @@ class Mt extends ve {
1802
1805
  a.marker != null && (a.markers.length == 1 ? r.has(a.marker) || k.setMap(a.marker, null) : o.push(a.marker));
1803
1806
  this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((a) => k.setMap(a, null)));
1804
1807
  }
1805
- google.maps.event.trigger(this, D.CLUSTERING_END, this);
1808
+ google.maps.event.trigger(this, F.CLUSTERING_END, this);
1806
1809
  }
1807
1810
  }
1808
1811
  onAdd() {
@@ -1815,19 +1818,19 @@ class Mt extends ve {
1815
1818
  this.markers.forEach((e) => k.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1816
1819
  }
1817
1820
  renderClusters() {
1818
- const e = new wt(this.markers, this.clusters), t = this.getMap();
1821
+ const e = new kt(this.markers, this.clusters), t = this.getMap();
1819
1822
  this.clusters.forEach((s) => {
1820
1823
  s.markers.length === 1 ? s.marker = s.markers[0] : (s.marker = this.renderer.render(s, e, t), s.markers.forEach((r) => k.setMap(r, null)), this.onClusterClick && s.marker.addListener(
1821
1824
  "click",
1822
1825
  /* istanbul ignore next */
1823
1826
  (r) => {
1824
- google.maps.event.trigger(this, D.CLUSTER_CLICK, s), this.onClusterClick(r, s, t);
1827
+ google.maps.event.trigger(this, F.CLUSTER_CLICK, s), this.onClusterClick(r, s, t);
1825
1828
  }
1826
1829
  )), k.setMap(s.marker, t);
1827
1830
  });
1828
1831
  }
1829
1832
  }
1830
- const Ae = Object.values(D), Nt = P({
1833
+ const Ae = Object.values(F), Dt = P({
1831
1834
  name: "MarkerCluster",
1832
1835
  props: {
1833
1836
  options: {
@@ -1838,15 +1841,15 @@ const Ae = Object.values(D), Nt = P({
1838
1841
  emits: Ae,
1839
1842
  setup(n, { emit: e, expose: t, slots: s }) {
1840
1843
  const r = v(), o = C(B, v()), a = C(Z, v());
1841
- return U(fe, r), S(
1844
+ return D(fe, r), S(
1842
1845
  o,
1843
1846
  () => {
1844
1847
  o.value && (r.value = x(
1845
- new Mt({
1848
+ new Ot({
1846
1849
  map: o.value,
1847
1850
  // Better perf than the default `SuperClusterAlgorithm`. See:
1848
1851
  // https://github.com/googlemaps/js-markerclusterer/pull/640
1849
- algorithm: new _t(n.options.algorithmOptions ?? {}),
1852
+ algorithm: new wt(n.options.algorithmOptions ?? {}),
1850
1853
  ...n.options
1851
1854
  })
1852
1855
  ), Ae.forEach((l) => {
@@ -1865,7 +1868,7 @@ const Ae = Object.values(D), Nt = P({
1865
1868
  return (l = s.default) == null ? void 0 : l.call(s);
1866
1869
  };
1867
1870
  }
1868
- }), Ot = P({
1871
+ }), Et = P({
1869
1872
  inheritAttrs: !1,
1870
1873
  props: {
1871
1874
  options: {
@@ -1874,33 +1877,33 @@ const Ae = Object.values(D), Nt = P({
1874
1877
  }
1875
1878
  },
1876
1879
  setup(n, { slots: e, emit: t, expose: s }) {
1877
- const r = v(), o = F(() => {
1880
+ const r = v(), o = G(() => {
1878
1881
  var i;
1879
1882
  return (i = e.default) == null ? void 0 : i.call(e).some((d) => d.type !== ue);
1880
- }), a = F(() => ({
1883
+ }), a = G(() => ({
1881
1884
  ...n.options,
1882
1885
  element: r.value
1883
- })), l = z(re, [], a, t);
1886
+ })), l = W(re, [], a, t);
1884
1887
  return s({
1885
1888
  customMarker: l
1886
1889
  }), { customMarkerRef: r, customMarker: l, hasSlotContent: o };
1887
1890
  }
1888
1891
  });
1889
- const Et = {
1892
+ const Pt = {
1890
1893
  key: 0,
1891
1894
  class: "custom-marker-wrapper"
1892
1895
  };
1893
- function Pt(n, e, t, s, r, o) {
1894
- return n.hasSlotContent ? (K(), Y("div", Et, [
1896
+ function St(n, e, t, s, r, o) {
1897
+ return n.hasSlotContent ? (U(), V("div", Pt, [
1895
1898
  se("div", de({
1896
1899
  ref: "customMarkerRef",
1897
1900
  style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
1898
1901
  }, n.$attrs), [
1899
- J(n.$slots, "default", {}, void 0, !0)
1902
+ z(n.$slots, "default", {}, void 0, !0)
1900
1903
  ], 16)
1901
1904
  ])) : he("", !0);
1902
1905
  }
1903
- const Ut = /* @__PURE__ */ X(Ot, [["render", Pt], ["__scopeId", "data-v-2d2d343a"]]), Dt = P({
1906
+ const Ft = /* @__PURE__ */ X(Et, [["render", St], ["__scopeId", "data-v-2d2d343a"]]), Ut = P({
1904
1907
  name: "HeatmapLayer",
1905
1908
  props: {
1906
1909
  options: {
@@ -1913,17 +1916,20 @@ const Ut = /* @__PURE__ */ X(Ot, [["render", Pt], ["__scopeId", "data-v-2d2d343a
1913
1916
  return S(
1914
1917
  [t, () => n.options],
1915
1918
  ([r, o], [a, l]) => {
1916
- var d;
1917
1919
  const i = !A(o, l) || t.value !== a;
1918
1920
  if (t.value && s.value && i) {
1919
- const u = structuredClone(o);
1920
- if (u.data && !(u.data instanceof s.value.MVCArray)) {
1921
- const c = s.value.LatLng;
1922
- u.data = (d = u.data) == null ? void 0 : d.map((h) => h instanceof c || "location" in h && (h.location instanceof c || h.location === null) ? h : "location" in h ? { ...h, location: new c(h.location) } : new c(h));
1923
- }
1924
- e.value ? e.value.setOptions(u) : e.value = x(
1921
+ let d;
1922
+ if (o.data && !(o.data instanceof s.value.MVCArray)) {
1923
+ const u = s.value.LatLng, c = o.data.map((h) => h instanceof u || "location" in h && (h.location instanceof u || h.location === null) ? h : "location" in h ? { ...h, location: new u(h.location) } : new u(h));
1924
+ d = {
1925
+ ...o,
1926
+ data: c
1927
+ };
1928
+ } else
1929
+ d = o;
1930
+ e.value ? e.value.setOptions(d) : e.value = x(
1925
1931
  new s.value.visualization.HeatmapLayer({
1926
- ...u,
1932
+ ...d,
1927
1933
  map: t.value
1928
1934
  })
1929
1935
  );
@@ -1937,16 +1943,16 @@ const Ut = /* @__PURE__ */ X(Ot, [["render", Pt], ["__scopeId", "data-v-2d2d343a
1937
1943
  render: () => null
1938
1944
  });
1939
1945
  export {
1940
- It as AdvancedMarker,
1941
- jt as Circle,
1942
- Bt as CustomControl,
1943
- Ut as CustomMarker,
1944
- At as GoogleMap,
1945
- Dt as HeatmapLayer,
1946
- Zt as InfoWindow,
1947
- Tt as Marker,
1948
- Nt as MarkerCluster,
1949
- Rt as Polygon,
1950
- $t as Polyline,
1951
- qt as Rectangle
1946
+ Tt as AdvancedMarker,
1947
+ Bt as Circle,
1948
+ Zt as CustomControl,
1949
+ Ft as CustomMarker,
1950
+ It as GoogleMap,
1951
+ Ut as HeatmapLayer,
1952
+ Nt as InfoWindow,
1953
+ $t as Marker,
1954
+ Dt as MarkerCluster,
1955
+ qt as Polygon,
1956
+ Rt as Polyline,
1957
+ jt as Rectangle
1952
1958
  };