var e=e=>{new MutationObserver(function(){let t=document.querySelector(e.selector);if(!t&&document.getElementById(`elementor-preview-iframe`)&&(t=document.getElementById(`elementor-preview-iframe`)?.contentDocument?.getElementById(e.selector.substring(1))),!t){let n=document.querySelector(`iframe[name="editor-canvas"]`);n?.contentDocument&&(t=n.contentDocument.querySelector(e.selector))}if(!t){let n=document.querySelector(`.edit-site-visual-editor__editor-canvas`);n?.contentDocument&&(t=n.contentDocument.querySelector(e.selector))}t&&(e.done(t),this.disconnect())}).observe(e.parent||document,{subtree:!0,childList:!0})},t=(e,t)=>{if(!!t&&!t.className.match(/map-loaded/)){if(e.detail.placeId){let n=document.createElement(`iframe`);n.style.width=e.detail.instance.width,n.style.height=e.detail.instance.height,n.style.border=`0`,n.frameborder=`0`,n.src=`https://www.google.com/maps/embed/v1/place?key=`+window.aioseoMapOptions.apiKey+`&q=place_id:`+e.detail.placeId,t.replaceChildren(n),t.className+=` map-loaded`;return}new google.maps.plugins.loader.Loader({apiKey:window.aioseoMapOptions.apiKey,libraries:[`places`]}).load().then(n=>{let s=new n.maps.Map(t,e.detail.mapOptions),o=new n.maps.Marker({map:s,position:e.detail.mapOptions.center,icon:e.detail.customMarker?{url:e.detail.customMarker,origin:new n.maps.Point(0,0),anchor:new n.maps.Point(17,34),scaledSize:new n.maps.Size(25,25)}:null});if(e.detail.infoWindowContent){let t=new n.maps.InfoWindow({content:e.detail.infoWindowContent});t.open(s,o),o.addListener(`click`,()=>{t.open({anchor:o,map:s,shouldFocus:!1})})}t.className+=` map-loaded`}).catch(e=>{console.error(e)})}};document.addEventListener(window?.aioseoMapOptions?.mapLoadEvent,function(n){e({selector:n.detail.element,parent:document.querySelector(`body`),done:e=>{n.detail===null||!n.detail||!n.detail.element||!n.detail.mapOptions||t(n,e)}})})