vue3-google-map 0.24.1 → 0.25.1

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-289550ca]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-135889a7]{display:none}.mapdiv .info-window-wrapper[data-v-135889a7]{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 it = Object.defineProperty;
3
- var at = (n, e, t) => e in n ? it(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
- var pe = (n, e, t) => (at(n, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { defineComponent as P, ref as w, provide as G, watch as q, onMounted as Ye, onBeforeUnmount as B, markRaw as S, toRef as j, openBlock as V, createElementBlock as z, createElementVNode as le, renderSlot as W, normalizeProps as lt, guardReactiveProps as ut, computed as K, Comment as ye, inject as k, Fragment as ct, mergeProps as we, createCommentVNode as Ee } from "vue";
6
- const D = Symbol("map"), Z = Symbol("api"), _e = Symbol("marker"), ke = Symbol("markerCluster"), ue = Symbol("CustomMarker"), Xe = Symbol("mapTilesLoaded"), H = [
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-d182c1f9]{display:none}.mapdiv .info-window-wrapper[data-v-d182c1f9]{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 nt = Object.defineProperty;
3
+ var st = (r, e, t) => e in r ? nt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
4
+ var pe = (r, e, t) => (st(r, typeof e != "symbol" ? e + "" : e, t), t);
5
+ import { defineComponent as M, ref as y, provide as U, watch as O, onMounted as He, onBeforeUnmount as $, markRaw as S, toRef as R, openBlock as G, createElementBlock as V, createElementVNode as ie, renderSlot as F, normalizeProps as ot, guardReactiveProps as at, computed as z, Comment as ve, inject as k, Fragment as it, mergeProps as ye, createCommentVNode as _e } from "vue";
6
+ const B = Symbol("map"), D = Symbol("api"), Ee = Symbol("marker"), we = Symbol("markerCluster"), le = Symbol("CustomMarker"), Ke = Symbol("mapTilesLoaded"), W = [
7
7
  "click",
8
8
  "dblclick",
9
9
  "drag",
@@ -16,272 +16,72 @@ const D = Symbol("map"), Z = Symbol("api"), _e = Symbol("marker"), ke = Symbol("
16
16
  "mouseup",
17
17
  "rightclick"
18
18
  ];
19
- function dt(n, e, t, r) {
20
- function s(o) {
21
- return o instanceof t ? o : new t(function(i) {
22
- i(o);
23
- });
19
+ function lt(r, e) {
20
+ r.src = e;
21
+ }
22
+ const ut = (r) => {
23
+ var e, t, n, s = "The Google Maps JavaScript API", o = "google", i = "importLibrary", l = "__ib__", a = document, c = window, d = c[o] || (c[o] = {}), u = d.maps || (d.maps = {}), f = /* @__PURE__ */ new Set(), h = new URLSearchParams(), m = () => e || (e = new Promise(async (p, g) => {
24
+ var v;
25
+ await (t = a.createElement("script")), h.set("libraries", [...f] + "");
26
+ for (n in r)
27
+ h.set(n.replace(/[A-Z]/g, (_) => "_" + _[0].toLowerCase()), r[n]);
28
+ h.set("callback", o + ".maps." + l), lt(t, "https://maps.googleapis.com/maps/api/js?" + h), u[l] = p, t.onerror = () => e = g(Error(s + " could not load.")), t.nonce = ((v = a.querySelector("script[nonce]")) == null ? void 0 : v.nonce) || "", a.head.append(t);
29
+ }));
30
+ u[i] ? console.warn(s + " only loads once. Ignoring:", r) : u[i] = (p, ...g) => f.add(p) && m().then(() => u[i](p, ...g));
31
+ }, ct = (r) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(r)}) will be ignored.`, pt = (r) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(r)}) will be ignored.`, dt = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", ft = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", ke = process.env.NODE_ENV !== "production" ? (r) => {
32
+ console.warn(`[@googlemaps/js-api-loader] ${r}`);
33
+ } : () => {
34
+ }, ht = process.env.NODE_ENV !== "production" ? (r) => {
35
+ console.info(`[@googlemaps/js-api-loader] ${r}`);
36
+ } : () => {
37
+ };
38
+ let me = !1;
39
+ function mt(r) {
40
+ if (me) {
41
+ ke(ct(r));
42
+ return;
24
43
  }
25
- return new (t || (t = Promise))(function(o, i) {
26
- function l(d) {
27
- try {
28
- c(r.next(d));
29
- } catch (u) {
30
- i(u);
31
- }
32
- }
33
- function a(d) {
34
- try {
35
- c(r.throw(d));
36
- } catch (u) {
37
- i(u);
38
- }
39
- }
40
- function c(d) {
41
- d.done ? o(d.value) : s(d.value).then(l, a);
42
- }
43
- c((r = r.apply(n, e || [])).next());
44
- });
44
+ vt(r), me = !0;
45
45
  }
46
- function pt(n) {
47
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
46
+ async function gt(r) {
47
+ var e, t;
48
+ if (me || ke(dt), !((t = (e = window == null ? void 0 : window.google) == null ? void 0 : e.maps) != null && t.importLibrary))
49
+ throw new Error("google.maps.importLibrary is not installed.");
50
+ return await google.maps.importLibrary(r);
48
51
  }
49
- var fe, Pe;
50
- function ft() {
51
- return Pe || (Pe = 1, fe = function n(e, t) {
52
- if (e === t)
53
- return !0;
54
- if (e && t && typeof e == "object" && typeof t == "object") {
55
- if (e.constructor !== t.constructor)
56
- return !1;
57
- var r, s, o;
58
- if (Array.isArray(e)) {
59
- if (r = e.length, r != t.length)
60
- return !1;
61
- for (s = r; s-- !== 0; )
62
- if (!n(e[s], t[s]))
63
- return !1;
64
- return !0;
65
- }
66
- if (e.constructor === RegExp)
67
- return e.source === t.source && e.flags === t.flags;
68
- if (e.valueOf !== Object.prototype.valueOf)
69
- return e.valueOf() === t.valueOf();
70
- if (e.toString !== Object.prototype.toString)
71
- return e.toString() === t.toString();
72
- if (o = Object.keys(e), r = o.length, r !== Object.keys(t).length)
73
- return !1;
74
- for (s = r; s-- !== 0; )
75
- if (!Object.prototype.hasOwnProperty.call(t, o[s]))
76
- return !1;
77
- for (s = r; s-- !== 0; ) {
78
- var i = o[s];
79
- if (!n(e[i], t[i]))
80
- return !1;
81
- }
82
- return !0;
83
- }
84
- return e !== e && t !== t;
85
- }), fe;
52
+ function vt(r) {
53
+ var t, n;
54
+ const e = !!((n = (t = window.google) == null ? void 0 : t.maps) != null && n.importLibrary);
55
+ e ? ht(pt(r)) : process.env.NODE_ENV !== "production" && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && ke(ft), e || ut(r);
86
56
  }
87
- var ht = ft(), mt = /* @__PURE__ */ pt(ht);
88
- const qe = "__googleMapsScriptId";
89
- var U;
90
- (function(n) {
91
- n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
92
- })(U || (U = {}));
93
- class N {
94
- /**
95
- * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
96
- * using this library, instead the defaults are set by the Google Maps
97
- * JavaScript API server.
98
- *
99
- * ```
100
- * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
101
- * ```
102
- */
103
- constructor({ apiKey: e, authReferrerPolicy: t, channel: r, client: s, id: o = qe, language: i, libraries: l = [], mapIds: a, nonce: c, region: d, retries: u = 3, url: h = "https://maps.googleapis.com/maps/api/js", version: m }) {
104
- if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = r, this.client = s, this.id = o || qe, this.language = i, this.libraries = l, this.mapIds = a, this.nonce = c, this.region = d, this.retries = u, this.url = h, this.version = m, N.instance) {
105
- if (!mt(this.options, N.instance.options))
106
- throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(N.instance.options)}`);
107
- return N.instance;
108
- }
109
- N.instance = this;
110
- }
111
- get options() {
112
- return {
113
- version: this.version,
114
- apiKey: this.apiKey,
115
- channel: this.channel,
116
- client: this.client,
117
- id: this.id,
118
- libraries: this.libraries,
119
- language: this.language,
120
- region: this.region,
121
- mapIds: this.mapIds,
122
- nonce: this.nonce,
123
- url: this.url,
124
- authReferrerPolicy: this.authReferrerPolicy
125
- };
126
- }
127
- get status() {
128
- return this.errors.length ? U.FAILURE : this.done ? U.SUCCESS : this.loading ? U.LOADING : U.INITIALIZED;
129
- }
130
- get failed() {
131
- return this.done && !this.loading && this.errors.length >= this.retries + 1;
132
- }
133
- /**
134
- * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].
135
- *
136
- * @ignore
137
- * @deprecated
138
- */
139
- createUrl() {
140
- let e = this.url;
141
- return e += "?callback=__googleMapsCallback&loading=async", this.apiKey && (e += `&key=${this.apiKey}`), this.channel && (e += `&channel=${this.channel}`), this.client && (e += `&client=${this.client}`), this.libraries.length > 0 && (e += `&libraries=${this.libraries.join(",")}`), this.language && (e += `&language=${this.language}`), this.region && (e += `&region=${this.region}`), this.version && (e += `&v=${this.version}`), this.mapIds && (e += `&map_ids=${this.mapIds.join(",")}`), this.authReferrerPolicy && (e += `&auth_referrer_policy=${this.authReferrerPolicy}`), e;
142
- }
143
- deleteScript() {
144
- const e = document.getElementById(this.id);
145
- e && e.remove();
146
- }
147
- /**
148
- * Load the Google Maps JavaScript API script and return a Promise.
149
- * @deprecated, use importLibrary() instead.
150
- */
151
- load() {
152
- return this.loadPromise();
153
- }
154
- /**
155
- * Load the Google Maps JavaScript API script and return a Promise.
156
- *
157
- * @ignore
158
- * @deprecated, use importLibrary() instead.
159
- */
160
- loadPromise() {
161
- return new Promise((e, t) => {
162
- this.loadCallback((r) => {
163
- r ? t(r.error) : e(window.google);
164
- });
165
- });
166
- }
167
- importLibrary(e) {
168
- return this.execute(), google.maps.importLibrary(e);
169
- }
170
- /**
171
- * Load the Google Maps JavaScript API script with a callback.
172
- * @deprecated, use importLibrary() instead.
173
- */
174
- loadCallback(e) {
175
- this.callbacks.push(e), this.execute();
176
- }
177
- /**
178
- * Set the script on document.
179
- */
180
- setScript() {
181
- var e, t;
182
- if (document.getElementById(this.id)) {
183
- this.callback();
184
- return;
185
- }
186
- const r = {
187
- key: this.apiKey,
188
- channel: this.channel,
189
- client: this.client,
190
- libraries: this.libraries.length && this.libraries,
191
- v: this.version,
192
- mapIds: this.mapIds,
193
- language: this.language,
194
- region: this.region,
195
- authReferrerPolicy: this.authReferrerPolicy
196
- };
197
- Object.keys(r).forEach(
198
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
199
- (o) => !r[o] && delete r[o]
200
- ), !((t = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || t === void 0) && t.importLibrary || ((o) => {
201
- let i, l, a, c = "The Google Maps JavaScript API", d = "google", u = "importLibrary", h = "__ib__", m = document, p = window;
202
- p = p[d] || (p[d] = {});
203
- const f = p.maps || (p.maps = {}), g = /* @__PURE__ */ new Set(), v = new URLSearchParams(), E = () => (
204
- // @ts-ignore
205
- i || (i = new Promise((y, M) => dt(this, void 0, void 0, function* () {
206
- var O;
207
- yield l = m.createElement("script"), l.id = this.id, v.set("libraries", [...g] + "");
208
- for (a in o)
209
- v.set(a.replace(/[A-Z]/g, (b) => "_" + b[0].toLowerCase()), o[a]);
210
- v.set("callback", d + ".maps." + h), l.src = this.url + "?" + v, f[h] = y, l.onerror = () => i = M(Error(c + " could not load.")), l.nonce = this.nonce || ((O = m.querySelector("script[nonce]")) === null || O === void 0 ? void 0 : O.nonce) || "", m.head.append(l);
211
- })))
212
- );
213
- f[u] ? console.warn(c + " only loads once. Ignoring:", o) : f[u] = (y, ...M) => g.add(y) && E().then(() => f[u](y, ...M));
214
- })(r);
215
- const s = this.libraries.map((o) => this.importLibrary(o));
216
- s.length || s.push(this.importLibrary("core")), Promise.all(s).then(() => this.callback(), (o) => {
217
- const i = new ErrorEvent("error", { error: o });
218
- this.loadErrorCallback(i);
219
- });
220
- }
221
- /**
222
- * Reset the loader state.
223
- */
224
- reset() {
225
- this.deleteScript(), this.done = !1, this.loading = !1, this.errors = [], this.onerrorEvent = null;
226
- }
227
- resetIfRetryingFailed() {
228
- this.failed && this.reset();
229
- }
230
- loadErrorCallback(e) {
231
- if (this.errors.push(e), this.errors.length <= this.retries) {
232
- const t = this.errors.length * Math.pow(2, this.errors.length);
233
- console.error(`Failed to load Google Maps script, retrying in ${t} ms.`), setTimeout(() => {
234
- this.deleteScript(), this.setScript();
235
- }, t);
236
- } else
237
- this.onerrorEvent = e, this.callback();
238
- }
239
- callback() {
240
- this.done = !0, this.loading = !1, this.callbacks.forEach((e) => {
241
- e(this.onerrorEvent);
242
- }), this.callbacks = [];
243
- }
244
- execute() {
245
- if (this.resetIfRetryingFailed(), !this.loading)
246
- if (this.done)
247
- this.callback();
248
- else {
249
- if (window.google && window.google.maps && window.google.maps.version) {
250
- console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."), this.callback();
251
- return;
252
- }
253
- this.loading = !0, this.setScript();
254
- }
255
- }
256
- }
257
- function gt(n) {
258
- return class extends n.OverlayView {
259
- constructor(r) {
57
+ function yt(r) {
58
+ return class extends r.OverlayView {
59
+ constructor(n) {
260
60
  super();
261
61
  pe(this, "element");
262
62
  pe(this, "opts");
263
- const { element: s, ...o } = r;
63
+ const { element: s, ...o } = n;
264
64
  this.element = s, this.opts = o, this.opts.map && this.setMap(this.opts.map);
265
65
  }
266
66
  getPosition() {
267
- return this.opts.position ? this.opts.position instanceof n.LatLng ? this.opts.position : new n.LatLng(this.opts.position) : null;
67
+ return this.opts.position ? this.opts.position instanceof r.LatLng ? this.opts.position : new r.LatLng(this.opts.position) : null;
268
68
  }
269
69
  getVisible() {
270
70
  if (!this.element)
271
71
  return !1;
272
- const r = this.element;
273
- return r.style.display !== "none" && r.style.visibility !== "hidden" && (r.style.opacity === "" || Number(r.style.opacity) > 0.01);
72
+ const n = this.element;
73
+ return n.style.display !== "none" && n.style.visibility !== "hidden" && (n.style.opacity === "" || Number(n.style.opacity) > 0.01);
274
74
  }
275
75
  onAdd() {
276
76
  if (!this.element)
277
77
  return;
278
- const r = this.getPanes();
279
- r && r.overlayMouseTarget.appendChild(this.element);
78
+ const n = this.getPanes();
79
+ n && n.overlayMouseTarget.appendChild(this.element);
280
80
  }
281
81
  draw() {
282
82
  if (!this.element)
283
83
  return;
284
- const r = this.getProjection(), s = r == null ? void 0 : r.fromLatLngToDivPixel(this.getPosition());
84
+ const n = this.getProjection(), s = n == null ? void 0 : n.fromLatLngToDivPixel(this.getPosition());
285
85
  if (s) {
286
86
  this.element.style.position = "absolute";
287
87
  let o, i;
@@ -320,14 +120,14 @@ function gt(n) {
320
120
  onRemove() {
321
121
  this.element && this.element.remove();
322
122
  }
323
- setOptions(r) {
324
- const { element: s, ...o } = r;
123
+ setOptions(n) {
124
+ const { element: s, ...o } = n;
325
125
  this.element = s, this.opts = o, this.draw();
326
126
  }
327
127
  };
328
128
  }
329
- let Se;
330
- const Ae = [
129
+ let Pe = !1;
130
+ const be = [
331
131
  "bounds_changed",
332
132
  "center_changed",
333
133
  "click",
@@ -350,7 +150,7 @@ const Ae = [
350
150
  "tilesloaded",
351
151
  "tilt_changed",
352
152
  "zoom_changed"
353
- ], vt = P({
153
+ ], _t = M({
354
154
  props: {
355
155
  apiPromise: {
356
156
  type: Promise
@@ -554,113 +354,110 @@ const Ae = [
554
354
  cameraControlPosition: {
555
355
  type: String,
556
356
  required: !1
557
- },
558
- nonce: {
559
- type: String,
560
- default: ""
561
357
  }
562
358
  },
563
- emits: Ae,
564
- setup(n, { emit: e }) {
565
- const t = w(), r = w(!1), s = w(), o = w(), i = w(!1);
566
- G(D, s), G(Z, o), G(Xe, i);
359
+ emits: be,
360
+ setup(r, { emit: e }) {
361
+ const t = y(), n = y(!1), s = y(), o = y(), i = y(!1);
362
+ U(B, s), U(D, o), U(Ke, i);
567
363
  const l = () => {
568
- const u = { ...n };
569
- Object.keys(u).forEach((f) => {
570
- u[f] === void 0 && delete u[f];
364
+ const u = { ...r };
365
+ Object.keys(u).forEach((p) => {
366
+ u[p] === void 0 && delete u[p];
571
367
  });
572
- const m = (f) => {
368
+ const h = (p) => {
573
369
  var g;
574
- return f ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[f] } : {};
575
- }, p = {
576
- scaleControlOptions: n.scaleControlStyle ? { style: n.scaleControlStyle } : {},
577
- panControlOptions: m(n.panControlPosition),
578
- zoomControlOptions: m(n.zoomControlPosition),
579
- rotateControlOptions: m(n.rotateControlPosition),
580
- streetViewControlOptions: m(n.streetViewControlPosition),
581
- fullscreenControlOptions: m(n.fullscreenControlPosition),
582
- cameraControlOptions: m(n.cameraControlPosition),
583
- disableDefaultUI: n.disableDefaultUi
370
+ return p ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[p] } : {};
371
+ }, m = {
372
+ scaleControlOptions: r.scaleControlStyle ? { style: r.scaleControlStyle } : {},
373
+ panControlOptions: h(r.panControlPosition),
374
+ zoomControlOptions: h(r.zoomControlPosition),
375
+ rotateControlOptions: h(r.rotateControlPosition),
376
+ streetViewControlOptions: h(r.streetViewControlPosition),
377
+ fullscreenControlOptions: h(r.fullscreenControlPosition),
378
+ cameraControlOptions: h(r.cameraControlPosition),
379
+ disableDefaultUI: r.disableDefaultUi
584
380
  };
585
- return { ...u, ...p };
586
- }, a = q(
381
+ return { ...u, ...m };
382
+ }, a = O(
587
383
  [o, s],
588
- ([u, h]) => {
589
- const m = u, p = h;
590
- m && p && (m.event.addListenerOnce(p, "tilesloaded", () => {
384
+ ([u, f]) => {
385
+ const h = u, m = f;
386
+ h && m && (h.event.addListenerOnce(m, "tilesloaded", () => {
591
387
  i.value = !0;
592
388
  }), setTimeout(a, 0));
593
389
  },
594
390
  { immediate: !0 }
595
391
  ), c = () => {
596
- try {
597
- const { apiKey: u, region: h, version: m, language: p, libraries: f, nonce: g } = n;
598
- Se = new N({ apiKey: u, region: h, version: m, language: p, libraries: f, nonce: g });
599
- } catch (u) {
600
- console.error(u);
601
- }
392
+ const { apiKey: u, region: f, version: h, language: m, libraries: p } = r;
393
+ mt({ key: u, region: f, v: h, language: m, libraries: p });
602
394
  }, d = (u) => {
603
- o.value = S(u.maps), s.value = S(new u.maps.Map(t.value, l()));
604
- const h = gt(o.value);
605
- o.value[ue] = h, Ae.forEach((p) => {
606
- var f;
607
- (f = s.value) == null || f.addListener(p, (g) => e(p, g));
608
- }), r.value = !0;
609
- const m = Object.keys(n).filter(
610
- (p) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom", "nonce"].includes(
611
- p
612
- )
613
- ).map((p) => j(n, p));
614
- q(
615
- [() => n.center, () => n.zoom, ...m],
616
- ([p, f], [g, v]) => {
617
- var b, C, T;
618
- const { center: E, zoom: y, ...M } = l();
619
- (b = s.value) == null || b.setOptions(M), f !== void 0 && f !== v && ((C = s.value) == null || C.setZoom(f));
620
- const O = !g || p.lng !== g.lng || p.lat !== g.lat;
621
- p && O && ((T = s.value) == null || T.panTo(p));
395
+ const f = u ? u.maps : google.maps;
396
+ o.value = S(f), s.value = S(new f.Map(t.value, l()));
397
+ const h = yt(o.value);
398
+ o.value[le] = h, be.forEach((p) => {
399
+ var g;
400
+ (g = s.value) == null || g.addListener(p, (v) => e(p, v));
401
+ }), n.value = !0;
402
+ const m = Object.keys(r).filter(
403
+ (p) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom"].includes(p)
404
+ ).map((p) => R(r, p));
405
+ O(
406
+ [() => r.center, () => r.zoom, ...m],
407
+ ([p, g], [v, _]) => {
408
+ var C, T, K;
409
+ const { center: E, zoom: q, ...P } = l();
410
+ (C = s.value) == null || C.setOptions(P), g !== void 0 && g !== _ && ((T = s.value) == null || T.setZoom(g));
411
+ const b = !v || p.lng !== v.lng || p.lat !== v.lat;
412
+ p && b && ((K = s.value) == null || K.panTo(p));
622
413
  }
623
414
  );
624
415
  };
625
- return Ye(() => {
626
- n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(d) : (c(), Se.load().then(d));
627
- }), B(() => {
416
+ return He(() => {
417
+ if (r.apiPromise && r.apiPromise instanceof Promise)
418
+ r.apiPromise.then(d);
419
+ else {
420
+ Pe || (c(), Pe = !0);
421
+ const u = r.libraries && r.libraries.length > 0 ? r.libraries : ["maps", "marker"];
422
+ Promise.all(u.map((f) => gt(f))).then(() => d());
423
+ }
424
+ }), $(() => {
628
425
  var u;
629
426
  i.value = !1, s.value && ((u = o.value) == null || u.event.clearInstanceListeners(s.value));
630
- }), { mapRef: t, ready: r, map: s, api: o, mapTilesLoaded: i };
427
+ }), { mapRef: t, ready: n, map: s, api: o, mapTilesLoaded: i };
631
428
  }
632
429
  });
633
- const re = (n, e) => {
634
- const t = n.__vccOpts || n;
635
- for (const [r, s] of e)
636
- t[r] = s;
430
+ const te = (r, e) => {
431
+ const t = r.__vccOpts || r;
432
+ for (const [n, s] of e)
433
+ t[n] = s;
637
434
  return t;
638
- }, yt = {
435
+ }, Et = {
639
436
  ref: "mapRef",
640
437
  class: "mapdiv"
641
438
  };
642
- function wt(n, e, t, r, s, o) {
643
- return V(), z("div", null, [
644
- le("div", yt, null, 512),
645
- W(n.$slots, "default", lt(ut({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
439
+ function wt(r, e, t, n, s, o) {
440
+ return G(), V("div", null, [
441
+ ie("div", Et, null, 512),
442
+ F(r.$slots, "default", ot(at({ ready: r.ready, map: r.map, api: r.api, mapTilesLoaded: r.mapTilesLoaded })), void 0, !0)
646
443
  ]);
647
444
  }
648
- const Ir = /* @__PURE__ */ re(vt, [["render", wt], ["__scopeId", "data-v-289550ca"]]);
649
- function Et(n) {
650
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
445
+ const jr = /* @__PURE__ */ te(_t, [["render", wt], ["__scopeId", "data-v-c63ff230"]]);
446
+ function kt(r) {
447
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
651
448
  }
652
- var _t = function n(e, t) {
449
+ var Ct = function r(e, t) {
653
450
  if (e === t)
654
451
  return !0;
655
452
  if (e && t && typeof e == "object" && typeof t == "object") {
656
453
  if (e.constructor !== t.constructor)
657
454
  return !1;
658
- var r, s, o;
455
+ var n, s, o;
659
456
  if (Array.isArray(e)) {
660
- if (r = e.length, r != t.length)
457
+ if (n = e.length, n != t.length)
661
458
  return !1;
662
- for (s = r; s-- !== 0; )
663
- if (!n(e[s], t[s]))
459
+ for (s = n; s-- !== 0; )
460
+ if (!r(e[s], t[s]))
664
461
  return !1;
665
462
  return !0;
666
463
  }
@@ -670,21 +467,21 @@ var _t = function n(e, t) {
670
467
  return e.valueOf() === t.valueOf();
671
468
  if (e.toString !== Object.prototype.toString)
672
469
  return e.toString() === t.toString();
673
- if (o = Object.keys(e), r = o.length, r !== Object.keys(t).length)
470
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
674
471
  return !1;
675
- for (s = r; s-- !== 0; )
472
+ for (s = n; s-- !== 0; )
676
473
  if (!Object.prototype.hasOwnProperty.call(t, o[s]))
677
474
  return !1;
678
- for (s = r; s-- !== 0; ) {
475
+ for (s = n; s-- !== 0; ) {
679
476
  var i = o[s];
680
- if (!n(e[i], t[i]))
477
+ if (!r(e[i], t[i]))
681
478
  return !1;
682
479
  }
683
480
  return !0;
684
481
  }
685
482
  return e !== e && t !== t;
686
483
  };
687
- const ee = /* @__PURE__ */ Et(_t), Te = ["click", "drag", "dragend", "dragstart", "gmp-click"], kt = P({
484
+ const Q = /* @__PURE__ */ kt(Ct), Se = ["click", "drag", "dragend", "dragstart", "gmp-click"], Ot = M({
688
485
  name: "AdvancedMarker",
689
486
  props: {
690
487
  options: {
@@ -696,32 +493,32 @@ const ee = /* @__PURE__ */ Et(_t), Te = ["click", "drag", "dragend", "dragstart"
696
493
  required: !1
697
494
  }
698
495
  },
699
- emits: Te,
700
- setup(n, { emit: e, expose: t, slots: r }) {
701
- const s = w(), o = K(() => {
702
- var m;
703
- return (m = r.content) == null ? void 0 : m.call(r).some((p) => p.type !== ye);
704
- }), i = j(n, "options"), l = j(n, "pinOptions"), a = w(), c = k(D, w()), d = k(Z, w()), u = k(ke, w()), h = K(
496
+ emits: Se,
497
+ setup(r, { emit: e, expose: t, slots: n }) {
498
+ const s = y(), o = z(() => {
499
+ var h;
500
+ return (h = n.content) == null ? void 0 : h.call(n).some((m) => m.type !== ve);
501
+ }), i = R(r, "options"), l = R(r, "pinOptions"), a = y(), c = k(B, y()), d = k(D, y()), u = k(we, y()), f = z(
705
502
  () => !!(u.value && d.value && a.value instanceof google.maps.marker.AdvancedMarkerElement)
706
503
  );
707
- return q(
504
+ return O(
708
505
  [c, i, l, s],
709
- async (m, [p, f, g, v]) => {
710
- var C, T, be;
711
- const E = !ee(i.value, f) || !ee(l.value, g), y = s.value !== v, M = E || y || c.value !== p;
712
- if (!c.value || !d.value || !M || o.value && !s.value)
506
+ async (h, [m, p, g, v]) => {
507
+ var C, T, K;
508
+ const _ = !Q(i.value, p) || !Q(l.value, g), E = s.value !== v, q = _ || E || c.value !== m;
509
+ if (!c.value || !d.value || !q || o.value && !s.value)
713
510
  return;
714
- const { AdvancedMarkerElement: O, PinElement: b } = d.value.marker;
511
+ const { AdvancedMarkerElement: P, PinElement: b } = d.value.marker;
715
512
  if (a.value) {
716
- const { map: ce, content: ne, ...de } = i.value;
513
+ const { map: ue, content: re, ...ce } = i.value;
717
514
  Object.assign(a.value, {
718
- content: o.value ? s.value : l.value ? new b(l.value).element : ne,
719
- ...de
720
- }), h.value && ((C = u.value) == null || C.removeMarker(a.value), (T = u.value) == null || T.addMarker(a.value));
515
+ content: o.value ? s.value : l.value ? new b(l.value).element : re,
516
+ ...ce
517
+ }), f.value && ((C = u.value) == null || C.removeMarker(a.value), (T = u.value) == null || T.addMarker(a.value));
721
518
  } else
722
- o.value ? i.value.content = s.value : l.value && (i.value.content = new b(l.value).element), a.value = S(new O(i.value)), h.value ? (be = u.value) == null || be.addMarker(a.value) : a.value.map = c.value, Te.forEach((ce) => {
723
- var ne;
724
- (ne = a.value) == null || ne.addListener(ce, (de) => e(ce, de));
519
+ o.value ? i.value.content = s.value : l.value && (i.value.content = new b(l.value).element), a.value = S(new P(i.value)), f.value ? (K = u.value) == null || K.addMarker(a.value) : a.value.map = c.value, Se.forEach((ue) => {
520
+ var re;
521
+ (re = a.value) == null || re.addListener(ue, (ce) => e(ue, ce));
725
522
  });
726
523
  },
727
524
  {
@@ -729,56 +526,56 @@ const ee = /* @__PURE__ */ Et(_t), Te = ["click", "drag", "dragend", "dragstart"
729
526
  flush: "post"
730
527
  // Ensure DOM updates happen before this watcher runs
731
528
  }
732
- ), B(() => {
733
- var m, p;
734
- a.value && ((m = d.value) == null || m.event.clearInstanceListeners(a.value), h.value ? (p = u.value) == null || p.removeMarker(a.value) : a.value.map = null);
735
- }), G(_e, a), t({ marker: a }), { hasCustomSlotContent: o, markerRef: s };
529
+ ), $(() => {
530
+ var h, m;
531
+ a.value && ((h = d.value) == null || h.event.clearInstanceListeners(a.value), f.value ? (m = u.value) == null || m.removeMarker(a.value) : a.value.map = null);
532
+ }), U(Ee, a), t({ marker: a }), { hasCustomSlotContent: o, markerRef: s };
736
533
  }
737
534
  });
738
- const Ct = {
535
+ const Mt = {
739
536
  key: 0,
740
537
  class: "advanced-marker-wrapper"
741
538
  };
742
- function Ot(n, e, t, r, s, o) {
743
- return V(), z(ct, null, [
744
- n.hasCustomSlotContent ? (V(), z("div", Ct, [
745
- le("div", we({ ref: "markerRef" }, n.$attrs), [
746
- W(n.$slots, "content")
539
+ function Pt(r, e, t, n, s, o) {
540
+ return G(), V(it, null, [
541
+ r.hasCustomSlotContent ? (G(), V("div", Mt, [
542
+ ie("div", ye({ ref: "markerRef" }, r.$attrs), [
543
+ F(r.$slots, "content")
747
544
  ], 16)
748
- ])) : Ee("", !0),
749
- W(n.$slots, "default")
545
+ ])) : _e("", !0),
546
+ F(r.$slots, "default")
750
547
  ], 64);
751
548
  }
752
- const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker", xe = (n) => n === ue, J = (n, e, t, r) => {
753
- const s = w(), o = k(D, w()), i = k(Z, w()), l = k(ke, w()), a = K(
754
- () => !!(l.value && i.value && (s.value instanceof i.value.Marker || s.value instanceof i.value[ue]))
549
+ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker", qe = (r) => r === le, H = (r, e, t, n) => {
550
+ const s = y(), o = k(B, y()), i = k(D, y()), l = k(we, y()), a = z(
551
+ () => !!(l.value && i.value && (s.value instanceof i.value.Marker || s.value instanceof i.value[le]))
755
552
  );
756
- return q(
553
+ return O(
757
554
  [o, t],
758
555
  (c, [d, u]) => {
759
- var m, p, f;
760
- const h = !ee(t.value, u) || o.value !== d;
761
- if (!(!o.value || !i.value || !h))
556
+ var h, m, p;
557
+ const f = !Q(t.value, u) || o.value !== d;
558
+ if (!(!o.value || !i.value || !f))
762
559
  if (s.value)
763
- s.value.setOptions(t.value), a.value && ((m = l.value) == null || m.removeMarker(s.value), (p = l.value) == null || p.addMarker(s.value));
560
+ s.value.setOptions(t.value), a.value && ((h = l.value) == null || h.removeMarker(s.value), (m = l.value) == null || m.addMarker(s.value));
764
561
  else {
765
- if (Le(n))
562
+ if (Ae(r))
766
563
  s.value = S(
767
- new i.value[n](t.value)
564
+ new i.value[r](t.value)
768
565
  );
769
- else if (xe(n)) {
566
+ else if (qe(r)) {
770
567
  const g = t.value;
771
- g.element && (s.value = S(new i.value[n](g)));
568
+ g.element && (s.value = S(new i.value[r](g)));
772
569
  } else
773
570
  s.value = S(
774
- new i.value[n]({
571
+ new i.value[r]({
775
572
  ...t.value,
776
573
  map: o.value
777
574
  })
778
575
  );
779
- s.value && (a.value ? (f = l.value) == null || f.addMarker(s.value) : (Le(n) || xe(n)) && s.value.setMap(o.value)), e.forEach((g) => {
576
+ s.value && (a.value ? (p = l.value) == null || p.addMarker(s.value) : (Ae(r) || qe(r)) && s.value.setMap(o.value)), e.forEach((g) => {
780
577
  var v;
781
- (v = s.value) == null || v.addListener(g, (E) => r(g, E));
578
+ (v = s.value) == null || v.addListener(g, (_) => n(g, _));
782
579
  });
783
580
  }
784
581
  },
@@ -786,11 +583,11 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
786
583
  immediate: !0,
787
584
  flush: "post"
788
585
  }
789
- ), B(() => {
586
+ ), $(() => {
790
587
  var c, d;
791
588
  s.value && ((c = i.value) == null || c.event.clearInstanceListeners(s.value), a.value ? (d = l.value) == null || d.removeMarker(s.value) : s.value.setMap(null));
792
589
  }), s;
793
- }, Ie = [
590
+ }, Te = [
794
591
  "animation_changed",
795
592
  "click",
796
593
  "dblclick",
@@ -813,7 +610,7 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
813
610
  "shape_changed",
814
611
  "title_changed",
815
612
  "visible_changed"
816
- ], Rr = P({
613
+ ], $r = M({
817
614
  name: "Marker",
818
615
  props: {
819
616
  options: {
@@ -821,15 +618,15 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
821
618
  required: !0
822
619
  }
823
620
  },
824
- emits: Ie,
825
- setup(n, { emit: e, expose: t, slots: r }) {
826
- const s = j(n, "options"), o = J("Marker", Ie, s, e);
827
- return G(_e, o), t({ marker: o }), () => {
621
+ emits: Te,
622
+ setup(r, { emit: e, expose: t, slots: n }) {
623
+ const s = R(r, "options"), o = H("Marker", Te, s, e);
624
+ return U(Ee, o), t({ marker: o }), () => {
828
625
  var i;
829
- return (i = r.default) == null ? void 0 : i.call(r);
626
+ return (i = n.default) == null ? void 0 : i.call(n);
830
627
  };
831
628
  }
832
- }), $r = P({
629
+ }), Br = M({
833
630
  name: "Polyline",
834
631
  props: {
835
632
  options: {
@@ -837,13 +634,13 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
837
634
  required: !0
838
635
  }
839
636
  },
840
- emits: H,
841
- setup(n, { emit: e }) {
842
- const t = j(n, "options");
843
- return { polyline: J("Polyline", H, t, e) };
637
+ emits: W,
638
+ setup(r, { emit: e }) {
639
+ const t = R(r, "options");
640
+ return { polyline: H("Polyline", W, t, e) };
844
641
  },
845
642
  render: () => null
846
- }), Nr = P({
643
+ }), Dr = M({
847
644
  name: "Polygon",
848
645
  props: {
849
646
  options: {
@@ -851,13 +648,13 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
851
648
  required: !0
852
649
  }
853
650
  },
854
- emits: H,
855
- setup(n, { emit: e }) {
856
- const t = j(n, "options");
857
- return { polygon: J("Polygon", H, t, e) };
651
+ emits: W,
652
+ setup(r, { emit: e }) {
653
+ const t = R(r, "options");
654
+ return { polygon: H("Polygon", W, t, e) };
858
655
  },
859
656
  render: () => null
860
- }), je = H.concat(["bounds_changed"]), Br = P({
657
+ }), Le = W.concat(["bounds_changed"]), Zr = M({
861
658
  name: "Rectangle",
862
659
  props: {
863
660
  options: {
@@ -865,13 +662,13 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
865
662
  required: !0
866
663
  }
867
664
  },
868
- emits: je,
869
- setup(n, { emit: e }) {
870
- const t = j(n, "options");
871
- return { rectangle: J("Rectangle", je, t, e) };
665
+ emits: Le,
666
+ setup(r, { emit: e }) {
667
+ const t = R(r, "options");
668
+ return { rectangle: H("Rectangle", Le, t, e) };
872
669
  },
873
670
  render: () => null
874
- }), Re = H.concat(["center_changed", "radius_changed"]), Dr = P({
671
+ }), xe = W.concat(["center_changed", "radius_changed"]), Ur = M({
875
672
  name: "Circle",
876
673
  props: {
877
674
  options: {
@@ -879,13 +676,13 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
879
676
  required: !0
880
677
  }
881
678
  },
882
- emits: Re,
883
- setup(n, { emit: e }) {
884
- const t = j(n, "options");
885
- return { circle: J("Circle", Re, t, e) };
679
+ emits: xe,
680
+ setup(r, { emit: e }) {
681
+ const t = R(r, "options");
682
+ return { circle: H("Circle", xe, t, e) };
886
683
  },
887
684
  render: () => null
888
- }), Mt = P({
685
+ }), bt = M({
889
686
  props: {
890
687
  position: {
891
688
  type: String,
@@ -897,57 +694,57 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
897
694
  }
898
695
  },
899
696
  emits: ["content:loaded"],
900
- setup(n, { emit: e }) {
901
- const t = w(null), r = k(D, w()), s = k(Z, w()), o = k(Xe, w(!1)), i = q(
697
+ setup(r, { emit: e }) {
698
+ const t = y(null), n = k(B, y()), s = k(D, y()), o = k(Ke, y(!1)), i = O(
902
699
  [o, s, t],
903
700
  ([c, d, u]) => {
904
- d && c && u && (l(n.position), e("content:loaded"), setTimeout(i, 0));
701
+ d && c && u && (l(r.position), e("content:loaded"), setTimeout(i, 0));
905
702
  },
906
703
  { immediate: !0 }
907
704
  ), l = (c) => {
908
- if (r.value && s.value && t.value) {
705
+ if (n.value && s.value && t.value) {
909
706
  const d = s.value.ControlPosition[c];
910
- t.value.index = n.index, r.value.controls[d].push(t.value);
707
+ t.value.index = r.index, n.value.controls[d].push(t.value);
911
708
  }
912
709
  }, a = (c) => {
913
- if (r.value && s.value) {
710
+ if (n.value && s.value) {
914
711
  let d = null;
915
712
  const u = s.value.ControlPosition[c];
916
- r.value.controls[u].forEach((h, m) => {
917
- h === t.value && (d = m);
918
- }), d !== null && r.value.controls[u].removeAt(d);
713
+ n.value.controls[u].forEach((f, h) => {
714
+ f === t.value && (d = h);
715
+ }), d !== null && n.value.controls[u].removeAt(d);
919
716
  }
920
717
  };
921
- return B(() => a(n.position)), q(
922
- () => n.position,
718
+ return $(() => a(r.position)), O(
719
+ () => r.position,
923
720
  (c, d) => {
924
721
  a(d), l(c);
925
722
  }
926
- ), q(
927
- () => n.index,
723
+ ), O(
724
+ () => r.index,
928
725
  (c) => {
929
726
  t.value && (t.value.index = c);
930
727
  }
931
728
  ), { controlRef: t };
932
729
  }
933
730
  });
934
- const bt = {
731
+ const St = {
935
732
  ref: "controlRef",
936
733
  class: "custom-control-wrapper"
937
734
  };
938
- function Pt(n, e, t, r, s, o) {
939
- return V(), z("div", bt, [
940
- W(n.$slots, "default", {}, void 0, !0)
735
+ function At(r, e, t, n, s, o) {
736
+ return G(), V("div", St, [
737
+ F(r.$slots, "default", {}, void 0, !0)
941
738
  ], 512);
942
739
  }
943
- const Zr = /* @__PURE__ */ re(Mt, [["render", Pt], ["__scopeId", "data-v-ab9120cd"]]), $e = [
740
+ const Gr = /* @__PURE__ */ te(bt, [["render", At], ["__scopeId", "data-v-ab9120cd"]]), Ie = [
944
741
  "closeclick",
945
742
  "content_changed",
946
743
  "domready",
947
744
  "position_changed",
948
745
  "visible",
949
746
  "zindex_changed"
950
- ], qt = P({
747
+ ], qt = M({
951
748
  inheritAttrs: !1,
952
749
  props: {
953
750
  options: {
@@ -958,129 +755,135 @@ const Zr = /* @__PURE__ */ re(Mt, [["render", Pt], ["__scopeId", "data-v-ab9120c
958
755
  type: Boolean
959
756
  }
960
757
  },
961
- emits: [...$e, "update:modelValue"],
962
- setup(n, { slots: e, emit: t, expose: r }) {
963
- const s = w(), o = w(), i = k(D, w()), l = k(Z, w()), a = k(_e, w());
964
- let c, d = n.modelValue;
965
- const u = K(() => {
966
- var f;
967
- return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !== ye);
968
- }), h = (f) => {
969
- d = f, t("update:modelValue", f);
970
- }, m = (f) => {
971
- s.value && (s.value.open({ map: i.value, anchor: a.value, ...f }), h(!0));
972
- }, p = () => {
973
- s.value && (s.value.close(), h(!1));
758
+ emits: [...Ie, "update:modelValue"],
759
+ setup(r, { slots: e, emit: t, expose: n }) {
760
+ const s = y(), o = y(), i = k(B, y()), l = k(D, y()), a = k(Ee, y());
761
+ let c, d = r.modelValue;
762
+ const u = z(() => {
763
+ var p;
764
+ return (p = e.default) == null ? void 0 : p.call(e).some((g) => g.type !== ve);
765
+ }), f = (p) => {
766
+ d = p, t("update:modelValue", p);
767
+ }, h = (p) => {
768
+ s.value && (s.value.open({ map: i.value, anchor: a.value, ...p }), f(!0));
769
+ }, m = () => {
770
+ s.value && (s.value.close(), f(!1));
974
771
  };
975
- return Ye(() => {
976
- q(
977
- [i, () => n.options],
978
- ([f, g], [v, E]) => {
979
- var M;
980
- const y = !ee(g, E) || i.value !== v;
981
- i.value && l.value && y && (s.value ? (s.value.setOptions({
772
+ return He(() => {
773
+ O(
774
+ [i, () => r.options],
775
+ ([p, g], [v, _]) => {
776
+ var q;
777
+ const E = !Q(g, _) || i.value !== v;
778
+ i.value && l.value && E && (s.value ? (s.value.setOptions({
982
779
  ...g,
983
780
  content: u.value ? o.value : g.content
984
- }), a.value || m()) : (s.value = S(
781
+ }), a.value || h()) : (s.value = S(
985
782
  new l.value.InfoWindow({
986
783
  ...g,
987
784
  content: u.value ? o.value : g.content
988
785
  })
989
- ), a.value && (c = a.value.addListener("click", () => {
990
- m();
991
- })), (!a.value || d) && m(), $e.forEach((O) => {
786
+ ), a.value && (c = a.value.addListener("click", () => h())), (!a.value || d) && h(), Ie.forEach((P) => {
992
787
  var b;
993
- (b = s.value) == null || b.addListener(O, (C) => t(O, C));
994
- }), (M = s.value) == null || M.addListener("closeclick", () => h(!1))));
788
+ (b = s.value) == null || b.addListener(P, (C) => t(P, C));
789
+ }), (q = s.value) == null || q.addListener("closeclick", () => f(!1))));
995
790
  },
996
791
  {
997
792
  immediate: !0,
998
793
  flush: "post"
999
794
  }
1000
- ), q(
1001
- () => n.modelValue,
1002
- (f) => {
1003
- f !== d && (f ? m() : p());
795
+ ), O(
796
+ a,
797
+ (p, g) => {
798
+ !s.value || p === g || (c && (c.remove(), c = void 0), p && (c = p.addListener("click", () => h())));
799
+ },
800
+ {
801
+ flush: "post"
802
+ }
803
+ ), O(
804
+ () => r.modelValue,
805
+ (p) => {
806
+ p !== d && (p ? h() : m());
1004
807
  }
1005
808
  );
1006
- }), B(() => {
1007
- var f;
1008
- c && c.remove(), s.value && ((f = l.value) == null || f.event.clearInstanceListeners(s.value), p());
1009
- }), r({ infoWindow: s, open: m, close: p }), { infoWindow: s, infoWindowRef: o, hasSlotContent: u, open: m, close: p };
809
+ }), $(() => {
810
+ var p;
811
+ c && c.remove(), s.value && ((p = l.value) == null || p.event.clearInstanceListeners(s.value), m());
812
+ }), n({ infoWindow: s, open: h, close: m }), { infoWindow: s, infoWindowRef: o, hasSlotContent: u, open: h, close: m };
1010
813
  }
1011
814
  });
1012
- const St = {
815
+ const Tt = {
1013
816
  key: 0,
1014
817
  class: "info-window-wrapper"
1015
818
  };
1016
- function At(n, e, t, r, s, o) {
1017
- return n.hasSlotContent ? (V(), z("div", St, [
1018
- le("div", we({ ref: "infoWindowRef" }, n.$attrs), [
1019
- W(n.$slots, "default", {}, void 0, !0)
819
+ function Lt(r, e, t, n, s, o) {
820
+ return r.hasSlotContent ? (G(), V("div", Tt, [
821
+ ie("div", ye({ ref: "infoWindowRef" }, r.$attrs), [
822
+ F(r.$slots, "default", {}, void 0, !0)
1020
823
  ], 16)
1021
- ])) : Ee("", !0);
824
+ ])) : _e("", !0);
1022
825
  }
1023
- const Fr = /* @__PURE__ */ re(qt, [["render", At], ["__scopeId", "data-v-135889a7"]]);
1024
- var Tt = Object.getOwnPropertyNames, Lt = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty;
1025
- function Ne(n, e) {
1026
- return function(r, s, o) {
1027
- return n(r, s, o) && e(r, s, o);
826
+ const Vr = /* @__PURE__ */ te(qt, [["render", Lt], ["__scopeId", "data-v-d182c1f9"]]);
827
+ var xt = Object.getOwnPropertyNames, It = Object.getOwnPropertySymbols, Rt = Object.prototype.hasOwnProperty;
828
+ function Re(r, e) {
829
+ return function(n, s, o) {
830
+ return r(n, s, o) && e(n, s, o);
1028
831
  };
1029
832
  }
1030
- function se(n) {
1031
- return function(t, r, s) {
1032
- if (!t || !r || typeof t != "object" || typeof r != "object")
1033
- return n(t, r, s);
1034
- var o = s.cache, i = o.get(t), l = o.get(r);
833
+ function ne(r) {
834
+ return function(t, n, s) {
835
+ if (!t || !n || typeof t != "object" || typeof n != "object")
836
+ return r(t, n, s);
837
+ var o = s.cache, i = o.get(t), l = o.get(n);
1035
838
  if (i && l)
1036
- return i === r && l === t;
1037
- o.set(t, r), o.set(r, t);
1038
- var a = n(t, r, s);
1039
- return o.delete(t), o.delete(r), a;
839
+ return i === n && l === t;
840
+ o.set(t, n), o.set(n, t);
841
+ var a = r(t, n, s);
842
+ return o.delete(t), o.delete(n), a;
1040
843
  };
1041
844
  }
1042
- function Be(n) {
1043
- return Tt(n).concat(Lt(n));
845
+ function je(r) {
846
+ return xt(r).concat(It(r));
1044
847
  }
1045
- var It = Object.hasOwn || function(n, e) {
1046
- return xt.call(n, e);
848
+ var jt = Object.hasOwn || function(r, e) {
849
+ return Rt.call(r, e);
1047
850
  };
1048
- function F(n, e) {
1049
- return n === e || !n && !e && n !== n && e !== e;
851
+ function Z(r, e) {
852
+ return r === e || !r && !e && r !== r && e !== e;
1050
853
  }
1051
- var jt = "__v", Rt = "__o", $t = "_owner", De = Object.getOwnPropertyDescriptor, Ze = Object.keys;
1052
- function Nt(n, e, t) {
1053
- var r = n.length;
1054
- if (e.length !== r)
854
+ var Nt = "__v", $t = "__o", Bt = "_owner", Ne = Object.getOwnPropertyDescriptor, $e = Object.keys;
855
+ function Dt(r, e, t) {
856
+ var n = r.length;
857
+ if (e.length !== n)
1055
858
  return !1;
1056
- for (; r-- > 0; )
1057
- if (!t.equals(n[r], e[r], r, r, n, e, t))
859
+ for (; n-- > 0; )
860
+ if (!t.equals(r[n], e[n], n, n, r, e, t))
1058
861
  return !1;
1059
862
  return !0;
1060
863
  }
1061
- function Bt(n, e) {
1062
- return F(n.getTime(), e.getTime());
864
+ function Zt(r, e) {
865
+ return Z(r.getTime(), e.getTime());
1063
866
  }
1064
- function Dt(n, e) {
1065
- return n.name === e.name && n.message === e.message && n.cause === e.cause && n.stack === e.stack;
867
+ function Ut(r, e) {
868
+ return r.name === e.name && r.message === e.message && r.cause === e.cause && r.stack === e.stack;
1066
869
  }
1067
- function Zt(n, e) {
1068
- return n === e;
870
+ function Gt(r, e) {
871
+ return r === e;
1069
872
  }
1070
- function Fe(n, e, t) {
1071
- var r = n.size;
1072
- if (r !== e.size)
873
+ function Be(r, e, t) {
874
+ var n = r.size;
875
+ if (n !== e.size)
1073
876
  return !1;
1074
- if (!r)
877
+ if (!n)
1075
878
  return !0;
1076
- for (var s = new Array(r), o = n.entries(), i, l, a = 0; (i = o.next()) && !i.done; ) {
879
+ for (var s = new Array(n), o = r.entries(), i, l, a = 0; (i = o.next()) && !i.done; ) {
1077
880
  for (var c = e.entries(), d = !1, u = 0; (l = c.next()) && !l.done; ) {
1078
881
  if (s[u]) {
1079
882
  u++;
1080
883
  continue;
1081
884
  }
1082
- var h = i.value, m = l.value;
1083
- if (t.equals(h[0], m[0], a, u, n, e, t) && t.equals(h[1], m[1], h[0], m[0], n, e, t)) {
885
+ var f = i.value, h = l.value;
886
+ if (t.equals(f[0], h[0], a, u, r, e, t) && t.equals(f[1], h[1], f[0], h[0], r, e, t)) {
1084
887
  d = s[u] = !0;
1085
888
  break;
1086
889
  }
@@ -1092,40 +895,40 @@ function Fe(n, e, t) {
1092
895
  }
1093
896
  return !0;
1094
897
  }
1095
- var Ft = F;
1096
- function Ut(n, e, t) {
1097
- var r = Ze(n), s = r.length;
1098
- if (Ze(e).length !== s)
898
+ var Vt = Z;
899
+ function Ft(r, e, t) {
900
+ var n = $e(r), s = n.length;
901
+ if ($e(e).length !== s)
1099
902
  return !1;
1100
903
  for (; s-- > 0; )
1101
- if (!Qe(n, e, t, r[s]))
904
+ if (!Ye(r, e, t, n[s]))
1102
905
  return !1;
1103
906
  return !0;
1104
907
  }
1105
- function Y(n, e, t) {
1106
- var r = Be(n), s = r.length;
1107
- if (Be(e).length !== s)
908
+ function Y(r, e, t) {
909
+ var n = je(r), s = n.length;
910
+ if (je(e).length !== s)
1108
911
  return !1;
1109
912
  for (var o, i, l; s-- > 0; )
1110
- if (o = r[s], !Qe(n, e, t, o) || (i = De(n, o), l = De(e, o), (i || l) && (!i || !l || i.configurable !== l.configurable || i.enumerable !== l.enumerable || i.writable !== l.writable)))
913
+ if (o = n[s], !Ye(r, e, t, o) || (i = Ne(r, o), l = Ne(e, o), (i || l) && (!i || !l || i.configurable !== l.configurable || i.enumerable !== l.enumerable || i.writable !== l.writable)))
1111
914
  return !1;
1112
915
  return !0;
1113
916
  }
1114
- function Gt(n, e) {
1115
- return F(n.valueOf(), e.valueOf());
917
+ function zt(r, e) {
918
+ return Z(r.valueOf(), e.valueOf());
1116
919
  }
1117
- function Vt(n, e) {
1118
- return n.source === e.source && n.flags === e.flags;
920
+ function Wt(r, e) {
921
+ return r.source === e.source && r.flags === e.flags;
1119
922
  }
1120
- function Ue(n, e, t) {
1121
- var r = n.size;
1122
- if (r !== e.size)
923
+ function De(r, e, t) {
924
+ var n = r.size;
925
+ if (n !== e.size)
1123
926
  return !1;
1124
- if (!r)
927
+ if (!n)
1125
928
  return !0;
1126
- for (var s = new Array(r), o = n.values(), i, l; (i = o.next()) && !i.done; ) {
929
+ for (var s = new Array(n), o = r.values(), i, l; (i = o.next()) && !i.done; ) {
1127
930
  for (var a = e.values(), c = !1, d = 0; (l = a.next()) && !l.done; ) {
1128
- if (!s[d] && t.equals(i.value, l.value, i.value, l.value, n, e, t)) {
931
+ if (!s[d] && t.equals(i.value, l.value, i.value, l.value, r, e, t)) {
1129
932
  c = s[d] = !0;
1130
933
  break;
1131
934
  }
@@ -1136,73 +939,73 @@ function Ue(n, e, t) {
1136
939
  }
1137
940
  return !0;
1138
941
  }
1139
- function zt(n, e) {
1140
- var t = n.length;
942
+ function Ht(r, e) {
943
+ var t = r.length;
1141
944
  if (e.length !== t)
1142
945
  return !1;
1143
946
  for (; t-- > 0; )
1144
- if (n[t] !== e[t])
947
+ if (r[t] !== e[t])
1145
948
  return !1;
1146
949
  return !0;
1147
950
  }
1148
- function Wt(n, e) {
1149
- return n.hostname === e.hostname && n.pathname === e.pathname && n.protocol === e.protocol && n.port === e.port && n.hash === e.hash && n.username === e.username && n.password === e.password;
951
+ function Kt(r, e) {
952
+ return r.hostname === e.hostname && r.pathname === e.pathname && r.protocol === e.protocol && r.port === e.port && r.hash === e.hash && r.username === e.username && r.password === e.password;
1150
953
  }
1151
- function Qe(n, e, t, r) {
1152
- return (r === $t || r === Rt || r === jt) && (n.$$typeof || e.$$typeof) ? !0 : It(e, r) && t.equals(n[r], e[r], r, r, n, e, t);
954
+ function Ye(r, e, t, n) {
955
+ return (n === Bt || n === $t || n === Nt) && (r.$$typeof || e.$$typeof) ? !0 : jt(e, n) && t.equals(r[n], e[n], n, n, r, e, t);
1153
956
  }
1154
- var Kt = "[object Arguments]", Ht = "[object Boolean]", Jt = "[object Date]", Yt = "[object Error]", Xt = "[object Map]", Qt = "[object Number]", er = "[object Object]", tr = "[object RegExp]", rr = "[object Set]", nr = "[object String]", sr = "[object URL]", or = Array.isArray, Ge = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, Ve = Object.assign, ir = Object.prototype.toString.call.bind(Object.prototype.toString);
1155
- function ar(n) {
1156
- var e = n.areArraysEqual, t = n.areDatesEqual, r = n.areErrorsEqual, s = n.areFunctionsEqual, o = n.areMapsEqual, i = n.areNumbersEqual, l = n.areObjectsEqual, a = n.arePrimitiveWrappersEqual, c = n.areRegExpsEqual, d = n.areSetsEqual, u = n.areTypedArraysEqual, h = n.areUrlsEqual;
1157
- return function(p, f, g) {
1158
- if (p === f)
957
+ var Yt = "[object Arguments]", Jt = "[object Boolean]", Xt = "[object Date]", Qt = "[object Error]", er = "[object Map]", tr = "[object Number]", rr = "[object Object]", nr = "[object RegExp]", sr = "[object Set]", or = "[object String]", ar = "[object URL]", ir = Array.isArray, Ze = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, Ue = Object.assign, lr = Object.prototype.toString.call.bind(Object.prototype.toString);
958
+ function ur(r) {
959
+ var e = r.areArraysEqual, t = r.areDatesEqual, n = r.areErrorsEqual, s = r.areFunctionsEqual, o = r.areMapsEqual, i = r.areNumbersEqual, l = r.areObjectsEqual, a = r.arePrimitiveWrappersEqual, c = r.areRegExpsEqual, d = r.areSetsEqual, u = r.areTypedArraysEqual, f = r.areUrlsEqual;
960
+ return function(m, p, g) {
961
+ if (m === p)
1159
962
  return !0;
1160
- if (p == null || f == null)
963
+ if (m == null || p == null)
1161
964
  return !1;
1162
- var v = typeof p;
1163
- if (v !== typeof f)
965
+ var v = typeof m;
966
+ if (v !== typeof p)
1164
967
  return !1;
1165
968
  if (v !== "object")
1166
- return v === "number" ? i(p, f, g) : v === "function" ? s(p, f, g) : !1;
1167
- var E = p.constructor;
1168
- if (E !== f.constructor)
969
+ return v === "number" ? i(m, p, g) : v === "function" ? s(m, p, g) : !1;
970
+ var _ = m.constructor;
971
+ if (_ !== p.constructor)
1169
972
  return !1;
1170
- if (E === Object)
1171
- return l(p, f, g);
1172
- if (or(p))
1173
- return e(p, f, g);
1174
- if (Ge != null && Ge(p))
1175
- return u(p, f, g);
1176
- if (E === Date)
1177
- return t(p, f, g);
1178
- if (E === RegExp)
1179
- return c(p, f, g);
1180
- if (E === Map)
1181
- return o(p, f, g);
1182
- if (E === Set)
1183
- return d(p, f, g);
1184
- var y = ir(p);
1185
- return y === Jt ? t(p, f, g) : y === tr ? c(p, f, g) : y === Xt ? o(p, f, g) : y === rr ? d(p, f, g) : y === er ? typeof p.then != "function" && typeof f.then != "function" && l(p, f, g) : y === sr ? h(p, f, g) : y === Yt ? r(p, f, g) : y === Kt ? l(p, f, g) : y === Ht || y === Qt || y === nr ? a(p, f, g) : !1;
973
+ if (_ === Object)
974
+ return l(m, p, g);
975
+ if (ir(m))
976
+ return e(m, p, g);
977
+ if (Ze != null && Ze(m))
978
+ return u(m, p, g);
979
+ if (_ === Date)
980
+ return t(m, p, g);
981
+ if (_ === RegExp)
982
+ return c(m, p, g);
983
+ if (_ === Map)
984
+ return o(m, p, g);
985
+ if (_ === Set)
986
+ return d(m, p, g);
987
+ var E = lr(m);
988
+ return E === Xt ? t(m, p, g) : E === nr ? c(m, p, g) : E === er ? o(m, p, g) : E === sr ? d(m, p, g) : E === rr ? typeof m.then != "function" && typeof p.then != "function" && l(m, p, g) : E === ar ? f(m, p, g) : E === Qt ? n(m, p, g) : E === Yt ? l(m, p, g) : E === Jt || E === tr || E === or ? a(m, p, g) : !1;
1186
989
  };
1187
990
  }
1188
- function lr(n) {
1189
- var e = n.circular, t = n.createCustomConfig, r = n.strict, s = {
1190
- areArraysEqual: r ? Y : Nt,
1191
- areDatesEqual: Bt,
1192
- areErrorsEqual: Dt,
1193
- areFunctionsEqual: Zt,
1194
- areMapsEqual: r ? Ne(Fe, Y) : Fe,
1195
- areNumbersEqual: Ft,
1196
- areObjectsEqual: r ? Y : Ut,
1197
- arePrimitiveWrappersEqual: Gt,
1198
- areRegExpsEqual: Vt,
1199
- areSetsEqual: r ? Ne(Ue, Y) : Ue,
1200
- areTypedArraysEqual: r ? Y : zt,
1201
- areUrlsEqual: Wt
991
+ function cr(r) {
992
+ var e = r.circular, t = r.createCustomConfig, n = r.strict, s = {
993
+ areArraysEqual: n ? Y : Dt,
994
+ areDatesEqual: Zt,
995
+ areErrorsEqual: Ut,
996
+ areFunctionsEqual: Gt,
997
+ areMapsEqual: n ? Re(Be, Y) : Be,
998
+ areNumbersEqual: Vt,
999
+ areObjectsEqual: n ? Y : Ft,
1000
+ arePrimitiveWrappersEqual: zt,
1001
+ areRegExpsEqual: Wt,
1002
+ areSetsEqual: n ? Re(De, Y) : De,
1003
+ areTypedArraysEqual: n ? Y : Ht,
1004
+ areUrlsEqual: Kt
1202
1005
  };
1203
- if (t && (s = Ve({}, s, t(s))), e) {
1204
- var o = se(s.areArraysEqual), i = se(s.areMapsEqual), l = se(s.areObjectsEqual), a = se(s.areSetsEqual);
1205
- s = Ve({}, s, {
1006
+ if (t && (s = Ue({}, s, t(s))), e) {
1007
+ var o = ne(s.areArraysEqual), i = ne(s.areMapsEqual), l = ne(s.areObjectsEqual), a = ne(s.areSetsEqual);
1008
+ s = Ue({}, s, {
1206
1009
  areArraysEqual: o,
1207
1010
  areMapsEqual: i,
1208
1011
  areObjectsEqual: l,
@@ -1211,20 +1014,20 @@ function lr(n) {
1211
1014
  }
1212
1015
  return s;
1213
1016
  }
1214
- function ur(n) {
1215
- return function(e, t, r, s, o, i, l) {
1216
- return n(e, t, l);
1017
+ function pr(r) {
1018
+ return function(e, t, n, s, o, i, l) {
1019
+ return r(e, t, l);
1217
1020
  };
1218
1021
  }
1219
- function cr(n) {
1220
- var e = n.circular, t = n.comparator, r = n.createState, s = n.equals, o = n.strict;
1221
- if (r)
1022
+ function dr(r) {
1023
+ var e = r.circular, t = r.comparator, n = r.createState, s = r.equals, o = r.strict;
1024
+ if (n)
1222
1025
  return function(a, c) {
1223
- var d = r(), u = d.cache, h = u === void 0 ? e ? /* @__PURE__ */ new WeakMap() : void 0 : u, m = d.meta;
1026
+ var d = n(), u = d.cache, f = u === void 0 ? e ? /* @__PURE__ */ new WeakMap() : void 0 : u, h = d.meta;
1224
1027
  return t(a, c, {
1225
- cache: h,
1028
+ cache: f,
1226
1029
  equals: s,
1227
- meta: m,
1030
+ meta: h,
1228
1031
  strict: o
1229
1032
  });
1230
1033
  };
@@ -1247,43 +1050,43 @@ function cr(n) {
1247
1050
  return t(a, c, i);
1248
1051
  };
1249
1052
  }
1250
- var ae = R();
1251
- R({ strict: !0 });
1252
- R({ circular: !0 });
1253
- R({
1053
+ var ae = j();
1054
+ j({ strict: !0 });
1055
+ j({ circular: !0 });
1056
+ j({
1254
1057
  circular: !0,
1255
1058
  strict: !0
1256
1059
  });
1257
- R({
1060
+ j({
1258
1061
  createInternalComparator: function() {
1259
- return F;
1062
+ return Z;
1260
1063
  }
1261
1064
  });
1262
- R({
1065
+ j({
1263
1066
  strict: !0,
1264
1067
  createInternalComparator: function() {
1265
- return F;
1068
+ return Z;
1266
1069
  }
1267
1070
  });
1268
- R({
1071
+ j({
1269
1072
  circular: !0,
1270
1073
  createInternalComparator: function() {
1271
- return F;
1074
+ return Z;
1272
1075
  }
1273
1076
  });
1274
- R({
1077
+ j({
1275
1078
  circular: !0,
1276
1079
  createInternalComparator: function() {
1277
- return F;
1080
+ return Z;
1278
1081
  },
1279
1082
  strict: !0
1280
1083
  });
1281
- function R(n) {
1282
- n === void 0 && (n = {});
1283
- var e = n.circular, t = e === void 0 ? !1 : e, r = n.createInternalComparator, s = n.createState, o = n.strict, i = o === void 0 ? !1 : o, l = lr(n), a = ar(l), c = r ? r(a) : ur(a);
1284
- return cr({ circular: t, comparator: a, createState: s, equals: c, strict: i });
1084
+ function j(r) {
1085
+ r === void 0 && (r = {});
1086
+ var e = r.circular, t = e === void 0 ? !1 : e, n = r.createInternalComparator, s = r.createState, o = r.strict, i = o === void 0 ? !1 : o, l = cr(r), a = ur(l), c = n ? n(a) : pr(a);
1087
+ return dr({ circular: t, comparator: a, createState: s, equals: c, strict: i });
1285
1088
  }
1286
- const ze = [
1089
+ const Ge = [
1287
1090
  Int8Array,
1288
1091
  Uint8Array,
1289
1092
  Uint8ClampedArray,
@@ -1293,7 +1096,7 @@ const ze = [
1293
1096
  Uint32Array,
1294
1097
  Float32Array,
1295
1098
  Float64Array
1296
- ], he = 1, X = 8;
1099
+ ], de = 1, J = 8;
1297
1100
  class Ce {
1298
1101
  /**
1299
1102
  * Creates an index from raw `ArrayBuffer` data.
@@ -1302,13 +1105,13 @@ class Ce {
1302
1105
  static from(e) {
1303
1106
  if (!(e instanceof ArrayBuffer))
1304
1107
  throw new Error("Data must be an instance of ArrayBuffer.");
1305
- const [t, r] = new Uint8Array(e, 0, 2);
1108
+ const [t, n] = new Uint8Array(e, 0, 2);
1306
1109
  if (t !== 219)
1307
1110
  throw new Error("Data does not appear to be in a KDBush format.");
1308
- const s = r >> 4;
1309
- if (s !== he)
1310
- throw new Error(`Got v${s} data when expected v${he}.`);
1311
- const o = ze[r & 15];
1111
+ const s = n >> 4;
1112
+ if (s !== de)
1113
+ throw new Error(`Got v${s} data when expected v${de}.`);
1114
+ const o = Ge[n & 15];
1312
1115
  if (!o)
1313
1116
  throw new Error("Unrecognized array type.");
1314
1117
  const [i] = new Uint16Array(e, 2, 1), [l] = new Uint32Array(e, 4, 1);
@@ -1321,14 +1124,14 @@ class Ce {
1321
1124
  * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
1322
1125
  * @param {ArrayBuffer} [data] (For internal use only)
1323
1126
  */
1324
- constructor(e, t = 64, r = Float64Array, s) {
1127
+ constructor(e, t = 64, n = Float64Array, s) {
1325
1128
  if (isNaN(e) || e < 0)
1326
1129
  throw new Error(`Unpexpected numItems value: ${e}.`);
1327
- this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = r, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
1328
- const o = ze.indexOf(this.ArrayType), i = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, a = (8 - l % 8) % 8;
1130
+ this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = n, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
1131
+ const o = Ge.indexOf(this.ArrayType), i = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, a = (8 - l % 8) % 8;
1329
1132
  if (o < 0)
1330
- throw new Error(`Unexpected typed array class: ${r}.`);
1331
- s && s instanceof ArrayBuffer ? (this.data = s, this.ids = new this.IndexArrayType(this.data, X, e), this.coords = new this.ArrayType(this.data, X + l + a, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(X + i + l + a), this.ids = new this.IndexArrayType(this.data, X, e), this.coords = new this.ArrayType(this.data, X + l + a, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (he << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
1133
+ throw new Error(`Unexpected typed array class: ${n}.`);
1134
+ s && s instanceof ArrayBuffer ? (this.data = s, this.ids = new this.IndexArrayType(this.data, J, e), this.coords = new this.ArrayType(this.data, J + l + a, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(J + i + l + a), this.ids = new this.IndexArrayType(this.data, J, e), this.coords = new this.ArrayType(this.data, J + l + a, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (de << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
1332
1135
  }
1333
1136
  /**
1334
1137
  * Add a point to the index.
@@ -1337,8 +1140,8 @@ class Ce {
1337
1140
  * @returns {number} An incremental index associated with the added item (starting from `0`).
1338
1141
  */
1339
1142
  add(e, t) {
1340
- const r = this._pos >> 1;
1341
- return this.ids[r] = r, this.coords[this._pos++] = e, this.coords[this._pos++] = t, r;
1143
+ const n = this._pos >> 1;
1144
+ return this.ids[n] = n, this.coords[this._pos++] = e, this.coords[this._pos++] = t, n;
1342
1145
  }
1343
1146
  /**
1344
1147
  * Perform indexing of the added points.
@@ -1347,7 +1150,7 @@ class Ce {
1347
1150
  const e = this._pos >> 1;
1348
1151
  if (e !== this.numItems)
1349
1152
  throw new Error(`Added ${e} items when expected ${this.numItems}.`);
1350
- return ve(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
1153
+ return ge(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
1351
1154
  }
1352
1155
  /**
1353
1156
  * Search the index for items within a given bounding box.
@@ -1357,21 +1160,21 @@ class Ce {
1357
1160
  * @param {number} maxY
1358
1161
  * @returns {number[]} An array of indices correponding to the found items.
1359
1162
  */
1360
- range(e, t, r, s) {
1163
+ range(e, t, n, s) {
1361
1164
  if (!this._finished)
1362
1165
  throw new Error("Data not yet indexed - call index.finish().");
1363
1166
  const { ids: o, coords: i, nodeSize: l } = this, a = [0, o.length - 1, 0], c = [];
1364
1167
  for (; a.length; ) {
1365
- const d = a.pop() || 0, u = a.pop() || 0, h = a.pop() || 0;
1366
- if (u - h <= l) {
1367
- for (let g = h; g <= u; g++) {
1368
- const v = i[2 * g], E = i[2 * g + 1];
1369
- v >= e && v <= r && E >= t && E <= s && c.push(o[g]);
1168
+ const d = a.pop() || 0, u = a.pop() || 0, f = a.pop() || 0;
1169
+ if (u - f <= l) {
1170
+ for (let g = f; g <= u; g++) {
1171
+ const v = i[2 * g], _ = i[2 * g + 1];
1172
+ v >= e && v <= n && _ >= t && _ <= s && c.push(o[g]);
1370
1173
  }
1371
1174
  continue;
1372
1175
  }
1373
- const m = h + u >> 1, p = i[2 * m], f = i[2 * m + 1];
1374
- p >= e && p <= r && f >= t && f <= s && c.push(o[m]), (d === 0 ? e <= p : t <= f) && (a.push(h), a.push(m - 1), a.push(1 - d)), (d === 0 ? r >= p : s >= f) && (a.push(m + 1), a.push(u), a.push(1 - d));
1176
+ const h = f + u >> 1, m = i[2 * h], p = i[2 * h + 1];
1177
+ m >= e && m <= n && p >= t && p <= s && c.push(o[h]), (d === 0 ? e <= m : t <= p) && (a.push(f), a.push(h - 1), a.push(1 - d)), (d === 0 ? n >= m : s >= p) && (a.push(h + 1), a.push(u), a.push(1 - d));
1375
1178
  }
1376
1179
  return c;
1377
1180
  }
@@ -1382,58 +1185,58 @@ class Ce {
1382
1185
  * @param {number} r Query radius.
1383
1186
  * @returns {number[]} An array of indices correponding to the found items.
1384
1187
  */
1385
- within(e, t, r) {
1188
+ within(e, t, n) {
1386
1189
  if (!this._finished)
1387
1190
  throw new Error("Data not yet indexed - call index.finish().");
1388
- const { ids: s, coords: o, nodeSize: i } = this, l = [0, s.length - 1, 0], a = [], c = r * r;
1191
+ const { ids: s, coords: o, nodeSize: i } = this, l = [0, s.length - 1, 0], a = [], c = n * n;
1389
1192
  for (; l.length; ) {
1390
- const d = l.pop() || 0, u = l.pop() || 0, h = l.pop() || 0;
1391
- if (u - h <= i) {
1392
- for (let g = h; g <= u; g++)
1393
- We(o[2 * g], o[2 * g + 1], e, t) <= c && a.push(s[g]);
1193
+ const d = l.pop() || 0, u = l.pop() || 0, f = l.pop() || 0;
1194
+ if (u - f <= i) {
1195
+ for (let g = f; g <= u; g++)
1196
+ Ve(o[2 * g], o[2 * g + 1], e, t) <= c && a.push(s[g]);
1394
1197
  continue;
1395
1198
  }
1396
- const m = h + u >> 1, p = o[2 * m], f = o[2 * m + 1];
1397
- We(p, f, e, t) <= c && a.push(s[m]), (d === 0 ? e - r <= p : t - r <= f) && (l.push(h), l.push(m - 1), l.push(1 - d)), (d === 0 ? e + r >= p : t + r >= f) && (l.push(m + 1), l.push(u), l.push(1 - d));
1199
+ const h = f + u >> 1, m = o[2 * h], p = o[2 * h + 1];
1200
+ Ve(m, p, e, t) <= c && a.push(s[h]), (d === 0 ? e - n <= m : t - n <= p) && (l.push(f), l.push(h - 1), l.push(1 - d)), (d === 0 ? e + n >= m : t + n >= p) && (l.push(h + 1), l.push(u), l.push(1 - d));
1398
1201
  }
1399
1202
  return a;
1400
1203
  }
1401
1204
  }
1402
- function ve(n, e, t, r, s, o) {
1403
- if (s - r <= t)
1205
+ function ge(r, e, t, n, s, o) {
1206
+ if (s - n <= t)
1404
1207
  return;
1405
- const i = r + s >> 1;
1406
- et(n, e, i, r, s, o), ve(n, e, t, r, i - 1, 1 - o), ve(n, e, t, i + 1, s, 1 - o);
1208
+ const i = n + s >> 1;
1209
+ Je(r, e, i, n, s, o), ge(r, e, t, n, i - 1, 1 - o), ge(r, e, t, i + 1, s, 1 - o);
1407
1210
  }
1408
- function et(n, e, t, r, s, o) {
1409
- for (; s > r; ) {
1410
- if (s - r > 600) {
1411
- const c = s - r + 1, d = t - r + 1, u = Math.log(c), h = 0.5 * Math.exp(2 * u / 3), m = 0.5 * Math.sqrt(u * h * (c - h) / c) * (d - c / 2 < 0 ? -1 : 1), p = Math.max(r, Math.floor(t - d * h / c + m)), f = Math.min(s, Math.floor(t + (c - d) * h / c + m));
1412
- et(n, e, t, p, f, o);
1211
+ function Je(r, e, t, n, s, o) {
1212
+ for (; s > n; ) {
1213
+ if (s - n > 600) {
1214
+ const c = s - n + 1, d = t - n + 1, u = Math.log(c), f = 0.5 * Math.exp(2 * u / 3), h = 0.5 * Math.sqrt(u * f * (c - f) / c) * (d - c / 2 < 0 ? -1 : 1), m = Math.max(n, Math.floor(t - d * f / c + h)), p = Math.min(s, Math.floor(t + (c - d) * f / c + h));
1215
+ Je(r, e, t, m, p, o);
1413
1216
  }
1414
1217
  const i = e[2 * t + o];
1415
- let l = r, a = s;
1416
- for (Q(n, e, r, t), e[2 * s + o] > i && Q(n, e, r, s); l < a; ) {
1417
- for (Q(n, e, l, a), l++, a--; e[2 * l + o] < i; )
1218
+ let l = n, a = s;
1219
+ for (X(r, e, n, t), e[2 * s + o] > i && X(r, e, n, s); l < a; ) {
1220
+ for (X(r, e, l, a), l++, a--; e[2 * l + o] < i; )
1418
1221
  l++;
1419
1222
  for (; e[2 * a + o] > i; )
1420
1223
  a--;
1421
1224
  }
1422
- e[2 * r + o] === i ? Q(n, e, r, a) : (a++, Q(n, e, a, s)), a <= t && (r = a + 1), t <= a && (s = a - 1);
1225
+ e[2 * n + o] === i ? X(r, e, n, a) : (a++, X(r, e, a, s)), a <= t && (n = a + 1), t <= a && (s = a - 1);
1423
1226
  }
1424
1227
  }
1425
- function Q(n, e, t, r) {
1426
- me(n, t, r), me(e, 2 * t, 2 * r), me(e, 2 * t + 1, 2 * r + 1);
1228
+ function X(r, e, t, n) {
1229
+ fe(r, t, n), fe(e, 2 * t, 2 * n), fe(e, 2 * t + 1, 2 * n + 1);
1427
1230
  }
1428
- function me(n, e, t) {
1429
- const r = n[e];
1430
- n[e] = n[t], n[t] = r;
1231
+ function fe(r, e, t) {
1232
+ const n = r[e];
1233
+ r[e] = r[t], r[t] = n;
1431
1234
  }
1432
- function We(n, e, t, r) {
1433
- const s = n - t, o = e - r;
1235
+ function Ve(r, e, t, n) {
1236
+ const s = r - t, o = e - n;
1434
1237
  return s * s + o * o;
1435
1238
  }
1436
- const dr = {
1239
+ const fr = {
1437
1240
  minZoom: 0,
1438
1241
  // min zoom to generate clusters on
1439
1242
  maxZoom: 16,
@@ -1454,15 +1257,15 @@ const dr = {
1454
1257
  reduce: null,
1455
1258
  // (accumulated, props) => { accumulated.sum += props.sum; }
1456
1259
  // properties to use for individual points when running the reducer
1457
- map: (n) => n
1260
+ map: (r) => r
1458
1261
  // props => ({sum: props.my_value})
1459
- }, Ke = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), $ = 2, x = 3, ge = 4, L = 5, tt = 6;
1460
- class rt {
1262
+ }, Fe = Math.fround || ((r) => (e) => (r[0] = +e, r[0]))(new Float32Array(1)), N = 2, x = 3, he = 4, L = 5, Xe = 6;
1263
+ class Qe {
1461
1264
  constructor(e) {
1462
- this.options = Object.assign(Object.create(dr), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1265
+ this.options = Object.assign(Object.create(fr), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1463
1266
  }
1464
1267
  load(e) {
1465
- const { log: t, minZoom: r, maxZoom: s } = this.options;
1268
+ const { log: t, minZoom: n, maxZoom: s } = this.options;
1466
1269
  t && console.time("total time");
1467
1270
  const o = `prepare ${e.length} points`;
1468
1271
  t && console.time(o), this.points = e;
@@ -1471,10 +1274,10 @@ class rt {
1471
1274
  const c = e[a];
1472
1275
  if (!c.geometry)
1473
1276
  continue;
1474
- const [d, u] = c.geometry.coordinates, h = Ke(oe(d)), m = Ke(ie(u));
1277
+ const [d, u] = c.geometry.coordinates, f = Fe(se(d)), h = Fe(oe(u));
1475
1278
  i.push(
1279
+ f,
1476
1280
  h,
1477
- m,
1478
1281
  // projected point coordinates
1479
1282
  1 / 0,
1480
1283
  // the last zoom the point was processed at
@@ -1488,74 +1291,74 @@ class rt {
1488
1291
  }
1489
1292
  let l = this.trees[s + 1] = this._createTree(i);
1490
1293
  t && console.timeEnd(o);
1491
- for (let a = s; a >= r; a--) {
1294
+ for (let a = s; a >= n; a--) {
1492
1295
  const c = +Date.now();
1493
1296
  l = this.trees[a] = this._createTree(this._cluster(l, a)), t && console.log("z%d: %d clusters in %dms", a, l.numItems, +Date.now() - c);
1494
1297
  }
1495
1298
  return t && console.timeEnd("total time"), this;
1496
1299
  }
1497
1300
  getClusters(e, t) {
1498
- let r = ((e[0] + 180) % 360 + 360) % 360 - 180;
1301
+ let n = ((e[0] + 180) % 360 + 360) % 360 - 180;
1499
1302
  const s = Math.max(-90, Math.min(90, e[1]));
1500
1303
  let o = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180;
1501
1304
  const i = Math.max(-90, Math.min(90, e[3]));
1502
1305
  if (e[2] - e[0] >= 360)
1503
- r = -180, o = 180;
1504
- else if (r > o) {
1505
- const u = this.getClusters([r, s, 180, i], t), h = this.getClusters([-180, s, o, i], t);
1506
- return u.concat(h);
1306
+ n = -180, o = 180;
1307
+ else if (n > o) {
1308
+ const u = this.getClusters([n, s, 180, i], t), f = this.getClusters([-180, s, o, i], t);
1309
+ return u.concat(f);
1507
1310
  }
1508
- const l = this.trees[this._limitZoom(t)], a = l.range(oe(r), ie(i), oe(o), ie(s)), c = l.data, d = [];
1311
+ const l = this.trees[this._limitZoom(t)], a = l.range(se(n), oe(i), se(o), oe(s)), c = l.data, d = [];
1509
1312
  for (const u of a) {
1510
- const h = this.stride * u;
1511
- d.push(c[h + L] > 1 ? He(c, h, this.clusterProps) : this.points[c[h + x]]);
1313
+ const f = this.stride * u;
1314
+ d.push(c[f + L] > 1 ? ze(c, f, this.clusterProps) : this.points[c[f + x]]);
1512
1315
  }
1513
1316
  return d;
1514
1317
  }
1515
1318
  getChildren(e) {
1516
- const t = this._getOriginId(e), r = this._getOriginZoom(e), s = "No cluster with the specified id.", o = this.trees[r];
1319
+ const t = this._getOriginId(e), n = this._getOriginZoom(e), s = "No cluster with the specified id.", o = this.trees[n];
1517
1320
  if (!o)
1518
1321
  throw new Error(s);
1519
1322
  const i = o.data;
1520
1323
  if (t * this.stride >= i.length)
1521
1324
  throw new Error(s);
1522
- const l = this.options.radius / (this.options.extent * Math.pow(2, r - 1)), a = i[t * this.stride], c = i[t * this.stride + 1], d = o.within(a, c, l), u = [];
1523
- for (const h of d) {
1524
- const m = h * this.stride;
1525
- i[m + ge] === e && u.push(i[m + L] > 1 ? He(i, m, this.clusterProps) : this.points[i[m + x]]);
1325
+ const l = this.options.radius / (this.options.extent * Math.pow(2, n - 1)), a = i[t * this.stride], c = i[t * this.stride + 1], d = o.within(a, c, l), u = [];
1326
+ for (const f of d) {
1327
+ const h = f * this.stride;
1328
+ i[h + he] === e && u.push(i[h + L] > 1 ? ze(i, h, this.clusterProps) : this.points[i[h + x]]);
1526
1329
  }
1527
1330
  if (u.length === 0)
1528
1331
  throw new Error(s);
1529
1332
  return u;
1530
1333
  }
1531
- getLeaves(e, t, r) {
1532
- t = t || 10, r = r || 0;
1334
+ getLeaves(e, t, n) {
1335
+ t = t || 10, n = n || 0;
1533
1336
  const s = [];
1534
- return this._appendLeaves(s, e, t, r, 0), s;
1337
+ return this._appendLeaves(s, e, t, n, 0), s;
1535
1338
  }
1536
- getTile(e, t, r) {
1537
- const s = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: i, radius: l } = this.options, a = l / i, c = (r - a) / o, d = (r + 1 + a) / o, u = {
1339
+ getTile(e, t, n) {
1340
+ const s = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: i, radius: l } = this.options, a = l / i, c = (n - a) / o, d = (n + 1 + a) / o, u = {
1538
1341
  features: []
1539
1342
  };
1540
1343
  return this._addTileFeatures(
1541
1344
  s.range((t - a) / o, c, (t + 1 + a) / o, d),
1542
1345
  s.data,
1543
1346
  t,
1544
- r,
1347
+ n,
1545
1348
  o,
1546
1349
  u
1547
1350
  ), t === 0 && this._addTileFeatures(
1548
1351
  s.range(1 - a / o, c, 1, d),
1549
1352
  s.data,
1550
1353
  o,
1551
- r,
1354
+ n,
1552
1355
  o,
1553
1356
  u
1554
1357
  ), t === o - 1 && this._addTileFeatures(
1555
1358
  s.range(0, c, a / o, d),
1556
1359
  s.data,
1557
1360
  -1,
1558
- r,
1361
+ n,
1559
1362
  o,
1560
1363
  u
1561
1364
  ), u.features.length ? u : null;
@@ -1563,89 +1366,89 @@ class rt {
1563
1366
  getClusterExpansionZoom(e) {
1564
1367
  let t = this._getOriginZoom(e) - 1;
1565
1368
  for (; t <= this.options.maxZoom; ) {
1566
- const r = this.getChildren(e);
1567
- if (t++, r.length !== 1)
1369
+ const n = this.getChildren(e);
1370
+ if (t++, n.length !== 1)
1568
1371
  break;
1569
- e = r[0].properties.cluster_id;
1372
+ e = n[0].properties.cluster_id;
1570
1373
  }
1571
1374
  return t;
1572
1375
  }
1573
- _appendLeaves(e, t, r, s, o) {
1376
+ _appendLeaves(e, t, n, s, o) {
1574
1377
  const i = this.getChildren(t);
1575
1378
  for (const l of i) {
1576
1379
  const a = l.properties;
1577
- if (a && a.cluster ? o + a.point_count <= s ? o += a.point_count : o = this._appendLeaves(e, a.cluster_id, r, s, o) : o < s ? o++ : e.push(l), e.length === r)
1380
+ if (a && a.cluster ? o + a.point_count <= s ? o += a.point_count : o = this._appendLeaves(e, a.cluster_id, n, s, o) : o < s ? o++ : e.push(l), e.length === n)
1578
1381
  break;
1579
1382
  }
1580
1383
  return o;
1581
1384
  }
1582
1385
  _createTree(e) {
1583
1386
  const t = new Ce(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1584
- for (let r = 0; r < e.length; r += this.stride)
1585
- t.add(e[r], e[r + 1]);
1387
+ for (let n = 0; n < e.length; n += this.stride)
1388
+ t.add(e[n], e[n + 1]);
1586
1389
  return t.finish(), t.data = e, t;
1587
1390
  }
1588
- _addTileFeatures(e, t, r, s, o, i) {
1391
+ _addTileFeatures(e, t, n, s, o, i) {
1589
1392
  for (const l of e) {
1590
1393
  const a = l * this.stride, c = t[a + L] > 1;
1591
- let d, u, h;
1394
+ let d, u, f;
1592
1395
  if (c)
1593
- d = nt(t, a, this.clusterProps), u = t[a], h = t[a + 1];
1396
+ d = et(t, a, this.clusterProps), u = t[a], f = t[a + 1];
1594
1397
  else {
1595
- const f = this.points[t[a + x]];
1596
- d = f.properties;
1597
- const [g, v] = f.geometry.coordinates;
1598
- u = oe(g), h = ie(v);
1398
+ const p = this.points[t[a + x]];
1399
+ d = p.properties;
1400
+ const [g, v] = p.geometry.coordinates;
1401
+ u = se(g), f = oe(v);
1599
1402
  }
1600
- const m = {
1403
+ const h = {
1601
1404
  type: 1,
1602
1405
  geometry: [[
1603
- Math.round(this.options.extent * (u * o - r)),
1604
- Math.round(this.options.extent * (h * o - s))
1406
+ Math.round(this.options.extent * (u * o - n)),
1407
+ Math.round(this.options.extent * (f * o - s))
1605
1408
  ]],
1606
1409
  tags: d
1607
1410
  };
1608
- let p;
1609
- c || this.options.generateId ? p = t[a + x] : p = this.points[t[a + x]].id, p !== void 0 && (m.id = p), i.features.push(m);
1411
+ let m;
1412
+ c || this.options.generateId ? m = t[a + x] : m = this.points[t[a + x]].id, m !== void 0 && (h.id = m), i.features.push(h);
1610
1413
  }
1611
1414
  }
1612
1415
  _limitZoom(e) {
1613
1416
  return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
1614
1417
  }
1615
1418
  _cluster(e, t) {
1616
- const { radius: r, extent: s, reduce: o, minPoints: i } = this.options, l = r / (s * Math.pow(2, t)), a = e.data, c = [], d = this.stride;
1419
+ const { radius: n, extent: s, reduce: o, minPoints: i } = this.options, l = n / (s * Math.pow(2, t)), a = e.data, c = [], d = this.stride;
1617
1420
  for (let u = 0; u < a.length; u += d) {
1618
- if (a[u + $] <= t)
1421
+ if (a[u + N] <= t)
1619
1422
  continue;
1620
- a[u + $] = t;
1621
- const h = a[u], m = a[u + 1], p = e.within(a[u], a[u + 1], l), f = a[u + L];
1622
- let g = f;
1623
- for (const v of p) {
1624
- const E = v * d;
1625
- a[E + $] > t && (g += a[E + L]);
1423
+ a[u + N] = t;
1424
+ const f = a[u], h = a[u + 1], m = e.within(a[u], a[u + 1], l), p = a[u + L];
1425
+ let g = p;
1426
+ for (const v of m) {
1427
+ const _ = v * d;
1428
+ a[_ + N] > t && (g += a[_ + L]);
1626
1429
  }
1627
- if (g > f && g >= i) {
1628
- let v = h * f, E = m * f, y, M = -1;
1629
- const O = ((u / d | 0) << 5) + (t + 1) + this.points.length;
1630
- for (const b of p) {
1430
+ if (g > p && g >= i) {
1431
+ let v = f * p, _ = h * p, E, q = -1;
1432
+ const P = ((u / d | 0) << 5) + (t + 1) + this.points.length;
1433
+ for (const b of m) {
1631
1434
  const C = b * d;
1632
- if (a[C + $] <= t)
1435
+ if (a[C + N] <= t)
1633
1436
  continue;
1634
- a[C + $] = t;
1437
+ a[C + N] = t;
1635
1438
  const T = a[C + L];
1636
- v += a[C] * T, E += a[C + 1] * T, a[C + ge] = O, o && (y || (y = this._map(a, u, !0), M = this.clusterProps.length, this.clusterProps.push(y)), o(y, this._map(a, C)));
1439
+ v += a[C] * T, _ += a[C + 1] * T, a[C + he] = P, o && (E || (E = this._map(a, u, !0), q = this.clusterProps.length, this.clusterProps.push(E)), o(E, this._map(a, C)));
1637
1440
  }
1638
- a[u + ge] = O, c.push(v / g, E / g, 1 / 0, O, -1, g), o && c.push(M);
1441
+ a[u + he] = P, c.push(v / g, _ / g, 1 / 0, P, -1, g), o && c.push(q);
1639
1442
  } else {
1640
1443
  for (let v = 0; v < d; v++)
1641
1444
  c.push(a[u + v]);
1642
1445
  if (g > 1)
1643
- for (const v of p) {
1644
- const E = v * d;
1645
- if (!(a[E + $] <= t)) {
1646
- a[E + $] = t;
1647
- for (let y = 0; y < d; y++)
1648
- c.push(a[E + y]);
1446
+ for (const v of m) {
1447
+ const _ = v * d;
1448
+ if (!(a[_ + N] <= t)) {
1449
+ a[_ + N] = t;
1450
+ for (let E = 0; E < d; E++)
1451
+ c.push(a[_ + E]);
1649
1452
  }
1650
1453
  }
1651
1454
  }
@@ -1660,59 +1463,59 @@ class rt {
1660
1463
  _getOriginZoom(e) {
1661
1464
  return (e - this.points.length) % 32;
1662
1465
  }
1663
- _map(e, t, r) {
1466
+ _map(e, t, n) {
1664
1467
  if (e[t + L] > 1) {
1665
- const i = this.clusterProps[e[t + tt]];
1666
- return r ? Object.assign({}, i) : i;
1468
+ const i = this.clusterProps[e[t + Xe]];
1469
+ return n ? Object.assign({}, i) : i;
1667
1470
  }
1668
1471
  const s = this.points[e[t + x]].properties, o = this.options.map(s);
1669
- return r && o === s ? Object.assign({}, o) : o;
1472
+ return n && o === s ? Object.assign({}, o) : o;
1670
1473
  }
1671
1474
  }
1672
- function He(n, e, t) {
1475
+ function ze(r, e, t) {
1673
1476
  return {
1674
1477
  type: "Feature",
1675
- id: n[e + x],
1676
- properties: nt(n, e, t),
1478
+ id: r[e + x],
1479
+ properties: et(r, e, t),
1677
1480
  geometry: {
1678
1481
  type: "Point",
1679
- coordinates: [pr(n[e]), fr(n[e + 1])]
1482
+ coordinates: [hr(r[e]), mr(r[e + 1])]
1680
1483
  }
1681
1484
  };
1682
1485
  }
1683
- function nt(n, e, t) {
1684
- const r = n[e + L], s = r >= 1e4 ? `${Math.round(r / 1e3)}k` : r >= 1e3 ? `${Math.round(r / 100) / 10}k` : r, o = n[e + tt], i = o === -1 ? {} : Object.assign({}, t[o]);
1486
+ function et(r, e, t) {
1487
+ const n = r[e + L], s = n >= 1e4 ? `${Math.round(n / 1e3)}k` : n >= 1e3 ? `${Math.round(n / 100) / 10}k` : n, o = r[e + Xe], i = o === -1 ? {} : Object.assign({}, t[o]);
1685
1488
  return Object.assign(i, {
1686
1489
  cluster: !0,
1687
- cluster_id: n[e + x],
1688
- point_count: r,
1490
+ cluster_id: r[e + x],
1491
+ point_count: n,
1689
1492
  point_count_abbreviated: s
1690
1493
  });
1691
1494
  }
1692
- function oe(n) {
1693
- return n / 360 + 0.5;
1495
+ function se(r) {
1496
+ return r / 360 + 0.5;
1694
1497
  }
1695
- function ie(n) {
1696
- const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1498
+ function oe(r) {
1499
+ const e = Math.sin(r * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1697
1500
  return t < 0 ? 0 : t > 1 ? 1 : t;
1698
1501
  }
1699
- function pr(n) {
1700
- return (n - 0.5) * 360;
1502
+ function hr(r) {
1503
+ return (r - 0.5) * 360;
1701
1504
  }
1702
- function fr(n) {
1703
- const e = (180 - n * 360) * Math.PI / 180;
1505
+ function mr(r) {
1506
+ const e = (180 - r * 360) * Math.PI / 180;
1704
1507
  return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
1705
1508
  }
1706
- function Oe(n, e) {
1509
+ function Oe(r, e) {
1707
1510
  var t = {};
1708
- for (var r in n)
1709
- Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
1710
- if (n != null && typeof Object.getOwnPropertySymbols == "function")
1711
- for (var s = 0, r = Object.getOwnPropertySymbols(n); s < r.length; s++)
1712
- e.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[s]) && (t[r[s]] = n[r[s]]);
1511
+ for (var n in r)
1512
+ Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]);
1513
+ if (r != null && typeof Object.getOwnPropertySymbols == "function")
1514
+ for (var s = 0, n = Object.getOwnPropertySymbols(r); s < n.length; s++)
1515
+ e.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[s]) && (t[n[s]] = r[n[s]]);
1713
1516
  return t;
1714
1517
  }
1715
- class _ {
1518
+ class w {
1716
1519
  static isAdvancedMarkerAvailable(e) {
1717
1520
  return google.maps.marker && e.getMapCapabilities().isAdvancedMarkersAvailable === !0;
1718
1521
  }
@@ -1738,7 +1541,7 @@ class _ {
1738
1541
  return this.isAdvancedMarker(e) ? !0 : e.getVisible();
1739
1542
  }
1740
1543
  }
1741
- class te {
1544
+ class ee {
1742
1545
  constructor({ markers: e, position: t }) {
1743
1546
  this.markers = [], e && (this.markers = e), t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
1744
1547
  }
@@ -1747,7 +1550,7 @@ class te {
1747
1550
  return;
1748
1551
  const e = new google.maps.LatLngBounds(this._position, this._position);
1749
1552
  for (const t of this.markers)
1750
- e.extend(_.getPosition(t));
1553
+ e.extend(w.getPosition(t));
1751
1554
  return e;
1752
1555
  }
1753
1556
  get position() {
@@ -1757,7 +1560,7 @@ class te {
1757
1560
  * Get the count of **visible** markers.
1758
1561
  */
1759
1562
  get count() {
1760
- return this.markers.filter((e) => _.getVisible(e)).length;
1563
+ return this.markers.filter((e) => w.getVisible(e)).length;
1761
1564
  }
1762
1565
  /**
1763
1566
  * Add a marker to the cluster.
@@ -1769,32 +1572,32 @@ class te {
1769
1572
  * Cleanup references and remove marker from map.
1770
1573
  */
1771
1574
  delete() {
1772
- this.marker && (_.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1575
+ this.marker && (w.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1773
1576
  }
1774
1577
  }
1775
- function A(n, e = "assertion failed") {
1776
- if (n == null)
1578
+ function A(r, e = "assertion failed") {
1579
+ if (r == null)
1777
1580
  throw Error(e);
1778
1581
  }
1779
- const hr = (n, e, t, r) => {
1780
- const s = n.getBounds();
1582
+ const gr = (r, e, t, n) => {
1583
+ const s = r.getBounds();
1781
1584
  A(s);
1782
- const o = st(s, e, r);
1783
- return t.filter((i) => o.contains(_.getPosition(i)));
1784
- }, st = (n, e, t) => {
1785
- const { northEast: r, southWest: s } = gr(n, e), o = vr({ northEast: r, southWest: s }, t);
1786
- return yr(o, e);
1787
- }, mr = (n, e, t) => {
1788
- const r = st(n, e, t), s = r.getNorthEast(), o = r.getSouthWest();
1585
+ const o = tt(s, e, n);
1586
+ return t.filter((i) => o.contains(w.getPosition(i)));
1587
+ }, tt = (r, e, t) => {
1588
+ const { northEast: n, southWest: s } = yr(r, e), o = _r({ northEast: n, southWest: s }, t);
1589
+ return Er(o, e);
1590
+ }, vr = (r, e, t) => {
1591
+ const n = tt(r, e, t), s = n.getNorthEast(), o = n.getSouthWest();
1789
1592
  return [o.lng(), o.lat(), s.lng(), s.lat()];
1790
- }, gr = (n, e) => {
1791
- const t = e.fromLatLngToDivPixel(n.getNorthEast()), r = e.fromLatLngToDivPixel(n.getSouthWest());
1792
- return A(t), A(r), { northEast: t, southWest: r };
1793
- }, vr = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), yr = ({ northEast: n, southWest: e }, t) => {
1794
- const r = t.fromDivPixelToLatLng(e), s = t.fromDivPixelToLatLng(n);
1795
- return new google.maps.LatLngBounds(r, s);
1593
+ }, yr = (r, e) => {
1594
+ const t = e.fromLatLngToDivPixel(r.getNorthEast()), n = e.fromLatLngToDivPixel(r.getSouthWest());
1595
+ return A(t), A(n), { northEast: t, southWest: n };
1596
+ }, _r = ({ northEast: r, southWest: e }, t) => (r.x += t, r.y -= t, e.x -= t, e.y += t, { northEast: r, southWest: e }), Er = ({ northEast: r, southWest: e }, t) => {
1597
+ const n = t.fromDivPixelToLatLng(e), s = t.fromDivPixelToLatLng(r);
1598
+ return new google.maps.LatLngBounds(n, s);
1796
1599
  };
1797
- class ot {
1600
+ class rt {
1798
1601
  constructor({ maxZoom: e = 16 }) {
1799
1602
  this.maxZoom = e;
1800
1603
  }
@@ -1811,15 +1614,15 @@ class ot {
1811
1614
  * ```
1812
1615
  */
1813
1616
  noop({ markers: e }) {
1814
- return Er(e);
1617
+ return kr(e);
1815
1618
  }
1816
1619
  }
1817
- class wr extends ot {
1620
+ class wr extends rt {
1818
1621
  constructor(e) {
1819
- var { viewportPadding: t = 60 } = e, r = Oe(e, ["viewportPadding"]);
1820
- super(r), this.viewportPadding = 60, this.viewportPadding = t;
1622
+ var { viewportPadding: t = 60 } = e, n = Oe(e, ["viewportPadding"]);
1623
+ super(n), this.viewportPadding = 60, this.viewportPadding = t;
1821
1624
  }
1822
- calculate({ markers: e, map: t, mapCanvasProjection: r }) {
1625
+ calculate({ markers: e, map: t, mapCanvasProjection: n }) {
1823
1626
  const s = t.getZoom();
1824
1627
  return A(s), s >= this.maxZoom ? {
1825
1628
  clusters: this.noop({
@@ -1828,30 +1631,30 @@ class wr extends ot {
1828
1631
  changed: !1
1829
1632
  } : {
1830
1633
  clusters: this.cluster({
1831
- markers: hr(t, r, e, this.viewportPadding),
1634
+ markers: gr(t, n, e, this.viewportPadding),
1832
1635
  map: t,
1833
- mapCanvasProjection: r
1636
+ mapCanvasProjection: n
1834
1637
  })
1835
1638
  };
1836
1639
  }
1837
1640
  }
1838
- const Er = (n) => n.map((t) => new te({
1839
- position: _.getPosition(t),
1641
+ const kr = (r) => r.map((t) => new ee({
1642
+ position: w.getPosition(t),
1840
1643
  markers: [t]
1841
1644
  }));
1842
- class _r extends ot {
1645
+ class Cr extends rt {
1843
1646
  constructor(e) {
1844
- var { maxZoom: t, radius: r = 60 } = e, s = Oe(e, ["maxZoom", "radius"]);
1845
- super({ maxZoom: t }), this.markers = [], this.clusters = [], this.state = { zoom: -1 }, this.superCluster = new rt(Object.assign({ maxZoom: this.maxZoom, radius: r }, s));
1647
+ var { maxZoom: t, radius: n = 60 } = e, s = Oe(e, ["maxZoom", "radius"]);
1648
+ super({ maxZoom: t }), this.markers = [], this.clusters = [], this.state = { zoom: -1 }, this.superCluster = new Qe(Object.assign({ maxZoom: this.maxZoom, radius: n }, s));
1846
1649
  }
1847
1650
  calculate(e) {
1848
- let t = !1, r = e.map.getZoom();
1849
- A(r), r = Math.round(r);
1850
- const s = { zoom: r };
1651
+ let t = !1, n = e.map.getZoom();
1652
+ A(n), n = Math.round(n);
1653
+ const s = { zoom: n };
1851
1654
  if (!ae(e.markers, this.markers)) {
1852
1655
  t = !0, this.markers = [...e.markers];
1853
1656
  const o = this.markers.map((i) => {
1854
- const l = _.getPosition(i);
1657
+ const l = w.getPosition(i);
1855
1658
  return {
1856
1659
  type: "Feature",
1857
1660
  geometry: { type: "Point", coordinates: [l.lng(), l.lat()] },
@@ -1864,33 +1667,33 @@ class _r extends ot {
1864
1667
  }
1865
1668
  cluster({ map: e }) {
1866
1669
  const t = e.getZoom();
1867
- return A(t), this.superCluster.getClusters([-180, -90, 180, 90], Math.round(t)).map((r) => this.transformCluster(r));
1670
+ return A(t), this.superCluster.getClusters([-180, -90, 180, 90], Math.round(t)).map((n) => this.transformCluster(n));
1868
1671
  }
1869
- transformCluster({ geometry: { coordinates: [e, t] }, properties: r }) {
1870
- if (r.cluster)
1871
- return new te({
1872
- markers: this.superCluster.getLeaves(r.cluster_id, 1 / 0).map((o) => o.properties.marker),
1672
+ transformCluster({ geometry: { coordinates: [e, t] }, properties: n }) {
1673
+ if (n.cluster)
1674
+ return new ee({
1675
+ markers: this.superCluster.getLeaves(n.cluster_id, 1 / 0).map((o) => o.properties.marker),
1873
1676
  position: { lat: t, lng: e }
1874
1677
  });
1875
- const s = r.marker;
1876
- return new te({
1678
+ const s = n.marker;
1679
+ return new ee({
1877
1680
  markers: [s],
1878
- position: _.getPosition(s)
1681
+ position: w.getPosition(s)
1879
1682
  });
1880
1683
  }
1881
1684
  }
1882
- class kr extends wr {
1685
+ class Or extends wr {
1883
1686
  constructor(e) {
1884
- var { maxZoom: t, radius: r = 60, viewportPadding: s = 60 } = e, o = Oe(e, ["maxZoom", "radius", "viewportPadding"]);
1885
- super({ maxZoom: t, viewportPadding: s }), this.markers = [], this.clusters = [], this.superCluster = new rt(Object.assign({ maxZoom: this.maxZoom, radius: r }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1687
+ var { maxZoom: t, radius: n = 60, viewportPadding: s = 60 } = e, o = Oe(e, ["maxZoom", "radius", "viewportPadding"]);
1688
+ super({ maxZoom: t, viewportPadding: s }), this.markers = [], this.clusters = [], this.superCluster = new Qe(Object.assign({ maxZoom: this.maxZoom, radius: n }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1886
1689
  }
1887
1690
  calculate(e) {
1888
1691
  const t = this.getViewportState(e);
1889
- let r = !ae(this.state, t);
1692
+ let n = !ae(this.state, t);
1890
1693
  if (!ae(e.markers, this.markers)) {
1891
- r = !0, this.markers = [...e.markers];
1694
+ n = !0, this.markers = [...e.markers];
1892
1695
  const s = this.markers.map((o) => {
1893
- const i = _.getPosition(o);
1696
+ const i = w.getPosition(o);
1894
1697
  return {
1895
1698
  type: "Feature",
1896
1699
  geometry: {
@@ -1902,48 +1705,48 @@ class kr extends wr {
1902
1705
  });
1903
1706
  this.superCluster.load(s);
1904
1707
  }
1905
- return r && (this.clusters = this.cluster(e), this.state = t), { clusters: this.clusters, changed: r };
1708
+ return n && (this.clusters = this.cluster(e), this.state = t), { clusters: this.clusters, changed: n };
1906
1709
  }
1907
1710
  cluster(e) {
1908
1711
  const t = this.getViewportState(e);
1909
- return this.superCluster.getClusters(t.view, t.zoom).map((r) => this.transformCluster(r));
1712
+ return this.superCluster.getClusters(t.view, t.zoom).map((n) => this.transformCluster(n));
1910
1713
  }
1911
- transformCluster({ geometry: { coordinates: [e, t] }, properties: r }) {
1912
- if (r.cluster)
1913
- return new te({
1914
- markers: this.superCluster.getLeaves(r.cluster_id, 1 / 0).map((o) => o.properties.marker),
1714
+ transformCluster({ geometry: { coordinates: [e, t] }, properties: n }) {
1715
+ if (n.cluster)
1716
+ return new ee({
1717
+ markers: this.superCluster.getLeaves(n.cluster_id, 1 / 0).map((o) => o.properties.marker),
1915
1718
  position: { lat: t, lng: e }
1916
1719
  });
1917
- const s = r.marker;
1918
- return new te({
1720
+ const s = n.marker;
1721
+ return new ee({
1919
1722
  markers: [s],
1920
- position: _.getPosition(s)
1723
+ position: w.getPosition(s)
1921
1724
  });
1922
1725
  }
1923
1726
  getViewportState(e) {
1924
- const t = e.map.getZoom(), r = e.map.getBounds();
1925
- return A(t), A(r), {
1727
+ const t = e.map.getZoom(), n = e.map.getBounds();
1728
+ return A(t), A(n), {
1926
1729
  zoom: Math.round(t),
1927
- view: mr(r, e.mapCanvasProjection, this.viewportPadding)
1730
+ view: vr(n, e.mapCanvasProjection, this.viewportPadding)
1928
1731
  };
1929
1732
  }
1930
1733
  }
1931
- class Cr {
1734
+ class Mr {
1932
1735
  constructor(e, t) {
1933
1736
  this.markers = { sum: e.length };
1934
- const r = t.map((o) => o.count), s = r.reduce((o, i) => o + i, 0);
1737
+ const n = t.map((o) => o.count), s = n.reduce((o, i) => o + i, 0);
1935
1738
  this.clusters = {
1936
1739
  count: t.length,
1937
1740
  markers: {
1938
1741
  mean: s / t.length,
1939
1742
  sum: s,
1940
- min: Math.min(...r),
1941
- max: Math.max(...r)
1743
+ min: Math.min(...n),
1744
+ max: Math.max(...n)
1942
1745
  }
1943
1746
  };
1944
1747
  }
1945
1748
  }
1946
- class Or {
1749
+ class Pr {
1947
1750
  /**
1948
1751
  * The default render function for the library used by {@link MarkerClusterer}.
1949
1752
  *
@@ -1982,24 +1785,24 @@ class Or {
1982
1785
  * });
1983
1786
  * ```
1984
1787
  */
1985
- render({ count: e, position: t }, r, s) {
1986
- const i = `<svg fill="${e > Math.max(10, r.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1788
+ render({ count: e, position: t }, n, s) {
1789
+ const i = `<svg fill="${e > Math.max(10, n.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1987
1790
  <circle cx="120" cy="120" opacity=".6" r="70" />
1988
1791
  <circle cx="120" cy="120" opacity=".3" r="90" />
1989
1792
  <circle cx="120" cy="120" opacity=".2" r="110" />
1990
1793
  <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>
1991
1794
  </svg>`, l = `Cluster of ${e} markers`, a = Number(google.maps.Marker.MAX_ZINDEX) + e;
1992
- if (_.isAdvancedMarkerAvailable(s)) {
1795
+ if (w.isAdvancedMarkerAvailable(s)) {
1993
1796
  const u = new DOMParser().parseFromString(i, "image/svg+xml").documentElement;
1994
1797
  u.setAttribute("transform", "translate(0 25)");
1995
- const h = {
1798
+ const f = {
1996
1799
  map: s,
1997
1800
  position: t,
1998
1801
  zIndex: a,
1999
1802
  title: l,
2000
1803
  content: u
2001
1804
  };
2002
- return new google.maps.marker.AdvancedMarkerElement(h);
1805
+ return new google.maps.marker.AdvancedMarkerElement(f);
2003
1806
  }
2004
1807
  const c = {
2005
1808
  position: t,
@@ -2013,43 +1816,43 @@ class Or {
2013
1816
  return new google.maps.Marker(c);
2014
1817
  }
2015
1818
  }
2016
- function Mr(n, e) {
1819
+ function br(r, e) {
2017
1820
  for (let t in e.prototype)
2018
- n.prototype[t] = e.prototype[t];
1821
+ r.prototype[t] = e.prototype[t];
2019
1822
  }
2020
1823
  class Me {
2021
1824
  constructor() {
2022
- Mr(Me, google.maps.OverlayView);
1825
+ br(Me, google.maps.OverlayView);
2023
1826
  }
2024
1827
  }
2025
1828
  var I;
2026
- (function(n) {
2027
- n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click", n.GMP_CLICK = "gmp-click";
1829
+ (function(r) {
1830
+ r.CLUSTERING_BEGIN = "clusteringbegin", r.CLUSTERING_END = "clusteringend", r.CLUSTER_CLICK = "click", r.GMP_CLICK = "gmp-click";
2028
1831
  })(I || (I = {}));
2029
- const br = (n, e, t) => {
1832
+ const Sr = (r, e, t) => {
2030
1833
  e.bounds && t.fitBounds(e.bounds);
2031
1834
  };
2032
- class Pr extends Me {
2033
- constructor({ map: e, markers: t = [], algorithmOptions: r = {}, algorithm: s = new _r(r), renderer: o = new Or(), onClusterClick: i = br }) {
1835
+ class Ar extends Me {
1836
+ constructor({ map: e, markers: t = [], algorithmOptions: n = {}, algorithm: s = new Cr(n), renderer: o = new Pr(), onClusterClick: i = Sr }) {
2034
1837
  super(), this.map = null, this.idleListener = null, this.markers = [...t], this.clusters = [], this.algorithm = s, this.renderer = o, this.onClusterClick = i, e && this.setMap(e);
2035
1838
  }
2036
1839
  addMarker(e, t) {
2037
1840
  this.markers.includes(e) || (this.markers.push(e), t || this.render());
2038
1841
  }
2039
1842
  addMarkers(e, t) {
2040
- e.forEach((r) => {
2041
- this.addMarker(r, !0);
1843
+ e.forEach((n) => {
1844
+ this.addMarker(n, !0);
2042
1845
  }), t || this.render();
2043
1846
  }
2044
1847
  removeMarker(e, t) {
2045
- const r = this.markers.indexOf(e);
2046
- return r === -1 ? !1 : (_.setMap(e, null), this.markers.splice(r, 1), t || this.render(), !0);
1848
+ const n = this.markers.indexOf(e);
1849
+ return n === -1 ? !1 : (w.setMap(e, null), this.markers.splice(n, 1), t || this.render(), !0);
2047
1850
  }
2048
1851
  removeMarkers(e, t) {
2049
- let r = !1;
1852
+ let n = !1;
2050
1853
  return e.forEach((s) => {
2051
- r = this.removeMarker(s, !0) || r;
2052
- }), r && !t && this.render(), r;
1854
+ n = this.removeMarker(s, !0) || n;
1855
+ }), n && !t && this.render(), n;
2053
1856
  }
2054
1857
  clearMarkers(e) {
2055
1858
  this.markers.length = 0, e || this.render();
@@ -2061,19 +1864,19 @@ class Pr extends Me {
2061
1864
  const e = this.getMap();
2062
1865
  if (e instanceof google.maps.Map && e.getProjection()) {
2063
1866
  google.maps.event.trigger(this, I.CLUSTERING_BEGIN, this);
2064
- const { clusters: t, changed: r } = this.algorithm.calculate({
1867
+ const { clusters: t, changed: n } = this.algorithm.calculate({
2065
1868
  markers: this.markers,
2066
1869
  map: e,
2067
1870
  mapCanvasProjection: this.getProjection()
2068
1871
  });
2069
- if (r || r == null) {
1872
+ if (n || n == null) {
2070
1873
  const s = /* @__PURE__ */ new Set();
2071
1874
  for (const i of t)
2072
1875
  i.markers.length == 1 && s.add(i.markers[0]);
2073
1876
  const o = [];
2074
1877
  for (const i of this.clusters)
2075
- i.marker != null && (i.markers.length == 1 ? s.has(i.marker) || _.setMap(i.marker, null) : o.push(i.marker));
2076
- this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((i) => _.setMap(i, null)));
1878
+ i.marker != null && (i.markers.length == 1 ? s.has(i.marker) || w.setMap(i.marker, null) : o.push(i.marker));
1879
+ this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((i) => w.setMap(i, null)));
2077
1880
  }
2078
1881
  google.maps.event.trigger(this, I.CLUSTERING_END, this);
2079
1882
  }
@@ -2086,28 +1889,28 @@ class Pr extends Me {
2086
1889
  this.idleListener && google.maps.event.removeListener(this.idleListener), this.reset();
2087
1890
  }
2088
1891
  reset() {
2089
- this.markers.forEach((e) => _.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1892
+ this.markers.forEach((e) => w.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
2090
1893
  }
2091
1894
  renderClusters() {
2092
- const e = new Cr(this.markers, this.clusters), t = this.getMap();
2093
- this.clusters.forEach((r) => {
2094
- if (r.markers.length === 1)
2095
- r.marker = r.markers[0];
2096
- else if (r.marker = this.renderer.render(r, e, t), r.markers.forEach((s) => _.setMap(s, null)), this.onClusterClick) {
2097
- const s = _.isAdvancedMarker(r.marker) ? I.GMP_CLICK : I.CLUSTER_CLICK;
2098
- r.marker.addListener(
1895
+ const e = new Mr(this.markers, this.clusters), t = this.getMap();
1896
+ this.clusters.forEach((n) => {
1897
+ if (n.markers.length === 1)
1898
+ n.marker = n.markers[0];
1899
+ else if (n.marker = this.renderer.render(n, e, t), n.markers.forEach((s) => w.setMap(s, null)), this.onClusterClick) {
1900
+ const s = w.isAdvancedMarker(n.marker) ? I.GMP_CLICK : I.CLUSTER_CLICK;
1901
+ n.marker.addListener(
2099
1902
  s,
2100
1903
  /* istanbul ignore next */
2101
1904
  (o) => {
2102
- google.maps.event.trigger(this, I.CLUSTER_CLICK, r), this.onClusterClick(o, r, t);
1905
+ google.maps.event.trigger(this, I.CLUSTER_CLICK, n), this.onClusterClick(o, n, t);
2103
1906
  }
2104
1907
  );
2105
1908
  }
2106
- _.setMap(r.marker, t);
1909
+ w.setMap(n.marker, t);
2107
1910
  });
2108
1911
  }
2109
1912
  }
2110
- const Je = Object.values(I), Ur = P({
1913
+ const We = Object.values(I), Fr = M({
2111
1914
  name: "MarkerCluster",
2112
1915
  props: {
2113
1916
  options: {
@@ -2115,21 +1918,21 @@ const Je = Object.values(I), Ur = P({
2115
1918
  default: () => ({})
2116
1919
  }
2117
1920
  },
2118
- emits: Je,
2119
- setup(n, { emit: e, expose: t, slots: r }) {
2120
- const s = w(), o = k(D, w()), i = k(Z, w());
2121
- return G(ke, s), q(
1921
+ emits: We,
1922
+ setup(r, { emit: e, expose: t, slots: n }) {
1923
+ const s = y(), o = k(B, y()), i = k(D, y());
1924
+ return U(we, s), O(
2122
1925
  o,
2123
1926
  () => {
2124
1927
  o.value && (s.value = S(
2125
- new Pr({
1928
+ new Ar({
2126
1929
  map: o.value,
2127
1930
  // Better perf than the default `SuperClusterAlgorithm`. See:
2128
1931
  // https://github.com/googlemaps/js-markerclusterer/pull/640
2129
- algorithm: new kr(n.options.algorithmOptions ?? {}),
2130
- ...n.options
1932
+ algorithm: new Or(r.options.algorithmOptions ?? {}),
1933
+ ...r.options
2131
1934
  })
2132
- ), Je.forEach((l) => {
1935
+ ), We.forEach((l) => {
2133
1936
  var a;
2134
1937
  (a = s.value) == null || a.addListener(l, (c) => e(l, c));
2135
1938
  }));
@@ -2137,15 +1940,15 @@ const Je = Object.values(I), Ur = P({
2137
1940
  {
2138
1941
  immediate: !0
2139
1942
  }
2140
- ), B(() => {
1943
+ ), $(() => {
2141
1944
  var l;
2142
1945
  s.value && ((l = i.value) == null || l.event.clearInstanceListeners(s.value), s.value.clearMarkers(), s.value.setMap(null));
2143
1946
  }), t({ markerCluster: s }), () => {
2144
1947
  var l;
2145
- return (l = r.default) == null ? void 0 : l.call(r);
1948
+ return (l = n.default) == null ? void 0 : l.call(n);
2146
1949
  };
2147
1950
  }
2148
- }), qr = P({
1951
+ }), qr = M({
2149
1952
  inheritAttrs: !1,
2150
1953
  props: {
2151
1954
  options: {
@@ -2153,34 +1956,34 @@ const Je = Object.values(I), Ur = P({
2153
1956
  required: !0
2154
1957
  }
2155
1958
  },
2156
- setup(n, { slots: e, emit: t, expose: r }) {
2157
- const s = w(), o = K(() => {
1959
+ setup(r, { slots: e, emit: t, expose: n }) {
1960
+ const s = y(), o = z(() => {
2158
1961
  var a;
2159
- return (a = e.default) == null ? void 0 : a.call(e).some((c) => c.type !== ye);
2160
- }), i = K(() => ({
2161
- ...n.options,
1962
+ return (a = e.default) == null ? void 0 : a.call(e).some((c) => c.type !== ve);
1963
+ }), i = z(() => ({
1964
+ ...r.options,
2162
1965
  element: s.value
2163
- })), l = J(ue, [], i, t);
2164
- return r({
1966
+ })), l = H(le, [], i, t);
1967
+ return n({
2165
1968
  customMarker: l
2166
1969
  }), { customMarkerRef: s, customMarker: l, hasSlotContent: o };
2167
1970
  }
2168
1971
  });
2169
- const Sr = {
1972
+ const Tr = {
2170
1973
  key: 0,
2171
1974
  class: "custom-marker-wrapper"
2172
1975
  };
2173
- function Ar(n, e, t, r, s, o) {
2174
- return n.hasSlotContent ? (V(), z("div", Sr, [
2175
- le("div", we({
1976
+ function Lr(r, e, t, n, s, o) {
1977
+ return r.hasSlotContent ? (G(), V("div", Tr, [
1978
+ ie("div", ye({
2176
1979
  ref: "customMarkerRef",
2177
- style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
2178
- }, n.$attrs), [
2179
- W(n.$slots, "default", {}, void 0, !0)
1980
+ style: { cursor: r.$attrs.onClick ? "pointer" : void 0 }
1981
+ }, r.$attrs), [
1982
+ F(r.$slots, "default", {}, void 0, !0)
2180
1983
  ], 16)
2181
- ])) : Ee("", !0);
1984
+ ])) : _e("", !0);
2182
1985
  }
2183
- const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343a"]]), Vr = P({
1986
+ const zr = /* @__PURE__ */ te(qr, [["render", Lr], ["__scopeId", "data-v-2d2d343a"]]), Wr = M({
2184
1987
  name: "HeatmapLayer",
2185
1988
  props: {
2186
1989
  options: {
@@ -2188,16 +1991,16 @@ const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343
2188
1991
  default: () => ({})
2189
1992
  }
2190
1993
  },
2191
- setup(n) {
2192
- const e = w(), t = k(D, w()), r = k(Z, w());
2193
- return q(
2194
- [t, () => n.options],
1994
+ setup(r) {
1995
+ const e = y(), t = k(B, y()), n = k(D, y());
1996
+ return O(
1997
+ [t, () => r.options],
2195
1998
  ([s, o], [i, l]) => {
2196
- const a = !ee(o, l) || t.value !== i;
2197
- if (t.value && r.value && a) {
1999
+ const a = !Q(o, l) || t.value !== i;
2000
+ if (t.value && n.value && a) {
2198
2001
  let c;
2199
- if (o.data && !(o.data instanceof r.value.MVCArray)) {
2200
- const d = r.value.LatLng, u = o.data.map((h) => h instanceof d || "location" in h && (h.location instanceof d || h.location === null) ? h : "location" in h ? { ...h, location: new d(h.location) } : new d(h));
2002
+ if (o.data && !(o.data instanceof n.value.MVCArray)) {
2003
+ const d = n.value.LatLng, u = o.data.map((f) => f instanceof d || "location" in f && (f.location instanceof d || f.location === null) ? f : "location" in f ? { ...f, location: new d(f.location) } : new d(f));
2201
2004
  c = {
2202
2005
  ...o,
2203
2006
  data: u
@@ -2205,7 +2008,7 @@ const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343
2205
2008
  } else
2206
2009
  c = o;
2207
2010
  e.value ? e.value.setOptions(c) : e.value = S(
2208
- new r.value.visualization.HeatmapLayer({
2011
+ new n.value.visualization.HeatmapLayer({
2209
2012
  ...c,
2210
2013
  map: t.value
2211
2014
  })
@@ -2213,26 +2016,26 @@ const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343
2213
2016
  }
2214
2017
  },
2215
2018
  { immediate: !0 }
2216
- ), B(() => {
2019
+ ), $(() => {
2217
2020
  e.value && e.value.setMap(null);
2218
2021
  }), { heatmapLayer: e };
2219
2022
  },
2220
2023
  render: () => null
2221
2024
  });
2222
2025
  export {
2223
- jr as AdvancedMarker,
2224
- Dr as Circle,
2225
- Zr as CustomControl,
2226
- Gr as CustomMarker,
2227
- Ir as GoogleMap,
2228
- Vr as HeatmapLayer,
2229
- Fr as InfoWindow,
2230
- Rr as Marker,
2231
- Ur as MarkerCluster,
2232
- Nr as Polygon,
2233
- $r as Polyline,
2234
- Br as Rectangle,
2235
- Z as apiSymbol,
2236
- D as mapSymbol,
2237
- Xe as mapTilesLoadedSymbol
2026
+ Nr as AdvancedMarker,
2027
+ Ur as Circle,
2028
+ Gr as CustomControl,
2029
+ zr as CustomMarker,
2030
+ jr as GoogleMap,
2031
+ Wr as HeatmapLayer,
2032
+ Vr as InfoWindow,
2033
+ $r as Marker,
2034
+ Fr as MarkerCluster,
2035
+ Dr as Polygon,
2036
+ Br as Polyline,
2037
+ Zr as Rectangle,
2038
+ D as apiSymbol,
2039
+ B as mapSymbol,
2040
+ Ke as mapTilesLoadedSymbol
2238
2041
  };