!function(){"use strict";const e={};function t(e,t,a){e.getMap()?e.close():e.open(t,a)}function a(e){if(!google.maps)return;const a=e.querySelectorAll(".marker"),o={zoom:e.dataset.zoom?parseInt(e.dataset.zoom,10):16,mapTypeId:google.maps.MapTypeId.ROADMAP},n=new google.maps.Map(e,o);return n.markers=[],a.forEach(e=>{!function(e,a){const o=a.__gm.developerProvidedDiv,n=e.dataset.radius,s=e.dataset.pin,l=e.dataset.showMarker,r=e.dataset.lat,i=e.dataset.lng,p={lat:parseFloat(r),lng:parseFloat(i)},c=new google.maps.Marker({position:p,map:a,icon:"true"===l?`https://maps.google.com/mapfiles/ms/icons/${s}.png`:"https://maps.gstatic.com/mapfiles/transparent.png"});let d;if(a.markers.push(c),n>0&&(d=new google.maps.Circle({strokeColor:o.dataset.primaryColor.replace(/0x/g,"#"),strokeOpacity:.8,strokeWeight:2,fillColor:o.dataset.secondaryColor.replace(/0x/g,"#"),fillOpacity:.35,map:a,center:p,radius:1609.34*n})),e.innerHTML){let o=e.innerHTML;o=o.replace(/<h[1-6]>|<\/h[1-6]>/gi,e=>e.includes("/")?"</span>":"<span>");const s=new google.maps.InfoWindow({content:o});l&&google.maps.event.addListener(c,"click",function(){t(s,a,c)}),n>0&&google.maps.event.addListener(d,"click",function(){t(s,a,c)})}}(e,n)}),function(e){const t=new google.maps.LatLngBounds;e.markers.forEach(function(e){t.extend({lat:e.position.lat(),lng:e.position.lng()})}),1===e.markers.length?e.setCenter(t.getCenter()):e.fitBounds(t)}(n),n}function o(){if(document.getElementById("lg-google-api"))return;const e=document.createElement("script");e.type="text/javascript",e.id="lg-google-api",e.async=!0,e.src=`https://maps.googleapis.com/maps/api/js?key=${window.atob(lgMapData.gak)}&callback=initMap&loading=async`,document.head.appendChild(e)}window.initMap=async function(){document.querySelectorAll(".lg-map-preview").forEach(t=>{t.parentNode.querySelectorAll(".lg-map-live").forEach(t=>{t.id||(t.id=`lg-map-${Object.keys(e).length+1}`);const o=t.id;e[o]=a(t),t.style.display="block"}),t.style.display="none"})},document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".lg-map-preview").forEach(e=>{"true"===e.dataset.lazyLoad?e.addEventListener("click",()=>{o()}):o()})})}();