1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10(()=>{var t={117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappAutocomplete:()=>m});var o=n(326);const a=wp.element.createElement,{Fragment:i,useCallback:l,useEffect:s,useLayoutEffect:p,useMemo:r,useRef:c,useState:u}=wp.element;function m(e){e={buttonLabel:null,className:"",delay:null,focus:!1,onFetch:null,onSelect:null,placeholder:"",selected:null,suggestions:[],title:"",...e};const t=c(null),n=c(null),[i,l]=u({isOpen:!1,value:""});function p(e){l((t=>({...t,...e})))}(0,o.useClickOutside)(t,(()=>{i.isOpen&&p({isOpen:!1})})),s((()=>{e.focus&&n.current&&n.current.focus()}),[n.current]),s((()=>{i.map&&setMapTypeId(e.mapTypeId)}),[e.mapTypeId,i.map]);const r=(0,o.useDebounce)((t=>{e.onFetch&&e.onFetch(t)}),e.delay);function m(){let t;p({isOpen:!1}),e.suggestions&&(t=null==i.selected?e.suggestions[0]:e.suggestions[i.selected]),e.onSelect({suggestion:t,value:g})}const g=i.selected>=0&&e.suggestions&&e.suggestions[i.selected]?e.suggestions[i.selected].value:i.value;return a("div",{className:"mapp-autocomplete",ref:t},a("div",{className:"mapp-autocomplete-wrapper"},a("input",{className:e.className,onChange:e=>{!function(e){p({value:e,selected:null}),r(e)}(e.target.value)},onKeyDownCapture:t=>function(t){switch(t.stopPropagation(),t.code){case"Backspace":p({isOpen:i.value.length>1});break;case"Enter":m();break;case"Escape":p({isOpen:!1});break;case"ArrowUp":if(t.preventDefault(),e.suggestions&&0!=i.selected){const t=null==i.selected?e.suggestions.length-1:i.selected-1;e.suggestions[t]&&p({isOpen:!0,selected:t})}else p({selected:null});break;case"ArrowDown":if(e.suggestions&&i.selected<e.suggestions.length-1){const t=null==i.selected?0:i.selected+1;e.suggestions[t]&&p({isOpen:!0,selected:t})}else p({selected:null});break;case"Tab":case"AltLeft":case"AltRight":case"ControlLeft":case"ControlRight":case"MetaLeft":case"MetaRight":break;default:p({isOpen:!0})}}(t),placeholder:e.placeholder,ref:n,title:e.title,type:"text",value:g}),i.isOpen&&function(){if(e.suggestions&&e.suggestions.length)return a("div",{className:"mapp-autocomplete-list"},_.map(e.suggestions,((t,n)=>{const o="mapp-autocomplete-item"+(i.selected==n?" mapp-selected":"");return a("div",{className:o,key:n,onClick:()=>function(t,n){p({isOpen:!1,selected:n}),e.onSelect({suggestion:t})}(t,n)},t.value)})))}()),e.buttonLabel&&a("div",{className:"mapp-submit-button",onClick:()=>m()},e.buttonLabel))}},715:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappDirections:()=>r});const o=wp.element.createElement,{Fragment:a,useEffect:i,useLayoutEffect:l,useRef:s,useState:p}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function r(e){e={from:null,onClose:null,to:null,...e};const[t,n]=p({from:e.from?e.from:"",to:e.to?e.to:""});function a(e){n((t=>({...t,...e})))}function l(){e.onClose&&e.onClose()}function s(){const e=t.from.trim(),n=t.to.trim();let o=mappl10n.options.directionsServer;o="https://maps.google.com"==o?"https://www.google.com":o,-1==o.toLowerCase().indexOf("http")&&(o="https://"+o),o+="/maps/dir/?api=1&origin="+encodeURIComponent(e)+"&destination="+encodeURIComponent(n),window.open(o),l()}function r(e){13==e?s():27==e&&l()}return i((()=>{"google"==mappl10n.options.directions&&s()}),[]),"google"==mappl10n.options.directions?null:o("div",{className:"mapp-directions"},o("div",{className:"mapp-close",onClick:()=>l()}),o("div",null,o("input",{className:"mapp-dir-from",onChange:e=>a({from:e.target.value}),onKeyPress:e=>r(e.which),tabIndex:"1",placeholder:__("My location"),value:t.from}),o("div",{className:"mapp-dir-arrows",onClick:()=>{a({from:t.to,to:t.from})}})),o("div",null,o("input",{className:"mapp-dir-to",onChange:e=>a({to:e.target.value}),onKeyPress:e=>r(e.which),tabIndex:"2",value:t.to})),o("div",{className:"mapp-dir-toolbar"},o("div",{className:"mapp-submit-button",onClick:()=>s()},__("Get Directions"))))}},817:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappFilters:()=>u});var o=n(939),a=n(326);const i=wp.element.createElement,{Fragment:l,useEffect:s,useLayoutEffect:p,useRef
10:r,useState:c}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),sprintf=wp.i18n.sprintf,u=e=>{e={onChange:null,otype:"post",poiCount:0,...e};const t=(0,a.useDebounce)(e.onChange,500),[n,p]=c({filters:[],isBusy:!0,open:null,selected:{}});function u(e){p((t=>({...t,...e})))}const m=r({});function g(e,o){let a=n.selected[e.key]?n.selected[e.key].values:null;if("checkbox"==e.format){var i;const e=null===(i=a)||void 0===i?void 0:i.indexOf(o);e>-1?a.splice(e,1):(a=a||[],a.push(o))}else a=o?[o]:[];a.length?n.selected[e.key]={key:e.key,values:a,meta_key:e.meta_key,meta_values:e.meta_values}:delete n.selected[e.key],u({selected:n.selected}),t(n.selected)}function d(e){u({open:n.open==e?null:e})}function f(e){e.key;const t=[...e.values],a=n.selected[e.key]?n.selected[e.key].values:"";switch(e.format){case"input":return i("input",{type:"text",value:a?a[0]:"",onChange:t=>g(e,t.target.value)});case"checkbox":return _.map(t,(t=>i("label",{key:t.value},i("input",{checked:null==a?void 0:a.includes(t.value),key:t.value,onChange:t=>g(e,t.target.value),type:e.format,value:t.value}),t.iconid&&i("img",{className:"mapp-icon",src:o.mappLib.getIconUrl(t.iconid)}),i("span",{dangerouslySetInnerHTML:{__html:t.label}}))));case"radio":return"radio"==e.format&&t.unshift({value:"",label:__("All")}),_.map(t,(t=>i("label",{key:t.value},i("input",{checked:a==t.value||""==t.value&&!a,key:t.value,onChange:t=>g(e,t.target.value),type:e.format,value:t.value}),t.iconid&&i("img",{className:"mapp-icon",src:o.mappLib.getIconUrl(t.iconid)}),i("span",{dangerouslySetInnerHTML:{__html:t.label}}))));case"select":t.unshift({value:"",label:""});const n=_.map(t,(e=>'<option value="'+e.value+'">'+e.label+"</option>"));return i("select",{value:a[0],dangerouslySetInnerHTML:{__html:n},onChange:t=>g(e,t.target.value)})}}function v(o){return i("div",{className:"mapp-filter-dropdown"},function(e){return i("div",{className:"mapp-filter-values"},"all"==e?n.filters.map((e=>i(l,{key:e.key},i("div",{className:"mapp-filter-label"},e.label),f(e)))):f(e))}(o),"all"==o&&function(n){const o="all"==n?"all":n.key;let a=e.poiCount>1?__("%d Results"):__("%d Result");return a=sprintf(a,e.poiCount),i("div",{className:"mapp-filter-toolbar"},i("div",{className:"mapp-link-button",onClick:()=>(u({selected:{}}),void t())},__("Reset")),i("div",{className:"mapp-filter-count"},a),i("div",{className:"mapp-submit-button",onClick:()=>d(o)},__("Done")))}(o))}function h(e){const t="all"==e?"all":e.key,o="all"==e?__("Filter"):e.label,a="mapp-filter mapp-filter-"+t+(n.open==t?" mapp-filter-open":"");return i("div",{key:t,className:a,ref:e=>m.current[t]=e},i("div",{className:"mapp-button mapp-button-caret mapp-filter-button"+(n.isBusy?" mapp-button-disabled":""),onClick:()=>d(t)},o),v(e))}return(0,a.useClickOutside)({current:n.open&&m.current[n.open]?m.current[n.open]:null},(()=>{u({open:null})})),s((()=>{u({isBusy:!0}),o.mappLib.ajax({method:"GET",data:{action:"mapp_filters_get",nonce:mappl10n.options.nonce,otype:e.otype},callback:e=>{e&&"OK"==e.status?u({filters:e.data}):console.error("MapPress: unable to fetch filter data"),u({isBusy:!1})}})}),[]),i("div",{className:"mapp-filters"},h("all"),_.map(n.filters,(e=>e.isStandalone?h(e):null)))}},10:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useGeocoding:()=>u});const o=n(939).mappLib.toJSON,{Fragment:a,useCallback:i,useEffect:l,useLayoutEffect:s,useRef:p,useState:r}=(wp.element.createElement,wp.element),c={google:function(){this.token=null;const e=document.createElement("div");this.placesService=new google.maps.places.PlacesService(e),this.autocompleteService=new google.maps.places.AutocompleteService}};c.google.prototype={getDetails:function(e){let{suggestion:t,callback:n}=e;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var a={fields:["formatted_address","name","geometry"],placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(a,(function(e,t){if("OK"==t&&e&&e.geometry){if(e.geometry.location&&(e.geometry.location=o(e.geometry.location)),e.geometry.viewport){var a=o(e.geometry.viewport);e.geometry.viewport={sw:{lat:a.south,lng:a.west},ne:{lat:a.north,lng:a.east}}}n(e)}else n(null)}))},getFirstPrediction:function(e){let{map:t,value:n,callback:o}=e;this.getPredictions({map:t,value:n,callback:e=>{e&&Array.isArray(e)?this.getDetails({suggestion:e[0],callback:e=>o(e)}):o(null)}})},getPredictions:function(e){let{map:t,value:n,includeBusinesses:o,callback:a}=e;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=t?t.getBounds():null;"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest
10().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var l={input:n,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:o?null:["geocode"]};this.autocompleteService.getPlacePredictions(l,(function(e,t){"OK"==t&&e&&e.length?(e=(e=e.map((e=>(e.value=e.description,e)))).filter((e=>e.place_id)),a(e)):(t==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):t==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),a(null))}))}},c.mapbox=function(){},c.mapbox.prototype={getDetails:function(e){let{suggestion:t,callback:n}=e,o=t.place_name,a=o.indexOf(","),i=o.indexOf(",",a+1);a>0&&(o=parseInt(o.substr(0,a))?o.substr(0,i).replace(",",""):o.substr(0,a));let l=t.bbox&&4==t.bbox.length?{sw:{lat:t.bbox[1],lng:t.bbox[0]},ne:{lat:t.bbox[3],lng:t.bbox[2]}}:null;n({formatted_address:t.place_name,name:o,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:l}})},getFirstPrediction:function(e){let{map:t,value:n,callback:o}=e;this.getPredictions({map:t,value:n,callback:e=>{e&&e.length?this.getDetails({suggestion:e[0],callback:e=>o(e)}):o(null)}})},getPredictions:function(e){let{map:t,value:n,callback:o}=e;var a="https://api.mapbox.com/geocoding/v5/mapbox.places/"+n+".json?access_token="+mappl10n.options.mapbox;a=mappl10n.options.country?a+"&country="+mappl10n.options.country.toLowerCase():a,a=mappl10n.options.language?a+"&language="+mappl10n.options.language.toLowerCase():a;var i=t?t.getCenter():null;i&&(a+="&proximity="+i.lng+","+i.lat),mappl10n.options.searchBox&&(a+="&bbox="+mappl10n.options.searchBox),fetch(a).then((e=>e.json())).then((e=>{e&&e.features&&e.features.length>0?(e.features=e.features.map((e=>(e.value=e.label=e.place_name,e))),o(e.features)):o(null)}))}},c.nominatim=function(){},c.nominatim.prototype={getDetails:function(e){let{suggestion:t,callback:n}=e,o=t.display_name,a=o.indexOf(","),i=o.indexOf(",",a+1);a>0&&(o=parseInt(o.substr(0,a))?o.substr(0,i).replace(",",""):o.substr(0,a));let l=t.boundingbox&&4==t.boundingbox.length?{sw:{lat:t.boundingbox[0],lng:t.boundingbox[2]},ne:{lat:t.boundingbox[1],lng:t.boundingbox[3]}}:null;n({formatted_address:t.display_name,name:o,geometry:{location:{lat:t.lat,lng:t.lon},viewport:l}})},getFirstPrediction:function(e){let{map:t,value:n,callback:o}=e;this.getPredictions({map:t,value:n,callback:e=>{e&&e.length?this.getDetails({suggestion:e[0],callback:e=>o(e)}):o(null)}})},getPredictions:function(e){let{map:t,value:n,callback:o}=e;var a="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(n);if(a=mappl10n.options.country?a+"&countrycodes="+mappl10n.options.country.toLowerCase():a,a=mappl10n.options.language?a+"&accept-language="+mappl10n.options.language.toLowerCase():a,mappl10n.options.searchBox)a+="&viewbox="+mappl10n.options.searchBox,a+="&bounded=1";else{var i=t?t.getBounds():null;
10if(i){let e=i.getSouthWest(),t=i.getNorthEast();a+="&viewbox="+e.lng+","+e.lat+","+t.lng+","+t.lat}}fetch(a).then((e=>e.json())).then((e=>{e&&e.length?(e=e.map((e=>(e.value=e.display_name,e))),o(e)):o(null)}))}};const u=e=>{let{includeBusinesses:t}=e;function n(){let e="";return e="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"nominatim",new c[e]}function o(e,t){navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(t){var n={lat:t.coords.latitude,lng:t.coords.longitude};e({name:n.lat+", "+n.lng,geometry:{location:n}})}),(function(n){if(!t){var o=n&&n.message?" : "+n.message:"";alert(mappl10n.no_geolocate+o)}e(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)}return{geocode:function(e){let{map:a,suggestion:i,value:l,callback:s}=e;const p=n();l="string"==typeof l?l.trim():l,i||l?function(e){let{map:t,value:n,callback:a}=e;if(!n)return void a(null);if("string"!=typeof n){const e=n.lat&&n.lng?{geometry:{location:{lat:n.lat,lng:n.lng}}}:null;return void a(e)}if("http"==n.substring(0,4))return void a(n);if("user"==n)return void o((function(e){a(e)}));const i=n.split(",");if(2==i.length){const e=parseFloat(i[0]),t=parseFloat(i[1]);if(!isNaN(e)&&!isNaN(t))return void a({name:e+", "+t,geometry:{location:{lat:e,lng:t}}})}a(null)}({map:a,value:l,callback:e=>{e?s(e):i?p.getDetails({suggestion:i,callback:s}):p.getFirstPrediction({map:a,value:l,includeBusinesses:t,callback:s})}}):s(null)},geolocate:o,getPredictions:function(e){let{map:t,value:o,callback:a}=e;n().getPredictions({map:t,value:o,callback:a})}}}},326:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useClickOutside:()=>c,useDebounce:()=>u,useResizeObserver:()=>m});wp.element.createElement;const{Fragment:o,useCallback:a,useEffect:i,useLayoutEffect:l,useMemo:s,useRef:p,useState:r}=wp.element;function c(e,t){i((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}))}function u(e,t,n){const o=p(!1);i((()=>(o.current=!0,()=>o.current=!1)),[]);const l=_.debounce((function(){o.current&&e(...arguments)}),t);return a(l,n=n||[])}function m(e,t){const n=p();n.current=t,i((()=>
10{if(!e)return;const t=new ResizeObserver(((e,t)=>{n.current()}));return t.observe(e),()=>{t.disconnect()}}),[e])}},939:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mappLib:()=>o,mappEvent:()=>a,mappPoi:()=>i});const o={ajax:function(e){if("POST"==(e={cache:"no-cache",credentials:"same-origin",data:null,method:e.method?e.method:"GET",mode:"cors",redirect:"follow",referrerPolicy:"no-referrer",responseType:"json",url:e.url?e.url:mappl10n.options.ajaxurl,...e}).method)if(e.data instanceof FormData)e.body=e.data;else{const t=new FormData;t.append("action",e.data.action),t.append("nonce",e.data.nonce),t.append("data",JSON.stringify(e.data)),e.body=t}else"GET"==e.method&&(e.url+="?"+o.jQueryParam(e.data));fetch(e.url,e).then((t=>{if("html"==e.responseType)return t.text();if(t.ok)return t.json();throw Error(`Request rejected with status ${t.status}`)})).then((t=>{e.url!=mappl10n.options.ajaxurl||t&&"OK"==t.status||o.alert(t.status),t.output&&o.alert("MapPress: invalid output from a plugin or theme file. Deactivate plugins to find the problem. Output:\r\n"+t.output),e.callback&&e.callback(t)})).catch((t=>{if(e.error)return void e.error();const n=void 0!==t.message?t.message:t.statusText;o.alert("AJAX error -- "+n)}))},alert:function(e){mappl10n.options.admin||mappl10n.options.debug?alert(e):window.console&&console.error(e)},boundsToViewport:function(e){return e?{sw:o.toJSON(e.getSouthWest
10()),ne:o.toJSON(e.getNorthEast())}:null},getIcon:function(e){{const t=this.getIconUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:t,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:t}}},getIconUrl:function(e){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"},jQueryParam:function(e){var t=[],n=function(e,n){n=null==(n="function"==typeof n?n():n)?"":n,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(n)},o=function(e,a){var i,l,s;if(e)if(Array.isArray(a))for(i=0,l=a.length;i<l;i++)o(e+"["+("object"==typeof a[i]&&a[i]?i:"")+"]",a[i]);else if("[object Object]"===Object.prototype.toString.call(a))for(s in a)o(e+"["+s+"]",a[s]);else n(e,a);else if(Array.isArray(a))for(i=0,l=a.length;i<l;i++)n(a[i].name,a[i].value);else for(s in a)o(s,a[s]);return t};return o("",e).join("&")},nanoid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;const t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let n="",o=e;for(;o--;)n+=t[64*Math.random()|0];return n},pointToLatLng:function(e){return e?"leaflet"==mappl10n.options.engine?L.latLng(e):new google.maps.LatLng(e.lat,e.lng):null},template:function(e,t){if(o.templates=o.templates?o.templates:{},!o.templates[e]){var n=document.getElementById("mapp-tmpl-"+e).innerHTML;if(!n)return"";o.templates[e]=_.template(n,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return o.templates[e](t)},toJSON:e=>e.toJSON?e.toJSON():"undefined"!=typeof L&&e instanceof L.LatLng?{lat:e.lat,lng:e.lng}:"undefined"!=typeof L&&L.LatLngBounds&&e instanceof L.LatLngBounds?{south:e.getSouth(),west:e.getWest(),north:e.getNorth(),east:e.getEast()}:null,toUrlValue(e){return e.toUrlValue?e.toUrlValue():"undefined"!=typeof L&&e instanceof L.LatLng?Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6:null},viewportToBounds:function(e){return e&&e.sw&&e.ne?"leaflet"==mappl10n.options.engine?new L.LatLngBounds(L.latLng(e.sw.lat,e.sw.lng),L.latLng(e.ne.lat,e.ne.lng)):new google.maps.LatLngBounds(new google.maps.LatLng(e.sw.lat,e.sw.lng),new google.maps.LatLng(e.ne.lat,e.ne.lng)):null}},a={addListener:function(e,t,n){let o=[];t=t.split(" ");for(var a=0;a<t.length;a++)"leaflet"==mappl10n.options.engine?(e.on(t[a],n),o.push({target:e,event:t[a],callback:n})):o.push(google.maps.event.addListener(e,t[a],n));return o},addListenerOnce:function(e,t,n){t=t.split(" ");for(var o=0;o<t.length;o++)"leaflet"==mappl10n.options.engine?e.once(t[o],n):google.maps.event.addListenerOnce(e,t[o],n)},clearInstanceListeners:function(e){"leaflet"==mappl10n.options.engine?e.off():google.maps.event.clearInstanceListeners(e)},clearListeners:function(e,t){t=t.split(" ");for(var n=0;n<t.length;n++)"leaflet"==mappl10n.options.engine?e.off(t[n]):google.maps.event.clearListeners(e,t[n])},removeListener:function(e){for(let t=0;t<e.length;t++)"leaflet"==mappl10n.options.engine?e[t].target.off(e[t].event,e[t].callback):google.maps.event.removeListener(e[t])},trigger:function(e,t,n){"leaflet"==mappl10n.options.engine?e.fire(t,n):google.maps.event.trigger(e,t,n)}},i={parseOverlay:function(e,t){if("google"==mappl10n.options.engine){if("kml"==e){const e=t.getDefaultViewport();return{point:e?o.toJSON(e.getCenter()):null,viewport:e?o.boundsToViewport(e):null}}const n=t instanceof google.maps.Polyline?{strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,stokeWeight:t.strokeWeight}:{fillColor:t.fillColor,fillOpacity:t.fillOpacity,strokeColor:t.strokeColor,strokeOpacity:1,stokeWeight:t.strokeWeight};if("circle"==e)return{point:o.toJSON(t.getCenter()),poly:{radius:t.getRadius(),...n}};if("rectangle"==e)return{viewport:o.boundsToViewport(t.getBounds()),poly:{...n}};if("polyline"==e){const e=[];return t.getPath().forEach((function(t){e.push(o.toJSON(t))})),{poly:{path:e,...n}}}if("polygon"==e){const e={fillColor:t.fillColor,fillOpacity:t.fillOpacity,strokeColor:t.strokeColor,strokeOpacity:1,stokeWeight:t.strokeWeight},n=[];return t.getPaths().forEach((function(e){var t=[];e.forEach((function(e){t.push(o.toJSON(e))})),n.push(t)})),{poly:{paths:n,...e}}}if(!e)return{point:o.toJSON(t.getPosition())}}else{if("kml"==e){const e=t.getBounds();return{point:e&&e.isValid()?o.toJSON(e.getCenter()):null,viewport:e&&e.isValid()?o.boundsToViewport(e):null}}if(!e)return{point:"leaflet"==mappl10n.options.engine?o.toJSON(t.getLatLng()):o.toJSON(t.getPosition())}}}}}
10,374:(e,t,n)=>{"use strict";n.r(t);var o=n(939),a=n(346);window.mapp=window.mapp||{};const i=wp.element.createElement;mapp.load=function(){if(void 0!==mapp.data)for(;mapp.data.length;){const e=mapp.data.pop();e.pois&&e.pois.map((e=>{e.id=o.mappLib.nanoid()}));const t=document.getElementById(e.name+"-layout");t?ReactDOM.render(i(a.MappMap,{...e,parent:t}),t):console.log("Missing container for map "+e.name)}},mapp.load()},346:(t,n,o)=>{"use strict";o.r(n),o.d(n,{MappMap:()=>I});var a=o(939),i=o(715),l=(o(817),o(602)),s=o(818),p=o(81),r=o(50),c=o(615);const u=wp.element.createElement,{Fragment:m,useEffect:g,useLayoutEffect:d,useMemo:f,useRef:v,useState:h}=wp.element;function y(e){e={anchor:null,className:null,content:null,map:null,point:null,...e};const t=v(null),[n,o]=h({isLoaded:null,mapDiv:"leaflet"==mappl10n.options.engine?e.map.getContainer():e.map.getDiv(),overlayView:null});function i(e){o((t=>({...t,...e})))}function l(){const o=t.current;if(!o)return;if(document.fullscreenElement||e.map.isFullscreen)return;let i;const{width:l,height:s}=o.getBoundingClientRect(),p=a.mappLib.pointToLatLng(e.point);if("leaflet"==mappl10n.options.engine)i=e.map.latLngToContainerPoint(p);else{const e=n.overlayView.getProjection();if(!e)return;i=e.fromLatLngToContainerPixel(p)}o.style.bottom=n.mapDiv.clientHeight-i.y-e.anchor.y+"px",o.style.left=i.x-l/2+e.anchor.x+"px"}return d((()=>{"google"==mappl10n.options.engine?n.overlayView||(n.overlayView=new google.maps.OverlayView,n.overlayView.onAdd=function(){i({isLoaded:!0})},n.overlayView.setMap(e.map)):(e.map.stop(),i({isLoaded:!0}))}),[]),d((()=>{if(!n.isLoaded)return;let t;return"google"==mappl10n.options.engine?n.overlayView.draw=()=>l():t=a.mappEvent.addListener(e.map,"move",(e=>l())),()=>{"google"==mappl10n.options.engine?n.overlayView.draw=null:a.mappEvent.removeListener(t)}})),d((()=>{n.isLoaded&&(l(),function(){const o=t.current;if(!o)return;const i=30,l=o.offsetWidth,s=o.offsetHeight,p=n.mapDiv.clientWidth,r=n.mapDiv.clientHeight,c=a.mappLib.pointToLatLng(e.point);let u;if("leaflet"==mappl10n.options.engine)u=e.map.latLngToContainerPoint(c);else{const e=n.overlayView.getProjection();u=e?e.fromLatLngToContainerPixel(c):null}if(!u)return;var m={x:u.x,y:u.y};u.x+l/2+e.anchor.x>p-i?m.x=Math.max(p-l/2-e.anchor.x-i,p/2-e.anchor.x):u.x-l/2+e.anchor.x<i&&(m.x=Math.min(l/2+e.anchor.x+i,p/2-e.anchor.x));u.y+e.anchor.y-s<i&&(m.y=s-e.anchor.y+i);m.y>=r&&(m.y=r-i);const g={x:u.x-m.x,y:u.y-m.y};(g.x<=-1||g.x>=1||g.y<=-1||g.y>=1)&&("leaflet"==mappl10n.options.engine?e.map.panBy([g.x,g.y]):e.map.panBy(g.x,g.y))}())}),[n.isLoaded]),n.isLoaded?u("div",{className:"mapp-ib-wrapper",ref:t},u("div",{className:"mapp-ib-content"},u("div",{className:"mapp-ib"},u("div",{className:"mapp-iw "+(e.className?e.className:"")},e.content)),u("div",{className:"mapp-ib-tip"}))):null}var b=o(892),w=o(10),k=o(326);const E=a.mappLib.toJSON,{Fragment:C,useCallback:O,useEffect:x,useLayoutEffect:N,useRef:M,useState:P}=wp.element,S=wp.element.createElement,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function I(t){const[n,o]=P({clusterer:null,directionsTo:null,drawingManager:null,filters:null,hovered:null,isDirectionsOpen:null,isFetching:null,isGeolocating:null,init:null,isLoaded:null,isMounted:null,isMini:null,isSidebarOpen:null!=t.poiListOpen?t.poiListOpen:mappl10n.options.poiListOpen,kmlEvent:null,layers:{},layout:t.layout?t.layout:mappl10n.options.layout,map:null,opened:null,oid:t.oid?t.oid:mappl10n.options.oid,otype:t.otype?t.otype:mappl10n.options.otype,page:1,pageCount:0,parsedCenter:null,poiList:void 0!==t.poiList&&null!=t.poiList?t.poiList:mappl10n.options.poiList,pois:[],polyline:null,templates:t.query?"user"==t.otype?{item:"user-mashup-item",popup:"user-mashup-popup"}:{item:"mashup-item",popup:"mashup-popup"}:{item:"map-item",popup:"map-popup"},userLocation:null}),u=M(null),m=M(t.parent),{geocode:g,geolocate:d}=(M(),(0,w.useGeocoding)({withBusinesses:t.isEditable}));function f(e){o((t=>({...t,...e})))}function v(e){}function h(e){return n.pois.find((t=>t.id==e))}function O(e){return n.map.fitBounds(e)}function N(){try{return n.map.getBounds()}catch(e){return null}}function I(){let e;try{e=n.map.getCenter()}catch(t){e=null}return e?E(e):null}function D(e){let t;switch("leaflet"==mappl10n.options.engine&&"kml"!=e.type?null:e.type){case"polygon":t=new google.maps.LatLngBounds,e.poly.paths.map((e=>{e.map((e=>{t.extend(e)}))}));break;case"polyline":t=new google.maps.LatLngBounds,e.poly.path.map((e=>{t.extend(e)}));break;case"circle":const n=new google.maps.Circle({center:e.point,radius:e.poly.radius});t=n.getBounds();break;default:t=a.mappLib.viewportToBounds(e.viewport)}return t}function T(e,t){if(e.point&&!e.type)return"leaflet"==mappl10n.options.engine?L.latLng(e.point):new google.maps.LatLng(e.point.lat,e.point.lng);if("kml"==e.type&&t&&t.latLng)return t.latLng;const n=D(e);return"leaflet"==mappl10n.options.engine?n&&n.isValid()?n.getCenter():new L.latLng(0,0):n?n.getCenter():new google.maps.LatLng(0,0)}function B(){let e;try{e=n.map.getZoom()}catch(t){e=null}return e?parseInt(e):null}function R(){return!!(t.isEditable||t.search||mappl10n.options.search&&t.query)}(0,k.useResizeObserver)(m.current,(function(){if(n.poiList&&"inline"!=n.layout&&m.current){const e=m.current.clientWidth<mappl10n.options.mini;null==n.isMini?e&&f({isMini:e,isSidebarOpen:!1}):e!=n.isMini&&f({isMini:e,isSidebarOpen:!e})}})),(0,k.useResizeObserver)(u.current,G),x((()=>{switch(n.init){case null:!function(){const e=[__("MapPress FAQ")+": http://mappresspro.com/ma
10ppress-faq",__("Support")+": http://mappresspro.com/chris-contact",__("Get an API Key")+": https://mappresspro.com/how-to-get-a-google-maps-api-key"];let t=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:__("Leaflet library not loaded"),text:__("A theme or plugin is preventing the Leaflet library from loading.")},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:__("Google Maps API not loaded"),text:__("A theme or plugin is preventing Google Maps from loading.")},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:__("Google Maps API key required")},{condition:document.querySelectorAll('script[src*="https://maps.googleapis.com/maps/api/js?v="]').length>1,title:__("Google Maps API loaded multiple times"),text:__("A theme or plugin has loaded Google Maps twice")},{condition:"undefined"==typeof _,title:__("Underscore library not loaded"),text:__("A theme or plugin is preventing the underscore.js library from loading.")}];t=t.filter((e=>e.condition));let n=t.map((e=>e.title+" : "+e.text));n.length&&(console.log(__("Map Error")+"\n----------------\n"+n.join("\n")+"\n----------------\n"+e.join("\n")),mappl10n.options.admin&&alert(__("Map error: please see the developer console (F12 in most browsers) for details.")))}();let e,o={...t.mapOpts};o.minZoom=isNaN(parseInt(o.minZoom))?0:parseInt(o.minZoom),"leaflet"==mappl10n.options.engine?(e=new L.Map(u.current,{attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,scrollWheelZoom:mappl10n.options.scrollWheel,worldCopyJump:!0,zoomControl:null,...o}),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(e)):e=new google.maps.Map(u.current,{backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,minZoom:0,scaleControl:!0,streetViewControl:!t.query,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM},...o}),f({map:e}),mappl10n.options.userLocation&&mappl10n.options.ssl&&d((e=>{e&&e.geometry&&e.geometry.location&&f({userLocation:e.geometry.location})}),!0),g({value:t.center,callback:e=>{e&&e.geometry&&e.geometry.location?f({parsedCenter:{lat:e.geometry.location.lat,lng:e.geometry.location.lng}}):f({parsedCenter:null}),f({init:1})}});break;case 1:Q(t.mapTypeId),function(){if(t.isEditable&&"google"==mappl10n.options.engine&&google.maps.drawing){const e={fillColor:"#0000FF",fillOpacity:.4,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2};n.drawingManager=new google.maps.drawing.DrawingManager({drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},circleOptions:e,polygonOptions:e,polylineOptions:e,rectangleOptions:e}),n.drawingManager.setMap(n.map)}}(),function(){n.polyline&&("leaflet"==mappl10n.options.engine?n.polyline.remove():n.polyline.setMap(null),f({polyline:null}));if(t.isEditable||!t.lines&&!mappl10n.options.lines||n.pois.length<2)return;const e={...mappl10n.options.lineOpts},o=[];if(_.map(n.pois,(e=>{o.push(T(e))})),"leaflet"==mappl10n.options.engine)f({polyline:new L.Polyline(o,e).addTo(n.map)});else{const t={strokeColor:e.color,strokeWeight:e.weight,strokeOpacity:e.opacity};e.icons&&(_.map(e.icons,(e=>{e.icon.path=parseInt(e.icon.path)})),e.icons[0].repeat="50px"),f({polyline:new google.maps.Polyline({map:n.map,path:o,...e,...t})}),e.animate&&e.icons&&e.icons.length&&function(){let e=0;const t=n.polyline.get("icons");t[0].repeat.replace("%","").replace("px","");window.setInterval((()=>{e+=1;t[0].offset=e+(t[0].repeat.indexOf("%")>=0?"%":"px"),n.polyline.set("icons",t)}),20)}()}}(),t.query?v((()=>f({init:2}))):(f({pois:t.pois?t.pois:[]}),f({init:2}));break;case 2:const i="leaflet"==mappl10n.options.engine?"load":"tilesloaded";a.mappEvent.addListenerOnce(n.map,i,(()=>{f({bounds:N()}),function(){if(mappl10n.options.clustering&&!t.isEditable){let e,t=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==t.disableClusteringAtZoom&&""==t.disableClusteringAtZoom&&(t.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?(e=L.markerClusterGroup(t),n.map.addLayer(e)):(t={...t,imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}
10,e=new MarkerClusterer(n.map,[],t)),f({clusterer:e})}}(),(t.initialOpenInfo||mappl10n.options.initialOpenInfo)&&!t.isEditable&&n.pois&&j(n.pois[0]),f({isLoaded:!0})})),U()}}),[n.init]),x((()=>{n.isLoaded&&!t.query&&f({pois:t.pois?t.pois:[]})}),[t.pois]),x((()=>{n.isLoaded&&t.query&&v()}),[t.query,n.filters]),x((()=>{n.isLoaded&&null==t.center&&U(null)}),[t.center]),x((()=>{n.isLoaded&&Q(t.mapTypeId)}),[t.mapTypeId]),x((()=>{n.isLoaded&&W(t.centerPoi)}),[t.centerPoi]),x((()=>{if(!n.isLoaded)return;let e,o,i;return e=a.mappEvent.addListener(n.map,"moveend idle",(e=>A())),o=a.mappEvent.addListener(n.map,"click dragstart zoom_changed zoomstart",(e=>{"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||F()})),n.drawingManager&&(i=a.mappEvent.addListener(n.drawingManager,"overlaycomplete",(e=>{n.drawingManager.setDrawingMode(null),V(null),t.onDrawingEvent&&t.onDrawingEvent(e)}))),t.name&&(window[t.name]={getPois:()=>n.pois,poiOpen:e=>f({opened:"string"==typeof e?e:e.id})}),()=>{a.mappEvent.removeListener(e),a.mappEvent.removeListener(o),i&&a.mappEvent.removeListener(i)}}));const A=(0,k.useDebounce)((()=>{f({bounds:N(),page:1}),t.onViewportChange&&t.onViewportChange({center:I(),zoom:B()})}),500,[t.onViewportChange,n.map]);function z(e,n){if("poi"!=mappl10n.options.mashupClick&&t.query&&"post"==e.otype&&e.oid&&e.url)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(e.url);case"postnew":return void window.open(e.url);case"postmodal":const t=document.createElement("div");return document.body.appendChild(t),ReactDOM.render(S(b.MappPopupModal,{onClose:()=>{wp.element.unmountComponentAtNode(t),t.remove()},poi:e}),t)}else j(e,n)}function F(){f({opened:null,isDirectionsOpen:!1})}function V(e){if(!e||e.id!=n.opened)if(e){if(e.id==n.opened)return;f({hovered:e.id}),mappl10n.options.tooltips&&!t.isEditable&&(F(),j(e,null))}else f({hovered:null})}function j(e,t){F(),n.isMini&&H(!1),f({kmlEvent:t,opened:e.id})}function G(){"leaflet"==mappl10n.options.engine?n.map.invalidateSize():a.mappEvent.trigger(n.map,"resize")}function H(e){f({isSidebarOpen:e=void 0!==e?e:!n.isSidebarOpen,isDirectionsOpen:!1}),setTimeout((()=>G()),100)}function U(e){e=null==e?n.parsedCenter:e;const o=t.zoom&&parseInt(t.zoom)?parseInt(t.zoom):null;if(e)return void $(e,o||1);if(0==n.pois.length)return void $({lat:0,lng:0},o||1);if(1==n.pois.length)return void W(n.pois[0]);let a="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds;for(var i=0;i<n.pois.length;i++){var l=D(n.pois[i]);a=l?"leaflet"==mappl10n.options.engine?a.extend(l):a.union(l):a.extend(T(n.pois[i]))}o?$(E(a.getCenter()),o):O(a)}function W(e){let n;if(e.viewport){var o=e.viewport.ne.lng-e.viewport.sw.lng;o<0&&(o+=360),n=Math.floor(Math.log(360*u.current.clientWidth/o/256)/Math.LN2)}else n=t.zoom&&parseInt(t.zoom)?parseInt(t.zoom):parseInt(mappl10n.options.poiZoom);$(T(e),n)}function J(){return mappl10n.options.ssl?S("div",{className:"mapp-geolocate-control-wrapper"},S("div",{className:"mapp-geolocate-control",onClick:()=>(f({isGeolocating:!0}),void d((e=>{f({isGeolocating:!1}),e&&e.geometry&&e.geometry.location&&$(e.geometry.location,parseInt(mappl10n.options.poiZoom))}),!1)),title:__("Your Location")})):null}function Z(){if(n.isLoaded)return R()?S("div",{className:"mapp-header"},R()&&n.map?S("div",{className:"mapp-search-container"},S(s.MappPlaces,{buttonLabel:t.isEditable?__("Add to map"):S("img",{src:mappl10n.options.baseurl+"/images/search.png"}),focus:t.isEditable,includeBusinesses:t.isEditable,map:n.map,onSearch:e=>{t.onSearch?t.onSearch(e):function(e){if(!e||!e.geometry)return;const t=e.geometry.location?e.geometry.location:null,n=e.geometry.viewport?e.geometry.viewport:null;let o;if("leaflet"==mappl10n.options.engine){const e=new L.LatLng(t.lat,t.lng);o=n?new L.LatLngBounds(new L.LatLng(n.sw.lat,n.sw.lng),new L.LatLng(n.ne.lat,n.ne.lng)):e.toBounds(1e3*mappl10n.options.radius)}else{const e=new google.maps.Circle({center:t,radius:1e3*mappl10n.options.radius});o=n?new google.maps.LatLngBounds(new google.maps.LatLng(n.sw.lat,n.sw.lng),new google.maps.LatLng(n.ne.lat,n.ne.lng)).union(e.getBounds()):e.getBounds()}o&&O(o),$(t)}(e)}})):null,"top"==mappl10n.options.filtersPos&&null):null}function K(){if(!n.poiList||!n.isLoaded)return null;let e=[];return e=R()&&n.bounds&&!t.isEditable?n.pois.filter(((e,t)=>n.bounds.contains(T(e)))):n.pois,n.pageCount!=e.length&&f({pageCount:e.length}),S(c.MappPoiList,{className:!t.isEditable&&mappl10n.options.thumbsList?" mapp-thumb-"+mappl10n.options.thumbsList:"",hovered:n.hovered,isEditable:t.isEditable,isPaged:!!t.query,onClick:e=>z(h(e)),onDirectionsClick:e=>f({isDirectionsOpen:!0,directionsTo:h(e)}),onDragDrop:e=>{let{from:n,to:o}=e;return function(e,n){t.onDragDrop&&t.onDragDrop(e,n)}(n,o)},onHover:e=>V(h(e)),onPage:e=>{f({page:e})},opened:n.opened,page:n.page,pois:e,template:t.isEditable?null:n.templates.item})}function q(){if(n.isLoaded)return n.pois.map((o=>S(p.MappPoi,{key:o.id,isClusterable:!!n.clusterer&&!o.type,isEditable:!!t.isEditable,isHovered:o.id==n.hovered,isOpen:o.id==n.opened,map:n.map,onChange:e=>{t.onPoiChange&&t.onPoiChange(o.id,e)},onClick:e=>z(o,e),onClusterAdd:e=>function(e){n.clusterer&&("leaflet"==mappl10n.options.engine?n.clusterer.addLayer(e):n.clusterer.addMarker(e))}(e),onMouseOut:()=>{V(null)},onMouseOver:()=>V(o),onRenderPopup:(o,a)=>function(o,a){const i=function(e){if(n.clusterer){if("leaflet"==mappl10n.options.engine){var t=n.clusterer.getVisibleParent(e);return t&&t!=e?t.getLatLng():null}const a=n.clusterer.getClusters();for(var o=0;o<a.length;o++){const t=a[o].markers_;if(t.length>1)for(let n=0;n<t.length;n++)if(t[n]==e)return a[o].center_}}}(a),l=T(o),s=E(i||l);let p,c,u={x:0,y:0};i?u={x:0,y:-14}:o.type||(u=mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?{x:0,y:0-mappl10n.options.iconScale[1]}:{x:0,y:-32});n.kmlEvent&&(n.kmlEvent.pixelOffset&&(u={x:e.pixelOffset.width,y:e.pixelOffset.height}),n.kmlEvent.featureData?p=n.kmlEvent.featureData:n.kmlEvent&&n.kmlEvent.propagatedFrom&&n.kmlEvent.propagatedFrom.feature&&n.kmlEvent.propagatedFrom.feature.properties&&(p=n.kmlEvent.propagatedFrom.feature.properties));c=t.onRenderPopup?t.onRenderPopup(o,F):S(r.MappPoiContent,{context:"popup",feature:p,isEditable:t.isEditable,onDirectionsClick:()=>f({isDirectionsOpen:!0,directionsTo:o}),poi:o,template:n.templates.popup,thumbs:mappl10n.options.thumbsPopup});return S(y,{anchor:u,className:!t.isEditable&&mappl10n.options.thumbsPopup?"mapp-thumb-"+mappl10n.options.thumbsPopup:"",content:c,map:n.map,point:s})}(o,a),poi:o})))}function Y(){return!n.poiList||n.isDirectionsOpen&&"inline"==mappl10n.options.directions?null:S("div",{className:"mapp-sidebar"+(n.isSidebarOpen?" mapp-sidebar-open":"")},S("div",{className:"mapp-sidebar-toggle",onClick:()=>H()}),"list"==mappl10n.options.filtersPos&&null,t.onRenderSidebar&&t.onRenderSidebar(),K())}function X(e){return S(C,null,S("div",{className:"mapp-wrapper",style:e},S("div",{className:"mapp-content"},n.isFetching||n.isGeolocating?S(C,null,S("div",{className:"mapp-spinner-overlay"}),S("div",{className:"mapp-spinner"})):null,Z(),S("div",{className:"mapp-main"},"inline"!=n.layout&&Y(),function(){if(!n.isDirectionsOpen)return null;let e="";if(n.directionsTo)if(n.directionsTo.address)e=n.directionsTo.address;else{const t=E(T(n.directionsTo));e=t.lat+", "+t.lng}return S(i.MappDirections,{from:"",to:e,onClose:()=>{f({isDirectionsOpen:!1,directionsTo:null})}})}(),S("div",{className:"mapp-canvas-panel"},S("div",{className:"mapp-canvas",ref:u}),n.isLoaded&&n.userLocation?S(p.MappPoi,{isClusterable:!1,isEditable:!1,isOpen:!1,key:"user",map:n.map,poi:{point:n.userLocation,iconid:"geolocation"}}):null,q(),t.isEditable||"leaflet"==mappl10n.options.engine||!n.map?null:S(l.MappMenuControl,{map:n.map,onCenter:()=>{F(),U()}}),J())),n.poiList&&"inline"!=n.layout&&n.isMini?S("div",{className:"mapp-footer"},!n.isSidebarOpen&&S("div",{className:"mapp-button mapp-view-list",onClick:()=>H(!0)},S("img",{src:mappl10n.options.baseurl+"/images/outline_format_list_bulleted_black_18dp.png"}),"List"),n.isSidebarOpen&&S("div",{className:"mapp-button mapp-view-map",onClick:()=>H(!1)},S("img",{src:mappl10n.options.baseurl+"/images/outline_map_black_18dp.png"}),"Map")):null)),"inline"==n.layout&&Y())}function Q(e){const t=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),o=_.find(t,(t=>t.id==e));!mappl10n.options.style||"roadmap"!=e&&"streets"!=e&&o||(e=mappl10n.options.style);let a=_.find(t,(t=>t.id==e));if(a=a||t[0],"leaflet"==mappl10n.options.engine){let e={mapbox:{accessToken:mappl10n.options.mapbox,attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://www.mapbox.com/about/maps" target="_blank">© Mapbox<a/>','<a href="https://www.openstreetmap.org/about/" target="_blank">© OpenStreetMap</a>'],url:"https://api.mapbox.com/styles/v1/{user}/{mapboxid}/tiles/256/{z}/{x}/{y}{r}?access_token={accessToken}&fresh=true",zoomOffset:0},osm:{attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://openstreetmap.org" target="_blank">Map data (c) OpenStreetMap</a>'],url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}}[a.provider],t={...e,...a};L.tileLayer(e.url,t).addTo(n.map)}else if(n.map.setMapTypeId("standard"==a.type?a.id:"roadmap"),a.json){let e=null;try{e=JSON.parse(a.json)}catch(e){console.log("Invalid JSON in map style")}n.map.setOptions({styles:e||null})}else n.map.setOptions({styles:null})}function $(e,t,o){"leaflet"==mappl10n.options.engine?(null==t&&(t=n.map.getZoom()?n.map.getZoom():0),n.map.setVie
10w(e,t,o)):(e=e&&!E(e)?{lat:parseFloat(e.lat),lng:parseFloat(e.lng)}:e,t=t?parseInt(t):null,e&&n.map.setCenter(e),t&&n.map.setZoom(t))}const ee=t.name?t.name+"-layout":"",te=function(){if(t.embed)return{width:"100%",height:"100%"};const e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=e=>"string"==typeof e&&(e.indexOf("px")>=0||e.indexOf("%")>=0||e.indexOf("vh")>=0||e.indexOf("vw")>=0)?e:e+"px";return{width:t.width?n(t.width):n(e.width),height:t.height?n(t.height):n(e.height)}}();let ne=[];ne.push("left"==n.layout?"mapp-list-left":"mapp-inline"),ne.push("leaflet"==mappl10n.options.engine?"mapp-leaflet":"mapp-google"),n.isMini&&ne.push("mapp-mini"),t.classname&&ne.push(t.classname);const oe=t.alignment?t.alignment:mappl10n.options.alignment;let ae=[];oe&&!document.body.classList.contains("block-editor-page")&&(ae.push("align"+oe),ae.push("mapp-align-"+oe));const ie="full"==t.alignment?"auto":te.width,le=te.height.includes("vh")?{height:te.height}:{paddingBottom:te.height,height:"auto"};let se=t.parent?t.parent:null;if(window.frameElement){const e=window.frameElement.parentElement.parentElement,t=window.frameElement.parentElement;return e.className="mapp-iframe-container "+ae.join(" "),e.style.width=ie,Object.assign(t.style,le),se.className="mapp-layout "+ne.join(" "),se.style.height="100%",X({height:"100%"})}if(se)return se.className="mapp-layout "+ne.join(" ")+" "+ae.join(" "),se.id=ee,se.style.width=ie,X(le);{const e="mapp-layout "+ne.join(" ")+" "+ae;return S("div",{ref:m,className:e,id:ee,style:{width:ie},tabIndex:"-1"},X(le))}}},759:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mappMarker:()=>a});var o=n(939);function a(e){this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(e),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=()=>this.draw(),this.overlayView.onAdd=()=>this.onAdd(),this.overlayView.onRemove=()=>this.onRemove(),this.div=document.createElement("div"),this.div.classList.add("mapp-marker")}a.prototype={draw:function(){if(!this.div||!this.icon)return;let e=this.overlayView.getProjection();if(e){let t=e.fromLatLngToDivPixel(this.position),n=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.style.left=t.x-n.width/2+"px",this.div.style.top=t.y-n.height+"px"}},getDiv:function(){return this.div},getDraggable:function(){return this.draggable},getMap:function(){return this.map},getPosition:function(){return this.position},getVisible:function(){return this.visible},handleEvent:function(e){let t="on"+e.type[0].toUpperCase()+e.type.slice(1);this[t]&&this[t](e)},onAdd:function(){let e=this.overlayView.getPanes();e&&(this.div||(this.div=document.createElement("div"),this.div.classList.add("mapp-marker")),e.overlayMouseTarget.append(this.div),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div),this.div.addEventListener("click",(()=>{(!this.dragging||this.dragging&&!this.dragging.moved)&&o.mappEvent.trigger(this,"click"),this.dragging=null})),this.div.addEventListener("mouseenter",this),this.div.addEventListener("mouseleave",this),this.setDraggable(this.draggable))},onMouseenter:function(e){o.mappEvent.trigger(this,"mouseover")},onMouseleave:function(e){o.mappEvent.trigger(this,"mouseout")},onPointerdown:function(e){const t=this.map.getDiv().getBoundingClientRect(),n=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:e.clientX,y:e.clientY},offset:{x:n.x-(e.clientX-t.left),y:n.y-(e.clientY-t.top)}},this.toggleDragEvents(!0)},onPointermove:function(e){if(Math.abs(e.clientX-this.dragging.startPixel.x)+Math.abs(e.clientY-this.dragging.startPixel.y
10)<3)return;const t=this.map.getDiv().getBoundingClientRect();let n={x:e.clientX-t.left+this.dragging.offset.x,y:e.clientY-t.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(n)),this.draw(),this.dragging.moved=!0,o.mappEvent.trigger(this,"dragstart")},onPointercancel:function(e){this.onPointerup(e)},onPointerup:function(e){this.dragging&&this.dragging.moved&&o.mappEvent.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(e,t){let n="set"+e[0].toUpperCase()+e.slice(1);this[n]&&this[n](t)},setDraggable:function(e){this.draggable=e,this.map&&this.div&&(this.div.removeEventListener("pointerdown",this,{passive:!0}),e&&this.div.addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(e){if(void 0!==e&&(this.icon=e),this.icon&&this.div){let e='<img draggable="false" src="'+this.icon.url+'">';this.div.innerHTML=e;let t=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.style.width=t.width+"px",this.div.style.height=t.height+"px",this.setZIndex(),this.draw()}},setMap:function(e){this.map=e,this.overlayView.setMap(e)},setPosition:function(e){this.position=e},setValues:function(e){for(const t in e)this.set(t,e[t])},setVisible:function(e){this.visible=e,this.div&&(this.div.style.visibility=e?"visible":"hidden")},setZIndex:function(e){this.zIndex=void 0!==e?e:this.zIndex,this.div&&(this.div.style.zIndex=e)},toggleDragEvents(e){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),e&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},602:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappMenuControl:()=>c});var o=n(326);const a=wp.element.createElement,{Fragment:i,useEffect:l,useLayoutEffect:s,useRef:p,useState:r}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function c(e){e={layer:null,map:null,onCenter:null,...e};const[t,n]=r({activeLayer:e.layer?e.layer:null,layers:null,isOpen:!1}),s=p(null);function c(e){n((t=>({...t,...e})))}function u(){c({isOpen:!t.isOpen})}return(0,o.useClickOutside)(s,(()=>{t.isOpen&&u()})),l((()=>{if("google"==mappl10n.options.engine){c({layers:{traffic:{googleLayer:new google.maps.TrafficLayer,label:__("Traffic")},bicycling:{googleLayer:new google.maps.BicyclingLayer,label:__("Bicycling")},transit:{googleLayer:new google.maps.TransitLayer,label:__("Transit")}}})}}),[]),a("div",{ref:s},a("div",{className:"mapp-menu-toggle",onClick:()=>u()}),t.isOpen&&function(){const n=_.map(t.layers,((n,o)=>{const i=t.activeLayer==o?"mapp-menu-item mapp-active":"mapp-menu-item";return a("div",{className:i,key:o,onClick:()=>function(n){t.activeLayer&&t.layers[t.activeLayer].googleLayer.setMap(null),n!=t.activeLayer&&t.layers[n].googleLayer.setMap(e.map),c({activeLayer:n==t.activeLayer?null:n,isOpen:!1})}(o)},n.label)}));return a("div",{className:"mapp-menu"},a("div",{className:"mapp-menu-items"},a("div",{className:"mapp-menu-item",onClick:()=>(c({isOpen:!1}),void e.onCenter())},__("Center map")),"google"==mappl10n.options.engine&&a(i,null,a("div",{className:"mapp-menu-separator"}),n)),a("div",{className:"mapp-menu-footer"},a("a",{className:"mapp-menu-help",href:"https://mappresspro.com/mappress-documentation",target:"_blank"},a("span",null,__("Help")))))}())}},27:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPaginate:()=>r});const o=wp.element.createElement,{Fragment:a,useEffect:i,useLayoutEffect:l,useRef:s,useState:p}=wp.element,{sprintf}=wp.i18n;function r(e){function t(t,n){const o=Math.ceil(e.count/e.pageSize);switch(t){case"first":e.onChange(1);break;case"last":e.onChange(o);break;case"next":e.page<o&&e.onChange(e.page+1);break;case"prev":e.page>1&&e.onChange(e.page-1)}}return function(){const n=Math.ceil(e.count/e.pageSize),a=e.isBusy||e.page<=1,i=e.isBusy||e.page>=n,l=a?"mapp-paginate-button mapp-disabled":"mapp-paginate-button",s=i?"mapp-paginate-button mapp-disabled":"mapp-paginate-button",p=(r="%d of %d",wp.i18n.__(r,"mappress-google-maps-for-wordpress"));var r;return o("div",{className:"mapp-paginate"},o("div",{className:l,onClick:()=>{a||t("first")}},"«"),o("div",{className:l,onClick:()=>{a||t("prev")}},"â¹"),o("div",{className:"mapp-paginate-count"},sprintf(p,e.page,n)),o("div",{className:s,onClick:()=>{i||t("next")}},"âº"),o("div",{className:s,onClick:()=>{i||t("last")}},"»"))}()}},818:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPlaces:()=>m});var o=n(117),a=n(10);const i=wp.element.createElement,{Fragment:l,useCallback:s,useEffect:p,useLayoutEffect:r,useRef:c,useState:u}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function m(e){e={buttonLabel:null,focus:!1,includeBusinesses:!1,map:null,onSearch:null,...e};const{geocode:t,getPredictions:n}=(0,a.useGeocoding)({map:e.map,includeBusinesses:e.includeBusinesses}),[l,s]=u({suggestions:[]});return i(o.MappAutocomplete,{buttonLabel:e.buttonLabel,className:"mapp-places",debounce:"nominatim"===mappl10n.options.geocoder?500:300,delay:"nominatim"==mappl10n.options.geocoder?500:50,focus:e.focus,onFetch:function(t){n({map:e.map,value:t,callback:e=>{var t;t={suggestions:e},s((e=>({...e,...t})))}})},onSelect:function(n){let{suggestion:o,value:a}=n;t({map:e.map,suggestion:o,value:a,callback:t=>{t&&e.onSearch(t)}})},placeholder:__("Search"),suggestions:l.suggestions,title:__("Enter an address, place, KML file URL, or lat,lng")})}},50:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPoiContent:()=>u});var o=n(939);const a=wp.element.createElement,{Fragment:i,useEffect:l,useLayoutEffect:s,useMemo:p,useRef
10:r,useState:c}=wp.element;wp.i18n.sprintf;function u(e){e={context:null,feature:null,isEditable:null,onDirectionsClick:null,poi:null,template:null,thumbs:null,...e};const[t,n]=c({imageNumber:0});function l(e){n((t=>({...t,...e})))}return a(i,null,function(){const n="list"!=e.context&&mappl10n.options.thumbWidth&&mappl10n.options.thumbHeight?{width:mappl10n.options.thumbWidth+"px",height:mappl10n.options.thumbHeight+"px"}:null,o=e.thumbs&&e.poi.images&&e.poi.images.length&&e.poi.images[t.imageNumber]?e.poi.images[t.imageNumber]:null;if(!o)return null;const i=function(e){switch(e.type){case"avatar":return a("div",{className:"mapp-avatar",dangerouslySetInnerHTML:{__html:e.html}});case"embed":return a("div",{className:"mapp-embed",dangerouslySetInnerHTML:{__html:e.html}});default:if("image"==e.type||!e.type){const t=e.size?{src:e.url,width:e.size[0]+"px",height:e.size[1]+"px"}:{src:e.url};return a("img",t)}}}(o);return a("div",{className:"mapp-thumbnail",onClick:()=>function(t){e.isEditable||"popup"!=e.context||"embed"==t.type||e.poi.url&&window.open(e.poi.url,"_blank")}(o),style:n},t.imageNumber>=1&&a("div",{className:"mapp-gallery-previous",onClick:e=>function(e){t.imageNumber>0&&(l({imageNumber:t.imageNumber-1}),e.stopPropagation())}(e)}),i,t.imageNumber<e.poi.images.length-1&&a("div",{className:"mapp-gallery-next",onClick:n=>function(n){t.imageNumber<e.poi.images.length-1&&(l({imageNumber:t.imageNumber+1}),n.stopPropagation())}(n)}))}(),a("div",{className:"mapp-info"},function(){let t={...e.poi};t.icon=o.mappLib.getIconUrl(e.poi.iconid),e.feature&&(t.body=e.feature.description,t.title=e.feature.name),t.props=t.props?t.props:{};const n=o.mappLib.template(e.template,{poi:t});return a("div",{className:"mapp-template",dangerouslySetInnerHTML:{__html:n}})}(),function(){var t;if(!(e.template.indexOf("user")>=0))return"popup"==e.context&&mappl10n.options.directionsPopup||"list"==e.context&&mappl10n.options.directionsList?a("div",null,a("span",{className:"mapp-dir",onClick:t=>function(t){t.stopPropagation(),e.onDirectionsClick()}(t)},(t="Get Directions",wp.i18n.__(t,"mappress-google-maps-for-wordpress")))):void 0}()))}},615:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPoiList:()=>g});var o=n(939),a=n(27),i=n(50);const l=wp.element.createElement,{Fragment:s,useEffect:p,useLayoutEffect:r,useMemo:c,useRef:u,useState:m}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),sprintf=wp.i18n.sprintf;const g=wp.element.memo((function(e){e={className:null,hovered:null,isEditable:!1,isPaged:!1,onClick:null,onDragDrop:null,onHover:null,onPage:null,opened:null,page:1,pois:null,template:null,...e};const[t,n]=m({dragging:null,dragover:null,pageSize:!e.isEditable&&mappl10n.options.poiListPageSize?parseInt(mappl10n.options.poiListPageSize):20});function p(e){n((t=>({...t,...e})))}function r(n){let a,r="mapp-item";return e.opened!=n.id&&e.hovered!=n.id||(r+=" mapp-selected"),r+=t.dragover==n.id?" mapp-dragover":"",a=e.isEditable?l(s,null,l("img",{className:"mapp-icon",src:o.mappLib.getIconUrl(n.iconid)}),l("div",{className:"mapp-title"},n.title)):l(i.MappPoiContent,{context:"list",onDirectionsClick:()=>e.onDirectionsClick(n.id),poi:n,template:e.template,thumbs:mappl10n.options.thumbsList}),l("div",{className:r,dangerouslySetInnerHTML:null,draggable:e.isEditable,key:n.id,onClick:()=>e.onClick(n.id),onDragOver:e=>e.preventDefault(),onDragStart:e=>p({dragging:n.id}),onDragEnter:e=>p({dragover:n.id}),onDragEnd:e=>p({dragging:null,dragover:null}),onDrop:o=>{return a=n.id,void(e.onDragDrop&&e.onDragDrop({from:t.dragging,to:a}));var a},onMouseEnter:t=>{e.onHover(n.id)},onMouseLeave:t=>{e.onHover(null)}},a)}return l("div",{className:"mapp-list "+(e.className?e.className:"")},e.isPaged&&function(){let t=1!=e.pois.length?__("%d Results"):__("%d Result");return t=sprintf(t,e.pois.length),l("div",{className:"mapp-list-header"},l("div",{className:"mapp-list-count"},t))}(),function(){const n=t.pageSize*(e.page-1),o=n+t.pageSize-1;return l("div",{className:"mapp-items"},_.map(e.pois,((t,a)=>{if(!e.isPaged||a>=n&&a<=o)return r(t)})))}(),e.isPaged&&(!e.isPaged||e.pois.length<=t.pageSize?null:l("div",{className:"mapp-list-footer"},l(a.MappPaginate,{count:e.pois.length,onChange:t=>e.onPage(t),page:e.page,pageSize:t.pageSize}))))}))},81:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPoi:()=>u});var o=n(939),a=n(759);wp.element.createElement;
10const{Fragment:i,useEffect:l,useLayoutEffect:s,useMemo:p,useRef:r,useState:c}=wp.element;function u(e){e={isClusterable:null,isEditable:null,isHovered:null,isOpen:null,map:null,onClusterAdd:null,onMouseOut:null,onMouseOver:null,poi:null,...e};const t=r(null),[n,i]=c({overlay:null});function s(t){p()&&"google"==mappl10n.options.engine&&("rectangle"==e.poi.type&&(o.mappEvent.clearListeners(n.overlay,"bounds_changed"),t&&o.mappEvent.addListener(n.overlay,"bounds_changed",(()=>{u()}))),"circle"==e.poi.type&&(o.mappEvent.clearListeners(n.overlay,"center_changed radius_changed"),t&&o.mappEvent.addListener(n.overlay,"center_changed radius_changed",(()=>{u()}))),"polygon"!=e.poi.type&&"polyline"!=e.poi.type||(o.mappEvent.clearListeners(n.overlay,"rightclick"),o.mappEvent.clearListeners(n.overlay.getPath(),"insert_at remove_at set_at"),t&&(o.mappEvent.addListener(n.overlay,"rightclick",(e=>{null!=e.vertex&&n.overlay.getPath().getLength()>2&&(n.overlay.getPath().removeAt(e.vertex),u())})),o.mappEvent.addListener(n.overlay.getPath(),"insert_at remove_at set_at",(()=>{u()})))))}function p(){return"google"==mappl10n.options.engine&&-1!=["polyline","polygon","circle","rectangle"].indexOf(e.poi.type)}function u(){const t=o.mappPoi.parseOverlay(e.poi.type,n.overlay);e.onChange(t)}function m(t,n){n?"leaflet"==mappl10n.options.engine?t.addTo(e.map):t.setMap(e.map):"leaflet"==mappl10n.options.engine?t.remove():t.setMap(null)}return l((()=>{const n="leaflet"==mappl10n.options.engine&&"kml"!=e.poi.type?null:e.poi.type,l=_.pick(e.poi.poly,"strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity");let s;switch(n){case"polygon":s=new google.maps.Polygon({paths:e.poi.poly.paths,...l});break;case"polyline":s=new google.maps.Polyline({path:e.poi.poly.path,...l});break;case"circle":const t=new google.maps.LatLng(e.poi.point.lat,e.poi.point.lng);s=new google.maps.Circle({center:t,radius:parseFloat(e.poi.poly.radius),...l});break;case"rectangle":s=new google.maps.Rectangle({bounds:o.mappLib.viewportToBounds(e.poi.viewport),...l});break;case"kml":const n=e.poi.kml&&e.poi.kml.url?e.poi.kml.url:"";s="leaflet"==mappl10n.options.engine?omnivore.kml(n):new google.maps.KmlLayer({url:n,preserveViewport:!0,suppressInfoWindows:!0});break;default:s="leaflet"==mappl10n.options.engine?L.marker([e.poi.point.lat,e.poi.point.lng]):new a.mappMarker({position:new google.maps.LatLng(e.poi.point.lat,e.poi.point.lng)}),s.setIcon(o.mappLib.getIcon(e.poi.iconid))}var r;return r={overlay:s},i((e=>({...e,...r}))),"kml"!=e.poi.type&&("leaflet"==mappl10n.options.engine?s.options.draggable=e.isEditable:s.setDraggable(e.isEditable),p()&&s.setEditable(e.isEditable)),e.isClusterable?(e.onClusterAdd(s),"google"==mappl10n.options.engine&&m(s,e.map)):m(s,e.map),t.current=s,()=>{m(t.current,null)}}),[]),l((()=>{if(n.overlay){const t=_.pick(e.poi.poly,"strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity");n.overlay.setOptions({...t})}}),[e.poi.poly]),l((()=>{n.overlay&&n.overlay.setIcon(o.mappLib.getIcon(e.poi.iconid))}),[e.poi.iconid]),l((()=>{n.overlay&&function(t){if(e.poi.type)return;if("icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&e.isEditable)return;var a="leaflet"==mappl10n.options.engine?n.overlay._icon:n.overlay.getDiv();if(!a)return;switch(e.isEditable?"circle":mappl10n.options.highlight){case"circle":a.classList.toggle("mapp-marker-circle",t);break;case"icon":var i=t?o.mappLib.getIcon(mappl10n.options.highlightIcon):o.mappLib.getIcon(e.poi.iconid);if("leaflet"==mappl10n.options.engine&&n.overlay.getIcon().options.iconUrl==i.options.iconUrl)return;n.overlay.setIcon(i);break;case"scale":a.classList.add("mapp-marker"),a.classList.toggle("mapp-marker-scale",t)}const l=t?1e4:0;"leaflet"==mappl10n.options.engine?e.poi.type||n.overlay.setZIndexOffset(l):n.overlay.set("zIndex",l)}(e.isHovered||e.isOpen)}),[e.isHovered,e.isOpen,n.overlay]),l((()=>{if(n.overlay)return o.mappEvent.addListener(n.overlay,"click",(t=>{e.onClick(t)})),o.mappEvent.addListener(n.overlay,"mouseover",(t=>e.onMouseOver(t))),o.mappEvent.addListener(n.overlay,"mouseout",(t=>e.onMouseOut(t))),"kml"==e.poi.type&&("leaflet"==mappl10n.options.engine?(o.mappEvent.addListenerOnce(n.overlay,"ready",(()=>{n.overlayUpdate()})),o.mappEvent.addListenerOnce(n.overlay,"error",(()=>{alert(mappl10n.kml_error+" : "+e.poi.kml.url)}))):(o.mappEvent.addListener(n.overlay,"defaultviewport_changed",(()=>{u()})),o.mappEvent.addListener(n.overlay,"status_changed",(()=>
10{"OK"!=n.overlay.getStatus()&&alert(mappl10n.kml_error+" : "+e.poi.kml.url)})))),e.isEditable&&(s(!0),o.mappEvent.addListener(n.overlay,"dragstart",(()=>(s(!1),void(e.onChange&&e.onChange({viewport:null}))))),o.mappEvent.addListener(n.overlay,"dragend",(()=>(u(),void s(!0))))),()=>{o.mappEvent.clearInstanceListeners(n.overlay)}})),e.isOpen?e.onRenderPopup(e.poi,n.overlay):null}},892:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPopupModal:()=>u});var o=n(939);const a=wp.element.createElement,i=wp.element.createPortal,{Fragment:l,useEffect:s,useLayoutEffect:p,useRef:r,useState:c}=wp.element;function u(e){e={onClose:null,poi:null,...e};const[t,n]=c({isBusy:!1,html:null});function l(e){n((t=>({...t,...e})))}const p=React.createRef();function r(t){27==t.keyCode&&e.onClose()}return s((()=>(document.body.classList.add("mapp-modal-noscroll"),()=>document.body.classList.remove("mapp-modal-noscroll"))),[]),s((()=>{e.poi.oid&&(l({isBusy:!0}),o.mappLib.ajax({method:"GET",data:{action:"mapp_get_post",oid:e.poi.oid,nonce:mappl10n.options.nonce},responseType:"html",callback:e=>{l({isBusy:!1,html:e})}}))}),[e.poi.oid]),s((()=>{p.current&&p.current.focus(),console.log("focus"+document.activeElement)}),[p.current]),i(a("div",{className:"mapp-modal"},a("div",{className:"mapp-modal-backdrop",onClick:e.onClose,onKeyDown:r},a("div",{className:"mapp-modal-close",onClick:e.onClose},"Ã")),a("div",{className:"mapp-modal-content-wrapper",ref:p,onKeyDown:r,tabIndex:0},a("div",{className:"mapp-modal-content"},t.isBusy&&a("div",{className:"mapp-modal-spinner"}),!t.isBusy&&a("div",{className:"mapp-modal-template",dangerouslySetInnerHTML:{__html:t.html}}),a("div",{className:"mapp-modal-close",onClick:e.onClose},"X")))),document.body)}}},n={};function o(e){var a=n[e];if(void 0!==a)return a.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o(117),o(715),o(817),o(10),o(326),o(939),o(346),o(759),o(602),o(27),o(818),o(81),o(50),o(615),o(892),o(374)})(); 11}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.