vue3-google-map 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +112 -106
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ All the map components are available on the `Vue3GoogleMap` global variable.
|
|
|
58
58
|
|
|
59
59
|
### Your First Map
|
|
60
60
|
|
|
61
|
-
To construct a map using `vue3-google-map` you'll need to use the base `GoogleMap` component which receives your [Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key), styles (e.g. setting width and height), and any [MapOptions](https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions) to configure your map ([see this](https://github.com/inocan-group/vue3-google-map/blob/develop/src/components/GoogleMap.vue#
|
|
61
|
+
To construct a map using `vue3-google-map` you'll need to use the base `GoogleMap` component which receives your [Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key), styles (e.g. setting width and height), and any [MapOptions](https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions) to configure your map ([see this](https://github.com/inocan-group/vue3-google-map/blob/develop/src/components/GoogleMap.vue#L41-L245) for all the supported `MapOptions`).
|
|
62
62
|
Other map features can be added to your map by passing map subcomponents ([Marker](#marker), [Polyline](#polyline), [Polygon](#polygon), [Rectangle](#rectangle), [Circle](#circle), [InfoWindow](#info-window), [CustomMarker](#custom-marker), [CustomControl](#custom-control), or [MarkerCluster](#marker-cluster)) to the default slot of the `GoogleMap` component.
|
|
63
63
|
|
|
64
64
|
The [the following events](https://developers.google.com/maps/documentation/javascript/reference/map#Map-Events) will be emitted by the `GoogleMap` component and can be listened to by using `@event_name`.
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-
|
|
2
|
-
"use strict";var Ue=Object.defineProperty;var Ze=(r,e,t)=>e in r?Ue(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Q=(r,e,t)=>(Ze(r,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),T=Symbol("map"),L=Symbol("api"),se=Symbol("marker"),ae=Symbol("markerCluster"),Y=Symbol("CustomMarker"),ie=Symbol("mapTilesLoaded"),I=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function Ve(r,e){r.src=e}const Ge=r=>{var e,t,n,o="The Google Maps JavaScript API",s="google",i="importLibrary",u="__ib__",a=document,p=window,f=p[s]||(p[s]={}),c=f.maps||(f.maps={}),m=new Set,g=new URLSearchParams,h=()=>e||(e=new Promise(async(d,v)=>{var y;await(t=a.createElement("script")),g.set("libraries",[...m]+"");for(n in r)g.set(n.replace(/[A-Z]/g,w=>"_"+w[0].toLowerCase()),r[n]);g.set("callback",s+".maps."+u),Ve(t,"https://maps.googleapis.com/maps/api/js?"+g),c[u]=d,t.onerror=()=>e=v(Error(o+" could not load.")),t.nonce=((y=a.querySelector("script[nonce]"))==null?void 0:y.nonce)||"",a.head.append(t)}));c[i]?console.warn(o+" only loads once. Ignoring:",r):c[i]=(d,...v)=>m.add(d)&&h().then(()=>c[i](d,...v))},Fe=r=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(r)}) will be ignored.`,ze=r=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(r)}) will be ignored.`,We="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",He="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",le=process.env.NODE_ENV!=="production"?r=>{console.warn(`[@googlemaps/js-api-loader] ${r}`)}:()=>{},Ke=process.env.NODE_ENV!=="production"?r=>{console.info(`[@googlemaps/js-api-loader] ${r}`)}:()=>{};let ne=!1;function Ye(r){if(ne){le(Fe(r));return}Xe(r),ne=!0}async function Je(r){var e,t;if(ne||le(We),!((t=(e=window==null?void 0:window.google)==null?void 0:e.maps)!=null&&t.importLibrary))throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(r)}function Xe(r){var t,n;const e=!!((n=(t=window.google)==null?void 0:t.maps)!=null&&n.importLibrary);e?Ke(ze(r)):process.env.NODE_ENV!=="production"&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&le(He),e||Ge(r)}function Qe(r){return class extends r.OverlayView{constructor(n){super();Q(this,"element");Q(this,"opts");const{element:o,...s}=n;this.element=o,this.opts=s,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof r.LatLng?this.opts.position:new r.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const n=this.element;return n.style.display!=="none"&&n.style.visibility!=="hidden"&&(n.style.opacity===""||Number(n.style.opacity)>.01)}onAdd(){if(!this.element)return;const n=this.getPanes();n&&n.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const n=this.getProjection(),o=n==null?void 0:n.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let s,i;switch(this.opts.anchorPoint){case"TOP_CENTER":s="-50%",i="-100%";break;case"BOTTOM_CENTER":s="-50%",i="0";break;case"LEFT_CENTER":s="-100%",i="-50%";break;case"RIGHT_CENTER":s="0",i="-50%";break;case"TOP_LEFT":s="-100%",i="-100%";break;case"TOP_RIGHT":s="0",i="-100%";break;case"BOTTOM_LEFT":s="-100%",i="0";break;case"BOTTOM_RIGHT":s="0",i="0";break;default:s="-50%",i="-50%"}const u=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${s}) translateX(${u}) translateY(${i}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(n){const{element:o,...s}=n;this.element=o,this.opts=s,this.draw()}}}let de=!1;const fe=["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"],et=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}},emits:fe,setup(r,{emit:e}){const t=l.ref(),n=l.ref(!1),o=l.ref(),s=l.ref(),i=l.ref(!1);l.provide(T,o),l.provide(L,s),l.provide(ie,i);const u=()=>{const c={...r};Object.keys(c).forEach(d=>{c[d]===void 0&&delete c[d]});const g=d=>{var v;return d?{position:(v=s.value)==null?void 0:v.ControlPosition[d]}:{}},h={scaleControlOptions:r.scaleControlStyle?{style:r.scaleControlStyle}:{},panControlOptions:g(r.panControlPosition),zoomControlOptions:g(r.zoomControlPosition),rotateControlOptions:g(r.rotateControlPosition),streetViewControlOptions:g(r.streetViewControlPosition),fullscreenControlOptions:g(r.fullscreenControlPosition),cameraControlOptions:g(r.cameraControlPosition),disableDefaultUI:r.disableDefaultUi};return{...c,...h}},a=l.watch([s,o],([c,m])=>{const g=c,h=m;g&&h&&(g.event.addListenerOnce(h,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),p=()=>{const{apiKey:c,region:m,version:g,language:h,libraries:d}=r;Ye({key:c,region:m,v:g,language:h,libraries:d})},f=c=>{const m=c?c.maps:google.maps;s.value=l.markRaw(m),o.value=l.markRaw(new m.Map(t.value,u()));const g=Qe(s.value);s.value[Y]=g,fe.forEach(d=>{var v;(v=o.value)==null||v.addListener(d,y=>e(d,y))}),n.value=!0;const h=Object.keys(r).filter(d=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(d)).map(d=>l.toRef(r,d));l.watch([()=>r.center,()=>r.zoom,...h],([d,v],[y,w])=>{var k,S,N;const{center:_,zoom:P,...C}=u();(k=o.value)==null||k.setOptions(C),v!==void 0&&v!==w&&((S=o.value)==null||S.setZoom(v));const M=!y||d.lng!==y.lng||d.lat!==y.lat;d&&M&&((N=o.value)==null||N.panTo(d))})};return l.onMounted(()=>{if(r.apiPromise&&r.apiPromise instanceof Promise)r.apiPromise.then(f);else{de||(p(),de=!0);const c=r.libraries&&r.libraries.length>0?r.libraries:["maps","marker"];Promise.all(c.map(m=>Je(m))).then(()=>f())}}),l.onBeforeUnmount(()=>{var c;i.value=!1,o.value&&((c=s.value)==null||c.event.clearInstanceListeners(o.value))}),{mapRef:t,ready:n,map:o,api:s,mapTilesLoaded:i}}});const G=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},tt={ref:"mapRef",class:"mapdiv"};function rt(r,e,t,n,o,s){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",tt,null,512),l.renderSlot(r.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:r.ready,map:r.map,api:r.api,mapTilesLoaded:r.mapTilesLoaded})),void 0,!0)])}const nt=G(et,[["render",rt],["__scopeId","data-v-c63ff230"]]);function ot(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var st=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,o,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!r(e[o],t[o]))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(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t};const Z=ot(st),me=["click","drag","dragend","dragstart","gmp-click"],at=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:me,setup(r,{emit:e,expose:t,slots:n}){const o=l.ref(),s=l.computed(()=>{var g;return(g=n.content)==null?void 0:g.call(n).some(h=>h.type!==l.Comment)}),i=l.toRef(r,"options"),u=l.toRef(r,"pinOptions"),a=l.ref(),p=l.inject(T,l.ref()),f=l.inject(L,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([p,i,u,o],async(g,[h,d,v,y])=>{var k,S,N;const w=!Z(i.value,d)||!Z(u.value,v),_=o.value!==y,P=w||_||p.value!==h;if(!p.value||!f.value||!P||s.value&&!o.value)return;const{AdvancedMarkerElement:C,PinElement:M}=f.value.marker;if(a.value){const{map:J,content:F,...X}=i.value;Object.assign(a.value,{content:s.value?o.value:u.value?new M(u.value).element:F,...X}),m.value&&((k=c.value)==null||k.removeMarker(a.value),(S=c.value)==null||S.addMarker(a.value))}else s.value?i.value.content=o.value:u.value&&(i.value.content=new M(u.value).element),a.value=l.markRaw(new C(i.value)),m.value?(N=c.value)==null||N.addMarker(a.value):a.value.map=p.value,me.forEach(J=>{var F;(F=a.value)==null||F.addListener(J,X=>e(J,X))})},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var g,h;a.value&&((g=f.value)==null||g.event.clearInstanceListeners(a.value),m.value?(h=c.value)==null||h.removeMarker(a.value):a.value.map=null)}),l.provide(se,a),t({marker:a}),{hasCustomSlotContent:s,markerRef:o}}});const it={key:0,class:"advanced-marker-wrapper"};function lt(r,e,t,n,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[r.hasCustomSlotContent?(l.openBlock(),l.createElementBlock("div",it,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},r.$attrs),[l.renderSlot(r.$slots,"content")],16)])):l.createCommentVNode("",!0),l.renderSlot(r.$slots,"default")],64)}const ut=G(at,[["render",lt]]),he=r=>r==="Marker",ge=r=>r===Y,B=(r,e,t,n)=>{const o=l.ref(),s=l.inject(T,l.ref()),i=l.inject(L,l.ref()),u=l.inject(ae,l.ref()),a=l.computed(()=>!!(u.value&&i.value&&(o.value instanceof i.value.Marker||o.value instanceof i.value[Y])));return l.watch([s,t],(p,[f,c])=>{var g,h,d;const m=!Z(t.value,c)||s.value!==f;if(!(!s.value||!i.value||!m))if(o.value)o.value.setOptions(t.value),a.value&&((g=u.value)==null||g.removeMarker(o.value),(h=u.value)==null||h.addMarker(o.value));else{if(he(r))o.value=l.markRaw(new i.value[r](t.value));else if(ge(r)){const v=t.value;v.element&&(o.value=l.markRaw(new i.value[r](v)))}else o.value=l.markRaw(new i.value[r]({...t.value,map:s.value}));o.value&&(a.value?(d=u.value)==null||d.addMarker(o.value):(he(r)||ge(r))&&o.value.setMap(s.value)),e.forEach(v=>{var y;(y=o.value)==null||y.addListener(v,w=>n(v,w))})}},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var p,f;o.value&&((p=i.value)==null||p.event.clearInstanceListeners(o.value),a.value?(f=u.value)==null||f.removeMarker(o.value):o.value.setMap(null))}),o},ve=["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"],ct=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ve,setup(r,{emit:e,expose:t,slots:n}){const o=l.toRef(r,"options"),s=B("Marker",ve,o,e);return l.provide(se,s),t({marker:s}),()=>{var i;return(i=n.default)==null?void 0:i.call(n)}}}),pt=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:I,setup(r,{emit:e}){const t=l.toRef(r,"options");return{polyline:B("Polyline",I,t,e)}},render:()=>null}),dt=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:I,setup(r,{emit:e}){const t=l.toRef(r,"options");return{polygon:B("Polygon",I,t,e)}},render:()=>null}),ye=I.concat(["bounds_changed"]),ft=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:ye,setup(r,{emit:e}){const t=l.toRef(r,"options");return{rectangle:B("Rectangle",ye,t,e)}},render:()=>null}),we=I.concat(["center_changed","radius_changed"]),mt=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:we,setup(r,{emit:e}){const t=l.toRef(r,"options");return{circle:B("Circle",we,t,e)}},render:()=>null}),ht=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(r,{emit:e}){const t=l.ref(null),n=l.inject(T,l.ref()),o=l.inject(L,l.ref()),s=l.inject(ie,l.ref(!1)),i=l.watch([s,o,t],([p,f,c])=>{f&&p&&c&&(u(r.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),u=p=>{if(n.value&&o.value&&t.value){const f=o.value.ControlPosition[p];t.value.index=r.index,n.value.controls[f].push(t.value)}},a=p=>{if(n.value&&o.value){let f=null;const c=o.value.ControlPosition[p];n.value.controls[c].forEach((m,g)=>{m===t.value&&(f=g)}),f!==null&&n.value.controls[c].removeAt(f)}};return l.onBeforeUnmount(()=>a(r.position)),l.watch(()=>r.position,(p,f)=>{a(f),u(p)}),l.watch(()=>r.index,p=>{t.value&&(t.value.index=p)}),{controlRef:t}}});const gt={ref:"controlRef",class:"custom-control-wrapper"};function vt(r,e,t,n,o,s){return l.openBlock(),l.createElementBlock("div",gt,[l.renderSlot(r.$slots,"default",{},void 0,!0)],512)}const yt=G(ht,[["render",vt],["__scopeId","data-v-ab9120cd"]]),_e=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],wt=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[..._e,"update:modelValue"],setup(r,{slots:e,emit:t,expose:n}){const o=l.ref(),s=l.ref(),i=l.inject(T,l.ref()),u=l.inject(L,l.ref()),a=l.inject(se,l.ref());let p,f=r.modelValue;const c=l.computed(()=>{var d;return(d=e.default)==null?void 0:d.call(e).some(v=>v.type!==l.Comment)}),m=d=>{f=d,t("update:modelValue",d)},g=d=>{o.value&&(o.value.open({map:i.value,anchor:a.value,...d}),m(!0))},h=()=>{o.value&&(o.value.close(),m(!1))};return l.onMounted(()=>{l.watch([i,()=>r.options],([d,v],[y,w])=>{var P;const _=!Z(v,w)||i.value!==y;i.value&&u.value&&_&&(o.value?(o.value.setOptions({...v,content:c.value?s.value:v.content}),a.value||g()):(o.value=l.markRaw(new u.value.InfoWindow({...v,content:c.value?s.value:v.content})),a.value&&(p=a.value.addListener("click",()=>{g()})),(!a.value||f)&&g(),_e.forEach(C=>{var M;(M=o.value)==null||M.addListener(C,k=>t(C,k))}),(P=o.value)==null||P.addListener("closeclick",()=>m(!1))))},{immediate:!0,flush:"post"}),l.watch(()=>r.modelValue,d=>{d!==f&&(d?g():h())})}),l.onBeforeUnmount(()=>{var d;p&&p.remove(),o.value&&((d=u.value)==null||d.event.clearInstanceListeners(o.value),h())}),n({infoWindow:o,open:g,close:h}),{infoWindow:o,infoWindowRef:s,hasSlotContent:c,open:g,close:h}}});const _t={key:0,class:"info-window-wrapper"};function Et(r,e,t,n,o,s){return r.hasSlotContent?(l.openBlock(),l.createElementBlock("div",_t,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},r.$attrs),[l.renderSlot(r.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const kt=G(wt,[["render",Et],["__scopeId","data-v-135889a7"]]);var Ct=Object.getOwnPropertyNames,Mt=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty;function Ee(r,e){return function(n,o,s){return r(n,o,s)&&e(n,o,s)}}function z(r){return function(t,n,o){if(!t||!n||typeof t!="object"||typeof n!="object")return r(t,n,o);var s=o.cache,i=s.get(t),u=s.get(n);if(i&&u)return i===n&&u===t;s.set(t,n),s.set(n,t);var a=r(t,n,o);return s.delete(t),s.delete(n),a}}function ke(r){return Ct(r).concat(Mt(r))}var Pt=Object.hasOwn||function(r,e){return Ot.call(r,e)};function j(r,e){return r===e||!r&&!e&&r!==r&&e!==e}var St="__v",bt="__o",At="_owner",Ce=Object.getOwnPropertyDescriptor,Me=Object.keys;function qt(r,e,t){var n=r.length;if(e.length!==n)return!1;for(;n-- >0;)if(!t.equals(r[n],e[n],n,n,r,e,t))return!1;return!0}function Tt(r,e){return j(r.getTime(),e.getTime())}function Lt(r,e){return r.name===e.name&&r.message===e.message&&r.cause===e.cause&&r.stack===e.stack}function xt(r,e){return r===e}function Oe(r,e,t){var n=r.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=r.entries(),i,u,a=0;(i=s.next())&&!i.done;){for(var p=e.entries(),f=!1,c=0;(u=p.next())&&!u.done;){if(o[c]){c++;continue}var m=i.value,g=u.value;if(t.equals(m[0],g[0],a,c,r,e,t)&&t.equals(m[1],g[1],m[0],g[0],r,e,t)){f=o[c]=!0;break}c++}if(!f)return!1;a++}return!0}var Rt=j;function jt(r,e,t){var n=Me(r),o=n.length;if(Me(e).length!==o)return!1;for(;o-- >0;)if(!Re(r,e,t,n[o]))return!1;return!0}function $(r,e,t){var n=ke(r),o=n.length;if(ke(e).length!==o)return!1;for(var s,i,u;o-- >0;)if(s=n[o],!Re(r,e,t,s)||(i=Ce(r,s),u=Ce(e,s),(i||u)&&(!i||!u||i.configurable!==u.configurable||i.enumerable!==u.enumerable||i.writable!==u.writable)))return!1;return!0}function It(r,e){return j(r.valueOf(),e.valueOf())}function Bt(r,e){return r.source===e.source&&r.flags===e.flags}function Pe(r,e,t){var n=r.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=r.values(),i,u;(i=s.next())&&!i.done;){for(var a=e.values(),p=!1,f=0;(u=a.next())&&!u.done;){if(!o[f]&&t.equals(i.value,u.value,i.value,u.value,r,e,t)){p=o[f]=!0;break}f++}if(!p)return!1}return!0}function Nt(r,e){var t=r.length;if(e.length!==t)return!1;for(;t-- >0;)if(r[t]!==e[t])return!1;return!0}function $t(r,e){return r.hostname===e.hostname&&r.pathname===e.pathname&&r.protocol===e.protocol&&r.port===e.port&&r.hash===e.hash&&r.username===e.username&&r.password===e.password}function Re(r,e,t,n){return(n===At||n===bt||n===St)&&(r.$$typeof||e.$$typeof)?!0:Pt(e,n)&&t.equals(r[n],e[n],n,n,r,e,t)}var Dt="[object Arguments]",Ut="[object Boolean]",Zt="[object Date]",Vt="[object Error]",Gt="[object Map]",Ft="[object Number]",zt="[object Object]",Wt="[object RegExp]",Ht="[object Set]",Kt="[object String]",Yt="[object URL]",Jt=Array.isArray,Se=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,be=Object.assign,Xt=Object.prototype.toString.call.bind(Object.prototype.toString);function Qt(r){var e=r.areArraysEqual,t=r.areDatesEqual,n=r.areErrorsEqual,o=r.areFunctionsEqual,s=r.areMapsEqual,i=r.areNumbersEqual,u=r.areObjectsEqual,a=r.arePrimitiveWrappersEqual,p=r.areRegExpsEqual,f=r.areSetsEqual,c=r.areTypedArraysEqual,m=r.areUrlsEqual;return function(h,d,v){if(h===d)return!0;if(h==null||d==null)return!1;var y=typeof h;if(y!==typeof d)return!1;if(y!=="object")return y==="number"?i(h,d,v):y==="function"?o(h,d,v):!1;var w=h.constructor;if(w!==d.constructor)return!1;if(w===Object)return u(h,d,v);if(Jt(h))return e(h,d,v);if(Se!=null&&Se(h))return c(h,d,v);if(w===Date)return t(h,d,v);if(w===RegExp)return p(h,d,v);if(w===Map)return s(h,d,v);if(w===Set)return f(h,d,v);var _=Xt(h);return _===Zt?t(h,d,v):_===Wt?p(h,d,v):_===Gt?s(h,d,v):_===Ht?f(h,d,v):_===zt?typeof h.then!="function"&&typeof d.then!="function"&&u(h,d,v):_===Yt?m(h,d,v):_===Vt?n(h,d,v):_===Dt?u(h,d,v):_===Ut||_===Ft||_===Kt?a(h,d,v):!1}}function er(r){var e=r.circular,t=r.createCustomConfig,n=r.strict,o={areArraysEqual:n?$:qt,areDatesEqual:Tt,areErrorsEqual:Lt,areFunctionsEqual:xt,areMapsEqual:n?Ee(Oe,$):Oe,areNumbersEqual:Rt,areObjectsEqual:n?$:jt,arePrimitiveWrappersEqual:It,areRegExpsEqual:Bt,areSetsEqual:n?Ee(Pe,$):Pe,areTypedArraysEqual:n?$:Nt,areUrlsEqual:$t};if(t&&(o=be({},o,t(o))),e){var s=z(o.areArraysEqual),i=z(o.areMapsEqual),u=z(o.areObjectsEqual),a=z(o.areSetsEqual);o=be({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:u,areSetsEqual:a})}return o}function tr(r){return function(e,t,n,o,s,i,u){return r(e,t,u)}}function rr(r){var e=r.circular,t=r.comparator,n=r.createState,o=r.equals,s=r.strict;if(n)return function(a,p){var f=n(),c=f.cache,m=c===void 0?e?new WeakMap:void 0:c,g=f.meta;return t(a,p,{cache:m,equals:o,meta:g,strict:s})};if(e)return function(a,p){return t(a,p,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(a,p){return t(a,p,i)}}var K=x();x({strict:!0});x({circular:!0});x({circular:!0,strict:!0});x({createInternalComparator:function(){return j}});x({strict:!0,createInternalComparator:function(){return j}});x({circular:!0,createInternalComparator:function(){return j}});x({circular:!0,createInternalComparator:function(){return j},strict:!0});function x(r){r===void 0&&(r={});var e=r.circular,t=e===void 0?!1:e,n=r.createInternalComparator,o=r.createState,s=r.strict,i=s===void 0?!1:s,u=er(r),a=Qt(u),p=n?n(a):tr(a);return rr({circular:t,comparator:a,createState:o,equals:p,strict:i})}const Ae=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ee=1,D=8;class ue{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(o!==ee)throw new Error(`Got v${o} data when expected v${ee}.`);const s=Ae[n&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[u]=new Uint32Array(e,4,1);return new ue(u,i,s,e)}constructor(e,t=64,n=Float64Array,o){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=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=Ae.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,u=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-u%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+u+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(D+i+u+a),this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+u+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ee<<4)+s]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}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,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:u}=this,a=[0,s.length-1,0],p=[];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],w=i[2*v+1];y>=e&&y<=n&&w>=t&&w<=o&&p.push(s[v])}continue}const g=m+c>>1,h=i[2*g],d=i[2*g+1];h>=e&&h<=n&&d>=t&&d<=o&&p.push(s[g]),(f===0?e<=h:t<=d)&&(a.push(m),a.push(g-1),a.push(1-f)),(f===0?n>=h:o>=d)&&(a.push(g+1),a.push(c),a.push(1-f))}return p}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,u=[0,o.length-1,0],a=[],p=n*n;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++)qe(s[2*v],s[2*v+1],e,t)<=p&&a.push(o[v]);continue}const g=m+c>>1,h=s[2*g],d=s[2*g+1];qe(h,d,e,t)<=p&&a.push(o[g]),(f===0?e-n<=h:t-n<=d)&&(u.push(m),u.push(g-1),u.push(1-f)),(f===0?e+n>=h:t+n>=d)&&(u.push(g+1),u.push(c),u.push(1-f))}return a}}function oe(r,e,t,n,o,s){if(o-n<=t)return;const i=n+o>>1;je(r,e,i,n,o,s),oe(r,e,t,n,i-1,1-s),oe(r,e,t,i+1,o,1-s)}function je(r,e,t,n,o,s){for(;o>n;){if(o-n>600){const p=o-n+1,f=t-n+1,c=Math.log(p),m=.5*Math.exp(2*c/3),g=.5*Math.sqrt(c*m*(p-m)/p)*(f-p/2<0?-1:1),h=Math.max(n,Math.floor(t-f*m/p+g)),d=Math.min(o,Math.floor(t+(p-f)*m/p+g));je(r,e,t,h,d,s)}const i=e[2*t+s];let u=n,a=o;for(U(r,e,n,t),e[2*o+s]>i&&U(r,e,n,o);u<a;){for(U(r,e,u,a),u++,a--;e[2*u+s]<i;)u++;for(;e[2*a+s]>i;)a--}e[2*n+s]===i?U(r,e,n,a):(a++,U(r,e,a,o)),a<=t&&(n=a+1),t<=a&&(o=a-1)}}function U(r,e,t,n){te(r,t,n),te(e,2*t,2*n),te(e,2*t+1,2*n+1)}function te(r,e,t){const n=r[e];r[e]=r[t],r[t]=n}function qe(r,e,t,n){const o=r-t,s=e-n;return o*o+s*s}const nr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:r=>r},Te=Math.fround||(r=>e=>(r[0]=+e,r[0]))(new Float32Array(1)),R=2,A=3,re=4,b=5,Ie=6;class Be{constructor(e){this.options=Object.assign(Object.create(nr),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:o}=this.options;t&&console.time("total time");const s=`prepare ${e.length} points`;t&&console.time(s),this.points=e;const i=[];for(let a=0;a<e.length;a++){const p=e[a];if(!p.geometry)continue;const[f,c]=p.geometry.coordinates,m=Te(W(f)),g=Te(H(c));i.push(m,g,1/0,a,-1,1),this.options.reduce&&i.push(0)}let u=this.trees[o+1]=this._createTree(i);t&&console.timeEnd(s);for(let a=o;a>=n;a--){const p=+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()-p)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=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)n=-180,s=180;else if(n>s){const c=this.getClusters([n,o,180,i],t),m=this.getClusters([-180,o,s,i],t);return c.concat(m)}const u=this.trees[this._limitZoom(t)],a=u.range(W(n),H(i),W(s),H(o)),p=u.data,f=[];for(const c of a){const m=this.stride*c;f.push(p[m+b]>1?Le(p,m,this.clusterProps):this.points[p[m+A]])}return f}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(o);const i=s.data;if(t*this.stride>=i.length)throw new Error(o);const u=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[t*this.stride],p=i[t*this.stride+1],f=s.within(a,p,u),c=[];for(const m of f){const g=m*this.stride;i[g+re]===e&&c.push(i[g+b]>1?Le(i,g,this.clusterProps):this.points[i[g+A]])}if(c.length===0)throw new Error(o);return c}getLeaves(e,t,n){t=t||10,n=n||0;const o=[];return this._appendLeaves(o,e,t,n,0),o}getTile(e,t,n){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:i,radius:u}=this.options,a=u/i,p=(n-a)/s,f=(n+1+a)/s,c={features:[]};return this._addTileFeatures(o.range((t-a)/s,p,(t+1+a)/s,f),o.data,t,n,s,c),t===0&&this._addTileFeatures(o.range(1-a/s,p,1,f),o.data,s,n,s,c),t===s-1&&this._addTileFeatures(o.range(0,p,a/s,f),o.data,-1,n,s,c),c.features.length?c:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,n.length!==1)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,o,s){const i=this.getChildren(t);for(const u of i){const a=u.properties;if(a&&a.cluster?s+a.point_count<=o?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,n,o,s):s<o?s++:e.push(u),e.length===n)break}return s}_createTree(e){const t=new ue(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,o,s,i){for(const u of e){const a=u*this.stride,p=t[a+b]>1;let f,c,m;if(p)f=Ne(t,a,this.clusterProps),c=t[a],m=t[a+1];else{const d=this.points[t[a+A]];f=d.properties;const[v,y]=d.geometry.coordinates;c=W(v),m=H(y)}const g={type:1,geometry:[[Math.round(this.options.extent*(c*s-n)),Math.round(this.options.extent*(m*s-o))]],tags:f};let h;p||this.options.generateId?h=t[a+A]:h=this.points[t[a+A]].id,h!==void 0&&(g.id=h),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:n,extent:o,reduce:s,minPoints:i}=this.options,u=n/(o*Math.pow(2,t)),a=e.data,p=[],f=this.stride;for(let c=0;c<a.length;c+=f){if(a[c+R]<=t)continue;a[c+R]=t;const m=a[c],g=a[c+1],h=e.within(a[c],a[c+1],u),d=a[c+b];let v=d;for(const y of h){const w=y*f;a[w+R]>t&&(v+=a[w+b])}if(v>d&&v>=i){let y=m*d,w=g*d,_,P=-1;const C=((c/f|0)<<5)+(t+1)+this.points.length;for(const M of h){const k=M*f;if(a[k+R]<=t)continue;a[k+R]=t;const S=a[k+b];y+=a[k]*S,w+=a[k+1]*S,a[k+re]=C,s&&(_||(_=this._map(a,c,!0),P=this.clusterProps.length,this.clusterProps.push(_)),s(_,this._map(a,k)))}a[c+re]=C,p.push(y/v,w/v,1/0,C,-1,v),s&&p.push(P)}else{for(let y=0;y<f;y++)p.push(a[c+y]);if(v>1)for(const y of h){const w=y*f;if(!(a[w+R]<=t)){a[w+R]=t;for(let _=0;_<f;_++)p.push(a[w+_])}}}}return p}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+b]>1){const i=this.clusterProps[e[t+Ie]];return n?Object.assign({},i):i}const o=this.points[e[t+A]].properties,s=this.options.map(o);return n&&s===o?Object.assign({},s):s}}function Le(r,e,t){return{type:"Feature",id:r[e+A],properties:Ne(r,e,t),geometry:{type:"Point",coordinates:[or(r[e]),sr(r[e+1])]}}}function Ne(r,e,t){const n=r[e+b],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,s=r[e+Ie],i=s===-1?{}:Object.assign({},t[s]);return Object.assign(i,{cluster:!0,cluster_id:r[e+A],point_count:n,point_count_abbreviated:o})}function W(r){return r/360+.5}function H(r){const e=Math.sin(r*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function or(r){return(r-.5)*360}function sr(r){const e=(180-r*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function ce(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]]);return t}class E{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(E.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>E.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(E.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function O(r,e="assertion failed"){if(r==null)throw Error(e)}const ar=(r,e,t,n)=>{const o=r.getBounds();O(o);const s=$e(o,e,n);return t.filter(i=>s.contains(E.getPosition(i)))},$e=(r,e,t)=>{const{northEast:n,southWest:o}=lr(r,e),s=ur({northEast:n,southWest:o},t);return cr(s,e)},ir=(r,e,t)=>{const n=$e(r,e,t),o=n.getNorthEast(),s=n.getSouthWest();return[s.lng(),s.lat(),o.lng(),o.lat()]},lr=(r,e)=>{const t=e.fromLatLngToDivPixel(r.getNorthEast()),n=e.fromLatLngToDivPixel(r.getSouthWest());return O(t),O(n),{northEast:t,southWest:n}},ur=({northEast:r,southWest:e},t)=>(r.x+=t,r.y-=t,e.x-=t,e.y+=t,{northEast:r,southWest:e}),cr=({northEast:r,southWest:e},t)=>{const n=t.fromDivPixelToLatLng(e),o=t.fromDivPixelToLatLng(r);return new google.maps.LatLngBounds(n,o)};class De{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return dr(e)}}class pr extends De{constructor(e){var{viewportPadding:t=60}=e,n=ce(e,["viewportPadding"]);super(n),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:n}){const o=t.getZoom();return O(o),o>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:ar(t,n,e,this.viewportPadding),map:t,mapCanvasProjection:n})}}}const dr=r=>r.map(t=>new V({position:E.getPosition(t),markers:[t]}));class fr extends De{constructor(e){var{maxZoom:t,radius:n=60}=e,o=ce(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Be(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let t=!1,n=e.map.getZoom();O(n),n=Math.round(n);const o={zoom:n};if(!K(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const s=this.markers.map(i=>{const u=E.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[u.lng(),u.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return t||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(t=!K(this.state,o)),this.state=o,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 O(t),this.superCluster.getClusters([-180,-90,180,90],Math.round(t)).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new V({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});const o=n.marker;return new V({markers:[o],position:E.getPosition(o)})}}class mr extends pr{constructor(e){var{maxZoom:t,radius:n=60,viewportPadding:o=60}=e,s=ce(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:o}),this.markers=[],this.clusters=[],this.superCluster=new Be(Object.assign({maxZoom:this.maxZoom,radius:n},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t=this.getViewportState(e);let n=!K(this.state,t);if(!K(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const o=this.markers.map(s=>{const i=E.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:s}}});this.superCluster.load(o)}return n&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:n}}cluster(e){const t=this.getViewportState(e);return this.superCluster.getClusters(t.view,t.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new V({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});const o=n.marker;return new V({markers:[o],position:E.getPosition(o)})}getViewportState(e){const t=e.map.getZoom(),n=e.map.getBounds();return O(t),O(n),{zoom:Math.round(t),view:ir(n,e.mapCanvasProjection,this.viewportPadding)}}}class hr{constructor(e,t){this.markers={sum:e.length};const n=t.map(s=>s.count),o=n.reduce((s,i)=>s+i,0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class gr{render({count:e,position:t},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-d182c1f9]{display:none}.mapdiv .info-window-wrapper[data-v-d182c1f9]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
|
|
2
|
+
"use strict";var Ue=Object.defineProperty;var Ze=(r,e,t)=>e in r?Ue(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Q=(r,e,t)=>(Ze(r,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),T=Symbol("map"),L=Symbol("api"),se=Symbol("marker"),ae=Symbol("markerCluster"),Y=Symbol("CustomMarker"),ie=Symbol("mapTilesLoaded"),I=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function Ve(r,e){r.src=e}const Ge=r=>{var e,t,n,o="The Google Maps JavaScript API",s="google",i="importLibrary",u="__ib__",a=document,d=window,f=d[s]||(d[s]={}),c=f.maps||(f.maps={}),m=new Set,h=new URLSearchParams,g=()=>e||(e=new Promise(async(p,v)=>{var y;await(t=a.createElement("script")),h.set("libraries",[...m]+"");for(n in r)h.set(n.replace(/[A-Z]/g,w=>"_"+w[0].toLowerCase()),r[n]);h.set("callback",s+".maps."+u),Ve(t,"https://maps.googleapis.com/maps/api/js?"+h),c[u]=p,t.onerror=()=>e=v(Error(o+" could not load.")),t.nonce=((y=a.querySelector("script[nonce]"))==null?void 0:y.nonce)||"",a.head.append(t)}));c[i]?console.warn(o+" only loads once. Ignoring:",r):c[i]=(p,...v)=>m.add(p)&&g().then(()=>c[i](p,...v))},Fe=r=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(r)}) will be ignored.`,ze=r=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(r)}) will be ignored.`,We="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",He="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",le=process.env.NODE_ENV!=="production"?r=>{console.warn(`[@googlemaps/js-api-loader] ${r}`)}:()=>{},Ke=process.env.NODE_ENV!=="production"?r=>{console.info(`[@googlemaps/js-api-loader] ${r}`)}:()=>{};let ne=!1;function Ye(r){if(ne){le(Fe(r));return}Xe(r),ne=!0}async function Je(r){var e,t;if(ne||le(We),!((t=(e=window==null?void 0:window.google)==null?void 0:e.maps)!=null&&t.importLibrary))throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(r)}function Xe(r){var t,n;const e=!!((n=(t=window.google)==null?void 0:t.maps)!=null&&n.importLibrary);e?Ke(ze(r)):process.env.NODE_ENV!=="production"&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&le(He),e||Ge(r)}function Qe(r){return class extends r.OverlayView{constructor(n){super();Q(this,"element");Q(this,"opts");const{element:o,...s}=n;this.element=o,this.opts=s,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof r.LatLng?this.opts.position:new r.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const n=this.element;return n.style.display!=="none"&&n.style.visibility!=="hidden"&&(n.style.opacity===""||Number(n.style.opacity)>.01)}onAdd(){if(!this.element)return;const n=this.getPanes();n&&n.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const n=this.getProjection(),o=n==null?void 0:n.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let s,i;switch(this.opts.anchorPoint){case"TOP_CENTER":s="-50%",i="-100%";break;case"BOTTOM_CENTER":s="-50%",i="0";break;case"LEFT_CENTER":s="-100%",i="-50%";break;case"RIGHT_CENTER":s="0",i="-50%";break;case"TOP_LEFT":s="-100%",i="-100%";break;case"TOP_RIGHT":s="0",i="-100%";break;case"BOTTOM_LEFT":s="-100%",i="0";break;case"BOTTOM_RIGHT":s="0",i="0";break;default:s="-50%",i="-50%"}const u=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${s}) translateX(${u}) translateY(${i}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(n){const{element:o,...s}=n;this.element=o,this.opts=s,this.draw()}}}let pe=!1;const fe=["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"],et=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}},emits:fe,setup(r,{emit:e}){const t=l.ref(),n=l.ref(!1),o=l.ref(),s=l.ref(),i=l.ref(!1);l.provide(T,o),l.provide(L,s),l.provide(ie,i);const u=()=>{const c={...r};Object.keys(c).forEach(p=>{c[p]===void 0&&delete c[p]});const h=p=>{var v;return p?{position:(v=s.value)==null?void 0:v.ControlPosition[p]}:{}},g={scaleControlOptions:r.scaleControlStyle?{style:r.scaleControlStyle}:{},panControlOptions:h(r.panControlPosition),zoomControlOptions:h(r.zoomControlPosition),rotateControlOptions:h(r.rotateControlPosition),streetViewControlOptions:h(r.streetViewControlPosition),fullscreenControlOptions:h(r.fullscreenControlPosition),cameraControlOptions:h(r.cameraControlPosition),disableDefaultUI:r.disableDefaultUi};return{...c,...g}},a=l.watch([s,o],([c,m])=>{const h=c,g=m;h&&g&&(h.event.addListenerOnce(g,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),d=()=>{const{apiKey:c,region:m,version:h,language:g,libraries:p}=r;Ye({key:c,region:m,v:h,language:g,libraries:p})},f=c=>{const m=c?c.maps:google.maps;s.value=l.markRaw(m),o.value=l.markRaw(new m.Map(t.value,u()));const h=Qe(s.value);s.value[Y]=h,fe.forEach(p=>{var v;(v=o.value)==null||v.addListener(p,y=>e(p,y))}),n.value=!0;const g=Object.keys(r).filter(p=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(p)).map(p=>l.toRef(r,p));l.watch([()=>r.center,()=>r.zoom,...g],([p,v],[y,w])=>{var k,S,N;const{center:_,zoom:P,...C}=u();(k=o.value)==null||k.setOptions(C),v!==void 0&&v!==w&&((S=o.value)==null||S.setZoom(v));const M=!y||p.lng!==y.lng||p.lat!==y.lat;p&&M&&((N=o.value)==null||N.panTo(p))})};return l.onMounted(()=>{if(r.apiPromise&&r.apiPromise instanceof Promise)r.apiPromise.then(f);else{pe||(d(),pe=!0);const c=r.libraries&&r.libraries.length>0?r.libraries:["maps","marker"];Promise.all(c.map(m=>Je(m))).then(()=>f())}}),l.onBeforeUnmount(()=>{var c;i.value=!1,o.value&&((c=s.value)==null||c.event.clearInstanceListeners(o.value))}),{mapRef:t,ready:n,map:o,api:s,mapTilesLoaded:i}}});const G=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},tt={ref:"mapRef",class:"mapdiv"};function rt(r,e,t,n,o,s){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",tt,null,512),l.renderSlot(r.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:r.ready,map:r.map,api:r.api,mapTilesLoaded:r.mapTilesLoaded})),void 0,!0)])}const nt=G(et,[["render",rt],["__scopeId","data-v-c63ff230"]]);function ot(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var st=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,o,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!r(e[o],t[o]))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(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t};const Z=ot(st),me=["click","drag","dragend","dragstart","gmp-click"],at=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:me,setup(r,{emit:e,expose:t,slots:n}){const o=l.ref(),s=l.computed(()=>{var h;return(h=n.content)==null?void 0:h.call(n).some(g=>g.type!==l.Comment)}),i=l.toRef(r,"options"),u=l.toRef(r,"pinOptions"),a=l.ref(),d=l.inject(T,l.ref()),f=l.inject(L,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,o],async(h,[g,p,v,y])=>{var k,S,N;const w=!Z(i.value,p)||!Z(u.value,v),_=o.value!==y,P=w||_||d.value!==g;if(!d.value||!f.value||!P||s.value&&!o.value)return;const{AdvancedMarkerElement:C,PinElement:M}=f.value.marker;if(a.value){const{map:J,content:F,...X}=i.value;Object.assign(a.value,{content:s.value?o.value:u.value?new M(u.value).element:F,...X}),m.value&&((k=c.value)==null||k.removeMarker(a.value),(S=c.value)==null||S.addMarker(a.value))}else s.value?i.value.content=o.value:u.value&&(i.value.content=new M(u.value).element),a.value=l.markRaw(new C(i.value)),m.value?(N=c.value)==null||N.addMarker(a.value):a.value.map=d.value,me.forEach(J=>{var F;(F=a.value)==null||F.addListener(J,X=>e(J,X))})},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var h,g;a.value&&((h=f.value)==null||h.event.clearInstanceListeners(a.value),m.value?(g=c.value)==null||g.removeMarker(a.value):a.value.map=null)}),l.provide(se,a),t({marker:a}),{hasCustomSlotContent:s,markerRef:o}}});const it={key:0,class:"advanced-marker-wrapper"};function lt(r,e,t,n,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[r.hasCustomSlotContent?(l.openBlock(),l.createElementBlock("div",it,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},r.$attrs),[l.renderSlot(r.$slots,"content")],16)])):l.createCommentVNode("",!0),l.renderSlot(r.$slots,"default")],64)}const ut=G(at,[["render",lt]]),he=r=>r==="Marker",ge=r=>r===Y,B=(r,e,t,n)=>{const o=l.ref(),s=l.inject(T,l.ref()),i=l.inject(L,l.ref()),u=l.inject(ae,l.ref()),a=l.computed(()=>!!(u.value&&i.value&&(o.value instanceof i.value.Marker||o.value instanceof i.value[Y])));return l.watch([s,t],(d,[f,c])=>{var h,g,p;const m=!Z(t.value,c)||s.value!==f;if(!(!s.value||!i.value||!m))if(o.value)o.value.setOptions(t.value),a.value&&((h=u.value)==null||h.removeMarker(o.value),(g=u.value)==null||g.addMarker(o.value));else{if(he(r))o.value=l.markRaw(new i.value[r](t.value));else if(ge(r)){const v=t.value;v.element&&(o.value=l.markRaw(new i.value[r](v)))}else o.value=l.markRaw(new i.value[r]({...t.value,map:s.value}));o.value&&(a.value?(p=u.value)==null||p.addMarker(o.value):(he(r)||ge(r))&&o.value.setMap(s.value)),e.forEach(v=>{var y;(y=o.value)==null||y.addListener(v,w=>n(v,w))})}},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var d,f;o.value&&((d=i.value)==null||d.event.clearInstanceListeners(o.value),a.value?(f=u.value)==null||f.removeMarker(o.value):o.value.setMap(null))}),o},ve=["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"],ct=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ve,setup(r,{emit:e,expose:t,slots:n}){const o=l.toRef(r,"options"),s=B("Marker",ve,o,e);return l.provide(se,s),t({marker:s}),()=>{var i;return(i=n.default)==null?void 0:i.call(n)}}}),dt=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:I,setup(r,{emit:e}){const t=l.toRef(r,"options");return{polyline:B("Polyline",I,t,e)}},render:()=>null}),pt=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:I,setup(r,{emit:e}){const t=l.toRef(r,"options");return{polygon:B("Polygon",I,t,e)}},render:()=>null}),ye=I.concat(["bounds_changed"]),ft=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:ye,setup(r,{emit:e}){const t=l.toRef(r,"options");return{rectangle:B("Rectangle",ye,t,e)}},render:()=>null}),we=I.concat(["center_changed","radius_changed"]),mt=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:we,setup(r,{emit:e}){const t=l.toRef(r,"options");return{circle:B("Circle",we,t,e)}},render:()=>null}),ht=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(r,{emit:e}){const t=l.ref(null),n=l.inject(T,l.ref()),o=l.inject(L,l.ref()),s=l.inject(ie,l.ref(!1)),i=l.watch([s,o,t],([d,f,c])=>{f&&d&&c&&(u(r.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),u=d=>{if(n.value&&o.value&&t.value){const f=o.value.ControlPosition[d];t.value.index=r.index,n.value.controls[f].push(t.value)}},a=d=>{if(n.value&&o.value){let f=null;const c=o.value.ControlPosition[d];n.value.controls[c].forEach((m,h)=>{m===t.value&&(f=h)}),f!==null&&n.value.controls[c].removeAt(f)}};return l.onBeforeUnmount(()=>a(r.position)),l.watch(()=>r.position,(d,f)=>{a(f),u(d)}),l.watch(()=>r.index,d=>{t.value&&(t.value.index=d)}),{controlRef:t}}});const gt={ref:"controlRef",class:"custom-control-wrapper"};function vt(r,e,t,n,o,s){return l.openBlock(),l.createElementBlock("div",gt,[l.renderSlot(r.$slots,"default",{},void 0,!0)],512)}const yt=G(ht,[["render",vt],["__scopeId","data-v-ab9120cd"]]),_e=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],wt=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[..._e,"update:modelValue"],setup(r,{slots:e,emit:t,expose:n}){const o=l.ref(),s=l.ref(),i=l.inject(T,l.ref()),u=l.inject(L,l.ref()),a=l.inject(se,l.ref());let d,f=r.modelValue;const c=l.computed(()=>{var p;return(p=e.default)==null?void 0:p.call(e).some(v=>v.type!==l.Comment)}),m=p=>{f=p,t("update:modelValue",p)},h=p=>{o.value&&(o.value.open({map:i.value,anchor:a.value,...p}),m(!0))},g=()=>{o.value&&(o.value.close(),m(!1))};return l.onMounted(()=>{l.watch([i,()=>r.options],([p,v],[y,w])=>{var P;const _=!Z(v,w)||i.value!==y;i.value&&u.value&&_&&(o.value?(o.value.setOptions({...v,content:c.value?s.value:v.content}),a.value||h()):(o.value=l.markRaw(new u.value.InfoWindow({...v,content:c.value?s.value:v.content})),a.value&&(d=a.value.addListener("click",()=>h())),(!a.value||f)&&h(),_e.forEach(C=>{var M;(M=o.value)==null||M.addListener(C,k=>t(C,k))}),(P=o.value)==null||P.addListener("closeclick",()=>m(!1))))},{immediate:!0,flush:"post"}),l.watch(a,(p,v)=>{!o.value||p===v||(d&&(d.remove(),d=void 0),p&&(d=p.addListener("click",()=>h())))},{flush:"post"}),l.watch(()=>r.modelValue,p=>{p!==f&&(p?h():g())})}),l.onBeforeUnmount(()=>{var p;d&&d.remove(),o.value&&((p=u.value)==null||p.event.clearInstanceListeners(o.value),g())}),n({infoWindow:o,open:h,close:g}),{infoWindow:o,infoWindowRef:s,hasSlotContent:c,open:h,close:g}}});const _t={key:0,class:"info-window-wrapper"};function Et(r,e,t,n,o,s){return r.hasSlotContent?(l.openBlock(),l.createElementBlock("div",_t,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},r.$attrs),[l.renderSlot(r.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const kt=G(wt,[["render",Et],["__scopeId","data-v-d182c1f9"]]);var Ct=Object.getOwnPropertyNames,Mt=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty;function Ee(r,e){return function(n,o,s){return r(n,o,s)&&e(n,o,s)}}function z(r){return function(t,n,o){if(!t||!n||typeof t!="object"||typeof n!="object")return r(t,n,o);var s=o.cache,i=s.get(t),u=s.get(n);if(i&&u)return i===n&&u===t;s.set(t,n),s.set(n,t);var a=r(t,n,o);return s.delete(t),s.delete(n),a}}function ke(r){return Ct(r).concat(Mt(r))}var Pt=Object.hasOwn||function(r,e){return Ot.call(r,e)};function j(r,e){return r===e||!r&&!e&&r!==r&&e!==e}var St="__v",bt="__o",At="_owner",Ce=Object.getOwnPropertyDescriptor,Me=Object.keys;function qt(r,e,t){var n=r.length;if(e.length!==n)return!1;for(;n-- >0;)if(!t.equals(r[n],e[n],n,n,r,e,t))return!1;return!0}function Tt(r,e){return j(r.getTime(),e.getTime())}function Lt(r,e){return r.name===e.name&&r.message===e.message&&r.cause===e.cause&&r.stack===e.stack}function xt(r,e){return r===e}function Oe(r,e,t){var n=r.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=r.entries(),i,u,a=0;(i=s.next())&&!i.done;){for(var d=e.entries(),f=!1,c=0;(u=d.next())&&!u.done;){if(o[c]){c++;continue}var m=i.value,h=u.value;if(t.equals(m[0],h[0],a,c,r,e,t)&&t.equals(m[1],h[1],m[0],h[0],r,e,t)){f=o[c]=!0;break}c++}if(!f)return!1;a++}return!0}var Rt=j;function jt(r,e,t){var n=Me(r),o=n.length;if(Me(e).length!==o)return!1;for(;o-- >0;)if(!Re(r,e,t,n[o]))return!1;return!0}function $(r,e,t){var n=ke(r),o=n.length;if(ke(e).length!==o)return!1;for(var s,i,u;o-- >0;)if(s=n[o],!Re(r,e,t,s)||(i=Ce(r,s),u=Ce(e,s),(i||u)&&(!i||!u||i.configurable!==u.configurable||i.enumerable!==u.enumerable||i.writable!==u.writable)))return!1;return!0}function It(r,e){return j(r.valueOf(),e.valueOf())}function Bt(r,e){return r.source===e.source&&r.flags===e.flags}function Pe(r,e,t){var n=r.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=r.values(),i,u;(i=s.next())&&!i.done;){for(var a=e.values(),d=!1,f=0;(u=a.next())&&!u.done;){if(!o[f]&&t.equals(i.value,u.value,i.value,u.value,r,e,t)){d=o[f]=!0;break}f++}if(!d)return!1}return!0}function Nt(r,e){var t=r.length;if(e.length!==t)return!1;for(;t-- >0;)if(r[t]!==e[t])return!1;return!0}function $t(r,e){return r.hostname===e.hostname&&r.pathname===e.pathname&&r.protocol===e.protocol&&r.port===e.port&&r.hash===e.hash&&r.username===e.username&&r.password===e.password}function Re(r,e,t,n){return(n===At||n===bt||n===St)&&(r.$$typeof||e.$$typeof)?!0:Pt(e,n)&&t.equals(r[n],e[n],n,n,r,e,t)}var Dt="[object Arguments]",Ut="[object Boolean]",Zt="[object Date]",Vt="[object Error]",Gt="[object Map]",Ft="[object Number]",zt="[object Object]",Wt="[object RegExp]",Ht="[object Set]",Kt="[object String]",Yt="[object URL]",Jt=Array.isArray,Se=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,be=Object.assign,Xt=Object.prototype.toString.call.bind(Object.prototype.toString);function Qt(r){var e=r.areArraysEqual,t=r.areDatesEqual,n=r.areErrorsEqual,o=r.areFunctionsEqual,s=r.areMapsEqual,i=r.areNumbersEqual,u=r.areObjectsEqual,a=r.arePrimitiveWrappersEqual,d=r.areRegExpsEqual,f=r.areSetsEqual,c=r.areTypedArraysEqual,m=r.areUrlsEqual;return function(g,p,v){if(g===p)return!0;if(g==null||p==null)return!1;var y=typeof g;if(y!==typeof p)return!1;if(y!=="object")return y==="number"?i(g,p,v):y==="function"?o(g,p,v):!1;var w=g.constructor;if(w!==p.constructor)return!1;if(w===Object)return u(g,p,v);if(Jt(g))return e(g,p,v);if(Se!=null&&Se(g))return c(g,p,v);if(w===Date)return t(g,p,v);if(w===RegExp)return d(g,p,v);if(w===Map)return s(g,p,v);if(w===Set)return f(g,p,v);var _=Xt(g);return _===Zt?t(g,p,v):_===Wt?d(g,p,v):_===Gt?s(g,p,v):_===Ht?f(g,p,v):_===zt?typeof g.then!="function"&&typeof p.then!="function"&&u(g,p,v):_===Yt?m(g,p,v):_===Vt?n(g,p,v):_===Dt?u(g,p,v):_===Ut||_===Ft||_===Kt?a(g,p,v):!1}}function er(r){var e=r.circular,t=r.createCustomConfig,n=r.strict,o={areArraysEqual:n?$:qt,areDatesEqual:Tt,areErrorsEqual:Lt,areFunctionsEqual:xt,areMapsEqual:n?Ee(Oe,$):Oe,areNumbersEqual:Rt,areObjectsEqual:n?$:jt,arePrimitiveWrappersEqual:It,areRegExpsEqual:Bt,areSetsEqual:n?Ee(Pe,$):Pe,areTypedArraysEqual:n?$:Nt,areUrlsEqual:$t};if(t&&(o=be({},o,t(o))),e){var s=z(o.areArraysEqual),i=z(o.areMapsEqual),u=z(o.areObjectsEqual),a=z(o.areSetsEqual);o=be({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:u,areSetsEqual:a})}return o}function tr(r){return function(e,t,n,o,s,i,u){return r(e,t,u)}}function rr(r){var e=r.circular,t=r.comparator,n=r.createState,o=r.equals,s=r.strict;if(n)return function(a,d){var f=n(),c=f.cache,m=c===void 0?e?new WeakMap:void 0:c,h=f.meta;return t(a,d,{cache:m,equals:o,meta:h,strict:s})};if(e)return function(a,d){return t(a,d,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(a,d){return t(a,d,i)}}var K=x();x({strict:!0});x({circular:!0});x({circular:!0,strict:!0});x({createInternalComparator:function(){return j}});x({strict:!0,createInternalComparator:function(){return j}});x({circular:!0,createInternalComparator:function(){return j}});x({circular:!0,createInternalComparator:function(){return j},strict:!0});function x(r){r===void 0&&(r={});var e=r.circular,t=e===void 0?!1:e,n=r.createInternalComparator,o=r.createState,s=r.strict,i=s===void 0?!1:s,u=er(r),a=Qt(u),d=n?n(a):tr(a);return rr({circular:t,comparator:a,createState:o,equals:d,strict:i})}const Ae=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ee=1,D=8;class ue{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(o!==ee)throw new Error(`Got v${o} data when expected v${ee}.`);const s=Ae[n&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[u]=new Uint32Array(e,4,1);return new ue(u,i,s,e)}constructor(e,t=64,n=Float64Array,o){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=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=Ae.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,u=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-u%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+u+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(D+i+u+a),this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+u+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ee<<4)+s]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}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,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:u}=this,a=[0,s.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],w=i[2*v+1];y>=e&&y<=n&&w>=t&&w<=o&&d.push(s[v])}continue}const h=m+c>>1,g=i[2*h],p=i[2*h+1];g>=e&&g<=n&&p>=t&&p<=o&&d.push(s[h]),(f===0?e<=g:t<=p)&&(a.push(m),a.push(h-1),a.push(1-f)),(f===0?n>=g:o>=p)&&(a.push(h+1),a.push(c),a.push(1-f))}return d}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,u=[0,o.length-1,0],a=[],d=n*n;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++)qe(s[2*v],s[2*v+1],e,t)<=d&&a.push(o[v]);continue}const h=m+c>>1,g=s[2*h],p=s[2*h+1];qe(g,p,e,t)<=d&&a.push(o[h]),(f===0?e-n<=g:t-n<=p)&&(u.push(m),u.push(h-1),u.push(1-f)),(f===0?e+n>=g:t+n>=p)&&(u.push(h+1),u.push(c),u.push(1-f))}return a}}function oe(r,e,t,n,o,s){if(o-n<=t)return;const i=n+o>>1;je(r,e,i,n,o,s),oe(r,e,t,n,i-1,1-s),oe(r,e,t,i+1,o,1-s)}function je(r,e,t,n,o,s){for(;o>n;){if(o-n>600){const d=o-n+1,f=t-n+1,c=Math.log(d),m=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*m*(d-m)/d)*(f-d/2<0?-1:1),g=Math.max(n,Math.floor(t-f*m/d+h)),p=Math.min(o,Math.floor(t+(d-f)*m/d+h));je(r,e,t,g,p,s)}const i=e[2*t+s];let u=n,a=o;for(U(r,e,n,t),e[2*o+s]>i&&U(r,e,n,o);u<a;){for(U(r,e,u,a),u++,a--;e[2*u+s]<i;)u++;for(;e[2*a+s]>i;)a--}e[2*n+s]===i?U(r,e,n,a):(a++,U(r,e,a,o)),a<=t&&(n=a+1),t<=a&&(o=a-1)}}function U(r,e,t,n){te(r,t,n),te(e,2*t,2*n),te(e,2*t+1,2*n+1)}function te(r,e,t){const n=r[e];r[e]=r[t],r[t]=n}function qe(r,e,t,n){const o=r-t,s=e-n;return o*o+s*s}const nr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:r=>r},Te=Math.fround||(r=>e=>(r[0]=+e,r[0]))(new Float32Array(1)),R=2,A=3,re=4,b=5,Ie=6;class Be{constructor(e){this.options=Object.assign(Object.create(nr),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:o}=this.options;t&&console.time("total time");const s=`prepare ${e.length} points`;t&&console.time(s),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=Te(W(f)),h=Te(H(c));i.push(m,h,1/0,a,-1,1),this.options.reduce&&i.push(0)}let u=this.trees[o+1]=this._createTree(i);t&&console.timeEnd(s);for(let a=o;a>=n;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 n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=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)n=-180,s=180;else if(n>s){const c=this.getClusters([n,o,180,i],t),m=this.getClusters([-180,o,s,i],t);return c.concat(m)}const u=this.trees[this._limitZoom(t)],a=u.range(W(n),H(i),W(s),H(o)),d=u.data,f=[];for(const c of a){const m=this.stride*c;f.push(d[m+b]>1?Le(d,m,this.clusterProps):this.points[d[m+A]])}return f}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(o);const i=s.data;if(t*this.stride>=i.length)throw new Error(o);const u=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[t*this.stride],d=i[t*this.stride+1],f=s.within(a,d,u),c=[];for(const m of f){const h=m*this.stride;i[h+re]===e&&c.push(i[h+b]>1?Le(i,h,this.clusterProps):this.points[i[h+A]])}if(c.length===0)throw new Error(o);return c}getLeaves(e,t,n){t=t||10,n=n||0;const o=[];return this._appendLeaves(o,e,t,n,0),o}getTile(e,t,n){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:i,radius:u}=this.options,a=u/i,d=(n-a)/s,f=(n+1+a)/s,c={features:[]};return this._addTileFeatures(o.range((t-a)/s,d,(t+1+a)/s,f),o.data,t,n,s,c),t===0&&this._addTileFeatures(o.range(1-a/s,d,1,f),o.data,s,n,s,c),t===s-1&&this._addTileFeatures(o.range(0,d,a/s,f),o.data,-1,n,s,c),c.features.length?c:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,n.length!==1)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,o,s){const i=this.getChildren(t);for(const u of i){const a=u.properties;if(a&&a.cluster?s+a.point_count<=o?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,n,o,s):s<o?s++:e.push(u),e.length===n)break}return s}_createTree(e){const t=new ue(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,o,s,i){for(const u of e){const a=u*this.stride,d=t[a+b]>1;let f,c,m;if(d)f=Ne(t,a,this.clusterProps),c=t[a],m=t[a+1];else{const p=this.points[t[a+A]];f=p.properties;const[v,y]=p.geometry.coordinates;c=W(v),m=H(y)}const h={type:1,geometry:[[Math.round(this.options.extent*(c*s-n)),Math.round(this.options.extent*(m*s-o))]],tags:f};let g;d||this.options.generateId?g=t[a+A]:g=this.points[t[a+A]].id,g!==void 0&&(h.id=g),i.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:o,reduce:s,minPoints:i}=this.options,u=n/(o*Math.pow(2,t)),a=e.data,d=[],f=this.stride;for(let c=0;c<a.length;c+=f){if(a[c+R]<=t)continue;a[c+R]=t;const m=a[c],h=a[c+1],g=e.within(a[c],a[c+1],u),p=a[c+b];let v=p;for(const y of g){const w=y*f;a[w+R]>t&&(v+=a[w+b])}if(v>p&&v>=i){let y=m*p,w=h*p,_,P=-1;const C=((c/f|0)<<5)+(t+1)+this.points.length;for(const M of g){const k=M*f;if(a[k+R]<=t)continue;a[k+R]=t;const S=a[k+b];y+=a[k]*S,w+=a[k+1]*S,a[k+re]=C,s&&(_||(_=this._map(a,c,!0),P=this.clusterProps.length,this.clusterProps.push(_)),s(_,this._map(a,k)))}a[c+re]=C,d.push(y/v,w/v,1/0,C,-1,v),s&&d.push(P)}else{for(let y=0;y<f;y++)d.push(a[c+y]);if(v>1)for(const y of g){const w=y*f;if(!(a[w+R]<=t)){a[w+R]=t;for(let _=0;_<f;_++)d.push(a[w+_])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+b]>1){const i=this.clusterProps[e[t+Ie]];return n?Object.assign({},i):i}const o=this.points[e[t+A]].properties,s=this.options.map(o);return n&&s===o?Object.assign({},s):s}}function Le(r,e,t){return{type:"Feature",id:r[e+A],properties:Ne(r,e,t),geometry:{type:"Point",coordinates:[or(r[e]),sr(r[e+1])]}}}function Ne(r,e,t){const n=r[e+b],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,s=r[e+Ie],i=s===-1?{}:Object.assign({},t[s]);return Object.assign(i,{cluster:!0,cluster_id:r[e+A],point_count:n,point_count_abbreviated:o})}function W(r){return r/360+.5}function H(r){const e=Math.sin(r*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function or(r){return(r-.5)*360}function sr(r){const e=(180-r*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function ce(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]]);return t}class E{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(E.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>E.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(E.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function O(r,e="assertion failed"){if(r==null)throw Error(e)}const ar=(r,e,t,n)=>{const o=r.getBounds();O(o);const s=$e(o,e,n);return t.filter(i=>s.contains(E.getPosition(i)))},$e=(r,e,t)=>{const{northEast:n,southWest:o}=lr(r,e),s=ur({northEast:n,southWest:o},t);return cr(s,e)},ir=(r,e,t)=>{const n=$e(r,e,t),o=n.getNorthEast(),s=n.getSouthWest();return[s.lng(),s.lat(),o.lng(),o.lat()]},lr=(r,e)=>{const t=e.fromLatLngToDivPixel(r.getNorthEast()),n=e.fromLatLngToDivPixel(r.getSouthWest());return O(t),O(n),{northEast:t,southWest:n}},ur=({northEast:r,southWest:e},t)=>(r.x+=t,r.y-=t,e.x-=t,e.y+=t,{northEast:r,southWest:e}),cr=({northEast:r,southWest:e},t)=>{const n=t.fromDivPixelToLatLng(e),o=t.fromDivPixelToLatLng(r);return new google.maps.LatLngBounds(n,o)};class De{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return pr(e)}}class dr extends De{constructor(e){var{viewportPadding:t=60}=e,n=ce(e,["viewportPadding"]);super(n),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:n}){const o=t.getZoom();return O(o),o>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:ar(t,n,e,this.viewportPadding),map:t,mapCanvasProjection:n})}}}const pr=r=>r.map(t=>new V({position:E.getPosition(t),markers:[t]}));class fr extends De{constructor(e){var{maxZoom:t,radius:n=60}=e,o=ce(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Be(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let t=!1,n=e.map.getZoom();O(n),n=Math.round(n);const o={zoom:n};if(!K(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const s=this.markers.map(i=>{const u=E.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[u.lng(),u.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return t||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(t=!K(this.state,o)),this.state=o,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 O(t),this.superCluster.getClusters([-180,-90,180,90],Math.round(t)).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new V({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});const o=n.marker;return new V({markers:[o],position:E.getPosition(o)})}}class mr extends dr{constructor(e){var{maxZoom:t,radius:n=60,viewportPadding:o=60}=e,s=ce(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:o}),this.markers=[],this.clusters=[],this.superCluster=new Be(Object.assign({maxZoom:this.maxZoom,radius:n},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t=this.getViewportState(e);let n=!K(this.state,t);if(!K(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const o=this.markers.map(s=>{const i=E.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:s}}});this.superCluster.load(o)}return n&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:n}}cluster(e){const t=this.getViewportState(e);return this.superCluster.getClusters(t.view,t.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new V({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});const o=n.marker;return new V({markers:[o],position:E.getPosition(o)})}getViewportState(e){const t=e.map.getZoom(),n=e.map.getBounds();return O(t),O(n),{zoom:Math.round(t),view:ir(n,e.mapCanvasProjection,this.viewportPadding)}}}class hr{constructor(e,t){this.markers={sum:e.length};const n=t.map(s=>s.count),o=n.reduce((s,i)=>s+i,0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class gr{render({count:e,position:t},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
|
3
3
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
4
4
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
5
5
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
6
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>
|
|
7
|
-
</svg>`,u=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(E.isAdvancedMarkerAvailable(o)){const c=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;c.setAttribute("transform","translate(0 25)");const m={map:o,position:t,zIndex:a,title:u,content:c};return new google.maps.marker.AdvancedMarkerElement(m)}const
|
|
7
|
+
</svg>`,u=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(E.isAdvancedMarkerAvailable(o)){const c=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;c.setAttribute("transform","translate(0 25)");const m={map:o,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 vr(r,e){for(let t in e.prototype)r.prototype[t]=e.prototype[t]}class de{constructor(){vr(de,google.maps.OverlayView)}}var q;(function(r){r.CLUSTERING_BEGIN="clusteringbegin",r.CLUSTERING_END="clusteringend",r.CLUSTER_CLICK="click",r.GMP_CLICK="gmp-click"})(q||(q={}));const yr=(r,e,t)=>{e.bounds&&t.fitBounds(e.bounds)};class wr extends de{constructor({map:e,markers:t=[],algorithmOptions:n={},algorithm:o=new fr(n),renderer:s=new gr,onClusterClick:i=yr}){super(),this.map=null,this.idleListener=null,this.markers=[...t],this.clusters=[],this.algorithm=o,this.renderer=s,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(n=>{this.addMarker(n,!0)}),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return n===-1?!1:(E.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach(o=>{n=this.removeMarker(o,!0)||n}),n&&!t&&this.render(),n}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,q.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){const o=new Set;for(const i of t)i.markers.length==1&&o.add(i.markers[0]);const s=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?o.has(i.marker)||E.setMap(i.marker,null):s.push(i.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>s.forEach(i=>E.setMap(i,null)))}google.maps.event.trigger(this,q.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();O(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=>E.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new hr(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(n=>{if(n.markers.length===1)n.marker=n.markers[0];else if(n.marker=this.renderer.render(n,e,t),n.markers.forEach(o=>E.setMap(o,null)),this.onClusterClick){const o=E.isAdvancedMarker(n.marker)?q.GMP_CLICK:q.CLUSTER_CLICK;n.marker.addListener(o,s=>{google.maps.event.trigger(this,q.CLUSTER_CLICK,n),this.onClusterClick(s,n,t)})}E.setMap(n.marker,t)})}}const xe=Object.values(q),_r=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:xe,setup(r,{emit:e,expose:t,slots:n}){const o=l.ref(),s=l.inject(T,l.ref()),i=l.inject(L,l.ref());return l.provide(ae,o),l.watch(s,()=>{s.value&&(o.value=l.markRaw(new wr({map:s.value,algorithm:new mr(r.options.algorithmOptions??{}),...r.options})),xe.forEach(u=>{var a;(a=o.value)==null||a.addListener(u,d=>e(u,d))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var u;o.value&&((u=i.value)==null||u.event.clearInstanceListeners(o.value),o.value.clearMarkers(),o.value.setMap(null))}),t({markerCluster:o}),()=>{var u;return(u=n.default)==null?void 0:u.call(n)}}}),Er=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(r,{slots:e,emit:t,expose:n}){const o=l.ref(),s=l.computed(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(d=>d.type!==l.Comment)}),i=l.computed(()=>({...r.options,element:o.value})),u=B(Y,[],i,t);return n({customMarker:u}),{customMarkerRef:o,customMarker:u,hasSlotContent:s}}});const kr={key:0,class:"custom-marker-wrapper"};function Cr(r,e,t,n,o,s){return r.hasSlotContent?(l.openBlock(),l.createElementBlock("div",kr,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:r.$attrs.onClick?"pointer":void 0}},r.$attrs),[l.renderSlot(r.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const Mr=G(Er,[["render",Cr],["__scopeId","data-v-2d2d343a"]]),Or=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(r){const e=l.ref(),t=l.inject(T,l.ref()),n=l.inject(L,l.ref());return l.watch([t,()=>r.options],([o,s],[i,u])=>{const a=!Z(s,u)||t.value!==i;if(t.value&&n.value&&a){let d;if(s.data&&!(s.data instanceof n.value.MVCArray)){const f=n.value.LatLng,c=s.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={...s,data:c}}else d=s;e.value?e.value.setOptions(d):e.value=l.markRaw(new n.value.visualization.HeatmapLayer({...d,map:t.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});exports.AdvancedMarker=ut;exports.Circle=mt;exports.CustomControl=yt;exports.CustomMarker=Mr;exports.GoogleMap=nt;exports.HeatmapLayer=Or;exports.InfoWindow=kt;exports.Marker=ct;exports.MarkerCluster=_r;exports.Polygon=pt;exports.Polyline=dt;exports.Rectangle=ft;exports.apiSymbol=L;exports.mapSymbol=T;exports.mapTilesLoadedSymbol=ie;
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-d182c1f9]{display:none}.mapdiv .info-window-wrapper[data-v-d182c1f9]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
|
|
2
2
|
var nt = Object.defineProperty;
|
|
3
3
|
var st = (r, e, t) => e in r ? nt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
4
4
|
var pe = (r, e, t) => (st(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
|
-
import { defineComponent as
|
|
5
|
+
import { defineComponent as M, ref as y, provide as U, watch as O, onMounted as He, onBeforeUnmount as $, markRaw as S, toRef as R, openBlock as G, createElementBlock as V, createElementVNode as ie, renderSlot as F, normalizeProps as ot, guardReactiveProps as at, computed as z, Comment as ve, inject as k, Fragment as it, mergeProps as ye, createCommentVNode as _e } from "vue";
|
|
6
6
|
const B = Symbol("map"), D = Symbol("api"), Ee = Symbol("marker"), we = Symbol("markerCluster"), le = Symbol("CustomMarker"), Ke = Symbol("mapTilesLoaded"), W = [
|
|
7
7
|
"click",
|
|
8
8
|
"dblclick",
|
|
@@ -20,14 +20,14 @@ function lt(r, e) {
|
|
|
20
20
|
r.src = e;
|
|
21
21
|
}
|
|
22
22
|
const ut = (r) => {
|
|
23
|
-
var e, t, n, s = "The Google Maps JavaScript API", o = "google", i = "importLibrary", l = "__ib__", a = document, c = window, d = c[o] || (c[o] = {}), u = d.maps || (d.maps = {}), f = /* @__PURE__ */ new Set(),
|
|
23
|
+
var e, t, n, s = "The Google Maps JavaScript API", o = "google", i = "importLibrary", l = "__ib__", a = document, c = window, d = c[o] || (c[o] = {}), u = d.maps || (d.maps = {}), f = /* @__PURE__ */ new Set(), h = new URLSearchParams(), m = () => e || (e = new Promise(async (p, g) => {
|
|
24
24
|
var v;
|
|
25
|
-
await (t = a.createElement("script")),
|
|
25
|
+
await (t = a.createElement("script")), h.set("libraries", [...f] + "");
|
|
26
26
|
for (n in r)
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
h.set(n.replace(/[A-Z]/g, (_) => "_" + _[0].toLowerCase()), r[n]);
|
|
28
|
+
h.set("callback", o + ".maps." + l), lt(t, "https://maps.googleapis.com/maps/api/js?" + h), u[l] = p, t.onerror = () => e = g(Error(s + " could not load.")), t.nonce = ((v = a.querySelector("script[nonce]")) == null ? void 0 : v.nonce) || "", a.head.append(t);
|
|
29
29
|
}));
|
|
30
|
-
u[i] ? console.warn(s + " only loads once. Ignoring:", r) : u[i] = (p, ...g) => f.add(p) &&
|
|
30
|
+
u[i] ? console.warn(s + " only loads once. Ignoring:", r) : u[i] = (p, ...g) => f.add(p) && m().then(() => u[i](p, ...g));
|
|
31
31
|
}, ct = (r) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(r)}) will be ignored.`, pt = (r) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(r)}) will be ignored.`, dt = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", ft = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", ke = process.env.NODE_ENV !== "production" ? (r) => {
|
|
32
32
|
console.warn(`[@googlemaps/js-api-loader] ${r}`);
|
|
33
33
|
} : () => {
|
|
@@ -150,7 +150,7 @@ const be = [
|
|
|
150
150
|
"tilesloaded",
|
|
151
151
|
"tilt_changed",
|
|
152
152
|
"zoom_changed"
|
|
153
|
-
], _t =
|
|
153
|
+
], _t = M({
|
|
154
154
|
props: {
|
|
155
155
|
apiPromise: {
|
|
156
156
|
type: Promise
|
|
@@ -365,45 +365,45 @@ const be = [
|
|
|
365
365
|
Object.keys(u).forEach((p) => {
|
|
366
366
|
u[p] === void 0 && delete u[p];
|
|
367
367
|
});
|
|
368
|
-
const
|
|
368
|
+
const h = (p) => {
|
|
369
369
|
var g;
|
|
370
370
|
return p ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[p] } : {};
|
|
371
|
-
},
|
|
371
|
+
}, m = {
|
|
372
372
|
scaleControlOptions: r.scaleControlStyle ? { style: r.scaleControlStyle } : {},
|
|
373
|
-
panControlOptions:
|
|
374
|
-
zoomControlOptions:
|
|
375
|
-
rotateControlOptions:
|
|
376
|
-
streetViewControlOptions:
|
|
377
|
-
fullscreenControlOptions:
|
|
378
|
-
cameraControlOptions:
|
|
373
|
+
panControlOptions: h(r.panControlPosition),
|
|
374
|
+
zoomControlOptions: h(r.zoomControlPosition),
|
|
375
|
+
rotateControlOptions: h(r.rotateControlPosition),
|
|
376
|
+
streetViewControlOptions: h(r.streetViewControlPosition),
|
|
377
|
+
fullscreenControlOptions: h(r.fullscreenControlPosition),
|
|
378
|
+
cameraControlOptions: h(r.cameraControlPosition),
|
|
379
379
|
disableDefaultUI: r.disableDefaultUi
|
|
380
380
|
};
|
|
381
|
-
return { ...u, ...
|
|
382
|
-
}, a =
|
|
381
|
+
return { ...u, ...m };
|
|
382
|
+
}, a = O(
|
|
383
383
|
[o, s],
|
|
384
384
|
([u, f]) => {
|
|
385
|
-
const
|
|
386
|
-
|
|
385
|
+
const h = u, m = f;
|
|
386
|
+
h && m && (h.event.addListenerOnce(m, "tilesloaded", () => {
|
|
387
387
|
i.value = !0;
|
|
388
388
|
}), setTimeout(a, 0));
|
|
389
389
|
},
|
|
390
390
|
{ immediate: !0 }
|
|
391
391
|
), c = () => {
|
|
392
|
-
const { apiKey: u, region: f, version:
|
|
393
|
-
mt({ key: u, region: f, v:
|
|
392
|
+
const { apiKey: u, region: f, version: h, language: m, libraries: p } = r;
|
|
393
|
+
mt({ key: u, region: f, v: h, language: m, libraries: p });
|
|
394
394
|
}, d = (u) => {
|
|
395
395
|
const f = u ? u.maps : google.maps;
|
|
396
396
|
o.value = S(f), s.value = S(new f.Map(t.value, l()));
|
|
397
|
-
const
|
|
398
|
-
o.value[le] =
|
|
397
|
+
const h = yt(o.value);
|
|
398
|
+
o.value[le] = h, be.forEach((p) => {
|
|
399
399
|
var g;
|
|
400
400
|
(g = s.value) == null || g.addListener(p, (v) => e(p, v));
|
|
401
401
|
}), n.value = !0;
|
|
402
|
-
const
|
|
402
|
+
const m = Object.keys(r).filter(
|
|
403
403
|
(p) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom"].includes(p)
|
|
404
404
|
).map((p) => R(r, p));
|
|
405
|
-
|
|
406
|
-
[() => r.center, () => r.zoom, ...
|
|
405
|
+
O(
|
|
406
|
+
[() => r.center, () => r.zoom, ...m],
|
|
407
407
|
([p, g], [v, _]) => {
|
|
408
408
|
var C, T, K;
|
|
409
409
|
const { center: E, zoom: q, ...P } = l();
|
|
@@ -481,7 +481,7 @@ var Ct = function r(e, t) {
|
|
|
481
481
|
}
|
|
482
482
|
return e !== e && t !== t;
|
|
483
483
|
};
|
|
484
|
-
const Q = /* @__PURE__ */ kt(Ct), Se = ["click", "drag", "dragend", "dragstart", "gmp-click"], Ot =
|
|
484
|
+
const Q = /* @__PURE__ */ kt(Ct), Se = ["click", "drag", "dragend", "dragstart", "gmp-click"], Ot = M({
|
|
485
485
|
name: "AdvancedMarker",
|
|
486
486
|
props: {
|
|
487
487
|
options: {
|
|
@@ -496,16 +496,16 @@ const Q = /* @__PURE__ */ kt(Ct), Se = ["click", "drag", "dragend", "dragstart",
|
|
|
496
496
|
emits: Se,
|
|
497
497
|
setup(r, { emit: e, expose: t, slots: n }) {
|
|
498
498
|
const s = y(), o = z(() => {
|
|
499
|
-
var
|
|
500
|
-
return (
|
|
499
|
+
var h;
|
|
500
|
+
return (h = n.content) == null ? void 0 : h.call(n).some((m) => m.type !== ve);
|
|
501
501
|
}), i = R(r, "options"), l = R(r, "pinOptions"), a = y(), c = k(B, y()), d = k(D, y()), u = k(we, y()), f = z(
|
|
502
502
|
() => !!(u.value && d.value && a.value instanceof google.maps.marker.AdvancedMarkerElement)
|
|
503
503
|
);
|
|
504
|
-
return
|
|
504
|
+
return O(
|
|
505
505
|
[c, i, l, s],
|
|
506
|
-
async (
|
|
506
|
+
async (h, [m, p, g, v]) => {
|
|
507
507
|
var C, T, K;
|
|
508
|
-
const _ = !Q(i.value, p) || !Q(l.value, g), E = s.value !== v, q = _ || E || c.value !==
|
|
508
|
+
const _ = !Q(i.value, p) || !Q(l.value, g), E = s.value !== v, q = _ || E || c.value !== m;
|
|
509
509
|
if (!c.value || !d.value || !q || o.value && !s.value)
|
|
510
510
|
return;
|
|
511
511
|
const { AdvancedMarkerElement: P, PinElement: b } = d.value.marker;
|
|
@@ -527,8 +527,8 @@ const Q = /* @__PURE__ */ kt(Ct), Se = ["click", "drag", "dragend", "dragstart",
|
|
|
527
527
|
// Ensure DOM updates happen before this watcher runs
|
|
528
528
|
}
|
|
529
529
|
), $(() => {
|
|
530
|
-
var
|
|
531
|
-
a.value && ((
|
|
530
|
+
var h, m;
|
|
531
|
+
a.value && ((h = d.value) == null || h.event.clearInstanceListeners(a.value), f.value ? (m = u.value) == null || m.removeMarker(a.value) : a.value.map = null);
|
|
532
532
|
}), U(Ee, a), t({ marker: a }), { hasCustomSlotContent: o, markerRef: s };
|
|
533
533
|
}
|
|
534
534
|
});
|
|
@@ -550,14 +550,14 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
550
550
|
const s = y(), o = k(B, y()), i = k(D, y()), l = k(we, y()), a = z(
|
|
551
551
|
() => !!(l.value && i.value && (s.value instanceof i.value.Marker || s.value instanceof i.value[le]))
|
|
552
552
|
);
|
|
553
|
-
return
|
|
553
|
+
return O(
|
|
554
554
|
[o, t],
|
|
555
555
|
(c, [d, u]) => {
|
|
556
|
-
var
|
|
556
|
+
var h, m, p;
|
|
557
557
|
const f = !Q(t.value, u) || o.value !== d;
|
|
558
558
|
if (!(!o.value || !i.value || !f))
|
|
559
559
|
if (s.value)
|
|
560
|
-
s.value.setOptions(t.value), a.value && ((
|
|
560
|
+
s.value.setOptions(t.value), a.value && ((h = l.value) == null || h.removeMarker(s.value), (m = l.value) == null || m.addMarker(s.value));
|
|
561
561
|
else {
|
|
562
562
|
if (Ae(r))
|
|
563
563
|
s.value = S(
|
|
@@ -610,7 +610,7 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
610
610
|
"shape_changed",
|
|
611
611
|
"title_changed",
|
|
612
612
|
"visible_changed"
|
|
613
|
-
], $r =
|
|
613
|
+
], $r = M({
|
|
614
614
|
name: "Marker",
|
|
615
615
|
props: {
|
|
616
616
|
options: {
|
|
@@ -626,7 +626,7 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
626
626
|
return (i = n.default) == null ? void 0 : i.call(n);
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
}), Br =
|
|
629
|
+
}), Br = M({
|
|
630
630
|
name: "Polyline",
|
|
631
631
|
props: {
|
|
632
632
|
options: {
|
|
@@ -640,7 +640,7 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
640
640
|
return { polyline: H("Polyline", W, t, e) };
|
|
641
641
|
},
|
|
642
642
|
render: () => null
|
|
643
|
-
}), Dr =
|
|
643
|
+
}), Dr = M({
|
|
644
644
|
name: "Polygon",
|
|
645
645
|
props: {
|
|
646
646
|
options: {
|
|
@@ -654,7 +654,7 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
654
654
|
return { polygon: H("Polygon", W, t, e) };
|
|
655
655
|
},
|
|
656
656
|
render: () => null
|
|
657
|
-
}), Le = W.concat(["bounds_changed"]), Zr =
|
|
657
|
+
}), Le = W.concat(["bounds_changed"]), Zr = M({
|
|
658
658
|
name: "Rectangle",
|
|
659
659
|
props: {
|
|
660
660
|
options: {
|
|
@@ -668,7 +668,7 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
668
668
|
return { rectangle: H("Rectangle", Le, t, e) };
|
|
669
669
|
},
|
|
670
670
|
render: () => null
|
|
671
|
-
}), xe = W.concat(["center_changed", "radius_changed"]), Ur =
|
|
671
|
+
}), xe = W.concat(["center_changed", "radius_changed"]), Ur = M({
|
|
672
672
|
name: "Circle",
|
|
673
673
|
props: {
|
|
674
674
|
options: {
|
|
@@ -682,7 +682,7 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
682
682
|
return { circle: H("Circle", xe, t, e) };
|
|
683
683
|
},
|
|
684
684
|
render: () => null
|
|
685
|
-
}), bt =
|
|
685
|
+
}), bt = M({
|
|
686
686
|
props: {
|
|
687
687
|
position: {
|
|
688
688
|
type: String,
|
|
@@ -695,7 +695,7 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
695
695
|
},
|
|
696
696
|
emits: ["content:loaded"],
|
|
697
697
|
setup(r, { emit: e }) {
|
|
698
|
-
const t = y(null), n = k(B, y()), s = k(D, y()), o = k(Ke, y(!1)), i =
|
|
698
|
+
const t = y(null), n = k(B, y()), s = k(D, y()), o = k(Ke, y(!1)), i = O(
|
|
699
699
|
[o, s, t],
|
|
700
700
|
([c, d, u]) => {
|
|
701
701
|
d && c && u && (l(r.position), e("content:loaded"), setTimeout(i, 0));
|
|
@@ -710,17 +710,17 @@ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker",
|
|
|
710
710
|
if (n.value && s.value) {
|
|
711
711
|
let d = null;
|
|
712
712
|
const u = s.value.ControlPosition[c];
|
|
713
|
-
n.value.controls[u].forEach((f,
|
|
714
|
-
f === t.value && (d =
|
|
713
|
+
n.value.controls[u].forEach((f, h) => {
|
|
714
|
+
f === t.value && (d = h);
|
|
715
715
|
}), d !== null && n.value.controls[u].removeAt(d);
|
|
716
716
|
}
|
|
717
717
|
};
|
|
718
|
-
return $(() => a(r.position)),
|
|
718
|
+
return $(() => a(r.position)), O(
|
|
719
719
|
() => r.position,
|
|
720
720
|
(c, d) => {
|
|
721
721
|
a(d), l(c);
|
|
722
722
|
}
|
|
723
|
-
),
|
|
723
|
+
), O(
|
|
724
724
|
() => r.index,
|
|
725
725
|
(c) => {
|
|
726
726
|
t.value && (t.value.index = c);
|
|
@@ -744,7 +744,7 @@ const Gr = /* @__PURE__ */ te(bt, [["render", At], ["__scopeId", "data-v-ab9120c
|
|
|
744
744
|
"position_changed",
|
|
745
745
|
"visible",
|
|
746
746
|
"zindex_changed"
|
|
747
|
-
], qt =
|
|
747
|
+
], qt = M({
|
|
748
748
|
inheritAttrs: !1,
|
|
749
749
|
props: {
|
|
750
750
|
options: {
|
|
@@ -764,13 +764,13 @@ const Gr = /* @__PURE__ */ te(bt, [["render", At], ["__scopeId", "data-v-ab9120c
|
|
|
764
764
|
return (p = e.default) == null ? void 0 : p.call(e).some((g) => g.type !== ve);
|
|
765
765
|
}), f = (p) => {
|
|
766
766
|
d = p, t("update:modelValue", p);
|
|
767
|
-
},
|
|
767
|
+
}, h = (p) => {
|
|
768
768
|
s.value && (s.value.open({ map: i.value, anchor: a.value, ...p }), f(!0));
|
|
769
|
-
},
|
|
769
|
+
}, m = () => {
|
|
770
770
|
s.value && (s.value.close(), f(!1));
|
|
771
771
|
};
|
|
772
772
|
return He(() => {
|
|
773
|
-
|
|
773
|
+
O(
|
|
774
774
|
[i, () => r.options],
|
|
775
775
|
([p, g], [v, _]) => {
|
|
776
776
|
var q;
|
|
@@ -778,14 +778,12 @@ const Gr = /* @__PURE__ */ te(bt, [["render", At], ["__scopeId", "data-v-ab9120c
|
|
|
778
778
|
i.value && l.value && E && (s.value ? (s.value.setOptions({
|
|
779
779
|
...g,
|
|
780
780
|
content: u.value ? o.value : g.content
|
|
781
|
-
}), a.value ||
|
|
781
|
+
}), a.value || h()) : (s.value = S(
|
|
782
782
|
new l.value.InfoWindow({
|
|
783
783
|
...g,
|
|
784
784
|
content: u.value ? o.value : g.content
|
|
785
785
|
})
|
|
786
|
-
), a.value && (c = a.value.addListener("click", () => {
|
|
787
|
-
m();
|
|
788
|
-
})), (!a.value || d) && m(), Ie.forEach((P) => {
|
|
786
|
+
), a.value && (c = a.value.addListener("click", () => h())), (!a.value || d) && h(), Ie.forEach((P) => {
|
|
789
787
|
var b;
|
|
790
788
|
(b = s.value) == null || b.addListener(P, (C) => t(P, C));
|
|
791
789
|
}), (q = s.value) == null || q.addListener("closeclick", () => f(!1))));
|
|
@@ -794,16 +792,24 @@ const Gr = /* @__PURE__ */ te(bt, [["render", At], ["__scopeId", "data-v-ab9120c
|
|
|
794
792
|
immediate: !0,
|
|
795
793
|
flush: "post"
|
|
796
794
|
}
|
|
797
|
-
),
|
|
795
|
+
), O(
|
|
796
|
+
a,
|
|
797
|
+
(p, g) => {
|
|
798
|
+
!s.value || p === g || (c && (c.remove(), c = void 0), p && (c = p.addListener("click", () => h())));
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
flush: "post"
|
|
802
|
+
}
|
|
803
|
+
), O(
|
|
798
804
|
() => r.modelValue,
|
|
799
805
|
(p) => {
|
|
800
|
-
p !== d && (p ?
|
|
806
|
+
p !== d && (p ? h() : m());
|
|
801
807
|
}
|
|
802
808
|
);
|
|
803
809
|
}), $(() => {
|
|
804
810
|
var p;
|
|
805
|
-
c && c.remove(), s.value && ((p = l.value) == null || p.event.clearInstanceListeners(s.value),
|
|
806
|
-
}), n({ infoWindow: s, open:
|
|
811
|
+
c && c.remove(), s.value && ((p = l.value) == null || p.event.clearInstanceListeners(s.value), m());
|
|
812
|
+
}), n({ infoWindow: s, open: h, close: m }), { infoWindow: s, infoWindowRef: o, hasSlotContent: u, open: h, close: m };
|
|
807
813
|
}
|
|
808
814
|
});
|
|
809
815
|
const Tt = {
|
|
@@ -817,7 +823,7 @@ function Lt(r, e, t, n, s, o) {
|
|
|
817
823
|
], 16)
|
|
818
824
|
])) : _e("", !0);
|
|
819
825
|
}
|
|
820
|
-
const Vr = /* @__PURE__ */ te(qt, [["render", Lt], ["__scopeId", "data-v-
|
|
826
|
+
const Vr = /* @__PURE__ */ te(qt, [["render", Lt], ["__scopeId", "data-v-d182c1f9"]]);
|
|
821
827
|
var xt = Object.getOwnPropertyNames, It = Object.getOwnPropertySymbols, Rt = Object.prototype.hasOwnProperty;
|
|
822
828
|
function Re(r, e) {
|
|
823
829
|
return function(n, s, o) {
|
|
@@ -876,8 +882,8 @@ function Be(r, e, t) {
|
|
|
876
882
|
u++;
|
|
877
883
|
continue;
|
|
878
884
|
}
|
|
879
|
-
var f = i.value,
|
|
880
|
-
if (t.equals(f[0],
|
|
885
|
+
var f = i.value, h = l.value;
|
|
886
|
+
if (t.equals(f[0], h[0], a, u, r, e, t) && t.equals(f[1], h[1], f[0], h[0], r, e, t)) {
|
|
881
887
|
d = s[u] = !0;
|
|
882
888
|
break;
|
|
883
889
|
}
|
|
@@ -951,35 +957,35 @@ function Ye(r, e, t, n) {
|
|
|
951
957
|
var Yt = "[object Arguments]", Jt = "[object Boolean]", Xt = "[object Date]", Qt = "[object Error]", er = "[object Map]", tr = "[object Number]", rr = "[object Object]", nr = "[object RegExp]", sr = "[object Set]", or = "[object String]", ar = "[object URL]", ir = Array.isArray, Ze = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, Ue = Object.assign, lr = Object.prototype.toString.call.bind(Object.prototype.toString);
|
|
952
958
|
function ur(r) {
|
|
953
959
|
var e = r.areArraysEqual, t = r.areDatesEqual, n = r.areErrorsEqual, s = r.areFunctionsEqual, o = r.areMapsEqual, i = r.areNumbersEqual, l = r.areObjectsEqual, a = r.arePrimitiveWrappersEqual, c = r.areRegExpsEqual, d = r.areSetsEqual, u = r.areTypedArraysEqual, f = r.areUrlsEqual;
|
|
954
|
-
return function(
|
|
955
|
-
if (
|
|
960
|
+
return function(m, p, g) {
|
|
961
|
+
if (m === p)
|
|
956
962
|
return !0;
|
|
957
|
-
if (
|
|
963
|
+
if (m == null || p == null)
|
|
958
964
|
return !1;
|
|
959
|
-
var v = typeof
|
|
965
|
+
var v = typeof m;
|
|
960
966
|
if (v !== typeof p)
|
|
961
967
|
return !1;
|
|
962
968
|
if (v !== "object")
|
|
963
|
-
return v === "number" ? i(
|
|
964
|
-
var _ =
|
|
969
|
+
return v === "number" ? i(m, p, g) : v === "function" ? s(m, p, g) : !1;
|
|
970
|
+
var _ = m.constructor;
|
|
965
971
|
if (_ !== p.constructor)
|
|
966
972
|
return !1;
|
|
967
973
|
if (_ === Object)
|
|
968
|
-
return l(
|
|
969
|
-
if (ir(
|
|
970
|
-
return e(
|
|
971
|
-
if (Ze != null && Ze(
|
|
972
|
-
return u(
|
|
974
|
+
return l(m, p, g);
|
|
975
|
+
if (ir(m))
|
|
976
|
+
return e(m, p, g);
|
|
977
|
+
if (Ze != null && Ze(m))
|
|
978
|
+
return u(m, p, g);
|
|
973
979
|
if (_ === Date)
|
|
974
|
-
return t(
|
|
980
|
+
return t(m, p, g);
|
|
975
981
|
if (_ === RegExp)
|
|
976
|
-
return c(
|
|
982
|
+
return c(m, p, g);
|
|
977
983
|
if (_ === Map)
|
|
978
|
-
return o(
|
|
984
|
+
return o(m, p, g);
|
|
979
985
|
if (_ === Set)
|
|
980
|
-
return d(
|
|
981
|
-
var E = lr(
|
|
982
|
-
return E === Xt ? t(
|
|
986
|
+
return d(m, p, g);
|
|
987
|
+
var E = lr(m);
|
|
988
|
+
return E === Xt ? t(m, p, g) : E === nr ? c(m, p, g) : E === er ? o(m, p, g) : E === sr ? d(m, p, g) : E === rr ? typeof m.then != "function" && typeof p.then != "function" && l(m, p, g) : E === ar ? f(m, p, g) : E === Qt ? n(m, p, g) : E === Yt ? l(m, p, g) : E === Jt || E === tr || E === or ? a(m, p, g) : !1;
|
|
983
989
|
};
|
|
984
990
|
}
|
|
985
991
|
function cr(r) {
|
|
@@ -1017,11 +1023,11 @@ function dr(r) {
|
|
|
1017
1023
|
var e = r.circular, t = r.comparator, n = r.createState, s = r.equals, o = r.strict;
|
|
1018
1024
|
if (n)
|
|
1019
1025
|
return function(a, c) {
|
|
1020
|
-
var d = n(), u = d.cache, f = u === void 0 ? e ? /* @__PURE__ */ new WeakMap() : void 0 : u,
|
|
1026
|
+
var d = n(), u = d.cache, f = u === void 0 ? e ? /* @__PURE__ */ new WeakMap() : void 0 : u, h = d.meta;
|
|
1021
1027
|
return t(a, c, {
|
|
1022
1028
|
cache: f,
|
|
1023
1029
|
equals: s,
|
|
1024
|
-
meta:
|
|
1030
|
+
meta: h,
|
|
1025
1031
|
strict: o
|
|
1026
1032
|
});
|
|
1027
1033
|
};
|
|
@@ -1167,8 +1173,8 @@ class Ce {
|
|
|
1167
1173
|
}
|
|
1168
1174
|
continue;
|
|
1169
1175
|
}
|
|
1170
|
-
const
|
|
1171
|
-
|
|
1176
|
+
const h = f + u >> 1, m = i[2 * h], p = i[2 * h + 1];
|
|
1177
|
+
m >= e && m <= n && p >= t && p <= s && c.push(o[h]), (d === 0 ? e <= m : t <= p) && (a.push(f), a.push(h - 1), a.push(1 - d)), (d === 0 ? n >= m : s >= p) && (a.push(h + 1), a.push(u), a.push(1 - d));
|
|
1172
1178
|
}
|
|
1173
1179
|
return c;
|
|
1174
1180
|
}
|
|
@@ -1190,8 +1196,8 @@ class Ce {
|
|
|
1190
1196
|
Ve(o[2 * g], o[2 * g + 1], e, t) <= c && a.push(s[g]);
|
|
1191
1197
|
continue;
|
|
1192
1198
|
}
|
|
1193
|
-
const
|
|
1194
|
-
Ve(
|
|
1199
|
+
const h = f + u >> 1, m = o[2 * h], p = o[2 * h + 1];
|
|
1200
|
+
Ve(m, p, e, t) <= c && a.push(s[h]), (d === 0 ? e - n <= m : t - n <= p) && (l.push(f), l.push(h - 1), l.push(1 - d)), (d === 0 ? e + n >= m : t + n >= p) && (l.push(h + 1), l.push(u), l.push(1 - d));
|
|
1195
1201
|
}
|
|
1196
1202
|
return a;
|
|
1197
1203
|
}
|
|
@@ -1205,8 +1211,8 @@ function ge(r, e, t, n, s, o) {
|
|
|
1205
1211
|
function Je(r, e, t, n, s, o) {
|
|
1206
1212
|
for (; s > n; ) {
|
|
1207
1213
|
if (s - n > 600) {
|
|
1208
|
-
const c = s - n + 1, d = t - n + 1, u = Math.log(c), f = 0.5 * Math.exp(2 * u / 3),
|
|
1209
|
-
Je(r, e, t,
|
|
1214
|
+
const c = s - n + 1, d = t - n + 1, u = Math.log(c), f = 0.5 * Math.exp(2 * u / 3), h = 0.5 * Math.sqrt(u * f * (c - f) / c) * (d - c / 2 < 0 ? -1 : 1), m = Math.max(n, Math.floor(t - d * f / c + h)), p = Math.min(s, Math.floor(t + (c - d) * f / c + h));
|
|
1215
|
+
Je(r, e, t, m, p, o);
|
|
1210
1216
|
}
|
|
1211
1217
|
const i = e[2 * t + o];
|
|
1212
1218
|
let l = n, a = s;
|
|
@@ -1268,10 +1274,10 @@ class Qe {
|
|
|
1268
1274
|
const c = e[a];
|
|
1269
1275
|
if (!c.geometry)
|
|
1270
1276
|
continue;
|
|
1271
|
-
const [d, u] = c.geometry.coordinates, f = Fe(se(d)),
|
|
1277
|
+
const [d, u] = c.geometry.coordinates, f = Fe(se(d)), h = Fe(oe(u));
|
|
1272
1278
|
i.push(
|
|
1273
1279
|
f,
|
|
1274
|
-
|
|
1280
|
+
h,
|
|
1275
1281
|
// projected point coordinates
|
|
1276
1282
|
1 / 0,
|
|
1277
1283
|
// the last zoom the point was processed at
|
|
@@ -1318,8 +1324,8 @@ class Qe {
|
|
|
1318
1324
|
throw new Error(s);
|
|
1319
1325
|
const l = this.options.radius / (this.options.extent * Math.pow(2, n - 1)), a = i[t * this.stride], c = i[t * this.stride + 1], d = o.within(a, c, l), u = [];
|
|
1320
1326
|
for (const f of d) {
|
|
1321
|
-
const
|
|
1322
|
-
i[
|
|
1327
|
+
const h = f * this.stride;
|
|
1328
|
+
i[h + he] === e && u.push(i[h + L] > 1 ? ze(i, h, this.clusterProps) : this.points[i[h + x]]);
|
|
1323
1329
|
}
|
|
1324
1330
|
if (u.length === 0)
|
|
1325
1331
|
throw new Error(s);
|
|
@@ -1394,7 +1400,7 @@ class Qe {
|
|
|
1394
1400
|
const [g, v] = p.geometry.coordinates;
|
|
1395
1401
|
u = se(g), f = oe(v);
|
|
1396
1402
|
}
|
|
1397
|
-
const
|
|
1403
|
+
const h = {
|
|
1398
1404
|
type: 1,
|
|
1399
1405
|
geometry: [[
|
|
1400
1406
|
Math.round(this.options.extent * (u * o - n)),
|
|
@@ -1402,8 +1408,8 @@ class Qe {
|
|
|
1402
1408
|
]],
|
|
1403
1409
|
tags: d
|
|
1404
1410
|
};
|
|
1405
|
-
let
|
|
1406
|
-
c || this.options.generateId ?
|
|
1411
|
+
let m;
|
|
1412
|
+
c || this.options.generateId ? m = t[a + x] : m = this.points[t[a + x]].id, m !== void 0 && (h.id = m), i.features.push(h);
|
|
1407
1413
|
}
|
|
1408
1414
|
}
|
|
1409
1415
|
_limitZoom(e) {
|
|
@@ -1415,16 +1421,16 @@ class Qe {
|
|
|
1415
1421
|
if (a[u + N] <= t)
|
|
1416
1422
|
continue;
|
|
1417
1423
|
a[u + N] = t;
|
|
1418
|
-
const f = a[u],
|
|
1424
|
+
const f = a[u], h = a[u + 1], m = e.within(a[u], a[u + 1], l), p = a[u + L];
|
|
1419
1425
|
let g = p;
|
|
1420
|
-
for (const v of
|
|
1426
|
+
for (const v of m) {
|
|
1421
1427
|
const _ = v * d;
|
|
1422
1428
|
a[_ + N] > t && (g += a[_ + L]);
|
|
1423
1429
|
}
|
|
1424
1430
|
if (g > p && g >= i) {
|
|
1425
|
-
let v = f * p, _ =
|
|
1431
|
+
let v = f * p, _ = h * p, E, q = -1;
|
|
1426
1432
|
const P = ((u / d | 0) << 5) + (t + 1) + this.points.length;
|
|
1427
|
-
for (const b of
|
|
1433
|
+
for (const b of m) {
|
|
1428
1434
|
const C = b * d;
|
|
1429
1435
|
if (a[C + N] <= t)
|
|
1430
1436
|
continue;
|
|
@@ -1437,7 +1443,7 @@ class Qe {
|
|
|
1437
1443
|
for (let v = 0; v < d; v++)
|
|
1438
1444
|
c.push(a[u + v]);
|
|
1439
1445
|
if (g > 1)
|
|
1440
|
-
for (const v of
|
|
1446
|
+
for (const v of m) {
|
|
1441
1447
|
const _ = v * d;
|
|
1442
1448
|
if (!(a[_ + N] <= t)) {
|
|
1443
1449
|
a[_ + N] = t;
|
|
@@ -1904,7 +1910,7 @@ class Ar extends Me {
|
|
|
1904
1910
|
});
|
|
1905
1911
|
}
|
|
1906
1912
|
}
|
|
1907
|
-
const We = Object.values(I), Fr =
|
|
1913
|
+
const We = Object.values(I), Fr = M({
|
|
1908
1914
|
name: "MarkerCluster",
|
|
1909
1915
|
props: {
|
|
1910
1916
|
options: {
|
|
@@ -1915,7 +1921,7 @@ const We = Object.values(I), Fr = O({
|
|
|
1915
1921
|
emits: We,
|
|
1916
1922
|
setup(r, { emit: e, expose: t, slots: n }) {
|
|
1917
1923
|
const s = y(), o = k(B, y()), i = k(D, y());
|
|
1918
|
-
return U(we, s),
|
|
1924
|
+
return U(we, s), O(
|
|
1919
1925
|
o,
|
|
1920
1926
|
() => {
|
|
1921
1927
|
o.value && (s.value = S(
|
|
@@ -1942,7 +1948,7 @@ const We = Object.values(I), Fr = O({
|
|
|
1942
1948
|
return (l = n.default) == null ? void 0 : l.call(n);
|
|
1943
1949
|
};
|
|
1944
1950
|
}
|
|
1945
|
-
}), qr =
|
|
1951
|
+
}), qr = M({
|
|
1946
1952
|
inheritAttrs: !1,
|
|
1947
1953
|
props: {
|
|
1948
1954
|
options: {
|
|
@@ -1977,7 +1983,7 @@ function Lr(r, e, t, n, s, o) {
|
|
|
1977
1983
|
], 16)
|
|
1978
1984
|
])) : _e("", !0);
|
|
1979
1985
|
}
|
|
1980
|
-
const zr = /* @__PURE__ */ te(qr, [["render", Lr], ["__scopeId", "data-v-2d2d343a"]]), Wr =
|
|
1986
|
+
const zr = /* @__PURE__ */ te(qr, [["render", Lr], ["__scopeId", "data-v-2d2d343a"]]), Wr = M({
|
|
1981
1987
|
name: "HeatmapLayer",
|
|
1982
1988
|
props: {
|
|
1983
1989
|
options: {
|
|
@@ -1987,7 +1993,7 @@ const zr = /* @__PURE__ */ te(qr, [["render", Lr], ["__scopeId", "data-v-2d2d343
|
|
|
1987
1993
|
},
|
|
1988
1994
|
setup(r) {
|
|
1989
1995
|
const e = y(), t = k(B, y()), n = k(D, y());
|
|
1990
|
-
return
|
|
1996
|
+
return O(
|
|
1991
1997
|
[t, () => r.options],
|
|
1992
1998
|
([s, o], [i, l]) => {
|
|
1993
1999
|
const a = !Q(o, l) || t.value !== i;
|
package/dist/index.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c6aa3e71]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ae91c15f]{display:none}.mapdiv .custom-control-wrapper[data-v-ae91c15f]{display:inline-block}.info-window-wrapper[data-v-
|
|
2
|
-
(function(_,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(_=typeof globalThis<"u"?globalThis:_||self,l(_.Vue3GoogleMap={},_.Vue))})(this,function(_,l){"use strict";var Or=Object.defineProperty;var Pr=(_,l,M)=>l in _?Or(_,l,{enumerable:!0,configurable:!0,writable:!0,value:M}):_[l]=M;var pe=(_,l,M)=>(Pr(_,typeof l!="symbol"?l+"":l,M),M);const M=Symbol("map"),b=Symbol("api"),X=Symbol("marker"),Q=Symbol("markerCluster"),z=Symbol("CustomMarker"),ee=Symbol("mapTilesLoaded"),B=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function Ue(n,e){n.src=e}const Ze=n=>{var e,t,r,o="The Google Maps JavaScript API",s="google",i="importLibrary",c="__ib__",a=document,d=window,f=d[s]||(d[s]={}),u=f.maps||(f.maps={}),m=new Set,g=new URLSearchParams,h=()=>e||(e=new Promise(async(p,y)=>{var v;await(t=a.createElement("script")),g.set("libraries",[...m]+"");for(r in n)g.set(r.replace(/[A-Z]/g,w=>"_"+w[0].toLowerCase()),n[r]);g.set("callback",s+".maps."+c),Ue(t,"https://maps.googleapis.com/maps/api/js?"+g),u[c]=p,t.onerror=()=>e=y(Error(o+" could not load.")),t.nonce=((v=a.querySelector("script[nonce]"))==null?void 0:v.nonce)||"",a.head.append(t)}));u[i]?console.warn(o+" only loads once. Ignoring:",n):u[i]=(p,...y)=>m.add(p)&&h().then(()=>u[i](p,...y))},Ge=n=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(n)}) will be ignored.`,Fe=n=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(n)}) will be ignored.`,ze="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",We="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",te=process.env.NODE_ENV!=="production"?n=>{console.warn(`[@googlemaps/js-api-loader] ${n}`)}:()=>{},He=process.env.NODE_ENV!=="production"?n=>{console.info(`[@googlemaps/js-api-loader] ${n}`)}:()=>{};let re=!1;function Ke(n){if(re){te(Ge(n));return}Je(n),re=!0}async function Ye(n){var e,t;if(re||te(ze),!((t=(e=window==null?void 0:window.google)==null?void 0:e.maps)!=null&&t.importLibrary))throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(n)}function Je(n){var t,r;const e=!!((r=(t=window.google)==null?void 0:t.maps)!=null&&r.importLibrary);e?He(Fe(n)):process.env.NODE_ENV!=="production"&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&te(We),e||Ze(n)}function Xe(n){return class extends n.OverlayView{constructor(r){super();pe(this,"element");pe(this,"opts");const{element:o,...s}=r;this.element=o,this.opts=s,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(),o=r==null?void 0:r.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let s,i;switch(this.opts.anchorPoint){case"TOP_CENTER":s="-50%",i="-100%";break;case"BOTTOM_CENTER":s="-50%",i="0";break;case"LEFT_CENTER":s="-100%",i="-50%";break;case"RIGHT_CENTER":s="0",i="-50%";break;case"TOP_LEFT":s="-100%",i="-100%";break;case"TOP_RIGHT":s="0",i="-100%";break;case"BOTTOM_LEFT":s="-100%",i="0";break;case"BOTTOM_RIGHT":s="0",i="0";break;default:s="-50%",i="-50%"}const c=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${s}) translateX(${c}) 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:o,...s}=r;this.element=o,this.opts=s,this.draw()}}}let fe=!1;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"],Qe=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}},emits:me,setup(n,{emit:e}){const t=l.ref(),r=l.ref(!1),o=l.ref(),s=l.ref(),i=l.ref(!1);l.provide(M,o),l.provide(b,s),l.provide(ee,i);const c=()=>{const u={...n};Object.keys(u).forEach(p=>{u[p]===void 0&&delete u[p]});const g=p=>{var y;return p?{position:(y=s.value)==null?void 0:y.ControlPosition[p]}:{}},h={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{...u,...h}},a=l.watch([s,o],([u,m])=>{const g=u,h=m;g&&h&&(g.event.addListenerOnce(h,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),d=()=>{const{apiKey:u,region:m,version:g,language:h,libraries:p}=n;Ke({key:u,region:m,v:g,language:h,libraries:p})},f=u=>{const m=u?u.maps:google.maps;s.value=l.markRaw(m),o.value=l.markRaw(new m.Map(t.value,c()));const g=Xe(s.value);s.value[z]=g,me.forEach(p=>{var y;(y=o.value)==null||y.addListener(p,v=>e(p,v))}),r.value=!0;const h=Object.keys(n).filter(p=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(p)).map(p=>l.toRef(n,p));l.watch([()=>n.center,()=>n.zoom,...h],([p,y],[v,w])=>{var C,j,F;const{center:E,zoom:R,...O}=c();(C=o.value)==null||C.setOptions(O),y!==void 0&&y!==w&&((j=o.value)==null||j.setZoom(y));const S=!v||p.lng!==v.lng||p.lat!==v.lat;p&&S&&((F=o.value)==null||F.panTo(p))})};return l.onMounted(()=>{if(n.apiPromise&&n.apiPromise instanceof Promise)n.apiPromise.then(f);else{fe||(d(),fe=!0);const u=n.libraries&&n.libraries.length>0?n.libraries:["maps","marker"];Promise.all(u.map(m=>Ye(m))).then(()=>f())}}),l.onBeforeUnmount(()=>{var u;i.value=!1,o.value&&((u=s.value)==null||u.event.clearInstanceListeners(o.value))}),{mapRef:t,ready:r,map:o,api:s,mapTilesLoaded:i}}}),Sr="",$=(n,e)=>{const t=n.__vccOpts||n;for(const[r,o]of e)t[r]=o;return t},et={ref:"mapRef",class:"mapdiv"};function tt(n,e,t,r,o,s){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",et,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 rt=$(Qe,[["render",tt],["__scopeId","data-v-c6aa3e71"]]);function nt(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ot=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,o,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!n(e[o],t[o]))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(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!n(e[i],t[i]))return!1}return!0}return e!==e&&t!==t};const D=nt(ot),he=["click","drag","dragend","dragstart","gmp-click"],st=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:he,setup(n,{emit:e,expose:t,slots:r}){const o=l.ref(),s=l.computed(()=>{var g;return(g=r.content)==null?void 0:g.call(r).some(h=>h.type!==l.Comment)}),i=l.toRef(n,"options"),c=l.toRef(n,"pinOptions"),a=l.ref(),d=l.inject(M,l.ref()),f=l.inject(b,l.ref()),u=l.inject(Q,l.ref()),m=l.computed(()=>!!(u.value&&f.value&&a.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([d,i,c,o],async(g,[h,p,y,v])=>{var C,j,F;const w=!D(i.value,p)||!D(c.value,y),E=o.value!==v,R=w||E||d.value!==h;if(!d.value||!f.value||!R||s.value&&!o.value)return;const{AdvancedMarkerElement:O,PinElement:S}=f.value.marker;if(a.value){const{map:ue,content:J,...de}=i.value;Object.assign(a.value,{content:s.value?o.value:c.value?new S(c.value).element:J,...de}),m.value&&((C=u.value)==null||C.removeMarker(a.value),(j=u.value)==null||j.addMarker(a.value))}else s.value?i.value.content=o.value:c.value&&(i.value.content=new S(c.value).element),a.value=l.markRaw(new O(i.value)),m.value?(F=u.value)==null||F.addMarker(a.value):a.value.map=d.value,he.forEach(ue=>{var J;(J=a.value)==null||J.addListener(ue,de=>e(ue,de))})},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var g,h;a.value&&((g=f.value)==null||g.event.clearInstanceListeners(a.value),m.value?(h=u.value)==null||h.removeMarker(a.value):a.value.map=null)}),l.provide(X,a),t({marker:a}),{hasCustomSlotContent:s,markerRef:o}}}),br="",at={key:0,class:"advanced-marker-wrapper"};function it(n,e,t,r,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[n.hasCustomSlotContent?(l.openBlock(),l.createElementBlock("div",at,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},n.$attrs),[l.renderSlot(n.$slots,"content")],16)])):l.createCommentVNode("v-if",!0),l.renderSlot(n.$slots,"default")],64)}const lt=$(st,[["render",it]]),ge=n=>n==="Marker",ye=n=>n===z,N=(n,e,t,r)=>{const o=l.ref(),s=l.inject(M,l.ref()),i=l.inject(b,l.ref()),c=l.inject(Q,l.ref()),a=l.computed(()=>!!(c.value&&i.value&&(o.value instanceof i.value.Marker||o.value instanceof i.value[z])));return l.watch([s,t],(d,[f,u])=>{var g,h,p;const m=!D(t.value,u)||s.value!==f;if(!(!s.value||!i.value||!m))if(o.value)o.value.setOptions(t.value),a.value&&((g=c.value)==null||g.removeMarker(o.value),(h=c.value)==null||h.addMarker(o.value));else{if(ge(n))o.value=l.markRaw(new i.value[n](t.value));else if(ye(n)){const y=t.value;y.element&&(o.value=l.markRaw(new i.value[n](y)))}else o.value=l.markRaw(new i.value[n]({...t.value,map:s.value}));o.value&&(a.value?(p=c.value)==null||p.addMarker(o.value):(ge(n)||ye(n))&&o.value.setMap(s.value)),e.forEach(y=>{var v;(v=o.value)==null||v.addListener(y,w=>r(y,w))})}},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var d,f;o.value&&((d=i.value)==null||d.event.clearInstanceListeners(o.value),a.value?(f=c.value)==null||f.removeMarker(o.value):o.value.setMap(null))}),o},ve=["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"],ct=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ve,setup(n,{emit:e,expose:t,slots:r}){const o=l.toRef(n,"options"),s=N("Marker",ve,o,e);return l.provide(X,s),t({marker:s}),()=>{var i;return(i=r.default)==null?void 0:i.call(r)}}}),ut=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:B,setup(n,{emit:e}){const t=l.toRef(n,"options");return{polyline:N("Polyline",B,t,e)}},render:()=>null}),dt=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:B,setup(n,{emit:e}){const t=l.toRef(n,"options");return{polygon:N("Polygon",B,t,e)}},render:()=>null}),we=B.concat(["bounds_changed"]),pt=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:we,setup(n,{emit:e}){const t=l.toRef(n,"options");return{rectangle:N("Rectangle",we,t,e)}},render:()=>null}),_e=B.concat(["center_changed","radius_changed"]),ft=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:_e,setup(n,{emit:e}){const t=l.toRef(n,"options");return{circle:N("Circle",_e,t,e)}},render:()=>null}),mt=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(M,l.ref()),o=l.inject(b,l.ref()),s=l.inject(ee,l.ref(!1)),i=l.watch([s,o,t],([d,f,u])=>{f&&d&&u&&(c(n.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),c=d=>{if(r.value&&o.value&&t.value){const f=o.value.ControlPosition[d];t.value.index=n.index,r.value.controls[f].push(t.value)}},a=d=>{if(r.value&&o.value){let f=null;const u=o.value.ControlPosition[d];r.value.controls[u].forEach((m,g)=>{m===t.value&&(f=g)}),f!==null&&r.value.controls[u].removeAt(f)}};return l.onBeforeUnmount(()=>a(n.position)),l.watch(()=>n.position,(d,f)=>{a(f),c(d)}),l.watch(()=>n.index,d=>{t.value&&(t.value.index=d)}),{controlRef:t}}}),Ar="",ht={ref:"controlRef",class:"custom-control-wrapper"};function gt(n,e,t,r,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createCommentVNode(`
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c6aa3e71]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ae91c15f]{display:none}.mapdiv .custom-control-wrapper[data-v-ae91c15f]{display:inline-block}.info-window-wrapper[data-v-cd53e37a]{display:none}.mapdiv .info-window-wrapper[data-v-cd53e37a]{display:inline-block}.custom-marker-wrapper[data-v-4b2eafc1]{display:none}.mapdiv .custom-marker-wrapper[data-v-4b2eafc1]{display:inline-block}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(_,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(_=typeof globalThis<"u"?globalThis:_||self,i(_.Vue3GoogleMap={},_.Vue))})(this,function(_,i){"use strict";var Or=Object.defineProperty;var Pr=(_,i,M)=>i in _?Or(_,i,{enumerable:!0,configurable:!0,writable:!0,value:M}):_[i]=M;var pe=(_,i,M)=>(Pr(_,typeof i!="symbol"?i+"":i,M),M);const M=Symbol("map"),b=Symbol("api"),X=Symbol("marker"),Q=Symbol("markerCluster"),z=Symbol("CustomMarker"),ee=Symbol("mapTilesLoaded"),B=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function Ue(n,e){n.src=e}const Ze=n=>{var e,t,r,o="The Google Maps JavaScript API",s="google",l="importLibrary",c="__ib__",a=document,d=window,f=d[s]||(d[s]={}),u=f.maps||(f.maps={}),m=new Set,h=new URLSearchParams,g=()=>e||(e=new Promise(async(p,y)=>{var v;await(t=a.createElement("script")),h.set("libraries",[...m]+"");for(r in n)h.set(r.replace(/[A-Z]/g,w=>"_"+w[0].toLowerCase()),n[r]);h.set("callback",s+".maps."+c),Ue(t,"https://maps.googleapis.com/maps/api/js?"+h),u[c]=p,t.onerror=()=>e=y(Error(o+" could not load.")),t.nonce=((v=a.querySelector("script[nonce]"))==null?void 0:v.nonce)||"",a.head.append(t)}));u[l]?console.warn(o+" only loads once. Ignoring:",n):u[l]=(p,...y)=>m.add(p)&&g().then(()=>u[l](p,...y))},Ge=n=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(n)}) will be ignored.`,Fe=n=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(n)}) will be ignored.`,ze="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",We="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",te=process.env.NODE_ENV!=="production"?n=>{console.warn(`[@googlemaps/js-api-loader] ${n}`)}:()=>{},He=process.env.NODE_ENV!=="production"?n=>{console.info(`[@googlemaps/js-api-loader] ${n}`)}:()=>{};let re=!1;function Ke(n){if(re){te(Ge(n));return}Je(n),re=!0}async function Ye(n){var e,t;if(re||te(ze),!((t=(e=window==null?void 0:window.google)==null?void 0:e.maps)!=null&&t.importLibrary))throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(n)}function Je(n){var t,r;const e=!!((r=(t=window.google)==null?void 0:t.maps)!=null&&r.importLibrary);e?He(Fe(n)):process.env.NODE_ENV!=="production"&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&te(We),e||Ze(n)}function Xe(n){return class extends n.OverlayView{constructor(r){super();pe(this,"element");pe(this,"opts");const{element:o,...s}=r;this.element=o,this.opts=s,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(),o=r==null?void 0:r.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let s,l;switch(this.opts.anchorPoint){case"TOP_CENTER":s="-50%",l="-100%";break;case"BOTTOM_CENTER":s="-50%",l="0";break;case"LEFT_CENTER":s="-100%",l="-50%";break;case"RIGHT_CENTER":s="0",l="-50%";break;case"TOP_LEFT":s="-100%",l="-100%";break;case"TOP_RIGHT":s="0",l="-100%";break;case"BOTTOM_LEFT":s="-100%",l="0";break;case"BOTTOM_RIGHT":s="0",l="0";break;default:s="-50%",l="-50%"}const c=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${s}) translateX(${c}) translateY(${l}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(r){const{element:o,...s}=r;this.element=o,this.opts=s,this.draw()}}}let fe=!1;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"],Qe=i.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}},emits:me,setup(n,{emit:e}){const t=i.ref(),r=i.ref(!1),o=i.ref(),s=i.ref(),l=i.ref(!1);i.provide(M,o),i.provide(b,s),i.provide(ee,l);const c=()=>{const u={...n};Object.keys(u).forEach(p=>{u[p]===void 0&&delete u[p]});const h=p=>{var y;return p?{position:(y=s.value)==null?void 0:y.ControlPosition[p]}:{}},g={scaleControlOptions:n.scaleControlStyle?{style:n.scaleControlStyle}:{},panControlOptions:h(n.panControlPosition),zoomControlOptions:h(n.zoomControlPosition),rotateControlOptions:h(n.rotateControlPosition),streetViewControlOptions:h(n.streetViewControlPosition),fullscreenControlOptions:h(n.fullscreenControlPosition),cameraControlOptions:h(n.cameraControlPosition),disableDefaultUI:n.disableDefaultUi};return{...u,...g}},a=i.watch([s,o],([u,m])=>{const h=u,g=m;h&&g&&(h.event.addListenerOnce(g,"tilesloaded",()=>{l.value=!0}),setTimeout(a,0))},{immediate:!0}),d=()=>{const{apiKey:u,region:m,version:h,language:g,libraries:p}=n;Ke({key:u,region:m,v:h,language:g,libraries:p})},f=u=>{const m=u?u.maps:google.maps;s.value=i.markRaw(m),o.value=i.markRaw(new m.Map(t.value,c()));const h=Xe(s.value);s.value[z]=h,me.forEach(p=>{var y;(y=o.value)==null||y.addListener(p,v=>e(p,v))}),r.value=!0;const g=Object.keys(n).filter(p=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(p)).map(p=>i.toRef(n,p));i.watch([()=>n.center,()=>n.zoom,...g],([p,y],[v,w])=>{var C,j,F;const{center:E,zoom:R,...O}=c();(C=o.value)==null||C.setOptions(O),y!==void 0&&y!==w&&((j=o.value)==null||j.setZoom(y));const S=!v||p.lng!==v.lng||p.lat!==v.lat;p&&S&&((F=o.value)==null||F.panTo(p))})};return i.onMounted(()=>{if(n.apiPromise&&n.apiPromise instanceof Promise)n.apiPromise.then(f);else{fe||(d(),fe=!0);const u=n.libraries&&n.libraries.length>0?n.libraries:["maps","marker"];Promise.all(u.map(m=>Ye(m))).then(()=>f())}}),i.onBeforeUnmount(()=>{var u;l.value=!1,o.value&&((u=s.value)==null||u.event.clearInstanceListeners(o.value))}),{mapRef:t,ready:r,map:o,api:s,mapTilesLoaded:l}}}),Sr="",$=(n,e)=>{const t=n.__vccOpts||n;for(const[r,o]of e)t[r]=o;return t},et={ref:"mapRef",class:"mapdiv"};function tt(n,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",et,null,512),i.renderSlot(n.$slots,"default",i.normalizeProps(i.guardReactiveProps({ready:n.ready,map:n.map,api:n.api,mapTilesLoaded:n.mapTilesLoaded})),void 0,!0)])}const rt=$(Qe,[["render",tt],["__scopeId","data-v-c6aa3e71"]]);function nt(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ot=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,o,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!n(e[o],t[o]))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(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=r;o--!==0;){var l=s[o];if(!n(e[l],t[l]))return!1}return!0}return e!==e&&t!==t};const D=nt(ot),he=["click","drag","dragend","dragstart","gmp-click"],st=i.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:he,setup(n,{emit:e,expose:t,slots:r}){const o=i.ref(),s=i.computed(()=>{var h;return(h=r.content)==null?void 0:h.call(r).some(g=>g.type!==i.Comment)}),l=i.toRef(n,"options"),c=i.toRef(n,"pinOptions"),a=i.ref(),d=i.inject(M,i.ref()),f=i.inject(b,i.ref()),u=i.inject(Q,i.ref()),m=i.computed(()=>!!(u.value&&f.value&&a.value instanceof google.maps.marker.AdvancedMarkerElement));return i.watch([d,l,c,o],async(h,[g,p,y,v])=>{var C,j,F;const w=!D(l.value,p)||!D(c.value,y),E=o.value!==v,R=w||E||d.value!==g;if(!d.value||!f.value||!R||s.value&&!o.value)return;const{AdvancedMarkerElement:O,PinElement:S}=f.value.marker;if(a.value){const{map:ue,content:J,...de}=l.value;Object.assign(a.value,{content:s.value?o.value:c.value?new S(c.value).element:J,...de}),m.value&&((C=u.value)==null||C.removeMarker(a.value),(j=u.value)==null||j.addMarker(a.value))}else s.value?l.value.content=o.value:c.value&&(l.value.content=new S(c.value).element),a.value=i.markRaw(new O(l.value)),m.value?(F=u.value)==null||F.addMarker(a.value):a.value.map=d.value,he.forEach(ue=>{var J;(J=a.value)==null||J.addListener(ue,de=>e(ue,de))})},{immediate:!0,flush:"post"}),i.onBeforeUnmount(()=>{var h,g;a.value&&((h=f.value)==null||h.event.clearInstanceListeners(a.value),m.value?(g=u.value)==null||g.removeMarker(a.value):a.value.map=null)}),i.provide(X,a),t({marker:a}),{hasCustomSlotContent:s,markerRef:o}}}),br="",at={key:0,class:"advanced-marker-wrapper"};function it(n,e,t,r,o,s){return i.openBlock(),i.createElementBlock(i.Fragment,null,[n.hasCustomSlotContent?(i.openBlock(),i.createElementBlock("div",at,[i.createElementVNode("div",i.mergeProps({ref:"markerRef"},n.$attrs),[i.renderSlot(n.$slots,"content")],16)])):i.createCommentVNode("v-if",!0),i.renderSlot(n.$slots,"default")],64)}const lt=$(st,[["render",it]]),ge=n=>n==="Marker",ye=n=>n===z,N=(n,e,t,r)=>{const o=i.ref(),s=i.inject(M,i.ref()),l=i.inject(b,i.ref()),c=i.inject(Q,i.ref()),a=i.computed(()=>!!(c.value&&l.value&&(o.value instanceof l.value.Marker||o.value instanceof l.value[z])));return i.watch([s,t],(d,[f,u])=>{var h,g,p;const m=!D(t.value,u)||s.value!==f;if(!(!s.value||!l.value||!m))if(o.value)o.value.setOptions(t.value),a.value&&((h=c.value)==null||h.removeMarker(o.value),(g=c.value)==null||g.addMarker(o.value));else{if(ge(n))o.value=i.markRaw(new l.value[n](t.value));else if(ye(n)){const y=t.value;y.element&&(o.value=i.markRaw(new l.value[n](y)))}else o.value=i.markRaw(new l.value[n]({...t.value,map:s.value}));o.value&&(a.value?(p=c.value)==null||p.addMarker(o.value):(ge(n)||ye(n))&&o.value.setMap(s.value)),e.forEach(y=>{var v;(v=o.value)==null||v.addListener(y,w=>r(y,w))})}},{immediate:!0,flush:"post"}),i.onBeforeUnmount(()=>{var d,f;o.value&&((d=l.value)==null||d.event.clearInstanceListeners(o.value),a.value?(f=c.value)==null||f.removeMarker(o.value):o.value.setMap(null))}),o},ve=["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"],ct=i.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ve,setup(n,{emit:e,expose:t,slots:r}){const o=i.toRef(n,"options"),s=N("Marker",ve,o,e);return i.provide(X,s),t({marker:s}),()=>{var l;return(l=r.default)==null?void 0:l.call(r)}}}),ut=i.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:B,setup(n,{emit:e}){const t=i.toRef(n,"options");return{polyline:N("Polyline",B,t,e)}},render:()=>null}),dt=i.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:B,setup(n,{emit:e}){const t=i.toRef(n,"options");return{polygon:N("Polygon",B,t,e)}},render:()=>null}),we=B.concat(["bounds_changed"]),pt=i.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:we,setup(n,{emit:e}){const t=i.toRef(n,"options");return{rectangle:N("Rectangle",we,t,e)}},render:()=>null}),_e=B.concat(["center_changed","radius_changed"]),ft=i.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:_e,setup(n,{emit:e}){const t=i.toRef(n,"options");return{circle:N("Circle",_e,t,e)}},render:()=>null}),mt=i.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(n,{emit:e}){const t=i.ref(null),r=i.inject(M,i.ref()),o=i.inject(b,i.ref()),s=i.inject(ee,i.ref(!1)),l=i.watch([s,o,t],([d,f,u])=>{f&&d&&u&&(c(n.position),e("content:loaded"),setTimeout(l,0))},{immediate:!0}),c=d=>{if(r.value&&o.value&&t.value){const f=o.value.ControlPosition[d];t.value.index=n.index,r.value.controls[f].push(t.value)}},a=d=>{if(r.value&&o.value){let f=null;const u=o.value.ControlPosition[d];r.value.controls[u].forEach((m,h)=>{m===t.value&&(f=h)}),f!==null&&r.value.controls[u].removeAt(f)}};return i.onBeforeUnmount(()=>a(n.position)),i.watch(()=>n.position,(d,f)=>{a(f),c(d)}),i.watch(()=>n.index,d=>{t.value&&(t.value.index=d)}),{controlRef:t}}}),Ar="",ht={ref:"controlRef",class:"custom-control-wrapper"};function gt(n,e,t,r,o,s){return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createCommentVNode(`
|
|
3
3
|
v-show must be used instead of v-if otherwise there
|
|
4
4
|
would be no rendered content pushed to the map controls
|
|
5
|
-
`),l.createElementVNode("div",ht,[l.renderSlot(n.$slots,"default",{},void 0,!0)],512)],2112)}const yt=$(mt,[["render",gt],["__scopeId","data-v-ae91c15f"]]),Ee=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],vt=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...Ee,"update:modelValue"],setup(n,{slots:e,emit:t,expose:r}){const o=l.ref(),s=l.ref(),i=l.inject(M,l.ref()),c=l.inject(b,l.ref()),a=l.inject(X,l.ref());let d,f=n.modelValue;const u=l.computed(()=>{var p;return(p=e.default)==null?void 0:p.call(e).some(y=>y.type!==l.Comment)}),m=p=>{f=p,t("update:modelValue",p)},g=p=>{o.value&&(o.value.open({map:i.value,anchor:a.value,...p}),m(!0))},h=()=>{o.value&&(o.value.close(),m(!1))};return l.onMounted(()=>{l.watch([i,()=>n.options],([p,y],[v,w])=>{var R;const E=!D(y,w)||i.value!==v;i.value&&c.value&&E&&(o.value?(o.value.setOptions({...y,content:u.value?s.value:y.content}),a.value||g()):(o.value=l.markRaw(new c.value.InfoWindow({...y,content:u.value?s.value:y.content})),a.value&&(d=a.value.addListener("click",()=>{g()})),(!a.value||f)&&g(),Ee.forEach(O=>{var S;(S=o.value)==null||S.addListener(O,C=>t(O,C))}),(R=o.value)==null||R.addListener("closeclick",()=>m(!1))))},{immediate:!0,flush:"post"}),l.watch(()=>n.modelValue,p=>{p!==f&&(p?g():h())})}),l.onBeforeUnmount(()=>{var p;d&&d.remove(),o.value&&((p=c.value)==null||p.event.clearInstanceListeners(o.value),h())}),r({infoWindow:o,open:g,close:h}),{infoWindow:o,infoWindowRef:s,hasSlotContent:u,open:g,close:h}}}),qr="",wt={key:0,class:"info-window-wrapper"};function _t(n,e,t,r,o,s){return n.hasSlotContent?(l.openBlock(),l.createElementBlock("div",wt,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},n.$attrs),[l.renderSlot(n.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("v-if",!0)}const Et=$(vt,[["render",_t],["__scopeId","data-v-0e669f85"]]);var kt=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty;function ke(n,e){return function(r,o,s){return n(r,o,s)&&e(r,o,s)}}function W(n){return function(t,r,o){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,o);var s=o.cache,i=s.get(t),c=s.get(r);if(i&&c)return i===r&&c===t;s.set(t,r),s.set(r,t);var a=n(t,r,o);return s.delete(t),s.delete(r),a}}function Ce(n){return kt(n).concat(Ct(n))}var Ot=Object.hasOwn||function(n,e){return Mt.call(n,e)};function x(n,e){return n===e||!n&&!e&&n!==n&&e!==e}var Pt="__v",St="__o",bt="_owner",Me=Object.getOwnPropertyDescriptor,Oe=Object.keys;function At(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 x(n.getTime(),e.getTime())}function Tt(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function Lt(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 o=new Array(r),s=n.entries(),i,c,a=0;(i=s.next())&&!i.done;){for(var d=e.entries(),f=!1,u=0;(c=d.next())&&!c.done;){if(o[u]){u++;continue}var m=i.value,g=c.value;if(t.equals(m[0],g[0],a,u,n,e,t)&&t.equals(m[1],g[1],m[0],g[0],n,e,t)){f=o[u]=!0;break}u++}if(!f)return!1;a++}return!0}var Rt=x;function jt(n,e,t){var r=Oe(n),o=r.length;if(Oe(e).length!==o)return!1;for(;o-- >0;)if(!be(n,e,t,r[o]))return!1;return!0}function V(n,e,t){var r=Ce(n),o=r.length;if(Ce(e).length!==o)return!1;for(var s,i,c;o-- >0;)if(s=r[o],!be(n,e,t,s)||(i=Me(n,s),c=Me(e,s),(i||c)&&(!i||!c||i.configurable!==c.configurable||i.enumerable!==c.enumerable||i.writable!==c.writable)))return!1;return!0}function xt(n,e){return x(n.valueOf(),e.valueOf())}function It(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 o=new Array(r),s=n.values(),i,c;(i=s.next())&&!i.done;){for(var a=e.values(),d=!1,f=0;(c=a.next())&&!c.done;){if(!o[f]&&t.equals(i.value,c.value,i.value,c.value,n,e,t)){d=o[f]=!0;break}f++}if(!d)return!1}return!0}function Bt(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 Nt(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===bt||r===St||r===Pt)&&(n.$$typeof||e.$$typeof)?!0:Ot(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}var $t="[object Arguments]",Dt="[object Boolean]",Vt="[object Date]",Ut="[object Error]",Zt="[object Map]",Gt="[object Number]",Ft="[object Object]",zt="[object RegExp]",Wt="[object Set]",Ht="[object String]",Kt="[object URL]",Yt=Array.isArray,Ae=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,qe=Object.assign,Jt=Object.prototype.toString.call.bind(Object.prototype.toString);function Xt(n){var e=n.areArraysEqual,t=n.areDatesEqual,r=n.areErrorsEqual,o=n.areFunctionsEqual,s=n.areMapsEqual,i=n.areNumbersEqual,c=n.areObjectsEqual,a=n.arePrimitiveWrappersEqual,d=n.areRegExpsEqual,f=n.areSetsEqual,u=n.areTypedArraysEqual,m=n.areUrlsEqual;return function(h,p,y){if(h===p)return!0;if(h==null||p==null)return!1;var v=typeof h;if(v!==typeof p)return!1;if(v!=="object")return v==="number"?i(h,p,y):v==="function"?o(h,p,y):!1;var w=h.constructor;if(w!==p.constructor)return!1;if(w===Object)return c(h,p,y);if(Yt(h))return e(h,p,y);if(Ae!=null&&Ae(h))return u(h,p,y);if(w===Date)return t(h,p,y);if(w===RegExp)return d(h,p,y);if(w===Map)return s(h,p,y);if(w===Set)return f(h,p,y);var E=Jt(h);return E===Vt?t(h,p,y):E===zt?d(h,p,y):E===Zt?s(h,p,y):E===Wt?f(h,p,y):E===Ft?typeof h.then!="function"&&typeof p.then!="function"&&c(h,p,y):E===Kt?m(h,p,y):E===Ut?r(h,p,y):E===$t?c(h,p,y):E===Dt||E===Gt||E===Ht?a(h,p,y):!1}}function Qt(n){var e=n.circular,t=n.createCustomConfig,r=n.strict,o={areArraysEqual:r?V:At,areDatesEqual:qt,areErrorsEqual:Tt,areFunctionsEqual:Lt,areMapsEqual:r?ke(Pe,V):Pe,areNumbersEqual:Rt,areObjectsEqual:r?V:jt,arePrimitiveWrappersEqual:xt,areRegExpsEqual:It,areSetsEqual:r?ke(Se,V):Se,areTypedArraysEqual:r?V:Bt,areUrlsEqual:Nt};if(t&&(o=qe({},o,t(o))),e){var s=W(o.areArraysEqual),i=W(o.areMapsEqual),c=W(o.areObjectsEqual),a=W(o.areSetsEqual);o=qe({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:c,areSetsEqual:a})}return o}function er(n){return function(e,t,r,o,s,i,c){return n(e,t,c)}}function tr(n){var e=n.circular,t=n.comparator,r=n.createState,o=n.equals,s=n.strict;if(r)return function(a,d){var f=r(),u=f.cache,m=u===void 0?e?new WeakMap:void 0:u,g=f.meta;return t(a,d,{cache:m,equals:o,meta:g,strict:s})};if(e)return function(a,d){return t(a,d,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(a,d){return t(a,d,i)}}var H=A();A({strict:!0}),A({circular:!0}),A({circular:!0,strict:!0}),A({createInternalComparator:function(){return x}}),A({strict:!0,createInternalComparator:function(){return x}}),A({circular:!0,createInternalComparator:function(){return x}}),A({circular:!0,createInternalComparator:function(){return x},strict:!0});function A(n){n===void 0&&(n={});var e=n.circular,t=e===void 0?!1:e,r=n.createInternalComparator,o=n.createState,s=n.strict,i=s===void 0?!1:s,c=Qt(n),a=Xt(c),d=r?r(a):er(a);return tr({circular:t,comparator:a,createState:o,equals:d,strict:i})}const Te=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ne=1,U=8;class oe{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 o=r>>4;if(o!==ne)throw new Error(`Got v${o} data when expected v${ne}.`);const s=Te[r&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new oe(c,i,s,e)}constructor(e,t=64,r=Float64Array,o){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 s=Te.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-c%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,U,e),this.coords=new this.ArrayType(this.data,U+c+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(U+i+c+a),this.ids=new this.IndexArrayType(this.data,U,e),this.coords=new this.ArrayType(this.data,U+c+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ne<<4)+s]),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 se(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:c}=this,a=[0,s.length-1,0],d=[];for(;a.length;){const f=a.pop()||0,u=a.pop()||0,m=a.pop()||0;if(u-m<=c){for(let y=m;y<=u;y++){const v=i[2*y],w=i[2*y+1];v>=e&&v<=r&&w>=t&&w<=o&&d.push(s[y])}continue}const g=m+u>>1,h=i[2*g],p=i[2*g+1];h>=e&&h<=r&&p>=t&&p<=o&&d.push(s[g]),(f===0?e<=h:t<=p)&&(a.push(m),a.push(g-1),a.push(1-f)),(f===0?r>=h:o>=p)&&(a.push(g+1),a.push(u),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:o,coords:s,nodeSize:i}=this,c=[0,o.length-1,0],a=[],d=r*r;for(;c.length;){const f=c.pop()||0,u=c.pop()||0,m=c.pop()||0;if(u-m<=i){for(let y=m;y<=u;y++)Re(s[2*y],s[2*y+1],e,t)<=d&&a.push(o[y]);continue}const g=m+u>>1,h=s[2*g],p=s[2*g+1];Re(h,p,e,t)<=d&&a.push(o[g]),(f===0?e-r<=h:t-r<=p)&&(c.push(m),c.push(g-1),c.push(1-f)),(f===0?e+r>=h:t+r>=p)&&(c.push(g+1),c.push(u),c.push(1-f))}return a}}function se(n,e,t,r,o,s){if(o-r<=t)return;const i=r+o>>1;Le(n,e,i,r,o,s),se(n,e,t,r,i-1,1-s),se(n,e,t,i+1,o,1-s)}function Le(n,e,t,r,o,s){for(;o>r;){if(o-r>600){const d=o-r+1,f=t-r+1,u=Math.log(d),m=.5*Math.exp(2*u/3),g=.5*Math.sqrt(u*m*(d-m)/d)*(f-d/2<0?-1:1),h=Math.max(r,Math.floor(t-f*m/d+g)),p=Math.min(o,Math.floor(t+(d-f)*m/d+g));Le(n,e,t,h,p,s)}const i=e[2*t+s];let c=r,a=o;for(Z(n,e,r,t),e[2*o+s]>i&&Z(n,e,r,o);c<a;){for(Z(n,e,c,a),c++,a--;e[2*c+s]<i;)c++;for(;e[2*a+s]>i;)a--}e[2*r+s]===i?Z(n,e,r,a):(a++,Z(n,e,a,o)),a<=t&&(r=a+1),t<=a&&(o=a-1)}}function Z(n,e,t,r){ae(n,t,r),ae(e,2*t,2*r),ae(e,2*t+1,2*r+1)}function ae(n,e,t){const r=n[e];n[e]=n[t],n[t]=r}function Re(n,e,t,r){const o=n-t,s=e-r;return o*o+s*s}const rr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:n=>n},je=Math.fround||(n=>e=>(n[0]=+e,n[0]))(new Float32Array(1)),I=2,q=3,ie=4,T=5,xe=6;class Ie{constructor(e){this.options=Object.assign(Object.create(rr),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:o}=this.options;t&&console.time("total time");const s=`prepare ${e.length} points`;t&&console.time(s),this.points=e;const i=[];for(let a=0;a<e.length;a++){const d=e[a];if(!d.geometry)continue;const[f,u]=d.geometry.coordinates,m=je(K(f)),g=je(Y(u));i.push(m,g,1/0,a,-1,1),this.options.reduce&&i.push(0)}let c=this.trees[o+1]=this._createTree(i);t&&console.timeEnd(s);for(let a=o;a>=r;a--){const d=+Date.now();c=this.trees[a]=this._createTree(this._cluster(c,a)),t&&console.log("z%d: %d clusters in %dms",a,c.numItems,+Date.now()-d)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=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,s=180;else if(r>s){const u=this.getClusters([r,o,180,i],t),m=this.getClusters([-180,o,s,i],t);return u.concat(m)}const c=this.trees[this._limitZoom(t)],a=c.range(K(r),Y(i),K(s),Y(o)),d=c.data,f=[];for(const u of a){const m=this.stride*u;f.push(d[m+T]>1?Be(d,m,this.clusterProps):this.points[d[m+q]])}return f}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(o);const i=s.data;if(t*this.stride>=i.length)throw new Error(o);const c=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=i[t*this.stride],d=i[t*this.stride+1],f=s.within(a,d,c),u=[];for(const m of f){const g=m*this.stride;i[g+ie]===e&&u.push(i[g+T]>1?Be(i,g,this.clusterProps):this.points[i[g+q]])}if(u.length===0)throw new Error(o);return u}getLeaves(e,t,r){t=t||10,r=r||0;const o=[];return this._appendLeaves(o,e,t,r,0),o}getTile(e,t,r){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:i,radius:c}=this.options,a=c/i,d=(r-a)/s,f=(r+1+a)/s,u={features:[]};return this._addTileFeatures(o.range((t-a)/s,d,(t+1+a)/s,f),o.data,t,r,s,u),t===0&&this._addTileFeatures(o.range(1-a/s,d,1,f),o.data,s,r,s,u),t===s-1&&this._addTileFeatures(o.range(0,d,a/s,f),o.data,-1,r,s,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,o,s){const i=this.getChildren(t);for(const c of i){const a=c.properties;if(a&&a.cluster?s+a.point_count<=o?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,r,o,s):s<o?s++:e.push(c),e.length===r)break}return s}_createTree(e){const t=new oe(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,o,s,i){for(const c of e){const a=c*this.stride,d=t[a+T]>1;let f,u,m;if(d)f=Ne(t,a,this.clusterProps),u=t[a],m=t[a+1];else{const p=this.points[t[a+q]];f=p.properties;const[y,v]=p.geometry.coordinates;u=K(y),m=Y(v)}const g={type:1,geometry:[[Math.round(this.options.extent*(u*s-r)),Math.round(this.options.extent*(m*s-o))]],tags:f};let h;d||this.options.generateId?h=t[a+q]:h=this.points[t[a+q]].id,h!==void 0&&(g.id=h),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:o,reduce:s,minPoints:i}=this.options,c=r/(o*Math.pow(2,t)),a=e.data,d=[],f=this.stride;for(let u=0;u<a.length;u+=f){if(a[u+I]<=t)continue;a[u+I]=t;const m=a[u],g=a[u+1],h=e.within(a[u],a[u+1],c),p=a[u+T];let y=p;for(const v of h){const w=v*f;a[w+I]>t&&(y+=a[w+T])}if(y>p&&y>=i){let v=m*p,w=g*p,E,R=-1;const O=((u/f|0)<<5)+(t+1)+this.points.length;for(const S of h){const C=S*f;if(a[C+I]<=t)continue;a[C+I]=t;const j=a[C+T];v+=a[C]*j,w+=a[C+1]*j,a[C+ie]=O,s&&(E||(E=this._map(a,u,!0),R=this.clusterProps.length,this.clusterProps.push(E)),s(E,this._map(a,C)))}a[u+ie]=O,d.push(v/y,w/y,1/0,O,-1,y),s&&d.push(R)}else{for(let v=0;v<f;v++)d.push(a[u+v]);if(y>1)for(const v of h){const w=v*f;if(!(a[w+I]<=t)){a[w+I]=t;for(let E=0;E<f;E++)d.push(a[w+E])}}}}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+T]>1){const i=this.clusterProps[e[t+xe]];return r?Object.assign({},i):i}const o=this.points[e[t+q]].properties,s=this.options.map(o);return r&&s===o?Object.assign({},s):s}}function Be(n,e,t){return{type:"Feature",id:n[e+q],properties:Ne(n,e,t),geometry:{type:"Point",coordinates:[nr(n[e]),or(n[e+1])]}}}function Ne(n,e,t){const r=n[e+T],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=n[e+xe],i=s===-1?{}:Object.assign({},t[s]);return Object.assign(i,{cluster:!0,cluster_id:n[e+q],point_count:r,point_count_abbreviated:o})}function K(n){return n/360+.5}function Y(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 nr(n){return(n-.5)*360}function or(n){const e=(180-n*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function le(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 o=0,r=Object.getOwnPropertySymbols(n);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]]);return t}typeof SuppressedError=="function"&&SuppressedError;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 G{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 P(n,e="assertion failed"){if(n==null)throw Error(e)}const sr=(n,e,t,r)=>{const o=n.getBounds();P(o);const s=$e(o,e,r);return t.filter(i=>s.contains(k.getPosition(i)))},$e=(n,e,t)=>{const{northEast:r,southWest:o}=ir(n,e),s=lr({northEast:r,southWest:o},t);return cr(s,e)},ar=(n,e,t)=>{const r=$e(n,e,t),o=r.getNorthEast(),s=r.getSouthWest();return[s.lng(),s.lat(),o.lng(),o.lat()]},ir=(n,e)=>{const t=e.fromLatLngToDivPixel(n.getNorthEast()),r=e.fromLatLngToDivPixel(n.getSouthWest());return P(t),P(r),{northEast:t,southWest:r}},lr=({northEast:n,southWest:e},t)=>(n.x+=t,n.y-=t,e.x-=t,e.y+=t,{northEast:n,southWest:e}),cr=({northEast:n,southWest:e},t)=>{const r=t.fromDivPixelToLatLng(e),o=t.fromDivPixelToLatLng(n);return new google.maps.LatLngBounds(r,o)};class De{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return dr(e)}}class ur extends De{constructor(e){var{viewportPadding:t=60}=e,r=le(e,["viewportPadding"]);super(r),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:r}){const o=t.getZoom();return P(o),o>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:sr(t,r,e,this.viewportPadding),map:t,mapCanvasProjection:r})}}}const dr=n=>n.map(t=>new G({position:k.getPosition(t),markers:[t]}));class pr extends De{constructor(e){var{maxZoom:t,radius:r=60}=e,o=le(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Ie(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(e){let t=!1,r=e.map.getZoom();P(r),r=Math.round(r);const o={zoom:r};if(!H(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const s=this.markers.map(i=>{const c=k.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[c.lng(),c.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return t||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(t=!H(this.state,o)),this.state=o,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 P(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 G({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});const o=r.marker;return new G({markers:[o],position:k.getPosition(o)})}}class fr extends ur{constructor(e){var{maxZoom:t,radius:r=60,viewportPadding:o=60}=e,s=le(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:o}),this.markers=[],this.clusters=[],this.superCluster=new Ie(Object.assign({maxZoom:this.maxZoom,radius:r},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t=this.getViewportState(e);let r=!H(this.state,t);if(!H(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const o=this.markers.map(s=>{const i=k.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:s}}});this.superCluster.load(o)}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 G({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});const o=r.marker;return new G({markers:[o],position:k.getPosition(o)})}getViewportState(e){const t=e.map.getZoom(),r=e.map.getBounds();return P(t),P(r),{zoom:Math.round(t),view:ar(r,e.mapCanvasProjection,this.viewportPadding)}}}class mr{constructor(e,t){this.markers={sum:e.length};const r=t.map(s=>s.count),o=r.reduce((s,i)=>s+i,0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...r),max:Math.max(...r)}}}}class hr{render({count:e,position:t},r,o){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">
|
|
5
|
+
`),i.createElementVNode("div",ht,[i.renderSlot(n.$slots,"default",{},void 0,!0)],512)],2112)}const yt=$(mt,[["render",gt],["__scopeId","data-v-ae91c15f"]]),Ee=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],vt=i.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...Ee,"update:modelValue"],setup(n,{slots:e,emit:t,expose:r}){const o=i.ref(),s=i.ref(),l=i.inject(M,i.ref()),c=i.inject(b,i.ref()),a=i.inject(X,i.ref());let d,f=n.modelValue;const u=i.computed(()=>{var p;return(p=e.default)==null?void 0:p.call(e).some(y=>y.type!==i.Comment)}),m=p=>{f=p,t("update:modelValue",p)},h=p=>{o.value&&(o.value.open({map:l.value,anchor:a.value,...p}),m(!0))},g=()=>{o.value&&(o.value.close(),m(!1))};return i.onMounted(()=>{i.watch([l,()=>n.options],([p,y],[v,w])=>{var R;const E=!D(y,w)||l.value!==v;l.value&&c.value&&E&&(o.value?(o.value.setOptions({...y,content:u.value?s.value:y.content}),a.value||h()):(o.value=i.markRaw(new c.value.InfoWindow({...y,content:u.value?s.value:y.content})),a.value&&(d=a.value.addListener("click",()=>h())),(!a.value||f)&&h(),Ee.forEach(O=>{var S;(S=o.value)==null||S.addListener(O,C=>t(O,C))}),(R=o.value)==null||R.addListener("closeclick",()=>m(!1))))},{immediate:!0,flush:"post"}),i.watch(a,(p,y)=>{!o.value||p===y||(d&&(d.remove(),d=void 0),p&&(d=p.addListener("click",()=>h())))},{flush:"post"}),i.watch(()=>n.modelValue,p=>{p!==f&&(p?h():g())})}),i.onBeforeUnmount(()=>{var p;d&&d.remove(),o.value&&((p=c.value)==null||p.event.clearInstanceListeners(o.value),g())}),r({infoWindow:o,open:h,close:g}),{infoWindow:o,infoWindowRef:s,hasSlotContent:u,open:h,close:g}}}),qr="",wt={key:0,class:"info-window-wrapper"};function _t(n,e,t,r,o,s){return n.hasSlotContent?(i.openBlock(),i.createElementBlock("div",wt,[i.createElementVNode("div",i.mergeProps({ref:"infoWindowRef"},n.$attrs),[i.renderSlot(n.$slots,"default",{},void 0,!0)],16)])):i.createCommentVNode("v-if",!0)}const Et=$(vt,[["render",_t],["__scopeId","data-v-cd53e37a"]]);var kt=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty;function ke(n,e){return function(r,o,s){return n(r,o,s)&&e(r,o,s)}}function W(n){return function(t,r,o){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,o);var s=o.cache,l=s.get(t),c=s.get(r);if(l&&c)return l===r&&c===t;s.set(t,r),s.set(r,t);var a=n(t,r,o);return s.delete(t),s.delete(r),a}}function Ce(n){return kt(n).concat(Ct(n))}var Ot=Object.hasOwn||function(n,e){return Mt.call(n,e)};function x(n,e){return n===e||!n&&!e&&n!==n&&e!==e}var Pt="__v",St="__o",bt="_owner",Me=Object.getOwnPropertyDescriptor,Oe=Object.keys;function At(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 x(n.getTime(),e.getTime())}function Tt(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function Lt(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 o=new Array(r),s=n.entries(),l,c,a=0;(l=s.next())&&!l.done;){for(var d=e.entries(),f=!1,u=0;(c=d.next())&&!c.done;){if(o[u]){u++;continue}var m=l.value,h=c.value;if(t.equals(m[0],h[0],a,u,n,e,t)&&t.equals(m[1],h[1],m[0],h[0],n,e,t)){f=o[u]=!0;break}u++}if(!f)return!1;a++}return!0}var Rt=x;function jt(n,e,t){var r=Oe(n),o=r.length;if(Oe(e).length!==o)return!1;for(;o-- >0;)if(!be(n,e,t,r[o]))return!1;return!0}function V(n,e,t){var r=Ce(n),o=r.length;if(Ce(e).length!==o)return!1;for(var s,l,c;o-- >0;)if(s=r[o],!be(n,e,t,s)||(l=Me(n,s),c=Me(e,s),(l||c)&&(!l||!c||l.configurable!==c.configurable||l.enumerable!==c.enumerable||l.writable!==c.writable)))return!1;return!0}function xt(n,e){return x(n.valueOf(),e.valueOf())}function It(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 o=new Array(r),s=n.values(),l,c;(l=s.next())&&!l.done;){for(var a=e.values(),d=!1,f=0;(c=a.next())&&!c.done;){if(!o[f]&&t.equals(l.value,c.value,l.value,c.value,n,e,t)){d=o[f]=!0;break}f++}if(!d)return!1}return!0}function Bt(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 Nt(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===bt||r===St||r===Pt)&&(n.$$typeof||e.$$typeof)?!0:Ot(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}var $t="[object Arguments]",Dt="[object Boolean]",Vt="[object Date]",Ut="[object Error]",Zt="[object Map]",Gt="[object Number]",Ft="[object Object]",zt="[object RegExp]",Wt="[object Set]",Ht="[object String]",Kt="[object URL]",Yt=Array.isArray,Ae=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,qe=Object.assign,Jt=Object.prototype.toString.call.bind(Object.prototype.toString);function Xt(n){var e=n.areArraysEqual,t=n.areDatesEqual,r=n.areErrorsEqual,o=n.areFunctionsEqual,s=n.areMapsEqual,l=n.areNumbersEqual,c=n.areObjectsEqual,a=n.arePrimitiveWrappersEqual,d=n.areRegExpsEqual,f=n.areSetsEqual,u=n.areTypedArraysEqual,m=n.areUrlsEqual;return function(g,p,y){if(g===p)return!0;if(g==null||p==null)return!1;var v=typeof g;if(v!==typeof p)return!1;if(v!=="object")return v==="number"?l(g,p,y):v==="function"?o(g,p,y):!1;var w=g.constructor;if(w!==p.constructor)return!1;if(w===Object)return c(g,p,y);if(Yt(g))return e(g,p,y);if(Ae!=null&&Ae(g))return u(g,p,y);if(w===Date)return t(g,p,y);if(w===RegExp)return d(g,p,y);if(w===Map)return s(g,p,y);if(w===Set)return f(g,p,y);var E=Jt(g);return E===Vt?t(g,p,y):E===zt?d(g,p,y):E===Zt?s(g,p,y):E===Wt?f(g,p,y):E===Ft?typeof g.then!="function"&&typeof p.then!="function"&&c(g,p,y):E===Kt?m(g,p,y):E===Ut?r(g,p,y):E===$t?c(g,p,y):E===Dt||E===Gt||E===Ht?a(g,p,y):!1}}function Qt(n){var e=n.circular,t=n.createCustomConfig,r=n.strict,o={areArraysEqual:r?V:At,areDatesEqual:qt,areErrorsEqual:Tt,areFunctionsEqual:Lt,areMapsEqual:r?ke(Pe,V):Pe,areNumbersEqual:Rt,areObjectsEqual:r?V:jt,arePrimitiveWrappersEqual:xt,areRegExpsEqual:It,areSetsEqual:r?ke(Se,V):Se,areTypedArraysEqual:r?V:Bt,areUrlsEqual:Nt};if(t&&(o=qe({},o,t(o))),e){var s=W(o.areArraysEqual),l=W(o.areMapsEqual),c=W(o.areObjectsEqual),a=W(o.areSetsEqual);o=qe({},o,{areArraysEqual:s,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:a})}return o}function er(n){return function(e,t,r,o,s,l,c){return n(e,t,c)}}function tr(n){var e=n.circular,t=n.comparator,r=n.createState,o=n.equals,s=n.strict;if(r)return function(a,d){var f=r(),u=f.cache,m=u===void 0?e?new WeakMap:void 0:u,h=f.meta;return t(a,d,{cache:m,equals:o,meta:h,strict:s})};if(e)return function(a,d){return t(a,d,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var l={cache:void 0,equals:o,meta:void 0,strict:s};return function(a,d){return t(a,d,l)}}var H=A();A({strict:!0}),A({circular:!0}),A({circular:!0,strict:!0}),A({createInternalComparator:function(){return x}}),A({strict:!0,createInternalComparator:function(){return x}}),A({circular:!0,createInternalComparator:function(){return x}}),A({circular:!0,createInternalComparator:function(){return x},strict:!0});function A(n){n===void 0&&(n={});var e=n.circular,t=e===void 0?!1:e,r=n.createInternalComparator,o=n.createState,s=n.strict,l=s===void 0?!1:s,c=Qt(n),a=Xt(c),d=r?r(a):er(a);return tr({circular:t,comparator:a,createState:o,equals:d,strict:l})}const Te=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ne=1,U=8;class oe{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 o=r>>4;if(o!==ne)throw new Error(`Got v${o} data when expected v${ne}.`);const s=Te[r&15];if(!s)throw new Error("Unrecognized array type.");const[l]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new oe(c,l,s,e)}constructor(e,t=64,r=Float64Array,o){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 s=Te.indexOf(this.ArrayType),l=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-c%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,U,e),this.coords=new this.ArrayType(this.data,U+c+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(U+l+c+a),this.ids=new this.IndexArrayType(this.data,U,e),this.coords=new this.ArrayType(this.data,U+c+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ne<<4)+s]),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 se(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:l,nodeSize:c}=this,a=[0,s.length-1,0],d=[];for(;a.length;){const f=a.pop()||0,u=a.pop()||0,m=a.pop()||0;if(u-m<=c){for(let y=m;y<=u;y++){const v=l[2*y],w=l[2*y+1];v>=e&&v<=r&&w>=t&&w<=o&&d.push(s[y])}continue}const h=m+u>>1,g=l[2*h],p=l[2*h+1];g>=e&&g<=r&&p>=t&&p<=o&&d.push(s[h]),(f===0?e<=g:t<=p)&&(a.push(m),a.push(h-1),a.push(1-f)),(f===0?r>=g:o>=p)&&(a.push(h+1),a.push(u),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:o,coords:s,nodeSize:l}=this,c=[0,o.length-1,0],a=[],d=r*r;for(;c.length;){const f=c.pop()||0,u=c.pop()||0,m=c.pop()||0;if(u-m<=l){for(let y=m;y<=u;y++)Re(s[2*y],s[2*y+1],e,t)<=d&&a.push(o[y]);continue}const h=m+u>>1,g=s[2*h],p=s[2*h+1];Re(g,p,e,t)<=d&&a.push(o[h]),(f===0?e-r<=g:t-r<=p)&&(c.push(m),c.push(h-1),c.push(1-f)),(f===0?e+r>=g:t+r>=p)&&(c.push(h+1),c.push(u),c.push(1-f))}return a}}function se(n,e,t,r,o,s){if(o-r<=t)return;const l=r+o>>1;Le(n,e,l,r,o,s),se(n,e,t,r,l-1,1-s),se(n,e,t,l+1,o,1-s)}function Le(n,e,t,r,o,s){for(;o>r;){if(o-r>600){const d=o-r+1,f=t-r+1,u=Math.log(d),m=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*m*(d-m)/d)*(f-d/2<0?-1:1),g=Math.max(r,Math.floor(t-f*m/d+h)),p=Math.min(o,Math.floor(t+(d-f)*m/d+h));Le(n,e,t,g,p,s)}const l=e[2*t+s];let c=r,a=o;for(Z(n,e,r,t),e[2*o+s]>l&&Z(n,e,r,o);c<a;){for(Z(n,e,c,a),c++,a--;e[2*c+s]<l;)c++;for(;e[2*a+s]>l;)a--}e[2*r+s]===l?Z(n,e,r,a):(a++,Z(n,e,a,o)),a<=t&&(r=a+1),t<=a&&(o=a-1)}}function Z(n,e,t,r){ae(n,t,r),ae(e,2*t,2*r),ae(e,2*t+1,2*r+1)}function ae(n,e,t){const r=n[e];n[e]=n[t],n[t]=r}function Re(n,e,t,r){const o=n-t,s=e-r;return o*o+s*s}const rr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:n=>n},je=Math.fround||(n=>e=>(n[0]=+e,n[0]))(new Float32Array(1)),I=2,q=3,ie=4,T=5,xe=6;class Ie{constructor(e){this.options=Object.assign(Object.create(rr),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:o}=this.options;t&&console.time("total time");const s=`prepare ${e.length} points`;t&&console.time(s),this.points=e;const l=[];for(let a=0;a<e.length;a++){const d=e[a];if(!d.geometry)continue;const[f,u]=d.geometry.coordinates,m=je(K(f)),h=je(Y(u));l.push(m,h,1/0,a,-1,1),this.options.reduce&&l.push(0)}let c=this.trees[o+1]=this._createTree(l);t&&console.timeEnd(s);for(let a=o;a>=r;a--){const d=+Date.now();c=this.trees[a]=this._createTree(this._cluster(c,a)),t&&console.log("z%d: %d clusters in %dms",a,c.numItems,+Date.now()-d)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const l=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,s=180;else if(r>s){const u=this.getClusters([r,o,180,l],t),m=this.getClusters([-180,o,s,l],t);return u.concat(m)}const c=this.trees[this._limitZoom(t)],a=c.range(K(r),Y(l),K(s),Y(o)),d=c.data,f=[];for(const u of a){const m=this.stride*u;f.push(d[m+T]>1?Be(d,m,this.clusterProps):this.points[d[m+q]])}return f}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(o);const l=s.data;if(t*this.stride>=l.length)throw new Error(o);const c=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=l[t*this.stride],d=l[t*this.stride+1],f=s.within(a,d,c),u=[];for(const m of f){const h=m*this.stride;l[h+ie]===e&&u.push(l[h+T]>1?Be(l,h,this.clusterProps):this.points[l[h+q]])}if(u.length===0)throw new Error(o);return u}getLeaves(e,t,r){t=t||10,r=r||0;const o=[];return this._appendLeaves(o,e,t,r,0),o}getTile(e,t,r){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:l,radius:c}=this.options,a=c/l,d=(r-a)/s,f=(r+1+a)/s,u={features:[]};return this._addTileFeatures(o.range((t-a)/s,d,(t+1+a)/s,f),o.data,t,r,s,u),t===0&&this._addTileFeatures(o.range(1-a/s,d,1,f),o.data,s,r,s,u),t===s-1&&this._addTileFeatures(o.range(0,d,a/s,f),o.data,-1,r,s,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,o,s){const l=this.getChildren(t);for(const c of l){const a=c.properties;if(a&&a.cluster?s+a.point_count<=o?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,r,o,s):s<o?s++:e.push(c),e.length===r)break}return s}_createTree(e){const t=new oe(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,o,s,l){for(const c of e){const a=c*this.stride,d=t[a+T]>1;let f,u,m;if(d)f=Ne(t,a,this.clusterProps),u=t[a],m=t[a+1];else{const p=this.points[t[a+q]];f=p.properties;const[y,v]=p.geometry.coordinates;u=K(y),m=Y(v)}const h={type:1,geometry:[[Math.round(this.options.extent*(u*s-r)),Math.round(this.options.extent*(m*s-o))]],tags:f};let g;d||this.options.generateId?g=t[a+q]:g=this.points[t[a+q]].id,g!==void 0&&(h.id=g),l.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:r,extent:o,reduce:s,minPoints:l}=this.options,c=r/(o*Math.pow(2,t)),a=e.data,d=[],f=this.stride;for(let u=0;u<a.length;u+=f){if(a[u+I]<=t)continue;a[u+I]=t;const m=a[u],h=a[u+1],g=e.within(a[u],a[u+1],c),p=a[u+T];let y=p;for(const v of g){const w=v*f;a[w+I]>t&&(y+=a[w+T])}if(y>p&&y>=l){let v=m*p,w=h*p,E,R=-1;const O=((u/f|0)<<5)+(t+1)+this.points.length;for(const S of g){const C=S*f;if(a[C+I]<=t)continue;a[C+I]=t;const j=a[C+T];v+=a[C]*j,w+=a[C+1]*j,a[C+ie]=O,s&&(E||(E=this._map(a,u,!0),R=this.clusterProps.length,this.clusterProps.push(E)),s(E,this._map(a,C)))}a[u+ie]=O,d.push(v/y,w/y,1/0,O,-1,y),s&&d.push(R)}else{for(let v=0;v<f;v++)d.push(a[u+v]);if(y>1)for(const v of g){const w=v*f;if(!(a[w+I]<=t)){a[w+I]=t;for(let E=0;E<f;E++)d.push(a[w+E])}}}}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+T]>1){const l=this.clusterProps[e[t+xe]];return r?Object.assign({},l):l}const o=this.points[e[t+q]].properties,s=this.options.map(o);return r&&s===o?Object.assign({},s):s}}function Be(n,e,t){return{type:"Feature",id:n[e+q],properties:Ne(n,e,t),geometry:{type:"Point",coordinates:[nr(n[e]),or(n[e+1])]}}}function Ne(n,e,t){const r=n[e+T],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=n[e+xe],l=s===-1?{}:Object.assign({},t[s]);return Object.assign(l,{cluster:!0,cluster_id:n[e+q],point_count:r,point_count_abbreviated:o})}function K(n){return n/360+.5}function Y(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 nr(n){return(n-.5)*360}function or(n){const e=(180-n*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function le(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 o=0,r=Object.getOwnPropertySymbols(n);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]]);return t}typeof SuppressedError=="function"&&SuppressedError;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 G{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 P(n,e="assertion failed"){if(n==null)throw Error(e)}const sr=(n,e,t,r)=>{const o=n.getBounds();P(o);const s=$e(o,e,r);return t.filter(l=>s.contains(k.getPosition(l)))},$e=(n,e,t)=>{const{northEast:r,southWest:o}=ir(n,e),s=lr({northEast:r,southWest:o},t);return cr(s,e)},ar=(n,e,t)=>{const r=$e(n,e,t),o=r.getNorthEast(),s=r.getSouthWest();return[s.lng(),s.lat(),o.lng(),o.lat()]},ir=(n,e)=>{const t=e.fromLatLngToDivPixel(n.getNorthEast()),r=e.fromLatLngToDivPixel(n.getSouthWest());return P(t),P(r),{northEast:t,southWest:r}},lr=({northEast:n,southWest:e},t)=>(n.x+=t,n.y-=t,e.x-=t,e.y+=t,{northEast:n,southWest:e}),cr=({northEast:n,southWest:e},t)=>{const r=t.fromDivPixelToLatLng(e),o=t.fromDivPixelToLatLng(n);return new google.maps.LatLngBounds(r,o)};class De{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return dr(e)}}class ur extends De{constructor(e){var{viewportPadding:t=60}=e,r=le(e,["viewportPadding"]);super(r),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:r}){const o=t.getZoom();return P(o),o>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:sr(t,r,e,this.viewportPadding),map:t,mapCanvasProjection:r})}}}const dr=n=>n.map(t=>new G({position:k.getPosition(t),markers:[t]}));class pr extends De{constructor(e){var{maxZoom:t,radius:r=60}=e,o=le(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Ie(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(e){let t=!1,r=e.map.getZoom();P(r),r=Math.round(r);const o={zoom:r};if(!H(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const s=this.markers.map(l=>{const c=k.getPosition(l);return{type:"Feature",geometry:{type:"Point",coordinates:[c.lng(),c.lat()]},properties:{marker:l}}});this.superCluster.load(s)}return t||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(t=!H(this.state,o)),this.state=o,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 P(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 G({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});const o=r.marker;return new G({markers:[o],position:k.getPosition(o)})}}class fr extends ur{constructor(e){var{maxZoom:t,radius:r=60,viewportPadding:o=60}=e,s=le(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:o}),this.markers=[],this.clusters=[],this.superCluster=new Ie(Object.assign({maxZoom:this.maxZoom,radius:r},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t=this.getViewportState(e);let r=!H(this.state,t);if(!H(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const o=this.markers.map(s=>{const l=k.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[l.lng(),l.lat()]},properties:{marker:s}}});this.superCluster.load(o)}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 G({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});const o=r.marker;return new G({markers:[o],position:k.getPosition(o)})}getViewportState(e){const t=e.map.getZoom(),r=e.map.getBounds();return P(t),P(r),{zoom:Math.round(t),view:ar(r,e.mapCanvasProjection,this.viewportPadding)}}}class mr{constructor(e,t){this.markers={sum:e.length};const r=t.map(s=>s.count),o=r.reduce((s,l)=>s+l,0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...r),max:Math.max(...r)}}}}class hr{render({count:e,position:t},r,o){const l=`<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">
|
|
6
6
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
7
7
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
8
8
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
9
9
|
<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>
|
|
10
|
-
</svg>`,c=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(k.isAdvancedMarkerAvailable(o)){const u=new DOMParser().parseFromString(
|
|
10
|
+
</svg>`,c=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(k.isAdvancedMarkerAvailable(o)){const u=new DOMParser().parseFromString(l,"image/svg+xml").documentElement;u.setAttribute("transform","translate(0 25)");const m={map:o,position:t,zIndex:a,title:c,content:u};return new google.maps.marker.AdvancedMarkerElement(m)}const d={position:t,zIndex:a,title:c,icon:{url:`data:image/svg+xml;base64,${btoa(l)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(d)}}function gr(n,e){for(let t in e.prototype)n.prototype[t]=e.prototype[t]}class ce{constructor(){gr(ce,google.maps.OverlayView)}}var L;(function(n){n.CLUSTERING_BEGIN="clusteringbegin",n.CLUSTERING_END="clusteringend",n.CLUSTER_CLICK="click",n.GMP_CLICK="gmp-click"})(L||(L={}));const yr=(n,e,t)=>{e.bounds&&t.fitBounds(e.bounds)};class vr extends ce{constructor({map:e,markers:t=[],algorithmOptions:r={},algorithm:o=new pr(r),renderer:s=new hr,onClusterClick:l=yr}){super(),this.map=null,this.idleListener=null,this.markers=[...t],this.clusters=[],this.algorithm=o,this.renderer=s,this.onClusterClick=l,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(o=>{r=this.removeMarker(o,!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,L.CLUSTERING_BEGIN,this);const{clusters:t,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const o=new Set;for(const l of t)l.markers.length==1&&o.add(l.markers[0]);const s=[];for(const l of this.clusters)l.marker!=null&&(l.markers.length==1?o.has(l.marker)||k.setMap(l.marker,null):s.push(l.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>s.forEach(l=>k.setMap(l,null)))}google.maps.event.trigger(this,L.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();P(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 mr(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(o=>k.setMap(o,null)),this.onClusterClick){const o=k.isAdvancedMarker(r.marker)?L.GMP_CLICK:L.CLUSTER_CLICK;r.marker.addListener(o,s=>{google.maps.event.trigger(this,L.CLUSTER_CLICK,r),this.onClusterClick(s,r,t)})}k.setMap(r.marker,t)})}}const Ve=Object.values(L),wr=i.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:Ve,setup(n,{emit:e,expose:t,slots:r}){const o=i.ref(),s=i.inject(M,i.ref()),l=i.inject(b,i.ref());return i.provide(Q,o),i.watch(s,()=>{s.value&&(o.value=i.markRaw(new vr({map:s.value,algorithm:new fr(n.options.algorithmOptions??{}),...n.options})),Ve.forEach(c=>{var a;(a=o.value)==null||a.addListener(c,d=>e(c,d))}))},{immediate:!0}),i.onBeforeUnmount(()=>{var c;o.value&&((c=l.value)==null||c.event.clearInstanceListeners(o.value),o.value.clearMarkers(),o.value.setMap(null))}),t({markerCluster:o}),()=>{var c;return(c=r.default)==null?void 0:c.call(r)}}}),_r=i.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(n,{slots:e,emit:t,expose:r}){const o=i.ref(),s=i.computed(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(d=>d.type!==i.Comment)}),l=i.computed(()=>({...n.options,element:o.value})),c=N(z,[],l,t);return r({customMarker:c}),{customMarkerRef:o,customMarker:c,hasSlotContent:s}}}),Tr="",Er={key:0,class:"custom-marker-wrapper"};function kr(n,e,t,r,o,s){return n.hasSlotContent?(i.openBlock(),i.createElementBlock("div",Er,[i.createElementVNode("div",i.mergeProps({ref:"customMarkerRef",style:{cursor:n.$attrs.onClick?"pointer":void 0}},n.$attrs),[i.renderSlot(n.$slots,"default",{},void 0,!0)],16)])):i.createCommentVNode("v-if",!0)}const Cr=$(_r,[["render",kr],["__scopeId","data-v-4b2eafc1"]]),Mr=i.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(n){const e=i.ref(),t=i.inject(M,i.ref()),r=i.inject(b,i.ref());return i.watch([t,()=>n.options],([o,s],[l,c])=>{const a=!D(s,c)||t.value!==l;if(t.value&&r.value&&a){let d;if(s.data&&!(s.data instanceof r.value.MVCArray)){const f=r.value.LatLng,u=s.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={...s,data:u}}else d=s;e.value?e.value.setOptions(d):e.value=i.markRaw(new r.value.visualization.HeatmapLayer({...d,map:t.value}))}},{immediate:!0}),i.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});_.AdvancedMarker=lt,_.Circle=ft,_.CustomControl=yt,_.CustomMarker=Cr,_.GoogleMap=rt,_.HeatmapLayer=Mr,_.InfoWindow=Et,_.Marker=ct,_.MarkerCluster=wr,_.Polygon=dt,_.Polyline=ut,_.Rectangle=pt,_.apiSymbol=b,_.mapSymbol=M,_.mapTilesLoadedSymbol=ee,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|