/*! YOOtheme Pro v5.0.29 | https://yootheme.com */

const q=window.UIkit&&Object.prototype.hasOwnProperty.call(window.UIkit,"default")?window.UIkit.default:window.UIkit,{$:F,trigger:Q,$$:V,html:ee,observeIntersection:te}=window.UIkit.util;function ne(e,n){e.src=n}const ie=e=>{var n,t,i,o="The Google Maps JavaScript API",g="google",h="importLibrary",v="__ib__",r=document,M=window,u=M[g]||(M[g]={}),a=u.maps||(u.maps={}),y=new Set,d=new URLSearchParams,b=()=>n||(n=new Promise(async(m,I)=>{var S;await(t=r.createElement("script")),d.set("libraries",[...y]+"");for(i in e)d.set(i.replace(/[A-Z]/g,_=>"_"+_[0].toLowerCase()),e[i]);d.set("callback",g+".maps."+v),ne(t,"https://maps.googleapis.com/maps/api/js?"+d),a[v]=m,t.onerror=()=>n=I(Error(o+" could not load.")),t.nonce=((S=r.querySelector("script[nonce]"))==null?void 0:S.nonce)||"",r.head.append(t)}));a[h]?console.warn(o+" only loads once. Ignoring:",e):a[h]=(m,...I)=>y.add(m)&&b().then(()=>a[h](m,...I))},oe=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,ae=e=>`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(e)}) will be ignored.`,re=()=>{},se=()=>{};let $=!1;function le(e){if($){re(oe(e));return}ce(e),$=!0}async function pe(e){var n,t;if(!((t=(n=window==null?void 0:window.google)==null?void 0:n.maps)!=null&&t.importLibrary))throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(e)}function ce(e){var t,i;const n=!!((i=(t=window.google)==null?void 0:t.maps)!=null&&i.importLibrary);n&&se(ae(e)),n||ie(e)}async function R(e,{apiKey:n,type:t,center:i,zoom:o,fit_bounds:g,min_zoom:h,max_zoom:v,zooming:r,dragging:M,clustering:u,cluster_icons:a,controls:y,poi:d,markers:b=[],styler_invert_lightness:m,styler_hue:I,styler_saturation:S,styler_lightness:_,styler_gamma:z,popup_max_width:C}){de({key:n,version:"weekly"});const[{event:G,LatLng:L,LatLngBounds:B,Size:E,Point:W},{Map:j,MapTypeId:J,InfoWindow:Z,StyledMapType:X},{Marker:A},{MarkerClusterer:H}]=await Promise.all(["core","maps","marker"].map(s=>pe(s)).concat(u?me():{})),l=new j(e,{zoom:Number(o),minZoom:Number(r?h:o),maxZoom:Number(r?v:o),zoomControl:r&&y?null:!1,scrollwheel:r?null:!1,center:new L(i.lat,i.lng),mapTypeId:J[t.toUpperCase()],disableDefaultUI:!y,gestureHandling:M||r?"auto":"none",mapTypeControlOptions:{mapTypeIds:["styled_map","satellite"]}});l.getMapCapabilities=()=>({...l.mapCapabilities,isAdvancedMarkersAvailable:!1});let P;const T=new Z({maxWidth:C?parseInt(C,10):300});let O;if(u){const s={map:l};Array.isArray(a)&&a.length&&(s.renderer={render({count:p,position:f}){const c=p>=100&&a[2]||p>=10&&a[1]||a[0];return new A({position:f,icon:{url:c.url,scaledSize:c.size?new E(...c.size):null},label:{text:String(p),color:c.textColor?c.textColor:null,fontSize:"11px",fontWeight:"bold"},zIndex:Number(A.MAX_ZINDEX)+p})}}),O=new H(s)}for(const{lat:s,lng:p,content:f,show_popup:c,icon:k,iconSize:N,iconAnchor:x,title:Y}of b){const w=new A({map:l,title:Y,position:new L(s,p)});if(k&&w.setIcon({url:k,scaledSize:N?new E(...N):null,anchor:x?new W(...x):null}),O==null||O.addMarker(w),f){const U=()=>{if(T.getMap()&&P===w){T.close();return}T.setContent(f),T.open(l,w),P=w};G.addListener(w,"click",U),c&&U()}}const K=new X([{featureType:"all",elementType:"all",stylers:[{invert_lightness:m},{hue:I},{saturation:S},{lightness:_},{gamma:z}]},{featureType:"poi",stylers:[{visibility:d?"on":"off"}]}],{name:"Map"});if(l.mapTypes.set("styled_map",K),t.toUpperCase()==="ROADMAP"&&l.setMapTypeId("styled_map"),g&&b.length){const s=new B;for(const{lat:p,lng:f}of b)s.extend(new L(p,f));l.fitBounds(s)}}let D=!1;function de(e){D||(le(e),D=!0)}async function me(){return(await import(`${new URL(import.meta.url).pathname}/../map-google-markerclusterer.js`)).default}q.component("Map",{async connected(){var e,n,t;this.script||(this.script=F("script",this.$el)),this.script&&(Q(document,"uikit:connected",this),(e=this.map)!=null||(this.map=JSON.parse(this.script.textContent)),(n=this.templates)!=null||(this.templates=V("template",this.$el)),(t=this.map.markers)==null||t.forEach((i,o)=>{i.content=ee(this.templates[o]).trim(),!i.icon&&this.map.icon&&(i.icon=this.map.icon,i.iconSize=this.map.iconSize,i.iconAnchor=this.map.iconAnchor)}),this.map.lazyload&&"IntersectionObserver"in window?te(this.$el,(i,o)=>{R(this.$el,this.map),o.disconnect()},{rootMargin:`${window.innerHeight/2}px 0px`}):R(this.$el,this.map))}});
