vue3-google-map 0.22.0 → 0.23.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/README.md +81 -9
- package/dist/index.cjs +3 -29
- package/dist/index.mjs +1071 -789
- package/dist/index.umd.js +6 -29
- package/dist/types/@types/index.d.ts +0 -1
- package/dist/types/components/AdvancedMarker.vue.d.ts +12 -9
- package/dist/types/components/Circle.d.ts +7 -7
- package/dist/types/components/CustomControl.vue.d.ts +10 -9
- package/dist/types/components/CustomMarker.vue.d.ts +9 -7
- package/dist/types/components/GoogleMap.vue.d.ts +34 -33
- package/dist/types/components/HeatmapLayer.d.ts +11 -7
- package/dist/types/components/InfoWindow.vue.d.ts +9 -9
- package/dist/types/components/Marker.d.ts +16 -7
- package/dist/types/components/MarkerCluster.d.ts +13 -8
- package/dist/types/components/Polygon.d.ts +6 -7
- package/dist/types/components/Polyline.d.ts +6 -7
- package/dist/types/components/Rectangle.d.ts +7 -7
- package/dist/types/composables/useSetupMapComponent.d.ts +0 -1
- package/dist/types/shared/index.d.ts +0 -1
- package/dist/types/shims-google-maps.d.ts +0 -1
- package/dist/types/themes/aubergine.d.ts +0 -1
- package/dist/types/themes/dark.d.ts +0 -1
- package/dist/types/themes/grey.d.ts +0 -1
- package/dist/types/themes/minimal.d.ts +0 -1
- package/dist/types/themes/retro.d.ts +0 -1
- package/dist/types/themes/roadways.d.ts +0 -1
- package/dist/types/themes/roadwaysMinimal.d.ts +0 -1
- package/dist/types/themes/ultraLight.d.ts +0 -1
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +17 -6
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# vue3-google-map
|
|
2
2
|
|
|
3
3
|

|
|
4
|
+

|
|
5
|
+
[](https://www.npmjs.com/package/vue3-google-map)
|
|
4
6
|
[](https://github.com/inocan-group/vue3-google-map/blob/develop/LICENSE)
|
|
5
7
|
|
|
6
8
|
> Composable components for easy use of Google Maps with Vue 3
|
|
@@ -16,7 +18,7 @@ Note: Please refer to the [documentation site](https://vue3-google-map.com/) for
|
|
|
16
18
|
- [Your First Map](#your-first-map)
|
|
17
19
|
- [Components](#components)
|
|
18
20
|
- [Advanced Marker](#advanced-marker)
|
|
19
|
-
- [Marker](#marker)
|
|
21
|
+
- [Marker](#marker) ⚠️ **Deprecated**
|
|
20
22
|
- [Polyline](#polyline)
|
|
21
23
|
- [Polygon](#polygon)
|
|
22
24
|
- [Rectangle](#rectangle)
|
|
@@ -25,7 +27,7 @@ Note: Please refer to the [documentation site](https://vue3-google-map.com/) for
|
|
|
25
27
|
- [Custom Marker](#custom-marker)
|
|
26
28
|
- [Custom Control](#custom-control)
|
|
27
29
|
- [Marker Cluster](#marker-cluster)
|
|
28
|
-
- [Heatmap Layer](#heatmap-layer)
|
|
30
|
+
- [Heatmap Layer](#heatmap-layer) ⚠️ **Deprecated**
|
|
29
31
|
- [Advanced Usage](#advanced-usage)
|
|
30
32
|
- [Contribution](#contribution)
|
|
31
33
|
- [License](#license)
|
|
@@ -87,7 +89,7 @@ This library is intended to be used in a composable fashion. Therefore you will
|
|
|
87
89
|
The main mapping component is `GoogleMap`, however the following components are available at your disposal:
|
|
88
90
|
|
|
89
91
|
- [AdvancedMarker](#advanced-marker)
|
|
90
|
-
- [Marker](#marker)
|
|
92
|
+
- [Marker](#marker) ⚠️ **Deprecated** - Use AdvancedMarker instead
|
|
91
93
|
- [Polyline](#polyline)
|
|
92
94
|
- [Polygon](#polygon)
|
|
93
95
|
- [Rectangle](#rectangle)
|
|
@@ -96,12 +98,24 @@ The main mapping component is `GoogleMap`, however the following components are
|
|
|
96
98
|
- [CustomMarker](#custom-marker)
|
|
97
99
|
- [CustomControl](#custom-control)
|
|
98
100
|
- [MarkerCluster](#marker-cluster)
|
|
101
|
+
- [HeatmapLayer](#heatmap-layer) ⚠️ **Deprecated**
|
|
99
102
|
|
|
100
103
|
### Advanced Marker
|
|
101
104
|
|
|
102
105
|
Use the `AdvancedMarker` component to draw markers, drop pins or any custom icons on a map. `AdvancedMarker` is the new version offered by google when deprecated the `Marker` component ([read more here](https://developers.google.com/maps/deprecations#googlemapsmarker_in_the_deprecated_as_of_february_2024)).
|
|
103
106
|
|
|
104
|
-
In order to use the `AdvancedMarker` component is necessary to specify a MapId on declaring the `GoogleMap` component ([see more here](https://developers.google.com/maps/documentation/javascript/advanced-markers/start#create_a_map_id)).
|
|
107
|
+
In order to use the `AdvancedMarker` component it is necessary to specify a MapId on declaring the `GoogleMap` component ([see more here](https://developers.google.com/maps/documentation/javascript/advanced-markers/start#create_a_map_id)).
|
|
108
|
+
|
|
109
|
+
> [!IMPORTANT]
|
|
110
|
+
> If you're using the `AdvancedMarker` component with an external loader (using the `apiPromise` prop), you must include the `marker` library in your loader configuration:
|
|
111
|
+
>
|
|
112
|
+
> ```js
|
|
113
|
+
> const loader = new Loader({
|
|
114
|
+
> apiKey: YOUR_GOOGLE_MAPS_API_KEY,
|
|
115
|
+
> version: 'weekly',
|
|
116
|
+
> libraries: ['marker'], // Required for AdvancedMarker component
|
|
117
|
+
> });
|
|
118
|
+
> ```
|
|
105
119
|
|
|
106
120
|
#### Options
|
|
107
121
|
|
|
@@ -109,7 +123,7 @@ You can pass a [AdvancedMarkerElementOptions](https://developers.google.com/maps
|
|
|
109
123
|
|
|
110
124
|
You can also pass a [PinElementOptions interface](https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#PinElementOptions) object to customize pin used by the marker.
|
|
111
125
|
|
|
112
|
-
Additionally, `AdvancedMarker` supports
|
|
126
|
+
Additionally, `AdvancedMarker` supports custom slot content via the `content` slot, allowing you to use custom HTML or Vue components inside the marker.
|
|
113
127
|
|
|
114
128
|
```vue
|
|
115
129
|
<script setup>
|
|
@@ -130,9 +144,11 @@ const pinOptions = { background: '#FBBC04' }
|
|
|
130
144
|
>
|
|
131
145
|
<AdvancedMarker :options="markerOptions" :pin-options="pinOptions"/>
|
|
132
146
|
<AdvancedMarker :options="markerOptions">
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
147
|
+
<template #content>
|
|
148
|
+
<div style="background: white; color: black; padding: 5px; border-radius: 5px">
|
|
149
|
+
Custom Content
|
|
150
|
+
</div>
|
|
151
|
+
</template>
|
|
136
152
|
</AdvancedMarker>
|
|
137
153
|
</GoogleMap>
|
|
138
154
|
</template>
|
|
@@ -144,6 +160,9 @@ You can listen for [the following events](https://developers.google.com/maps/doc
|
|
|
144
160
|
|
|
145
161
|
### Marker
|
|
146
162
|
|
|
163
|
+
> [!WARNING]
|
|
164
|
+
> **DEPRECATED:** The `Marker` component is deprecated as of February 2024. Please use the [`AdvancedMarker`](#advanced-marker) component instead for new projects. The legacy `google.maps.Marker` API will be removed in a future version. [Learn more about the deprecation](https://developers.google.com/maps/deprecations#googlemapsmarker_in_the_deprecated_as_of_february_2024).
|
|
165
|
+
|
|
147
166
|
Use the `Marker` component to draw markers, drop pins or any custom icons on a map.
|
|
148
167
|
|
|
149
168
|
#### Options
|
|
@@ -447,6 +466,56 @@ const center = { lat: -25.363, lng: 131.044 }
|
|
|
447
466
|
</template>
|
|
448
467
|
```
|
|
449
468
|
|
|
469
|
+
#### Use with AdvancedMarker
|
|
470
|
+
|
|
471
|
+
You can nest the `InfoWindow` component inside the `AdvancedMarker` component to display an info window when the marker is clicked.
|
|
472
|
+
|
|
473
|
+
```vue
|
|
474
|
+
<script setup>
|
|
475
|
+
import { GoogleMap, AdvancedMarker, InfoWindow } from 'vue3-google-map';
|
|
476
|
+
|
|
477
|
+
const center = { lat: -25.363, lng: 131.044 };
|
|
478
|
+
|
|
479
|
+
const centerSydney = { lat: -33.873220, lng: 151.206176 };
|
|
480
|
+
const makerOptionsSydney = { position: centerSydney, title: 'SYDNEY' };
|
|
481
|
+
|
|
482
|
+
const centerPerth = { lat: -31.954877, lng: 115.860462 };
|
|
483
|
+
const markerOptionsPerth = { position: centerPerth, title: 'PERTH' };
|
|
484
|
+
</script>
|
|
485
|
+
|
|
486
|
+
<template>
|
|
487
|
+
<GoogleMap
|
|
488
|
+
mapId="DEMO_MAP_ID"
|
|
489
|
+
style="width: 100%; height: 500px"
|
|
490
|
+
:center="center"
|
|
491
|
+
:zoom="3"
|
|
492
|
+
>
|
|
493
|
+
<AdvancedMarker :options="makerOptionsSydney">
|
|
494
|
+
<InfoWindow>
|
|
495
|
+
<h1>Sydney</h1>
|
|
496
|
+
<div>
|
|
497
|
+
Default AdvancedMarker With Custom InfoWindow
|
|
498
|
+
</div>
|
|
499
|
+
</InfoWindow>
|
|
500
|
+
</AdvancedMarker>
|
|
501
|
+
|
|
502
|
+
<AdvancedMarker :options="markerOptionsPerth">
|
|
503
|
+
<template #content>
|
|
504
|
+
<div style="background: white; color: black; padding: 5px; border-radius: 5px">
|
|
505
|
+
Perth
|
|
506
|
+
</div>
|
|
507
|
+
</template>
|
|
508
|
+
<InfoWindow>
|
|
509
|
+
<h1>Perth</h1>
|
|
510
|
+
<div>
|
|
511
|
+
Custom Content AdvancedMarker With Custom InfoWindow
|
|
512
|
+
</div>
|
|
513
|
+
</InfoWindow>
|
|
514
|
+
</AdvancedMarker>
|
|
515
|
+
</GoogleMap>
|
|
516
|
+
</template>
|
|
517
|
+
```
|
|
518
|
+
|
|
450
519
|
#### Open and close the Info Window
|
|
451
520
|
|
|
452
521
|
You can use `v-model` to manage the state of the info window programmatically or to know whether it's open or closed
|
|
@@ -646,6 +715,9 @@ You can listen for [the following events](https://googlemaps.github.io/js-marker
|
|
|
646
715
|
|
|
647
716
|
### Heatmap Layer
|
|
648
717
|
|
|
718
|
+
> [!WARNING]
|
|
719
|
+
> **DEPRECATED:** The `HeatmapLayer` component was deprecated on **May 27, 2025** and will be sunset in **May 2026**. Google recommends migrating to third-party library integrations like [deck.gl](https://deck.gl/), which offers a HeatmapLayer implementation. [Learn more about the deprecation](https://developers.google.com/maps/deprecations).
|
|
720
|
+
|
|
649
721
|
Use the `HeatmapLayer` component to depict the intensity of data at geographical points on the map. Make sure to include the `visualization` library in the `libraries` prop of the `GoogleMap` component.
|
|
650
722
|
|
|
651
723
|
#### Options
|
|
@@ -833,7 +905,7 @@ import { GoogleMap, Marker } from 'vue3-google-map';
|
|
|
833
905
|
import { Loader } from '@googlemaps/js-api-loader';
|
|
834
906
|
|
|
835
907
|
const loader = new Loader({
|
|
836
|
-
apiKey:
|
|
908
|
+
apiKey: YOUR_GOOGLE_MAPS_API_KEY,
|
|
837
909
|
version: 'weekly',
|
|
838
910
|
libraries: ['places'],
|
|
839
911
|
});
|
package/dist/index.cjs
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-
|
|
2
|
-
"use strict";var Me=Object.defineProperty;var Ee=(s,e,t)=>e in s?Me(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var H=(s,e,t)=>(Ee(s,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),I=Symbol("map"),T=Symbol("api"),X=Symbol("marker"),Q=Symbol("markerCluster"),z=Symbol("CustomMarker"),ve=Symbol("mapTilesLoaded"),j=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function Pe(s,e,t,r){function n(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function c(d){try{p(r.next(d))}catch(u){a(u)}}function i(d){try{p(r.throw(d))}catch(u){a(u)}}function p(d){d.done?o(d.value):n(d.value).then(c,i)}p((r=r.apply(s,e||[])).next())})}var Oe=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!s(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){var a=o[n];if(!s(e[a],t[a]))return!1}return!0}return e!==e&&t!==t};const ne="__googleMapsScriptId";var R;(function(s){s[s.INITIALIZED=0]="INITIALIZED",s[s.LOADING=1]="LOADING",s[s.SUCCESS=2]="SUCCESS",s[s.FAILURE=3]="FAILURE"})(R||(R={}));class A{constructor({apiKey:e,authReferrerPolicy:t,channel:r,client:n,id:o=ne,language:a,libraries:c=[],mapIds:i,nonce:p,region:d,retries:u=3,url:h="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=r,this.client=n,this.id=o||ne,this.language=a,this.libraries=c,this.mapIds=i,this.nonce=p,this.region=d,this.retries=u,this.url=h,this.version=f,A.instance){if(!Oe(this.options,A.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(A.instance.options)}`);return A.instance}A.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?R.FAILURE:this.done?R.SUCCESS:this.loading?R.LOADING:R.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",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+=`®ion=${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}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(r=>{r?t(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((t=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||t===void 0)&&t.importLibrary||(o=>{let a,c,i,p="The Google Maps JavaScript API",d="google",u="importLibrary",h="__ib__",f=document,m=window;m=m[d]||(m[d]={});const g=m.maps||(m.maps={}),v=new Set,y=new URLSearchParams,w=()=>a||(a=new Promise((k,M)=>Pe(this,void 0,void 0,function*(){var C;yield c=f.createElement("script"),c.id=this.id,y.set("libraries",[...v]+"");for(i in o)y.set(i.replace(/[A-Z]/g,E=>"_"+E[0].toLowerCase()),o[i]);y.set("callback",d+".maps."+h),c.src=this.url+"?"+y,g[h]=k,c.onerror=()=>a=M(Error(p+" could not load.")),c.nonce=this.nonce||((C=f.querySelector("script[nonce]"))===null||C===void 0?void 0:C.nonce)||"",f.head.append(c)})));g[u]?console.warn(p+" only loads once. Ignoring:",o):g[u]=(k,...M)=>v.add(k)&&w().then(()=>g[u](k,...M))})(r);const n=this.libraries.map(o=>this.importLibrary(o));n.length||n.push(this.importLibrary("core")),Promise.all(n).then(()=>this.callback(),o=>{const a=new ErrorEvent("error",{error:o});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){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();return}this.loading||(this.loading=!0,this.setScript())}}}function Se(s){return class extends s.OverlayView{constructor(r){super();H(this,"element");H(this,"opts");const{element:n,...o}=r;this.element=n,this.opts=o,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof s.LatLng?this.opts.position:new s.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const r=this.element;return r.style.display!=="none"&&r.style.visibility!=="hidden"&&(r.style.opacity===""||Number(r.style.opacity)>.01)}onAdd(){if(!this.element)return;const r=this.getPanes();r&&r.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const r=this.getProjection(),n=r==null?void 0:r.fromLatLngToDivPixel(this.getPosition());if(n){this.element.style.position="absolute";let o,a;switch(this.opts.anchorPoint){case"TOP_CENTER":o="-50%",a="-100%";break;case"BOTTOM_CENTER":o="-50%",a="0";break;case"LEFT_CENTER":o="-100%",a="-50%";break;case"RIGHT_CENTER":o="0",a="-50%";break;case"TOP_LEFT":o="-100%",a="-100%";break;case"TOP_RIGHT":o="0",a="-100%";break;case"BOTTOM_LEFT":o="-100%",a="0";break;case"BOTTOM_RIGHT":o="0",a="0";break;default:o="-50%",a="-50%"}const c=n.x+(this.opts.offsetX||0)+"px",i=n.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${o}) translateX(${c}) translateY(${a}) translateY(${i})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(r){const{element:n,...o}=r;this.element=n,this.opts=o,this.draw()}}}let se;const oe=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],Le=l.defineComponent({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places","marker"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},colorScheme:{type:String,required:!1},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},cameraControl:{type:Boolean,required:!1,default:void 0},cameraControlPosition:{type:String,required:!1},nonce:{type:String,default:""}},emits:oe,setup(s,{emit:e}){const t=l.ref(),r=l.ref(!1),n=l.ref(),o=l.ref(),a=l.ref(!1);l.provide(I,n),l.provide(T,o),l.provide(ve,a);const c=()=>{const u={...s};Object.keys(u).forEach(g=>{u[g]===void 0&&delete u[g]});const f=g=>{var v;return g?{position:(v=o.value)==null?void 0:v.ControlPosition[g]}:{}},m={scaleControlOptions:s.scaleControlStyle?{style:s.scaleControlStyle}:{},panControlOptions:f(s.panControlPosition),zoomControlOptions:f(s.zoomControlPosition),rotateControlOptions:f(s.rotateControlPosition),streetViewControlOptions:f(s.streetViewControlPosition),fullscreenControlOptions:f(s.fullscreenControlPosition),cameraControlOptions:f(s.cameraControlPosition),disableDefaultUI:s.disableDefaultUi};return{...u,...m}},i=l.watch([o,n],([u,h])=>{const f=u,m=h;f&&m&&(f.event.addListenerOnce(m,"tilesloaded",()=>{a.value=!0}),setTimeout(i,0))},{immediate:!0}),p=()=>{try{const{apiKey:u,region:h,version:f,language:m,libraries:g,nonce:v}=s;se=new A({apiKey:u,region:h,version:f,language:m,libraries:g,nonce:v})}catch(u){console.error(u)}},d=u=>{o.value=l.markRaw(u.maps),n.value=l.markRaw(new u.maps.Map(t.value,c()));const h=Se(o.value);o.value[z]=h,oe.forEach(m=>{var g;(g=n.value)==null||g.addListener(m,v=>e(m,v))}),r.value=!0;const f=Object.keys(s).filter(m=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(m)).map(m=>l.toRef(s,m));l.watch([()=>s.center,()=>s.zoom,...f],([m,g],[v,y])=>{var E,b,P;const{center:w,zoom:k,...M}=c();(E=n.value)==null||E.setOptions(M),g!==void 0&&g!==y&&((b=n.value)==null||b.setZoom(g));const C=!v||m.lng!==v.lng||m.lat!==v.lat;m&&C&&((P=n.value)==null||P.panTo(m))})};return l.onMounted(()=>{s.apiPromise&&s.apiPromise instanceof Promise?s.apiPromise.then(d):(p(),se.load().then(d))}),l.onBeforeUnmount(()=>{var u;a.value=!1,n.value&&((u=o.value)==null||u.event.clearInstanceListeners(n.value))}),{mapRef:t,ready:r,map:n,api:o,mapTilesLoaded:a}}});const U=(s,e)=>{const t=s.__vccOpts||s;for(const[r,n]of e)t[r]=n;return t},xe={ref:"mapRef",class:"mapdiv"};function Ae(s,e,t,r,n,o){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",xe,null,512),l.renderSlot(s.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:s.ready,map:s.map,api:s.api,mapTilesLoaded:s.mapTilesLoaded})),void 0,!0)])}const Ie=U(Le,[["render",Ae],["__scopeId","data-v-e7ebb206"]]);function Te(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Re=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!s(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){var a=o[n];if(!s(e[a],t[a]))return!1}return!0}return e!==e&&t!==t};const O=Te(Re),ie=["click","drag","dragend","dragstart","gmp-click"],$e=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:ie,setup(s,{emit:e,expose:t,slots:r}){const n=l.ref(),o=l.computed(()=>{var f;return(f=r.default)==null?void 0:f.call(r).some(m=>m.type!==l.Comment)}),a=l.toRef(s,"options"),c=l.toRef(s,"pinOptions"),i=l.ref(),p=l.inject(I,l.ref()),d=l.inject(T,l.ref()),u=l.inject(Q,l.ref()),h=l.computed(()=>!!(u.value&&d.value&&i.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([p,a,c],async(f,[m,g,v])=>{var C,E,b;const w=!O(a.value,g)||!O(c.value,v)||p.value!==m;if(!p.value||!d.value||!w)return;const{AdvancedMarkerElement:k,PinElement:M}=d.value.marker;if(i.value){const{map:P,content:D,...G}=a.value;Object.assign(i.value,{content:o.value?n.value:c.value?new M(c.value).element:D,...G}),h.value&&((C=u.value)==null||C.removeMarker(i.value),(E=u.value)==null||E.addMarker(i.value))}else o.value?a.value.content=n.value:c.value&&(a.value.content=new M(c.value).element),i.value=l.markRaw(new k(a.value)),h.value?(b=u.value)==null||b.addMarker(i.value):i.value.map=p.value,ie.forEach(P=>{var D;(D=i.value)==null||D.addListener(P,G=>e(P,G))})},{immediate:!0}),l.onBeforeUnmount(()=>{var f,m;i.value&&((f=d.value)==null||f.event.clearInstanceListeners(i.value),h.value?(m=u.value)==null||m.removeMarker(i.value):i.value.map=null)}),l.provide(X,i),t({marker:i}),{hasSlotContent:o,markerRef:n}}});const je={key:0,class:"advanced-marker-wrapper"};function Be(s,e,t,r,n,o){return s.hasSlotContent?(l.openBlock(),l.createElementBlock("div",je,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},s.$attrs),[l.renderSlot(s.$slots,"default")],16)])):l.createCommentVNode("",!0)}const qe=U($e,[["render",Be]]),Ne=s=>s==="Marker",Ze=s=>s===z,B=(s,e,t,r)=>{const n=l.ref(),o=l.inject(I,l.ref()),a=l.inject(T,l.ref()),c=l.inject(Q,l.ref()),i=l.computed(()=>!!(c.value&&a.value&&(n.value instanceof a.value.Marker||n.value instanceof a.value[z])));return l.watch([o,t],(p,[d,u])=>{var f,m,g;const h=!O(t.value,u)||o.value!==d;!o.value||!a.value||!h||(n.value?(n.value.setOptions(t.value),i.value&&((f=c.value)==null||f.removeMarker(n.value),(m=c.value)==null||m.addMarker(n.value))):(Ne(s)?n.value=l.markRaw(new a.value[s](t.value)):Ze(s)?n.value=l.markRaw(new a.value[s](t.value)):n.value=l.markRaw(new a.value[s]({...t.value,map:o.value})),i.value?(g=c.value)==null||g.addMarker(n.value):n.value.setMap(o.value),e.forEach(v=>{var y;(y=n.value)==null||y.addListener(v,w=>r(v,w))})))},{immediate:!0}),l.onBeforeUnmount(()=>{var p,d;n.value&&((p=a.value)==null||p.event.clearInstanceListeners(n.value),i.value?(d=c.value)==null||d.removeMarker(n.value):n.value.setMap(null))}),n},ae=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","rightclick","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],Ue=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ae,setup(s,{emit:e,expose:t,slots:r}){const n=l.toRef(s,"options"),o=B("Marker",ae,n,e);return l.provide(X,o),t({marker:o}),()=>{var a;return(a=r.default)==null?void 0:a.call(r)}}}),De=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:j,setup(s,{emit:e}){const t=l.toRef(s,"options");return{polyline:B("Polyline",j,t,e)}},render:()=>null}),Fe=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:j,setup(s,{emit:e}){const t=l.toRef(s,"options");return{polygon:B("Polygon",j,t,e)}},render:()=>null}),le=j.concat(["bounds_changed"]),Ve=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:le,setup(s,{emit:e}){const t=l.toRef(s,"options");return{rectangle:B("Rectangle",le,t,e)}},render:()=>null}),ce=j.concat(["center_changed","radius_changed"]),ze=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:ce,setup(s,{emit:e}){const t=l.toRef(s,"options");return{circle:B("Circle",ce,t,e)}},render:()=>null}),Ge=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(s,{emit:e}){const t=l.ref(null),r=l.inject(I,l.ref()),n=l.inject(T,l.ref()),o=l.inject(ve,l.ref(!1)),a=l.watch([o,n,t],([p,d,u])=>{d&&p&&u&&(c(s.position),e("content:loaded"),setTimeout(a,0))},{immediate:!0}),c=p=>{if(r.value&&n.value&&t.value){const d=n.value.ControlPosition[p];r.value.controls[d].push(t.value)}},i=p=>{if(r.value&&n.value){let d=null;const u=n.value.ControlPosition[p];r.value.controls[u].forEach((h,f)=>{h===t.value&&(d=f)}),d!==null&&r.value.controls[u].removeAt(d)}};return l.onBeforeUnmount(()=>i(s.position)),l.watch(()=>s.position,(p,d)=>{i(d),c(p)}),l.watch(()=>s.index,p=>{p&&t.value&&(t.value.index=s.index)}),{controlRef:t}}});const He={ref:"controlRef",class:"custom-control-wrapper"};function We(s,e,t,r,n,o){return l.openBlock(),l.createElementBlock("div",He,[l.renderSlot(s.$slots,"default",{},void 0,!0)],512)}const Ke=U(Ge,[["render",We],["__scopeId","data-v-d099a3a6"]]),ue=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],Ye=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...ue,"update:modelValue"],setup(s,{slots:e,emit:t,expose:r}){const n=l.ref(),o=l.ref(),a=l.inject(I,l.ref()),c=l.inject(T,l.ref()),i=l.inject(X,l.ref());let p,d=s.modelValue;const u=l.computed(()=>{var g;return(g=e.default)==null?void 0:g.call(e).some(v=>v.type!==l.Comment)}),h=g=>{d=g,t("update:modelValue",g)},f=g=>{n.value&&(n.value.open({map:a.value,anchor:i.value,...g}),h(!0))},m=()=>{n.value&&(n.value.close(),h(!1))};return l.onMounted(()=>{l.watch([a,()=>s.options],([g,v],[y,w])=>{var M;const k=!O(v,w)||a.value!==y;a.value&&c.value&&k&&(n.value?(n.value.setOptions({...v,content:u.value?o.value:v.content}),i.value||f()):(n.value=l.markRaw(new c.value.InfoWindow({...v,content:u.value?o.value:v.content})),i.value&&(p=i.value.addListener("click",()=>{f()})),(!i.value||d)&&f(),ue.forEach(C=>{var E;(E=n.value)==null||E.addListener(C,b=>t(C,b))}),(M=n.value)==null||M.addListener("closeclick",()=>h(!1))))},{immediate:!0}),l.watch(()=>s.modelValue,g=>{g!==d&&(g?f():m())})}),l.onBeforeUnmount(()=>{var g;p&&p.remove(),n.value&&((g=c.value)==null||g.event.clearInstanceListeners(n.value),m())}),r({infoWindow:n,open:f,close:m}),{infoWindow:n,infoWindowRef:o,hasSlotContent:u,open:f,close:m}}});const Je={key:0,class:"info-window-wrapper"};function Xe(s,e,t,r,n,o){return s.hasSlotContent?(l.openBlock(),l.createElementBlock("div",Je,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},s.$attrs),[l.renderSlot(s.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const Qe=U(Ye,[["render",Xe],["__scopeId","data-v-cbe1707b"]]),de=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],W=1,q=8;class ee{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,r]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(n!==W)throw new Error(`Got v${n} data when expected v${W}.`);const o=de[r&15];if(!o)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new ee(c,a,o,e)}constructor(e,t=64,r=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=de.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,i=(8-c%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,q,e),this.coords=new this.ArrayType(this.data,q+c+i,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(q+a+c+i),this.ids=new this.IndexArrayType(this.data,q,e),this.coords=new this.ArrayType(this.data,q+c+i,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(W<<4)+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return J(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:a,nodeSize:c}=this,i=[0,o.length-1,0],p=[];for(;i.length;){const d=i.pop()||0,u=i.pop()||0,h=i.pop()||0;if(u-h<=c){for(let v=h;v<=u;v++){const y=a[2*v],w=a[2*v+1];y>=e&&y<=r&&w>=t&&w<=n&&p.push(o[v])}continue}const f=h+u>>1,m=a[2*f],g=a[2*f+1];m>=e&&m<=r&&g>=t&&g<=n&&p.push(o[f]),(d===0?e<=m:t<=g)&&(i.push(h),i.push(f-1),i.push(1-d)),(d===0?r>=m:n>=g)&&(i.push(f+1),i.push(u),i.push(1-d))}return p}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:a}=this,c=[0,n.length-1,0],i=[],p=r*r;for(;c.length;){const d=c.pop()||0,u=c.pop()||0,h=c.pop()||0;if(u-h<=a){for(let v=h;v<=u;v++)pe(o[2*v],o[2*v+1],e,t)<=p&&i.push(n[v]);continue}const f=h+u>>1,m=o[2*f],g=o[2*f+1];pe(m,g,e,t)<=p&&i.push(n[f]),(d===0?e-r<=m:t-r<=g)&&(c.push(h),c.push(f-1),c.push(1-d)),(d===0?e+r>=m:t+r>=g)&&(c.push(f+1),c.push(u),c.push(1-d))}return i}}function J(s,e,t,r,n,o){if(n-r<=t)return;const a=r+n>>1;ye(s,e,a,r,n,o),J(s,e,t,r,a-1,1-o),J(s,e,t,a+1,n,1-o)}function ye(s,e,t,r,n,o){for(;n>r;){if(n-r>600){const p=n-r+1,d=t-r+1,u=Math.log(p),h=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*h*(p-h)/p)*(d-p/2<0?-1:1),m=Math.max(r,Math.floor(t-d*h/p+f)),g=Math.min(n,Math.floor(t+(p-d)*h/p+f));ye(s,e,t,m,g,o)}const a=e[2*t+o];let c=r,i=n;for(N(s,e,r,t),e[2*n+o]>a&&N(s,e,r,n);c<i;){for(N(s,e,c,i),c++,i--;e[2*c+o]<a;)c++;for(;e[2*i+o]>a;)i--}e[2*r+o]===a?N(s,e,r,i):(i++,N(s,e,i,n)),i<=t&&(r=i+1),t<=i&&(n=i-1)}}function N(s,e,t,r){K(s,t,r),K(e,2*t,2*r),K(e,2*t+1,2*r+1)}function K(s,e,t){const r=s[e];s[e]=s[t],s[t]=r}function pe(s,e,t,r){const n=s-t,o=e-r;return n*n+o*o}const et={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:s=>s},he=Math.fround||(s=>e=>(s[0]=+e,s[0]))(new Float32Array(1)),x=2,L=3,Y=4,S=5,we=6;class ke{constructor(e){this.options=Object.assign(Object.create(et),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;const a=[];for(let i=0;i<e.length;i++){const p=e[i];if(!p.geometry)continue;const[d,u]=p.geometry.coordinates,h=he(F(d)),f=he(V(u));a.push(h,f,1/0,i,-1,1),this.options.reduce&&a.push(0)}let c=this.trees[n+1]=this._createTree(a);t&&console.timeEnd(o);for(let i=n;i>=r;i--){const p=+Date.now();c=this.trees[i]=this._createTree(this._cluster(c,i)),t&&console.log("z%d: %d clusters in %dms",i,c.numItems,+Date.now()-p)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const u=this.getClusters([r,n,180,a],t),h=this.getClusters([-180,n,o,a],t);return u.concat(h)}const c=this.trees[this._limitZoom(t)],i=c.range(F(r),V(a),F(o),V(n)),p=c.data,d=[];for(const u of i){const h=this.stride*u;d.push(p[h+S]>1?fe(p,h,this.clusterProps):this.points[p[h+L]])}return d}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const a=o.data;if(t*this.stride>=a.length)throw new Error(n);const c=this.options.radius/(this.options.extent*Math.pow(2,r-1)),i=a[t*this.stride],p=a[t*this.stride+1],d=o.within(i,p,c),u=[];for(const h of d){const f=h*this.stride;a[f+Y]===e&&u.push(a[f+S]>1?fe(a,f,this.clusterProps):this.points[a[f+L]])}if(u.length===0)throw new Error(n);return u}getLeaves(e,t,r){t=t||10,r=r||0;const n=[];return this._appendLeaves(n,e,t,r,0),n}getTile(e,t,r){const n=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:a,radius:c}=this.options,i=c/a,p=(r-i)/o,d=(r+1+i)/o,u={features:[]};return this._addTileFeatures(n.range((t-i)/o,p,(t+1+i)/o,d),n.data,t,r,o,u),t===0&&this._addTileFeatures(n.range(1-i/o,p,1,d),n.data,o,r,o,u),t===o-1&&this._addTileFeatures(n.range(0,p,i/o,d),n.data,-1,r,o,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const r=this.getChildren(e);if(t++,r.length!==1)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,n,o){const a=this.getChildren(t);for(const c of a){const i=c.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(e,i.cluster_id,r,n,o):o<n?o++:e.push(c),e.length===r)break}return o}_createTree(e){const t=new ee(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)t.add(e[r],e[r+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,r,n,o,a){for(const c of e){const i=c*this.stride,p=t[i+S]>1;let d,u,h;if(p)d=_e(t,i,this.clusterProps),u=t[i],h=t[i+1];else{const g=this.points[t[i+L]];d=g.properties;const[v,y]=g.geometry.coordinates;u=F(v),h=V(y)}const f={type:1,geometry:[[Math.round(this.options.extent*(u*o-r)),Math.round(this.options.extent*(h*o-n))]],tags:d};let m;p||this.options.generateId?m=t[i+L]:m=this.points[t[i+L]].id,m!==void 0&&(f.id=m),a.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:r,extent:n,reduce:o,minPoints:a}=this.options,c=r/(n*Math.pow(2,t)),i=e.data,p=[],d=this.stride;for(let u=0;u<i.length;u+=d){if(i[u+x]<=t)continue;i[u+x]=t;const h=i[u],f=i[u+1],m=e.within(i[u],i[u+1],c),g=i[u+S];let v=g;for(const y of m){const w=y*d;i[w+x]>t&&(v+=i[w+S])}if(v>g&&v>=a){let y=h*g,w=f*g,k,M=-1;const C=((u/d|0)<<5)+(t+1)+this.points.length;for(const E of m){const b=E*d;if(i[b+x]<=t)continue;i[b+x]=t;const P=i[b+S];y+=i[b]*P,w+=i[b+1]*P,i[b+Y]=C,o&&(k||(k=this._map(i,u,!0),M=this.clusterProps.length,this.clusterProps.push(k)),o(k,this._map(i,b)))}i[u+Y]=C,p.push(y/v,w/v,1/0,C,-1,v),o&&p.push(M)}else{for(let y=0;y<d;y++)p.push(i[u+y]);if(v>1)for(const y of m){const w=y*d;if(!(i[w+x]<=t)){i[w+x]=t;for(let k=0;k<d;k++)p.push(i[w+k])}}}}return p}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+S]>1){const a=this.clusterProps[e[t+we]];return r?Object.assign({},a):a}const n=this.points[e[t+L]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function fe(s,e,t){return{type:"Feature",id:s[e+L],properties:_e(s,e,t),geometry:{type:"Point",coordinates:[tt(s[e]),rt(s[e+1])]}}}function _e(s,e,t){const r=s[e+S],n=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=s[e+we],a=o===-1?{}:Object.assign({},t[o]);return Object.assign(a,{cluster:!0,cluster_id:s[e+L],point_count:r,point_count_abbreviated:n})}function F(s){return s/360+.5}function V(s){const e=Math.sin(s*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function tt(s){return(s-.5)*360}function rt(s){const e=(180-s*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
16
|
-
Copyright (c) Microsoft Corporation.
|
|
17
|
-
|
|
18
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
19
|
-
purpose with or without fee is hereby granted.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
22
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
23
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
24
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
25
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
26
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
28
|
-
***************************************************************************** */function te(s,e){var t={};for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(s);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(s,r[n])&&(t[r[n]]=s[r[n]]);return t}class _{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Z{constructor({markers:e,position:t}){this.markers=e,t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(_.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>_.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(_.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const nt=(s,e,t,r)=>{const n=Ce(s.getBounds(),e,r);return t.filter(o=>n.contains(_.getPosition(o)))},Ce=(s,e,t)=>{const{northEast:r,southWest:n}=st(s,e),o=ot({northEast:r,southWest:n},t);return it(o,e)},me=(s,e,t)=>{const r=Ce(s,e,t),n=r.getNorthEast(),o=r.getSouthWest();return[o.lng(),o.lat(),n.lng(),n.lat()]},st=(s,e)=>({northEast:e.fromLatLngToDivPixel(s.getNorthEast()),southWest:e.fromLatLngToDivPixel(s.getSouthWest())}),ot=({northEast:s,southWest:e},t)=>(s.x+=t,s.y-=t,e.x-=t,e.y+=t,{northEast:s,southWest:e}),it=({northEast:s,southWest:e},t)=>{const r=t.fromDivPixelToLatLng(e),n=t.fromDivPixelToLatLng(s);return new google.maps.LatLngBounds(r,n)};class be{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return lt(e)}}class at extends be{constructor(e){var{viewportPadding:t=60}=e,r=te(e,["viewportPadding"]);super(r),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:r}){return t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:nt(t,r,e,this.viewportPadding),map:t,mapCanvasProjection:r})}}}const lt=s=>s.map(t=>new Z({position:_.getPosition(t),markers:[t]}));class ct extends be{constructor(e){var{maxZoom:t,radius:r=60}=e,n=te(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new ke(Object.assign({maxZoom:this.maxZoom,radius:r},n))}calculate(e){let t=!1;const r={zoom:e.map.getZoom()};if(!O(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map(o=>{const a=_.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:o}}});this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(t=!O(this.state,r)),this.state=r,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new Z({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const n=r.marker;return new Z({markers:[n],position:_.getPosition(n)})}}class ut extends at{constructor(e){var{maxZoom:t,radius:r=60,viewportPadding:n=60}=e,o=te(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:n}),this.superCluster=new ke(Object.assign({maxZoom:this.maxZoom,radius:r},o)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t={zoom:Math.round(e.map.getZoom()),view:me(e.map.getBounds(),e.mapCanvasProjection,this.viewportPadding)};let r=!O(this.state,t);if(!O(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const n=this.markers.map(o=>{const a=_.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:o}}});this.superCluster.load(n)}return r&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:r}}cluster({map:e,mapCanvasProjection:t}){const r={zoom:Math.round(e.getZoom()),view:me(e.getBounds(),t,this.viewportPadding)};return this.superCluster.getClusters(r.view,r.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new Z({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const n=r.marker;return new Z({markers:[n],position:_.getPosition(n)})}}class dt{constructor(e,t){this.markers={sum:e.length};const r=t.map(o=>o.count),n=r.reduce((o,a)=>o+a,0);this.clusters={count:t.length,markers:{mean:n/t.length,sum:n,min:Math.min(...r),max:Math.max(...r)}}}}class pt{render({count:e,position:t},r,n){const a=`<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">
|
|
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-f0c09f6e]{display:none}.mapdiv .info-window-wrapper[data-v-f0c09f6e]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
"use strict";var Ve=Object.defineProperty;var Ge=(n,e,t)=>e in n?Ve(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ee=(n,e,t)=>(Ge(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),I=Symbol("map"),j=Symbol("api"),ie=Symbol("marker"),ae=Symbol("markerCluster"),Y=Symbol("CustomMarker"),Re=Symbol("mapTilesLoaded"),$=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function ze(n,e,t,r){function s(o){return o instanceof t?o:new t(function(i){i(o)})}return new(t||(t=Promise))(function(o,i){function u(f){try{d(r.next(f))}catch(c){i(c)}}function a(f){try{d(r.throw(f))}catch(c){i(c)}}function d(f){f.done?o(f.value):s(f.value).then(u,a)}d((r=r.apply(n,e||[])).next())})}function We(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var te,fe;function He(){return fe||(fe=1,te=function n(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,s,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(s=r;s--!==0;)if(!n(e[s],t[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!n(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}),te}var Ke=He(),Je=We(Ke);const pe="__googleMapsScriptId";var B;(function(n){n[n.INITIALIZED=0]="INITIALIZED",n[n.LOADING=1]="LOADING",n[n.SUCCESS=2]="SUCCESS",n[n.FAILURE=3]="FAILURE"})(B||(B={}));class x{constructor({apiKey:e,authReferrerPolicy:t,channel:r,client:s,id:o=pe,language:i,libraries:u=[],mapIds:a,nonce:d,region:f,retries:c=3,url:m="https://maps.googleapis.com/maps/api/js",version:g}){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||pe,this.language=i,this.libraries=u,this.mapIds=a,this.nonce=d,this.region=f,this.retries=c,this.url=m,this.version=g,x.instance){if(!Je(this.options,x.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(x.instance.options)}`);return x.instance}x.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?B.FAILURE:this.done?B.SUCCESS:this.loading?B.LOADING:B.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;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+=`®ion=${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}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(r=>{r?t(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((t=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||t===void 0)&&t.importLibrary||(o=>{let i,u,a,d="The Google Maps JavaScript API",f="google",c="importLibrary",m="__ib__",g=document,p=window;p=p[f]||(p[f]={});const h=p.maps||(p.maps={}),v=new Set,y=new URLSearchParams,E=()=>i||(i=new Promise((w,M)=>ze(this,void 0,void 0,function*(){var C;yield u=g.createElement("script"),u.id=this.id,y.set("libraries",[...v]+"");for(a in o)y.set(a.replace(/[A-Z]/g,O=>"_"+O[0].toLowerCase()),o[a]);y.set("callback",f+".maps."+m),u.src=this.url+"?"+y,h[m]=w,u.onerror=()=>i=M(Error(d+" could not load.")),u.nonce=this.nonce||((C=g.querySelector("script[nonce]"))===null||C===void 0?void 0:C.nonce)||"",g.head.append(u)})));h[c]?console.warn(d+" only loads once. Ignoring:",o):h[c]=(w,...M)=>v.add(w)&&E().then(()=>h[c](w,...M))})(r);const s=this.libraries.map(o=>this.importLibrary(o));s.length||s.push(this.importLibrary("core")),Promise.all(s).then(()=>this.callback(),o=>{const i=new ErrorEvent("error",{error:o});this.loadErrorCallback(i)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){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();return}this.loading=!0,this.setScript()}}}function Ye(n){return class extends n.OverlayView{constructor(r){super();ee(this,"element");ee(this,"opts");const{element:s,...o}=r;this.element=s,this.opts=o,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof n.LatLng?this.opts.position:new n.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const r=this.element;return r.style.display!=="none"&&r.style.visibility!=="hidden"&&(r.style.opacity===""||Number(r.style.opacity)>.01)}onAdd(){if(!this.element)return;const r=this.getPanes();r&&r.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const r=this.getProjection(),s=r==null?void 0:r.fromLatLngToDivPixel(this.getPosition());if(s){this.element.style.position="absolute";let o,i;switch(this.opts.anchorPoint){case"TOP_CENTER":o="-50%",i="-100%";break;case"BOTTOM_CENTER":o="-50%",i="0";break;case"LEFT_CENTER":o="-100%",i="-50%";break;case"RIGHT_CENTER":o="0",i="-50%";break;case"TOP_LEFT":o="-100%",i="-100%";break;case"TOP_RIGHT":o="0",i="-100%";break;case"BOTTOM_LEFT":o="-100%",i="0";break;case"BOTTOM_RIGHT":o="0",i="0";break;default:o="-50%",i="-50%"}const u=s.x+(this.opts.offsetX||0)+"px",a=s.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${o}) translateX(${u}) translateY(${i}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(r){const{element:s,...o}=r;this.element=s,this.opts=o,this.draw()}}}let he;const me=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],Xe=l.defineComponent({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places","marker"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},colorScheme:{type:String,required:!1},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},cameraControl:{type:Boolean,required:!1,default:void 0},cameraControlPosition:{type:String,required:!1},nonce:{type:String,default:""}},emits:me,setup(n,{emit:e}){const t=l.ref(),r=l.ref(!1),s=l.ref(),o=l.ref(),i=l.ref(!1);l.provide(I,s),l.provide(j,o),l.provide(Re,i);const u=()=>{const c={...n};Object.keys(c).forEach(h=>{c[h]===void 0&&delete c[h]});const g=h=>{var v;return h?{position:(v=o.value)==null?void 0:v.ControlPosition[h]}:{}},p={scaleControlOptions:n.scaleControlStyle?{style:n.scaleControlStyle}:{},panControlOptions:g(n.panControlPosition),zoomControlOptions:g(n.zoomControlPosition),rotateControlOptions:g(n.rotateControlPosition),streetViewControlOptions:g(n.streetViewControlPosition),fullscreenControlOptions:g(n.fullscreenControlPosition),cameraControlOptions:g(n.cameraControlPosition),disableDefaultUI:n.disableDefaultUi};return{...c,...p}},a=l.watch([o,s],([c,m])=>{const g=c,p=m;g&&p&&(g.event.addListenerOnce(p,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),d=()=>{try{const{apiKey:c,region:m,version:g,language:p,libraries:h,nonce:v}=n;he=new x({apiKey:c,region:m,version:g,language:p,libraries:h,nonce:v})}catch(c){console.error(c)}},f=c=>{o.value=l.markRaw(c.maps),s.value=l.markRaw(new c.maps.Map(t.value,u()));const m=Ye(o.value);o.value[Y]=m,me.forEach(p=>{var h;(h=s.value)==null||h.addListener(p,v=>e(p,v))}),r.value=!0;const g=Object.keys(n).filter(p=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(p)).map(p=>l.toRef(n,p));l.watch([()=>n.center,()=>n.zoom,...g],([p,h],[v,y])=>{var O,_,P;const{center:E,zoom:w,...M}=u();(O=s.value)==null||O.setOptions(M),h!==void 0&&h!==y&&((_=s.value)==null||_.setZoom(h));const C=!v||p.lng!==v.lng||p.lat!==v.lat;p&&C&&((P=s.value)==null||P.panTo(p))})};return l.onMounted(()=>{n.apiPromise&&n.apiPromise instanceof Promise?n.apiPromise.then(f):(d(),he.load().then(f))}),l.onBeforeUnmount(()=>{var c;i.value=!1,s.value&&((c=o.value)==null||c.event.clearInstanceListeners(s.value))}),{mapRef:t,ready:r,map:s,api:o,mapTilesLoaded:i}}});const G=(n,e)=>{const t=n.__vccOpts||n;for(const[r,s]of e)t[r]=s;return t},Qe={ref:"mapRef",class:"mapdiv"};function et(n,e,t,r,s,o){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",Qe,null,512),l.renderSlot(n.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:n.ready,map:n.map,api:n.api,mapTilesLoaded:n.mapTilesLoaded})),void 0,!0)])}const tt=G(Xe,[["render",et],["__scopeId","data-v-289550ca"]]);function rt(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var nt=function n(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,s,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(s=r;s--!==0;)if(!n(e[s],t[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!n(e[i],t[i]))return!1}return!0}return e!==e&&t!==t};const F=rt(nt),ge=["click","drag","dragend","dragstart","gmp-click"],st=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:ge,setup(n,{emit:e,expose:t,slots:r}){const s=l.ref(),o=l.computed(()=>{var g;return(g=r.content)==null?void 0:g.call(r).some(p=>p.type!==l.Comment)}),i=l.toRef(n,"options"),u=l.toRef(n,"pinOptions"),a=l.ref(),d=l.inject(I,l.ref()),f=l.inject(j,l.ref()),c=l.inject(ae,l.ref()),m=l.computed(()=>!!(c.value&&f.value&&a.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([d,i,u,s],async(g,[p,h,v,y])=>{var _,P,de;const E=!F(i.value,h)||!F(u.value,v),w=s.value!==y,M=E||w||d.value!==p;if(!d.value||!f.value||!M||o.value&&!s.value)return;const{AdvancedMarkerElement:C,PinElement:O}=f.value.marker;if(a.value){const{map:X,content:z,...Q}=i.value;Object.assign(a.value,{content:o.value?s.value:u.value?new O(u.value).element:z,...Q}),m.value&&((_=c.value)==null||_.removeMarker(a.value),(P=c.value)==null||P.addMarker(a.value))}else o.value?i.value.content=s.value:u.value&&(i.value.content=new O(u.value).element),a.value=l.markRaw(new C(i.value)),m.value?(de=c.value)==null||de.addMarker(a.value):a.value.map=d.value,ge.forEach(X=>{var z;(z=a.value)==null||z.addListener(X,Q=>e(X,Q))})},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var g,p;a.value&&((g=f.value)==null||g.event.clearInstanceListeners(a.value),m.value?(p=c.value)==null||p.removeMarker(a.value):a.value.map=null)}),l.provide(ie,a),t({marker:a}),{hasCustomSlotContent:o,markerRef:s}}});const ot={key:0,class:"advanced-marker-wrapper"};function it(n,e,t,r,s,o){return l.openBlock(),l.createElementBlock(l.Fragment,null,[n.hasCustomSlotContent?(l.openBlock(),l.createElementBlock("div",ot,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},n.$attrs),[l.renderSlot(n.$slots,"content")],16)])):l.createCommentVNode("",!0),l.renderSlot(n.$slots,"default")],64)}const at=G(st,[["render",it]]),ve=n=>n==="Marker",ye=n=>n===Y,N=(n,e,t,r)=>{const s=l.ref(),o=l.inject(I,l.ref()),i=l.inject(j,l.ref()),u=l.inject(ae,l.ref()),a=l.computed(()=>!!(u.value&&i.value&&(s.value instanceof i.value.Marker||s.value instanceof i.value[Y])));return l.watch([o,t],(d,[f,c])=>{var g,p,h;const m=!F(t.value,c)||o.value!==f;if(!(!o.value||!i.value||!m))if(s.value)s.value.setOptions(t.value),a.value&&((g=u.value)==null||g.removeMarker(s.value),(p=u.value)==null||p.addMarker(s.value));else{if(ve(n))s.value=l.markRaw(new i.value[n](t.value));else if(ye(n)){const v=t.value;v.element&&(s.value=l.markRaw(new i.value[n](v)))}else s.value=l.markRaw(new i.value[n]({...t.value,map:o.value}));s.value&&(a.value?(h=u.value)==null||h.addMarker(s.value):(ve(n)||ye(n))&&s.value.setMap(o.value)),e.forEach(v=>{var y;(y=s.value)==null||y.addListener(v,E=>r(v,E))})}},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var d,f;s.value&&((d=i.value)==null||d.event.clearInstanceListeners(s.value),a.value?(f=u.value)==null||f.removeMarker(s.value):s.value.setMap(null))}),s},we=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],lt=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:we,setup(n,{emit:e,expose:t,slots:r}){const s=l.toRef(n,"options"),o=N("Marker",we,s,e);return l.provide(ie,o),t({marker:o}),()=>{var i;return(i=r.default)==null?void 0:i.call(r)}}}),ut=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:$,setup(n,{emit:e}){const t=l.toRef(n,"options");return{polyline:N("Polyline",$,t,e)}},render:()=>null}),ct=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:$,setup(n,{emit:e}){const t=l.toRef(n,"options");return{polygon:N("Polygon",$,t,e)}},render:()=>null}),Ee=$.concat(["bounds_changed"]),dt=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:Ee,setup(n,{emit:e}){const t=l.toRef(n,"options");return{rectangle:N("Rectangle",Ee,t,e)}},render:()=>null}),ke=$.concat(["center_changed","radius_changed"]),ft=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:ke,setup(n,{emit:e}){const t=l.toRef(n,"options");return{circle:N("Circle",ke,t,e)}},render:()=>null}),pt=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(n,{emit:e}){const t=l.ref(null),r=l.inject(I,l.ref()),s=l.inject(j,l.ref()),o=l.inject(Re,l.ref(!1)),i=l.watch([o,s,t],([d,f,c])=>{f&&d&&c&&(u(n.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),u=d=>{if(r.value&&s.value&&t.value){const f=s.value.ControlPosition[d];t.value.index=n.index,r.value.controls[f].push(t.value)}},a=d=>{if(r.value&&s.value){let f=null;const c=s.value.ControlPosition[d];r.value.controls[c].forEach((m,g)=>{m===t.value&&(f=g)}),f!==null&&r.value.controls[c].removeAt(f)}};return l.onBeforeUnmount(()=>a(n.position)),l.watch(()=>n.position,(d,f)=>{a(f),u(d)}),l.watch(()=>n.index,d=>{t.value&&(t.value.index=d)}),{controlRef:t}}});const ht={ref:"controlRef",class:"custom-control-wrapper"};function mt(n,e,t,r,s,o){return l.openBlock(),l.createElementBlock("div",ht,[l.renderSlot(n.$slots,"default",{},void 0,!0)],512)}const gt=G(pt,[["render",mt],["__scopeId","data-v-ab9120cd"]]),_e=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],vt=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[..._e,"update:modelValue"],setup(n,{slots:e,emit:t,expose:r}){const s=l.ref(),o=l.ref(),i=l.inject(I,l.ref()),u=l.inject(j,l.ref()),a=l.inject(ie,l.ref());let d,f=n.modelValue;const c=l.computed(()=>{var h;return(h=e.default)==null?void 0:h.call(e).some(v=>v.type!==l.Comment)}),m=h=>{f=h,t("update:modelValue",h)},g=h=>{s.value&&(s.value.open({map:i.value,anchor:a.value,...h}),m(!0))},p=()=>{s.value&&(s.value.close(),m(!1))};return l.onMounted(()=>{l.watch([i,()=>n.options],([h,v],[y,E])=>{var M;const w=!F(v,E)||i.value!==y;i.value&&u.value&&w&&(s.value?(s.value.setOptions({...v,content:c.value?o.value:v.content}),a.value||g()):(s.value=l.markRaw(new u.value.InfoWindow({...v,content:c.value?o.value:v.content})),a.value&&(d=a.value.addListener("click",()=>{g()})),(!a.value||f)&&g(),_e.forEach(C=>{var O;(O=s.value)==null||O.addListener(C,_=>t(C,_))}),(M=s.value)==null||M.addListener("closeclick",()=>m(!1))))},{immediate:!0}),l.watch(()=>n.modelValue,h=>{h!==f&&(h?g():p())})}),l.onBeforeUnmount(()=>{var h;d&&d.remove(),s.value&&((h=u.value)==null||h.event.clearInstanceListeners(s.value),p())}),r({infoWindow:s,open:g,close:p}),{infoWindow:s,infoWindowRef:o,hasSlotContent:c,open:g,close:p}}});const yt={key:0,class:"info-window-wrapper"};function wt(n,e,t,r,s,o){return n.hasSlotContent?(l.openBlock(),l.createElementBlock("div",yt,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},n.$attrs),[l.renderSlot(n.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const Et=G(vt,[["render",wt],["__scopeId","data-v-f0c09f6e"]]);var kt=Object.getOwnPropertyNames,_t=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty;function Ce(n,e){return function(r,s,o){return n(r,s,o)&&e(r,s,o)}}function W(n){return function(t,r,s){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,s);var o=s.cache,i=o.get(t),u=o.get(r);if(i&&u)return i===r&&u===t;o.set(t,r),o.set(r,t);var a=n(t,r,s);return o.delete(t),o.delete(r),a}}function Me(n){return kt(n).concat(_t(n))}var Mt=Object.hasOwn||function(n,e){return Ct.call(n,e)};function R(n,e){return n===e||!n&&!e&&n!==n&&e!==e}var Ot="__v",bt="__o",Pt="_owner",Oe=Object.getOwnPropertyDescriptor,be=Object.keys;function St(n,e,t){var r=n.length;if(e.length!==r)return!1;for(;r-- >0;)if(!t.equals(n[r],e[r],r,r,n,e,t))return!1;return!0}function qt(n,e){return R(n.getTime(),e.getTime())}function At(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function Tt(n,e){return n===e}function Pe(n,e,t){var r=n.size;if(r!==e.size)return!1;if(!r)return!0;for(var s=new Array(r),o=n.entries(),i,u,a=0;(i=o.next())&&!i.done;){for(var d=e.entries(),f=!1,c=0;(u=d.next())&&!u.done;){if(s[c]){c++;continue}var m=i.value,g=u.value;if(t.equals(m[0],g[0],a,c,n,e,t)&&t.equals(m[1],g[1],m[0],g[0],n,e,t)){f=s[c]=!0;break}c++}if(!f)return!1;a++}return!0}var Lt=R;function xt(n,e,t){var r=be(n),s=r.length;if(be(e).length!==s)return!1;for(;s-- >0;)if(!Be(n,e,t,r[s]))return!1;return!0}function D(n,e,t){var r=Me(n),s=r.length;if(Me(e).length!==s)return!1;for(var o,i,u;s-- >0;)if(o=r[s],!Be(n,e,t,o)||(i=Oe(n,o),u=Oe(e,o),(i||u)&&(!i||!u||i.configurable!==u.configurable||i.enumerable!==u.enumerable||i.writable!==u.writable)))return!1;return!0}function It(n,e){return R(n.valueOf(),e.valueOf())}function jt(n,e){return n.source===e.source&&n.flags===e.flags}function Se(n,e,t){var r=n.size;if(r!==e.size)return!1;if(!r)return!0;for(var s=new Array(r),o=n.values(),i,u;(i=o.next())&&!i.done;){for(var a=e.values(),d=!1,f=0;(u=a.next())&&!u.done;){if(!s[f]&&t.equals(i.value,u.value,i.value,u.value,n,e,t)){d=s[f]=!0;break}f++}if(!d)return!1}return!0}function Rt(n,e){var t=n.length;if(e.length!==t)return!1;for(;t-- >0;)if(n[t]!==e[t])return!1;return!0}function Bt(n,e){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}function Be(n,e,t,r){return(r===Pt||r===bt||r===Ot)&&(n.$$typeof||e.$$typeof)?!0:Mt(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}var $t="[object Arguments]",Nt="[object Boolean]",Dt="[object Date]",Ut="[object Error]",Zt="[object Map]",Ft="[object Number]",Vt="[object Object]",Gt="[object RegExp]",zt="[object Set]",Wt="[object String]",Ht="[object URL]",Kt=Array.isArray,qe=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Ae=Object.assign,Jt=Object.prototype.toString.call.bind(Object.prototype.toString);function Yt(n){var e=n.areArraysEqual,t=n.areDatesEqual,r=n.areErrorsEqual,s=n.areFunctionsEqual,o=n.areMapsEqual,i=n.areNumbersEqual,u=n.areObjectsEqual,a=n.arePrimitiveWrappersEqual,d=n.areRegExpsEqual,f=n.areSetsEqual,c=n.areTypedArraysEqual,m=n.areUrlsEqual;return function(p,h,v){if(p===h)return!0;if(p==null||h==null)return!1;var y=typeof p;if(y!==typeof h)return!1;if(y!=="object")return y==="number"?i(p,h,v):y==="function"?s(p,h,v):!1;var E=p.constructor;if(E!==h.constructor)return!1;if(E===Object)return u(p,h,v);if(Kt(p))return e(p,h,v);if(qe!=null&&qe(p))return c(p,h,v);if(E===Date)return t(p,h,v);if(E===RegExp)return d(p,h,v);if(E===Map)return o(p,h,v);if(E===Set)return f(p,h,v);var w=Jt(p);return w===Dt?t(p,h,v):w===Gt?d(p,h,v):w===Zt?o(p,h,v):w===zt?f(p,h,v):w===Vt?typeof p.then!="function"&&typeof h.then!="function"&&u(p,h,v):w===Ht?m(p,h,v):w===Ut?r(p,h,v):w===$t?u(p,h,v):w===Nt||w===Ft||w===Wt?a(p,h,v):!1}}function Xt(n){var e=n.circular,t=n.createCustomConfig,r=n.strict,s={areArraysEqual:r?D:St,areDatesEqual:qt,areErrorsEqual:At,areFunctionsEqual:Tt,areMapsEqual:r?Ce(Pe,D):Pe,areNumbersEqual:Lt,areObjectsEqual:r?D:xt,arePrimitiveWrappersEqual:It,areRegExpsEqual:jt,areSetsEqual:r?Ce(Se,D):Se,areTypedArraysEqual:r?D:Rt,areUrlsEqual:Bt};if(t&&(s=Ae({},s,t(s))),e){var o=W(s.areArraysEqual),i=W(s.areMapsEqual),u=W(s.areObjectsEqual),a=W(s.areSetsEqual);s=Ae({},s,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:u,areSetsEqual:a})}return s}function Qt(n){return function(e,t,r,s,o,i,u){return n(e,t,u)}}function er(n){var e=n.circular,t=n.comparator,r=n.createState,s=n.equals,o=n.strict;if(r)return function(a,d){var f=r(),c=f.cache,m=c===void 0?e?new WeakMap:void 0:c,g=f.meta;return t(a,d,{cache:m,equals:s,meta:g,strict:o})};if(e)return function(a,d){return t(a,d,{cache:new WeakMap,equals:s,meta:void 0,strict:o})};var i={cache:void 0,equals:s,meta:void 0,strict:o};return function(a,d){return t(a,d,i)}}var J=T();T({strict:!0});T({circular:!0});T({circular:!0,strict:!0});T({createInternalComparator:function(){return R}});T({strict:!0,createInternalComparator:function(){return R}});T({circular:!0,createInternalComparator:function(){return R}});T({circular:!0,createInternalComparator:function(){return R},strict:!0});function T(n){n===void 0&&(n={});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,u=Xt(n),a=Yt(u),d=r?r(a):Qt(a);return er({circular:t,comparator:a,createState:s,equals:d,strict:i})}const Te=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],re=1,U=8;class le{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,r]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const s=r>>4;if(s!==re)throw new Error(`Got v${s} data when expected v${re}.`);const o=Te[r&15];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[u]=new Uint32Array(e,4,1);return new le(u,i,o,e)}constructor(e,t=64,r=Float64Array,s){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=Te.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,u=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-u%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,U,e),this.coords=new this.ArrayType(this.data,U+u+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(U+i+u+a),this.ids=new this.IndexArrayType(this.data,U,e),this.coords=new this.ArrayType(this.data,U+u+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(re<<4)+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return oe(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:u}=this,a=[0,o.length-1,0],d=[];for(;a.length;){const f=a.pop()||0,c=a.pop()||0,m=a.pop()||0;if(c-m<=u){for(let v=m;v<=c;v++){const y=i[2*v],E=i[2*v+1];y>=e&&y<=r&&E>=t&&E<=s&&d.push(o[v])}continue}const g=m+c>>1,p=i[2*g],h=i[2*g+1];p>=e&&p<=r&&h>=t&&h<=s&&d.push(o[g]),(f===0?e<=p:t<=h)&&(a.push(m),a.push(g-1),a.push(1-f)),(f===0?r>=p:s>=h)&&(a.push(g+1),a.push(c),a.push(1-f))}return d}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:i}=this,u=[0,s.length-1,0],a=[],d=r*r;for(;u.length;){const f=u.pop()||0,c=u.pop()||0,m=u.pop()||0;if(c-m<=i){for(let v=m;v<=c;v++)Le(o[2*v],o[2*v+1],e,t)<=d&&a.push(s[v]);continue}const g=m+c>>1,p=o[2*g],h=o[2*g+1];Le(p,h,e,t)<=d&&a.push(s[g]),(f===0?e-r<=p:t-r<=h)&&(u.push(m),u.push(g-1),u.push(1-f)),(f===0?e+r>=p:t+r>=h)&&(u.push(g+1),u.push(c),u.push(1-f))}return a}}function oe(n,e,t,r,s,o){if(s-r<=t)return;const i=r+s>>1;$e(n,e,i,r,s,o),oe(n,e,t,r,i-1,1-o),oe(n,e,t,i+1,s,1-o)}function $e(n,e,t,r,s,o){for(;s>r;){if(s-r>600){const d=s-r+1,f=t-r+1,c=Math.log(d),m=.5*Math.exp(2*c/3),g=.5*Math.sqrt(c*m*(d-m)/d)*(f-d/2<0?-1:1),p=Math.max(r,Math.floor(t-f*m/d+g)),h=Math.min(s,Math.floor(t+(d-f)*m/d+g));$e(n,e,t,p,h,o)}const i=e[2*t+o];let u=r,a=s;for(Z(n,e,r,t),e[2*s+o]>i&&Z(n,e,r,s);u<a;){for(Z(n,e,u,a),u++,a--;e[2*u+o]<i;)u++;for(;e[2*a+o]>i;)a--}e[2*r+o]===i?Z(n,e,r,a):(a++,Z(n,e,a,s)),a<=t&&(r=a+1),t<=a&&(s=a-1)}}function Z(n,e,t,r){ne(n,t,r),ne(e,2*t,2*r),ne(e,2*t+1,2*r+1)}function ne(n,e,t){const r=n[e];n[e]=n[t],n[t]=r}function Le(n,e,t,r){const s=n-t,o=e-r;return s*s+o*o}const tr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:n=>n},xe=Math.fround||(n=>e=>(n[0]=+e,n[0]))(new Float32Array(1)),L=2,q=3,se=4,S=5,Ne=6;class De{constructor(e){this.options=Object.assign(Object.create(tr),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:r,maxZoom:s}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;const i=[];for(let a=0;a<e.length;a++){const d=e[a];if(!d.geometry)continue;const[f,c]=d.geometry.coordinates,m=xe(H(f)),g=xe(K(c));i.push(m,g,1/0,a,-1,1),this.options.reduce&&i.push(0)}let u=this.trees[s+1]=this._createTree(i);t&&console.timeEnd(o);for(let a=s;a>=r;a--){const d=+Date.now();u=this.trees[a]=this._createTree(this._cluster(u,a)),t&&console.log("z%d: %d clusters in %dms",a,u.numItems,+Date.now()-d)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const c=this.getClusters([r,s,180,i],t),m=this.getClusters([-180,s,o,i],t);return c.concat(m)}const u=this.trees[this._limitZoom(t)],a=u.range(H(r),K(i),H(o),K(s)),d=u.data,f=[];for(const c of a){const m=this.stride*c;f.push(d[m+S]>1?Ie(d,m,this.clusterProps):this.points[d[m+q]])}return f}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),s="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(s);const i=o.data;if(t*this.stride>=i.length)throw new Error(s);const u=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=i[t*this.stride],d=i[t*this.stride+1],f=o.within(a,d,u),c=[];for(const m of f){const g=m*this.stride;i[g+se]===e&&c.push(i[g+S]>1?Ie(i,g,this.clusterProps):this.points[i[g+q]])}if(c.length===0)throw new Error(s);return c}getLeaves(e,t,r){t=t||10,r=r||0;const s=[];return this._appendLeaves(s,e,t,r,0),s}getTile(e,t,r){const s=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:i,radius:u}=this.options,a=u/i,d=(r-a)/o,f=(r+1+a)/o,c={features:[]};return this._addTileFeatures(s.range((t-a)/o,d,(t+1+a)/o,f),s.data,t,r,o,c),t===0&&this._addTileFeatures(s.range(1-a/o,d,1,f),s.data,o,r,o,c),t===o-1&&this._addTileFeatures(s.range(0,d,a/o,f),s.data,-1,r,o,c),c.features.length?c:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const r=this.getChildren(e);if(t++,r.length!==1)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,s,o){const i=this.getChildren(t);for(const u of i){const a=u.properties;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(u),e.length===r)break}return o}_createTree(e){const t=new le(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)t.add(e[r],e[r+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,r,s,o,i){for(const u of e){const a=u*this.stride,d=t[a+S]>1;let f,c,m;if(d)f=Ue(t,a,this.clusterProps),c=t[a],m=t[a+1];else{const h=this.points[t[a+q]];f=h.properties;const[v,y]=h.geometry.coordinates;c=H(v),m=K(y)}const g={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(m*o-s))]],tags:f};let p;d||this.options.generateId?p=t[a+q]:p=this.points[t[a+q]].id,p!==void 0&&(g.id=p),i.features.push(g)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:r,extent:s,reduce:o,minPoints:i}=this.options,u=r/(s*Math.pow(2,t)),a=e.data,d=[],f=this.stride;for(let c=0;c<a.length;c+=f){if(a[c+L]<=t)continue;a[c+L]=t;const m=a[c],g=a[c+1],p=e.within(a[c],a[c+1],u),h=a[c+S];let v=h;for(const y of p){const E=y*f;a[E+L]>t&&(v+=a[E+S])}if(v>h&&v>=i){let y=m*h,E=g*h,w,M=-1;const C=((c/f|0)<<5)+(t+1)+this.points.length;for(const O of p){const _=O*f;if(a[_+L]<=t)continue;a[_+L]=t;const P=a[_+S];y+=a[_]*P,E+=a[_+1]*P,a[_+se]=C,o&&(w||(w=this._map(a,c,!0),M=this.clusterProps.length,this.clusterProps.push(w)),o(w,this._map(a,_)))}a[c+se]=C,d.push(y/v,E/v,1/0,C,-1,v),o&&d.push(M)}else{for(let y=0;y<f;y++)d.push(a[c+y]);if(v>1)for(const y of p){const E=y*f;if(!(a[E+L]<=t)){a[E+L]=t;for(let w=0;w<f;w++)d.push(a[E+w])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+S]>1){const i=this.clusterProps[e[t+Ne]];return r?Object.assign({},i):i}const s=this.points[e[t+q]].properties,o=this.options.map(s);return r&&o===s?Object.assign({},o):o}}function Ie(n,e,t){return{type:"Feature",id:n[e+q],properties:Ue(n,e,t),geometry:{type:"Point",coordinates:[rr(n[e]),nr(n[e+1])]}}}function Ue(n,e,t){const r=n[e+S],s=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=n[e+Ne],i=o===-1?{}:Object.assign({},t[o]);return Object.assign(i,{cluster:!0,cluster_id:n[e+q],point_count:r,point_count_abbreviated:s})}function H(n){return n/360+.5}function K(n){const e=Math.sin(n*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function rr(n){return(n-.5)*360}function nr(n){const e=(180-n*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function ue(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(n);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(n,r[s])&&(t[r[s]]=n[r[s]]);return t}class k{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class V{constructor({markers:e,position:t}){this.markers=[],e&&(this.markers=e),t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(k.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>k.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(k.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function b(n,e="assertion failed"){if(n==null)throw Error(e)}const sr=(n,e,t,r)=>{const s=n.getBounds();b(s);const o=Ze(s,e,r);return t.filter(i=>o.contains(k.getPosition(i)))},Ze=(n,e,t)=>{const{northEast:r,southWest:s}=ir(n,e),o=ar({northEast:r,southWest:s},t);return lr(o,e)},or=(n,e,t)=>{const r=Ze(n,e,t),s=r.getNorthEast(),o=r.getSouthWest();return[o.lng(),o.lat(),s.lng(),s.lat()]},ir=(n,e)=>{const t=e.fromLatLngToDivPixel(n.getNorthEast()),r=e.fromLatLngToDivPixel(n.getSouthWest());return b(t),b(r),{northEast:t,southWest:r}},ar=({northEast:n,southWest:e},t)=>(n.x+=t,n.y-=t,e.x-=t,e.y+=t,{northEast:n,southWest:e}),lr=({northEast:n,southWest:e},t)=>{const r=t.fromDivPixelToLatLng(e),s=t.fromDivPixelToLatLng(n);return new google.maps.LatLngBounds(r,s)};class Fe{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return cr(e)}}class ur extends Fe{constructor(e){var{viewportPadding:t=60}=e,r=ue(e,["viewportPadding"]);super(r),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:r}){const s=t.getZoom();return b(s),s>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:sr(t,r,e,this.viewportPadding),map:t,mapCanvasProjection:r})}}}const cr=n=>n.map(t=>new V({position:k.getPosition(t),markers:[t]}));class dr extends Fe{constructor(e){var{maxZoom:t,radius:r=60}=e,s=ue(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new De(Object.assign({maxZoom:this.maxZoom,radius:r},s))}calculate(e){let t=!1,r=e.map.getZoom();b(r),r=Math.round(r);const s={zoom:r};if(!J(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const o=this.markers.map(i=>{const u=k.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[u.lng(),u.lat()]},properties:{marker:i}}});this.superCluster.load(o)}return t||(this.state.zoom<=this.maxZoom||s.zoom<=this.maxZoom)&&(t=!J(this.state,s)),this.state=s,e.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:t}):(t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t})}cluster({map:e}){const t=e.getZoom();return b(t),this.superCluster.getClusters([-180,-90,180,90],Math.round(t)).map(r=>this.transformCluster(r))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new V({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const s=r.marker;return new V({markers:[s],position:k.getPosition(s)})}}class fr extends ur{constructor(e){var{maxZoom:t,radius:r=60,viewportPadding:s=60}=e,o=ue(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:s}),this.markers=[],this.clusters=[],this.superCluster=new De(Object.assign({maxZoom:this.maxZoom,radius:r},o)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t=this.getViewportState(e);let r=!J(this.state,t);if(!J(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const s=this.markers.map(o=>{const i=k.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:o}}});this.superCluster.load(s)}return r&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:r}}cluster(e){const t=this.getViewportState(e);return this.superCluster.getClusters(t.view,t.zoom).map(r=>this.transformCluster(r))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new V({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const s=r.marker;return new V({markers:[s],position:k.getPosition(s)})}getViewportState(e){const t=e.map.getZoom(),r=e.map.getBounds();return b(t),b(r),{zoom:Math.round(t),view:or(r,e.mapCanvasProjection,this.viewportPadding)}}}class pr{constructor(e,t){this.markers={sum:e.length};const r=t.map(o=>o.count),s=r.reduce((o,i)=>o+i,0);this.clusters={count:t.length,markers:{mean:s/t.length,sum:s,min:Math.min(...r),max:Math.max(...r)}}}}class hr{render({count:e,position:t},r,s){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">
|
|
29
3
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
30
4
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
31
5
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
32
6
|
<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>
|
|
33
|
-
</svg>`,
|
|
7
|
+
</svg>`,u=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(k.isAdvancedMarkerAvailable(s)){const c=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;c.setAttribute("transform","translate(0 25)");const m={map:s,position:t,zIndex:a,title:u,content:c};return new google.maps.marker.AdvancedMarkerElement(m)}const d={position:t,zIndex:a,title:u,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(d)}}function mr(n,e){for(let t in e.prototype)n.prototype[t]=e.prototype[t]}class ce{constructor(){mr(ce,google.maps.OverlayView)}}var A;(function(n){n.CLUSTERING_BEGIN="clusteringbegin",n.CLUSTERING_END="clusteringend",n.CLUSTER_CLICK="click",n.GMP_CLICK="gmp-click"})(A||(A={}));const gr=(n,e,t)=>{e.bounds&&t.fitBounds(e.bounds)};class vr extends ce{constructor({map:e,markers:t=[],algorithmOptions:r={},algorithm:s=new dr(r),renderer:o=new hr,onClusterClick:i=gr}){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)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(r=>{this.addMarker(r,!0)}),t||this.render()}removeMarker(e,t){const r=this.markers.indexOf(e);return r===-1?!1:(k.setMap(e,null),this.markers.splice(r,1),t||this.render(),!0)}removeMarkers(e,t){let r=!1;return e.forEach(s=>{r=this.removeMarker(s,!0)||r}),r&&!t&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,A.CLUSTERING_BEGIN,this);const{clusters:t,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const s=new Set;for(const i of t)i.markers.length==1&&s.add(i.markers[0]);const o=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?s.has(i.marker)||k.setMap(i.marker,null):o.push(i.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>o.forEach(i=>k.setMap(i,null)))}google.maps.event.trigger(this,A.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();b(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>k.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new pr(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(r=>{if(r.markers.length===1)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,e,t),r.markers.forEach(s=>k.setMap(s,null)),this.onClusterClick){const s=k.isAdvancedMarker(r.marker)?A.GMP_CLICK:A.CLUSTER_CLICK;r.marker.addListener(s,o=>{google.maps.event.trigger(this,A.CLUSTER_CLICK,r),this.onClusterClick(o,r,t)})}k.setMap(r.marker,t)})}}const je=Object.values(A),yr=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:je,setup(n,{emit:e,expose:t,slots:r}){const s=l.ref(),o=l.inject(I,l.ref()),i=l.inject(j,l.ref());return l.provide(ae,s),l.watch(o,()=>{o.value&&(s.value=l.markRaw(new vr({map:o.value,algorithm:new fr(n.options.algorithmOptions??{}),...n.options})),je.forEach(u=>{var a;(a=s.value)==null||a.addListener(u,d=>e(u,d))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var u;s.value&&((u=i.value)==null||u.event.clearInstanceListeners(s.value),s.value.clearMarkers(),s.value.setMap(null))}),t({markerCluster:s}),()=>{var u;return(u=r.default)==null?void 0:u.call(r)}}}),wr=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(n,{slots:e,emit:t,expose:r}){const s=l.ref(),o=l.computed(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(d=>d.type!==l.Comment)}),i=l.computed(()=>({...n.options,element:s.value})),u=N(Y,[],i,t);return r({customMarker:u}),{customMarkerRef:s,customMarker:u,hasSlotContent:o}}});const Er={key:0,class:"custom-marker-wrapper"};function kr(n,e,t,r,s,o){return n.hasSlotContent?(l.openBlock(),l.createElementBlock("div",Er,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:n.$attrs.onClick?"pointer":void 0}},n.$attrs),[l.renderSlot(n.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const _r=G(wr,[["render",kr],["__scopeId","data-v-2d2d343a"]]),Cr=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(n){const e=l.ref(),t=l.inject(I,l.ref()),r=l.inject(j,l.ref());return l.watch([t,()=>n.options],([s,o],[i,u])=>{const a=!F(o,u)||t.value!==i;if(t.value&&r.value&&a){let d;if(o.data&&!(o.data instanceof r.value.MVCArray)){const f=r.value.LatLng,c=o.data.map(m=>m instanceof f||"location"in m&&(m.location instanceof f||m.location===null)?m:"location"in m?{...m,location:new f(m.location)}:new f(m));d={...o,data:c}}else d=o;e.value?e.value.setOptions(d):e.value=l.markRaw(new r.value.visualization.HeatmapLayer({...d,map:t.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});exports.AdvancedMarker=at;exports.Circle=ft;exports.CustomControl=gt;exports.CustomMarker=_r;exports.GoogleMap=tt;exports.HeatmapLayer=Cr;exports.InfoWindow=Et;exports.Marker=lt;exports.MarkerCluster=yr;exports.Polygon=ct;exports.Polyline=ut;exports.Rectangle=dt;
|