MapPress Easy Google Maps - Version 2.76

Version Description

  • Added: images can now be attached to POIs
  • Added: if multiple images exist, an image gallery is displayed in the map list and popups
  • Fixed: KML overlays were not displaying properly
Download this release

Release Info

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

Code changes from version 2.75.5 to 2.76

build/index_mappress.js CHANGED
@@ -1 +1 @@
1
- (()=>{var e={117:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappAutocomplete:()=>m});var n=i(326);const s=wp.element.createElement,{Fragment:o,useCallback:a,useEffect:l,useLayoutEffect:p,useMemo:r,useRef:c,useState:h}=wp.element;function m(e){e={buttonLabel:null,className:"",delay:null,focus:!1,onFetch:null,onSelect:null,placeholder:"",selected:null,suggestions:[],title:"",...e};const t=c(null),i=c(null),[o,a]=h({isOpen:!1,value:""});function p(e){a((t=>({...t,...e})))}(0,n.useClickOutside)(t,(()=>{o.isOpen&&p({isOpen:!1})})),l((()=>{e.focus&&i.current&&i.current.focus()}),[i.current]),l((()=>{o.map&&setMapTypeId(e.mapTypeId)}),[e.mapTypeId,o.map]);const r=(0,n.useDebounce)((t=>{e.onFetch&&e.onFetch(t)}),e.delay);function m(){let t;p({isOpen:!1}),e.suggestions&&(t=null==o.selected?e.suggestions[0]:e.suggestions[o.selected]),e.onSelect({suggestion:t,value:u})}const u=o.selected>=0&&e.suggestions&&e.suggestions[o.selected]?e.suggestions[o.selected].value:o.value;return s("div",{className:"mapp-autocomplete",ref:t},s("div",{className:"mapp-autocomplete-wrapper"},s("input",{className:e.className,onChange:e=>{!function(e){p({value:e,selected:null}),r(e)}(e.target.value)},onKeyDownCapture:t=>function(t){switch(t.stopPropagation(),t.code){case"Backspace":p({isOpen:o.value.length>1});break;case"Enter":m();break;case"Escape":p({isOpen:!1});break;case"ArrowUp":if(t.preventDefault(),e.suggestions&&0!=o.selected){const t=null==o.selected?e.suggestions.length-1:o.selected-1;e.suggestions[t]&&p({isOpen:!0,selected:t})}else p({selected:null});break;case"ArrowDown":if(e.suggestions&&o.selected<e.suggestions.length-1){const t=null==o.selected?0:o.selected+1;e.suggestions[t]&&p({isOpen:!0,selected:t})}else p({selected:null});break;case"Tab":case"AltLeft":case"AltRight":case"ControlLeft":case"ControlRight":case"MetaLeft":case"MetaRight":break;default:p({isOpen:!0})}}(t),placeholder:e.placeholder,ref:i,title:e.title,type:"text",value:u}),o.isOpen&&s("div",{className:"mapp-autocomplete-list"},_.map(e.suggestions,((t,i)=>{const n="mapp-autocomplete-item"+(o.selected==i?" mapp-selected":"");return s("div",{className:n,key:i,onClick:()=>function(t,i){p({isOpen:!1,selected:i}),e.onSelect({suggestion:t})}(t,i)},t.value)})))),e.buttonLabel&&s("div",{className:"mapp-submit-button",onClick:()=>m()},e.buttonLabel))}},715:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappDirections:()=>r});const n=wp.element.createElement,{Fragment:s,useEffect:o,useLayoutEffect:a,useRef:l,useState:p}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function r(e){e={from:null,onClose:null,to:null,...e};const[t,i]=p({from:e.from?e.from:"",to:e.to?e.to:""});function s(e){i((t=>({...t,...e})))}function a(){e.onClose&&e.onClose()}function l(){const e=t.from.trim(),i=t.to.trim();let n=mappl10n.options.directionsServer;n="https://maps.google.com"==n?"https://www.google.com":n,-1==n.toLowerCase().indexOf("http")&&(n="https://"+n),n+="/maps/dir/?api=1&origin="+encodeURIComponent(e)+"&destination="+encodeURIComponent(i),window.open(n),a()}function r(e){13==e?l():27==e&&a()}return o((()=>{"google"==mappl10n.options.directions&&l()}),[]),"google"==mappl10n.options.directions?null:n("div",{className:"mapp-directions-component"},n("div",{className:"mapp-close",onClick:()=>a()}),n("div",null,n("input",{className:"mapp-dir-from",onChange:e=>s({from:e.target.value}),onKeyPress:e=>r(e.which),tabIndex:"1",placeholder:__("My location"),value:t.from}),n("div",{className:"mapp-dir-arrows",onClick:()=>{s({from:t.to,to:t.from})}})),n("div",null,n("input",{className:"mapp-dir-to",onChange:e=>s({to:e.target.value}),onKeyPress:e=>r(e.which),tabIndex:"2",value:t.to})),n("div",{className:"mapp-dir-toolbar"},n("div",{className:"mapp-submit-button",onClick:()=>l()},__("Get Directions"))))}},817:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappFilters:()=>h});var n=i(939),s=i(326);const o=wp.element.createElement,{Fragment:a,useEffect:l,useLayoutEffect:p,useRef:r,useState:c}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),sprintf=wp.i18n.sprintf,h=e=>{e={onFilterChange:null,otype:"post",poiCount:0,...e};const t=(0,s.useDebounce)(e.onFilterChange,500),i=r(null),[a,p]=c({filters:null,formData:{},isBusy:!0,isOpen:!1});function h(e){p((t=>({...t,...e})))}function m(e,i){let n=a.formData[e.key]?a.formData[e.key].values:null;if("checkbox"==e.format){var s;const e=null===(s=n)||void 0===s?void 0:s.indexOf(i);e>-1?n.splice(e,1):(n=n||[],n.push(i))}else n=i?[i]:[];let o={...a.formData};n.length?o[e.key]={key:e.key,values:n,meta_key:e.meta_key,meta_values:e.meta_values}:delete o[e.key],h({formData:o}),t(o)}function u(){h({formData:{}}),t()}function g(e){h({isOpen:e=void 0!==e?e:!a.isOpen})}function d(e){return o("div",{className:"mapp-filter",key:e.key},o("div",{className:"mapp-filter-label"},e.label),o("div",{className:"mapp-filter-values"},function(e){e.key;const t=[...e.values];let i=a.formData[e.key]?a.formData[e.key].values:"";switch(e.format){case"input":return o("input",{type:"text",value:i?i[0]:"",onChange:t=>m(e,t.target.value)});case"checkbox":return _.map(t,(t=>o("label",{key:t.value},o("input",{checked:null==i?void 0:i.includes(t.value),key:t.value,onChange:t=>m(e,t.target.value),type:e.format,value:t.value}),t.iconid&&o("img",{className:"mapp-icon",src:n.mappLib.getIconUrl(t.iconid)}),t.label)));case"radio":return"radio"==e.format&&t.unshift({value:"",label:__("All")}),_.map(t,(t=>o("label",{key:t.value},o("input",{checked:i==t.value||""==t.value&&!i,key:t.value,onChange:t=>m(e,t.target.value),type:e.format,value:t.value}),t.iconid&&o("img",{className:"mapp-icon",src:n.mappLib.getIconUrl(t.iconid)}),t.label)));case"select":return t.unshift({value:"",label:""}),o("select",{value:i[0],onChange:t=>m(e,t.target.value)},_.map(t,(e=>o("option",{key:e.value,value:e.value},e.label))))}}(e)))}return(0,s.useClickOutside)(i,(()=>{a.isOpen&&g(!1)})),l((()=>{h({isBusy:!0}),n.mappLib.ajax({data:{action:"mapp_filters_get",nonce:mappl10n.options.nonce,otype:e.otype},callback:e=>{h({isBusy:!1}),e&&"OK"==e.status?h({filters:e.data}):console.error("MapPress: unable to fetch filter data")}})}),[]),o("div",{className:"mapp-filters-component",ref:i},function(){const e="mapp-button mapp-filters-toggle mapp-button-caret"+(a.isBusy?" mapp-button-disabled":"");return o("div",{className:e,onClick:()=>{a.isBusy||g()}},__("Filter"))}(),a.isOpen&&null!==a.filters&&o("div",{className:"mapp-filters-wrapper"},o("div",{className:"mapp-filters-list"},_.map(a.filters,(e=>d(e)))),function(){let t=e.poiCount>1?__("%s Results"):__("%s Result");return t=sprintf(t,e.poiCount),o("div",{className:"mapp-filters-toolbar"},o("div",{className:"mapp-link-button",onClick:u},__("Reset")),o("div",{className:"mapp-filters-count"},t),o("div",{className:"mapp-submit-button",onClick:()=>g(!1)},__("Done")))}()))}},10:(e,t,i)=>{"use strict";i.r(t),i.d(t,{useGeocoding:()=>c});wp.element.createElement;const{Fragment:n,useCallback:s,useEffect:o,useLayoutEffect:a,useRef:l,useState:p}=wp.element,r={google:function(){this.token=null;const e=document.createElement("div");this.placesService=new google.maps.places.PlacesService(e),this.autocompleteService=new google.maps.places.AutocompleteService}};r.google.prototype={getDetails:function(e){let{suggestion:t,callback:i}=e;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var n={fields:["formatted_address","name","geometry"],placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(n,(function(e,t){if("OK"==t&&e&&e.geometry){if(e.geometry.location&&(e.geometry.location=e.geometry.location.toJSON()),e.geometry.viewport){var n=e.geometry.viewport.toJSON();e.geometry.viewport={sw:{lat:n.south,lng:n.west},ne:{lat:n.north,lng:n.east}}}i(e)}else i(null)}))},getFirstPrediction:function(e){let{map:t,value:i,callback:n}=e;this.getPredictions({map:t,value:i,callback:e=>{e&&Array.isArray(e)?this.getDetails({suggestion:e[0],callback:e=>n(e)}):n(null)}})},getPredictions:function(e){let{map:t,value:i,includeBusinesses:n,callback:s}=e;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var o=t?t.getBounds():null;"leaflet"==mappl10n.options.engine&&(o=new google.maps.LatLngBounds(new google.maps.LatLng(o.getSouthWest().lat,o.getSouthWest().lng),new google.maps.LatLng(o.getNorthEast().lat,o.getNorthEast().lng)));var a={input:i,bounds:o=o||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:n?null:["geocode"]};this.autocompleteService.getPlacePredictions(a,(function(e,t){"OK"==t&&e&&e.length?(e=(e=e.map((e=>(e.value=e.description,e)))).filter((e=>e.place_id)),s(e)):(t==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):t==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),s(null))}))}},r.mapbox=function(){},r.mapbox.prototype={getDetails:function(e){let{suggestion:t,callback:i}=e,n=t.place_name,s=n.indexOf(","),o=n.indexOf(",",s+1);s>0&&(n=parseInt(n.substr(0,s))?n.substr(0,o).replace(",",""):n.substr(0,s));let a=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;i({formatted_address:t.place_name,name:n,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:a}})},getFirstPrediction:function(e){let{map:t,value:i,callback:n}=e;this.getPredictions({map:t,value:i,callback:e=>{e&&e.length?this.getDetails({suggestion:e[0],callback:e=>n(e)}):n(null)}})},getPredictions:function(e){let{map:t,value:i,callback:n}=e;var s="https://api.mapbox.com/geocoding/v5/mapbox.places/"+i+".json?access_token="+mappl10n.options.mapbox;s=mappl10n.options.country?s+"&country="+mappl10n.options.country.toLowerCase():s,s=mappl10n.options.language?s+"&language="+mappl10n.options.language.toLowerCase():s;var o=t?t.getCenter():null;o&&(s+="&proximity="+o.lng+","+o.lat),mappl10n.options.searchBox&&(s+="&bbox="+mappl10n.options.searchBox),fetch(s).then((e=>e.json())).then((e=>{e&&e.features&&e.features.length>0?(e.features=e.features.map((e=>(e.value=e.label=e.place_name,e))),n(e.features)):n(null)}))}},r.nominatim=function(){},r.nominatim.prototype={getDetails:function(e){let{suggestion:t,callback:i}=e,n=t.display_name,s=n.indexOf(","),o=n.indexOf(",",s+1);s>0&&(n=parseInt(n.substr(0,s))?n.substr(0,o).replace(",",""):n.substr(0,s));let a=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;i({formatted_address:t.display_name,name:n,geometry:{location:{lat:t.lat,lng:t.lon},viewport:a}})},getFirstPrediction:function(e){let{map:t,value:i,callback:n}=e;this.getPredictions({map:t,value:i,callback:e=>{e&&e.length?this.getDetails({suggestion:e[0],callback:e=>n(e)}):n(null)}})},getPredictions:function(e){let{map:t,value:i,callback:n}=e;var s="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(i);if(s=mappl10n.options.country?s+"&countrycodes="+mappl10n.options.country.toLowerCase():s,s=mappl10n.options.language?s+"&accept-language="+mappl10n.options.language.toLowerCase():s,mappl10n.options.searchBox)s+="&viewbox="+mappl10n.options.searchBox,s+="&bounded=1";else{var o=t?t.getMap().getBounds():null;if(o){let e=o.getSouthWest(),t=o.getNorthEast();s+="&viewbox="+e.lng+","+e.lat+","+t.lng+","+t.lat}}fetch(s).then((e=>e.json())).then((e=>{e&&e.length?(e=e.map((e=>(e.value=e.display_name,e))),n(e)):n(null)}))}};const c=e=>{let{includeBusinesses:t}=e;function i(){let e="";return e="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"nominatim",new r[e]}function n(e,t){navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(t){var i={lat:t.coords.latitude,lng:t.coords.longitude};e({name:i.lat+", "+i.lng,geometry:{location:i}})}),(function(i){if(!t){var n=i&&i.message?" : "+i.message:"";alert(mappl10n.no_geolocate+n)}e(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)}return{geocode:function(e){let{map:s,suggestion:o,value:a,callback:l}=e;const p=i();a="string"==typeof a?a.trim():a,o||a?function(e){let{map:t,value:i,callback:s}=e;if(!i)return void s(null);if("string"!=typeof i){const e=i.lat&&i.lng?{geometry:{location:{lat:i.lat,lng:i.lng}}}:null;return void s(e)}if("http"==i.substring(0,4))return void s(i);if("user"==i)return void n((function(e){s(e)}));const o=i.split(",");if(2==o.length){const e=parseFloat(o[0]),t=parseFloat(o[1]);if(!isNaN(e)&&!isNaN(t))return void s({name:e+", "+t,geometry:{location:{lat:e,lng:t}}})}s(null)}({map:s,value:a,callback:e=>{e?l(e):o?p.getDetails({suggestion:o,callback:l}):p.getFirstPrediction({map:s,value:a,includeBusinesses:t,callback:l})}}):l(null)},geolocate:n,getPredictions:function(e){let{map:t,value:n,callback:s}=e;i().getPredictions({map:t,value:n,callback:s})}}}},326:(e,t,i)=>{"use strict";i.r(t),i.d(t,{useDebounce:()=>c,useClickOutside:()=>h});wp.element.createElement;const{Fragment:n,useCallback:s,useEffect:o,useLayoutEffect:a,useMemo:l,useRef:p,useState:r}=wp.element;function c(e,t){const i=React.useRef(e);return React.useLayoutEffect((()=>{i.current=e})),React.useMemo((()=>_.debounce((function(){return i.current(...arguments)}),t)),[t])}function h(e,t){const i=i=>{e.current&&!e.current.contains(i.target)&&t()};return document.addEventListener("mousedown",i),document.addEventListener("touchstart",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchstart",i)}}},939:(e,t,i)=>{"use strict";i.r(t),i.d(t,{mappLib:()=>c});wp.element.createElement;const{Fragment:n,useCallback:s,useEffect:o,useLayoutEffect:a,useMemo:l,useRef:p,useState:r}=wp.element,c={ajax:function(e){const t={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,i,n){"json"==e.dataType&&e.url==mappl10n.options.ajaxurl&&"OK"!=t.status&&c.alert(t.status),"json"==e.dataType&&t.output?c.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,i,n){"cancel"!=i&&(void 0!==n&&""!=n&&c.alert("AJAX ERROR\r\nTextStatus="+i+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e={...t,...e},jQuery.ajax(e)},alert:function(e){mappl10n.options.admin||mappl10n.options.debug?alert(e):window.console&&console.error(e)},getIcon:function(e){{const t=this.getIconUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:t,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:t}}},getIconUrl:function(e){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"},nanoid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;const t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let i="",n=e;for(;n--;)i+=t[64*Math.random()|0];return i},template:function(e,t){if(c.templates=c.templates?c.templates:{},!c.templates[e]){var i=mappl10n.options.templates?mappl10n.options.template[e]:document.getElementById("mapp-tmpl-"+e).innerHTML;if(!i)return"";c.templates[e]=_.template(i,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return c.templates[e](t)}};"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})},27:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappPaginate:()=>r});const n=wp.element.createElement,{Fragment:s,useEffect:o,useLayoutEffect:a,useRef:l,useState:p}=wp.element,{sprintf}=wp.i18n;function r(e){function t(t,i){const n=Math.ceil(e.count/e.pageSize);switch(t){case"first":e.onChange(1);break;case"last":e.onChange(n);break;case"next":e.page<n&&e.onChange(e.page+1);break;case"prev":e.page>1&&e.onChange(e.page-1)}}return function(){const i=Math.ceil(e.count/e.pageSize),s=e.isBusy||e.page<=1,o=e.isBusy||e.page>=i,a=s?"mapp-paginate-button mapp-disabled":"mapp-paginate-button",l=o?"mapp-paginate-button mapp-disabled":"mapp-paginate-button";return n("div",{className:"mapp-paginate"},n("div",{className:a,onClick:()=>{s||t("first")}},"«"),n("div",{className:a,onClick:()=>{s||t("prev")}},"‹"),n("div",{className:"mapp-paginate-count"},sprintf((p="%d of %d",wp.i18n.__(p,"mappress-google-maps-for-wordpress")),e.page,i)),n("div",{className:l,onClick:()=>{o||t("next")}},"›"),n("div",{className:l,onClick:()=>{o||t("last")}},"»"));var p}()}},818:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappPlaces:()=>m});var n=i(117),s=i(10);const o=wp.element.createElement,{Fragment:a,useCallback:l,useEffect:p,useLayoutEffect:r,useRef:c,useState:h}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function m(e){e={buttonLabel:null,focus:!1,includeBusinesses:!1,map:null,onSearch:null,...e};const{geocode:t,getPredictions:i}=(0,s.useGeocoding)({map:e.map,includeBusinesses:e.includeBusinesses}),[a,l]=h({suggestions:[]});return o(n.MappAutocomplete,{buttonLabel:e.buttonLabel,className:"mapp-places",debounce:"nominatim"===mappl10n.options.geocoder?500:300,delay:"nominatim"==mappl10n.options.geocoder?500:50,focus:e.focus,onFetch:function(t){i({map:e.map,value:t,callback:e=>{var t;t={suggestions:e},l((e=>({...e,...t})))}})},onSelect:function(i){let{suggestion:n,value:s}=i;t({map:e.map,suggestion:n,value:s,callback:t=>{t&&e.onSearch(t)}})},placeholder:__("Search"),suggestions:a.suggestions,title:__("Enter an address, place, KML file URL, or lat,lng")})}},615:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappPoiList:()=>m});var n=i(939),s=i(27);const o=wp.element.createElement,{Fragment:a,useEffect:l,useLayoutEffect:p,useMemo:r,useRef:c,useState:h}=wp.element,sprintf=wp.i18n.sprintf;const m=wp.element.memo((function(e){e={bounds:null,className:null,hoveredPoi:null,isDraggable:!1,isPaged:!1,itemTemplate:null,onClick:null,onDragDrop:null,onHover:null,onPage:null,openPoi:null,page:1,pageSize:mappl10n.options.poiListPageSize?parseInt(mappl10n.options.poiListPageSize):20,pois:null,...e};const[t,i]=h({dragging:null,dragover:null});function l(e){i((t=>({...t,...e})))}return o("div",{className:e.className},e.isPaged&&o("div",{className:"mapp-list-header"},o("div",{className:"mapp-list-count"},sprintf((p="%s Result",r="%s Results",c=e.pois.length,wp.i18n._n(p,r,c,"mappress-google-maps-for-wordpress")),e.pois.length))),o("div",{className:"mapp-items"},_.map(e.pois,((i,s)=>function(i){let s,p,r="mapp-item";if(e.openPoi!=i.id&&e.hoveredPoi!=i.id||(r+=" mapp-selected"),r+=t.dragover==i.id?" mapp-dragover":"",r+=mappl10n.options.thumbsList?" mapp-thumb-"+mappl10n.options.thumbsList:"",e.itemTemplate){const t={...i,icon:n.mappLib.getIconUrl(i.iconid),thumbnail:mappl10n.options.thumbsList?i.thumbnail:null};s=n.mappLib.template(e.itemTemplate,{poi:t})}else p=o(a,null,o("img",{className:"mapp-icon",src:n.mappLib.getIconUrl(i.iconid)}),o("div",{className:"mapp-title"},i.title));return o("div",{className:r,dangerouslySetInnerHTML:s?{__html:s}:null,draggable:e.isDraggable,key:i.id,onClick:()=>e.onClick(i.id),onDragOver:e=>e.preventDefault(),onDragStart:e=>l({dragging:i.id}),onDragEnter:e=>l({dragover:i.id}),onDragEnd:e=>l({dragging:null,dragover:null}),onDrop:n=>{return s=i.id,void(e.onDragDrop&&e.onDragDrop({from:t.dragging,to:s}));var s},onMouseEnter:t=>{e.onHover(i.id)},onMouseLeave:t=>{e.onHover(null)}},p)}(i)))),e.isPaged&&(e.pois.length<=e.pageSize?null:o("div",{className:"mapp-list-footer"},o(s.MappPaginate,{count:e.pois.length,onChange:t=>e.onPage(t),page:e.page,pageSize:e.pageSize}))));var p,r,c}))},892:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappPopupModal:()=>h});var n=i(939);const s=wp.element.createElement,o=wp.element.createPortal,{Fragment:a,useEffect:l,useLayoutEffect:p,useRef:r,useState:c}=wp.element;function h(e){e={onClose:null,poi:null,...e};const[t,i]=c({isBusy:!1,html:null});function a(e){i((t=>({...t,...e})))}const p=React.createRef();function r(t){27==t.keyCode&&e.onClose()}return l((()=>(document.body.classList.add("mapp-modal-noscroll"),()=>document.body.classList.remove("mapp-modal-noscroll"))),[]),l((()=>{e.poi.postid&&(a({isBusy:!0}),n.mappLib.ajax({data:{action:"mapp_get_post",postid:e.poi.postid,nonce:mappl10n.options.nonce},dataType:"HTML",type:"GET",success:e=>{a({isBusy:!1,html:e})}}))}),[e.poi.postid]),l((()=>{p.current&&p.current.focus(),console.log("focus"+document.activeElement)}),[p.current]),o(s("div",{className:"mapp-modal"},s("div",{className:"mapp-modal-backdrop",onClick:e.onClose,onKeyDown:r},s("div",{className:"mapp-modal-close",onClick:e.onClose},"×")),s("div",{className:"mapp-modal-content-wrapper",ref:p,onKeyDown:r,tabIndex:0},s("div",{className:"mapp-modal-content"},t.isBusy&&s("div",{className:"mapp-modal-spinner"}),!t.isBusy&&s("div",{dangerouslySetInnerHTML:{__html:t.html}}),s("div",{className:"mapp-modal-close",onClick:e.onClose},"X")))),document.body)}},283:(e,t,i)=>{"use strict";i.r(t);var n=i(715),s=i(817),o=i(939),a=i(326);const l=wp.element.createElement,{Fragment:p,useEffect:r,useLayoutEffect:c,useRef:h,useState:m}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function u(e){e={layer:null,map:null,onCenter:null,...e};const[t,i]=m({activeLayer:e.layer?e.layer:null,layers:null,isOpen:!1}),n=h(null);function s(e){i((t=>({...t,...e})))}function o(){s({isOpen:!t.isOpen})}return(0,a.useClickOutside)(n,(()=>{t.isOpen&&o()})),r((()=>{if("google"==mappl10n.options.engine){s({layers:{traffic:{googleLayer:new google.maps.TrafficLayer,label:__("Traffic")},bicycling:{googleLayer:new google.maps.BicyclingLayer,label:__("Bicycling")},transit:{googleLayer:new google.maps.TransitLayer,label:__("Transit")}}})}}),[]),l("div",{ref:n},l("div",{className:"mapp-menu-toggle",onClick:()=>o()}),t.isOpen&&function(){const i=_.map(t.layers,((i,n)=>{const o=t.activeLayer==n?"mapp-menu-item mapp-active":"mapp-menu-item";return l("div",{className:o,key:n,onClick:()=>function(i){t.activeLayer&&t.layers[t.activeLayer].googleLayer.setMap(null),i!=t.activeLayer&&t.layers[i].googleLayer.setMap(e.map.getMap()),s({activeLayer:i==t.activeLayer?null:i,isOpen:!1})}(n)},i.label)}));return l("div",{className:"mapp-menu-component",style:{display:"flex"}},l("div",{className:"mapp-menu-item",onClick:()=>(s({isOpen:!1}),void e.onCenter())},__("Center map")),"google"==mappl10n.options.engine&&l(p,null,l("div",{className:"mapp-menu-separator"}),i),l("div",{className:"mapp-menu-footer"},l("a",{className:"mapp-menu-help-link",href:"https://mappresspro.com/mappress-documentation",target:"_blank"},l("span",null,__("Help")))))}())}var g=i(818),d=i(615),f=i(892),v=i(10);window.mapp=window.mapp||{};const y=wp.element.createElement,w=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");wp.i18n._n;var b;b=jQuery,mapp.Map=function(e,t){this.defaults={alignment:null,center:null,classname:null,embed:null,height:null,initialOpenInfo:null,isEditable:null,layers:null,layout:null,lines:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,onDrawingEvent:null,onPoiClose:null,onPoiOpen:null,onSearch:null,poiList:null,poiListOpen:null,poiListPageSize:null,pois:null,postid:null,query:null,search:null,sel:null,title:null,width:null,zoom:null},this.drawingManager=null,this.filters=null,this.hovered=null,this.isFullscreen=!1,this.iw=null,this.mapdata=e,this.opened=null,this.pagination={count:0,page:1},this.polyline=null,this.settings=t||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.pois_=[],this.user_=null,this.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.poiList=void 0!==this.poiList&&null!=this.poiList?this.poiList:mappl10n.options.poiList,this.layout=this.layout?this.layout:mappl10n.options.layout,this.postid=this.postid?this.postid:mappl10n.options.postid},mapp.Map.prototype={display:function(){const{geocode:e}=(0,v.useGeocoding)({withBusinesses:this.isEditable});if(this.render(),!this.div||!this.div.layout)return;if(this.sanity(),this.query?this.templates={item:"mashup-item",popup:"mashup-popup"}:this.templates={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,scrollWheelZoom:mappl10n.options.scrollWheel,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,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),!this.div||!this.div.canvas)return;"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.addMenu(),this.addPopup(),this.isFilterable()&&this.renderFilters(),this.setMapTypeId(this.mapTypeId),this.clustering(),this.addDrawingManager();const t=b(".mapp-search-container",this.div.layout);t.length&&wp.element.render(y(g.MappPlaces,{buttonLabel:this.isEditable?w("Add to map"):y("img",{src:mappl10n.options.baseurl+"/images/search.png"}),focus:this.isEditable,includeBusinesses:this.isEditable,map:this,onSearch:e=>{this.onSearch?this.onSearch(e):this.doSearch(e)}}),t.get(0)),this.addUserLocation(),this.addEvents("click dragstart zoom_changed zoomstart",(e=>{"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||this.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(e=>{const t=b(e.currentTarget),i=t.attr("data-mapp-action"),n=t.attr("data-mapp-"+i);e.preventDefault(),this.onAction(i,n,t)})),new ResizeObserver(((e,t)=>{this.toggleView("mini"),this.resize()})).observe(this.div.layout.get(0)),e({map:null,value:this.center,callback:e=>{this.center=e&&e.geometry&&e.geometry.location?{lat:e.geometry.location.lat,lng:e.geometry.location.lng}:null,this.setPois(this.pois),this.initCenter()}})},initCenter:function(){setTimeout((()=>{this.recenter(),this.renderList(),this.isSearchable&&!this.isEditable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():mapp.event.addListenerOnce(this.map_,"idle",(()=>this.initOpen()))}),100)},initOpen:function(){const e=this.pois_.length?this.pois_[0]:null,t=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;e&&t&&!this.isEditable&&this.poiOpen(e)},addDrawingManager:function(){if(this.isEditable&&"google"==mappl10n.options.engine&&google.maps.drawing){const e={fillColor:"#0000FF",fillOpacity:.4,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2};this.drawingManager=new google.maps.drawing.DrawingManager({drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},circleOptions:e,polygonOptions:e,polylineOptions:e,rectangleOptions:e}),this.drawingManager.setMap(this.map_),mapp.event.addListener(this.drawingManager,"overlaycomplete",(e=>{this.drawingManager.setDrawingMode(null),this.poiHover(null),this.onDrawingEvent&&this.onDrawingEvent(e)}))}},addEvents:function(e,t){e=e.split(" ");for(var i=0;i<e.length;i++)mapp.event.addListener(this.map_,e[i],t)},addGeolocateControl:function(){if(!mappl10n.options.ssl)return;const e=b(".mapp-geolocate-control-wrapper",this.div.layout).get(0);"google"==mappl10n.options.engine?this.map_.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e):(L.Control.Geolocate=L.Control.extend({onAdd:t=>e,onRemove:()=>{}}),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 e=b.makeArray(this.layers),t=0;t<e.length;t++){var i=e[t].trim(),n=i.split(".").pop();this.layers_[i]?this.toggleLayer(i):"kml"==n||"kmz"==n?this.layers_[i]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:i}):"json"==n&&(this.layers_[i]=new google.maps.Data({map:this.map_}).loadGeoJson(i))}},addMenu:function(){this.isEditable||"leaflet"==mappl10n.options.engine||wp.element.render(y(u,{map:this,onCenter:()=>{this.poiClose(),this.recenter()}}),this.div.menu.get(0))},addPopup:function(){var e=this.isEditable?"mapp-iw-edit":"mapp-iw";this.isEditable||(e+=" mapp-"+this.templates.popup),this.div.iw=b('<div class="'+e+'">').appendTo(this.div.canvas),this.iw=new mapp.Infobox(this.map_,{className:this.isEditable?"mapp-ib-edit":""}),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(()=>{this.poiClose()}))},addSearchMove:function(){},addUserLocation:function(){const{geolocate:e}=(0,v.useGeocoding)({withBusinesses:this.isEditable});mappl10n.options.userLocation&&mappl10n.options.ssl&&e((e=>{if(e&&e.geometry&&e.geometry.location){const t=e.geometry.location,i=o.mappLib.getIcon("geolocation");"leaflet"==mappl10n.options.engine?this.user_=L.marker([t.lat,t.lng],{icon:i}).addTo(this.map_):(this.user_=new mapp.Marker({icon:i,position:new google.maps.LatLng(t.lat,t.lng)}),this.user_.setMap(this.map_))}}),!0)},clusterGetLatLng:function(e){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var t=this.clusterer.getVisibleParent(e.overlay);return t?t.getLatLng():null}for(var i=this.clusterer.getClusters(),n=0;n<i.length;n++){var s=i[n].markers_;if(s.length>1)for(var o=0;o<s.length;o++)if(s[o]==e.overlay)return i[n].center_}}},clustering:function(){if(mappl10n.options.clustering&&!this.isEditable){let e=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==e.disableClusteringAtZoom&&""==e.disableClusteringAtZoom&&(e.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup(e):(e=_.extend(e,{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}),this.clusterer=new MarkerClusterer(this.map_,[],e))}},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){var e=[];for(let t=0;t<this.pois_.length;t++)this.pois_[t].type||e.push(this.pois_[t].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(e),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(e)}},fetchPois:function(e){var t=new Date;this.poiClose();var i={action:"mapp_query",filters:this.filters,query:this.query,url:{href:window.location.href,search:window.location.search},debug:mappl10n.options.debug};this.xhr_&&this.xhr_.abort("cancel"),this.spinner(!0),this.pagination.page=1,this.xhr_=o.mappLib.ajax({data:i,callback:(i,n)=>{this.spinner(!1),i&&"OK"==i.status&&(this.setPois(i.data.pois),this.renderList(),mappl10n.options.debug&&console.log("Results: "+i.data.pois.length+" ("+n.responseText.length/1e3+"K) AJAX: "+(new Date-t)+(i.data.timing?i.data.timing:"")),e&&e())}})},fitBounds:function(e){return this.map_.fitBounds(e)},getBounds:function(){try{return this.map_.getBounds()}catch(e){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(e){return null}},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(e){return null}},isFilterable:function(){return mappl10n.options.pro&&mappl10n.options.filters&&mappl10n.options.filters.length>0&&!this.isEditable&&this.query},isSearchable:function(){return!!this.isEditable},onAction:function(e,t,i){switch(e){case"dir":this.renderDirections({isOpen:!0,from:null,to:this.opened});break;case"dir-from":this.renderDirections({isOpen:!0,from:this.opened,to:null});break;case"geolocate":const{geolocate:e}=(0,v.useGeocoding)({withBusinesses:this.isEditable});e((e=>{e&&e.geometry&&e.geometry.location&&this.setView(e.geometry.location,parseInt(mappl10n.options.poiZoom))}),!1);break;case"open":var n=i.attr("data-mapp-poi");this.poiOpen(this.pois_[n]);break;case"sidebar-toggle":this.toggleSidebar();break;case"view-map":this.toggleSidebar(!1);break;case"view-list":this.toggleSidebar(!0);break;default:return!0}},doSearch:function(e){if(e&&e.geometry){var t=e.geometry.location?e.geometry.location:null,i=e.geometry.viewport?e.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var n=new L.LatLng(t.lat,t.lng),s=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):n.toBounds(1e3*mappl10n.options.radius);else{var o=new google.maps.Circle({center:t,radius:1e3*mappl10n.options.radius});s=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(o.getBounds()):o.getBounds()}s&&this.fitBounds(s),this.setView(t)}},poiClose:function(){this.opened&&this.poiHighlight(this.opened,!1),this.opened=null,this.iw.close(),this.renderDirections({isOpen:!1}),this.onPoiClose&&this.onPoiClose()},poiHighlight:function(e,t){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.isEditable||(t?e.highlight(!0):e.highlight(!1))},poiHover:function(e){e&&this.opened==e||(this.hovered&&this.hovered!=this.opened&&this.poiHighlight(this.hovered,!1),e?(this.hovered=e,this.poiHighlight(this.hovered,!0),mappl10n.options.tooltips&&!this.isEditable?(this.poiClose(),this.poiOpen(e,null,"popup")):this.poiHighlight(e,!0)):this.hovered=null)},poiInsert:function(e){this.pois_.unshift(e),e.setMap(this),this.renderList()},poiOpen:function(e,t){if(this.poiClose(),this.query&&e.postid&&e.url&&!this.isEditable&&!mappl10n.options.tooltips)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(e.url);case"postnew":return void window.open(e.url);case"postmodal":const t=document.createElement("div");return document.body.appendChild(t),wp.element.render(y(f.MappPopupModal,{onClose:()=>{wp.element.unmountComponentAtNode(t),t.remove()},poi:e}),t)}this.div.layout.hasClass("mapp-view-mini")&&this.toggleSidebar(!1),this.popupOpen(e,t,"popup"),this.poiHighlight(e,!0),this.onPoiOpen&&this.onPoiOpen(e)},poiRemove:function(e){var t=b.inArray(e,this.pois_);-1!=t&&(this.pois_[t].setMap(null),this.pois_.splice(t,1),this.renderList())},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.isEditable||(this.iw.close(),this.renderDirections({isOpen:!1}),b(this).triggerHandler("mapp.close"))},popupOpen:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"popup",n=null;this.popupClose(),t&&t.featureData?n=t.featureData:t&&t.propagatedFrom&&t.propagatedFrom.feature&&t.propagatedFrom.feature.properties&&(n=t.propagatedFrom.feature.properties),this.isEditable||(this.div.iw.html(e.render(i,n)),this.div.iw.toggleClass(" mapp-thumb-"+mappl10n.options.thumbsPopup,!!e.thumbnail));var s=this.clusterGetLatLng(e),o=s||e.getPosition(t);this.iw.open({position:o,anchorPoint:e.getAnchorPoint(t)}),this.opened=e},recenter:function(){var e=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,t=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(e&&!t&&this.query)return void this.doSearch({geometry:{location:{lat:e.lat,lng:e.lng}}});if(e)return void this.setView(e,t||1);if(0==this.pois_.length)return void this.setView({lat:0,lng:0},t||1);if(1==this.pois_.length)return void this.pois_[0].center(t);let i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds;for(var n=0;n<this.pois_.length;n++){var s=this.pois_[n].getBounds(),o=this.pois_[n].getPosition();i=s?"leaflet"==mappl10n.options.engine?i.extend(s):i.union(s):i.extend(o)}t?this.setView(i.getCenter().toJSON(),t):this.fitBounds(i)},render:function(){let e=this.name?this.name+"-layout":"",t="mapp-layout",i=this.layout&&window.parent==window?this.layout:"left";if(t+="left"==i?" mapp-list-left":" mapp-inline",t+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",t+=this.classname?" "+this.classname:"",!document.body.classList.contains("block-editor-page")){let e=this.alignment?this.alignment:mappl10n.options.alignment;if(e){let i=" align"+e+" mapp-align-"+e;window.parent==window?t+=i:b(window.frameElement).parent().parent().addClass(i)}}var n=o.mappLib.template("map",{map:this,layout:i});if(this.sel){if(this.div.layout=b(this.sel),this.div.layout.html(n),this.div.layout.addClass(t),this.div.layout.attr("id",e),!this.div.layout.length)return console.log("MapPress: Missing map name or container for map: "+this.name)}else{let i=b('<div id="'+e+'" class="'+t+'">');i.html(n);let s=b("#"+this.name+"-layout");if(!s.length)return console.log("MapPress: Missing map name or container for map: "+this.name);s.replaceWith(i),this.div.layout=i}b.each(["canvas","content","controls","directions","filters","header","list","menu","search","sidebar","wrapper"],((e,t)=>{this.div[t]=b(".mapp-"+t,this.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderDirections:function(e){let{isOpen:t,from:i,to:s}=e;if(this.toggleView("directions",t),t){const e=s?s.getAddress():"",t=i?i.getAddress():"";wp.element.render(y(n.MappDirections,{from:t,to:e,onClose:()=>{wp.element.unmountComponentAtNode(this.div.directions.get(0)),this.toggleView("directions",!1)}}),this.div.directions.get(0))}else this.div.directions.length&&wp.element.unmountComponentAtNode(this.div.directions.get(0))},renderFilters:function(){this.div.filters&&this.div.filters.length&&wp.element.render(y(s.MappFilters,{onFilterChange:e=>{this.filters=e,this.fetchPois()},poiCount:this.pagination.count}),this.div.filters.get(0))},renderList:function(){let e=[];if(!this.poiList)return;if(this.isEditable)e=this.pois_;else{let t=this.getBounds();t&&_.map(this.pois_,((i,n)=>{t.contains(i.point)&&e.push(i)}))}this.pagination.count!=e.length&&(this.pagination.count=e.length,this.renderFilters());let t="mapp-list-component";!this.isEditable&&mappl10n.options.thumbsList&&(t+=" mapp-thumb-"+mappl10n.options.thumbsList);const i=e=>this.pois_.find((t=>t.id==e)),n=(e,t)=>{let i=_.findIndex(this.pois_,(t=>t.id==e)),n=_.findIndex(this.pois_,(e=>e.id==t));this.pois_.splice(n,0,this.pois_.splice(i,1)[0])};wp.element.render(y(d.MappPoiList,{bounds:this.getBounds(),className:t,hoveredPoi:this.hovered,isDraggable:!!this.isEditable,isPaged:!!this.query,itemTemplate:this.isEditable?null:this.templates.item,map:this,onClick:e=>this.poiOpen(i(e)),onDragDrop:e=>{let{from:t,to:i}=e;return n(t,i)},onHover:e=>this.poiHover(i(e)),onPage:e=>{this.pagination.page=e,this.renderList()},onSort:e=>{this.pois_=e,this.renderList()},openPoi:this.opened,page:this.pagination.page,pageSize:20,pois:e}),this.div.list.get(0))},resetPois:function(){for(var e=0;e<this.pois_.length;e++)this.pois_[e].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():mapp.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){const e="<a href='"+mappl10n.options.adminurl+"/admin.php?page=mappress'>"+w("MapPress Settings")+"</a>",t="<a href ='http://mappresspro.com/mappress-faq' target='_blank'>"+w("MapPress FAQ")+"</a>",i="<a href='http://mappresspro.com/chris-contact', target='_blank'>"+w("contact support")+"</a>",n="<br/>"+sprintf(w("Please see the %s for help, or %s and provide this error message."),t,i),s=sprintf("<div class='mapp-errors-toolbar'><div class='mapp-errors-apikey'>%s</a></div>",w("Get an API Key"));this.div.layout.on("click",".mapp-errors-apikey",(()=>{window.open("https://mappresspro.com/how-to-get-a-google-maps-api-key")}));let o=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:w("Leaflet library not loaded"),text:w("A theme or plugin is preventing the Leaflet library from loading.")+n},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:w("Google Maps API not loaded"),text:w("A theme or plugin is preventing Google Maps from loading.")+n},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:w("Google Maps API key required"),text:sprintf(w("Please enter a Google Maps API key in the %s, or switch to Leaflet maps."),e)+s},{condition:b('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1,title:w("Google Maps API loaded multiple times"),text:w("A theme or plugin has loaded Google Maps twice")+n},{condition:"undefined"==typeof _,title:w("Underscore library not loaded"),text:w("A theme or plugin is preventing the underscore.js library from loading.")+n}];_.map(o,(e=>{if(e.condition){mappl10n.options.admin&&this.sanityOutput({title:e.title,text:e.text?e.text:""});let t=jQuery("<span>"+e.text.replace("<br/>","\n")+"</span>").text();console.error(w("Map error")+": "+e.title+" - "+t)}}))},sanityOutput(e){if(!b(".mapp-errors-overlay",this.div.content).length){let e="<div class='mapp-errors-overlay'></div><div class='mapp-errors'><div class='mapp-errors-header'>"+w("Oops! Something went wrong.")+"</div><div class='mapp-errors-list'></div></div>";this.div.content.prepend(e)}b(".mapp-errors-list",this.div.content).append("<div class='mapp-errors-title'>"+e.title+"</div><div class='mapp-errors-text'>"+e.text+"</div>")},set:function(e){for(let i in e){var t=e[i];switch(i){case"mapTypeId":this.mapTypeId=t,this.setMapTypeId(t);break;case"poiList":this.poiList=null==t?mappl10n.options.poiList:t,this.toggleSidebar(mappl10n.options.poiListOpen),this.toggleView("mini");break;case"search":this.search=t;break;case"style":this.setStyle(t);break;case"title":this.title=t;break;default:this[i]=t}}},setMapTypeId:function(e){const t=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),i=_.find(t,(t=>t.id==e));!mappl10n.options.style||"roadmap"!=e&&"streets"!=e&&i||(e=mappl10n.options.style);let n=_.find(t,(t=>t.id==e));n=n||t[0],this.setStyle(n)},setPois:function(e){if(this.resetPois(),e)for(var t=0;t<e.length;t++){var i=new mapp.Poi(e[t]);this.pois_.push(i),i.setMap(this)}this.clustersSet(),this.setLines()},setSize:function(e){var t=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];let i={},n={};if(e&&e.hasOwnProperty("width")&&(i={width:e.width?e.width:t.width}),e&&e.hasOwnProperty("height")){let i=e.height?e.height:t.height;n="string"==typeof i&&i.includes("%")?{"padding-bottom":i,height:"auto"}:{"padding-bottom":0,height:i}}window.frameElement&&window.frameElement.classList.contains("mapp-iframe")?(b(window.frameElement).parent().parent().css(i),b(window.frameElement).parent().css(n)):this.embed?(i={height:"100%"},n={"padding-bottom":0,height:"100%"}):(this.div.layout.css(i),this.div.wrapper.css(n)),this.resize()},setStyle:function(e){if("leaflet"==mappl10n.options.engine){let t={mapbox:{accessToken:mappl10n.options.mapbox,attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://www.mapbox.com/about/maps" target="_blank">&copy; Mapbox<a/>','<a href="https://www.openstreetmap.org/about/" target="_blank">&copy; OpenStreetMap</a>'],url:"https://api.mapbox.com/styles/v1/{user}/{mapboxid}/tiles/256/{z}/{x}/{y}{r}?access_token={accessToken}&fresh=true",zoomOffset:0},osm:{attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://openstreetmap.org" target="_blank">Map data (c) OpenStreetMap</a>'],url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}}[e.provider],i=b.extend({},t,e);L.tileLayer(t.url,i).addTo(this.map_)}else if(this.map_.setMapTypeId("standard"==e.type?e.id:"roadmap"),e.json){let t=null;try{t=JSON.parse(e.json)}catch(e){console.log("Invalid JSON in map style")}this.map_.setOptions({styles:t||null})}else this.map_.setOptions({styles:null})},setLines:function(){if(this.polyline&&("leaflet"==mappl10n.options.engine?this.polyline.remove():this.polyline.setMap(null),this.polyline=null),this.isEditable||!this.lines&&!mappl10n.options.lines||this.pois_.length<2)return;const e={...mappl10n.options.lineOpts},t=[];if(_.map(this.pois_,(e=>{t.push(e.getPosition())})),"leaflet"==mappl10n.options.engine)this.polyline=new L.Polyline(t,e).addTo(this.map_);else{const i={strokeColor:e.color,strokeWeight:e.weight,strokeOpacity:e.opacity};e.icons&&(_.map(e.icons,(e=>{e.icon.path=parseInt(e.icon.path)})),e.icons[0].repeat="50px"),this.polyline=new google.maps.Polyline({map:this.map_,path:t,...e,...i}),e.animate&&e.icons&&e.icons.length&&this.setLinesAnimation()}},setLinesAnimation:function(){let e=0;const t=this.polyline.get("icons");t[0].repeat.replace("%","").replace("px",""),window.setInterval((()=>{e+=1,t[0].offset=e+(t[0].repeat.indexOf("%")>=0?"%":"px"),this.polyline.set("icons",t)}),20)},setView:function(e,t,i){"leaflet"==mappl10n.options.engine?(null==t&&(t=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(e,t,i)):(e=e&&!e.toJSON?{lat:parseFloat(e.lat),lng:parseFloat(e.lng)}:e,t=t?parseInt(t):null,e&&this.map_.setCenter(e),t&&this.map_.setZoom(t))},spinner:function(e){this.div.layout.toggleClass("mapp-busy",e)},toggleLayer:function(e,t){t=void 0!==t?t:null==this.layers_[e].getMap(),b.each(["traffic","bicycling","transit"],((e,t)=>{this.layers_[t].setMap(null)})),t&&this.layers_[e].setMap(this.map_)},toggleSidebar:function(e){this.div.layout.toggleClass("mapp-sidebar-open",e),this.isSidebarOpen=e,setTimeout((()=>this.resize()),100)},togglePois:function(e){e=!!e;for(var t=0;t<this.pois_.length;t++)this.pois_[t].setVisible(e)},toggleView:function(e,t){if("mini"==e){let e=this.div.layout.hasClass("mapp-view-mini"),t=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",t),void(t!=e&&this.toggleSidebar(!t))}t=void 0===t?!this.div.layout.hasClass("mapp-view-"+e):t,this.div.layout.toggleClass("mapp-view-"+e,t),"list"==e&&t&&this.renderList(),"directions"==e&&this.resize()},toJSON:function(){this.pois=[];for(var e=0;e<this.pois_.length;e++)this.pois.push(this.pois_[e].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,search:this.search,title:this.title,width:this.width,zoom:this.zoom}}}},689:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.Infobox=function(t,i){this.map=t,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?t.getContainer():t.getDiv(),this.node=null,this.opts=_.extend({clip:!0,pan:!0},i),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null,this.wrapper=e('<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>'),i&&i.className&&this.wrapper.addClass(i.className),this.node=e(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?mapp.event.addListener(this.map,"move",(e=>{this.isOpen&&this.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=()=>{this.isOpen&&this.draw()}),this.node.get(0).addEventListener("load",(()=>{"leaflet"==mappl10n.options.engine?this.open({position:this.position,anchorPoint:this.anchorPoint}):mapp.event.addListenerOnce(this.map,"panend",(e=>{this.open({position:this.position,anchorPoint:this.anchorPoint})}))}),{capture:!0});var n="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();this.wrapper.appendTo(n),"leaflet"==mappl10n.options.engine&&t.on("load",(()=>{L.DomEvent.disableClickPropagation(this.wrapper.get(0))}))},mapp.Infobox.prototype={close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(document.fullscreenElement||this.map.isFullscreen)return;if(!this.position)return;let e,t,i;if(e=this.node.outerWidth(),t=this.node.outerHeight(),"leaflet"==mappl10n.options.engine)i=this.map.latLngToContainerPoint(this.position);else{const e=this.overlayView.getProjection();if(!e)return;i=e.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:i.x-e/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-i.y-this.anchorPoint.y})},getContent:function(){return e(".mapp-ib",this.node).get(0)},open:function(e){this.position=e.position,this.anchorPoint=e.anchorPoint?e.anchorPoint:{x:0,y:0},this.wrapper.addClass("mapp-open"),this.wrapper.css({left:0,bottom:0,width:"auto",height:"auto"}),this.wrapper.css({width:this.node.outerWidth(),height:this.node.outerHeight()}),"leaflet"==mappl10n.options.engine&&this.map.stop(),this.isOpen=!0,this.draw(),this.pan()},pan:function(){const t=this.node.outerWidth(),i=this.node.outerHeight(),n=e(this.mapDiv).width(),s=e(this.mapDiv).height();if("leaflet"==mappl10n.options.engine)var o=this.map.latLngToContainerPoint(this.position);else{var a=this.overlayView.getProjection();o=a?a.fromLatLngToContainerPixel(this.position):null}if(!o)return;var l={x:o.x,y:o.y};o.x+t/2+this.anchorPoint.x>n-this.fudge?l.x=Math.max(n-t/2-this.anchorPoint.x-this.fudge,n/2-this.anchorPoint.x):o.x-t/2+this.anchorPoint.x<this.fudge&&(l.x=Math.min(t/2+this.anchorPoint.x+this.fudge,n/2-this.anchorPoint.x)),o.y+this.anchorPoint.y-i<this.fudge&&(l.y=i-this.anchorPoint.y+this.fudge),l.y>=s&&(l.y=s-this.fudge);const p={x:o.x-l.x,y:o.y-l.y};p.x<=-1||p.x>=1||p.y<=-1||p.y>=1?"leaflet"==mappl10n.options.engine?this.map.panBy([p.x,p.y]):(mapp.event.addListenerOnce(this.map,"idle",(e=>{mapp.event.trigger(this.map,"panend")})),this.map.panBy(p.x,p.y)):mapp.event.trigger(this.map,"panend")},setContent:function(t){e(".mapp-ib",this.node).empty().append(t)}}},628:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.lib={template:function(t,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var n=mappl10n.options.templates?mappl10n.options.template[t]:e("#mapp-tmpl-"+t).html();if(!n)return"";mapp.lib.templates[t]=_.template(n,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return mapp.lib.templates[t](i)}},jQuery,mapp.event={addListener:function(e,t,i){t=t.split(" ");for(var n=0;n<t.length;n++)"leaflet"==mappl10n.options.engine?e.on(t[n],i):google.maps.event.addListener(e,t[n],i)},addListenerOnce:function(e,t,i){t=t.split(" ");for(var n=0;n<t.length;n++)"leaflet"==mappl10n.options.engine?e.once(t[n],i):google.maps.event.addListenerOnce(e,t[n],i)},clearInstanceListeners:function(e){"leaflet"==mappl10n.options.engine?e.off():google.maps.event.clearInstanceListeners(e)},clearListeners:function(e,t){t=t.split(" ");for(var i=0;i<t.length;i++)"leaflet"==mappl10n.options.engine?e.off(t[i]):google.maps.event.clearListeners(e,t[i])},trigger:function(e,t,i){"leaflet"==mappl10n.options.engine?e.fire(t,i):google.maps.event.trigger(e,t,i)}}},692:()=>{window.mapp=window.mapp||{},jQuery,mapp.load=function(){if("undefined"!=typeof mapp&&mapp.data)for(;mapp.data.length;){var e=mapp.data.pop();window[e.name]=new mapp.Map(e),window[e.name].display()}},mapp.load()},436:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.Marker=function(e){this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(e),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=()=>this.draw(),this.overlayView.onAdd=()=>this.onAdd(),this.overlayView.onRemove=()=>this.onRemove()},mapp.Marker.prototype={draw:function(){if(!this.div||!this.icon)return;let t=this.overlayView.getProjection();if(t){let i=t.fromLatLngToDivPixel(this.position),n=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};e(this.div).css({left:i.x-n.width/2,top:i.y-n.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(e){let t="on"+e.type[0].toUpperCase()+e.type.slice(1);this[t]&&this[t](e)},onAdd:function(){let t=this.overlayView.getPanes();t&&(this.div=e('<div class="mapp-marker">'),this.div.appendTo(t.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(()=>{(!this.dragging||this.dragging&&!this.dragging.moved)&&mapp.event.trigger(this,"click"),this.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable))},onMouseenter:function(e){mapp.event.trigger(this,"mouseover")},onMouseleave:function(e){mapp.event.trigger(this,"mouseout")},onPointerdown:function(e){const t=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:e.clientX,y:e.clientY},offset:{x:i.x-(e.clientX-t.left),y:i.y-(e.clientY-t.top)}},this.toggleDragEvents(!0)},onPointermove:function(e){if(Math.abs(e.clientX-this.dragging.startPixel.x)+Math.abs(e.clientY-this.dragging.startPixel.y)<3)return;const t=this.map.getDiv().getBoundingClientRect();let i={x:e.clientX-t.left+this.dragging.offset.x,y:e.clientY-t.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(e){this.onPointerup(e)},onPointerup:function(e){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(e,t){let i="set"+e[0].toUpperCase()+e.slice(1);this[i]&&this[i](t)},setDraggable:function(e){this.draggable=e,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),e&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(e){if(void 0!==e&&(this.icon=e),this.icon&&this.div){let e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);let t=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:t.width,height:t.height}),this.setZIndex(),this.draw()}},setMap:function(e){this.map=e,this.overlayView.setMap(e)},setPosition:function(e){this.position=e},setValues:function(e){for(const t in e)this.set(t,e[t])},setVisible:function(e){this.visible=e,this.div&&this.div.css("visibility",e?"visible":"hidden")},setZIndex:function(e){this.zIndex=void 0!==e?e:this.zIndex,this.div&&this.div.css("z-index",e)},toggleDragEvents(e){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),e&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},548:(e,t,i)=>{"use strict";i.r(t);var n,s=i(939);window.mapp=window.mapp||{},n=jQuery,mapp.Poi=function(e){if(this.defaults={address:null,body:null,html:null,iconid:null,id:null,kml:null,map:null,overlay:null,postid:null,poly:null,props:null,title:"",url:null,type:null,viewport:null},n.extend(this,this.defaults,e),this.id=s.mappLib.nanoid(),e&&e.correctedAddress&&(this.address=e.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),!e.overlay)switch(this.type){case"polygon":this.overlay=new google.maps.Polygon({paths:e.poly.paths}),this.setColors(e.poly);break;case"polyline":this.overlay=new google.maps.Polyline({path:e.poly.path}),this.setColors(e.poly);break;case"circle":var t=new google.maps.LatLng(e.point.lat,e.point.lng);this.overlay=new google.maps.Circle({center:t,radius:parseFloat(e.poly.radius)}),this.setColors(e.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:mapp.poi.viewportToBounds(this.viewport)}),this.setColors(e.poly);break;case"kml":var i=e.kml&&e.kml.url?e.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(i):new google.maps.KmlLayer({url:i,preserveViewport:!0,suppressInfoWindows:!0});break;default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([e.point.lat,e.point.lng]):this.overlay=new mapp.Marker({position:new google.maps.LatLng(e.point.lat,e.point.lng)}),this.set({iconid:e.iconid})}},mapp.Poi.prototype={addEvents:function(){mapp.event.clearInstanceListeners(this.overlay),mapp.event.addListener(this.overlay,"click",(e=>{this.open(e)})),mapp.event.addListener(this.overlay,"mouseover",(e=>{this.map.poiHover(this)})),mapp.event.addListener(this.overlay,"mouseout",(e=>{this.map.poiHover(null)})),"kml"==this.type&&this.addKmlEvents(),this.map.isEditable&&(this.addPolyEditEvents(!0),this.map.isEditable&&mapp.event.addListener(this.overlay,"dragstart",(()=>{this.viewport=null,this.addPolyEditEvents(!1)})),mapp.event.addListener(this.overlay,"dragend",(()=>{this.updateFromOverlay(),this.addPolyEditEvents(!0)})))},addKmlEvents:function(){"leaflet"==mappl10n.options.engine?(mapp.event.addListenerOnce(this.overlay,"ready",(()=>{this.updateFromOverlay()})),mapp.event.addListenerOnce(this.overlay,"error",(()=>{alert(mappl10n.kml_error+" : "+this.kml.url)}))):(mapp.event.addListener(this.overlay,"defaultviewport_changed",(()=>{this.updateFromOverlay()})),mapp.event.addListener(this.overlay,"status_changed",(()=>{"OK"!=this.overlay.getStatus()&&alert(mappl10n.kml_error+" : "+this.kml.url)})))},addPolyEditEvents(e){this.isPoly()&&"google"==mappl10n.options.engine&&("rectangle"==this.type&&(mapp.event.clearListeners(this.overlay,"bounds_changed"),e&&mapp.event.addListener(this.overlay,"bounds_changed",(()=>{this.updateFromOverlay()}))),"circle"==this.type&&(mapp.event.clearListeners(this.overlay,"center_changed radius_changed"),e&&mapp.event.addListener(this.overlay,"center_changed radius_changed",(()=>{this.updateFromOverlay()}))),"polygon"!=this.type&&"polyline"!=this.type||(mapp.event.clearListeners(this.overlay,"rightclick"),mapp.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e&&(mapp.event.addListener(this.overlay,"rightclick",(e=>{null!=e.vertex&&this.overlay.getPath().getLength()>2&&(this.overlay.getPath().removeAt(e.vertex),this.updateFromOverlay())})),mapp.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(()=>{this.updateFromOverlay()})))))},center:function(e){var t=this.getBounds();if("number"!=typeof e)if(t){var i=t.getNorthEast().toJSON().lng-t.getSouthWest().toJSON().lng;i<0&&(i+=360),e=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),e,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),e)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(e){switch(this.isPoly()?"poly":this.type){case"kml":return e&&e.pixelOffset?{x:e.pixelOffset.width,y:e.pixelOffset.height}:{x:0,y:0};case"poly":return{x:0,y:0};default:return mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?{x:0,y:0-mappl10n.options.iconScale[1]}:{x:0,y:-32}}},getBounds:function(){var e;switch(this.type){case"polyline":e=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(t){e.extend(t)}));break;case"polygon":e=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(t){t.forEach((function(t){e.extend(t)}))}));break;case"rectangle":case"circle":e=this.overlay.getBounds();break;case"kml":e=(e="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||mapp.poi.viewportToBounds(this.viewport);break;default:return mapp.poi.viewportToBounds(this.viewport)}return e},getColors:function(){var e={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[t]&&(e[t]=this.overlay[t]);return e},getPosition:function(e){if(this.point)return"leaflet"==mappl10n.options.engine?L.latLng(this.point):new google.maps.LatLng(this.point.lat,this.point.lng);if("kml"==this.type&&e&&e.latLng)return e.latLng;const t=this.getBounds();return"leaflet"==mappl10n.options.engine?t&&t.isValid()?t.getCenter():new L.latLng(0,0):t?t.getCenter():new google.maps.LatLng(0,0)},highlight:function(e){if(!this.type){var t="leaflet"==mappl10n.options.engine?n(this.overlay._icon):this.overlay.getDiv();if(t){switch(this.map.isEditable?"circle":mappl10n.options.highlight){case"circle":t.toggleClass("mapp-marker-circle",e);break;case"icon":var i=e?s.mappLib.getIcon(mappl10n.options.highlightIcon):s.mappLib.getIcon(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==i.options.iconUrl)return;this.overlay.setIcon(i);break;case"scale":t.addClass("mapp-marker"),t.toggleClass("mapp-marker-scale",e)}this.setZIndex(e?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(e){this.map.poiOpen(this,e)},render:function(e,t){var i={};return i=_.extend(i,this,{icon:s.mappLib.getIconUrl(this.iconid)}),t&&(i.body=t.description,i.title=t.name),i.thumbnail=mappl10n.options.thumbsPopup&&"popup"==e||mappl10n.options.thumbsList&&"item"==e?i.thumbnail:null,s.mappLib.template(this.map.templates[e],{poi:i})},set:function(e){for(var t in e){var i=e[t];"iconid"===t?this.type||(this.iconid=i,this.overlay.setIcon(s.mappLib.getIcon(i))):this[t]=i}},setColors:function(e){var t={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})e&&void 0!==e[i]&&(t[i]=e[i]);this.overlay.setOptions(t)},setEditable:function(e){"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=e:this.overlay.setDraggable(e),this.isPoly()&&this.overlay.setEditable(e))},setMap:function(e){this.map=e,null!=e?(this.setEditable(this.map.isEditable),this.addEvents(),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(e.getMap()):this.overlay.setMap(e.getMap()))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setVisible:function(e){void 0!==this.overlay.setVisible&&this.overlay.setVisible(e)},setZIndex:function(e){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(e):this.overlay.set("zIndex",e)},toJSON:function(){var e={address:this.address,body:this.body,iconid:this.iconid,point:this.point,title:this.title,type:this.type,viewport:this.viewport};return"kml"==this.type?e.kml=this.kml:this.isPoly()&&(e.poly=this.poly),e},updateFromOverlay(){_.extend(this,mapp.poi.parseOverlay(this.overlay))}},mapp.poi={boundsToViewport:function(e){return e?{sw:e.getSouthWest().toJSON(),ne:e.getNorthEast().toJSON()}:null},boundsCenterPoint:function(e){return e&&e.isValid()?e.getCenter().toJSON():{lat:0,lng:0}},viewportToBounds:function(e){return e&&e.sw&&e.ne?"leaflet"==mappl10n.options.engine?new L.LatLngBounds(L.latLng(e.sw.lat,e.sw.lng),L.latLng(e.ne.lat,e.ne.lng)):new google.maps.LatLngBounds(new google.maps.LatLng(e.sw.lat,e.sw.lng),new google.maps.LatLng(e.ne.lat,e.ne.lng)):null},parseOverlay:function(e){if(google){const t=e instanceof google.maps.Polyline?{strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,stokeWeight:e.strokeWeight}:{fillColor:e.fillColor,fillOpacity:e.fillOpacity,strokeColor:e.strokeColor,strokeOpacity:1,stokeWeight:e.strokeWeight};if(e instanceof google.maps.Circle)return{point:e.getCenter().toJSON(),poly:{radius:e.getRadius(),...t}};if(e instanceof google.maps.Rectangle)return{viewport:mapp.poi.boundsToViewport(e.getBounds()),poly:{...t}};if(e instanceof google.maps.Polyline){const i=[];return e.getPath().forEach((function(e){i.push(e.toJSON())})),{poly:{path:i,...t}}}if(e instanceof google.maps.Polygon){const t={fillColor:e.fillColor,fillOpacity:e.fillOpacity,strokeColor:e.strokeColor,strokeOpacity:1,stokeWeight:e.strokeWeight},i=[];return e.getPaths().forEach((function(e){var t=[];e.forEach((function(e){t.push(e.toJSON())})),i.push(t)})),{poly:{paths:i,...t}}}}return{point:"leaflet"==mappl10n.options.engine?e.getLatLng().toJSON():e.getPosition().toJSON()}}}}},t={};function i(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(117),i(715),i(817),i(10),i(326),i(939),i(27),i(818),i(615),i(892),i(628),i(283),i(689),i(436),i(548),i(692)})();
1
+ (()=>{var e={117:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappAutocomplete:()=>m});var n=i(326);const s=wp.element.createElement,{Fragment:o,useCallback:a,useEffect:l,useLayoutEffect:p,useMemo:r,useRef:c,useState:u}=wp.element;function m(e){e={buttonLabel:null,className:"",delay:null,focus:!1,onFetch:null,onSelect:null,placeholder:"",selected:null,suggestions:[],title:"",...e};const t=c(null),i=c(null),[o,a]=u({isOpen:!1,value:""});function p(e){a((t=>({...t,...e})))}(0,n.useClickOutside)(t,(()=>{o.isOpen&&p({isOpen:!1})})),l((()=>{e.focus&&i.current&&i.current.focus()}),[i.current]),l((()=>{o.map&&setMapTypeId(e.mapTypeId)}),[e.mapTypeId,o.map]);const r=(0,n.useDebounce)((t=>{e.onFetch&&e.onFetch(t)}),e.delay);function m(){let t;p({isOpen:!1}),e.suggestions&&(t=null==o.selected?e.suggestions[0]:e.suggestions[o.selected]),e.onSelect({suggestion:t,value:h})}const h=o.selected>=0&&e.suggestions&&e.suggestions[o.selected]?e.suggestions[o.selected].value:o.value;return s("div",{className:"mapp-autocomplete",ref:t},s("div",{className:"mapp-autocomplete-wrapper"},s("input",{className:e.className,onChange:e=>{!function(e){p({value:e,selected:null}),r(e)}(e.target.value)},onKeyDownCapture:t=>function(t){switch(t.stopPropagation(),t.code){case"Backspace":p({isOpen:o.value.length>1});break;case"Enter":m();break;case"Escape":p({isOpen:!1});break;case"ArrowUp":if(t.preventDefault(),e.suggestions&&0!=o.selected){const t=null==o.selected?e.suggestions.length-1:o.selected-1;e.suggestions[t]&&p({isOpen:!0,selected:t})}else p({selected:null});break;case"ArrowDown":if(e.suggestions&&o.selected<e.suggestions.length-1){const t=null==o.selected?0:o.selected+1;e.suggestions[t]&&p({isOpen:!0,selected:t})}else p({selected:null});break;case"Tab":case"AltLeft":case"AltRight":case"ControlLeft":case"ControlRight":case"MetaLeft":case"MetaRight":break;default:p({isOpen:!0})}}(t),placeholder:e.placeholder,ref:i,title:e.title,type:"text",value:h}),o.isOpen&&s("div",{className:"mapp-autocomplete-list"},_.map(e.suggestions,((t,i)=>{const n="mapp-autocomplete-item"+(o.selected==i?" mapp-selected":"");return s("div",{className:n,key:i,onClick:()=>function(t,i){p({isOpen:!1,selected:i}),e.onSelect({suggestion:t})}(t,i)},t.value)})))),e.buttonLabel&&s("div",{className:"mapp-submit-button",onClick:()=>m()},e.buttonLabel))}},715:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappDirections:()=>r});const n=wp.element.createElement,{Fragment:s,useEffect:o,useLayoutEffect:a,useRef:l,useState:p}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function r(e){e={from:null,onClose:null,to:null,...e};const[t,i]=p({from:e.from?e.from:"",to:e.to?e.to:""});function s(e){i((t=>({...t,...e})))}function a(){e.onClose&&e.onClose()}function l(){const e=t.from.trim(),i=t.to.trim();let n=mappl10n.options.directionsServer;n="https://maps.google.com"==n?"https://www.google.com":n,-1==n.toLowerCase().indexOf("http")&&(n="https://"+n),n+="/maps/dir/?api=1&origin="+encodeURIComponent(e)+"&destination="+encodeURIComponent(i),window.open(n),a()}function r(e){13==e?l():27==e&&a()}return o((()=>{"google"==mappl10n.options.directions&&l()}),[]),"google"==mappl10n.options.directions?null:n("div",{className:"mapp-directions-component"},n("div",{className:"mapp-close",onClick:()=>a()}),n("div",null,n("input",{className:"mapp-dir-from",onChange:e=>s({from:e.target.value}),onKeyPress:e=>r(e.which),tabIndex:"1",placeholder:__("My location"),value:t.from}),n("div",{className:"mapp-dir-arrows",onClick:()=>{s({from:t.to,to:t.from})}})),n("div",null,n("input",{className:"mapp-dir-to",onChange:e=>s({to:e.target.value}),onKeyPress:e=>r(e.which),tabIndex:"2",value:t.to})),n("div",{className:"mapp-dir-toolbar"},n("div",{className:"mapp-submit-button",onClick:()=>l()},__("Get Directions"))))}},817:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappFilters:()=>u});var n=i(939),s=i(326);const o=wp.element.createElement,{Fragment:a,useEffect:l,useLayoutEffect:p,useRef:r,useState:c}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),sprintf=wp.i18n.sprintf,u=e=>{e={onFilterChange:null,otype:"post",poiCount:0,...e};const t=(0,s.useDebounce)(e.onFilterChange,500),i=r(null),[a,p]=c({filters:null,formData:{},isBusy:!0,isOpen:!1});function u(e){p((t=>({...t,...e})))}function m(e,i){let n=a.formData[e.key]?a.formData[e.key].values:null;if("checkbox"==e.format){var s;const e=null===(s=n)||void 0===s?void 0:s.indexOf(i);e>-1?n.splice(e,1):(n=n||[],n.push(i))}else n=i?[i]:[];let o={...a.formData};n.length?o[e.key]={key:e.key,values:n,meta_key:e.meta_key,meta_values:e.meta_values}:delete o[e.key],u({formData:o}),t(o)}function h(){u({formData:{}}),t()}function g(e){u({isOpen:e=void 0!==e?e:!a.isOpen})}function d(e){return o("div",{className:"mapp-filter",key:e.key},o("div",{className:"mapp-filter-label"},e.label),o("div",{className:"mapp-filter-values"},function(e){e.key;const t=[...e.values];let i=a.formData[e.key]?a.formData[e.key].values:"";switch(e.format){case"input":return o("input",{type:"text",value:i?i[0]:"",onChange:t=>m(e,t.target.value)});case"checkbox":return _.map(t,(t=>o("label",{key:t.value},o("input",{checked:null==i?void 0:i.includes(t.value),key:t.value,onChange:t=>m(e,t.target.value),type:e.format,value:t.value}),t.iconid&&o("img",{className:"mapp-icon",src:n.mappLib.getIconUrl(t.iconid)}),t.label)));case"radio":return"radio"==e.format&&t.unshift({value:"",label:__("All")}),_.map(t,(t=>o("label",{key:t.value},o("input",{checked:i==t.value||""==t.value&&!i,key:t.value,onChange:t=>m(e,t.target.value),type:e.format,value:t.value}),t.iconid&&o("img",{className:"mapp-icon",src:n.mappLib.getIconUrl(t.iconid)}),t.label)));case"select":return t.unshift({value:"",label:""}),o("select",{value:i[0],onChange:t=>m(e,t.target.value)},_.map(t,(e=>o("option",{key:e.value,value:e.value},e.label))))}}(e)))}return(0,s.useClickOutside)(i,(()=>{a.isOpen&&g(!1)})),l((()=>{u({isBusy:!0}),n.mappLib.ajax({data:{action:"mapp_filters_get",nonce:mappl10n.options.nonce,otype:e.otype},callback:e=>{u({isBusy:!1}),e&&"OK"==e.status?u({filters:e.data}):console.error("MapPress: unable to fetch filter data")}})}),[]),o("div",{className:"mapp-filters-component",ref:i},function(){const e="mapp-button mapp-filters-toggle mapp-button-caret"+(a.isBusy?" mapp-button-disabled":"");return o("div",{className:e,onClick:()=>{a.isBusy||g()}},__("Filter"))}(),a.isOpen&&null!==a.filters&&o("div",{className:"mapp-filters-wrapper"},o("div",{className:"mapp-filters-list"},_.map(a.filters,(e=>d(e)))),function(){let t=e.poiCount>1?__("%s Results"):__("%s Result");return t=sprintf(t,e.poiCount),o("div",{className:"mapp-filters-toolbar"},o("div",{className:"mapp-link-button",onClick:h},__("Reset")),o("div",{className:"mapp-filters-count"},t),o("div",{className:"mapp-submit-button",onClick:()=>g(!1)},__("Done")))}()))}},10:(e,t,i)=>{"use strict";i.r(t),i.d(t,{useGeocoding:()=>c});wp.element.createElement;const{Fragment:n,useCallback:s,useEffect:o,useLayoutEffect:a,useRef:l,useState:p}=wp.element,r={google:function(){this.token=null;const e=document.createElement("div");this.placesService=new google.maps.places.PlacesService(e),this.autocompleteService=new google.maps.places.AutocompleteService}};r.google.prototype={getDetails:function(e){let{suggestion:t,callback:i}=e;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var n={fields:["formatted_address","name","geometry"],placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(n,(function(e,t){if("OK"==t&&e&&e.geometry){if(e.geometry.location&&(e.geometry.location=e.geometry.location.toJSON()),e.geometry.viewport){var n=e.geometry.viewport.toJSON();e.geometry.viewport={sw:{lat:n.south,lng:n.west},ne:{lat:n.north,lng:n.east}}}i(e)}else i(null)}))},getFirstPrediction:function(e){let{map:t,value:i,callback:n}=e;this.getPredictions({map:t,value:i,callback:e=>{e&&Array.isArray(e)?this.getDetails({suggestion:e[0],callback:e=>n(e)}):n(null)}})},getPredictions:function(e){let{map:t,value:i,includeBusinesses:n,callback:s}=e;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var o=t?t.getBounds():null;"leaflet"==mappl10n.options.engine&&(o=new google.maps.LatLngBounds(new google.maps.LatLng(o.getSouthWest().lat,o.getSouthWest().lng),new google.maps.LatLng(o.getNorthEast().lat,o.getNorthEast().lng)));var a={input:i,bounds:o=o||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:n?null:["geocode"]};this.autocompleteService.getPlacePredictions(a,(function(e,t){"OK"==t&&e&&e.length?(e=(e=e.map((e=>(e.value=e.description,e)))).filter((e=>e.place_id)),s(e)):(t==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):t==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),s(null))}))}},r.mapbox=function(){},r.mapbox.prototype={getDetails:function(e){let{suggestion:t,callback:i}=e,n=t.place_name,s=n.indexOf(","),o=n.indexOf(",",s+1);s>0&&(n=parseInt(n.substr(0,s))?n.substr(0,o).replace(",",""):n.substr(0,s));let a=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;i({formatted_address:t.place_name,name:n,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:a}})},getFirstPrediction:function(e){let{map:t,value:i,callback:n}=e;this.getPredictions({map:t,value:i,callback:e=>{e&&e.length?this.getDetails({suggestion:e[0],callback:e=>n(e)}):n(null)}})},getPredictions:function(e){let{map:t,value:i,callback:n}=e;var s="https://api.mapbox.com/geocoding/v5/mapbox.places/"+i+".json?access_token="+mappl10n.options.mapbox;s=mappl10n.options.country?s+"&country="+mappl10n.options.country.toLowerCase():s,s=mappl10n.options.language?s+"&language="+mappl10n.options.language.toLowerCase():s;var o=t?t.getCenter():null;o&&(s+="&proximity="+o.lng+","+o.lat),mappl10n.options.searchBox&&(s+="&bbox="+mappl10n.options.searchBox),fetch(s).then((e=>e.json())).then((e=>{e&&e.features&&e.features.length>0?(e.features=e.features.map((e=>(e.value=e.label=e.place_name,e))),n(e.features)):n(null)}))}},r.nominatim=function(){},r.nominatim.prototype={getDetails:function(e){let{suggestion:t,callback:i}=e,n=t.display_name,s=n.indexOf(","),o=n.indexOf(",",s+1);s>0&&(n=parseInt(n.substr(0,s))?n.substr(0,o).replace(",",""):n.substr(0,s));let a=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;i({formatted_address:t.display_name,name:n,geometry:{location:{lat:t.lat,lng:t.lon},viewport:a}})},getFirstPrediction:function(e){let{map:t,value:i,callback:n}=e;this.getPredictions({map:t,value:i,callback:e=>{e&&e.length?this.getDetails({suggestion:e[0],callback:e=>n(e)}):n(null)}})},getPredictions:function(e){let{map:t,value:i,callback:n}=e;var s="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(i);if(s=mappl10n.options.country?s+"&countrycodes="+mappl10n.options.country.toLowerCase():s,s=mappl10n.options.language?s+"&accept-language="+mappl10n.options.language.toLowerCase():s,mappl10n.options.searchBox)s+="&viewbox="+mappl10n.options.searchBox,s+="&bounded=1";else{var o=t?t.getMap().getBounds():null;if(o){let e=o.getSouthWest(),t=o.getNorthEast();s+="&viewbox="+e.lng+","+e.lat+","+t.lng+","+t.lat}}fetch(s).then((e=>e.json())).then((e=>{e&&e.length?(e=e.map((e=>(e.value=e.display_name,e))),n(e)):n(null)}))}};const c=e=>{let{includeBusinesses:t}=e;function i(){let e="";return e="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"nominatim",new r[e]}function n(e,t){navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(t){var i={lat:t.coords.latitude,lng:t.coords.longitude};e({name:i.lat+", "+i.lng,geometry:{location:i}})}),(function(i){if(!t){var n=i&&i.message?" : "+i.message:"";alert(mappl10n.no_geolocate+n)}e(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)}return{geocode:function(e){let{map:s,suggestion:o,value:a,callback:l}=e;const p=i();a="string"==typeof a?a.trim():a,o||a?function(e){let{map:t,value:i,callback:s}=e;if(!i)return void s(null);if("string"!=typeof i){const e=i.lat&&i.lng?{geometry:{location:{lat:i.lat,lng:i.lng}}}:null;return void s(e)}if("http"==i.substring(0,4))return void s(i);if("user"==i)return void n((function(e){s(e)}));const o=i.split(",");if(2==o.length){const e=parseFloat(o[0]),t=parseFloat(o[1]);if(!isNaN(e)&&!isNaN(t))return void s({name:e+", "+t,geometry:{location:{lat:e,lng:t}}})}s(null)}({map:s,value:a,callback:e=>{e?l(e):o?p.getDetails({suggestion:o,callback:l}):p.getFirstPrediction({map:s,value:a,includeBusinesses:t,callback:l})}}):l(null)},geolocate:n,getPredictions:function(e){let{map:t,value:n,callback:s}=e;i().getPredictions({map:t,value:n,callback:s})}}}},326:(e,t,i)=>{"use strict";i.r(t),i.d(t,{useDebounce:()=>c,useClickOutside:()=>u});wp.element.createElement;const{Fragment:n,useCallback:s,useEffect:o,useLayoutEffect:a,useMemo:l,useRef:p,useState:r}=wp.element;function c(e,t){const i=React.useRef(e);return React.useLayoutEffect((()=>{i.current=e})),React.useMemo((()=>_.debounce((function(){return i.current(...arguments)}),t)),[t])}function u(e,t){const i=i=>{e.current&&!e.current.contains(i.target)&&t()};return document.addEventListener("mousedown",i),document.addEventListener("touchstart",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchstart",i)}}},939:(e,t,i)=>{"use strict";i.r(t),i.d(t,{mappLib:()=>c});wp.element.createElement;const{Fragment:n,useCallback:s,useEffect:o,useLayoutEffect:a,useMemo:l,useRef:p,useState:r}=wp.element,c={ajax:function(e){const t={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,i,n){"json"==e.dataType&&e.url==mappl10n.options.ajaxurl&&"OK"!=t.status&&c.alert(t.status),"json"==e.dataType&&t.output?c.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,i,n){"cancel"!=i&&(void 0!==n&&""!=n&&c.alert("AJAX ERROR\r\nTextStatus="+i+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e={...t,...e},jQuery.ajax(e)},alert:function(e){mappl10n.options.admin||mappl10n.options.debug?alert(e):window.console&&console.error(e)},getIcon:function(e){{const t=this.getIconUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:t,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:t}}},getIconUrl:function(e){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"},nanoid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;const t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let i="",n=e;for(;n--;)i+=t[64*Math.random()|0];return i},template:function(e,t){if(c.templates=c.templates?c.templates:{},!c.templates[e]){var i=document.getElementById("mapp-tmpl-"+e).innerHTML;if(!i)return"";c.templates[e]=_.template(i,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return c.templates[e](t)}};"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})},27:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappPaginate:()=>r});const n=wp.element.createElement,{Fragment:s,useEffect:o,useLayoutEffect:a,useRef:l,useState:p}=wp.element,{sprintf}=wp.i18n;function r(e){function t(t,i){const n=Math.ceil(e.count/e.pageSize);switch(t){case"first":e.onChange(1);break;case"last":e.onChange(n);break;case"next":e.page<n&&e.onChange(e.page+1);break;case"prev":e.page>1&&e.onChange(e.page-1)}}return function(){const i=Math.ceil(e.count/e.pageSize),s=e.isBusy||e.page<=1,o=e.isBusy||e.page>=i,a=s?"mapp-paginate-button mapp-disabled":"mapp-paginate-button",l=o?"mapp-paginate-button mapp-disabled":"mapp-paginate-button";return n("div",{className:"mapp-paginate"},n("div",{className:a,onClick:()=>{s||t("first")}},"«"),n("div",{className:a,onClick:()=>{s||t("prev")}},"‹"),n("div",{className:"mapp-paginate-count"},sprintf((p="%d of %d",wp.i18n.__(p,"mappress-google-maps-for-wordpress")),e.page,i)),n("div",{className:l,onClick:()=>{o||t("next")}},"›"),n("div",{className:l,onClick:()=>{o||t("last")}},"»"));var p}()}},818:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappPlaces:()=>m});var n=i(117),s=i(10);const o=wp.element.createElement,{Fragment:a,useCallback:l,useEffect:p,useLayoutEffect:r,useRef:c,useState:u}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function m(e){e={buttonLabel:null,focus:!1,includeBusinesses:!1,map:null,onSearch:null,...e};const{geocode:t,getPredictions:i}=(0,s.useGeocoding)({map:e.map,includeBusinesses:e.includeBusinesses}),[a,l]=u({suggestions:[]});return o(n.MappAutocomplete,{buttonLabel:e.buttonLabel,className:"mapp-places",debounce:"nominatim"===mappl10n.options.geocoder?500:300,delay:"nominatim"==mappl10n.options.geocoder?500:50,focus:e.focus,onFetch:function(t){i({map:e.map,value:t,callback:e=>{var t;t={suggestions:e},l((e=>({...e,...t})))}})},onSelect:function(i){let{suggestion:n,value:s}=i;t({map:e.map,suggestion:n,value:s,callback:t=>{t&&e.onSearch(t)}})},placeholder:__("Search"),suggestions:a.suggestions,title:__("Enter an address, place, KML file URL, or lat,lng")})}},50:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var n=i(939);const s=wp.element.createElement,{Fragment:o,useEffect:a,useLayoutEffect:l,useMemo:p,useRef:r,useState:c}=wp.element;wp.i18n.sprintf;function u(e){e={context:null,feature:null,poi:null,template:null,thumbs:null,...e};const[t,i]=c({imageNumber:0});function a(e){i((t=>({...t,...e})))}return s(o,null,function(){const i="list"!=e.context&&mappl10n.options.thumbWidth&&mappl10n.options.thumbHeight?{width:mappl10n.options.thumbWidth+"px",height:mappl10n.options.thumbHeight+"px"}:null,n=e.thumbs&&e.poi.images&&e.poi.images.length&&e.poi.images[t.imageNumber]?e.poi.images[t.imageNumber]:null;if(!n)return null;const o=function(e){switch(e.type){case"avatar":return s("div",{className:"mapp-avatar",dangerouslySetInnerHTML:{__html:e.html}});case"embed":return s("div",{className:"mapp-embed",dangerouslySetInnerHTML:{__html:e.html}});default:if("image"==e.type||!e.type)return s("img",{src:e.url})}}(n);return s("div",{className:"mapp-thumbnail",style:i},t.imageNumber>=1&&s("div",{className:"mapp-gallery-previous",onClick:e=>function(e){t.imageNumber>0&&(a({imageNumber:t.imageNumber-1}),e.stopPropagation())}(e)}),o,t.imageNumber<e.poi.images.length-1&&s("div",{className:"mapp-gallery-next",onClick:i=>function(i){t.imageNumber<e.poi.images.length-1&&(a({imageNumber:t.imageNumber+1}),i.stopPropagation())}(i)}))}(),s("div",{className:"mapp-info"},function(){let t={...e.poi};t.icon=n.mappLib.getIconUrl(e.poi.iconid),e.feature&&(t.body=e.feature.description,t.title=e.feature.name);const i=n.mappLib.template(e.template,{poi:t});return s("div",{className:"mapp-template",dangerouslySetInnerHTML:{__html:i}})}(),function(){if(mappl10n.options.directionsPopup&&("map-popup"==e.template||"mashup-popup"==e.template))return s("div",{className:"mapp-dir",onClick:()=>onDirectionsClick()},(t="Get Directions",wp.i18n.__(t,"mappress-google-maps-for-wordpress")));var t}()))}},615:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappPoiList:()=>h});var n=i(939),s=i(27),o=i(50);const a=wp.element.createElement,{Fragment:l,useEffect:p,useLayoutEffect:r,useMemo:c,useRef:u,useState:m}=wp.element,sprintf=wp.i18n.sprintf;const h=wp.element.memo((function(e){e={bounds:null,className:null,hoveredPoi:null,isEditable:!1,isPaged:!1,onClick:null,onDragDrop:null,onHover:null,onPage:null,openPoi:null,page:1,pageSize:mappl10n.options.poiListPageSize?parseInt(mappl10n.options.poiListPageSize):20,pois:null,template:null,...e};const[t,i]=m({dragging:null,dragover:null});function p(e){i((t=>({...t,...e})))}function r(i){let s,r="mapp-item";return e.openPoi!=i.id&&e.hoveredPoi!=i.id||(r+=" mapp-selected"),r+=t.dragover==i.id?" mapp-dragover":"",s=e.isEditable?a(l,null,a("img",{className:"mapp-icon",src:n.mappLib.getIconUrl(i.iconid)}),a("div",{className:"mapp-title"},i.title)):a(o.Z,{context:"list",poi:i,template:e.template,thumbs:mappl10n.options.thumbsList}),a("div",{className:r,dangerouslySetInnerHTML:null,draggable:e.isEditable,key:i.id,onClick:()=>e.onClick(i.id),onDragOver:e=>e.preventDefault(),onDragStart:e=>p({dragging:i.id}),onDragEnter:e=>p({dragover:i.id}),onDragEnd:e=>p({dragging:null,dragover:null}),onDrop:n=>{return s=i.id,void(e.onDragDrop&&e.onDragDrop({from:t.dragging,to:s}));var s},onMouseEnter:t=>{e.onHover(i.id)},onMouseLeave:t=>{e.onHover(null)}},s)}return a("div",{className:e.className},e.isPaged&&a("div",{className:"mapp-list-header"},a("div",{className:"mapp-list-count"},sprintf((c="%s Result",u="%s Results",h=e.pois.length,wp.i18n._n(c,u,h,"mappress-google-maps-for-wordpress")),e.pois.length))),a("div",{className:"mapp-items"},_.map(e.pois,((e,t)=>r(e)))),e.isPaged&&(e.pois.length<=e.pageSize?null:a("div",{className:"mapp-list-footer"},a(s.MappPaginate,{count:e.pois.length,onChange:t=>e.onPage(t),page:e.page,pageSize:e.pageSize}))));var c,u,h}))},892:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MappPopupModal:()=>u});var n=i(939);const s=wp.element.createElement,o=wp.element.createPortal,{Fragment:a,useEffect:l,useLayoutEffect:p,useRef:r,useState:c}=wp.element;function u(e){e={onClose:null,poi:null,...e};const[t,i]=c({isBusy:!1,html:null});function a(e){i((t=>({...t,...e})))}const p=React.createRef();function r(t){27==t.keyCode&&e.onClose()}return l((()=>(document.body.classList.add("mapp-modal-noscroll"),()=>document.body.classList.remove("mapp-modal-noscroll"))),[]),l((()=>{e.poi.postid&&(a({isBusy:!0}),n.mappLib.ajax({data:{action:"mapp_get_post",postid:e.poi.postid,nonce:mappl10n.options.nonce},dataType:"HTML",type:"GET",success:e=>{a({isBusy:!1,html:e})}}))}),[e.poi.postid]),l((()=>{p.current&&p.current.focus(),console.log("focus"+document.activeElement)}),[p.current]),o(s("div",{className:"mapp-modal"},s("div",{className:"mapp-modal-backdrop",onClick:e.onClose,onKeyDown:r},s("div",{className:"mapp-modal-close",onClick:e.onClose},"×")),s("div",{className:"mapp-modal-content-wrapper",ref:p,onKeyDown:r,tabIndex:0},s("div",{className:"mapp-modal-content"},t.isBusy&&s("div",{className:"mapp-modal-spinner"}),!t.isBusy&&s("div",{dangerouslySetInnerHTML:{__html:t.html}}),s("div",{className:"mapp-modal-close",onClick:e.onClose},"X")))),document.body)}},283:(e,t,i)=>{"use strict";i.r(t);var n=i(715),s=i(817),o=i(939),a=i(326);const l=wp.element.createElement,{Fragment:p,useEffect:r,useLayoutEffect:c,useRef:u,useState:m}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function h(e){e={layer:null,map:null,onCenter:null,...e};const[t,i]=m({activeLayer:e.layer?e.layer:null,layers:null,isOpen:!1}),n=u(null);function s(e){i((t=>({...t,...e})))}function o(){s({isOpen:!t.isOpen})}return(0,a.useClickOutside)(n,(()=>{t.isOpen&&o()})),r((()=>{if("google"==mappl10n.options.engine){s({layers:{traffic:{googleLayer:new google.maps.TrafficLayer,label:__("Traffic")},bicycling:{googleLayer:new google.maps.BicyclingLayer,label:__("Bicycling")},transit:{googleLayer:new google.maps.TransitLayer,label:__("Transit")}}})}}),[]),l("div",{ref:n},l("div",{className:"mapp-menu-toggle",onClick:()=>o()}),t.isOpen&&function(){const i=_.map(t.layers,((i,n)=>{const o=t.activeLayer==n?"mapp-menu-item mapp-active":"mapp-menu-item";return l("div",{className:o,key:n,onClick:()=>function(i){t.activeLayer&&t.layers[t.activeLayer].googleLayer.setMap(null),i!=t.activeLayer&&t.layers[i].googleLayer.setMap(e.map.getMap()),s({activeLayer:i==t.activeLayer?null:i,isOpen:!1})}(n)},i.label)}));return l("div",{className:"mapp-menu-component",style:{display:"flex"}},l("div",{className:"mapp-menu-item",onClick:()=>(s({isOpen:!1}),void e.onCenter())},__("Center map")),"google"==mappl10n.options.engine&&l(p,null,l("div",{className:"mapp-menu-separator"}),i),l("div",{className:"mapp-menu-footer"},l("a",{className:"mapp-menu-help-link",href:"https://mappresspro.com/mappress-documentation",target:"_blank"},l("span",null,__("Help")))))}())}var g=i(818),d=i(50),f=i(615),v=i(892),y=i(10);window.mapp=window.mapp||{};const w=wp.element.createElement,b=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");wp.i18n._n;var k;k=jQuery,mapp.Map=function(e,t){this.defaults={alignment:null,center:null,classname:null,embed:null,height:null,initialOpenInfo:null,isEditable:null,layers:null,layout:null,lines:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,onDrawingEvent:null,onPoiClose:null,onPoiOpen:null,onSearch:null,poiList:null,poiListOpen:null,poiListPageSize:null,pois:null,postid:null,query:null,search:null,sel:null,title:null,width:null,zoom:null},this.drawingManager=null,this.filters=null,this.hovered=null,this.isFullscreen=!1,this.iw=null,this.mapdata=e,this.opened=null,this.pagination={count:0,page:1},this.polyline=null,this.settings=t||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.pois_=[],this.user_=null,this.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.poiList=void 0!==this.poiList&&null!=this.poiList?this.poiList:mappl10n.options.poiList,this.layout=this.layout?this.layout:mappl10n.options.layout,this.postid=this.postid?this.postid:mappl10n.options.postid},mapp.Map.prototype={display:function(){const{geocode:e}=(0,y.useGeocoding)({withBusinesses:this.isEditable});if(this.render(),!this.div||!this.div.layout)return;if(this.sanity(),this.query?this.templates={item:"mashup-item",popup:"mashup-popup"}:this.templates={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,scrollWheelZoom:mappl10n.options.scrollWheel,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,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),!this.div||!this.div.canvas)return;"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.addMenu(),this.addPopup(),this.isFilterable()&&this.renderFilters(),this.setMapTypeId(this.mapTypeId),this.clustering(),this.addDrawingManager();const t=k(".mapp-search-container",this.div.layout);t.length&&wp.element.render(w(g.MappPlaces,{buttonLabel:this.isEditable?b("Add to map"):w("img",{src:mappl10n.options.baseurl+"/images/search.png"}),focus:this.isEditable,includeBusinesses:this.isEditable,map:this,onSearch:e=>{this.onSearch?this.onSearch(e):this.doSearch(e)}}),t.get(0)),this.addUserLocation(),this.addEvents("click dragstart zoom_changed zoomstart",(e=>{"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||this.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(e=>{const t=k(e.currentTarget),i=t.attr("data-mapp-action"),n=t.attr("data-mapp-"+i);e.preventDefault(),this.onAction(i,n,t)})),new ResizeObserver(((e,t)=>{this.toggleView("mini"),this.resize()})).observe(this.div.layout.get(0)),e({map:null,value:this.center,callback:e=>{this.center=e&&e.geometry&&e.geometry.location?{lat:e.geometry.location.lat,lng:e.geometry.location.lng}:null,this.setPois(this.pois),this.initCenter()}})},initCenter:function(){setTimeout((()=>{this.recenter(),this.renderList(),this.isSearchable&&!this.isEditable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():mapp.event.addListenerOnce(this.map_,"idle",(()=>this.initOpen()))}),100)},initOpen:function(){const e=this.pois_.length?this.pois_[0]:null,t=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;e&&t&&!this.isEditable&&this.poiOpen(e)},addDrawingManager:function(){if(this.isEditable&&"google"==mappl10n.options.engine&&google.maps.drawing){const e={fillColor:"#0000FF",fillOpacity:.4,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2};this.drawingManager=new google.maps.drawing.DrawingManager({drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},circleOptions:e,polygonOptions:e,polylineOptions:e,rectangleOptions:e}),this.drawingManager.setMap(this.map_),mapp.event.addListener(this.drawingManager,"overlaycomplete",(e=>{this.drawingManager.setDrawingMode(null),this.poiHover(null),this.onDrawingEvent&&this.onDrawingEvent(e)}))}},addEvents:function(e,t){e=e.split(" ");for(var i=0;i<e.length;i++)mapp.event.addListener(this.map_,e[i],t)},addGeolocateControl:function(){if(!mappl10n.options.ssl)return;const e=k(".mapp-geolocate-control-wrapper",this.div.layout).get(0);"google"==mappl10n.options.engine?this.map_.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e):(L.Control.Geolocate=L.Control.extend({onAdd:t=>e,onRemove:()=>{}}),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 e=k.makeArray(this.layers),t=0;t<e.length;t++){var i=e[t].trim(),n=i.split(".").pop();this.layers_[i]?this.toggleLayer(i):"kml"==n||"kmz"==n?this.layers_[i]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:i}):"json"==n&&(this.layers_[i]=new google.maps.Data({map:this.map_}).loadGeoJson(i))}},addMenu:function(){this.isEditable||"leaflet"==mappl10n.options.engine||wp.element.render(w(h,{map:this,onCenter:()=>{this.poiClose(),this.recenter()}}),this.div.menu.get(0))},addPopup:function(){var e=this.isEditable?"mapp-iw-edit":"mapp-iw";this.isEditable||(e+=" mapp-"+this.templates.popup),this.div.iw=k('<div class="'+e+'">').appendTo(this.div.canvas),this.iw=new mapp.Infobox(this.map_,{className:this.isEditable?"mapp-ib-edit":""}),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(()=>{this.poiClose()}))},addSearchMove:function(){},addUserLocation:function(){const{geolocate:e}=(0,y.useGeocoding)({withBusinesses:this.isEditable});mappl10n.options.userLocation&&mappl10n.options.ssl&&e((e=>{if(e&&e.geometry&&e.geometry.location){const t=e.geometry.location,i=o.mappLib.getIcon("geolocation");"leaflet"==mappl10n.options.engine?this.user_=L.marker([t.lat,t.lng],{icon:i}).addTo(this.map_):(this.user_=new mapp.Marker({icon:i,position:new google.maps.LatLng(t.lat,t.lng)}),this.user_.setMap(this.map_))}}),!0)},clusterGetLatLng:function(e){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var t=this.clusterer.getVisibleParent(e.overlay);return t?t.getLatLng():null}for(var i=this.clusterer.getClusters(),n=0;n<i.length;n++){var s=i[n].markers_;if(s.length>1)for(var o=0;o<s.length;o++)if(s[o]==e.overlay)return i[n].center_}}},clustering:function(){if(mappl10n.options.clustering&&!this.isEditable){let e=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==e.disableClusteringAtZoom&&""==e.disableClusteringAtZoom&&(e.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup(e):(e=_.extend(e,{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}),this.clusterer=new MarkerClusterer(this.map_,[],e))}},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){var e=[];for(let t=0;t<this.pois_.length;t++)this.pois_[t].type||e.push(this.pois_[t].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(e),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(e)}},fetchPois:function(e){var t=new Date;this.poiClose();var i={action:"mapp_query",debug:mappl10n.options.debug,filters:this.filters,query:this.query,url:{href:window.location.href,search:window.location.search}};this.xhr_&&this.xhr_.abort("cancel"),this.spinner(!0),this.pagination.page=1,this.xhr_=o.mappLib.ajax({data:i,callback:(i,n)=>{this.spinner(!1),i&&"OK"==i.status&&(this.setPois(i.data.pois),this.renderList(),mappl10n.options.debug&&console.log("Results: "+i.data.pois.length+" ("+n.responseText.length/1e3+"K) AJAX: "+(new Date-t)+(i.data.timing?i.data.timing:"")),e&&e())}})},fitBounds:function(e){return this.map_.fitBounds(e)},getBounds:function(){try{return this.map_.getBounds()}catch(e){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(e){return null}},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(e){return null}},isFilterable:function(){return mappl10n.options.pro&&mappl10n.options.filters&&mappl10n.options.filters.length>0&&!this.isEditable&&this.query},isSearchable:function(){return!!this.isEditable},onAction:function(e,t,i){switch(e){case"dir":this.renderDirections({isOpen:!0,from:null,to:this.opened});break;case"dir-from":this.renderDirections({isOpen:!0,from:this.opened,to:null});break;case"geolocate":const{geolocate:e}=(0,y.useGeocoding)({withBusinesses:this.isEditable});e((e=>{e&&e.geometry&&e.geometry.location&&this.setView(e.geometry.location,parseInt(mappl10n.options.poiZoom))}),!1);break;case"open":var n=i.attr("data-mapp-poi");this.poiOpen(this.pois_[n]);break;case"sidebar-toggle":this.toggleSidebar();break;case"view-map":this.toggleSidebar(!1);break;case"view-list":this.toggleSidebar(!0);break;default:return!0}},doSearch:function(e){if(e&&e.geometry){var t=e.geometry.location?e.geometry.location:null,i=e.geometry.viewport?e.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var n=new L.LatLng(t.lat,t.lng),s=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):n.toBounds(1e3*mappl10n.options.radius);else{var o=new google.maps.Circle({center:t,radius:1e3*mappl10n.options.radius});s=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(o.getBounds()):o.getBounds()}s&&this.fitBounds(s),this.setView(t)}},poiClose:function(){this.opened&&this.poiHighlight(this.opened,!1),this.opened=null,wp.element.unmountComponentAtNode(this.div.iw.get(0)),this.iw.close(),this.renderDirections({isOpen:!1}),this.renderList(),this.onPoiClose&&this.onPoiClose()},poiHighlight:function(e,t){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.isEditable||(t?e.highlight(!0):e.highlight(!1))},poiHover:function(e){e&&this.opened==e||(this.hovered&&this.hovered!=this.opened&&(this.poiHighlight(this.hovered,!1),this.hovered=null),e&&(this.hovered=e,this.poiHighlight(this.hovered,!0),mappl10n.options.tooltips&&!this.isEditable?(this.poiClose(),this.poiOpen(e,null,"popup")):this.poiHighlight(e,!0)),this.renderList())},poiInsert:function(e){this.pois_.unshift(e),e.setMap(this),this.renderList()},poiOpen:function(e,t){if(this.poiClose(),this.query&&e.postid&&e.url&&!this.isEditable&&!mappl10n.options.tooltips)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(e.url);case"postnew":return void window.open(e.url);case"postmodal":const t=document.createElement("div");return document.body.appendChild(t),wp.element.render(w(v.MappPopupModal,{onClose:()=>{wp.element.unmountComponentAtNode(t),t.remove()},poi:e}),t)}this.div.layout.hasClass("mapp-view-mini")&&this.toggleSidebar(!1),this.popupOpen(e,t,"popup"),this.poiHighlight(e,!0),this.onPoiOpen&&this.onPoiOpen(e)},poiRemove:function(e){var t=k.inArray(e,this.pois_);-1!=t&&(this.pois_[t].setMap(null),this.pois_.splice(t,1),this.renderList())},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.isEditable||(this.iw.close(),this.renderDirections({isOpen:!1}),k(this).triggerHandler("mapp.close"))},popupOpen:function(e,t){let i=null;this.popupClose(),t&&t.featureData?i=t.featureData:t&&t.propagatedFrom&&t.propagatedFrom.feature&&t.propagatedFrom.feature.properties&&(i=t.propagatedFrom.feature.properties),this.isEditable||(wp.element.render(w(d.Z,{feature:i,poi:e,template:this.templates.popup,thumbs:mappl10n.options.thumbsPopup}),this.div.iw.get(0)),e.images&&e.images.length&&this.div.iw.addClass(" mapp-thumb-"+mappl10n.options.thumbsPopup));var n=this.clusterGetLatLng(e),s=n||e.getPosition(t);this.iw.open({position:s,anchorPoint:e.getAnchorPoint(t)}),this.opened=e},recenter:function(){var e=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,t=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(e&&!t&&this.query)return void this.doSearch({geometry:{location:{lat:e.lat,lng:e.lng}}});if(e)return void this.setView(e,t||1);if(0==this.pois_.length)return void this.setView({lat:0,lng:0},t||1);if(1==this.pois_.length)return void this.pois_[0].center(t);let i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds;for(var n=0;n<this.pois_.length;n++){var s=this.pois_[n].getBounds(),o=this.pois_[n].getPosition();i=s?"leaflet"==mappl10n.options.engine?i.extend(s):i.union(s):i.extend(o)}t?this.setView(i.getCenter().toJSON(),t):this.fitBounds(i)},render:function(){let e=this.name?this.name+"-layout":"",t="mapp-layout",i=this.layout&&window.parent==window?this.layout:"left";if(t+="left"==i?" mapp-list-left":" mapp-inline",t+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",t+=this.classname?" "+this.classname:"",!document.body.classList.contains("block-editor-page")){let e=this.alignment?this.alignment:mappl10n.options.alignment;if(e){let i=" align"+e+" mapp-align-"+e;window.parent==window?t+=i:k(window.frameElement).parent().parent().addClass(i)}}var n=o.mappLib.template("map",{map:this,layout:i});if(this.sel){if(this.div.layout=k(this.sel),this.div.layout.html(n),this.div.layout.addClass(t),this.div.layout.attr("id",e),!this.div.layout.length)return console.log("MapPress: Missing map name or container for map: "+this.name)}else{let i=k('<div id="'+e+'" class="'+t+'">');i.html(n);let s=k("#"+this.name+"-layout");if(!s.length)return console.log("MapPress: Missing map name or container for map: "+this.name);s.replaceWith(i),this.div.layout=i}k.each(["canvas","content","controls","directions","filters","header","list","menu","search","sidebar","wrapper"],((e,t)=>{this.div[t]=k(".mapp-"+t,this.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderDirections:function(e){let{isOpen:t,from:i,to:s}=e;if(this.toggleView("directions",t),t){const e=s?s.getAddress():"",t=i?i.getAddress():"";wp.element.render(w(n.MappDirections,{from:t,to:e,onClose:()=>{wp.element.unmountComponentAtNode(this.div.directions.get(0)),this.toggleView("directions",!1)}}),this.div.directions.get(0))}else this.div.directions.length&&wp.element.unmountComponentAtNode(this.div.directions.get(0))},renderFilters:function(){this.div.filters&&this.div.filters.length&&wp.element.render(w(s.MappFilters,{onFilterChange:e=>{this.filters=e,this.fetchPois()},poiCount:this.pagination.count}),this.div.filters.get(0))},renderList:function(){let e=[];if(!this.poiList)return;if(this.isEditable)e=this.pois_;else{let t=this.getBounds();t&&_.map(this.pois_,((i,n)=>{t.contains(i.getPosition())&&e.push(i)}))}this.pagination.count!=e.length&&(this.pagination.count=e.length,this.renderFilters());let t="mapp-list-component";!this.isEditable&&mappl10n.options.thumbsList&&(t+=" mapp-thumb-"+mappl10n.options.thumbsList);const i=e=>this.pois_.find((t=>t.id==e)),n=(e,t)=>{let i=_.findIndex(this.pois_,(t=>t.id==e)),n=_.findIndex(this.pois_,(e=>e.id==t));this.pois_.splice(n,0,this.pois_.splice(i,1)[0])};wp.element.render(w(f.MappPoiList,{bounds:this.getBounds(),className:t,hoveredPoi:this.hovered?this.hovered.id:null,isEditable:this.isEditable,isPaged:!!this.query,map:this,onClick:e=>this.poiOpen(i(e)),onDragDrop:e=>{let{from:t,to:i}=e;return n(t,i)},onHover:e=>this.poiHover(i(e)),onPage:e=>{this.pagination.page=e,this.renderList()},onSort:e=>{this.pois_=e,this.renderList()},openPoi:this.opened?this.opened.id:null,page:this.pagination.page,pageSize:20,pois:e,template:this.isEditable?null:this.templates.item}),this.div.list.get(0))},resetPois:function(){for(var e=0;e<this.pois_.length;e++)this.pois_[e].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():mapp.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){const e="<a href='"+mappl10n.options.adminurl+"/admin.php?page=mappress'>"+b("MapPress Settings")+"</a>",t="<a href ='http://mappresspro.com/mappress-faq' target='_blank'>"+b("MapPress FAQ")+"</a>",i="<a href='http://mappresspro.com/chris-contact', target='_blank'>"+b("contact support")+"</a>",n="<br/>"+sprintf(b("Please see the %s for help, or %s and provide this error message."),t,i),s=sprintf("<div class='mapp-errors-toolbar'><div class='mapp-errors-apikey'>%s</a></div>",b("Get an API Key"));this.div.layout.on("click",".mapp-errors-apikey",(()=>{window.open("https://mappresspro.com/how-to-get-a-google-maps-api-key")}));let o=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:b("Leaflet library not loaded"),text:b("A theme or plugin is preventing the Leaflet library from loading.")+n},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:b("Google Maps API not loaded"),text:b("A theme or plugin is preventing Google Maps from loading.")+n},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:b("Google Maps API key required"),text:sprintf(b("Please enter a Google Maps API key in the %s, or switch to Leaflet maps."),e)+s},{condition:k('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1,title:b("Google Maps API loaded multiple times"),text:b("A theme or plugin has loaded Google Maps twice")+n},{condition:"undefined"==typeof _,title:b("Underscore library not loaded"),text:b("A theme or plugin is preventing the underscore.js library from loading.")+n}];_.map(o,(e=>{if(e.condition){mappl10n.options.admin&&this.sanityOutput({title:e.title,text:e.text?e.text:""});let t=jQuery("<span>"+e.text.replace("<br/>","\n")+"</span>").text();console.error(b("Map error")+": "+e.title+" - "+t)}}))},sanityOutput(e){if(!k(".mapp-errors-overlay",this.div.content).length){let e="<div class='mapp-errors-overlay'></div><div class='mapp-errors'><div class='mapp-errors-header'>"+b("Oops! Something went wrong.")+"</div><div class='mapp-errors-list'></div></div>";this.div.content.prepend(e)}k(".mapp-errors-list",this.div.content).append("<div class='mapp-errors-title'>"+e.title+"</div><div class='mapp-errors-text'>"+e.text+"</div>")},set:function(e){for(let i in e){var t=e[i];switch(i){case"mapTypeId":this.mapTypeId=t,this.setMapTypeId(t);break;case"poiList":this.poiList=null==t?mappl10n.options.poiList:t,this.toggleSidebar(mappl10n.options.poiListOpen),this.toggleView("mini");break;case"search":this.search=t;break;case"style":this.setStyle(t);break;case"title":this.title=t;break;default:this[i]=t}}},setMapTypeId:function(e){const t=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),i=_.find(t,(t=>t.id==e));!mappl10n.options.style||"roadmap"!=e&&"streets"!=e&&i||(e=mappl10n.options.style);let n=_.find(t,(t=>t.id==e));n=n||t[0],this.setStyle(n)},setPois:function(e){if(this.resetPois(),e)for(var t=0;t<e.length;t++){var i=new mapp.Poi(e[t]);this.pois_.push(i),i.setMap(this)}this.clustersSet(),this.setLines()},setSize:function(e){var t=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];let i={},n={};if(e&&e.hasOwnProperty("width")&&(i={width:e.width?e.width:t.width}),e&&e.hasOwnProperty("height")){let i=e.height?e.height:t.height;n="string"==typeof i&&i.includes("%")?{"padding-bottom":i,height:"auto"}:{"padding-bottom":0,height:i}}window.frameElement&&window.frameElement.classList.contains("mapp-iframe")?(k(window.frameElement).parent().parent().css(i),k(window.frameElement).parent().css(n)):this.embed?(i={height:"100%"},n={"padding-bottom":0,height:"100%"}):(this.div.layout.css(i),this.div.wrapper.css(n)),this.resize()},setStyle:function(e){if("leaflet"==mappl10n.options.engine){let t={mapbox:{accessToken:mappl10n.options.mapbox,attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://www.mapbox.com/about/maps" target="_blank">&copy; Mapbox<a/>','<a href="https://www.openstreetmap.org/about/" target="_blank">&copy; OpenStreetMap</a>'],url:"https://api.mapbox.com/styles/v1/{user}/{mapboxid}/tiles/256/{z}/{x}/{y}{r}?access_token={accessToken}&fresh=true",zoomOffset:0},osm:{attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://openstreetmap.org" target="_blank">Map data (c) OpenStreetMap</a>'],url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}}[e.provider],i=k.extend({},t,e);L.tileLayer(t.url,i).addTo(this.map_)}else if(this.map_.setMapTypeId("standard"==e.type?e.id:"roadmap"),e.json){let t=null;try{t=JSON.parse(e.json)}catch(e){console.log("Invalid JSON in map style")}this.map_.setOptions({styles:t||null})}else this.map_.setOptions({styles:null})},setLines:function(){if(this.polyline&&("leaflet"==mappl10n.options.engine?this.polyline.remove():this.polyline.setMap(null),this.polyline=null),this.isEditable||!this.lines&&!mappl10n.options.lines||this.pois_.length<2)return;const e={...mappl10n.options.lineOpts},t=[];if(_.map(this.pois_,(e=>{t.push(e.getPosition())})),"leaflet"==mappl10n.options.engine)this.polyline=new L.Polyline(t,e).addTo(this.map_);else{const i={strokeColor:e.color,strokeWeight:e.weight,strokeOpacity:e.opacity};e.icons&&(_.map(e.icons,(e=>{e.icon.path=parseInt(e.icon.path)})),e.icons[0].repeat="50px"),this.polyline=new google.maps.Polyline({map:this.map_,path:t,...e,...i}),e.animate&&e.icons&&e.icons.length&&this.setLinesAnimation()}},setLinesAnimation:function(){let e=0;const t=this.polyline.get("icons");t[0].repeat.replace("%","").replace("px",""),window.setInterval((()=>{e+=1,t[0].offset=e+(t[0].repeat.indexOf("%")>=0?"%":"px"),this.polyline.set("icons",t)}),20)},setView:function(e,t,i){"leaflet"==mappl10n.options.engine?(null==t&&(t=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(e,t,i)):(e=e&&!e.toJSON?{lat:parseFloat(e.lat),lng:parseFloat(e.lng)}:e,t=t?parseInt(t):null,e&&this.map_.setCenter(e),t&&this.map_.setZoom(t))},spinner:function(e){this.div.layout.toggleClass("mapp-busy",e)},toggleLayer:function(e,t){t=void 0!==t?t:null==this.layers_[e].getMap(),k.each(["traffic","bicycling","transit"],((e,t)=>{this.layers_[t].setMap(null)})),t&&this.layers_[e].setMap(this.map_)},toggleSidebar:function(e){this.div.layout.toggleClass("mapp-sidebar-open",e),this.isSidebarOpen=e,setTimeout((()=>this.resize()),100)},togglePois:function(e){e=!!e;for(var t=0;t<this.pois_.length;t++)this.pois_[t].setVisible(e)},toggleView:function(e,t){if("mini"==e){let e=this.div.layout.hasClass("mapp-view-mini"),t=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",t),void(t!=e&&this.toggleSidebar(!t))}t=void 0===t?!this.div.layout.hasClass("mapp-view-"+e):t,this.div.layout.toggleClass("mapp-view-"+e,t),"list"==e&&t&&this.renderList(),"directions"==e&&this.resize()},toJSON:function(){this.pois=[];for(var e=0;e<this.pois_.length;e++)this.pois.push(this.pois_[e].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,search:this.search,title:this.title,width:this.width,zoom:this.zoom}}}},689:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.Infobox=function(t,i){this.map=t,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?t.getContainer():t.getDiv(),this.node=null,this.opts=_.extend({clip:!0,pan:!0},i),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null,this.wrapper=e('<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>'),i&&i.className&&this.wrapper.addClass(i.className),this.node=e(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?mapp.event.addListener(this.map,"move",(e=>{this.isOpen&&this.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=()=>{this.isOpen&&this.draw()}),this.node.get(0).addEventListener("load",(()=>{"leaflet"==mappl10n.options.engine?this.open({position:this.position,anchorPoint:this.anchorPoint}):mapp.event.addListenerOnce(this.map,"panend",(e=>{this.open({position:this.position,anchorPoint:this.anchorPoint})}))}),{capture:!0});var n="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();this.wrapper.appendTo(n),"leaflet"==mappl10n.options.engine&&t.on("load",(()=>{L.DomEvent.disableClickPropagation(this.wrapper.get(0))}))},mapp.Infobox.prototype={close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(document.fullscreenElement||this.map.isFullscreen)return;if(!this.position)return;let e,t,i;if(e=this.node.outerWidth(),t=this.node.outerHeight(),"leaflet"==mappl10n.options.engine)i=this.map.latLngToContainerPoint(this.position);else{const e=this.overlayView.getProjection();if(!e)return;i=e.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:i.x-e/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-i.y-this.anchorPoint.y})},getContent:function(){return e(".mapp-ib",this.node).get(0)},open:function(e){this.position=e.position,this.anchorPoint=e.anchorPoint?e.anchorPoint:{x:0,y:0},this.wrapper.addClass("mapp-open"),this.wrapper.css({left:0,bottom:0,width:"auto",height:"auto"});const t=this.wrapper.get(0).offsetWidth,i=this.wrapper.get(0).offsetHeight;this.wrapper.css({width:t,height:i}),"leaflet"==mappl10n.options.engine&&this.map.stop(),this.isOpen=!0,this.draw(),this.pan()},pan:function(){const t=this.node.outerWidth(),i=this.node.outerHeight(),n=e(this.mapDiv).width(),s=e(this.mapDiv).height();if("leaflet"==mappl10n.options.engine)var o=this.map.latLngToContainerPoint(this.position);else{var a=this.overlayView.getProjection();o=a?a.fromLatLngToContainerPixel(this.position):null}if(!o)return;var l={x:o.x,y:o.y};o.x+t/2+this.anchorPoint.x>n-this.fudge?l.x=Math.max(n-t/2-this.anchorPoint.x-this.fudge,n/2-this.anchorPoint.x):o.x-t/2+this.anchorPoint.x<this.fudge&&(l.x=Math.min(t/2+this.anchorPoint.x+this.fudge,n/2-this.anchorPoint.x)),o.y+this.anchorPoint.y-i<this.fudge&&(l.y=i-this.anchorPoint.y+this.fudge),l.y>=s&&(l.y=s-this.fudge);const p={x:o.x-l.x,y:o.y-l.y};p.x<=-1||p.x>=1||p.y<=-1||p.y>=1?"leaflet"==mappl10n.options.engine?this.map.panBy([p.x,p.y]):(mapp.event.addListenerOnce(this.map,"idle",(e=>{mapp.event.trigger(this.map,"panend")})),this.map.panBy(p.x,p.y)):mapp.event.trigger(this.map,"panend")},setContent:function(t){e(".mapp-ib",this.node).empty().append(t)}}},628:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.lib={template:function(t,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var n=mappl10n.options.templates?mappl10n.options.template[t]:e("#mapp-tmpl-"+t).html();if(!n)return"";mapp.lib.templates[t]=_.template(n,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return mapp.lib.templates[t](i)}},jQuery,mapp.event={addListener:function(e,t,i){t=t.split(" ");for(var n=0;n<t.length;n++)"leaflet"==mappl10n.options.engine?e.on(t[n],i):google.maps.event.addListener(e,t[n],i)},addListenerOnce:function(e,t,i){t=t.split(" ");for(var n=0;n<t.length;n++)"leaflet"==mappl10n.options.engine?e.once(t[n],i):google.maps.event.addListenerOnce(e,t[n],i)},clearInstanceListeners:function(e){"leaflet"==mappl10n.options.engine?e.off():google.maps.event.clearInstanceListeners(e)},clearListeners:function(e,t){t=t.split(" ");for(var i=0;i<t.length;i++)"leaflet"==mappl10n.options.engine?e.off(t[i]):google.maps.event.clearListeners(e,t[i])},trigger:function(e,t,i){"leaflet"==mappl10n.options.engine?e.fire(t,i):google.maps.event.trigger(e,t,i)}}},692:()=>{window.mapp=window.mapp||{},jQuery,mapp.load=function(){if("undefined"!=typeof mapp&&mapp.data)for(;mapp.data.length;){var e=mapp.data.pop();window[e.name]=new mapp.Map(e),window[e.name].display()}},mapp.load()},436:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.Marker=function(e){this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(e),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=()=>this.draw(),this.overlayView.onAdd=()=>this.onAdd(),this.overlayView.onRemove=()=>this.onRemove()},mapp.Marker.prototype={draw:function(){if(!this.div||!this.icon)return;let t=this.overlayView.getProjection();if(t){let i=t.fromLatLngToDivPixel(this.position),n=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};e(this.div).css({left:i.x-n.width/2,top:i.y-n.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(e){let t="on"+e.type[0].toUpperCase()+e.type.slice(1);this[t]&&this[t](e)},onAdd:function(){let t=this.overlayView.getPanes();t&&(this.div=e('<div class="mapp-marker">'),this.div.appendTo(t.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(()=>{(!this.dragging||this.dragging&&!this.dragging.moved)&&mapp.event.trigger(this,"click"),this.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable))},onMouseenter:function(e){mapp.event.trigger(this,"mouseover")},onMouseleave:function(e){mapp.event.trigger(this,"mouseout")},onPointerdown:function(e){const t=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:e.clientX,y:e.clientY},offset:{x:i.x-(e.clientX-t.left),y:i.y-(e.clientY-t.top)}},this.toggleDragEvents(!0)},onPointermove:function(e){if(Math.abs(e.clientX-this.dragging.startPixel.x)+Math.abs(e.clientY-this.dragging.startPixel.y)<3)return;const t=this.map.getDiv().getBoundingClientRect();let i={x:e.clientX-t.left+this.dragging.offset.x,y:e.clientY-t.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(e){this.onPointerup(e)},onPointerup:function(e){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(e,t){let i="set"+e[0].toUpperCase()+e.slice(1);this[i]&&this[i](t)},setDraggable:function(e){this.draggable=e,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),e&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(e){if(void 0!==e&&(this.icon=e),this.icon&&this.div){let e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);let t=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:t.width,height:t.height}),this.setZIndex(),this.draw()}},setMap:function(e){this.map=e,this.overlayView.setMap(e)},setPosition:function(e){this.position=e},setValues:function(e){for(const t in e)this.set(t,e[t])},setVisible:function(e){this.visible=e,this.div&&this.div.css("visibility",e?"visible":"hidden")},setZIndex:function(e){this.zIndex=void 0!==e?e:this.zIndex,this.div&&this.div.css("z-index",e)},toggleDragEvents(e){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),e&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},548:(e,t,i)=>{"use strict";i.r(t);var n=i(939);window.mapp=window.mapp||{};var s;s=jQuery,mapp.Poi=function(e){if(this.defaults={address:null,body:null,html:null,iconid:null,id:null,images:null,kml:null,map:null,overlay:null,postid:null,poly:null,props:null,title:"",url:null,type:null,viewport:null},s.extend(this,this.defaults,e),this.id=n.mappLib.nanoid(),e&&e.correctedAddress&&(this.address=e.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),!e.overlay)switch(this.type){case"polygon":this.overlay=new google.maps.Polygon({paths:e.poly.paths}),this.setColors(e.poly);break;case"polyline":this.overlay=new google.maps.Polyline({path:e.poly.path}),this.setColors(e.poly);break;case"circle":var t=new google.maps.LatLng(e.point.lat,e.point.lng);this.overlay=new google.maps.Circle({center:t,radius:parseFloat(e.poly.radius)}),this.setColors(e.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:mapp.poi.viewportToBounds(this.viewport)}),this.setColors(e.poly);break;case"kml":var i=e.kml&&e.kml.url?e.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(i):new google.maps.KmlLayer({url:i,preserveViewport:!0,suppressInfoWindows:!0});break;default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([e.point.lat,e.point.lng]):this.overlay=new mapp.Marker({position:new google.maps.LatLng(e.point.lat,e.point.lng)}),this.set({iconid:e.iconid})}},mapp.Poi.prototype={addEvents:function(){mapp.event.clearInstanceListeners(this.overlay),mapp.event.addListener(this.overlay,"click",(e=>{this.open(e)})),mapp.event.addListener(this.overlay,"mouseover",(e=>{this.map.poiHover(this)})),mapp.event.addListener(this.overlay,"mouseout",(e=>{this.map.poiHover(null)})),"kml"==this.type&&this.addKmlEvents(),this.map.isEditable&&(this.addPolyEditEvents(!0),this.map.isEditable&&mapp.event.addListener(this.overlay,"dragstart",(()=>{this.viewport=null,this.addPolyEditEvents(!1)})),mapp.event.addListener(this.overlay,"dragend",(()=>{this.updateFromOverlay(),this.addPolyEditEvents(!0)})))},addKmlEvents:function(){"leaflet"==mappl10n.options.engine?(mapp.event.addListenerOnce(this.overlay,"ready",(()=>{this.updateFromOverlay()})),mapp.event.addListenerOnce(this.overlay,"error",(()=>{alert(mappl10n.kml_error+" : "+this.kml.url)}))):(mapp.event.addListener(this.overlay,"defaultviewport_changed",(()=>{this.updateFromOverlay()})),mapp.event.addListener(this.overlay,"status_changed",(()=>{"OK"!=this.overlay.getStatus()&&alert(mappl10n.kml_error+" : "+this.kml.url)})))},addPolyEditEvents(e){this.isPoly()&&"google"==mappl10n.options.engine&&("rectangle"==this.type&&(mapp.event.clearListeners(this.overlay,"bounds_changed"),e&&mapp.event.addListener(this.overlay,"bounds_changed",(()=>{this.updateFromOverlay()}))),"circle"==this.type&&(mapp.event.clearListeners(this.overlay,"center_changed radius_changed"),e&&mapp.event.addListener(this.overlay,"center_changed radius_changed",(()=>{this.updateFromOverlay()}))),"polygon"!=this.type&&"polyline"!=this.type||(mapp.event.clearListeners(this.overlay,"rightclick"),mapp.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e&&(mapp.event.addListener(this.overlay,"rightclick",(e=>{null!=e.vertex&&this.overlay.getPath().getLength()>2&&(this.overlay.getPath().removeAt(e.vertex),this.updateFromOverlay())})),mapp.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(()=>{this.updateFromOverlay()})))))},center:function(e){var t=this.getBounds();if("number"!=typeof e)if(t){var i=t.getNorthEast().toJSON().lng-t.getSouthWest().toJSON().lng;i<0&&(i+=360),e=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),e,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),e)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(e){switch(this.isPoly()?"poly":this.type){case"kml":return e&&e.pixelOffset?{x:e.pixelOffset.width,y:e.pixelOffset.height}:{x:0,y:0};case"poly":return{x:0,y:0};default:return mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?{x:0,y:0-mappl10n.options.iconScale[1]}:{x:0,y:-32}}},getBounds:function(){var e;switch(this.type){case"polyline":e=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(t){e.extend(t)}));break;case"polygon":e=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(t){t.forEach((function(t){e.extend(t)}))}));break;case"rectangle":case"circle":e=this.overlay.getBounds();break;case"kml":e=(e="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||mapp.poi.viewportToBounds(this.viewport);break;default:return mapp.poi.viewportToBounds(this.viewport)}return e},getColors:function(){var e={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[t]&&(e[t]=this.overlay[t]);return e},getPosition:function(e){if(this.point)return"leaflet"==mappl10n.options.engine?L.latLng(this.point):new google.maps.LatLng(this.point.lat,this.point.lng);if("kml"==this.type&&e&&e.latLng)return e.latLng;const t=this.getBounds();return"leaflet"==mappl10n.options.engine?t&&t.isValid()?t.getCenter():new L.latLng(0,0):t?t.getCenter():new google.maps.LatLng(0,0)},highlight:function(e){if(!this.type){var t="leaflet"==mappl10n.options.engine?s(this.overlay._icon):this.overlay.getDiv();if(t){switch(this.map&&this.map.isEditable?"circle":mappl10n.options.highlight){case"circle":t.toggleClass("mapp-marker-circle",e);break;case"icon":var i=e?n.mappLib.getIcon(mappl10n.options.highlightIcon):n.mappLib.getIcon(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==i.options.iconUrl)return;this.overlay.setIcon(i);break;case"scale":t.addClass("mapp-marker"),t.toggleClass("mapp-marker-scale",e)}this.setZIndex(e?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(e){this.map.poiOpen(this,e)},set:function(e){for(var t in e){var i=e[t];"iconid"===t?this.type||(this.iconid=i,this.overlay.setIcon(n.mappLib.getIcon(i))):this[t]=i}},setColors:function(e){var t={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})e&&void 0!==e[i]&&(t[i]=e[i]);this.overlay.setOptions(t)},setEditable:function(e){"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=e:this.overlay.setDraggable(e),this.isPoly()&&this.overlay.setEditable(e))},setMap:function(e){this.map=e,null!=e?(this.setEditable(this.map.isEditable),this.addEvents(),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(e.getMap()):this.overlay.setMap(e.getMap()))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setVisible:function(e){void 0!==this.overlay.setVisible&&this.overlay.setVisible(e)},setZIndex:function(e){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(e):this.overlay.set("zIndex",e)},toJSON:function(){var e={address:this.address,body:this.body,iconid:this.iconid,images:this.images,point:this.point,title:this.title,type:this.type,viewport:this.viewport};return"kml"==this.type?e.kml=this.kml:this.isPoly()&&(e.poly=this.poly),e},updateFromOverlay(){_.extend(this,mapp.poi.parseOverlay(this.type,this.overlay))}},mapp.poi={boundsToViewport:function(e){return e?{sw:e.getSouthWest().toJSON(),ne:e.getNorthEast().toJSON()}:null},boundsCenterPoint:function(e){return e&&e.isValid()?e.getCenter().toJSON():{lat:0,lng:0}},pointToLatLng:function(e){return e?"leaflet"==mappl10n.options.engine?L.latLng(this.point):new google.maps.LatLng(e.lat,e.lng):null},viewportToBounds:function(e){return e&&e.sw&&e.ne?"leaflet"==mappl10n.options.engine?new L.LatLngBounds(L.latLng(e.sw.lat,e.sw.lng),L.latLng(e.ne.lat,e.ne.lng)):new google.maps.LatLngBounds(new google.maps.LatLng(e.sw.lat,e.sw.lng),new google.maps.LatLng(e.ne.lat,e.ne.lng)):null},parseOverlay:function(e,t){if("google"==mappl10n.options.engine){if("kml"==e){const e=t.getDefaultViewport();return{point:e?e.getCenter().toJSON():null,viewport:e?mapp.poi.boundsToViewport(e):null}}const i=t instanceof google.maps.Polyline?{strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,stokeWeight:t.strokeWeight}:{fillColor:t.fillColor,fillOpacity:t.fillOpacity,strokeColor:t.strokeColor,strokeOpacity:1,stokeWeight:t.strokeWeight};if("circle"==e)return{point:t.getCenter().toJSON(),poly:{radius:t.getRadius(),...i}};if("rectangle"==e)return{viewport:mapp.poi.boundsToViewport(t.getBounds()),poly:{...i}};if("polyline"==e){const e=[];return t.getPath().forEach((function(t){e.push(t.toJSON())})),{poly:{path:e,...i}}}if("polygon"==e){const e={fillColor:t.fillColor,fillOpacity:t.fillOpacity,strokeColor:t.strokeColor,strokeOpacity:1,stokeWeight:t.strokeWeight},i=[];return t.getPaths().forEach((function(e){var t=[];e.forEach((function(e){t.push(e.toJSON())})),i.push(t)})),{poly:{paths:i,...e}}}if(!e)return{point:t.getPosition().toJSON()}}else{if("kml"==e){const e=t.getBounds();return{point:e&&e.isValid()?e.getCenter().toJSON():null,viewport:e&&e.isValid()?mapp.poi.boundsToViewport(e):null}}if(!e)return{point:"leaflet"==mappl10n.options.engine?t.getLatLng().toJSON():t.getPosition().toJSON()}}}}}},t={};function i(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(117),i(715),i(817),i(10),i(326),i(939),i(27),i(818),i(615),i(892),i(628),i(283),i(689),i(436),i(548),i(692)})();
build/index_mappress_admin.js CHANGED
@@ -1 +1 @@
1
- (()=>{var e={939:(e,t,a)=>{"use strict";a.d(t,{mappLib:()=>c});wp.element.createElement;const{Fragment:o,useCallback:n,useEffect:i,useLayoutEffect:s,useMemo:l,useRef:r,useState:p}=wp.element,c={ajax:function(e){const t={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,a,o){"json"==e.dataType&&e.url==mappl10n.options.ajaxurl&&"OK"!=t.status&&c.alert(t.status),"json"==e.dataType&&t.output?c.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,o)},error:function(t,a,o){"cancel"!=a&&(void 0!==o&&""!=o&&c.alert("AJAX ERROR\r\nTextStatus="+a+"\r\nError="+o+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e={...t,...e},jQuery.ajax(e)},alert:function(e){mappl10n.options.admin||mappl10n.options.debug?alert(e):window.console&&console.error(e)},getIcon:function(e){{const t=this.getIconUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:t,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:t}}},getIconUrl:function(e){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"},nanoid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;const t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let a="",o=e;for(;o--;)a+=t[64*Math.random()|0];return a},template:function(e,t){if(c.templates=c.templates?c.templates:{},!c.templates[e]){var a=mappl10n.options.templates?mappl10n.options.template[e]:document.getElementById("mapp-tmpl-"+e).innerHTML;if(!a)return"";c.templates[e]=_.template(a,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return c.templates[e](t)}};"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})},27:(e,t,a)=>{"use strict";a.d(t,{MappPaginate:()=>p});const o=wp.element.createElement,{Fragment:n,useEffect:i,useLayoutEffect:s,useRef:l,useState:r}=wp.element,{sprintf}=wp.i18n;function p(e){function t(t,a){const o=Math.ceil(e.count/e.pageSize);switch(t){case"first":e.onChange(1);break;case"last":e.onChange(o);break;case"next":e.page<o&&e.onChange(e.page+1);break;case"prev":e.page>1&&e.onChange(e.page-1)}}return function(){const a=Math.ceil(e.count/e.pageSize),n=e.isBusy||e.page<=1,i=e.isBusy||e.page>=a,s=n?"mapp-paginate-button mapp-disabled":"mapp-paginate-button",l=i?"mapp-paginate-button mapp-disabled":"mapp-paginate-button";return o("div",{className:"mapp-paginate"},o("div",{className:s,onClick:()=>{n||t("first")}},"«"),o("div",{className:s,onClick:()=>{n||t("prev")}},"‹"),o("div",{className:"mapp-paginate-count"},sprintf((r="%d of %d",wp.i18n.__(r,"mappress-google-maps-for-wordpress")),e.page,a)),o("div",{className:l,onClick:()=>{i||t("next")}},"›"),o("div",{className:l,onClick:()=>{i||t("last")}},"»"));var r}()}},844:()=>{const e=wp.element.createElement,{Fragment:t,useEffect:a,useLayoutEffect:o,useRef:n,useState:i}=wp.element,{Button:s,Modal:l}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function r(t){const[o,n]=i({isOpen:!1,reason:"",reasonText:"",redirectUrl:null});function r(e){n((t=>({...t,...e})))}function p(e,t){switch(e){case"cancel":r({isOpen:!1});break;case"submit":r({isOpen:!1}),window.location.href=o.redirectUrl+"&mapp_reason="+o.reason+"&mapp_reason_text="+encodeURIComponent(o.reasonText.trim())}}return a((()=>{const e=jQuery("#deactivate-mappress-google-maps-for-wordpress");e.length&&(e.off("click.mapp"),e.on("click.mapp",(function(){return function(e){const t=e?jQuery(e).attr("href"):null;t&&r({isOpen:!0,redirectUrl:t})}(this),!1})))}),[]),o.isOpen?e(l,{isDismissible:!0,onRequestClose:()=>p("cancel"),shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,title:__("Feedback")},function(){const t=!o.reason||"other"==o.reason&&!o.reasonText;return sprintf("<a href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>",__("contact me")),e("div",{className:"mapp-deactivate"},e("div",{className:"mapp-deactivate-content"},e("h2",null,__("Sorry to see you go! Need help?"),e(s,{className:"mapp-deactivate-help",isSecondary:!0,href:"https://mappresspro.com/chris-contact",target:"_blank"},__("Contact me"))),e("h2",null,__("If not, I'd really appreciate some feedback:")),function(){const t=[{value:"badday",label:__("I'm just having a bad day")},{value:"notworking",label:__("The plugin isn't working"),placeholder:__("What didn't work? Was there an error message?")},{value:"toohard",label:__("Too hard to use"),placeholder:__("How can I make it easier?")},{value:"feature",label:__("Missing feature"),placeholder:__("What's missing?")},{value:"other",label:__("Other"),placeholder:__("Can you provide any details?")}];return e("div",{className:"mapp-deactivate-reasons"},_.map(t,(t=>{const a=t.value==o.reason;return e("div",{className:"mapp-deactivate-reason",key:t.value},e("label",null,e("input",{checked:a,onChange:e=>r({reason:e.target.value}),type:"radio",value:t.value}),t.label),a&&t.placeholder&&e("div",null,e("textarea",{onChange:e=>r({reasonText:e.target.value}),placeholder:t.placeholder,value:o.reasonText})))})))}()),e("div",{className:"mapp-deactivate-footer"},e(s,{isSecondary:!0,disabled:t,onClick:()=>p("submit")},__("Deactivate")),e(s,{isPrimary:!0,onClick:()=>p("cancel")},__("Cancel"))))}()):null}jQuery(document).ready((function(){const t=jQuery("<div></div>").appendTo("body").get(0);wp.element.render(e(r),t)}))},215:(e,t,a)=>{"use strict";a.r(t);var o=a(123),n=a(805);window.mapp=window.mapp||{};const i=wp.element.createElement;var s;s=jQuery,mapp.Editor=function(e){this.drawingManager=null,this.map=e,this.poiEditor=null;var t=this;this.initialize=function(){this.map.display(),this.poiEditor=new mapp.PoiEditor(this.map),this.initDrawingManager(),this.map.onSearch=e=>{this.insert(e)}},this.insert=function(e){if(e)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.poiClose(),e.geometry){var a=e.formatted_address?e.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,o=e.name==a?"":a,n=new mapp.Poi({address:a,body:o,iconid:this.poiEditor.lastIcon,point:e.geometry.location,title:e.name,viewport:e.geometry.viewport?e.geometry.viewport:null});this.map.poiInsert(n),n.center()}else e.overlay?(this.map.poiHover(null),"marker"==e.type?(n=new mapp.Poi({body:"",iconid:null,overlay:null,point:e.overlay.getPosition().toJSON(),title:e.overlay.getPosition().toUrlValue(6),type:null}),e.overlay.setMap(null)):n=new mapp.Poi({body:"",iconid:null,overlay:e.overlay,title:mappl10n.shape,type:e.type}),this.map.poiInsert(n)):"string"==typeof e&&"http"==e.substring(0,4)&&(n=new mapp.Poi({iconid:this.poiEditor.lastIcon,kml:{url:e},title:"KML",type:"kml"}),t.map.poiInsert(n),mapp.event.addListenerOnce(n.overlay,"ready defaultviewport_changed",(function(){n.center()})))},this.initDrawingManager=function(){var e={fillColor:"#0000FF",fillOpacity:.4,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2};"leaflet"==mappl10n.options.engine||google.maps.drawing&&(this.drawingManager=new google.maps.drawing.DrawingManager({drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},circleOptions:e,polygonOptions:e,polylineOptions:e,rectangleOptions:e}),this.drawingManager.setMap(this.map.getMap()),mapp.event.addListener(this.drawingManager,"overlaycomplete",(function(e){t.drawingManager.get("drawingMode")&&t.insert(e)})))},this.initialize.apply(this)},mapp.PoiEditor=function(e){this.map=e,this.poi=null,this.sel=null,this.lastIcon=null;var t=this;this.initialize=function(){this.sel=s(this.map.iw.getContent()),s(this.map).on("mapp.open",(function(e,a){t.render(a)})),s(this.map).on("mapp.close",(function(){t.mce(!1)})),this.sel.on("click","[data-mapp-poi]",(function(e){e.preventDefault();var a=s(this).attr("data-mapp-poi");t[a]()})),this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",(function(e){var a=s(this).hasClass("mapp-poi-visual");t.mce(a)})),this.sel.on("keydown",(function(e){13==e.which&&"mapp-poi-body"!=e.target.id&&(e.preventDefault(),t.save())}))},this.cancel=function(){this.map.poiClose()},this.initMCE=function(){if("undefined"!=typeof tinyMCE&&void 0!==tinyMCE.init){var e="en";if(void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit&&void 0!==window.tinyMCEPreInit.mceInit.content){var t=window.tinyMCEPreInit.mceInit.content;e=void 0!==t.language?t.language:"en"}var a={mode:"none",height:"100%",convert_urls:!1,language:e,menubar:!1,plugins:"image,paste,textcolor,wordpress,wpeditimage,wplink,wpview",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(a),this.mce(!0)}},this.mce=function(e){var a=e?"mceAddEditor":"mceRemoveEditor";"undefined"!=typeof tinyMCE&&tinyMCE.execCommand(a,!1,"mapp-poi-body"),s(".mapp-poi-visual, .mapp-poi-html",t.sel).removeClass("mapp-active"),e?s(".mapp-poi-visual",t.sel).addClass("mapp-active"):s(".mapp-poi-html",t.sel).addClass("mapp-active")},this.remove=function(){confirm(mappl10n.delete_prompt)&&(this.map.poiClose(),this.map.poiRemove(this.poi))},this.render=function(e){this.poi=e,this.renderColorPicker(this.poi),this.renderIconPicker(this.poi),this.initMCE()},this.renderColorPicker=function(e){document.getElementById("mapp-poi-colorpicker")&&wp.element.render(i(o.MappColorPicker,{...e.getTemplateColors(),isExtended:!0,onChange:t=>{e.set({dirty:!0}),e.setTemplateColors(t),this.map.renderList(),this.renderColorPicker(e)}}),document.getElementById("mapp-poi-colorpicker"))},this.renderIconPicker=function(e){document.getElementById("mapp-poi-iconpicker")&&wp.element.render(i(n.MappIconPicker,{iconid:e.iconid,onChange:t=>{e.set({dirty:!0,iconid:t}),this.lastIcon=t,this.map.renderList(),this.renderIconPicker(e)}}),document.getElementById("mapp-poi-iconpicker"))},this.save=function(){"undefined"!=typeof tinyMCE&&tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save(),this.poi.set({dirty:!0,title:s(".mapp-poi-title").val(),body:s(".mapp-poi-body").val()}),this.map.renderList(),this.map.poiClose()},this.initialize.apply(this)}},713:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappAttachControl:()=>d});const o=wp.element.createElement,{addQueryArgs:n}=wp.url,{useCallback:i,useEffect:s,useState:l}=wp.element,{Button:r,Dropdown:p,Spinner:c,TextControl:m}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function d(e){const[t,a]=l({isFetching:!1,results:[],search:"",searchTerm:""});function r(e){a((t=>({...t,...e})))}s((()=>{t.isOpen&&(r({isFetching:!0}),wp.apiFetch({path:n("/wp/v2/search",{search:t.search,per_page:20})}).then((e=>{r({results:e,isFetching:!1})})))}),[t.search,t.isOpen]);const d=i(_.debounce((function(e){r({search:e})}),1e3),[]);function u(a,n){return o("div",{className:"mapp-attach-control"},o("div",{className:"mapp-attach-control-toolbar"},o(m,{autoComplete:"false",value:t.searchTerm,onChange:e=>{r({searchTerm:e}),d(e)},placeholder:__("Search")})),function(){if(t.isFetching)return o(c,null);if(t.results)return t.results.length?o("div",{className:"mapp-attach-items"},t.results.map((t=>o("div",{key:t.id,className:"mapp-attach-item",onClick:()=>{e.onChange(t.id,t.title)}},o("div",{className:"mapp-attach-item-title"},t.title?t.title:__("Untitled")),o("div",{className:"mapp-attach-item-type"},t.subtype))))):o("div",{},__("No posts found"))}())}return o("div",{onClick:e=>e.stopPropagation()},o(p,{onToggle:e=>r({isOpen:e}),renderToggle:e=>{let{isOpen:t,onToggle:a}=e;return o("a",{href:"#",onClick:a},__("Attach"))},renderContent:e=>{let{isOpen:t,onToggle:a}=e;return u()}}))}},371:(e,t,a)=>{"use strict";a.r(t);var o=a(477);window.mapp=window.mapp||{};const n=wp.element.createElement,{Fragment:i,useEffect:s,useLayoutEffect:l,useRef:r,useState:p}=wp.element,{Button:c,Dashicon:m,Modal:d}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function u(e){const[t,a]=p({isOpen:!0,mapid:null});function s(e){a((t=>({...t,...e})))}function l(){const e="undefined"!=typeof tinyMCE&&tinyMCE?tinyMCE.get("content"):null,t=e&&e.selection?e.selection.getSel():null;if(!t||void 0===t.anchorOffset||!t.anchorNode||!t.anchorNode.data)return null;let a=null,o=t.anchorNode.data,n=-1;for(let e=t.anchorOffset-1;e>=0;e--){let t=o[e];if("["==t){n=e;break}if("]"==t||"<"==t||">"==t)break}return n>=0&&(a=wp.shortcode.next("mappress",o,n),a)?a.shortcode.attrs.named.mapid:null}return n(i,null,n("button",{className:"button",type:"button",onClick:e=>{e.preventDefault(),s({isOpen:!0,mapid:l()})}},n(m,{className:"wp-media-buttons-icon",icon:"location"}),__("MapPress")),t.isOpen&&n(o.default,{context:"mce",mapid:t.mapid,onClose:()=>{s({isOpen:!1,mapid:null})},onInsert:e=>function(e){s({isOpen:!1});var t='[mappress mapid="'+e+'"]';"undefined"==typeof wpActiveEditor?__("Please select the post content to insert the map into."):send_to_editor(t)}(e)}))}jQuery(document).on("click",".mapp-classic-button",(e=>{const t=e.currentTarget.parentElement;wp.element.render(n(u),t)}))},123:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappColorPicker:()=>M});var o=a(824);const n=wp.element.createElement,{Fragment:i,useEffect:s,useLayoutEffect:l,useCallback:r,useRef:p,useState:c}=wp.element,{useSelect:m}=wp.data,{withState:d}=wp.compose,{Button:u,ColorPalette:h,ColorPicker:g,Dashicon:f,Dropdown:b,ExternalLink:y,Modal:v,Panel:k,PanelBody:w,PanelRow:C,Popover:x,RadioControl:N,Spinner:S,TabPanel:O}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function M(e){e={isExtended:null,onChange:null,color:null,opacity:null,weight:null,...e};const[t,a]=c({color:e.color,isCustomOpen:!1,isOpen:!1,opacity:e.opacity?e.opacity:1,weight:e.weight?e.weight:2});function l(e){a((t=>({...t,...e})))}function r(){l({isOpen:!1})}function p(a){l({color:a,isOpen:!1}),e.onChange({color:a,opacity:t.opacity,weight:t.weight})}return s((()=>{}),[]),n(i,null,n("span",{className:"mapp-colors-toggle",onClick:()=>{l({isOpen:!0})},style:{backgroundColor:e.color,border:e.isExtended?"1px solid "+e.color:"1px solid gray",opacity:e.isExtended&&e.opacity?e.opacity:1},tabIndex:0}),function(){if(!t.isOpen)return null;const a=_.map([1,.9,.8,.7,.6,.5,.4,.3,.2,.1,0],(e=>({label:100*e+"%",value:e}))),i=_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],(e=>({label:e+"px",value:e})));return n(v,{title:__("Select a color"),className:"mapp-colors-modal",onRequestClose:()=>r()},n("div",{className:"mapp-colors"},n("div",{className:"mapp-colors-list"},_.map([["yellow","yellowgreen","green","seagreen","blue","cornflowerblue","darkslateblue","purple","firebrick","red","darkorange","orange","saddlebrown"],["lightyellow","greenyellow","lightgreen","darkseagreen","lightblue","skyblue","slateblue","orchid","plum","pink","sandybrown","goldenrod","peru"],["white","lightgray","gray","black"]],((t,a)=>n("div",{key:a},_.map(t,(t=>n("span",{className:"mapp-color"+(t==e.color?" mapp-selected":""),key:t,onClick:()=>{l({isCustomOpen:!1}),p(t)},style:{backgroundColor:t},title:t}))))))),t.isCustomOpen&&n(g,{color:e.color,onChangeComplete:e=>p(e.hex),disableAlpha:!0}),e.isExtended&&n(o.Select,{label:__("Opacity"),options:a,value:t.opacity,onChange:a=>{return l({opacity:o=a}),void e.onChange({color:t.color,opacity:o,weight:t.weight});var o}}),e.isExtended&&n(o.Select,{label:__("Stroke"),options:i,value:e.weight?e.weight:"",onChange:a=>{return l({weight:o=a}),void e.onChange({color:t.color,opacity:t.opacity,weight:o});var o}}),n("div",{className:"mapp-colors-toolbar"},n(u,{isPrimary:!0,onClick:()=>r()},__("Done")),n(u,{onClick:()=>l({isCustomOpen:!t.isCustomOpen})},__("Custom color")))))}())}},521:(e,t,a)=>{"use strict";a.r(t);var o=a(477);wp&&wp.plugins&&wp.plugins.registerPlugin&&wp.editPost&&wp.plugins.registerPlugin("mappress-document-settings-panel",{render:function(){const{PluginDocumentSettingPanel:e}=wp.editPost,t=wp.element.createElement,{Fragment:a,useEffect:n,useLayoutEffect:i,useRef:s,useState:l}=wp.element,{Button:r,Spinner:p}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),[c,m]=l({isFetchingItems:!0,isPickerOpen:!1,items:null,pickerMapid:null,pickerMode:"list"});function d(e){m((t=>({...t,...e})))}function u(e){let a=e.title?e.title:__("Untitled");return t("div",{className:"mapp-document-item",key:e.mapid+e.postid},t("a",{className:"mapp-document-col-title",href:"#",onClick:t=>{d({isPickerOpen:!0,pickerMapid:e.mapid,pickerMode:"edit"})}},a),t("div",{className:"mapp-document-col-mapid"},e.mapid))}return n((()=>{const e=e=>{d({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return mapp.store.subscribe(e),()=>mapp.store.unsubscribe(e)})),n((()=>{mapp.store.fetchItems()}),[]),t(e,{title:"MapPress",className:"mapp-document-panel"},function(){const e=_.filter(c.items,(e=>e.postid==mappl10n.options.postid));let o;return o=c.isFetchingItems?t(p,null):e.length?t(a,null,t("div",{className:"mapp-document-header"},t("div",{className:"mapp-document-col-title"},__("Map title")),t("div",{className:"mapp-document-col-mapid"},null,__("Map ID"))),_.map(e,u)):t("div",{className:"mapp-document-message"},__("No maps found")),t("div",null,t("div",{className:"mapp-document-list"},o))}(),t(r,{icon:"portfolio",isSecondary:!0,onClick:()=>{d({isPickerOpen:!0,pickerMode:"list"})}},__("Open map library")),function(){if(c.isPickerOpen)return t(o.default,{mapid:c.pickerMapid,mode:c.pickerMode,onClose:()=>{d({isPickerOpen:!1,pickerMapid:null})},onInsert:e=>function(e){const t=wp.blocks.createBlock("mappress/map",{mapid:e});wp.data.dispatch("core/block-editor").insertBlock(t,0),d({isPickerOpen:!1,pickerMapid:null})}(e)})}())},icon:null})},191:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappEdit:()=>z});var o=a(123),n=a(805);window.mapp=window.mapp||{};const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useRef:p,useState:c}=wp.element,{Button:m,TextControl:d}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function u(e){e={poi:null,onChange:null,onClose:null,onDelete:null,onSave:null,...e};const t="mapp-poi-body",a=p(null),[r,d]=c({kml:null,title:e.poi.title,isVisual:!0});function u(e){d((t=>({...t,...e})))}function _(e){e?tinyMCE.execCommand("mceAddEditor",!1,t):tinyMCE.execCommand("mceRemoveEditor",!1,t)}function h(){return["circle","polyline","polygon","rectangle"].includes(e.poi.type)}function g(){e.onChange({body:tinymce&&tinymce.get(t)?tinymce.get(t).getContent():a.current.value,kml:r.kml,title:r.title}),e.onClose()}return l((()=>(function(){if("undefined"==typeof tinyMCE||void 0===tinyMCE.init)return;var e="en";if(void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit&&void 0!==window.tinyMCEPreInit.mceInit.content){var t=window.tinyMCEPreInit.mceInit.content;e=void 0!==t.language?t.language:"en"}var a={mode:"none",height:"100%",convert_urls:!1,language:e,menubar:!1,plugins:"image,paste,textcolor,wordpress,wpeditimage,wplink,wpview",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(a)}(),()=>{_(!1)})),[]),l((()=>{r.isVisual?_(!0):_(!1)}),[r.isVisual]),i(s,null,i("div",{className:"mapp-poi-header"},i("input",{className:"mapp-poi-title",value:r.title,onChange:e=>{u({title:e.target.value})},onKeyDown:e=>function(e){13==e.keyCode&&(g(),e.stopPropagation(),e.preventDefault())}(e)}),h(r.type)?null:i(n.MappIconPicker,{iconid:e.poi.iconid,onChange:t=>{e.onChange({iconid:t})}}),function(){var t,a,n,s,l,r;const p=e.poi;return h(p.type)?i(o.MappColorPicker,{color:"polyline"==p.type?null===(t=p.poly)||void 0===t?void 0:t.strokeColor:null===(a=p.poly)||void 0===a?void 0:a.fillColor,opacity:"polyline"==p.type?null===(n=p.poly)||void 0===n?void 0:n.strokeOpacity:null===(s=p.poly)||void 0===s?void 0:s.fillOpacity,weight:"polyline"==p.type?null===(l=p.poly)||void 0===l?void 0:l.strokeWeight:null===(r=p.poly)||void 0===r?void 0:r.strokeWeight,isExtended:!0,onChange:t=>{let{color:a,opacity:o,weight:n}=t;const i="polyline"==e.poi.type?{strokeColor:a,strokeOpacity:o,strokeWeight:n}:{fillColor:a,fillOpacity:o,strokeColor:a,strokeWeight:n,strokeOpacity:1};e.onChange({poly:{...e.poi.poly,...i}}),e.poi.setColors(i)}}):null}()),"kml"==r.type&&i("div",{className:"mapp-poi-kml"},i("input",{className:"mapp-poi-url",value:null===(f=r.kml)||void 0===f?void 0:f.url,onChange:e=>{u({kml:{kml:{url:e.target.vallue}}})}})),function(){const o="mapp-mce-visual"+(r.isVisual?" mapp-active":""),n="mapp-mce-html"+(r.isVisual?"":" mapp-active");return i(s,null,i("div",{className:"mapp-mce-toolbar"},i("div",{className:"mapp-mce-tabs"},i("a",{className:o,onClick:()=>u({isVisual:!0})},__("Visual"))," | ",i("a",{className:n,onClick:()=>u({isVisual:!1})},__("HTML"))),i("a",{href:"#",className:"insert-media add_media","data-editor":t},__("Add Media"))),i("div",{className:"mapp-mce-main"},i("textarea",{defaultValue:e.poi.body,id:t,ref:a,style:{height:"100%"}})))}(),i("div",{className:"mapp-poi-toolbar"},i("div",null,i(m,{isPrimary:!0,onClick:()=>g()},__("Save")),i(m,{isSecondary:!0,onClick:()=>e.onClose()},__("Cancel"))),i(m,{isDestructive:!0,onClick:()=>e.onDelete()},__("Delete"))));var f}var _=a(939),h=a(429),g=a(710);window.mapp=window.mapp||{};const f=wp.element.createElement,{Fragment:b,useEffect:y,useLayoutEffect:v,useRef:k,useState:w}=wp.element,{Button:C,Dropdown:x,Modal:N,Panel:S,PanelBody:O,Popover:M,Spinner:I,TextControl:P}=wp.components,E=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function z(e){e={context:null,mapid:null,onClose:null,onSave:null,...e};const[t,a]=w({isBusy:!1,map:null,mapdata:null,poi:null}),o=k(null);function n(e){a((t=>({...t,...e})))}function i(e){n({map:t.map})}function s(e){let a={...mapp.poi.parseOverlay(e.overlay),body:"",iconid:t.lastIcon,type:"marker"==e.type?null:e.type,title:"marker"==e.type?e.overlay.position.toUrlValue():mappl10n.shape},o=new mapp.Poi(a);e.overlay.setMap(null),t.map.poiInsert(o)}function l(e){t.poi.set(e),t.map.renderList(),e.iconid&&n({lastIcon:e.iconid}),n({poi:t.poi})}function r(){v(),n({poi:null})}function p(){confirm(mappl10n.delete_prompt)&&(t.map.poiRemove(t.poi),t.map.poiClose(),n({poi:null}))}function c(e){n({poi:e})}function m(){mapp.store.saveMap(t.map.toJSON(),(t=>{v(),e.onSave(t)}))}function d(e){if(e.geometry){const a=e.formatted_address?e.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,o=e.name==a?"":a,n=new mapp.Poi({id:_.mappLib.nanoid(),address:a,body:o,iconid:t.lastIcon,point:e.geometry.location,title:e.name,viewport:e.geometry.viewport?e.geometry.viewport:null});t.map.poiInsert(n),n.center()}else if("string"==typeof e&&"http"==e.substring(0,4)){var a=new mapp.Poi({iconid:t.lastIcon,kml:{url:e},title:"KML",type:"kml"});t.map.poiInsert(a),mappEvent.addListenerOnce(a.overlay,"ready defaultviewport_changed",(function(){a.center()}))}}function b(e){t.map.set(e),n({map:t.map})}function v(){if(t.map){const e=t.map.iw.getContent();wp.element.unmountComponentAtNode(e)}}return y((()=>{t.map&&(t.map.onDrawingEvent=s,t.map.onPoiOpen=c,t.map.onPoiClose=r,t.map.onSearch=d),function(){if(!t.map)return null;const e=t.map.iw.getContent();t.poi&&e&&wp.element.render(f(u,{onClose:()=>t.map.poiClose(),onDelete:p,onChange:l,poi:t.poi}),e)}()})),y((()=>{t.map&&(jQuery(t.map.div.layout).off("mapp.render",i),jQuery(t.map.div.layout).on("mapp.render",(e=>i())))}),[t.map]),y((()=>{const t=t=>{n({isBusy:t.isSavingMap,mapdata:t.maps[e.mapid]})};return mapp.store.subscribe(t),()=>mapp.store.unsubscribe(t)})),y((()=>{!function(){if("mce"!=e.context&&"library"!=e.context)return null;if(!t.map)return null;const{center:a,height:o,poiList:n,search:i,width:s,zoom:l}=t.map,r=document.querySelector(".mapp-settings-container");r&&wp.element.render(f(h.MappSettings,{map:t.map,context:e.context,onChange:e=>b(e),center:a,height:o,poiList:n,search:i,width:s,zoom:l}),r)}()})),y((()=>{e.mapid?mapp.store.fetchMap(e.mapid):n({mapdata:{}})}),[e.mapid]),y((()=>{if(!t.mapdata)return;let a={embed:!0,isEditable:!0,layout:"left",mapOpts:{streetViewControl:!1},menu:!1,name:"media-map",poiList:!0,sel:jQuery(o.current)};"map"!=e.context&&"mashup"!=e.context||(a.center=null,a.zoom=null);const i=new mapp.Map(t.mapdata,a);i.display(),n({map:i})}),[t.mapdata]),f("div",{className:"mapp-edit"},function(){let e=t.map&&t.map.title?t.map.title:"",a=t.map&&!t.isFetchingMap?E("Untitled"):"";return f("div",{className:"mapp-gt-modal-header"},f(P,{className:"mapp-edit-title",placeholder:a,value:e,onChange:e=>function(e){t.map.set({title:e}),n({map:t.map})}(e),onKeyDown:e=>function(e){13==e.keyCode&&(m(),e.stopPropagation(),e.preventDefault())}(e)}))}(),f("div",{className:"mapp-edit-main"},f("div",{className:"mapp-edit-map",key:e.mapid,ref:o,onKeyDown:e=>e.stopPropagation(),tabIndex:-1}),o.current&&t.map?f(g.m,{map:t.map,selected:t.map.mapTypeId,onChange:e=>b({mapTypeId:e})}):null),f("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:e=>e.stopPropagation()},f(C,{isPrimary:!0,isBusy:t.isBusy,onClick:()=>m()},E("Save")),f(C,{isSecondary:!0,disabled:t.isBusy,onClick:()=>(v(),void e.onClose())},E("Cancel"))))}},805:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappIconPicker:()=>M});var o=a(939),n=a(123),i=a(824);const s=wp.element.createElement,{Fragment:l,useEffect:r,useLayoutEffect:p,useCallback:c,useRef:m,useState:d}=wp.element,{useSelect:u}=wp.data,{withState:h}=wp.compose,{Button:g,ColorPicker:f,DropZone:b,DropZoneProvider:y,FormFileUpload:v,Modal:k,Popover:w,RangeControl:C,Spinner:x,TabPanel:N}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),S=[{id:"mapp-shapes",fontFamily:"Marker Shapes",glyphs:[{name:"circle",center:[16,16]},{name:"widepin",center:[16,14]},{name:"route",center:[16,16]},{name:"shield",center:[16,16]},{name:"squarepin",center:[16,15]},{name:"square",center:[16,16]},{name:"squarerounded",center:[16,16]},{name:"roundpin",center:[16,13]},{name:"pin",center:null},{name:"pindot",center:null}]}],O=[{id:"mapp-icons",className:"mapp-marker-icons",filePrefix:"mp",fontFamily:"Marker Icons",label:"Map icons",glyphs:["airport","amusement-park","aquarium","archery","art-gallery","assistive-listening","atm","audio-description","bakery","bank","bar","baseball","beauty-salon","bicycle-store","bicycling","boat-ramp","boat-tour","boating","book-store","bowling-alley","braille","bus-station","cafe","campground","canoe","car-dealer","car-rental","car-repair","car-wash","casino","cemetery","chairlift","church","city-hall","closed-captioning","clothing-store","compass","convenience-store","courthouse","cross-country-skiing","crosshairs","dentist","department-store","diving","doctor","electrician","electronics-store","embassy","expand","female","finance","fire-station","fish-cleaning","fishing-pier","fishing","florist","food","fullscreen","funeral-home","furniture-store","gas-station","contractor","golf","grocery","gym","hair-care","hang-gliding","hardware-store","health","hindu-temple","horse-riding","hospital","ice-fishing","ice-skating","inline-skating","insurance-agency","jet-skiing","jewelry-store","kayaking","laundry","lawyer","library","liquor-store","local-government","location-arrow","locksmith","lodging","low-vision-access","male","marina","mosque","motobike-trail","movie-rental","movie-theater","moving-company","museum","natural-feature","night-club","open-captioning","painter","park","parking","pet-store","pharmacy","physiotherapist","place-of-worship","playground","plumber","point-of-interest","police","political","post-box","post-office","rafting","real-estate-agency","restaurant","roofing-contractor","route","rv-park","sailing","school","scuba-diving","search","shopping-mall","sign-language","skateboarding","ski-jumping","skiing","sledding","snow-shoeing","snow","snowboarding","snowmobile","spa","stadium","storage","store","subway-station","surfing","swimming","synagogue","taxi-stand","tennis","toilet","trail-walking","train-station","transit-station","travel-agency","unisex","university","veterinary-care","viewing","volume-control-telephone","walking","waterskiing","whale-watching","wheelchair","wind-surfing","zoo"]},{id:"material-icons",className:"material-icons",filePrefix:"mi",fontFamily:"Material Icons",label:"Material Icons",glyphs:["ac_unit","access_alarm","access_alarms","access_time","access_time_filled","accessibility","accessibility_new","accessible","accessible_forward","account_balance","account_balance_wallet","account_box","account_circle","account_tree","ad_units","adb","add","add_a_photo","add_alarm","add_alert","add_box","add_business","add_chart","add_circle","add_circle_outline","add_comment","add_ic_call","add_link","add_location","add_location_alt","add_moderator","add_photo_alternate","add_reaction","add_road","add_shopping_cart","add_task","add_to_drive","add_to_home_screen","add_to_photos","add_to_queue","addchart","adjust","admin_panel_settings","ads_click","agriculture","air","airline_seat_flat","airline_seat_flat_angled","airline_seat_individual_suite","airline_seat_legroom_extra","airline_seat_legroom_normal","airline_seat_legroom_reduced","airline_seat_recline_extra","airline_seat_recline_normal","airplane_ticket","airplanemode_active","airplanemode_inactive","airplanemode_off","airplanemode_on","airplay","airport_shuttle","alarm","alarm_add","alarm_off","alarm_on","album","align_horizontal_center","align_horizontal_left","align_horizontal_right","align_vertical_bottom","align_vertical_center","align_vertical_top","all_inbox","all_inclusive","all_out","alt_route","alternate_email","amp_stories","analytics","anchor","android","animation","announcement","aod","apartment","api","app_blocking","app_registration","app_settings_alt","approval","apps","architecture","archive","area_chart","arrow_back","arrow_back_ios","arrow_back_ios_new","arrow_circle_down","arrow_circle_up","arrow_downward","arrow_drop_down","arrow_drop_down_circle","arrow_drop_up","arrow_forward","arrow_forward_ios","arrow_left","arrow_right","arrow_right_alt","arrow_upward","art_track","article","aspect_ratio","assessment","assignment","assignment_ind","assignment_late","assignment_return","assignment_returned","assignment_turned_in","assistant","assistant_direction","assistant_photo","atm","attach_email","attach_file","attach_money","attachment","attractions","attribution","audiotrack","auto_awesome","auto_awesome_mosaic","auto_awesome_motion","auto_delete","auto_fix_high","auto_fix_normal","auto_fix_off","auto_graph","auto_stories","autofps_select","autorenew","av_timer","baby_changing_station","back_hand","backpack","backspace","backup","backup_table","badge","bakery_dining","balcony","ballot","bar_chart","batch_prediction","bathroom","bathtub","battery_alert","battery_charging_full","battery_full","battery_saver","battery_std","battery_unknown","beach_access","bed","bedroom_baby","bedroom_child","bedroom_parent","bedtime","beenhere","bento","bike_scooter","biotech","blender","block","bloodtype","bluetooth","bluetooth_audio","bluetooth_connected","bluetooth_disabled","bluetooth_drive","bluetooth_searching","blur_circular","blur_linear","blur_off","blur_on","bolt","book","book_online","bookmark","bookmark_add","bookmark_added","bookmark_border","bookmark_outline","bookmark_remove","bookmarks","border_all","border_bottom","border_clear","border_color","border_horizontal","border_inner","border_left","border_outer","border_right","border_style","border_top","border_vertical","branding_watermark","breakfast_dining","brightness_1","brightness_2","brightness_3","brightness_4","brightness_5","brightness_6","brightness_7","brightness_auto","brightness_high","brightness_low","brightness_medium","broken_image","browser_not_supported","brunch_dining","brush","bubble_chart","bug_report","build","build_circle","bungalow","burst_mode","bus_alert","business","business_center","cabin","cable","cached","cake","calculate","calendar_today","calendar_view_day","calendar_view_month","calendar_view_week","call","call_end","call_made","call_merge","call_missed","call_missed_outgoing","call_received","call_split","call_to_action","camera","camera_alt","camera_enhance","camera_front","camera_indoor","camera_outdoor","camera_rear","camera_roll","cameraswitch","campaign","cancel","cancel_presentation","cancel_schedule_send","car_rental","car_repair","card_giftcard","card_membership","card_travel","carpenter","cases","casino","cast","cast_connected","cast_for_education","catching_pokemon","category","celebration","cell_wifi","center_focus_strong","center_focus_weak","chair","chair_alt","chalet","change_circle","change_history","charging_station","chat","chat_bubble","chat_bubble_outline","check","check_box","check_box_outline_blank","check_circle","check_circle_outline","checklist","checklist_rtl","checkroom","chevron_left","chevron_right","child_care","child_friendly","chrome_reader_mode","circle","circle_notifications","class","clean_hands","cleaning_services","clear","clear_all","close","close_fullscreen","closed_caption","closed_caption_disabled","closed_caption_off","cloud","cloud_circle","cloud_done","cloud_download","cloud_off","cloud_queue","cloud_upload","code","code_off","coffee","coffee_maker","collections","collections_bookmark","color_lens","colorize","comment","comment_bank","commute","compare","compare_arrows","compass_calibration","compost","compress","computer","confirmation_num","confirmation_number","connect_without_contact","connected_tv","construction","contact_mail","contact_page","contact_phone","contact_support","contactless","contacts","content_copy","content_cut","content_paste","content_paste_off","control_camera","control_point","control_point_duplicate","copy","copy_all","copyright","coronavirus","corporate_fare","cottage","countertops","create","create_new_folder","credit_card","credit_card_off","credit_score","crib","crop","crop_16_9","crop_3_2","crop_5_4","crop_7_5","crop_din","crop_free","crop_landscape","crop_original","crop_portrait","crop_rotate","crop_square","cruelty_free","cut","dangerous","dark_mode","dashboard","dashboard_customize","data_exploration","data_saver_off","data_saver_on","data_usage","date_range","deck","dehaze","delete","delete_forever","delete_outline","delete_sweep","delivery_dining","departure_board","description","design_services","desktop_access_disabled","desktop_mac","desktop_windows","details","developer_board","developer_board_off","developer_mode","device_hub","device_thermostat","device_unknown","devices","devices_other","dialer_sip","dialpad","dining","dinner_dining","directions","directions_bike","directions_boat","directions_boat_filled","directions_bus","directions_bus_filled","directions_car","directions_car_filled","directions_ferry","directions_off","directions_railway","directions_railway_filled","directions_run","directions_subway","directions_subway_filled","directions_train","directions_transit","directions_transit_filled","directions_walk","dirty_lens","disabled_by_default","disabled_visible","disc_full","dnd_forwardslash","dns","do_disturb","do_disturb_alt","do_disturb_off","do_disturb_on","do_not_disturb","do_not_disturb_alt","do_not_disturb_off","do_not_disturb_on","do_not_disturb_on_total_silence","do_not_step","do_not_touch","dock","document_scanner","domain","domain_disabled","domain_verification","done","done_all","done_outline","donut_large","donut_small","door_back","door_front","door_sliding","doorbell","double_arrow","downhill_skiing","download","download_done","download_for_offline","downloading","drafts","drag_handle","drag_indicator","draw","drive_eta","drive_file_move","drive_file_move_rtl","drive_file_rename_outline","drive_folder_upload","dry","dry_cleaning","duo","dvr","dynamic_feed","dynamic_form","e_mobiledata","earbuds","earbuds_battery","east","eco","edgesensor_high","edgesensor_low","edit","edit_attributes","edit_calendar","edit_location","edit_location_alt","edit_note","edit_notifications","edit_off","edit_road","eject","elderly","electric_bike","electric_car","electric_moped","electric_rickshaw","electric_scooter","electrical_services","elevator","email","emergency","emoji_emotions","emoji_events","emoji_flags","emoji_food_beverage","emoji_nature","emoji_objects","emoji_people","emoji_symbols","emoji_transportation","engineering","enhance_photo_translate","enhanced_encryption","equalizer","error","error_outline","escalator","escalator_warning","euro","euro_symbol","ev_station","event","event_available","event_busy","event_note","event_seat","exit_to_app","expand","expand_less","expand_more","explicit","explore","explore_off","exposure","exposure_minus_1","exposure_minus_2","exposure_neg_1","exposure_neg_2","exposure_plus_1","exposure_plus_2","exposure_zero","extension","extension_off","face","face_retouching_natural","face_retouching_off","face_unlock","facebook","fact_check","family_restroom","fast_forward","fast_rewind","fastfood","favorite","favorite_border","favorite_outline","featured_play_list","featured_video","feed","feedback","female","fence","festival","fiber_dvr","fiber_manual_record","fiber_new","fiber_pin","fiber_smart_record","file_copy","file_download","file_download_done","file_download_off","file_present","file_upload","filter","filter_1","filter_2","filter_3","filter_4","filter_5","filter_6","filter_7","filter_8","filter_9","filter_9_plus","filter_alt","filter_b_and_w","filter_center_focus","filter_drama","filter_frames","filter_hdr","filter_list","filter_none","filter_tilt_shift","filter_vintage","find_in_page","find_replace","fingerprint","fire_extinguisher","fireplace","first_page","fit_screen","fitness_center","flag","flaky","flare","flash_auto","flash_off","flash_on","flashlight_off","flashlight_on","flatware","flight","flight_land","flight_takeoff","flip","flip_camera_android","flip_camera_ios","flip_to_back","flip_to_front","flourescent","flutter_dash","fmd_bad","fmd_good","folder","folder_open","folder_shared","folder_special","follow_the_signs","font_download","font_download_off","food_bank","format_align_center","format_align_justify","format_align_left","format_align_right","format_bold","format_clear","format_color_fill","format_color_reset","format_color_text","format_indent_decrease","format_indent_increase","format_italic","format_line_spacing","format_list_bulleted","format_list_numbered","format_list_numbered_rtl","format_paint","format_quote","format_shapes","format_size","format_strikethrough","format_textdirection_l_to_r","format_textdirection_r_to_l","format_underline","format_underlined","forum","forward","forward_10","forward_30","forward_5","forward_to_inbox","foundation","free_breakfast","free_cancellation","front_hand","fullscreen","fullscreen_exit","functions","g_mobiledata","g_translate","gamepad","games","garage","gavel","generating_tokens","gesture","get_app","gif","gite","golf_course","gpp_bad","gpp_good","gpp_maybe","gps_fixed","gps_not_fixed","gps_off","grade","gradient","grading","grain","graphic_eq","grass","grid_3x3","grid_4x4","grid_goldenratio","grid_off","grid_on","grid_view","group","group_add","group_off","group_work","groups","h_mobiledata","h_plus_mobiledata","hail","handyman","hardware","hd","hdr_auto","hdr_auto_select","hdr_enhanced_select","hdr_off","hdr_off_select","hdr_on","hdr_on_select","hdr_plus","hdr_strong","hdr_weak","headphones","headphones_battery","headset","headset_mic","headset_off","healing","health_and_safety","hearing","hearing_disabled","height","help","help_center","help_outline","hevc","hide_image","hide_source","high_quality","highlight","highlight_alt","highlight_off","highlight_remove","hiking","history","history_edu","history_toggle_off","holiday_village","home","home_max","home_mini","home_repair_service","home_work","horizontal_distribute","horizontal_rule","horizontal_split","hot_tub","hotel","hotel_class","hourglass_bottom","hourglass_disabled","hourglass_empty","hourglass_full","hourglass_top","house","house_siding","houseboat","how_to_reg","how_to_vote","http","https","hvac","ice_skating","icecream","image","image_aspect_ratio","image_not_supported","image_search","imagesearch_roller","import_contacts","import_export","important_devices","inbox","incomplete_circle","indeterminate_check_box","info","input","insert_chart","insert_chart_outlined","insert_comment","insert_drive_file","insert_emoticon","insert_invitation","insert_link","insert_photo","insights","integration_instructions","inventory","inventory_2","invert_colors","invert_colors_off","invert_colors_on","ios_share","iron","iso","kayaking","keyboard","keyboard_alt","keyboard_arrow_down","keyboard_arrow_left","keyboard_arrow_right","keyboard_arrow_up","keyboard_backspace","keyboard_capslock","keyboard_control","keyboard_hide","keyboard_return","keyboard_tab","keyboard_voice","king_bed","kitchen","kitesurfing","label","label_important","label_off","landscape","language","laptop","laptop_chromebook","laptop_mac","laptop_windows","last_page","launch","layers","layers_clear","leaderboard","leak_add","leak_remove","leave_bags_at_home","legend_toggle","lens","lens_blur","library_add","library_add_check","library_books","library_music","light","light_mode","lightbulb","line_style","line_weight","linear_scale","link","link_off","linked_camera","liquor","list","list_alt","live_help","live_tv","living","local_activity","local_airport","local_atm","local_attraction","local_bar","local_cafe","local_car_wash","local_convenience_store","local_dining","local_drink","local_fire_department","local_florist","local_gas_station","local_grocery_store","local_hospital","local_hotel","local_laundry_service","local_library","local_mall","local_movies","local_offer","local_parking","local_pharmacy","local_phone","local_pizza","local_play","local_police","local_post_office","local_print_shop","local_printshop","local_restaurant","local_see","local_shipping","local_taxi","location_city","location_disabled","location_history","location_off","location_on","location_searching","lock","lock_clock","lock_open","login","logout","looks","looks_3","looks_4","looks_5","looks_6","looks_one","looks_two","loop","loupe","low_priority","loyalty","lte_mobiledata","lte_plus_mobiledata","luggage","lunch_dining","mail","mail_outline","male","manage_accounts","manage_search","map","maps_home_work","maps_ugc","margin","mark_as_unread","mark_chat_read","mark_chat_unread","mark_email_read","mark_email_unread","markunread","markunread_mailbox","masks","maximize","media_bluetooth_off","media_bluetooth_on","mediation","medical_services","medication","meeting_room","memory","menu","menu_book","menu_open","merge_type","message","messenger","messenger_outline","mic","mic_external_off","mic_external_on","mic_none","mic_off","microwave","military_tech","minimize","miscellaneous_services","missed_video_call","mms","mobile_friendly","mobile_off","mobile_screen_share","mobiledata_off","mode","mode_comment","mode_edit","mode_edit_outline","mode_night","mode_standby","model_training","monetization_on","money","money_off","money_off_csred","monitor","monitor_weight","monochrome_photos","mood","mood_bad","moped","more","more_horiz","more_time","more_vert","motion_photos_auto","motion_photos_off","motion_photos_on","motion_photos_pause","motion_photos_paused","motorcycle","mouse","move_to_inbox","movie","movie_creation","movie_filter","moving","mp","multiline_chart","multiple_stop","multitrack_audio","museum","music_note","music_off","music_video","my_library_add","my_library_books","my_library_music","my_location","nat","nature","nature_people","navigate_before","navigate_next","navigation","near_me","near_me_disabled","nearby_error","nearby_off","network_cell","network_check","network_locked","network_wifi","new_label","new_releases","next_plan","next_week","nfc","night_shelter","nightlife","nightlight","nightlight_round","nights_stay","no_accounts","no_backpack","no_cell","no_drinks","no_encryption","no_encryption_gmailerrorred","no_flash","no_food","no_luggage","no_meals","no_meeting_room","no_photography","no_sim","no_stroller","no_transfer","nordic_walking","north","north_east","north_west","not_accessible","not_interested","not_listed_location","not_started","note","note_add","note_alt","notes","notification_add","notification_important","notifications","notifications_active","notifications_none","notifications_off","notifications_on","notifications_paused","now_wallpaper","now_widgets","offline_bolt","offline_pin","offline_share","ondemand_video","online_prediction","opacity","open_in_browser","open_in_full","open_in_new","open_in_new_off","open_with","other_houses","outbond","outbound","outbox","outdoor_grill","outlet","outlined_flag","padding","pages","pageview","paid","palette","pan_tool","panorama","panorama_fish_eye","panorama_fisheye","panorama_horizontal","panorama_horizontal_select","panorama_photosphere","panorama_photosphere_select","panorama_vertical","panorama_vertical_select","panorama_wide_angle","panorama_wide_angle_select","paragliding","park","party_mode","password","paste","pattern","pause","pause_circle","pause_circle_filled","pause_circle_outline","pause_presentation","payment","payments","pedal_bike","pending","pending_actions","people","people_alt","people_outline","perm_camera_mic","perm_contact_cal","perm_contact_calendar","perm_data_setting","perm_device_info","perm_device_information","perm_identity","perm_media","perm_phone_msg","perm_scan_wifi","person","person_add","person_add_alt","person_add_alt_1","person_add_disabled","person_off","person_outline","person_pin","person_pin_circle","person_remove","person_remove_alt_1","person_search","personal_injury","personal_video","pest_control","pest_control_rodent","pets","phone","phone_android","phone_bluetooth_speaker","phone_callback","phone_disabled","phone_enabled","phone_forwarded","phone_in_talk","phone_iphone","phone_locked","phone_missed","phone_paused","phonelink","phonelink_erase","phonelink_lock","phonelink_off","phonelink_ring","phonelink_setup","photo","photo_album","photo_camera","photo_camera_back","photo_camera_front","photo_filter","photo_library","photo_size_select_actual","photo_size_select_large","photo_size_select_small","piano","piano_off","picture_as_pdf","picture_in_picture","picture_in_picture_alt","pie_chart","pie_chart_outline","pin","pin_drop","pin_end","pin_invoke","pivot_table_chart","place","plagiarism","play_arrow","play_circle","play_circle_fill","play_circle_filled","play_circle_outline","play_disabled","play_for_work","play_lesson","playlist_add","playlist_add_check","playlist_play","plumbing","plus_one","podcasts","point_of_sale","policy","poll","polymer","pool","portable_wifi_off","portrait","post_add","power","power_input","power_off","power_settings_new","precision_manufacturing","pregnant_woman","present_to_all","preview","price_change","price_check","print","print_disabled","priority_high","privacy_tip","private_connectivity","production_quantity_limits","psychology","public","public_off","publish","published_with_changes","push_pin","qr_code","qr_code_2","qr_code_scanner","query_builder","query_stats","question_answer","queue","queue_music","queue_play_next","quick_contacts_dialer","quick_contacts_mail","quickreply","quiz","r_mobiledata","radar","radio","radio_button_checked","radio_button_off","radio_button_on","radio_button_unchecked","railway_alert","ramen_dining","rate_review","raw_off","raw_on","read_more","real_estate_agent","receipt","receipt_long","recent_actors","recommend","record_voice_over","recycling","redeem","redo","reduce_capacity","refresh","remember_me","remove","remove_circle","remove_circle_outline","remove_done","remove_from_queue","remove_moderator","remove_red_eye","remove_shopping_cart","reorder","repeat","repeat_on","repeat_one","repeat_one_on","replay","replay_10","replay_30","replay_5","replay_circle_filled","reply","reply_all","report","report_gmailerrorred","report_off","report_problem","request_page","request_quote","reset_tv","restart_alt","restaurant","restaurant_menu","restore","restore_from_trash","restore_page","reviews","rice_bowl","ring_volume","roofing","room","room_preferences","room_service","rotate_90_degrees_ccw","rotate_left","rotate_right","rounded_corner","router","rowing","rss_feed","rsvp","rtt","rule","rule_folder","run_circle","running_with_errors","rv_hookup","safety_divider","sailing","sanitizer","satellite","save","save_alt","saved_search","savings","scanner","scatter_plot","schedule","schedule_send","schema","school","science","score","screen_lock_landscape","screen_lock_portrait","screen_lock_rotation","screen_rotation","screen_search_desktop","screen_share","screenshot","sd","sd_card","sd_card_alert","sd_storage","search","search_off","security","security_update","security_update_good","security_update_warning","segment","select_all","self_improvement","sell","send","send_and_archive","send_to_mobile","sensor_door","sensor_window","sensors","sensors_off","sentiment_dissatisfied","sentiment_neutral","sentiment_satisfied","sentiment_satisfied_alt","sentiment_very_dissatisfied","sentiment_very_satisfied","set_meal","settings","settings_accessibility","settings_applications","settings_backup_restore","settings_bluetooth","settings_brightness","settings_cell","settings_display","settings_ethernet","settings_input_antenna","settings_input_component","settings_input_composite","settings_input_hdmi","settings_input_svideo","settings_overscan","settings_phone","settings_power","settings_remote","settings_suggest","settings_system_daydream","settings_voice","share","share_arrival_time","share_location","shield","shop","shop_2","shop_two","shopping_bag","shopping_basket","shopping_cart","short_text","shortcut","show_chart","shower","shuffle","shuffle_on","shutter_speed","sick","signal_cellular_0_bar","signal_cellular_4_bar","signal_cellular_alt","signal_cellular_connected_no_internet_0_bar","signal_cellular_connected_no_internet_4_bar","signal_cellular_no_sim","signal_cellular_nodata","signal_cellular_null","signal_cellular_off","signal_wifi_0_bar","signal_wifi_4_bar","signal_wifi_4_bar_lock","signal_wifi_bad","signal_wifi_connected_no_internet_4","signal_wifi_off","signal_wifi_statusbar_4_bar","signal_wifi_statusbar_connected_no_internet_4","signal_wifi_statusbar_null","sim_card","sim_card_alert","sim_card_download","single_bed","sip","skateboarding","skip_next","skip_previous","sledding","slideshow","slow_motion_video","smart_button","smart_display","smart_screen","smart_toy","smartphone","smoke_free","smoking_rooms","sms","sms_failed","snippet_folder","snooze","snowboarding","snowmobile","snowshoeing","soap","social_distance","sort","sort_by_alpha","source","south","south_east","south_west","spa","space_bar","space_dashboard","speaker","speaker_group","speaker_notes","speaker_notes_off","speaker_phone","speed","spellcheck","splitscreen","sports","sports_bar","sports_baseball","sports_basketball","sports_cricket","sports_esports","sports_football","sports_golf","sports_handball","sports_hockey","sports_kabaddi","sports_mma","sports_motorsports","sports_rugby","sports_score","sports_soccer","sports_tennis","sports_volleyball","square_foot","stacked_bar_chart","stacked_line_chart","stairs","star","star_border","star_border_purple500","star_half","star_outline","star_purple500","star_rate","stars","stay_current_landscape","stay_current_portrait","stay_primary_landscape","stay_primary_portrait","sticky_note_2","stop","stop_circle","stop_screen_share","storage","store","store_mall_directory","storefront","storm","straighten","stream","streetview","strikethrough_s","stroller","style","subdirectory_arrow_left","subdirectory_arrow_right","subject","subscript","subscriptions","subtitles","subtitles_off","subway","summarize","superscript","supervised_user_circle","supervisor_account","support","support_agent","surfing","surround_sound","swap_calls","swap_horiz","swap_horizontal_circle","swap_vert","swap_vert_circle","swap_vertical_circle","swipe","switch_account","switch_camera","switch_left","switch_right","switch_video","sync","sync_alt","sync_disabled","sync_problem","system_security_update","system_security_update_good","system_security_update_warning","system_update","system_update_alt","system_update_tv","tab","tab_unselected","table_chart","table_rows","table_view","tablet","tablet_android","tablet_mac","tag","tag_faces","takeout_dining","tap_and_play","tapas","task","task_alt","taxi_alert","terrain","text_fields","text_format","text_rotate_up","text_rotate_vertical","text_rotation_angledown","text_rotation_angleup","text_rotation_down","text_rotation_none","text_snippet","textsms","texture","theater_comedy","theaters","thermostat","thermostat_auto","thumb_down","thumb_down_alt","thumb_down_off_alt","thumb_up","thumb_up_alt","thumb_up_off_alt","thumbs_up_down","time_to_leave","timelapse","timeline","timer","timer_10","timer_10_select","timer_3","timer_3_select","timer_off","tips_and_updates","title","toc","today","toggle_off","toggle_on","toll","tonality","topic","touch_app","tour","toys","track_changes","traffic","train","tram","transfer_within_a_station","transform","transgender","transit_enterexit","translate","travel_explore","trending_down","trending_flat","trending_neutral","trending_up","trip_origin","try","tty","tune","tungsten","turned_in","turned_in_not","tv","tv_off","two_wheeler","umbrella","unarchive","undo","unfold_less","unfold_more","unpublished","unsubscribe","upcoming","update","update_disabled","upgrade","upload","upload_file","usb","usb_off","verified","verified_user","vertical_align_bottom","vertical_align_center","vertical_align_top","vertical_distribute","vertical_split","vibration","video_call","video_camera_back","video_camera_front","video_collection","video_label","video_library","video_settings","video_stable","videocam","videocam_off","videogame_asset","videogame_asset_off","view_agenda","view_array","view_carousel","view_column","view_comfortable","view_comfy","view_compact","view_day","view_headline","view_in_ar","view_list","view_module","view_quilt","view_sidebar","view_stream","view_week","vignette","villa","visibility","visibility_off","voice_chat","voice_over_off","voicemail","volume_down","volume_mute","volume_off","volume_up","volunteer_activism","vpn_key","vpn_lock","vrpano","wallet_giftcard","wallet_membership","wallet_travel","wallpaper","warning","warning_amber","wash","watch","watch_later","water","water_damage","water_drop","waterfall_chart","waves","waving_hand","wb_auto","wb_cloudy","wb_incandescent","wb_iridescent","wb_shade","wb_sunny","wb_twilight","wc","web","web_asset","web_asset_off","weekend","west","whatshot","wheelchair_pickup","where_to_vote","widgets","wifi","wifi_calling","wifi_calling_3","wifi_lock","wifi_off","wifi_protected_setup","wifi_tethering","wifi_tethering_error_rounded","wifi_tethering_off","window","wine_bar","work","work_off","work_outline","workspaces","wrap_text","wrong_location","wysiwyg","yard","youtube_searched_for","zoom_in","zoom_out","zoom_out_map"]}];function M(e){const[t,a]=d({defaultIcon:mappl10n.options.defaultIcon,filename:null,filter:"",glyph:"",glyphColor:"white",glyphFont:O[0],glyphSize:20,isOpen:!1,mode:"list",shape:"circle",shapeColor:"gray",shapeFont:S[0],toDelete:[],userIcons:mappl10n.options.userIcons});function p(e){a((t=>({...t,...e})))}function c(a,n){switch(a){case"bulk-select":let a=[...t.toDelete],i=t.toDelete.indexOf(n.iconid);i>=0?a.splice(i,1):a.push(n.iconid),p({toDelete:a});break;case"close":p({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&o.mappLib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconids:t.toDelete,nonce:mappl10n.options.nonce},callback:function(a){a&&"OK"==a.status?(t.toDelete.indexOf(e.iconid)>=0&&!function(e){if(!e)return!1;let t=e.replace(/.png|.gif|.jpg/gi,"").toLowerCase();return mappl10n.options.standardIcons.indexOf(t)>=0}(e.iconid)&&e.onChange(null),mappl10n.options.userIcons=a.data,p({toDelete:[],mode:"list",userIcons:mappl10n.options.userIcons})):alert("Delete error: "+a.status)}});break;case"edit-cancel":p({mode:"list"});break;case"edit-save":!function(e){const a=32,o=2;let n=document.createElement("canvas");n.width=a*o,n.height=a*o,n.style.imageRendering="pixelated";let i=n.getContext("2d");i.font=a*o+"px "+t.shapeFont.fontFamily,i.fillStyle=t.shapeColor,i.textBaseline="bottom",i.fillText(t.shape,0,a*o),i.strokeStyle="white",i.strokeText(t.shape,1,a*o);const s=_.findWhere(t.shapeFont.glyphs,{name:t.shape});if(t.glyph&&s.center){i.imageSmoothingEnabled=!1,i.font=t.glyphSize*o+"px "+t.glyphFont.fontFamily,i.fillStyle=t.glyphColor;const e=[s.center[0]*o,s.center[1]*o];i.fillText(t.glyph,e[0]-t.glyphSize,e[1]+t.glyphSize)}"undefined"!=typeof debug?document.getElementById("mapp-edit-debug").append(n):n.toBlob((e=>{let a=new FormData;a.append("image0",e,t.filename),u(a)}),"image/png",100)}();break;case"edit-upload":!function(e){let t=new FormData;_.map(e,((e,a)=>{e.type.match("image.*")?t.append("image"+a,e):alert("File "+e.name+" is not an image.")})),u(t)}(n);break;case"list-select":e.onChange&&e.onChange(n),c("close");break;case"mode":p("bulk"==n?{mode:n,toDelete:[]}:{mode:n});break;case"open":p({isOpen:!0})}}function m(a){const n="user"==a?mappl10n.options.userIcons:mappl10n.options.standardIcons;return _.map(n,(n=>{if("standard"==a&&function(e){return mappl10n.options.userIcons.indexOf(e)>=0}(n+".png"))return"";let i="mapp-icon-wrapper";return"bulk"==t.mode&&t.toDelete.indexOf(n)>=0?i+=" mapp-bulk-selected":"list"!=t.mode||e.iconid!=n&&e.iconid+".png"!=n||(i+=" mapp-selected"),s("div",{alt:n,className:i,key:n,onClick:()=>{"list"==t.mode?c("list-select",n):"user"==a&&c("bulk-select",{iconid:n,type:a})}},s("img",{className:"mapp-icon",src:o.mappLib.getIconUrl(n),title:n}))}))}function u(t){t.append("action","mapp_icon_save"),t.append("nonce",mappl10n.options.nonce),o.mappLib.ajax({type:"POST",contentType:!1,processData:!1,data:t,success:t=>{t&&"OK"==t.status?(mappl10n.options.userIcons=t.data.icons,p({userIcons:mappl10n.options.userIcons}),p({mode:"list"}),e.onChange&&e.onChange(t.data.filename)):alert("Upload error: "+t.status)}})}return r((()=>{let e=t.glyph?t.glyph:t.shape;e+=".png",p({filename:e})}),[t.shape,t.shapeColor,t.glyphFont,t.glyph,t.glyphColor,t.glyphSize]),s(l,null,s("img",{className:"mapp-icon",onClick:()=>c("open",null),src:o.mappLib.getIconUrl(e.iconid)}),"list"==t.mode&&t.isOpen&&s(k,{title:s("div",{className:"mapp-icons-title"},__("Select icon"),s(g,{disabled:"bulk"==t.mode,isPrimary:!0,onClick:()=>c("mode","edit")},__("New icon"))),className:"mapp-icons-modal",onRequestClose:()=>c("close")},s("div",{className:"mapp-icons"},s("div",{className:"mapp-icons-list"},mappl10n.options.userIcons.length>0&&s("div",{className:"mapp-icons-list-title"},__("Custom icons")),s("div",{className:"mapp-icons-user"},m("user")),mappl10n.options.userIcons.length>0&&s("div",{className:"mapp-icons-list-title"},__("Standard icons")),s("div",{className:"mapp-icons-standard"},m("standard"))),s("div",{className:"mapp-icons-toolbar"},s("div",null,s(g,{disabled:"bulk"==t.mode,isSecondary:!0,onClick:()=>c("list-select",null)},__("Use default icon")),mappl10n.options.userIcons.length>0&&s(g,{isTertiary:!0,onClick:()=>c("mode","bulk")},__("Edit list"))),s("div",{className:"mapp-icons-filename"},e.iconid?e.iconid:__("No icon selected"))))),"bulk"==t.mode&&t.isOpen&&s(k,{title:s("div",{className:"mapp-icons-title"},__("Select icons to delete")),className:"mapp-icons-modal",onRequestClose:()=>c("close")},s("div",{className:"mapp-icons"},s("div",{className:"mapp-icons-list"},s("div",{className:"mapp-icons-user"},m("user"))),s("div",{className:"mapp-icons-toolbar"},s("div",null,s(g,{isDestructive:!0,disabled:t.toDelete.length<1,onClick:()=>c("delete")},__("Delete")),s(g,{isSecondary:!0,onClick:()=>c("mode","list")},__("Cancel")))))),"edit"==t.mode&&s(k,{title:__("Create new icon"),className:"mapp-icons-edit-modal",onRequestClose:()=>c("edit-cancel"),shouldCloseOnClickOutside:!1},s("div",{className:"mapp-icons-edit"},s("div",{id:"mapp-edit-debug"}),s("section",null,s("h2",null,__("Shape")),s("span",{className:"mapp-icons-edit-shapes",style:{color:t.shapeColor,fontFamily:t.shapeFont.fontFamily}},_.map(t.shapeFont.glyphs,((e,a)=>{const o=t.shape==e.name;return s("span",{className:"mapp-icons-edit-shape-wrapper"+(o?" mapp-selected":""),key:e.name,onClick:()=>p({shape:e.name}),title:e.name},s("span",{className:"mapp-icons-edit-shape"},e.name,e.center&&t.glyph&&s("div",{className:"mapp-icons-edit-shape-glyph "+t.glyphFont.className,style:{left:e.center[0],top:e.center[1],color:t.glyphColor,fontSize:t.glyphSize,width:t.glyphSize}},t.glyph)))})))),s("section",{className:"mapp-icons-edit-font"},s("h2",null,__("Font")),s(i.Select,{value:t.glyphFont.id,options:_.map(O,(e=>({value:e.id,label:e.label}))),onChange:e=>p({glyphFont:_.findWhere(O,{id:e}),glyph:null})}),s("span",null,__("Font size")),s(C,{initialPosition:20,min:16,max:24,value:t.glyphSize,onChange:e=>p({glyphSize:e})})),s("section",null,s("h2",null,__("Color")),s("span",{className:"mapp-icons-edit-colors"},s(n.MappColorPicker,{color:t.shapeColor,isExtended:!1,onChange:e=>p({shapeColor:e.color})}),s("span",null,__("Fill")),s(n.MappColorPicker,{color:t.glyphColor,isExtended:!1,onChange:e=>p({glyphColor:e.color})}),s("span",null,__("Stroke")))),function(){const e=_.filter(t.glyphFont.glyphs,(e=>!t.filter||e.includes(t.filter)));return s("div",{className:"mapp-icons-edit-glyphs"},s("section",{className:"mapp-icons-edit-search"},s("h2",null,__("Search")),s(i.Input,{value:t.filter,onChange:e=>p({filter:e})})),s("div",{className:"mapp-icons-edit-glyph-list",style:{color:t.glyphColor}},_.map(e,((e,a)=>s("div",{tabIndex:0,className:"mapp-icons-edit-glyph-wrapper"+(t.glyph==e?" mapp-selected":""),key:a,onClick:()=>p({glyph:t.glyph==e?null:e})},s("span",{className:"mapp-icons-edit-glyph "+t.glyphFont.className},e),s("div",{className:"mapp-icons-edit-glyph-title"},e.replaceAll("_"," ")))))))}(),s("div",{className:"mapp-icons-edit-toolbar"},s("div",{className:"mapp-icons-edit-toolbar-left"},s(g,{isPrimary:!0,onClick:()=>c("edit-save")},__("Save")),s(g,{isSecondary:!0,onClick:()=>c("edit-cancel")},__("Cancel")),s(i.Input,{className:"mapp-icons-filename",value:t.filename,onChange:e=>p({filename:e})})),s("div",null,s(v,{accept:"image/*",icon:"upload",multiple:!0,onChange:e=>{c("edit-upload",e.target.files)}},__("Upload icons")))))))}},24:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappImport:()=>y});var o=a(939),n=a(824);const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useCallback:p,useRef:c,useState:m}=wp.element,{useSelect:d}=wp.data,{withState:u}=wp.compose,{Button:h,FormFileUpload:g,Modal:f,ToggleControl:b}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function y(e){const[t,a]=m({isBusy:!1,isFetching:!1,file:null,isMapModalOpen:!1,mapid:null,mapdata:null,overwrite:!1,response:null,tab:"sheet",url:""}),r=c(null);function p(e){a((t=>({...t,...e})))}l((()=>{t.mapid&&(p({isFetching:!0,mapdata:null}),o.mappLib.ajax({type:"GET",data:{action:"mapp_get",mapid:t.mapid,nonce:mappl10n.options.nonce},callback:e=>{e&&"OK"==e.status?p({mapdata:e.data}):alert(e.status),p({isFetching:!1})}}))}),[t.mapid]),l((()=>{if(t.isMapModalOpen&&!t.isFetching&&t.mapdata&&r.current){new mapp.Map(t.mapdata,{height:"50vh",mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:!0,search:!1,sel:jQuery(r.current),width:"50vw"}).display()}}),[t.isMapModalOpen,t.isFetching,t.mapdata,r.current]);const d=t.isBusy||"file"==t.tab&&!t.file||"sheet"==t.tab&&0==t.url.trim().length;return i("div",{className:"mapp-import"},i("form",{onSubmit:e=>{e.preventDefault(),function(){p({isBusy:!0,response:null});let e={type:"POST",data:{url:t.url,action:"mapp_import",nonce:mappl10n.options.nonce,overwrite:t.overwrite},success:e=>{p({isBusy:!1}),e&&"OK"==e.status?p({response:e.data}):alert(e.status)},error:()=>{alert("Import error"),p({isBusy:!1})}};if("file"==t.tab){let a=new FormData;_.map(e.data,((e,t)=>a.append(t,e))),a.append("file",t.file),e={...e,data:a,contentType:!1,processData:!1}}o.mappLib.ajax(e)}()}},i(s,null,i("h2",null,__("Source")),i(n.MappTabs,{tabs:[{name:"sheet",label:__("Google Sheets")},{name:"file",label:__("File")}],initialTab:t.tab,onRender:e=>"sheet"==e?function(){const e=i("div",{className:"mapp-import-help"},__("Google sheets must be shared before importing:"),i("ol",null,i("li",null,__("File -> Share -> Publish to web")),i("li",null,__("Select 'Entire Document' and 'Comma-Separated Values (.csv)")),i("li",null,__("Copy the URL and paste it here"))));return i("div",{className:"mapp-import-tab-sheet"},i("label",{className:"mapp-import-sheet-name"},i("span",null,"URL"),i("input",{onChange:e=>function(e){p({url:e})}(e.target.value),type:"text",value:t.url})),e)}():"file"==e?function(){const e=i("div",{className:"mapp-import-help"},__("File must be in CSV format:"),i("ol",null,i("li",null,__("Excel: File -> Save As -> 'CSV' or 'CSV UTF-8' (for special characters)'")),i("li",null,__("Google sheets: File -> Download -> Comma Separated Values (.csv)"))));return i("div",{className:"mapp-import-tab-file"},i("div",{className:"mapp-import-file-name"},i(g,{accept:"text/csv",isSecondary:!0,multiple:!1,onChange:e=>{p({file:e.target.files[0]})}},__("Select file")),i("input",{disabled:!0,type:"text",value:t.file?t.file.name:""})),e)}():void 0,onSelect:e=>p({tab:e})})),i(b,{checked:t.overwrite,label:__("Use map IDs from file"),onChange:e=>p({overwrite:e})}),t.overwrite&&i("div",{className:"mapp-import-overwrite-warning"},__("WARNING: this will overwrite any existing maps with the same IDs")),i(h,{disabled:d,isBusy:t.isBusy,isPrimary:!0,type:"submit"},__("Import"))),function(){if(t.response&&t.response.results)return i("div",{className:"mapp-import-log"},i("h2",null,__("Results")),_.map(t.response.results,((e,a)=>i("div",{key:a},function(e){let a=t.response.headers;return i("div",{className:"mapp-import-table"},i("div",{className:"mapp-import-table-header"},i("div",{key:"line",className:"mapp-import-cell"},__("Line")),_.map(a,((e,t)=>i("div",{key:t,className:"mapp-import-cell"},e))),i("div",{key:"msg",className:"mapp-import-cell"},__("Result"))),_.map(e.logs,((e,t)=>{let o="mapp-import-cell";return e.msg&&(o+="e"==e.msg.msgtype?" mapp-import-cell-error":" mapp-import-cell-info"),i("div",{className:"mapp-import-row",key:t},i("div",{key:"col_rowid",className:"mapp-import-cell"},e.rowid),_.map(a,((t,a)=>i("div",{key:a,className:"mapp-import-cell"},e[t]?e[t]:" "))),i("div",{key:"error",className:o},e.msg.msg))})))}(e),function(e){return _.map(e.msgs,((e,a)=>{const o="e"==e.msgtype?"mapp-import-error":"mapp-import-info";return i("div",{className:o,key:a},e.msg,e.mapid&&i(h,{onClick:()=>{p({mapid:e.mapid,isMapModalOpen:!0})},disabled:t.isFetching||t.isMapModalOpen,isBusy:t.isFetching&&t.mapid==e.mapid,isSecondary:!0},__("Show map")))}))}(e)))))}(),t.isMapModalOpen&&!t.isFetching&&i(f,{title:__("Map")+" "+t.mapid,onRequestClose:()=>p({isMapModalOpen:!1})},i("div",{className:"mapp-import-map"},i("div",{ref:r}))))}document.getElementById("mapp-import-container")&&wp.element.render(i(y,null),document.getElementById("mapp-import-container"))},816:(e,t,a)=>{"use strict";a.r(t);var o=a(429),n=a(477);window.mapp=window.mapp||{};const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useRef:p,useState:c}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function m(e){const{Button:t,Placeholder:a,Toolbar:r,ToolbarButton:m,ToolbarGroup:d}=wp.components,{BlockControls:u,InspectorControls:_}=wp.blockEditor,[h,g]=c({isOpen:!1,map:null,mapdata:void 0,pickerMode:"list",pickerMapid:null}),f=p(null);function b(e){g((t=>({...t,...e})))}function y(){b({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"list"})}function v(){return i(u,null,i(void 0!==d?d:r,null,e.attributes.mapid&&i(m,{icon:"edit",label:__("Edit map"),onClick:()=>{b({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"edit"})}}),i(m,{icon:"portfolio",label:__("Map Library"),onClick:()=>y()})))}if(l((()=>{const t=t=>{b({mapdata:t.maps[e.attributes.mapid]})};return mapp.store.subscribe(t),()=>mapp.store.unsubscribe(t)})),l((()=>{e.attributes.mapid&&mapp.store.fetchMap(e.attributes.mapid)}),[e.attributes.mapid]),l((()=>{e.attributes.mapid&&f.current&&h.mapdata&&function(){let t=new mapp.Map(h.mapdata,{alignment:e.attributes.align,center:e.attributes.center,height:e.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:e.attributes.poiList,search:e.attributes.search,sel:jQuery(f.current),width:e.attributes.width,zoom:e.attributes.zoom});t.display(),b({map:t})}()}),[h.mapdata,e.attributes.search]),l((()=>{"wide"!=e.attributes.align&&"full"!=e.attributes.align||(e.setAttributes({width:"100%"}),h.map&&h.map.setSize({width:"100%"}))}),[e.attributes.align]),e.attributes.preview)return i("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"});let k;return k=e.attributes.mapid&&null!==h.mapdata?i(s,null,v(),function(){if(!h.map)return null;const{align:t,center:a,height:n,poiList:s,search:l,width:r,zoom:p}=e.attributes;return i(_,null,i("div",{className:"mapp-gt-inspector"},i(o.MappSettings,{map:h.map,alignment:t,context:"map",onChange:t=>{return a=t,void e.setAttributes(a);var a},center:a,height:n,poiList:s,search:l,width:r,zoom:p})))}(),i("div",{className:"mapp-gt",ref:f})):i(s,null,v(),i(a,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Use the map library to create a new map or insert an existing map.")},i(t,{icon:"portfolio",isSecondary:!0,onClick:()=>y()},__("Map Library")))),i(s,null,k,function(){if(h.isOpen)return i(n.default,{mapid:h.pickerMapid,mode:h.pickerMode,onClose:()=>{b({isOpen:!1})},onInsert:t=>function(t){t!=e.attributes.mapid&&e.setAttributes({center:void 0,mapid:t,zoom:void 0}),b({isOpen:!1})}(t),onTrash:()=>{e.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0})},type:"post"})}())}mappl10n.options.postid&&wp.blocks.registerBlockType("mappress/map",{title:__("MapPress Map"),icon:"location",description:__("Insert a map"),category:mappl10n.options.blockCategory,attributes:{center:{type:"string"},height:{type:"string",default:""},initialOpenDirections:{type:"boolean"},mapid:{type:"string"},mapOpts:{type:"object"},poiList:{type:"boolean"},preview:{type:"boolean",default:!1},search:{type:"boolean"},width:{type:"string",default:""},zoom:{type:"number"}},supports:{align:["full","wide","center","left","right"]},transforms:{from:[{type:"shortcode",tag:"mappress",attributes:{center:{type:"string",shortcode:e=>e.named.center},height:{type:"string",shortcode:e=>e.named.height},initialOpenDirections:{type:"boolean",shortcode:e=>"true"==e.named.initialOpenDirections||"true"==e.named.initialopendirections||void 0},mapid:{type:"string",shortcode:e=>e.named.mapid},poiList:{type:"boolean",shortcode:e=>"true"==e.named.poiList||"true"==e.named.poilist||void 0},search:{type:"boolean",shortcode:e=>"true"==e.named.search||"true"==e.named.search||void 0},width:{type:"string",shortcode:e=>e.named.width},zoom:{type:"number",shortcode:e=>parseInt(e.named.zoom)?parseInt(e.named.zoom):null}}},{type:"block",blocks:["core/shortcode"],isMatch:e=>{let{text:t}=e;var a=wp.shortcode.regexp("mappress");return a.lastIndex=0,a.test(t)},transform:e=>{let{text:t}=e;return wp.blocks.rawHandler({HTML:"<p>"+t+"</p>",mode:"BLOCKS"})}}]},edit:function(e){return i(m,e)},save:function(e){return e},example:{attributes:{preview:!0}}})},378:(e,t,a)=>{"use strict";a.r(t);a(429),a(670),a(308);window.mapp=window.mapp||{};wp.element.createElement;const{Fragment:o,useEffect:n,useLayoutEffect:i,useRef:s,useState:l}=wp.element,{BaseControl:r,Button:p,ButtonGroup:c,Card:m,CardBody:d,CardFooter:u,CardHeader:_,CheckboxControl:h,ExternalLink:g,HorizontalRule:f,Panel:b,PanelBody:y,PanelRow:v,Placeholder:k,RadioControl:w,SelectControl:C,TabPanel:x,TextControl:N,TextareaControl:S,ToggleControl:O,Toolbar:M}=wp.components,{useSelect:I}=wp.data},670:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappMultiSelect:()=>b});const o=wp.element.createElement,{Fragment:n,useEffect:i,useLayoutEffect:s,useRef:l,useState:r}=wp.element,{BaseControl:p,Button:c,CheckboxControl:m,Panel:d,PanelBody:u,PanelRow:h,Spinner:g,TextControl:f}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function b(e){const t=l(null),a=l(null),[n,s]=r({isOpen:!1,filter:"",filteredOptions:[]});function c(e){s((t=>({...t,...e})))}function d(t){let a=_.findWhere(e.options,{value:t});return a?a.label:t}function u(){let t;return e.values instanceof Array?t=[...e.values]:e.values&&(t=[e.values]),t||[]}function h(t,a){let o=u(),n=o.indexOf(t);(a=void 0!==a?a:-1==n)?o.push(t):o.splice(n,1),e.onChange(o)}function g(){return n.isOpen?o("div",{className:"mapp-select-dropdown-wrapper"},o("div",{className:"mapp-select-dropdown"},!n.isOpen||!e.options||e.options.length<10?null:o("div",{className:"mapp-select-filter",ref:a},o(f,{autoComplete:"off",placeholder:__("Search"),value:n.filter,onChange:e=>c({filter:e})})),o("div",{className:"mapp-select-dropdown-list"},function(){const e=u();if(0==n.filteredOptions.length)return o("div",{className:"mapp-select-dropdown-item"},__("No results"));return n.filteredOptions.map((t=>o(m,{className:"mapp-select-dropdown-item",checked:e.includes(t.value),key:t.value,onChange:e=>h(t.value,e),label:t.label})))}()))):null}return i((()=>{if(e.options)if(n.filter){let t=n.filter.toUpperCase();c({filteredOptions:e.options.filter((e=>0==e.label.toUpperCase().indexOf(t)))})}else c({filteredOptions:e.options})}),[e.options,n.filter]),i((()=>{n.isOpen&&a.current&&(jQuery("input",jQuery(a.current)).focus(),c({filter:""}))}),[n.isOpen]),o(p,{className:"mapp-select",label:e.label},o("div",{ref:t,tabIndex:0,onBlur:e=>function(e){event.relatedTarget||document.activeElement,t.current.contains(e.relatedTarget)||c({isOpen:!1})}(e)},function(){const t=u();return t instanceof Array&&t.map((e=>d(e))),void 0===e.options?o("div",{className:"mapp-select-input"},o("div",{className:"mapp-select-tokens"}),o("span",{className:"dashicons dashicons-arrow-down-alt2"})):o("div",{className:"mapp-select-input",onClick:()=>c({isOpen:!n.isOpen})},o("div",{className:"mapp-select-tokens"},t.map((e=>o("span",{className:"mapp-select-token",key:e,onClick:t=>{t.stopPropagation(),h(e,!1)}},d(e))))),o("span",{className:"dashicons "+(n.isOpen?"dashicons-arrow-up-alt2":"dashicons-arrow-down-alt2")}))}(),g()))}},218:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>k});var o=a(824),n=a(123),i=a(805),s=a(939),l=(a(535),a(710));const r=wp.element.createElement,{Fragment:p,useEffect:c,useLayoutEffect:m,useCallback:d,useRef:u,useState:h}=wp.element,{useSelect:g}=wp.data,{Button:f,Dashicon:b,FormTokenField:y,Modal:v}=wp.components,{sprintf}=wp.i18n,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function k(e){const[t,a]=h({...e,isCheckingLicense:!1,isSaving:!1}),m=u(null);function d(e){a((t=>({...t,...e})))}function v(e){return _.map(e,((e,t)=>({value:t,label:e})))}function k(e,t){return e&&Array.isArray(e)&&e.length?(_.map(e,(e=>{for(let t in e)"string"==typeof e[t]&&(e[t]=e[t].trim())})),t?e.filter((e=>{for(let t in e)if(!e[t]||0==e[t].length)return!1;return!0})):e.filter((e=>!(e.hasOwnProperty("key")&&!e.key)))):[]}function w(e,a){switch(e){case"license-check":d({isCheckingLicense:!0}),s.mappLib.ajax({type:"POST",data:{action:"mapp_license_check",nonce:mappl10n.options.nonce,license:t.license},callback:e=>{if(d({isCheckingLicense:!1}),e&&"OK"==e.status){let a={...t.helpers};a.license_status=e.data,d({helpers:a})}}});break;case"reset":d({isSaving:!0}),s.mappLib.ajax({type:"POST",data:{action:"mapp_options_reset",nonce:mappl10n.options.nonce},callback:e=>{d({isSaving:!1}),e&&"OK"==e.status&&window.location.reload()}});break;case"save":let e={...t};delete e.helpers,e.filters=k(e.filters,!1),e.metaKeys=k(e.metaKeys,!0),e.sizes=k(e.sizes,!0),e.autoicons&&e.autoicons.values&&(e.autoicons.values=k(e.autoicons.values,!0)),d({isSaving:!0}),s.mappLib.ajax({type:"POST",data:{action:"mapp_options_save",nonce:mappl10n.options.nonce,settings:JSON.stringify(e)},callback:e=>{d({isSaving:!1}),e&&"OK"==e.status&&window.location.reload()}})}}return c((()=>{if(m.current){new mapp.Map({alignment:"default",width:"100%",height:300,pois:[{address:"San Francisco, CA",title:"MapPress",body:__("Maps for WordPress"),point:{lat:37.774095,lng:-122.418731}}],sel:jQuery(m.current),zoom:8}).display()}}),[]),c((()=>{mappl10n.options.engine!=t.engine&&w("save")}),[t.engine]),r("div",{className:"mapp-options"},r("form",{onSubmit:e=>{e.preventDefault(),w("save")}},r(o.Section,{title:__("Sample Map"),className:"mapp-demo-section"},r("div",{className:"mapp-options-demo",ref:m})),mappl10n.options.pro&&(!t.helpers.is_multisite||t.helpers.is_super_admin||t.helpers.is_main_site)&&r(o.Section,{title:__("License")},r(o.Option,{title:__("MapPress license key"),className:"mapp-option-license"},r(o.Input,{value:t.license,name:"license",onChange:e=>{let a={...t.helpers};a.license_status="",d({license:e,helpers:a})},size:37,placeholder:__("Enter license to enable automatic updates")}),function(){const e=t.helpers.license_status,a=r(f,{isSecondary:!0,href:"https://mappresspro.com/mappress"},__("Get license")),o=r(f,{isBusy:t.isCheckingLicense,isSecondary:!0,onClick:()=>w("license-check")},__("Check now")),n=r(f,{isLink:!0,target:"_blank",href:"https://mappresspro.com/account"},__("Your account"));return t.license?"active"==e?r("span",{className:"mapp-license-status"},r(b,{icon:"yes"}),__("Active")):r(p,null,o,n,e&&!t.isCheckingLicense&&r("div",null,r(b,{icon:"no"}),"inactive"==e?__("License is invalid or expired"):e)):a}()),r(o.Option,{title:__("Beta versions")},r(o.Checkbox,{label:__("Enable updates for beta versions"),checked:t.betas,onChange:e=>d({betas:e})}))),r(o.Section,{title:__("Basic Settings")},r(o.Option,{title:__("Mapping API")},r(o.Radios,{options:[{label:"Leaflet",value:"leaflet"},{label:"Google",value:"google"}],onChange:e=>{d({engine:e,geocoder:"google"==e?"google":""})},checked:t.engine,help:{href:"#toc-picking-a-mapping-api",text:__("Leaflet is free and requires no API key. Google requires an API key and has usage limits.")}})),"leaflet"==t.engine&&function(){const e=[{value:"nominatim",label:"Nominatim",disabled:t.mapbox},{value:"mapbox",label:"MapBox",disabled:!t.mapbox},{value:"google",label:"Google",disabled:!t.apiKey}];let a={};return"nominatim"==t.geocoder&&(a={text:__("Nominatim is free but inaccurate. Consider using Mapbox or Google instead."),type:"warning"}),a.href="#toc-picking-a-geocoder",r(o.Option,{title:__("Geocoder")},r(o.Radios,{options:e,checked:t.geocoder,onChange:e=>d({geocoder:e}),help:a}))}(),"leaflet"==t.engine&&function(){const e=r(f,{isSecondary:!0,href:"https://account.mapbox.com/access-tokens/",target:"_blank"},__("Get an Access Token"));return r(o.Option,{title:__("Mapbox access token")},r("div",{className:"mapp-option-mapbox"},r(o.Input,{name:"mapbox",value:t.mapbox,onChange:e=>{d({mapbox:e}),d({geocoder:e?"mapbox":"nominatim"})},placeholder:__("Enter token to use Mapbox"),size:50}),e),r("div",{className:"mapp-help-text"},__("Mapbox makes Leaflet maps look great and provides an excellent geocoder.")))}(),function(){const e=r(f,{isSecondary:!0,href:"https://mappresspro.com/how-to-get-a-google-maps-api-key",target:"_blank"},__("Get an API Key"));return r(o.Option,{title:__("Google API key"),className:"mapp-option-apikey"},r(o.Input,{name:"apiKey",value:t.apiKey,onChange:e=>{d({apiKey:e})},placeholder:"google"==t.engine?__("Enter API key to use Google maps"):__("Enter API key to use Google geocoder"),size:50}),e)}()),r(o.Section,{title:__("Map Settings")},r(o.Option,{title:__("Automatic display")},r(o.Radios,{options:[{value:"",label:__("None")},{value:"top",label:__("Top of post")},{value:"bottom",label:__("Bottom of post")}],checked:t.autodisplay,onChange:e=>d({autodisplay:e})})),r(o.Option,{title:__("Map alignment")},r(o.Radios,{options:[{value:"",label:__("Default")},{value:"center",label:__("Center")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],checked:t.alignment,onChange:e=>d({alignment:e})})),r(o.Option,{title:__("Directions")},r(o.Radios,{checked:t.directions,options:[{value:"google",label:"Google"},{value:"inline",label:__("Inline")}],onChange:e=>d({directions:e})})),r(o.Option,{title:__("Mini width")},r(o.Input,{value:t.mini,onChange:e=>d({mini:e}),size:3,label:__("Width (px) to use map/list toggle buttons")})),"leaflet"==mappl10n.options.engine&&r(o.Option,{title:__("Scroll wheel zoom")},r(o.Checkbox,{checked:t.scrollWheel,label:__("Enable map zoom with mouse scroll wheel"),onChange:e=>d({scrollWheel:e})}))),r(o.Section,{title:__("POIs")},r(o.Option,{title:__("Default zoom")},r(o.Select,{label:__("Default zoom when displaying a single POI"),value:t.poiZoom,options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],(e=>({value:e,label:e}))),onChange:e=>d({poiZoom:e})})),r(o.Option,{title:__("Hover")},r(o.Checkbox,{checked:t.tooltips,label:__("Open POIs on hover"),onChange:e=>d({tooltips:e})})),r(o.Option,{title:__("Open first POI")},r(o.Checkbox,{checked:t.initialOpenInfo,onChange:e=>d({initialOpenInfo:e}),label:__("Open first POI when a map is displayed")})),r(o.Option,{title:__("Travel lines")},r(o.Checkbox,{label:__("Connect POIs with lines"),checked:t.lines,onChange:e=>d({lines:e})})),function(){const e=e=>d({lineOpts:{...t.lineOpts,...e}}),a=t.lineOpts,i=r(o.Select,{label:__("Icon"),onChange:t=>{e(t?{icons:[{icon:{path:t}}]}:{icons:null})},options:[{value:0,label:__("Circle")},{value:1,label:__("Arrow")},{value:2,label:__("Open arrow")}],placeholder:__("None"),value:a.icons?a.icons[0].icon.path:null}),s=r(o.Checkbox,{label:__("Geodesic (curved) lines"),checked:!!a.geodesic,onChange:t=>e({geodesic:t})}),l=r(o.Checkbox,{label:__("Animate icon"),checked:!!a.animate,onChange:t=>e({animate:t})});return r(o.Option,{title:__("Travel line options"),className:"mapp-option-line-options"},r(o.Control,{labelRight:__("Color")},r(n.MappColorPicker,{color:a.color,weight:a.weight,opacity:a.opacity,isExtended:!0,onChange:t=>e(t)})),"google"==t.engine&&s,"google"==t.engine&&i,"google"==t.engine&&l)}()),r(o.Section,{title:__("POI List")},r(o.Option,{title:__("Display")},r(o.Checkbox,{checked:t.poiList,label:__("Show a list of POIs with each map"),onChange:e=>d({poiList:e})})),r(o.Option,{title:__("Position")},r("div",{className:"mapp-option-poilist-radios"},r(o.Radios,{checked:t.layout,options:[{value:"left",label:__("Left of map")},{value:"inline",label:__("Below map")}],onChange:e=>d({layout:e})}))),"left"==t.layout&&r(o.Option,{title:__("Initial open")},r("div",{className:"mapp-option-poilist-open"},r(o.Checkbox,{checked:t.poiListOpen,label:__("Open list when map is displayed"),onChange:e=>d({poiListOpen:e})}))),r(o.Option,{title:__("Paging")},r("div",{className:"mapp-option-poilist-page-size"},r(o.Input,{labelRight:__("POIs per page"),max:999,min:1,onChange:e=>d({poiListPageSize:e}),size:3,type:"number",value:t.poiListPageSize}))),r(o.Option,{title:__("Sort")},r(o.Checkbox,{checked:t.sort,label:__("Sort POI list by title"),onChange:e=>d({sort:e})}))),r(o.Section,{title:__("Styled Maps")},r(o.Option,{title:__("Default style")},r("div",{className:"mapp-option-style"},r(l.m,{selected:t.style,onChange:e=>{d({style:e}),mappl10n.options.style=e}}),r("div",null,__('Replace the default "roadmap" or "streets" style'))))),mappl10n.options.pro&&r(o.Section,{title:__("Icons")},r(o.Option,{title:__("Default icon")},r(i.MappIconPicker,{iconid:t.defaultIcon,onChange:e=>{mappl10n.options.defaultIcon=e,d({defaultIcon:e})}})),r(o.Option,{title:__("Icon directory")},r("code",null,t.helpers.icon_directory)),r(o.Option,{title:__("Highlight selected POI")},r(o.Radios,{checked:t.highlight,options:[{value:"",label:__("None")},{value:"circle",label:__("Circle")},{value:"scale",label:__("Scale")},{value:"icon",label:__("Icon")}],onChange:e=>d({highlight:e})}),"icon"==t.highlight&&r(i.MappIconPicker,{defaultIcon:t.defaultIcon,iconid:t.highlightIcon,onChange:e=>d({highlightIcon:e})})),function(){let e=t.iconScale&&Array.isArray(t.iconScale)?[...t.iconScale]:[0,0];return r(o.Option,{title:__("Icon size")},r(o.Input,{min:0,max:64,onChange:t=>{t<=64&&(e[0]=t>0?t:"",d({iconScale:e}))},size:3,type:"number",value:e[0]?e[0]:""}),r("span",null," X "),r(o.Input,{min:0,max:64,onChange:t=>{t<=64&&(e[1]=t>0?t:"",d({iconScale:e}))},size:3,type:"number",value:e[1]?e[1]:""}),r("span",null," (px) "))}(),function(){let e=v(t.helpers.taxonomies);e.unshift({value:"post_type",label:__("Post type")});const a=g((e=>{if("post_type"==t.autoicons.key)return v(t.helpers.post_types);const a=wp.data.select("core").getEntityRecords("taxonomy",t.autoicons.key,{per_page:-1,_fields:"id,name,slug"});return a?a.map((e=>({value:e.slug,label:e.name}))):[]}),[t.autoicons.key]);return r(o.Option,{title:__("Automatic icons")},r(o.Select,{label:__('Be sure to set "Show in REST API" for custom taxonomies'),value:t.autoicons?t.autoicons.key:null,options:e,onChange:e=>{let a=t.autoicons?{...t.autoicons}:[];a.key=e,a.values=[],d({autoicons:a})},placeholder:""}),r(o.MappGrid,{cols:[{id:"key",label:__("Key"),type:"select",options:a},{id:"value",label:__("Icon"),type:"icon"}],data:t.autoicons.values,onChange:e=>{let a=t.autoicons?{...t.autoicons}:[];a.values=e,d({autoicons:a})}}))}()),r(o.Section,{title:__("Clustering")},r(o.Option,{title:__("Clustering")},r(o.Checkbox,{checked:t.clustering,label:__("Enable marker clustering"),onChange:e=>d({clustering:e})})),function(){let e=t.clusteringOptions?t.clusteringOptions:{};const a=(t,a)=>{e[t]=a,d({clusteringOptions:e})};if("google"==t.engine){const t="https://github.com/googlemaps/v3-utility-library/blob/3fca406/packages/markerclustererplus/src/markerclusterer.ts",n=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18];return r("div",{className:"mapp-option-clustering-options"},r(o.Option,{title:__("Max zoom")},r(o.Select,{help:{href:t},label:r(p,null,__("Disable clustering at zoom"),r("code",null,"maxZoom")),onChange:e=>a("maxZoom",e),options:_.map(n,(e=>({value:e,label:e}))),placeholder:__("None"),value:e.maxZoom})))}{const t="https://github.com/Leaflet/Leaflet.markercluster#all-options",n=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18];return r("div",{className:"mapp-option-clustering-options"},r(o.Option,{title:__("Max zoom")},r(o.Select,{help:{href:t},label:r(p,null,__("Disable clustering at zoom"),r("code",null,"disableClusteringAtZoom")),onChange:e=>a("disableClusteringAtZoom",e),options:_.map(n,(e=>({value:e,label:e}))),placeholder:__("Auto"),value:e.disableClusteringAtZoom})),r(o.Option,{title:__("Spiderfy")},r(o.Checkbox,{checked:e.spiderfyOnMaxZoom,help:{href:t},label:r(p,null,__("Spiderfy"),r("code",null,"spiderfyOnMaxZoom")),onChange:e=>a("spiderfyOnMaxZoom",e)})))}}()),mappl10n.options.pro&&r(o.Section,{title:__("Mashups")},function(){const e=[{value:"poi",label:__("Open popup")},{value:"post",label:__("Open post")},{value:"postnew",label:__("Post in new tab")},{value:"postmodal",label:__("Post in modal")}];return r(o.Option,{title:__("Marker click")},r(o.Radios,{checked:t.mashupClick,options:e,onChange:e=>d({mashupClick:e})}))}(),r(o.Option,{title:__("Popup content")},r(o.Radios,{checked:t.mashupBody,options:[{value:"poi",label:__("POI title + POI body")},{value:"post",label:__("Post title + post excerpt")}],onChange:e=>d({mashupBody:e})})),r(o.Option,{title:__("KMLs")},r(o.Checkbox,{checked:t.mashupKml,label:__("Include KML POIs in mashups"),onChange:e=>d({mashupKml:e})}))),mappl10n.options.pro&&r(o.Section,{title:__("Search")},r(o.Option,{title:__("Search")},r(o.Checkbox,{checked:t.search,label:__("Enable search for mashups"),onChange:e=>d({search:e})})),r(o.Option,{title:__("Search radius")},r(o.Select,{help:{href:"https://mappresspro.com/mappress-documentation/#toc-mashup-search"},label:__("Minimum search radius (km)"),value:t.radius,options:_.map([1,5,10,15,25,50,75,100,200,300],(e=>({value:e,label:e}))),onChange:e=>d({radius:e})})),r(o.Option,{title:__("Search country")},r(o.Select,{label:__("Country code for searches"),value:t.country,options:_.map(["","AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","VG","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CK","CR","HR","CU","CW","CY","CZ","CD","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","CI","JM","JP","JE","JO","KZ","KE","KI","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","KP","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","CG","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","KR","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","VI","UG","UA","AE","GB","US","UM","UY","UZ","VU","VA","VE","VN","WF","EH","YE","ZM","ZW"],(e=>({value:e,label:e}))),onChange:e=>d({country:e}),help:{href:"https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements"}})),mappl10n.options.ssl?r(o.Option,{title:__("User location")},r(o.Checkbox,{checked:t.userLocation,label:__("Show user location on map"),onChange:e=>d({userLocation:e})})):null,function(){if("google"!=t.engine)return r(o.Option,{title:__("Bounding box")},r(o.Input,{onChange:e=>d({searchBox:e}),help:{text:__("Restrict searches to a bounding box (optional)"),href:"https://mappresspro.com/mappress-documentation/#toc-mashup-search"},placeholder:"SW lon, SW lat, NE lng, NE lat",size:45,value:t.searchBox}))}()),mappl10n.options.pro&&r(o.Section,{title:__("Mashup filters")},r(o.Option,{title:__("Filters position")},r(o.Radios,{options:[{value:"top",label:__("Top")},{value:"list",label:__("POI list")}],checked:t.filtersPos,onChange:e=>d({filtersPos:e})})),r(o.Option,{className:"mapp-option-filters",title:__("Filters")},r(o.MappCrudList,{data:t.filters,isDraggable:!0,onChangeData:e=>{d({filters:e})},onRender:e=>function(e){let{row:a,rowId:n,onChange:i,onDelete:s,...l}=e,p=v(t.helpers.taxonomies);const c=[{label:__("Post type"),value:"post"},{label:__("Text search"),value:"text"},{label:"──────────",value:"",disabled:!0},...p],m=function(e){const t=_.findWhere(c,{value:e.key});return t?t.label:__("New filter")},d="text"==a.key?[{value:"input",label:__("Input")}]:[{value:"checkbox",label:__("Checkboxes")},{value:"radio",label:__("Radio buttons")},{value:"select",label:__("Select")}];return r(o.MappExpand,{actions:r("div",null,r(f,{icon:"trash",onClick:()=>s(),title:__("Delete")})),className:"mapp-option-filter",initialOpen:!a.key,showToggle:!0,title:m(a)},r("div",{className:"mapp-option-filter-row"},r(o.Select,{labelTop:__("Filter type"),value:a.key,options:c,onChange:e=>i({key:e,format:"text"==e?"input":"checkbox"}),placeholder:""}),r(o.Select,{labelTop:__("Format"),value:a.format,options:d,placeholder:"",onChange:e=>i({format:e})}),r(o.Input,{labelTop:__("Label"),placeholder:m(a),value:a.label,onChange:e=>i({label:e})}),"post"!=a.key&&"meta"!=a.key&&"text"!=a.key&&r(o.Select,{labelTop:__("Sort"),value:a.sort,options:[{value:"name",label:__("Name")},{value:"slug",label:__("Slug")}],onChange:e=>i({sort:e})})),a.key&&"meta"!=a.key&&"text"!=a.key&&r("div",{className:"mapp-option-filter-row mapp-option-filter-tokens"},r(y,{label:__("Include"),value:a.include,onChange:e=>i({include:e}),__experimentalShowHowTo:!0}),r(y,{label:__("Exclude"),value:a.exclude,onChange:e=>i({exclude:e})})))}(e)}))),mappl10n.options.pro&&r(o.Section,{title:__("Templates")},r(o.Option,{title:__("Custom templates")},r(o.MappTemplateEditor)),r(o.Option,{title:__("Mashup thumbnails")},r(o.Select,{label:__("Popups"),onChange:e=>d({thumbsPopup:e}),options:[{value:"",label:__("None")},{value:"top",label:__("Top")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],value:t.thumbsPopup}),r(o.Select,{label:__("POI lists"),onChange:e=>d({thumbsList:e}),options:[{value:"",label:__("None")},{value:"top",label:__("Top")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],value:t.thumbsList})),r(o.Option,{title:__("Thumbnail size")},r(o.Select,{onChange:e=>d({thumbSize:e}),options:v(t.helpers.thumbnail_sizes),value:t.thumbSize}),r("span",null," "+__("or")+" "),r(o.Input,{value:t.thumbWidth,onChange:e=>d({thumbWidth:e}),type:"number",min:0,max:9999}),r("span",null," X "),r(o.Input,{value:t.thumbHeight,onChange:e=>d({thumbHeight:e}),type:"number",min:0,max:9999}),r("span",null," (px) "))),r(o.Section,{title:__("Localization")},function(){const e="leaflet"==t.engine?"https://en.wikipedia.org/wiki/ISO_639-1":"http://code.google.com/apis/maps/faq.html#languagesupport";return r(o.Option,{title:__("Language")},r(o.Select,{value:t.language,options:v(t.helpers.languages),onChange:e=>d({language:e}),help:{href:e,text:__("Language for searches and Google map controls")}}))}(),r(o.Option,{title:__("Directions server")},r(o.Input,{value:t.directionsServer,onChange:e=>d({directionsServer:e}),size:25}))),mappl10n.options.pro&&r(o.Section,{title:__("Generate Maps from Custom Fields")},r(o.Option,{title:__("Custom fields")},r(o.MappGrid,{cols:[{id:"key",label:__("Map field"),type:"select",options:v(t.helpers.meta_fields)},{id:"value",label:__("Custom field"),type:"combobox",options:v(t.helpers.meta_keys)}],data:t.metaKeys,onChange:e=>{d({metaKeys:e})}})),r(o.Option,{title:__("Post types")},r(o.Checkboxes,{values:t.postTypes,options:v(t.helpers.post_types),onChange:e=>d({postTypes:e})})),r(o.Option,{title:__("Overwrite")},r(o.Checkbox,{label:__("Overwrite maps when posts are saved"),checked:t.metaSyncSave,onChange:e=>{d({metaSyncSave:e})}})),"google"==t.engine&&r(o.Option,{title:__("Google Server API key")},r(o.Input,{name:"apiKeyServer",value:t.apiKeyServer,onChange:e=>d({apiKeyServer:e}),size:50,help:{text:__("Server API key for geocoding. Only required if client key is restricted by referrer."),href:"https://mappresspro.com/mappress-documentation/#toc-google-api-keys"}}))),mappl10n.options.pro&&mappl10n.options.acfActive&&r(o.Section,{title:__("Frontend Forms")},r(o.Option,{title:__("Advanced Custom Fields")},r(o.Input,{className:"mapp-option-acf",name:"acf",value:t.acf,onChange:e=>{d({acf:e})},placeholder:__("ACF field"),size:20}),__("ACF map field to include on MapPress mashups"),r(o.Help,{text:__("To generate MapPress maps from ACF fields, leave this blank and use the Geocoding section"),href:"https://mappresspro.com/mappress-documentation/#toc-frontend-forms"}))),r(o.Section,{title:__("Miscellaneous")},r(o.Option,{title:__("Map sizes")},r(o.MappGrid,{cols:[{id:"width",label:__("Width")+" (px, %, vw)",size:4},{id:"height",label:__("Height")+" (px, %, vh)"}],data:t.sizes,onChange:(e,t)=>d({sizes:e,size:t}),selectionColumn:"rowid",selected:t.size})),t.helpers.jetpack?null:r(o.Option,{title:__("Scripts")},r(o.Checkbox,{checked:t.footer,label:__("Output scripts in footer"),onChange:e=>d({footer:e}),help:{text:__("Disable footer scripts if maps are output using AJAX")}})),r(o.Option,{title:"WPML"},r(o.Checkbox,{checked:t.wpml,label:__("Copy maps when overwriting a translation"),onChange:e=>d({wpml:e}),help:{href:"https://mappresspro.com/mappress-documentation#wpml"}})),r(o.Option,{title:__("Compatibility")},r("div",null,r(o.Checkbox,{checked:t.deregister,label:__("Prevent loading Google Maps multiple times"),onChange:e=>d({deregister:e})})),r("div",null,r(o.Checkbox,{checked:t.iframes,label:__("Output maps in iframes to prevent compatibility issues"),onChange:e=>d({iframes:e})})))),r("div",{className:"mapp-options-toolbar"},r(f,{isBusy:t.isSaving,className:"mapp-options-save",type:"submit",isPrimary:!0},__("Save")),r(f,{isBusy:t.isSaving,isSecondary:!0,onClick:()=>w("reset")},__("Reset Defaults")))))}window.addEventListener("DOMContentLoaded",(e=>{document.getElementById("mapp-options-settings")&&wp.element.render(r(k,mappress_options_state),document.getElementById("mapp-options-settings"))}))},824:(e,t,a)=>{"use strict";a.r(t),a.d(t,{Control:()=>b,Help:()=>y,Checkbox:()=>v,Checkboxes:()=>k,Datalist:()=>w,Input:()=>C,Radios:()=>N,Select:()=>S,Textarea:()=>O,Section:()=>M,Option:()=>I,MappGrid:()=>P,MappCrudList:()=>E,MappExpand:()=>z,MappTabs:()=>T,MappTemplateEditor:()=>L});var o=a(805),n=a(939);const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useCallback:p,useRef:c,useState:m}=wp.element,{useSelect:d}=wp.data,{Button:u,Dashicon:h,Modal:g,TabPanel:f}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function b(e){let{className:t,help:a,type:o,...n}=e;const l=Array.isArray(n.children)?s:"label";let r="mapp-control";return o&&(r+=" mapp-control-"+o),t&&(r+=" "+t),i("div",{className:r},n.labelTop&&i("div",{className:"mapp-label-top"},n.labelTop),i(l,null,n.labelLeft&&i("span",null,n.labelLeft),n.children,(n.label||n.labelRight)&&i("span",null,n.label||n.labelRight)),a&&i(y,a))}function y(e){let t="mapp-help-text";e.type&&(t+=" mapp-help-"+e.type);let a=null;return e.href&&(a="#"==e.href.substr(0,1)?"https://mappresspro.com/mappress-documentation/"+e.href:e.href),i(s,null,a&&i("a",{className:"mapp-help-link",href:a,target:"_blank"},i(h,{icon:"editor-help"})),e.text&&i("div",{className:t},e.text))}function v(e){let{checked:t,className:a,disabled:o,onChange:n,value:s,...l}=e;return i(b,{type:"checkbox",...l},i("input",{checked:void 0!==t&&t,className:a,disabled:o,onChange:e=>n(e.target.checked),type:"checkbox",value:s}))}function k(e){let{label:t,onChange:a,options:o,values:n,...s}=e;return i(b,{type:"checkboxes",...s},_.map(o,((e,t)=>{let o=n?n.indexOf(e.value):-1;return i(v,{key:t,label:e.label,value:e.value,checked:o>=0,disabled:e.disabled,onChange:t=>{let i=[...n];t&&-1==o&&a(i.concat(e.value)),!t&&o>=0&&(i.splice(o,1),a(i))}})})))}function w(e){let{className:t,list:a,onChange:o,options:n,value:s,...l}=e;return i(b,{type:"select",...l},i("span",{className:t},i("input",{list:a,value:null!=s?s:"",onChange:e=>o(e.target.value)}),i("datalist",{id:a},_.map(n,((e,t)=>i("option",{key:t,value:e.value,disabled:e.disabled},e.label))))))}function C(e){let{autoFocus:t,disabled:a,max:o,min:n,name:s,onChange:l,placeholder:r,size:p,trim:c,type:m,value:d,...u}=e;return i(b,{type:"input",...u},i("input",{autoFocus:t,disabled:a,max:o,min:n,name:s,onChange:e=>{if(l){const t=c?e.target.value.trim():e.target.value;l(t)}},placeholder:r,size:p,type:m||"text",value:null!==d?d:""}))}const x=function(e){let{checked:t,className:a,disabled:o,onChange:n,value:s,...l}=e;return i(b,{type:"radio",...l},i("input",{checked:t,className:a,disabled:o,onChange:e=>n(e.target.value),type:"radio",value:s}))};function N(e){let{checked:t,label:a,onChange:o,options:n,...s}=e;return i(b,{type:"radios",...s},_.map(n,((e,a)=>{if(!e.hide)return i(x,{key:a,value:e.value,checked:t==e.value||null==t&&""==e.value,onChange:e=>o(e),disabled:e.disabled,label:e.label})})))}function S(e){let{className:t,onChange:a,options:o,placeholder:n,value:s,...l}=e,r=[...o];return void 0!==n&&r.unshift({value:"",label:n}),i(b,{type:"select",...l},i("select",{className:t,value:null!=s?s:"",onChange:e=>a(e.target.value)},_.map(r,((e,t)=>i("option",{key:t,value:e.value,disabled:e.disabled},e.label)))))}function O(e){let{className:t,onChange:a,...o}=e;return i(b,{type:"textarea",...o},i("textarea",{className:t,onChange:e=>a(e.target.value)}))}function M(e){let t=e.className?" "+e.className:"";return i("div",{className:"mapp-option-section"+t},i("h2",null,e.title),e.children)}function I(e){const t=e.className?"mapp-option "+e.className:"mapp-option";return i("div",{className:t},i("div",{className:"mapp-option-title"},e.title),i("div",{className:"mapp-option-value"},e.children))}function P(e){const[t,a]=m({dragging:null,dragover:null});function n(e){a((t=>({...t,...e})))}function s(a,o){let i=[...e.data];switch(a){case"add":let a={};_.map(e.cols,(e=>{a[e.id]=""})),i.push(a),e.onChange(i,e.selected);break;case"change":i[o.i][o.id]=o.value,e.onChange(i,e.selected);break;case"delete":let s;i.splice(o,1),s=o==e.selected?null:o<e.selected?e.selected-1:e.selected,e.onChange(i,s);break;case"select":n({selected:o}),e.onChange(i,o);break;case"sort":let l=t.dragging,r=l<o?o-1:o;i.splice(r,0,i.splice(l,1)[0]),e.onChange(i,r),n({dragover:null})}}return i("div",{className:e.className?"mapp-grid "+e.className:"mapp-grid"},e.data&&!!e.data.length&&i("div",{className:"mapp-grid-table"},function(){const t=e.selectionColumn?i("div",{className:"mapp-grid-cell",key:"select"},__("Default")):null,a=i("div",{className:"mapp-grid-cell",key:"actions"},"");return i("div",{className:"mapp-grid-header"},i("div",{className:"mapp-grid-row"},t,_.map(e.cols,(e=>i("div",{className:"mapp-grid-cell",key:e.id},e.label))),a))}(),i("div",{className:"mapp-grid-body"},_.map(e.data,((a,l)=>function(a,l){return i("div",{className:"mapp-grid-row"+(t.dragover==l?" mapp-dragover":""),draggable:!0,key:l,onDragOver:e=>e.preventDefault(),onDragStart:e=>n({dragging:l}),onDragEnter:e=>n({dragover:l}),onDragEnd:e=>n({dragging:null,dragover:null}),onDrop:e=>s("sort",l)},function(t,a){if(!e.selectionColumn)return null;let o,n;return"rowid"==e.selectionColumn?o=a:t[e.selectionColumn]?o=t[e.selectionColumn]:n=!0,"checkbox"===e.selectionType?i("div",{className:"mapp-grid-cell"},i(v,{value:o,checked:e.selected==o,disabled:n,onChange:e=>{s("select",e?o:null)}})):i("div",{className:"mapp-grid-cell"},i(x,{checked:e.selected==o,onChange:()=>s("select",o)}))}(a,l),_.map(e.cols,((t,a)=>i("div",{className:"mapp-grid-cell mapp-grid-cell-"+t.id,key:l+"-"+a},function(t,a){if(a.onRender)return a.onRender({id:a.id,value:e.data[t][a.id],onChange:e=>s("change",{i:t,id:a.id,value:e})});switch(a.type){case"combobox":return i(w,{list:a.id+"_"+t,options:a.options,value:e.data[t][a.id],onChange:e=>s("change",{i:t,id:a.id,value:e})});case"icon":return i(o.MappIconPicker,{iconid:e.data[t][a.id],onChange:e=>s("change",{i:t,id:a.id,value:e})});default:return i(C,{size:e.data[t][a.size],value:e.data[t][a.id],onChange:e=>s("change",{i:t,id:a.id,value:e})});case"select":return i(S,{value:e.data[t][a.id],options:a.options,onChange:e=>s("change",{i:t,id:a.id,value:e}),placeholder:""})}}(l,t)))),function(e){return i("div",{className:"mapp-grid-cell",key:"delete"},i(u,{icon:"trash",onClick:()=>s("delete",e)}))}(l))}(a,l))))),i("div",{className:"mapp-grid-toolbar"},i(u,{isSecondary:!0,onClick:()=>s("add")},__("Add"))))}function E(e){let{data:t,isDraggable:a,onAdd:o,onChangeData:n,onRender:s,...r}=e;const[p,c]=m({dragging:null,dragover:null,isDraggable:!1});function d(e){c((t=>({...t,...e})))}function h(e,a,i){let s=Array.isArray(t)?[...t]:[];switch(e){case"add":const e=o?o():{};s.push(e),n(s);break;case"change":s[i]={...t[i],...a},n(s);break;case"delete":confirm(mappl10n.delete_prompt)&&(s.splice(a,1),n(s));break;case"sort":let l=p.dragging,r=l<a?a-1:a;s.splice(r,0,s.splice(l,1)[0]),n(s),d({dragover:null})}}return l((()=>{}),[]),i("div",{className:"mapp-crud-list"},_.map(t,((e,t)=>i("div",{className:"mapp-crud-row"+(p.dragover==t?" mapp-dragover":""),draggable:a,key:t,onDragOver:e=>e.preventDefault(),onDragStart:e=>d({dragging:t}),onDragEnter:e=>d({dragover:t}),onDragEnd:e=>d({dragging:null,dragover:null}),onDrop:e=>h("sort",t)},s({row:e,rowId:t,onChange:e=>h("change",e,t),onDelete:()=>h("delete",t)})))),i("div",{className:"mapp-crud-toolbar"},i(u,{isSecondary:!0,onClick:()=>h("add")},__("Add"))))}function z(e){let{actions:t,initialOpen:a,showToggle:o,subTitle:n,title:s,...l}=e;const[r,p]=m({isOpen:!o||a});function c(e,t){if("toggle"===e)o&&(a={isOpen:!r.isOpen},p((e=>({...e,...a}))));var a}let d="mapp-expand";return d+=r.isOpen?"":" mapp-expand-closed",d+=l.className?" "+l.className:"",i("div",{className:d},i("div",{className:"mapp-expand-header",onClick:()=>c("toggle")},i("div",null,s,n),o&&i("div",null,i(h,{icon:r.isOpen?"arrow-up":"arrow-down"}))),i("div",{className:"mapp-expand-body"},l.children),t&&i("div",{className:"mapp-expand-footer"},t))}function T(e){e={onRender:null,onSelect:null,initialTab:null,tabs:[],...e};const[t,a]=m({tab:e.initialTab?e.initialTab:e.tabs[0].name});function o(t){var o;o={tab:t},a((e=>({...e,...o}))),e.onSelect&&e.onSelect(t)}const{className:n="",style:s={}}=e;return i("div",{className:"mapp-tabs "+n,style:s},i("div",{className:"mapp-tabs-nav"},_.map(e.tabs,(e=>i("div",{className:e.name==t.tab?"mapp-tab mapp-active":"mapp-tab",key:e.name,onClick:()=>o(e.name)},e.label)))),i("div",{className:"mapp-tab-content"},e.onRender(t.tab)))}function L(e){const[t,a]=m({codeEditor:null,isOpen:!1,name:null,tab:"editor",template:null,tokens:null});function o(e){a((t=>({...t,...e})))}const l=p((e=>{if(null!=e){let a=wp.codeEditor.initialize(e);a.codemirror.setSize("auto","auto"),a.codemirror.setOption("readOnly","editor"!=t.tab),o({codeEditor:a})}}),[]);function r(e,a){switch(e){case"close":o({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&(n.mappLib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:t.template.name,nonce:mappl10n.options.nonce}}),o({isOpen:!1}));break;case"insert":let e=t.codeEditor.codemirror.getDoc(),i=e.getCursor();e.replaceRange("{{{poi."+a+"}}}",i);break;case"open":n.mappLib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:a,nonce:mappl10n.options.nonce},callback:e=>{e&&"OK"==e.status&&o({isOpen:!0,name:a,tab:"editor",template:e.data.template,tokens:e.data.tokens})}});break;case"save":let s="editor"==t.tab?t.codeEditor.codemirror.getValue():t.template.content;n.mappLib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:s,name:t.template.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&o({isOpen:!1,template:null,tokens:null})}});break;case"tab-select":if("editor"!=a){let e={...t.template};e.content=t.codeEditor.codemirror.getValue(),o({template:e})}o({tab:a})}}function c(){const e=t.template.name+" ("+(t.template.exists?__("Custom"):__("New"))+")";return i("div",{className:"mapp-templates-name"},e)}return i("div",{className:"mapp-templates"},function(){const e=[{name:"map-popup",label:__("Map popup")},{name:"map-item",label:__("Map list item")},{name:"mashup-popup",label:__("Mashup popup")},{name:"mashup-item",label:__("Mashup list item")}];return i("div",{className:"mapp-templates-list"},_.map(e,((e,t)=>i("a",{href:"#",key:e.name,className:"mapp-templates-item",onClick:t=>{t.preventDefault(),r("open",e.name)}},e.label))))}(),t.isOpen&&t.template?i(g,{title:c(),className:"mapp-templates-modal",onRequestClose:()=>r("close"),shouldCloseOnClickOutside:!1},i(f,{className:"mapp-templates-tabs",onSelect:e=>r("tab-select",e),tabs:[{name:"editor",title:__("Editor")},{name:"standard",title:__("Default")}]},(e=>function(){const e=i("div",{className:"mapp-templates-tokens"},_.map(t.tokens,((e,t)=>i("code",{onClick:()=>r("insert",e.token),key:t,title:e.label},e.label)))),a=i("div",{className:"mapp-templates-path"},t.template.path);return i(s,null,"editor"==t.tab&&a,"editor"==t.tab&&e,i("div",{className:"editor"==t.tab?"mapp-templates-editor":"mapp-templates-standard"},i("textarea",{ref:l,defaultValue:"editor"==t.tab?t.template.content:t.template.standard})))}())),t.error&&i("div",{className:"mapp-templates-error"},t.error),i("div",{className:"mapp-templates-toolbar"},i(u,{isPrimary:!0,onClick:()=>r("save")},__("Save")),i(u,{isSecondary:!0,onClick:()=>r("close")},__("Cancel")),t.template.exists&&i("a",{onClick:e=>{e.preventDefault(),r("delete")}},__("Delete")))):null)}},535:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappOptionsMeta:()=>f});var o=a(824),n=a(939);const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useCallback:p,useRef:c,useState:m}=wp.element,{Button:d,Dashicon:u,FormTokenField:h,Modal:g}=wp.components,{sprintf}=wp.i18n,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function f(e){e={errors:null,postEdit:null,userEdit:null,...e};const[t,a]=m({errors:[],isBusy:!1,isDone:!1,logs:[],otype:null,start:0});c(null);function r(e){a((t=>({...t,...e})))}function p(a){if(a)return i("div",{className:"mapp-option-geocode-log"},_.map(t.logs,(t=>{let a="";return a="user"==t.otype?e.userEdit+"?user_id="+t.oid:e.postEdit+"?post="+t.oid+"&action=edit",i("div",{className:"mapp-option-geocode-log-row",key:t.oid},i("div",null,t.otype),i("div",null,t.oid),i("div",null,i("a",{href:a,target:"_blank"},t.title)),i("div",null,t.msg))})))}l((()=>{t.isDone&&("post"==t.otype?r({isDone:!1,start:1,otype:"user"}):r({isBusy:!1}))}),[t.start,t.isDone]),l((()=>{t.start>0&&!t.isDone&&(t.otype,n.mappLib.ajax({type:"POST",data:{action:"mapp_geocode",batch_size:5,nonce:mappl10n.options.nonce,otype:t.otype,start:t.start},callback:e=>{if(e&&"OK"==e.status){const a=e.data.logs.length<5;r({errors:e.data.errors,isDone:a,logs:t.logs.concat(e.data.logs),start:a?t.start:t.start+5})}}}))}),[t.start,t.isDone]);const u=t.logs.length?t.logs.length:1;let h="";return t.isBusy?h=__("Geocoding... "+u):t.isDone&&(h=__("Done")),i(s,null,i(o.Option,{title:__("Geocoding")},i(d,{className:"mapp-option-geocode",disabled:t.isBusy,isBusy:t.isBusy,isSecondary:!0,onClick:()=>{t.isBusy||r({isDone:!1,isBusy:!0,errors:[],logs:[],otype:"post",start:1})}},__("Geocode now")),h,i("div",{style:{fontStyle:"italic"}},__("New posts will be geocoded when they are published."),__("Use an online geocoding service for bulk geocoding (>100 items).")),p(t.logs)),function(){const e=t.errors.length>0?p(t.errors):__("No errors");return i(o.Option,{title:__("Geocoding errors")},i("div",{className:"mapp-option-geocode-errors"},e))}())}},477:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>C});var o=a(713),n=a(191),i=(a(939),a(27)),s=a(677);window.mapp=window.mapp||{};const l=wp.element.createElement,{select:r}=wp.data,{Fragment:p,useEffect:c,useLayoutEffect:m,useRef:d,useState:u}=wp.element,{BaseControl:h,Button:g,Dashicon:f,Icon:b,Modal:y,PanelBody:v,Spinner:k,TextControl:w}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function C(e){e={context:null,filter:null,mapid:null,mode:null,onClose:null,onInsert:null,onTrash:null,...e};const[t,a]=u({counts:{all:null,trashed:null,object:null},filter:"all",isFetchingItems:!0,items:null,mode:e.mode?e.mode:"list",mapid:e.mapid?e.mapid:null,page:1,search:""}),{addSnackbar:p,renderSnackbar:m}=(0,s.D)(),h=d(null),v=d(null),C=d(null);function x(e){a((t=>({...t,...e})))}function N(e,t,a){mapp.store.mutateMap(e,{postid:t,postTitle:a})}function S(){e.onClose()}function O(e){"trashed"!=t.filter&&x({mode:"edit",mapid:e})}function M(a){let n,i=a.mapid==t.mapid;n=a.title?a.title:__("Untitled");let s,c=function(t){let a;return a="map"==e.context||"mashup"==e.context&&t.postid==mappl10n.options.postid?r("core/editor").getEditedPostAttribute("title"):t.post_title,a=a||__("Untitled"),t.postid>0&&t.postid==mappl10n.options.postid&&(a=__("Current post")),t.postid>0?t.postid==mappl10n.options.postid?a:l("a",{href:mappl10n.options.editurl+"?post="+t.postid+"&action=edit",target:"_blank",title:__("Edit post")},a):__("Unattached")}(a);s="trashed"==t.filter?l("div",{className:"mapp-pick-actions",onClick:e=>e.stopPropagation()},l("a",{href:"#",key:"restore",onClick:()=>{return e=a.mapid,mapp.store.mutateMap(e,{status:""}),void p(__("Map restored"));var e}},__("Restore")),l("a",{href:"#",className:"mapp-destructive",key:"delete",onClick:()=>{return e=a.mapid,confirm(mappl10n.delete_map_prompt)&&(mapp.store.destroyMap(e),p(__("Map deleted"))),void(v.current&&v.current.focus());var e}},__("Delete Permanently"))):l("div",{className:"mapp-pick-actions",onClick:e=>e.stopPropagation()},l("a",{href:"#",key:"edit",onClick:e=>{e.stopPropagation(),O(a.mapid)}},__("Edit")),"library"!=e.context&&l("a",{href:"#",key:"insert",onClick:t=>{return o=a.mapid,void e.onInsert(o);var o}},__("Insert into post")),l("a",{href:"#",key:"duplicate",onClick:e=>{return t=a.mapid,void mapp.store.duplicateMap(t,(e=>{p(__("Map copied")),x({mapid:e.mapid}),h.current&&(h.current.scrollTop=0)}));var t}},__("Copy")),l("a",{href:"#",className:"mapp-destructive",key:"trashed",onClick:o=>{return n=a.mapid,mapp.store.mutateMap(n,{status:"trashed"}),p(__("Map moved to trash")),void(t.mapid&&n==t.mapid&&e.onTrash&&e.onTrash());var n}},__("Trash")));let m=null;return m=a.postid>0?l("a",{href:"#",onClick:()=>{return e=a.mapid,void mapp.store.mutateMap(e,{postid:0});var e}},__("Detach")):"library"==e.context?l(o.MappAttachControl,{onChange:(e,t)=>N(a.mapid,e,t)},__("Attach")):l("a",{href:"#",onClick:()=>N(a.mapid,mappl10n.options.postid,null)},__("Attach")),l("div",{className:"mapp-pick-item"+(i?" mapp-selected":""),key:a.mapid+"|"+a.postid,ref:i?C:null},l("div",{className:"mapp-pick-col-mapid",onClick:()=>O(a.mapid)},a.mapid),l("div",{className:"mapp-pick-col-title",onClick:()=>O(a.mapid)},l("div",null,n),l("div",null,s)),l("div",{className:"mapp-pick-col-post-title"},c,l("div",null,m)),"library"==e.context&&l("div",{className:"mapp-pick-col-shortcode"},l(g,{isSmall:!0,isSecondary:!0,onClick:e=>{e.stopPropagation(),e.preventDefault(),function(e){const t=document.createElement("input");document.body.appendChild(t),t.value='[mappress mapid="'+e+'"]',t.select(),document.execCommand("copy"),t.remove(),p(__("Shortcode copied"))}(a.mapid)}},__("Copy"))))}function I(e){return e&&e.length?l(i.MappPaginate,{count:e?e.length:0,onChange:e=>function(e){x({page:e}),h.current&&(h.current.scrollTop=0)}(e),page:t.page,pageSize:20}):null}c((()=>{const e=e=>{if(!e.isFetchingItems){let t={all:0,object:0,trashed:0};_.map(e.items,(e=>{"trashed"==e.status?t.trashed++:(t.all++,e.postid==mappl10n.options.postid&&t.object++)})),x({counts:t})}x({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return mapp.store.subscribe(e),()=>mapp.store.unsubscribe(e)})),c((()=>{mapp.store.fetchItems((t=>{const a=e.mapid?t.find((t=>t.mapid==e.mapid)):null;a&&("trashed"==a.status?x({filter:"trashed"}):a.postid==mappl10n.options.postid&&x({filter:"object"}))}))}),[]),c((()=>{x({page:1})}),[t.filter,t.search]),c((()=>{"list"==t.mode&&v.current&&v.current.focus()}),[t.mode]);const P=_.filter(t.items,(function(e){if("trashed"==t.filter)return"trashed"==e.status;if("trashed"==e.status)return!1;if("object"==t.filter&&e.postid!=mappl10n.options.postid)return!1;var a=t.search.toLowerCase();return!a||(e.mapid.indexOf(a)>=0||(!!(e.post_title&&e.post_title.toLowerCase().indexOf(a)>=0)||!!(e.title&&e.title.toLowerCase().indexOf(a)>=0)))}));let E=l("div",{className:"mapp-list-panel"},l("div",{className:"mapp-gt-modal-header"},l("div",{className:"mapp-gt-modal-header-title"},l("h1",null,__("Maps")),l(g,{isPrimary:!0,onClick:()=>{x({mode:"edit",mapid:null})}},__("Add New"))),l(g,{onClick:()=>S(),icon:"no-alt"})),function(){let a=[{label:__("All"),value:"all"},{label:__("Attached to post"),value:"object",hide:"library"==e.context},{label:__("Trash"),value:"trashed"}];return l("div",{className:"mapp-pick-filter-wrapper"},l("div",{className:"mapp-pick-filter-tabs"},_.map(a,((e,a)=>{const o="mapp-pick-filter-tab"+(t.filter==e.value?" mapp-active":""),n=t.counts[e.value];if(!e.hide)return l("div",{className:o,href:"#",key:a,onClick:()=>function(e){x({filter:e})}(e.value)},e.label,null!=n&&l("span",{className:"mapp-pick-filter-count"},n))}))),function(){if("trashed"!=t.filter)return l("div",{className:"mapp-pick-search-wrapper"},l(w,{ref:v,className:"mapp-pick-search",tabIndex:1,placeholder:__("post title, map title, or map id"),onChange:e=>x({search:e}),size:50,value:t.search}),l(b,{icon:"search"}),(t.isFetchingItems||t.isAttaching&&"library"!=e.context)&&l(k,null))}())}(),function(a){if(a){const e=20*(t.page-1),o=e+20;a=a.slice(e,o)}let o="";return o=t.isFetchingItems?null:a.length?_.map(a,M):l("div",{className:"mapp-pick-message"},__("No maps found")),l("div",{className:"mapp-pick-items-section"},l("div",{className:"mapp-pick-items",ref:h},function(){let t=[{id:"mapid",className:"mapp-pick-col-mapid",label:__("ID"),sortable:!0},{id:"title",className:"mapp-pick-col-title",label:__("Map title"),sortable:!0},{id:"post_title",className:"mapp-pick-col-post-title",label:__("Attached to"),sortable:!0}];"library"==e.context&&t.push({id:"shortcode",className:"mapp-pick-col-shortcode",label:__("Shortcode"),sortable:!1});return l("div",{className:"mapp-pick-items-header"},_.map(t,(e=>l("div",{className:e.className,onClick:()=>{return t=e.id,void mapp.store.setSort({sortBy:t,sortAsc:mapp.store.state.sortBy!=val||!mapp.store.state.sortAsc});var t},key:e.id},e.label,e.sortable&&mapp.store.state.sortBy==e.id&&l(f,{icon:mapp.store.state.sortAsc?"arrow-up":"arrow-down"}),e.sortable&&mapp.store.state.sortBy!=e.id&&l(f,{icon:"leftright"})))))}(),o))}(P),function(e){return l("div",{className:"mapp-pick-toolbar"},I(e))}(P)),z=null;if("edit"==t.mode){let a=l("div",{className:"mapp-edit-panel"},l(n.MappEdit,{context:e.context,mapid:t.mapid,onClose:()=>{"edit"==e.mode?e.onClose():x({mode:"list"})},onSave:t=>function(t){"edit"==e.mode?e.onClose(t.mapid):(x({mode:"list",mapid:t.mapid}),p(sprintf(__("Map %d saved"),t.mapid)))}(t)}));z="library"==e.context?l(y,{className:"mapp-gt-modal",isDismissible:!1},a):a}const T="mapp-pick mapp-mode-"+t.mode+" mapp-context-"+e.context;return"library"==e.context?l("div",{className:T},E,z,m()):l(y,{className:"mapp-gt-modal "+T,isDismissible:"list"==t.mode,onRequestClose:()=>S(),shouldCloseOnEsc:"list"==t.mode,shouldCloseOnClickOutside:"list"==t.mode},E,z,m())}window.addEventListener("DOMContentLoaded",(e=>{document.getElementById("mapp-library")&&(mappl10n.options.postid=0,wp.element.render(l(C,{context:"library"}),document.getElementById("mapp-library")))}))},429:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappSettings:()=>y});var o=a(710),n=a(677),i=a(824);window.mapp=window.mapp||{};const s=wp.element.createElement,{Fragment:l,useEffect:r,useLayoutEffect:p,useRef:c,useState:m}=wp.element,{BaseControl:d,Button:u,ButtonGroup:_,Dashicon:h,Dropdown:g,Panel:f,PanelBody:b}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function y(e){e={context:null,map:null,onChange:null,center:null,height:null,mapid:null,poiList:null,search:null,title:null,width:null,zoom:null,...e};const[t,a]=m({});const{addSnackbar:r,renderSnackbar:p}=(0,n.D)();function c(t,a){let o={};null!=a&&(o.height=a),null!=t&&(o.width=t),(o.width||o.height)&&(e.map.setSize(o),e.onChange(o))}const d="mce"!=e.context&&"library"!=e.context;return s("div",{className:"mapp-settings"},s(b,{title:__("Map settings"),initialOpen:d},"map"==e.context&&function(){const t=e.map.title?e.map.title:__("Untitled");return s("div",{className:"mapp-settings-row mapp-settings-title"},s(i.Control,{labelTop:__("Title")},t),s(i.Control,{labelTop:__("Map ID")},e.map.mapid))}(),function(){if("mashup"==e.context)return s("div",{className:"mapp-settings-row mapp-style-toggle"},s("div",null,__("Style")),s(o.m,{map:e.map,selected:e.map.mapTypeId,onChange:t=>function(t){e.map&&e.map.set({mapTypeId:t}),e.onChange({mapTypeId:t})}(t)}))}(),function(){mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];var t=mappl10n.options.sizes.map(((e,t)=>({label:e.width+" X "+e.height,height:e.height,width:e.width,value:t+1})));t.unshift({height:"",label:__("Default"),value:0,width:""}),t.push({label:__("Custom"),value:"custom",disabled:!0});for(var a="custom",o=0;o<t.length-1;o++)t[o].width==e.width&&t[o].height==e.height&&(a=o);return s(l,null,s("div",{className:"mapp-settings-row"},s(i.Select,{className:"mapp-settings-dims-select",help:"",labelTop:__("Size"),value:a,options:t,onChange:e=>c(t[e].width,t[e].height)})),s("div",{className:"mapp-settings-row"},s(i.Input,{className:"mapp-settings-dims-custom",help:{text:__("px, %, vw")},labelTop:__("Width"),onChange:e=>c(e,null),value:e.width?e.width:""}),s(i.Input,{className:"mapp-settings-dims-custom",help:{text:__("px, %, vh")},labelTop:__("Height"),onChange:e=>c(null,e),value:e.height?e.height:""})))}(),s("div",{className:"mapp-settings-row"},s(i.Control,{className:"mapp-settings-viewport",labelTop:__("Center/Zoom")},s(_,{label:__("Center/Zoom")},s(u,{onClick:()=>(e.map.center=e.map.zoom=null,e.map.recenter(),r(__("Viewport automatic")),void e.onChange({center:void 0,zoom:void 0})),isPressed:!e.center,isSmall:!0},__("Automatic")),s(u,{onClick:()=>function(){let t=e.map.getCenter().toJSON();e.map.center=t,e.map.zoom=e.map.getZoom(),r(__("Viewport set")),e.onChange({center:t.lat+","+t.lng,zoom:e.map.getZoom()})}(),isPressed:e.center,isSmall:!0},__("Set"))))),void 0,p()))}},677:(e,t,a)=>{"use strict";a.d(t,{D:()=>l});const{useEffect:o,useState:n}=wp.element,{createContext:i}=React,s=wp.element.createElement,l=()=>{const[e,t]=n({snackbars:[]});function a(e){t((t=>({...t,...e})))}o((()=>{if(e.snackbars.length){const t=setTimeout((()=>{let t=[...e.snackbars];t.shift(),a({snackbars:t})}),5e3);return()=>clearTimeout(t)}}),[e.snackbars]);return{addSnackbar:t=>a({snackbars:[...e.snackbars,t]}),renderSnackbar:()=>s("div",{className:"mapp-snackbars"},e.snackbars.map(((e,t)=>s("div",{className:"mapp-snackbar mapp-snackbar-show",key:t},e))))}}},787:(e,t,a)=>{"use strict";a.r(t);var o=a(939);window.mapp=window.mapp||{};mapp.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,sortBy:"mapid",sortAsc:!1,maps:{},items:[]}},mapp.Store.prototype={createMap:function(){let{success:e=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.state.isFetchingMap=!1,this.publish(),e()},destroyMap:function(e){o.mappLib.ajax({type:"POST",data:{action:"mapp_delete",mapid:e,nonce:mappl10n.options.nonce},callback:t=>{t&&"OK"==t.status&&(delete this.state.maps[e],this.destroyItem(e)),this.publish()}})},duplicateMap:function(e,t){this.state.isSavingMap=!0,this.publish(),o.mappLib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:e,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:e=>{if(e&&"OK"==e.status){let a=e.data,o=a.mapid;this.state.maps[o]=a,this.saveItem(o,a),t&&t(a)}this.state.isSavingMap=!1,this.publish()}})},fetchMap:function(e){void 0===this.state.maps[e]?(this.state.isFetchingMap=!0,this.publish(),o.mappLib.ajax({type:"GET",data:{action:"mapp_get",mapid:e,nonce:mappl10n.options.nonce},callback:t=>{t&&"OK"==t.status?this.state.maps[e]=t.data:this.state.maps[e]=null,this.state.isFetchingMap=!1,this.publish()}})):this.publish()},mutateMap:function(e,t){this.state.isSavingMap=!0,this.saveItem(e,t),this.publish(),o.mappLib.ajax({type:"POST",data:{action:"mapp_mutate",mapid:e,mapdata:t,nonce:mappl10n.options.nonce},callback:e=>{this.state.isSavingMap=!1,this.publish()}})},saveMap:function(e,t){this.state.isSavingMap=!0,this.publish(),o.mappLib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(e),nonce:mappl10n.options.nonce},callback:a=>{if(a&&"OK"==a.status){const o=a.data;e.mapid=o,this.state.maps[o]=e,this.saveItem(o,e),t&&t(e)}this.state.isSavingMap=!1,this.publish()}})},destroyItem:function(e){let t=this.state.items?this.state.items:[],a=_.findIndex(t,{mapid:e});a>-1&&t.splice(a,1),this.state.items=[...t],this.publish()},fetchItems(e){if(this.state.itemsFetched)return this.publish(),void(e&&e(this.state.items));this.state.isFetchingItems=!0,this.publish(),o.mappLib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:t=>{t&&"OK"==t.status&&(this.state.items=t.data,this.sort(),this.state.itemsFetched=!0,e&&e(this.state.items)),this.state.isFetchingItems=!1,this.sort(),this.publish()}})},saveItem:function(e,t){let a=this.state.items?this.state.items:[],o=_.findWhere(a,{mapid:e});o?(_.map(["mapid","title","postid","post_title","status"],(e=>{void 0!==t[e]&&(o[e]=t[e])})),o={...o}):(o={mapid:e,title:t.title,postid:mappl10n.options.postid,post_title:null},a.unshift(o))},setSort:function(e){e.sortBy&&(this.state.sortBy=e.sortBy),void 0!==e.sortAsc&&(this.state.sortAsc=e.sortAsc),this.sort(),this.publish()},sort:function(e,t){const a=(o="untitled",wp.i18n.__(o,"mappress-google-maps-for-wordpress"));var o;this.state.items.sort(((e,t)=>function(e,t,o,n){if(n=n?1:-1,"mapid"==o)return n*(Number(e.mapid)-Number(t.mapid));let i=e[o]?e[o]:a,s=t[o]?t[o]:a,l=n*i.localeCompare(s);return 0==l?Number(e.mapid)-Number(t.mapid):l}(e,t,this.state.sortBy,this.state.sortAsc)))},subscribe:function(e){this.subs.add(e)},unsubscribe:function(e){this.subs.delete(e)},publish:function(){let e=[...this.subs];for(let t of e)t(this.state)}},mapp.store=new mapp.Store},710:(e,t,a)=>{"use strict";a.d(t,{m:()=>w});var o=a(824),n=a(939),i=a(27);const s=wp.element.createElement,{Fragment:l,useEffect:r,useLayoutEffect:p,useRef:c,useState:m}=wp.element,{Button:d,Dashicon:u,ExternalLink:h,Icon:g,Modal:f,Panel:b,PanelBody:y,PanelRow:v,Spinner:k}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function w(e){const[t,a]=m({apiKey:"6a0cfe9e-3670-4598-a63e-f1627b5c9e56",isOpen:!1,isBusy:!1,isSearching:!1,mapboxError:"",mapboxId:"",mapboxName:"",mapboxUser:"",mapboxUrl:"",mapboxParsedUrl:"",mode:"pick",page:1,snazzyPagination:null,snazzySearch:"",snazzySelected:null,snazzyStyles:null,standardStyles:mappl10n.options.standardStyles,userStyles:mappl10n.options.userStyles});function r(e){a((t=>({...t,...e})))}function p(a){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=_.findIndex(t.userStyles,{id:a.id});i>=0&&!o&&!confirm(__("Style already exists, overwrite?"))||(r({isBusy:!0}),n.mappLib.ajax({type:"POST",data:{action:"mapp_style_save",style:a,nonce:mappl10n.options.nonce},callback:t=>{r({isBusy:!1}),t&&"OK"==t.status&&(mappl10n.options.userStyles=t.data,r({mode:"pick",userStyles:t.data}),e.onChange(a.id))}}))}function c(e){r({isSearching:!0,snazzyStyles:null}),n.mappLib.ajax({type:"GET",data:{sort:"popular",page:e,pageSize:50,text:t.snazzySearch,key:t.apiKey},url:"https://snazzymaps.com/explore.json",callback:function(e){if(r({isSearching:!1,snazzyPagination:e&&e.pagination?e.pagination:null}),e&&e.styles){r({snazzyStyles:_.map(e.styles,((e,t)=>(e.id=e.id+"",e)))})}else alert("Error: unable to fetch styles")}})}function u(e,t){t="large"==t||"small"==t?t:"small",t=800;let a=mappl10n.options.baseurl+"/images/json_style.png";if("leaflet"==mappl10n.options.engine?mappl10n.options.mapbox?e.user&&e.mapboxid&&(a="https://api.mapbox.com/styles/v1/"+e.user+"/"+e.mapboxid+"/static/-122.4194,37.7749,10,0/800x800?access_token="+mappl10n.options.mapbox):a=mappl10n.options.baseurl+"/images/osm.png":e.imageUrl&&(a=e.imageUrl),a)return s("img",{src:a,title:e.name})}function b(a,o){switch(a){case"close":case"pick-cancel":r({isOpen:!1});break;case"json-add":r({mode:"json-add"});break;case"json-cancel":case"mapbox-cancel":case"snazzy-cancel":r({mode:"pick"});break;case"json-edit":e.onChange(o.id),r({mode:"json-edit"});break;case"json-save":p(o,!0);break;case"mapbox-add":case"snazzy-add":alert(__("Please upgrade to MapPress Pro to use custom styles"));break;case"mapbox-change-url":{let e,t,a;e=o.trim().toLowerCase(),e=e.replace(".html","").replace("https://api.mapbox.com/styles/v1/","").replace("mapbox://styles/",""),e=e.split("?")[0];let n=e.split("/");2==n.length&&(t=n[0],a=n[1]),r({mapboxUrl:o,mapboxUser:t,mapboxId:a});break}case"mapbox-edit":e.onChange(o.id),r({mode:"mapbox",mapboxId:o.mapboxid,mapboxName:o.name,mapboxUrl:o.url,mapboxUser:o.user});break;case"mapbox-save":t.mapboxName&&t.mapboxUser&&p({id:t.mapboxId,name:t.mapboxName,mapboxid:t.mapboxId,provider:"mapbox",url:t.mapboxUrl,user:t.mapboxUser});break;case"mode":r({mode:o});break;case"open":"leaflet"!=mappl10n.options.engine||mappl10n.options.mapbox?r({isOpen:!0}):alert(__("Please enter a Mapbox access token in the MapPress settings screen to use styled maps."));break;case"pick-delete":confirm(mappl10n.delete_prompt)&&(i=o,_.findIndex(t.userStyles,{id:i})<0?n.mappLib.alert("Invalid delete"):(r({isBusy:!0}),n.mappLib.ajax({type:"POST",data:{action:"mapp_style_delete",id:i,nonce:mappl10n.options.nonce},callback:t=>{r({isBusy:!1}),t&&"OK"==t.status&&(mappl10n.options.userStyles=t.data,r({userStyles:t.data}),e.selected==i&&e.onChange(null))}})));break;case"pick-select":e.onChange(o),r({isOpen:!1});break;case"snazzy-save":{let e=_.findWhere(t.snazzyStyles,{id:o});e&&p({id:o,imageUrl:e.imageUrl,json:e.json,name:e.name});break}case"snazzy-search":c()}var i}function y(){let a;return"json-add"==t.mode?a={id:null,name:"",json:""}:"json-edit"==t.mode&&(a=e.selected?_.findWhere(t.userStyles,{id:e.selected}):null),s(C,{style:a,onSave:e=>b("json-save",e),onCancel:()=>b("json-cancel")})}function v(e){let a;return a=e.styles&&e.styles.length?_.map(e.styles,((t,a)=>function(e,t){let a,o="mapp-style"+(t.selected==e.id?" mapp-selected":"");(t.onEdit||t.onDelete)&&(a=s("div",{className:"mapp-style-actions"},s("a",{onClick:()=>t.onEdit(e)},__("Edit")),s(g,{icon:"trash",onClick:()=>t.onDelete(e.id)})));return s("div",{className:o,key:e.id},s("div",{className:"mapp-style-image",onClick:()=>t.onSelect(e.id)},u(e)),s("div",{className:"mapp-style-details"},s("div",{className:"mapp-style-title"},e.name),a))}(t,e))):t.isSearching?"":s("div",{className:"mapp-style-list-msg"},__("No results")),s("div",{className:"mapp-style-list-wrapper"},s("div",{className:"mapp-style-list-header"},e.title),s("div",{className:"mapp-style-list"},a))}return s(l,null,function(){const a=t.standardStyles.concat(t.userStyles);let o=!mappl10n.options.style||"roadmap"!=e.selected&&"streets"!=e.selected&&e.selected?e.selected:mappl10n.options.style,n=_.findWhere(a,{id:o});return n=n||t.standardStyles[0],s(d,{className:"mapp-style-toggle",icon:u(n),iconSize:75,isSecondary:!0,onClick:()=>b("open",null),title:n.name})}(),"edit"==t.mode&&t.isOpen&&renderEdit(),"json-add"==t.mode&&t.isOpen&&y(),"json-edit"==t.mode&&t.isOpen&&y(),"mapbox"==t.mode&&t.isOpen&&function(){let e=t.mapboxUser&&t.mapboxId?u({user:t.mapboxUser,mapboxid:t.mapboxId,name:t.mapboxName},"large"):null;const a=!t.mapboxUser||!t.mapboxId||!t.mapboxName;return s(f,{title:__("Add style"),className:"mapp-style-modal",onRequestClose:()=>b("mapbox-cancel"),shouldCloseOnClickOutside:!0},s("div",{className:"mapp-style-mapbox-title"},__("Enter style from Mapbox Studio"),s(h,{href:"https://studio.mapbox.com"})),s("form",{className:"mapp-style-mapbox-form",onSubmit:e=>{e.stopPropagation(),e.preventDefault(),b("mapbox-save")}},s("label",null,s(o.Input,{autoFocus:!0,className:"mapp-style-mapbox-url",labelTop:s(l,null,__("MapBox Share URL"),s(o.Help,{href:"#toc-mapbox-studio-styles"})),onChange:e=>b("mapbox-change-url",e),value:t.mapboxUrl})),s("label",null,s("div",{className:"mapp-style-mapbox-label"},__("Style name")),s(o.Input,{className:"mapp-style-mapbox-name",value:t.mapboxName,onChange:e=>r({mapboxName:e})})),s("div",{className:"mapp-style-mapbox-preview"},e),s("div",{className:"mapp-style-toolbar"},s("div",null,s(d,{isBusy:t.isBusy,isPrimary:!0,disabled:a,type:"submit"},__("Save")),s(d,{isBusy:t.isBusy,onClick:()=>b("mapbox-cancel")},__("Cancel"))))))}(),"pick"==t.mode&&t.isOpen&&function(){let a="";return t.userStyles&&t.userStyles.length&&(a=v({selected:e.selected,onEdit:e=>"leaflet"==mappl10n.options.engine?b("mapbox-edit"):b("json-edit",e),onDelete:e=>b("pick-delete",e),onSelect:e=>b("pick-select",e),styles:t.userStyles,title:__("Custom styles")})),s(f,{title:s("div",{className:"mapp-style-header"},__("Select a style")),className:"mapp-style-modal",onRequestClose:()=>b("close")},s("div",{className:"mapp-style-list-wrapper"},v({onSelect:e=>b("pick-select",e),selected:e.selected,styles:t.standardStyles,title:__("Standard styles")}),a),s("div",{className:"mapp-style-toolbar"},s("div",null,s(d,{isBusy:t.isBusy,isPrimary:!0,onClick:()=>"leaflet"==mappl10n.options.engine?b("mapbox-add"):b("json-add")},__("New style")),"google"==mappl10n.options.engine&&s(d,{isBusy:t.isBusy,isSecondary:!0,onClick:()=>b("snazzy-add")},__("Download style")),s(d,{isBusy:t.isBusy,onClick:()=>b("pick-cancel")},__("Cancel")))))}(),"snazzy"==t.mode&&t.isOpen&&(t.snazzySelected,s(f,{title:__("Download style"),className:"mapp-style-modal mapp-style-modal-snazzy",onRequestClose:()=>b("snazzy-cancel"),shouldCloseOnClickOutside:!0},s("form",{className:"mapp-style-snazzy-form",onSubmit:e=>{b("snazzy-search"),e.preventDefault()}},s(o.Input,{className:"mapp-style-snazzy-search",value:t.search,placeholder:__("Search"),onChange:e=>r({snazzySearch:e})}),t.isSearching&&s(k,null),!t.isSearching&&s(d,{isPrimary:!0,icon:"search",onClick:()=>b("snazzy-search")})),v({selected:t.snazzySelected,styles:t.snazzyStyles,onSelect:e=>r({snazzySelected:e})}),s("div",{className:"mapp-style-toolbar"},s("div",null,s(d,{isBusy:t.isBusy,isPrimary:!0,onClick:()=>b("snazzy-save",t.snazzySelected)},__("Save")),s(d,{isBusy:t.isBusy,onClick:()=>b("snazzy-cancel")},__("Cancel"))),function(){const e=t.snazzyPagination;return e&&t.snazzyStyles&&t.snazzyStyles.length?s(i.MappPaginate,{count:e.totalItems,onChange:e=>c(e),page:e.currentPage,pageSize:e.pageSize}):null}()))))}function C(e){const[t,a]=m((()=>{let t={...e.style},a="";try{a=JSON.stringify(JSON.parse(t.json),null,2)}catch(e){}return t.json=a,{style:t}}));function n(e){a((t=>({...t,...e})))}function i(a,o){let i={...t.style};switch(a){case"cancel":e.onCancel();break;case"change-json":i.json=o,n({style:i});break;case"change-name":i.name=o,n({style:i});break;case"save":i.json=i.json?JSON.stringify(JSON.parse(i.json)):"",e.onSave(i)}}let l;if(t.style.json)try{JSON.parse(t.style.json)}catch(e){l=e.toString()}let r=l?"mapp-json mapp-json-error":"mapp-json";return s(f,{title:s(o.Input,{value:t.style.name,onChange:e=>i("change-name",e),placeholder:__("Enter style name")}),className:"mapp-style-modal mapp-json-modal",onRequestClose:()=>i("cancel"),shouldCloseOnClickOutside:!0},s("div",null,__("JSON")),s("div",{className:r},s("textarea",{value:t.style.json,spellCheck:!1,onChange:e=>i("change-json",e.target.value)})),s("div",{className:"mapp-json-error"},l||""),s("div",{className:"mapp-json-toolbar"},s("div",null,s(d,{disabled:l,isBusy:t.isBusy,isPrimary:!0,onClick:()=>i("save")},__("Save")),s(d,{isBusy:t.isBusy,onClick:()=>i("cancel")},__("Cancel")))))}},214:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappCard:()=>f});var o=a(939);a(824);const n=wp.element.createElement,{Fragment:i,useEffect:s,useLayoutEffect:l,useCallback:r,useRef:p,useState:c}=wp.element,{useSelect:m}=wp.data,{Button:d,Dashicon:u,ExternalLink:_,Guide:h,Modal:g}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function f(e){let{icon:t,title:a,...o}=e;return n("div",{className:"mapp-support-card"},a&&n("div",{className:"mapp-support-card-title"},n("h3",null,t&&n(u,{icon:t}),a)),n("div",{className:"mapp-support-card-content"},o.children))}document.getElementById("mapp-support-page")&&wp.element.render(n((function(e){const[t,a]=c({engine:e.engine?e.engine:"leaflet",isOpen:e.isOpen,apiKey:e.apiKey,mapbox:e.mapbox});function l(e){a((t=>({...t,...e})))}function r(e){return n("div",{className:"mapp-guide-engine"+(e.selected?" mapp-selected":""),onClick:()=>e.onClick()},n("h2",{className:"mapp-guide-engine-title"},e.title),n("div",{className:"mapp-guide-engine-content"},e.content))}return p(null),s((()=>{}),[]),n("div",{className:"mapp-support"},n(i,null,n("div",{className:"mapp-support-section"},n("div",{className:"mapp-support-header"},n("img",{src:mappl10n.options.baseurl+"/images/icon-128x128.png"}),n("h1",null,__("MapPress Support")),n("i",null,__("Build amazing maps with the easiest and most powerful mapping plugin available")),n("div",null,n(d,{className:"mapp-support-guide-toggle",isPrimary:!0,onClick:()=>l({isOpen:!0})},__("Open Setup Wizard"))))),n("div",{className:"mapp-support-section"},n("div",{className:"mapp-support-cards"},n(f,{icon:"book",title:__("Documentation")},n("p",null,__("Detailed plugin documentation:")),n(_,{href:"https://mappresspro.com/mappress-documentation/"},__("Documentation")),n(_,{href:"https://mappresspro.com/whats-new/"},__("What's new")),n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-map-library-and-map-editors"},__("Creating your first map"))),n(f,{icon:"warning",title:__("Troubleshooting")},n("p",null,n("b",null,__("Check for a plugin or theme conflict:"))),n("ol",null,n("li",null,__("Deactivate ALL other plugins")),n("li",null,__("Switch to a standard WordPress theme")),n("li",null,__("If the maps are working, reactivate one by one to find the conflict."))),n("p",null,__("For more info:")),n(_,{href:"https://mappresspro.com/mappress-faq/"},__("MapPress FAQ"))),n(f,{icon:"megaphone",title:__("Support")},n("p",null,__("Need some help?")),n(_,{href:"https://mappresspro.com/forums/forum/mappress-support/"},__("Support forum")),n(_,{href:"https://mappresspro.com/chris-contact/"},__("Contact")))))),function(){if(t.isOpen)return n(h,{className:"mapp-guide",onFinish:()=>function(e,a){if("save"===e){let e;l({isOpen:!1}),e="google"==t.engine?"google":t.mapbox?"mapbox":"nominatim",o.mappLib.ajax({type:"POST",data:{action:"mapp_option_save",nonce:mappl10n.options.nonce,settings:{engine:t.engine,apiKey:t.apiKey,mapbox:t.mapbox,geocoder:e}},callback:e=>{"OK"!=e.status&&alert("Unable to save settings. Please check the support troubleshooting guide.")}})}}("save"),pages:[{content:n("div",{className:"mapp-guide-page mapp-guide-engines"},n("h1",null,__("Please Choose a Mapping API")),n("p",null,__("MapPress supports both Leaflet and Google mapping APIs."),n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-picking-a-mapping-api"},__("Learn more"))),n("div",{className:"mapp-guide-engines"},r({onClick:()=>l({engine:"leaflet"}),selected:"leaflet"==t.engine,title:"Leaflet",content:n("ul",null,n("li",null,__("No API key")),n("li",null,__("Free unlimited usage")),n("li",null,__("Good functionality")),n("li",null,__("Best for high traffic sites")))}),r({onClick:()=>l({engine:"google"}),selected:"google"==t.engine,title:"Google",content:n("ul",null,n("li",null,__("API key required")),n("li",null,__("Limited free usage")),n("li",null,__("Excellent functionality")),n("li",null,__("Best for low traffic sites")))}))),image:n("div",{className:"mapp-guide-header mapp-guide-image-small"},n("img",{src:mappl10n.options.baseurl+"/images/icon-128x128.png"}),n("h1",null,__("Welcome to MapPress!")))},{content:"google"==t.engine?n("div",{className:"mapp-guide-page mapp-guide-apikey"},n("h1",null,__("Google API Key")),n("p",null,__("Google requires an API key to use Google Maps. Please enter your key below.")),n(d,{isPrimary:!0,href:"https://mappresspro.com/how-to-get-a-google-maps-api-key/",target:"_blank"},__("Get an API Key")),n("input",{className:"mapp-guide-apikey",onChange:e=>l({apiKey:e.target.value}),placeholder:__("Enter your API key here"),value:t.apiKey})):n("div",{className:"mapp-guide-page mapp-guide-apikey"},n("h1",null,__("Sign up with Mapbox")),n("p",null,__("Mapbox makes Leaflet better with great-looking map tiles, styled maps, and a powerful geocoder.")," "+__("A generous free tier means it's free for most sites."),n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-using-mapbox-with-leaflet"},__("Learn more"))),n(d,{isPrimary:!0,href:"https://account.mapbox.com/auth/signup/",target:"_blank"},__("Get Mapbox Access Token")),n("input",{className:"mapp-guide-apikey",onChange:e=>l({mapbox:e.target.value}),placeholder:__("Enter your access token here"),value:t.mapbox})),image:n("div",{className:"mapp-guide-header mapp-guide-image-small"},"google"==t.engine&&n("img",{src:mappl10n.options.baseurl+"/images/google_logo.png"}),"leaflet"==t.engine&&n("img",{src:mappl10n.options.baseurl+"/images/mapbox_logo_white.png"}))},{content:n("div",{className:"mapp-guide-page mapp-guide-gutenberg"},n("h1",null,__("Maps in the Block Editor")),n("p",null,__("MapPress provides custom block types for the Gutenberg editor.")),n("p",null,__("Just insert a MapPress Map block to get started."),n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-create-a-map-with-the-gutenberg-block-editor"},__("Learn more")))),image:n("div",{className:"mapp-guide-header"},n("img",{src:mappl10n.options.baseurl+"/images/gutenberg_map_block.gif"}))},{content:n("div",{className:"mapp-guide-page mapp-guide-classic"},n("h1",null,__("Maps in the Classic Editor")),n("p",null,__('MapPress also supports the "classic" editor. Just click the MapPress button to open the map library.')),n("p",null,n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-create-a-map-with-the-classic-editor"},__("Learn more")))),image:n("div",{className:"mapp-guide-header"},n("img",{src:mappl10n.options.baseurl+"/images/classic_map.gif"}))},{content:n("div",{className:"mapp-guide-page mapp-guide-library"},n("h1",null,__("Map Library")),n("p",null,__("The Map Library provides an easy way to see and edit all of your maps. The library can be opened in the post editor or from the MapPress menu.")),n("p",null,n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-map-library-and-map-editors"},__("Learn more")))),image:n("div",{className:"mapp-guide-header"},n("img",{src:mappl10n.options.baseurl+"/images/library_menu.gif"}))},{content:n("div",{className:"mapp-guide-page mapp-guide-end"},n("h1",null,__("Happy Mapping")),n("p",null,__("Enjoy the plugin! Replay this guide any time from the MapPress support menu."))),image:n("div",{className:"mapp-guide-header"},n("img",{src:mappl10n.options.baseurl+"/images/icon-128x128"}))}]})}())}),mappress_support_state),document.getElementById("mapp-support-page"))},308:(e,t,a)=>{"use strict";e.exports=function(e,t){var o=String(e).replace(/^&/,"").replace(/&$/,"").split("&"),n=o.length,i=void 0,s=void 0,l=void 0,r=void 0,p=void 0,c=void 0,m=void 0,d=void 0,u=void 0,_=void 0,h=void 0,g=void 0,f=void 0,b=function(e){return decodeURIComponent(e.replace(/\+/g,"%20"))},y="undefined"!=typeof window?window:a.g;y.$locutus=y.$locutus||{};var v=y.$locutus;for(v.php=v.php||{},t||(t=y),i=0;i<n&&(u=b((d=o[i].split("="))[0]),_=d.length<2?"":b(d[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));i++){for(;" "===u.charAt(0);)u=u.slice(1);if(u.indexOf("\0")>-1&&(u=u.slice(0,u.indexOf("\0"))),u&&"["!==u.charAt(0)){for(g=[],h=0,s=0;s<u.length;s++)if("["!==u.charAt(s)||h){if("]"===u.charAt(s)&&h&&(g.length||g.push(u.slice(0,h-1)),g.push(u.substr(h,s-h)),h=0,"["!==u.charAt(s+1)))break}else h=s+1;for(g.length||(g=[u]),s=0;s<g[0].length&&(" "!==(m=g[0].charAt(s))&&"."!==m&&"["!==m||(g[0]=g[0].substr(0,s)+"_"+g[0].substr(s+1)),"["!==m);s++);for(c=t,s=0,f=g.length;s<f;s++){if(p=c,(""===(u=g[s].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==s){for(r in l=-1,c)c.hasOwnProperty(r)&&+r>l&&r.match(/^\d+$/g)&&(l=+r);u=l+1}Object(c[u])!==c[u]&&(c[u]={}),c=c[u]}p[u]=_}}}}},t={};function a(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,a),i.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(371),a(787),a(844),a(215),a(713),a(123),a(521),a(191),a(805),a(24),a(816),a(378),a(670),a(218),a(824),a(535),a(477),a(429),a(214)})();
1
+ (()=>{var e={939:(e,t,a)=>{"use strict";a.d(t,{mappLib:()=>c});wp.element.createElement;const{Fragment:o,useCallback:n,useEffect:i,useLayoutEffect:s,useMemo:l,useRef:r,useState:p}=wp.element,c={ajax:function(e){const t={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,a,o){"json"==e.dataType&&e.url==mappl10n.options.ajaxurl&&"OK"!=t.status&&c.alert(t.status),"json"==e.dataType&&t.output?c.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,o)},error:function(t,a,o){"cancel"!=a&&(void 0!==o&&""!=o&&c.alert("AJAX ERROR\r\nTextStatus="+a+"\r\nError="+o+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e={...t,...e},jQuery.ajax(e)},alert:function(e){mappl10n.options.admin||mappl10n.options.debug?alert(e):window.console&&console.error(e)},getIcon:function(e){{const t=this.getIconUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:t,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:t}}},getIconUrl:function(e){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"},nanoid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;const t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let a="",o=e;for(;o--;)a+=t[64*Math.random()|0];return a},template:function(e,t){if(c.templates=c.templates?c.templates:{},!c.templates[e]){var a=document.getElementById("mapp-tmpl-"+e).innerHTML;if(!a)return"";c.templates[e]=_.template(a,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return c.templates[e](t)}};"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})},27:(e,t,a)=>{"use strict";a.d(t,{MappPaginate:()=>p});const o=wp.element.createElement,{Fragment:n,useEffect:i,useLayoutEffect:s,useRef:l,useState:r}=wp.element,{sprintf}=wp.i18n;function p(e){function t(t,a){const o=Math.ceil(e.count/e.pageSize);switch(t){case"first":e.onChange(1);break;case"last":e.onChange(o);break;case"next":e.page<o&&e.onChange(e.page+1);break;case"prev":e.page>1&&e.onChange(e.page-1)}}return function(){const a=Math.ceil(e.count/e.pageSize),n=e.isBusy||e.page<=1,i=e.isBusy||e.page>=a,s=n?"mapp-paginate-button mapp-disabled":"mapp-paginate-button",l=i?"mapp-paginate-button mapp-disabled":"mapp-paginate-button";return o("div",{className:"mapp-paginate"},o("div",{className:s,onClick:()=>{n||t("first")}},"«"),o("div",{className:s,onClick:()=>{n||t("prev")}},"‹"),o("div",{className:"mapp-paginate-count"},sprintf((r="%d of %d",wp.i18n.__(r,"mappress-google-maps-for-wordpress")),e.page,a)),o("div",{className:l,onClick:()=>{i||t("next")}},"›"),o("div",{className:l,onClick:()=>{i||t("last")}},"»"));var r}()}},844:()=>{const e=wp.element.createElement,{Fragment:t,useEffect:a,useLayoutEffect:o,useRef:n,useState:i}=wp.element,{Button:s,Modal:l}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function r(t){const[o,n]=i({isOpen:!1,reason:"",reasonText:"",redirectUrl:null});function r(e){n((t=>({...t,...e})))}function p(e,t){switch(e){case"cancel":r({isOpen:!1});break;case"submit":r({isOpen:!1}),window.location.href=o.redirectUrl+"&mapp_reason="+o.reason+"&mapp_reason_text="+encodeURIComponent(o.reasonText.trim())}}return a((()=>{const e=jQuery("#deactivate-mappress-google-maps-for-wordpress");e.length&&(e.off("click.mapp"),e.on("click.mapp",(function(){return function(e){const t=e?jQuery(e).attr("href"):null;t&&r({isOpen:!0,redirectUrl:t})}(this),!1})))}),[]),o.isOpen?e(l,{isDismissible:!0,onRequestClose:()=>p("cancel"),shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,title:__("Feedback")},function(){const t=!o.reason||"other"==o.reason&&!o.reasonText;return sprintf("<a href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>",__("contact me")),e("div",{className:"mapp-deactivate"},e("div",{className:"mapp-deactivate-content"},e("h2",null,__("Sorry to see you go! Need help?"),e(s,{className:"mapp-deactivate-help",isSecondary:!0,href:"https://mappresspro.com/chris-contact",target:"_blank"},__("Contact me"))),e("h2",null,__("If not, I'd really appreciate some feedback:")),function(){const t=[{value:"badday",label:__("I'm just having a bad day")},{value:"notworking",label:__("The plugin isn't working"),placeholder:__("What didn't work? Was there an error message?")},{value:"toohard",label:__("Too hard to use"),placeholder:__("How can I make it easier?")},{value:"feature",label:__("Missing feature"),placeholder:__("What's missing?")},{value:"other",label:__("Other"),placeholder:__("Can you provide any details?")}];return e("div",{className:"mapp-deactivate-reasons"},_.map(t,(t=>{const a=t.value==o.reason;return e("div",{className:"mapp-deactivate-reason",key:t.value},e("label",null,e("input",{checked:a,onChange:e=>r({reason:e.target.value}),type:"radio",value:t.value}),t.label),a&&t.placeholder&&e("div",null,e("textarea",{onChange:e=>r({reasonText:e.target.value}),placeholder:t.placeholder,value:o.reasonText})))})))}()),e("div",{className:"mapp-deactivate-footer"},e(s,{isSecondary:!0,disabled:t,onClick:()=>p("submit")},__("Deactivate")),e(s,{isPrimary:!0,onClick:()=>p("cancel")},__("Cancel"))))}()):null}jQuery(document).ready((function(){const t=jQuery("<div></div>").appendTo("body").get(0);wp.element.render(e(r),t)}))},713:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappAttachControl:()=>d});const o=wp.element.createElement,{addQueryArgs:n}=wp.url,{useCallback:i,useEffect:s,useState:l}=wp.element,{Button:r,Dropdown:p,Spinner:c,TextControl:m}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function d(e){const[t,a]=l({isFetching:!1,results:[],search:"",searchTerm:""});function r(e){a((t=>({...t,...e})))}s((()=>{t.isOpen&&(r({isFetching:!0}),wp.apiFetch({path:n("/wp/v2/search",{search:t.search,per_page:20})}).then((e=>{r({results:e,isFetching:!1})})))}),[t.search,t.isOpen]);const d=i(_.debounce((function(e){r({search:e})}),1e3),[]);function u(a,n){return o("div",{className:"mapp-attach-control"},o("div",{className:"mapp-attach-control-toolbar"},o(m,{autoComplete:"false",value:t.searchTerm,onChange:e=>{r({searchTerm:e}),d(e)},placeholder:__("Search")})),function(){if(t.isFetching)return o(c,null);if(t.results)return t.results.length?o("div",{className:"mapp-attach-items"},t.results.map((t=>o("div",{key:t.id,className:"mapp-attach-item",onClick:()=>{e.onChange(t.id,t.title)}},o("div",{className:"mapp-attach-item-title"},t.title?t.title:__("Untitled")),o("div",{className:"mapp-attach-item-type"},t.subtype))))):o("div",{},__("No posts found"))}())}return o("div",{onClick:e=>e.stopPropagation()},o(p,{onToggle:e=>r({isOpen:e}),renderToggle:e=>{let{isOpen:t,onToggle:a}=e;return o("a",{href:"#",onClick:a},__("Attach"))},renderContent:e=>{let{isOpen:t,onToggle:a}=e;return u()}}))}},371:(e,t,a)=>{"use strict";a.r(t);var o=a(477);window.mapp=window.mapp||{};const n=wp.element.createElement,{Fragment:i,useEffect:s,useLayoutEffect:l,useRef:r,useState:p}=wp.element,{Button:c,Dashicon:m,Modal:d}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function u(e){const[t,a]=p({isOpen:!0,mapid:null});function s(e){a((t=>({...t,...e})))}function l(){const e="undefined"!=typeof tinyMCE&&tinyMCE?tinyMCE.get("content"):null,t=e&&e.selection?e.selection.getSel():null;if(!t||void 0===t.anchorOffset||!t.anchorNode||!t.anchorNode.data)return null;let a=null,o=t.anchorNode.data,n=-1;for(let e=t.anchorOffset-1;e>=0;e--){let t=o[e];if("["==t){n=e;break}if("]"==t||"<"==t||">"==t)break}return n>=0&&(a=wp.shortcode.next("mappress",o,n),a)?a.shortcode.attrs.named.mapid:null}return n(i,null,n("button",{className:"button",type:"button",onClick:e=>{e.preventDefault(),s({isOpen:!0,mapid:l()})}},n(m,{className:"wp-media-buttons-icon",icon:"location"}),__("MapPress")),t.isOpen&&n(o.default,{context:"mce",mapid:t.mapid,onClose:()=>{s({isOpen:!1,mapid:null})},onInsert:e=>function(e){s({isOpen:!1});var t='[mappress mapid="'+e+'"]';"undefined"==typeof wpActiveEditor?__("Please select the post content to insert the map into."):send_to_editor(t)}(e)}))}jQuery(document).on("click",".mapp-classic-button",(e=>{const t=e.currentTarget.parentElement;wp.element.render(n(u),t)}))},123:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappColorPicker:()=>M});var o=a(824);const n=wp.element.createElement,{Fragment:i,useEffect:s,useLayoutEffect:l,useCallback:r,useRef:p,useState:c}=wp.element,{useSelect:m}=wp.data,{withState:d}=wp.compose,{Button:u,ColorPalette:h,ColorPicker:g,Dashicon:f,Dropdown:b,ExternalLink:y,Modal:v,Panel:k,PanelBody:w,PanelRow:C,Popover:x,RadioControl:N,Spinner:S,TabPanel:O}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function M(e){e={isExtended:null,onChange:null,color:null,opacity:null,weight:null,...e};const[t,a]=c({color:e.color,isCustomOpen:!1,isOpen:!1,opacity:e.opacity?e.opacity:1,weight:e.weight?e.weight:2});function l(e){a((t=>({...t,...e})))}function r(){l({isOpen:!1})}function p(a){l({color:a,isOpen:!1}),e.onChange({color:a,opacity:t.opacity,weight:t.weight})}return s((()=>{}),[]),n(i,null,n("span",{className:"mapp-colors-toggle",onClick:()=>{l({isOpen:!0})},style:{backgroundColor:e.color,border:e.isExtended?"1px solid "+e.color:"1px solid gray",opacity:e.isExtended&&e.opacity?e.opacity:1},tabIndex:0}),function(){if(!t.isOpen)return null;const a=_.map([1,.9,.8,.7,.6,.5,.4,.3,.2,.1,0],(e=>({label:100*e+"%",value:e}))),i=_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],(e=>({label:e+"px",value:e})));return n(v,{title:__("Select a color"),className:"mapp-colors-modal",onRequestClose:()=>r()},n("div",{className:"mapp-colors"},n("div",{className:"mapp-colors-list"},_.map([["yellow","yellowgreen","green","seagreen","blue","cornflowerblue","darkslateblue","purple","firebrick","red","darkorange","orange","saddlebrown"],["lightyellow","greenyellow","lightgreen","darkseagreen","lightblue","skyblue","slateblue","orchid","plum","pink","sandybrown","goldenrod","peru"],["white","lightgray","gray","black"]],((t,a)=>n("div",{key:a},_.map(t,(t=>n("span",{className:"mapp-color"+(t==e.color?" mapp-selected":""),key:t,onClick:()=>{l({isCustomOpen:!1}),p(t)},style:{backgroundColor:t},title:t}))))))),t.isCustomOpen&&n(g,{color:e.color,onChangeComplete:e=>p(e.hex),disableAlpha:!0}),e.isExtended&&n(o.Select,{label:__("Opacity"),options:a,value:t.opacity,onChange:a=>{return l({opacity:o=a}),void e.onChange({color:t.color,opacity:o,weight:t.weight});var o}}),e.isExtended&&n(o.Select,{label:__("Stroke"),options:i,value:e.weight?e.weight:"",onChange:a=>{return l({weight:o=a}),void e.onChange({color:t.color,opacity:t.opacity,weight:o});var o}}),n("div",{className:"mapp-colors-toolbar"},n(u,{isPrimary:!0,onClick:()=>r()},__("Done")),n(u,{onClick:()=>l({isCustomOpen:!t.isCustomOpen})},__("Custom color")))))}())}},521:(e,t,a)=>{"use strict";a.r(t);var o=a(477);wp&&wp.plugins&&wp.plugins.registerPlugin&&wp.editPost&&wp.plugins.registerPlugin("mappress-document-settings-panel",{render:function(){const{PluginDocumentSettingPanel:e}=wp.editPost,t=wp.element.createElement,{Fragment:a,useEffect:n,useLayoutEffect:i,useRef:s,useState:l}=wp.element,{Button:r,Spinner:p}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),[c,m]=l({isFetchingItems:!0,isPickerOpen:!1,items:null,pickerMapid:null,pickerMode:"list"});function d(e){m((t=>({...t,...e})))}function u(e){let a=e.title?e.title:__("Untitled");return t("div",{className:"mapp-document-item",key:e.mapid+e.postid},t("a",{className:"mapp-document-col-title",href:"#",onClick:t=>{d({isPickerOpen:!0,pickerMapid:e.mapid,pickerMode:"edit"})}},a),t("div",{className:"mapp-document-col-mapid"},e.mapid))}return n((()=>{const e=e=>{d({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return mapp.store.subscribe(e),()=>mapp.store.unsubscribe(e)})),n((()=>{mapp.store.fetchItems()}),[]),t(e,{title:"MapPress",className:"mapp-document-panel"},function(){const e=_.filter(c.items,(e=>e.postid==mappl10n.options.postid));let o;return o=c.isFetchingItems?t(p,null):e.length?t(a,null,t("div",{className:"mapp-document-header"},t("div",{className:"mapp-document-col-title"},__("Map title")),t("div",{className:"mapp-document-col-mapid"},null,__("Map ID"))),_.map(e,u)):t("div",{className:"mapp-document-message"},__("No maps found")),t("div",null,t("div",{className:"mapp-document-list"},o))}(),t(r,{icon:"portfolio",isSecondary:!0,onClick:()=>{d({isPickerOpen:!0,pickerMode:"list"})}},__("Open map library")),function(){if(c.isPickerOpen)return t(o.default,{mapid:c.pickerMapid,mode:c.pickerMode,onClose:()=>{d({isPickerOpen:!1,pickerMapid:null})},onInsert:e=>function(e){const t=wp.blocks.createBlock("mappress/map",{mapid:e});wp.data.dispatch("core/block-editor").insertBlock(t,0),d({isPickerOpen:!1,pickerMapid:null})}(e)})}())},icon:null})},191:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappEdit:()=>A});var o=a(123),n=a(805);window.mapp=window.mapp||{};const i=wp.element.createElement,{Button:s,Dashicon:l,Icon:r,Spinner:p}=wp.components,{useSelect:c}=wp.data,{Fragment:m,useEffect:d,useLayoutEffect:u,useRef:h,useState:g}=wp.element,{MediaUpload:f}=wp.mediaUtils,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function b(e){e={poi:null,onChange:null,onClose:null,onDelete:null,onSave:null,...e};const t="mapp-poi-body",a=h(null),[l,r]=g({images:e.poi.images?e.poi.images:[],isBusy:!1,title:e.poi.title,isVisual:!0});function p(e){r((t=>({...t,...e})))}function c(e){e?tinyMCE.execCommand("mceAddEditor",!1,t):tinyMCE.execCommand("mceRemoveEditor",!1,t)}function u(){return["circle","polyline","polygon","rectangle"].includes(e.poi.type)}function b(){e.onChange({images:l.images,body:tinymce&&tinymce.get(t)?tinymce.get(t).getContent():a.current.value,title:l.title}),e.onClose()}function v(e){return i("div",{className:"mapp-poi-image",key:e.id?e.id:e.url},"embed"==e.type&&i(y,{url:e.url}),"embed"!=e.type&&i("img",{src:e.url}),i("div",{className:"mapp-poi-image-delete",onClick:()=>function(e){const t=l.images.findIndex((t=>t.url==e));t>=0&&(l.images.splice(t,1),p({images:l.images}))}(e.url)},"X"))}return d((()=>(function(){if("undefined"==typeof tinyMCE||void 0===tinyMCE.init)return;var e="en";if(void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit&&void 0!==window.tinyMCEPreInit.mceInit.content){var t=window.tinyMCEPreInit.mceInit.content;e=void 0!==t.language?t.language:"en"}var a={mode:"none",height:"100%",convert_urls:!1,language:e,menubar:!1,plugins:"image,paste,textcolor,wordpress,wpeditimage,wplink,wpview",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(a)}(),()=>{c(!1)})),[]),d((()=>{l.isVisual?c(!0):c(!1)}),[l.isVisual]),i(m,null,i("div",{className:"mapp-poi-header"},i("input",{className:"mapp-poi-title",value:l.title,onChange:e=>{p({title:e.target.value})},onKeyDown:e=>function(e){13==e.keyCode&&(b(),e.stopPropagation(),e.preventDefault())}(e)}),u(l.type)?null:i(n.MappIconPicker,{iconid:e.poi.iconid,onChange:t=>{e.onChange({iconid:t})}}),function(){var t,a,n,s,l,r;const p=e.poi;return u(p.type)?i(o.MappColorPicker,{color:"polyline"==p.type?null===(t=p.poly)||void 0===t?void 0:t.strokeColor:null===(a=p.poly)||void 0===a?void 0:a.fillColor,opacity:"polyline"==p.type?null===(n=p.poly)||void 0===n?void 0:n.strokeOpacity:null===(s=p.poly)||void 0===s?void 0:s.fillOpacity,weight:"polyline"==p.type?null===(l=p.poly)||void 0===l?void 0:l.strokeWeight:null===(r=p.poly)||void 0===r?void 0:r.strokeWeight,isExtended:!0,onChange:t=>{let{color:a,opacity:o,weight:n}=t;const i="polyline"==e.poi.type?{strokeColor:a,strokeOpacity:o,strokeWeight:n}:{fillColor:a,fillOpacity:o,strokeColor:a,strokeWeight:n,strokeOpacity:1};e.onChange({poly:{...e.poi.poly,...i}}),e.poi.setColors(i)}}):null}()),function(){const o="mapp-mce-visual"+(l.isVisual?" mapp-active":""),n="mapp-mce-html"+(l.isVisual?"":" mapp-active");return i(m,null,i("div",{className:"mapp-mce-toolbar"},i("div",{className:"mapp-mce-tabs"},i("a",{className:o,onClick:()=>p({isVisual:!0})},__("Visual"))," | ",i("a",{className:n,onClick:()=>p({isVisual:!1})},__("HTML"))),i("a",{href:"#",className:"insert-media add_media","data-editor":t},__("Add Media"))),i("div",{className:"mapp-mce-main"},i("textarea",{defaultValue:e.poi.body,id:t,ref:a,style:{height:"100%"}})))}(),"kml"==e.poi.type&&i("div",{className:"mapp-poi-kml"},i("span",null,__("KML")+" : "),i("a",{href:e.poi.kml.url,target:"_blank"},e.poi.kml.url)),l.images?i("div",{className:"mapp-poi-images"},l.images.map((e=>v(e)))):null,i("div",{className:"mapp-poi-toolbar"},i("div",null,i(s,{isPrimary:!0,onClick:()=>b()},__("Save")),i(s,{isSecondary:!0,onClick:()=>e.onClose()},__("Cancel"))),i("div",null,i(f,{allowedTypes:["image","video"],autoOpen:!0,gallery:!0,multiple:!0,onClose:()=>{p({images:l.images})},onSelect:e=>{return t=e,t=Array.isArray(t)?t:[t],void p({images:_.map(t,(e=>({id:e.id,url:e.url})))});var t},type:"image",value:l.images?l.images.map((e=>e.id)):[],render:e=>{let{open:t}=e;return i(s,{isSecondary:!0,onClick:t},__("Images"))}}),i(s,{isDestructive:!0,onClick:()=>e.onDelete()},__("Delete")))))}function y(e){e={url:null,...e};const{html:t}=c((t=>{const a=t("core").getEmbedPreview(e.url);return a?{html:a.html}:{html:null}}));return t?i("div",{className:"mapp-poi-embed",dangerouslySetInnerHTML:{__html:t}}):i("div",{className:"mapp-poi-embed"},i(p,null))}var v=a(939),k=a(429),w=a(710);window.mapp=window.mapp||{};const C=wp.element.createElement,{Fragment:x,useEffect:N,useLayoutEffect:S,useRef:O,useState:M}=wp.element,{Button:I,Dropdown:P,Modal:E,Panel:z,PanelBody:T,Popover:L,Spinner:B,TextControl:D}=wp.components,F=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function A(e){e={context:null,mapid:null,onClose:null,onSave:null,...e};const[t,a]=M({isBusy:!1,map:null,mapdata:null,poi:null}),o=O(null);function n(e){a((t=>({...t,...e})))}function i(e){n({map:t.map})}function s(e){const a="marker"==e.type?null:e.type;let o={...mapp.poi.parseOverlay(a,e.overlay),body:"",iconid:t.lastIcon,type:a,title:"marker"==e.type?e.overlay.position.toUrlValue():mappl10n.shape},n=new mapp.Poi(o);e.overlay.setMap(null),t.map.poiInsert(n)}function l(e){t.poi.set(e),t.map.renderList(),e.iconid&&n({lastIcon:e.iconid}),n({poi:t.poi})}function r(){_(),n({poi:null})}function p(){confirm(mappl10n.delete_prompt)&&(t.map.poiRemove(t.poi),t.map.poiClose(),n({poi:null}))}function c(e){n({poi:e})}function m(){mapp.store.saveMap(t.map.toJSON(),(t=>{_(),e.onSave(t)}))}function d(e){if(e.geometry){const a=e.formatted_address?e.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,o=e.name==a?"":a,n=new mapp.Poi({id:v.mappLib.nanoid(),address:a,body:o,iconid:t.lastIcon,point:e.geometry.location,title:e.name,viewport:e.geometry.viewport?e.geometry.viewport:null});t.map.poiInsert(n),n.center()}else if("string"==typeof e&&"http"==e.substring(0,4)){var a=new mapp.Poi({iconid:t.lastIcon,kml:{url:e},title:"KML",type:"kml"});t.map.poiInsert(a),mapp.event.addListener(a.overlay,"ready defaultviewport_changed",(e=>{a.center()}))}}function u(e){t.map.set(e),n({map:t.map})}function _(){if(t.map){const e=t.map.iw.getContent();wp.element.unmountComponentAtNode(e)}}return N((()=>{t.map&&(t.map.onDrawingEvent=s,t.map.onPoiOpen=c,t.map.onPoiClose=r,t.map.onSearch=d),function(){if(!t.map)return null;if(t.poi){const e=t.map.iw.getContent();wp.element.render(C(b,{onClose:()=>t.map.poiClose(),onDelete:p,onChange:l,poi:t.poi}),e)}}()})),N((()=>{t.map&&(jQuery(t.map.div.layout).off("mapp.render",i),jQuery(t.map.div.layout).on("mapp.render",(e=>i())))}),[t.map]),N((()=>{const t=t=>{n({isBusy:t.isSavingMap,mapdata:t.maps[e.mapid]})};return mapp.store.subscribe(t),()=>mapp.store.unsubscribe(t)})),N((()=>{!function(){if("mce"!=e.context&&"library"!=e.context)return null;if(!t.map)return null;const{center:a,height:o,poiList:n,search:i,width:s,zoom:l}=t.map,r=document.querySelector(".mapp-settings-container");wp.element.render(C(k.MappSettings,{map:t.map,context:e.context,onChange:e=>u(e),center:a,height:o,poiList:n,search:i,width:s,zoom:l}),r)}()})),N((()=>{e.mapid?mapp.store.fetchMap(e.mapid):n({mapdata:{}})}),[e.mapid]),N((()=>{if(!t.mapdata)return;let a={embed:!0,isEditable:!0,layout:"left",mapOpts:{streetViewControl:!1},menu:!1,name:"media-map",poiList:!0,sel:jQuery(o.current)};"map"!=e.context&&"mashup"!=e.context||(a.center=null,a.zoom=null);const i=new mapp.Map(t.mapdata,a);i.display(),n({map:i})}),[t.mapdata]),C("div",{className:"mapp-edit"},function(){let e=t.map&&t.map.title?t.map.title:"",a=t.map&&!t.isFetchingMap?F("Untitled"):"";return C("div",{className:"mapp-gt-modal-header"},C(D,{className:"mapp-edit-title",placeholder:a,value:e,onChange:e=>function(e){t.map.set({title:e}),n({map:t.map})}(e),onKeyDown:e=>function(e){13==e.keyCode&&(m(),e.stopPropagation(),e.preventDefault())}(e)}))}(),C("div",{className:"mapp-edit-main"},C("div",{className:"mapp-edit-map",key:e.mapid,ref:o,onKeyDown:e=>e.stopPropagation(),tabIndex:-1}),o.current&&t.map?C(w.m,{map:t.map,selected:t.map.mapTypeId,onChange:e=>u({mapTypeId:e})}):null),C("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:e=>e.stopPropagation()},C(I,{isPrimary:!0,isBusy:t.isBusy,onClick:()=>m()},F("Save")),C(I,{isSecondary:!0,disabled:t.isBusy,onClick:()=>(_(),void e.onClose())},F("Cancel"))))}},805:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappIconPicker:()=>M});var o=a(939),n=a(123),i=a(824);const s=wp.element.createElement,{Fragment:l,useEffect:r,useLayoutEffect:p,useCallback:c,useRef:m,useState:d}=wp.element,{useSelect:u}=wp.data,{withState:h}=wp.compose,{Button:g,ColorPicker:f,DropZone:b,DropZoneProvider:y,FormFileUpload:v,Modal:k,Popover:w,RangeControl:C,Spinner:x,TabPanel:N}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),S=[{id:"mapp-shapes",fontFamily:"Marker Shapes",glyphs:[{name:"circle",center:[16,16]},{name:"widepin",center:[16,14]},{name:"route",center:[16,16]},{name:"shield",center:[16,16]},{name:"squarepin",center:[16,15]},{name:"square",center:[16,16]},{name:"squarerounded",center:[16,16]},{name:"roundpin",center:[16,13]},{name:"pin",center:null},{name:"pindot",center:null}]}],O=[{id:"mapp-icons",className:"mapp-marker-icons",filePrefix:"mp",fontFamily:"Marker Icons",label:"Map icons",glyphs:["airport","amusement-park","aquarium","archery","art-gallery","assistive-listening","atm","audio-description","bakery","bank","bar","baseball","beauty-salon","bicycle-store","bicycling","boat-ramp","boat-tour","boating","book-store","bowling-alley","braille","bus-station","cafe","campground","canoe","car-dealer","car-rental","car-repair","car-wash","casino","cemetery","chairlift","church","city-hall","closed-captioning","clothing-store","compass","convenience-store","courthouse","cross-country-skiing","crosshairs","dentist","department-store","diving","doctor","electrician","electronics-store","embassy","expand","female","finance","fire-station","fish-cleaning","fishing-pier","fishing","florist","food","fullscreen","funeral-home","furniture-store","gas-station","contractor","golf","grocery","gym","hair-care","hang-gliding","hardware-store","health","hindu-temple","horse-riding","hospital","ice-fishing","ice-skating","inline-skating","insurance-agency","jet-skiing","jewelry-store","kayaking","laundry","lawyer","library","liquor-store","local-government","location-arrow","locksmith","lodging","low-vision-access","male","marina","mosque","motobike-trail","movie-rental","movie-theater","moving-company","museum","natural-feature","night-club","open-captioning","painter","park","parking","pet-store","pharmacy","physiotherapist","place-of-worship","playground","plumber","point-of-interest","police","political","post-box","post-office","rafting","real-estate-agency","restaurant","roofing-contractor","route","rv-park","sailing","school","scuba-diving","search","shopping-mall","sign-language","skateboarding","ski-jumping","skiing","sledding","snow-shoeing","snow","snowboarding","snowmobile","spa","stadium","storage","store","subway-station","surfing","swimming","synagogue","taxi-stand","tennis","toilet","trail-walking","train-station","transit-station","travel-agency","unisex","university","veterinary-care","viewing","volume-control-telephone","walking","waterskiing","whale-watching","wheelchair","wind-surfing","zoo"]},{id:"material-icons",className:"material-icons",filePrefix:"mi",fontFamily:"Material Icons",label:"Material Icons",glyphs:["ac_unit","access_alarm","access_alarms","access_time","access_time_filled","accessibility","accessibility_new","accessible","accessible_forward","account_balance","account_balance_wallet","account_box","account_circle","account_tree","ad_units","adb","add","add_a_photo","add_alarm","add_alert","add_box","add_business","add_chart","add_circle","add_circle_outline","add_comment","add_ic_call","add_link","add_location","add_location_alt","add_moderator","add_photo_alternate","add_reaction","add_road","add_shopping_cart","add_task","add_to_drive","add_to_home_screen","add_to_photos","add_to_queue","addchart","adjust","admin_panel_settings","ads_click","agriculture","air","airline_seat_flat","airline_seat_flat_angled","airline_seat_individual_suite","airline_seat_legroom_extra","airline_seat_legroom_normal","airline_seat_legroom_reduced","airline_seat_recline_extra","airline_seat_recline_normal","airplane_ticket","airplanemode_active","airplanemode_inactive","airplanemode_off","airplanemode_on","airplay","airport_shuttle","alarm","alarm_add","alarm_off","alarm_on","album","align_horizontal_center","align_horizontal_left","align_horizontal_right","align_vertical_bottom","align_vertical_center","align_vertical_top","all_inbox","all_inclusive","all_out","alt_route","alternate_email","amp_stories","analytics","anchor","android","animation","announcement","aod","apartment","api","app_blocking","app_registration","app_settings_alt","approval","apps","architecture","archive","area_chart","arrow_back","arrow_back_ios","arrow_back_ios_new","arrow_circle_down","arrow_circle_up","arrow_downward","arrow_drop_down","arrow_drop_down_circle","arrow_drop_up","arrow_forward","arrow_forward_ios","arrow_left","arrow_right","arrow_right_alt","arrow_upward","art_track","article","aspect_ratio","assessment","assignment","assignment_ind","assignment_late","assignment_return","assignment_returned","assignment_turned_in","assistant","assistant_direction","assistant_photo","atm","attach_email","attach_file","attach_money","attachment","attractions","attribution","audiotrack","auto_awesome","auto_awesome_mosaic","auto_awesome_motion","auto_delete","auto_fix_high","auto_fix_normal","auto_fix_off","auto_graph","auto_stories","autofps_select","autorenew","av_timer","baby_changing_station","back_hand","backpack","backspace","backup","backup_table","badge","bakery_dining","balcony","ballot","bar_chart","batch_prediction","bathroom","bathtub","battery_alert","battery_charging_full","battery_full","battery_saver","battery_std","battery_unknown","beach_access","bed","bedroom_baby","bedroom_child","bedroom_parent","bedtime","beenhere","bento","bike_scooter","biotech","blender","block","bloodtype","bluetooth","bluetooth_audio","bluetooth_connected","bluetooth_disabled","bluetooth_drive","bluetooth_searching","blur_circular","blur_linear","blur_off","blur_on","bolt","book","book_online","bookmark","bookmark_add","bookmark_added","bookmark_border","bookmark_outline","bookmark_remove","bookmarks","border_all","border_bottom","border_clear","border_color","border_horizontal","border_inner","border_left","border_outer","border_right","border_style","border_top","border_vertical","branding_watermark","breakfast_dining","brightness_1","brightness_2","brightness_3","brightness_4","brightness_5","brightness_6","brightness_7","brightness_auto","brightness_high","brightness_low","brightness_medium","broken_image","browser_not_supported","brunch_dining","brush","bubble_chart","bug_report","build","build_circle","bungalow","burst_mode","bus_alert","business","business_center","cabin","cable","cached","cake","calculate","calendar_today","calendar_view_day","calendar_view_month","calendar_view_week","call","call_end","call_made","call_merge","call_missed","call_missed_outgoing","call_received","call_split","call_to_action","camera","camera_alt","camera_enhance","camera_front","camera_indoor","camera_outdoor","camera_rear","camera_roll","cameraswitch","campaign","cancel","cancel_presentation","cancel_schedule_send","car_rental","car_repair","card_giftcard","card_membership","card_travel","carpenter","cases","casino","cast","cast_connected","cast_for_education","catching_pokemon","category","celebration","cell_wifi","center_focus_strong","center_focus_weak","chair","chair_alt","chalet","change_circle","change_history","charging_station","chat","chat_bubble","chat_bubble_outline","check","check_box","check_box_outline_blank","check_circle","check_circle_outline","checklist","checklist_rtl","checkroom","chevron_left","chevron_right","child_care","child_friendly","chrome_reader_mode","circle","circle_notifications","class","clean_hands","cleaning_services","clear","clear_all","close","close_fullscreen","closed_caption","closed_caption_disabled","closed_caption_off","cloud","cloud_circle","cloud_done","cloud_download","cloud_off","cloud_queue","cloud_upload","code","code_off","coffee","coffee_maker","collections","collections_bookmark","color_lens","colorize","comment","comment_bank","commute","compare","compare_arrows","compass_calibration","compost","compress","computer","confirmation_num","confirmation_number","connect_without_contact","connected_tv","construction","contact_mail","contact_page","contact_phone","contact_support","contactless","contacts","content_copy","content_cut","content_paste","content_paste_off","control_camera","control_point","control_point_duplicate","copy","copy_all","copyright","coronavirus","corporate_fare","cottage","countertops","create","create_new_folder","credit_card","credit_card_off","credit_score","crib","crop","crop_16_9","crop_3_2","crop_5_4","crop_7_5","crop_din","crop_free","crop_landscape","crop_original","crop_portrait","crop_rotate","crop_square","cruelty_free","cut","dangerous","dark_mode","dashboard","dashboard_customize","data_exploration","data_saver_off","data_saver_on","data_usage","date_range","deck","dehaze","delete","delete_forever","delete_outline","delete_sweep","delivery_dining","departure_board","description","design_services","desktop_access_disabled","desktop_mac","desktop_windows","details","developer_board","developer_board_off","developer_mode","device_hub","device_thermostat","device_unknown","devices","devices_other","dialer_sip","dialpad","dining","dinner_dining","directions","directions_bike","directions_boat","directions_boat_filled","directions_bus","directions_bus_filled","directions_car","directions_car_filled","directions_ferry","directions_off","directions_railway","directions_railway_filled","directions_run","directions_subway","directions_subway_filled","directions_train","directions_transit","directions_transit_filled","directions_walk","dirty_lens","disabled_by_default","disabled_visible","disc_full","dnd_forwardslash","dns","do_disturb","do_disturb_alt","do_disturb_off","do_disturb_on","do_not_disturb","do_not_disturb_alt","do_not_disturb_off","do_not_disturb_on","do_not_disturb_on_total_silence","do_not_step","do_not_touch","dock","document_scanner","domain","domain_disabled","domain_verification","done","done_all","done_outline","donut_large","donut_small","door_back","door_front","door_sliding","doorbell","double_arrow","downhill_skiing","download","download_done","download_for_offline","downloading","drafts","drag_handle","drag_indicator","draw","drive_eta","drive_file_move","drive_file_move_rtl","drive_file_rename_outline","drive_folder_upload","dry","dry_cleaning","duo","dvr","dynamic_feed","dynamic_form","e_mobiledata","earbuds","earbuds_battery","east","eco","edgesensor_high","edgesensor_low","edit","edit_attributes","edit_calendar","edit_location","edit_location_alt","edit_note","edit_notifications","edit_off","edit_road","eject","elderly","electric_bike","electric_car","electric_moped","electric_rickshaw","electric_scooter","electrical_services","elevator","email","emergency","emoji_emotions","emoji_events","emoji_flags","emoji_food_beverage","emoji_nature","emoji_objects","emoji_people","emoji_symbols","emoji_transportation","engineering","enhance_photo_translate","enhanced_encryption","equalizer","error","error_outline","escalator","escalator_warning","euro","euro_symbol","ev_station","event","event_available","event_busy","event_note","event_seat","exit_to_app","expand","expand_less","expand_more","explicit","explore","explore_off","exposure","exposure_minus_1","exposure_minus_2","exposure_neg_1","exposure_neg_2","exposure_plus_1","exposure_plus_2","exposure_zero","extension","extension_off","face","face_retouching_natural","face_retouching_off","face_unlock","facebook","fact_check","family_restroom","fast_forward","fast_rewind","fastfood","favorite","favorite_border","favorite_outline","featured_play_list","featured_video","feed","feedback","female","fence","festival","fiber_dvr","fiber_manual_record","fiber_new","fiber_pin","fiber_smart_record","file_copy","file_download","file_download_done","file_download_off","file_present","file_upload","filter","filter_1","filter_2","filter_3","filter_4","filter_5","filter_6","filter_7","filter_8","filter_9","filter_9_plus","filter_alt","filter_b_and_w","filter_center_focus","filter_drama","filter_frames","filter_hdr","filter_list","filter_none","filter_tilt_shift","filter_vintage","find_in_page","find_replace","fingerprint","fire_extinguisher","fireplace","first_page","fit_screen","fitness_center","flag","flaky","flare","flash_auto","flash_off","flash_on","flashlight_off","flashlight_on","flatware","flight","flight_land","flight_takeoff","flip","flip_camera_android","flip_camera_ios","flip_to_back","flip_to_front","flourescent","flutter_dash","fmd_bad","fmd_good","folder","folder_open","folder_shared","folder_special","follow_the_signs","font_download","font_download_off","food_bank","format_align_center","format_align_justify","format_align_left","format_align_right","format_bold","format_clear","format_color_fill","format_color_reset","format_color_text","format_indent_decrease","format_indent_increase","format_italic","format_line_spacing","format_list_bulleted","format_list_numbered","format_list_numbered_rtl","format_paint","format_quote","format_shapes","format_size","format_strikethrough","format_textdirection_l_to_r","format_textdirection_r_to_l","format_underline","format_underlined","forum","forward","forward_10","forward_30","forward_5","forward_to_inbox","foundation","free_breakfast","free_cancellation","front_hand","fullscreen","fullscreen_exit","functions","g_mobiledata","g_translate","gamepad","games","garage","gavel","generating_tokens","gesture","get_app","gif","gite","golf_course","gpp_bad","gpp_good","gpp_maybe","gps_fixed","gps_not_fixed","gps_off","grade","gradient","grading","grain","graphic_eq","grass","grid_3x3","grid_4x4","grid_goldenratio","grid_off","grid_on","grid_view","group","group_add","group_off","group_work","groups","h_mobiledata","h_plus_mobiledata","hail","handyman","hardware","hd","hdr_auto","hdr_auto_select","hdr_enhanced_select","hdr_off","hdr_off_select","hdr_on","hdr_on_select","hdr_plus","hdr_strong","hdr_weak","headphones","headphones_battery","headset","headset_mic","headset_off","healing","health_and_safety","hearing","hearing_disabled","height","help","help_center","help_outline","hevc","hide_image","hide_source","high_quality","highlight","highlight_alt","highlight_off","highlight_remove","hiking","history","history_edu","history_toggle_off","holiday_village","home","home_max","home_mini","home_repair_service","home_work","horizontal_distribute","horizontal_rule","horizontal_split","hot_tub","hotel","hotel_class","hourglass_bottom","hourglass_disabled","hourglass_empty","hourglass_full","hourglass_top","house","house_siding","houseboat","how_to_reg","how_to_vote","http","https","hvac","ice_skating","icecream","image","image_aspect_ratio","image_not_supported","image_search","imagesearch_roller","import_contacts","import_export","important_devices","inbox","incomplete_circle","indeterminate_check_box","info","input","insert_chart","insert_chart_outlined","insert_comment","insert_drive_file","insert_emoticon","insert_invitation","insert_link","insert_photo","insights","integration_instructions","inventory","inventory_2","invert_colors","invert_colors_off","invert_colors_on","ios_share","iron","iso","kayaking","keyboard","keyboard_alt","keyboard_arrow_down","keyboard_arrow_left","keyboard_arrow_right","keyboard_arrow_up","keyboard_backspace","keyboard_capslock","keyboard_control","keyboard_hide","keyboard_return","keyboard_tab","keyboard_voice","king_bed","kitchen","kitesurfing","label","label_important","label_off","landscape","language","laptop","laptop_chromebook","laptop_mac","laptop_windows","last_page","launch","layers","layers_clear","leaderboard","leak_add","leak_remove","leave_bags_at_home","legend_toggle","lens","lens_blur","library_add","library_add_check","library_books","library_music","light","light_mode","lightbulb","line_style","line_weight","linear_scale","link","link_off","linked_camera","liquor","list","list_alt","live_help","live_tv","living","local_activity","local_airport","local_atm","local_attraction","local_bar","local_cafe","local_car_wash","local_convenience_store","local_dining","local_drink","local_fire_department","local_florist","local_gas_station","local_grocery_store","local_hospital","local_hotel","local_laundry_service","local_library","local_mall","local_movies","local_offer","local_parking","local_pharmacy","local_phone","local_pizza","local_play","local_police","local_post_office","local_print_shop","local_printshop","local_restaurant","local_see","local_shipping","local_taxi","location_city","location_disabled","location_history","location_off","location_on","location_searching","lock","lock_clock","lock_open","login","logout","looks","looks_3","looks_4","looks_5","looks_6","looks_one","looks_two","loop","loupe","low_priority","loyalty","lte_mobiledata","lte_plus_mobiledata","luggage","lunch_dining","mail","mail_outline","male","manage_accounts","manage_search","map","maps_home_work","maps_ugc","margin","mark_as_unread","mark_chat_read","mark_chat_unread","mark_email_read","mark_email_unread","markunread","markunread_mailbox","masks","maximize","media_bluetooth_off","media_bluetooth_on","mediation","medical_services","medication","meeting_room","memory","menu","menu_book","menu_open","merge_type","message","messenger","messenger_outline","mic","mic_external_off","mic_external_on","mic_none","mic_off","microwave","military_tech","minimize","miscellaneous_services","missed_video_call","mms","mobile_friendly","mobile_off","mobile_screen_share","mobiledata_off","mode","mode_comment","mode_edit","mode_edit_outline","mode_night","mode_standby","model_training","monetization_on","money","money_off","money_off_csred","monitor","monitor_weight","monochrome_photos","mood","mood_bad","moped","more","more_horiz","more_time","more_vert","motion_photos_auto","motion_photos_off","motion_photos_on","motion_photos_pause","motion_photos_paused","motorcycle","mouse","move_to_inbox","movie","movie_creation","movie_filter","moving","mp","multiline_chart","multiple_stop","multitrack_audio","museum","music_note","music_off","music_video","my_library_add","my_library_books","my_library_music","my_location","nat","nature","nature_people","navigate_before","navigate_next","navigation","near_me","near_me_disabled","nearby_error","nearby_off","network_cell","network_check","network_locked","network_wifi","new_label","new_releases","next_plan","next_week","nfc","night_shelter","nightlife","nightlight","nightlight_round","nights_stay","no_accounts","no_backpack","no_cell","no_drinks","no_encryption","no_encryption_gmailerrorred","no_flash","no_food","no_luggage","no_meals","no_meeting_room","no_photography","no_sim","no_stroller","no_transfer","nordic_walking","north","north_east","north_west","not_accessible","not_interested","not_listed_location","not_started","note","note_add","note_alt","notes","notification_add","notification_important","notifications","notifications_active","notifications_none","notifications_off","notifications_on","notifications_paused","now_wallpaper","now_widgets","offline_bolt","offline_pin","offline_share","ondemand_video","online_prediction","opacity","open_in_browser","open_in_full","open_in_new","open_in_new_off","open_with","other_houses","outbond","outbound","outbox","outdoor_grill","outlet","outlined_flag","padding","pages","pageview","paid","palette","pan_tool","panorama","panorama_fish_eye","panorama_fisheye","panorama_horizontal","panorama_horizontal_select","panorama_photosphere","panorama_photosphere_select","panorama_vertical","panorama_vertical_select","panorama_wide_angle","panorama_wide_angle_select","paragliding","park","party_mode","password","paste","pattern","pause","pause_circle","pause_circle_filled","pause_circle_outline","pause_presentation","payment","payments","pedal_bike","pending","pending_actions","people","people_alt","people_outline","perm_camera_mic","perm_contact_cal","perm_contact_calendar","perm_data_setting","perm_device_info","perm_device_information","perm_identity","perm_media","perm_phone_msg","perm_scan_wifi","person","person_add","person_add_alt","person_add_alt_1","person_add_disabled","person_off","person_outline","person_pin","person_pin_circle","person_remove","person_remove_alt_1","person_search","personal_injury","personal_video","pest_control","pest_control_rodent","pets","phone","phone_android","phone_bluetooth_speaker","phone_callback","phone_disabled","phone_enabled","phone_forwarded","phone_in_talk","phone_iphone","phone_locked","phone_missed","phone_paused","phonelink","phonelink_erase","phonelink_lock","phonelink_off","phonelink_ring","phonelink_setup","photo","photo_album","photo_camera","photo_camera_back","photo_camera_front","photo_filter","photo_library","photo_size_select_actual","photo_size_select_large","photo_size_select_small","piano","piano_off","picture_as_pdf","picture_in_picture","picture_in_picture_alt","pie_chart","pie_chart_outline","pin","pin_drop","pin_end","pin_invoke","pivot_table_chart","place","plagiarism","play_arrow","play_circle","play_circle_fill","play_circle_filled","play_circle_outline","play_disabled","play_for_work","play_lesson","playlist_add","playlist_add_check","playlist_play","plumbing","plus_one","podcasts","point_of_sale","policy","poll","polymer","pool","portable_wifi_off","portrait","post_add","power","power_input","power_off","power_settings_new","precision_manufacturing","pregnant_woman","present_to_all","preview","price_change","price_check","print","print_disabled","priority_high","privacy_tip","private_connectivity","production_quantity_limits","psychology","public","public_off","publish","published_with_changes","push_pin","qr_code","qr_code_2","qr_code_scanner","query_builder","query_stats","question_answer","queue","queue_music","queue_play_next","quick_contacts_dialer","quick_contacts_mail","quickreply","quiz","r_mobiledata","radar","radio","radio_button_checked","radio_button_off","radio_button_on","radio_button_unchecked","railway_alert","ramen_dining","rate_review","raw_off","raw_on","read_more","real_estate_agent","receipt","receipt_long","recent_actors","recommend","record_voice_over","recycling","redeem","redo","reduce_capacity","refresh","remember_me","remove","remove_circle","remove_circle_outline","remove_done","remove_from_queue","remove_moderator","remove_red_eye","remove_shopping_cart","reorder","repeat","repeat_on","repeat_one","repeat_one_on","replay","replay_10","replay_30","replay_5","replay_circle_filled","reply","reply_all","report","report_gmailerrorred","report_off","report_problem","request_page","request_quote","reset_tv","restart_alt","restaurant","restaurant_menu","restore","restore_from_trash","restore_page","reviews","rice_bowl","ring_volume","roofing","room","room_preferences","room_service","rotate_90_degrees_ccw","rotate_left","rotate_right","rounded_corner","router","rowing","rss_feed","rsvp","rtt","rule","rule_folder","run_circle","running_with_errors","rv_hookup","safety_divider","sailing","sanitizer","satellite","save","save_alt","saved_search","savings","scanner","scatter_plot","schedule","schedule_send","schema","school","science","score","screen_lock_landscape","screen_lock_portrait","screen_lock_rotation","screen_rotation","screen_search_desktop","screen_share","screenshot","sd","sd_card","sd_card_alert","sd_storage","search","search_off","security","security_update","security_update_good","security_update_warning","segment","select_all","self_improvement","sell","send","send_and_archive","send_to_mobile","sensor_door","sensor_window","sensors","sensors_off","sentiment_dissatisfied","sentiment_neutral","sentiment_satisfied","sentiment_satisfied_alt","sentiment_very_dissatisfied","sentiment_very_satisfied","set_meal","settings","settings_accessibility","settings_applications","settings_backup_restore","settings_bluetooth","settings_brightness","settings_cell","settings_display","settings_ethernet","settings_input_antenna","settings_input_component","settings_input_composite","settings_input_hdmi","settings_input_svideo","settings_overscan","settings_phone","settings_power","settings_remote","settings_suggest","settings_system_daydream","settings_voice","share","share_arrival_time","share_location","shield","shop","shop_2","shop_two","shopping_bag","shopping_basket","shopping_cart","short_text","shortcut","show_chart","shower","shuffle","shuffle_on","shutter_speed","sick","signal_cellular_0_bar","signal_cellular_4_bar","signal_cellular_alt","signal_cellular_connected_no_internet_0_bar","signal_cellular_connected_no_internet_4_bar","signal_cellular_no_sim","signal_cellular_nodata","signal_cellular_null","signal_cellular_off","signal_wifi_0_bar","signal_wifi_4_bar","signal_wifi_4_bar_lock","signal_wifi_bad","signal_wifi_connected_no_internet_4","signal_wifi_off","signal_wifi_statusbar_4_bar","signal_wifi_statusbar_connected_no_internet_4","signal_wifi_statusbar_null","sim_card","sim_card_alert","sim_card_download","single_bed","sip","skateboarding","skip_next","skip_previous","sledding","slideshow","slow_motion_video","smart_button","smart_display","smart_screen","smart_toy","smartphone","smoke_free","smoking_rooms","sms","sms_failed","snippet_folder","snooze","snowboarding","snowmobile","snowshoeing","soap","social_distance","sort","sort_by_alpha","source","south","south_east","south_west","spa","space_bar","space_dashboard","speaker","speaker_group","speaker_notes","speaker_notes_off","speaker_phone","speed","spellcheck","splitscreen","sports","sports_bar","sports_baseball","sports_basketball","sports_cricket","sports_esports","sports_football","sports_golf","sports_handball","sports_hockey","sports_kabaddi","sports_mma","sports_motorsports","sports_rugby","sports_score","sports_soccer","sports_tennis","sports_volleyball","square_foot","stacked_bar_chart","stacked_line_chart","stairs","star","star_border","star_border_purple500","star_half","star_outline","star_purple500","star_rate","stars","stay_current_landscape","stay_current_portrait","stay_primary_landscape","stay_primary_portrait","sticky_note_2","stop","stop_circle","stop_screen_share","storage","store","store_mall_directory","storefront","storm","straighten","stream","streetview","strikethrough_s","stroller","style","subdirectory_arrow_left","subdirectory_arrow_right","subject","subscript","subscriptions","subtitles","subtitles_off","subway","summarize","superscript","supervised_user_circle","supervisor_account","support","support_agent","surfing","surround_sound","swap_calls","swap_horiz","swap_horizontal_circle","swap_vert","swap_vert_circle","swap_vertical_circle","swipe","switch_account","switch_camera","switch_left","switch_right","switch_video","sync","sync_alt","sync_disabled","sync_problem","system_security_update","system_security_update_good","system_security_update_warning","system_update","system_update_alt","system_update_tv","tab","tab_unselected","table_chart","table_rows","table_view","tablet","tablet_android","tablet_mac","tag","tag_faces","takeout_dining","tap_and_play","tapas","task","task_alt","taxi_alert","terrain","text_fields","text_format","text_rotate_up","text_rotate_vertical","text_rotation_angledown","text_rotation_angleup","text_rotation_down","text_rotation_none","text_snippet","textsms","texture","theater_comedy","theaters","thermostat","thermostat_auto","thumb_down","thumb_down_alt","thumb_down_off_alt","thumb_up","thumb_up_alt","thumb_up_off_alt","thumbs_up_down","time_to_leave","timelapse","timeline","timer","timer_10","timer_10_select","timer_3","timer_3_select","timer_off","tips_and_updates","title","toc","today","toggle_off","toggle_on","toll","tonality","topic","touch_app","tour","toys","track_changes","traffic","train","tram","transfer_within_a_station","transform","transgender","transit_enterexit","translate","travel_explore","trending_down","trending_flat","trending_neutral","trending_up","trip_origin","try","tty","tune","tungsten","turned_in","turned_in_not","tv","tv_off","two_wheeler","umbrella","unarchive","undo","unfold_less","unfold_more","unpublished","unsubscribe","upcoming","update","update_disabled","upgrade","upload","upload_file","usb","usb_off","verified","verified_user","vertical_align_bottom","vertical_align_center","vertical_align_top","vertical_distribute","vertical_split","vibration","video_call","video_camera_back","video_camera_front","video_collection","video_label","video_library","video_settings","video_stable","videocam","videocam_off","videogame_asset","videogame_asset_off","view_agenda","view_array","view_carousel","view_column","view_comfortable","view_comfy","view_compact","view_day","view_headline","view_in_ar","view_list","view_module","view_quilt","view_sidebar","view_stream","view_week","vignette","villa","visibility","visibility_off","voice_chat","voice_over_off","voicemail","volume_down","volume_mute","volume_off","volume_up","volunteer_activism","vpn_key","vpn_lock","vrpano","wallet_giftcard","wallet_membership","wallet_travel","wallpaper","warning","warning_amber","wash","watch","watch_later","water","water_damage","water_drop","waterfall_chart","waves","waving_hand","wb_auto","wb_cloudy","wb_incandescent","wb_iridescent","wb_shade","wb_sunny","wb_twilight","wc","web","web_asset","web_asset_off","weekend","west","whatshot","wheelchair_pickup","where_to_vote","widgets","wifi","wifi_calling","wifi_calling_3","wifi_lock","wifi_off","wifi_protected_setup","wifi_tethering","wifi_tethering_error_rounded","wifi_tethering_off","window","wine_bar","work","work_off","work_outline","workspaces","wrap_text","wrong_location","wysiwyg","yard","youtube_searched_for","zoom_in","zoom_out","zoom_out_map"]}];function M(e){const[t,a]=d({defaultIcon:mappl10n.options.defaultIcon,filename:null,filter:"",glyph:"",glyphColor:"white",glyphFont:O[0],glyphSize:20,isOpen:!1,mode:"list",shape:"circle",shapeColor:"gray",shapeFont:S[0],toDelete:[],userIcons:mappl10n.options.userIcons});function p(e){a((t=>({...t,...e})))}function c(a,n){switch(a){case"bulk-select":let a=[...t.toDelete],i=t.toDelete.indexOf(n.iconid);i>=0?a.splice(i,1):a.push(n.iconid),p({toDelete:a});break;case"close":p({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&o.mappLib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconids:t.toDelete,nonce:mappl10n.options.nonce},callback:function(a){a&&"OK"==a.status?(t.toDelete.indexOf(e.iconid)>=0&&!function(e){if(!e)return!1;let t=e.replace(/.png|.gif|.jpg/gi,"").toLowerCase();return mappl10n.options.standardIcons.indexOf(t)>=0}(e.iconid)&&e.onChange(null),mappl10n.options.userIcons=a.data,p({toDelete:[],mode:"list",userIcons:mappl10n.options.userIcons})):alert("Delete error: "+a.status)}});break;case"edit-cancel":p({mode:"list"});break;case"edit-save":!function(e){const a=32,o=2;let n=document.createElement("canvas");n.width=a*o,n.height=a*o,n.style.imageRendering="pixelated";let i=n.getContext("2d");i.font=a*o+"px "+t.shapeFont.fontFamily,i.fillStyle=t.shapeColor,i.textBaseline="bottom",i.fillText(t.shape,0,a*o),i.strokeStyle="white",i.strokeText(t.shape,1,a*o);const s=_.findWhere(t.shapeFont.glyphs,{name:t.shape});if(t.glyph&&s.center){i.imageSmoothingEnabled=!1,i.font=t.glyphSize*o+"px "+t.glyphFont.fontFamily,i.fillStyle=t.glyphColor;const e=[s.center[0]*o,s.center[1]*o];i.fillText(t.glyph,e[0]-t.glyphSize,e[1]+t.glyphSize)}"undefined"!=typeof debug?document.getElementById("mapp-edit-debug").append(n):n.toBlob((e=>{let a=new FormData;a.append("image0",e,t.filename),u(a)}),"image/png",100)}();break;case"edit-upload":!function(e){let t=new FormData;_.map(e,((e,a)=>{e.type.match("image.*")?t.append("image"+a,e):alert("File "+e.name+" is not an image.")})),u(t)}(n);break;case"list-select":e.onChange&&e.onChange(n),c("close");break;case"mode":p("bulk"==n?{mode:n,toDelete:[]}:{mode:n});break;case"open":p({isOpen:!0})}}function m(a){const n="user"==a?mappl10n.options.userIcons:mappl10n.options.standardIcons;return _.map(n,(n=>{if("standard"==a&&function(e){return mappl10n.options.userIcons.indexOf(e)>=0}(n+".png"))return"";let i="mapp-icon-wrapper";return"bulk"==t.mode&&t.toDelete.indexOf(n)>=0?i+=" mapp-bulk-selected":"list"!=t.mode||e.iconid!=n&&e.iconid+".png"!=n||(i+=" mapp-selected"),s("div",{alt:n,className:i,key:n,onClick:()=>{"list"==t.mode?c("list-select",n):"user"==a&&c("bulk-select",{iconid:n,type:a})}},s("img",{className:"mapp-icon",src:o.mappLib.getIconUrl(n),title:n}))}))}function u(t){t.append("action","mapp_icon_save"),t.append("nonce",mappl10n.options.nonce),o.mappLib.ajax({type:"POST",contentType:!1,processData:!1,data:t,success:t=>{t&&"OK"==t.status?(mappl10n.options.userIcons=t.data.icons,p({userIcons:mappl10n.options.userIcons}),p({mode:"list"}),e.onChange&&e.onChange(t.data.filename)):alert("Upload error: "+t.status)}})}return r((()=>{let e=t.glyph?t.glyph:t.shape;e+=".png",p({filename:e})}),[t.shape,t.shapeColor,t.glyphFont,t.glyph,t.glyphColor,t.glyphSize]),s(l,null,s("img",{className:"mapp-icon",onClick:()=>c("open",null),src:o.mappLib.getIconUrl(e.iconid)}),"list"==t.mode&&t.isOpen&&s(k,{title:s("div",{className:"mapp-icons-title"},__("Select icon"),s(g,{disabled:"bulk"==t.mode,isPrimary:!0,onClick:()=>c("mode","edit")},__("New icon"))),className:"mapp-icons-modal",onRequestClose:()=>c("close")},s("div",{className:"mapp-icons"},s("div",{className:"mapp-icons-list"},mappl10n.options.userIcons.length>0&&s("div",{className:"mapp-icons-list-title"},__("Custom icons")),s("div",{className:"mapp-icons-user"},m("user")),mappl10n.options.userIcons.length>0&&s("div",{className:"mapp-icons-list-title"},__("Standard icons")),s("div",{className:"mapp-icons-standard"},m("standard"))),s("div",{className:"mapp-icons-toolbar"},s("div",null,s(g,{disabled:"bulk"==t.mode,isSecondary:!0,onClick:()=>c("list-select",null)},__("Use default icon")),mappl10n.options.userIcons.length>0&&s(g,{isTertiary:!0,onClick:()=>c("mode","bulk")},__("Edit list"))),s("div",{className:"mapp-icons-filename"},e.iconid?e.iconid:__("No icon selected"))))),"bulk"==t.mode&&t.isOpen&&s(k,{title:s("div",{className:"mapp-icons-title"},__("Select icons to delete")),className:"mapp-icons-modal",onRequestClose:()=>c("close")},s("div",{className:"mapp-icons"},s("div",{className:"mapp-icons-list"},s("div",{className:"mapp-icons-user"},m("user"))),s("div",{className:"mapp-icons-toolbar"},s("div",null,s(g,{isDestructive:!0,disabled:t.toDelete.length<1,onClick:()=>c("delete")},__("Delete")),s(g,{isSecondary:!0,onClick:()=>c("mode","list")},__("Cancel")))))),"edit"==t.mode&&s(k,{title:__("Create new icon"),className:"mapp-icons-edit-modal",onRequestClose:()=>c("edit-cancel"),shouldCloseOnClickOutside:!1},s("div",{className:"mapp-icons-edit"},s("div",{id:"mapp-edit-debug"}),s("section",null,s("h2",null,__("Shape")),s("span",{className:"mapp-icons-edit-shapes",style:{color:t.shapeColor,fontFamily:t.shapeFont.fontFamily}},_.map(t.shapeFont.glyphs,((e,a)=>{const o=t.shape==e.name;return s("span",{className:"mapp-icons-edit-shape-wrapper"+(o?" mapp-selected":""),key:e.name,onClick:()=>p({shape:e.name}),title:e.name},s("span",{className:"mapp-icons-edit-shape"},e.name,e.center&&t.glyph&&s("div",{className:"mapp-icons-edit-shape-glyph "+t.glyphFont.className,style:{left:e.center[0],top:e.center[1],color:t.glyphColor,fontSize:t.glyphSize,width:t.glyphSize}},t.glyph)))})))),s("section",{className:"mapp-icons-edit-font"},s("h2",null,__("Font")),s(i.Select,{value:t.glyphFont.id,options:_.map(O,(e=>({value:e.id,label:e.label}))),onChange:e=>p({glyphFont:_.findWhere(O,{id:e}),glyph:null})}),s("span",null,__("Font size")),s(C,{initialPosition:20,min:16,max:24,value:t.glyphSize,onChange:e=>p({glyphSize:e})})),s("section",null,s("h2",null,__("Color")),s("span",{className:"mapp-icons-edit-colors"},s(n.MappColorPicker,{color:t.shapeColor,isExtended:!1,onChange:e=>p({shapeColor:e.color})}),s("span",null,__("Fill")),s(n.MappColorPicker,{color:t.glyphColor,isExtended:!1,onChange:e=>p({glyphColor:e.color})}),s("span",null,__("Stroke")))),function(){const e=_.filter(t.glyphFont.glyphs,(e=>!t.filter||e.includes(t.filter)));return s("div",{className:"mapp-icons-edit-glyphs"},s("section",{className:"mapp-icons-edit-search"},s("h2",null,__("Search")),s(i.Input,{value:t.filter,onChange:e=>p({filter:e})})),s("div",{className:"mapp-icons-edit-glyph-list",style:{color:t.glyphColor}},_.map(e,((e,a)=>s("div",{tabIndex:0,className:"mapp-icons-edit-glyph-wrapper"+(t.glyph==e?" mapp-selected":""),key:a,onClick:()=>p({glyph:t.glyph==e?null:e})},s("span",{className:"mapp-icons-edit-glyph "+t.glyphFont.className},e),s("div",{className:"mapp-icons-edit-glyph-title"},e.replaceAll("_"," ")))))))}(),s("div",{className:"mapp-icons-edit-toolbar"},s("div",{className:"mapp-icons-edit-toolbar-left"},s(g,{isPrimary:!0,onClick:()=>c("edit-save")},__("Save")),s(g,{isSecondary:!0,onClick:()=>c("edit-cancel")},__("Cancel")),s(i.Input,{className:"mapp-icons-filename",value:t.filename,onChange:e=>p({filename:e})})),s("div",null,s(v,{accept:"image/*",icon:"upload",multiple:!0,onChange:e=>{c("edit-upload",e.target.files)}},__("Upload icons")))))))}},24:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappImport:()=>y});var o=a(939),n=a(824);const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useCallback:p,useRef:c,useState:m}=wp.element,{useSelect:d}=wp.data,{withState:u}=wp.compose,{Button:h,FormFileUpload:g,Modal:f,ToggleControl:b}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function y(e){const[t,a]=m({isBusy:!1,isFetching:!1,file:null,isMapModalOpen:!1,mapid:null,mapdata:null,overwrite:!1,response:null,tab:"sheet",url:""}),r=c(null);function p(e){a((t=>({...t,...e})))}l((()=>{t.mapid&&(p({isFetching:!0,mapdata:null}),o.mappLib.ajax({type:"GET",data:{action:"mapp_get",mapid:t.mapid,nonce:mappl10n.options.nonce},callback:e=>{e&&"OK"==e.status?p({mapdata:e.data}):alert(e.status),p({isFetching:!1})}}))}),[t.mapid]),l((()=>{if(t.isMapModalOpen&&!t.isFetching&&t.mapdata&&r.current){new mapp.Map(t.mapdata,{height:"50vh",mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:!0,search:!1,sel:jQuery(r.current),width:"50vw"}).display()}}),[t.isMapModalOpen,t.isFetching,t.mapdata,r.current]);const d=t.isBusy||"file"==t.tab&&!t.file||"sheet"==t.tab&&0==t.url.trim().length;return i("div",{className:"mapp-import"},i("form",{onSubmit:e=>{e.preventDefault(),function(){p({isBusy:!0,response:null});let e={type:"POST",data:{url:t.url,action:"mapp_import",nonce:mappl10n.options.nonce,overwrite:t.overwrite},success:e=>{p({isBusy:!1}),e&&"OK"==e.status?p({response:e.data}):alert(e.status)},error:()=>{alert("Import error"),p({isBusy:!1})}};if("file"==t.tab){let a=new FormData;_.map(e.data,((e,t)=>a.append(t,e))),a.append("file",t.file),e={...e,data:a,contentType:!1,processData:!1}}o.mappLib.ajax(e)}()}},i(s,null,i("h2",null,__("Source")),i(n.MappTabs,{tabs:[{name:"sheet",label:__("Google Sheets")},{name:"file",label:__("File")}],initialTab:t.tab,onRender:e=>"sheet"==e?function(){const e=i("div",{className:"mapp-import-help"},__("Google sheets must be shared before importing:"),i("ol",null,i("li",null,__("File -> Share -> Publish to web")),i("li",null,__("Select 'Entire Document' and 'Comma-Separated Values (.csv)")),i("li",null,__("Copy the URL and paste it here"))));return i("div",{className:"mapp-import-tab-sheet"},i("label",{className:"mapp-import-sheet-name"},i("span",null,"URL"),i("input",{onChange:e=>function(e){p({url:e})}(e.target.value),type:"text",value:t.url})),e)}():"file"==e?function(){const e=i("div",{className:"mapp-import-help"},__("File must be in CSV format:"),i("ol",null,i("li",null,__("Excel: File -> Save As -> 'CSV' or 'CSV UTF-8' (for special characters)'")),i("li",null,__("Google sheets: File -> Download -> Comma Separated Values (.csv)"))));return i("div",{className:"mapp-import-tab-file"},i("div",{className:"mapp-import-file-name"},i(g,{accept:"text/csv",isSecondary:!0,multiple:!1,onChange:e=>{p({file:e.target.files[0]})}},__("Select file")),i("input",{disabled:!0,type:"text",value:t.file?t.file.name:""})),e)}():void 0,onSelect:e=>p({tab:e})})),i(b,{checked:t.overwrite,label:__("Use map IDs from file"),onChange:e=>p({overwrite:e})}),t.overwrite&&i("div",{className:"mapp-import-overwrite-warning"},__("WARNING: this will overwrite any existing maps with the same IDs")),i(h,{disabled:d,isBusy:t.isBusy,isPrimary:!0,type:"submit"},__("Import"))),function(){if(t.response&&t.response.results)return i("div",{className:"mapp-import-log"},i("h2",null,__("Results")),_.map(t.response.results,((e,a)=>i("div",{key:a},function(e){let a=t.response.headers;return i("div",{className:"mapp-import-table"},i("div",{className:"mapp-import-table-header"},i("div",{key:"line",className:"mapp-import-cell"},__("Line")),_.map(a,((e,t)=>i("div",{key:t,className:"mapp-import-cell"},e))),i("div",{key:"msg",className:"mapp-import-cell"},__("Result"))),_.map(e.logs,((e,t)=>{let o="mapp-import-cell";return e.msg&&(o+="e"==e.msg.msgtype?" mapp-import-cell-error":" mapp-import-cell-info"),i("div",{className:"mapp-import-row",key:t},i("div",{key:"col_rowid",className:"mapp-import-cell"},e.rowid),_.map(a,((t,a)=>i("div",{key:a,className:"mapp-import-cell"},e[t]?e[t]:" "))),i("div",{key:"error",className:o},e.msg.msg))})))}(e),function(e){return _.map(e.msgs,((e,a)=>{const o="e"==e.msgtype?"mapp-import-error":"mapp-import-info";return i("div",{className:o,key:a},e.msg,e.mapid&&i(h,{onClick:()=>{p({mapid:e.mapid,isMapModalOpen:!0})},disabled:t.isFetching||t.isMapModalOpen,isBusy:t.isFetching&&t.mapid==e.mapid,isSecondary:!0},__("Show map")))}))}(e)))))}(),t.isMapModalOpen&&!t.isFetching&&i(f,{title:__("Map")+" "+t.mapid,onRequestClose:()=>p({isMapModalOpen:!1})},i("div",{className:"mapp-import-map"},i("div",{ref:r}))))}document.getElementById("mapp-import-container")&&wp.element.render(i(y,null),document.getElementById("mapp-import-container"))},816:(e,t,a)=>{"use strict";a.r(t);var o=a(429),n=a(477);window.mapp=window.mapp||{};const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useRef:p,useState:c}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function m(e){const{Button:t,Placeholder:a,Toolbar:r,ToolbarButton:m,ToolbarGroup:d}=wp.components,{BlockControls:u,InspectorControls:_}=wp.blockEditor,[h,g]=c({isOpen:!1,map:null,mapdata:void 0,pickerMode:"list",pickerMapid:null}),f=p(null);function b(e){g((t=>({...t,...e})))}function y(){b({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"list"})}function v(){return i(u,null,i(void 0!==d?d:r,null,e.attributes.mapid&&i(m,{icon:"edit",label:__("Edit map"),onClick:()=>{b({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"edit"})}}),i(m,{icon:"portfolio",label:__("Map Library"),onClick:()=>y()})))}if(l((()=>{const t=t=>{b({mapdata:t.maps[e.attributes.mapid]})};return mapp.store.subscribe(t),()=>mapp.store.unsubscribe(t)})),l((()=>{e.attributes.mapid&&mapp.store.fetchMap(e.attributes.mapid)}),[e.attributes.mapid]),l((()=>{e.attributes.mapid&&f.current&&h.mapdata&&function(){let t=new mapp.Map(h.mapdata,{alignment:e.attributes.align,center:e.attributes.center,height:e.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:e.attributes.poiList,search:e.attributes.search,sel:jQuery(f.current),width:e.attributes.width,zoom:e.attributes.zoom});t.display(),b({map:t})}()}),[h.mapdata,e.attributes.search]),l((()=>{"wide"!=e.attributes.align&&"full"!=e.attributes.align||(e.setAttributes({width:"100%"}),h.map&&h.map.setSize({width:"100%"}))}),[e.attributes.align]),e.attributes.preview)return i("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"});let k;return k=e.attributes.mapid&&null!==h.mapdata?i(s,null,v(),function(){if(!h.map)return null;const{align:t,center:a,height:n,poiList:s,search:l,width:r,zoom:p}=e.attributes;return i(_,null,i("div",{className:"mapp-gt-inspector"},i(o.MappSettings,{map:h.map,alignment:t,context:"map",onChange:t=>{return a=t,void e.setAttributes(a);var a},center:a,height:n,poiList:s,search:l,width:r,zoom:p})))}(),i("div",{className:"mapp-gt",ref:f})):i(s,null,v(),i(a,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Use the map library to create a new map or insert an existing map.")},i(t,{icon:"portfolio",isSecondary:!0,onClick:()=>y()},__("Map Library")))),i(s,null,k,function(){if(h.isOpen)return i(n.default,{mapid:h.pickerMapid,mode:h.pickerMode,onClose:()=>{b({isOpen:!1})},onInsert:t=>function(t){t!=e.attributes.mapid&&e.setAttributes({center:void 0,mapid:t,zoom:void 0}),b({isOpen:!1})}(t),onTrash:()=>{e.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0})},type:"post"})}())}mappl10n.options.postid&&wp.blocks.registerBlockType("mappress/map",{title:__("MapPress Map"),icon:"location",description:__("Insert a map"),category:mappl10n.options.blockCategory,attributes:{center:{type:"string"},height:{type:"string",default:""},initialOpenDirections:{type:"boolean"},mapid:{type:"string"},mapOpts:{type:"object"},poiList:{type:"boolean"},preview:{type:"boolean",default:!1},search:{type:"boolean"},width:{type:"string",default:""},zoom:{type:"number"}},supports:{align:["full","wide","center","left","right"]},transforms:{from:[{type:"shortcode",tag:"mappress",attributes:{center:{type:"string",shortcode:e=>e.named.center},height:{type:"string",shortcode:e=>e.named.height},initialOpenDirections:{type:"boolean",shortcode:e=>"true"==e.named.initialOpenDirections||"true"==e.named.initialopendirections||void 0},mapid:{type:"string",shortcode:e=>e.named.mapid},poiList:{type:"boolean",shortcode:e=>"true"==e.named.poiList||"true"==e.named.poilist||void 0},search:{type:"boolean",shortcode:e=>"true"==e.named.search||"true"==e.named.search||void 0},width:{type:"string",shortcode:e=>e.named.width},zoom:{type:"number",shortcode:e=>parseInt(e.named.zoom)?parseInt(e.named.zoom):null}}},{type:"block",blocks:["core/shortcode"],isMatch:e=>{let{text:t}=e;var a=wp.shortcode.regexp("mappress");return a.lastIndex=0,a.test(t)},transform:e=>{let{text:t}=e;return wp.blocks.rawHandler({HTML:"<p>"+t+"</p>",mode:"BLOCKS"})}}]},edit:function(e){return i(m,e)},save:function(e){return e},example:{attributes:{preview:!0}}})},378:(e,t,a)=>{"use strict";a.r(t);a(429),a(670),a(308);window.mapp=window.mapp||{};wp.element.createElement;const{Fragment:o,useEffect:n,useLayoutEffect:i,useRef:s,useState:l}=wp.element,{BaseControl:r,Button:p,ButtonGroup:c,Card:m,CardBody:d,CardFooter:u,CardHeader:_,CheckboxControl:h,ExternalLink:g,HorizontalRule:f,Panel:b,PanelBody:y,PanelRow:v,Placeholder:k,RadioControl:w,SelectControl:C,TabPanel:x,TextControl:N,TextareaControl:S,ToggleControl:O,Toolbar:M}=wp.components,{useSelect:I}=wp.data},670:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappMultiSelect:()=>b});const o=wp.element.createElement,{Fragment:n,useEffect:i,useLayoutEffect:s,useRef:l,useState:r}=wp.element,{BaseControl:p,Button:c,CheckboxControl:m,Panel:d,PanelBody:u,PanelRow:h,Spinner:g,TextControl:f}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function b(e){const t=l(null),a=l(null),[n,s]=r({isOpen:!1,filter:"",filteredOptions:[]});function c(e){s((t=>({...t,...e})))}function d(t){let a=_.findWhere(e.options,{value:t});return a?a.label:t}function u(){let t;return e.values instanceof Array?t=[...e.values]:e.values&&(t=[e.values]),t||[]}function h(t,a){let o=u(),n=o.indexOf(t);(a=void 0!==a?a:-1==n)?o.push(t):o.splice(n,1),e.onChange(o)}function g(){return n.isOpen?o("div",{className:"mapp-select-dropdown-wrapper"},o("div",{className:"mapp-select-dropdown"},!n.isOpen||!e.options||e.options.length<10?null:o("div",{className:"mapp-select-filter",ref:a},o(f,{autoComplete:"off",placeholder:__("Search"),value:n.filter,onChange:e=>c({filter:e})})),o("div",{className:"mapp-select-dropdown-list"},function(){const e=u();if(0==n.filteredOptions.length)return o("div",{className:"mapp-select-dropdown-item"},__("No results"));return n.filteredOptions.map((t=>o(m,{className:"mapp-select-dropdown-item",checked:e.includes(t.value),key:t.value,onChange:e=>h(t.value,e),label:t.label})))}()))):null}return i((()=>{if(e.options)if(n.filter){let t=n.filter.toUpperCase();c({filteredOptions:e.options.filter((e=>0==e.label.toUpperCase().indexOf(t)))})}else c({filteredOptions:e.options})}),[e.options,n.filter]),i((()=>{n.isOpen&&a.current&&(jQuery("input",jQuery(a.current)).focus(),c({filter:""}))}),[n.isOpen]),o(p,{className:"mapp-select",label:e.label},o("div",{ref:t,tabIndex:0,onBlur:e=>function(e){event.relatedTarget||document.activeElement,t.current.contains(e.relatedTarget)||c({isOpen:!1})}(e)},function(){const t=u();return t instanceof Array&&t.map((e=>d(e))),void 0===e.options?o("div",{className:"mapp-select-input"},o("div",{className:"mapp-select-tokens"}),o("span",{className:"dashicons dashicons-arrow-down-alt2"})):o("div",{className:"mapp-select-input",onClick:()=>c({isOpen:!n.isOpen})},o("div",{className:"mapp-select-tokens"},t.map((e=>o("span",{className:"mapp-select-token",key:e,onClick:t=>{t.stopPropagation(),h(e,!1)}},d(e))))),o("span",{className:"dashicons "+(n.isOpen?"dashicons-arrow-up-alt2":"dashicons-arrow-down-alt2")}))}(),g()))}},218:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>k});var o=a(824),n=a(123),i=a(805),s=a(939),l=(a(535),a(710));const r=wp.element.createElement,{Fragment:p,useEffect:c,useLayoutEffect:m,useCallback:d,useRef:u,useState:h}=wp.element,{useSelect:g}=wp.data,{Button:f,Dashicon:b,FormTokenField:y,Modal:v}=wp.components,{sprintf}=wp.i18n,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function k(e){const[t,a]=h({...e,isCheckingLicense:!1,isSaving:!1}),m=u(null);function d(e){a((t=>({...t,...e})))}function v(e){return _.map(e,((e,t)=>({value:t,label:e})))}function k(e,t){return e&&Array.isArray(e)&&e.length?(_.map(e,(e=>{for(let t in e)"string"==typeof e[t]&&(e[t]=e[t].trim())})),t?e.filter((e=>{for(let t in e)if(!e[t]||0==e[t].length)return!1;return!0})):e.filter((e=>!(!e.hasOwnProperty("key")||!e.key)))):[]}function w(e,a){switch(e){case"license-check":d({isCheckingLicense:!0}),s.mappLib.ajax({type:"POST",data:{action:"mapp_license_check",nonce:mappl10n.options.nonce,license:t.license},callback:e=>{if(d({isCheckingLicense:!1}),e&&"OK"==e.status){let a={...t.helpers};a.license_status=e.data,d({helpers:a})}}});break;case"reset":d({isSaving:!0}),s.mappLib.ajax({type:"POST",data:{action:"mapp_options_reset",nonce:mappl10n.options.nonce},callback:e=>{d({isSaving:!1}),e&&"OK"==e.status&&window.location.reload()}});break;case"save":let e={...t};delete e.helpers,e.filters=k(e.filters,!1),e.metaKeys=k(e.metaKeys,!0),e.sizes=k(e.sizes,!0),e.autoicons&&e.autoicons.values&&(e.autoicons.values=k(e.autoicons.values,!0)),d({isSaving:!0}),s.mappLib.ajax({type:"POST",data:{action:"mapp_options_save",nonce:mappl10n.options.nonce,settings:JSON.stringify(e)},callback:e=>{d({isSaving:!1}),e&&"OK"==e.status&&window.location.reload()}})}}return c((()=>{if(m.current){new mapp.Map({alignment:"default",width:"100%",height:300,pois:[{address:"San Francisco, CA",title:"MapPress",body:__("Maps for WordPress"),point:{lat:37.774095,lng:-122.418731}}],sel:jQuery(m.current),zoom:8}).display()}}),[]),c((()=>{mappl10n.options.engine!=t.engine&&w("save")}),[t.engine]),r("div",{className:"mapp-options"},r("form",{onSubmit:e=>{e.preventDefault(),w("save")}},r(o.Section,{title:__("Sample Map"),className:"mapp-demo-section"},r("div",{className:"mapp-options-demo",ref:m})),mappl10n.options.pro&&(!t.helpers.is_multisite||t.helpers.is_super_admin||t.helpers.is_main_site)&&r(o.Section,{title:__("License")},r(o.Option,{title:__("MapPress license key"),className:"mapp-option-license"},r(o.Input,{value:t.license,name:"license",onChange:e=>{let a={...t.helpers};a.license_status="",d({license:e,helpers:a})},size:37,placeholder:__("Enter license to enable automatic updates")}),function(){const e=t.helpers.license_status,a=r(f,{isSecondary:!0,href:"https://mappresspro.com/mappress"},__("Get license")),o=r(f,{isBusy:t.isCheckingLicense,isSecondary:!0,onClick:()=>w("license-check")},__("Check now")),n=r(f,{isLink:!0,target:"_blank",href:"https://mappresspro.com/account"},__("Your account"));return t.license?"active"==e?r("span",{className:"mapp-license-status"},r(b,{icon:"yes"}),__("Active")):r(p,null,o,n,e&&!t.isCheckingLicense&&r("div",null,r(b,{icon:"no"}),"inactive"==e?__("License is invalid or expired"):e)):a}()),r(o.Option,{title:__("Beta versions")},r(o.Checkbox,{label:__("Enable updates for beta versions"),checked:t.betas,onChange:e=>d({betas:e})}))),r(o.Section,{title:__("Basic Settings")},r(o.Option,{title:__("Mapping API")},r(o.Radios,{options:[{label:"Leaflet",value:"leaflet"},{label:"Google",value:"google"}],onChange:e=>{d({engine:e,geocoder:"google"==e?"google":""})},checked:t.engine,help:{href:"#toc-picking-a-mapping-api",text:__("Leaflet is free and requires no API key. Google requires an API key and has usage limits.")}})),"leaflet"==t.engine&&function(){const e=[{value:"nominatim",label:"Nominatim",disabled:t.mapbox},{value:"mapbox",label:"MapBox",disabled:!t.mapbox},{value:"google",label:"Google",disabled:!t.apiKey}];let a={};return"nominatim"==t.geocoder&&(a={text:__("Nominatim is free but inaccurate. Consider using Mapbox or Google instead."),type:"warning"}),a.href="#toc-picking-a-geocoder",r(o.Option,{title:__("Geocoder")},r(o.Radios,{options:e,checked:t.geocoder,onChange:e=>d({geocoder:e}),help:a}))}(),"leaflet"==t.engine&&function(){const e=r(f,{isSecondary:!0,href:"https://account.mapbox.com/access-tokens/",target:"_blank"},__("Get an Access Token"));return r(o.Option,{title:__("Mapbox access token")},r("div",{className:"mapp-option-mapbox"},r(o.Input,{name:"mapbox",value:t.mapbox,onChange:e=>{d({mapbox:e}),d({geocoder:e?"mapbox":"nominatim"})},placeholder:__("Enter token to use Mapbox"),size:50}),e),r("div",{className:"mapp-help-text"},__("Mapbox makes Leaflet maps look great and provides an excellent geocoder.")))}(),function(){const e=r(f,{isSecondary:!0,href:"https://mappresspro.com/how-to-get-a-google-maps-api-key",target:"_blank"},__("Get an API Key"));return r(o.Option,{title:__("Google API key"),className:"mapp-option-apikey"},r(o.Input,{name:"apiKey",value:t.apiKey,onChange:e=>{d({apiKey:e})},placeholder:"google"==t.engine?__("Enter API key to use Google maps"):__("Enter API key to use Google geocoder"),size:50}),e)}()),r(o.Section,{title:__("Map Settings")},r(o.Option,{title:__("Automatic display")},r(o.Radios,{options:[{value:"",label:__("None")},{value:"top",label:__("Top of post")},{value:"bottom",label:__("Bottom of post")}],checked:t.autodisplay,onChange:e=>d({autodisplay:e})})),r(o.Option,{title:__("Map alignment")},r(o.Radios,{options:[{value:"",label:__("Default")},{value:"center",label:__("Center")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],checked:t.alignment,onChange:e=>d({alignment:e})})),r(o.Option,{title:__("Directions")},r(o.Radios,{checked:t.directions,options:[{value:"google",label:"Google"},{value:"inline",label:__("Inline")}],onChange:e=>d({directions:e})})),r(o.Option,{title:__("Mini width")},r(o.Input,{value:t.mini,onChange:e=>d({mini:e}),size:3,label:__("Width (px) to use map/list toggle buttons")})),"leaflet"==mappl10n.options.engine&&r(o.Option,{title:__("Scroll wheel zoom")},r(o.Checkbox,{checked:t.scrollWheel,label:__("Enable map zoom with mouse scroll wheel"),onChange:e=>d({scrollWheel:e})}))),r(o.Section,{title:__("POIs")},r(o.Option,{title:__("Default zoom")},r(o.Select,{label:__("Default zoom when displaying a single POI"),value:t.poiZoom,options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],(e=>({value:e,label:e}))),onChange:e=>d({poiZoom:e})})),r(o.Option,{title:__("Hover")},r(o.Checkbox,{checked:t.tooltips,label:__("Open POIs on hover"),onChange:e=>d({tooltips:e})})),r(o.Option,{title:__("Open first POI")},r(o.Checkbox,{checked:t.initialOpenInfo,onChange:e=>d({initialOpenInfo:e}),label:__("Open first POI when a map is displayed")})),r(o.Option,{title:__("Travel lines")},r(o.Checkbox,{label:__("Connect POIs with lines"),checked:t.lines,onChange:e=>d({lines:e})})),function(){const e=e=>d({lineOpts:{...t.lineOpts,...e}}),a=t.lineOpts,i=r(o.Select,{label:__("Icon"),onChange:t=>{e(t?{icons:[{icon:{path:t}}]}:{icons:null})},options:[{value:0,label:__("Circle")},{value:1,label:__("Arrow")},{value:2,label:__("Open arrow")}],placeholder:__("None"),value:a.icons?a.icons[0].icon.path:null}),s=r(o.Checkbox,{label:__("Geodesic (curved) lines"),checked:!!a.geodesic,onChange:t=>e({geodesic:t})}),l=r(o.Checkbox,{label:__("Animate icon"),checked:!!a.animate,onChange:t=>e({animate:t})});return r(o.Option,{title:__("Travel line options"),className:"mapp-option-line-options"},r(o.Control,{labelRight:__("Color")},r(n.MappColorPicker,{color:a.color,weight:a.weight,opacity:a.opacity,isExtended:!0,onChange:t=>e(t)})),"google"==t.engine&&s,"google"==t.engine&&i,"google"==t.engine&&l)}()),r(o.Section,{title:__("POI List")},r(o.Option,{title:__("Display")},r(o.Checkbox,{checked:t.poiList,label:__("Show a list of POIs with each map"),onChange:e=>d({poiList:e})})),r(o.Option,{title:__("Position")},r("div",{className:"mapp-option-poilist-radios"},r(o.Radios,{checked:t.layout,options:[{value:"left",label:__("Left of map")},{value:"inline",label:__("Below map")}],onChange:e=>d({layout:e})}))),"left"==t.layout&&r(o.Option,{title:__("Initial open")},r("div",{className:"mapp-option-poilist-open"},r(o.Checkbox,{checked:t.poiListOpen,label:__("Open list when map is displayed"),onChange:e=>d({poiListOpen:e})}))),r(o.Option,{title:__("Paging")},r("div",{className:"mapp-option-poilist-page-size"},r(o.Input,{labelRight:__("POIs per page"),max:999,min:1,onChange:e=>d({poiListPageSize:e}),size:3,type:"number",value:t.poiListPageSize}))),r(o.Option,{title:__("Sort")},r(o.Checkbox,{checked:t.sort,label:__("Sort POI list by title"),onChange:e=>d({sort:e})}))),r(o.Section,{title:__("Styled Maps")},r(o.Option,{title:__("Default style")},r("div",{className:"mapp-option-style"},r(l.m,{selected:t.style,onChange:e=>{d({style:e}),mappl10n.options.style=e}}),r("div",null,__('Replace the default "roadmap" or "streets" style'))))),mappl10n.options.pro&&r(o.Section,{title:__("Icons")},r(o.Option,{title:__("Default icon")},r(i.MappIconPicker,{iconid:t.defaultIcon,onChange:e=>{mappl10n.options.defaultIcon=e,d({defaultIcon:e})}})),r(o.Option,{title:__("Icon directory")},r("code",null,t.helpers.icon_directory)),r(o.Option,{title:__("Highlight selected POI")},r(o.Radios,{checked:t.highlight,options:[{value:"",label:__("None")},{value:"circle",label:__("Circle")},{value:"scale",label:__("Scale")},{value:"icon",label:__("Icon")}],onChange:e=>d({highlight:e})}),"icon"==t.highlight&&r(i.MappIconPicker,{defaultIcon:t.defaultIcon,iconid:t.highlightIcon,onChange:e=>d({highlightIcon:e})})),function(){let e=t.iconScale&&Array.isArray(t.iconScale)?[...t.iconScale]:[0,0];return r(o.Option,{title:__("Icon size")},r(o.Input,{min:0,max:64,onChange:t=>{t<=64&&(e[0]=t>0?t:"",d({iconScale:e}))},size:3,type:"number",value:e[0]?e[0]:""}),r("span",null," X "),r(o.Input,{min:0,max:64,onChange:t=>{t<=64&&(e[1]=t>0?t:"",d({iconScale:e}))},size:3,type:"number",value:e[1]?e[1]:""}),r("span",null," (px) "))}(),function(){let e=v(t.helpers.taxonomies);e.unshift({value:"post_type",label:__("Post type")});const a=g((e=>{if("post_type"==t.autoicons.key)return v(t.helpers.post_types);const a=wp.data.select("core").getEntityRecords("taxonomy",t.autoicons.key,{per_page:-1,_fields:"id,name,slug"});return a?a.map((e=>({value:e.slug,label:e.name}))):[]}),[t.autoicons.key]);return r(o.Option,{title:__("Automatic icons")},r(o.Select,{label:__('Be sure to set "Show in REST API" for custom taxonomies'),value:t.autoicons?t.autoicons.key:null,options:e,onChange:e=>{let a=t.autoicons?{...t.autoicons}:[];a.key=e,a.values=[],d({autoicons:a})},placeholder:""}),r(o.MappGrid,{cols:[{id:"key",label:__("Key"),type:"select",options:a},{id:"value",label:__("Icon"),type:"icon"}],data:t.autoicons.values,onChange:e=>{let a=t.autoicons?{...t.autoicons}:[];a.values=e,d({autoicons:a})}}))}()),r(o.Section,{title:__("Clustering")},r(o.Option,{title:__("Clustering")},r(o.Checkbox,{checked:t.clustering,label:__("Enable marker clustering"),onChange:e=>d({clustering:e})})),function(){let e=t.clusteringOptions?t.clusteringOptions:{};const a=(t,a)=>{e[t]=a,d({clusteringOptions:e})};if("google"==t.engine){const t="https://github.com/googlemaps/v3-utility-library/blob/3fca406/packages/markerclustererplus/src/markerclusterer.ts",n=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18];return r("div",{className:"mapp-option-clustering-options"},r(o.Option,{title:__("Max zoom")},r(o.Select,{help:{href:t},label:r(p,null,__("Disable clustering at zoom"),r("code",null,"maxZoom")),onChange:e=>a("maxZoom",e),options:_.map(n,(e=>({value:e,label:e}))),placeholder:__("None"),value:e.maxZoom})))}{const t="https://github.com/Leaflet/Leaflet.markercluster#all-options",n=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18];return r("div",{className:"mapp-option-clustering-options"},r(o.Option,{title:__("Max zoom")},r(o.Select,{help:{href:t},label:r(p,null,__("Disable clustering at zoom"),r("code",null,"disableClusteringAtZoom")),onChange:e=>a("disableClusteringAtZoom",e),options:_.map(n,(e=>({value:e,label:e}))),placeholder:__("Auto"),value:e.disableClusteringAtZoom})),r(o.Option,{title:__("Spiderfy")},r(o.Checkbox,{checked:e.spiderfyOnMaxZoom,help:{href:t},label:r(p,null,__("Spiderfy"),r("code",null,"spiderfyOnMaxZoom")),onChange:e=>a("spiderfyOnMaxZoom",e)})))}}()),mappl10n.options.pro&&r(o.Section,{title:__("Mashups")},function(){const e=[{value:"poi",label:__("Open popup")},{value:"post",label:__("Open post")},{value:"postnew",label:__("Post in new tab")},{value:"postmodal",label:__("Post in modal")}];return r(o.Option,{title:__("Marker click")},r(o.Radios,{checked:t.mashupClick,options:e,onChange:e=>d({mashupClick:e})}))}(),r(o.Option,{title:__("Popup content")},r(o.Radios,{checked:t.mashupBody,options:[{value:"poi",label:__("POI title + body + images")},{value:"post",label:__("Post title + excerpt + featured image")}],onChange:e=>d({mashupBody:e})})),r(o.Option,{title:__("KMLs")},r(o.Checkbox,{checked:t.mashupKml,label:__("Include KML POIs in mashups"),onChange:e=>d({mashupKml:e})}))),mappl10n.options.pro&&r(o.Section,{title:__("Search")},r(o.Option,{title:__("Search")},r(o.Checkbox,{checked:t.search,label:__("Enable search for mashups"),onChange:e=>d({search:e})})),r(o.Option,{title:__("Search radius")},r(o.Select,{help:{href:"https://mappresspro.com/mappress-documentation/#toc-mashup-search"},label:__("Minimum search radius (km)"),value:t.radius,options:_.map([1,5,10,15,25,50,75,100,200,300],(e=>({value:e,label:e}))),onChange:e=>d({radius:e})})),r(o.Option,{title:__("Search country")},r(o.Select,{label:__("Country code for searches"),value:t.country,options:_.map(["","AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","VG","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CK","CR","HR","CU","CW","CY","CZ","CD","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","CI","JM","JP","JE","JO","KZ","KE","KI","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","KP","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","CG","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","KR","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","VI","UG","UA","AE","GB","US","UM","UY","UZ","VU","VA","VE","VN","WF","EH","YE","ZM","ZW"],(e=>({value:e,label:e}))),onChange:e=>d({country:e}),help:{href:"https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements"}})),mappl10n.options.ssl?r(o.Option,{title:__("User location")},r(o.Checkbox,{checked:t.userLocation,label:__("Show user location on map"),onChange:e=>d({userLocation:e})})):null,function(){if("google"!=t.engine)return r(o.Option,{title:__("Bounding box")},r(o.Input,{onChange:e=>d({searchBox:e}),help:{text:__("Restrict searches to a bounding box (optional)"),href:"https://mappresspro.com/mappress-documentation/#toc-mashup-search"},placeholder:"SW lon, SW lat, NE lng, NE lat",size:45,value:t.searchBox}))}()),mappl10n.options.pro&&r(o.Section,{title:__("Mashup filters")},r(o.Option,{title:__("Filters position")},r(o.Radios,{options:[{value:"top",label:__("Top")},{value:"list",label:__("POI list")}],checked:t.filtersPos,onChange:e=>d({filtersPos:e})})),r(o.Option,{className:"mapp-option-filters",title:__("Filters")},r(o.MappCrudList,{data:t.filters,isDraggable:!0,onChangeData:e=>{d({filters:e})},onRender:e=>function(e){let{row:a,rowId:n,onChange:i,onDelete:s,...l}=e,p=v(t.helpers.taxonomies);const c=[{label:__("Post type"),value:"post"},{label:__("Text search"),value:"text"},{label:"──────────",value:"",disabled:!0},...p],m=function(e){const t=_.findWhere(c,{value:e.key});return t?t.label:__("New filter")},d="text"==a.key?[{value:"input",label:__("Input")}]:[{value:"checkbox",label:__("Checkboxes")},{value:"radio",label:__("Radio buttons")},{value:"select",label:__("Select")}];return r(o.MappExpand,{actions:r("div",null,r(f,{icon:"trash",onClick:()=>s(),title:__("Delete")})),className:"mapp-option-filter",initialOpen:!a.key,showToggle:!0,title:m(a)},r("div",{className:"mapp-option-filter-row"},r(o.Select,{labelTop:__("Filter type"),value:a.key,options:c,onChange:e=>i({key:e,format:"text"==e?"input":"checkbox"}),placeholder:""}),r(o.Select,{labelTop:__("Format"),value:a.format,options:d,placeholder:"",onChange:e=>i({format:e})}),r(o.Input,{labelTop:__("Label"),placeholder:m(a),value:a.label,onChange:e=>i({label:e})}),"post"!=a.key&&"meta"!=a.key&&"text"!=a.key&&r(o.Select,{labelTop:__("Sort"),value:a.sort,options:[{value:"name",label:__("Name")},{value:"slug",label:__("Slug")}],onChange:e=>i({sort:e})})),a.key&&"meta"!=a.key&&"text"!=a.key&&r("div",{className:"mapp-option-filter-row mapp-option-filter-tokens"},r(y,{label:__("Include"),value:a.include,onChange:e=>i({include:e}),__experimentalShowHowTo:!0}),r(y,{label:__("Exclude"),value:a.exclude,onChange:e=>i({exclude:e})})))}(e)}))),mappl10n.options.pro&&r(o.Section,{title:__("Templates")},r(o.Option,{title:__("Custom templates")},r(o.MappTemplateEditor)),r(o.Option,{title:__("Directions link")},r(o.Checkbox,{checked:t.directionsPopup,label:__("Show a directions link in popups"),onChange:e=>d({directionsPopup:e})})),r(o.Option,{title:__("Mashup thumbnails")},r(o.Select,{label:__("Popups"),onChange:e=>d({thumbsPopup:e}),options:[{value:"",label:__("None")},{value:"top",label:__("Top")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],value:t.thumbsPopup}),r(o.Select,{label:__("POI lists"),onChange:e=>d({thumbsList:e}),options:[{value:"",label:__("None")},{value:"top",label:__("Top")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],value:t.thumbsList})),r(o.Option,{title:__("Thumbnail size")},r(o.Select,{onChange:e=>d({thumbSize:e}),options:v(t.helpers.thumbnail_sizes),value:t.thumbSize}),r("span",null," "+__("or")+" "),r(o.Input,{value:t.thumbWidth,onChange:e=>d({thumbWidth:e}),type:"number",min:0,max:9999}),r("span",null," X "),r(o.Input,{value:t.thumbHeight,onChange:e=>d({thumbHeight:e}),type:"number",min:0,max:9999}),r("span",null," (px) "))),r(o.Section,{title:__("Localization")},function(){const e="leaflet"==t.engine?"https://en.wikipedia.org/wiki/ISO_639-1":"http://code.google.com/apis/maps/faq.html#languagesupport";return r(o.Option,{title:__("Language")},r(o.Select,{value:t.language,options:v(t.helpers.languages),onChange:e=>d({language:e}),help:{href:e,text:__("Language for searches and Google map controls")}}))}(),r(o.Option,{title:__("Directions server")},r(o.Input,{value:t.directionsServer,onChange:e=>d({directionsServer:e}),size:25}))),mappl10n.options.pro&&r(o.Section,{title:__("Generate Maps from Custom Fields")},r(o.Option,{title:__("Custom fields")},r(o.MappGrid,{cols:[{id:"key",label:__("Map field"),type:"select",options:v(t.helpers.meta_fields)},{id:"value",label:__("Custom field"),type:"combobox",options:v(t.helpers.meta_keys)}],data:t.metaKeys,onChange:e=>{d({metaKeys:e})}})),r(o.Option,{title:__("Post types")},r(o.Checkboxes,{values:t.postTypes,options:v(t.helpers.post_types),onChange:e=>d({postTypes:e})})),r(o.Option,{title:__("Overwrite")},r(o.Checkbox,{label:__("Overwrite maps when posts are saved"),checked:t.metaSyncSave,onChange:e=>{d({metaSyncSave:e})}})),"google"==t.engine&&r(o.Option,{title:__("Google Server API key")},r(o.Input,{name:"apiKeyServer",value:t.apiKeyServer,onChange:e=>d({apiKeyServer:e}),size:50,help:{text:__("Server API key for geocoding. Only required if client key is restricted by referrer."),href:"https://mappresspro.com/mappress-documentation/#toc-google-api-keys"}}))),mappl10n.options.pro&&mappl10n.options.acfActive&&r(o.Section,{title:__("Frontend Forms")},r(o.Option,{title:__("Advanced Custom Fields")},r(o.Input,{className:"mapp-option-acf",name:"acf",value:t.acf,onChange:e=>{d({acf:e})},size:20}),__("ACF map field to include on MapPress mashups"),r(o.Help,{text:__("To generate MapPress maps from ACF fields, leave this blank and use the Geocoding section"),href:"https://mappresspro.com/mappress-documentation/#toc-frontend-forms"}))),r(o.Section,{title:__("Miscellaneous")},r(o.Option,{title:__("Map sizes")},r(o.MappGrid,{cols:[{id:"width",label:__("Width")+" (px, %, vw)",size:4},{id:"height",label:__("Height")+" (px, %, vh)"}],data:t.sizes,onChange:(e,t)=>d({sizes:e,size:t}),selectionColumn:"rowid",selected:t.size})),t.helpers.jetpack?null:r(o.Option,{title:__("Scripts")},r(o.Checkbox,{checked:t.footer,label:__("Output scripts in footer"),onChange:e=>d({footer:e}),help:{text:__("Disable footer scripts if maps are output using AJAX")}})),r(o.Option,{title:"WPML"},r(o.Checkbox,{checked:t.wpml,label:__("Copy maps when overwriting a translation"),onChange:e=>d({wpml:e}),help:{href:"https://mappresspro.com/mappress-documentation#wpml"}})),r(o.Option,{title:__("Compatibility")},r("div",null,r(o.Checkbox,{checked:t.deregister,label:__("Prevent loading Google Maps multiple times"),onChange:e=>d({deregister:e})})),r("div",null,r(o.Checkbox,{checked:t.iframes,label:__("Output maps in iframes to prevent compatibility issues"),onChange:e=>d({iframes:e})})))),r("div",{className:"mapp-options-toolbar"},r(f,{isBusy:t.isSaving,className:"mapp-options-save",type:"submit",isPrimary:!0},__("Save")),r(f,{isBusy:t.isSaving,isSecondary:!0,onClick:()=>w("reset")},__("Reset Defaults")))))}window.addEventListener("DOMContentLoaded",(e=>{document.getElementById("mapp-options-settings")&&wp.element.render(r(k,mappress_options_state),document.getElementById("mapp-options-settings"))}))},824:(e,t,a)=>{"use strict";a.r(t),a.d(t,{Control:()=>b,Help:()=>y,Checkbox:()=>v,Checkboxes:()=>k,Datalist:()=>w,Input:()=>C,Radios:()=>N,Select:()=>S,Textarea:()=>O,Section:()=>M,Option:()=>I,MappGrid:()=>P,MappCrudList:()=>E,MappExpand:()=>z,MappTabs:()=>T,MappTemplateEditor:()=>L});var o=a(805),n=a(939);const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useCallback:p,useRef:c,useState:m}=wp.element,{useSelect:d}=wp.data,{Button:u,Dashicon:h,Modal:g,TabPanel:f}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function b(e){let{className:t,help:a,type:o,...n}=e;const l=Array.isArray(n.children)?s:"label";let r="mapp-control";return o&&(r+=" mapp-control-"+o),t&&(r+=" "+t),i("div",{className:r},n.labelTop&&i("div",{className:"mapp-label-top"},n.labelTop),i(l,null,n.labelLeft&&i("span",null,n.labelLeft),n.children,(n.label||n.labelRight)&&i("span",null,n.label||n.labelRight)),a&&i(y,a))}function y(e){let t="mapp-help-text";e.type&&(t+=" mapp-help-"+e.type);let a=null;return e.href&&(a="#"==e.href.substr(0,1)?"https://mappresspro.com/mappress-documentation/"+e.href:e.href),i(s,null,a&&i("a",{className:"mapp-help-link",href:a,target:"_blank"},i(h,{icon:"editor-help"})),e.text&&i("div",{className:t},e.text))}function v(e){let{checked:t,className:a,disabled:o,onChange:n,value:s,...l}=e;return i(b,{type:"checkbox",...l},i("input",{checked:void 0!==t&&t,className:a,disabled:o,onChange:e=>n(e.target.checked),type:"checkbox",value:s}))}function k(e){let{label:t,onChange:a,options:o,values:n,...s}=e;return i(b,{type:"checkboxes",...s},_.map(o,((e,t)=>{let o=n?n.indexOf(e.value):-1;return i(v,{key:t,label:e.label,value:e.value,checked:o>=0,disabled:e.disabled,onChange:t=>{let i=[...n];t&&-1==o&&a(i.concat(e.value)),!t&&o>=0&&(i.splice(o,1),a(i))}})})))}function w(e){let{className:t,list:a,onChange:o,options:n,value:s,...l}=e;return i(b,{type:"select",...l},i("span",{className:t},i("input",{list:a,value:null!=s?s:"",onChange:e=>o(e.target.value)}),i("datalist",{id:a},_.map(n,((e,t)=>i("option",{key:t,value:e.value,disabled:e.disabled},e.label))))))}function C(e){let{autoFocus:t,disabled:a,max:o,min:n,name:s,onChange:l,placeholder:r,size:p,trim:c,type:m,value:d,...u}=e;return i(b,{type:"input",...u},i("input",{autoFocus:t,disabled:a,max:o,min:n,name:s,onChange:e=>{if(l){const t=c?e.target.value.trim():e.target.value;l(t)}},placeholder:r,size:p,type:m||"text",value:null!==d?d:""}))}const x=function(e){let{checked:t,className:a,disabled:o,onChange:n,value:s,...l}=e;return i(b,{type:"radio",...l},i("input",{checked:t,className:a,disabled:o,onChange:e=>n(e.target.value),type:"radio",value:s}))};function N(e){let{checked:t,label:a,onChange:o,options:n,...s}=e;return i(b,{type:"radios",...s},_.map(n,((e,a)=>{if(!e.hide)return i(x,{key:a,value:e.value,checked:t==e.value||null==t&&""==e.value,onChange:e=>o(e),disabled:e.disabled,label:e.label})})))}function S(e){let{className:t,onChange:a,options:o,placeholder:n,value:s,...l}=e,r=[...o];return void 0!==n&&r.unshift({value:"",label:n}),i(b,{type:"select",...l},i("select",{className:t,value:null!=s?s:"",onChange:e=>a(e.target.value)},_.map(r,((e,t)=>i("option",{key:t,value:e.value,disabled:e.disabled},e.label)))))}function O(e){let{className:t,onChange:a,...o}=e;return i(b,{type:"textarea",...o},i("textarea",{className:t,onChange:e=>a(e.target.value)}))}function M(e){let t=e.className?" "+e.className:"";return i("div",{className:"mapp-option-section"+t},i("h2",null,e.title),e.children)}function I(e){const t=e.className?"mapp-option "+e.className:"mapp-option";return i("div",{className:t},i("div",{className:"mapp-option-title"},e.title),i("div",{className:"mapp-option-value"},e.children))}function P(e){const[t,a]=m({dragging:null,dragover:null});function n(e){a((t=>({...t,...e})))}function s(a,o){let i=[...e.data];switch(a){case"add":let a={};_.map(e.cols,(e=>{a[e.id]=""})),i.push(a),e.onChange(i,e.selected);break;case"change":i[o.i][o.id]=o.value,e.onChange(i,e.selected);break;case"delete":let s;i.splice(o,1),s=o==e.selected?null:o<e.selected?e.selected-1:e.selected,e.onChange(i,s);break;case"select":n({selected:o}),e.onChange(i,o);break;case"sort":let l=t.dragging,r=l<o?o-1:o;i.splice(r,0,i.splice(l,1)[0]),e.onChange(i,r),n({dragover:null})}}return i("div",{className:e.className?"mapp-grid "+e.className:"mapp-grid"},e.data&&!!e.data.length&&i("div",{className:"mapp-grid-table"},function(){const t=e.selectionColumn?i("div",{className:"mapp-grid-cell",key:"select"},__("Default")):null,a=i("div",{className:"mapp-grid-cell",key:"actions"},"");return i("div",{className:"mapp-grid-header"},i("div",{className:"mapp-grid-row"},t,_.map(e.cols,(e=>i("div",{className:"mapp-grid-cell",key:e.id},e.label))),a))}(),i("div",{className:"mapp-grid-body"},_.map(e.data,((a,l)=>function(a,l){return i("div",{className:"mapp-grid-row"+(t.dragover==l?" mapp-dragover":""),draggable:!0,key:l,onDragOver:e=>e.preventDefault(),onDragStart:e=>n({dragging:l}),onDragEnter:e=>n({dragover:l}),onDragEnd:e=>n({dragging:null,dragover:null}),onDrop:e=>s("sort",l)},function(t,a){if(!e.selectionColumn)return null;let o,n;return"rowid"==e.selectionColumn?o=a:t[e.selectionColumn]?o=t[e.selectionColumn]:n=!0,"checkbox"===e.selectionType?i("div",{className:"mapp-grid-cell"},i(v,{value:o,checked:e.selected==o,disabled:n,onChange:e=>{s("select",e?o:null)}})):i("div",{className:"mapp-grid-cell"},i(x,{checked:e.selected==o,onChange:()=>s("select",o)}))}(a,l),_.map(e.cols,((t,a)=>i("div",{className:"mapp-grid-cell mapp-grid-cell-"+t.id,key:l+"-"+a},function(t,a){if(a.onRender)return a.onRender({id:a.id,value:e.data[t][a.id],onChange:e=>s("change",{i:t,id:a.id,value:e})});switch(a.type){case"combobox":return i(w,{list:a.id+"_"+t,options:a.options,value:e.data[t][a.id],onChange:e=>s("change",{i:t,id:a.id,value:e})});case"icon":return i(o.MappIconPicker,{iconid:e.data[t][a.id],onChange:e=>s("change",{i:t,id:a.id,value:e})});default:return i(C,{size:e.data[t][a.size],value:e.data[t][a.id],onChange:e=>s("change",{i:t,id:a.id,value:e})});case"select":return i(S,{value:e.data[t][a.id],options:a.options,onChange:e=>s("change",{i:t,id:a.id,value:e}),placeholder:""})}}(l,t)))),function(e){return i("div",{className:"mapp-grid-cell",key:"delete"},i(u,{icon:"trash",onClick:()=>s("delete",e)}))}(l))}(a,l))))),i("div",{className:"mapp-grid-toolbar"},i(u,{isSecondary:!0,onClick:()=>s("add")},__("Add"))))}function E(e){let{data:t,isDraggable:a,onAdd:o,onChangeData:n,onRender:s,...r}=e;const[p,c]=m({dragging:null,dragover:null,isDraggable:!1});function d(e){c((t=>({...t,...e})))}function h(e,a,i){let s=Array.isArray(t)?[...t]:[];switch(e){case"add":const e=o?o():{};s.push(e),n(s);break;case"change":s[i]={...t[i],...a},n(s);break;case"delete":confirm(mappl10n.delete_prompt)&&(s.splice(a,1),n(s));break;case"sort":let l=p.dragging,r=l<a?a-1:a;s.splice(r,0,s.splice(l,1)[0]),n(s),d({dragover:null})}}return l((()=>{}),[]),i("div",{className:"mapp-crud-list"},_.map(t,((e,t)=>i("div",{className:"mapp-crud-row"+(p.dragover==t?" mapp-dragover":""),draggable:a,key:t,onDragOver:e=>e.preventDefault(),onDragStart:e=>d({dragging:t}),onDragEnter:e=>d({dragover:t}),onDragEnd:e=>d({dragging:null,dragover:null}),onDrop:e=>h("sort",t)},s({row:e,rowId:t,onChange:e=>h("change",e,t),onDelete:()=>h("delete",t)})))),i("div",{className:"mapp-crud-toolbar"},i(u,{isSecondary:!0,onClick:()=>h("add")},__("Add"))))}function z(e){let{actions:t,initialOpen:a,showToggle:o,subTitle:n,title:s,...l}=e;const[r,p]=m({isOpen:!o||a});function c(e,t){if("toggle"===e)o&&(a={isOpen:!r.isOpen},p((e=>({...e,...a}))));var a}let d="mapp-expand";return d+=r.isOpen?"":" mapp-expand-closed",d+=l.className?" "+l.className:"",i("div",{className:d},i("div",{className:"mapp-expand-header",onClick:()=>c("toggle")},i("div",null,s,n),o&&i("div",null,i(h,{icon:r.isOpen?"arrow-up":"arrow-down"}))),i("div",{className:"mapp-expand-body"},l.children),t&&i("div",{className:"mapp-expand-footer"},t))}function T(e){e={className:null,onRender:null,onSelect:null,initialTab:null,tabs:[],...e};const[t,a]=m({tab:e.initialTab?e.initialTab:e.tabs[0].name});function o(t){var o;o={tab:t},a((e=>({...e,...o}))),e.onSelect&&e.onSelect(t)}const{className:n="",style:s={}}=e;return i("div",{className:"mapp-tabs "+n,style:s},i("div",{className:"mapp-tabs-nav"},_.map(e.tabs,(e=>i("div",{className:e.name==t.tab?"mapp-tab mapp-active":"mapp-tab",key:e.name,onClick:()=>o(e.name)},e.label)))),i("div",{className:"mapp-tab-content"},e.onRender(t.tab)))}function L(e){const[t,a]=m({codeEditor:null,isOpen:!1,name:null,tab:"editor",template:null,tokens:null});function o(e){a((t=>({...t,...e})))}const l=p((e=>{if(null!=e){let a=wp.codeEditor.initialize(e);a.codemirror.setSize("auto","auto"),a.codemirror.setOption("readOnly","editor"!=t.tab),o({codeEditor:a})}}),[]);function r(){o({isOpen:!1})}function c(){const e=i("div",{className:"mapp-templates-tokens"},_.map(t.tokens,((e,a)=>i("code",{onClick:()=>function(e){let a=t.codeEditor.codemirror.getDoc(),o=a.getCursor();a.replaceRange("{{{poi."+e.token+"}}}",o)}(e),key:e.token,title:e.label},e.label)))),a=i("div",{className:"mapp-templates-path"},t.template.path);return i(s,null,"editor"==t.tab&&a,"editor"==t.tab&&e,i("div",{className:"editor"==t.tab?"mapp-templates-editor":"mapp-templates-standard"},i("textarea",{ref:l,defaultValue:"editor"==t.tab?t.template.content:t.template.standard})))}function d(){const e=t.template.name+" ("+(t.template.exists?__("Custom"):__("New"))+")";return i("div",{className:"mapp-templates-name"},e)}return i("div",{className:"mapp-templates"},function(){const e=[{name:"map-popup",label:__("Map popup")},{name:"map-item",label:__("Map list item")},{name:"mashup-popup",label:__("Mashup popup")},{name:"mashup-item",label:__("Mashup list item")}];return i("div",{className:"mapp-templates-list"},_.map(e,((e,t)=>i("a",{href:"#",key:e.name,className:"mapp-templates-item",onClick:t=>{var a;t.preventDefault(),a=e.name,n.mappLib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:a,nonce:mappl10n.options.nonce},callback:e=>{e&&"OK"==e.status&&o({isOpen:!0,name:a,tab:"editor",template:e.data.template,tokens:e.data.tokens})}})}},e.label))))}(),t.isOpen&&t.template?i(g,{title:d(),className:"mapp-templates-modal",onRequestClose:()=>r(),shouldCloseOnClickOutside:!1},i(T,{className:"mapp-templates-tabs",onRender:e=>c(),onSelect:e=>function(e){if("editor"!=e){let e={...t.template};e.content=t.codeEditor.codemirror.getValue(),o({template:e})}o({tab:e})}(e),tabs:[{name:"editor",label:__("Editor")},{name:"standard",label:__("Default")}]}),t.error&&i("div",{className:"mapp-templates-error"},t.error),i("div",{className:"mapp-templates-toolbar"},i("div",null,i(u,{isPrimary:!0,onClick:()=>function(){let e="editor"==t.tab?t.codeEditor.codemirror.getValue():t.template.content;n.mappLib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:e,name:t.template.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&o({isOpen:!1,template:null,tokens:null})}})}()},__("Save")),i(u,{isSecondary:!0,onClick:()=>r()},__("Cancel"))),i("div",null,t.template.exists&&i(u,{isDestructive:!0,title:__("Reset template to default"),onClick:e=>{e.preventDefault(),confirm(mappl10n.delete_prompt)&&(n.mappLib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:t.template.name,nonce:mappl10n.options.nonce}}),o({isOpen:!1}))}},__("Reset"))))):null)}},535:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappOptionsMeta:()=>f});var o=a(824),n=a(939);const i=wp.element.createElement,{Fragment:s,useEffect:l,useLayoutEffect:r,useCallback:p,useRef:c,useState:m}=wp.element,{Button:d,Dashicon:u,FormTokenField:h,Modal:g}=wp.components,{sprintf}=wp.i18n,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function f(e){e={errors:null,postEdit:null,userEdit:null,...e};const[t,a]=m({errors:e.errors?e.errors:[],isBusy:!1,isDone:!1,logs:[],otype:null,start:null});c(null);function r(e){a((t=>({...t,...e})))}function p(e){r({isDone:!1,isBusy:!0,errors:[],logs:[],otype:e,start:0})}function u(t){if(t)return i("div",{className:"mapp-option-geocode-log"},_.map(t,(t=>{let a="";return a="user"==t.otype?e.userEdit+"?user_id="+t.oid:e.postEdit+"?post="+t.oid+"&action=edit",i("div",{className:"mapp-option-geocode-log-row",key:t.oid},i("div",null,t.otype),i("div",null,t.oid),i("div",null,i("a",{href:a,target:"_blank"},t.title)),i("div",null,t.msg))})))}l((()=>{t.isDone&&r({isBusy:!1})}),[t.start,t.isDone]),l((()=>{null===t.start||t.isDone||n.mappLib.ajax({type:"POST",data:{action:"mapp_geocode",batch_size:5,nonce:mappl10n.options.nonce,otype:t.otype,start:t.start},callback:e=>{if(e&&"OK"==e.status){const a=e.data.logs.length<5;r({errors:e.data.errors,isBusy:!a,isDone:a,logs:t.logs.concat(e.data.logs),start:a?t.start:t.start+5})}}})}),[t.start,t.isDone]);const h=t.logs.length?t.logs.length:1;let g="";return t.isBusy?g=__("Geocoding... "+h):t.isDone&&(g=__("Done")),i(s,null,i(o.Option,{title:__("Geocoding")},i(d,{className:"mapp-option-geocode",disabled:t.isBusy,isBusy:t.isBusy,isSecondary:!0,onClick:()=>{t.isBusy||p("post")}},__("Geocode posts")),i(d,{className:"mapp-option-geocode",disabled:t.isBusy,isBusy:t.isBusy,isSecondary:!0,onClick:()=>{t.isBusy||p("user")}},__("Geocode users")),g,i("div",{style:{fontStyle:"italic"}},__("For bulk geocoding (>100 items) online geocoding services are faster and less expensive.")),u(t.logs)),function(){const e=t.errors.length>0?u(t.errors):__("No errors");return i(o.Option,{title:__("Geocoding errors")},i("div",{className:"mapp-option-geocode-errors"},e))}())}},477:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>C});var o=a(713),n=a(191),i=(a(939),a(27)),s=a(677);window.mapp=window.mapp||{};const l=wp.element.createElement,{select:r}=wp.data,{Fragment:p,useEffect:c,useLayoutEffect:m,useRef:d,useState:u}=wp.element,{BaseControl:h,Button:g,Dashicon:f,Icon:b,Modal:y,PanelBody:v,Spinner:k,TextControl:w}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function C(e){e={context:null,filter:null,mapid:null,mode:null,onClose:null,onInsert:null,onTrash:null,...e};const[t,a]=u({counts:{all:null,trashed:null,object:null},filter:"all",isFetchingItems:!0,items:null,mode:e.mode?e.mode:"list",mapid:e.mapid?e.mapid:null,page:1,search:""}),{addSnackbar:p,renderSnackbar:m}=(0,s.D)(),h=d(null),v=d(null),C=d(null);function x(e){a((t=>({...t,...e})))}function N(e,t,a){mapp.store.mutateMap(e,{postid:t,postTitle:a})}function S(){e.onClose()}function O(e){"trashed"!=t.filter&&x({mode:"edit",mapid:e})}function M(a){let n,i=a.mapid==t.mapid;n=a.title?a.title:__("Untitled");let s,c=function(t){let a;return a="map"==e.context||"mashup"==e.context&&t.postid==mappl10n.options.postid?r("core/editor").getEditedPostAttribute("title"):t.post_title,a=a||__("Untitled"),t.postid>0&&t.postid==mappl10n.options.postid&&(a=__("Current post")),t.postid>0?t.postid==mappl10n.options.postid?a:l("a",{href:mappl10n.options.editurl+"?post="+t.postid+"&action=edit",target:"_blank",title:__("Edit post")},a):__("Unattached")}(a);s="trashed"==t.filter?l("div",{className:"mapp-pick-actions",onClick:e=>e.stopPropagation()},l("a",{href:"#",key:"restore",onClick:()=>{return e=a.mapid,mapp.store.mutateMap(e,{status:""}),void p(__("Map restored"));var e}},__("Restore")),l("a",{href:"#",className:"mapp-destructive",key:"delete",onClick:()=>{return e=a.mapid,confirm(mappl10n.delete_map_prompt)&&(mapp.store.destroyMap(e),p(__("Map deleted"))),void(v.current&&v.current.focus());var e}},__("Delete Permanently"))):l("div",{className:"mapp-pick-actions",onClick:e=>e.stopPropagation()},l("a",{href:"#",key:"edit",onClick:e=>{e.stopPropagation(),O(a.mapid)}},__("Edit")),"library"!=e.context&&l("a",{href:"#",key:"insert",onClick:t=>{return o=a.mapid,void e.onInsert(o);var o}},__("Insert into post")),l("a",{href:"#",key:"duplicate",onClick:e=>{return t=a.mapid,void mapp.store.duplicateMap(t,(e=>{p(__("Map copied")),x({mapid:e.mapid}),h.current&&(h.current.scrollTop=0)}));var t}},__("Copy")),l("a",{href:"#",className:"mapp-destructive",key:"trashed",onClick:o=>{return n=a.mapid,mapp.store.mutateMap(n,{status:"trashed"}),p(__("Map moved to trash")),void(t.mapid&&n==t.mapid&&e.onTrash&&e.onTrash());var n}},__("Trash")));let m=null;return m=a.postid>0?l("a",{href:"#",onClick:()=>{return e=a.mapid,void mapp.store.mutateMap(e,{postid:0});var e}},__("Detach")):"library"==e.context?l(o.MappAttachControl,{onChange:(e,t)=>N(a.mapid,e,t)},__("Attach")):l("a",{href:"#",onClick:()=>N(a.mapid,mappl10n.options.postid,null)},__("Attach")),l("div",{className:"mapp-pick-item"+(i?" mapp-selected":""),key:a.mapid+"|"+a.postid,ref:i?C:null},l("div",{className:"mapp-pick-col-mapid",onClick:()=>O(a.mapid)},a.mapid),l("div",{className:"mapp-pick-col-title",onClick:()=>O(a.mapid)},l("div",null,n),l("div",null,s)),l("div",{className:"mapp-pick-col-post-title"},c,l("div",null,m)),"library"==e.context&&l("div",{className:"mapp-pick-col-shortcode"},l(g,{isSmall:!0,isSecondary:!0,onClick:e=>{e.stopPropagation(),e.preventDefault(),function(e){const t=document.createElement("input");document.body.appendChild(t),t.value='[mappress mapid="'+e+'"]',t.select(),document.execCommand("copy"),t.remove(),p(__("Shortcode copied"))}(a.mapid)}},__("Copy"))))}function I(e){return e&&e.length?l(i.MappPaginate,{count:e?e.length:0,onChange:e=>function(e){x({page:e}),h.current&&(h.current.scrollTop=0)}(e),page:t.page,pageSize:20}):null}c((()=>{const e=e=>{if(!e.isFetchingItems){let t={all:0,object:0,trashed:0};_.map(e.items,(e=>{"trashed"==e.status?t.trashed++:(t.all++,e.postid==mappl10n.options.postid&&t.object++)})),x({counts:t})}x({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return mapp.store.subscribe(e),()=>mapp.store.unsubscribe(e)})),c((()=>{mapp.store.fetchItems((t=>{const a=e.mapid?t.find((t=>t.mapid==e.mapid)):null;a&&("trashed"==a.status?x({filter:"trashed"}):a.postid==mappl10n.options.postid&&x({filter:"object"}))}))}),[]),c((()=>{x({page:1})}),[t.filter,t.search]),c((()=>{"list"==t.mode&&v.current&&v.current.focus()}),[t.mode]);const P=_.filter(t.items,(function(e){if("trashed"==t.filter)return"trashed"==e.status;if("trashed"==e.status)return!1;if("object"==t.filter&&e.postid!=mappl10n.options.postid)return!1;var a=t.search.toLowerCase();return!a||(e.mapid.indexOf(a)>=0||(!!(e.post_title&&e.post_title.toLowerCase().indexOf(a)>=0)||!!(e.title&&e.title.toLowerCase().indexOf(a)>=0)))}));let E=l("div",{className:"mapp-list-panel"},l("div",{className:"mapp-gt-modal-header"},l("div",{className:"mapp-gt-modal-header-title"},l("h1",null,__("Maps")),l(g,{isPrimary:!0,onClick:()=>{x({mode:"edit",mapid:null})}},__("Add New"))),l(g,{onClick:()=>S(),icon:"no-alt"})),function(){let a=[{label:__("All"),value:"all"},{label:__("Attached to post"),value:"object",hide:"library"==e.context},{label:__("Trash"),value:"trashed"}];return l("div",{className:"mapp-pick-filter-wrapper"},l("div",{className:"mapp-pick-filter-tabs"},_.map(a,((e,a)=>{const o="mapp-pick-filter-tab"+(t.filter==e.value?" mapp-active":""),n=t.counts[e.value];if(!e.hide)return l("div",{className:o,href:"#",key:a,onClick:()=>function(e){x({filter:e})}(e.value)},e.label,null!=n&&l("span",{className:"mapp-pick-filter-count"},n))}))),function(){if("trashed"!=t.filter)return l("div",{className:"mapp-pick-search-wrapper"},l(w,{ref:v,className:"mapp-pick-search",tabIndex:1,placeholder:__("post title, map title, or map id"),onChange:e=>x({search:e}),size:50,value:t.search}),l(b,{icon:"search"}),(t.isFetchingItems||t.isAttaching&&"library"!=e.context)&&l(k,null))}())}(),function(a){if(a){const e=20*(t.page-1),o=e+20;a=a.slice(e,o)}let o="";return o=t.isFetchingItems?null:a.length?_.map(a,M):l("div",{className:"mapp-pick-message"},__("No maps found")),l("div",{className:"mapp-pick-items-section"},l("div",{className:"mapp-pick-items",ref:h},function(){let t=[{id:"mapid",className:"mapp-pick-col-mapid",label:__("ID"),sortable:!0},{id:"title",className:"mapp-pick-col-title",label:__("Map title"),sortable:!0},{id:"post_title",className:"mapp-pick-col-post-title",label:__("Attached to"),sortable:!0}];"library"==e.context&&t.push({id:"shortcode",className:"mapp-pick-col-shortcode",label:__("Shortcode"),sortable:!1});return l("div",{className:"mapp-pick-items-header"},_.map(t,(e=>l("div",{className:e.className,onClick:()=>{return t=e.id,void mapp.store.setSort({sortBy:t,sortAsc:mapp.store.state.sortBy!=val||!mapp.store.state.sortAsc});var t},key:e.id},e.label,e.sortable&&mapp.store.state.sortBy==e.id&&l(f,{icon:mapp.store.state.sortAsc?"arrow-up":"arrow-down"}),e.sortable&&mapp.store.state.sortBy!=e.id&&l(f,{icon:"leftright"})))))}(),o))}(P),function(e){return l("div",{className:"mapp-pick-toolbar"},I(e))}(P)),z=null;if("edit"==t.mode){let a=l("div",{className:"mapp-edit-panel"},l(n.MappEdit,{context:e.context,mapid:t.mapid,onClose:()=>{"edit"==e.mode?e.onClose():x({mode:"list"})},onSave:t=>function(t){"edit"==e.mode?e.onClose(t.mapid):(x({mode:"list",mapid:t.mapid}),p(sprintf(__("Map %d saved"),t.mapid)))}(t)}));z="library"==e.context?l(y,{className:"mapp-gt-modal",isDismissible:!1},a):a}const T="mapp-pick mapp-mode-"+t.mode+" mapp-context-"+e.context;return"library"==e.context?l("div",{className:T},E,z,m()):l(y,{className:"mapp-gt-modal "+T,isDismissible:"list"==t.mode,onRequestClose:()=>S(),shouldCloseOnEsc:"list"==t.mode,shouldCloseOnClickOutside:"list"==t.mode},E,z,m())}window.addEventListener("DOMContentLoaded",(e=>{document.getElementById("mapp-library")&&(mappl10n.options.postid=0,wp.element.render(l(C,{context:"library"}),document.getElementById("mapp-library")))}))},429:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappSettings:()=>y});var o=a(710),n=a(677),i=a(824);window.mapp=window.mapp||{};const s=wp.element.createElement,{Fragment:l,useEffect:r,useLayoutEffect:p,useRef:c,useState:m}=wp.element,{BaseControl:d,Button:u,ButtonGroup:_,Dashicon:h,Dropdown:g,Panel:f,PanelBody:b}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function y(e){e={context:null,map:null,onChange:null,center:null,height:null,mapid:null,poiList:null,search:null,title:null,width:null,zoom:null,...e};const[t,a]=m({});const{addSnackbar:r,renderSnackbar:p}=(0,n.D)();function c(t,a){let o={};null!=a&&(o.height=a),null!=t&&(o.width=t),(o.width||o.height)&&(e.map.setSize(o),e.onChange(o))}const d="mce"!=e.context&&"library"!=e.context;return s("div",{className:"mapp-settings"},s(b,{title:__("Map settings"),initialOpen:d},"map"==e.context&&function(){const t=e.map.title?e.map.title:__("Untitled");return s("div",{className:"mapp-settings-row mapp-settings-title"},s(i.Control,{labelTop:__("Title")},t),s(i.Control,{labelTop:__("Map ID")},e.map.mapid))}(),function(){if("mashup"==e.context)return s("div",{className:"mapp-settings-row mapp-style-toggle"},s("div",null,__("Style")),s(o.m,{map:e.map,selected:e.map.mapTypeId,onChange:t=>function(t){e.map&&e.map.set({mapTypeId:t}),e.onChange({mapTypeId:t})}(t)}))}(),function(){mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];var t=mappl10n.options.sizes.map(((e,t)=>({label:e.width+" X "+e.height,height:e.height,width:e.width,value:t+1})));t.unshift({height:"",label:__("Default"),value:0,width:""}),t.push({label:__("Custom"),value:"custom",disabled:!0});for(var a="custom",o=0;o<t.length-1;o++)t[o].width==e.width&&t[o].height==e.height&&(a=o);return s(l,null,s("div",{className:"mapp-settings-row"},s(i.Select,{className:"mapp-settings-dims-select",help:"",labelTop:__("Size"),value:a,options:t,onChange:e=>c(t[e].width,t[e].height)})),s("div",{className:"mapp-settings-row"},s(i.Input,{className:"mapp-settings-dims-custom",help:{text:__("px, %, vw")},labelTop:__("Width"),onChange:e=>c(e,null),value:e.width?e.width:""}),s(i.Input,{className:"mapp-settings-dims-custom",help:{text:__("px, %, vh")},labelTop:__("Height"),onChange:e=>c(null,e),value:e.height?e.height:""})))}(),s("div",{className:"mapp-settings-row"},s(i.Control,{className:"mapp-settings-viewport",labelTop:__("Center/Zoom")},s(_,{label:__("Center/Zoom")},s(u,{onClick:()=>(e.map.center=e.map.zoom=null,e.map.recenter(),r(__("Viewport automatic")),void e.onChange({center:void 0,zoom:void 0})),isPressed:!e.center,isSmall:!0},__("Automatic")),s(u,{onClick:()=>function(){let t=e.map.getCenter().toJSON();e.map.center=t,e.map.zoom=e.map.getZoom(),r(__("Viewport set")),e.onChange({center:t.lat+","+t.lng,zoom:e.map.getZoom()})}(),isPressed:e.center,isSmall:!0},__("Set"))))),void 0,p()))}},677:(e,t,a)=>{"use strict";a.d(t,{D:()=>l});const{useEffect:o,useState:n}=wp.element,{createContext:i}=React,s=wp.element.createElement,l=()=>{const[e,t]=n({snackbars:[]});function a(e){t((t=>({...t,...e})))}o((()=>{if(e.snackbars.length){const t=setTimeout((()=>{let t=[...e.snackbars];t.shift(),a({snackbars:t})}),5e3);return()=>clearTimeout(t)}}),[e.snackbars]);return{addSnackbar:t=>a({snackbars:[...e.snackbars,t]}),renderSnackbar:()=>s("div",{className:"mapp-snackbars"},e.snackbars.map(((e,t)=>s("div",{className:"mapp-snackbar mapp-snackbar-show",key:t},e))))}}},787:(e,t,a)=>{"use strict";a.r(t);var o=a(939);window.mapp=window.mapp||{};mapp.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,sortBy:"mapid",sortAsc:!1,maps:{},items:[]}},mapp.Store.prototype={createMap:function(){let{success:e=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.state.isFetchingMap=!1,this.publish(),e()},destroyMap:function(e){o.mappLib.ajax({type:"POST",data:{action:"mapp_delete",mapid:e,nonce:mappl10n.options.nonce},callback:t=>{t&&"OK"==t.status&&(delete this.state.maps[e],this.destroyItem(e)),this.publish()}})},duplicateMap:function(e,t){this.state.isSavingMap=!0,this.publish(),o.mappLib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:e,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:e=>{if(e&&"OK"==e.status){let a=e.data,o=a.mapid;this.state.maps[o]=a,this.saveItem(o,a),t&&t(a)}this.state.isSavingMap=!1,this.publish()}})},fetchMap:function(e){void 0===this.state.maps[e]?(this.state.isFetchingMap=!0,this.publish(),o.mappLib.ajax({type:"GET",data:{action:"mapp_get",mapid:e,nonce:mappl10n.options.nonce},callback:t=>{t&&"OK"==t.status?this.state.maps[e]=t.data:this.state.maps[e]=null,this.state.isFetchingMap=!1,this.publish()}})):this.publish()},mutateMap:function(e,t){this.state.isSavingMap=!0,this.saveItem(e,t),this.publish(),o.mappLib.ajax({type:"POST",data:{action:"mapp_mutate",mapid:e,mapdata:t,nonce:mappl10n.options.nonce},callback:e=>{this.state.isSavingMap=!1,this.publish()}})},saveMap:function(e,t){this.state.isSavingMap=!0,this.publish(),o.mappLib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(e),nonce:mappl10n.options.nonce},callback:a=>{if(a&&"OK"==a.status){const o=a.data;e.mapid=o,this.state.maps[o]=e,this.saveItem(o,e),t&&t(e)}this.state.isSavingMap=!1,this.publish()}})},destroyItem:function(e){let t=this.state.items?this.state.items:[],a=_.findIndex(t,{mapid:e});a>-1&&t.splice(a,1),this.state.items=[...t],this.publish()},fetchItems(e){if(this.state.itemsFetched)return this.publish(),void(e&&e(this.state.items));this.state.isFetchingItems=!0,this.publish(),o.mappLib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:t=>{t&&"OK"==t.status&&(this.state.items=t.data,this.sort(),this.state.itemsFetched=!0,e&&e(this.state.items)),this.state.isFetchingItems=!1,this.sort(),this.publish()}})},saveItem:function(e,t){let a=this.state.items?this.state.items:[],o=_.findWhere(a,{mapid:e});o?(_.map(["mapid","title","postid","post_title","status"],(e=>{void 0!==t[e]&&(o[e]=t[e])})),o={...o}):(o={mapid:e,title:t.title,postid:mappl10n.options.postid,post_title:null},a.unshift(o))},setSort:function(e){e.sortBy&&(this.state.sortBy=e.sortBy),void 0!==e.sortAsc&&(this.state.sortAsc=e.sortAsc),this.sort(),this.publish()},sort:function(e,t){const a=(o="untitled",wp.i18n.__(o,"mappress-google-maps-for-wordpress"));var o;this.state.items.sort(((e,t)=>function(e,t,o,n){if(n=n?1:-1,"mapid"==o)return n*(Number(e.mapid)-Number(t.mapid));let i=e[o]?e[o]:a,s=t[o]?t[o]:a,l=n*i.localeCompare(s);return 0==l?Number(e.mapid)-Number(t.mapid):l}(e,t,this.state.sortBy,this.state.sortAsc)))},subscribe:function(e){this.subs.add(e)},unsubscribe:function(e){this.subs.delete(e)},publish:function(){let e=[...this.subs];for(let t of e)t(this.state)}},mapp.store=new mapp.Store},710:(e,t,a)=>{"use strict";a.d(t,{m:()=>w});var o=a(824),n=a(939),i=a(27);const s=wp.element.createElement,{Fragment:l,useEffect:r,useLayoutEffect:p,useRef:c,useState:m}=wp.element,{Button:d,Dashicon:u,ExternalLink:h,Icon:g,Modal:f,Panel:b,PanelBody:y,PanelRow:v,Spinner:k}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function w(e){const[t,a]=m({apiKey:"6a0cfe9e-3670-4598-a63e-f1627b5c9e56",isOpen:!1,isBusy:!1,isSearching:!1,mapboxError:"",mapboxId:"",mapboxName:"",mapboxUser:"",mapboxUrl:"",mapboxParsedUrl:"",mode:"pick",page:1,snazzyPagination:null,snazzySearch:"",snazzySelected:null,snazzyStyles:null,standardStyles:mappl10n.options.standardStyles,userStyles:mappl10n.options.userStyles});function r(e){a((t=>({...t,...e})))}function p(a){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=_.findIndex(t.userStyles,{id:a.id});i>=0&&!o&&!confirm(__("Style already exists, overwrite?"))||(r({isBusy:!0}),n.mappLib.ajax({type:"POST",data:{action:"mapp_style_save",style:a,nonce:mappl10n.options.nonce},callback:t=>{r({isBusy:!1}),t&&"OK"==t.status&&(mappl10n.options.userStyles=t.data,r({mode:"pick",userStyles:t.data}),e.onChange(a.id))}}))}function c(e){r({isSearching:!0,snazzyStyles:null}),n.mappLib.ajax({type:"GET",data:{sort:"popular",page:e,pageSize:50,text:t.snazzySearch,key:t.apiKey},url:"https://snazzymaps.com/explore.json",callback:function(e){if(r({isSearching:!1,snazzyPagination:e&&e.pagination?e.pagination:null}),e&&e.styles){r({snazzyStyles:_.map(e.styles,((e,t)=>(e.id=e.id+"",e)))})}else alert("Error: unable to fetch styles")}})}function u(e,t){t="large"==t||"small"==t?t:"small",t=800;let a=mappl10n.options.baseurl+"/images/json_style.png";if("leaflet"==mappl10n.options.engine?mappl10n.options.mapbox?e.user&&e.mapboxid&&(a="https://api.mapbox.com/styles/v1/"+e.user+"/"+e.mapboxid+"/static/-122.4194,37.7749,10,0/800x800?access_token="+mappl10n.options.mapbox):a=mappl10n.options.baseurl+"/images/osm.png":e.imageUrl&&(a=e.imageUrl),a)return s("img",{src:a,title:e.name})}function b(a,o){switch(a){case"close":case"pick-cancel":r({isOpen:!1});break;case"json-add":r({mode:"json-add"});break;case"json-cancel":case"mapbox-cancel":case"snazzy-cancel":r({mode:"pick"});break;case"json-edit":e.onChange(o.id),r({mode:"json-edit"});break;case"json-save":p(o,!0);break;case"mapbox-add":case"snazzy-add":alert(__("Please upgrade to MapPress Pro to use custom styles"));break;case"mapbox-change-url":{let e,t,a;e=o.trim().toLowerCase(),e=e.replace(".html","").replace("https://api.mapbox.com/styles/v1/","").replace("mapbox://styles/",""),e=e.split("?")[0];let n=e.split("/");2==n.length&&(t=n[0],a=n[1]),r({mapboxUrl:o,mapboxUser:t,mapboxId:a});break}case"mapbox-edit":e.onChange(o.id),r({mode:"mapbox",mapboxId:o.mapboxid,mapboxName:o.name,mapboxUrl:o.url,mapboxUser:o.user});break;case"mapbox-save":t.mapboxName&&t.mapboxUser&&p({id:t.mapboxId,name:t.mapboxName,mapboxid:t.mapboxId,provider:"mapbox",url:t.mapboxUrl,user:t.mapboxUser});break;case"mode":r({mode:o});break;case"open":"leaflet"!=mappl10n.options.engine||mappl10n.options.mapbox?r({isOpen:!0}):alert(__("Please enter a Mapbox access token in the MapPress settings screen to use styled maps."));break;case"pick-delete":confirm(mappl10n.delete_prompt)&&(i=o,_.findIndex(t.userStyles,{id:i})<0?n.mappLib.alert("Invalid delete"):(r({isBusy:!0}),n.mappLib.ajax({type:"POST",data:{action:"mapp_style_delete",id:i,nonce:mappl10n.options.nonce},callback:t=>{r({isBusy:!1}),t&&"OK"==t.status&&(mappl10n.options.userStyles=t.data,r({userStyles:t.data}),e.selected==i&&e.onChange(null))}})));break;case"pick-select":e.onChange(o),r({isOpen:!1});break;case"snazzy-save":{let e=_.findWhere(t.snazzyStyles,{id:o});e&&p({id:o,imageUrl:e.imageUrl,json:e.json,name:e.name});break}case"snazzy-search":c()}var i}function y(){let a;return"json-add"==t.mode?a={id:null,name:"",json:""}:"json-edit"==t.mode&&(a=e.selected?_.findWhere(t.userStyles,{id:e.selected}):null),s(C,{style:a,onSave:e=>b("json-save",e),onCancel:()=>b("json-cancel")})}function v(e){let a;return a=e.styles&&e.styles.length?_.map(e.styles,((t,a)=>function(e,t){let a,o="mapp-style"+(t.selected==e.id?" mapp-selected":"");(t.onEdit||t.onDelete)&&(a=s("div",{className:"mapp-style-actions"},s("a",{onClick:()=>t.onEdit(e)},__("Edit")),s(g,{icon:"trash",onClick:()=>t.onDelete(e.id)})));return s("div",{className:o,key:e.id},s("div",{className:"mapp-style-image",onClick:()=>t.onSelect(e.id)},u(e)),s("div",{className:"mapp-style-details"},s("div",{className:"mapp-style-title"},e.name),a))}(t,e))):t.isSearching?"":s("div",{className:"mapp-style-list-msg"},__("No results")),s("div",{className:"mapp-style-list-wrapper"},s("div",{className:"mapp-style-list-header"},e.title),s("div",{className:"mapp-style-list"},a))}return s(l,null,function(){const a=t.standardStyles.concat(t.userStyles);let o=!mappl10n.options.style||"roadmap"!=e.selected&&"streets"!=e.selected&&e.selected?e.selected:mappl10n.options.style,n=_.findWhere(a,{id:o});return n=n||t.standardStyles[0],s(d,{className:"mapp-style-toggle",icon:u(n),iconSize:75,isSecondary:!0,onClick:()=>b("open",null),title:n.name})}(),"edit"==t.mode&&t.isOpen&&renderEdit(),"json-add"==t.mode&&t.isOpen&&y(),"json-edit"==t.mode&&t.isOpen&&y(),"mapbox"==t.mode&&t.isOpen&&function(){let e=t.mapboxUser&&t.mapboxId?u({user:t.mapboxUser,mapboxid:t.mapboxId,name:t.mapboxName},"large"):null;const a=!t.mapboxUser||!t.mapboxId||!t.mapboxName;return s(f,{title:__("Add style"),className:"mapp-style-modal",onRequestClose:()=>b("mapbox-cancel"),shouldCloseOnClickOutside:!0},s("div",{className:"mapp-style-mapbox-title"},__("Enter style from Mapbox Studio"),s(h,{href:"https://studio.mapbox.com"})),s("form",{className:"mapp-style-mapbox-form",onSubmit:e=>{e.stopPropagation(),e.preventDefault(),b("mapbox-save")}},s("label",null,s(o.Input,{autoFocus:!0,className:"mapp-style-mapbox-url",labelTop:s(l,null,__("MapBox Share URL"),s(o.Help,{href:"#toc-mapbox-studio-styles"})),onChange:e=>b("mapbox-change-url",e),value:t.mapboxUrl})),s("label",null,s("div",{className:"mapp-style-mapbox-label"},__("Style name")),s(o.Input,{className:"mapp-style-mapbox-name",value:t.mapboxName,onChange:e=>r({mapboxName:e})})),s("div",{className:"mapp-style-mapbox-preview"},e),s("div",{className:"mapp-style-toolbar"},s("div",null,s(d,{isBusy:t.isBusy,isPrimary:!0,disabled:a,type:"submit"},__("Save")),s(d,{isBusy:t.isBusy,onClick:()=>b("mapbox-cancel")},__("Cancel"))))))}(),"pick"==t.mode&&t.isOpen&&function(){let a="";return t.userStyles&&t.userStyles.length&&(a=v({selected:e.selected,onEdit:e=>"leaflet"==mappl10n.options.engine?b("mapbox-edit"):b("json-edit",e),onDelete:e=>b("pick-delete",e),onSelect:e=>b("pick-select",e),styles:t.userStyles,title:__("Custom styles")})),s(f,{title:s("div",{className:"mapp-style-header"},__("Select a style")),className:"mapp-style-modal",onRequestClose:()=>b("close")},s("div",{className:"mapp-style-list-wrapper"},v({onSelect:e=>b("pick-select",e),selected:e.selected,styles:t.standardStyles,title:__("Standard styles")}),a),s("div",{className:"mapp-style-toolbar"},s("div",null,s(d,{isBusy:t.isBusy,isPrimary:!0,onClick:()=>"leaflet"==mappl10n.options.engine?b("mapbox-add"):b("json-add")},__("New style")),"google"==mappl10n.options.engine&&s(d,{isBusy:t.isBusy,isSecondary:!0,onClick:()=>b("snazzy-add")},__("Download style")),s(d,{isBusy:t.isBusy,onClick:()=>b("pick-cancel")},__("Cancel")))))}(),"snazzy"==t.mode&&t.isOpen&&(t.snazzySelected,s(f,{title:__("Download style"),className:"mapp-style-modal mapp-style-modal-snazzy",onRequestClose:()=>b("snazzy-cancel"),shouldCloseOnClickOutside:!0},s("form",{className:"mapp-style-snazzy-form",onSubmit:e=>{b("snazzy-search"),e.preventDefault()}},s(o.Input,{className:"mapp-style-snazzy-search",value:t.search,placeholder:__("Search"),onChange:e=>r({snazzySearch:e})}),t.isSearching&&s(k,null),!t.isSearching&&s(d,{isPrimary:!0,icon:"search",onClick:()=>b("snazzy-search")})),v({selected:t.snazzySelected,styles:t.snazzyStyles,onSelect:e=>r({snazzySelected:e})}),s("div",{className:"mapp-style-toolbar"},s("div",null,s(d,{isBusy:t.isBusy,isPrimary:!0,onClick:()=>b("snazzy-save",t.snazzySelected)},__("Save")),s(d,{isBusy:t.isBusy,onClick:()=>b("snazzy-cancel")},__("Cancel"))),function(){const e=t.snazzyPagination;return e&&t.snazzyStyles&&t.snazzyStyles.length?s(i.MappPaginate,{count:e.totalItems,onChange:e=>c(e),page:e.currentPage,pageSize:e.pageSize}):null}()))))}function C(e){const[t,a]=m((()=>{let t={...e.style},a="";try{a=JSON.stringify(JSON.parse(t.json),null,2)}catch(e){}return t.json=a,{style:t}}));function n(e){a((t=>({...t,...e})))}function i(a,o){let i={...t.style};switch(a){case"cancel":e.onCancel();break;case"change-json":i.json=o,n({style:i});break;case"change-name":i.name=o,n({style:i});break;case"save":i.json=i.json?JSON.stringify(JSON.parse(i.json)):"",e.onSave(i)}}let l;if(t.style.json)try{JSON.parse(t.style.json)}catch(e){l=e.toString()}let r=l?"mapp-json mapp-json-error":"mapp-json";return s(f,{title:s(o.Input,{value:t.style.name,onChange:e=>i("change-name",e),placeholder:__("Enter style name")}),className:"mapp-style-modal mapp-json-modal",onRequestClose:()=>i("cancel"),shouldCloseOnClickOutside:!0},s("div",null,__("JSON")),s("div",{className:r},s("textarea",{value:t.style.json,spellCheck:!1,onChange:e=>i("change-json",e.target.value)})),s("div",{className:"mapp-json-error"},l||""),s("div",{className:"mapp-json-toolbar"},s("div",null,s(d,{disabled:l,isBusy:t.isBusy,isPrimary:!0,onClick:()=>i("save")},__("Save")),s(d,{isBusy:t.isBusy,onClick:()=>i("cancel")},__("Cancel")))))}},214:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MappCard:()=>f});var o=a(939);a(824);const n=wp.element.createElement,{Fragment:i,useEffect:s,useLayoutEffect:l,useCallback:r,useRef:p,useState:c}=wp.element,{useSelect:m}=wp.data,{Button:d,Dashicon:u,ExternalLink:_,Guide:h,Modal:g}=wp.components,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function f(e){let{icon:t,title:a,...o}=e;return n("div",{className:"mapp-support-card"},a&&n("div",{className:"mapp-support-card-title"},n("h3",null,t&&n(u,{icon:t}),a)),n("div",{className:"mapp-support-card-content"},o.children))}document.getElementById("mapp-support-page")&&wp.element.render(n((function(e){const[t,a]=c({engine:e.engine?e.engine:"leaflet",isOpen:e.isOpen,apiKey:e.apiKey,mapbox:e.mapbox});function l(e){a((t=>({...t,...e})))}function r(e){return n("div",{className:"mapp-guide-engine"+(e.selected?" mapp-selected":""),onClick:()=>e.onClick()},n("h2",{className:"mapp-guide-engine-title"},e.title),n("div",{className:"mapp-guide-engine-content"},e.content))}return p(null),s((()=>{}),[]),n("div",{className:"mapp-support"},n(i,null,n("div",{className:"mapp-support-section"},n("div",{className:"mapp-support-header"},n("img",{src:mappl10n.options.baseurl+"/images/icon-128x128.png"}),n("h1",null,__("MapPress Support")),n("i",null,__("Build amazing maps with the easiest and most powerful mapping plugin available")),n("div",null,n(d,{className:"mapp-support-guide-toggle",isPrimary:!0,onClick:()=>l({isOpen:!0})},__("Open Setup Wizard"))))),n("div",{className:"mapp-support-section"},n("div",{className:"mapp-support-cards"},n(f,{icon:"book",title:__("Documentation")},n("p",null,__("Detailed plugin documentation:")),n(_,{href:"https://mappresspro.com/mappress-documentation/"},__("Documentation")),n(_,{href:"https://mappresspro.com/whats-new/"},__("What's new")),n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-map-library-and-map-editors"},__("Creating your first map"))),n(f,{icon:"warning",title:__("Troubleshooting")},n("p",null,n("b",null,__("Check for a plugin or theme conflict:"))),n("ol",null,n("li",null,__("Deactivate ALL other plugins")),n("li",null,__("Switch to a standard WordPress theme")),n("li",null,__("If the maps are working, reactivate one by one to find the conflict."))),n("p",null,__("For more info:")),n(_,{href:"https://mappresspro.com/mappress-faq/"},__("MapPress FAQ"))),n(f,{icon:"megaphone",title:__("Support")},n("p",null,__("Need some help?")),n(_,{href:"https://mappresspro.com/forums/forum/mappress-support/"},__("Support forum")),n(_,{href:"https://mappresspro.com/chris-contact/"},__("Contact")))))),function(){if(t.isOpen)return n(h,{className:"mapp-guide",onFinish:()=>function(e,a){if("save"===e){let e;l({isOpen:!1}),e="google"==t.engine?"google":t.mapbox?"mapbox":"nominatim",o.mappLib.ajax({type:"POST",data:{action:"mapp_option_save",nonce:mappl10n.options.nonce,settings:{engine:t.engine,apiKey:t.apiKey,mapbox:t.mapbox,geocoder:e}},callback:e=>{"OK"!=e.status&&alert("Unable to save settings. Please check the support troubleshooting guide.")}})}}("save"),pages:[{content:n("div",{className:"mapp-guide-page mapp-guide-engines"},n("h1",null,__("Please Choose a Mapping API")),n("p",null,__("MapPress supports both Leaflet and Google mapping APIs."),n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-picking-a-mapping-api"},__("Learn more"))),n("div",{className:"mapp-guide-engines"},r({onClick:()=>l({engine:"leaflet"}),selected:"leaflet"==t.engine,title:"Leaflet",content:n("ul",null,n("li",null,__("No API key")),n("li",null,__("Free unlimited usage")),n("li",null,__("Good functionality")),n("li",null,__("Best for high traffic sites")))}),r({onClick:()=>l({engine:"google"}),selected:"google"==t.engine,title:"Google",content:n("ul",null,n("li",null,__("API key required")),n("li",null,__("Limited free usage")),n("li",null,__("Excellent functionality")),n("li",null,__("Best for low traffic sites")))}))),image:n("div",{className:"mapp-guide-header mapp-guide-image-small"},n("img",{src:mappl10n.options.baseurl+"/images/icon-128x128.png"}),n("h1",null,__("Welcome to MapPress!")))},{content:"google"==t.engine?n("div",{className:"mapp-guide-page mapp-guide-apikey"},n("h1",null,__("Google API Key")),n("p",null,__("Google requires an API key to use Google Maps. Please enter your key below.")),n(d,{isPrimary:!0,href:"https://mappresspro.com/how-to-get-a-google-maps-api-key/",target:"_blank"},__("Get an API Key")),n("input",{className:"mapp-guide-apikey",onChange:e=>l({apiKey:e.target.value}),placeholder:__("Enter your API key here"),value:t.apiKey})):n("div",{className:"mapp-guide-page mapp-guide-apikey"},n("h1",null,__("Sign up with Mapbox")),n("p",null,__("Mapbox makes Leaflet better with great-looking map tiles, styled maps, and a powerful geocoder.")," "+__("A generous free tier means it's free for most sites."),n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-using-mapbox-with-leaflet"},__("Learn more"))),n(d,{isPrimary:!0,href:"https://account.mapbox.com/auth/signup/",target:"_blank"},__("Get Mapbox Access Token")),n("input",{className:"mapp-guide-apikey",onChange:e=>l({mapbox:e.target.value}),placeholder:__("Enter your access token here"),value:t.mapbox})),image:n("div",{className:"mapp-guide-header mapp-guide-image-small"},"google"==t.engine&&n("img",{src:mappl10n.options.baseurl+"/images/google_logo.png"}),"leaflet"==t.engine&&n("img",{src:mappl10n.options.baseurl+"/images/mapbox_logo_white.png"}))},{content:n("div",{className:"mapp-guide-page mapp-guide-gutenberg"},n("h1",null,__("Maps in the Block Editor")),n("p",null,__("MapPress provides custom block types for the Gutenberg editor.")),n("p",null,__("Just insert a MapPress Map block to get started."),n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-create-a-map-with-the-gutenberg-block-editor"},__("Learn more")))),image:n("div",{className:"mapp-guide-header"},n("img",{src:mappl10n.options.baseurl+"/images/gutenberg_map_block.gif"}))},{content:n("div",{className:"mapp-guide-page mapp-guide-classic"},n("h1",null,__("Maps in the Classic Editor")),n("p",null,__('MapPress also supports the "classic" editor. Just click the MapPress button to open the map library.')),n("p",null,n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-create-a-map-with-the-classic-editor"},__("Learn more")))),image:n("div",{className:"mapp-guide-header"},n("img",{src:mappl10n.options.baseurl+"/images/classic_map.gif"}))},{content:n("div",{className:"mapp-guide-page mapp-guide-library"},n("h1",null,__("Map Library")),n("p",null,__("The Map Library provides an easy way to see and edit all of your maps. The library can be opened in the post editor or from the MapPress menu.")),n("p",null,n(_,{href:"https://mappresspro.com/mappress-documentation/#toc-map-library-and-map-editors"},__("Learn more")))),image:n("div",{className:"mapp-guide-header"},n("img",{src:mappl10n.options.baseurl+"/images/library_menu.gif"}))},{content:n("div",{className:"mapp-guide-page mapp-guide-end"},n("h1",null,__("Happy Mapping")),n("p",null,__("Enjoy the plugin! Replay this guide any time from the MapPress support menu."))),image:n("div",{className:"mapp-guide-header"},n("img",{src:mappl10n.options.baseurl+"/images/icon-128x128"}))}]})}())}),mappress_support_state),document.getElementById("mapp-support-page"))},308:(e,t,a)=>{"use strict";e.exports=function(e,t){var o=String(e).replace(/^&/,"").replace(/&$/,"").split("&"),n=o.length,i=void 0,s=void 0,l=void 0,r=void 0,p=void 0,c=void 0,m=void 0,d=void 0,u=void 0,_=void 0,h=void 0,g=void 0,f=void 0,b=function(e){return decodeURIComponent(e.replace(/\+/g,"%20"))},y="undefined"!=typeof window?window:a.g;y.$locutus=y.$locutus||{};var v=y.$locutus;for(v.php=v.php||{},t||(t=y),i=0;i<n&&(u=b((d=o[i].split("="))[0]),_=d.length<2?"":b(d[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));i++){for(;" "===u.charAt(0);)u=u.slice(1);if(u.indexOf("\0")>-1&&(u=u.slice(0,u.indexOf("\0"))),u&&"["!==u.charAt(0)){for(g=[],h=0,s=0;s<u.length;s++)if("["!==u.charAt(s)||h){if("]"===u.charAt(s)&&h&&(g.length||g.push(u.slice(0,h-1)),g.push(u.substr(h,s-h)),h=0,"["!==u.charAt(s+1)))break}else h=s+1;for(g.length||(g=[u]),s=0;s<g[0].length&&(" "!==(m=g[0].charAt(s))&&"."!==m&&"["!==m||(g[0]=g[0].substr(0,s)+"_"+g[0].substr(s+1)),"["!==m);s++);for(c=t,s=0,f=g.length;s<f;s++){if(p=c,(""===(u=g[s].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==s){for(r in l=-1,c)c.hasOwnProperty(r)&&+r>l&&r.match(/^\d+$/g)&&(l=+r);u=l+1}Object(c[u])!==c[u]&&(c[u]={}),c=c[u]}p[u]=_}}}}},t={};function a(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,a),i.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(371),a(787),a(844),a(713),a(123),a(521),a(191),a(805),a(24),a(816),a(378),a(670),a(218),a(824),a(535),a(477),a(429),a(214)})();
css/mappress.css CHANGED
@@ -191,7 +191,7 @@ only screen and (min-device-pixel-ratio: 2) {
191
  border-right: 1px solid lightgray;
192
  display: flex;
193
  flex-direction: column;
194
- max-width: 45%;
195
  position: relative;
196
  transition-property: all;
197
  transition-duration: .1s;
@@ -266,7 +266,6 @@ only screen and (min-device-pixel-ratio: 2) {
266
  display: flex;
267
  flex-direction: column;
268
  flex: 1;
269
- overflow: hidden;
270
  position: relative;
271
  }
272
 
@@ -309,9 +308,12 @@ only screen and (min-device-pixel-ratio: 2) {
309
  }
310
 
311
  .mapp-list .mapp-info {
 
 
 
 
312
  align-items: center;
313
  display: flex;
314
- flex: 1;
315
  }
316
 
317
  .mapp-list .mapp-title {
@@ -368,32 +370,6 @@ only screen and (min-device-pixel-ratio: 2) {
368
  text-align: center;
369
  }
370
 
371
-
372
- /*
373
- -----------------------------------------------------------------------------------
374
- Thumbnail styles
375
- Default is thumbnail on right
376
- -----------------------------------------------------------------------------------
377
- */
378
-
379
- .mapp-list-component.mapp-thumb-top .mapp-item {
380
- flex-direction: column-reverse;
381
- }
382
-
383
- .mapp-list-component.mapp-thumb-top .mapp-thumbnail img {
384
- height: auto !important;
385
- width: 100% !important;
386
- }
387
-
388
- .mapp-list-component.mapp-thumb-left .mapp-thumbnail img, .mapp-list-component.mapp-thumb-right .mapp-thumbnail img {
389
- max-height: 100px;
390
- max-width: 100px;
391
- }
392
-
393
- .mapp-list-component.mapp-thumb-left .mapp-item, .mapp-list-component.mapp-thumb-left .mapp-info {
394
- flex-direction: row-reverse;
395
- }
396
-
397
  /*
398
  -----------------------------------------------------------------------------------
399
  Header
@@ -686,6 +662,7 @@ only screen and (min-device-pixel-ratio: 2) {
686
  display: none;
687
  max-height: 60%; /* Based on map size */
688
  max-width: 90%; /* Based on map size */
 
689
  position: absolute;
690
  }
691
 
@@ -697,6 +674,7 @@ only screen and (min-device-pixel-ratio: 2) {
697
  display: flex;
698
  flex-direction: column;
699
  line-height: 0; /* Prevent font from distorting tip */
 
700
  z-index: 1005; /* Needed for Leaflet, above menu icon, below menu */
701
  }
702
 
@@ -861,21 +839,6 @@ only screen and (min-device-pixel-ratio: 2) {
861
  text-decoration: none !important;
862
  }
863
 
864
- .mapp-iw .mapp-thumbnail {
865
- display: flex;
866
- flex-direction: column;
867
- overflow: hidden;
868
- }
869
-
870
- /* Display block removes extra whitespace @ bottom */
871
- .mapp-iw .mapp-thumbnail img {
872
- display: block;
873
- max-height: 100%;
874
- max-width: 100% !important;
875
- object-fit: cover;
876
- }
877
-
878
-
879
  .mapp-iw .mapp-info {
880
  display: flex;
881
  flex: 1;
@@ -884,6 +847,11 @@ only screen and (min-device-pixel-ratio: 2) {
884
  overflow: hidden;
885
  }
886
 
 
 
 
 
 
887
  .mapp-iw .mapp-title {
888
  font-weight: bold;
889
  padding: 10px;
@@ -896,14 +864,11 @@ only screen and (min-device-pixel-ratio: 2) {
896
  padding: 0 10px;
897
  }
898
 
899
- .mapp-iw .mapp-links {
900
- padding: 10px;
901
- white-space: nowrap;
902
- }
903
-
904
  /* Make directions look like a link */
905
  .mapp-iw .mapp-dir {
906
  color: #4272db;
 
 
907
  }
908
 
909
  /* Workarounds for IE, which doesn't like flex */
@@ -919,10 +884,66 @@ only screen and (min-device-pixel-ratio: 2) {
919
 
920
  /*
921
  -----------------------------------------------------------------------------------
922
- Thumbnail styles
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
923
  -----------------------------------------------------------------------------------
924
  */
925
 
 
 
 
 
 
 
 
 
 
 
926
  /* Limit info section to width of featured image. */
927
  .mapp-iw.mapp-thumb-top .mapp-info {
928
  min-width: 100%;
@@ -933,10 +954,6 @@ only screen and (min-device-pixel-ratio: 2) {
933
  align-items: center;
934
  }
935
 
936
- .mapp-iw.mapp-thumb-left .mapp-thumbnail img, .mapp-iw.mapp-thumb-right .mapp-thumbnail img {
937
- min-height: 100%;
938
- }
939
-
940
  /* Limit info section to height of featured image. */
941
  .mapp-iw.mapp-thumb-left .mapp-info, .mapp-iw.mapp-thumb-right .mapp-info {
942
  min-height: 100%;
@@ -951,7 +968,45 @@ only screen and (min-device-pixel-ratio: 2) {
951
  flex-direction: row-reverse;
952
  }
953
 
 
 
 
 
 
954
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
955
 
956
  /*
957
  -----------------------------------------------------------------------------------
191
  border-right: 1px solid lightgray;
192
  display: flex;
193
  flex-direction: column;
194
+ max-width: 55%;
195
  position: relative;
196
  transition-property: all;
197
  transition-duration: .1s;
266
  display: flex;
267
  flex-direction: column;
268
  flex: 1;
 
269
  position: relative;
270
  }
271
 
308
  }
309
 
310
  .mapp-list .mapp-info {
311
+ flex: 1;
312
+ }
313
+
314
+ .mapp-list .mapp-info .mapp-template {
315
  align-items: center;
316
  display: flex;
 
317
  }
318
 
319
  .mapp-list .mapp-title {
370
  text-align: center;
371
  }
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  /*
374
  -----------------------------------------------------------------------------------
375
  Header
662
  display: none;
663
  max-height: 60%; /* Based on map size */
664
  max-width: 90%; /* Based on map size */
665
+ overflow: hidden;
666
  position: absolute;
667
  }
668
 
674
  display: flex;
675
  flex-direction: column;
676
  line-height: 0; /* Prevent font from distorting tip */
677
+ overflow: hidden;
678
  z-index: 1005; /* Needed for Leaflet, above menu icon, below menu */
679
  }
680
 
839
  text-decoration: none !important;
840
  }
841
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
842
  .mapp-iw .mapp-info {
843
  display: flex;
844
  flex: 1;
847
  overflow: hidden;
848
  }
849
 
850
+ .mapp-iw .mapp-info .mapp-template {
851
+ align-items: center;
852
+ flex: 1;
853
+ }
854
+
855
  .mapp-iw .mapp-title {
856
  font-weight: bold;
857
  padding: 10px;
864
  padding: 0 10px;
865
  }
866
 
 
 
 
 
 
867
  /* Make directions look like a link */
868
  .mapp-iw .mapp-dir {
869
  color: #4272db;
870
+ padding: 10px;
871
+ white-space: nowrap;
872
  }
873
 
874
  /* Workarounds for IE, which doesn't like flex */
884
 
885
  /*
886
  -----------------------------------------------------------------------------------
887
+ Thumbnail gallery
888
+ -----------------------------------------------------------------------------------
889
+ */
890
+ .mapp-thumbnail {
891
+ align-items: center;
892
+ display: flex;
893
+ justify-content: center;
894
+ overflow: hidden;
895
+ position: relative;
896
+ }
897
+
898
+ /* Display block removes extra whitespace @ bottom */
899
+ .mapp-thumbnail img {
900
+ display: inline-block;
901
+ object-fit: cover;
902
+ }
903
+
904
+ .mapp-thumbnail .mapp-gallery-previous, .mapp-thumbnail .mapp-gallery-next {
905
+ align-items: center;
906
+ background-color: white;
907
+ border: 1px solid gray;
908
+ border-radius: 40px;
909
+ color: black;
910
+ cursor: pointer;
911
+ display: flex;
912
+ font-size: 20px;
913
+ height: 24px;
914
+ justify-content: center;
915
+ opacity: 0.5;
916
+ position: absolute;
917
+ top: 50%;
918
+ transform: translateY(-50%);
919
+ width: 24px;
920
+ }
921
+
922
+ .mapp-thumbnail .mapp-gallery-previous:hover, .mapp-thumbnail .mapp-gallery-next:hover {
923
+ opacity: 1.0;
924
+ }
925
+
926
+ .mapp-thumbnail .mapp-gallery-previous { left: 5px; }
927
+ .mapp-thumbnail .mapp-gallery-next { right: 5px; }
928
+ .mapp-thumbnail .mapp-gallery-previous:after { content: "<"; }
929
+ .mapp-thumbnail .mapp-gallery-next:after { content: ">"; }
930
+
931
+ /*
932
+ -----------------------------------------------------------------------------------
933
+ Popup Thumbnail styles
934
  -----------------------------------------------------------------------------------
935
  */
936
 
937
+ /* Fill the .mapp-thumbnail container, where fixed dimensions are applied */
938
+ .mapp-thumbnail img, .mapp-thumbnail .mapp-embed, .mapp-thumbnail iframe {
939
+ height: 100%;
940
+ width: 100%;
941
+ }
942
+
943
+ .mapp-iw.mapp-thumb-top .mapp-thumbnail {
944
+ text-align: center;
945
+ }
946
+
947
  /* Limit info section to width of featured image. */
948
  .mapp-iw.mapp-thumb-top .mapp-info {
949
  min-width: 100%;
954
  align-items: center;
955
  }
956
 
 
 
 
 
957
  /* Limit info section to height of featured image. */
958
  .mapp-iw.mapp-thumb-left .mapp-info, .mapp-iw.mapp-thumb-right .mapp-info {
959
  min-height: 100%;
968
  flex-direction: row-reverse;
969
  }
970
 
971
+ /*
972
+ -----------------------------------------------------------------------------------
973
+ List thumbnail styles. Thumbnail is prepended before item content.
974
+ -----------------------------------------------------------------------------------
975
+ */
976
 
977
+ /* Fill the .mapp-thumbnail container, where fixed dimensions are applied */
978
+ .mapp-list-component .mapp-thumbnail img, .mapp-list-component .mapp-thumbnail .mapp-embed, .mapp-list-component .mapp-thumbnail iframe {
979
+ height: 100%;
980
+ width: 100%;
981
+ }
982
+
983
+ /* Default is flex horizontal, use block to position image at top */
984
+ .mapp-list-component.mapp-thumb-top .mapp-item {
985
+ display: block;
986
+ padding: 0;
987
+ }
988
+
989
+ .mapp-list-component.mapp-thumb-top .mapp-info {
990
+ padding: 10px;
991
+ }
992
+
993
+ .mapp-list-component.mapp-thumb-top .mapp-thumbnail {
994
+ height: 150px;
995
+ text-align: center;
996
+ }
997
+
998
+ .mapp-list-component.mapp-thumb-left .mapp-thumbnail, .mapp-list-component.mapp-thumb-right .mapp-thumbnail {
999
+ height: 100px !important;
1000
+ width: 100px !important;
1001
+ }
1002
+
1003
+ .mapp-list-component.mapp-thumb-left .mapp-info .mapp-template {
1004
+ flex-direction: row-reverse;
1005
+ }
1006
+
1007
+ .mapp-list-component.mapp-thumb-right .mapp-item {
1008
+ flex-direction: row-reverse;
1009
+ }
1010
 
1011
  /*
1012
  -----------------------------------------------------------------------------------
css/mappress_admin.css CHANGED
@@ -658,6 +658,7 @@ button.mapp-query-refresh {
658
 
659
  .mapp-edit .mapp-ib-content {
660
  flex: 1;
 
661
  }
662
 
663
  .mapp-edit .mapp-ib {
@@ -685,8 +686,12 @@ button.mapp-query-refresh {
685
  height: 32px;
686
  }
687
 
688
- .mapp-poi-url {
689
- width: 100%;
 
 
 
 
690
  }
691
 
692
  .mapp-poi-toolbar {
@@ -705,6 +710,48 @@ button.mapp-query-refresh {
705
  cursor: pointer;
706
  }
707
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
708
  /*
709
  -----------------------------------------------------------------------------------
710
  POI editor MCE Control
@@ -2238,6 +2285,9 @@ a.mapp-templates-item {
2238
 
2239
 
2240
  .mapp-templates-toolbar {
 
 
 
2241
  padding-top: 10px;
2242
  border-top: 1px solid lightgray;
2243
  }
658
 
659
  .mapp-edit .mapp-ib-content {
660
  flex: 1;
661
+ overflow: hidden;
662
  }
663
 
664
  .mapp-edit .mapp-ib {
686
  height: 32px;
687
  }
688
 
689
+ .mapp-poi-kml {
690
+ border-bottom: 1px solid lightgray;
691
+ overflow: hidden;
692
+ padding: 5px 0;
693
+ text-overflow: ellipsis;
694
+ white-space: nowrap;
695
  }
696
 
697
  .mapp-poi-toolbar {
710
  cursor: pointer;
711
  }
712
 
713
+ .mapp-poi-images {
714
+ display: flex;
715
+ margin: 5px 0;
716
+ overflow: auto;
717
+ }
718
+
719
+ .mapp-poi-images .mapp-poi-image {
720
+ align-items: center;
721
+ border: 1px solid lightgray;
722
+ cursor: pointer;
723
+ display: flex;
724
+ flex-shrink: 0;
725
+ height : 96px;
726
+ justify-content: center;
727
+ overflow: hidden;
728
+ position: relative;
729
+ width : 96px;
730
+ margin-right: 5px;
731
+ }
732
+
733
+ .mapp-poi-images .mapp-poi-image img {
734
+ max-height: 100%;
735
+ }
736
+
737
+ .mapp-poi-images .mapp-poi-embed, .mapp-poi-images .mapp-poi-embed iframe {
738
+ height: 100%;
739
+ width: 100%;
740
+ }
741
+
742
+ .mapp-poi-images .mapp-poi-embed .components-spinner {
743
+ margin: 0;
744
+ }
745
+
746
+ .mapp-poi-image-delete {
747
+ background-color: white;
748
+ border: 1px solid gray;
749
+ padding: 2px;
750
+ position: absolute;
751
+ right: 1px;
752
+ top: 1px;
753
+ }
754
+
755
  /*
756
  -----------------------------------------------------------------------------------
757
  POI editor MCE Control
2285
 
2286
 
2287
  .mapp-templates-toolbar {
2288
+ align-items: center;
2289
+ display: flex;
2290
+ justify-content: space-between;
2291
  padding-top: 10px;
2292
  border-top: 1px solid lightgray;
2293
  }
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.75.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: 2022-04-19T03:37:50+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
@@ -31,7 +31,7 @@ msgid "Chris Richardson"
31
  msgstr ""
32
 
33
  #: mappress.php:178
34
- #: mappress.php:759
35
  msgid "Settings"
36
  msgstr ""
37
 
@@ -78,215 +78,217 @@ msgstr ""
78
  msgid "Please enter your MapPress license key to enable plugin updates"
79
  msgstr ""
80
 
81
- #: mappress.php:489
82
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
83
  msgstr ""
84
 
85
- #: mappress.php:493
86
  msgid "MapPress has many new features! %s."
87
  msgstr ""
88
 
89
- #: mappress.php:493
90
- #: mappress.php:497
91
- #: mappress.php:501
 
92
  #: build/index_mappress_admin.js:1
93
  msgid "Learn more"
94
  msgstr ""
95
 
96
- #: mappress.php:497
97
- msgid "MapPress popup templates have changed! Please update custom templates to the new format. %s."
 
98
  msgstr ""
99
 
100
- #: mappress.php:501
101
  msgid "MapPress templates and filters have changed. Please update custom templates and filters. %s."
102
  msgstr ""
103
 
104
- #: mappress.php:578
105
  msgid "Are you sure you want to delete?"
106
  msgstr ""
107
 
108
- #: mappress.php:579
109
  msgid "Permanently delete this map?"
110
  msgstr ""
111
 
112
- #: mappress.php:580
113
  msgid "Error reading KML file"
114
  msgstr ""
115
 
116
- #: mappress.php:581
117
  msgid "URL for KML file"
118
  msgstr ""
119
 
120
- #: mappress.php:582
121
  msgid "Please select an editor to insert into."
122
  msgstr ""
123
 
124
- #: mappress.php:583
125
  msgid "Unable to get your location"
126
  msgstr ""
127
 
128
- #: mappress.php:584
129
  #: build/index_mappress_admin.js:1
130
  msgid "No results"
131
  msgstr ""
132
 
133
- #: mappress.php:585
134
  msgid "Save changes?"
135
  msgstr ""
136
 
137
- #: mappress.php:586
138
  #: build/index_mappress_admin.js:1
139
  msgid "Shape"
140
  msgstr ""
141
 
142
- #: mappress.php:618
143
- #: mappress.php:627
144
  msgid "Streets"
145
  msgstr ""
146
 
147
- #: mappress.php:619
148
  msgid "Outdoors"
149
  msgstr ""
150
 
151
- #: mappress.php:620
152
  msgid "Light"
153
  msgstr ""
154
 
155
- #: mappress.php:621
156
  msgid "Dark"
157
  msgstr ""
158
 
159
- #: mappress.php:622
160
- #: mappress.php:635
161
  msgid "Satellite"
162
  msgstr ""
163
 
164
- #: mappress.php:623
165
  msgid "Satellite Streets"
166
  msgstr ""
167
 
168
- #: mappress.php:633
169
  msgid "Roadmap"
170
  msgstr ""
171
 
172
- #: mappress.php:634
173
  msgid "Terrain"
174
  msgstr ""
175
 
176
- #: mappress.php:636
177
  msgid "Hybrid"
178
  msgstr ""
179
 
180
- #: mappress.php:760
181
- #: mappress_settings.php:509
182
- #: mappress_settings.php:540
183
  #: build/index_mappress_admin.js:1
184
  msgid "What's new"
185
  msgstr ""
186
 
187
- #: mappress.php:1092
188
  msgid "Version"
189
  msgstr ""
190
 
191
- #: mappress_map.php:139
192
  msgid "Map not found"
193
  msgstr ""
194
 
195
- #: mappress_map.php:153
196
  msgid "Post not found"
197
  msgstr ""
198
 
199
- #: mappress_map.php:367
200
  #: build/index_mappress_admin.js:1
201
  msgid "Untitled"
202
  msgstr ""
203
 
204
- #: mappress_map.php:368
205
  msgid "Copy of %s"
206
  msgstr ""
207
 
208
- #: mappress_map.php:464
209
- #: mappress_settings.php:504
210
- #: mappress_settings.php:535
211
  #: build/index_mappress_admin.js:1
212
  msgid "MapPress"
213
  msgstr ""
214
 
215
- #: mappress_poi.php:43
216
  msgid "Invalid lat/lng coordinate: %s,%s"
217
  msgstr ""
218
 
219
- #: mappress_settings.php:308
220
  #: build/index_mappress_admin.js:1
221
  msgid "Default"
222
  msgstr ""
223
 
224
- #: mappress_settings.php:377
225
  msgid "Address line "
226
  msgstr ""
227
 
228
- #: mappress_settings.php:378
229
  msgid "Latitude"
230
  msgstr ""
231
 
232
- #: mappress_settings.php:378
233
  msgid "Longitude"
234
  msgstr ""
235
 
236
- #: mappress_settings.php:378
237
  #: mappress_template.php:37
238
  #: build/index_mappress_admin.js:1
239
  msgid "Title"
240
  msgstr ""
241
 
242
- #: mappress_settings.php:378
243
  #: mappress_template.php:34
244
  msgid "Body"
245
  msgstr ""
246
 
247
- #: mappress_settings.php:378
248
  #: mappress_template.php:35
249
  #: build/index_mappress_admin.js:1
250
  msgid "Icon"
251
  msgstr ""
252
 
253
- #: mappress_settings.php:378
254
  msgid "Zoom"
255
  msgstr ""
256
 
257
- #: mappress_settings.php:486
258
  msgid "OK, you deserve it!"
259
  msgstr ""
260
 
261
- #: mappress_settings.php:487
262
  msgid "Nope, maybe later"
263
  msgstr ""
264
 
265
- #: mappress_settings.php:488
266
  msgid "I need help using the plugin"
267
  msgstr ""
268
 
269
- #: mappress_settings.php:490
270
  msgid "Help Spread the Word"
271
  msgstr ""
272
 
273
- #: mappress_settings.php:491
274
  msgid "Hi, I hope you're enjoying MapPress. Would you mind taking a moment to write a brief review? It would mean a lot to me!"
275
  msgstr ""
276
 
277
- #: mappress_settings.php:508
278
- #: mappress_settings.php:539
279
  msgid "Get help"
280
  msgstr ""
281
 
282
- #: mappress_settings.php:511
283
- #: mappress_settings.php:542
284
  #: build/index_mappress_admin.js:1
285
  msgid "Your account"
286
  msgstr ""
287
 
288
- #: mappress_settings.php:513
289
- #: mappress_settings.php:544
290
  msgid "Upgrade to MapPress Pro"
291
  msgstr ""
292
 
@@ -306,12 +308,6 @@ msgstr ""
306
  msgid "Custom Field"
307
  msgstr ""
308
 
309
- #: templates/map-popup.php:5
310
- #: templates/mashup-popup.php:6
311
- #: build/index_mappress.js:1
312
- msgid "Get Directions"
313
- msgstr ""
314
-
315
  #: templates/map.php:13
316
  msgid "Your Location"
317
  msgstr ""
@@ -346,6 +342,10 @@ msgstr ""
346
  msgid "My location"
347
  msgstr ""
348
 
 
 
 
 
349
  #: build/index_mappress.js:1
350
  #: build/index_mappress_admin.js:1
351
  msgid "All"
@@ -364,6 +364,7 @@ msgid "%s Result"
364
  msgstr ""
365
 
366
  #: build/index_mappress.js:1
 
367
  msgid "Reset"
368
  msgstr ""
369
 
@@ -521,10 +522,18 @@ msgstr ""
521
  msgid "Add Media"
522
  msgstr ""
523
 
 
 
 
 
524
  #: build/index_mappress_admin.js:1
525
  msgid "Save"
526
  msgstr ""
527
 
 
 
 
 
528
  #: build/index_mappress_admin.js:1
529
  msgid "Delete"
530
  msgstr ""
@@ -1042,11 +1051,11 @@ msgid "Popup content"
1042
  msgstr ""
1043
 
1044
  #: build/index_mappress_admin.js:1
1045
- msgid "POI title + POI body"
1046
  msgstr ""
1047
 
1048
  #: build/index_mappress_admin.js:1
1049
- msgid "Post title + post excerpt"
1050
  msgstr ""
1051
 
1052
  #: build/index_mappress_admin.js:1
@@ -1173,6 +1182,14 @@ msgstr ""
1173
  msgid "Custom templates"
1174
  msgstr ""
1175
 
 
 
 
 
 
 
 
 
1176
  #: build/index_mappress_admin.js:1
1177
  msgid "Mashup thumbnails"
1178
  msgstr ""
@@ -1253,10 +1270,6 @@ msgstr ""
1253
  msgid "Advanced Custom Fields"
1254
  msgstr ""
1255
 
1256
- #: build/index_mappress_admin.js:1
1257
- msgid "ACF field"
1258
- msgstr ""
1259
-
1260
  #: build/index_mappress_admin.js:1
1261
  msgid "ACF map field to include on MapPress mashups"
1262
  msgstr ""
@@ -1345,20 +1358,24 @@ msgstr ""
1345
  msgid "Editor"
1346
  msgstr ""
1347
 
 
 
 
 
1348
  #: build/index_mappress_admin.js:1
1349
  msgid "Geocoding"
1350
  msgstr ""
1351
 
1352
  #: build/index_mappress_admin.js:1
1353
- msgid "Geocode now"
1354
  msgstr ""
1355
 
1356
  #: build/index_mappress_admin.js:1
1357
- msgid "New posts will be geocoded when they are published."
1358
  msgstr ""
1359
 
1360
  #: build/index_mappress_admin.js:1
1361
- msgid "Use an online geocoding service for bulk geocoding (>100 items)."
1362
  msgstr ""
1363
 
1364
  #: build/index_mappress_admin.js:1
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.76\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: 2022-05-01T00:25:22+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
31
  msgstr ""
32
 
33
  #: mappress.php:178
34
+ #: mappress.php:765
35
  msgid "Settings"
36
  msgstr ""
37
 
78
  msgid "Please enter your MapPress license key to enable plugin updates"
79
  msgstr ""
80
 
81
+ #: mappress.php:488
82
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
83
  msgstr ""
84
 
85
+ #: mappress.php:491
86
  msgid "MapPress has many new features! %s."
87
  msgstr ""
88
 
89
+ #: mappress.php:491
90
+ #: mappress.php:494
91
+ #: mappress.php:500
92
+ #: mappress.php:536
93
  #: build/index_mappress_admin.js:1
94
  msgid "Learn more"
95
  msgstr ""
96
 
97
+ #: mappress.php:494
98
+ #: mappress.php:536
99
+ msgid "MapPress templates have changed! Please update custom templates to the new format. %s."
100
  msgstr ""
101
 
102
+ #: mappress.php:500
103
  msgid "MapPress templates and filters have changed. Please update custom templates and filters. %s."
104
  msgstr ""
105
 
106
+ #: mappress.php:582
107
  msgid "Are you sure you want to delete?"
108
  msgstr ""
109
 
110
+ #: mappress.php:583
111
  msgid "Permanently delete this map?"
112
  msgstr ""
113
 
114
+ #: mappress.php:584
115
  msgid "Error reading KML file"
116
  msgstr ""
117
 
118
+ #: mappress.php:585
119
  msgid "URL for KML file"
120
  msgstr ""
121
 
122
+ #: mappress.php:586
123
  msgid "Please select an editor to insert into."
124
  msgstr ""
125
 
126
+ #: mappress.php:587
127
  msgid "Unable to get your location"
128
  msgstr ""
129
 
130
+ #: mappress.php:588
131
  #: build/index_mappress_admin.js:1
132
  msgid "No results"
133
  msgstr ""
134
 
135
+ #: mappress.php:589
136
  msgid "Save changes?"
137
  msgstr ""
138
 
139
+ #: mappress.php:590
140
  #: build/index_mappress_admin.js:1
141
  msgid "Shape"
142
  msgstr ""
143
 
144
+ #: mappress.php:622
145
+ #: mappress.php:631
146
  msgid "Streets"
147
  msgstr ""
148
 
149
+ #: mappress.php:623
150
  msgid "Outdoors"
151
  msgstr ""
152
 
153
+ #: mappress.php:624
154
  msgid "Light"
155
  msgstr ""
156
 
157
+ #: mappress.php:625
158
  msgid "Dark"
159
  msgstr ""
160
 
161
+ #: mappress.php:626
162
+ #: mappress.php:639
163
  msgid "Satellite"
164
  msgstr ""
165
 
166
+ #: mappress.php:627
167
  msgid "Satellite Streets"
168
  msgstr ""
169
 
170
+ #: mappress.php:637
171
  msgid "Roadmap"
172
  msgstr ""
173
 
174
+ #: mappress.php:638
175
  msgid "Terrain"
176
  msgstr ""
177
 
178
+ #: mappress.php:640
179
  msgid "Hybrid"
180
  msgstr ""
181
 
182
+ #: mappress.php:766
183
+ #: mappress_settings.php:510
184
+ #: mappress_settings.php:541
185
  #: build/index_mappress_admin.js:1
186
  msgid "What's new"
187
  msgstr ""
188
 
189
+ #: mappress.php:1098
190
  msgid "Version"
191
  msgstr ""
192
 
193
+ #: mappress_map.php:146
194
  msgid "Map not found"
195
  msgstr ""
196
 
197
+ #: mappress_map.php:160
198
  msgid "Post not found"
199
  msgstr ""
200
 
201
+ #: mappress_map.php:374
202
  #: build/index_mappress_admin.js:1
203
  msgid "Untitled"
204
  msgstr ""
205
 
206
+ #: mappress_map.php:375
207
  msgid "Copy of %s"
208
  msgstr ""
209
 
210
+ #: mappress_map.php:471
211
+ #: mappress_settings.php:505
212
+ #: mappress_settings.php:536
213
  #: build/index_mappress_admin.js:1
214
  msgid "MapPress"
215
  msgstr ""
216
 
217
+ #: mappress_poi.php:44
218
  msgid "Invalid lat/lng coordinate: %s,%s"
219
  msgstr ""
220
 
221
+ #: mappress_settings.php:309
222
  #: build/index_mappress_admin.js:1
223
  msgid "Default"
224
  msgstr ""
225
 
226
+ #: mappress_settings.php:378
227
  msgid "Address line "
228
  msgstr ""
229
 
230
+ #: mappress_settings.php:379
231
  msgid "Latitude"
232
  msgstr ""
233
 
234
+ #: mappress_settings.php:379
235
  msgid "Longitude"
236
  msgstr ""
237
 
238
+ #: mappress_settings.php:379
239
  #: mappress_template.php:37
240
  #: build/index_mappress_admin.js:1
241
  msgid "Title"
242
  msgstr ""
243
 
244
+ #: mappress_settings.php:379
245
  #: mappress_template.php:34
246
  msgid "Body"
247
  msgstr ""
248
 
249
+ #: mappress_settings.php:379
250
  #: mappress_template.php:35
251
  #: build/index_mappress_admin.js:1
252
  msgid "Icon"
253
  msgstr ""
254
 
255
+ #: mappress_settings.php:379
256
  msgid "Zoom"
257
  msgstr ""
258
 
259
+ #: mappress_settings.php:487
260
  msgid "OK, you deserve it!"
261
  msgstr ""
262
 
263
+ #: mappress_settings.php:488
264
  msgid "Nope, maybe later"
265
  msgstr ""
266
 
267
+ #: mappress_settings.php:489
268
  msgid "I need help using the plugin"
269
  msgstr ""
270
 
271
+ #: mappress_settings.php:491
272
  msgid "Help Spread the Word"
273
  msgstr ""
274
 
275
+ #: mappress_settings.php:492
276
  msgid "Hi, I hope you're enjoying MapPress. Would you mind taking a moment to write a brief review? It would mean a lot to me!"
277
  msgstr ""
278
 
279
+ #: mappress_settings.php:509
280
+ #: mappress_settings.php:540
281
  msgid "Get help"
282
  msgstr ""
283
 
284
+ #: mappress_settings.php:512
285
+ #: mappress_settings.php:543
286
  #: build/index_mappress_admin.js:1
287
  msgid "Your account"
288
  msgstr ""
289
 
290
+ #: mappress_settings.php:514
291
+ #: mappress_settings.php:545
292
  msgid "Upgrade to MapPress Pro"
293
  msgstr ""
294
 
308
  msgid "Custom Field"
309
  msgstr ""
310
 
 
 
 
 
 
 
311
  #: templates/map.php:13
312
  msgid "Your Location"
313
  msgstr ""
342
  msgid "My location"
343
  msgstr ""
344
 
345
+ #: build/index_mappress.js:1
346
+ msgid "Get Directions"
347
+ msgstr ""
348
+
349
  #: build/index_mappress.js:1
350
  #: build/index_mappress_admin.js:1
351
  msgid "All"
364
  msgstr ""
365
 
366
  #: build/index_mappress.js:1
367
+ #: build/index_mappress_admin.js:1
368
  msgid "Reset"
369
  msgstr ""
370
 
522
  msgid "Add Media"
523
  msgstr ""
524
 
525
+ #: build/index_mappress_admin.js:1
526
+ msgid "KML"
527
+ msgstr ""
528
+
529
  #: build/index_mappress_admin.js:1
530
  msgid "Save"
531
  msgstr ""
532
 
533
+ #: build/index_mappress_admin.js:1
534
+ msgid "Images"
535
+ msgstr ""
536
+
537
  #: build/index_mappress_admin.js:1
538
  msgid "Delete"
539
  msgstr ""
1051
  msgstr ""
1052
 
1053
  #: build/index_mappress_admin.js:1
1054
+ msgid "POI title + body + images"
1055
  msgstr ""
1056
 
1057
  #: build/index_mappress_admin.js:1
1058
+ msgid "Post title + excerpt + featured image"
1059
  msgstr ""
1060
 
1061
  #: build/index_mappress_admin.js:1
1182
  msgid "Custom templates"
1183
  msgstr ""
1184
 
1185
+ #: build/index_mappress_admin.js:1
1186
+ msgid "Directions link"
1187
+ msgstr ""
1188
+
1189
+ #: build/index_mappress_admin.js:1
1190
+ msgid "Show a directions link in popups"
1191
+ msgstr ""
1192
+
1193
  #: build/index_mappress_admin.js:1
1194
  msgid "Mashup thumbnails"
1195
  msgstr ""
1270
  msgid "Advanced Custom Fields"
1271
  msgstr ""
1272
 
 
 
 
 
1273
  #: build/index_mappress_admin.js:1
1274
  msgid "ACF map field to include on MapPress mashups"
1275
  msgstr ""
1358
  msgid "Editor"
1359
  msgstr ""
1360
 
1361
+ #: build/index_mappress_admin.js:1
1362
+ msgid "Reset template to default"
1363
+ msgstr ""
1364
+
1365
  #: build/index_mappress_admin.js:1
1366
  msgid "Geocoding"
1367
  msgstr ""
1368
 
1369
  #: build/index_mappress_admin.js:1
1370
+ msgid "Geocode posts"
1371
  msgstr ""
1372
 
1373
  #: build/index_mappress_admin.js:1
1374
+ msgid "Geocode users"
1375
  msgstr ""
1376
 
1377
  #: build/index_mappress_admin.js:1
1378
+ msgid "For bulk geocoding (>100 items) online geocoding services are faster and less expensive."
1379
  msgstr ""
1380
 
1381
  #: build/index_mappress_admin.js:1
languages/texts.php CHANGED
@@ -17,7 +17,7 @@ __("Please enter your MapPress license key to enable plugin updates");
17
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
18
  __("MapPress has many new features! %s.");
19
  __("Learn more");
20
- __("MapPress popup templates have changed! Please update custom templates to the new format. %s.");
21
  __("MapPress templates and filters have changed. Please update custom templates and filters. %s.");
22
  __("Are you sure you want to delete?");
23
  __("Permanently delete this map?");
@@ -65,7 +65,6 @@ __("Address");
65
  __("Thumbnail");
66
  __("Url");
67
  __("Custom Field");
68
- __("Get Directions");
69
  __("Your Location");
70
  __("List");
71
  __("Map");
@@ -74,6 +73,7 @@ __("By %s");
74
  __("In");
75
  __(" Tagged ");
76
  __("My location");
 
77
  __("All");
78
  __("Filter");
79
  __("%s Results");
@@ -117,7 +117,9 @@ __("Open map library");
117
  __("Visual");
118
  __("HTML");
119
  __("Add Media");
 
120
  __("Save");
 
121
  __("Delete");
122
  __("Select icon");
123
  __("New icon");
@@ -247,8 +249,8 @@ __("Post in new tab");
247
  __("Post in modal");
248
  __("Marker click");
249
  __("Popup content");
250
- __("POI title + POI body");
251
- __("Post title + post excerpt");
252
  __("KMLs");
253
  __("Include KML POIs in mashups");
254
  __("Enable search for mashups");
@@ -280,6 +282,8 @@ __("Include");
280
  __("Exclude");
281
  __("Templates");
282
  __("Custom templates");
 
 
283
  __("Mashup thumbnails");
284
  __("Popups");
285
  __("POI lists");
@@ -300,7 +304,6 @@ __("Google Server API key");
300
  __("Server API key for geocoding. Only required if client key is restricted by referrer.");
301
  __("Frontend Forms");
302
  __("Advanced Custom Fields");
303
- __("ACF field");
304
  __("ACF map field to include on MapPress mashups");
305
  __("To generate MapPress maps from ACF fields, leave this blank and use the Geocoding section");
306
  __("Miscellaneous");
@@ -323,10 +326,11 @@ __("Map list item");
323
  __("Mashup popup");
324
  __("Mashup list item");
325
  __("Editor");
 
326
  __("Geocoding");
327
- __("Geocode now");
328
- __("New posts will be geocoded when they are published.");
329
- __("Use an online geocoding service for bulk geocoding (>100 items).");
330
  __("No errors");
331
  __("Geocoding errors");
332
  __("Current post");
17
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
18
  __("MapPress has many new features! %s.");
19
  __("Learn more");
20
+ __("MapPress templates have changed! Please update custom templates to the new format. %s.");
21
  __("MapPress templates and filters have changed. Please update custom templates and filters. %s.");
22
  __("Are you sure you want to delete?");
23
  __("Permanently delete this map?");
65
  __("Thumbnail");
66
  __("Url");
67
  __("Custom Field");
 
68
  __("Your Location");
69
  __("List");
70
  __("Map");
73
  __("In");
74
  __(" Tagged ");
75
  __("My location");
76
+ __("Get Directions");
77
  __("All");
78
  __("Filter");
79
  __("%s Results");
117
  __("Visual");
118
  __("HTML");
119
  __("Add Media");
120
+ __("KML");
121
  __("Save");
122
+ __("Images");
123
  __("Delete");
124
  __("Select icon");
125
  __("New icon");
249
  __("Post in modal");
250
  __("Marker click");
251
  __("Popup content");
252
+ __("POI title + body + images");
253
+ __("Post title + excerpt + featured image");
254
  __("KMLs");
255
  __("Include KML POIs in mashups");
256
  __("Enable search for mashups");
282
  __("Exclude");
283
  __("Templates");
284
  __("Custom templates");
285
+ __("Directions link");
286
+ __("Show a directions link in popups");
287
  __("Mashup thumbnails");
288
  __("Popups");
289
  __("POI lists");
304
  __("Server API key for geocoding. Only required if client key is restricted by referrer.");
305
  __("Frontend Forms");
306
  __("Advanced Custom Fields");
 
307
  __("ACF map field to include on MapPress mashups");
308
  __("To generate MapPress maps from ACF fields, leave this blank and use the Geocoding section");
309
  __("Miscellaneous");
326
  __("Mashup popup");
327
  __("Mashup list item");
328
  __("Editor");
329
+ __("Reset template to default");
330
  __("Geocoding");
331
+ __("Geocode posts");
332
+ __("Geocode users");
333
+ __("For bulk geocoding (>100 items) online geocoding services are faster and less expensive.");
334
  __("No errors");
335
  __("Geocoding errors");
336
  __("Current post");
lib/Leaflet.markercluster/leaflet.markercluster.js DELETED
@@ -1,3 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Leaflet=e.Leaflet||{},e.Leaflet.markercluster=e.Leaflet.markercluster||{}))}(this,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire("layeradd",{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire("layeradd",{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire("layeradd",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,i=this._zoom;if(e.__parent)for(;t.__parent._zoom>=i;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):e.getLatLng?this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire("layerremove",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e}),this):(this._nonPointGroup.removeLayer(e),this.fire("layerremove",{layer:e}),this)},addLayers:function(e,t){if(!L.Util.isArray(e))return this.addLayer(e);var i,n=this._featureGroup,r=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,a=this.options.chunkProgress,h=e.length,l=0,u=!0;if(this._map){var _=(new Date).getTime(),d=L.bind(function(){for(var c=(new Date).getTime();h>l;l++){if(s&&0===l%200){var p=(new Date).getTime()-c;if(p>o)break}if(i=e[l],i instanceof L.LayerGroup)u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),t||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var f=i.__parent.getAllChildMarkers(),m=f[0]===i?f[1]:f[0];n.removeLayer(m)}}else r.addLayer(i),t||this.fire("layeradd",{layer:i})}a&&a(l,h,(new Date).getTime()-_),l===h?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else for(var c=this._needsClustering;h>l;l++)i=e[l],i instanceof L.LayerGroup?(u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length):i.getLatLng?this.hasLayer(i)||c.push(i):r.addLayer(i);return this},removeLayers:function(e){var t,i,n=e.length,r=this._featureGroup,s=this._nonPointGroup,o=!0;if(!this._map){for(t=0;n>t;t++)i=e[t],i instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=e.slice(),h=n;for(t=0;h>t;t++)i=a[t],i instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),h=a.length):this._unspiderfyLayer(i)}for(t=0;n>t;t++)i=e[t],i instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),r.hasLayer(i)&&(r.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var i,n,r,s=this._needsClustering.slice(),o=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;n>=0;n--){for(i=!0,r=o.length-1;r>=0;r--)if(o[r].layer===s[n]){i=!1;break}i&&e.call(t,s[n])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer(function(i){L.stamp(i)===e&&(t=i)}),t},hasLayer:function(e){if(!e)return!1;var t,i=this._needsClustering;for(t=i.length-1;t>=0;t--)if(i[t]===e)return!0;for(i=this._needsRemoving,t=i.length-1;t>=0;t--)if(i[t].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){"function"!=typeof t&&(t=function(){});var i=function(){!e._icon&&!e.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),e._icon?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(e.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),e.__parent.zoomToBounds())},onAdd:function(e){this._map=e;var t,i,n;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,i=this._needsRemoving.length;i>t;t++)n=this._needsRemoving[t],n.newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(t=0,i=this._needsRemoving.length;i>t;t++)n=this._needsRemoving[t],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var i=e.length-1;i>=0;i--)if(e[i]===t)return e.splice(i,1),!0},_removeFromGridUnclustered:function(e,t){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());t>=r&&n[t].removeObject(e,i.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,i){e._latlng=t,this.removeLayer(e),e._latlng=i,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,i){var n=this._gridClusters,r=this._gridUnclustered,s=this._featureGroup,o=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var h,l=e.__parent,u=l._markers;for(this._arraySplice(u,e);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(h=l._markers[0]===e?l._markers[1]:l._markers[0],n[l._zoom].removeObject(l,o.project(l._cLatLng,l._zoom)),r[l._zoom].addObject(h,o.project(h.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(h),h.__parent=l.__parent,l._icon&&(s.removeLayer(l),i||s.addLayer(h))):l._iconNeedsUpdate=!0,l=l.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,i){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e="cluster"+e}L.FeatureGroup.prototype.fire.call(this,e,t,i)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,"cluster"+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),i=" marker-cluster-";return i+=10>t?"small":100>t?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(t||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){for(var t=e.layer,i=t;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),e.layer.getChildCount()>2&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(e||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var r=e;r>=t;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var i,n,r=this._gridClusters,s=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);t>=o;t--){i=this._map.project(e.getLatLng(),t);var a=r[t].getNearObject(i);if(a)return a._addChild(e),e.__parent=a,void 0;if(a=s[t].getNearObject(i)){var h=a.__parent;h&&this._removeLayer(a,!1);var l=new this._markerCluster(this,t,a,e);r[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l,e.__parent=l;var u=l;for(n=t-1;n>h._zoom;n--)u=new this._markerCluster(this,n,u),r[n].addObject(u,this._map.project(a.getLatLng(),n));return h._addChild(u),this._removeFromGridUnclustered(a,t),void 0}s[t].addObject(e,i)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(2===t._childCount){t._addToMap();var i=t.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var i,n=e.getLayers(),r=0;for(t=t||[];r<n.length;r++)i=n[r],i instanceof L.LayerGroup?this._extractNonGroupLayers(i,t):t.push(i);return t},_overrideMarkerIcon:function(e){var t=e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}});return t}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(e,t){var i,n=this._getExpandedVisibleBounds(),r=this._featureGroup,s=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,e,s,function(s){var o,a=s._latlng,h=s._markers;for(n.contains(a)||(a=null),s._isSingleParent()&&e+1===t?(r.removeLayer(s),s._recursivelyAddChildrenToMap(null,t,n)):(s.clusterHide(),s._recursivelyAddChildrenToMap(a,t,n)),i=h.length-1;i>=0;i--)o=h[i],n.contains(o._latlng)||r.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,t),r.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(n,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,e,s,function(e){r.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var i=this,n=this._featureGroup;n.addLayer(e),t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){n.removeLayer(e),e.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,t,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,t+1,i);var s=this;this._forceLayout(),e._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===e._childCount){var o=e._markers[0];this._ignoreMove=!0,o.setLatLng(o.getLatLng()),this._ignoreMove=!1,o.clusterShow&&o.clusterShow()}else e._recursively(n,i,r,function(e){e._recursivelyRemoveChildrenFromMap(n,r,t+1)});s._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(e,t){e=e||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(e);for(var n=this._markers.length-1;n>=0;n--)t&&this._markers[n].__dragStart||e.push(this._markers[n]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),s=this._zoom+1,o=n.getZoom();i.length>0&&r>s;){s++;var a=[];for(t=0;t<i.length;t++)a=a.concat(i[t]._childClusters);i=a}r>s?this._group._map.setView(this._latlng,s):o>=r?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,i,n,r=this._markers,s=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),e=0;e<r.length;e++)i=r[e]._latlng,this._bounds.extend(i),o+=i.lat,a+=i.lng;for(e=0;e<s.length;e++)t=s[e],t._boundsNeedUpdate&&t._recalculateBounds(),this._bounds.extend(t._bounds),i=t._wLatLng,n=t._childCount,o+=i.lat*n,a+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(o/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,t,i){this._recursively(e,this._group._map.getMinZoom(),i-1,function(e){var i,n,r=e._markers;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(t),n.clusterHide())},function(e){var i,n,r=e._childClusters;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(t),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,i,n){this._recursively(e,n,t,function(r){r._recursivelyAnimateChildrenIn(e,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(e,t,i)):r.clusterHide(),r._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(e,t,i){this._recursively(i,this._group._map.getMinZoom()-1,t,function(n){if(t!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var s=n._markers[r];i.contains(s._latlng)&&(e&&(s._backupLatlng=s.getLatLng(),s.setLatLng(e),s.clusterHide&&s.clusterHide()),n._group._featureGroup.addLayer(s))}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var i=this._markers[t];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(e-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,i,n){var r,s;this._recursively(e,t-1,i-1,function(e){for(s=e._markers.length-1;s>=0;s--)r=e._markers[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(e){for(s=e._childClusters.length-1;s>=0;s--)r=e._childClusters[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(e,t,i,n,r){var s,o,a=this._childClusters,h=this._zoom;if(h>=t&&(n&&n(this),r&&h===i&&r(this)),t>h||i>h)for(s=a.length-1;s>=0;s--)o=a[s],o._boundsNeedUpdate&&o._recalculateBounds(),e.intersects(o._bounds)&&o._recursively(e,t,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var i=this._getCoord(t.x),n=this._getCoord(t.y),r=this._grid,s=r[n]=r[n]||{},o=s[i]=s[i]||[],a=L.Util.stamp(e);this._objectPoint[a]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var i,n,r=this._getCoord(t.x),s=this._getCoord(t.y),o=this._grid,a=o[s]=o[s]||{},h=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(e)],i=0,n=h.length;n>i;i++)if(h[i]===e)return h.splice(i,1),1===n&&delete a[r],!0},eachObject:function(e,t){var i,n,r,s,o,a,h,l=this._grid;for(i in l){o=l[i];for(n in o)for(a=o[n],r=0,s=a.length;s>r;r++)h=e.call(t,a[r]),h&&(r--,s--)}},getNearObject:function(e){var t,i,n,r,s,o,a,h,l=this._getCoord(e.x),u=this._getCoord(e.y),_=this._objectPoint,d=this._sqCellSize,c=null;for(t=u-1;u+1>=t;t++)if(r=this._grid[t])for(i=l-1;l+1>=i;i++)if(s=r[i])for(n=0,o=s.length;o>n;n++)a=s[n],h=this._sqDist(_[L.Util.stamp(a)],e),(d>h||d>=h&&null===c)&&(d=h,c=a);return c},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(e,t){var i=t[1].lat-t[0].lat,n=t[0].lng-t[1].lng;return n*(e.lat-t[0].lat)+i*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var i,n,r,s=0,o=null,a=[];for(i=t.length-1;i>=0;i--)n=t[i],r=this.getDistant(n,e),r>0&&(a.push(n),r>s&&(s=r,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(e,t){var i=[],n=this.findMostDistantPointFromBaseLine(e,t);return n.maxPoint?(i=i.concat(this.buildConvexHull([e[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,e[1]],n.newPoints))):[e[0]]},getConvexHull:function(e){var t,i=!1,n=!1,r=!1,s=!1,o=null,a=null,h=null,l=null,u=null,_=null;for(t=e.length-1;t>=0;t--){var d=e[t];(i===!1||d.lat>i)&&(o=d,i=d.lat),(n===!1||d.lat<n)&&(a=d,n=d.lat),(r===!1||d.lng>r)&&(h=d,r=d.lng),(s===!1||d.lng<s)&&(l=d,s=d.lng)}n!==i?(_=a,u=o):(_=l,u=h);var c=[].concat(this.buildConvexHull([_,u],e),this.buildConvexHull([u,_],e));return c}}}(),L.MarkerCluster.include({getConvexHull:function(){var e,t,i=this.getAllChildMarkers(),n=[];for(t=i.length-1;t>=0;t--)e=i[t].getLatLng(),n.push(e);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var e,t=this.getAllChildMarkers(null,!0),i=this._group,n=i._map,r=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,t.length>=this._circleSpiralSwitchover?e=this._generatePointsSpiral(t.length,r):(r.y+=10,e=this._generatePointsCircle(t.length,r)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e),s=r/this._2PI,o=this._2PI/e,a=[];for(s=Math.max(s,35),a.length=e,i=0;e>i;i++)n=this._circleStartAngle+i*o,a[i]=new L.Point(t.x+s*Math.cos(n),t.y+s*Math.sin(n))._round();return a},_generatePointsSpiral:function(e,t){var i,n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,s=n*this._spiralFootSeparation,o=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(h.length=e,i=e;i>=0;i--)e>i&&(h[i]=new L.Point(t.x+r*Math.cos(a),t.y+r*Math.sin(a))._round()),a+=s/r+5e-4*i,r+=o/a;return h},_noanimationUnspiderfy:function(){var e,t,i=this._group,n=i._map,r=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),t=s.length-1;t>=0;t--)e=s[t],r.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(n.removeLayer(e._spiderLeg),delete e._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var i,n,r,s,o=this._group,a=o._map,h=o._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(o._ignoreMove=!0,i=0;i<e.length;i++)s=a.layerPointToLatLng(t[i]),n=e[i],r=new L.Polyline([this._latlng,s],l),a.addLayer(r),n._spiderLeg=r,n._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n);this.setOpacity(.3),o._ignoreMove=!1,o.fire("spiderfied",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var i,n,r,s,o,a,h=this,l=this._group,u=l._map,_=l._featureGroup,d=this._latlng,c=u.latLngToLayerPoint(d),p=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),m=f.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),p?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=m,l._ignoreMove=!0,i=0;i<e.length;i++)n=e[i],a=u.layerPointToLatLng(t[i]),r=new L.Polyline([d,a],f),u.addLayer(r),n._spiderLeg=r,p&&(s=r._path,o=s.getTotalLength()+.1,s.style.strokeDasharray=o,s.style.strokeDashoffset=o),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),_.addLayer(n),n._setPos&&n._setPos(c);for(l._forceLayout(),l._animationStart(),i=e.length-1;i>=0;i--)a=u.layerPointToLatLng(t[i]),n=e[i],n._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),p&&(r=n._spiderLeg,s=r._path,s.style.strokeDashoffset=0,r.setStyle({opacity:m}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:e})},200)},_animationUnspiderfy:function(e){var t,i,n,r,s,o,a=this,h=this._group,l=h._map,u=h._featureGroup,_=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),c=L.Path.SVG;for(h._ignoreMove=!0,h._animationStart(),this.setOpacity(1),i=d.length-1;i>=0;i--)t=d[i],t._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,o=!0,t._setPos&&(t._setPos(_),o=!1),t.clusterHide&&(t.clusterHide(),o=!1),o&&u.removeLayer(t),c&&(n=t._spiderLeg,r=n._path,s=r.getTotalLength()+.1,r.style.strokeDashoffset=s,n.setStyle({opacity:0})));h._ignoreMove=!1,setTimeout(function(){var e=0;for(i=d.length-1;i>=0;i--)t=d[i],t._spiderLeg&&e++;for(i=d.length-1;i>=0;i--)t=d[i],t._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),e>1&&u.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()
2
- },_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,i;for(t in e)for(i=e[t].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,i;for(t in e)i=e[t],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(e,t){var i=this.options.icon;return L.setOptions(i,e),this.setIcon(i),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=i});
3
- //# sourceMappingURL=leaflet.markercluster.js.map
 
 
 
lib/Leaflet.markercluster/leaflet.markercluster.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/MarkerClusterGroup.js","../src/MarkerCluster.js","../src/MarkerOpacity.js","../src/DistanceGrid.js","../src/MarkerCluster.QuickHull.js","../src/MarkerCluster.Spiderfier.js","../src/MarkerClusterGroup.Refresh.js"],"names":[],"mappings":"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","file":"dist/leaflet.markercluster.js"}
 
lib/leaflet-omnivore.min.js DELETED
@@ -1,5 +0,0 @@
1
- /*
2
- Leaflet Omnivore 0.3.4
3
- https://cdnjs.cloudflare.com/ajax/libs/leaflet-omnivore/0.3.4/leaflet-omnivore.min.js
4
- */
5
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.omnivore=e()}}(function(){var e;return function r(e,n,t){function o(u,a){if(!n[u]){if(!e[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[u]={exports:{}};e[u][0].call(c.exports,function(n){var r=e[u][1][n];return o(r?r:n)},c,c.exports,r,e,n,t)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<t.length;u++)o(t[u]);return o}({1:[function(e,n){function r(e,n){"addData"in e&&e.addData(n),"setGeoJSON"in e&&e.setGeoJSON(n)}function t(e,n,t){var o=t||L.geoJson();return m(e,function(e,n){return e?o.fire("error",{error:e}):(r(o,JSON.parse(n.responseText)),void o.fire("ready"))}),o}function o(e,n,r){function t(e,r){return e?o.fire("error",{error:e}):(c(r.responseText,n,o),void o.fire("ready"))}var o=r||L.geoJson();return m(e,t),o}function i(e,n,r){function t(e,r){function t(){i=!0}var i;return e?o.fire("error",{error:e}):(o.on("error",t),l(r.responseText,n,o),o.off("error",t),void(i||o.fire("ready")))}var o=r||L.geoJson();return m(e,t),o}function u(e,n,r){function t(e,r){function t(){i=!0}var i;return e?o.fire("error",{error:e}):(o.on("error",t),p(r.responseXML||r.responseText,n,o),o.off("error",t),void(i||o.fire("ready")))}var o=r||L.geoJson();return m(e,t),o}function a(e,n,r){function t(e,r){function t(){i=!0}var i;return e?o.fire("error",{error:e}):(o.on("error",t),d(r.responseXML||r.responseText,n,o),o.off("error",t),void(i||o.fire("ready")))}var o=r||L.geoJson();return m(e,t),o}function s(e,n,r){function t(e,r){return e?o.fire("error",{error:e}):(h(r.responseText,n,o),void o.fire("ready"))}var o=r||L.geoJson();return m(e,t),o}function f(e,n,r){function t(e,r){return e?o.fire("error",{error:e}):(g(r.responseText,n,o),void o.fire("ready"))}var o=r||L.geoJson();return m(e,t),o}function c(e,n,t){var o="string"==typeof e?JSON.parse(e):e;t=t||L.geoJson();for(var i in o.objects){var u=E.feature(o,o.objects[i]);u.features?r(t,u.features):r(t,u)}return t}function l(e,n,t){function o(e,n){return e?t.fire("error",{error:e}):void r(t,n)}return t=t||L.geoJson(),n=n||{},y.csv2geojson(e,n,o),t}function p(e,n,t){var o=v(e);if(!o)return t.fire("error",{error:"Could not parse GPX"});t=t||L.geoJson();var i=S.gpx(o);return r(t,i),t}function d(e,n,t){var o=v(e);if(!o)return t.fire("error",{error:"Could not parse KML"});t=t||L.geoJson();var i=S.kml(o);return r(t,i),t}function g(e,n,t){t=t||L.geoJson(),n=n||{};for(var o=x.decode(e,n.precision),i={type:"LineString",coordinates:[]},u=0;u<o.length;u++)i.coordinates[u]=[o[u][1],o[u][0]];return r(t,i),t}function h(e,n,t){t=t||L.geoJson();var o=w(e);return r(t,o),t}function v(e){return"string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e}var m=e("corslite"),y=e("csv2geojson"),w=e("wellknown"),x=e("polyline"),E=e("topojson/topojson.js"),S=e("togeojson");n.exports.polyline=f,n.exports.polyline.parse=g,n.exports.geojson=t,n.exports.topojson=o,n.exports.topojson.parse=c,n.exports.csv=i,n.exports.csv.parse=l,n.exports.gpx=u,n.exports.gpx.parse=p,n.exports.kml=a,n.exports.kml.parse=d,n.exports.wkt=s,n.exports.wkt.parse=h},{corslite:5,csv2geojson:6,polyline:9,togeojson:10,"topojson/topojson.js":11,wellknown:12}],2:[function(){},{}],3:[function(e,n){n.exports=e(2)},{"/Users/tmcw/src/leaflet-omnivore/node_modules/browserify/lib/_empty.js":2}],4:[function(e,n){function r(){}var t=n.exports={};t.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.MutationObserver,r="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var t=[];if(n){var o=document.createElement("div"),i=new MutationObserver(function(){var e=t.slice();t.length=0,e.forEach(function(e){e()})});return i.observe(o,{attributes:!0}),function(e){t.length||o.setAttribute("yes","no"),t.push(e)}}return r?(window.addEventListener("message",function(e){var n=e.source;if((n===window||null===n)&&"process-tick"===e.data&&(e.stopPropagation(),t.length>0)){var r=t.shift();r()}},!0),function(e){t.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.on=r,t.addListener=r,t.once=r,t.off=r,t.removeListener=r,t.removeAllListeners=r,t.emit=r,t.binding=function(){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(){throw new Error("process.chdir is not supported")}},{}],5:[function(e,n){function r(e,n,r){function t(e){return e>=200&&300>e||304===e}function o(){void 0===a.status||t(a.status)?n.call(a,null,a):n.call(a,a,null)}var i=!1;if("undefined"==typeof window.XMLHttpRequest)return n(Error("Browser not supported"));if("undefined"==typeof r){var u=e.match(/^\s*https?:\/\/[^\/]*/);r=u&&u[0]!==location.protocol+"//"+location.domain+(location.port?":"+location.port:"")}var a=new window.XMLHttpRequest;if(r&&!("withCredentials"in a)){a=new window.XDomainRequest;var s=n;n=function(){if(i)s.apply(this,arguments);else{var e=this,n=arguments;setTimeout(function(){s.apply(e,n)},0)}}}return"onload"in a?a.onload=o:a.onreadystatechange=function(){4===a.readyState&&o()},a.onerror=function(e){n.call(this,e||!0,null),n=function(){}},a.onprogress=function(){},a.ontimeout=function(e){n.call(this,e,null),n=function(){}},a.onabort=function(e){n.call(this,e,null),n=function(){}},a.open("GET",e,!0),a.send(null),i=!0,a}"undefined"!=typeof n&&(n.exports=r)},{}],6:[function(e,n){function r(e){return!!e.match(/(Lat)(itude)?/gi)}function t(e){return!!e.match(/(L)(on|ng)(gitude)?/i)}function o(e){return"object"==typeof e?Object.keys(e).length:0}function i(e){var n=[",",";"," ","|"],r=[];return n.forEach(function(n){var t=c(n).parse(e);if(t.length>=1){for(var i=o(t[0]),u=0;u<t.length;u++)if(o(t[u])!==i)return;r.push({delimiter:n,arity:Object.keys(t[0]).length})}}),r.length?r.sort(function(e,n){return n.arity-e.arity})[0].delimiter:null}function u(e){var n=i(e);return n?c(n).parse(e):null}function a(e,n,o){o||(o=n,n={}),n.delimiter=n.delimiter||",";var u=n.latfield||"",a=n.lonfield||"",s=[],f={type:"FeatureCollection",features:s};if("auto"===n.delimiter&&"string"==typeof e&&(n.delimiter=i(e),!n.delimiter))return o({type:"Error",message:"Could not autodetect delimiter"});var p="string"==typeof e?c(n.delimiter).parse(e):e;if(!p.length)return o(null,f);if(!u||!a){for(var d in p[0])!u&&r(d)&&(u=d),!a&&t(d)&&(a=d);if(!u||!a){var g=[];for(var h in p[0])g.push(h);return o({type:"Error",message:"Latitude and longitude fields not present",data:p,fields:g})}}for(var v=[],m=0;m<p.length;m++)if(void 0!==p[m][a]&&void 0!==p[m][a]){var y,w,x,L=p[m][a],E=p[m][u];x=l(L,"EW"),x&&(L=x),x=l(E,"NS"),x&&(E=x),y=parseFloat(L),w=parseFloat(E),isNaN(y)||isNaN(w)?v.push({message:"A row contained an invalid value for latitude or longitude",row:p[m]}):(n.includeLatLon||(delete p[m][a],delete p[m][u]),s.push({type:"Feature",properties:p[m],geometry:{type:"Point",coordinates:[parseFloat(y),parseFloat(w)]}}))}o(v.length?v:null,f)}function s(e){for(var n=e.features,r={type:"Feature",geometry:{type:"LineString",coordinates:[]}},t=0;t<n.length;t++)r.geometry.coordinates.push(n[t].geometry.coordinates);return r.properties=n[0].properties,{type:"FeatureCollection",features:[r]}}function f(e){for(var n=e.features,r={type:"Feature",geometry:{type:"Polygon",coordinates:[[]]}},t=0;t<n.length;t++)r.geometry.coordinates[0].push(n[t].geometry.coordinates);return r.properties=n[0].properties,{type:"FeatureCollection",features:[r]}}var c=e("dsv"),l=e("sexagesimal");n.exports={isLon:t,isLat:r,csv:c.csv.parse,tsv:c.tsv.parse,dsv:c,auto:u,csv2geojson:a,toLine:s,toPolygon:f}},{dsv:7,sexagesimal:8}],7:[function(e,n){e("fs");n.exports=new Function('dsv.version = "0.0.3";\n\ndsv.tsv = dsv("\\t");\ndsv.csv = dsv(",");\n\nfunction dsv(delimiter) {\n var dsv = {},\n reFormat = new RegExp("[\\"" + delimiter + "\\n]"),\n delimiterCode = delimiter.charCodeAt(0);\n\n dsv.parse = function(text, f) {\n var o;\n return dsv.parseRows(text, function(row, i) {\n if (o) return o(row, i - 1);\n var a = new Function("d", "return {" + row.map(function(name, i) {\n return JSON.stringify(name) + ": d[" + i + "]";\n }).join(",") + "}");\n o = f ? function(row, i) { return f(a(row), i); } : a;\n });\n };\n\n dsv.parseRows = function(text, f) {\n var EOL = {}, // sentinel value for end-of-line\n EOF = {}, // sentinel value for end-of-file\n rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // the current line number\n t, // the current token\n eol; // is the current token followed by EOL?\n\n function token() {\n if (I >= N) return EOF; // special case: end of file\n if (eol) return eol = false, EOL; // special case: end of line\n\n // special case: quotes\n var j = I;\n if (text.charCodeAt(j) === 34) {\n var i = j;\n while (i++ < N) {\n if (text.charCodeAt(i) === 34) {\n if (text.charCodeAt(i + 1) !== 34) break;\n ++i;\n }\n }\n I = i + 2;\n var c = text.charCodeAt(i + 1);\n if (c === 13) {\n eol = true;\n if (text.charCodeAt(i + 2) === 10) ++I;\n } else if (c === 10) {\n eol = true;\n }\n return text.substring(j + 1, i).replace(/""/g, "\\"");\n }\n\n // common case: find next delimiter or newline\n while (I < N) {\n var c = text.charCodeAt(I++), k = 1;\n if (c === 10) eol = true; // \\n\n else if (c === 13) { eol = true; if (text.charCodeAt(I) === 10) ++I, ++k; } // \\r|\\r\\n\n else if (c !== delimiterCode) continue;\n return text.substring(j, I - k);\n }\n\n // special case: last token before EOF\n return text.substring(j);\n }\n\n while ((t = token()) !== EOF) {\n var a = [];\n while (t !== EOL && t !== EOF) {\n a.push(t);\n t = token();\n }\n if (f && !(a = f(a, n++))) continue;\n rows.push(a);\n }\n\n return rows;\n };\n\n dsv.format = function(rows) {\n if (Array.isArray(rows[0])) return dsv.formatRows(rows); // deprecated; use formatRows\n var fieldSet = {}, fields = [];\n\n // Compute unique fields in order of discovery.\n rows.forEach(function(row) {\n for (var field in row) {\n if (!(field in fieldSet)) {\n fields.push(fieldSet[field] = field);\n }\n }\n });\n\n return [fields.map(formatValue).join(delimiter)].concat(rows.map(function(row) {\n return fields.map(function(field) {\n return formatValue(row[field]);\n }).join(delimiter);\n })).join("\\n");\n };\n\n dsv.formatRows = function(rows) {\n return rows.map(formatRow).join("\\n");\n };\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(text) {\n return reFormat.test(text) ? "\\"" + text.replace(/\\"/g, "\\"\\"") + "\\"" : text;\n }\n\n return dsv;\n}\n;return dsv')()},{fs:2}],8:[function(e,n){n.exports=function(e,n){if(n||(n="NSEW"),"string"!=typeof e)return null;var r=/^([0-9.]+)°? *(?:([0-9.]+)['’′‘] *)?(?:([0-9.]+)(?:''|"|”|″) *)?([NSEW])?/,t=e.match(r);return t?t[4]&&-1===n.indexOf(t[4])?null:((t[1]?parseFloat(t[1]):0)+(t[2]?parseFloat(t[2])/60:0)+(t[3]?parseFloat(t[3])/3600:0))*(t[4]&&"S"===t[4]||"W"===t[4]?-1:1):null}},{}],9:[function(e,n){function r(e,n){e=Math.round(e*n),e<<=1,0>e&&(e=~e);for(var r="";e>=32;)r+=String.fromCharCode((32|31&e)+63),e>>=5;return r+=String.fromCharCode(e+63)}var t={};t.decode=function(e,n){for(var r,t,o=0,i=0,u=0,a=[],s=0,f=0,c=null,l=Math.pow(10,n||5);o<e.length;){c=null,s=0,f=0;do c=e.charCodeAt(o++)-63,f|=(31&c)<<s,s+=5;while(c>=32);r=1&f?~(f>>1):f>>1,s=f=0;do c=e.charCodeAt(o++)-63,f|=(31&c)<<s,s+=5;while(c>=32);t=1&f?~(f>>1):f>>1,i+=r,u+=t,a.push([i/l,u/l])}return a},t.encode=function(e,n){if(!e.length)return"";for(var t=Math.pow(10,n||5),o=r(e[0][0],t)+r(e[0][1],t),i=1;i<e.length;i++){var u=e[i],a=e[i-1];o+=r(u[0]-a[0],t),o+=r(u[1]-a[1],t)}return o},void 0!==typeof n&&(n.exports=t)},{}],10:[function(e,n,r){(function(t){toGeoJSON=function(){"use strict";function n(e){if(!e||!e.length)return 0;for(var n=0,r=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return r}function o(e,n){return e.getElementsByTagName(n)}function i(e,n){return e.getAttribute(n)}function u(e,n){return parseFloat(i(e,n))}function a(e,n){var r=o(e,n);return r.length?r[0]:null}function s(e){return e.normalize&&e.normalize(),e}function f(e){for(var n=0,r=[];n<e.length;n++)r[n]=parseFloat(e[n]);return r}function c(e){var n={};for(var r in e)e[r]&&(n[r]=e[r]);return n}function l(e){return e&&s(e),e&&e.firstChild&&e.firstChild.nodeValue||""}function p(e){return f(e.replace(y,"").split(","))}function d(e){for(var n=e.replace(w,"").split(x),r=[],t=0;t<n.length;t++)r.push(p(n[t]));return r}function g(e){var n=[u(e,"lon"),u(e,"lat")],r=a(e,"ele"),t=a(e,"time");return r&&n.push(parseFloat(l(r))),{coordinates:n,time:t?l(t):null}}function h(){return{type:"FeatureCollection",features:[]}}function v(e){return void 0!==e.xml?e.xml:m.serializeToString(e)}var m,y=/\s*/g,w=/^\s*|\s*$/g,x=/\s+/;"undefined"!=typeof XMLSerializer?m=new XMLSerializer:"object"!=typeof r||"object"!=typeof t||t.browser||(m=new(e("xmldom").XMLSerializer));var L={kml:function(e){function r(e){var n,r;return e=e||"","#"===e.substr(0,1)&&(e=e.substr(1)),(6===e.length||3===e.length)&&(n=e),8===e.length&&(r=parseInt(e.substr(0,2),16)/255,n=e.substr(2)),[n,isNaN(r)?void 0:r]}function t(e){return f(e.split(" "))}function u(e){var n=o(e,"coord","gx"),r=[],i=[];0===n.length&&(n=o(e,"gx:coord"));for(var u=0;u<n.length;u++)r.push(t(l(n[u])));for(var a=o(e,"when"),u=0;u<a.length;u++)i.push(l(a[u]));return{coords:r,times:i}}function s(e){var n,r,t,i,f,c=[],g=[];if(a(e,"MultiGeometry"))return s(a(e,"MultiGeometry"));if(a(e,"MultiTrack"))return s(a(e,"MultiTrack"));if(a(e,"gx:MultiTrack"))return s(a(e,"gx:MultiTrack"));for(t=0;t<y.length;t++)if(r=o(e,y[t]))for(i=0;i<r.length;i++)if(n=r[i],"Point"==y[t])c.push({type:"Point",coordinates:p(l(a(n,"coordinates")))});else if("LineString"==y[t])c.push({type:"LineString",coordinates:d(l(a(n,"coordinates")))});else if("Polygon"==y[t]){var h=o(n,"LinearRing"),v=[];for(f=0;f<h.length;f++)v.push(d(l(a(h[f],"coordinates"))));c.push({type:"Polygon",coordinates:v})}else if("Track"==y[t]||"gx:Track"==y[t]){var m=u(n);c.push({type:"LineString",coordinates:m.coords}),m.times.length&&g.push(m.times)}return{geoms:c,coordTimes:g}}function c(e){var n,t=s(e),u={},f=l(a(e,"name")),c=l(a(e,"styleUrl")),p=l(a(e,"description")),d=a(e,"TimeSpan"),g=a(e,"ExtendedData"),h=a(e,"LineStyle"),v=a(e,"PolyStyle");if(!t.geoms.length)return[];if(f&&(u.name=f),c&&m[c]&&(u.styleUrl=c,u.styleHash=m[c]),p&&(u.description=p),d){var y=l(a(d,"begin")),w=l(a(d,"end"));u.timespan={begin:y,end:w}}if(h){var x=r(l(a(h,"color"))),L=x[0],E=x[1],S=parseFloat(l(a(h,"width")));L&&(u.stroke=L),isNaN(E)||(u["stroke-opacity"]=E),isNaN(S)||(u["stroke-width"]=S)}if(v){var b=r(l(a(v,"color"))),k=b[0],M=b[1],j=l(a(v,"fill")),N=l(a(v,"outline"));k&&(u.fill=k),isNaN(M)||(u["fill-opacity"]=M),j&&(u["fill-opacity"]="1"===j?1:0),N&&(u["stroke-opacity"]="1"===N?1:0)}if(g){var F=o(g,"Data"),P=o(g,"SimpleData");for(n=0;n<F.length;n++)u[F[n].getAttribute("name")]=l(a(F[n],"value"));for(n=0;n<P.length;n++)u[P[n].getAttribute("name")]=l(P[n])}t.coordTimes.length&&(u.coordTimes=1===t.coordTimes.length?t.coordTimes[0]:t.coordTimes);var C={type:"Feature",geometry:1===t.geoms.length?t.geoms[0]:{type:"GeometryCollection",geometries:t.geoms},properties:u};return i(e,"id")&&(C.id=i(e,"id")),[C]}for(var g=h(),m={},y=["Polygon","LineString","Point","Track","gx:Track"],w=o(e,"Placemark"),x=o(e,"Style"),L=0;L<x.length;L++)m["#"+i(x[L],"id")]=n(v(x[L])).toString(16);for(var E=0;E<w.length;E++)g.features=g.features.concat(c(w[E]));return g},gpx:function(e){function n(e,n){var r=o(e,n),t=[],i=[],u=r.length;if(!(2>u)){for(var a=0;u>a;a++){var s=g(r[a]);t.push(s.coordinates),s.time&&i.push(s.time)}return{line:t,times:i}}}function r(e){for(var r,t=o(e,"trkseg"),i=[],a=[],s=0;s<t.length;s++)r=n(t[s],"trkpt"),r.line&&i.push(r.line),r.times.length&&a.push(r.times);if(0!==i.length){var f=u(e);return a.length&&(f.coordTimes=1===i.length?a[0]:a),{type:"Feature",properties:f,geometry:{type:1===i.length?"LineString":"MultiLineString",coordinates:1===i.length?i[0]:i}}}}function t(e){var r=n(e,"rtept");if(r){var t={type:"Feature",properties:u(e),geometry:{type:"LineString",coordinates:r}};return r.times.length&&(t.geometry.times=r.times),t}}function i(e){var n=u(e);return n.sym=l(a(e,"sym")),{type:"Feature",properties:n,geometry:{type:"Point",coordinates:g(e).coordinates}}}function u(e){var n,r=["name","desc","author","copyright","link","time","keywords"],t={};for(n=0;n<r.length;n++)t[r[n]]=l(a(e,r[n]));return c(t)}var s,f,p=o(e,"trk"),d=o(e,"rte"),v=o(e,"wpt"),m=h();for(s=0;s<p.length;s++)f=r(p[s]),f&&m.features.push(f);for(s=0;s<d.length;s++)f=t(d[s]),f&&m.features.push(f);for(s=0;s<v.length;s++)m.features.push(i(v[s]));return m}};return L}(),"undefined"!=typeof n&&(n.exports=toGeoJSON)}).call(this,e("_process"))},{_process:4,xmldom:3}],11:[function(r,t){!function(){function r(e,n){function r(n){var r,t=e.arcs[0>n?~n:n],o=t[0];return e.transform?(r=[0,0],t.forEach(function(e){r[0]+=e[0],r[1]+=e[1]})):r=t[t.length-1],0>n?[r,o]:[o,r]}function t(e,n){for(var r in e){var t=e[r];delete n[t.start],delete t.start,delete t.end,t.forEach(function(e){o[0>e?~e:e]=1}),a.push(t)}}var o={},i={},u={},a=[],s=-1;return n.forEach(function(r,t){var o,i=e.arcs[0>r?~r:r];i.length<3&&!i[1][0]&&!i[1][1]&&(o=n[++s],n[s]=r,n[t]=o)}),n.forEach(function(e){var n,t,o=r(e),a=o[0],s=o[1];if(n=u[a])if(delete u[n.end],n.push(e),n.end=s,t=i[s]){delete i[t.start];var f=t===n?n:n.concat(t);i[f.start=n.start]=u[f.end=t.end]=f}else i[n.start]=u[n.end]=n;else if(n=i[s])if(delete i[n.start],n.unshift(e),n.start=a,t=u[a]){delete u[t.end];var c=t===n?n:t.concat(n);i[c.start=t.start]=u[c.end=n.end]=c}else i[n.start]=u[n.end]=n;else n=[e],i[n.start=a]=u[n.end=s]=n}),t(u,i),t(i,u),n.forEach(function(e){o[0>e?~e:e]||a.push([e])}),a}function o(e,n,t){function o(e){var n=0>e?~e:e;(c[n]||(c[n]=[])).push({i:e,g:f})}function i(e){e.forEach(o)}function u(e){e.forEach(i)}function a(e){"GeometryCollection"===e.type?e.geometries.forEach(a):e.type in l&&(f=e,l[e.type](e.arcs))}var s=[];if(arguments.length>1){var f,c=[],l={LineString:i,MultiLineString:u,Polygon:u,MultiPolygon:function(e){e.forEach(u)}};a(n),c.forEach(arguments.length<3?function(e){s.push(e[0].i)}:function(e){t(e[0].g,e[e.length-1].g)&&s.push(e[0].i)})}else for(var p=0,d=e.arcs.length;d>p;++p)s.push(p);return{type:"MultiLineString",arcs:r(e,s)}}function i(e,t){function o(e){e.forEach(function(n){n.forEach(function(n){(u[n=0>n?~n:n]||(u[n]=[])).push(e)})}),a.push(e)}function i(n){return d(s(e,{type:"Polygon",arcs:[n]}).coordinates[0])>0}var u={},a=[],f=[];return t.forEach(function(e){"Polygon"===e.type?o(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(o)}),a.forEach(function(e){if(!e._){var n=[],r=[e];for(e._=1,f.push(n);e=r.pop();)n.push(e),e.forEach(function(e){e.forEach(function(e){u[0>e?~e:e].forEach(function(e){e._||(e._=1,r.push(e))})})})}}),a.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:f.map(function(t){var o=[];if(t.forEach(function(e){e.forEach(function(e){e.forEach(function(e){u[0>e?~e:e].length<2&&o.push(e)})})}),o=r(e,o),(n=o.length)>1)for(var a,s=i(t[0][0]),f=0;f<n;++f)if(s===i(o[f])){a=o[0],o[0]=o[f],o[f]=a;break}return o})}}function u(e,n){return"GeometryCollection"===n.type?{type:"FeatureCollection",features:n.geometries.map(function(n){return a(e,n)})}:a(e,n)}function a(e,n){var r={type:"Feature",id:n.id,properties:n.properties||{},geometry:s(e,n)};return null==n.id&&delete r.id,r}function s(e,n){function r(e,n){n.length&&n.pop();for(var r,t=c[0>e?~e:e],o=0,i=t.length;i>o;++o)n.push(r=t[o].slice()),s(r,o);0>e&&f(n,i)}function t(e){return e=e.slice(),s(e,0),e}function o(e){for(var n=[],t=0,o=e.length;o>t;++t)r(e[t],n);return n.length<2&&n.push(n[0].slice()),n}function i(e){for(var n=o(e);n.length<4;)n.push(n[0].slice());return n}function u(e){return e.map(i)}function a(e){var n=e.type;return"GeometryCollection"===n?{type:n,geometries:e.geometries.map(a)}:n in l?{type:n,coordinates:l[n](e)}:null}var s=m(e.transform),c=e.arcs,l={Point:function(e){return t(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(t)},LineString:function(e){return o(e.arcs)},MultiLineString:function(e){return e.arcs.map(o)},Polygon:function(e){return u(e.arcs)},MultiPolygon:function(e){return e.arcs.map(u)}};return a(n)}function f(e,n){for(var r,t=e.length,o=t-n;o<--t;)r=e[o],e[o++]=e[t],e[t]=r}function c(e,n){for(var r=0,t=e.length;t>r;){var o=r+t>>>1;e[o]<n?r=o+1:t=o}return r}function l(e){function n(e,n){e.forEach(function(e){0>e&&(e=~e);var r=o[e];r?r.push(n):o[e]=[n]})}function r(e,r){e.forEach(function(e){n(e,r)})}function t(e,n){"GeometryCollection"===e.type?e.geometries.forEach(function(e){t(e,n)}):e.type in u&&u[e.type](e.arcs,n)}var o={},i=e.map(function(){return[]}),u={LineString:n,MultiLineString:r,Polygon:r,MultiPolygon:function(e,n){e.forEach(function(e){r(e,n)})}};e.forEach(t);for(var a in o)for(var s=o[a],f=s.length,l=0;f>l;++l)for(var p=l+1;f>p;++p){var d,g=s[l],h=s[p];(d=i[g])[a=c(d,h)]!==h&&d.splice(a,0,h),(d=i[h])[a=c(d,g)]!==g&&d.splice(a,0,g)}return i}function p(e,n){function r(e){u.remove(e),e[1][2]=n(e),u.push(e)}var t,o=m(e.transform),i=y(e.transform),u=v(),a=0;for(n||(n=g),e.arcs.forEach(function(e){var r=[];e.forEach(o);for(var i=1,a=e.length-1;a>i;++i)t=e.slice(i-1,i+2),t[1][2]=n(t),r.push(t),u.push(t);e[0][2]=e[a][2]=1/0;for(var i=0,a=r.length;a>i;++i)t=r[i],t.previous=r[i-1],t.next=r[i+1]});t=u.pop();){var s=t.previous,f=t.next;t[1][2]<a?t[1][2]=a:a=t[1][2],s&&(s.next=f,s[2]=t[2],r(s)),f&&(f.previous=s,f[0]=t[0],r(f))}return e.arcs.forEach(function(e){e.forEach(i)}),e}function d(e){for(var n,r=-1,t=e.length,o=e[t-1],i=0;++r<t;)n=o,o=e[r],i+=n[0]*o[1]-n[1]*o[0];return.5*i}function g(e){var n=e[0],r=e[1],t=e[2];return Math.abs((n[0]-t[0])*(r[1]-n[1])-(n[0]-r[0])*(t[1]-n[1]))}function h(e,n){return e[1][2]-n[1][2]}function v(){function e(e,n){for(;n>0;){var r=(n+1>>1)-1,o=t[r];if(h(e,o)>=0)break;t[o._=n]=o,t[e._=n=r]=e}}function n(e,n){for(;;){var r=n+1<<1,i=r-1,u=n,a=t[u];if(o>i&&h(t[i],a)<0&&(a=t[u=i]),o>r&&h(t[r],a)<0&&(a=t[u=r]),u===n)break;t[a._=n]=a,t[e._=n=u]=e}}var r={},t=[],o=0;return r.push=function(n){return e(t[n._=o]=n,o++),o},r.pop=function(){if(!(0>=o)){var e,r=t[0];return--o>0&&(e=t[o],n(t[e._=0]=e,0)),r}},r.remove=function(r){var i,u=r._;if(t[u]===r)return u!==--o&&(i=t[o],(h(i,r)<0?e:n)(t[i._=u]=i,u)),u},r}function m(e){if(!e)return w;var n,r,t=e.scale[0],o=e.scale[1],i=e.translate[0],u=e.translate[1];return function(e,a){a||(n=r=0),e[0]=(n+=e[0])*t+i,e[1]=(r+=e[1])*o+u}}function y(e){if(!e)return w;var n,r,t=e.scale[0],o=e.scale[1],i=e.translate[0],u=e.translate[1];return function(e,a){a||(n=r=0);var s=(e[0]-i)/t|0,f=(e[1]-u)/o|0;e[0]=s-n,e[1]=f-r,n=s,r=f}}function w(){}var x={version:"1.6.8",mesh:function(e){return s(e,o.apply(this,arguments))},meshArcs:o,merge:function(e){return s(e,i.apply(this,arguments))},mergeArcs:i,feature:u,neighbors:l,presimplify:p};"function"==typeof e&&e.amd?e(x):"object"==typeof t&&t.exports?t.exports=x:this.topojson=x}()},{}],12:[function(e,n){function r(e){function n(n){var r=e.substring(m).match(n);return r?(m+=r[0].length,r[0]):null}function r(e){return e&&v.match(/\d+/)&&(e.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+v}}),e}function t(){n(/^\s*/)}function i(){t();for(var e,r=0,i=[],u=[i],a=i;e=n(/^(\()/)||n(/^(\))/)||n(/^(\,)/)||n(o);){if("("==e)u.push(a),a=[],u[u.length-1].push(a),r++;else if(")"==e){if(a=u.pop(),!a)return;if(r--,0===r)break}else if(","===e)a=[],u[u.length-1].push(a);else{if(isNaN(parseFloat(e)))return null;a.push(parseFloat(e))}t()}return 0!==r?null:i}function u(){for(var e,r,i=[];r=n(o)||n(/^(\,)/);)","==r?(i.push(e),e=[]):(e||(e=[]),e.push(parseFloat(r))),t();return e&&i.push(e),i.length?i:null}function a(){if(!n(/^(point)/i))return null;if(t(),!n(/^(\()/))return null;var e=u();return e?(t(),n(/^(\))/)?{type:"Point",coordinates:e[0]}:null):null}function s(){if(!n(/^(multipoint)/i))return null;t();var e=i();return e?(t(),{type:"MultiPoint",coordinates:e}):null}function f(){if(!n(/^(multilinestring)/i))return null;t();var e=i();return e?(t(),{type:"MultiLineString",coordinates:e}):null}function c(){if(!n(/^(linestring)/i))return null;if(t(),!n(/^(\()/))return null;var e=u();return e&&n(/^(\))/)?{type:"LineString",coordinates:e}:null}function l(){return n(/^(polygon)/i)?(t(),{type:"Polygon",coordinates:i()}):null}function p(){return n(/^(multipolygon)/i)?(t(),{type:"MultiPolygon",coordinates:i()}):null}function d(){var e,r=[];if(!n(/^(geometrycollection)/i))return null;if(t(),!n(/^(\()/))return null;for(;e=g();)r.push(e),t(),n(/^(\,)/),t();return n(/^(\))/)?{type:"GeometryCollection",geometries:r}:null}function g(){return a()||c()||l()||s()||f()||p()||d()}var h=e.split(";"),e=h.pop(),v=(h.shift()||"").split("=").pop(),m=0;return r(g())}function t(e){function n(e){return 2===e.length?e[0]+" "+e[1]:3===e.length?e[0]+" "+e[1]+" "+e[2]:void 0}function r(e){return e.map(n).join(", ")}function o(e){return e.map(r).map(u).join(", ")}function i(e){return e.map(o).map(u).join(", ")}function u(e){return"("+e+")"}switch("Feature"===e.type&&(e=e.geometry),e.type){case"Point":return"POINT ("+n(e.coordinates)+")";case"LineString":return"LINESTRING ("+r(e.coordinates)+")";case"Polygon":return"POLYGON ("+o(e.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+r(e.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+i(e.coordinates)+")";case"MultiLineString":return"MULTILINESTRING ("+o(e.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+e.geometries.map(t).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}}n.exports=r,n.exports.parse=r,n.exports.stringify=t;var o=/^[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/},{}]},{},[1])(1)});
 
 
 
 
 
mappress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Maps for WordPress
4
  Plugin URI: https://www.mappresspro.com
5
  Author URI: https://www.mappresspro.com
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
- Version: 2.75.5
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Scott DeJonge for his wonderful icons
@@ -37,7 +37,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
37
  }
38
 
39
  class Mappress {
40
- const VERSION = '2.75.5';
41
 
42
  static
43
  $baseurl,
@@ -484,52 +484,56 @@ class Mappress {
484
  if (self::$pro && !trim(self::$options->license) && (!is_multisite() || (is_super_admin() && is_main_site())))
485
  self::$notices['nolicense'] = array('warning', __('Please enter your MapPress license key to enable plugin updates', 'mappress-google-maps-for-wordpress'));
486
 
487
- // WP minimum version
488
  if (self::VERSION >= '2.55' && version_compare(get_bloginfo('version'),'5.3', '<') )
489
  self::$notices['255_min_version'] = array('error', __('MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.', 'mappress-google-maps-for-wordpress'));
490
 
491
- // New features
492
  if ($current_version && $current_version < '2.55' && self::VERSION >= '2.55')
493
  self::$notices['255_whats_new'] = array('info', sprintf(__('MapPress has many new features! %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
494
 
495
- // New popup templates
496
  if ($current_version && $current_version < '2.60' && self::VERSION >= '2.60')
497
- self::$notices['260_whats_new'] = array('warning', sprintf(__('MapPress popup templates have changed! Please update custom templates to the new format. %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
498
-
499
- if ($current_version && $current_version < '2.63' && self::VERSION >= '2.63') {
500
- // New list templates
501
- self::$notices['263_whats_new'] = array('warning', sprintf(__('MapPress templates and filters have changed. Please update custom templates and filters. %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
 
 
 
 
 
 
 
 
502
 
503
- // Convert filters to array
504
- if (self::$options->filter) {
505
- self::$options->filters = array(array('key' => self::$options->filter));
506
- self::$options->save();
 
 
 
 
 
 
 
 
 
 
 
507
  }
508
 
509
- // Convert styles to indexed arrays
510
- if (self::$options->styles && is_array(self::$options->styles)) {
511
- self::$options->stylesGoogle = array();
512
- self::$options->stylesMapbox = array();
513
- foreach(self::$options->styles as $name => $json)
514
- self::$options->stylesGoogle[] = array('id' => $name, 'name' => $name, 'url' => null, 'json' => $json, 'imageUrl' => self::$baseurl . '/images/roadmap.png');
515
- foreach(self::$options->mapboxStyles as $name => $url) {
516
- $parts = explode('?', strtolower($url));
517
- $short_url = str_ireplace(array('.html', 'https://api.mapbox.com/styles/v1/', 'mapbox://styles/'), '', $parts[0]);
518
- $parts = explode('/', $short_url);
519
- if (count($parts) == 2)
520
- self::$options->stylesMapbox[] = array('url' => $url, 'provider' => 'mapbox', 'user' => $parts[0], 'id' => $name, 'mapboxid' => $parts[1], 'name' => $name);
521
  }
522
  self::$options->save();
523
  }
524
- }
525
 
526
- // 2.73 Add a type to all filters
527
- if ($current_version && $current_version < '2.73') {
528
- foreach(self::$options->filters as &$filter) {
529
- if (empty($filter['type']))
530
- $filter['type'] = 'tax';
531
- }
532
- self::$options->save();
533
  }
534
 
535
  update_option('mappress_version', self::VERSION);
@@ -639,9 +643,9 @@ class Mappress {
639
  $l10n['options']['standardStyles'] = $styles;
640
 
641
  // Global settings
642
- $options = array('alignment', 'clustering', 'clusteringOptions', 'country', 'defaultIcon', 'directions', 'directionsServer',
643
  'engine', 'filters', 'filtersPos', 'geocoder', 'highlight', 'highlightIcon', 'iconScale', 'initialOpenInfo', 'layout', 'lines', 'lineOpts',
644
- 'mashupClick', 'mini', 'poiList', 'poiListOpen', 'poiListPageSize', 'poiZoom', 'radius', 'scrollWheel', 'search', 'searchBox', 'size', 'sizes', 'style', 'thumbs', 'thumbsList', 'thumbsPopup', 'tooltips', 'userLocation');
645
 
646
  foreach($options as $option) {
647
  if (isset(self::$options->$option)) {
@@ -736,7 +740,9 @@ class Mappress {
736
  $deps[] = (self::$options->engine == 'leaflet') ? 'mappress-leaflet-markercluster' : 'mappress-markerclustererplus';
737
 
738
  wp_register_script('mappress', $js . "/index_mappress.js", $deps, self::$version, $footer);
739
- wp_register_script('mappress_admin', $js . "/index_mappress_admin.js", array('mappress', 'jquery-ui-position', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-notices', 'wp-url', 'wp-core-data', 'wp-i18n'), self::$version, $footer);
 
 
740
 
741
  // I18N
742
  if (function_exists('wp_set_script_translations')) {
4
  Plugin URI: https://www.mappresspro.com
5
  Author URI: https://www.mappresspro.com
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
+ Version: 2.76
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Scott DeJonge for his wonderful icons
37
  }
38
 
39
  class Mappress {
40
+ const VERSION = '2.76';
41
 
42
  static
43
  $baseurl,
484
  if (self::$pro && !trim(self::$options->license) && (!is_multisite() || (is_super_admin() && is_main_site())))
485
  self::$notices['nolicense'] = array('warning', __('Please enter your MapPress license key to enable plugin updates', 'mappress-google-maps-for-wordpress'));
486
 
 
487
  if (self::VERSION >= '2.55' && version_compare(get_bloginfo('version'),'5.3', '<') )
488
  self::$notices['255_min_version'] = array('error', __('MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.', 'mappress-google-maps-for-wordpress'));
489
 
 
490
  if ($current_version && $current_version < '2.55' && self::VERSION >= '2.55')
491
  self::$notices['255_whats_new'] = array('info', sprintf(__('MapPress has many new features! %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
492
 
 
493
  if ($current_version && $current_version < '2.60' && self::VERSION >= '2.60')
494
+ self::$notices['260_whats_new'] = array('warning', sprintf(__('MapPress templates have changed! Please update custom templates to the new format. %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
495
+
496
+ // Upgrades
497
+ if ($current_version) {
498
+ if (version_compare($current_version, '2.63', '<')) {
499
+ // New list templates
500
+ self::$notices['263_whats_new'] = array('warning', sprintf(__('MapPress templates and filters have changed. Please update custom templates and filters. %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
501
+
502
+ // Convert filters to array
503
+ if (self::$options->filter) {
504
+ self::$options->filters = array(array('key' => self::$options->filter));
505
+ self::$options->save();
506
+ }
507
 
508
+ // Convert styles to indexed arrays
509
+ if (self::$options->styles && is_array(self::$options->styles)) {
510
+ self::$options->stylesGoogle = array();
511
+ self::$options->stylesMapbox = array();
512
+ foreach(self::$options->styles as $name => $json)
513
+ self::$options->stylesGoogle[] = array('id' => $name, 'name' => $name, 'url' => null, 'json' => $json, 'imageUrl' => self::$baseurl . '/images/roadmap.png');
514
+ foreach(self::$options->mapboxStyles as $name => $url) {
515
+ $parts = explode('?', strtolower($url));
516
+ $short_url = str_ireplace(array('.html', 'https://api.mapbox.com/styles/v1/', 'mapbox://styles/'), '', $parts[0]);
517
+ $parts = explode('/', $short_url);
518
+ if (count($parts) == 2)
519
+ self::$options->stylesMapbox[] = array('url' => $url, 'provider' => 'mapbox', 'user' => $parts[0], 'id' => $name, 'mapboxid' => $parts[1], 'name' => $name);
520
+ }
521
+ self::$options->save();
522
+ }
523
  }
524
 
525
+ // 2.73 Add a type to all filters
526
+ if (version_compare($current_version, '2.73', '<')) {
527
+ foreach(self::$options->filters as &$filter) {
528
+ if (empty($filter['type']))
529
+ $filter['type'] = 'tax';
 
 
 
 
 
 
 
530
  }
531
  self::$options->save();
532
  }
 
533
 
534
+ // 2.76 New templates
535
+ if (version_compare($current_version, '2.76', '<'))
536
+ self::$notices['276_whats_new'] = array('warning', sprintf(__('MapPress templates have changed! Please update custom templates to the new format. %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
 
 
 
 
537
  }
538
 
539
  update_option('mappress_version', self::VERSION);
643
  $l10n['options']['standardStyles'] = $styles;
644
 
645
  // Global settings
646
+ $options = array('alignment', 'clustering', 'clusteringOptions', 'country', 'defaultIcon', 'directions', 'directionsPopup', 'directionsServer',
647
  'engine', 'filters', 'filtersPos', 'geocoder', 'highlight', 'highlightIcon', 'iconScale', 'initialOpenInfo', 'layout', 'lines', 'lineOpts',
648
+ 'mashupClick', 'mini', 'poiList', 'poiListOpen', 'poiListPageSize', 'poiZoom', 'radius', 'scrollWheel', 'search', 'searchBox', 'size', 'sizes', 'style', 'thumbHeight', 'thumbWidth', 'thumbs', 'thumbsList', 'thumbsPopup', 'tooltips', 'userLocation');
649
 
650
  foreach($options as $option) {
651
  if (isset(self::$options->$option)) {
740
  $deps[] = (self::$options->engine == 'leaflet') ? 'mappress-leaflet-markercluster' : 'mappress-markerclustererplus';
741
 
742
  wp_register_script('mappress', $js . "/index_mappress.js", $deps, self::$version, $footer);
743
+
744
+ $admin_deps = array('mappress', 'jquery-ui-position', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-element', 'wp-media-utils', 'wp-i18n', 'wp-notices', 'wp-url');
745
+ wp_register_script('mappress_admin', $js . "/index_mappress_admin.js", $admin_deps, self::$version, $footer);
746
 
747
  // I18N
748
  if (function_exists('wp_set_script_translations')) {
mappress_map.php CHANGED
@@ -135,6 +135,13 @@ class Mappress_Map extends Mappress_Obj {
135
  ob_start();
136
  $mapid = (isset($_GET['mapid'])) ? $_GET['mapid'] : null;
137
  $map = ($mapid) ? self::get($mapid) : null;
 
 
 
 
 
 
 
138
  if (!$map)
139
  Mappress::ajax_response(sprintf(__('Map not found', 'mappress-google-maps-for-wordpress'), $mapid));
140
  else
@@ -500,12 +507,15 @@ class Mappress_Map extends Mappress_Obj {
500
  // Oembeds
501
  $poi->body = $wp_embed->autoembed($poi->body);
502
 
503
- // Embed shortcodes ([embed], etc):
504
- $poi->body = $wp_embed->run_shortcode($poi->body);
505
  }
506
 
507
- // Autoicons
508
  $this->autoicons();
 
 
 
509
  }
510
 
511
  function save() {
135
  ob_start();
136
  $mapid = (isset($_GET['mapid'])) ? $_GET['mapid'] : null;
137
  $map = ($mapid) ? self::get($mapid) : null;
138
+
139
+ // Update existing images for editor
140
+ if ($map) {
141
+ foreach($map->pois as $poi)
142
+ $poi->update_images();
143
+ }
144
+
145
  if (!$map)
146
  Mappress::ajax_response(sprintf(__('Map not found', 'mappress-google-maps-for-wordpress'), $mapid));
147
  else
507
  // Oembeds
508
  $poi->body = $wp_embed->autoembed($poi->body);
509
 
510
+ // Update image URLs
511
+ $poi->update_images();
512
  }
513
 
514
+ // Autoicons & sort
515
  $this->autoicons();
516
+
517
+ if (Mappress::$options->sort && !isset($this->query['orderby']))
518
+ $this->sort_pois();
519
  }
520
 
521
  function save() {
mappress_poi.php CHANGED
@@ -4,6 +4,7 @@ class Mappress_Poi extends Mappress_Obj {
4
  $body = '',
5
  $correctedAddress,
6
  $iconid,
 
7
  $kml,
8
  $point = array('lat' => 0, 'lng' => 0),
9
  $poly,
@@ -16,7 +17,7 @@ class Mappress_Poi extends Mappress_Obj {
16
  $viewport; // array('sw' => array('lat' => 0, 'lng' => 0), 'ne' => array('lat' => 0, 'lng' => 0))
17
 
18
  function __sleep() {
19
- return array('address', 'body', 'correctedAddress', 'iconid', 'point', 'poly', 'kml', 'title', 'type', 'viewport');
20
  }
21
 
22
  function __construct($atts = '') {
@@ -79,16 +80,61 @@ class Mappress_Poi extends Mappress_Obj {
79
  return apply_filters('mappress_poi_excerpt', $excerpt, $raw);
80
  }
81
 
82
- /**
83
- * Get thumbnails if needed. If dimensions are specified, size 'medium-large' is used to allow scaling w/o pixellation
84
- *
85
- * @param mixed $post
86
- */
87
- function get_thumbnail($post) {
88
- $force_size = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight);
89
- $size = (Mappress::$options->thumbSize && !$force_size) ? Mappress::$options->thumbSize : 'medium_large';
90
- $style = ($force_size) ? sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
91
- return get_the_post_thumbnail($post, $size, array('style' => $style)); // Slow due to get_post_thumbnail_id()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
  }
94
  ?>
4
  $body = '',
5
  $correctedAddress,
6
  $iconid,
7
+ $images,
8
  $kml,
9
  $point = array('lat' => 0, 'lng' => 0),
10
  $poly,
17
  $viewport; // array('sw' => array('lat' => 0, 'lng' => 0), 'ne' => array('lat' => 0, 'lng' => 0))
18
 
19
  function __sleep() {
20
+ return array('address', 'body', 'correctedAddress', 'iconid', 'images', 'point', 'poly', 'kml', 'title', 'type', 'viewport');
21
  }
22
 
23
  function __construct($atts = '') {
80
  return apply_filters('mappress_poi_excerpt', $excerpt, $raw);
81
  }
82
 
83
+ // Update image details, picks up current thumbnail settings and and changed URLs
84
+ function update_images($size = null) {
85
+ if (!$this->images)
86
+ return;
87
+
88
+ $force_size = null;
89
+
90
+ if (!$size) {
91
+ $force_size = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight) ? array(Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
92
+ if ($force_size) {
93
+ $size = $force_size;
94
+ } else if (Mappress::$options->thumbSize) {
95
+ $size = Mappress::$options->thumbSize;
96
+ } else {
97
+ $size = 'thumbnail';
98
+ }
99
+ }
100
+
101
+ // Let wp_get_attachment_image_src pick the best-sized image
102
+ foreach($this->images as $i => $image) {
103
+ $image = (object) $image;
104
+
105
+ $type = (isset($image->type)) ? $image->type : '';
106
+ switch($type) {
107
+ case 'avatar' :
108
+ $image->html = get_avatar($image->id, '100');
109
+ $this->images[$i] = $image;
110
+ break;
111
+
112
+ case 'embed' :
113
+ // Limit embed to selected thumbnail dimensions
114
+ $all_sizes = wp_get_registered_image_subsizes();
115
+ if ($force_size) {
116
+ $dims = array('width' => $force_size[0], 'height' => $force_size[1]);
117
+ } else {
118
+ $sizes = wp_get_registered_image_subsizes();
119
+ $dims = (isset($sizes[$size])) ? $sizes[$size] : null;
120
+ }
121
+ $html = wp_oembed_get($image->url, $dims);
122
+ $image->html = $html;
123
+ $this->images[$i] = $image;
124
+ break;
125
+
126
+ case 'image' :
127
+ default :
128
+ // For fixed size, WP will only return a smaller image if the aspect ratio matches exactly, otherwise it returns the original (full size)
129
+ $source = wp_get_attachment_image_src($image->id, $size);
130
+ if ($source)
131
+ $image = (object) array('id' => $image->id, 'url' => $source[0], 'size' => ($force_size) ? array($size[0], $size[1]) : array($source[1], $source[2]));
132
+ else
133
+ unset($this->images[$i]);
134
+ $this->images[$i] = $image;
135
+ break;
136
+ }
137
+ }
138
  }
139
  }
140
  ?>
mappress_settings.php CHANGED
@@ -17,6 +17,7 @@ class Mappress_Options extends Mappress_Obj {
17
  $defaultIcon,
18
  $deregister = true,
19
  $directions = 'google',
 
20
  $directionsServer = 'https://maps.google.com',
21
  $engine = 'leaflet',
22
  $filter, // deprecated
@@ -41,7 +42,7 @@ class Mappress_Options extends Mappress_Obj {
41
  $mashupKml,
42
  $metaKeys = array(),
43
  $metaSyncSave = true,
44
- $mini = 400,
45
  $poiList = true,
46
  $poiListPageSize = 20,
47
  $poiListOpen = true,
17
  $defaultIcon,
18
  $deregister = true,
19
  $directions = 'google',
20
+ $directionsPopup = true,
21
  $directionsServer = 'https://maps.google.com',
22
  $engine = 'leaflet',
23
  $filter, // deprecated
42
  $mashupKml,
43
  $metaKeys = array(),
44
  $metaSyncSave = true,
45
+ $mini = 550,
46
  $poiList = true,
47
  $poiListPageSize = 20,
48
  $poiListOpen = true,
mappress_template.php CHANGED
@@ -72,6 +72,7 @@ class Mappress_Template extends Mappress_Obj {
72
  if (strpos($standard_path, realpath(Mappress::$basedir)) !== 0)
73
  Mappress::ajax_response('Invalid template path');
74
 
 
75
  $standard = (file_exists($standard_path)) ? file_get_contents($standard_path) : null;
76
 
77
  if (!$standard)
72
  if (strpos($standard_path, realpath(Mappress::$basedir)) !== 0)
73
  Mappress::ajax_response('Invalid template path');
74
 
75
+ // Can require file instead of file_get_contents if eval is needed for i18n
76
  $standard = (file_exists($standard_path)) ? file_get_contents($standard_path) : null;
77
 
78
  if (!$standard)
mappress_wpml.php CHANGED
@@ -2,24 +2,30 @@
2
  class Mappress_WPML {
3
  static function register() {
4
  if (Mappress::$options->wpml)
5
- add_action('icl_make_duplicate', array(__CLASS__, 'icl_make_duplicate'), 1, 4);
6
  }
7
 
8
  // WPML Duplicate
9
- // Note: icl_copy_from_original doesn't refresh the page, so is not suitable for maps
10
- static function icl_make_duplicate($src_postid, $lang, $post, $postid) {
11
- $updated = false;
 
 
 
 
12
 
13
- if (!$src_postid || !$postid)
14
- return;
 
 
15
 
16
  // Trash any existing maps in target post
17
- $mapids = Mappress_Map::get_list($postid, 'ids');
18
  foreach($mapids as $mapid)
19
  Mappress_Map::mutate($mapid, array('status' => 'trashed'));
20
 
21
  // Copy maps
22
- $maps = Mappress_Map::get_list($src_postid);
23
  $converted = array();
24
  foreach($maps as $map) {
25
  $src_mapid = $map->mapid;
2
  class Mappress_WPML {
3
  static function register() {
4
  if (Mappress::$options->wpml)
5
+ add_action('wpml_pro_translation_completed', array(__CLASS__, 'copy_maps'), 1, 3);
6
  }
7
 
8
  // WPML Duplicate
9
+ static function copy_maps($new_post_id, $fields, $job) {
10
+
11
+ $src_postid = $job->original_doc_id;
12
+ $postid = $new_post_id;
13
+
14
+ $lang = apply_filters( 'wpml_post_language_details', NULL, $postid);
15
+ $lang = $lang['language_code'];
16
 
17
+ $post = get_post($postid);
18
+ $post = (array)$post;
19
+
20
+ $updated = false;
21
 
22
  // Trash any existing maps in target post
23
+ $mapids = Mappress_Map::get_list('post', $postid, 'ids');
24
  foreach($mapids as $mapid)
25
  Mappress_Map::mutate($mapid, array('status' => 'trashed'));
26
 
27
  // Copy maps
28
+ $maps = Mappress_Map::get_list('post', $src_postid);
29
  $converted = array();
30
  foreach($maps as $map) {
31
  $src_mapid = $map->mapid;
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.9
8
- Stable tag: 2.75.5
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interactive Google and Leaflet maps to WordPress.
@@ -89,6 +89,14 @@ Please see the plugin documentation pages:
89
 
90
  == Changelog ==
91
 
 
 
 
 
 
 
 
 
92
  = 2.75.5 =
93
  * Fixed: geocoding errors written to posts with no custom fields
94
  * Fixed: thumbnails not displaying properly in list
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.9
8
+ Stable tag: 2.76
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interactive Google and Leaflet maps to WordPress.
89
 
90
  == Changelog ==
91
 
92
+ = 2.76 =
93
+ * Added: images can now be attached to POIs
94
+ * Added: if multiple images exist, an image gallery is displayed in the map list and popups
95
+ * Fixed: KML overlays were not displaying properly
96
+
97
+ = 2.75.6 =
98
+ * Fixed: error when dragging Leaflet markers
99
+
100
  = 2.75.5 =
101
  * Fixed: geocoding errors written to posts with no custom fields
102
  * Fixed: thumbnails not displaying properly in list
templates/map-item.php CHANGED
@@ -1,4 +1,2 @@
1
- <div class="mapp-info">
2
- <img class="mapp-icon" src="{{{poi.icon}}}">
3
- <div class="mapp-title">{{{poi.title}}}</div>
4
- </div>
1
+ <img class="mapp-icon" src="{{{poi.icon}}}">
2
+ <div class="mapp-title">{{{poi.title}}}</div>
 
 
templates/map-popup.php CHANGED
@@ -1,7 +1,2 @@
1
- <div class='mapp-info'>
2
- <div class='mapp-title'>{{{poi.title}}}</div>
3
- <div class='mapp-body'>{{{poi.body}}}</div>
4
- <div class='mapp-links'>
5
- <div class='mapp-dir' data-mapp-action='dir'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></div>
6
- </div>
7
- </div>
1
+ <div class='mapp-title'>{{{poi.title}}}</div>
2
+ <div class='mapp-body'>{{{poi.body}}}</div>
 
 
 
 
 
templates/mashup-item.php CHANGED
@@ -1,5 +1,2 @@
1
- <div class="mapp-info">
2
- <img class="mapp-icon" src="{{{poi.icon}}}">
3
- <div class="mapp-title">{{{poi.title}}}</div>
4
- </div>
5
- <div class='mapp-thumbnail'>{{{poi.thumbnail}}}</div>
1
+ <img class="mapp-icon" src="{{{poi.icon}}}">
2
+ <div class="mapp-title">{{{poi.title}}}</div>
 
 
 
templates/mashup-popup.php CHANGED
@@ -1,8 +1,2 @@
1
- <div class='mapp-thumbnail'><a href='{{{poi.url}}}' target='_blank'>{{{poi.thumbnail}}}</a></div>
2
- <div class='mapp-info'>
3
- <div class='mapp-title'><a href='{{{poi.url}}}' target='_blank'>{{{poi.title}}}</a></div>
4
- <div class='mapp-body'>{{{poi.body}}}</div>
5
- <div class='mapp-links'>
6
- <div class='mapp-dir' data-mapp-action='dir'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></div>
7
- </div>
8
- </div>
1
+ <div class='mapp-title'><a href='{{{poi.url}}}' target='_blank'>{{{poi.title}}}</a></div>
2
+ <div class='mapp-body'>{{{poi.body}}}</div>
 
 
 
 
 
 
templates/user-mashup-item.php ADDED
@@ -0,0 +1 @@
 
1
+ <div class="mapp-title">{{{poi.name}}}</div>
templates/user-mashup-popup.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class='mapp-title'>{{{poi.name}}}</div>
2
+ <div class='mapp-body'>
3
+ <div>{{{poi.address}}}</div>
4
+ <div><a href='mailto://{{{poi.email}}}' target='_blank'>{{{poi.email}}}</a></div>
5
+ </div>