!function(){var t=window.WPLeafletMapPlugin;if(window.WPLeafletMapPlugin=new function(){var t="v3.4.2";function n(n){try{n()}catch(n){console.log("-- version --",t),console.error(n)}}this.VERSION=t;var i=!1,r=[];function e(t){return t.trim()}this.push=function(t){i?n(t):r.push(t)},this.unshift=function(t){i?n(t):r.unshift(t)},this.init=function(){i=!0;for(var t=0,e=r.length;t<e;t++)n(r[t])},this.createMap=function(t){var n=document.getElementsByClassName("WPLeafletMap")[this.maps.length],i=L.map(n,t);return t.fitBounds&&(i._shouldFitBounds=!0),t.attribution&&function(t,n){if(!t)return;for(var i=t.split(";"),r=L.control.attribution({prefix:!1}).addTo(n),o=0,a=i.length;o<a;o++){var u=e(i[o]);r.addAttribution(u)}}(t.attribution,i),this.maps.push(i),i},this.createImageMap=function(t){var n=this.createMap(t);return n.is_image_map=!0,this.images.push(n),n},this.getCurrentMap=function(){return this.maps[this.maps.length-1]},this.getCurrentGroup=function(){var t=this.maps.length;return this.markergroups[t]||(this.markergroups[t]=this.newMarkerGroup(this.maps[t-1])),this.markergroups[t]},this.getCurrentMarkerGroup=this.getCurrentGroup,this.getGroup=function(t){return(new L.FeatureGroup).addTo(t)},this.newMarkerGroup=function(t){var n=this.getGroup(t);return n.timeout=null,t._shouldFitBounds&&n.on("layeradd",(function(i){i.layer instanceof L.FeatureGroup&&i.layer.on("ready",(function(){t.fitBounds(n.getBounds())})),window.clearTimeout(this.timeout),this.timeout=window.setTimeout((function(){try{t.fitBounds(n.getBounds())}catch(t){}}),100)}),n),n},this.propsToTable=function(t){var n,i=[];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.push(n);for(var r="<table>",e=0,o=(i=i.sort()).length;e<o;e++){var a=i[e];r+="<tr><td>"+a+"</td>",r+="<td>"+t[a]+"</td></tr>"}return r+="</table>"};var o=this.unescape=function(t){var n=document.createElement("div");return n.innerHTML=t,n.innerText||t},a=/\{ *(.*?) *\}/g;this.template=function(t,n){return null==n?t:t.replace(a,(function(t,i){var r=function(t){for(var n=t.split(" | "),i={},r=n.shift(),e=0,o=n.length;e<o;e++){var a=n[e].split(": "),u=a.shift(),s=a.join(": ")||!0;i[u]=s}return i.key=r,i}(i),e=function(t,n){for(var i=function(t){if(null==t)return[];for(var n=t.split(u),i=[],r=0,e=n.length;r<e;r++)""!==n[r]&&i.push(n[r]);return i}(o(n)),r=t,e=0,a=i.length;e<a;e++)if(!(r=r[i[e]]))return;return r}(n,r.key);return null==e?r.default||t:e}))};var u=/[.‘’'“”"\[\]]+/g;function s(t,n){"undefined"!=typeof L&&void 0!==L[t]?n():setTimeout((function(){s(t,n)}),100)}this.waitForSVG=function(t){s("SVGIcon",t)},this.waitForAjax=function(t){s("AjaxGeoJSON",t)},this.createScale=function(t){L.control.scale(t).addTo(this.getCurrentMap())},this.getIconOptions=function(t){for(var n,i=t||{},r=["iconSize","iconAnchor","shadowSize","shadowAnchor","popupAnchor","tooltipAnchor"],e=L.Icon.Default.prototype.options,o=0,a=r.length;o<a;o++){var u=r[o],s=i[u];if(s){for(var h=s.split(","),c=0,l=h.length;c<l;c++)h[c]=Number(h[c]);i[u]=h}}return i.popupAnchor||(i.popupAnchor=((n=(n=i.iconSize||e.iconSize).slice())[0]=0,n[1]*=-1,n[1]-=3,n)),i.iconUrl&&(i.icon=new L.Icon(i)),i},this.maps=[],this.images=[],this.markergroups={},this.markers=[],this.lines=[],this.polygons=[],this.circles=[],this.geojsons=[],this.overlays=[]},t){for(var n=0,i=t.length;n<i;n++)window.WPLeafletMapPlugin.push(t[n]);for(var r in t.splice(0),t)t.hasOwnProperty(r)&&(window.WPLeafletMapPlugin[r]=t[r])}window.addEventListener?window.addEventListener("load",window.WPLeafletMapPlugin.init,!1):window.attachEvent&&window.attachEvent("onload",window.WPLeafletMapPlugin.init)}();