/*! YOOtheme Pro v4.5.12 | https://yootheme.com */ (function(t,b,h){"use strict";async function $(m,{type:d,center:f,zoom:o,fit_bounds:a,min_zoom:x,max_zoom:G,zooming:y,dragging:S,clustering:v,cluster_icons:i,controls:A,markers:n,popup_max_width:I,baseUrl:P}){t.Icon.Default.imagePath=`${P}/images/`;const c=t.map(m,{zoom:o,minZoom:Number(x),maxZoom:Number(G),center:f,dragging:S,zoomControl:A,touchZoom:y,scrollWheelZoom:y,doubleClickZoom:y});d==="satellite"?t.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{attribution:'© Esri | DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community'}).addTo(c):t.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap'}).addTo(c);let u;if(v){const s={showCoverageOnHover:!1};i&&(s.iconCreateFunction=r=>{const p=r.getChildCount();let e;p<10?e=i[0]:p<100?e=i[1]||i[0]:e=i[2]||i[1]||i[0];const g=e.textColor?`style="color: ${e.textColor}"`:"";return new t.DivIcon({html:`${p}`,iconSize:e.size?new t.Point(...e.size):null})}),u=t.markerClusterGroup(s),c.addLayer(u)}n==null||n.forEach(({lat:s,lng:r,content:p,show_popup:e,icon:g,iconSize:C,iconAnchor:z,title:E})=>{const l=t.marker({lat:s,lng:r},{title:E});if(g&&l.setIcon(t.icon({iconUrl:g,iconSize:C,iconAnchor:z})),u?u.addLayer(l):l.addTo(c),p){const w={maxWidth:I?parseInt(I,10):300};C&&(w.offset=new t.Point(0,-1*C[1]+7));const M=t.popup(w).setContent(p);l.bindPopup(M),e&&l.openPopup()}}),a&&(n!=null&&n.length)&&c.fitBounds(n.map(({lat:s,lng:r})=>[s,r]),{padding:[50,50]})}b.component("Map",{connected(){var m,d,f;this.script||(this.script=h.$("script",this.$el)),this.script&&((m=this.map)!=null||(this.map=JSON.parse(this.script.textContent)),(d=this.templates)!=null||(this.templates=h.$$("template",this.$el)),(f=this.map.markers)==null||f.forEach((o,a)=>{o.content=h.html(this.templates[a]).trim(),!o.icon&&this.map.icon&&(o.icon=this.map.icon,o.iconSize=this.map.iconSize,o.iconAnchor=this.map.iconAnchor)}),this.map.lazyload&&"IntersectionObserver"in window?h.observeIntersection(this.$el,(o,a)=>{$(this.$el,this.map),a.disconnect()},{rootMargin:`${window.innerHeight/2}px 0px`}):$(this.$el,this.map))}})})(L,UIkit,UIkit.util);