vue3-google-map 0.21.1 → 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
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-d05fc6bc]{width:100%;height:100%}.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(d){console.error("vite-plugin-css-injected-by-js",d)}})();
2
- var Be = Object.defineProperty;
3
- var Ze = (n, e, t) => e in n ? Be(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
- var se = (n, e, t) => (Ze(n, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { defineComponent as P, ref as y, provide as U, watch as L, onMounted as Pe, onBeforeUnmount as q, markRaw as x, toRef as $, openBlock as J, createElementBlock as X, createElementVNode as ae, renderSlot as Q, normalizeProps as Ne, guardReactiveProps as Ue, inject as b, computed as H, Comment as Le, mergeProps as Se, createCommentVNode as xe } from "vue";
6
- const B = Symbol("map"), Z = Symbol("api"), le = Symbol("marker"), ce = Symbol("markerCluster"), ee = Symbol("CustomMarker"), Ae = Symbol("mapTilesLoaded"), F = [
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
+ var Ne = Object.defineProperty;
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,34 +30,34 @@ 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 De(n, e, t, s) {
33
+ function ze(n, e, t, s) {
34
34
  function r(o) {
35
- return o instanceof t ? o : new t(function(i) {
36
- i(o);
35
+ return o instanceof t ? o : new t(function(a) {
36
+ a(o);
37
37
  });
38
38
  }
39
- return new (t || (t = Promise))(function(o, i) {
40
- function c(u) {
39
+ return new (t || (t = Promise))(function(o, a) {
40
+ function l(u) {
41
41
  try {
42
42
  d(s.next(u));
43
- } catch (l) {
44
- i(l);
43
+ } catch (c) {
44
+ a(c);
45
45
  }
46
46
  }
47
- function a(u) {
47
+ function i(u) {
48
48
  try {
49
49
  d(s.throw(u));
50
- } catch (l) {
51
- i(l);
50
+ } catch (c) {
51
+ a(c);
52
52
  }
53
53
  }
54
54
  function d(u) {
55
- u.done ? o(u.value) : r(u.value).then(c, a);
55
+ u.done ? o(u.value) : r(u.value).then(l, i);
56
56
  }
57
57
  d((s = s.apply(n, e || [])).next());
58
58
  });
59
59
  }
60
- var Fe = 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") {
@@ -84,20 +84,20 @@ var Fe = function n(e, t) {
84
84
  if (!Object.prototype.hasOwnProperty.call(t, o[r]))
85
85
  return !1;
86
86
  for (r = s; r-- !== 0; ) {
87
- var i = o[r];
88
- if (!n(e[i], t[i]))
87
+ var a = o[r];
88
+ if (!n(e[a], t[a]))
89
89
  return !1;
90
90
  }
91
91
  return !0;
92
92
  }
93
93
  return e !== e && t !== t;
94
94
  };
95
- const pe = "__googleMapsScriptId";
95
+ const ye = "__googleMapsScriptId";
96
96
  var N;
97
97
  (function(n) {
98
98
  n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
99
99
  })(N || (N = {}));
100
- class j {
100
+ class q {
101
101
  /**
102
102
  * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
103
103
  * using this library, instead the defaults are set by the Google Maps
@@ -107,13 +107,13 @@ class j {
107
107
  * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
108
108
  * ```
109
109
  */
110
- constructor({ apiKey: e, authReferrerPolicy: t, channel: s, client: r, id: o = pe, language: i, libraries: c = [], mapIds: a, nonce: d, region: u, retries: l = 3, url: h = "https://maps.googleapis.com/maps/api/js", version: p }) {
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 || pe, this.language = i, this.libraries = c, this.mapIds = a, this.nonce = d, this.region = u, this.retries = l, this.url = h, this.version = p, j.instance) {
112
- if (!Fe(this.options, j.instance.options))
113
- throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(j.instance.options)}`);
114
- return j.instance;
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
+ 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 (!Ge(this.options, q.instance.options))
113
+ throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(q.instance.options)}`);
114
+ return q.instance;
115
115
  }
116
- j.instance = this;
116
+ q.instance = this;
117
117
  }
118
118
  get options() {
119
119
  return {
@@ -205,24 +205,24 @@ class j {
205
205
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
206
206
  (o) => !s[o] && delete s[o]
207
207
  ), !((t = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || t === void 0) && t.importLibrary || ((o) => {
208
- let i, c, a, d = "The Google Maps JavaScript API", u = "google", l = "importLibrary", h = "__ib__", p = document, m = window;
209
- m = m[u] || (m[u] = {});
210
- const f = m.maps || (m.maps = {}), g = /* @__PURE__ */ new Set(), v = new URLSearchParams(), w = () => (
208
+ let a, l, i, d = "The Google Maps JavaScript API", u = "google", c = "importLibrary", h = "__ib__", p = document, f = window;
209
+ f = f[u] || (f[u] = {});
210
+ const m = f.maps || (f.maps = {}), g = /* @__PURE__ */ new Set(), y = new URLSearchParams(), _ = () => (
211
211
  // @ts-ignore
212
- i || (i = new Promise((_, O) => De(this, void 0, void 0, function* () {
213
- var M;
214
- yield c = p.createElement("script"), c.id = this.id, v.set("libraries", [...g] + "");
215
- for (a in o)
216
- v.set(a.replace(/[A-Z]/g, (E) => "_" + E[0].toLowerCase()), o[a]);
217
- v.set("callback", u + ".maps." + h), c.src = this.url + "?" + v, f[h] = _, c.onerror = () => i = O(Error(d + " could not load.")), c.nonce = this.nonce || ((M = p.querySelector("script[nonce]")) === null || M === void 0 ? void 0 : M.nonce) || "", p.head.append(c);
212
+ a || (a = new Promise((w, O) => ze(this, void 0, void 0, function* () {
213
+ var b;
214
+ yield l = p.createElement("script"), l.id = this.id, y.set("libraries", [...g] + "");
215
+ for (i in o)
216
+ y.set(i.replace(/[A-Z]/g, (E) => "_" + E[0].toLowerCase()), o[i]);
217
+ y.set("callback", u + ".maps." + h), l.src = this.url + "?" + y, m[h] = w, l.onerror = () => a = O(Error(d + " could not load.")), l.nonce = this.nonce || ((b = p.querySelector("script[nonce]")) === null || b === void 0 ? void 0 : b.nonce) || "", p.head.append(l);
218
218
  })))
219
219
  );
220
- f[l] ? console.warn(d + " only loads once. Ignoring:", o) : f[l] = (_, ...O) => g.add(_) && w().then(() => f[l](_, ...O));
220
+ m[c] ? console.warn(d + " only loads once. Ignoring:", o) : m[c] = (w, ...O) => g.add(w) && _().then(() => m[c](w, ...O));
221
221
  })(s);
222
222
  const r = this.libraries.map((o) => this.importLibrary(o));
223
223
  r.length || r.push(this.importLibrary("core")), Promise.all(r).then(() => this.callback(), (o) => {
224
- const i = new ErrorEvent("error", { error: o });
225
- this.loadErrorCallback(i);
224
+ const a = new ErrorEvent("error", { error: o });
225
+ this.loadErrorCallback(a);
226
226
  });
227
227
  }
228
228
  /**
@@ -260,12 +260,12 @@ class j {
260
260
  }
261
261
  }
262
262
  }
263
- function Ve(n) {
263
+ function He(n) {
264
264
  return class extends n.OverlayView {
265
265
  constructor(s) {
266
266
  super();
267
- se(this, "element");
268
- se(this, "opts");
267
+ oe(this, "element");
268
+ oe(this, "opts");
269
269
  const { element: r, ...o } = s;
270
270
  this.element = r, this.opts = o, this.opts.map && this.setMap(this.opts.map);
271
271
  }
@@ -290,37 +290,37 @@ function Ve(n) {
290
290
  const s = this.getProjection(), r = s == null ? void 0 : s.fromLatLngToDivPixel(this.getPosition());
291
291
  if (r) {
292
292
  this.element.style.position = "absolute";
293
- let o, i;
293
+ let o, a;
294
294
  switch (this.opts.anchorPoint) {
295
295
  case "TOP_CENTER":
296
- o = "-50%", i = "-100%";
296
+ o = "-50%", a = "-100%";
297
297
  break;
298
298
  case "BOTTOM_CENTER":
299
- o = "-50%", i = "0";
299
+ o = "-50%", a = "0";
300
300
  break;
301
301
  case "LEFT_CENTER":
302
- o = "-100%", i = "-50%";
302
+ o = "-100%", a = "-50%";
303
303
  break;
304
304
  case "RIGHT_CENTER":
305
- o = "0", i = "-50%";
305
+ o = "0", a = "-50%";
306
306
  break;
307
307
  case "TOP_LEFT":
308
- o = "-100%", i = "-100%";
308
+ o = "-100%", a = "-100%";
309
309
  break;
310
310
  case "TOP_RIGHT":
311
- o = "0", i = "-100%";
311
+ o = "0", a = "-100%";
312
312
  break;
313
313
  case "BOTTOM_LEFT":
314
- o = "-100%", i = "0";
314
+ o = "-100%", a = "0";
315
315
  break;
316
316
  case "BOTTOM_RIGHT":
317
- o = "0", i = "0";
317
+ o = "0", a = "0";
318
318
  break;
319
319
  default:
320
- o = "-50%", i = "-50%";
320
+ o = "-50%", a = "-50%";
321
321
  }
322
- const c = r.x + (this.opts.offsetX || 0) + "px", a = r.y + (this.opts.offsetY || 0) + "px";
323
- this.element.style.transform = `translateX(${o}) translateX(${c}) translateY(${i}) translateY(${a})`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
322
+ const l = r.x + (this.opts.offsetX || 0) + "px", i = r.y + (this.opts.offsetY || 0) + "px";
323
+ this.element.style.transform = `translateX(${o}) translateX(${l}) translateY(${a}) translateY(${i})`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
324
324
  }
325
325
  }
326
326
  onRemove() {
@@ -332,8 +332,8 @@ function Ve(n) {
332
332
  }
333
333
  };
334
334
  }
335
- let fe;
336
- const me = [
335
+ let _e;
336
+ const we = [
337
337
  "bounds_changed",
338
338
  "center_changed",
339
339
  "click",
@@ -356,7 +356,7 @@ const me = [
356
356
  "tilesloaded",
357
357
  "tilt_changed",
358
358
  "zoom_changed"
359
- ], ze = P({
359
+ ], We = P({
360
360
  props: {
361
361
  apiPromise: {
362
362
  type: Promise
@@ -394,6 +394,10 @@ const me = [
394
394
  required: !1,
395
395
  default: void 0
396
396
  },
397
+ colorScheme: {
398
+ type: String,
399
+ required: !1
400
+ },
397
401
  controlSize: {
398
402
  type: Number,
399
403
  required: !1
@@ -548,98 +552,108 @@ const me = [
548
552
  type: String,
549
553
  required: !1
550
554
  },
555
+ cameraControl: {
556
+ type: Boolean,
557
+ required: !1,
558
+ default: void 0
559
+ },
560
+ cameraControlPosition: {
561
+ type: String,
562
+ required: !1
563
+ },
551
564
  nonce: {
552
565
  type: String,
553
566
  default: ""
554
567
  }
555
568
  },
556
- emits: me,
569
+ emits: we,
557
570
  setup(n, { emit: e }) {
558
- const t = y(), s = y(!1), r = y(), o = y(), i = y(!1);
559
- U(B, r), U(Z, o), U(Ae, i);
560
- const c = () => {
561
- const l = { ...n };
562
- Object.keys(l).forEach((f) => {
563
- l[f] === void 0 && delete l[f];
571
+ const t = v(), s = v(!1), r = v(), o = v(), a = v(!1);
572
+ D(B, r), D(Z, o), D(Te, a);
573
+ const l = () => {
574
+ const c = { ...n };
575
+ Object.keys(c).forEach((m) => {
576
+ c[m] === void 0 && delete c[m];
564
577
  });
565
- const p = (f) => {
578
+ const p = (m) => {
566
579
  var g;
567
- return f ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[f] } : {};
568
- }, m = {
580
+ return m ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[m] } : {};
581
+ }, f = {
569
582
  scaleControlOptions: n.scaleControlStyle ? { style: n.scaleControlStyle } : {},
570
583
  panControlOptions: p(n.panControlPosition),
571
584
  zoomControlOptions: p(n.zoomControlPosition),
572
585
  rotateControlOptions: p(n.rotateControlPosition),
573
586
  streetViewControlOptions: p(n.streetViewControlPosition),
574
587
  fullscreenControlOptions: p(n.fullscreenControlPosition),
588
+ cameraControlOptions: p(n.cameraControlPosition),
575
589
  disableDefaultUI: n.disableDefaultUi
576
590
  };
577
- return { ...l, ...m };
578
- }, a = L(
591
+ return { ...c, ...f };
592
+ }, i = S(
579
593
  [o, r],
580
- ([l, h]) => {
581
- const p = l, m = h;
582
- p && m && (p.event.addListenerOnce(m, "tilesloaded", () => {
583
- i.value = !0;
584
- }), setTimeout(a, 0));
594
+ ([c, h]) => {
595
+ const p = c, f = h;
596
+ p && f && (p.event.addListenerOnce(f, "tilesloaded", () => {
597
+ a.value = !0;
598
+ }), setTimeout(i, 0));
585
599
  },
586
600
  { immediate: !0 }
587
601
  ), d = () => {
588
602
  try {
589
- const { apiKey: l, region: h, version: p, language: m, libraries: f, nonce: g } = n;
590
- fe = new j({ apiKey: l, region: h, version: p, language: m, libraries: f, nonce: g });
591
- } catch (l) {
592
- console.error(l);
603
+ const { apiKey: c, region: h, version: p, language: f, libraries: m, nonce: g } = n;
604
+ _e = new q({ apiKey: c, region: h, version: p, language: f, libraries: m, nonce: g });
605
+ } catch (c) {
606
+ console.error(c);
593
607
  }
594
- }, u = (l) => {
595
- o.value = x(l.maps), r.value = x(new l.maps.Map(t.value, c()));
596
- const h = Ve(o.value);
597
- o.value[ee] = h, me.forEach((m) => {
598
- var f;
599
- (f = r.value) == null || f.addListener(m, (g) => e(m, g));
608
+ }, u = (c) => {
609
+ o.value = x(c.maps), r.value = x(new c.maps.Map(t.value, l()));
610
+ const h = He(o.value);
611
+ o.value[re] = h, we.forEach((f) => {
612
+ var m;
613
+ (m = r.value) == null || m.addListener(f, (g) => e(f, g));
600
614
  }), s.value = !0;
601
615
  const p = Object.keys(n).filter(
602
- (m) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom", "nonce"].includes(m)
603
- ).map((m) => $(n, m));
604
- L(
616
+ (f) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom", "nonce"].includes(f)
617
+ ).map((f) => $(n, f));
618
+ S(
605
619
  [() => n.center, () => n.zoom, ...p],
606
- ([m, f], [g, v]) => {
607
- var E, k, S;
608
- const { center: w, zoom: _, ...O } = c();
609
- (E = r.value) == null || E.setOptions(O), f !== void 0 && f !== v && ((k = r.value) == null || k.setZoom(f));
610
- const M = !g || m.lng !== g.lng || m.lat !== g.lat;
611
- m && M && ((S = r.value) == null || S.panTo(m));
620
+ ([f, m], [g, y]) => {
621
+ var E, M, L;
622
+ const { center: _, zoom: w, ...O } = l();
623
+ (E = r.value) == null || E.setOptions(O), m !== void 0 && m !== y && ((M = r.value) == null || M.setZoom(m));
624
+ const b = !g || f.lng !== g.lng || f.lat !== g.lat;
625
+ f && b && ((L = r.value) == null || L.panTo(f));
612
626
  }
613
627
  );
614
628
  };
615
- return Pe(() => {
616
- n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (d(), fe.load().then(u));
617
- }), q(() => {
618
- var l;
619
- i.value = !1, r.value && ((l = o.value) == null || l.event.clearInstanceListeners(r.value));
620
- }), { mapRef: t, ready: s, map: r, api: o, mapTilesLoaded: i };
629
+ return Ie(() => {
630
+ n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (d(), _e.load().then(u));
631
+ }), j(() => {
632
+ var c;
633
+ a.value = !1, r.value && ((c = o.value) == null || c.event.clearInstanceListeners(r.value));
634
+ }), { mapRef: t, ready: s, map: r, api: o, mapTilesLoaded: a };
621
635
  }
622
636
  });
623
- const te = (n, e) => {
637
+ const X = (n, e) => {
624
638
  const t = n.__vccOpts || n;
625
639
  for (const [s, r] of e)
626
640
  t[s] = r;
627
641
  return t;
628
- }, Ge = {
642
+ }, Ke = {
629
643
  ref: "mapRef",
630
644
  class: "mapdiv"
631
645
  };
632
- function He(n, e, t, s, r, o) {
633
- return J(), X("div", null, [
634
- ae("div", Ge, null, 512),
635
- Q(n.$slots, "default", Ne(Ue({ 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)
636
650
  ]);
637
651
  }
638
- const Et = /* @__PURE__ */ te(ze, [["render", He], ["__scopeId", "data-v-d05fc6bc"]]);
639
- function We(n) {
652
+ const It = /* @__PURE__ */ X(We, [["render", Ye], ["__scopeId", "data-v-e7ebb206"]]);
653
+ function Je(n) {
640
654
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
641
655
  }
642
- var Ke = function n(e, t) {
656
+ var Xe = function n(e, t) {
643
657
  if (e === t)
644
658
  return !0;
645
659
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -666,15 +680,15 @@ var Ke = function n(e, t) {
666
680
  if (!Object.prototype.hasOwnProperty.call(t, o[r]))
667
681
  return !1;
668
682
  for (r = s; r-- !== 0; ) {
669
- var i = o[r];
670
- if (!n(e[i], t[i]))
683
+ var a = o[r];
684
+ if (!n(e[a], t[a]))
671
685
  return !1;
672
686
  }
673
687
  return !0;
674
688
  }
675
689
  return e !== e && t !== t;
676
690
  };
677
- const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart", "gmp-click"], Pt = P({
691
+ const A = /* @__PURE__ */ Je(Xe), ke = ["click", "drag", "dragend", "dragstart", "gmp-click"], Qe = P({
678
692
  name: "AdvancedMarker",
679
693
  props: {
680
694
  options: {
@@ -686,73 +700,88 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
686
700
  required: !1
687
701
  }
688
702
  },
689
- emits: ge,
703
+ emits: ke,
690
704
  setup(n, { emit: e, expose: t, slots: s }) {
691
- const r = $(n, "options"), o = $(n, "pinOptions"), i = y(), c = b(B, y()), a = b(Z, y()), d = b(ce, y()), u = H(
692
- () => !!(d.value && a.value && i.value instanceof google.maps.marker.AdvancedMarkerElement)
705
+ const r = v(), o = G(() => {
706
+ var p;
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
+ () => !!(c.value && u.value && i.value instanceof google.maps.marker.AdvancedMarkerElement)
693
710
  );
694
- return L(
695
- [c, r, o],
696
- async (l, [h, p, m]) => {
697
- var _, O, M;
698
- const g = !A(r.value, p) || !A(o.value, m) || c.value !== h;
699
- if (!c.value || !a.value || !g)
711
+ return S(
712
+ [d, a, l],
713
+ async (p, [f, m, g]) => {
714
+ var b, E, M;
715
+ const _ = !A(a.value, m) || !A(l.value, g) || d.value !== f;
716
+ if (!d.value || !u.value || !_)
700
717
  return;
701
- const { AdvancedMarkerElement: v, PinElement: w } = a.value.marker;
718
+ const { AdvancedMarkerElement: w, PinElement: O } = u.value.marker;
702
719
  if (i.value) {
703
- const { map: E, content: k, ...S } = r.value;
720
+ const { map: L, content: Q, ...ne } = a.value;
704
721
  Object.assign(i.value, {
705
- content: o.value ? new w(o.value).element : k,
706
- ...S
707
- }), u.value && ((_ = d.value) == null || _.removeMarker(i.value), (O = d.value) == null || O.addMarker(i.value));
722
+ content: o.value ? r.value : l.value ? new O(l.value).element : Q,
723
+ ...ne
724
+ }), h.value && ((b = c.value) == null || b.removeMarker(i.value), (E = c.value) == null || E.addMarker(i.value));
708
725
  } else
709
- o.value && (r.value.content = new w(o.value).element), i.value = x(new v(r.value)), u.value ? (M = d.value) == null || M.addMarker(i.value) : i.value.map = c.value, ge.forEach((E) => {
710
- var k;
711
- (k = i.value) == null || k.addListener(E, (S) => e(E, S));
726
+ o.value ? a.value.content = r.value : l.value && (a.value.content = new O(l.value).element), i.value = x(new w(a.value)), h.value ? (M = c.value) == null || M.addMarker(i.value) : i.value.map = d.value, ke.forEach((L) => {
727
+ var Q;
728
+ (Q = i.value) == null || Q.addListener(L, (ne) => e(L, ne));
712
729
  });
713
730
  },
714
731
  {
715
732
  immediate: !0
716
733
  }
717
- ), q(() => {
718
- var l, h;
719
- i.value && ((l = a.value) == null || l.event.clearInstanceListeners(i.value), u.value ? (h = d.value) == null || h.removeMarker(i.value) : i.value.map = null);
720
- }), U(le, i), t({ marker: i }), () => {
721
- var l;
722
- return (l = s.default) == null ? void 0 : l.call(s);
723
- };
734
+ ), j(() => {
735
+ var p, f;
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
+ }), D(pe, i), t({ marker: i }), { hasCustomSlotContent: o, markerRef: r };
724
738
  }
725
- }), Ye = (n) => n === "Marker", Je = (n) => n === ee, V = (n, e, t, s) => {
726
- const r = y(), o = b(B, y()), i = b(Z, y()), c = b(ce, y()), a = H(
727
- () => !!(c.value && i.value && (r.value instanceof i.value.Marker || r.value instanceof i.value[ee]))
739
+ });
740
+ const et = {
741
+ key: 0,
742
+ class: "advanced-marker-wrapper"
743
+ };
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);
753
+ }
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(
756
+ () => !!(l.value && a.value && (r.value instanceof a.value.Marker || r.value instanceof a.value[re]))
728
757
  );
729
- return L(
758
+ return S(
730
759
  [o, t],
731
- (d, [u, l]) => {
732
- var p, m, f;
733
- const h = !A(t.value, l) || o.value !== u;
734
- !o.value || !i.value || !h || (r.value ? (r.value.setOptions(t.value), a.value && ((p = c.value) == null || p.removeMarker(r.value), (m = c.value) == null || m.addMarker(r.value))) : (Ye(n) ? r.value = x(
735
- new i.value[n](t.value)
736
- ) : Je(n) ? r.value = x(
737
- new i.value[n](t.value)
760
+ (d, [u, c]) => {
761
+ var p, f, m;
762
+ const h = !A(t.value, c) || o.value !== u;
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(
764
+ new a.value[n](t.value)
765
+ ) : rt(n) ? r.value = x(
766
+ new a.value[n](t.value)
738
767
  ) : r.value = x(
739
- new i.value[n]({
768
+ new a.value[n]({
740
769
  ...t.value,
741
770
  map: o.value
742
771
  })
743
- ), a.value ? (f = c.value) == null || f.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
744
- var v;
745
- (v = r.value) == null || v.addListener(g, (w) => s(g, w));
772
+ ), i.value ? (m = l.value) == null || m.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
773
+ var y;
774
+ (y = r.value) == null || y.addListener(g, (_) => s(g, _));
746
775
  })));
747
776
  },
748
777
  {
749
778
  immediate: !0
750
779
  }
751
- ), q(() => {
780
+ ), j(() => {
752
781
  var d, u;
753
- r.value && ((d = i.value) == null || d.event.clearInstanceListeners(r.value), a.value ? (u = c.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
782
+ r.value && ((d = a.value) == null || d.event.clearInstanceListeners(r.value), i.value ? (u = l.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
754
783
  }), r;
755
- }, ve = [
784
+ }, Ce = [
756
785
  "animation_changed",
757
786
  "click",
758
787
  "dblclick",
@@ -776,7 +805,7 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
776
805
  "shape_changed",
777
806
  "title_changed",
778
807
  "visible_changed"
779
- ], Lt = P({
808
+ ], $t = P({
780
809
  name: "Marker",
781
810
  props: {
782
811
  options: {
@@ -784,15 +813,15 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
784
813
  required: !0
785
814
  }
786
815
  },
787
- emits: ve,
816
+ emits: Ce,
788
817
  setup(n, { emit: e, expose: t, slots: s }) {
789
- const r = $(n, "options"), o = V("Marker", ve, r, e);
790
- return U(le, o), t({ marker: o }), () => {
791
- var i;
792
- return (i = s.default) == null ? void 0 : i.call(s);
818
+ const r = $(n, "options"), o = W("Marker", Ce, r, e);
819
+ return D(pe, o), t({ marker: o }), () => {
820
+ var a;
821
+ return (a = s.default) == null ? void 0 : a.call(s);
793
822
  };
794
823
  }
795
- }), St = P({
824
+ }), Rt = P({
796
825
  name: "Polyline",
797
826
  props: {
798
827
  options: {
@@ -800,13 +829,13 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
800
829
  required: !0
801
830
  }
802
831
  },
803
- emits: F,
832
+ emits: H,
804
833
  setup(n, { emit: e }) {
805
834
  const t = $(n, "options");
806
- return { polyline: V("Polyline", F, t, e) };
835
+ return { polyline: W("Polyline", H, t, e) };
807
836
  },
808
837
  render: () => null
809
- }), xt = P({
838
+ }), qt = P({
810
839
  name: "Polygon",
811
840
  props: {
812
841
  options: {
@@ -814,13 +843,13 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
814
843
  required: !0
815
844
  }
816
845
  },
817
- emits: F,
846
+ emits: H,
818
847
  setup(n, { emit: e }) {
819
848
  const t = $(n, "options");
820
- return { polygon: V("Polygon", F, t, e) };
849
+ return { polygon: W("Polygon", H, t, e) };
821
850
  },
822
851
  render: () => null
823
- }), ye = F.concat(["bounds_changed"]), At = P({
852
+ }), be = H.concat(["bounds_changed"]), jt = P({
824
853
  name: "Rectangle",
825
854
  props: {
826
855
  options: {
@@ -828,13 +857,13 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
828
857
  required: !0
829
858
  }
830
859
  },
831
- emits: ye,
860
+ emits: be,
832
861
  setup(n, { emit: e }) {
833
862
  const t = $(n, "options");
834
- return { rectangle: V("Rectangle", ye, t, e) };
863
+ return { rectangle: W("Rectangle", be, t, e) };
835
864
  },
836
865
  render: () => null
837
- }), we = F.concat(["center_changed", "radius_changed"]), It = P({
866
+ }), Me = H.concat(["center_changed", "radius_changed"]), Bt = P({
838
867
  name: "Circle",
839
868
  props: {
840
869
  options: {
@@ -842,13 +871,13 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
842
871
  required: !0
843
872
  }
844
873
  },
845
- emits: we,
874
+ emits: Me,
846
875
  setup(n, { emit: e }) {
847
876
  const t = $(n, "options");
848
- return { circle: V("Circle", we, t, e) };
877
+ return { circle: W("Circle", Me, t, e) };
849
878
  },
850
879
  render: () => null
851
- }), Xe = P({
880
+ }), nt = P({
852
881
  props: {
853
882
  position: {
854
883
  type: String,
@@ -861,32 +890,32 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
861
890
  },
862
891
  emits: ["content:loaded"],
863
892
  setup(n, { emit: e }) {
864
- const t = y(null), s = b(B, y()), r = b(Z, y()), o = b(Ae, y(!1)), i = L(
893
+ const t = v(null), s = C(B, v()), r = C(Z, v()), o = C(Te, v(!1)), a = S(
865
894
  [o, r, t],
866
- ([d, u, l]) => {
867
- u && d && l && (c(n.position), e("content:loaded"), setTimeout(i, 0));
895
+ ([d, u, c]) => {
896
+ u && d && c && (l(n.position), e("content:loaded"), setTimeout(a, 0));
868
897
  },
869
898
  { immediate: !0 }
870
- ), c = (d) => {
899
+ ), l = (d) => {
871
900
  if (s.value && r.value && t.value) {
872
901
  const u = r.value.ControlPosition[d];
873
902
  s.value.controls[u].push(t.value);
874
903
  }
875
- }, a = (d) => {
904
+ }, i = (d) => {
876
905
  if (s.value && r.value) {
877
906
  let u = null;
878
- const l = r.value.ControlPosition[d];
879
- s.value.controls[l].forEach((h, p) => {
907
+ const c = r.value.ControlPosition[d];
908
+ s.value.controls[c].forEach((h, p) => {
880
909
  h === t.value && (u = p);
881
- }), u !== null && s.value.controls[l].removeAt(u);
910
+ }), u !== null && s.value.controls[c].removeAt(u);
882
911
  }
883
912
  };
884
- return q(() => a(n.position)), L(
913
+ return j(() => i(n.position)), S(
885
914
  () => n.position,
886
915
  (d, u) => {
887
- a(u), c(d);
916
+ i(u), l(d);
888
917
  }
889
- ), L(
918
+ ), S(
890
919
  () => n.index,
891
920
  (d) => {
892
921
  d && t.value && (t.value.index = n.index);
@@ -894,16 +923,16 @@ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart",
894
923
  ), { controlRef: t };
895
924
  }
896
925
  });
897
- const Qe = {
926
+ const ot = {
898
927
  ref: "controlRef",
899
928
  class: "custom-control-wrapper"
900
929
  };
901
- function et(n, e, t, s, r, o) {
902
- return J(), X("div", Qe, [
903
- Q(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)
904
933
  ], 512);
905
934
  }
906
- const Tt = /* @__PURE__ */ te(Xe, [["render", et], ["__scopeId", "data-v-d099a3a6"]]), _e = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], tt = 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({
907
936
  inheritAttrs: !1,
908
937
  props: {
909
938
  options: {
@@ -914,68 +943,68 @@ const Tt = /* @__PURE__ */ te(Xe, [["render", et], ["__scopeId", "data-v-d099a3a
914
943
  type: Boolean
915
944
  }
916
945
  },
917
- emits: [..._e, "update:modelValue"],
946
+ emits: [...Oe, "update:modelValue"],
918
947
  setup(n, { slots: e, emit: t, expose: s }) {
919
- const r = y(), o = y(), i = b(B, y()), c = b(Z, y()), a = b(le, y());
948
+ const r = v(), o = v(), a = C(B, v()), l = C(Z, v()), i = C(pe, v());
920
949
  let d, u = n.modelValue;
921
- const l = H(() => {
922
- var f;
923
- return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !== Le);
924
- }), h = (f) => {
925
- u = f, t("update:modelValue", f);
926
- }, p = (f) => {
927
- r.value && (r.value.open({ map: i.value, anchor: a.value, ...f }), h(!0));
928
- }, m = () => {
950
+ const c = G(() => {
951
+ var m;
952
+ return (m = e.default) == null ? void 0 : m.call(e).some((g) => g.type !== ue);
953
+ }), h = (m) => {
954
+ u = m, t("update:modelValue", m);
955
+ }, p = (m) => {
956
+ r.value && (r.value.open({ map: a.value, anchor: i.value, ...m }), h(!0));
957
+ }, f = () => {
929
958
  r.value && (r.value.close(), h(!1));
930
959
  };
931
- return Pe(() => {
932
- L(
933
- [i, () => n.options],
934
- ([f, g], [v, w]) => {
960
+ return Ie(() => {
961
+ S(
962
+ [a, () => n.options],
963
+ ([m, g], [y, _]) => {
935
964
  var O;
936
- const _ = !A(g, w) || i.value !== v;
937
- i.value && c.value && _ && (r.value ? (r.value.setOptions({
965
+ const w = !A(g, _) || a.value !== y;
966
+ a.value && l.value && w && (r.value ? (r.value.setOptions({
938
967
  ...g,
939
- content: l.value ? o.value : g.content
940
- }), a.value || p()) : (r.value = x(
941
- new c.value.InfoWindow({
968
+ content: c.value ? o.value : g.content
969
+ }), i.value || p()) : (r.value = x(
970
+ new l.value.InfoWindow({
942
971
  ...g,
943
- content: l.value ? o.value : g.content
972
+ content: c.value ? o.value : g.content
944
973
  })
945
- ), a.value && (d = a.value.addListener("click", () => {
974
+ ), i.value && (d = i.value.addListener("click", () => {
946
975
  p();
947
- })), (!a.value || u) && p(), _e.forEach((M) => {
976
+ })), (!i.value || u) && p(), Oe.forEach((b) => {
948
977
  var E;
949
- (E = r.value) == null || E.addListener(M, (k) => t(M, k));
978
+ (E = r.value) == null || E.addListener(b, (M) => t(b, M));
950
979
  }), (O = r.value) == null || O.addListener("closeclick", () => h(!1))));
951
980
  },
952
981
  {
953
982
  immediate: !0
954
983
  }
955
- ), L(
984
+ ), S(
956
985
  () => n.modelValue,
957
- (f) => {
958
- f !== u && (f ? p() : m());
986
+ (m) => {
987
+ m !== u && (m ? p() : f());
959
988
  }
960
989
  );
961
- }), q(() => {
962
- var f;
963
- d && d.remove(), r.value && ((f = c.value) == null || f.event.clearInstanceListeners(r.value), m());
964
- }), s({ infoWindow: r, open: p, close: m }), { infoWindow: r, infoWindowRef: o, hasSlotContent: l, open: p, close: m };
990
+ }), j(() => {
991
+ var m;
992
+ d && d.remove(), r.value && ((m = l.value) == null || m.event.clearInstanceListeners(r.value), f());
993
+ }), s({ infoWindow: r, open: p, close: f }), { infoWindow: r, infoWindowRef: o, hasSlotContent: c, open: p, close: f };
965
994
  }
966
995
  });
967
- const st = {
996
+ const lt = {
968
997
  key: 0,
969
998
  class: "info-window-wrapper"
970
999
  };
971
- function rt(n, e, t, s, r, o) {
972
- return n.hasSlotContent ? (J(), X("div", st, [
973
- ae("div", Se({ ref: "infoWindowRef" }, n.$attrs), [
974
- Q(n.$slots, "default", {}, void 0, !0)
1000
+ function ct(n, e, t, s, r, o) {
1001
+ return n.hasSlotContent ? (U(), V("div", lt, [
1002
+ se("div", de({ ref: "infoWindowRef" }, n.$attrs), [
1003
+ z(n.$slots, "default", {}, void 0, !0)
975
1004
  ], 16)
976
- ])) : xe("", !0);
1005
+ ])) : he("", !0);
977
1006
  }
978
- const $t = /* @__PURE__ */ te(tt, [["render", rt], ["__scopeId", "data-v-cbe1707b"]]), ke = [
1007
+ const Nt = /* @__PURE__ */ X(at, [["render", ct], ["__scopeId", "data-v-cbe1707b"]]), Ee = [
979
1008
  Int8Array,
980
1009
  Uint8Array,
981
1010
  Uint8ClampedArray,
@@ -985,8 +1014,8 @@ const $t = /* @__PURE__ */ te(tt, [["render", rt], ["__scopeId", "data-v-cbe1707
985
1014
  Uint32Array,
986
1015
  Float32Array,
987
1016
  Float64Array
988
- ], re = 1, z = 8;
989
- class ue {
1017
+ ], ie = 1, K = 8;
1018
+ class me {
990
1019
  /**
991
1020
  * Creates an index from raw `ArrayBuffer` data.
992
1021
  * @param {ArrayBuffer} data
@@ -998,13 +1027,13 @@ class ue {
998
1027
  if (t !== 219)
999
1028
  throw new Error("Data does not appear to be in a KDBush format.");
1000
1029
  const r = s >> 4;
1001
- if (r !== re)
1002
- throw new Error(`Got v${r} data when expected v${re}.`);
1003
- const o = ke[s & 15];
1030
+ if (r !== ie)
1031
+ throw new Error(`Got v${r} data when expected v${ie}.`);
1032
+ const o = Ee[s & 15];
1004
1033
  if (!o)
1005
1034
  throw new Error("Unrecognized array type.");
1006
- const [i] = new Uint16Array(e, 2, 1), [c] = new Uint32Array(e, 4, 1);
1007
- return new ue(c, i, o, e);
1035
+ const [a] = new Uint16Array(e, 2, 1), [l] = new Uint32Array(e, 4, 1);
1036
+ return new me(l, a, o, e);
1008
1037
  }
1009
1038
  /**
1010
1039
  * Creates an index that will hold a given number of items.
@@ -1017,10 +1046,10 @@ class ue {
1017
1046
  if (isNaN(e) || e < 0)
1018
1047
  throw new Error(`Unpexpected numItems value: ${e}.`);
1019
1048
  this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = s, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
1020
- const o = ke.indexOf(this.ArrayType), i = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, c = e * this.IndexArrayType.BYTES_PER_ELEMENT, a = (8 - c % 8) % 8;
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;
1021
1050
  if (o < 0)
1022
1051
  throw new Error(`Unexpected typed array class: ${s}.`);
1023
- r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, z, e), this.coords = new this.ArrayType(this.data, z + c + a, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(z + i + c + a), this.ids = new this.IndexArrayType(this.data, z, e), this.coords = new this.ArrayType(this.data, z + c + a, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (re << 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);
1024
1053
  }
1025
1054
  /**
1026
1055
  * Add a point to the index.
@@ -1039,7 +1068,7 @@ class ue {
1039
1068
  const e = this._pos >> 1;
1040
1069
  if (e !== this.numItems)
1041
1070
  throw new Error(`Added ${e} items when expected ${this.numItems}.`);
1042
- return ie(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
1071
+ return ce(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
1043
1072
  }
1044
1073
  /**
1045
1074
  * Search the index for items within a given bounding box.
@@ -1052,18 +1081,18 @@ class ue {
1052
1081
  range(e, t, s, r) {
1053
1082
  if (!this._finished)
1054
1083
  throw new Error("Data not yet indexed - call index.finish().");
1055
- const { ids: o, coords: i, nodeSize: c } = this, a = [0, o.length - 1, 0], d = [];
1056
- for (; a.length; ) {
1057
- const u = a.pop() || 0, l = a.pop() || 0, h = a.pop() || 0;
1058
- if (l - h <= c) {
1059
- for (let g = h; g <= l; g++) {
1060
- const v = i[2 * g], w = i[2 * g + 1];
1061
- v >= e && v <= s && w >= t && w <= r && d.push(o[g]);
1084
+ const { ids: o, coords: a, nodeSize: l } = this, i = [0, o.length - 1, 0], d = [];
1085
+ for (; i.length; ) {
1086
+ const u = i.pop() || 0, c = i.pop() || 0, h = i.pop() || 0;
1087
+ if (c - h <= l) {
1088
+ for (let g = h; g <= c; g++) {
1089
+ const y = a[2 * g], _ = a[2 * g + 1];
1090
+ y >= e && y <= s && _ >= t && _ <= r && d.push(o[g]);
1062
1091
  }
1063
1092
  continue;
1064
1093
  }
1065
- const p = h + l >> 1, m = i[2 * p], f = i[2 * p + 1];
1066
- m >= e && m <= s && f >= t && f <= r && d.push(o[p]), (u === 0 ? e <= m : t <= f) && (a.push(h), a.push(p - 1), a.push(1 - u)), (u === 0 ? s >= m : r >= f) && (a.push(p + 1), a.push(l), a.push(1 - u));
1094
+ const p = h + c >> 1, f = a[2 * p], m = a[2 * p + 1];
1095
+ f >= e && f <= s && m >= t && m <= r && d.push(o[p]), (u === 0 ? e <= f : t <= m) && (i.push(h), i.push(p - 1), i.push(1 - u)), (u === 0 ? s >= f : r >= m) && (i.push(p + 1), i.push(c), i.push(1 - u));
1067
1096
  }
1068
1097
  return d;
1069
1098
  }
@@ -1077,55 +1106,55 @@ class ue {
1077
1106
  within(e, t, s) {
1078
1107
  if (!this._finished)
1079
1108
  throw new Error("Data not yet indexed - call index.finish().");
1080
- const { ids: r, coords: o, nodeSize: i } = this, c = [0, r.length - 1, 0], a = [], d = s * s;
1081
- for (; c.length; ) {
1082
- const u = c.pop() || 0, l = c.pop() || 0, h = c.pop() || 0;
1083
- if (l - h <= i) {
1084
- for (let g = h; g <= l; g++)
1085
- Ce(o[2 * g], o[2 * g + 1], e, t) <= d && a.push(r[g]);
1109
+ const { ids: r, coords: o, nodeSize: a } = this, l = [0, r.length - 1, 0], i = [], d = s * s;
1110
+ for (; l.length; ) {
1111
+ const u = l.pop() || 0, c = l.pop() || 0, h = l.pop() || 0;
1112
+ if (c - h <= a) {
1113
+ for (let g = h; g <= c; g++)
1114
+ Pe(o[2 * g], o[2 * g + 1], e, t) <= d && i.push(r[g]);
1086
1115
  continue;
1087
1116
  }
1088
- const p = h + l >> 1, m = o[2 * p], f = o[2 * p + 1];
1089
- Ce(m, f, e, t) <= d && a.push(r[p]), (u === 0 ? e - s <= m : t - s <= f) && (c.push(h), c.push(p - 1), c.push(1 - u)), (u === 0 ? e + s >= m : t + s >= f) && (c.push(p + 1), c.push(l), c.push(1 - u));
1117
+ const p = h + c >> 1, f = o[2 * p], m = o[2 * p + 1];
1118
+ Pe(f, m, e, t) <= d && i.push(r[p]), (u === 0 ? e - s <= f : t - s <= m) && (l.push(h), l.push(p - 1), l.push(1 - u)), (u === 0 ? e + s >= f : t + s >= m) && (l.push(p + 1), l.push(c), l.push(1 - u));
1090
1119
  }
1091
- return a;
1120
+ return i;
1092
1121
  }
1093
1122
  }
1094
- function ie(n, e, t, s, r, o) {
1123
+ function ce(n, e, t, s, r, o) {
1095
1124
  if (r - s <= t)
1096
1125
  return;
1097
- const i = s + r >> 1;
1098
- Ie(n, e, i, s, r, o), ie(n, e, t, s, i - 1, 1 - o), ie(n, e, t, i + 1, r, 1 - o);
1126
+ const a = s + r >> 1;
1127
+ $e(n, e, a, s, r, o), ce(n, e, t, s, a - 1, 1 - o), ce(n, e, t, a + 1, r, 1 - o);
1099
1128
  }
1100
- function Ie(n, e, t, s, r, o) {
1129
+ function $e(n, e, t, s, r, o) {
1101
1130
  for (; r > s; ) {
1102
1131
  if (r - s > 600) {
1103
- const d = r - s + 1, u = t - s + 1, l = Math.log(d), h = 0.5 * Math.exp(2 * l / 3), p = 0.5 * Math.sqrt(l * h * (d - h) / d) * (u - d / 2 < 0 ? -1 : 1), m = Math.max(s, Math.floor(t - u * h / d + p)), f = Math.min(r, Math.floor(t + (d - u) * h / d + p));
1104
- Ie(n, e, t, m, f, o);
1132
+ const d = r - s + 1, u = t - s + 1, c = Math.log(d), h = 0.5 * Math.exp(2 * c / 3), p = 0.5 * Math.sqrt(c * h * (d - h) / d) * (u - d / 2 < 0 ? -1 : 1), f = Math.max(s, Math.floor(t - u * h / d + p)), m = Math.min(r, Math.floor(t + (d - u) * h / d + p));
1133
+ $e(n, e, t, f, m, o);
1105
1134
  }
1106
- const i = e[2 * t + o];
1107
- let c = s, a = r;
1108
- for (G(n, e, s, t), e[2 * r + o] > i && G(n, e, s, r); c < a; ) {
1109
- for (G(n, e, c, a), c++, a--; e[2 * c + o] < i; )
1110
- c++;
1111
- for (; e[2 * a + o] > i; )
1112
- a--;
1135
+ const a = e[2 * t + o];
1136
+ let l = s, i = r;
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; )
1139
+ l++;
1140
+ for (; e[2 * i + o] > a; )
1141
+ i--;
1113
1142
  }
1114
- e[2 * s + o] === i ? G(n, e, s, a) : (a++, G(n, e, a, r)), a <= t && (s = a + 1), t <= a && (r = a - 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);
1115
1144
  }
1116
1145
  }
1117
- function G(n, e, t, s) {
1118
- ne(n, t, s), ne(e, 2 * t, 2 * s), ne(e, 2 * t + 1, 2 * s + 1);
1146
+ function Y(n, e, t, s) {
1147
+ ae(n, t, s), ae(e, 2 * t, 2 * s), ae(e, 2 * t + 1, 2 * s + 1);
1119
1148
  }
1120
- function ne(n, e, t) {
1149
+ function ae(n, e, t) {
1121
1150
  const s = n[e];
1122
1151
  n[e] = n[t], n[t] = s;
1123
1152
  }
1124
- function Ce(n, e, t, s) {
1153
+ function Pe(n, e, t, s) {
1125
1154
  const r = n - t, o = e - s;
1126
1155
  return r * r + o * o;
1127
1156
  }
1128
- const nt = {
1157
+ const ut = {
1129
1158
  minZoom: 0,
1130
1159
  // min zoom to generate clusters on
1131
1160
  maxZoom: 16,
@@ -1148,41 +1177,41 @@ const nt = {
1148
1177
  // properties to use for individual points when running the reducer
1149
1178
  map: (n) => n
1150
1179
  // props => ({sum: props.my_value})
1151
- }, be = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), R = 2, T = 3, oe = 4, I = 5, Te = 6;
1152
- class $e {
1180
+ }, Se = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), R = 2, T = 3, le = 4, I = 5, Re = 6;
1181
+ class qe {
1153
1182
  constructor(e) {
1154
- this.options = Object.assign(Object.create(nt), 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 = [];
1155
1184
  }
1156
1185
  load(e) {
1157
1186
  const { log: t, minZoom: s, maxZoom: r } = this.options;
1158
1187
  t && console.time("total time");
1159
1188
  const o = `prepare ${e.length} points`;
1160
1189
  t && console.time(o), this.points = e;
1161
- const i = [];
1162
- for (let a = 0; a < e.length; a++) {
1163
- const d = e[a];
1190
+ const a = [];
1191
+ for (let i = 0; i < e.length; i++) {
1192
+ const d = e[i];
1164
1193
  if (!d.geometry)
1165
1194
  continue;
1166
- const [u, l] = d.geometry.coordinates, h = be(K(u)), p = be(Y(l));
1167
- i.push(
1195
+ const [u, c] = d.geometry.coordinates, h = Se(ee(u)), p = Se(te(c));
1196
+ a.push(
1168
1197
  h,
1169
1198
  p,
1170
1199
  // projected point coordinates
1171
1200
  1 / 0,
1172
1201
  // the last zoom the point was processed at
1173
- a,
1202
+ i,
1174
1203
  // index of the source feature in the original input array
1175
1204
  -1,
1176
1205
  // parent cluster id
1177
1206
  1
1178
1207
  // number of points in a cluster
1179
- ), this.options.reduce && i.push(0);
1208
+ ), this.options.reduce && a.push(0);
1180
1209
  }
1181
- let c = this.trees[r + 1] = this._createTree(i);
1210
+ let l = this.trees[r + 1] = this._createTree(a);
1182
1211
  t && console.timeEnd(o);
1183
- for (let a = r; a >= s; a--) {
1212
+ for (let i = r; i >= s; i--) {
1184
1213
  const d = +Date.now();
1185
- c = this.trees[a] = this._createTree(this._cluster(c, a)), t && console.log("z%d: %d clusters in %dms", a, c.numItems, +Date.now() - d);
1214
+ l = this.trees[i] = this._createTree(this._cluster(l, i)), t && console.log("z%d: %d clusters in %dms", i, l.numItems, +Date.now() - d);
1186
1215
  }
1187
1216
  return t && console.timeEnd("total time"), this;
1188
1217
  }
@@ -1190,17 +1219,17 @@ class $e {
1190
1219
  let s = ((e[0] + 180) % 360 + 360) % 360 - 180;
1191
1220
  const r = Math.max(-90, Math.min(90, e[1]));
1192
1221
  let o = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180;
1193
- const i = Math.max(-90, Math.min(90, e[3]));
1222
+ const a = Math.max(-90, Math.min(90, e[3]));
1194
1223
  if (e[2] - e[0] >= 360)
1195
1224
  s = -180, o = 180;
1196
1225
  else if (s > o) {
1197
- const l = this.getClusters([s, r, 180, i], t), h = this.getClusters([-180, r, o, i], t);
1198
- return l.concat(h);
1226
+ const c = this.getClusters([s, r, 180, a], t), h = this.getClusters([-180, r, o, a], t);
1227
+ return c.concat(h);
1199
1228
  }
1200
- const c = this.trees[this._limitZoom(t)], a = c.range(K(s), Y(i), K(o), Y(r)), d = c.data, u = [];
1201
- for (const l of a) {
1202
- const h = this.stride * l;
1203
- u.push(d[h + I] > 1 ? Me(d, h, this.clusterProps) : this.points[d[h + T]]);
1229
+ const l = this.trees[this._limitZoom(t)], i = l.range(ee(s), te(a), ee(o), te(r)), d = l.data, u = [];
1230
+ for (const c of i) {
1231
+ const h = this.stride * c;
1232
+ u.push(d[h + I] > 1 ? Le(d, h, this.clusterProps) : this.points[d[h + T]]);
1204
1233
  }
1205
1234
  return u;
1206
1235
  }
@@ -1208,17 +1237,17 @@ class $e {
1208
1237
  const t = this._getOriginId(e), s = this._getOriginZoom(e), r = "No cluster with the specified id.", o = this.trees[s];
1209
1238
  if (!o)
1210
1239
  throw new Error(r);
1211
- const i = o.data;
1212
- if (t * this.stride >= i.length)
1240
+ const a = o.data;
1241
+ if (t * this.stride >= a.length)
1213
1242
  throw new Error(r);
1214
- const c = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), a = i[t * this.stride], d = i[t * this.stride + 1], u = o.within(a, d, c), l = [];
1243
+ const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), i = a[t * this.stride], d = a[t * this.stride + 1], u = o.within(i, d, l), c = [];
1215
1244
  for (const h of u) {
1216
1245
  const p = h * this.stride;
1217
- i[p + oe] === e && l.push(i[p + I] > 1 ? Me(i, p, this.clusterProps) : this.points[i[p + T]]);
1246
+ a[p + le] === e && c.push(a[p + I] > 1 ? Le(a, p, this.clusterProps) : this.points[a[p + T]]);
1218
1247
  }
1219
- if (l.length === 0)
1248
+ if (c.length === 0)
1220
1249
  throw new Error(r);
1221
- return l;
1250
+ return c;
1222
1251
  }
1223
1252
  getLeaves(e, t, s) {
1224
1253
  t = t || 10, s = s || 0;
@@ -1226,31 +1255,31 @@ class $e {
1226
1255
  return this._appendLeaves(r, e, t, s, 0), r;
1227
1256
  }
1228
1257
  getTile(e, t, s) {
1229
- const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: i, radius: c } = this.options, a = c / i, d = (s - a) / o, u = (s + 1 + a) / o, l = {
1258
+ const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: a, radius: l } = this.options, i = l / a, d = (s - i) / o, u = (s + 1 + i) / o, c = {
1230
1259
  features: []
1231
1260
  };
1232
1261
  return this._addTileFeatures(
1233
- r.range((t - a) / o, d, (t + 1 + a) / o, u),
1262
+ r.range((t - i) / o, d, (t + 1 + i) / o, u),
1234
1263
  r.data,
1235
1264
  t,
1236
1265
  s,
1237
1266
  o,
1238
- l
1267
+ c
1239
1268
  ), t === 0 && this._addTileFeatures(
1240
- r.range(1 - a / o, d, 1, u),
1269
+ r.range(1 - i / o, d, 1, u),
1241
1270
  r.data,
1242
1271
  o,
1243
1272
  s,
1244
1273
  o,
1245
- l
1274
+ c
1246
1275
  ), t === o - 1 && this._addTileFeatures(
1247
- r.range(0, d, a / o, u),
1276
+ r.range(0, d, i / o, u),
1248
1277
  r.data,
1249
1278
  -1,
1250
1279
  s,
1251
1280
  o,
1252
- l
1253
- ), l.features.length ? l : null;
1281
+ c
1282
+ ), c.features.length ? c : null;
1254
1283
  }
1255
1284
  getClusterExpansionZoom(e) {
1256
1285
  let t = this._getOriginZoom(e) - 1;
@@ -1263,81 +1292,81 @@ class $e {
1263
1292
  return t;
1264
1293
  }
1265
1294
  _appendLeaves(e, t, s, r, o) {
1266
- const i = this.getChildren(t);
1267
- for (const c of i) {
1268
- const a = c.properties;
1269
- if (a && a.cluster ? o + a.point_count <= r ? o += a.point_count : o = this._appendLeaves(e, a.cluster_id, s, r, o) : o < r ? o++ : e.push(c), e.length === s)
1295
+ const a = this.getChildren(t);
1296
+ for (const l of a) {
1297
+ const i = l.properties;
1298
+ if (i && i.cluster ? o + i.point_count <= r ? o += i.point_count : o = this._appendLeaves(e, i.cluster_id, s, r, o) : o < r ? o++ : e.push(l), e.length === s)
1270
1299
  break;
1271
1300
  }
1272
1301
  return o;
1273
1302
  }
1274
1303
  _createTree(e) {
1275
- const t = new ue(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1304
+ const t = new me(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1276
1305
  for (let s = 0; s < e.length; s += this.stride)
1277
1306
  t.add(e[s], e[s + 1]);
1278
1307
  return t.finish(), t.data = e, t;
1279
1308
  }
1280
- _addTileFeatures(e, t, s, r, o, i) {
1281
- for (const c of e) {
1282
- const a = c * this.stride, d = t[a + I] > 1;
1283
- let u, l, h;
1309
+ _addTileFeatures(e, t, s, r, o, a) {
1310
+ for (const l of e) {
1311
+ const i = l * this.stride, d = t[i + I] > 1;
1312
+ let u, c, h;
1284
1313
  if (d)
1285
- u = Re(t, a, this.clusterProps), l = t[a], h = t[a + 1];
1314
+ u = je(t, i, this.clusterProps), c = t[i], h = t[i + 1];
1286
1315
  else {
1287
- const f = this.points[t[a + T]];
1288
- u = f.properties;
1289
- const [g, v] = f.geometry.coordinates;
1290
- l = K(g), h = Y(v);
1316
+ const m = this.points[t[i + T]];
1317
+ u = m.properties;
1318
+ const [g, y] = m.geometry.coordinates;
1319
+ c = ee(g), h = te(y);
1291
1320
  }
1292
1321
  const p = {
1293
1322
  type: 1,
1294
1323
  geometry: [[
1295
- Math.round(this.options.extent * (l * o - s)),
1324
+ Math.round(this.options.extent * (c * o - s)),
1296
1325
  Math.round(this.options.extent * (h * o - r))
1297
1326
  ]],
1298
1327
  tags: u
1299
1328
  };
1300
- let m;
1301
- d || this.options.generateId ? m = t[a + T] : m = this.points[t[a + T]].id, m !== void 0 && (p.id = m), i.features.push(p);
1329
+ let f;
1330
+ d || this.options.generateId ? f = t[i + T] : f = this.points[t[i + T]].id, f !== void 0 && (p.id = f), a.features.push(p);
1302
1331
  }
1303
1332
  }
1304
1333
  _limitZoom(e) {
1305
1334
  return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
1306
1335
  }
1307
1336
  _cluster(e, t) {
1308
- const { radius: s, extent: r, reduce: o, minPoints: i } = this.options, c = s / (r * Math.pow(2, t)), a = e.data, d = [], u = this.stride;
1309
- for (let l = 0; l < a.length; l += u) {
1310
- if (a[l + R] <= t)
1337
+ const { radius: s, extent: r, reduce: o, minPoints: a } = this.options, l = s / (r * Math.pow(2, t)), i = e.data, d = [], u = this.stride;
1338
+ for (let c = 0; c < i.length; c += u) {
1339
+ if (i[c + R] <= t)
1311
1340
  continue;
1312
- a[l + R] = t;
1313
- const h = a[l], p = a[l + 1], m = e.within(a[l], a[l + 1], c), f = a[l + I];
1314
- let g = f;
1315
- for (const v of m) {
1316
- const w = v * u;
1317
- a[w + R] > t && (g += a[w + I]);
1341
+ i[c + R] = t;
1342
+ const h = i[c], p = i[c + 1], f = e.within(i[c], i[c + 1], l), m = i[c + I];
1343
+ let g = m;
1344
+ for (const y of f) {
1345
+ const _ = y * u;
1346
+ i[_ + R] > t && (g += i[_ + I]);
1318
1347
  }
1319
- if (g > f && g >= i) {
1320
- let v = h * f, w = p * f, _, O = -1;
1321
- const M = ((l / u | 0) << 5) + (t + 1) + this.points.length;
1322
- for (const E of m) {
1323
- const k = E * u;
1324
- if (a[k + R] <= t)
1348
+ if (g > m && g >= a) {
1349
+ let y = h * m, _ = p * m, w, O = -1;
1350
+ const b = ((c / u | 0) << 5) + (t + 1) + this.points.length;
1351
+ for (const E of f) {
1352
+ const M = E * u;
1353
+ if (i[M + R] <= t)
1325
1354
  continue;
1326
- a[k + R] = t;
1327
- const S = a[k + I];
1328
- v += a[k] * S, w += a[k + 1] * S, a[k + oe] = M, o && (_ || (_ = this._map(a, l, !0), O = this.clusterProps.length, this.clusterProps.push(_)), o(_, this._map(a, k)));
1355
+ i[M + R] = t;
1356
+ const L = i[M + I];
1357
+ y += i[M] * L, _ += i[M + 1] * L, i[M + le] = b, o && (w || (w = this._map(i, c, !0), O = this.clusterProps.length, this.clusterProps.push(w)), o(w, this._map(i, M)));
1329
1358
  }
1330
- a[l + oe] = M, d.push(v / g, w / g, 1 / 0, M, -1, g), o && d.push(O);
1359
+ i[c + le] = b, d.push(y / g, _ / g, 1 / 0, b, -1, g), o && d.push(O);
1331
1360
  } else {
1332
- for (let v = 0; v < u; v++)
1333
- d.push(a[l + v]);
1361
+ for (let y = 0; y < u; y++)
1362
+ d.push(i[c + y]);
1334
1363
  if (g > 1)
1335
- for (const v of m) {
1336
- const w = v * u;
1337
- if (!(a[w + R] <= t)) {
1338
- a[w + R] = t;
1339
- for (let _ = 0; _ < u; _++)
1340
- d.push(a[w + _]);
1364
+ for (const y of f) {
1365
+ const _ = y * u;
1366
+ if (!(i[_ + R] <= t)) {
1367
+ i[_ + R] = t;
1368
+ for (let w = 0; w < u; w++)
1369
+ d.push(i[_ + w]);
1341
1370
  }
1342
1371
  }
1343
1372
  }
@@ -1354,44 +1383,44 @@ class $e {
1354
1383
  }
1355
1384
  _map(e, t, s) {
1356
1385
  if (e[t + I] > 1) {
1357
- const i = this.clusterProps[e[t + Te]];
1358
- return s ? Object.assign({}, i) : i;
1386
+ const a = this.clusterProps[e[t + Re]];
1387
+ return s ? Object.assign({}, a) : a;
1359
1388
  }
1360
1389
  const r = this.points[e[t + T]].properties, o = this.options.map(r);
1361
1390
  return s && o === r ? Object.assign({}, o) : o;
1362
1391
  }
1363
1392
  }
1364
- function Me(n, e, t) {
1393
+ function Le(n, e, t) {
1365
1394
  return {
1366
1395
  type: "Feature",
1367
1396
  id: n[e + T],
1368
- properties: Re(n, e, t),
1397
+ properties: je(n, e, t),
1369
1398
  geometry: {
1370
1399
  type: "Point",
1371
- coordinates: [ot(n[e]), it(n[e + 1])]
1400
+ coordinates: [dt(n[e]), ht(n[e + 1])]
1372
1401
  }
1373
1402
  };
1374
1403
  }
1375
- function Re(n, e, t) {
1376
- const s = n[e + I], r = s >= 1e4 ? `${Math.round(s / 1e3)}k` : s >= 1e3 ? `${Math.round(s / 100) / 10}k` : s, o = n[e + Te], i = o === -1 ? {} : Object.assign({}, t[o]);
1377
- return Object.assign(i, {
1404
+ function je(n, e, t) {
1405
+ const s = n[e + I], r = s >= 1e4 ? `${Math.round(s / 1e3)}k` : s >= 1e3 ? `${Math.round(s / 100) / 10}k` : s, o = n[e + Re], a = o === -1 ? {} : Object.assign({}, t[o]);
1406
+ return Object.assign(a, {
1378
1407
  cluster: !0,
1379
1408
  cluster_id: n[e + T],
1380
1409
  point_count: s,
1381
1410
  point_count_abbreviated: r
1382
1411
  });
1383
1412
  }
1384
- function K(n) {
1413
+ function ee(n) {
1385
1414
  return n / 360 + 0.5;
1386
1415
  }
1387
- function Y(n) {
1416
+ function te(n) {
1388
1417
  const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1389
1418
  return t < 0 ? 0 : t > 1 ? 1 : t;
1390
1419
  }
1391
- function ot(n) {
1420
+ function dt(n) {
1392
1421
  return (n - 0.5) * 360;
1393
1422
  }
1394
- function it(n) {
1423
+ function ht(n) {
1395
1424
  const e = (180 - n * 360) * Math.PI / 180;
1396
1425
  return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
1397
1426
  }
@@ -1409,7 +1438,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1409
1438
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1410
1439
  PERFORMANCE OF THIS SOFTWARE.
1411
1440
  ***************************************************************************** */
1412
- function de(n, e) {
1441
+ function ge(n, e) {
1413
1442
  var t = {};
1414
1443
  for (var s in n)
1415
1444
  Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
@@ -1418,7 +1447,7 @@ function de(n, e) {
1418
1447
  e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
1419
1448
  return t;
1420
1449
  }
1421
- class C {
1450
+ class k {
1422
1451
  static isAdvancedMarkerAvailable(e) {
1423
1452
  return google.maps.marker && e.getMapCapabilities().isAdvancedMarkersAvailable === !0;
1424
1453
  }
@@ -1444,7 +1473,7 @@ class C {
1444
1473
  return this.isAdvancedMarker(e) ? !0 : e.getVisible();
1445
1474
  }
1446
1475
  }
1447
- class W {
1476
+ class J {
1448
1477
  constructor({ markers: e, position: t }) {
1449
1478
  this.markers = e, t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
1450
1479
  }
@@ -1453,7 +1482,7 @@ class W {
1453
1482
  return;
1454
1483
  const e = new google.maps.LatLngBounds(this._position, this._position);
1455
1484
  for (const t of this.markers)
1456
- e.extend(C.getPosition(t));
1485
+ e.extend(k.getPosition(t));
1457
1486
  return e;
1458
1487
  }
1459
1488
  get position() {
@@ -1463,7 +1492,7 @@ class W {
1463
1492
  * Get the count of **visible** markers.
1464
1493
  */
1465
1494
  get count() {
1466
- return this.markers.filter((e) => C.getVisible(e)).length;
1495
+ return this.markers.filter((e) => k.getVisible(e)).length;
1467
1496
  }
1468
1497
  /**
1469
1498
  * Add a marker to the cluster.
@@ -1475,26 +1504,26 @@ class W {
1475
1504
  * Cleanup references and remove marker from map.
1476
1505
  */
1477
1506
  delete() {
1478
- this.marker && (C.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1507
+ this.marker && (k.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1479
1508
  }
1480
1509
  }
1481
- const at = (n, e, t, s) => {
1482
- const r = je(n.getBounds(), e, s);
1483
- return t.filter((o) => r.contains(C.getPosition(o)));
1484
- }, je = (n, e, t) => {
1485
- const { northEast: s, southWest: r } = lt(n, e), o = ct({ northEast: s, southWest: r }, t);
1486
- return ut(o, e);
1487
- }, Oe = (n, e, t) => {
1488
- const s = je(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
1510
+ const pt = (n, e, t, s) => {
1511
+ const r = Be(n.getBounds(), e, s);
1512
+ return t.filter((o) => r.contains(k.getPosition(o)));
1513
+ }, Be = (n, e, t) => {
1514
+ const { northEast: s, southWest: r } = ft(n, e), o = mt({ northEast: s, southWest: r }, t);
1515
+ return gt(o, e);
1516
+ }, xe = (n, e, t) => {
1517
+ const s = Be(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
1489
1518
  return [o.lng(), o.lat(), r.lng(), r.lat()];
1490
- }, lt = (n, e) => ({
1519
+ }, ft = (n, e) => ({
1491
1520
  northEast: e.fromLatLngToDivPixel(n.getNorthEast()),
1492
1521
  southWest: e.fromLatLngToDivPixel(n.getSouthWest())
1493
- }), ct = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), ut = ({ 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) => {
1494
1523
  const s = t.fromDivPixelToLatLng(e), r = t.fromDivPixelToLatLng(n);
1495
1524
  return new google.maps.LatLngBounds(s, r);
1496
1525
  };
1497
- class qe {
1526
+ class Ze {
1498
1527
  constructor({ maxZoom: e = 16 }) {
1499
1528
  this.maxZoom = e;
1500
1529
  }
@@ -1511,12 +1540,12 @@ class qe {
1511
1540
  * ```
1512
1541
  */
1513
1542
  noop({ markers: e }) {
1514
- return ht(e);
1543
+ return yt(e);
1515
1544
  }
1516
1545
  }
1517
- class dt extends qe {
1546
+ class vt extends Ze {
1518
1547
  constructor(e) {
1519
- var { viewportPadding: t = 60 } = e, s = de(e, ["viewportPadding"]);
1548
+ var { viewportPadding: t = 60 } = e, s = ge(e, ["viewportPadding"]);
1520
1549
  super(s), this.viewportPadding = 60, this.viewportPadding = t;
1521
1550
  }
1522
1551
  calculate({ markers: e, map: t, mapCanvasProjection: s }) {
@@ -1527,21 +1556,21 @@ class dt extends qe {
1527
1556
  changed: !1
1528
1557
  } : {
1529
1558
  clusters: this.cluster({
1530
- markers: at(t, s, e, this.viewportPadding),
1559
+ markers: pt(t, s, e, this.viewportPadding),
1531
1560
  map: t,
1532
1561
  mapCanvasProjection: s
1533
1562
  })
1534
1563
  };
1535
1564
  }
1536
1565
  }
1537
- const ht = (n) => n.map((t) => new W({
1538
- position: C.getPosition(t),
1566
+ const yt = (n) => n.map((t) => new J({
1567
+ position: k.getPosition(t),
1539
1568
  markers: [t]
1540
1569
  }));
1541
- class pt extends qe {
1570
+ class _t extends Ze {
1542
1571
  constructor(e) {
1543
- var { maxZoom: t, radius: s = 60 } = e, r = de(e, ["maxZoom", "radius"]);
1544
- super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new $e(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
1572
+ var { maxZoom: t, radius: s = 60 } = e, r = ge(e, ["maxZoom", "radius"]);
1573
+ super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new qe(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
1545
1574
  }
1546
1575
  calculate(e) {
1547
1576
  let t = !1;
@@ -1549,12 +1578,12 @@ class pt extends qe {
1549
1578
  if (!A(e.markers, this.markers)) {
1550
1579
  t = !0, this.markers = [...e.markers];
1551
1580
  const r = this.markers.map((o) => {
1552
- const i = C.getPosition(o);
1581
+ const a = k.getPosition(o);
1553
1582
  return {
1554
1583
  type: "Feature",
1555
1584
  geometry: {
1556
1585
  type: "Point",
1557
- coordinates: [i.lng(), i.lat()]
1586
+ coordinates: [a.lng(), a.lat()]
1558
1587
  },
1559
1588
  properties: { marker: o }
1560
1589
  };
@@ -1568,37 +1597,37 @@ class pt extends qe {
1568
1597
  }
1569
1598
  transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
1570
1599
  if (s.cluster)
1571
- return new W({
1600
+ return new J({
1572
1601
  markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
1573
1602
  position: { lat: t, lng: e }
1574
1603
  });
1575
1604
  const r = s.marker;
1576
- return new W({
1605
+ return new J({
1577
1606
  markers: [r],
1578
- position: C.getPosition(r)
1607
+ position: k.getPosition(r)
1579
1608
  });
1580
1609
  }
1581
1610
  }
1582
- class ft extends dt {
1611
+ class wt extends vt {
1583
1612
  constructor(e) {
1584
- var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = de(e, ["maxZoom", "radius", "viewportPadding"]);
1585
- super({ maxZoom: t, viewportPadding: r }), this.superCluster = new $e(Object.assign({ maxZoom: this.maxZoom, radius: s }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1613
+ var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = ge(e, ["maxZoom", "radius", "viewportPadding"]);
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] };
1586
1615
  }
1587
1616
  calculate(e) {
1588
1617
  const t = {
1589
1618
  zoom: Math.round(e.map.getZoom()),
1590
- view: Oe(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
1619
+ view: xe(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
1591
1620
  };
1592
1621
  let s = !A(this.state, t);
1593
1622
  if (!A(e.markers, this.markers)) {
1594
1623
  s = !0, this.markers = [...e.markers];
1595
1624
  const r = this.markers.map((o) => {
1596
- const i = C.getPosition(o);
1625
+ const a = k.getPosition(o);
1597
1626
  return {
1598
1627
  type: "Feature",
1599
1628
  geometry: {
1600
1629
  type: "Point",
1601
- coordinates: [i.lng(), i.lat()]
1630
+ coordinates: [a.lng(), a.lat()]
1602
1631
  },
1603
1632
  properties: { marker: o }
1604
1633
  };
@@ -1610,27 +1639,27 @@ class ft extends dt {
1610
1639
  cluster({ map: e, mapCanvasProjection: t }) {
1611
1640
  const s = {
1612
1641
  zoom: Math.round(e.getZoom()),
1613
- view: Oe(e.getBounds(), t, this.viewportPadding)
1642
+ view: xe(e.getBounds(), t, this.viewportPadding)
1614
1643
  };
1615
1644
  return this.superCluster.getClusters(s.view, s.zoom).map((r) => this.transformCluster(r));
1616
1645
  }
1617
1646
  transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
1618
1647
  if (s.cluster)
1619
- return new W({
1648
+ return new J({
1620
1649
  markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
1621
1650
  position: { lat: t, lng: e }
1622
1651
  });
1623
1652
  const r = s.marker;
1624
- return new W({
1653
+ return new J({
1625
1654
  markers: [r],
1626
- position: C.getPosition(r)
1655
+ position: k.getPosition(r)
1627
1656
  });
1628
1657
  }
1629
1658
  }
1630
- class mt {
1659
+ class kt {
1631
1660
  constructor(e, t) {
1632
1661
  this.markers = { sum: e.length };
1633
- const s = t.map((o) => o.count), r = s.reduce((o, i) => o + i, 0);
1662
+ const s = t.map((o) => o.count), r = s.reduce((o, a) => o + a, 0);
1634
1663
  this.clusters = {
1635
1664
  count: t.length,
1636
1665
  markers: {
@@ -1642,7 +1671,7 @@ class mt {
1642
1671
  };
1643
1672
  }
1644
1673
  }
1645
- class gt {
1674
+ class Ct {
1646
1675
  /**
1647
1676
  * The default render function for the library used by {@link MarkerClusterer}.
1648
1677
  *
@@ -1682,57 +1711,57 @@ class gt {
1682
1711
  * ```
1683
1712
  */
1684
1713
  render({ count: e, position: t }, s, r) {
1685
- const i = `<svg fill="${e > Math.max(10, s.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1714
+ const a = `<svg fill="${e > Math.max(10, s.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1686
1715
  <circle cx="120" cy="120" opacity=".6" r="70" />
1687
1716
  <circle cx="120" cy="120" opacity=".3" r="90" />
1688
1717
  <circle cx="120" cy="120" opacity=".2" r="110" />
1689
1718
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
1690
- </svg>`, c = `Cluster of ${e} markers`, a = Number(google.maps.Marker.MAX_ZINDEX) + e;
1691
- if (C.isAdvancedMarkerAvailable(r)) {
1719
+ </svg>`, l = `Cluster of ${e} markers`, i = Number(google.maps.Marker.MAX_ZINDEX) + e;
1720
+ if (k.isAdvancedMarkerAvailable(r)) {
1692
1721
  const u = document.createElement("div");
1693
- u.innerHTML = i;
1694
- const l = u.firstElementChild;
1695
- l.setAttribute("transform", "translate(0 25)");
1722
+ u.innerHTML = a;
1723
+ const c = u.firstElementChild;
1724
+ c.setAttribute("transform", "translate(0 25)");
1696
1725
  const h = {
1697
1726
  map: r,
1698
1727
  position: t,
1699
- zIndex: a,
1700
- title: c,
1701
- content: l
1728
+ zIndex: i,
1729
+ title: l,
1730
+ content: c
1702
1731
  };
1703
1732
  return new google.maps.marker.AdvancedMarkerElement(h);
1704
1733
  }
1705
1734
  const d = {
1706
1735
  position: t,
1707
- zIndex: a,
1708
- title: c,
1736
+ zIndex: i,
1737
+ title: l,
1709
1738
  icon: {
1710
- url: `data:image/svg+xml;base64,${btoa(i)}`,
1739
+ url: `data:image/svg+xml;base64,${btoa(a)}`,
1711
1740
  anchor: new google.maps.Point(25, 25)
1712
1741
  }
1713
1742
  };
1714
1743
  return new google.maps.Marker(d);
1715
1744
  }
1716
1745
  }
1717
- function vt(n, e) {
1746
+ function bt(n, e) {
1718
1747
  for (let t in e.prototype)
1719
1748
  n.prototype[t] = e.prototype[t];
1720
1749
  }
1721
- class he {
1750
+ class ve {
1722
1751
  constructor() {
1723
- vt(he, google.maps.OverlayView);
1752
+ bt(ve, google.maps.OverlayView);
1724
1753
  }
1725
1754
  }
1726
- var D;
1755
+ var F;
1727
1756
  (function(n) {
1728
1757
  n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click";
1729
- })(D || (D = {}));
1730
- const yt = (n, e, t) => {
1758
+ })(F || (F = {}));
1759
+ const Mt = (n, e, t) => {
1731
1760
  t.fitBounds(e.bounds);
1732
1761
  };
1733
- class wt extends he {
1734
- constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new pt(s), renderer: o = new gt(), onClusterClick: i = yt }) {
1735
- super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = i, e && this.setMap(e);
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 }) {
1764
+ super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = a, e && this.setMap(e);
1736
1765
  }
1737
1766
  addMarker(e, t) {
1738
1767
  this.markers.includes(e) || (this.markers.push(e), t || this.render());
@@ -1744,7 +1773,7 @@ class wt extends he {
1744
1773
  }
1745
1774
  removeMarker(e, t) {
1746
1775
  const s = this.markers.indexOf(e);
1747
- return s === -1 ? !1 : (C.setMap(e, null), this.markers.splice(s, 1), t || this.render(), !0);
1776
+ return s === -1 ? !1 : (k.setMap(e, null), this.markers.splice(s, 1), t || this.render(), !0);
1748
1777
  }
1749
1778
  removeMarkers(e, t) {
1750
1779
  let s = !1;
@@ -1761,7 +1790,7 @@ class wt extends he {
1761
1790
  render() {
1762
1791
  const e = this.getMap();
1763
1792
  if (e instanceof google.maps.Map && e.getProjection()) {
1764
- google.maps.event.trigger(this, D.CLUSTERING_BEGIN, this);
1793
+ google.maps.event.trigger(this, F.CLUSTERING_BEGIN, this);
1765
1794
  const { clusters: t, changed: s } = this.algorithm.calculate({
1766
1795
  markers: this.markers,
1767
1796
  map: e,
@@ -1769,14 +1798,14 @@ class wt extends he {
1769
1798
  });
1770
1799
  if (s || s == null) {
1771
1800
  const r = /* @__PURE__ */ new Set();
1772
- for (const i of t)
1773
- i.markers.length == 1 && r.add(i.markers[0]);
1801
+ for (const a of t)
1802
+ a.markers.length == 1 && r.add(a.markers[0]);
1774
1803
  const o = [];
1775
- for (const i of this.clusters)
1776
- i.marker != null && (i.markers.length == 1 ? r.has(i.marker) || C.setMap(i.marker, null) : o.push(i.marker));
1777
- this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((i) => C.setMap(i, null)));
1804
+ for (const a of this.clusters)
1805
+ a.marker != null && (a.markers.length == 1 ? r.has(a.marker) || k.setMap(a.marker, null) : o.push(a.marker));
1806
+ this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((a) => k.setMap(a, null)));
1778
1807
  }
1779
- google.maps.event.trigger(this, D.CLUSTERING_END, this);
1808
+ google.maps.event.trigger(this, F.CLUSTERING_END, this);
1780
1809
  }
1781
1810
  }
1782
1811
  onAdd() {
@@ -1786,22 +1815,22 @@ class wt extends he {
1786
1815
  google.maps.event.removeListener(this.idleListener), this.reset();
1787
1816
  }
1788
1817
  reset() {
1789
- this.markers.forEach((e) => C.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1818
+ this.markers.forEach((e) => k.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1790
1819
  }
1791
1820
  renderClusters() {
1792
- const e = new mt(this.markers, this.clusters), t = this.getMap();
1821
+ const e = new kt(this.markers, this.clusters), t = this.getMap();
1793
1822
  this.clusters.forEach((s) => {
1794
- s.markers.length === 1 ? s.marker = s.markers[0] : (s.marker = this.renderer.render(s, e, t), s.markers.forEach((r) => C.setMap(r, null)), this.onClusterClick && s.marker.addListener(
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(
1795
1824
  "click",
1796
1825
  /* istanbul ignore next */
1797
1826
  (r) => {
1798
- 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);
1799
1828
  }
1800
- )), C.setMap(s.marker, t);
1829
+ )), k.setMap(s.marker, t);
1801
1830
  });
1802
1831
  }
1803
1832
  }
1804
- const Ee = Object.values(D), Rt = P({
1833
+ const Ae = Object.values(F), Dt = P({
1805
1834
  name: "MarkerCluster",
1806
1835
  props: {
1807
1836
  options: {
@@ -1809,37 +1838,37 @@ const Ee = Object.values(D), Rt = P({
1809
1838
  default: () => ({})
1810
1839
  }
1811
1840
  },
1812
- emits: Ee,
1841
+ emits: Ae,
1813
1842
  setup(n, { emit: e, expose: t, slots: s }) {
1814
- const r = y(), o = b(B, y()), i = b(Z, y());
1815
- return U(ce, r), L(
1843
+ const r = v(), o = C(B, v()), a = C(Z, v());
1844
+ return D(fe, r), S(
1816
1845
  o,
1817
1846
  () => {
1818
1847
  o.value && (r.value = x(
1819
- new wt({
1848
+ new Ot({
1820
1849
  map: o.value,
1821
1850
  // Better perf than the default `SuperClusterAlgorithm`. See:
1822
1851
  // https://github.com/googlemaps/js-markerclusterer/pull/640
1823
- algorithm: new ft(n.options.algorithmOptions ?? {}),
1852
+ algorithm: new wt(n.options.algorithmOptions ?? {}),
1824
1853
  ...n.options
1825
1854
  })
1826
- ), Ee.forEach((c) => {
1827
- var a;
1828
- (a = r.value) == null || a.addListener(c, (d) => e(c, d));
1855
+ ), Ae.forEach((l) => {
1856
+ var i;
1857
+ (i = r.value) == null || i.addListener(l, (d) => e(l, d));
1829
1858
  }));
1830
1859
  },
1831
1860
  {
1832
1861
  immediate: !0
1833
1862
  }
1834
- ), q(() => {
1835
- var c;
1836
- r.value && ((c = i.value) == null || c.event.clearInstanceListeners(r.value), r.value.clearMarkers(), r.value.setMap(null));
1863
+ ), j(() => {
1864
+ var l;
1865
+ r.value && ((l = a.value) == null || l.event.clearInstanceListeners(r.value), r.value.clearMarkers(), r.value.setMap(null));
1837
1866
  }), t({ markerCluster: r }), () => {
1838
- var c;
1839
- return (c = s.default) == null ? void 0 : c.call(s);
1867
+ var l;
1868
+ return (l = s.default) == null ? void 0 : l.call(s);
1840
1869
  };
1841
1870
  }
1842
- }), _t = P({
1871
+ }), Et = P({
1843
1872
  inheritAttrs: !1,
1844
1873
  props: {
1845
1874
  options: {
@@ -1848,33 +1877,33 @@ const Ee = Object.values(D), Rt = P({
1848
1877
  }
1849
1878
  },
1850
1879
  setup(n, { slots: e, emit: t, expose: s }) {
1851
- const r = y(), o = H(() => {
1852
- var a;
1853
- return (a = e.default) == null ? void 0 : a.call(e).some((d) => d.type !== Le);
1854
- }), i = H(() => ({
1880
+ const r = v(), o = G(() => {
1881
+ var i;
1882
+ return (i = e.default) == null ? void 0 : i.call(e).some((d) => d.type !== ue);
1883
+ }), a = G(() => ({
1855
1884
  ...n.options,
1856
1885
  element: r.value
1857
- })), c = V(ee, [], i, t);
1886
+ })), l = W(re, [], a, t);
1858
1887
  return s({
1859
- customMarker: c
1860
- }), { customMarkerRef: r, customMarker: c, hasSlotContent: o };
1888
+ customMarker: l
1889
+ }), { customMarkerRef: r, customMarker: l, hasSlotContent: o };
1861
1890
  }
1862
1891
  });
1863
- const kt = {
1892
+ const Pt = {
1864
1893
  key: 0,
1865
1894
  class: "custom-marker-wrapper"
1866
1895
  };
1867
- function Ct(n, e, t, s, r, o) {
1868
- return n.hasSlotContent ? (J(), X("div", kt, [
1869
- ae("div", Se({
1896
+ function St(n, e, t, s, r, o) {
1897
+ return n.hasSlotContent ? (U(), V("div", Pt, [
1898
+ se("div", de({
1870
1899
  ref: "customMarkerRef",
1871
1900
  style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
1872
1901
  }, n.$attrs), [
1873
- Q(n.$slots, "default", {}, void 0, !0)
1902
+ z(n.$slots, "default", {}, void 0, !0)
1874
1903
  ], 16)
1875
- ])) : xe("", !0);
1904
+ ])) : he("", !0);
1876
1905
  }
1877
- const jt = /* @__PURE__ */ te(_t, [["render", Ct], ["__scopeId", "data-v-2d2d343a"]]), qt = P({
1906
+ const Ft = /* @__PURE__ */ X(Et, [["render", St], ["__scopeId", "data-v-2d2d343a"]]), Ut = P({
1878
1907
  name: "HeatmapLayer",
1879
1908
  props: {
1880
1909
  options: {
@@ -1883,44 +1912,47 @@ const jt = /* @__PURE__ */ te(_t, [["render", Ct], ["__scopeId", "data-v-2d2d343
1883
1912
  }
1884
1913
  },
1885
1914
  setup(n) {
1886
- const e = y(), t = b(B, y()), s = b(Z, y());
1887
- return L(
1915
+ const e = v(), t = C(B, v()), s = C(Z, v());
1916
+ return S(
1888
1917
  [t, () => n.options],
1889
- ([r, o], [i, c]) => {
1890
- var d;
1891
- const a = !A(o, c) || t.value !== i;
1892
- if (t.value && s.value && a) {
1893
- const u = structuredClone(o);
1894
- if (u.data && !(u.data instanceof s.value.MVCArray)) {
1895
- const l = s.value.LatLng;
1896
- u.data = (d = u.data) == null ? void 0 : d.map((h) => h instanceof l || "location" in h && (h.location instanceof l || h.location === null) ? h : "location" in h ? { ...h, location: new l(h.location) } : new l(h));
1897
- }
1898
- e.value ? e.value.setOptions(u) : e.value = x(
1918
+ ([r, o], [a, l]) => {
1919
+ const i = !A(o, l) || t.value !== a;
1920
+ if (t.value && s.value && i) {
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(
1899
1931
  new s.value.visualization.HeatmapLayer({
1900
- ...u,
1932
+ ...d,
1901
1933
  map: t.value
1902
1934
  })
1903
1935
  );
1904
1936
  }
1905
1937
  },
1906
1938
  { immediate: !0 }
1907
- ), q(() => {
1939
+ ), j(() => {
1908
1940
  e.value && e.value.setMap(null);
1909
1941
  }), { heatmapLayer: e };
1910
1942
  },
1911
1943
  render: () => null
1912
1944
  });
1913
1945
  export {
1914
- Pt as AdvancedMarker,
1915
- It as Circle,
1916
- Tt as CustomControl,
1917
- jt as CustomMarker,
1918
- Et as GoogleMap,
1919
- qt as HeatmapLayer,
1920
- $t as InfoWindow,
1921
- Lt as Marker,
1922
- Rt as MarkerCluster,
1923
- xt as Polygon,
1924
- St as Polyline,
1925
- At 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
1926
1958
  };