MapPress Easy Google Maps - Version 2.62.6

Version Description

  • Fixed: error with missing layout option for sites upgrading from old versions
Download this release

Release Info

Developer chrisvrichardson
Plugin Icon 128x128 MapPress Easy Google Maps
Version 2.62.6
Comparing to
See all releases

Code changes from version 2.62.5 to 2.62.6

build/index_mappress.js CHANGED
@@ -1 +1 @@
1
- !function(){var t={854:function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e,i=window.mapp||{};e=jQuery,i.Map=function(t,e){this.defaults={alignment:null,center:null,editable:null,embed:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:mappl10n.options.poiList,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.hovered=null,this.iw=null,this.mapdata=t,this.opened=null,this.places=null,this.selected=null,this.settings=e||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.modal_=null,this.pois_=[],this.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.layout=this.layout?this.layout:mappl10n.options.layout,this.postid=this.postid?this.postid:mappl10n.options.postid},i.Map.prototype={display:function(){var t=this;!0===this.sanity()&&(this.render(),this.editable?this.templates={loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?this.templates={loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,streetViewControl:!this.query,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM}},this.mapOpts),this.mapOpts.minZoom=isNaN(parseInt(this.mapOpts.minZoom))?0:parseInt(this.mapOpts.minZoom),"leaflet"==mappl10n.options.engine?(this.map_=new L.Map(this.div.canvas.get(0),this.mapOpts),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_)):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),this.map_.setOptions(this.mapOpts),this.addLayers()),this.addGeolocateControl(),this.addStyles(),this.addMenu(),this.addPopup(),this.setMapTypeId(this.mapTypeId),this.clustering(),"postmodal"==mappl10n.options.mashupClick&&(this.modal_=new i.lib.Modal),this.places=new i.Places(e(".mapp-places",this.div.search),{map:t}),this.editable&&this.places.sel.focus(),e(this.places).on("search.mapp",(function(e,i){t.search(i)})),this.addEvents("click dragstart zoom_changed zoomstart",(function(e){"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||t.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(function(i){var o=e(this).attr("data-mapp-action");i.preventDefault(),t.action(o,e(this).attr("data-mapp-"+o),e(this))})),this.div.filters.on("change",(function(){t.ajaxQuery()})),e(window).on("resize",(function(){t.toggleView("mini"),t.poiClose(),t.resize()})),i.event.addListener(t.map_,"maptypeid_changed baselayerchange",(function(){t.set({dirty:!0})})),this.places.parse(this.center,(function(e){e&&e.geometry&&e.geometry.location?t.center={lat:e.geometry.location.lat,lng:e.geometry.location.lng}:t.center=null,t.query?t.ajaxQuery((function(){t.initCenter()})):(t.setPois(t.pois),t.initCenter())})),this.div.list.on("mouseenter","[data-mapp-poi]",(function(i){var o=e(this).attr("data-mapp-poi");t.poiHover(t.pois_[o])})),this.div.list.on("mouseleave","[data-mapp-poi]",(function(e){t.poiHover(null)})))},initCenter:function(){var t=this;this.recenter(),this.renderList(),this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():i.event.addListenerOnce(t.map_,"idle",(function(){t.initOpen()}))},initOpen:function(){var t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;this.initialOpenDirections?this.directionsOpen(null,t):t&&e&&t.open()},action:function(t,i,o){var n=this;switch(t){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.directionsOpen(null,this.opened);break;case"dir-from":this.directionsOpen(this.opened,null);break;case"filters-reset":this.div.filters.find(":input").each((function(){"checkbox"==this.type||"radio"==this.type?e(this).prop("checked",!1):e(this).val("")})),this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((function(t){n.search(t)}));break;case"layer":this.toggleLayer(i),this.toggleView("menu",!1);break;case"list-toggle":this.togglePoiListOpen();break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=o.attr("data-mapp-poi");this.poiOpen(this.pois_[s]);break;case"view-map":this.togglePoiListOpen(!1);break;case"view-list":this.togglePoiListOpen(!0);break;default:return!0}},addEvents:function(t,e){t=t.split(" ");for(var o=0;o<t.length;o++)i.event.addListener(this.map_,t[o],e)},addGeolocateControl:function(){if(mappl10n.options.ssl){var t=e(".mapp-geolocate-control-wrapper").get(0);"google"==mappl10n.options.engine?this.map_.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(t):(L.Control.Geolocate=L.Control.extend({onAdd:function(e){return t},onRemove:function(){}}),new L.Control.Geolocate({position:"bottomright"}).addTo(this.map_))}},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var t=e.makeArray(this.layers),i=0;i<t.length;i++){var o=t[i].trim(),n=o.split(".").pop();this.layers_[o]?this.toggleLayer(o):"kml"==n||"kmz"==n?this.layers_[o]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:o}):"json"==n&&(this.layers_[o]=new google.maps.Data({map:this.map_}).loadGeoJson(o))}},addMenu:function(){var t=this;e("body").on("click",(function(i){var o=e(i.target),n=o.attr("data-mapp-action");o==t.div.filters||"filters-toggle"==n||o.closest(t.div.filters).length||t.toggleView("filters",!1),o==t.div.menu||"menu-toggle"==n||o.closest(t.div.menu).length||t.toggleView("menu",!1)}))},addPopup:function(){var t=this,o=this.editable?"mapp-iw-edit":"mapp-iw";this.editable||(o+=" mapp-"+this.templates.popup,o+=mappl10n.options.thumbs?" mapp-thumb-"+mappl10n.options.popupThumbs:""),this.div.iw=e('<div class="'+o+'">').appendTo(this.div.canvas);var n=this.editable?"mapp-ib-popup mapp-ib-edit":"mapp-ib-popup";this.iw=new i.Infobox(this.map_,{className:n,clip:!0,pan:!0}),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(function(){t.poiClose()}))},addSearchMove:function(){},addStyles:function(){var o=this;if("leaflet"==mappl10n.options.engine){if(this.mapOpts.mapTypeControl){for(var n=L.control.layers(),s=0;s<mappl10n.options.baseLayers.length;s++){var a=mappl10n.options.baseLayers[s],l=mappl10n.options.providers[a.provider],r=e.extend({},l,a);n.addBaseLayer(L.tileLayer(l.url,r),r.label)}mappl10n.options.baseLayers.length>1&&n.addTo(this.map_)}this.map_.on("baselayerchange",(function(t){o.mapTypeId=t.layer.options.name}))}else{var p=mappl10n.options.styles?mappl10n.options.styles:[],h=mappl10n.options.style,c=["roadmap","satellite","terrain","hybrid"];for(var u in h&&"object"==t(p[h])&&this.map_.setOptions({styles:p[h]}),p)this.map_.mapTypes.set(u,new google.maps.StyledMapType(p[u],{name:u})),c.push(u);this.mapOpts.mapTypeControl&&this.map_.setOptions({mapTypeControl:!0,mapTypeControlOptions:{mapTypeIds:c,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}}),i.event.addListener(this.map_,"maptypeid_changed",(function(){o.mapTypeId=o.map_.getMapTypeId()}))}},ajaxQuery:function(t){},clusterGetLatLng:function(t){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var e=this.clusterer.getVisibleParent(t.overlay);return e?e.getLatLng():null}for(var i=this.clusterer.getClusters(),o=0;o<i.length;o++){var n=i[o].markers_;if(n.length>1)for(var s=0;s<n.length;s++)if(n[s]==t.overlay)return i[o].center_}}},clustering:function(){mappl10n.options.clustering&&!this.editable&&("leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup():this.clusterer=new MarkerClusterer(this.map_,[],{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m",maxZoom:21}))},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){for(var t=[],e=0;e<this.pois_.length;e++)this.pois_[e].type||t.push(this.pois_[e].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(t),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(t)}},dialog:function(t,e){var i=this;t?(this.div.dialog.html(t),this.div.dialog.show(),e&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout((function(){i.dialog(null)}),4e3))):this.div.dialog.hide()},directionsOpen:function(t,e){var o=t?t.getAddress():"",n=e?e.getAddress():"";t?this.popupOpen(t):e&&this.popupOpen(e),this.dir_||(this.dir_=new i.Directions(this.div.directions,this)),this.dir_.open(o,n)},fitBounds:function(t,e){return e="leaflet"==mappl10n.options.engine&&e?{paddingTopLeft:[e.left,e.top],paddingBottomRight:[e.right,e.bottom]}:e,this.map_.fitBounds(t,e)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMapTypeId:function(t){return"leaflet"==mappl10n.options.engine?"roadmap":this.map_.getMapTypeId(t)},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},poiClose:function(){this.poiHighlight(null),this.selected=null,this.opened=null,this.hovered=null,this.iw.close(),this.dir_&&this.dir_.close(),e(this).triggerHandler("mapp.close")},poiHighlight:function(t){if("icon"!=mappl10n.options.highlight||"leaflet"!=mappl10n.options.engine||!this.editable){if(e("[data-mapp-poi]",this.div.list).removeClass("mapp-selected"),this.hovered&&this.hovered.highlight(!1),t){var i=e.inArray(t,this.pois_);e('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"),t.highlight(!0)}this.selected&&(i=e.inArray(t,this.selected),e('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"))}},poiHover:function(t){t&&this.opened==t||(mappl10n.options.tooltips||(this.poiHighlight(null),this.hovered=null),t&&(this.poiHighlight(t),this.hovered=t,mappl10n.options.tooltips&&!this.editable&&this.popupOpen(t,null,"popup")))},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.set({dirty:!0})},poiOpen:function(t,i){var o=this;if(this.poiClose(),this.selected=t,this.poiHighlight(t),t.postid&&t.url&&!this.editable)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(t.url);case"postnew":return void window.open(t.url);case"postmodal":return this.modal_.open(),this.modal_.setContent('<div class="mapp-modal-spinner">'),void t.fetchPost((function(){return o.modal_.setContent(t.html)}))}this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),this.popupOpen(t,i,"popup"),e(this).triggerHandler("mapp.open",t)},poiRemove:function(t){var i=e.inArray(t,this.pois_);-1!=i&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),this.renderList()),this.set({dirty:!0})},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.editable||(this.iw.close(),this.dir_&&this.dir_.close(),this.opened=null,e(this).triggerHandler("mapp.close"))},popupOpen:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"popup",o=null;this.popupClose(),e&&e.featureData?o=e.featureData:e&&e.propagatedFrom&&e.propagatedFrom.feature&&e.propagatedFrom.feature.properties&&(o=e.propagatedFrom.feature.properties),this.div.iw.html(t.render(i,o));var n=this.clusterGetLatLng(t),s=n||t.getPosition(e);this.iw.open({position:s,anchorPoint:t.getAnchorPoint(e)}),this.opened=t},recenter:function(){var t=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});else if(t)this.setView(t,e||1);else if(0!=this.pois_.length)if(1!=this.pois_.length){for(var i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds,o=0;o<this.pois_.length;o++){var n=this.pois_[o].getBounds(),s=this.pois_[o].getPosition();i=n?"leaflet"==mappl10n.options.engine?i.extend(n):i.union(n):i.extend(s)}e?this.setView(i.getCenter().toJSON(),e):this.fitBounds(i)}else this.pois_[0].center(e);else this.setView({lat:0,lng:0},e||1)},render:function(){var t=this,o=this.name?this.name+"-layout":"",n="mapp-layout",s=this.layout?this.layout:mappl10n.options.layout;if(n+="left"==s?" mapp-list-left":" mapp-inline",n+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",!document.body.classList.contains("block-editor-page")){var a=this.alignment?this.alignment:mappl10n.options.alignment;n+=a?" align"+a:"",n+=a?" mapp-align-"+a:""}n+=this.classname?" "+this.classname:"";var l=i.lib.template("map",{map:this,layout:s});if(this.sel)this.sel.html(l),this.sel.addClass(n),this.sel.attr("id",o),this.div.layout=this.sel;else{var r=e('<div id="'+o+'" class="'+n+'">');r.html(l),e("#"+this.name+"-layout").replaceWith(r),this.div.layout=r}if(!this.div.layout.length)return i.lib.log("MapPress: Missing map name or container for map: "+this.name);e.each(["canvas","controls","dialog","directions","filters","list","menu","wrapper","search"],(function(i,o){t.div[o]=e(".mapp-"+o,t.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderList:function(){var t=this.getBounds(),o=0,n=this;if(!this.editable)for(var s=0;s<this.pois_.length;s++)this.pois_[s].visible=!0,this.query&&t&&!t.contains(this.pois_[s].getPosition())&&(this.pois_[s].visible=!1),o+=this.pois_[s].visible;this.div.list.html(i.lib.template(this.templates.loop,{map:this,pois:this.pois_,count:o})),mappl10n.options.thumbs&&this.div.list.addClass(" mapp-thumb-"+mappl10n.options.listThumbs),this.editable&&(this.div.list.trigger("render"),e(".mapp-items",this.div.list).sortable({axis:"y",cursor:"move",delay:200,update:function(){n.sortPois(e(this).sortable("toArray",{attribute:"data-mapp-poi"}))}}))},renderMenu:function(){for(var t in this.layers_)e('[data-mapp-layer="'+t+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[t].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():i.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){var t="Please see the MapPress FAQ Troubleshooting section to resolve.";if("leaflet"==mappl10n.options.engine){if("undefined"==typeof L)return i.lib.alert("MAPPRESS ERROR: Unable to load Leaflet. "+t),!1}else{if("undefined"==typeof google)return i.lib.alert("MAPPRESS ERROR: Google Maps API not loaded. "+t),!1;e(document).ready((function(){e('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&i.lib.alert("MAPPRESS ERROR: Google Maps API key loaded multiple times. "+t)}))}return"undefined"==typeof _?(i.lib.log("MAPPRESS ERROR: plugin conflict, underscore.js not loaded. "+t),!1):!(void 0===jQuery.ui||jQuery.ui.version<"1.12")||(i.lib.log("MAPPRESS WARNING: plugin conflict, Outdated jQuery version: "+jQuery.ui.version+" should be >= 1.12 "+t),!0)},search:function(t){if(t&&t.geometry){var e=t.geometry.location?t.geometry.location:null,i=t.geometry.viewport?t.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var o=new L.LatLng(e.lat,e.lng),n=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):o.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:e,radius:1e3*mappl10n.options.radius});n=i?new google.maps.LatLngBounds(new google.maps.LatLng(i.sw.lat,i.sw.lng),new google.maps.LatLng(i.ne.lat,i.ne.lng)).union(s.getBounds()):s.getBounds()}n&&this.fitBounds(n),this.setView(e)}},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.dirty=i;break;case"mapTypeId":this.mapTypeId=i,this.setMapTypeId(i);break;case"poiList":this.poiList=null==i?mappl10n.options.poiList:i,this.div.layout.toggleClass("mapp-has-list",this.poiList),this.togglePoiListOpen(this.poiList),this.toggleView("mini");break;case"title":this.title=i;break;default:this[e]=i}}},setMapTypeId:function(i){if("leaflet"==mappl10n.options.engine){i=!this.editable&&mappl10n.options.style&&"streets"==i?mappl10n.options.style:i,i=_.findIndex(mappl10n.options.baseLayers,{name:i})>=0?i:mappl10n.options.baseLayers[0].name;for(var o=0;o<mappl10n.options.baseLayers.length;o++){var n=mappl10n.options.baseLayers[o],s=mappl10n.options.providers[n.provider];if(n.name==i){var a=e.extend({},s,n);L.tileLayer(a.url,a).addTo(this.map_)}}}else i=-1!=e.inArray(i,["roadmap","satellite","terrain","hybrid"])||"object"==t(mappl10n.options.styles[i])?i:"roadmap",this.map_.setMapTypeId(i)},setPois:function(t){if(this.resetPois(),t)for(var e=0;e<t.length;e++){var o=new i.Poi(t[e]);this.pois_.push(o),o.id=this.pois_.length-1,o.setMap(this)}this.clustersSet()},setSize:function(t){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];if(this.embed)return this.div.layout.css({height:"100%"}),void this.div.wrapper.css({"padding-bottom":0,height:"100%"});if(t&&t.hasOwnProperty("width")){var i=t.width?t.width:e.width;this.div.layout.css("width",i)}if(t&&t.hasOwnProperty("height")){var o=t.height?t.height:e.height;"string"==typeof o&&o.includes("%")?this.div.wrapper.css({"padding-bottom":o,height:"auto"}):this.div.wrapper.css({"padding-bottom":0,height:o})}this.resize()},setView:function(t,e,i){"leaflet"==mappl10n.options.engine?(null==e&&(e=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(t,e,i)):(t=t&&!t.toJSON?{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}:t,e=e?parseInt(e):null,t&&this.map_.setCenter(t),e&&this.map_.setZoom(e))},sortPois:function(t){var e=Array();this.set({dirty:!0});for(var i=0;i<t.length;i++){var o=parseInt(t[i]);if(isNaN(o))return!1;e.push(this.pois_[o])}if(e.length!=this.pois_.length)return!1;this.pois_=e,this.renderList()},toggleLayer:function(t,i){var o=this;i=void 0!==i?i:null==this.layers_[t].getMap(),e.each(["traffic","bicycling","transit"],(function(t,e){o.layers_[e].setMap(null)})),i&&this.layers_[t].setMap(this.map_)},togglePoiListOpen:function(t){var e=this;this.div.layout.toggleClass("mapp-list-open",t),setTimeout((function(){return e.resize()}),100)},togglePois:function(t){t=!!t;for(var e=0;e<this.pois_.length;e++)this.pois_[e].setVisible(t)},toggleView:function(t,e){if("mini"==t){var i=this.div.layout.hasClass("mapp-view-mini"),o=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",o),void(o!=i&&this.togglePoiListOpen(!o))}e=void 0===e?!this.div.layout.hasClass("mapp-view-"+t):e,this.div.layout.toggleClass("mapp-view-"+t,e),"list"==t&&e&&this.renderList(),"menu"==t&&e&&this.renderMenu(),"directions"==t&&this.resize()},toJSON:function(){this.pois=[];for(var t=0;t<this.pois_.length;t++)this.pois.push(this.pois_[t].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,title:this.title,width:this.width,zoom:this.zoom}}}},397:function(){var t,e=window.mapp||{};t=jQuery,e.Directions=function(e,i){this.sel=t(e),this.map=i;var o=this;this.sel.on("keydown",(function(t){13==t.which?(o.getDirections(),t.preventDefault()):27==t.which&&o.close()})),this.sel.on("click","[data-mapp-action]",(function(e){var i=t(this).attr("data-mapp-action"),n=t(".mapp-dir-daddr",o.sel).val(),s=t(".mapp-dir-saddr",o.sel).val();switch(e.preventDefault(),i){case"dir-cancel":o.close();break;case"dir-get":o.getDirections();break;case"dir-swap":t(".mapp-dir-saddr",o.sel).val(n),t(".mapp-dir-daddr",o.sel).val(s)}})),this.open=function(e,i){"google"!=mappl10n.options.directions?(this.map.toggleView("directions",!0),t(".mapp-dir-addr",this.sel).removeClass("mapp-error"),t(".mapp-dir-saddr",this.sel).val(e),t(".mapp-dir-daddr",this.sel).val(i)):this.openGoogle(e,i)},this.close=function(){this.map.toggleView("directions",!1)},this.getDirections=function(){var e=t(".mapp-dir-saddr",this.sel).val().trim(),i=t(".mapp-dir-daddr",this.sel).val().trim();this.map.poiClose(),this.openGoogle(e,i)},this.openGoogle=function(t,e){var i=mappl10n.options.directionsServer;-1==i.toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:function(t,e,i){"use strict";i.r(e);var o,n=i(991),s=i(574),a=window.mapp||{};a.geocoders={},o=jQuery,a.geocoders.algolia=function(t){this.map=t},a.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(t,e){var i="https://places-dsn.algolia.net/1/places/query?query="+encodeURIComponent(t)+"&hitsPerPage=5";i=mappl10n.options.country?i+"&countries="+mappl10n.options.country.toLowerCase():i,i=mappl10n.options.language?i+"&language="+mappl10n.options.language.toLowerCase():i+"&language=en",o.getJSON(i,(function(i){if(i&&i.hits&&i.hits.length>0){var o=i.hits.map((function(e,o){return(0,n.Z)({formatInputValue:s.Z,hit:e,hitIndex:o,query:t,rawAnswer:i})}));e(o)}else e(null)}))}},function(t){a.geocoders.google=function(e){this.map=e,this.token=null;var i=t('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,i.remove()},a.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(t,i){if("OK"==i&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}e(t)}else e(null)}))},getFirstPrediction:function(e,i){var o=this;this.getPredictions(e,(function(e){e&&t.isArray(e)?o.getDetails(e[0],(function(t){return i(t)})):i(null)}))},getPredictions:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=this.map.getMap().getBounds();"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var o={input:t,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:this.map.editable?null:["geocode"]};this.autocompleteService.getPlacePredictions(o,(function(t,i){"OK"==i&&t&&t.length?(t=(t=t.map((function(t){return t.value=t.description,t}))).filter((function(t){return t.place_id})),e(t)):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),e(null))}))}}}(jQuery),function(t){a.geocoders.mapbox=function(t){this.map=t},a.geocoders.mapbox.prototype={getDetails:function(t,e){var i=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;e({formatted_address:t.place_name,name:t.name,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:i}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+e+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.features&&t.features.length>0?(t.features=t.features.map((function(t){return t.value=t.label=t.place_name,t})),i(t.features)):i(null)}))}}}(jQuery),function(t){a.geocoders.nominatim=function(t){this.map=t},a.geocoders.nominatim.prototype={getDetails:function(t,e){var i=t.display_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));var s=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;e({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:s}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.length?(t=t.map((function(t){return t.value=t.display_name,t})),i(t)):i(null)}))}}}(jQuery)},282:function(){var t=window.mapp||{};t.Icons={},t.Icons.get=function(e){var i=t.Icons.getUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:i,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:i}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:function(){var t,e=window.mapp||{};t=jQuery,e.Infobox=function(i,o){var n=this;this.map=i,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?i.getContainer():i.getDiv(),this.node=null,this.opts=_.extend({popout:!1},o),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null;var s=this;if(this.wrapper=t('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib-content"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div></div>'),this.wrapper.addClass(o.className),this.node=t(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?e.event.addListener(this.map,"move",(function(t){s.isOpen&&s.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=function(){s.isOpen&&s.draw()}),this.node.get(0).addEventListener("load",(function(){n.open({position:n.position,anchorPoint:n.anchorPoint})}),{capture:!0}),s.opts.popout)var a="body";else a="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();s.wrapper.appendTo(a)},e.Infobox.prototype={clipToWindow:function(){var t=p.y,e=p.x-w/2+this.anchorPoint.x,i=this.mapDiv.getBoundingClientRect(),o=i.x+window.scrollX;t+=i.y+window.scrollY,e+=o;var n=this.opts.clip?divw:document.body.clientWidth;e+w>n&&(e=n-w),e<0&&(e=0),this.wrapper.css({left:e}),h=this.node.outerHeight(),t=p.y-h+this.anchorPoint.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&t<0&&t<divh-(p.y+h)&&(t=p.y,this.node.addClass("mapp-ib-flip"))},close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(this.position){var t,e;if(t=this.node.outerWidth(),this.node.outerHeight(),"leaflet"==mappl10n.options.engine)e=this.map.latLngToContainerPoint(this.position);else{var i=this.overlayView.getProjection();if(!i)return;e=i.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:e.x-t/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-e.y-this.anchorPoint.y})}},getContent:function(){return t(".mapp-ib",this.node)},open:function(t){this.position=t.position,this.anchorPoint=Array.isArray(t.anchorPoint)?{x:t.anchorPoint[0],y:t.anchorPoint[1]}:t.anchorPoint,this.node.css({maxWidth:.8*this.mapDiv.clientWidth-this.fudge,maxHeight:this.mapDiv.clientHeight+this.anchorPoint.y-2*this.fudge}),this.wrapper.addClass("mapp-open"),this.draw(),this.opts.popout?this.clipToWindow():"leaflet"==mappl10n.options.engine?this.panLeaflet():this.panGoogle(),this.isOpen=!0},panGoogle:function(){var t=this.overlayView.getProjection(),e=t?t.fromLatLngToDivPixel(this.position):null;if(e){var i=this.node.outerWidth(),o=this.node.outerHeight(),n=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(e.x-i/2-this.fudge,e.y+this.fudge)),s=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(e.x+i/2+this.fudge,e.y-o+this.anchorPoint.y-this.fudge)),a=new google.maps.LatLngBounds(n,s);this.map.panToBounds(a)}},panLeaflet:function(){var e=this.map.latLngToContainerPoint(this.position),i=t(this.mapDiv).width(),o=t(this.mapDiv).height(),n=this.node.outerWidth(),s=this.node.outerHeight(),a={x:e.x,y:e.y};e.x+n/2+this.anchorPoint.x>i-this.fudge?a.x=Math.max(i-n/2-this.anchorPoint.x-this.fudge,i/2-this.anchorPoint.x):e.x-n/2+this.anchorPoint.x<this.fudge&&(a.x=Math.min(n/2+this.anchorPoint.x+this.fudge,i/2-this.anchorPoint.x)),e.y+this.anchorPoint.y-s<this.fudge&&(a.y=s-this.anchorPoint.y+this.fudge),a.y>=o&&(a.y=o-this.fudge),this.map.panBy([e.x-a.x,e.y-a.y])},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:function(){var t,e=window.mapp||{};t=jQuery,e.lib={ajax:function(e){var i=this,o={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"json"==e.dataType&&"OK"!=t.status&&console.log(t.status),"json"==e.dataType&&t.output?i.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,o,n){"cancel"!=o&&(void 0!==n&&""!=n&&i.alert("AJAX ERROR\r\nTextStatus="+o+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e=t.extend(o,e),t.ajax(e)},alert:function(t){function e(_x){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){mappl10n.options.admin||mappl10n.options.debug?alert(t):window.console&&console.error(t)})),jqVersionCheck:function(e){if(void 0===t||void 0===e)return!1;e=e.split("."),v=t.fn.jquery.split(".");for(var i=0;i<e.length;i++){var o=parseInt(e[i]),n=void 0!==v[i]?parseInt(v[i]):0;if(n!=o)return n>o}return!0},log:function(t){window.console&&console.error(t)},scrollTo:function(t,e,i){if(t&&e&&t.length&&e.length){var o=t.height(),n=e.outerHeight(!0),s=t.scrollTop(),a=s+e.position().top,l=a+n;a=a-o/2-n/2,i&&(a-=i.outerHeight(!0)),(a<s||l>s+o)&&t.scrollTop(a)}},template:function(i,o){if(e.lib.templates=e.lib.templates?e.lib.templates:{},!e.lib.templates[i]){var n=mappl10n.options.templates?mappl10n.options.template[i]:t("#mapp-tmpl-"+i).html();if(!n)return"";e.lib.templates[i]=_.template(n.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return e.lib.templates[i](o)},uniqid:function(){return void 0===e.lib.uniqidCounter?e.lib.uniqidCounter=0:e.lib.uniqidCounter++,e.lib.uniqidCounter}},e.lib.jqVersionCheck("1.7")||e.lib.alert("jQuery version is too old: "+t.fn.jquery),t("body").on("tabsactivate tabsshow",(function(e,i){var o=i.newPanel?i.newPanel:i.panel;o&&t(".mapp-layout",o).each((function(){var e=t(this).find(".mapp-canvas").attr("id"),i=window[e];i.resize(),i.recenter()}))})),jQuery,"leaflet"==mappl10n.options.engine&&"undefined"!=typeof L&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6}),e.event={addListener:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.on(e[o],i):google.maps.event.addListener(t,e[o],i)},addListenerOnce:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.once(e[o],i):google.maps.event.addListenerOnce(t,e[o],i)},clearInstanceListeners:function(t){"leaflet"==mappl10n.options.engine?t.off():google.maps.event.clearInstanceListeners(t)},clearListeners:function(t,e){e=e.split(" ");for(var i=0;i<e.length;i++)"leaflet"==mappl10n.options.engine?t.off(e[i]):google.maps.event.clearListeners(t,e[i])},trigger:function(t,e,i){"leaflet"==mappl10n.options.engine?t.fire(e,i):google.maps.event.trigger(t,e,i)}},function(t){e.lib.Modal=function(){this.el=null;var e=this;this.el=t('<div class="mapp-modal" tabindex="0">').append('<div class="mapp-modal-backdrop">').append('<div class="mapp-modal-content" tabindex="1">'),this.el.hide(),this.el.on("click",".mapp-modal-backdrop",(function(){e.close()})),this.el.on("click",".mapp-modal-close",(function(){e.close()})),this.el.on("keydown",(function(t){27==t.which&&e.close()}))},e.lib.Modal.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),t("body").removeClass("mapp-modal-noscroll"))},focus:function(){t(".mapp-modal-focus",this.el).attr("tabindex",0),t(".mapp-modal-focus",this.el).focus()},open:function(){this.el.parent().length||this.el.appendTo("body"),this.el.show(),t("body").addClass("mapp-modal-noscroll"),this.focus()},setContent:function(e){t(".mapp-modal-content",this.el).empty(),t(".mapp-modal-content",this.el).append('<div class="mapp-modal-close">&times;').append(e),this.focus()}}}(jQuery)},692:function(){jQuery,mapp.load=function(){if("undefined"!=typeof mapp&&mapp.data)for(;mapp.data.length;){var t=mapp.data.pop();window[t.name]=new mapp.Map(t),window[t.name].display()}},mapp.load()},436:function(){var t;t=jQuery,mapp.Marker=function(t){var e=this;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(t),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=function(){return e.draw()},this.overlayView.onAdd=function(){return e.onAdd()},this.overlayView.onRemove=function(){return e.onRemove()}},mapp.Marker.prototype={draw:function(){if(this.div&&this.icon){var e=this.overlayView.getProjection().fromLatLngToDivPixel(this.position),i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};t(this.div).css({left:e.x-i.width/2,top:e.y-i.height})}},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(t){var e="on"+t.type[0].toUpperCase()+t.type.slice(1);this[e]&&this[e](t)},onAdd:function(){var e=this,i=this.overlayView.getPanes();this.div=t('<div class="mapp-marker">'),this.div.appendTo(i.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(function(){(!e.dragging||e.dragging&&!e.dragging.moved)&&mapp.event.trigger(e,"click"),e.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable)},onMouseenter:function(t){mapp.event.trigger(this,"mouseover")},onMouseleave:function(t){mapp.event.trigger(this,"mouseout")},onPointerdown:function(t){var e=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:t.clientX,y:t.clientY},offset:{x:i.x-(t.clientX-e.left),y:i.y-(t.clientY-e.top)}},this.toggleDragEvents(!0)},onPointermove:function(t){if(!(Math.abs(t.clientX-this.dragging.startPixel.x)+Math.abs(t.clientY-this.dragging.startPixel.y)<3)){var e=this.map.getDiv().getBoundingClientRect(),i={x:t.clientX-e.left+this.dragging.offset.x,y:t.clientY-e.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(i)),this.draw(),this.dragging.moved=!0,mapp.event.trigger(this,"dragstart")}},onPointercancel:function(t){this.onPointerup(t)},onPointerup:function(t){this.dragging&&this.dragging.moved&&mapp.event.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(t,e){var i="set"+t[0].toUpperCase()+t.slice(1);this[i]&&this[i](e)},setDraggable:function(t){this.draggable=t,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),t&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(t){if(void 0!==t&&(this.icon=t),this.icon&&this.div){var e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);var i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:i.width,height:i.height}),this.setZIndex(),this.draw()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(var e in t)this.set(e,t[e])},setVisible:function(t){this.visible=t,this.div&&this.div.css("visibility",t?"visible":"hidden")},setZIndex:function(t){this.zIndex=void 0!==t?t:this.zIndex,this.div&&this.div.css("z-index",t)},toggleDragEvents:function(t){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),t&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},510:function(){var t,e=window.mapp||{};t=jQuery,e.Places=function(i,o){var n=this;this.sel=t(i),this.opts=t.extend({map:null},o);var s="";s="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new e.geocoders[s](this.opts.map),this.sel.on("keydown",(function(e){if(13==e.which){e.preventDefault();var i=n.parseLatLng(n.sel.val());i&&(t(n).triggerHandler("search.mapp",i),n.sel.autocomplete("close"),e.stopImmediatePropagation()),"http"==n.sel.val().substring(0,4)&&(t(n).triggerHandler("search.mapp",n.sel.val()),n.sel.autocomplete("close"),e.stopImmediatePropagation()),!1===mappl10n.options.autocomplete&&(n.sel.autocomplete("option","disabled",!1),n.sel.autocomplete("search"))}else!1===mappl10n.options.autocomplete&&n.sel.autocomplete("option","disabled",!0),n.sel.autocomplete("close")})),this.initAutocomplete()},e.Places.prototype={parse:function(t,e){var i="";if(t&&(i="string"==typeof(i=t&&t.name?t.name:t)?i.trim():i),i)if("user"!=i)if(t&&t.geometry)e(t);else{var o=this.parseLatLng(t);o?e(o):this.geocoder.getFirstPrediction(t,(function(t){e(t)}))}else this.geolocate((function(t){e(t)}));else e(null)},parseLatLng:function(t){var e;if(t.hasOwnProperty("lat")&&t.hasOwnProperty("lng"))e=t;else{var i=t&&t.name?t.name:t,o=(i="string"==typeof i?i.trim():i).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(e={lat:n,lng:s})}}return e?{name:e.lat+", "+e.lng,geometry:{location:e}}:null},geolocate:function(t){var e=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(i){var o={lat:i.coords.latitude,lng:i.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),e.sel.val("")}),(function(e){var i=e&&e.message?" : "+e.message:"";alert(mappl10n.no_geolocate+i),t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;this.sel&&this.sel.length&&(this.sel.on("autocompleteselect",(function(i,o){e.geocoder.getDetails(o.item,(function(i){e.parse(i,(function(i){i&&t(e).triggerHandler("search.mapp",i)}))}))})),this.sel.autocomplete({appendTo:this.sel.parent(),autoFocus:!0,minLength:1,delay:"nominatim"===mappl10n.options.geocoder?500:300,disabled:!1===mappl10n.options.autocomplete,source:function(t,i){e.geocoder.getPredictions(t.term,(function(t){i(t)}))}}))}}},548:function(){var t,e=window.mapp||{};t=jQuery,e.Poi=function(i){if(this.defaults={address:null,body:null,html:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},t.extend(this,this.defaults,i),i&&i.correctedAddress&&(this.address=i.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),i.viewport&&i.viewport.sw&&i.viewport.ne&&i.viewport.sw.lat){var o=i.viewport.sw,n=i.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(o.lat,o.lng),L.latLng(n.lat,n.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(o.lat,o.lng),new google.maps.LatLng(n.lat,n.lng))}var s=[],a=[];if(!i.overlay)switch(this.type){case"polygon":if(i.poly&&i.poly.paths)for(var l=0;l<i.poly.paths.length;l++){s=[];for(var r=0;r<i.poly.paths[l].length;r++)s.push(new google.maps.LatLng(i.poly.paths[l][r].lat,i.poly.paths[l][r].lng));a.push(new google.maps.MVCArray(s))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(a)}),this.setColors(i.poly);break;case"polyline":if(i.poly&&i.poly.path)for(l=0;l<i.poly.path.length;l++)s.push(new google.maps.LatLng(i.poly.path[l].lat,i.poly.path[l].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(s)}),this.setColors(i.poly);break;case"circle":var p=new google.maps.LatLng(i.point.lat,i.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(i.poly.radius)}),this.setColors(i.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(i.poly);break;case"kml":var h=i.kml&&i.kml.url?i.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(h):new google.maps.KmlLayer({url:h,preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([i.point.lat,i.point.lng]):this.overlay=new e.Marker({position:new google.maps.LatLng(i.point.lat,i.point.lng)})}i.type||this.set({iconid:i.iconid})},e.Poi.prototype={center:function(t){var e=this.getBounds();if("number"!=typeof t)if(e){var i=e.getNorthEast().toJSON().lng-e.getSouthWest().toJSON().lng;i<0&&(i+=360),t=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),t,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),t)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(t){switch(this.isPoly()?"poly":this.type){case"kml":return"leaflet"==mappl10n.options.engine?[0,0]:t&&t.pixelOffset?new google.maps.Point(t.pixelOffset.width,t.pixelOffset.height):new google.maps.Point(0,0);case"poly":return"leaflet"==mappl10n.options.engine?[0,0]:new google.maps.Point(0,0);default:return mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?[0,0-mappl10n.options.iconScale[1]]:[0,-32]}},getBounds:function(){var t;switch(this.type){case"polyline":t=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(e){t.extend(e)}));break;case"polygon":t=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(e){e.forEach((function(e){t.extend(e)}))}));break;case"rectangle":case"circle":t=this.overlay.getBounds();break;case"kml":t=(t="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||this.viewport;break;default:return this.viewport}return t},getColors:function(){var t={};for(var e in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[e]&&(t[e]=this.overlay[e]);return t},getPosition:function(t){if(!this.type)return"leaflet"==mappl10n.options.engine?this.overlay.getLatLng():this.overlay.getPosition();if("kml"==this.type&&t&&t.latLng)return t.latLng;var e=this.getBounds();return e?e.getCenter():"leaflet"==mappl10n.options.engine?new L.latLng(0,0):new google.maps.LatLng(0,0)},getTemplateColors:function(){var t=this.getColors();return"polyline"==this.type?{color:t.strokeColor,opacity:100*t.strokeOpacity,weight:t.strokeWeight}:{color:t.fillColor,opacity:100*t.fillOpacity,weight:t.strokeWeight}},highlight:function(i){if(!this.type){var o="leaflet"==mappl10n.options.engine?t(this.overlay._icon):this.overlay.getDiv();if(o){var n=this.editable?"circle":mappl10n.options.highlight;switch(n){case"circle":o.toggleClass("mapp-marker-circle",i);break;case"icon":var s=i?e.Icons.get(mappl10n.options.highlightIcon):e.Icons.get(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==s.options.iconUrl)return;this.overlay.setIcon(s);break;case"scale":o.addClass("mapp-marker"),o.toggleClass("mapp-marker-scale",i)}this.setZIndex(i?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(t){this.map.poiOpen(this,t)},fetchPost:function(t){var i=this;this.html?t():e.lib.ajax({type:"GET",data:{action:"mapp_get_post",postid:this.postid,nonce:mappl10n.options.nonce},dataType:"html",callback:function(e){i.html=e,t()}})},render:function(t,i){var o=_.extend(this,{icon:e.Icons.getUrl(this.iconid)});return i&&(o.body=i.description,o.title=i.name),e.lib.template(this.map.templates[t],{poi:o,colors:this.getTemplateColors()})},set:function(t){for(var i in t){var o=t[i];switch(i){case"dirty":this.map.set({dirty:o});break;case"iconid":this.type||(this.iconid=o,this.overlay.setIcon(e.Icons.get(o)));break;default:this[i]=o}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty:dirty})},setColors:function(t){var e={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})t&&void 0!==t[i]&&(e[i]=t[i]);this.overlay.setOptions(e)},setEditable:function(t){var i=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),e.event.clearListeners(this.overlay,"rightclick"),e.event.clearListeners(this.overlay,"dragstart"),t&&(e.event.addListener(this.overlay,"dragstart",(function(){i.viewport=null,i.map.poiClose()})),e.event.addListener(this.overlay,"dragend",(function(){i.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(e.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&i.overlay.getPath().getLength()>2&&i.overlay.getPath().removeAt(t.vertex)})),e.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){i.map.set({dirty:!0})})))))},setMap:function(t){var i=this;this.map=t,e.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(e.event.addListenerOnce(this.overlay,"ready",(function(){i.viewport=i.overlay.getBounds()})),e.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(e.event.addListener(this.overlay,"defaultviewport_changed",(function(){i.viewport=i.overlay.getDefaultViewport()})),e.event.addListener(this.overlay,"status_changed",(function(){var t=i.overlay.getStatus();"OK"!=t&&alert(mappl10n.kml_error+":"+t)})))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap())),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),e.event.addListener(this.overlay,"mouseover",(function(t){i.map.poiHover(i)})),e.event.addListener(this.overlay,"mouseout",(function(t){i.map.poiHover(null)}))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t){var e=t.color,i=t.opacity,o=t.weight;i=i?i/100:void 0;var n="polyline"==this.type?{strokeColor:e,strokeOpacity:i,strokeWeight:o}:{fillColor:e,fillOpacity:i,strokeColor:e,strokeWeight:o,strokeOpacity:1};this.setColors(n)},setVisible:function(t){void 0!==this.overlay.setVisible&&this.overlay.setVisible(t)},setZIndex:function(t){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(t):this.overlay.set("zIndex",t)},toJSON:function(){var t={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},e=this.getPosition();t.point=e.toJSON();var i=this.viewport?this.viewport:this.getBounds();if(i){var o=i.toJSON();t.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}if("kml"==this.type&&(t.kml=this.kml),this.isPoly())switch(t.poly=this.getColors(),this.type){case"circle":t.poly.radius=this.overlay.getRadius();break;case"polyline":t.poly.path=[],this.overlay.getPath().forEach((function(e){t.poly.path.push(e.toJSON())}));break;case"polygon":t.poly.paths=[],this.overlay.getPaths().forEach((function(e){var i=[];e.forEach((function(t){i.push(t.toJSON())})),t.poly.paths.push(i)}));break;case"rectangle":var n=this.overlay.getBounds();t.viewport={sw:n.getSouthWest().toJSON(),ne:n.getNorthEast().toJSON()}}return t}}},675:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0;e<t.length;e++){var i=t[e].match(/country\/(.*)?/);if(i)return i[1]}return}},892:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var i in e)if(-1!==t.indexOf(i))return e[i];return"address"}},991:function(t,e,i){"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,r=t.rawAnswer;try{var h=i.locale_names[0],c=i.country,u=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,d=i.city&&i.city[0]!==h?i.city[0]:void 0,g=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,m=i.county&&i.county[0]!==h?i.county[0]:void 0,v=i.postcode&&i.postcode.length?function(t,e){for(var i=e[0].value,o=[],n=1;n<e.length;++n)"none"!==e[n].matchLevel&&o.push({index:n,words:e[n].matchedWords});if(0===o.length)return{postcode:t[0],highlightedPostcode:i};return o.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),{postcode:t[o[0].index],highlightedPostcode:e[o[0].index].value}}(i.postcode,i._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},f=v.postcode,y=v.highlightedPostcode,w={name:p(i._highlightResult.locale_names),city:d?p(i._highlightResult.city):void 0,administrative:u?p(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:g?p(i._highlightResult.suburb):void 0,county:m?p(i._highlightResult.county):void 0,postcode:y},b={name:h,administrative:u,county:m,city:d,suburb:g,country:c,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:f,postcodes:i.postcode&&i.postcode.length?i.postcode:void 0},L=e(b);return l(l({},b),{},{highlight:w,hit:i,hitIndex:s,query:a,rawAnswer:r,value:L})}catch(t){return console.error("Could not parse object",i),console.error(t),{value:"Could not parse object"}}};var o=s(i(675)),n=s(i(892));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function p(t){for(var e=t[0].value,i=[],o=1;o<t.length;++o)"none"!==t[o].matchLevel&&i.push({index:o,words:t[o].matchedWords});return 0===i.length?e:(i.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),0===i[0].index?"".concat(e," (").concat(t[i[1].index].value,")"):"".concat(t[i[0].index].value," (").concat(e,")"))}},574:function(t,e){"use strict";e.Z=function(t){var e=t.administrative,i=t.city,o=t.country,n=t.name,s=t.type;return"".concat(n).concat("country"!==s&&void 0!==o?",":"","\n ").concat(i?"".concat(i,","):"","\n ").concat(e?"".concat(e,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()}}},e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.exports}i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(854),i(397),i(442),i(282),i(689),i(436),i(510),i(548),i(692)}();
1
+ !function(){var t={854:function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e,i=window.mapp||{};e=jQuery,i.Map=function(t,e){this.defaults={alignment:null,center:null,editable:null,embed:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:mappl10n.options.poiList,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.hovered=null,this.iw=null,this.mapdata=t,this.opened=null,this.places=null,this.selected=null,this.settings=e||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.modal_=null,this.pois_=[],this.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.layout=this.layout?this.layout:mappl10n.options.layout,this.postid=this.postid?this.postid:mappl10n.options.postid},i.Map.prototype={display:function(){var t=this;!0===this.sanity()&&(this.render(),this.editable?this.templates={loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?this.templates={loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,streetViewControl:!this.query,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM}},this.mapOpts),this.mapOpts.minZoom=isNaN(parseInt(this.mapOpts.minZoom))?0:parseInt(this.mapOpts.minZoom),"leaflet"==mappl10n.options.engine?(this.map_=new L.Map(this.div.canvas.get(0),this.mapOpts),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_)):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),this.map_.setOptions(this.mapOpts),this.addLayers()),this.addGeolocateControl(),this.addStyles(),this.addMenu(),this.addPopup(),this.setMapTypeId(this.mapTypeId),this.clustering(),"postmodal"==mappl10n.options.mashupClick&&(this.modal_=new i.lib.Modal),this.places=new i.Places(e(".mapp-places",this.div.search),{map:t}),this.editable&&this.places.sel.focus(),e(this.places).on("search.mapp",(function(e,i){t.search(i)})),this.addEvents("click dragstart zoom_changed zoomstart",(function(e){"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||t.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(function(i){var o=e(this).attr("data-mapp-action");i.preventDefault(),t.action(o,e(this).attr("data-mapp-"+o),e(this))})),this.div.filters.on("change",(function(){t.ajaxQuery()})),e(window).on("resize",(function(){t.toggleView("mini"),t.poiClose(),t.resize()})),i.event.addListener(t.map_,"maptypeid_changed baselayerchange",(function(){t.set({dirty:!0})})),this.places.parse(this.center,(function(e){e&&e.geometry&&e.geometry.location?t.center={lat:e.geometry.location.lat,lng:e.geometry.location.lng}:t.center=null,t.query?t.ajaxQuery((function(){t.initCenter()})):(t.setPois(t.pois),t.initCenter())})),this.div.list.on("mouseenter","[data-mapp-poi]",(function(i){var o=e(this).attr("data-mapp-poi");t.poiHover(t.pois_[o])})),this.div.list.on("mouseleave","[data-mapp-poi]",(function(e){t.poiHover(null)})))},initCenter:function(){var t=this;this.recenter(),this.renderList(),this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():i.event.addListenerOnce(t.map_,"idle",(function(){t.initOpen()}))},initOpen:function(){var t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;this.initialOpenDirections?this.directionsOpen(null,t):t&&e&&t.open()},action:function(t,i,o){var n=this;switch(t){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.directionsOpen(null,this.opened);break;case"dir-from":this.directionsOpen(this.opened,null);break;case"filters-reset":this.div.filters.find(":input").each((function(){"checkbox"==this.type||"radio"==this.type?e(this).prop("checked",!1):e(this).val("")})),this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((function(t){n.search(t)}));break;case"layer":this.toggleLayer(i),this.toggleView("menu",!1);break;case"list-toggle":this.togglePoiListOpen();break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=o.attr("data-mapp-poi");this.poiOpen(this.pois_[s]);break;case"view-map":this.togglePoiListOpen(!1);break;case"view-list":this.togglePoiListOpen(!0);break;default:return!0}},addEvents:function(t,e){t=t.split(" ");for(var o=0;o<t.length;o++)i.event.addListener(this.map_,t[o],e)},addGeolocateControl:function(){if(mappl10n.options.ssl){var t=e(".mapp-geolocate-control-wrapper").get(0);"google"==mappl10n.options.engine?this.map_.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(t):(L.Control.Geolocate=L.Control.extend({onAdd:function(e){return t},onRemove:function(){}}),new L.Control.Geolocate({position:"bottomright"}).addTo(this.map_))}},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var t=e.makeArray(this.layers),i=0;i<t.length;i++){var o=t[i].trim(),n=o.split(".").pop();this.layers_[o]?this.toggleLayer(o):"kml"==n||"kmz"==n?this.layers_[o]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:o}):"json"==n&&(this.layers_[o]=new google.maps.Data({map:this.map_}).loadGeoJson(o))}},addMenu:function(){var t=this;e("body").on("click",(function(i){var o=e(i.target),n=o.attr("data-mapp-action");o==t.div.filters||"filters-toggle"==n||o.closest(t.div.filters).length||t.toggleView("filters",!1),o==t.div.menu||"menu-toggle"==n||o.closest(t.div.menu).length||t.toggleView("menu",!1)}))},addPopup:function(){var t=this,o=this.editable?"mapp-iw-edit":"mapp-iw";this.editable||(o+=" mapp-"+this.templates.popup,o+=mappl10n.options.thumbs?" mapp-thumb-"+mappl10n.options.popupThumbs:""),this.div.iw=e('<div class="'+o+'">').appendTo(this.div.canvas);var n=this.editable?"mapp-ib-popup mapp-ib-edit":"mapp-ib-popup";this.iw=new i.Infobox(this.map_,{className:n,clip:!0,pan:!0}),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(function(){t.poiClose()}))},addSearchMove:function(){},addStyles:function(){var o=this;if("leaflet"==mappl10n.options.engine){if(this.mapOpts.mapTypeControl){for(var n=L.control.layers(),s=0;s<mappl10n.options.baseLayers.length;s++){var a=mappl10n.options.baseLayers[s],l=mappl10n.options.providers[a.provider],r=e.extend({},l,a);n.addBaseLayer(L.tileLayer(l.url,r),r.label)}mappl10n.options.baseLayers.length>1&&n.addTo(this.map_)}this.map_.on("baselayerchange",(function(t){o.mapTypeId=t.layer.options.name}))}else{var p=mappl10n.options.styles?mappl10n.options.styles:[],h=mappl10n.options.style,c=["roadmap","satellite","terrain","hybrid"];for(var u in h&&"object"==t(p[h])&&this.map_.setOptions({styles:p[h]}),p)this.map_.mapTypes.set(u,new google.maps.StyledMapType(p[u],{name:u})),c.push(u);this.mapOpts.mapTypeControl&&this.map_.setOptions({mapTypeControl:!0,mapTypeControlOptions:{mapTypeIds:c,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}}),i.event.addListener(this.map_,"maptypeid_changed",(function(){o.mapTypeId=o.map_.getMapTypeId()}))}},ajaxQuery:function(t){},clusterGetLatLng:function(t){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var e=this.clusterer.getVisibleParent(t.overlay);return e?e.getLatLng():null}for(var i=this.clusterer.getClusters(),o=0;o<i.length;o++){var n=i[o].markers_;if(n.length>1)for(var s=0;s<n.length;s++)if(n[s]==t.overlay)return i[o].center_}}},clustering:function(){mappl10n.options.clustering&&!this.editable&&("leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup():this.clusterer=new MarkerClusterer(this.map_,[],{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m",maxZoom:21}))},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){for(var t=[],e=0;e<this.pois_.length;e++)this.pois_[e].type||t.push(this.pois_[e].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(t),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(t)}},dialog:function(t,e){var i=this;t?(this.div.dialog.html(t),this.div.dialog.show(),e&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout((function(){i.dialog(null)}),4e3))):this.div.dialog.hide()},directionsOpen:function(t,e){var o=t?t.getAddress():"",n=e?e.getAddress():"";t?this.popupOpen(t):e&&this.popupOpen(e),this.dir_||(this.dir_=new i.Directions(this.div.directions,this)),this.dir_.open(o,n)},fitBounds:function(t,e){return e="leaflet"==mappl10n.options.engine&&e?{paddingTopLeft:[e.left,e.top],paddingBottomRight:[e.right,e.bottom]}:e,this.map_.fitBounds(t,e)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMapTypeId:function(t){return"leaflet"==mappl10n.options.engine?"roadmap":this.map_.getMapTypeId(t)},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},poiClose:function(){this.poiHighlight(null),this.selected=null,this.opened=null,this.hovered=null,this.iw.close(),this.dir_&&this.dir_.close(),e(this).triggerHandler("mapp.close")},poiHighlight:function(t){if("icon"!=mappl10n.options.highlight||"leaflet"!=mappl10n.options.engine||!this.editable){if(e("[data-mapp-poi]",this.div.list).removeClass("mapp-selected"),this.hovered&&this.hovered.highlight(!1),t){var i=e.inArray(t,this.pois_);e('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"),t.highlight(!0)}this.selected&&(i=e.inArray(t,this.selected),e('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"))}},poiHover:function(t){t&&this.opened==t||(mappl10n.options.tooltips||(this.poiHighlight(null),this.hovered=null),t&&(this.poiHighlight(t),this.hovered=t,mappl10n.options.tooltips&&!this.editable&&this.popupOpen(t,null,"popup")))},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.set({dirty:!0})},poiOpen:function(t,i){var o=this;if(this.poiClose(),this.selected=t,this.poiHighlight(t),t.postid&&t.url&&!this.editable)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(t.url);case"postnew":return void window.open(t.url);case"postmodal":return this.modal_.open(),this.modal_.setContent('<div class="mapp-modal-spinner">'),void t.fetchPost((function(){return o.modal_.setContent(t.html)}))}this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),this.popupOpen(t,i,"popup"),e(this).triggerHandler("mapp.open",t)},poiRemove:function(t){var i=e.inArray(t,this.pois_);-1!=i&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),this.renderList()),this.set({dirty:!0})},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.editable||(this.iw.close(),this.dir_&&this.dir_.close(),this.opened=null,e(this).triggerHandler("mapp.close"))},popupOpen:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"popup",o=null;this.popupClose(),e&&e.featureData?o=e.featureData:e&&e.propagatedFrom&&e.propagatedFrom.feature&&e.propagatedFrom.feature.properties&&(o=e.propagatedFrom.feature.properties),this.div.iw.html(t.render(i,o));var n=this.clusterGetLatLng(t),s=n||t.getPosition(e);this.iw.open({position:s,anchorPoint:t.getAnchorPoint(e)}),this.opened=t},recenter:function(){var t=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});else if(t)this.setView(t,e||1);else if(0!=this.pois_.length)if(1!=this.pois_.length){for(var i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds,o=0;o<this.pois_.length;o++){var n=this.pois_[o].getBounds(),s=this.pois_[o].getPosition();i=n?"leaflet"==mappl10n.options.engine?i.extend(n):i.union(n):i.extend(s)}e?this.setView(i.getCenter().toJSON(),e):this.fitBounds(i)}else this.pois_[0].center(e);else this.setView({lat:0,lng:0},e||1)},render:function(){var t=this,o=this.name?this.name+"-layout":"",n="mapp-layout",s=this.layout?this.layout:"left";if(n+="left"==s?" mapp-list-left":" mapp-inline",n+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",!document.body.classList.contains("block-editor-page")){var a=this.alignment?this.alignment:mappl10n.options.alignment;n+=a?" align"+a:"",n+=a?" mapp-align-"+a:""}n+=this.classname?" "+this.classname:"";var l=i.lib.template("map",{map:this,layout:s});if(this.sel)this.sel.html(l),this.sel.addClass(n),this.sel.attr("id",o),this.div.layout=this.sel;else{var r=e('<div id="'+o+'" class="'+n+'">');r.html(l),e("#"+this.name+"-layout").replaceWith(r),this.div.layout=r}if(!this.div.layout.length)return i.lib.log("MapPress: Missing map name or container for map: "+this.name);e.each(["canvas","controls","dialog","directions","filters","list","menu","wrapper","search"],(function(i,o){t.div[o]=e(".mapp-"+o,t.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderList:function(){var t=this.getBounds(),o=0,n=this;if(!this.editable)for(var s=0;s<this.pois_.length;s++)this.pois_[s].visible=!0,this.query&&t&&!t.contains(this.pois_[s].getPosition())&&(this.pois_[s].visible=!1),o+=this.pois_[s].visible;this.div.list.html(i.lib.template(this.templates.loop,{map:this,pois:this.pois_,count:o})),mappl10n.options.thumbs&&this.div.list.addClass(" mapp-thumb-"+mappl10n.options.listThumbs),this.editable&&(this.div.list.trigger("render"),e(".mapp-items",this.div.list).sortable({axis:"y",cursor:"move",delay:200,update:function(){n.sortPois(e(this).sortable("toArray",{attribute:"data-mapp-poi"}))}}))},renderMenu:function(){for(var t in this.layers_)e('[data-mapp-layer="'+t+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[t].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():i.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){var t="Please see the MapPress FAQ Troubleshooting section to resolve.";if("leaflet"==mappl10n.options.engine){if("undefined"==typeof L)return i.lib.alert("MAPPRESS: Unable to load Leaflet. "+t),!1}else{if("undefined"==typeof google)return i.lib.alert("MAPPRESS: Google Maps API not loaded. "+t),!1;if(void 0===google.drawing)return i.lib.alert("MAPPRESS: Deactivate all other mapping plugins to avoid conflicts."),!0;e(document).ready((function(){e('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&i.lib.alert("MAPPRESS ERROR: Google Maps API key loaded multiple times. "+t)}))}return"undefined"==typeof _?(i.lib.log("MAPPRESS ERROR: plugin conflict, underscore.js not loaded. "+t),!1):!(void 0===jQuery.ui||jQuery.ui.version<"1.12")||(i.lib.log("MAPPRESS WARNING: plugin conflict, Outdated jQuery version: "+jQuery.ui.version+" should be >= 1.12 "+t),!0)},search:function(t){if(t&&t.geometry){var e=t.geometry.location?t.geometry.location:null,i=t.geometry.viewport?t.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var o=new L.LatLng(e.lat,e.lng),n=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):o.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:e,radius:1e3*mappl10n.options.radius});n=i?new google.maps.LatLngBounds(new google.maps.LatLng(i.sw.lat,i.sw.lng),new google.maps.LatLng(i.ne.lat,i.ne.lng)).union(s.getBounds()):s.getBounds()}n&&this.fitBounds(n),this.setView(e)}},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.dirty=i;break;case"mapTypeId":this.mapTypeId=i,this.setMapTypeId(i);break;case"poiList":this.poiList=null==i?mappl10n.options.poiList:i,this.div.layout.toggleClass("mapp-has-list",this.poiList),this.togglePoiListOpen(this.poiList),this.toggleView("mini");break;case"title":this.title=i;break;default:this[e]=i}}},setMapTypeId:function(i){if("leaflet"==mappl10n.options.engine){i=!this.editable&&mappl10n.options.style&&"streets"==i?mappl10n.options.style:i,i=_.findIndex(mappl10n.options.baseLayers,{name:i})>=0?i:mappl10n.options.baseLayers[0].name;for(var o=0;o<mappl10n.options.baseLayers.length;o++){var n=mappl10n.options.baseLayers[o],s=mappl10n.options.providers[n.provider];if(n.name==i){var a=e.extend({},s,n);L.tileLayer(a.url,a).addTo(this.map_)}}}else i=-1!=e.inArray(i,["roadmap","satellite","terrain","hybrid"])||"object"==t(mappl10n.options.styles[i])?i:"roadmap",this.map_.setMapTypeId(i)},setPois:function(t){if(this.resetPois(),t)for(var e=0;e<t.length;e++){var o=new i.Poi(t[e]);this.pois_.push(o),o.id=this.pois_.length-1,o.setMap(this)}this.clustersSet()},setSize:function(t){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];if(this.embed)return this.div.layout.css({height:"100%"}),void this.div.wrapper.css({"padding-bottom":0,height:"100%"});if(t&&t.hasOwnProperty("width")){var i=t.width?t.width:e.width;this.div.layout.css("width",i)}if(t&&t.hasOwnProperty("height")){var o=t.height?t.height:e.height;"string"==typeof o&&o.includes("%")?this.div.wrapper.css({"padding-bottom":o,height:"auto"}):this.div.wrapper.css({"padding-bottom":0,height:o})}this.resize()},setView:function(t,e,i){"leaflet"==mappl10n.options.engine?(null==e&&(e=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(t,e,i)):(t=t&&!t.toJSON?{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}:t,e=e?parseInt(e):null,t&&this.map_.setCenter(t),e&&this.map_.setZoom(e))},sortPois:function(t){var e=Array();this.set({dirty:!0});for(var i=0;i<t.length;i++){var o=parseInt(t[i]);if(isNaN(o))return!1;e.push(this.pois_[o])}if(e.length!=this.pois_.length)return!1;this.pois_=e,this.renderList()},toggleLayer:function(t,i){var o=this;i=void 0!==i?i:null==this.layers_[t].getMap(),e.each(["traffic","bicycling","transit"],(function(t,e){o.layers_[e].setMap(null)})),i&&this.layers_[t].setMap(this.map_)},togglePoiListOpen:function(t){var e=this;this.div.layout.toggleClass("mapp-list-open",t),setTimeout((function(){return e.resize()}),100)},togglePois:function(t){t=!!t;for(var e=0;e<this.pois_.length;e++)this.pois_[e].setVisible(t)},toggleView:function(t,e){if("mini"==t){var i=this.div.layout.hasClass("mapp-view-mini"),o=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",o),void(o!=i&&this.togglePoiListOpen(!o))}e=void 0===e?!this.div.layout.hasClass("mapp-view-"+t):e,this.div.layout.toggleClass("mapp-view-"+t,e),"list"==t&&e&&this.renderList(),"menu"==t&&e&&this.renderMenu(),"directions"==t&&this.resize()},toJSON:function(){this.pois=[];for(var t=0;t<this.pois_.length;t++)this.pois.push(this.pois_[t].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,title:this.title,width:this.width,zoom:this.zoom}}}},397:function(){var t,e=window.mapp||{};t=jQuery,e.Directions=function(e,i){this.sel=t(e),this.map=i;var o=this;this.sel.on("keydown",(function(t){13==t.which?(o.getDirections(),t.preventDefault()):27==t.which&&o.close()})),this.sel.on("click","[data-mapp-action]",(function(e){var i=t(this).attr("data-mapp-action"),n=t(".mapp-dir-daddr",o.sel).val(),s=t(".mapp-dir-saddr",o.sel).val();switch(e.preventDefault(),i){case"dir-cancel":o.close();break;case"dir-get":o.getDirections();break;case"dir-swap":t(".mapp-dir-saddr",o.sel).val(n),t(".mapp-dir-daddr",o.sel).val(s)}})),this.open=function(e,i){"google"!=mappl10n.options.directions?(this.map.toggleView("directions",!0),t(".mapp-dir-addr",this.sel).removeClass("mapp-error"),t(".mapp-dir-saddr",this.sel).val(e),t(".mapp-dir-daddr",this.sel).val(i)):this.openGoogle(e,i)},this.close=function(){this.map.toggleView("directions",!1)},this.getDirections=function(){var e=t(".mapp-dir-saddr",this.sel).val().trim(),i=t(".mapp-dir-daddr",this.sel).val().trim();this.map.poiClose(),this.openGoogle(e,i)},this.openGoogle=function(t,e){var i=mappl10n.options.directionsServer;-1==i.toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:function(t,e,i){"use strict";i.r(e);var o,n=i(991),s=i(574),a=window.mapp||{};a.geocoders={},o=jQuery,a.geocoders.algolia=function(t){this.map=t},a.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(t,e){var i="https://places-dsn.algolia.net/1/places/query?query="+encodeURIComponent(t)+"&hitsPerPage=5";i=mappl10n.options.country?i+"&countries="+mappl10n.options.country.toLowerCase():i,i=mappl10n.options.language?i+"&language="+mappl10n.options.language.toLowerCase():i+"&language=en",o.getJSON(i,(function(i){if(i&&i.hits&&i.hits.length>0){var o=i.hits.map((function(e,o){return(0,n.Z)({formatInputValue:s.Z,hit:e,hitIndex:o,query:t,rawAnswer:i})}));e(o)}else e(null)}))}},function(t){a.geocoders.google=function(e){this.map=e,this.token=null;var i=t('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,i.remove()},a.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(t,i){if("OK"==i&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}e(t)}else e(null)}))},getFirstPrediction:function(e,i){var o=this;this.getPredictions(e,(function(e){e&&t.isArray(e)?o.getDetails(e[0],(function(t){return i(t)})):i(null)}))},getPredictions:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=this.map.getMap().getBounds();"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var o={input:t,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:this.map.editable?null:["geocode"]};this.autocompleteService.getPlacePredictions(o,(function(t,i){"OK"==i&&t&&t.length?(t=(t=t.map((function(t){return t.value=t.description,t}))).filter((function(t){return t.place_id})),e(t)):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),e(null))}))}}}(jQuery),function(t){a.geocoders.mapbox=function(t){this.map=t},a.geocoders.mapbox.prototype={getDetails:function(t,e){var i=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;e({formatted_address:t.place_name,name:t.name,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:i}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+e+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.features&&t.features.length>0?(t.features=t.features.map((function(t){return t.value=t.label=t.place_name,t})),i(t.features)):i(null)}))}}}(jQuery),function(t){a.geocoders.nominatim=function(t){this.map=t},a.geocoders.nominatim.prototype={getDetails:function(t,e){var i=t.display_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));var s=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;e({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:s}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.length?(t=t.map((function(t){return t.value=t.display_name,t})),i(t)):i(null)}))}}}(jQuery)},282:function(){var t=window.mapp||{};t.Icons={},t.Icons.get=function(e){var i=t.Icons.getUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:i,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:i}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:function(){var t,e=window.mapp||{};t=jQuery,e.Infobox=function(i,o){var n=this;this.map=i,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?i.getContainer():i.getDiv(),this.node=null,this.opts=_.extend({popout:!1},o),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null;var s=this;if(this.wrapper=t('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib-content"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div></div>'),this.wrapper.addClass(o.className),this.node=t(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?e.event.addListener(this.map,"move",(function(t){s.isOpen&&s.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=function(){s.isOpen&&s.draw()}),this.node.get(0).addEventListener("load",(function(){n.open({position:n.position,anchorPoint:n.anchorPoint})}),{capture:!0}),s.opts.popout)var a="body";else a="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();s.wrapper.appendTo(a)},e.Infobox.prototype={clipToWindow:function(){var t=p.y,e=p.x-w/2+this.anchorPoint.x,i=this.mapDiv.getBoundingClientRect(),o=i.x+window.scrollX;t+=i.y+window.scrollY,e+=o;var n=this.opts.clip?divw:document.body.clientWidth;e+w>n&&(e=n-w),e<0&&(e=0),this.wrapper.css({left:e}),h=this.node.outerHeight(),t=p.y-h+this.anchorPoint.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&t<0&&t<divh-(p.y+h)&&(t=p.y,this.node.addClass("mapp-ib-flip"))},close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(this.position){var t,e;if(t=this.node.outerWidth(),this.node.outerHeight(),"leaflet"==mappl10n.options.engine)e=this.map.latLngToContainerPoint(this.position);else{var i=this.overlayView.getProjection();if(!i)return;e=i.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:e.x-t/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-e.y-this.anchorPoint.y})}},getContent:function(){return t(".mapp-ib",this.node)},open:function(t){this.position=t.position,this.anchorPoint=Array.isArray(t.anchorPoint)?{x:t.anchorPoint[0],y:t.anchorPoint[1]}:t.anchorPoint,this.node.css({maxWidth:.8*this.mapDiv.clientWidth-this.fudge,maxHeight:this.mapDiv.clientHeight+this.anchorPoint.y-2*this.fudge}),this.wrapper.addClass("mapp-open"),this.draw(),this.opts.popout?this.clipToWindow():"leaflet"==mappl10n.options.engine?this.panLeaflet():this.panGoogle(),this.isOpen=!0},panGoogle:function(){var t=this.overlayView.getProjection(),e=t?t.fromLatLngToDivPixel(this.position):null;if(e){var i=this.node.outerWidth(),o=this.node.outerHeight(),n=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(e.x-i/2-this.fudge,e.y+this.fudge)),s=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(e.x+i/2+this.fudge,e.y-o+this.anchorPoint.y-this.fudge)),a=new google.maps.LatLngBounds(n,s);this.map.panToBounds(a)}},panLeaflet:function(){var e=this.map.latLngToContainerPoint(this.position),i=t(this.mapDiv).width(),o=t(this.mapDiv).height(),n=this.node.outerWidth(),s=this.node.outerHeight(),a={x:e.x,y:e.y};e.x+n/2+this.anchorPoint.x>i-this.fudge?a.x=Math.max(i-n/2-this.anchorPoint.x-this.fudge,i/2-this.anchorPoint.x):e.x-n/2+this.anchorPoint.x<this.fudge&&(a.x=Math.min(n/2+this.anchorPoint.x+this.fudge,i/2-this.anchorPoint.x)),e.y+this.anchorPoint.y-s<this.fudge&&(a.y=s-this.anchorPoint.y+this.fudge),a.y>=o&&(a.y=o-this.fudge),this.map.panBy([e.x-a.x,e.y-a.y])},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:function(){var t,e=window.mapp||{};t=jQuery,e.lib={ajax:function(e){var i=this,o={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"json"==e.dataType&&"OK"!=t.status&&console.log(t.status),"json"==e.dataType&&t.output?i.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,o,n){"cancel"!=o&&(void 0!==n&&""!=n&&i.alert("AJAX ERROR\r\nTextStatus="+o+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e=t.extend(o,e),t.ajax(e)},alert:function(t){function e(_x){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){mappl10n.options.admin||mappl10n.options.debug?alert(t):window.console&&console.error(t)})),jqVersionCheck:function(e){if(void 0===t||void 0===e)return!1;e=e.split("."),v=t.fn.jquery.split(".");for(var i=0;i<e.length;i++){var o=parseInt(e[i]),n=void 0!==v[i]?parseInt(v[i]):0;if(n!=o)return n>o}return!0},log:function(t){window.console&&console.error(t)},scrollTo:function(t,e,i){if(t&&e&&t.length&&e.length){var o=t.height(),n=e.outerHeight(!0),s=t.scrollTop(),a=s+e.position().top,l=a+n;a=a-o/2-n/2,i&&(a-=i.outerHeight(!0)),(a<s||l>s+o)&&t.scrollTop(a)}},template:function(i,o){if(e.lib.templates=e.lib.templates?e.lib.templates:{},!e.lib.templates[i]){var n=mappl10n.options.templates?mappl10n.options.template[i]:t("#mapp-tmpl-"+i).html();if(!n)return"";e.lib.templates[i]=_.template(n.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return e.lib.templates[i](o)},uniqid:function(){return void 0===e.lib.uniqidCounter?e.lib.uniqidCounter=0:e.lib.uniqidCounter++,e.lib.uniqidCounter}},e.lib.jqVersionCheck("1.7")||e.lib.alert("jQuery version is too old: "+t.fn.jquery),t("body").on("tabsactivate tabsshow",(function(e,i){var o=i.newPanel?i.newPanel:i.panel;o&&t(".mapp-layout",o).each((function(){var e=t(this).find(".mapp-canvas").attr("id"),i=window[e];i.resize(),i.recenter()}))})),jQuery,"leaflet"==mappl10n.options.engine&&"undefined"!=typeof L&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6}),e.event={addListener:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.on(e[o],i):google.maps.event.addListener(t,e[o],i)},addListenerOnce:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.once(e[o],i):google.maps.event.addListenerOnce(t,e[o],i)},clearInstanceListeners:function(t){"leaflet"==mappl10n.options.engine?t.off():google.maps.event.clearInstanceListeners(t)},clearListeners:function(t,e){e=e.split(" ");for(var i=0;i<e.length;i++)"leaflet"==mappl10n.options.engine?t.off(e[i]):google.maps.event.clearListeners(t,e[i])},trigger:function(t,e,i){"leaflet"==mappl10n.options.engine?t.fire(e,i):google.maps.event.trigger(t,e,i)}},function(t){e.lib.Modal=function(){this.el=null;var e=this;this.el=t('<div class="mapp-modal" tabindex="0">').append('<div class="mapp-modal-backdrop">').append('<div class="mapp-modal-content" tabindex="1">'),this.el.hide(),this.el.on("click",".mapp-modal-backdrop",(function(){e.close()})),this.el.on("click",".mapp-modal-close",(function(){e.close()})),this.el.on("keydown",(function(t){27==t.which&&e.close()}))},e.lib.Modal.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),t("body").removeClass("mapp-modal-noscroll"))},focus:function(){t(".mapp-modal-focus",this.el).attr("tabindex",0),t(".mapp-modal-focus",this.el).focus()},open:function(){this.el.parent().length||this.el.appendTo("body"),this.el.show(),t("body").addClass("mapp-modal-noscroll"),this.focus()},setContent:function(e){t(".mapp-modal-content",this.el).empty(),t(".mapp-modal-content",this.el).append('<div class="mapp-modal-close">&times;').append(e),this.focus()}}}(jQuery)},692:function(){jQuery,mapp.load=function(){if("undefined"!=typeof mapp&&mapp.data)for(;mapp.data.length;){var t=mapp.data.pop();window[t.name]=new mapp.Map(t),window[t.name].display()}},mapp.load()},436:function(){var t;t=jQuery,mapp.Marker=function(t){var e=this;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(t),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=function(){return e.draw()},this.overlayView.onAdd=function(){return e.onAdd()},this.overlayView.onRemove=function(){return e.onRemove()}},mapp.Marker.prototype={draw:function(){if(this.div&&this.icon){var e=this.overlayView.getProjection().fromLatLngToDivPixel(this.position),i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};t(this.div).css({left:e.x-i.width/2,top:e.y-i.height})}},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(t){var e="on"+t.type[0].toUpperCase()+t.type.slice(1);this[e]&&this[e](t)},onAdd:function(){var e=this,i=this.overlayView.getPanes();this.div=t('<div class="mapp-marker">'),this.div.appendTo(i.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(function(){(!e.dragging||e.dragging&&!e.dragging.moved)&&mapp.event.trigger(e,"click"),e.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable)},onMouseenter:function(t){mapp.event.trigger(this,"mouseover")},onMouseleave:function(t){mapp.event.trigger(this,"mouseout")},onPointerdown:function(t){var e=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:t.clientX,y:t.clientY},offset:{x:i.x-(t.clientX-e.left),y:i.y-(t.clientY-e.top)}},this.toggleDragEvents(!0)},onPointermove:function(t){if(!(Math.abs(t.clientX-this.dragging.startPixel.x)+Math.abs(t.clientY-this.dragging.startPixel.y)<3)){var e=this.map.getDiv().getBoundingClientRect(),i={x:t.clientX-e.left+this.dragging.offset.x,y:t.clientY-e.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(i)),this.draw(),this.dragging.moved=!0,mapp.event.trigger(this,"dragstart")}},onPointercancel:function(t){this.onPointerup(t)},onPointerup:function(t){this.dragging&&this.dragging.moved&&mapp.event.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(t,e){var i="set"+t[0].toUpperCase()+t.slice(1);this[i]&&this[i](e)},setDraggable:function(t){this.draggable=t,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),t&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(t){if(void 0!==t&&(this.icon=t),this.icon&&this.div){var e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);var i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:i.width,height:i.height}),this.setZIndex(),this.draw()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(var e in t)this.set(e,t[e])},setVisible:function(t){this.visible=t,this.div&&this.div.css("visibility",t?"visible":"hidden")},setZIndex:function(t){this.zIndex=void 0!==t?t:this.zIndex,this.div&&this.div.css("z-index",t)},toggleDragEvents:function(t){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),t&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},510:function(){var t,e=window.mapp||{};t=jQuery,e.Places=function(i,o){var n=this;this.sel=t(i),this.opts=t.extend({map:null},o);var s="";s="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new e.geocoders[s](this.opts.map),this.sel.on("keydown",(function(e){if(13==e.which){e.preventDefault();var i=n.parseLatLng(n.sel.val());i&&(t(n).triggerHandler("search.mapp",i),n.sel.autocomplete("close"),e.stopImmediatePropagation()),"http"==n.sel.val().substring(0,4)&&(t(n).triggerHandler("search.mapp",n.sel.val()),n.sel.autocomplete("close"),e.stopImmediatePropagation()),!1===mappl10n.options.autocomplete&&(n.sel.autocomplete("option","disabled",!1),n.sel.autocomplete("search"))}else!1===mappl10n.options.autocomplete&&n.sel.autocomplete("option","disabled",!0),n.sel.autocomplete("close")})),this.initAutocomplete()},e.Places.prototype={parse:function(t,e){var i="";if(t&&(i="string"==typeof(i=t&&t.name?t.name:t)?i.trim():i),i)if("user"!=i)if(t&&t.geometry)e(t);else{var o=this.parseLatLng(t);o?e(o):this.geocoder.getFirstPrediction(t,(function(t){e(t)}))}else this.geolocate((function(t){e(t)}));else e(null)},parseLatLng:function(t){var e;if(t.hasOwnProperty("lat")&&t.hasOwnProperty("lng"))e=t;else{var i=t&&t.name?t.name:t,o=(i="string"==typeof i?i.trim():i).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(e={lat:n,lng:s})}}return e?{name:e.lat+", "+e.lng,geometry:{location:e}}:null},geolocate:function(t){var e=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(i){var o={lat:i.coords.latitude,lng:i.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),e.sel.val("")}),(function(e){var i=e&&e.message?" : "+e.message:"";alert(mappl10n.no_geolocate+i),t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;this.sel&&this.sel.length&&(this.sel.on("autocompleteselect",(function(i,o){e.geocoder.getDetails(o.item,(function(i){e.parse(i,(function(i){i&&t(e).triggerHandler("search.mapp",i)}))}))})),this.sel.autocomplete({appendTo:this.sel.parent(),autoFocus:!0,minLength:1,delay:"nominatim"===mappl10n.options.geocoder?500:300,disabled:!1===mappl10n.options.autocomplete,source:function(t,i){e.geocoder.getPredictions(t.term,(function(t){i(t)}))}}))}}},548:function(){var t,e=window.mapp||{};t=jQuery,e.Poi=function(i){if(this.defaults={address:null,body:null,html:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},t.extend(this,this.defaults,i),i&&i.correctedAddress&&(this.address=i.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),i.viewport&&i.viewport.sw&&i.viewport.ne&&i.viewport.sw.lat){var o=i.viewport.sw,n=i.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(o.lat,o.lng),L.latLng(n.lat,n.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(o.lat,o.lng),new google.maps.LatLng(n.lat,n.lng))}var s=[],a=[];if(!i.overlay)switch(this.type){case"polygon":if(i.poly&&i.poly.paths)for(var l=0;l<i.poly.paths.length;l++){s=[];for(var r=0;r<i.poly.paths[l].length;r++)s.push(new google.maps.LatLng(i.poly.paths[l][r].lat,i.poly.paths[l][r].lng));a.push(new google.maps.MVCArray(s))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(a)}),this.setColors(i.poly);break;case"polyline":if(i.poly&&i.poly.path)for(l=0;l<i.poly.path.length;l++)s.push(new google.maps.LatLng(i.poly.path[l].lat,i.poly.path[l].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(s)}),this.setColors(i.poly);break;case"circle":var p=new google.maps.LatLng(i.point.lat,i.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(i.poly.radius)}),this.setColors(i.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(i.poly);break;case"kml":var h=i.kml&&i.kml.url?i.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(h):new google.maps.KmlLayer({url:h,preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([i.point.lat,i.point.lng]):this.overlay=new e.Marker({position:new google.maps.LatLng(i.point.lat,i.point.lng)})}i.type||this.set({iconid:i.iconid})},e.Poi.prototype={center:function(t){var e=this.getBounds();if("number"!=typeof t)if(e){var i=e.getNorthEast().toJSON().lng-e.getSouthWest().toJSON().lng;i<0&&(i+=360),t=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),t,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),t)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(t){switch(this.isPoly()?"poly":this.type){case"kml":return"leaflet"==mappl10n.options.engine?[0,0]:t&&t.pixelOffset?new google.maps.Point(t.pixelOffset.width,t.pixelOffset.height):new google.maps.Point(0,0);case"poly":return"leaflet"==mappl10n.options.engine?[0,0]:new google.maps.Point(0,0);default:return mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?[0,0-mappl10n.options.iconScale[1]]:[0,-32]}},getBounds:function(){var t;switch(this.type){case"polyline":t=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(e){t.extend(e)}));break;case"polygon":t=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(e){e.forEach((function(e){t.extend(e)}))}));break;case"rectangle":case"circle":t=this.overlay.getBounds();break;case"kml":t=(t="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||this.viewport;break;default:return this.viewport}return t},getColors:function(){var t={};for(var e in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[e]&&(t[e]=this.overlay[e]);return t},getPosition:function(t){if(!this.type)return"leaflet"==mappl10n.options.engine?this.overlay.getLatLng():this.overlay.getPosition();if("kml"==this.type&&t&&t.latLng)return t.latLng;var e=this.getBounds();return e?e.getCenter():"leaflet"==mappl10n.options.engine?new L.latLng(0,0):new google.maps.LatLng(0,0)},getTemplateColors:function(){var t=this.getColors();return"polyline"==this.type?{color:t.strokeColor,opacity:100*t.strokeOpacity,weight:t.strokeWeight}:{color:t.fillColor,opacity:100*t.fillOpacity,weight:t.strokeWeight}},highlight:function(i){if(!this.type){var o="leaflet"==mappl10n.options.engine?t(this.overlay._icon):this.overlay.getDiv();if(o){var n=this.editable?"circle":mappl10n.options.highlight;switch(n){case"circle":o.toggleClass("mapp-marker-circle",i);break;case"icon":var s=i?e.Icons.get(mappl10n.options.highlightIcon):e.Icons.get(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==s.options.iconUrl)return;this.overlay.setIcon(s);break;case"scale":o.addClass("mapp-marker"),o.toggleClass("mapp-marker-scale",i)}this.setZIndex(i?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(t){this.map.poiOpen(this,t)},fetchPost:function(t){var i=this;this.html?t():e.lib.ajax({type:"GET",data:{action:"mapp_get_post",postid:this.postid,nonce:mappl10n.options.nonce},dataType:"html",callback:function(e){i.html=e,t()}})},render:function(t,i){var o=_.extend(this,{icon:e.Icons.getUrl(this.iconid)});return i&&(o.body=i.description,o.title=i.name),e.lib.template(this.map.templates[t],{poi:o,colors:this.getTemplateColors()})},set:function(t){for(var i in t){var o=t[i];switch(i){case"dirty":this.map.set({dirty:o});break;case"iconid":this.type||(this.iconid=o,this.overlay.setIcon(e.Icons.get(o)));break;default:this[i]=o}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty:dirty})},setColors:function(t){var e={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})t&&void 0!==t[i]&&(e[i]=t[i]);this.overlay.setOptions(e)},setEditable:function(t){var i=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),e.event.clearListeners(this.overlay,"rightclick"),e.event.clearListeners(this.overlay,"dragstart"),t&&(e.event.addListener(this.overlay,"dragstart",(function(){i.viewport=null,i.map.poiClose()})),e.event.addListener(this.overlay,"dragend",(function(){i.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(e.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&i.overlay.getPath().getLength()>2&&i.overlay.getPath().removeAt(t.vertex)})),e.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){i.map.set({dirty:!0})})))))},setMap:function(t){var i=this;this.map=t,e.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(e.event.addListenerOnce(this.overlay,"ready",(function(){i.viewport=i.overlay.getBounds()})),e.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(e.event.addListener(this.overlay,"defaultviewport_changed",(function(){i.viewport=i.overlay.getDefaultViewport()})),e.event.addListener(this.overlay,"status_changed",(function(){var t=i.overlay.getStatus();"OK"!=t&&alert(mappl10n.kml_error+":"+t)})))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap())),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),e.event.addListener(this.overlay,"mouseover",(function(t){i.map.poiHover(i)})),e.event.addListener(this.overlay,"mouseout",(function(t){i.map.poiHover(null)}))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t){var e=t.color,i=t.opacity,o=t.weight;i=i?i/100:void 0;var n="polyline"==this.type?{strokeColor:e,strokeOpacity:i,strokeWeight:o}:{fillColor:e,fillOpacity:i,strokeColor:e,strokeWeight:o,strokeOpacity:1};this.setColors(n)},setVisible:function(t){void 0!==this.overlay.setVisible&&this.overlay.setVisible(t)},setZIndex:function(t){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(t):this.overlay.set("zIndex",t)},toJSON:function(){var t={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},e=this.getPosition();t.point=e.toJSON();var i=this.viewport?this.viewport:this.getBounds();if(i){var o=i.toJSON();t.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}if("kml"==this.type&&(t.kml=this.kml),this.isPoly())switch(t.poly=this.getColors(),this.type){case"circle":t.poly.radius=this.overlay.getRadius();break;case"polyline":t.poly.path=[],this.overlay.getPath().forEach((function(e){t.poly.path.push(e.toJSON())}));break;case"polygon":t.poly.paths=[],this.overlay.getPaths().forEach((function(e){var i=[];e.forEach((function(t){i.push(t.toJSON())})),t.poly.paths.push(i)}));break;case"rectangle":var n=this.overlay.getBounds();t.viewport={sw:n.getSouthWest().toJSON(),ne:n.getNorthEast().toJSON()}}return t}}},675:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0;e<t.length;e++){var i=t[e].match(/country\/(.*)?/);if(i)return i[1]}return}},892:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var i in e)if(-1!==t.indexOf(i))return e[i];return"address"}},991:function(t,e,i){"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,r=t.rawAnswer;try{var h=i.locale_names[0],c=i.country,u=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,d=i.city&&i.city[0]!==h?i.city[0]:void 0,g=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,m=i.county&&i.county[0]!==h?i.county[0]:void 0,v=i.postcode&&i.postcode.length?function(t,e){for(var i=e[0].value,o=[],n=1;n<e.length;++n)"none"!==e[n].matchLevel&&o.push({index:n,words:e[n].matchedWords});if(0===o.length)return{postcode:t[0],highlightedPostcode:i};return o.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),{postcode:t[o[0].index],highlightedPostcode:e[o[0].index].value}}(i.postcode,i._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},f=v.postcode,y=v.highlightedPostcode,w={name:p(i._highlightResult.locale_names),city:d?p(i._highlightResult.city):void 0,administrative:u?p(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:g?p(i._highlightResult.suburb):void 0,county:m?p(i._highlightResult.county):void 0,postcode:y},b={name:h,administrative:u,county:m,city:d,suburb:g,country:c,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:f,postcodes:i.postcode&&i.postcode.length?i.postcode:void 0},L=e(b);return l(l({},b),{},{highlight:w,hit:i,hitIndex:s,query:a,rawAnswer:r,value:L})}catch(t){return console.error("Could not parse object",i),console.error(t),{value:"Could not parse object"}}};var o=s(i(675)),n=s(i(892));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function p(t){for(var e=t[0].value,i=[],o=1;o<t.length;++o)"none"!==t[o].matchLevel&&i.push({index:o,words:t[o].matchedWords});return 0===i.length?e:(i.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),0===i[0].index?"".concat(e," (").concat(t[i[1].index].value,")"):"".concat(t[i[0].index].value," (").concat(e,")"))}},574:function(t,e){"use strict";e.Z=function(t){var e=t.administrative,i=t.city,o=t.country,n=t.name,s=t.type;return"".concat(n).concat("country"!==s&&void 0!==o?",":"","\n ").concat(i?"".concat(i,","):"","\n ").concat(e?"".concat(e,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()}}},e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.exports}i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(854),i(397),i(442),i(282),i(689),i(436),i(510),i(548),i(692)}();
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MapPress Maps for WordPress 2.62.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-03-29T17:11:12+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MapPress Maps for WordPress 2.62.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-03-29T22:09:36+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
mappress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Maps for WordPress
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
- Version: 2.62.5
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
@@ -35,7 +35,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
35
  }
36
 
37
  class Mappress {
38
- const VERSION = '2.62.5';
39
 
40
  static
41
  $baseurl,
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
+ Version: 2.62.6
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
35
  }
36
 
37
  class Mappress {
38
+ const VERSION = '2.62.6';
39
 
40
  static
41
  $baseurl,
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: maps, google maps, map, map markers, google map, leaflet maps, leaflet map
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.7
8
- Stable tag: 2.62.5
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interfactive Google and Leaflet maps to WordPress.
@@ -84,6 +84,9 @@ Please see the plugin documentation pages:
84
 
85
  == Changelog ==
86
 
 
 
 
87
  = 2.62.5 =
88
  * Fixed: error in geolocate control for non-SSL sites using Leaflet
89
  * Fixed: error when opening Mapbox style settings
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.7
8
+ Stable tag: 2.62.6
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interfactive Google and Leaflet maps to WordPress.
84
 
85
  == Changelog ==
86
 
87
+ = 2.62.6 =
88
+ * Fixed: error with missing layout option for sites upgrading from old versions
89
+
90
  = 2.62.5 =
91
  * Fixed: error in geolocate control for non-SSL sites using Leaflet
92
  * Fixed: error when opening Mapbox style settings