| 1 |
(()=>{var t={9572:(t,e,o)=>{var n,r,a;a=function(){var t,e,o=document,n=o.getElementsByTagName("head")[0],r=!1,a="push",i="readyState",l="onreadystatechange",s={},c={},g={},u={};function d(t,e){for(var o=0,n=t.length;o<n;++o)if(!e(t[o]))return r;return 1}function p(t,e){d(t,(function(t){return e(t),1}))}function f(e,o,n){e=e[a]?e:[e];var r=o&&o.call,i=r?o:n,l=r?e.join(""):o,m=e.length;function w(t){return t.call?t():s[t]}function y(){if(! --m)for(var t in s[l]=1,i&&i(),g)d(t.split("|"),w)&&!p(g[t],w)&&(g[t]=[])}return setTimeout((function(){p(e,(function e(o,n){return null===o?y():(n||/^https?:\/\//.test(o)||!t||(o=-1===o.indexOf(".js")?t+o+".js":t+o),u[o]?(l&&(c[l]=1),2==u[o]?y():setTimeout((function(){e(o,!0)}),0)):(u[o]=1,l&&(c[l]=1),void h(o,y)))}))}),0),f}function h(t,r){var a,s=o.createElement("script");s.onload=s.onerror=s[l]=function(){s[i]&&!/^c|loade/.test(s[i])||a||(s.onload=s[l]=null,a=1,u[t]=2,r())},s.async=1,s.src=e?t+(-1===t.indexOf("?")?"?":"&")+e:t,n.insertBefore(s,n.lastChild)}return f.get=h,f.order=function(t,e,o){!function n(r){r=t.shift(),t.length?f(r,n):f(r,e,o)}()},f.path=function(e){t=e},f.urlArgs=function(t){e=t},f.ready=function(t,e,o){t=t[a]?t:[t];var n,r=[];return!p(t,(function(t){s[t]||r[a](t)}))&&d(t,(function(t){return s[t]}))?e():(n=t.join("|"),g[n]=g[n]||[],g[n][a](e),o&&o(r)),f},f.done=function(t){f([null],t)},f},t.exports?t.exports=a():void 0===(r="function"==typeof(n=a)?n.call(e,o,e,t):n)||(t.exports=r)}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=o(9572),e=o.n(t);const{GHOSTKIT:{events:n,googleMapsAPIKey:r,googleMapsAPIUrl:a}}=window;const{GHOSTKIT:{events:i,googleMapsAPIKey:l}}=window;i.on(document,"init.blocks.gkt",(()=>{l&&document.querySelectorAll(".ghostkit-google-maps:not(.ghostkit-google-maps-ready)").forEach((t=>{t.classList.add("ghostkit-google-maps-ready");let o="",i="";try{o=JSON.parse(t.getAttribute("data-styles"))}catch(t){}const l=t.querySelectorAll(".ghostkit-google-maps-marker");if(l.length)i=[],l.forEach((t=>{const e=t.dataset,o=t.querySelector(":scope .ghostkit-pro-google-maps-marker-info-window-text");o&&(e.infoWindowText=o.innerHTML),i.push(e)}));else if(t.getAttribute("data-markers"))try{i=JSON.parse(t.getAttribute("data-markers"))}catch(t){}!function(t,o,i){const{markers:l,apiUrl:s=`${a}&key=${r}`,onZoomChange:c,onCenterChange:g,...u}=o;e()(s,(()=>{n.trigger(t,"prepare.googleMaps.gkt",{options:o});const e=new window.google.maps.Map(t,u),r=t.getAttribute("data-gesture-handling");e&&"cooperative"===r&&e.setOptions({gestureHandling:r,scrollwheel:o.scrollwheel?null:o.scrollwheel}),l&&l.length&&l.forEach((t=>{!function(t){const{map:e,lat:o,lng:n,title:r,description:a,iconURL:i,iconWidth:l,iconHeight:s,...c}=t;let g=null;i&&l&&s&&(g={url:i,scaledSize:new window.google.maps.Size(l,s)});const u=new window.google.maps.LatLng(o,n),d=new window.google.maps.Marker({map:e,position:u,title:r,icon:g,...c});let p=null;if(a||r){let t="";r&&(t+=`<h3>${r}</h3>`),a&&(t+=a),p=new window.google.maps.InfoWindow({content:t}),d.addListener("click",(()=>{p.open(e,d)}))}}({map:e,lat:t.lat,lng:t.lng,title:t.title,description:t.infoWindowText,iconURL:t.iconUrl,iconWidth:t.iconWidth,iconHeight:t.iconHeight})})),c&&e.addListener("zoom_changed",(()=>{c(e.getZoom())})),g&&e.addListener("center_changed",(()=>{g(e.getCenter())})),n.trigger(t,"prepared.googleMaps.gkt",{options:o,instance:e}),i&&i(e)}))}(t,{styles:o,markers:i,center:{lat:parseFloat(t.getAttribute("data-lat")),lng:parseFloat(t.getAttribute("data-lng"))},zoom:parseInt(t.getAttribute("data-zoom"),10),zoomControl:"true"===t.getAttribute("data-show-zoom-buttons"),zoomControlOpt:{style:"DEFAULT",position:"RIGHT_BOTTOM"},mapTypeControl:"true"===t.getAttribute("data-show-map-type-buttons"),streetViewControl:"true"===t.getAttribute("data-show-street-view-button"),fullscreenControl:"true"===t.getAttribute("data-show-fullscreen-button"),scrollwheel:"true"===t.getAttribute("data-option-scroll-wheel"),draggable:"true"===t.getAttribute("data-option-draggable")})}))}))})()})(); |