MapPress Easy Google Maps - Version 2.69.8

Version Description

  • Added: improve license checking on settings screen
Download this release

Release Info

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

Code changes from version 2.69.7 to 2.69.8

build/index_mappress.js CHANGED
@@ -1 +1 @@
1
- (()=>{var t={854:()=>{var t,e=window.mapp||{},__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};t=jQuery,e.Map=function(t,e){this.defaults={alignment:null,center:null,classname:null,editable:null,embed:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:null,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.hovered=null,this.iw=null,this.mapdata=t,this.opened=null,this.places=null,this.selected=null,this.settings=e||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.modal_=null,this.pagination_={count:0,page:1,pageSize:30},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},e.Map.prototype={display:function(){var i=this;this.render(),this.div&&this.div.layout&&(this.sanity(),this.editable?this.templates={loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?this.templates={loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,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&&("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.setMapTypeId(this.mapTypeId),this.clustering(),"postmodal"==mappl10n.options.mashupClick&&(this.modal_=new e.lib.Modal),this.places=new e.Places(t(".mapp-places",this.div.search),{map:i}),this.addUserLocation(),this.editable&&this.places.sel.focus(),t(this.places).on("search.mapp",(function(t,e){i.search(e)})),this.addEvents("click dragstart zoom_changed zoomstart",(function(t){"leaflet"==mappl10n.options.engine&&"click"==t.type&&t.originalEvent&&!t.originalEvent.target.matches(".mapp-canvas")||i.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(function(e){var o=t(this).attr("data-mapp-action");e.preventDefault(),i.action(o,t(this).attr("data-mapp-"+o),t(this))})),this.div.list.on("click","[data-mapp-action]",(function(e){var o=t(this).attr("data-mapp-action");e.preventDefault(),e.stopPropagation(),i.action(o,t(this).attr("data-mapp-"+o),t(this))})),this.div.filters.on("change",(function(){i.ajaxQuery()})),t(window).on("resize",(function(){i.toggleView("mini"),i.poiClose(),i.resize()})),e.event.addListener(i.map_,"maptypeid_changed baselayerchange",(function(){i.set({dirty:!0})})),this.places.parse(this.center,(function(t){t&&t.geometry&&t.geometry.location?i.center={lat:t.geometry.location.lat,lng:t.geometry.location.lng}:i.center=null,i.query?i.ajaxQuery((function(){i.initCenter()})):(i.setPois(i.pois),i.initCenter())})),this.div.list.on("mouseenter","[data-mapp-poi]",(function(e){var o=t(this).attr("data-mapp-poi");i.poiHover(i.pois_[o])})),this.div.list.on("mouseleave","[data-mapp-poi]",(function(t){i.poiHover(null)}))))},initCenter:function(){var t=this;this.recenter(),this.renderList(),this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():e.event.addListenerOnce(t.map_,"idle",(function(){t.initOpen()}))},initOpen:function(){var t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;this.initialOpenDirections?this.directionsOpen(null,t):t&&e&&t.open()},action:function(e,i,o){var n=this;switch(e){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.directionsOpen(null,this.opened);break;case"dir-from":this.directionsOpen(this.opened,null);break;case"filters-reset":this.div.filters.find(":input").each((function(){"checkbox"==this.type||"radio"==this.type?t(this).prop("checked",!1):t(this).val("")})),this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((function(t){t&&t.geometry&&t.geometry.location&&n.setView(t.geometry.location,parseInt(mappl10n.options.poiZoom))}));break;case"layer":this.toggleLayer(i),this.toggleView("menu",!1);break;case"list-toggle":this.togglePoiListOpen();break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=o.attr("data-mapp-poi");this.poiOpen(this.pois_[s]);break;case"page":var a=parseInt(o.attr("data-mapp-page"));this.pagination_.page=a,this.renderList();break;case"view-map":this.togglePoiListOpen(!1);break;case"view-list":this.togglePoiListOpen(!0);break;default:return!0}},addEvents:function(t,i){t=t.split(" ");for(var o=0;o<t.length;o++)e.event.addListener(this.map_,t[o],i)},addGeolocateControl:function(){if(mappl10n.options.ssl){var e=t(".mapp-geolocate-control-wrapper").get(0);"google"==mappl10n.options.engine?this.map_.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e):(L.Control.Geolocate=L.Control.extend({onAdd:function(t){return e},onRemove:function(){}}),new L.Control.Geolocate({position:"bottomright"}).addTo(this.map_))}},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var e=t.makeArray(this.layers),i=0;i<e.length;i++){var o=e[i].trim(),n=o.split(".").pop();this.layers_[o]?this.toggleLayer(o):"kml"==n||"kmz"==n?this.layers_[o]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:o}):"json"==n&&(this.layers_[o]=new google.maps.Data({map:this.map_}).loadGeoJson(o))}},addMenu:function(){var e=this;t("body").on("click",(function(i){var o=t(i.target),n=o.attr("data-mapp-action");o==e.div.filters||"filters-toggle"==n||o.closest(e.div.filters).length||e.toggleView("filters",!1),o==e.div.menu||"menu-toggle"==n||o.closest(e.div.menu).length||e.toggleView("menu",!1)}))},addPopup:function(){var i=this,o=this.editable?"mapp-iw-edit":"mapp-iw";this.editable||(o+=" mapp-"+this.templates.popup),this.div.iw=t('<div class="'+o+'">').appendTo(this.div.canvas),this.iw=new e.Infobox(this.map_,{className:this.editable?"mapp-ib-edit":""}),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(function(){i.poiClose()}))},addSearchMove:function(){},addUserLocation:function(){var t=this;mappl10n.options.userLocation&&mappl10n.options.ssl&&this.places.geolocate((function(i){if(i&&i.geometry&&i.geometry.location){var o=i.geometry.location,n=e.Icons.get("geolocation");"leaflet"==mappl10n.options.engine?t.user_=L.marker([o.lat,o.lng],{icon:n}).addTo(t.map_):(t.user_=new e.Marker({icon:n,position:new google.maps.LatLng(o.lat,o.lng)}),t.user_.setMap(t.map_))}}),!0)},ajaxQuery:function(t){},clusterGetLatLng:function(t){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var e=this.clusterer.getVisibleParent(t.overlay);return e?e.getLatLng():null}for(var i=this.clusterer.getClusters(),o=0;o<i.length;o++){var n=i[o].markers_;if(n.length>1)for(var s=0;s<n.length;s++)if(n[s]==t.overlay)return i[o].center_}}},clustering:function(){if(mappl10n.options.clustering&&!this.editable){var t=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==t.disableClusteringAtZoom&&""==t.disableClusteringAtZoom&&(t.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup(t):(t=_.extend(t,{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}),this.clusterer=new MarkerClusterer(this.map_,[],t))}},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){for(var t=[],e=0;e<this.pois_.length;e++)this.pois_[e].type||t.push(this.pois_[e].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(t),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(t)}},dialog:function(t,e){var i=this;t?(this.div.dialog.html(t),this.div.dialog.show(),e&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout((function(){i.dialog(null)}),4e3))):this.div.dialog.hide()},directionsOpen:function(t,i){var o=t?t.getAddress():"",n=i?i.getAddress():"";t?this.popupOpen(t):i&&this.popupOpen(i),this.dir_||(this.dir_=new e.Directions(this.div.directions,this)),this.dir_.open(o,n)},fitBounds:function(t,e){return e="leaflet"==mappl10n.options.engine&&e?{paddingTopLeft:[e.left,e.top],paddingBottomRight:[e.right,e.bottom]}:e,this.map_.fitBounds(t,e)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},poiClose:function(){this.poiHighlight(null),this.selected=null,this.opened=null,this.hovered=null,this.iw.close(),this.dir_&&this.dir_.close(),t(this).triggerHandler("mapp.close")},poiHighlight:function(e){if("icon"!=mappl10n.options.highlight||"leaflet"!=mappl10n.options.engine||!this.editable){if(t("[data-mapp-poi]",this.div.list).removeClass("mapp-selected"),this.hovered&&this.hovered.highlight(!1),e){var i=t.inArray(e,this.pois_);t('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"),e.highlight(!0)}this.selected&&(i=t.inArray(this.selected,this.pois_),t('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"))}},poiHover:function(t){t&&this.opened==t||(mappl10n.options.tooltips||(this.poiHighlight(null),this.hovered=null),t&&(this.poiHighlight(t),this.hovered=t,mappl10n.options.tooltips&&!this.editable&&this.popupOpen(t,null,"popup")))},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.set({dirty:!0})},poiOpen:function(e,i){var o=this;if(this.poiClose(),this.selected=e,this.poiHighlight(e),e.postid&&e.url&&!this.editable)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(e.url);case"postnew":return void window.open(e.url);case"postmodal":return this.modal_.open(),this.modal_.setContent('<div class="mapp-modal-spinner">'),void e.fetchPost((function(){return o.modal_.setContent(e.html)}))}this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),this.popupOpen(e,i,"popup"),t(this).triggerHandler("mapp.open",e)},poiRemove:function(e){var i=t.inArray(e,this.pois_);-1!=i&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),this.renderList()),this.set({dirty:!0})},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.editable||(this.iw.close(),this.dir_&&this.dir_.close(),this.opened=null,t(this).triggerHandler("mapp.close"))},popupOpen:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"popup",o=null;this.popupClose(),e&&e.featureData?o=e.featureData:e&&e.propagatedFrom&&e.propagatedFrom.feature&&e.propagatedFrom.feature.properties&&(o=e.propagatedFrom.feature.properties),this.div.iw.html(t.render(i,o)),this.div.iw.toggleClass(" mapp-thumb-"+mappl10n.options.thumbsPopup,!!t.thumbnail);var n=this.clusterGetLatLng(t),s=n||t.getPosition(e);this.iw.open({position:s,anchorPoint:t.getAnchorPoint(e)}),this.opened=t},recenter:function(){var t=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});else if(t)this.setView(t,e||1);else if(0!=this.pois_.length)if(1!=this.pois_.length){for(var i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds,o=0;o<this.pois_.length;o++){var n=this.pois_[o].getBounds(),s=this.pois_[o].getPosition();i=n?"leaflet"==mappl10n.options.engine?i.extend(n):i.union(n):i.extend(s)}e?this.setView(i.getCenter().toJSON(),e):this.fitBounds(i)}else this.pois_[0].center(e);else this.setView({lat:0,lng:0},e||1)},render:function(){var i=this,o=this.name?this.name+"-layout":"",n="mapp-layout",s=this.layout?this.layout:"left";if(n+="left"==s?" mapp-list-left":" mapp-inline",n+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",n+=this.classname?" "+this.classname:"",!document.body.classList.contains("block-editor-page")){var a=this.alignment?this.alignment:mappl10n.options.alignment;if(a){var l=" align"+a+" mapp-align-"+a;window.parent==window?n+=l:t(window.frameElement).parent().parent().addClass(l)}}var r=e.lib.template("map",{map:this,layout:s});if(this.sel){if(this.sel.html(r),this.sel.addClass(n),this.sel.attr("id",o),this.div.layout=this.sel,!this.div.layout.length)return e.lib.log("MapPress: Missing map name or container for map: "+this.name)}else{var p=t('<div id="'+o+'" class="'+n+'">');p.html(r);var h=t("#"+this.name+"-layout");if(!h.length)return e.lib.log("MapPress: Missing map name or container for map: "+this.name);h.replaceWith(p),this.div.layout=p}t.each(["canvas","content","controls","dialog","directions","filters","list","menu","wrapper","search"],(function(e,o){i.div[o]=t(".mapp-"+o,i.div.layout)})),this.poiList&&"inline"==s&&(this.div.list=t('<div class="mapp-inline mapp-list"></div>'),window.parent==window?this.div.layout.append(this.div.list):t(window.frameElement.parentElement).after(this.div.list)),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderList:function(){var t=this.getBounds(),i=0;if(this.editable)this.div.layout.trigger("mapp.render");else if(this.poiList){var o=this.pagination_.pageSize*(this.pagination_.page-1),n=o+this.pagination_.pageSize;if(!this.editable)for(var s=0;s<this.pois_.length;s++){var a=this.pois_[s];a.visible=!1,this.query?t&&t.contains(a.getPosition())&&(a.visible=!0,i++):(a.visible=!0,i++),a.visible=i>=o&&i<=n&&a.visible}this.pagination_.count=i,this.div.list.html(e.lib.template(this.templates.loop,{map:this,pois:this.pois_,pagination:this.pagination_})),mappl10n.options.thumbsList&&this.div.list.addClass(" mapp-thumb-"+mappl10n.options.thumbsList)}},renderMenu:function(){for(var e in this.layers_)t('[data-mapp-layer="'+e+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[e].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():e.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){var e=this,i="<a href='"+mappl10n.options.adminurl+"/admin.php?page=mappress'>"+__("MapPress Settings")+"</a>",o=jQuery&&jQuery.ui?jQuery.ui.version:"0.0",n="<a href ='http://mappresspro.com/mappress-faq' target='_blank'>"+__("MapPress FAQ")+"</a>",s="<a href='http://mappresspro.com/chris-contact', target='_blank'>"+__("contact support")+"</a>",a="<br/>"+sprintf(__("Please see the %s for help, or %s and provide this error message."),n,s),l=sprintf("<div class='mapp-errors-toolbar'><div class='mapp-errors-apikey'>%s</a></div>",__("Get an API Key"));this.div.layout.on("click",".mapp-errors-apikey",(function(){window.open("https://mappresspro.com/how-to-get-a-google-maps-api-key")}));var r=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:__("Leaflet library not loaded"),text:__("A theme or plugin is preventing the Leaflet library from loading.")+a},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:__("Google Maps API not loaded"),text:__("A theme or plugin is preventing Google Maps from loading.")+a},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:__("Google Maps API key required"),text:sprintf(__("Please enter a Google Maps API key in the %s, or switch to Leaflet maps."),i)+l},{condition:t('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1,title:__("Google Maps API loaded multiple times"),text:__("A theme or plugin has loaded Google Maps twice")+a},{condition:"undefined"==typeof _,title:__("Underscore library not loaded"),text:__("A theme or plugin is preventing the underscore.js library from loading.")+a},{condition:o<"1.12",title:sprintf(__("Obsolete jQuery version: %s, must be >= 1.12"),o),text:__("A theme or plugin is loading an obsolete version of jQuery.")+a}];if(_.map(r,(function(t){if(t.condition){mappl10n.options.admin&&e.sanityOutput({title:t.title,text:t.text?t.text:""});var i=jQuery("<span>"+t.text.replace("<br/>","\n")+"</span>").text();console.error(__("Map error")+": "+t.title+" - "+i)}})),"google"==mappl10n.options.engine){var p=console.error;console.error=function(t){(t.includes("Google Maps JavaScript API")||t.includes("You have exceeded your request quota")||t.includes("You have exceeded your daily quota"))&&mappl10n.options.admin&&(t=t.replace(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi,(function(t,e,i){var o=i;return o.match("^https?://")||(o="http://"+o),e+'<a href="'+o+'" target="_blank">'+i+"</a>"})),e.sanityOutput({title:__("Google Maps Error"),text:t})),p(t)}}},sanityOutput:function(e){if(!t(".mapp-errors-overlay",this.div.content).length){var i="<div class='mapp-errors-overlay'></div><div class='mapp-errors'><div class='mapp-errors-header'>"+__("Oops! Something went wrong.")+"</div><div class='mapp-errors-list'></div></div>";this.div.content.prepend(i)}t(".mapp-errors-list",this.div.content).append("<div class='mapp-errors-title'>"+e.title+"</div><div class='mapp-errors-text'>"+e.text+"</div>")},search:function(t){if(t&&t.geometry){var e=t.geometry.location?t.geometry.location:null,i=t.geometry.viewport?t.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var o=new L.LatLng(e.lat,e.lng),n=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):o.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:e,radius:1e3*mappl10n.options.radius});n=i?new google.maps.LatLngBounds(new google.maps.LatLng(i.sw.lat,i.sw.lng),new google.maps.LatLng(i.ne.lat,i.ne.lng)).union(s.getBounds()):s.getBounds()}n&&this.fitBounds(n),this.setView(e)}},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.dirty=i;break;case"mapTypeId":this.mapTypeId=i,this.setMapTypeId(i);break;case"poiList":this.poiList=null==i?mappl10n.options.poiList:i,this.togglePoiListOpen(this.poiList),this.toggleView("mini");break;case"style":this.setStyle(i);break;case"title":this.title=i;break;default:this[e]=i}}},setMapTypeId:function(t){var e=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),i=_.findWhere(e,{id:t});!mappl10n.options.style||"roadmap"!=t&&"streets"!=t&&i||(t=mappl10n.options.style),style=_.findWhere(e,{id:t}),style=style||e[0],this.setStyle(style)},setPois:function(t){if(this.resetPois(),t)for(var i=0;i<t.length;i++){var o=new e.Poi(t[i]);this.pois_.push(o),o.id=this.pois_.length-1,o.setMap(this)}this.clustersSet()},setSize:function(e){var i=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],o={},n={};if(e&&e.hasOwnProperty("width")&&(o={width:e.width?e.width:i.width}),e&&e.hasOwnProperty("height")){var s=e.height?e.height:i.height;n="string"==typeof s&&s.includes("%")?{"padding-bottom":s,height:"auto"}:{"padding-bottom":0,height:s}}window.parent==window?this.embed?(o={height:"100%"},n={"padding-bottom":0,height:"100%"}):(this.div.layout.css(o),this.div.wrapper.css(n)):(t(window.frameElement).parent().parent().css(o),t(window.frameElement).parent().css(n)),this.resize()},setStyle:function(i){if("leaflet"==mappl10n.options.engine){var o={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"}}[i.provider],n=t.extend({},o,i);L.tileLayer(o.url,n).addTo(this.map_)}else if(this.map_.setMapTypeId("standard"==i.type?i.id:"roadmap"),i.json){var s=null;try{s=JSON.parse(i.json)}catch(t){e.lib.log("Invalid JSON in map style")}this.map_.setOptions({styles:s||null})}else this.map_.setOptions({styles:null})},setView:function(t,e,i){"leaflet"==mappl10n.options.engine?(null==e&&(e=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(t,e,i)):(t=t&&!t.toJSON?{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}:t,e=e?parseInt(e):null,t&&this.map_.setCenter(t),e&&this.map_.setZoom(e))},sortPois:function(t){var e=Array();this.set({dirty:!0});for(var i=0;i<t.length;i++){var o=parseInt(t[i]);if(isNaN(o))return!1;e.push(this.pois_[o])}if(e.length!=this.pois_.length)return!1;this.pois_=e,this.renderList()},toggleLayer:function(e,i){var o=this;i=void 0!==i?i:null==this.layers_[e].getMap(),t.each(["traffic","bicycling","transit"],(function(t,e){o.layers_[e].setMap(null)})),i&&this.layers_[e].setMap(this.map_)},togglePoiListOpen:function(t){var e=this;this.div.layout.toggleClass("mapp-list-open",t),setTimeout((function(){return e.resize()}),100)},togglePois:function(t){t=!!t;for(var e=0;e<this.pois_.length;e++)this.pois_[e].setVisible(t)},toggleView:function(t,e){if("mini"==t){var i=this.div.layout.hasClass("mapp-view-mini"),o=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",o),void(o!=i&&this.togglePoiListOpen(!o))}e=void 0===e?!this.div.layout.hasClass("mapp-view-"+t):e,this.div.layout.toggleClass("mapp-view-"+t,e),"list"==t&&e&&this.renderList(),"menu"==t&&e&&this.renderMenu(),"directions"==t&&this.resize()},toJSON:function(){this.pois=[];for(var t=0;t<this.pois_.length;t++)this.pois.push(this.pois_[t].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,title:this.title,width:this.width,zoom:this.zoom}}}},397:()=>{var t,e=window.mapp||{};t=jQuery,e.Directions=function(e,i){this.sel=t(e),this.map=i;var o=this;this.sel.on("keydown",(function(t){13==t.which?(o.getDirections(),t.preventDefault()):27==t.which&&o.close()})),this.sel.on("click","[data-mapp-action]",(function(e){var i=t(this).attr("data-mapp-action"),n=t(".mapp-dir-daddr",o.sel).val(),s=t(".mapp-dir-saddr",o.sel).val();switch(e.preventDefault(),i){case"dir-cancel":o.close();break;case"dir-get":o.getDirections();break;case"dir-swap":t(".mapp-dir-saddr",o.sel).val(n),t(".mapp-dir-daddr",o.sel).val(s)}})),this.open=function(e,i){"google"!=mappl10n.options.directions?(this.map.toggleView("directions",!0),t(".mapp-dir-addr",this.sel).removeClass("mapp-error"),t(".mapp-dir-saddr",this.sel).val(e),t(".mapp-dir-daddr",this.sel).val(i)):this.openGoogle(e,i)},this.close=function(){this.map.toggleView("directions",!1)},this.getDirections=function(){var e=t(".mapp-dir-saddr",this.sel).val().trim(),i=t(".mapp-dir-daddr",this.sel).val().trim();this.map.poiClose(),this.openGoogle(e,i)},this.openGoogle=function(t,e){var i=mappl10n.options.directionsServer;-1==i.toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:(t,e,i)=>{"use strict";i.r(e);var o,n=i(991),s=i(574),a=window.mapp||{};a.geocoders={},o=jQuery,a.geocoders.algolia=function(t){this.map=t},a.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(t,e){var i="https://places-dsn.algolia.net/1/places/query?query="+encodeURIComponent(t)+"&hitsPerPage=5";i=mappl10n.options.country?i+"&countries="+mappl10n.options.country.toLowerCase():i,i=mappl10n.options.language?i+"&language="+mappl10n.options.language.toLowerCase():i+"&language=en";var a=this.map.getMap().getCenter();a&&(i+="&aroundLatLng="+a.lat+","+a.lng),o.getJSON(i,(function(i){if(i&&i.hits&&i.hits.length>0){var o=i.hits.map((function(e,o){return(0,n.Z)({formatInputValue:s.Z,hit:e,hitIndex:o,query:t,rawAnswer:i})}));e(o)}else e(null)}))}},function(t){a.geocoders.google=function(e){this.map=e,this.token=null;var i=t('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,i.remove()},a.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={fields:["formatted_address","name","geometry"],placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(t,i){if("OK"==i&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}e(t)}else e(null)}))},getFirstPrediction:function(e,i){var o=this;this.getPredictions(e,(function(e){e&&t.isArray(e)?o.getDetails(e[0],(function(t){return i(t)})):i(null)}))},getPredictions:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=this.map.getMap().getBounds();"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var o={input:t,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:this.map.editable?null:["geocode"]};this.autocompleteService.getPlacePredictions(o,(function(t,i){"OK"==i&&t&&t.length?(t=(t=t.map((function(t){return t.value=t.description,t}))).filter((function(t){return t.place_id})),e(t)):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),e(null))}))}}}(jQuery),function(t){a.geocoders.mapbox=function(t){this.map=t},a.geocoders.mapbox.prototype={getDetails:function(t,e){var i=t.place_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));var s=t.bbox&&4==t.bbox.length?{sw:{lat:t.bbox[1],lng:t.bbox[0]},ne:{lat:t.bbox[3],lng:t.bbox[2]}}:null;e({formatted_address:t.place_name,name:i,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:s}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+e+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o;var n=this.map.getMap().getCenter();n&&(o+="&proximity="+n.lng+","+n.lat),mappl10n.options.searchBox&&(o+="&bbox="+mappl10n.options.searchBox),t.getJSON(o,(function(t){t&&t.features&&t.features.length>0?(t.features=t.features.map((function(t){return t.value=t.label=t.place_name,t})),i(t.features)):i(null)}))}}}(jQuery),function(t){a.geocoders.nominatim=function(t){this.map=t},a.geocoders.nominatim.prototype={getDetails:function(t,e){var i=t.display_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));var s=t.boundingbox&&4==t.boundingbox.length?{sw:{lat:t.boundingbox[0],lng:t.boundingbox[2]},ne:{lat:t.boundingbox[1],lng:t.boundingbox[3]}}:null;e({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:s}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);if(o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,mappl10n.options.searchBox)o+="&viewbox="+mappl10n.options.searchBox,o+="&bounded=1";else{var n=this.map.getMap().getBounds();if(n){var s=n.getSouthWest(),a=n.getNorthEast();o+="&viewbox="+s.lng+","+s.lat+","+a.lng+","+a.lat}}t.getJSON(o,(function(t){t&&t.length?(t=t.map((function(t){return t.value=t.display_name,t})),i(t)):i(null)}))}}}(jQuery)},282:()=>{var t=window.mapp||{};t.Icons={},t.Icons.get=function(e){var i=t.Icons.getUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:i,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:i}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:()=>{var t,e=window.mapp||{};t=jQuery,e.Infobox=function(i,o){var n=this;this.map=i,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?i.getContainer():i.getDiv(),this.node=null,this.opts=_.extend({clip:!0,pan:!0,popout:!1},o),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null;var s=this;if(this.wrapper=t('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib-content"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div></div>'),this.wrapper.addClass(o.className),this.node=t(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?e.event.addListener(this.map,"move",(function(t){s.isOpen&&s.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=function(){s.isOpen&&s.draw()}),this.node.get(0).addEventListener("load",(function(){n.open({position:n.position,anchorPoint:n.anchorPoint})}),{capture:!0}),this.opts.popout)var a="body";else a="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();this.wrapper.appendTo(a),"leaflet"==mappl10n.options.engine&&i.on("load",(function(){L.DomEvent.disableClickPropagation(n.wrapper.get(0))}))},e.Infobox.prototype={clipToWindow:function(){var t=p.y,e=p.x-w/2+this.anchorPoint.x,i=this.mapDiv.getBoundingClientRect(),o=i.x+window.scrollX;t+=i.y+window.scrollY,e+=o;var n=this.opts.clip?divw:document.body.clientWidth;e+w>n&&(e=n-w),e<0&&(e=0),this.wrapper.css({left:e}),h=this.node.outerHeight(),t=p.y-h+this.anchorPoint.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&t<0&&t<divh-(p.y+h)&&(t=p.y,this.node.addClass("mapp-ib-flip"))},close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(this.position){var t,e;if(t=this.node.outerWidth(),this.node.outerHeight(),"leaflet"==mappl10n.options.engine)e=this.map.latLngToContainerPoint(this.position);else{var i=this.overlayView.getProjection();if(!i)return;e=i.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:e.x-t/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-e.y-this.anchorPoint.y})}},getContent:function(){return t(".mapp-ib",this.node)},open:function(e){this.position=e.position,this.anchorPoint=e.anchorPoint?e.anchorPoint:{x:0,y:0},this.opts.popout&&this.node.css({maxWidth:.8*this.mapDiv.clientWidth-this.fudge,maxHeight:this.mapDiv.clientHeight+this.anchorPoint.y-2*this.fudge}),this.wrapper.addClass("mapp-open"),this.draw();var i={w:t(this.mapDiv).width(),h:t(this.mapDiv).height()},o={w:this.node.outerWidth(),h:this.node.outerHeight()};this.opts.popout?this.clipToWindow():"leaflet"==mappl10n.options.engine?this.panLeaflet(i,o):this.panGoogle(o),this.isOpen=!0},panGoogle:function(t){var e=this.overlayView.getProjection(),i=e?e.fromLatLngToDivPixel(this.position):null;if(i){var o=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(i.x-t.w/2-this.fudge,i.y+this.fudge)),n=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(i.x+t.w/2+this.fudge,i.y-t.h+this.anchorPoint.y-this.fudge)),s=new google.maps.LatLngBounds(o,n);this.map.panToBounds(s)}},panLeaflet:function(t,e){var i=this.map.latLngToContainerPoint(this.position),o=(this.node.outerWidth(),this.node.outerHeight(),{x:i.x,y:i.y});i.x+e.w/2+this.anchorPoint.x>t.w-this.fudge?o.x=Math.max(t.w-e.w/2-this.anchorPoint.x-this.fudge,t.w/2-this.anchorPoint.x):i.x-e.w/2+this.anchorPoint.x<this.fudge&&(o.x=Math.min(e.w/2+this.anchorPoint.x+this.fudge,t.w/2-this.anchorPoint.x)),i.y+this.anchorPoint.y-e.h<this.fudge&&(o.y=e.h-this.anchorPoint.y+this.fudge),o.y>=t.h&&(o.y=t.h-this.fudge),this.map.panBy([i.x-o.x,i.y-o.y])},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:()=>{var t,e=window.mapp||{};t=jQuery,e.lib={ajax:function(e){var i=this,o={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"json"==e.dataType&&e.url==mappl10n.options.ajaxurl&&"OK"!=t.status&&console.log(t.status),"json"==e.dataType&&t.output?i.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,o,n){"cancel"!=o&&(void 0!==n&&""!=n&&i.alert("AJAX ERROR\r\nTextStatus="+o+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e=t.extend(o,e),t.ajax(e)},alert:function(t){function e(_x){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){mappl10n.options.admin||mappl10n.options.debug?alert(t):window.console&&console.error(t)})),jqVersionCheck:function(e){if(void 0===t||void 0===e)return!1;e=e.split("."),v=t.fn.jquery.split(".");for(var i=0;i<e.length;i++){var o=parseInt(e[i]),n=void 0!==v[i]?parseInt(v[i]):0;if(n!=o)return n>o}return!0},log:function(t){window.console&&console.error(t)},scrollTo:function(t,e,i){if(t&&e&&t.length&&e.length){var o=t.height(),n=e.outerHeight(!0),s=t.scrollTop(),a=s+e.position().top,l=a+n;a=a-o/2-n/2,i&&(a-=i.outerHeight(!0)),(a<s||l>s+o)&&t.scrollTop(a)}},template:function(i,o){if(e.lib.templates=e.lib.templates?e.lib.templates:{},!e.lib.templates[i]){var n=mappl10n.options.templates?mappl10n.options.template[i]:t("#mapp-tmpl-"+i).html();if(!n)return"";e.lib.templates[i]=_.template(n.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return e.lib.templates[i](o)},uniqid:function(){return void 0===e.lib.uniqidCounter?e.lib.uniqidCounter=0:e.lib.uniqidCounter++,e.lib.uniqidCounter}},e.lib.jqVersionCheck("1.7")||e.lib.alert("jQuery version is too old: "+t.fn.jquery),t("body").on("tabsactivate tabsshow",(function(e,i){var o=i.newPanel?i.newPanel:i.panel;o&&t(".mapp-layout",o).each((function(){var e=t(this).find(".mapp-canvas").attr("id"),i=window[e];i.resize(),i.recenter()}))})),jQuery,"leaflet"==mappl10n.options.engine&&"undefined"!=typeof L&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6}),e.event={addListener:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.on(e[o],i):google.maps.event.addListener(t,e[o],i)},addListenerOnce:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.once(e[o],i):google.maps.event.addListenerOnce(t,e[o],i)},clearInstanceListeners:function(t){"leaflet"==mappl10n.options.engine?t.off():google.maps.event.clearInstanceListeners(t)},clearListeners:function(t,e){e=e.split(" ");for(var i=0;i<e.length;i++)"leaflet"==mappl10n.options.engine?t.off(e[i]):google.maps.event.clearListeners(t,e[i])},trigger:function(t,e,i){"leaflet"==mappl10n.options.engine?t.fire(e,i):google.maps.event.trigger(t,e,i)}},function(t){e.lib.Modal=function(){this.el=null;var e=this;this.el=t('<div class="mapp-modal" tabindex="0">').append('<div class="mapp-modal-backdrop">').append('<div class="mapp-modal-content" tabindex="1">'),this.el.hide(),this.el.on("click",".mapp-modal-backdrop",(function(){e.close()})),this.el.on("click",".mapp-modal-close",(function(){e.close()})),this.el.on("keydown",(function(t){27==t.which&&e.close()}))},e.lib.Modal.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),t("body").removeClass("mapp-modal-noscroll"))},focus:function(){t(".mapp-modal-focus",this.el).attr("tabindex",0),t(".mapp-modal-focus",this.el).focus()},open:function(){if(!this.el.parent().length){var e=t("body",window.parent.document);this.el.appendTo(e)}this.el.show(),t("body").addClass("mapp-modal-noscroll"),this.focus()},setContent:function(e){t(".mapp-modal-content",this.el).empty(),t(".mapp-modal-content",this.el).append('<div class="mapp-modal-close">&times;').append(e),this.focus()}}}(jQuery)},692:()=>{var t=window.mapp||{};jQuery,t.load=function(){if(void 0!==t&&t.data)for(;t.data.length;){var e=t.data.pop();window[e.name]=new t.Map(e),window[e.name].display()}},t.load()},436:()=>{var t,e=window.mapp||{};t=jQuery,e.Marker=function(t){var e=this;this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(t),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=function(){return e.draw()},this.overlayView.onAdd=function(){return e.onAdd()},this.overlayView.onRemove=function(){return e.onRemove()}},e.Marker.prototype={draw:function(){if(this.div&&this.icon){var e=this.overlayView.getProjection();if(e){var i=e.fromLatLngToDivPixel(this.position),o=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};t(this.div).css({left:i.x-o.width/2,top:i.y-o.height})}}},getDiv:function(){return this.div},getDraggable:function(){return this.draggable},getMap:function(){return this.map},getPosition:function(){return this.position},getVisible:function(){return this.visible},handleEvent:function(t){var e="on"+t.type[0].toUpperCase()+t.type.slice(1);this[e]&&this[e](t)},onAdd:function(){var i=this,o=this.overlayView.getPanes();this.div=t('<div class="mapp-marker">'),this.div.appendTo(o.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(function(){(!i.dragging||i.dragging&&!i.dragging.moved)&&e.event.trigger(i,"click"),i.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable)},onMouseenter:function(t){e.event.trigger(this,"mouseover")},onMouseleave:function(t){e.event.trigger(this,"mouseout")},onPointerdown:function(t){var e=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:t.clientX,y:t.clientY},offset:{x:i.x-(t.clientX-e.left),y:i.y-(t.clientY-e.top)}},this.toggleDragEvents(!0)},onPointermove:function(t){if(!(Math.abs(t.clientX-this.dragging.startPixel.x)+Math.abs(t.clientY-this.dragging.startPixel.y)<3)){var i=this.map.getDiv().getBoundingClientRect(),o={x:t.clientX-i.left+this.dragging.offset.x,y:t.clientY-i.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(o)),this.draw(),this.dragging.moved=!0,e.event.trigger(this,"dragstart")}},onPointercancel:function(t){this.onPointerup(t)},onPointerup:function(t){this.dragging&&this.dragging.moved&&e.event.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(t,e){var i="set"+t[0].toUpperCase()+t.slice(1);this[i]&&this[i](e)},setDraggable:function(t){this.draggable=t,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),t&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(t){if(void 0!==t&&(this.icon=t),this.icon&&this.div){var e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);var i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:i.width,height:i.height}),this.setZIndex(),this.draw()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(var e in t)this.set(e,t[e])},setVisible:function(t){this.visible=t,this.div&&this.div.css("visibility",t?"visible":"hidden")},setZIndex:function(t){this.zIndex=void 0!==t?t:this.zIndex,this.div&&this.div.css("z-index",t)},toggleDragEvents:function(t){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),t&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},510:()=>{var t,e=window.mapp||{};t=jQuery,e.Places=function(i,o){var n=this;this.sel=t(i),this.opts=t.extend({map:null},o);var s="";s="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new e.geocoders[s](this.opts.map),this.sel.on("keydown",(function(e){13==e.which&&(e.preventDefault(),e.stopImmediatePropagation(),n.sel.autocomplete("close"),n.parse(n.sel.val(),(function(e){e&&t(n).triggerHandler("search.mapp",e)})))})),t(".mapp-search-button",this.sel.parent()).on("click",(function(){n.parse(n.sel.val(),(function(e){e&&(n.sel.autocomplete("close"),t(n).triggerHandler("search.mapp",e))}))})),this.initAutocomplete()},e.Places.prototype={parse:function(t,e){var i="";if(t&&(i="string"==typeof(i=t&&t.name?t.name:t)?i.trim():i),i)if("string"!=typeof i||"http"!=i.substring(0,4))if("user"!=i)if(t&&t.geometry)e(t);else{var o=this.parseLatLng(t);o?e(o):this.geocoder.getFirstPrediction(t,(function(t){e(t)}))}else this.geolocate((function(t){e(t)}));else e(i);else e(null)},parseLatLng:function(t){var e;if(t.hasOwnProperty("lat")&&t.hasOwnProperty("lng"))e=t;else{var i=t&&t.name?t.name:t,o=(i="string"==typeof i?i.trim():i).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(e={lat:n,lng:s})}}return e?{name:e.lat+", "+e.lng,geometry:{location:e}}:null},geolocate:function(t,e){var i=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(e){var o={lat:e.coords.latitude,lng:e.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),i.sel.val("")}),(function(i){if(!e){var o=i&&i.message?" : "+i.message:"";alert(mappl10n.no_geolocate+o)}t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;this.sel&&this.sel.length&&(this.sel.on("autocompleteselect",(function(i,o){e.geocoder.getDetails(o.item,(function(i){e.parse(i,(function(i){i&&t(e).triggerHandler("search.mapp",i)}))}))})),this.sel.autocomplete({appendTo:this.sel.parent(),autoFocus:!0,minLength:1,delay:"nominatim"===mappl10n.options.geocoder?500:300,source:function(t,i){e.geocoder.getPredictions(t.term,(function(t){i(t)}))}}))}}},548:()=>{var t,e=window.mapp||{};t=jQuery,e.Poi=function(i){if(this.defaults={address:null,body:null,html:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},t.extend(this,this.defaults,i),i&&i.correctedAddress&&(this.address=i.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),i.viewport&&i.viewport.sw&&i.viewport.ne&&i.viewport.sw.lat){var o=i.viewport.sw,n=i.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(o.lat,o.lng),L.latLng(n.lat,n.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(o.lat,o.lng),new google.maps.LatLng(n.lat,n.lng))}var s=[],a=[];if(!i.overlay)switch(this.type){case"polygon":if(i.poly&&i.poly.paths)for(var l=0;l<i.poly.paths.length;l++){s=[];for(var r=0;r<i.poly.paths[l].length;r++)s.push(new google.maps.LatLng(i.poly.paths[l][r].lat,i.poly.paths[l][r].lng));a.push(new google.maps.MVCArray(s))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(a)}),this.setColors(i.poly);break;case"polyline":if(i.poly&&i.poly.path)for(l=0;l<i.poly.path.length;l++)s.push(new google.maps.LatLng(i.poly.path[l].lat,i.poly.path[l].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(s)}),this.setColors(i.poly);break;case"circle":var p=new google.maps.LatLng(i.point.lat,i.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(i.poly.radius)}),this.setColors(i.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(i.poly);break;case"kml":var h=i.kml&&i.kml.url?i.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(h):new google.maps.KmlLayer({url:h,preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([i.point.lat,i.point.lng]):this.overlay=new e.Marker({position:new google.maps.LatLng(i.point.lat,i.point.lng)})}i.type||this.set({iconid:i.iconid})},e.Poi.prototype={center:function(t){var e=this.getBounds();if("number"!=typeof t)if(e){var i=e.getNorthEast().toJSON().lng-e.getSouthWest().toJSON().lng;i<0&&(i+=360),t=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),t,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),t)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(t){switch(this.isPoly()?"poly":this.type){case"kml":return t&&t.pixelOffset?{x:t.pixelOffset.width,y:t.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 t;switch(this.type){case"polyline":t=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(e){t.extend(e)}));break;case"polygon":t=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(e){e.forEach((function(e){t.extend(e)}))}));break;case"rectangle":case"circle":t=this.overlay.getBounds();break;case"kml":t=(t="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||this.viewport;break;default:return this.viewport}return t},getColors:function(){var t={};for(var e in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[e]&&(t[e]=this.overlay[e]);return t},getPosition:function(t){if(!this.type)return"leaflet"==mappl10n.options.engine?this.overlay.getLatLng():this.overlay.getPosition();if("kml"==this.type&&t&&t.latLng)return t.latLng;var e=this.getBounds();return e?e.getCenter():"leaflet"==mappl10n.options.engine?new L.latLng(0,0):new google.maps.LatLng(0,0)},getTemplateColors:function(){var t=this.getColors();return"polyline"==this.type?{color:t.strokeColor,opacity:100*t.strokeOpacity,weight:t.strokeWeight}:{color:t.fillColor,opacity:100*t.fillOpacity,weight:t.strokeWeight}},highlight:function(i){if(!this.type){var o="leaflet"==mappl10n.options.engine?t(this.overlay._icon):this.overlay.getDiv();if(o){var n=this.editable?"circle":mappl10n.options.highlight;switch(n){case"circle":o.toggleClass("mapp-marker-circle",i);break;case"icon":var s=i?e.Icons.get(mappl10n.options.highlightIcon):e.Icons.get(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==s.options.iconUrl)return;this.overlay.setIcon(s);break;case"scale":o.addClass("mapp-marker"),o.toggleClass("mapp-marker-scale",i)}this.setZIndex(i?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(t){this.map.poiOpen(this,t)},fetchPost:function(t){var i=this;this.html?t():e.lib.ajax({type:"GET",data:{action:"mapp_get_post",postid:this.postid,nonce:mappl10n.options.nonce},dataType:"html",callback:function(e){i.html=e,t()}})},render:function(t,i){var o={};return o=_.extend(o,this,{icon:e.Icons.getUrl(this.iconid)}),i&&(o.body=i.description,o.title=i.name),o.thumbnail=mappl10n.options.thumbsPopup&&"popup"==t||mappl10n.options.thumbsList&&"item"==t?o.thumbnail:null,e.lib.template(this.map.templates[t],{poi:o,colors:this.getTemplateColors()})},set:function(t){for(var i in t){var o=t[i];switch(i){case"dirty":this.map.set({dirty:o});break;case"iconid":this.type||(this.iconid=o,this.overlay.setIcon(e.Icons.get(o)));break;default:this[i]=o}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty})},setColors:function(t){var e={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})t&&void 0!==t[i]&&(e[i]=t[i]);this.overlay.setOptions(e)},setEditable:function(t){var i=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),e.event.clearListeners(this.overlay,"rightclick"),e.event.clearListeners(this.overlay,"dragstart"),t&&(e.event.addListener(this.overlay,"dragstart",(function(){i.viewport=null,i.map.poiClose()})),e.event.addListener(this.overlay,"dragend",(function(){i.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(e.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&i.overlay.getPath().getLength()>2&&i.overlay.getPath().removeAt(t.vertex)})),e.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){i.map.set({dirty:!0})})))))},setMap:function(t){var i=this;this.map=t,e.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(e.event.addListenerOnce(this.overlay,"ready",(function(){i.viewport=i.overlay.getBounds()})),e.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(e.event.addListener(this.overlay,"defaultviewport_changed",(function(){i.viewport=i.overlay.getDefaultViewport()})),e.event.addListener(this.overlay,"status_changed",(function(){var t=i.overlay.getStatus();"OK"!=t&&alert(mappl10n.kml_error+":"+t)})))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap())),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),e.event.addListener(this.overlay,"mouseover",(function(t){i.map.poiHover(i)})),e.event.addListener(this.overlay,"mouseout",(function(t){i.map.poiHover(null)}))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t){var e=t.color,i=t.opacity,o=t.weight;i=i?i/100:void 0;var n="polyline"==this.type?{strokeColor:e,strokeOpacity:i,strokeWeight:o}:{fillColor:e,fillOpacity:i,strokeColor:e,strokeWeight:o,strokeOpacity:1};this.setColors(n)},setVisible:function(t){void 0!==this.overlay.setVisible&&this.overlay.setVisible(t)},setZIndex:function(t){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(t):this.overlay.set("zIndex",t)},toJSON:function(){var t={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},e=this.getPosition();t.point=e.toJSON();var i=this.viewport?this.viewport:this.getBounds();if(i){var o=i.toJSON();t.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}if("kml"==this.type&&(t.kml=this.kml),this.isPoly())switch(t.poly=this.getColors(),this.type){case"circle":t.poly.radius=this.overlay.getRadius();break;case"polyline":t.poly.path=[],this.overlay.getPath().forEach((function(e){t.poly.path.push(e.toJSON())}));break;case"polygon":t.poly.paths=[],this.overlay.getPaths().forEach((function(e){var i=[];e.forEach((function(t){i.push(t.toJSON())})),t.poly.paths.push(i)}));break;case"rectangle":var n=this.overlay.getBounds();t.viewport={sw:n.getSouthWest().toJSON(),ne:n.getNorthEast().toJSON()}}return t}}},675:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0;e<t.length;e++){var i=t[e].match(/country\/(.*)?/);if(i)return i[1]}return}},892:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var i in e)if(-1!==t.indexOf(i))return e[i];return"address"}},991:(t,e,i)=>{"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,r=t.rawAnswer;try{var h=i.locale_names[0],c=i.country,d=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,g=i.city&&i.city[0]!==h?i.city[0]:void 0,u=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,m=i.county&&i.county[0]!==h?i.county[0]:void 0,v=i.postcode&&i.postcode.length?function(t,e){for(var i=e[0].value,o=[],n=1;n<e.length;++n)"none"!==e[n].matchLevel&&o.push({index:n,words:e[n].matchedWords});if(0===o.length)return{postcode:t[0],highlightedPostcode:i};return o.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),{postcode:t[o[0].index],highlightedPostcode:e[o[0].index].value}}(i.postcode,i._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},f=v.postcode,y=v.highlightedPostcode,w={name:p(i._highlightResult.locale_names),city:g?p(i._highlightResult.city):void 0,administrative:d?p(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:u?p(i._highlightResult.suburb):void 0,county:m?p(i._highlightResult.county):void 0,postcode:y},b={name:h,administrative:d,county:m,city:g,suburb:u,country:c,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:f,postcodes:i.postcode&&i.postcode.length?i.postcode:void 0},L=e(b);return l(l({},b),{},{highlight:w,hit:i,hitIndex:s,query:a,rawAnswer:r,value:L})}catch(t){return console.error("Could not parse object",i),console.error(t),{value:"Could not parse object"}}};var o=s(i(675)),n=s(i(892));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function p(t){for(var e=t[0].value,i=[],o=1;o<t.length;++o)"none"!==t[o].matchLevel&&i.push({index:o,words:t[o].matchedWords});return 0===i.length?e:(i.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),0===i[0].index?"".concat(e," (").concat(t[i[1].index].value,")"):"".concat(t[i[0].index].value," (").concat(e,")"))}},574:(t,e)=>{"use strict";e.Z=function(t){var e=t.administrative,i=t.city,o=t.country,n=t.name,s=t.type;return"".concat(n).concat("country"!==s&&void 0!==o?",":"","\n ").concat(i?"".concat(i,","):"","\n ").concat(e?"".concat(e,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()}}},e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.exports}i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(854),i(397),i(442),i(282),i(689),i(436),i(510),i(548),i(692)})();
1
+ (()=>{var t={854:()=>{var t,e=window.mapp||{},__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};t=jQuery,e.Map=function(t,e){this.defaults={alignment:null,center:null,classname:null,editable:null,embed:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:null,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.hovered=null,this.iw=null,this.mapdata=t,this.opened=null,this.places=null,this.selected=null,this.settings=e||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.modal_=null,this.pagination_={count:0,page:1,pageSize:30},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},e.Map.prototype={display:function(){var i=this;this.render(),this.div&&this.div.layout&&(this.sanity(),this.editable?this.templates={loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?this.templates={loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,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&&("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.setMapTypeId(this.mapTypeId),this.clustering(),"postmodal"==mappl10n.options.mashupClick&&(this.modal_=new e.lib.Modal),this.places=new e.Places(t(".mapp-places",this.div.search),{map:i}),this.addUserLocation(),this.editable&&this.places.sel.focus(),t(this.places).on("search.mapp",(function(t,e){i.search(e)})),this.addEvents("click dragstart zoom_changed zoomstart",(function(t){"leaflet"==mappl10n.options.engine&&"click"==t.type&&t.originalEvent&&!t.originalEvent.target.matches(".mapp-canvas")||i.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(function(e){var o=t(this).attr("data-mapp-action");e.preventDefault(),i.action(o,t(this).attr("data-mapp-"+o),t(this))})),this.div.list.on("click","[data-mapp-action]",(function(e){var o=t(this).attr("data-mapp-action");e.preventDefault(),e.stopPropagation(),i.action(o,t(this).attr("data-mapp-"+o),t(this))})),this.div.filters.on("change",(function(){i.ajaxQuery()})),t(window).on("resize",(function(){i.toggleView("mini"),i.poiClose(),i.resize()})),e.event.addListener(i.map_,"maptypeid_changed baselayerchange",(function(){i.set({dirty:!0})})),this.places.parse(this.center,(function(t){t&&t.geometry&&t.geometry.location?i.center={lat:t.geometry.location.lat,lng:t.geometry.location.lng}:i.center=null,i.query?i.ajaxQuery((function(){i.initCenter()})):(i.setPois(i.pois),i.initCenter())})),this.div.list.on("mouseenter","[data-mapp-poi]",(function(e){var o=t(this).attr("data-mapp-poi");i.poiHover(i.pois_[o])})),this.div.list.on("mouseleave","[data-mapp-poi]",(function(t){i.poiHover(null)}))))},initCenter:function(){var t=this;this.recenter(),this.renderList(),this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():e.event.addListenerOnce(t.map_,"idle",(function(){t.initOpen()}))},initOpen:function(){var t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;this.initialOpenDirections?this.directionsOpen(null,t):t&&e&&t.open()},action:function(e,i,o){var n=this;switch(e){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.directionsOpen(null,this.opened);break;case"dir-from":this.directionsOpen(this.opened,null);break;case"filters-reset":this.div.filters.find(":input").each((function(){"checkbox"==this.type||"radio"==this.type?t(this).prop("checked",!1):t(this).val("")})),this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((function(t){t&&t.geometry&&t.geometry.location&&n.setView(t.geometry.location,parseInt(mappl10n.options.poiZoom))}));break;case"layer":this.toggleLayer(i),this.toggleView("menu",!1);break;case"list-toggle":this.togglePoiListOpen();break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=o.attr("data-mapp-poi");this.poiOpen(this.pois_[s]);break;case"page":var a=parseInt(o.attr("data-mapp-page"));this.pagination_.page=a,this.renderList();break;case"view-map":this.togglePoiListOpen(!1);break;case"view-list":this.togglePoiListOpen(!0);break;default:return!0}},addEvents:function(t,i){t=t.split(" ");for(var o=0;o<t.length;o++)e.event.addListener(this.map_,t[o],i)},addGeolocateControl:function(){if(mappl10n.options.ssl){var e=t(".mapp-geolocate-control-wrapper").get(0);"google"==mappl10n.options.engine?this.map_.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e):(L.Control.Geolocate=L.Control.extend({onAdd:function(t){return e},onRemove:function(){}}),new L.Control.Geolocate({position:"bottomright"}).addTo(this.map_))}},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var e=t.makeArray(this.layers),i=0;i<e.length;i++){var o=e[i].trim(),n=o.split(".").pop();this.layers_[o]?this.toggleLayer(o):"kml"==n||"kmz"==n?this.layers_[o]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:o}):"json"==n&&(this.layers_[o]=new google.maps.Data({map:this.map_}).loadGeoJson(o))}},addMenu:function(){var e=this;t("body").on("click",(function(i){var o=t(i.target),n=o.attr("data-mapp-action");o==e.div.filters||"filters-toggle"==n||o.closest(e.div.filters).length||e.toggleView("filters",!1),o==e.div.menu||"menu-toggle"==n||o.closest(e.div.menu).length||e.toggleView("menu",!1)}))},addPopup:function(){var i=this,o=this.editable?"mapp-iw-edit":"mapp-iw";this.editable||(o+=" mapp-"+this.templates.popup),this.div.iw=t('<div class="'+o+'">').appendTo(this.div.canvas),this.iw=new e.Infobox(this.map_,{className:this.editable?"mapp-ib-edit":""}),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(function(){i.poiClose()}))},addSearchMove:function(){},addUserLocation:function(){var t=this;mappl10n.options.userLocation&&mappl10n.options.ssl&&this.places.geolocate((function(i){if(i&&i.geometry&&i.geometry.location){var o=i.geometry.location,n=e.Icons.get("geolocation");"leaflet"==mappl10n.options.engine?t.user_=L.marker([o.lat,o.lng],{icon:n}).addTo(t.map_):(t.user_=new e.Marker({icon:n,position:new google.maps.LatLng(o.lat,o.lng)}),t.user_.setMap(t.map_))}}),!0)},ajaxQuery:function(t){},clusterGetLatLng:function(t){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var e=this.clusterer.getVisibleParent(t.overlay);return e?e.getLatLng():null}for(var i=this.clusterer.getClusters(),o=0;o<i.length;o++){var n=i[o].markers_;if(n.length>1)for(var s=0;s<n.length;s++)if(n[s]==t.overlay)return i[o].center_}}},clustering:function(){if(mappl10n.options.clustering&&!this.editable){var t=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==t.disableClusteringAtZoom&&""==t.disableClusteringAtZoom&&(t.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup(t):(t=_.extend(t,{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}),this.clusterer=new MarkerClusterer(this.map_,[],t))}},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){for(var t=[],e=0;e<this.pois_.length;e++)this.pois_[e].type||t.push(this.pois_[e].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(t),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(t)}},spinner:function(t){t?(this.div.spinner.html('<span class="mapp-spinner-icon"></span>'),this.div.spinner.show()):this.div.spinner.hide()},directionsOpen:function(t,i){var o=t?t.getAddress():"",n=i?i.getAddress():"";t?this.popupOpen(t):i&&this.popupOpen(i),this.dir_||(this.dir_=new e.Directions(this.div.directions,this)),this.dir_.open(o,n)},fitBounds:function(t,e){return e="leaflet"==mappl10n.options.engine&&e?{paddingTopLeft:[e.left,e.top],paddingBottomRight:[e.right,e.bottom]}:e,this.map_.fitBounds(t,e)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},poiClose:function(){this.poiHighlight(null),this.selected=null,this.opened=null,this.hovered=null,this.iw.close(),this.dir_&&this.dir_.close(),t(this).triggerHandler("mapp.close")},poiHighlight:function(e){if("icon"!=mappl10n.options.highlight||"leaflet"!=mappl10n.options.engine||!this.editable){if(t("[data-mapp-poi]",this.div.list).removeClass("mapp-selected"),this.hovered&&this.hovered.highlight(!1),e){var i=t.inArray(e,this.pois_);t('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"),e.highlight(!0)}this.selected&&(i=t.inArray(this.selected,this.pois_),t('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"))}},poiHover:function(t){t&&this.opened==t||(mappl10n.options.tooltips||(this.poiHighlight(null),this.hovered=null),t&&(this.poiHighlight(t),this.hovered=t,mappl10n.options.tooltips&&!this.editable&&this.popupOpen(t,null,"popup")))},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.set({dirty:!0})},poiOpen:function(e,i){var o=this;if(this.poiClose(),this.selected=e,this.poiHighlight(e),e.postid&&e.url&&!this.editable)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(e.url);case"postnew":return void window.open(e.url);case"postmodal":return this.modal_.open(),this.modal_.setContent('<div class="mapp-modal-spinner">'),void e.fetchPost((function(){return o.modal_.setContent(e.html)}))}this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),this.popupOpen(e,i,"popup"),t(this).triggerHandler("mapp.open",e)},poiRemove:function(e){var i=t.inArray(e,this.pois_);-1!=i&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),this.renderList()),this.set({dirty:!0})},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.editable||(this.iw.close(),this.dir_&&this.dir_.close(),this.opened=null,t(this).triggerHandler("mapp.close"))},popupOpen:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"popup",o=null;this.popupClose(),e&&e.featureData?o=e.featureData:e&&e.propagatedFrom&&e.propagatedFrom.feature&&e.propagatedFrom.feature.properties&&(o=e.propagatedFrom.feature.properties),this.div.iw.html(t.render(i,o)),this.div.iw.toggleClass(" mapp-thumb-"+mappl10n.options.thumbsPopup,!!t.thumbnail);var n=this.clusterGetLatLng(t),s=n||t.getPosition(e);this.iw.open({position:s,anchorPoint:t.getAnchorPoint(e)}),this.opened=t},recenter:function(){var t=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});else if(t)this.setView(t,e||1);else if(0!=this.pois_.length)if(1!=this.pois_.length){for(var i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds,o=0;o<this.pois_.length;o++){var n=this.pois_[o].getBounds(),s=this.pois_[o].getPosition();i=n?"leaflet"==mappl10n.options.engine?i.extend(n):i.union(n):i.extend(s)}e?this.setView(i.getCenter().toJSON(),e):this.fitBounds(i)}else this.pois_[0].center(e);else this.setView({lat:0,lng:0},e||1)},render:function(){var i=this,o=this.name?this.name+"-layout":"",n="mapp-layout",s=this.layout?this.layout:"left";if(n+="left"==s?" mapp-list-left":" mapp-inline",n+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",n+=this.classname?" "+this.classname:"",!document.body.classList.contains("block-editor-page")){var a=this.alignment?this.alignment:mappl10n.options.alignment;if(a){var l=" align"+a+" mapp-align-"+a;window.parent==window?n+=l:t(window.frameElement).parent().parent().addClass(l)}}var r=e.lib.template("map",{map:this,layout:s});if(this.sel){if(this.sel.html(r),this.sel.addClass(n),this.sel.attr("id",o),this.div.layout=this.sel,!this.div.layout.length)return e.lib.log("MapPress: Missing map name or container for map: "+this.name)}else{var p=t('<div id="'+o+'" class="'+n+'">');p.html(r);var h=t("#"+this.name+"-layout");if(!h.length)return e.lib.log("MapPress: Missing map name or container for map: "+this.name);h.replaceWith(p),this.div.layout=p}t.each(["canvas","content","controls","spinner","directions","filters","list","menu","wrapper","search"],(function(e,o){i.div[o]=t(".mapp-"+o,i.div.layout)})),this.poiList&&"inline"==s&&(this.div.list=t('<div class="mapp-inline mapp-list"></div>'),window.parent==window?this.div.layout.append(this.div.list):t(window.frameElement.parentElement).after(this.div.list)),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderList:function(){var t=this.getBounds(),i=0;if(this.editable)this.div.layout.trigger("mapp.render");else if(this.poiList){var o=this.pagination_.pageSize*(this.pagination_.page-1),n=o+this.pagination_.pageSize;if(!this.editable)for(var s=0;s<this.pois_.length;s++){var a=this.pois_[s];a.visible=!1,this.query?t&&t.contains(a.getPosition())&&(a.visible=!0,i++):(a.visible=!0,i++),a.visible=i>=o&&i<=n&&a.visible}this.pagination_.count=i,this.div.list.html(e.lib.template(this.templates.loop,{map:this,pois:this.pois_,pagination:this.pagination_})),mappl10n.options.thumbsList&&this.div.list.addClass(" mapp-thumb-"+mappl10n.options.thumbsList)}},renderMenu:function(){for(var e in this.layers_)t('[data-mapp-layer="'+e+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[e].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():e.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){var e=this,i="<a href='"+mappl10n.options.adminurl+"/admin.php?page=mappress'>"+__("MapPress Settings")+"</a>",o=jQuery&&jQuery.ui?jQuery.ui.version:"0.0",n="<a href ='http://mappresspro.com/mappress-faq' target='_blank'>"+__("MapPress FAQ")+"</a>",s="<a href='http://mappresspro.com/chris-contact', target='_blank'>"+__("contact support")+"</a>",a="<br/>"+sprintf(__("Please see the %s for help, or %s and provide this error message."),n,s),l=sprintf("<div class='mapp-errors-toolbar'><div class='mapp-errors-apikey'>%s</a></div>",__("Get an API Key"));this.div.layout.on("click",".mapp-errors-apikey",(function(){window.open("https://mappresspro.com/how-to-get-a-google-maps-api-key")}));var r=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:__("Leaflet library not loaded"),text:__("A theme or plugin is preventing the Leaflet library from loading.")+a},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:__("Google Maps API not loaded"),text:__("A theme or plugin is preventing Google Maps from loading.")+a},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:__("Google Maps API key required"),text:sprintf(__("Please enter a Google Maps API key in the %s, or switch to Leaflet maps."),i)+l},{condition:t('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1,title:__("Google Maps API loaded multiple times"),text:__("A theme or plugin has loaded Google Maps twice")+a},{condition:"undefined"==typeof _,title:__("Underscore library not loaded"),text:__("A theme or plugin is preventing the underscore.js library from loading.")+a},{condition:o<"1.12",title:sprintf(__("Obsolete jQuery version: %s, must be >= 1.12"),o),text:__("A theme or plugin is loading an obsolete version of jQuery.")+a}];if(_.map(r,(function(t){if(t.condition){mappl10n.options.admin&&e.sanityOutput({title:t.title,text:t.text?t.text:""});var i=jQuery("<span>"+t.text.replace("<br/>","\n")+"</span>").text();console.error(__("Map error")+": "+t.title+" - "+i)}})),"google"==mappl10n.options.engine){var p=console.error;console.error=function(t){(t.includes("Google Maps JavaScript API")||t.includes("You have exceeded your request quota")||t.includes("You have exceeded your daily quota"))&&mappl10n.options.admin&&(t=t.replace(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi,(function(t,e,i){var o=i;return o.match("^https?://")||(o="http://"+o),e+'<a href="'+o+'" target="_blank">'+i+"</a>"})),e.sanityOutput({title:__("Google Maps Error"),text:t})),p(t)}}},sanityOutput:function(e){if(!t(".mapp-errors-overlay",this.div.content).length){var i="<div class='mapp-errors-overlay'></div><div class='mapp-errors'><div class='mapp-errors-header'>"+__("Oops! Something went wrong.")+"</div><div class='mapp-errors-list'></div></div>";this.div.content.prepend(i)}t(".mapp-errors-list",this.div.content).append("<div class='mapp-errors-title'>"+e.title+"</div><div class='mapp-errors-text'>"+e.text+"</div>")},search:function(t){if(t&&t.geometry){var e=t.geometry.location?t.geometry.location:null,i=t.geometry.viewport?t.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var o=new L.LatLng(e.lat,e.lng),n=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):o.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:e,radius:1e3*mappl10n.options.radius});n=i?new google.maps.LatLngBounds(new google.maps.LatLng(i.sw.lat,i.sw.lng),new google.maps.LatLng(i.ne.lat,i.ne.lng)).union(s.getBounds()):s.getBounds()}n&&this.fitBounds(n),this.setView(e)}},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.dirty=i;break;case"mapTypeId":this.mapTypeId=i,this.setMapTypeId(i);break;case"poiList":this.poiList=null==i?mappl10n.options.poiList:i,this.togglePoiListOpen(this.poiList),this.toggleView("mini");break;case"style":this.setStyle(i);break;case"title":this.title=i;break;default:this[e]=i}}},setMapTypeId:function(t){var e=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),i=_.findWhere(e,{id:t});!mappl10n.options.style||"roadmap"!=t&&"streets"!=t&&i||(t=mappl10n.options.style),style=_.findWhere(e,{id:t}),style=style||e[0],this.setStyle(style)},setPois:function(t){if(this.resetPois(),t)for(var i=0;i<t.length;i++){var o=new e.Poi(t[i]);this.pois_.push(o),o.id=this.pois_.length-1,o.setMap(this)}this.clustersSet()},setSize:function(e){var i=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],o={},n={};if(e&&e.hasOwnProperty("width")&&(o={width:e.width?e.width:i.width}),e&&e.hasOwnProperty("height")){var s=e.height?e.height:i.height;n="string"==typeof s&&s.includes("%")?{"padding-bottom":s,height:"auto"}:{"padding-bottom":0,height:s}}window.parent==window?this.embed?(o={height:"100%"},n={"padding-bottom":0,height:"100%"}):(this.div.layout.css(o),this.div.wrapper.css(n)):(t(window.frameElement).parent().parent().css(o),t(window.frameElement).parent().css(n)),this.resize()},setStyle:function(i){if("leaflet"==mappl10n.options.engine){var o={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"}}[i.provider],n=t.extend({},o,i);L.tileLayer(o.url,n).addTo(this.map_)}else if(this.map_.setMapTypeId("standard"==i.type?i.id:"roadmap"),i.json){var s=null;try{s=JSON.parse(i.json)}catch(t){e.lib.log("Invalid JSON in map style")}this.map_.setOptions({styles:s||null})}else this.map_.setOptions({styles:null})},setView:function(t,e,i){"leaflet"==mappl10n.options.engine?(null==e&&(e=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(t,e,i)):(t=t&&!t.toJSON?{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}:t,e=e?parseInt(e):null,t&&this.map_.setCenter(t),e&&this.map_.setZoom(e))},sortPois:function(t){var e=Array();this.set({dirty:!0});for(var i=0;i<t.length;i++){var o=parseInt(t[i]);if(isNaN(o))return!1;e.push(this.pois_[o])}if(e.length!=this.pois_.length)return!1;this.pois_=e,this.renderList()},toggleLayer:function(e,i){var o=this;i=void 0!==i?i:null==this.layers_[e].getMap(),t.each(["traffic","bicycling","transit"],(function(t,e){o.layers_[e].setMap(null)})),i&&this.layers_[e].setMap(this.map_)},togglePoiListOpen:function(t){var e=this;this.div.layout.toggleClass("mapp-list-open",t),setTimeout((function(){return e.resize()}),100)},togglePois:function(t){t=!!t;for(var e=0;e<this.pois_.length;e++)this.pois_[e].setVisible(t)},toggleView:function(t,e){if("mini"==t){var i=this.div.layout.hasClass("mapp-view-mini"),o=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",o),void(o!=i&&this.togglePoiListOpen(!o))}e=void 0===e?!this.div.layout.hasClass("mapp-view-"+t):e,this.div.layout.toggleClass("mapp-view-"+t,e),"list"==t&&e&&this.renderList(),"menu"==t&&e&&this.renderMenu(),"directions"==t&&this.resize()},toJSON:function(){this.pois=[];for(var t=0;t<this.pois_.length;t++)this.pois.push(this.pois_[t].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,title:this.title,width:this.width,zoom:this.zoom}}}},397:()=>{var t,e=window.mapp||{};t=jQuery,e.Directions=function(e,i){this.sel=t(e),this.map=i;var o=this;this.sel.on("keydown",(function(t){13==t.which?(o.getDirections(),t.preventDefault()):27==t.which&&o.close()})),this.sel.on("click","[data-mapp-action]",(function(e){var i=t(this).attr("data-mapp-action"),n=t(".mapp-dir-daddr",o.sel).val(),s=t(".mapp-dir-saddr",o.sel).val();switch(e.preventDefault(),i){case"dir-cancel":o.close();break;case"dir-get":o.getDirections();break;case"dir-swap":t(".mapp-dir-saddr",o.sel).val(n),t(".mapp-dir-daddr",o.sel).val(s)}})),this.open=function(e,i){"google"!=mappl10n.options.directions?(this.map.toggleView("directions",!0),t(".mapp-dir-saddr",this.sel).val(e),t(".mapp-dir-daddr",this.sel).val(i)):this.openGoogle(e,i)},this.close=function(){this.map.toggleView("directions",!1)},this.getDirections=function(){var e=t(".mapp-dir-saddr",this.sel).val().trim(),i=t(".mapp-dir-daddr",this.sel).val().trim();this.map.poiClose(),this.openGoogle(e,i)},this.openGoogle=function(t,e){var i=mappl10n.options.directionsServer;-1==i.toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:(t,e,i)=>{"use strict";i.r(e);var o,n=i(991),s=i(574),a=window.mapp||{};a.geocoders={},o=jQuery,a.geocoders.algolia=function(t){this.map=t},a.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(t,e){var i="https://places-dsn.algolia.net/1/places/query?query="+encodeURIComponent(t)+"&hitsPerPage=5";i=mappl10n.options.country?i+"&countries="+mappl10n.options.country.toLowerCase():i,i=mappl10n.options.language?i+"&language="+mappl10n.options.language.toLowerCase():i+"&language=en";var a=this.map.getMap().getCenter();a&&(i+="&aroundLatLng="+a.lat+","+a.lng),o.getJSON(i,(function(i){if(i&&i.hits&&i.hits.length>0){var o=i.hits.map((function(e,o){return(0,n.Z)({formatInputValue:s.Z,hit:e,hitIndex:o,query:t,rawAnswer:i})}));e(o)}else e(null)}))}},function(t){a.geocoders.google=function(e){this.map=e,this.token=null;var i=t('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,i.remove()},a.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={fields:["formatted_address","name","geometry"],placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(t,i){if("OK"==i&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}e(t)}else e(null)}))},getFirstPrediction:function(e,i){var o=this;this.getPredictions(e,(function(e){e&&t.isArray(e)?o.getDetails(e[0],(function(t){return i(t)})):i(null)}))},getPredictions:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=this.map.getMap().getBounds();"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var o={input:t,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:this.map.editable?null:["geocode"]};this.autocompleteService.getPlacePredictions(o,(function(t,i){"OK"==i&&t&&t.length?(t=(t=t.map((function(t){return t.value=t.description,t}))).filter((function(t){return t.place_id})),e(t)):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),e(null))}))}}}(jQuery),function(t){a.geocoders.mapbox=function(t){this.map=t},a.geocoders.mapbox.prototype={getDetails:function(t,e){var i=t.place_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));var s=t.bbox&&4==t.bbox.length?{sw:{lat:t.bbox[1],lng:t.bbox[0]},ne:{lat:t.bbox[3],lng:t.bbox[2]}}:null;e({formatted_address:t.place_name,name:i,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:s}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+e+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o;var n=this.map.getMap().getCenter();n&&(o+="&proximity="+n.lng+","+n.lat),mappl10n.options.searchBox&&(o+="&bbox="+mappl10n.options.searchBox),t.getJSON(o,(function(t){t&&t.features&&t.features.length>0?(t.features=t.features.map((function(t){return t.value=t.label=t.place_name,t})),i(t.features)):i(null)}))}}}(jQuery),function(t){a.geocoders.nominatim=function(t){this.map=t},a.geocoders.nominatim.prototype={getDetails:function(t,e){var i=t.display_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));var s=t.boundingbox&&4==t.boundingbox.length?{sw:{lat:t.boundingbox[0],lng:t.boundingbox[2]},ne:{lat:t.boundingbox[1],lng:t.boundingbox[3]}}:null;e({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:s}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);if(o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,mappl10n.options.searchBox)o+="&viewbox="+mappl10n.options.searchBox,o+="&bounded=1";else{var n=this.map.getMap().getBounds();if(n){var s=n.getSouthWest(),a=n.getNorthEast();o+="&viewbox="+s.lng+","+s.lat+","+a.lng+","+a.lat}}t.getJSON(o,(function(t){t&&t.length?(t=t.map((function(t){return t.value=t.display_name,t})),i(t)):i(null)}))}}}(jQuery)},282:()=>{var t=window.mapp||{};t.Icons={},t.Icons.get=function(e){var i=t.Icons.getUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:i,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:i}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:()=>{var t,e=window.mapp||{};t=jQuery,e.Infobox=function(i,o){var n=this;this.map=i,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?i.getContainer():i.getDiv(),this.node=null,this.opts=_.extend({clip:!0,pan:!0,popout:!1},o),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null;var s=this;if(this.wrapper=t('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib-content"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div></div>'),this.wrapper.addClass(o.className),this.node=t(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?e.event.addListener(this.map,"move",(function(t){s.isOpen&&s.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=function(){s.isOpen&&s.draw()}),this.node.get(0).addEventListener("load",(function(){n.open({position:n.position,anchorPoint:n.anchorPoint})}),{capture:!0}),this.opts.popout)var a="body";else a="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();this.wrapper.appendTo(a),"leaflet"==mappl10n.options.engine&&i.on("load",(function(){L.DomEvent.disableClickPropagation(n.wrapper.get(0))}))},e.Infobox.prototype={clipToWindow:function(){var t=p.y,e=p.x-w/2+this.anchorPoint.x,i=this.mapDiv.getBoundingClientRect(),o=i.x+window.scrollX;t+=i.y+window.scrollY,e+=o;var n=this.opts.clip?divw:document.body.clientWidth;e+w>n&&(e=n-w),e<0&&(e=0),this.wrapper.css({left:e}),h=this.node.outerHeight(),t=p.y-h+this.anchorPoint.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&t<0&&t<divh-(p.y+h)&&(t=p.y,this.node.addClass("mapp-ib-flip"))},close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(this.position){var t,e;if(t=this.node.outerWidth(),this.node.outerHeight(),"leaflet"==mappl10n.options.engine)e=this.map.latLngToContainerPoint(this.position);else{var i=this.overlayView.getProjection();if(!i)return;e=i.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:e.x-t/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-e.y-this.anchorPoint.y})}},getContent:function(){return t(".mapp-ib",this.node)},open:function(e){this.position=e.position,this.anchorPoint=e.anchorPoint?e.anchorPoint:{x:0,y:0},this.opts.popout&&this.node.css({maxWidth:.8*this.mapDiv.clientWidth-this.fudge,maxHeight:this.mapDiv.clientHeight+this.anchorPoint.y-2*this.fudge}),this.wrapper.addClass("mapp-open"),this.draw();var i={w:t(this.mapDiv).width(),h:t(this.mapDiv).height()},o={w:this.node.outerWidth(),h:this.node.outerHeight()};this.opts.popout?this.clipToWindow():"leaflet"==mappl10n.options.engine?this.panLeaflet(i,o):this.panGoogle(o),this.isOpen=!0},panGoogle:function(t){var e=this.overlayView.getProjection(),i=e?e.fromLatLngToDivPixel(this.position):null;if(i){var o=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(i.x-t.w/2-this.fudge,i.y+this.fudge)),n=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(i.x+t.w/2+this.fudge,i.y-t.h+this.anchorPoint.y-this.fudge)),s=new google.maps.LatLngBounds(o,n);this.map.panToBounds(s)}},panLeaflet:function(t,e){var i=this.map.latLngToContainerPoint(this.position),o=(this.node.outerWidth(),this.node.outerHeight(),{x:i.x,y:i.y});i.x+e.w/2+this.anchorPoint.x>t.w-this.fudge?o.x=Math.max(t.w-e.w/2-this.anchorPoint.x-this.fudge,t.w/2-this.anchorPoint.x):i.x-e.w/2+this.anchorPoint.x<this.fudge&&(o.x=Math.min(e.w/2+this.anchorPoint.x+this.fudge,t.w/2-this.anchorPoint.x)),i.y+this.anchorPoint.y-e.h<this.fudge&&(o.y=e.h-this.anchorPoint.y+this.fudge),o.y>=t.h&&(o.y=t.h-this.fudge),this.map.panBy([i.x-o.x,i.y-o.y])},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:()=>{var t,e=window.mapp||{};t=jQuery,e.lib={ajax:function(e){var i=this,o={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"json"==e.dataType&&e.url==mappl10n.options.ajaxurl&&"OK"!=t.status&&console.log(t.status),"json"==e.dataType&&t.output?i.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,o,n){"cancel"!=o&&(void 0!==n&&""!=n&&i.alert("AJAX ERROR\r\nTextStatus="+o+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e=t.extend(o,e),t.ajax(e)},alert:function(t){function e(_x){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){mappl10n.options.admin||mappl10n.options.debug?alert(t):window.console&&console.error(t)})),jqVersionCheck:function(e){if(void 0===t||void 0===e)return!1;e=e.split("."),v=t.fn.jquery.split(".");for(var i=0;i<e.length;i++){var o=parseInt(e[i]),n=void 0!==v[i]?parseInt(v[i]):0;if(n!=o)return n>o}return!0},log:function(t){window.console&&console.error(t)},scrollTo:function(t,e,i){if(t&&e&&t.length&&e.length){var o=t.height(),n=e.outerHeight(!0),s=t.scrollTop(),a=s+e.position().top,l=a+n;a=a-o/2-n/2,i&&(a-=i.outerHeight(!0)),(a<s||l>s+o)&&t.scrollTop(a)}},template:function(i,o){if(e.lib.templates=e.lib.templates?e.lib.templates:{},!e.lib.templates[i]){var n=mappl10n.options.templates?mappl10n.options.template[i]:t("#mapp-tmpl-"+i).html();if(!n)return"";e.lib.templates[i]=_.template(n.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return e.lib.templates[i](o)},uniqid:function(){return void 0===e.lib.uniqidCounter?e.lib.uniqidCounter=0:e.lib.uniqidCounter++,e.lib.uniqidCounter}},e.lib.jqVersionCheck("1.7")||e.lib.alert("jQuery version is too old: "+t.fn.jquery),t("body").on("tabsactivate tabsshow",(function(e,i){var o=i.newPanel?i.newPanel:i.panel;o&&t(".mapp-layout",o).each((function(){var e=t(this).find(".mapp-canvas").attr("id"),i=window[e];i.resize(),i.recenter()}))})),jQuery,"leaflet"==mappl10n.options.engine&&"undefined"!=typeof L&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6}),e.event={addListener:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.on(e[o],i):google.maps.event.addListener(t,e[o],i)},addListenerOnce:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.once(e[o],i):google.maps.event.addListenerOnce(t,e[o],i)},clearInstanceListeners:function(t){"leaflet"==mappl10n.options.engine?t.off():google.maps.event.clearInstanceListeners(t)},clearListeners:function(t,e){e=e.split(" ");for(var i=0;i<e.length;i++)"leaflet"==mappl10n.options.engine?t.off(e[i]):google.maps.event.clearListeners(t,e[i])},trigger:function(t,e,i){"leaflet"==mappl10n.options.engine?t.fire(e,i):google.maps.event.trigger(t,e,i)}},function(t){e.lib.Modal=function(){this.el=null;var e=this;this.el=t('<div class="mapp-modal" tabindex="0">').append('<div class="mapp-modal-backdrop">').append('<div class="mapp-modal-content" tabindex="1">'),this.el.hide(),this.el.on("click",".mapp-modal-backdrop",(function(){e.close()})),this.el.on("click",".mapp-modal-close",(function(){e.close()})),this.el.on("keydown",(function(t){27==t.which&&e.close()}))},e.lib.Modal.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),t("body").removeClass("mapp-modal-noscroll"))},focus:function(){t(".mapp-modal-focus",this.el).attr("tabindex",0),t(".mapp-modal-focus",this.el).focus()},open:function(){if(!this.el.parent().length){var e=t("body",window.parent.document);this.el.appendTo(e)}this.el.show(),t("body").addClass("mapp-modal-noscroll"),this.focus()},setContent:function(e){t(".mapp-modal-content",this.el).empty(),t(".mapp-modal-content",this.el).append('<div class="mapp-modal-close">&times;').append(e),this.focus()}}}(jQuery)},692:()=>{var t=window.mapp||{};jQuery,t.load=function(){if(void 0!==t&&t.data)for(;t.data.length;){var e=t.data.pop();window[e.name]=new t.Map(e),window[e.name].display()}},t.load()},436:()=>{var t,e=window.mapp||{};t=jQuery,e.Marker=function(t){var e=this;this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(t),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=function(){return e.draw()},this.overlayView.onAdd=function(){return e.onAdd()},this.overlayView.onRemove=function(){return e.onRemove()}},e.Marker.prototype={draw:function(){if(this.div&&this.icon){var e=this.overlayView.getProjection();if(e){var i=e.fromLatLngToDivPixel(this.position),o=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};t(this.div).css({left:i.x-o.width/2,top:i.y-o.height})}}},getDiv:function(){return this.div},getDraggable:function(){return this.draggable},getMap:function(){return this.map},getPosition:function(){return this.position},getVisible:function(){return this.visible},handleEvent:function(t){var e="on"+t.type[0].toUpperCase()+t.type.slice(1);this[e]&&this[e](t)},onAdd:function(){var i=this,o=this.overlayView.getPanes();this.div=t('<div class="mapp-marker">'),this.div.appendTo(o.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(function(){(!i.dragging||i.dragging&&!i.dragging.moved)&&e.event.trigger(i,"click"),i.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable)},onMouseenter:function(t){e.event.trigger(this,"mouseover")},onMouseleave:function(t){e.event.trigger(this,"mouseout")},onPointerdown:function(t){var e=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:t.clientX,y:t.clientY},offset:{x:i.x-(t.clientX-e.left),y:i.y-(t.clientY-e.top)}},this.toggleDragEvents(!0)},onPointermove:function(t){if(!(Math.abs(t.clientX-this.dragging.startPixel.x)+Math.abs(t.clientY-this.dragging.startPixel.y)<3)){var i=this.map.getDiv().getBoundingClientRect(),o={x:t.clientX-i.left+this.dragging.offset.x,y:t.clientY-i.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(o)),this.draw(),this.dragging.moved=!0,e.event.trigger(this,"dragstart")}},onPointercancel:function(t){this.onPointerup(t)},onPointerup:function(t){this.dragging&&this.dragging.moved&&e.event.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(t,e){var i="set"+t[0].toUpperCase()+t.slice(1);this[i]&&this[i](e)},setDraggable:function(t){this.draggable=t,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),t&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(t){if(void 0!==t&&(this.icon=t),this.icon&&this.div){var e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);var i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:i.width,height:i.height}),this.setZIndex(),this.draw()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(var e in t)this.set(e,t[e])},setVisible:function(t){this.visible=t,this.div&&this.div.css("visibility",t?"visible":"hidden")},setZIndex:function(t){this.zIndex=void 0!==t?t:this.zIndex,this.div&&this.div.css("z-index",t)},toggleDragEvents:function(t){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),t&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},510:()=>{var t,e=window.mapp||{};t=jQuery,e.Places=function(i,o){var n=this;this.sel=t(i),this.opts=t.extend({map:null},o);var s="";s="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new e.geocoders[s](this.opts.map),this.sel.on("keydown",(function(e){13==e.which&&(e.preventDefault(),e.stopImmediatePropagation(),n.sel.autocomplete("close"),n.parse(n.sel.val(),(function(e){e&&t(n).triggerHandler("search.mapp",e)})))})),t(".mapp-search-button",this.sel.parent()).on("click",(function(){n.parse(n.sel.val(),(function(e){e&&(n.sel.autocomplete("close"),t(n).triggerHandler("search.mapp",e))}))})),this.initAutocomplete()},e.Places.prototype={parse:function(t,e){var i="";if(t&&(i="string"==typeof(i=t&&t.name?t.name:t)?i.trim():i),i)if("string"!=typeof i||"http"!=i.substring(0,4))if("user"!=i)if(t&&t.geometry)e(t);else{var o=this.parseLatLng(t);o?e(o):this.geocoder.getFirstPrediction(t,(function(t){e(t)}))}else this.geolocate((function(t){e(t)}));else e(i);else e(null)},parseLatLng:function(t){var e;if(t.hasOwnProperty("lat")&&t.hasOwnProperty("lng"))e=t;else{var i=t&&t.name?t.name:t,o=(i="string"==typeof i?i.trim():i).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(e={lat:n,lng:s})}}return e?{name:e.lat+", "+e.lng,geometry:{location:e}}:null},geolocate:function(t,e){var i=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(e){var o={lat:e.coords.latitude,lng:e.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),i.sel.val("")}),(function(i){if(!e){var o=i&&i.message?" : "+i.message:"";alert(mappl10n.no_geolocate+o)}t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;this.sel&&this.sel.length&&(this.sel.on("autocompleteselect",(function(i,o){e.geocoder.getDetails(o.item,(function(i){e.parse(i,(function(i){i&&t(e).triggerHandler("search.mapp",i)}))}))})),this.sel.autocomplete({appendTo:this.sel.parent(),autoFocus:!0,minLength:1,delay:"nominatim"===mappl10n.options.geocoder?500:300,source:function(t,i){e.geocoder.getPredictions(t.term,(function(t){i(t)}))}}))}}},548:()=>{var t,e=window.mapp||{};t=jQuery,e.Poi=function(i){if(this.defaults={address:null,body:null,html:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},t.extend(this,this.defaults,i),i&&i.correctedAddress&&(this.address=i.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),i.viewport&&i.viewport.sw&&i.viewport.ne&&i.viewport.sw.lat){var o=i.viewport.sw,n=i.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(o.lat,o.lng),L.latLng(n.lat,n.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(o.lat,o.lng),new google.maps.LatLng(n.lat,n.lng))}var s=[],a=[];if(!i.overlay)switch(this.type){case"polygon":if(i.poly&&i.poly.paths)for(var l=0;l<i.poly.paths.length;l++){s=[];for(var r=0;r<i.poly.paths[l].length;r++)s.push(new google.maps.LatLng(i.poly.paths[l][r].lat,i.poly.paths[l][r].lng));a.push(new google.maps.MVCArray(s))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(a)}),this.setColors(i.poly);break;case"polyline":if(i.poly&&i.poly.path)for(l=0;l<i.poly.path.length;l++)s.push(new google.maps.LatLng(i.poly.path[l].lat,i.poly.path[l].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(s)}),this.setColors(i.poly);break;case"circle":var p=new google.maps.LatLng(i.point.lat,i.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(i.poly.radius)}),this.setColors(i.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(i.poly);break;case"kml":var h=i.kml&&i.kml.url?i.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(h):new google.maps.KmlLayer({url:h,preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([i.point.lat,i.point.lng]):this.overlay=new e.Marker({position:new google.maps.LatLng(i.point.lat,i.point.lng)})}i.type||this.set({iconid:i.iconid})},e.Poi.prototype={center:function(t){var e=this.getBounds();if("number"!=typeof t)if(e){var i=e.getNorthEast().toJSON().lng-e.getSouthWest().toJSON().lng;i<0&&(i+=360),t=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),t,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),t)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(t){switch(this.isPoly()?"poly":this.type){case"kml":return t&&t.pixelOffset?{x:t.pixelOffset.width,y:t.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 t;switch(this.type){case"polyline":t=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(e){t.extend(e)}));break;case"polygon":t=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(e){e.forEach((function(e){t.extend(e)}))}));break;case"rectangle":case"circle":t=this.overlay.getBounds();break;case"kml":t=(t="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||this.viewport;break;default:return this.viewport}return t},getColors:function(){var t={};for(var e in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[e]&&(t[e]=this.overlay[e]);return t},getPosition:function(t){if(!this.type)return"leaflet"==mappl10n.options.engine?this.overlay.getLatLng():this.overlay.getPosition();if("kml"==this.type&&t&&t.latLng)return t.latLng;var e=this.getBounds();return e?e.getCenter():"leaflet"==mappl10n.options.engine?new L.latLng(0,0):new google.maps.LatLng(0,0)},getTemplateColors:function(){var t=this.getColors();return"polyline"==this.type?{color:t.strokeColor,opacity:100*t.strokeOpacity,weight:t.strokeWeight}:{color:t.fillColor,opacity:100*t.fillOpacity,weight:t.strokeWeight}},highlight:function(i){if(!this.type){var o="leaflet"==mappl10n.options.engine?t(this.overlay._icon):this.overlay.getDiv();if(o){var n=this.editable?"circle":mappl10n.options.highlight;switch(n){case"circle":o.toggleClass("mapp-marker-circle",i);break;case"icon":var s=i?e.Icons.get(mappl10n.options.highlightIcon):e.Icons.get(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==s.options.iconUrl)return;this.overlay.setIcon(s);break;case"scale":o.addClass("mapp-marker"),o.toggleClass("mapp-marker-scale",i)}this.setZIndex(i?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(t){this.map.poiOpen(this,t)},fetchPost:function(t){var i=this;this.html?t():e.lib.ajax({type:"GET",data:{action:"mapp_get_post",postid:this.postid,nonce:mappl10n.options.nonce},dataType:"html",callback:function(e){i.html=e,t()}})},render:function(t,i){var o={};return o=_.extend(o,this,{icon:e.Icons.getUrl(this.iconid)}),i&&(o.body=i.description,o.title=i.name),o.thumbnail=mappl10n.options.thumbsPopup&&"popup"==t||mappl10n.options.thumbsList&&"item"==t?o.thumbnail:null,e.lib.template(this.map.templates[t],{poi:o,colors:this.getTemplateColors()})},set:function(t){for(var i in t){var o=t[i];switch(i){case"dirty":this.map.set({dirty:o});break;case"iconid":this.type||(this.iconid=o,this.overlay.setIcon(e.Icons.get(o)));break;default:this[i]=o}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty})},setColors:function(t){var e={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})t&&void 0!==t[i]&&(e[i]=t[i]);this.overlay.setOptions(e)},setEditable:function(t){var i=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),e.event.clearListeners(this.overlay,"rightclick"),e.event.clearListeners(this.overlay,"dragstart"),t&&(e.event.addListener(this.overlay,"dragstart",(function(){i.viewport=null,i.map.poiClose()})),e.event.addListener(this.overlay,"dragend",(function(){i.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(e.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&i.overlay.getPath().getLength()>2&&i.overlay.getPath().removeAt(t.vertex)})),e.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){i.map.set({dirty:!0})})))))},setMap:function(t){var i=this;this.map=t,e.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(e.event.addListenerOnce(this.overlay,"ready",(function(){i.viewport=i.overlay.getBounds()})),e.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(e.event.addListener(this.overlay,"defaultviewport_changed",(function(){i.viewport=i.overlay.getDefaultViewport()})),e.event.addListener(this.overlay,"status_changed",(function(){var t=i.overlay.getStatus();"OK"!=t&&alert(mappl10n.kml_error+":"+t)})))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap())),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),e.event.addListener(this.overlay,"mouseover",(function(t){i.map.poiHover(i)})),e.event.addListener(this.overlay,"mouseout",(function(t){i.map.poiHover(null)}))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t){var e=t.color,i=t.opacity,o=t.weight;i=i?i/100:void 0;var n="polyline"==this.type?{strokeColor:e,strokeOpacity:i,strokeWeight:o}:{fillColor:e,fillOpacity:i,strokeColor:e,strokeWeight:o,strokeOpacity:1};this.setColors(n)},setVisible:function(t){void 0!==this.overlay.setVisible&&this.overlay.setVisible(t)},setZIndex:function(t){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(t):this.overlay.set("zIndex",t)},toJSON:function(){var t={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},e=this.getPosition();t.point=e.toJSON();var i=this.viewport?this.viewport:this.getBounds();if(i){var o=i.toJSON();t.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}if("kml"==this.type&&(t.kml=this.kml),this.isPoly())switch(t.poly=this.getColors(),this.type){case"circle":t.poly.radius=this.overlay.getRadius();break;case"polyline":t.poly.path=[],this.overlay.getPath().forEach((function(e){t.poly.path.push(e.toJSON())}));break;case"polygon":t.poly.paths=[],this.overlay.getPaths().forEach((function(e){var i=[];e.forEach((function(t){i.push(t.toJSON())})),t.poly.paths.push(i)}));break;case"rectangle":var n=this.overlay.getBounds();t.viewport={sw:n.getSouthWest().toJSON(),ne:n.getNorthEast().toJSON()}}return t}}},675:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0;e<t.length;e++){var i=t[e].match(/country\/(.*)?/);if(i)return i[1]}return}},892:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var i in e)if(-1!==t.indexOf(i))return e[i];return"address"}},991:(t,e,i)=>{"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,r=t.rawAnswer;try{var h=i.locale_names[0],c=i.country,d=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,u=i.city&&i.city[0]!==h?i.city[0]:void 0,g=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,m=i.county&&i.county[0]!==h?i.county[0]:void 0,v=i.postcode&&i.postcode.length?function(t,e){for(var i=e[0].value,o=[],n=1;n<e.length;++n)"none"!==e[n].matchLevel&&o.push({index:n,words:e[n].matchedWords});if(0===o.length)return{postcode:t[0],highlightedPostcode:i};return o.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),{postcode:t[o[0].index],highlightedPostcode:e[o[0].index].value}}(i.postcode,i._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},f=v.postcode,y=v.highlightedPostcode,w={name:p(i._highlightResult.locale_names),city:u?p(i._highlightResult.city):void 0,administrative:d?p(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:g?p(i._highlightResult.suburb):void 0,county:m?p(i._highlightResult.county):void 0,postcode:y},b={name:h,administrative:d,county:m,city:u,suburb:g,country:c,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:f,postcodes:i.postcode&&i.postcode.length?i.postcode:void 0},L=e(b);return l(l({},b),{},{highlight:w,hit:i,hitIndex:s,query:a,rawAnswer:r,value:L})}catch(t){return console.error("Could not parse object",i),console.error(t),{value:"Could not parse object"}}};var o=s(i(675)),n=s(i(892));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function p(t){for(var e=t[0].value,i=[],o=1;o<t.length;++o)"none"!==t[o].matchLevel&&i.push({index:o,words:t[o].matchedWords});return 0===i.length?e:(i.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),0===i[0].index?"".concat(e," (").concat(t[i[1].index].value,")"):"".concat(t[i[0].index].value," (").concat(e,")"))}},574:(t,e)=>{"use strict";e.Z=function(t){var e=t.administrative,i=t.city,o=t.country,n=t.name,s=t.type;return"".concat(n).concat("country"!==s&&void 0!==o?",":"","\n ").concat(i?"".concat(i,","):"","\n ").concat(e?"".concat(e,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()}}},e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.exports}i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(854),i(397),i(442),i(282),i(689),i(436),i(510),i(548),i(692)})();
build/index_mappress_admin.js CHANGED
@@ -1 +1 @@
1
- (()=>{var e={844:()=>{function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(t){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var r=wp.element.createElement,i=wp.element,l=(i.Fragment,i.useEffect),s=(i.useLayoutEffect,i.useRef,i.useState),c=wp.components,p=c.Button,u=c.Modal,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function d(e){var n,o,i=a(s({isOpen:!1,reason:"",reasonText:"",redirectUrl:null}),2),c=i[0],d=i[1];function m(e){d((function(n){return t(t({},n),e)}))}function f(e,t){switch(e){case"cancel":m({isOpen:!1});break;case"submit":m({isOpen:!1}),window.location.href=c.redirectUrl+"&mapp_reason="+c.reason+"&mapp_reason_text="+encodeURIComponent(c.reasonText.trim())}}return l((function(){var e=jQuery("#deactivate-mappress-google-maps-for-wordpress");e.length&&(e.off("click.mapp"),e.on("click.mapp",(function(){var e,t;return(t=(e=this)?jQuery(e).attr("href"):null)&&m({isOpen:!0,redirectUrl:t}),!1})))}),[]),c.isOpen?r(u,{isDismissible:!0,onRequestClose:function(){return f("cancel")},shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,title:__("Feedback")},(o=!c.reason||"other"==c.reason&&!c.reasonText,sprintf("<a href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>",__("contact me")),r("div",{className:"mapp-deactivate"},r("div",{className:"mapp-deactivate-content"},r("h2",null,__("Sorry to see you go! Need help?"),r(p,{className:"mapp-deactivate-help",isSecondary:!0,href:"https://mappresspro.com/chris-contact",target:"_blank"},__("Contact me"))),r("h2",null,__("If not, I'd really appreciate some feedback:")),(n=[{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?")}],r("div",{className:"mapp-deactivate-reasons"},_.map(n,(function(e){var t=e.value==c.reason;return r("div",{className:"mapp-deactivate-reason",key:e.value},r("label",null,r("input",{checked:t,onChange:function(e){return m({reason:e.target.value})},type:"radio",value:e.value}),e.label),t&&e.placeholder&&r("div",null,r("textarea",{onChange:function(e){return m({reasonText:e.target.value})},placeholder:e.placeholder,value:c.reasonText})))}))))),r("div",{className:"mapp-deactivate-footer"},r(p,{isSecondary:!0,disabled:o,onClick:function(){return f("submit")}},__("Deactivate")),r(p,{isPrimary:!0,onClick:function(){return f("cancel")}},__("Cancel")))))):null}jQuery(document).ready((function(){var e=jQuery("<div></div>").appendTo("body").get(0);wp.element.render(r(d),e)}))},215:(e,t,n)=>{"use strict";n.r(t);var a=n(525),o=n(143);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s,c=window.mapp||{},p=wp.element.createElement;s=jQuery,c.Editor=function(e){this.drawingManager=null,this.map=e,this.poiEditor=null;var t=this;this.initialize=function(){this.map.display(),this.poiEditor=new c.PoiEditor(this.map),this.initDrawingManager(),s(this.map.places).off("search.mapp"),s(this.map.places).on("search.mapp",(function(e,n){t.insert(n)}))},this.insert=function(e){if(e)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.poiClose(),e.geometry){var n=e.formatted_address?e.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,a=e.name==n?"":n,o=new c.Poi({address:n,body:a,iconid:this.poiEditor.lastIcon,point:e.geometry.location,title:e.name,viewport:e.geometry.viewport?e.geometry.viewport:null});this.map.poiInsert(o),o.center()}else e.overlay?(this.map.poiHover(null),"marker"==e.type?(o=new c.Poi({body:"",iconid:null,overlay:null,point:e.overlay.getPosition().toJSON(),title:e.overlay.getPosition().toUrlValue(6),type:null}),e.overlay.setMap(null)):o=new c.Poi({body:"",iconid:null,overlay:e.overlay,title:mappl10n.shape,type:e.type}),this.map.poiInsert(o)):"string"==typeof e&&"http"==e.substring(0,4)&&(o=new c.Poi({iconid:this.poiEditor.lastIcon,kml:{url:e},title:"KML",type:"kml"}),t.map.poiInsert(o),c.event.addListenerOnce(o.overlay,"ready defaultviewport_changed",(function(){o.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()),c.event.addListener(this.drawingManager,"overlaycomplete",(function(e){t.drawingManager.get("drawingMode")&&t.insert(e)})))},this.initialize.apply(this)},c.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,n){t.render(n)})),s(this.map).on("mapp.close",(function(){t.mce(!1)})),this.sel.on("click","[data-mapp-poi]",(function(e){e.preventDefault();var n=s(this).attr("data-mapp-poi");t[n]()})),this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",(function(e){var n=s(this).hasClass("mapp-poi-visual");t.mce(n)})),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 n={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(n),this.mce(!0)}},this.mce=function(e){var n=e?"mceAddEditor":"mceRemoveEditor";"undefined"!=typeof tinyMCE&&tinyMCE.execCommand(n,!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){var t=this;document.getElementById("mapp-poi-colorpicker")&&wp.element.render(p(a.MappColorPicker,i(i({},e.getTemplateColors()),{},{isExtended:!0,onChange:function(n){e.set({dirty:!0}),e.setTemplateColors(n),t.map.renderList(),t.renderColorPicker(e)}})),document.getElementById("mapp-poi-colorpicker"))},this.renderIconPicker=function(e){var t=this;document.getElementById("mapp-poi-iconpicker")&&wp.element.render(p(o.MappIconPicker,{iconid:e.iconid,onChange:function(n){e.set({dirty:!0,iconid:n}),t.lastIcon=n,t.map.renderList(),t.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,n)=>{"use strict";function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}n.r(t),n.d(t,{default:()=>y});var s=wp.element.createElement,c=wp.url.addQueryArgs,p=wp.element,u=p.useCallback,d=p.useEffect,m=p.useState,f=wp.components,h=(f.Button,f.Dropdown),g=f.Spinner,b=f.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function y(e){var t=i(m({isFetching:!1,results:[],search:"",searchTerm:""}),2),n=t[0],a=t[1];function r(e){a((function(t){return o(o({},t),e)}))}d((function(){n.isOpen&&(r({isFetching:!0}),wp.apiFetch({path:c("/wp/v2/search",{search:n.search,per_page:20})}).then((function(e){r({results:e,isFetching:!1})})))}),[n.search,n.isOpen]);var l=u(_.debounce((function(e){r({search:e})}),1e3),[]);function p(t,a){return s("div",{className:"mapp-attach-control"},s("div",{className:"mapp-attach-control-toolbar"},s(b,{autoComplete:"false",value:n.searchTerm,onChange:function(e){r({searchTerm:e}),l(e)},placeholder:__("Search")})),function(){if(n.isFetching)return s(g,null);if(n.results)return n.results.length?s("div",{className:"mapp-attach-items"},n.results.map((function(t){return s("div",{key:t.id,className:"mapp-attach-item",onClick:function(){e.onChange(t.id,t.title)}},s("div",{className:"mapp-attach-item-title"},t.title?t.title:__("Untitled")),s("div",{className:"mapp-attach-item-type"},t.type))}))):s("div",{},__("No posts found"))}())}return s("div",{onClick:function(e){return e.stopPropagation()}},s(h,{onToggle:function(e){return r({isOpen:e})},renderToggle:function(e){e.isOpen;var t=e.onToggle;return s("a",{href:"#",onClick:t},__("Attach"))},renderContent:function(e){e.isOpen,e.onToggle;return p()}}))}},525:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappColorPicker:()=>y});var a=n(824);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var c=wp.element.createElement,p=wp.element,u=p.Fragment,d=p.useEffect,m=(p.useLayoutEffect,p.useCallback,p.useRef,p.useState),f=(wp.data.useSelect,wp.compose.withState,wp.components),h=f.Button,g=(f.ColorPalette,f.ColorPicker),b=(f.Dashicon,f.Dropdown,f.ExternalLink,f.Modal),__=(f.Panel,f.PanelBody,f.PanelRow,f.Popover,f.RadioControl,f.Spinner,f.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function y(e){var t=l(m({isCustomOpen:!1,isOpen:!1}),2),n=t[0],o=t[1];function i(e){o((function(t){return r(r({},t),e)}))}function s(t,n){switch(t){case"close":i({isOpen:!1});break;case"open":i({isOpen:!0});break;case"select":e.onChange(n),s("close");break;case"set":e.onChange(n)}}return d((function(){}),[]),c(u,null,c("span",{className:"mapp-colors-toggle",onClick:function(){return s("open",null)},style:{backgroundColor:e.color,border:e.isExtended?"1px solid "+e.color:"1px solid gray",opacity:e.isExtended&&e.opacity?e.opacity/100:1},tabIndex:0}),function(){if(!n.isOpen)return null;var t=_.map([100,90,80,70,60,50,40,30,20,10,0],(function(e){return{label:e+"%",value:e}})),o=_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],(function(e){return{label:e+"px",value:e}}));return c(b,{title:__("Select a color"),className:"mapp-colors-modal",onRequestClose:function(e){return s("close")}},c("div",{className:"mapp-colors"},c("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"]],(function(t,n){return c("div",{key:n},_.map(t,(function(t){return c("span",{className:"mapp-color"+(t==e.color?" mapp-selected":""),key:t,onClick:function(){i({isCustomOpen:!1}),s("select",{color:t})},style:{backgroundColor:t},title:t})})))}))),n.isCustomOpen&&c(g,{color:e.color,onChangeComplete:function(e){return s("set",{color:e.hex})},disableAlpha:!0}),e.isExtended&&c(a.Select,{label:__("Opacity"),options:t,value:e.opacity?e.opacity:"",onChange:function(e){return s("set",{opacity:e})}}),e.isExtended&&c(a.Select,{label:__("Stroke"),options:o,value:e.weight?e.weight:"",onChange:function(e){return s("set",{weight:e})}}),c("div",{className:"mapp-colors-toolbar"},c(h,{isPrimary:!0,onClick:function(){return s("close")}},__("Done")),c(h,{onClick:function(){return i({isCustomOpen:!n.isCustomOpen})}},__("Custom color")))))}())}},371:(e,t,n)=>{"use strict";n.r(t);var a=n(477);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}wp&&wp.plugins&&wp.plugins.registerPlugin&&wp.editPost&&wp.plugins.registerPlugin("mappress-document-settings-panel",{render:function(){var e,t,n=wp.editPost.PluginDocumentSettingPanel,o=wp.element.createElement,i=wp.element,s=i.Fragment,c=i.useEffect,p=(i.useLayoutEffect,i.useRef,i.useState),u=wp.components,d=u.Button,m=u.Spinner,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")},f=l(p({isFetchingItems:!0,isPickerOpen:!1,items:null,pickerMapid:null,pickerMode:"list"}),2),h=f[0],g=f[1];function b(e){g((function(t){return r(r({},t),e)}))}function y(e,t){switch(e){case"open-library":b({isPickerOpen:!0,pickerMode:"list"});break;case"edit":b({isPickerOpen:!0,pickerMapid:t,pickerMode:"edit"});break;case"pick-close":b({isPickerOpen:!1,pickerMapid:null});break;case"pick-insert":var n=wp.blocks.createBlock("mappress/map",{mapid:t});wp.data.dispatch("core/block-editor").insertBlock(n,0),b({isPickerOpen:!1,pickerMapid:null})}}function v(e){var t=e.map_title?e.map_title:__("Untitled");return o("div",{className:"mapp-document-item",key:e.mapid+e.postid},o("a",{className:"mapp-document-col-map_title",href:"#",onClick:function(t){return y("edit",e.mapid)}},t),o("div",{className:"mapp-document-col-mapid"},e.mapid))}return c((function(){var e=function(e){b({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return mapp.store.subscribe(e),function(){return mapp.store.unsubscribe(e)}})),c((function(){mapp.store.fetchItems()}),[]),o(n,{title:"MapPress",className:"mapp-document-panel"},(t=_.filter(h.items,(function(e){return e.postid==mappl10n.options.postid})),e=h.isFetchingItems?o(m,null):t.length?o(s,null,o("div",{className:"mapp-document-header"},o("div",{className:"mapp-document-col-map_title"},__("Map title")),o("div",{className:"mapp-document-col-mapid"},null,__("Map ID"))),_.map(t,v)):o("div",{className:"mapp-document-message"},__("No maps found")),o("div",null,o("div",{className:"mapp-document-list"},e))),o(d,{icon:"portfolio",isSecondary:!0,onClick:function(){return y("open-library")}},__("Open map library")),function(){if(h.isPickerOpen)return o(a.default,{mapid:h.pickerMapid,mode:h.pickerMode,onAction:y,type:"post"})}())},icon:null})},999:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var a=n(429),o=n(710);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p=window.mapp||{},u=wp.element.createElement,d=wp.element,m=(d.Fragment,d.useEffect),f=(d.useLayoutEffect,d.useRef),h=d.useState,g=wp.components,b=g.Button,y=(g.Dropdown,g.Modal,g.Panel,g.PanelBody,g.Popover,g.Spinner,g.TextControl),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function v(e){var t,n,r=s(h({dragging:null,dragover:null,isFetchingMap:!!e.mapid,isPoiListOpen:!0,isSavingMap:!1,map:null,mapdata:null}),2),l=r[0],c=r[1],d=f(null);function g(e){c((function(t){return i(i({},t),e)}))}function v(e){g({map:l.map})}function w(t,n){switch(t){case"change-settings":l.map.set(n),g({map:l.map});break;case"change-title":l.map.set({dirty:!0,title:n}),g({map:l.map});break;case"close":e.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(p.store.destroyMap({mapid:e.mapid}),e.onAction("edit-destroy"));break;case"save":p.store.saveMap({mapdata:l.map.toJSON(),success:function(t){l.map.set({dirty:!1}),e.onAction("edit-save",t.mapid)}})}}return m((function(){l.map&&(jQuery(l.map.div.layout).off("mapp.render",v),jQuery(l.map.div.layout).on("mapp.render",(function(e){return v()})))}),[l.map]),m((function(){var t=function(t){g({isFetchingMap:t.isFetchingMap,isSavingMap:t.isSavingMap,mapdata:t.maps[e.mapid]})};return p.store.subscribe(t),function(){return p.store.unsubscribe(t)}})),m((function(){e.mapid&&p.store.fetchMap({mapid:e.mapid})}),[e.mapid]),m((function(){if(!l.isFetchingMap){var t={editable:!0,embed:!0,layout:"left",mapOpts:{streetViewControl:!1},menu:!1,name:"media-map",poiList:!1,sel:jQuery(d.current)};"map"!=e.context&&"mashup"!=e.context||(t.center=null,t.zoom=null);var n=new p.Map(l.mapdata,t);new p.Editor(n);g({map:n})}}),[l.mapdata]),m((function(){l.map&&setTimeout((function(){return l.map.resize()}),100)}),[l.isPoiListOpen]),u("div",{className:"mapp-edit"},(t=l.map&&!l.isFetchingMap&&l.map.title?l.map.title:"",n=l.map&&!l.isFetchingMap?__("Untitled"):"",u("div",{className:"mapp-gt-modal-header"},u(y,{className:"mapp-edit-title",placeholder:n,value:t,onChange:function(e){return w("change-title",e)}}))),u("div",{className:"mapp-edit-main"},u("div",{className:"mapp-list mapp-edit-list"+(l.isPoiListOpen?" mapp-list-open":"")},u("div",{className:"mapp-edit-list-wrapper"},function(){if("mce"!=e.context&&"library"!=e.context)return null;if(!l.map)return null;var t=l.map,n=t.center,o=t.height,r=t.poiList,i=t.width,s=t.zoom;return u("div",{className:"mapp-gt-inspector"},u(a.MappSettings,{map:l.map,context:e.context,onAction:w,center:n,height:o,poiList:r,width:i,zoom:s}))}(),function(){if(l.map){var e=function(e,t){var n=l.dragging,a=n<a?t-1:t;l.map.pois_.splice(a,0,l.map.pois_.splice(n,1)[0]),g({map:l.map,dragover:null})};return u("div",{className:"mapp-items"},_.map(l.map.pois_,(function(t,n){return u("div",{className:l.dragover==n?"mapp-item mapp-edit-dragover":"mapp-item",draggable:!0,key:n,onClick:function(){return l.map.poiOpen(l.map.pois_[n])},onDragOver:function(e){return e.preventDefault()},onDragStart:function(e){return g({dragging:n})},onDragEnter:function(e){return g({dragover:n})},onDragEnd:function(e){return g({dragging:null,dragover:null})},onDrop:function(t){return e(t,n)}},u("img",{className:"mapp-icon",src:p.Icons.getUrl(t.iconid)}),u("div",{className:"mapp-title"},t.title))})))}}()),u("div",{className:"mapp-list-toggle",onClick:function(){return g({isPoiListOpen:!l.isPoiListOpen})}})),u("div",{className:"mapp-edit-map",key:e.mapid,ref:d,onKeyDown:function(e){return e.stopPropagation()},tabIndex:-1}),d.current&&l.map?u(o.m,{map:l.map,selected:l.map.mapTypeId,onChange:function(e){return w("change-settings",{mapTypeId:e})}}):null),u("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(e){return e.stopPropagation()}},u(b,{isPrimary:!0,isBusy:l.isSavingMap,onClick:function(){return w("save")}},__("Save")),u(b,{disabled:l.isSavingMap,onClick:function(){return w("close")}},__("Cancel")),u(b,{disabled:!e.mapid||l.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return w("destroy")}},__("Delete"))))}},143:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappIconPicker:()=>S});var a=n(525),o=n(824);function r(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var d=wp.element.createElement,m=wp.element,f=m.Fragment,h=m.useEffect,g=(m.useLayoutEffect,m.useCallback,m.useRef,m.useState),b=(wp.data.useSelect,wp.compose.withState,wp.components),y=b.Button,v=(b.ColorPicker,b.DropZone,b.DropZoneProvider,b.FormFileUpload),w=b.Modal,k=(b.Popover,b.RangeControl),__=(b.Spinner,b.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")}),O=[{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}]}],C=[{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 S(e){var t,n=c(g({defaultIcon:mappl10n.options.defaultIcon,filename:null,filter:"",glyph:"",glyphColor:"white",glyphFont:C[0],glyphSize:20,isOpen:!1,mode:"list",shape:"circle",shapeColor:"gray",shapeFont:O[0],toDelete:[],userIcons:mappl10n.options.userIcons}),2),i=n[0],s=n[1];function p(e){s((function(t){return l(l({},t),e)}))}function u(t,n){switch(t){case"bulk-select":var a=r(i.toDelete),o=i.toDelete.indexOf(n.iconid);o>=0?a.splice(o,1):a.push(n.iconid),p({toDelete:a});break;case"close":p({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&mapp.lib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconids:i.toDelete,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(i.toDelete.indexOf(e.iconid)>=0&&!function(e){if(!e)return!1;var t=e.replace(/.png|.gif|.jpg/gi,"").toLowerCase();return mappl10n.options.standardIcons.indexOf(t)>=0}(e.iconid)&&e.onChange(null),mappl10n.options.userIcons=t.data,p({toDelete:[],mode:"list",userIcons:mappl10n.options.userIcons})):alert("Delete error: "+t.status)}});break;case"edit-cancel":p({mode:"list"});break;case"edit-save":!function(e){var t=32,n=2,a=document.createElement("canvas");a.width=t*n,a.height=t*n,a.style.imageRendering="pixelated";var o=a.getContext("2d");o.font=t*n+"px "+i.shapeFont.fontFamily,o.fillStyle=i.shapeColor,o.textBaseline="bottom",o.fillText(i.shape,0,t*n),o.strokeStyle="white",o.strokeText(i.shape,1,t*n);var r=_.findWhere(i.shapeFont.glyphs,{name:i.shape});if(i.glyph&&r.center){o.imageSmoothingEnabled=!1,o.font=i.glyphSize*n+"px "+i.glyphFont.fontFamily,o.fillStyle=i.glyphColor;var l=[r.center[0]*n,r.center[1]*n];o.fillText(i.glyph,l[0]-i.glyphSize,l[1]+i.glyphSize)}"undefined"!=typeof debug?document.getElementById("mapp-edit-debug").append(a):a.toBlob((function(e){var t=new FormData;t.append("image0",e,i.filename),b(t)}),"image/png",100)}();break;case"edit-upload":l=n,s=new FormData,_.map(l,(function(e,t){e.type.match("image.*")?s.append("image"+t,e):alert("File "+e.name+" is not an image.")})),b(s);break;case"list-select":e.onChange&&e.onChange(n),u("close");break;case"mode":p("bulk"==n?{mode:n,toDelete:[]}:{mode:n});break;case"open":p({isOpen:!0})}var l,s}function m(t){var n="user"==t?mappl10n.options.userIcons:mappl10n.options.standardIcons;return _.map(n,(function(n){if("standard"==t&&function(e){return mappl10n.options.userIcons.indexOf(e)>=0}(n+".png"))return"";var a="mapp-icon-wrapper";return"bulk"==i.mode&&i.toDelete.indexOf(n)>=0?a+=" mapp-bulk-selected":"list"!=i.mode||e.iconid!=n&&e.iconid+".png"!=n||(a+=" mapp-selected"),d("div",{alt:n,className:a,key:n,onClick:function(){"list"==i.mode?u("list-select",n):"user"==t&&u("bulk-select",{iconid:n,type:t})}},d("img",{className:"mapp-icon",src:mapp.Icons.getUrl(n),title:n}))}))}function b(t){t.append("action","mapp_icon_save"),t.append("nonce",mappl10n.options.nonce),mapp.lib.ajax({type:"POST",contentType:!1,processData:!1,data:t,success:function(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 h((function(){var e=i.glyph?i.glyph:i.shape;p({filename:e+=".png"})}),[i.shape,i.shapeColor,i.glyphFont,i.glyph,i.glyphColor,i.glyphSize]),d(f,null,d("img",{className:"mapp-icon",onClick:function(){return u("open",null)},src:mapp.Icons.getUrl(e.iconid)}),"list"==i.mode&&i.isOpen&&d(w,{title:d("div",{className:"mapp-icons-title"},__("Select icon"),d(y,{disabled:"bulk"==i.mode,isPrimary:!0,onClick:function(){return u("mode","edit")}},__("New icon"))),className:"mapp-icons-modal",onRequestClose:function(){return u("close")}},d("div",{className:"mapp-icons"},d("div",{className:"mapp-icons-list"},mappl10n.options.userIcons.length>0&&d("div",{className:"mapp-icons-list-title"},__("Custom icons")),d("div",{className:"mapp-icons-user"},m("user")),mappl10n.options.userIcons.length>0&&d("div",{className:"mapp-icons-list-title"},__("Standard icons")),d("div",{className:"mapp-icons-standard"},m("standard"))),d("div",{className:"mapp-icons-toolbar"},d("div",null,d(y,{disabled:"bulk"==i.mode,isSecondary:!0,onClick:function(){return u("list-select",null)}},__("Use default icon")),mappl10n.options.userIcons.length>0&&d(y,{isTertiary:!0,onClick:function(){return u("mode","bulk")}},__("Edit list"))),d("div",{className:"mapp-icons-filename"},e.iconid?e.iconid:__("No icon selected"))))),"bulk"==i.mode&&i.isOpen&&d(w,{title:d("div",{className:"mapp-icons-title"},__("Select icons to delete")),className:"mapp-icons-modal",onRequestClose:function(){return u("close")}},d("div",{className:"mapp-icons"},d("div",{className:"mapp-icons-list"},d("div",{className:"mapp-icons-user"},m("user"))),d("div",{className:"mapp-icons-toolbar"},d("div",null,d(y,{isDestructive:!0,disabled:i.toDelete.length<1,onClick:function(){return u("delete")}},__("Delete")),d(y,{isSecondary:!0,onClick:function(){return u("mode","list")}},__("Cancel")))))),"edit"==i.mode&&d(w,{title:__("Create new icon"),className:"mapp-icons-edit-modal",onRequestClose:function(){return u("edit-cancel")},shouldCloseOnClickOutside:!1},d("div",{className:"mapp-icons-edit"},d("div",{id:"mapp-edit-debug"}),d("section",null,d("h2",null,__("Shape")),d("span",{className:"mapp-icons-edit-shapes",style:{color:i.shapeColor,fontFamily:i.shapeFont.fontFamily}},_.map(i.shapeFont.glyphs,(function(e,t){var n=i.shape==e.name;return d("span",{className:"mapp-icons-edit-shape-wrapper"+(n?" mapp-selected":""),key:e.name,onClick:function(){return p({shape:e.name})},title:e.name},d("span",{className:"mapp-icons-edit-shape"},e.name,e.center&&i.glyph&&d("div",{className:"mapp-icons-edit-shape-glyph "+i.glyphFont.className,style:{left:e.center[0],top:e.center[1],color:i.glyphColor,fontSize:i.glyphSize,width:i.glyphSize}},i.glyph)))})))),d("section",{className:"mapp-icons-edit-font"},d("h2",null,__("Font")),d(o.Select,{value:i.glyphFont.id,options:_.map(C,(function(e){return{value:e.id,label:e.label}})),onChange:function(e){return p({glyphFont:_.findWhere(C,{id:e}),glyph:null})}}),d("span",null,__("Font size")),d(k,{initialPosition:20,min:16,max:24,value:i.glyphSize,onChange:function(e){return p({glyphSize:e})}})),d("section",null,d("h2",null,__("Color")),d("span",{className:"mapp-icons-edit-colors"},d(a.MappColorPicker,{color:i.shapeColor,isExtended:!1,onChange:function(e){return p({shapeColor:e.color})}}),d("span",null,__("Fill")),d(a.MappColorPicker,{color:i.glyphColor,isExtended:!1,onChange:function(e){return p({glyphColor:e.color})}}),d("span",null,__("Stroke")))),(t=_.filter(i.glyphFont.glyphs,(function(e){return!i.filter||e.includes(i.filter)})),d("div",{className:"mapp-icons-edit-glyphs"},d("section",{className:"mapp-icons-edit-search"},d("h2",null,__("Search")),d(o.Input,{value:i.filter,onChange:function(e){return p({filter:e})}})),d("div",{className:"mapp-icons-edit-glyph-list",style:{color:i.glyphColor}},_.map(t,(function(e,t){return d("div",{tabIndex:0,className:"mapp-icons-edit-glyph-wrapper"+(i.glyph==e?" mapp-selected":""),key:t,onClick:function(){return p({glyph:i.glyph==e?null:e})}},d("span",{className:"mapp-icons-edit-glyph "+i.glyphFont.className},e),d("div",{className:"mapp-icons-edit-glyph-title"},e.replaceAll("_"," ")))}))))),d("div",{className:"mapp-icons-edit-toolbar"},d("div",{className:"mapp-icons-edit-toolbar-left"},d(y,{isPrimary:!0,onClick:function(){return u("edit-save")}},__("Save")),d(y,{isSecondary:!0,onClick:function(){return u("edit-cancel")}},__("Cancel")),d(o.Input,{className:"mapp-icons-filename",value:i.filename,onChange:function(e){return p({filename:e})}})),d("div",null,d(v,{accept:"image/*",icon:"upload",multiple:!0,onChange:function(e){u("edit-upload",e.target.files)}},__("Upload icons")))))))}},938:(e,t,n)=>{"use strict";n.r(t);var a=n(477);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}window.mapp;var i=wp.element.createElement,l=wp.element,s=(l.Fragment,l.render,l.useEffect),c=(l.useLayoutEffect,l.useRef,l.useState),p=wp.components;p.Button,p.Modal;document.getElementById("mapp-library")&&(mappl10n.options.postid=0,wp.element.render(i((function(e){var t=o(c({mapid:null}),2),n=t[0];return t[1],s((function(){}),[]),i(a.default,{context:"library",mapid:n.mapid,onAction:function(e,t){switch(e){case"pick-shortcode":var n=jQuery("<input>");jQuery("body").append(n),n.val('[mappress mapid="'+t+'"]').select(),document.execCommand("copy"),n.remove(),alert((a="Shortcode copied",wp.i18n.__(a,"mappress-google-maps-for-wordpress")))}var a}})})),document.getElementById("mapp-library")))},816:(e,t,n)=>{"use strict";n.r(t);var a=n(429),o=n(477);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p=window.mapp||{},u=wp.element.createElement,d=wp.element,m=d.Fragment,f=d.useEffect,_=(d.useLayoutEffect,d.useRef),h=d.useState,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function g(e){var t=wp.components,n=(t.BaseControl,t.Button),r=(t.ButtonGroup,t.CheckboxControl,t.Dropdown,t.Modal,t.Panel,t.PanelBody,t.PanelRow,t.Placeholder),l=(t.RadioControl,t.SelectControl,t.TextControl,t.ToggleControl,t.Toolbar),c=t.ToolbarButton,d=t.ToolbarGroup,g=wp.blockEditor,b=g.BlockControls,y=g.InspectorControls,v=s(h({isOpen:!1,map:null,mapdata:void 0,pickerMode:"list",pickerMapid:null}),2),w=v[0],k=v[1],O=_(null);function C(e){k((function(t){return i(i({},t),e)}))}function S(t,n){switch(t){case"add":C({isOpen:!0,pickerMapid:null,pickerMode:"edit"}),e.setAttributes({center:void 0,zoom:void 0});break;case"change-settings":e.setAttributes(n);break;case"edit":C({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"edit"});break;case"edit-close":C({isOpen:!1});break;case"pick-destroy":e.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0}),C({isOpen:!1});break;case"pick-close":C({isOpen:!1});break;case"pick-insert":case"pick-duplicate":n!=e.attributes.mapid&&e.setAttributes({center:void 0,mapid:n,zoom:void 0}),C({isOpen:!1});break;case"open":C({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"list"})}}function x(){return u(b,null,u(void 0!==d?d:l,null,e.attributes.mapid&&u(c,{icon:"edit",label:__("Edit map"),onClick:function(){return S("edit")}}),u(c,{icon:"portfolio",label:__("Map Library"),onClick:function(){return S("open")}})))}function P(){if(w.isOpen)return u(o.default,{mapid:w.pickerMapid,mode:w.pickerMode,onAction:S,type:"post"})}return f((function(){var t=function(t){C({mapdata:t.maps[e.attributes.mapid]})};return p.store.subscribe(t),function(){return p.store.unsubscribe(t)}})),f((function(){e.attributes.mapid&&p.store.fetchMap({mapid:e.attributes.mapid})}),[e.attributes.mapid]),f((function(){var t;e.attributes.mapid&&O.current&&w.mapdata&&((t=new p.Map(w.mapdata,{alignment:e.attributes.align,center:e.attributes.center,height:e.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:e.attributes.poiList,sel:jQuery(O.current),width:e.attributes.width,zoom:e.attributes.zoom})).display(),C({map:t}))}),[w.mapdata]),f((function(){"wide"!=e.attributes.align&&"full"!=e.attributes.align||(e.setAttributes({width:"100%"}),w.map&&w.map.setSize({width:"100%"}))}),[e.attributes.align]),e.attributes.preview?u("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):e.attributes.mapid&&null!==w.mapdata?u(m,null,x(),function(){if(!w.map)return null;var t=e.attributes,n=t.align,o=t.center,r=t.height,i=t.poiList,l=t.width,s=t.zoom;return u(y,null,u("div",{className:"mapp-gt-inspector"},u(a.MappSettings,{map:w.map,alignment:n,context:"map",onAction:S,center:o,height:r,poiList:i,width:l,zoom:s})))}(),u("div",{className:"mapp-gt",ref:O}),P()):u(m,null,u(m,null,x(),u(r,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Use the map library to create a new map or insert an existing map.")},u(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return S("open")}},__("Map Library")))),P())}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},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:function(e){return e.named.center}},height:{type:"string",shortcode:function(e){return e.named.height}},initialOpenDirections:{type:"boolean",shortcode:function(e){return"true"==e.named.initialOpenDirections||"true"==e.named.initialopendirections}},mapid:{type:"string",shortcode:function(e){return e.named.mapid}},poiList:{type:"boolean",shortcode:function(e){return"true"==e.named.poiList||"true"==e.named.poilist}},width:{type:"string",shortcode:function(e){return e.named.width}},zoom:{type:"number",shortcode:function(e){return parseInt(e.named.zoom)?parseInt(e.named.zoom):null}}}},{type:"block",blocks:["core/shortcode"],isMatch:function(e){var t=e.text,n=wp.shortcode.regexp("mappress");return n.lastIndex=0,n.test(t)},transform:function(e){var t=e.text;return wp.blocks.rawHandler({HTML:"<p>"+t+"</p>",mode:"BLOCKS"})}}]},edit:function(e){return u(g,e)},save:function(e){return e},example:{attributes:{preview:!0}}})},378:(e,t,n)=>{"use strict";n.r(t);n(429),n(670),n(308);window.mapp,wp.element.createElement;var a=wp.element,o=(a.Fragment,a.useEffect,a.useLayoutEffect,a.useRef,a.useState,wp.components);o.BaseControl,o.Button,o.ButtonGroup,o.Card,o.CardBody,o.CardFooter,o.CardHeader,o.CheckboxControl,o.ExternalLink,o.HorizontalRule,o.Panel,o.PanelBody,o.PanelRow,o.Placeholder,o.RadioControl,o.SelectControl,o.TabPanel,o.TextControl,o.TextareaControl,o.ToggleControl,o.Toolbar,wp.data.useSelect},498:(e,t,n)=>{"use strict";n.r(t);var a=n(477);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}window.mapp;var c=wp.element.createElement,p=wp.element,u=p.Fragment,d=(p.useEffect,p.useLayoutEffect,p.useRef,p.useState),m=wp.components,f=(m.Button,m.Dashicon),__=(m.Modal,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function _(){var e=l(d({isOpen:!1,mapid:null}),2),t=e[0],n=e[1];function o(e){n((function(t){return r(r({},t),e)}))}function i(e,t){switch(e){case"pick-close":o({isOpen:!1,mapid:null});break;case"pick-insert":o({isOpen:!1});var n='[mappress mapid="'+t+'"]';"undefined"==typeof wpActiveEditor?__("Please select the post content to insert the map into."):send_to_editor(n);break;case"open":o({isOpen:!0,mapid:s()})}}function s(){var 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;for(var n=null,a=t.anchorNode.data,o=-1,r=t.anchorOffset-1;r>=0;r--){var i=a[r];if("["==i){o=r;break}if("]"==i||"<"==i||">"==i)break}return o>=0&&(n=wp.shortcode.next("mappress",a,o))?n.shortcode.attrs.named.mapid:null}return c(u,null,c("button",{className:"button",type:"button",onClick:function(e){e.preventDefault(),i("open")}},c(f,{className:"wp-media-buttons-icon",icon:"location"}),__("MapPress")),t.isOpen&&c(a.default,{context:"mce",mapid:t.mapid,onAction:i}))}Array.from(document.getElementsByClassName("mapp-mce")).forEach((function(e,t){return wp.element.render(c(_),e)}))},670:(e,t,n)=>{"use strict";function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}n.r(t),n.d(t,{MappMultiSelect:()=>v});var p=wp.element.createElement,u=wp.element,d=(u.Fragment,u.useEffect),m=(u.useLayoutEffect,u.useRef),f=u.useState,h=wp.components,g=h.BaseControl,b=(h.Button,h.CheckboxControl),y=(h.Panel,h.PanelBody,h.PanelRow,h.Spinner,h.TextControl),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function v(e){var t,n=m(null),o=m(null),i=l(f({isOpen:!1,filter:"",filteredOptions:[]}),2),s=i[0],c=i[1];function u(e){c((function(t){return r(r({},t),e)}))}function h(t){var n=_.findWhere(e.options,{value:t});return n?n.label:t}function v(){var t;return e.values instanceof Array?t=a(e.values):e.values&&(t=[e.values]),t||[]}function w(t,n){var a=v(),o=a.indexOf(t);(n=void 0!==n?n:-1==o)?a.push(t):a.splice(o,1),e.onChange(a)}function k(){return s.isOpen?p("div",{className:"mapp-select-dropdown-wrapper"},p("div",{className:"mapp-select-dropdown"},!s.isOpen||!e.options||e.options.length<10?null:p("div",{className:"mapp-select-filter",ref:o},p(y,{autoComplete:"off",placeholder:__("Search"),value:s.filter,onChange:function(e){return u({filter:e})}})),p("div",{className:"mapp-select-dropdown-list"},(t=v(),0==s.filteredOptions.length?p("div",{className:"mapp-select-dropdown-item"},__("No results")):s.filteredOptions.map((function(e){return p(b,{className:"mapp-select-dropdown-item",checked:t.includes(e.value),key:e.value,onChange:function(t){return w(e.value,t)},label:e.label})})))))):null;var t}return d((function(){if(e.options)if(s.filter){var t=s.filter.toUpperCase();u({filteredOptions:e.options.filter((function(e){return 0==e.label.toUpperCase().indexOf(t)}))})}else u({filteredOptions:e.options})}),[e.options,s.filter]),d((function(){s.isOpen&&o.current&&(jQuery("input",jQuery(o.current)).focus(),u({filter:""}))}),[s.isOpen]),p(g,{className:"mapp-select",label:e.label},p("div",{ref:n,tabIndex:0,onBlur:function(e){return function(e){event.relatedTarget||document.activeElement,n.current.contains(e.relatedTarget)||u({isOpen:!1})}(e)}},((t=v())instanceof Array&&t.map((function(e){return h(e)})),void 0===e.options?p("div",{className:"mapp-select-input"},p("div",{className:"mapp-select-tokens"}),p("span",{className:"dashicons dashicons-arrow-down-alt2"})):p("div",{className:"mapp-select-input",onClick:function(){return u({isOpen:!s.isOpen})}},p("div",{className:"mapp-select-tokens"},t.map((function(e){return p("span",{className:"mapp-select-token",key:e,onClick:function(t){t.stopPropagation(),w(e,!1)}},h(e))}))),p("span",{className:"dashicons "+(s.isOpen?"dashicons-arrow-up-alt2":"dashicons-arrow-down-alt2")}))),k()))}},218:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C});var a=n(824),o=n(143),r=n(710);function i(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var m=wp.element.createElement,f=wp.element,h=f.Fragment,g=f.useEffect,b=(f.useLayoutEffect,f.useCallback,f.useRef),y=f.useState,v=wp.data.useSelect,w=wp.components,k=w.Button,O=w.Dashicon,__=(w.ExternalLink,w.Modal,w.Panel,w.PanelBody,w.PanelRow,w.Popover,w.RadioControl,w.Spinner,w.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function C(e){var t,n,l,c,u,d,f,w,C=p(y(s({},mappress_options_state)),2),S=C[0],x=C[1],P=b(null);function j(e){x((function(t){return s(s({},t),e)}))}function N(e){return _.map(e,(function(e,t){return{value:t,label:e}}))}function M(e,t){return e&&Array.isArray(e)&&e.length?(_.map(e,(function(e){for(var t in e)"string"==typeof e[t]&&(e[t]=e[t].trim())})),t?e.filter((function(e){for(var t in e)if(!e[t]||0==e[t].length)return!1;return!0})):e.filter((function(e){return!(e.hasOwnProperty("key")&&!e.key)}))):[]}function I(e,t){switch(e){case"license-check":mapp.lib.ajax({type:"POST",data:{action:"mapp_license_check",nonce:mappl10n.options.nonce,license:S.license},callback:function(e){e&&"OK"==e.status&&window.location.reload()}});break;case"reset":mapp.lib.ajax({type:"POST",data:{action:"mapp_options_reset",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&window.location.reload()}});break;case"save":var n=s({},S);delete n.helpers,n.filters=M(n.filters,!1),n.metaKeys=M(n.metaKeys,!0),n.sizes=M(n.sizes,!0),n.autoicons&&n.autoicons.values&&(n.autoicons.values=M(n.autoicons.values,!0)),mapp.lib.ajax({type:"POST",data:{action:"mapp_options_save",nonce:mappl10n.options.nonce,settings:n},callback:function(e){e&&"OK"==e.status&&window.location.reload()}})}}return g((function(){P.current&&new mapp.Map(S.helpers.demo_map,{sel:jQuery(P.current)}).display()}),[]),g((function(){mappl10n.options.engine!=S.engine&&I("save")}),[S.engine]),m("div",{className:"mapp-options"},m("form",{onSubmit:function(e){e.preventDefault(),I("save")}},m(a.Section,{title:__("Sample Map"),className:"mapp-demo-section"},m("div",{className:"mapp-options-demo",ref:P})),mappl10n.options.pro&&(!S.helpers.is_multisite||S.helpers.is_super_admin||S.helpers.is_main_site)&&m(a.Section,{title:__("License")},m(a.Option,{title:__("MapPress license key")},m(a.Input,{value:S.license,onChange:function(e){return j({license:e})},size:37,placeholder:__("Enter license to enable automatic updates")}),(w=m("a",{className:"mapp-license-status",href:"https://mappresspro.com/account",target:"_blank"},__("Get license")),S.license&&S.helpers.license_status?"active"==S.helpers.license_status?m("span",{className:"mapp-license-status"},m(O,{icon:"yes"}),__("Active")):m(h,null,m(k,{className:"mapp-options-check-license",isSecondary:!0,onClick:function(){return I("license-check")}},__("Check now")),m("div",null,m(O,{icon:"no"}),S.helpers.license_message)):w)),m(a.Checkbox,{title:__("Beta versions"),label:__("Enable updates for beta versions"),checked:S.betas,onChange:function(e){return j({betas:e})}})),m(a.Section,{title:__("Basic Settings")},m(a.Radios,{title:__("Mapping API"),options:[{label:"Leaflet",value:"leaflet"},{label:"Google",value:"google"}],onChange:function(e){j({engine:e,geocoder:"google"==e?"google":""})},checked:S.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"==S.engine&&(d=[{value:"nominatim",label:"Nominatim",disabled:S.mapbox},{value:"mapbox",label:"MapBox",disabled:!S.mapbox},{value:"google",label:"Google",disabled:!S.apiKey}],f={},"nominatim"==S.geocoder&&(f={text:__("Nominatim is free but inaccurate. Use Mapbox or Google instead."),type:"warning"}),f.href="#toc-picking-a-geocoder",m(a.Option,{title:__("Geocoder")},m(a.Radios,{options:d,checked:S.geocoder,onChange:function(e){return j({geocoder:e})},help:f}))),"leaflet"==S.engine&&(u=m(k,{isSecondary:!0,href:"https://account.mapbox.com/access-tokens/",target:"_blank"},__("Get an Access Token")),m(a.Option,{title:__("Mapbox access token")},m("div",{className:"mapp-option-mapbox"},m(a.Input,{name:"mapbox",value:S.mapbox,onChange:function(e){j({mapbox:e}),j({geocoder:e?"mapbox":"nominatim"})},placeholder:__("Enter token to use Mapbox"),size:50}),u),m("div",{className:"mapp-help-text"},__("Mapbox makes Leaflet maps look great and provides an excellent geocoder.")))),(c=m(k,{isSecondary:!0,href:"https://mappresspro.com/how-to-get-a-google-maps-api-key",target:"_blank"},__("Get an API Key")),m(a.Option,{title:__("Google API key"),className:"mapp-option-apikey"},m(a.Input,{name:"apiKey",value:S.apiKey,onChange:function(e){j({apiKey:e})},placeholder:"google"==S.engine?__("Enter API key to use Google maps"):__("Enter API key to use Google geocoder"),size:50}),c))),m(a.Section,{title:__("Map Settings")},m(a.Radios,{title:__("Automatic display"),options:[{value:"",label:__("None")},{value:"top",label:__("Top of post")},{value:"bottom",label:__("Bottom of post")}],checked:S.autodisplay,onChange:function(e){return j({autodisplay:e})}}),m(a.Radios,{title:__("Map alignment"),options:[{value:"",label:__("Default")},{value:"center",label:__("Center")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],checked:S.alignment,onChange:function(e){return j({alignment:e})}}),m(a.Radios,{title:__("Directions"),checked:S.directions,options:[{value:"google",label:"Google"},{value:"inline",label:__("Inline")}],onChange:function(e){return j({directions:e})}}),m(a.Option,{title:__("POI list")},m(a.Checkbox,{checked:S.poiList,label:__("Show a list of POIs with each map"),onChange:function(e){return j({poiList:e})}}),m("div",{className:"mapp-option-poilist-radios"},m(a.Radios,{checked:S.layout,options:[{value:"left",label:"Left of map",disabled:!S.poiList},{value:"inline",label:__("Below map"),disabled:!S.poiList}],onChange:function(e){return j({layout:e})}}))),m(a.Input,{title:__("Mini width"),value:S.mini,onChange:function(e){return j({mini:e})},size:3,label:__("Width (px) to use map/list toggle buttons")}),m(a.Checkbox,{title:__("Sort"),checked:S.sort,label:__("Sort POI list by title"),onChange:function(e){return j({sort:e})}}),"leaflet"==mappl10n.options.engine&&m(a.Checkbox,{title:__("Scroll wheel zoom"),checked:S.scrollWheel,label:__("Enable map zoom with mouse scroll wheel"),onChange:function(e){return j({scrollWheel:e})}})),m(a.Section,{title:__("Styled Maps")},m(a.Option,{title:__("Default style")},m("div",{className:"mapp-option-style"},m(r.m,{selected:S.style,onChange:function(e){j({style:e}),mappl10n.options.style=e}}),m("div",null,__('Replace the default "roadmap" or "streets" style'))))),m(a.Section,{title:__("POI Settings")},m(a.Select,{title:__("Default zoom"),label:__("Default zoom when displaying a single POI"),value:S.poiZoom,options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],(function(e){return{value:e,label:e}})),onChange:function(e){return j({poiZoom:e})}}),m(a.Checkbox,{title:__("Hover"),checked:S.tooltips,label:__("Open POIs on hover"),onChange:function(e){return j({tooltips:e})}}),m(a.Checkbox,{title:__("Open first POI"),checked:S.initialOpenInfo,onChange:function(e){return j({initialOpenInfo:e})},label:__("Open first POI")})),mappl10n.options.pro&&m(a.Section,{title:__("Icons")},m(a.Option,{title:__("Default icon")},m(o.MappIconPicker,{iconid:S.defaultIcon,onChange:function(e){mappl10n.options.defaultIcon=e,j({defaultIcon:e})}})),m(a.Option,{title:__("Icon directory")},m("code",null,S.helpers.icon_directory)),m(a.Option,{title:__("Highlight selected POI")},m(a.Radios,{checked:S.highlight,options:[{value:"",label:__("None")},{value:"circle",label:__("Circle")},{value:"scale",label:__("Scale")},{value:"icon",label:__("Icon")}],onChange:function(e){return j({highlight:e})}}),"icon"==S.highlight&&m(o.MappIconPicker,{defaultIcon:S.defaultIcon,iconid:S.highlightIcon,onChange:function(e){return j({highlightIcon:e})}})),(l=S.iconScale&&Array.isArray(S.iconScale)?i(S.iconScale):[0,0],m(a.Option,{title:__("Icon size")},m(a.Input,{value:l[0]?l[0]:"",onChange:function(e){e<=64&&(l[0]=e>0?e:"",j({iconScale:l}))},placeholder:32,type:"number",min:0,max:64}),m("span",null," X "),m(a.Input,{value:l[1]?l[1]:"",onChange:function(e){e<=64&&(l[1]=e>0?e:"",j({iconScale:l}))},placeholder:32,type:"number",min:0,max:64}),m("span",null," (px) "))),function(){var e=N(S.helpers.taxonomies);e.unshift({value:"post_type",label:__("Post type")});var t=v((function(e){if("post_type"==S.autoicons.key)return N(S.helpers.post_types);var t=wp.data.select("core").getEntityRecords("taxonomy",S.autoicons.key,{per_page:-1,_fields:"id,name,slug"});return t?t.map((function(e){return{value:e.slug,label:e.name}})):[]}),[S.autoicons.key]);return m(a.Option,{title:__("Automatic icons")},m(a.Select,{value:S.autoicons?S.autoicons.key:null,options:e,onChange:function(e){var t=S.autoicons?s({},S.autoicons):[];t.key=e,t.values=[],j({autoicons:t})},placeholder:""}),m(a.MappGrid,{cols:[{id:"key",label:__("Key"),type:"select",options:t},{id:"value",label:__("Icon"),type:"icon"}],data:S.autoicons.values,onChange:function(e){var t=S.autoicons?s({},S.autoicons):[];t.values=e,j({autoicons:t})}}))}()),m(a.Section,{title:__("Clustering")},m(a.Checkbox,{title:__("Clustering"),checked:S.clustering,label:__("Enable marker clustering"),onChange:function(e){return j({clustering:e})}}),function(){var e=S.clusteringOptions?S.clusteringOptions:{},t=function(t,n){e[t]=n,j({clusteringOptions:e})};if("google"==S.engine){return m("div",{className:"mapp-option-clustering-options"},m(a.Select,{help:{href:"https://github.com/googlemaps/v3-utility-library/blob/3fca406/packages/markerclustererplus/src/markerclusterer.ts"},label:m(h,null,__("Disable clustering at zoom"),m("code",null,"maxZoom")),onChange:function(e){return t("maxZoom",e)},options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],(function(e){return{value:e,label:e}})),placeholder:__("None"),title:__("Max zoom"),value:e.maxZoom}))}var n="https://github.com/Leaflet/Leaflet.markercluster#all-options";return m("div",{className:"mapp-option-clustering-options"},m(a.Select,{help:{href:n},label:m(h,null,__("Disable clustering at zoom"),m("code",null,"disableClusteringAtZoom")),onChange:function(e){return t("disableClusteringAtZoom",e)},options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],(function(e){return{value:e,label:e}})),placeholder:__("Auto"),title:__("Max zoom"),value:e.disableClusteringAtZoom}),m(a.Checkbox,{checked:e.spiderfyOnMaxZoom,help:{href:n},label:m(h,null,__("Spiderfy"),m("code",null,"spiderfyOnMaxZoom")),onChange:function(e){return t("spiderfyOnMaxZoom",e)},title:__("Spiderfy")}))}()),mappl10n.options.pro&&m(a.Section,{title:__("Mashups")},m(a.Option,{title:__("Filters")},m(a.MappGrid,{cols:[{id:"key",label:__("Taxonomy"),onRender:function(e){var t=N(S.helpers.taxonomies).map((function(t){return t.disabled=t.value!=e.value&&_.findWhere(S.filters,{key:t.value}),t}));return m(a.Select,{value:e.value,options:t,onChange:e.onChange,placeholder:""})}},{id:"sort",label:__("Sort"),onRender:function(e){return m(a.Select,{value:e.value,options:[{value:"name",label:__("Name")},{value:"slug",label:__("Slug")}],onChange:e.onChange})}},{id:"count",label:__("Show counts"),onRender:function(e){return m(a.Checkbox,{checked:e.value,onChange:e.onChange})}}],data:S.filters,onChange:function(e){j({filters:e})}})),function(){var 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 m(a.Radios,{title:__("Marker click"),checked:S.mashupClick,options:e,onChange:function(e){return j({mashupClick:e})}})}(),m(a.Radios,{title:__("Popup content"),checked:S.mashupBody,options:[{value:"poi",label:__("POI title + POI body")},{value:"post",label:__("Post title + post excerpt")}],onChange:function(e){return j({mashupBody:e})}}),m(a.Checkbox,{title:__("KMLs"),checked:S.mashupKml,label:__("Include KML POIs in mashups"),onChange:function(e){return j({mashupKml:e})}})),mappl10n.options.pro&&m(a.Section,{title:__("Mashup Search")},m(a.Checkbox,{title:__("Search"),checked:S.search,label:__("Enable search"),onChange:function(e){return j({search:e})}}),m(a.Select,{help:{href:"https://mappresspro.com/mappress-documentation/#toc-mashup-search"},title:__("Search radius"),label:__("Minimum search radius (km)"),value:S.radius,options:_.map([1,5,10,15,25,50,75,100,200,300],(function(e){return{value:e,label:e}})),onChange:function(e){return j({radius:e})}}),m(a.Select,{title:__("Search country"),label:__("Country code for searches"),value:S.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"],(function(e){return{value:e,label:e}})),onChange:function(e){return j({country:e})},help:{href:"https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements"}}),mappl10n.options.ssl?m(a.Checkbox,{title:__("User location"),checked:S.userLocation,label:__("Show user location on map"),onChange:function(e){return j({userLocation:e})}}):null,function(){if("google"!=S.engine)return m(a.Input,{onChange:function(e){return j({searchBox:e})},help:{href:"https://mappresspro.com/mappress-documentation/#toc-mashup-search"},label:__("Restrict searches to a bounding box (optional)"),title:__("Bounding box"),placeholder:"SW lon, SW lat, NE lng, NE lat",size:45,trim:!0,value:S.searchBox})}()),mappl10n.options.pro&&m(a.Section,{title:__("Geocoding")},m(a.Checkboxes,{title:__("Post types"),values:S.postTypes,options:N(S.helpers.post_types),onChange:function(e){return j({postTypes:e})}}),m(a.Option,{title:__("Geocoding fields")},m(a.MappGrid,{cols:[{id:"key",label:__("Map field"),type:"select",options:N(S.helpers.meta_fields)},{id:"value",label:__("Custom field"),type:"select",options:N(S.helpers.meta_keys)}],data:S.metaKeys,onChange:function(e){j({metaKeys:e})}})),m(a.Checkbox,{title:__("Overwrite"),label:__("Overwrite maps when posts are saved"),checked:S.metaSyncSave,onChange:function(e){j({metaSyncSave:e})}}),"google"==S.engine&&m(a.Input,{title:__("Google Server API key"),name:"apiKeyServer",value:S.apiKeyServer,onChange:function(e){return j({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"}}),(n=__("No errors found"),S.helpers.geocoding_errors&&S.helpers.geocoding_errors.length>0&&(n=_.map(S.helpers.geocoding_errors,(function(e){return m("div",{key:e.ID},m("a",{href:mappl10n.options.editurl+"?post="+e.ID+"&action=edit"},e.post_title),m("span",null," : "+e.error))}))),m(a.Option,{title:__("Geocoding errors")},n))),mappl10n.options.pro&&mappl10n.options.acfActive&&m(a.Section,{title:__("Frontend Forms")},m(a.Option,{title:__("Advanced Custom Fields")},m(a.Input,{className:"mapp-option-acf",name:"acf",value:S.acf,onChange:function(e){j({acf:e})},placeholder:__("ACF field"),size:20}),__("ACF map field to include on MapPress mashups"),m(a.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"}))),mappl10n.options.pro&&m(a.Section,{title:__("Templates")},m(a.Option,{title:__("Custom templates")},m(a.MappTemplateEditor)),m(a.Option,{title:__("Mashup thumbnails")},m(a.Select,{label:__("Popups"),onChange:function(e){return j({thumbsPopup:e})},options:[{value:"",label:__("None")},{value:"top",label:__("Top")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],value:S.thumbsPopup}),m(a.Select,{label:__("POI lists"),onChange:function(e){return j({thumbsList:e})},options:[{value:"",label:__("None")},{value:"top",label:__("Top")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],value:S.thumbsList})),m(a.Option,{title:__("Thumbnail size")},m(a.Select,{onChange:function(e){return j({thumbSize:e})},options:N(S.helpers.thumbnail_sizes),value:S.thumbSize}),m("span",null," "+__("or")+" "),m(a.Input,{value:S.thumbWidth,onChange:function(e){return j({thumbWidth:e})},type:"number",min:0,max:9999}),m("span",null," X "),m(a.Input,{value:S.thumbHeight,onChange:function(e){return j({thumbHeight:e})},type:"number",min:0,max:9999}),m("span",null," (px) "))),m(a.Section,{title:__("Localization")},(t="leaflet"==S.engine?"https://en.wikipedia.org/wiki/ISO_639-1":"http://code.google.com/apis/maps/faq.html#languagesupport",m(a.Select,{title:__("Language"),label:__("Language for searches and Google map controls"),value:S.language,options:N(S.helpers.languages),onChange:function(e){return j({language:e})},help:{href:t}})),m(a.Input,{title:__("Directions server"),value:S.directionsServer,onChange:function(e){return j({directionsServer:e})},size:25})),m(a.Section,{title:__("Miscellaneous")},m(a.Option,{title:__("Map sizes")},m(a.MappGrid,{cols:[{id:"width",label:__("Width")+" (px, %, vw)",size:4},{id:"height",label:__("Height")+" (px, %, vh)"}],data:S.sizes,onChange:function(e,t){return j({sizes:e,size:t})},selectionColumn:"rowid",selected:S.size})),S.helpers.jetpack?null:m(a.Checkbox,{title:__("Scripts"),checked:S.footer,label:__("Output scripts in footer"),onChange:function(e){return j({footer:e})},help:{text:__("Disable footer scripts if maps are output using AJAX")}}),m(a.Checkbox,{title:"WPML",checked:S.wpml,label:__("Copy maps when overwriting a translation"),onChange:function(e){return j({wpml:e})},help:{href:"https://mappresspro.com/mappress-documentation#wpml"}}),m(a.Option,{title:__("Compatibility")},m("div",null,m(a.Checkbox,{checked:S.deregister,label:__("Prevent loading Google Maps multiple times"),onChange:function(e){return j({deregister:e})}})),m("div",null,m(a.Checkbox,{checked:S.iframes,label:__("Output maps in iframes to prevent compatibility issues"),onChange:function(e){return j({iframes:e})}})))),m("div",{className:"mapp-options-toolbar"},m(k,{className:"mapp-options-save",type:"submit",isPrimary:!0},__("Save")),m(k,{isSecondary:!0,onClick:function(){return I("reset")}},__("Reset Defaults")))))}document.getElementById("mapp-options-settings")&&wp.element.render(m(C),document.getElementById("mapp-options-settings"))},824:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Checkbox:()=>C,Checkboxes:()=>S,Help:()=>x,Input:()=>P,Radios:()=>N,Select:()=>M,Textarea:()=>I,Section:()=>A,Option:()=>E,MappGrid:()=>z,MappTemplateEditor:()=>D});var a=n(143);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=wp.element.createElement,m=wp.element,f=m.Fragment,h=m.useEffect,g=(m.useLayoutEffect,m.useCallback),b=(m.useRef,m.useState),y=(wp.data.useSelect,wp.components),v=y.Button,w=(y.ColorPicker,y.Dashicon),k=(y.Dropdown,y.ExternalLink,y.Modal),O=(y.Panel,y.PanelBody,y.PanelRow,y.Popover,y.RadioControl,y.Spinner,y.TabPanel),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function C(e){var t=e.checked,n=e.title,a=e.label,o=e.onChange,r=e.help,i=u(e,["checked","title","label","onChange","help"]),l=d(f,null,d("label",null,d("input",c({type:"checkbox",onChange:function(e){o&&o(e.target.checked)},checked:void 0!==t&&t},i)),a&&d("span",{className:"mapp-option-label"},a)),r&&d(x,r));return n?d(E,{title:n},l):l}function S(e){var t=d(f,null,_.map(e.options,(function(t,n){var a=e.values?e.values.indexOf(t.value):-1;return d(C,{key:n,label:t.label,value:t.value,checked:a>=0,onChange:function(n){var o=r(e.values);n&&-1==a&&e.onChange(o.concat(t.value)),!n&&a>=0&&(o.splice(a,1),e.onChange(o))}})})),e.help&&d(x,e.help));return e.title?d(E,{title:e.title},t):t}function x(e){var t="mapp-help-text";e.type&&(t+=" mapp-help-"+e.type);var n=null;return e.href&&(n="#"==e.href.substr(0,1)?"https://mappresspro.com/mappress-documentation/"+e.href:e.href),d(f,null,n&&d("a",{className:"mapp-help-link",href:n,target:"_blank"},d(w,{icon:"editor-help"})),e.text&&d("div",{className:t},e.text))}function P(e){var t=e.title,n=e.value,a=e.label,o=e.onChange,r=e.help,i=e.trim,l=e.type,s=u(e,["title","value","label","onChange","help","trim","type"]);if(!o)return"Missing onChange handler in Input component";i=void 0===i||i;var p=d(f,null,d("input",c({value:null!==n?n:"",onChange:function(e){return o(i?e.target.value.trim():e.target.value)},type:l||"text"},s)),a&&d("span",{className:"mapp-option-label"},a),r&&d(x,r));return t?d(E,{title:t},p):p}var j=function(e){var t=e.onChange,n=e.label,a=u(e,["onChange","label"]);return d("label",null,d("input",c({type:"radio",onChange:function(e){return t(e.target.value)}},a)),n&&d("span",{className:"mapp-option-label"},n))};function N(e){var t=d(f,null,_.map(e.options,(function(t,n){return d(j,{key:n,value:t.value,checked:e.checked==t.value||null==e.checked&&""==t.value,onChange:function(t){return e.onChange(t)},disabled:t.disabled,label:t.label})})),e.help&&d(x,e.help));return e.title?d(E,{title:e.title},t):t}function M(e){var t=e.title,n=e.value,a=e.label,o=e.onChange,i=e.options,l=e.help,s=e.placeholder,p=u(e,["title","value","label","onChange","options","help","placeholder"]),m=r(i);void 0!==s&&m.unshift({value:"",label:s});var h=d(f,null,d("select",c({value:null!=n?n:"",onChange:function(e){return o(e.target.value)}},p),_.map(m,(function(e,t){return d("option",{key:t,value:e.value,disabled:e.disabled},e.label)}))),a&&d("span",{className:"mapp-option-label"},a),l&&d(x,l));return t?d(E,{title:t},h):h}function I(e){var t=e.title,n=e.onChange,a=e.label,o=e.help,r=u(e,["title","onChange","label","help"]),i=d(f,null,d("textarea",c({onChange:function(e){return n(e.target.value)}},r)),a&&d("span",{className:"mapp-option-label"},a),o&&d(x,o));return t?d(E,{title:t},i):i}function A(e){var t=e.className?" "+e.className:"";return d("div",{className:"mapp-option-section"+t},d("h2",null,e.title),e.children)}function E(e){var t=e.className?"mapp-option "+e.className:"mapp-option";return d("div",{className:t},d("div",{className:"mapp-option-title"},e.title),d("div",{className:"mapp-option-value"},e.children))}function z(e){var t,n,i=o(b({dragging:null,dragover:null}),2),l=i[0],s=i[1];function p(e){s((function(t){return c(c({},t),e)}))}function u(t,n){var a=r(e.data);switch(t){case"add":var o={};_.map(e.cols,(function(e){o[e.id]=""})),a.push(o),e.onChange(a,e.selected);break;case"change":a[n.i][n.id]=n.value,e.onChange(a,e.selected);break;case"delete":var i;a.splice(n,1),i=n==e.selected?null:n<e.selected?e.selected-1:e.selected,e.onChange(a,i);break;case"select":p({selected:n}),e.onChange(a,n);break;case"sort":var s=l.dragging,c=s<c?n-1:n;a.splice(c,0,a.splice(s,1)[0]),e.onChange(a,c),p({dragover:null})}}return h((function(){}),[]),d("div",{className:e.className?"mapp-grid "+e.className:"mapp-grid"},e.data&&!!e.data.length&&d("div",{className:"mapp-grid-table"},(t=e.selectionColumn?d("div",{className:"mapp-grid-cell",key:"select"},__("Default")):null,n=d("div",{className:"mapp-grid-cell",key:"actions"},""),d("div",{className:"mapp-grid-header"},d("div",{className:"mapp-grid-row"},t,_.map(e.cols,(function(e){return d("div",{className:"mapp-grid-cell",key:e.id},e.label)})),n))),d("div",{className:"mapp-grid-body"},_.map(e.data,(function(t,n){return function(t,n){return d("div",{className:"mapp-grid-row"+(l.dragover==n?" mapp-dragover":""),draggable:!0,key:n,onDragOver:function(e){return e.preventDefault()},onDragStart:function(e){return p({dragging:n})},onDragEnter:function(e){return p({dragover:n})},onDragEnd:function(e){return p({dragging:null,dragover:null})},onDrop:function(e){return u("sort",n)}},function(t,n){if(!e.selectionColumn)return null;var a,o;switch("rowid"==e.selectionColumn?a=n:t[e.selectionColumn]?a=t[e.selectionColumn]:o=!0,e.selectionType){case"checkbox":return d("div",{className:"mapp-grid-cell"},d(C,{value:a,checked:e.selected==a,disabled:o,onChange:function(e){u("select",e?a:null)}}));case"radio":default:return d("div",{className:"mapp-grid-cell"},d(j,{checked:e.selected==a,onChange:function(){return u("select",a)}}))}}(t,n),_.map(e.cols,(function(t,o){return d("div",{className:"mapp-grid-cell mapp-grid-cell-"+t.id,key:n+"-"+o},function(t,n){if(n.onRender)return n.onRender({id:n.id,value:e.data[t][n.id],onChange:function(e){return u("change",{i:t,id:n.id,value:e})}});switch(n.type){case"icon":return d(a.MappIconPicker,{iconid:e.data[t][n.id],onChange:function(e){return u("change",{i:t,id:n.id,value:e})}});case"input":default:return d(P,{size:e.data[t][n.size],value:e.data[t][n.id],onChange:function(e){return u("change",{i:t,id:n.id,value:e})}});case"select":return d(M,{value:e.data[t][n.id],options:n.options,onChange:function(e){u("change",{i:t,id:n.id,value:e})},placeholder:""})}}(n,t))})),function(e){return d("div",{className:"mapp-grid-cell",key:"delete"},d(v,{icon:"trash",onClick:function(){return u("delete",e)}}))}(n))}(t,n)})))),d("div",{className:"mapp-grid-toolbar"},d(v,{isSecondary:!0,onClick:function(){return u("add")}},__("Add"))))}function D(e){var t=o(b({codeEditor:null,isOpen:!1,name:null,tab:"editor",template:null,tokens:null}),2),n=t[0],a=t[1];function r(e){a((function(t){return c(c({},t),e)}))}var i,l,s=g((function(e){if(null!=e){var t=wp.codeEditor.initialize(e);t.codemirror.setSize("auto","auto"),t.codemirror.setOption("readOnly","editor"!=n.tab),r({codeEditor:t})}}),[]);function p(e,t){switch(e){case"close":r({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&(mapp.lib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:n.template.name,nonce:mappl10n.options.nonce}}),r({isOpen:!1}));break;case"insert":var a=n.codeEditor.codemirror.getDoc(),o=a.getCursor();a.replaceRange("{{{poi."+t+"}}}",o);break;case"open":mapp.lib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&r({isOpen:!0,name:t,tab:"editor",template:e.data.template,tokens:e.data.tokens})}});break;case"save":var i="editor"==n.tab?n.codeEditor.codemirror.getValue():n.template.content;mapp.lib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:i,name:n.template.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&r({isOpen:!1,template:null,tokens:null})}});break;case"tab-select":if("editor"!=t){var l=c({},n.template);l.content=n.codeEditor.codemirror.getValue(),r({template:l})}r({tab:t})}}return d("div",{className:"mapp-templates"},(l=[{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")}],d("div",{className:"mapp-templates-list"},_.map(l,(function(e,t){return d("a",{href:"#",key:e.name,className:"mapp-templates-item",onClick:function(t){t.preventDefault(),p("open",e.name)}},e.label)})))),n.isOpen&&n.template?d(k,{title:(i=n.template.name+" ("+(n.template.exists?__("Custom"):__("New"))+")",d("div",{className:"mapp-templates-name"},i)),className:"mapp-templates-modal",onRequestClose:function(){return p("close")},shouldCloseOnClickOutside:!1},d(O,{className:"mapp-templates-tabs",onSelect:function(e){return p("tab-select",e)},tabs:[{name:"editor",title:__("Editor")},{name:"standard",title:__("Default")}]},(function(e){return t=d("div",{className:"mapp-templates-tokens"},_.map(n.tokens,(function(e,t){return d("code",{onClick:function(){return p("insert",e)},key:t,title:e},e)}))),a=d("div",{className:"mapp-templates-path"},n.template.path),d(f,null,"editor"==n.tab&&a,"editor"==n.tab&&t,d("div",{className:"editor"==n.tab?"mapp-templates-editor":"mapp-templates-standard"},d("textarea",{ref:s,defaultValue:"editor"==n.tab?n.template.content:n.template.standard})));var t,a})),d("div",{className:"mapp-templates-toolbar"},d(v,{isPrimary:!0,onClick:function(){return p("save")}},__("Save")),d(v,{isSecondary:!0,onClick:function(){return p("close")}},__("Cancel")),n.template.exists&&d("a",{onClick:function(e){e.preventDefault(),p("delete")}},__("Delete")))):null)}},149:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=wp.element.createElement,o=(wp.data.select,wp.element),r=(o.Fragment,o.useEffect,o.useLayoutEffect,o.useRef,o.useState,wp.components),i=(r.BaseControl,r.Button),sprintf=(r.Dashicon,r.Modal,r.PanelBody,r.RadioControl,r.Spinner,r.TextControl,wp.i18n.sprintf);function l(e){function t(t,n){var a=Math.ceil(e.count/e.pageSize);switch(t){case"first":e.onChange(1);break;case"last":e.onChange(a);break;case"next":e.onChange(e.page+1);break;case"prev":e.onChange(e.page-1)}}return o=Math.ceil(e.count/e.pageSize),r=e.page<=1,l=e.page>=o,a("div",{className:"mapp-paginate"},a(i,{disabled:r,onClick:function(){return t("first")},isSecondary:!0},"«"),a(i,{disabled:r,onClick:function(){return t("prev")},isSecondary:!0},"‹"),a("div",{className:"mapp-paginate-count"},sprintf((n="%d of %d",wp.i18n.__(n,"mappress-google-maps-for-wordpress")),e.page,o)),a(i,{disabled:l,onClick:function(){return t("next")},isSecondary:!0},"›"),a(i,{disabled:l,onClick:function(){return t("last")},isSecondary:!0},"»"));var n,o,r,l}},477:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>x});var a=n(713),o=n(999),r=n(149);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var u=window.mapp||{},d=wp.element.createElement,m=wp.data.select,f=wp.element,h=(f.Fragment,f.useEffect),g=(f.useLayoutEffect,f.useRef),b=f.useState,y=wp.components,v=(y.BaseControl,y.Button),w=y.Dashicon,k=y.Modal,O=(y.PanelBody,y.RadioControl),C=y.Spinner,S=y.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function x(e){var t=c(b({isFetchingItems:!0,items:null,mode:e.mode?e.mode:"list",mapid:e.mapid?e.mapid:null,page:1,search:"",type:mappl10n.options.postid?"post":"all"}),2),n=t[0],i=t[1],s=g(null),p=g(null);function f(e){i((function(t){return l(l({},t),e)}))}function y(t,a){switch(t){case"attach":u.store.mutateMap({mapdata:a});break;case"add-new":f({mode:"edit",mapid:null});break;case"change-type":f({type:a});break;case"close":e.onAction("pick-close");break;case"duplicate":u.store.duplicateMap({mapid:a,success:function(e){alert(__("Map copied")),f({mapid:e.mapid}),jQuery(".mapp-pick-items").scrollTop(0)}});break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(u.store.destroyMap({mapid:a}),a==n.mapid&&e.onAction("pick-destroy",a)),s.current.focus();break;case"edit":f({mode:"edit",mapid:a});break;case"edit-close":"edit"==e.mode?e.onAction("pick-close"):f({mode:"list"});break;case"edit-destroy":f({mode:"list",mapid:null}),e.onAction("pick-destroy",a);break;case"edit-save":"edit"==e.mode?e.onAction("pick-close",a):f({mode:"list",mapid:a});break;case"insert":e.onAction("pick-insert",a);break;case"shortcode":e.onAction("pick-shortcode",a);break;case"sort":u.store.setSort({sortBy:a,sortAsc:u.store.state.sortBy!=a||!u.store.state.sortAsc})}}function x(t){var o,r=t.mapid==n.mapid;o=t.map_title?t.map_title:__("Untitled");var i=function(t){var n;return n=(n="map"==e.context||"mashup"==e.context&&t.postid==mappl10n.options.postid?m("core/editor").getEditedPostAttribute("title"):t.post_title)||__("Untitled"),t.postid>0&&t.postid==mappl10n.options.postid&&(n=__("Current post")),t.postid>0?t.postid==mappl10n.options.postid?n:d("a",{href:mappl10n.options.editurl+"?post="+t.postid+"&action=edit",target:"_blank",title:__("Edit post")},n):__("Unattached")}(t),l=[{action:"edit",label:__("Edit")},{action:"insert",label:__("Insert into post")},{action:"duplicate",label:__("Copy")},{action:"destroy",label:__("Delete")}];"library"==e.context&&l.splice(1,1),l=d("div",{className:"mapp-pick-actions"},l.map((function(e){return d("a",{href:"#",key:e.action,onClick:function(n){n.stopPropagation(),n.preventDefault(),y(e.action,t.mapid)}},e.label)})));var s=null;return s=t.postid>0?d("a",{href:"#",onClick:function(){return y("attach",{mapid:t.mapid,postid:0})}},__("Detach")):"library"==e.context?d(a.default,{onChange:function(e,n){return y("attach",{mapid:t.mapid,postid:e,post_title:n})}},__("Attach")):d("a",{href:"#",onClick:function(){return y("attach",{mapid:t.mapid,postid:mappl10n.options.postid,post_title:null})}},__("Attach")),d("div",{className:"mapp-pick-item"+(r?" mapp-selected":""),key:t.mapid+"|"+t.postid,ref:r?p:null},d("div",{className:"mapp-pick-col-mapid",onClick:function(e){return y("edit",t.mapid)}},t.mapid),d("div",{className:"mapp-pick-col-map_title",onClick:function(e){return y("edit",t.mapid)}},d("div",null,o),d("div",null,l)),d("div",{className:"mapp-pick-col-post_title"},i,d("div",null,s)),"library"==e.context&&d("div",{className:"mapp-pick-col-shortcode"},d(v,{isSmall:!0,isSecondary:!0,onClick:function(e){e.stopPropagation(),e.preventDefault(),y("shortcode",t.mapid)}},__("Copy"))))}h((function(){var e=function(e){f({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return u.store.subscribe(e),function(){return u.store.unsubscribe(e)}})),h((function(){s.current&&s.current.focus(),u.store.fetchItems()}),[]),h((function(){f({page:1})}),[n.type,n.search]),h((function(){p.current&&u.lib.scrollTo(jQuery(".mapp-pick-items"),jQuery(p.current))}),[n.type,n.items]);var P=_.filter(n.items,(function(t){if("post"==n.type&&t.postid!=mappl10n.options.postid)return!1;if("current"==n.type&&t.mapid!=e.mapid)return!1;var a=n.search.toLowerCase();return!a||(t.mapid.indexOf(a)>=0||(!!(t.post_title&&t.post_title.toLowerCase().indexOf(a)>=0)||!!(t.map_title&&t.map_title.toLowerCase().indexOf(a)>=0)))})),j=d("div",{className:"mapp-list-panel"},d("div",{className:"mapp-gt-modal-header"},d("div",{className:"mapp-gt-modal-header-title"},d("h1",null,__("Select a map")),d(v,{isPrimary:!0,onClick:function(){return y("add-new")}},__("Add New"))),d(v,{onClick:function(){return y("close")},icon:"no-alt"})),function(){var t=[{label:__("Attached to post"),value:"post"},{label:__("All maps"),value:"all"}];e.mapid&&t.unshift({label:__("Current map"),value:"current"});var a="library"==e.context?null:d(O,{className:"mapp-pick-type",options:t,onChange:function(e){return y("change-type",e)},selected:n.type}),o=n.isFetchingItems||n.isAttaching&&"library"!=e.context;return d("div",{className:"mapp-pick-filter"},d("div",{className:"mapp-pick-search-wrapper"},d("span",{className:"mapp-pick-search-label"},__("Search")),d(S,{ref:s,className:"mapp-pick-search",tabIndex:1,placeholder:__("post title, map title, or map id"),onChange:function(e){return f({search:e})},size:50}),o&&d(C,null)),a)}(),function(t){if(t){var a=20*(n.page-1),o=a+20;t=t.slice(a,o)}var r="";return r=n.isFetchingItems?null:t.length?_.map(t,x):d("div",{className:"mapp-pick-message"},__("No maps found")),d("div",{className:"mapp-pick-items-section"},d("div",{className:"mapp-pick-items"},function(){var t=[{id:"mapid",label:__("ID"),sortable:!0},{id:"map_title",label:__("Map title"),sortable:!0},{id:"post_title",label:__("Attached to"),sortable:!0}];"library"==e.context&&t.push({id:"shortcode",label:__("Shortcode"),sortable:!1});return d("div",{className:"mapp-pick-items-header"},_.map(t,(function(e){return d("div",{className:"mapp-pick-col-"+e.id,onClick:function(){return y("sort",e.id)},key:e.id},e.label,e.sortable&&u.store.state.sortBy==e.id&&d(w,{icon:u.store.state.sortAsc?"arrow-up":"arrow-down"}),e.sortable&&u.store.state.sortBy!=e.id&&d(w,{icon:"leftright"}))})))}(),r))}(P),function(e){return d("div",{className:"mapp-pick-toolbar"},function(e){return e&&e.length?d(r.Z,{count:e?e.length:0,onChange:function(e){return f({page:e})},page:n.page,pageSize:20}):null}(e))}(P)),N=null;if("edit"==n.mode){var M=d("div",{className:"mapp-edit-panel"},d(o.default,{context:e.context,mapid:n.mapid,onAction:y}));N="library"==e.context?d(k,{className:"mapp-gt-modal",isDismissible:!1},M):M}var I="mapp-pick mapp-mode-"+n.mode+" mapp-context-"+e.context;return"library"==e.context?d("div",{className:I},j,N):d(k,{className:"mapp-gt-modal "+I,isDismissible:"list"==n.mode,onRequestClose:function(){return y("close")},shouldCloseOnEsc:"list"==n.mode,shouldCloseOnClickOutside:"list"==n.mode},j,N)}},429:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappSettings:()=>b});var a=n(710);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}window.mapp;var i=wp.element.createElement,l=wp.element,s=l.Fragment,c=(l.useEffect,l.useLayoutEffect,l.useRef,l.useState),p=wp.components,u=p.BaseControl,d=p.Button,m=p.ButtonGroup,f=(p.Dashicon,p.Dropdown,p.Panel,p.PanelBody),_=p.PanelRow,h=(p.RadioControl,p.SelectControl),g=p.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function b(e){var t,n=o(c({}),2);n[0],n[1];function r(e){if(!e||"string"!=typeof e)return e;var t={px:2048,vw:100,vh:100,"%":100},n=parseInt(e),a=2048,o="";for(var r in t)e.includes(r)&&(o=r,a=t[r]);return n>a?a+o:e}function l(t,n){var a=null;switch(t){case"poiList":e.map.set({poiList:n}),a={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=r(n.height)),n.hasOwnProperty("width")&&(n.width=r(n.width)),e.map.setSize(n),a=n;break;case"style-set-maptypeid":e.map&&e.map.set({mapTypeId:n}),a={mapTypeId:n};break;case"viewport-reset":e.map.center=e.map.zoom=null,e.map.recenter(),a={center:void 0,zoom:void 0};break;case"viewport-set":var o=e.map.getCenter().toJSON();e.map.center=o,e.map.zoom=e.map.getZoom(),a={center:o.lat+","+o.lng,zoom:e.map.getZoom()},"mce"==e.context||"library"==e.context?alert(__("Viewport set")):wp.data.dispatch("core/notices").createNotice("success",__("Viewport set"),{type:"snackbar",isDismissible:!0})}a&&e.onAction("change-settings",a)}return i("div",{className:"mapp-settings"},i(f,{title:__("Map settings")},(t=e.map.title?e.map.title:__("Untitled"),i(_,null,"map"==e.context&&i(u,{className:"mapp-settings-title"},t),i(u,{className:"mapp-settings-id",label:__("Map ID")},e.map.mapid))),function(){if("mashup"==e.context)return i(_,{className:"mapp-style-toggle"},__("Style"),i(a.m,{map:e.map,selected:e.map.mapTypeId,onChange:function(e){return l("style-set-maptypeid",e)}}))}(),function(){var t=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(e,t){return{label:e.width+" X "+e.height,height:e.height,width:e.width,value:t+1}}));n.unshift({height:"",label:__("Default"),value:0,width:""}),n.push({label:__("Custom"),value:"custom",disabled:!0});for(var a="custom",o=0;o<n.length-1;o++)n[o].width==e.width&&n[o].height==e.height&&(a=o);return i(s,null,i(h,{className:"mapp-settings-dims-select",help:"",label:__("Size"),value:a,options:n,onChange:function(e){return l("size",{width:n[e].width,height:n[e].height})}}),i(_,null,i(g,{className:"mapp-settings-dims-custom",help:__("px, %, vw"),label:__("Width"),onChange:function(e){return l("size",{width:e})},placeholder:t.width,value:e.width?e.width:""}),i(g,{className:"mapp-settings-dims-custom",help:__("px, %, vh"),label:__("Height"),onChange:function(e){return l("size",{height:e})},placeholder:t.height,value:e.height?e.height:""})))}(),(e.center&&(e.center.lat,e.center.lng,__("Zoom"),e.zoom),i(s,null,i(u,{className:"mapp-settings-viewport",label:__("Center/Zoom")},i(m,{label:__("Center/Zoom")},i(d,{onClick:function(){return l("viewport-reset")},isPressed:!e.center,isSmall:!0},__("Automatic")),i(d,{onClick:function(){return l("viewport-set")},isPressed:e.center,isSmall:!0},__("Set"))))))))}},787:()=>{function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var r=window.mapp||{};r.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,sortBy:"mapid",sortAsc:!1,maps:{},items:[]}},r.Store.prototype={createMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.success,n=void 0===t?function(){}:t;this.state.isFetchingMap=!1,this.publish(),n()},destroyMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapid,n=e.success,a=void 0===n?function(){}:n,o=e.failure,i=void 0===o?function(){}:o,l=this;r.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(delete l.state.maps[t],l.destroyItem(t),a(t)):i(),l.publish()}})},duplicateMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapid,n=e.success,a=void 0===n?function(){}:n,o=e.failure,i=void 0===o?function(){}:o,l=this;this.state.isSavingMap=!0,this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:t,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:function(e){if(e&&"OK"==e.status){var t=e.data,n=t.mapid;l.state.maps[n]=t,l.saveItem(t),a(t)}else i();l.state.isSavingMap=!1,l.publish()}})},fetchMap:function(e){var t=e.mapid,n=e.success,a=void 0===n?function(){}:n,o=(e.failure,this);if(void 0!==this.state.maps[t])return o.publish(),void a(this.state.maps[t]);this.state.isFetchingMap=!0,o.publish(),r.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(o.state.maps[t]=e.data,a(e.data)):o.state.maps[t]=null,o.state.isFetchingMap=!1,o.publish()}})},mutateMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapdata,n=e.success,a=void 0===n?function(){}:n,o=e.failure,i=void 0===o?function(){}:o,l=this;this.state.isSavingMap=!0,this.saveItem(t),this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_mutate",mapdata:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(l.state.maps[e.data.mapid]=e.data,a(t)):i(),l.state.isSavingMap=!1,l.publish()}})},saveMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapdata,n=e.success,a=void 0===n?function(){}:n,o=e.failure,i=void 0===o?function(){}:o,l=this;this.state.isSavingMap=!0,this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(t),nonce:mappl10n.options.nonce},callback:function(e){if(e&&"OK"==e.status){var t=e.data,n=t.mapid;l.state.maps[n]=t,l.saveItem(t),a(t)}else i();l.state.isSavingMap=!1,l.publish()}})},destroyItem:function(e){var t=this.state.items?this.state.items:[],a=_.findIndex(t,{mapid:e});a>-1&&t.splice(a,1),this.state.items=n(t),this.publish()},fetchItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.success,n=void 0===t?function(){}:t,a=e.failure,o=void 0===a?function(){}:a,i=this;if(this.state.itemsFetched)return n(this.state.items),void i.publish();this.state.isFetchingItems=!0,i.publish(),r.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(i.state.items=e.data,i.sort(),n(i.state.items),i.state.itemsFetched=!0):o(),i.state.isFetchingItems=!1,i.sort(),i.publish()}})},saveItem:function(n){var a=this.state.items?this.state.items:[],o=_.findWhere(a,{mapid:n.mapid});o?(o.mapid=void 0!==n.mapid?n.mapid:o.mapid,o.map_title=void 0!==n.title?n.title:o.map_title,o.postid=void 0!==n.postid?n.postid:o.postid,o.post_title=void 0!==n.post_title?n.post_title:o.post_title,o=function(n){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?e(Object(o),!0).forEach((function(e){t(n,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({},o)):(o={mapid:n.mapid,map_title:n.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){var n,a=this,o=(n="untitled",wp.i18n.__(n,"mappress-google-maps-for-wordpress"));this.state.items.sort((function(e,t){return function(e,t,n,a){if(a=a?1:-1,"mapid"==n)return a*(Number(e.mapid)-Number(t.mapid));var r=e[n]?e[n]:o,i=t[n]?t[n]:o,l=a*r.localeCompare(i);return 0==l?Number(e.mapid)-Number(t.mapid):l}(e,t,a.state.sortBy,a.state.sortAsc)}))},subscribe:function(e){this.subs.add(e)},unsubscribe:function(e){this.subs.delete(e)},publish:function(){var e,t=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(_e){throw _e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}(n(this.subs));try{for(t.s();!(e=t.n()).done;){(0,e.value)(this.state)}}catch(e){t.e(e)}finally{t.f()}}},r.store=new r.Store},710:(e,t,n)=>{"use strict";n.d(t,{m:()=>w});var a=n(824),o=n(149);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p=wp.element.createElement,u=wp.element,d=u.Fragment,m=(u.useEffect,u.useLayoutEffect,u.useRef,u.useState),f=wp.components,h=f.Button,g=(f.Dashicon,f.ExternalLink),b=f.Icon,y=f.Modal,v=(f.Panel,f.PanelBody,f.PanelRow,f.Spinner),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function w(e){var t,n,r,l,c,u,f,w=s(m({apiKey:"6a0cfe9e-3670-4598-a63e-f1627b5c9e56",snazzyPagination:null,snazzySearch:"",snazzyStyles:null,isOpen:!1,isSaving:!0,isSearching:!1,json:"",map:null,mapboxError:"",mapboxId:"",mapboxName:"",mapboxUser:"",mapboxUrl:"",mapboxParsedUrl:"",mode:"pick",page:1,style:mappl10n.options.style,standardStyles:mappl10n.options.standardStyles,userStyles:mappl10n.options.userStyles}),2),k=w[0],O=w[1];function C(e){O((function(t){return i(i({},t),e)}))}function S(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=_.findIndex(k.userStyles,{id:t.id});if(a>=0){if(!n&&!confirm(__("Style already exists, overwrite?")))return;mappl10n.options.userStyles[a]=t}else mappl10n.options.userStyles.push(t);C({isOpen:!1,mode:"pick",userStyles:mappl10n.options.userStyles,selected:t.id}),e.onChange(t.id),mapp.lib.ajax({type:"POST",data:{action:"mapp_option_save",settings:"leaflet"==mappl10n.options.engine?{stylesMapbox:mappl10n.options.userStyles}:{stylesGoogle:mappl10n.options.userStyles},nonce:mappl10n.options.nonce},callback:function(e){}})}function x(e){C({isSearching:!0,snazzyStyles:null}),mapp.lib.ajax({type:"GET",data:{sort:"popular",page:e,pageSize:20,text:k.snazzySearch,key:k.apiKey},url:"https://snazzymaps.com/explore.json",callback:function(e){(C({isSearching:!1,snazzyPagination:e&&e.pagination?e.pagination:null}),e&&e.styles)?C({snazzyStyles:_.map(e.styles,(function(e,t){return e.id=e.id+"",e}))}):alert("Error: unable to fetch styles")}})}function P(e,t){t="large"==t||"small"==t?t:"small",t=800;var n=mappl10n.options.baseurl+"/images/roadmap.png";return"leaflet"==mappl10n.options.engine?mappl10n.options.mapbox?e.user&&e.mapboxid&&(n="https://api.mapbox.com/styles/v1/"+e.user+"/"+e.mapboxid+"/static/-122.4194,37.7749,10,0/800x800?access_token="+mappl10n.options.mapbox):n=mappl10n.options.baseurl+"/images/osm.png":e.imageUrl&&(n=e.imageUrl),p("img",{src:n,title:e.name})}function j(t,n){switch(t){case"close":C({isOpen:!1});break;case"json-cancel":C({mode:"pick"});break;case"json-change":C({json:n});break;case"json-save":var a=_.findWhere(k.userStyles,{id:e.selected});a&&(a.json=JSON.stringify(JSON.parse(k.json)),S(a,!0));break;case"mapbox-cancel":C({mode:"pick"});break;case"mapbox-change-url":var o,r,i=n.trim().toLowerCase().replace(".html","").replace("https://api.mapbox.com/styles/v1/","").replace("mapbox://styles/","").split("?")[0].split("/");2==i.length&&(o=i[0],r=i[1]),C({mapboxUrl:n,mapboxUser:o,mapboxId:r});break;case"mapbox-save":k.mapboxName&&k.mapboxUser&&S({id:k.mapboxId,name:k.mapboxName,mapboxid:k.mapboxId,provider:"mapbox",url:k.mapboxUrl,user:k.mapboxUser});break;case"mode":C({mode:n});break;case"open":"leaflet"!=mappl10n.options.engine||mappl10n.options.mapbox?C({isOpen:!0}):alert(__("Please enter a Mapbox access token in the MapPress settings screen to use styled maps."));break;case"pick-add":alert(__("Please upgrade to MapPress Pro to use custom styles"));break;case"pick-cancel":C({isOpen:!1});break;case"pick-delete":confirm(mappl10n.delete_prompt)&&function(t){var n=_.findIndex(k.userStyles,{id:t});if(n<0)mapp.lib.alert("Invalid delete");else{var a=k.userStyles;a.splice(n,1),mappl10n.options.userStyles=a,C({userStyles:a}),e.selected==t&&e.onChange(null),mapp.lib.ajax({type:"POST",data:{action:"mapp_option_save",settings:"leaflet"==mappl10n.options.engine?{stylesMapbox:a}:{stylesGoogle:a},nonce:mappl10n.options.nonce},callback:function(e){}})}}(n);break;case"pick-edit":e.onChange(n.id),"leaflet"==mappl10n.options.engine?C({mode:"mapbox",mapboxId:n.mapboxid,mapboxName:n.name,mapboxUrl:n.url,mapboxUser:n.user}):C({json:n.json,mode:"json"});break;case"pick-select":e.onChange(n.id),C({isOpen:!1});break;case"snazzy-cancel":C({mode:"pick"});break;case"snazzy-save":var l=n;l&&S({id:l.id,imageUrl:l.imageUrl,json:l.json,name:l.name});break;case"snazzy-search":x()}}function N(e){var t;return t=e.styles&&e.styles.length?_.map(e.styles,(function(t,n){return function(e,t){var n="mapp-style"+(t.selected==e.id?" mapp-selected":""),a=t.onDelete?p(b,{icon:"trash",onClick:function(){return t.onDelete(e.id)}}):null,o=t.onEdit?p("a",{onClick:function(){return t.onEdit(e)}},__("Edit")):null;return p("div",{className:n,key:e.id},p("div",{className:"mapp-style-image",onClick:function(){return t.onSelect(e)}},P(e)),p("div",{className:"mapp-style-details"},p("div",{className:"mapp-style-title"},e.name),p("div",{className:"mapp-style-actions"},o,a)))}(t,e)})):k.isSearching?"":p("div",{className:"mapp-style-list-msg"},__("No results")),p("div",{className:"mapp-style-list-wrapper"},p("div",{className:"mapp-style-list-header"},e.title),p("div",{className:"mapp-style-list"},t))}return p(d,null,(c=k.standardStyles.concat(k.userStyles),u=!mappl10n.options.style||"roadmap"!=e.selected&&"streets"!=e.selected&&e.selected?e.selected:mappl10n.options.style,f=(f=_.findWhere(c,{id:u}))||k.standardStyles[0],p(h,{className:"mapp-style-toggle",icon:P(f),iconSize:75,isSecondary:!0,onClick:function(){return j("open",null)},title:f.name})),"edit"==k.mode&&k.isOpen&&renderEdit(),"json"==k.mode&&k.isOpen&&function(){var e,t,n;try{e=JSON.parse(k.json),t=JSON.stringify(e,null,2)}catch(e){n=e.toString(),t=k.json}var a=n?"mapp-style-json mapp-style-error":"mapp-style-json";return p(y,{title:__("Edit style JSON"),className:"mapp-style-modal",onRequestClose:function(){return j("json-cancel")},shouldCloseOnClickOutside:!0},p("div",{className:a},p("textarea",{value:t,spellCheck:!1,onChange:function(e){return j("json-change",e.target.value)}})),p("div",{className:"mapp-style-json-error"},n||""),p("div",{className:"mapp-style-toolbar"},p("div",null,p(h,{disabled:n,isPrimary:!0,onClick:function(){return j("json-save")}},__("Save")),p(h,{onClick:function(){return j("json-cancel")}},__("Cancel")))))}(),"mapbox"==k.mode&&k.isOpen&&(r=k.mapboxUser&&k.mapboxId?P({user:k.mapboxUser,mapboxid:k.mapboxId,name:k.mapboxName},"large"):null,l=!k.mapboxUser||!k.mapboxId||!k.mapboxName,p(y,{title:__("Add style"),className:"mapp-style-modal",onRequestClose:function(){return j("mapbox-cancel")},shouldCloseOnClickOutside:!0},p("div",{className:"mapp-style-mapbox-title"},__("Enter style from Mapbox Studio"),p(g,{href:"https://studio.mapbox.com"})),p("form",{className:"mapp-style-mapbox-form",onSubmit:function(e){e.stopPropagation(),e.preventDefault(),j("mapbox-save",k.snazzySelected)}},p("label",null,p("span",{className:"mapp-style-mapbox-label"},__("MapBox Share URL")),p(a.Help,{href:"#toc-mapbox-studio-styles"}),p(a.Input,{autoFocus:!0,className:"mapp-style-mapbox-url",value:k.mapboxUrl,onChange:function(e){return j("mapbox-change-url",e)}})),p("label",null,p("div",{className:"mapp-style-mapbox-label"},__("Style name")),p(a.Input,{className:"mapp-style-mapbox-name",value:k.mapboxName,onChange:function(e){return C({mapboxName:e})}})),p("div",{className:"mapp-style-mapbox-preview"},r),p("div",{className:"mapp-style-toolbar"},p("div",null,p(h,{isPrimary:!0,disabled:l,type:"submit"},__("Save")),p(h,{onClick:function(){return j("mapbox-cancel")}},__("Cancel"))))))),"pick"==k.mode&&k.isOpen&&(n="",k.userStyles&&k.userStyles.length&&(n=N({selected:e.selected,onEdit:function(e){return j("pick-edit",e)},onDelete:function(e){return j("pick-delete",e)},onSelect:function(e){return j("pick-select",e)},styles:k.userStyles,title:__("Custom styles")})),p(y,{title:p("div",{className:"mapp-style-header"},__("Select a style")),className:"mapp-style-modal",onRequestClose:function(){return j("close")}},p("div",{className:"mapp-style-list-wrapper"},N({onSelect:function(e){return j("pick-select",e)},selected:e.selected,styles:k.standardStyles,title:__("Standard styles")}),n),p("div",{className:"mapp-style-toolbar"},p("div",null,p(h,{isPrimary:!0,onClick:function(){return j("pick-add")}},__("New style")),p(h,{onClick:function(){return j("pick-cancel")}},__("Cancel")))))),"snazzy"==k.mode&&k.isOpen&&(k.snazzySelected,p(y,{title:__("Download style"),className:"mapp-style-modal mapp-style-modal-snazzy",onRequestClose:function(){return j("snazzy-cancel")},shouldCloseOnClickOutside:!0},p("form",{className:"mapp-style-snazzy-form",onSubmit:function(e){j("snazzy-search"),e.preventDefault()}},p(a.Input,{className:"mapp-style-snazzy-search",value:k.search,placeholder:__("Search"),onChange:function(e){return C({snazzySearch:e})}}),k.isSearching&&p(v,null),!k.isSearching&&p(h,{isPrimary:!0,icon:"search",onClick:function(){return j("snazzy-search")}})),N({selected:k.snazzySelected,styles:k.snazzyStyles,onSelect:function(e){return j("snazzy-save",e)}}),p("div",{className:"mapp-style-toolbar"},p("div",null,p(h,{onClick:function(){return j("snazzy-cancel")}},__("Cancel"))),(t=k.snazzyPagination)&&k.snazzyStyles&&k.snazzyStyles.length?p(o.Z,{count:t.totalItems,onChange:function(e){return x(e)},page:t.currentPage,pageSize:t.pageSize}):null))))}},214:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappCard:()=>v});n(824);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function s(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=wp.element.createElement,p=wp.element,u=p.Fragment,d=p.useEffect,m=(p.useLayoutEffect,p.useCallback,p.useRef),f=p.useState,_=(wp.data.useSelect,wp.components),h=_.Button,g=_.Dashicon,b=_.ExternalLink,y=_.Guide,__=(_.Modal,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function v(e){var t=e.icon,n=e.title,a=s(e,["icon","title"]);return c("div",{className:"mapp-support-card"},n&&c("div",{className:"mapp-support-card-title"},c("h3",null,t&&c(g,{icon:t}),n)),c("div",{className:"mapp-support-card-content"},a.children))}document.getElementById("mapp-support-page")&&wp.element.render(c((function(e){var t=i(f({engine:e.engine?e.engine:"leaflet",isOpen:e.isOpen,apiKey:e.apiKey,mapbox:e.mapbox}),2),n=t[0],a=t[1];function r(e){a((function(t){return o(o({},t),e)}))}function l(e){return c("div",{className:"mapp-guide-engine"+(e.selected?" mapp-selected":""),onClick:function(){return e.onClick()}},c("h2",{className:"mapp-guide-engine-title"},e.title),c("div",{className:"mapp-guide-engine-content"},e.content))}return m(null),d((function(){}),[]),c("div",{className:"mapp-support"},c(u,null,c("div",{className:"mapp-support-section"},c("div",{className:"mapp-support-header"},c("img",{src:mappl10n.options.baseurl+"/images/icon-128x128.png"}),c("h1",null,__("MapPress Support")),c("i",null,__("Build amazing maps with the easiest and most powerful mapping plugin available")),c("div",null,c(h,{className:"mapp-support-guide-toggle",isPrimary:!0,onClick:function(){return r({isOpen:!0})}},__("Open Setup Wizard"))))),c("div",{className:"mapp-support-section"},c("div",{className:"mapp-support-cards"},c(v,{icon:"book",title:__("Documentation")},c("p",null,__("Detailed plugin documentation:")),c(b,{href:"https://mappresspro.com/mappress-documentation/"},__("Documentation")),c(b,{href:"https://mappresspro.com/whats-new/"},__("What's new")),c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-map-library-and-map-editors"},__("Creating your first map"))),c(v,{icon:"warning",title:__("Troubleshooting")},c("p",null,c("b",null,__("Check for a plugin or theme conflict:"))),c("ol",null,c("li",null,__("Deactivate ALL other plugins")),c("li",null,__("Switch to a standard WordPress theme")),c("li",null,__("If the maps are working, reactivate one by one to find the conflict."))),c("p",null,__("For more info:")),c(b,{href:"https://mappresspro.com/mappress-faq/"},__("MapPress FAQ"))),c(v,{icon:"megaphone",title:__("Support")},c("p",null,__("Need some help?")),c(b,{href:"https://mappresspro.com/forums/forum/mappress-support/"},__("Support forum")),c(b,{href:"https://mappresspro.com/chris-contact/"},__("Contact")))))),function(){if(n.isOpen)return c(y,{className:"mapp-guide",onFinish:function(){return function(e,t){switch(e){case"save":var a;r({isOpen:!1}),a="google"==n.engine?"google":n.mapbox?"mapbox":"nominatim",mapp.lib.ajax({type:"POST",data:{action:"mapp_option_save",nonce:mappl10n.options.nonce,settings:{engine:n.engine,apiKey:n.apiKey,mapbox:n.mapbox,geocoder:a}},callback:function(e){"OK"!=e.status&&alert("Unable to save settings. Please check the support troubleshooting guide.")}})}}("save")},pages:[{content:c("div",{className:"mapp-guide-page mapp-guide-engines"},c("h1",null,__("Please Choose a Mapping API")),c("p",null,__("MapPress supports both Leaflet and Google mapping APIs."),c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-picking-a-mapping-api"},__("Learn more"))),c("div",{className:"mapp-guide-engines"},l({onClick:function(){return r({engine:"leaflet"})},selected:"leaflet"==n.engine,title:"Leaflet",content:c("ul",null,c("li",null,__("No API key")),c("li",null,__("Free unlimited usage")),c("li",null,__("Good functionality")),c("li",null,__("Best for high traffic sites")))}),l({onClick:function(){return r({engine:"google"})},selected:"google"==n.engine,title:"Google",content:c("ul",null,c("li",null,__("API key required")),c("li",null,__("Limited free usage")),c("li",null,__("Excellent functionality")),c("li",null,__("Best for low traffic sites")))}))),image:c("div",{className:"mapp-guide-header mapp-guide-image-small"},c("img",{src:mappl10n.options.baseurl+"/images/icon-128x128.png"}),c("h1",null,__("Welcome to MapPress!")))},{content:"google"==n.engine?c("div",{className:"mapp-guide-page mapp-guide-apikey"},c("h1",null,__("Google API Key")),c("p",null,__("Google requires an API key to use Google Maps. Please enter your key below.")),c(h,{isPrimary:!0,href:"https://mappresspro.com/how-to-get-a-google-maps-api-key/",target:"_blank"},__("Get an API Key")),c("input",{className:"mapp-guide-apikey",onChange:function(e){return r({apiKey:e.target.value})},placeholder:__("Enter your API key here"),value:n.apiKey})):c("div",{className:"mapp-guide-page mapp-guide-apikey"},c("h1",null,__("Sign up with Mapbox")),c("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."),c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-using-mapbox-with-leaflet"},__("Learn more"))),c(h,{isPrimary:!0,href:"https://account.mapbox.com/auth/signup/",target:"_blank"},__("Get Mapbox Access Token")),c("input",{className:"mapp-guide-apikey",onChange:function(e){return r({mapbox:e.target.value})},placeholder:__("Enter your access token here"),value:n.mapbox})),image:c("div",{className:"mapp-guide-header mapp-guide-image-small"},"google"==n.engine&&c("img",{src:mappl10n.options.baseurl+"/images/google_logo.png"}),"leaflet"==n.engine&&c("img",{src:mappl10n.options.baseurl+"/images/mapbox_logo_white.png"}))},{content:c("div",{className:"mapp-guide-page mapp-guide-gutenberg"},c("h1",null,__("Maps in the Block Editor")),c("p",null,__("MapPress provides custom block types for the Gutenberg editor.")),c("p",null,__("Just insert a MapPress Map block to get started."),c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-create-a-map-with-the-gutenberg-block-editor"},__("Learn more")))),image:c("div",{className:"mapp-guide-header"},c("img",{src:mappl10n.options.baseurl+"/images/gutenberg_map_block.gif"}))},{content:c("div",{className:"mapp-guide-page mapp-guide-classic"},c("h1",null,__("Maps in the Classic Editor")),c("p",null,__('MapPress also supports the "classic" editor. Just click the MapPress button to open the map library.')),c("p",null,c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-create-a-map-with-the-classic-editor"},__("Learn more")))),image:c("div",{className:"mapp-guide-header"},c("img",{src:mappl10n.options.baseurl+"/images/classic_map.gif"}))},{content:c("div",{className:"mapp-guide-page mapp-guide-library"},c("h1",null,__("Map Library")),c("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.")),c("p",null,c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-map-library-and-map-editors"},__("Learn more")))),image:c("div",{className:"mapp-guide-header"},c("img",{src:mappl10n.options.baseurl+"/images/library_menu.gif"}))},{content:c("div",{className:"mapp-guide-page mapp-guide-end"},c("h1",null,__("Happy Mapping")),c("p",null,__("Enjoy the plugin! Replay this guide any time from the MapPress support menu."))),image:c("div",{className:"mapp-guide-header"},c("img",{src:mappl10n.options.baseurl+"/images/icon-128x128"}))}]})}())}),mappress_support_state),document.getElementById("mapp-support-page"))},308:(e,t,n)=>{"use strict";e.exports=function(e,t){var a,o,r,i,l,s,c,p,u,d,m,f,_,h=String(e).replace(/^&/,"").replace(/&$/,"").split("&"),g=h.length,b=function(e){return decodeURIComponent(e.replace(/\+/g,"%20"))},y="undefined"!=typeof window?window:n.g;y.$locutus=y.$locutus||{};var v=y.$locutus;for(v.php=v.php||{},t||(t=y),a=0;a<g&&(u=b((p=h[a].split("="))[0]),d=p.length<2?"":b(p[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));a++){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(f=[],m=0,o=0;o<u.length;o++)if("["!==u.charAt(o)||m){if("]"===u.charAt(o)&&m&&(f.length||f.push(u.slice(0,m-1)),f.push(u.substr(m,o-m)),m=0,"["!==u.charAt(o+1)))break}else m=o+1;for(f.length||(f=[u]),o=0;o<f[0].length&&(" "!==(c=f[0].charAt(o))&&"."!==c&&"["!==c||(f[0]=f[0].substr(0,o)+"_"+f[0].substr(o+1)),"["!==c);o++);for(s=t,o=0,_=f.length;o<_;o++){if(l=s,(""===(u=f[o].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==o){for(i in r=-1,s)s.hasOwnProperty(i)&&+i>r&&i.match(/^\d+$/g)&&(r=+i);u=r+1}Object(s[u])!==s[u]&&(s[u]={}),s=s[u]}l[u]=d}}}}},t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(787),n(844),n(215),n(713),n(525),n(371),n(999),n(143),n(938),n(816),n(378),n(498),n(670),n(218),n(824),n(477),n(429),n(214)})();
1
+ (()=>{var e={844:()=>{function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(t){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var r=wp.element.createElement,i=wp.element,l=(i.Fragment,i.useEffect),s=(i.useLayoutEffect,i.useRef,i.useState),c=wp.components,p=c.Button,u=c.Modal,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function d(e){var n,o,i=a(s({isOpen:!1,reason:"",reasonText:"",redirectUrl:null}),2),c=i[0],d=i[1];function m(e){d((function(n){return t(t({},n),e)}))}function f(e,t){switch(e){case"cancel":m({isOpen:!1});break;case"submit":m({isOpen:!1}),window.location.href=c.redirectUrl+"&mapp_reason="+c.reason+"&mapp_reason_text="+encodeURIComponent(c.reasonText.trim())}}return l((function(){var e=jQuery("#deactivate-mappress-google-maps-for-wordpress");e.length&&(e.off("click.mapp"),e.on("click.mapp",(function(){var e,t;return(t=(e=this)?jQuery(e).attr("href"):null)&&m({isOpen:!0,redirectUrl:t}),!1})))}),[]),c.isOpen?r(u,{isDismissible:!0,onRequestClose:function(){return f("cancel")},shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,title:__("Feedback")},(o=!c.reason||"other"==c.reason&&!c.reasonText,sprintf("<a href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>",__("contact me")),r("div",{className:"mapp-deactivate"},r("div",{className:"mapp-deactivate-content"},r("h2",null,__("Sorry to see you go! Need help?"),r(p,{className:"mapp-deactivate-help",isSecondary:!0,href:"https://mappresspro.com/chris-contact",target:"_blank"},__("Contact me"))),r("h2",null,__("If not, I'd really appreciate some feedback:")),(n=[{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?")}],r("div",{className:"mapp-deactivate-reasons"},_.map(n,(function(e){var t=e.value==c.reason;return r("div",{className:"mapp-deactivate-reason",key:e.value},r("label",null,r("input",{checked:t,onChange:function(e){return m({reason:e.target.value})},type:"radio",value:e.value}),e.label),t&&e.placeholder&&r("div",null,r("textarea",{onChange:function(e){return m({reasonText:e.target.value})},placeholder:e.placeholder,value:c.reasonText})))}))))),r("div",{className:"mapp-deactivate-footer"},r(p,{isSecondary:!0,disabled:o,onClick:function(){return f("submit")}},__("Deactivate")),r(p,{isPrimary:!0,onClick:function(){return f("cancel")}},__("Cancel")))))):null}jQuery(document).ready((function(){var e=jQuery("<div></div>").appendTo("body").get(0);wp.element.render(r(d),e)}))},215:(e,t,n)=>{"use strict";n.r(t);var a=n(525),o=n(143);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s,c=window.mapp||{},p=wp.element.createElement;s=jQuery,c.Editor=function(e){this.drawingManager=null,this.map=e,this.poiEditor=null;var t=this;this.initialize=function(){this.map.display(),this.poiEditor=new c.PoiEditor(this.map),this.initDrawingManager(),s(this.map.places).off("search.mapp"),s(this.map.places).on("search.mapp",(function(e,n){t.insert(n)}))},this.insert=function(e){if(e)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.poiClose(),e.geometry){var n=e.formatted_address?e.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,a=e.name==n?"":n,o=new c.Poi({address:n,body:a,iconid:this.poiEditor.lastIcon,point:e.geometry.location,title:e.name,viewport:e.geometry.viewport?e.geometry.viewport:null});this.map.poiInsert(o),o.center()}else e.overlay?(this.map.poiHover(null),"marker"==e.type?(o=new c.Poi({body:"",iconid:null,overlay:null,point:e.overlay.getPosition().toJSON(),title:e.overlay.getPosition().toUrlValue(6),type:null}),e.overlay.setMap(null)):o=new c.Poi({body:"",iconid:null,overlay:e.overlay,title:mappl10n.shape,type:e.type}),this.map.poiInsert(o)):"string"==typeof e&&"http"==e.substring(0,4)&&(o=new c.Poi({iconid:this.poiEditor.lastIcon,kml:{url:e},title:"KML",type:"kml"}),t.map.poiInsert(o),c.event.addListenerOnce(o.overlay,"ready defaultviewport_changed",(function(){o.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()),c.event.addListener(this.drawingManager,"overlaycomplete",(function(e){t.drawingManager.get("drawingMode")&&t.insert(e)})))},this.initialize.apply(this)},c.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,n){t.render(n)})),s(this.map).on("mapp.close",(function(){t.mce(!1)})),this.sel.on("click","[data-mapp-poi]",(function(e){e.preventDefault();var n=s(this).attr("data-mapp-poi");t[n]()})),this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",(function(e){var n=s(this).hasClass("mapp-poi-visual");t.mce(n)})),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 n={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(n),this.mce(!0)}},this.mce=function(e){var n=e?"mceAddEditor":"mceRemoveEditor";"undefined"!=typeof tinyMCE&&tinyMCE.execCommand(n,!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){var t=this;document.getElementById("mapp-poi-colorpicker")&&wp.element.render(p(a.MappColorPicker,i(i({},e.getTemplateColors()),{},{isExtended:!0,onChange:function(n){e.set({dirty:!0}),e.setTemplateColors(n),t.map.renderList(),t.renderColorPicker(e)}})),document.getElementById("mapp-poi-colorpicker"))},this.renderIconPicker=function(e){var t=this;document.getElementById("mapp-poi-iconpicker")&&wp.element.render(p(o.MappIconPicker,{iconid:e.iconid,onChange:function(n){e.set({dirty:!0,iconid:n}),t.lastIcon=n,t.map.renderList(),t.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,n)=>{"use strict";function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}n.r(t),n.d(t,{default:()=>y});var s=wp.element.createElement,c=wp.url.addQueryArgs,p=wp.element,u=p.useCallback,d=p.useEffect,m=p.useState,f=wp.components,h=(f.Button,f.Dropdown),g=f.Spinner,b=f.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function y(e){var t=i(m({isFetching:!1,results:[],search:"",searchTerm:""}),2),n=t[0],a=t[1];function r(e){a((function(t){return o(o({},t),e)}))}d((function(){n.isOpen&&(r({isFetching:!0}),wp.apiFetch({path:c("/wp/v2/search",{search:n.search,per_page:20})}).then((function(e){r({results:e,isFetching:!1})})))}),[n.search,n.isOpen]);var l=u(_.debounce((function(e){r({search:e})}),1e3),[]);function p(t,a){return s("div",{className:"mapp-attach-control"},s("div",{className:"mapp-attach-control-toolbar"},s(b,{autoComplete:"false",value:n.searchTerm,onChange:function(e){r({searchTerm:e}),l(e)},placeholder:__("Search")})),function(){if(n.isFetching)return s(g,null);if(n.results)return n.results.length?s("div",{className:"mapp-attach-items"},n.results.map((function(t){return s("div",{key:t.id,className:"mapp-attach-item",onClick:function(){e.onChange(t.id,t.title)}},s("div",{className:"mapp-attach-item-title"},t.title?t.title:__("Untitled")),s("div",{className:"mapp-attach-item-type"},t.type))}))):s("div",{},__("No posts found"))}())}return s("div",{onClick:function(e){return e.stopPropagation()}},s(h,{onToggle:function(e){return r({isOpen:e})},renderToggle:function(e){e.isOpen;var t=e.onToggle;return s("a",{href:"#",onClick:t},__("Attach"))},renderContent:function(e){e.isOpen,e.onToggle;return p()}}))}},525:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappColorPicker:()=>y});var a=n(824);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var c=wp.element.createElement,p=wp.element,u=p.Fragment,d=p.useEffect,m=(p.useLayoutEffect,p.useCallback,p.useRef,p.useState),f=(wp.data.useSelect,wp.compose.withState,wp.components),h=f.Button,g=(f.ColorPalette,f.ColorPicker),b=(f.Dashicon,f.Dropdown,f.ExternalLink,f.Modal),__=(f.Panel,f.PanelBody,f.PanelRow,f.Popover,f.RadioControl,f.Spinner,f.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function y(e){var t=l(m({isCustomOpen:!1,isOpen:!1}),2),n=t[0],o=t[1];function i(e){o((function(t){return r(r({},t),e)}))}function s(t,n){switch(t){case"close":i({isOpen:!1});break;case"open":i({isOpen:!0});break;case"select":e.onChange(n),s("close");break;case"set":e.onChange(n)}}return d((function(){}),[]),c(u,null,c("span",{className:"mapp-colors-toggle",onClick:function(){return s("open",null)},style:{backgroundColor:e.color,border:e.isExtended?"1px solid "+e.color:"1px solid gray",opacity:e.isExtended&&e.opacity?e.opacity/100:1},tabIndex:0}),function(){if(!n.isOpen)return null;var t=_.map([100,90,80,70,60,50,40,30,20,10,0],(function(e){return{label:e+"%",value:e}})),o=_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],(function(e){return{label:e+"px",value:e}}));return c(b,{title:__("Select a color"),className:"mapp-colors-modal",onRequestClose:function(e){return s("close")}},c("div",{className:"mapp-colors"},c("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"]],(function(t,n){return c("div",{key:n},_.map(t,(function(t){return c("span",{className:"mapp-color"+(t==e.color?" mapp-selected":""),key:t,onClick:function(){i({isCustomOpen:!1}),s("select",{color:t})},style:{backgroundColor:t},title:t})})))}))),n.isCustomOpen&&c(g,{color:e.color,onChangeComplete:function(e){return s("set",{color:e.hex})},disableAlpha:!0}),e.isExtended&&c(a.Select,{label:__("Opacity"),options:t,value:e.opacity?e.opacity:"",onChange:function(e){return s("set",{opacity:e})}}),e.isExtended&&c(a.Select,{label:__("Stroke"),options:o,value:e.weight?e.weight:"",onChange:function(e){return s("set",{weight:e})}}),c("div",{className:"mapp-colors-toolbar"},c(h,{isPrimary:!0,onClick:function(){return s("close")}},__("Done")),c(h,{onClick:function(){return i({isCustomOpen:!n.isCustomOpen})}},__("Custom color")))))}())}},371:(e,t,n)=>{"use strict";n.r(t);var a=n(694);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}wp&&wp.plugins&&wp.plugins.registerPlugin&&wp.editPost&&wp.plugins.registerPlugin("mappress-document-settings-panel",{render:function(){var e,t,n=wp.editPost.PluginDocumentSettingPanel,o=wp.element.createElement,i=wp.element,s=i.Fragment,c=i.useEffect,p=(i.useLayoutEffect,i.useRef,i.useState),u=wp.components,d=u.Button,m=u.Spinner,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")},f=l(p({isFetchingItems:!0,isPickerOpen:!1,items:null,pickerMapid:null,pickerMode:"list"}),2),h=f[0],g=f[1];function b(e){g((function(t){return r(r({},t),e)}))}function y(e,t){switch(e){case"open-library":b({isPickerOpen:!0,pickerMode:"list"});break;case"edit":b({isPickerOpen:!0,pickerMapid:t,pickerMode:"edit"});break;case"pick-close":b({isPickerOpen:!1,pickerMapid:null});break;case"pick-insert":var n=wp.blocks.createBlock("mappress/map",{mapid:t});wp.data.dispatch("core/block-editor").insertBlock(n,0),b({isPickerOpen:!1,pickerMapid:null})}}function v(e){var t=e.map_title?e.map_title:__("Untitled");return o("div",{className:"mapp-document-item",key:e.mapid+e.postid},o("a",{className:"mapp-document-col-map_title",href:"#",onClick:function(t){return y("edit",e.mapid)}},t),o("div",{className:"mapp-document-col-mapid"},e.mapid))}return c((function(){var e=function(e){b({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return mapp.store.subscribe(e),function(){return mapp.store.unsubscribe(e)}})),c((function(){mapp.store.fetchItems()}),[]),o(n,{title:"MapPress",className:"mapp-document-panel"},(t=_.filter(h.items,(function(e){return e.postid==mappl10n.options.postid})),e=h.isFetchingItems?o(m,null):t.length?o(s,null,o("div",{className:"mapp-document-header"},o("div",{className:"mapp-document-col-map_title"},__("Map title")),o("div",{className:"mapp-document-col-mapid"},null,__("Map ID"))),_.map(t,v)):o("div",{className:"mapp-document-message"},__("No maps found")),o("div",null,o("div",{className:"mapp-document-list"},e))),o(d,{icon:"portfolio",isSecondary:!0,onClick:function(){return y("open-library")}},__("Open map library")),function(){if(h.isPickerOpen)return o(a.default,{mapid:h.pickerMapid,mode:h.pickerMode,onAction:y,type:"post"})}())},icon:null})},999:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var a=n(429),o=n(710);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p=window.mapp||{},u=wp.element.createElement,d=wp.element,m=(d.Fragment,d.useEffect),f=(d.useLayoutEffect,d.useRef),h=d.useState,g=wp.components,b=g.Button,y=(g.Dropdown,g.Modal,g.Panel,g.PanelBody,g.Popover,g.Spinner,g.TextControl),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function v(e){var t,n,r=s(h({dragging:null,dragover:null,isFetchingMap:!!e.mapid,isPoiListOpen:!0,isSavingMap:!1,map:null,mapdata:null}),2),l=r[0],c=r[1],d=f(null);function g(e){c((function(t){return i(i({},t),e)}))}function v(e){g({map:l.map})}function w(t,n){switch(t){case"change-settings":l.map.set(n),g({map:l.map});break;case"change-title":l.map.set({dirty:!0,title:n}),g({map:l.map});break;case"close":e.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(p.store.destroyMap({mapid:e.mapid}),e.onAction("edit-destroy"));break;case"save":p.store.saveMap({mapdata:l.map.toJSON(),success:function(t){l.map.set({dirty:!1}),e.onAction("edit-save",t.mapid)}})}}return m((function(){l.map&&(jQuery(l.map.div.layout).off("mapp.render",v),jQuery(l.map.div.layout).on("mapp.render",(function(e){return v()})))}),[l.map]),m((function(){var t=function(t){g({isFetchingMap:t.isFetchingMap,isSavingMap:t.isSavingMap,mapdata:t.maps[e.mapid]})};return p.store.subscribe(t),function(){return p.store.unsubscribe(t)}})),m((function(){e.mapid&&p.store.fetchMap({mapid:e.mapid})}),[e.mapid]),m((function(){if(!l.isFetchingMap){var t={editable:!0,embed:!0,layout:"left",mapOpts:{streetViewControl:!1},menu:!1,name:"media-map",poiList:!1,sel:jQuery(d.current)};"map"!=e.context&&"mashup"!=e.context||(t.center=null,t.zoom=null);var n=new p.Map(l.mapdata,t);new p.Editor(n);g({map:n})}}),[l.mapdata]),m((function(){l.map&&setTimeout((function(){return l.map.resize()}),100)}),[l.isPoiListOpen]),u("div",{className:"mapp-edit"},(t=l.map&&!l.isFetchingMap&&l.map.title?l.map.title:"",n=l.map&&!l.isFetchingMap?__("Untitled"):"",u("div",{className:"mapp-gt-modal-header"},u(y,{className:"mapp-edit-title",placeholder:n,value:t,onChange:function(e){return w("change-title",e)}}))),u("div",{className:"mapp-edit-main"},u("div",{className:"mapp-list mapp-edit-list"+(l.isPoiListOpen?" mapp-list-open":"")},u("div",{className:"mapp-edit-list-wrapper"},function(){if("mce"!=e.context&&"library"!=e.context)return null;if(!l.map)return null;var t=l.map,n=t.center,o=t.height,r=t.poiList,i=t.width,s=t.zoom;return u("div",{className:"mapp-gt-inspector"},u(a.MappSettings,{map:l.map,context:e.context,onAction:w,center:n,height:o,poiList:r,width:i,zoom:s}))}(),function(){if(l.map){var e=function(e,t){var n=l.dragging,a=n<a?t-1:t;l.map.pois_.splice(a,0,l.map.pois_.splice(n,1)[0]),g({map:l.map,dragover:null})};return u("div",{className:"mapp-items"},_.map(l.map.pois_,(function(t,n){return u("div",{className:l.dragover==n?"mapp-item mapp-edit-dragover":"mapp-item",draggable:!0,key:n,onClick:function(){return l.map.poiOpen(l.map.pois_[n])},onDragOver:function(e){return e.preventDefault()},onDragStart:function(e){return g({dragging:n})},onDragEnter:function(e){return g({dragover:n})},onDragEnd:function(e){return g({dragging:null,dragover:null})},onDrop:function(t){return e(t,n)}},u("img",{className:"mapp-icon",src:p.Icons.getUrl(t.iconid)}),u("div",{className:"mapp-title"},t.title))})))}}()),u("div",{className:"mapp-list-toggle",onClick:function(){return g({isPoiListOpen:!l.isPoiListOpen})}})),u("div",{className:"mapp-edit-map",key:e.mapid,ref:d,onKeyDown:function(e){return e.stopPropagation()},tabIndex:-1}),d.current&&l.map?u(o.m,{map:l.map,selected:l.map.mapTypeId,onChange:function(e){return w("change-settings",{mapTypeId:e})}}):null),u("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(e){return e.stopPropagation()}},u(b,{isPrimary:!0,isBusy:l.isSavingMap,onClick:function(){return w("save")}},__("Save")),u(b,{disabled:l.isSavingMap,onClick:function(){return w("close")}},__("Cancel")),u(b,{disabled:!e.mapid||l.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return w("destroy")}},__("Delete"))))}},143:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappIconPicker:()=>C});var a=n(525),o=n(824);function r(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var d=wp.element.createElement,m=wp.element,f=m.Fragment,h=m.useEffect,g=(m.useLayoutEffect,m.useCallback,m.useRef,m.useState),b=(wp.data.useSelect,wp.compose.withState,wp.components),y=b.Button,v=(b.ColorPicker,b.DropZone,b.DropZoneProvider,b.FormFileUpload),w=b.Modal,k=(b.Popover,b.RangeControl),__=(b.Spinner,b.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")}),O=[{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}]}],S=[{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 C(e){var t,n=c(g({defaultIcon:mappl10n.options.defaultIcon,filename:null,filter:"",glyph:"",glyphColor:"white",glyphFont:S[0],glyphSize:20,isOpen:!1,mode:"list",shape:"circle",shapeColor:"gray",shapeFont:O[0],toDelete:[],userIcons:mappl10n.options.userIcons}),2),i=n[0],s=n[1];function p(e){s((function(t){return l(l({},t),e)}))}function u(t,n){switch(t){case"bulk-select":var a=r(i.toDelete),o=i.toDelete.indexOf(n.iconid);o>=0?a.splice(o,1):a.push(n.iconid),p({toDelete:a});break;case"close":p({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&mapp.lib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconids:i.toDelete,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(i.toDelete.indexOf(e.iconid)>=0&&!function(e){if(!e)return!1;var t=e.replace(/.png|.gif|.jpg/gi,"").toLowerCase();return mappl10n.options.standardIcons.indexOf(t)>=0}(e.iconid)&&e.onChange(null),mappl10n.options.userIcons=t.data,p({toDelete:[],mode:"list",userIcons:mappl10n.options.userIcons})):alert("Delete error: "+t.status)}});break;case"edit-cancel":p({mode:"list"});break;case"edit-save":!function(e){var t=32,n=2,a=document.createElement("canvas");a.width=t*n,a.height=t*n,a.style.imageRendering="pixelated";var o=a.getContext("2d");o.font=t*n+"px "+i.shapeFont.fontFamily,o.fillStyle=i.shapeColor,o.textBaseline="bottom",o.fillText(i.shape,0,t*n),o.strokeStyle="white",o.strokeText(i.shape,1,t*n);var r=_.findWhere(i.shapeFont.glyphs,{name:i.shape});if(i.glyph&&r.center){o.imageSmoothingEnabled=!1,o.font=i.glyphSize*n+"px "+i.glyphFont.fontFamily,o.fillStyle=i.glyphColor;var l=[r.center[0]*n,r.center[1]*n];o.fillText(i.glyph,l[0]-i.glyphSize,l[1]+i.glyphSize)}"undefined"!=typeof debug?document.getElementById("mapp-edit-debug").append(a):a.toBlob((function(e){var t=new FormData;t.append("image0",e,i.filename),b(t)}),"image/png",100)}();break;case"edit-upload":l=n,s=new FormData,_.map(l,(function(e,t){e.type.match("image.*")?s.append("image"+t,e):alert("File "+e.name+" is not an image.")})),b(s);break;case"list-select":e.onChange&&e.onChange(n),u("close");break;case"mode":p("bulk"==n?{mode:n,toDelete:[]}:{mode:n});break;case"open":p({isOpen:!0})}var l,s}function m(t){var n="user"==t?mappl10n.options.userIcons:mappl10n.options.standardIcons;return _.map(n,(function(n){if("standard"==t&&function(e){return mappl10n.options.userIcons.indexOf(e)>=0}(n+".png"))return"";var a="mapp-icon-wrapper";return"bulk"==i.mode&&i.toDelete.indexOf(n)>=0?a+=" mapp-bulk-selected":"list"!=i.mode||e.iconid!=n&&e.iconid+".png"!=n||(a+=" mapp-selected"),d("div",{alt:n,className:a,key:n,onClick:function(){"list"==i.mode?u("list-select",n):"user"==t&&u("bulk-select",{iconid:n,type:t})}},d("img",{className:"mapp-icon",src:mapp.Icons.getUrl(n),title:n}))}))}function b(t){t.append("action","mapp_icon_save"),t.append("nonce",mappl10n.options.nonce),mapp.lib.ajax({type:"POST",contentType:!1,processData:!1,data:t,success:function(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 h((function(){var e=i.glyph?i.glyph:i.shape;p({filename:e+=".png"})}),[i.shape,i.shapeColor,i.glyphFont,i.glyph,i.glyphColor,i.glyphSize]),d(f,null,d("img",{className:"mapp-icon",onClick:function(){return u("open",null)},src:mapp.Icons.getUrl(e.iconid)}),"list"==i.mode&&i.isOpen&&d(w,{title:d("div",{className:"mapp-icons-title"},__("Select icon"),d(y,{disabled:"bulk"==i.mode,isPrimary:!0,onClick:function(){return u("mode","edit")}},__("New icon"))),className:"mapp-icons-modal",onRequestClose:function(){return u("close")}},d("div",{className:"mapp-icons"},d("div",{className:"mapp-icons-list"},mappl10n.options.userIcons.length>0&&d("div",{className:"mapp-icons-list-title"},__("Custom icons")),d("div",{className:"mapp-icons-user"},m("user")),mappl10n.options.userIcons.length>0&&d("div",{className:"mapp-icons-list-title"},__("Standard icons")),d("div",{className:"mapp-icons-standard"},m("standard"))),d("div",{className:"mapp-icons-toolbar"},d("div",null,d(y,{disabled:"bulk"==i.mode,isSecondary:!0,onClick:function(){return u("list-select",null)}},__("Use default icon")),mappl10n.options.userIcons.length>0&&d(y,{isTertiary:!0,onClick:function(){return u("mode","bulk")}},__("Edit list"))),d("div",{className:"mapp-icons-filename"},e.iconid?e.iconid:__("No icon selected"))))),"bulk"==i.mode&&i.isOpen&&d(w,{title:d("div",{className:"mapp-icons-title"},__("Select icons to delete")),className:"mapp-icons-modal",onRequestClose:function(){return u("close")}},d("div",{className:"mapp-icons"},d("div",{className:"mapp-icons-list"},d("div",{className:"mapp-icons-user"},m("user"))),d("div",{className:"mapp-icons-toolbar"},d("div",null,d(y,{isDestructive:!0,disabled:i.toDelete.length<1,onClick:function(){return u("delete")}},__("Delete")),d(y,{isSecondary:!0,onClick:function(){return u("mode","list")}},__("Cancel")))))),"edit"==i.mode&&d(w,{title:__("Create new icon"),className:"mapp-icons-edit-modal",onRequestClose:function(){return u("edit-cancel")},shouldCloseOnClickOutside:!1},d("div",{className:"mapp-icons-edit"},d("div",{id:"mapp-edit-debug"}),d("section",null,d("h2",null,__("Shape")),d("span",{className:"mapp-icons-edit-shapes",style:{color:i.shapeColor,fontFamily:i.shapeFont.fontFamily}},_.map(i.shapeFont.glyphs,(function(e,t){var n=i.shape==e.name;return d("span",{className:"mapp-icons-edit-shape-wrapper"+(n?" mapp-selected":""),key:e.name,onClick:function(){return p({shape:e.name})},title:e.name},d("span",{className:"mapp-icons-edit-shape"},e.name,e.center&&i.glyph&&d("div",{className:"mapp-icons-edit-shape-glyph "+i.glyphFont.className,style:{left:e.center[0],top:e.center[1],color:i.glyphColor,fontSize:i.glyphSize,width:i.glyphSize}},i.glyph)))})))),d("section",{className:"mapp-icons-edit-font"},d("h2",null,__("Font")),d(o.Select,{value:i.glyphFont.id,options:_.map(S,(function(e){return{value:e.id,label:e.label}})),onChange:function(e){return p({glyphFont:_.findWhere(S,{id:e}),glyph:null})}}),d("span",null,__("Font size")),d(k,{initialPosition:20,min:16,max:24,value:i.glyphSize,onChange:function(e){return p({glyphSize:e})}})),d("section",null,d("h2",null,__("Color")),d("span",{className:"mapp-icons-edit-colors"},d(a.MappColorPicker,{color:i.shapeColor,isExtended:!1,onChange:function(e){return p({shapeColor:e.color})}}),d("span",null,__("Fill")),d(a.MappColorPicker,{color:i.glyphColor,isExtended:!1,onChange:function(e){return p({glyphColor:e.color})}}),d("span",null,__("Stroke")))),(t=_.filter(i.glyphFont.glyphs,(function(e){return!i.filter||e.includes(i.filter)})),d("div",{className:"mapp-icons-edit-glyphs"},d("section",{className:"mapp-icons-edit-search"},d("h2",null,__("Search")),d(o.Input,{value:i.filter,onChange:function(e){return p({filter:e})}})),d("div",{className:"mapp-icons-edit-glyph-list",style:{color:i.glyphColor}},_.map(t,(function(e,t){return d("div",{tabIndex:0,className:"mapp-icons-edit-glyph-wrapper"+(i.glyph==e?" mapp-selected":""),key:t,onClick:function(){return p({glyph:i.glyph==e?null:e})}},d("span",{className:"mapp-icons-edit-glyph "+i.glyphFont.className},e),d("div",{className:"mapp-icons-edit-glyph-title"},e.replaceAll("_"," ")))}))))),d("div",{className:"mapp-icons-edit-toolbar"},d("div",{className:"mapp-icons-edit-toolbar-left"},d(y,{isPrimary:!0,onClick:function(){return u("edit-save")}},__("Save")),d(y,{isSecondary:!0,onClick:function(){return u("edit-cancel")}},__("Cancel")),d(o.Input,{className:"mapp-icons-filename",value:i.filename,onChange:function(e){return p({filename:e})}})),d("div",null,d(v,{accept:"image/*",icon:"upload",multiple:!0,onChange:function(e){u("edit-upload",e.target.files)}},__("Upload icons")))))))}},816:(e,t,n)=>{"use strict";n.r(t);var a=n(429),o=n(694);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p=window.mapp||{},u=wp.element.createElement,d=wp.element,m=d.Fragment,f=d.useEffect,_=(d.useLayoutEffect,d.useRef),h=d.useState,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function g(e){var t=wp.components,n=(t.BaseControl,t.Button),r=(t.ButtonGroup,t.CheckboxControl,t.Dropdown,t.Modal,t.Panel,t.PanelBody,t.PanelRow,t.Placeholder),l=(t.RadioControl,t.SelectControl,t.TextControl,t.ToggleControl,t.Toolbar),c=t.ToolbarButton,d=t.ToolbarGroup,g=wp.blockEditor,b=g.BlockControls,y=g.InspectorControls,v=s(h({isOpen:!1,map:null,mapdata:void 0,pickerMode:"list",pickerMapid:null}),2),w=v[0],k=v[1],O=_(null);function S(e){k((function(t){return i(i({},t),e)}))}function C(t,n){switch(t){case"add":S({isOpen:!0,pickerMapid:null,pickerMode:"edit"}),e.setAttributes({center:void 0,zoom:void 0});break;case"change-settings":e.setAttributes(n);break;case"edit":S({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"edit"});break;case"edit-close":S({isOpen:!1});break;case"pick-destroy":e.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0}),S({isOpen:!1});break;case"pick-close":S({isOpen:!1});break;case"pick-insert":case"pick-duplicate":n!=e.attributes.mapid&&e.setAttributes({center:void 0,mapid:n,zoom:void 0}),S({isOpen:!1});break;case"open":S({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"list"})}}function x(){return u(b,null,u(void 0!==d?d:l,null,e.attributes.mapid&&u(c,{icon:"edit",label:__("Edit map"),onClick:function(){return C("edit")}}),u(c,{icon:"portfolio",label:__("Map Library"),onClick:function(){return C("open")}})))}function P(){if(w.isOpen)return u(o.default,{mapid:w.pickerMapid,mode:w.pickerMode,onAction:C,type:"post"})}return f((function(){var t=function(t){S({mapdata:t.maps[e.attributes.mapid]})};return p.store.subscribe(t),function(){return p.store.unsubscribe(t)}})),f((function(){e.attributes.mapid&&p.store.fetchMap({mapid:e.attributes.mapid})}),[e.attributes.mapid]),f((function(){var t;e.attributes.mapid&&O.current&&w.mapdata&&((t=new p.Map(w.mapdata,{alignment:e.attributes.align,center:e.attributes.center,height:e.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:e.attributes.poiList,sel:jQuery(O.current),width:e.attributes.width,zoom:e.attributes.zoom})).display(),S({map:t}))}),[w.mapdata]),f((function(){"wide"!=e.attributes.align&&"full"!=e.attributes.align||(e.setAttributes({width:"100%"}),w.map&&w.map.setSize({width:"100%"}))}),[e.attributes.align]),e.attributes.preview?u("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):e.attributes.mapid&&null!==w.mapdata?u(m,null,x(),function(){if(!w.map)return null;var t=e.attributes,n=t.align,o=t.center,r=t.height,i=t.poiList,l=t.width,s=t.zoom;return u(y,null,u("div",{className:"mapp-gt-inspector"},u(a.MappSettings,{map:w.map,alignment:n,context:"map",onAction:C,center:o,height:r,poiList:i,width:l,zoom:s})))}(),u("div",{className:"mapp-gt",ref:O}),P()):u(m,null,u(m,null,x(),u(r,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Use the map library to create a new map or insert an existing map.")},u(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return C("open")}},__("Map Library")))),P())}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},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:function(e){return e.named.center}},height:{type:"string",shortcode:function(e){return e.named.height}},initialOpenDirections:{type:"boolean",shortcode:function(e){return"true"==e.named.initialOpenDirections||"true"==e.named.initialopendirections}},mapid:{type:"string",shortcode:function(e){return e.named.mapid}},poiList:{type:"boolean",shortcode:function(e){return"true"==e.named.poiList||"true"==e.named.poilist}},width:{type:"string",shortcode:function(e){return e.named.width}},zoom:{type:"number",shortcode:function(e){return parseInt(e.named.zoom)?parseInt(e.named.zoom):null}}}},{type:"block",blocks:["core/shortcode"],isMatch:function(e){var t=e.text,n=wp.shortcode.regexp("mappress");return n.lastIndex=0,n.test(t)},transform:function(e){var t=e.text;return wp.blocks.rawHandler({HTML:"<p>"+t+"</p>",mode:"BLOCKS"})}}]},edit:function(e){return u(g,e)},save:function(e){return e},example:{attributes:{preview:!0}}})},378:(e,t,n)=>{"use strict";n.r(t);n(429),n(670),n(308);window.mapp,wp.element.createElement;var a=wp.element,o=(a.Fragment,a.useEffect,a.useLayoutEffect,a.useRef,a.useState,wp.components);o.BaseControl,o.Button,o.ButtonGroup,o.Card,o.CardBody,o.CardFooter,o.CardHeader,o.CheckboxControl,o.ExternalLink,o.HorizontalRule,o.Panel,o.PanelBody,o.PanelRow,o.Placeholder,o.RadioControl,o.SelectControl,o.TabPanel,o.TextControl,o.TextareaControl,o.ToggleControl,o.Toolbar,wp.data.useSelect},498:(e,t,n)=>{"use strict";n.r(t);var a=n(694);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}window.mapp;var c=wp.element.createElement,p=wp.element,u=p.Fragment,d=(p.useEffect,p.useLayoutEffect,p.useRef,p.useState),m=wp.components,f=(m.Button,m.Dashicon),__=(m.Modal,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function _(){var e=l(d({isOpen:!1,mapid:null}),2),t=e[0],n=e[1];function o(e){n((function(t){return r(r({},t),e)}))}function i(e,t){switch(e){case"pick-close":o({isOpen:!1,mapid:null});break;case"pick-insert":o({isOpen:!1});var n='[mappress mapid="'+t+'"]';"undefined"==typeof wpActiveEditor?__("Please select the post content to insert the map into."):send_to_editor(n);break;case"open":o({isOpen:!0,mapid:s()})}}function s(){var 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;for(var n=null,a=t.anchorNode.data,o=-1,r=t.anchorOffset-1;r>=0;r--){var i=a[r];if("["==i){o=r;break}if("]"==i||"<"==i||">"==i)break}return o>=0&&(n=wp.shortcode.next("mappress",a,o))?n.shortcode.attrs.named.mapid:null}return c(u,null,c("button",{className:"button",type:"button",onClick:function(e){e.preventDefault(),i("open")}},c(f,{className:"wp-media-buttons-icon",icon:"location"}),__("MapPress")),t.isOpen&&c(a.default,{context:"mce",mapid:t.mapid,onAction:i}))}Array.from(document.getElementsByClassName("mapp-mce")).forEach((function(e,t){return wp.element.render(c(_),e)}))},670:(e,t,n)=>{"use strict";function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}n.r(t),n.d(t,{MappMultiSelect:()=>v});var p=wp.element.createElement,u=wp.element,d=(u.Fragment,u.useEffect),m=(u.useLayoutEffect,u.useRef),f=u.useState,h=wp.components,g=h.BaseControl,b=(h.Button,h.CheckboxControl),y=(h.Panel,h.PanelBody,h.PanelRow,h.Spinner,h.TextControl),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function v(e){var t,n=m(null),o=m(null),i=l(f({isOpen:!1,filter:"",filteredOptions:[]}),2),s=i[0],c=i[1];function u(e){c((function(t){return r(r({},t),e)}))}function h(t){var n=_.findWhere(e.options,{value:t});return n?n.label:t}function v(){var t;return e.values instanceof Array?t=a(e.values):e.values&&(t=[e.values]),t||[]}function w(t,n){var a=v(),o=a.indexOf(t);(n=void 0!==n?n:-1==o)?a.push(t):a.splice(o,1),e.onChange(a)}function k(){return s.isOpen?p("div",{className:"mapp-select-dropdown-wrapper"},p("div",{className:"mapp-select-dropdown"},!s.isOpen||!e.options||e.options.length<10?null:p("div",{className:"mapp-select-filter",ref:o},p(y,{autoComplete:"off",placeholder:__("Search"),value:s.filter,onChange:function(e){return u({filter:e})}})),p("div",{className:"mapp-select-dropdown-list"},(t=v(),0==s.filteredOptions.length?p("div",{className:"mapp-select-dropdown-item"},__("No results")):s.filteredOptions.map((function(e){return p(b,{className:"mapp-select-dropdown-item",checked:t.includes(e.value),key:e.value,onChange:function(t){return w(e.value,t)},label:e.label})})))))):null;var t}return d((function(){if(e.options)if(s.filter){var t=s.filter.toUpperCase();u({filteredOptions:e.options.filter((function(e){return 0==e.label.toUpperCase().indexOf(t)}))})}else u({filteredOptions:e.options})}),[e.options,s.filter]),d((function(){s.isOpen&&o.current&&(jQuery("input",jQuery(o.current)).focus(),u({filter:""}))}),[s.isOpen]),p(g,{className:"mapp-select",label:e.label},p("div",{ref:n,tabIndex:0,onBlur:function(e){return function(e){event.relatedTarget||document.activeElement,n.current.contains(e.relatedTarget)||u({isOpen:!1})}(e)}},((t=v())instanceof Array&&t.map((function(e){return h(e)})),void 0===e.options?p("div",{className:"mapp-select-input"},p("div",{className:"mapp-select-tokens"}),p("span",{className:"dashicons dashicons-arrow-down-alt2"})):p("div",{className:"mapp-select-input",onClick:function(){return u({isOpen:!s.isOpen})}},p("div",{className:"mapp-select-tokens"},t.map((function(e){return p("span",{className:"mapp-select-token",key:e,onClick:function(t){t.stopPropagation(),w(e,!1)}},h(e))}))),p("span",{className:"dashicons "+(s.isOpen?"dashicons-arrow-up-alt2":"dashicons-arrow-down-alt2")}))),k()))}},218:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var a=n(824),o=n(143),r=n(710);function i(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var m=wp.element.createElement,f=wp.element,h=f.Fragment,g=f.useEffect,b=(f.useLayoutEffect,f.useCallback,f.useRef),y=f.useState,v=wp.data.useSelect,w=wp.components,k=w.Button,O=w.Dashicon,__=(w.ExternalLink,w.Modal,w.Panel,w.PanelBody,w.PanelRow,w.Popover,w.RadioControl,w.Spinner,w.TabPanel,wp.i18n.sprintf,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function S(e){var t,n,l,c,u,d,f,w,S,C,x,P=p(y(s(s({},e),{},{isCheckingLicense:!1,isSaving:!1})),2),j=P[0],N=P[1],M=b(null);function I(e){N((function(t){return s(s({},t),e)}))}function A(e){return _.map(e,(function(e,t){return{value:t,label:e}}))}function E(e,t){return e&&Array.isArray(e)&&e.length?(_.map(e,(function(e){for(var t in e)"string"==typeof e[t]&&(e[t]=e[t].trim())})),t?e.filter((function(e){for(var t in e)if(!e[t]||0==e[t].length)return!1;return!0})):e.filter((function(e){return!(e.hasOwnProperty("key")&&!e.key)}))):[]}function D(e,t){switch(e){case"license-check":I({isCheckingLicense:!0}),mapp.lib.ajax({type:"POST",data:{action:"mapp_license_check",nonce:mappl10n.options.nonce,license:j.license},callback:function(e){if(I({isCheckingLicense:!1}),e&&"OK"==e.status){var t=s({},j.helpers);t.license_status=e.data,I({helpers:t})}}});break;case"reset":I({isSaving:!0}),mapp.lib.ajax({type:"POST",data:{action:"mapp_options_reset",nonce:mappl10n.options.nonce},callback:function(e){I({isSaving:!1}),e&&"OK"==e.status&&window.location.reload()}});break;case"save":var n=s({},j);delete n.helpers,n.filters=E(n.filters,!1),n.metaKeys=E(n.metaKeys,!0),n.sizes=E(n.sizes,!0),n.autoicons&&n.autoicons.values&&(n.autoicons.values=E(n.autoicons.values,!0)),I({isSaving:!0}),mapp.lib.ajax({type:"POST",data:{action:"mapp_options_save",nonce:mappl10n.options.nonce,settings:n},callback:function(e){I({isSaving:!1}),e&&"OK"==e.status&&window.location.reload()}})}}return g((function(){M.current&&new mapp.Map(j.helpers.demo_map,{sel:jQuery(M.current)}).display()}),[]),g((function(){mappl10n.options.engine!=j.engine&&D("save")}),[j.engine]),m("div",{className:"mapp-options"},m("form",{onSubmit:function(e){e.preventDefault(),D("save")}},m(a.Section,{title:__("Sample Map"),className:"mapp-demo-section"},m("div",{className:"mapp-options-demo",ref:M})),mappl10n.options.pro&&(!j.helpers.is_multisite||j.helpers.is_super_admin||j.helpers.is_main_site)&&m(a.Section,{title:__("License")},m(a.Option,{title:__("MapPress license key"),className:"mapp-option-license"},m(a.Input,{value:j.license,name:"license",onChange:function(e){var t=s({},j.helpers);t.license_status="",I({license:e,helpers:t})},size:37,placeholder:__("Enter license to enable automatic updates")}),(w=j.helpers.license_status,S=m(k,{isSecondary:!0,href:"https://mappresspro.com/mappress"},__("Get license")),C=m(k,{isBusy:j.isCheckingLicense,isSecondary:!0,onClick:function(){return D("license-check")}},__("Check now")),x=m(k,{isLink:!0,target:"_blank",href:"https://mappresspro.com/account"},__("Your account")),j.license?"active"==w?m("span",{className:"mapp-license-status"},m(O,{icon:"yes"}),__("Active")):m(h,null,C,x,w&&!j.isCheckingLicense&&m("div",null,m(O,{icon:"no"}),"inactive"==w?__("License is invalid or expired"):w)):S)),m(a.Checkbox,{title:__("Beta versions"),label:__("Enable updates for beta versions"),checked:j.betas,onChange:function(e){return I({betas:e})}})),m(a.Section,{title:__("Basic Settings")},m(a.Radios,{title:__("Mapping API"),options:[{label:"Leaflet",value:"leaflet"},{label:"Google",value:"google"}],onChange:function(e){I({engine:e,geocoder:"google"==e?"google":""})},checked:j.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"==j.engine&&(d=[{value:"nominatim",label:"Nominatim",disabled:j.mapbox},{value:"mapbox",label:"MapBox",disabled:!j.mapbox},{value:"google",label:"Google",disabled:!j.apiKey}],f={},"nominatim"==j.geocoder&&(f={text:__("Nominatim is free but inaccurate. Use Mapbox or Google instead."),type:"warning"}),f.href="#toc-picking-a-geocoder",m(a.Option,{title:__("Geocoder")},m(a.Radios,{options:d,checked:j.geocoder,onChange:function(e){return I({geocoder:e})},help:f}))),"leaflet"==j.engine&&(u=m(k,{isSecondary:!0,href:"https://account.mapbox.com/access-tokens/",target:"_blank"},__("Get an Access Token")),m(a.Option,{title:__("Mapbox access token")},m("div",{className:"mapp-option-mapbox"},m(a.Input,{name:"mapbox",value:j.mapbox,onChange:function(e){I({mapbox:e}),I({geocoder:e?"mapbox":"nominatim"})},placeholder:__("Enter token to use Mapbox"),size:50}),u),m("div",{className:"mapp-help-text"},__("Mapbox makes Leaflet maps look great and provides an excellent geocoder.")))),(c=m(k,{isSecondary:!0,href:"https://mappresspro.com/how-to-get-a-google-maps-api-key",target:"_blank"},__("Get an API Key")),m(a.Option,{title:__("Google API key"),className:"mapp-option-apikey"},m(a.Input,{name:"apiKey",value:j.apiKey,onChange:function(e){I({apiKey:e})},placeholder:"google"==j.engine?__("Enter API key to use Google maps"):__("Enter API key to use Google geocoder"),size:50}),c))),m(a.Section,{title:__("Map Settings")},m(a.Radios,{title:__("Automatic display"),options:[{value:"",label:__("None")},{value:"top",label:__("Top of post")},{value:"bottom",label:__("Bottom of post")}],checked:j.autodisplay,onChange:function(e){return I({autodisplay:e})}}),m(a.Radios,{title:__("Map alignment"),options:[{value:"",label:__("Default")},{value:"center",label:__("Center")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],checked:j.alignment,onChange:function(e){return I({alignment:e})}}),m(a.Radios,{title:__("Directions"),checked:j.directions,options:[{value:"google",label:"Google"},{value:"inline",label:__("Inline")}],onChange:function(e){return I({directions:e})}}),m(a.Option,{title:__("POI list")},m(a.Checkbox,{checked:j.poiList,label:__("Show a list of POIs with each map"),onChange:function(e){return I({poiList:e})}}),m("div",{className:"mapp-option-poilist-radios"},m(a.Radios,{checked:j.layout,options:[{value:"left",label:"Left of map",disabled:!j.poiList},{value:"inline",label:__("Below map"),disabled:!j.poiList}],onChange:function(e){return I({layout:e})}}))),m(a.Input,{title:__("Mini width"),value:j.mini,onChange:function(e){return I({mini:e})},size:3,label:__("Width (px) to use map/list toggle buttons")}),m(a.Checkbox,{title:__("Sort"),checked:j.sort,label:__("Sort POI list by title"),onChange:function(e){return I({sort:e})}}),"leaflet"==mappl10n.options.engine&&m(a.Checkbox,{title:__("Scroll wheel zoom"),checked:j.scrollWheel,label:__("Enable map zoom with mouse scroll wheel"),onChange:function(e){return I({scrollWheel:e})}})),m(a.Section,{title:__("Styled Maps")},m(a.Option,{title:__("Default style")},m("div",{className:"mapp-option-style"},m(r.m,{selected:j.style,onChange:function(e){I({style:e}),mappl10n.options.style=e}}),m("div",null,__('Replace the default "roadmap" or "streets" style'))))),m(a.Section,{title:__("POI Settings")},m(a.Select,{title:__("Default zoom"),label:__("Default zoom when displaying a single POI"),value:j.poiZoom,options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],(function(e){return{value:e,label:e}})),onChange:function(e){return I({poiZoom:e})}}),m(a.Checkbox,{title:__("Hover"),checked:j.tooltips,label:__("Open POIs on hover"),onChange:function(e){return I({tooltips:e})}}),m(a.Checkbox,{title:__("Open first POI"),checked:j.initialOpenInfo,onChange:function(e){return I({initialOpenInfo:e})},label:__("Open first POI")})),mappl10n.options.pro&&m(a.Section,{title:__("Icons")},m(a.Option,{title:__("Default icon")},m(o.MappIconPicker,{iconid:j.defaultIcon,onChange:function(e){mappl10n.options.defaultIcon=e,I({defaultIcon:e})}})),m(a.Option,{title:__("Icon directory")},m("code",null,j.helpers.icon_directory)),m(a.Option,{title:__("Highlight selected POI")},m(a.Radios,{checked:j.highlight,options:[{value:"",label:__("None")},{value:"circle",label:__("Circle")},{value:"scale",label:__("Scale")},{value:"icon",label:__("Icon")}],onChange:function(e){return I({highlight:e})}}),"icon"==j.highlight&&m(o.MappIconPicker,{defaultIcon:j.defaultIcon,iconid:j.highlightIcon,onChange:function(e){return I({highlightIcon:e})}})),(l=j.iconScale&&Array.isArray(j.iconScale)?i(j.iconScale):[0,0],m(a.Option,{title:__("Icon size")},m(a.Input,{value:l[0]?l[0]:"",onChange:function(e){e<=64&&(l[0]=e>0?e:"",I({iconScale:l}))},placeholder:32,type:"number",min:0,max:64}),m("span",null," X "),m(a.Input,{value:l[1]?l[1]:"",onChange:function(e){e<=64&&(l[1]=e>0?e:"",I({iconScale:l}))},placeholder:32,type:"number",min:0,max:64}),m("span",null," (px) "))),function(){var e=A(j.helpers.taxonomies);e.unshift({value:"post_type",label:__("Post type")});var t=v((function(e){if("post_type"==j.autoicons.key)return A(j.helpers.post_types);var t=wp.data.select("core").getEntityRecords("taxonomy",j.autoicons.key,{per_page:-1,_fields:"id,name,slug"});return t?t.map((function(e){return{value:e.slug,label:e.name}})):[]}),[j.autoicons.key]);return m(a.Option,{title:__("Automatic icons")},m(a.Select,{value:j.autoicons?j.autoicons.key:null,options:e,onChange:function(e){var t=j.autoicons?s({},j.autoicons):[];t.key=e,t.values=[],I({autoicons:t})},placeholder:""}),m(a.MappGrid,{cols:[{id:"key",label:__("Key"),type:"select",options:t},{id:"value",label:__("Icon"),type:"icon"}],data:j.autoicons.values,onChange:function(e){var t=j.autoicons?s({},j.autoicons):[];t.values=e,I({autoicons:t})}}))}()),m(a.Section,{title:__("Clustering")},m(a.Checkbox,{title:__("Clustering"),checked:j.clustering,label:__("Enable marker clustering"),onChange:function(e){return I({clustering:e})}}),function(){var e=j.clusteringOptions?j.clusteringOptions:{},t=function(t,n){e[t]=n,I({clusteringOptions:e})};if("google"==j.engine){return m("div",{className:"mapp-option-clustering-options"},m(a.Select,{help:{href:"https://github.com/googlemaps/v3-utility-library/blob/3fca406/packages/markerclustererplus/src/markerclusterer.ts"},label:m(h,null,__("Disable clustering at zoom"),m("code",null,"maxZoom")),onChange:function(e){return t("maxZoom",e)},options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],(function(e){return{value:e,label:e}})),placeholder:__("None"),title:__("Max zoom"),value:e.maxZoom}))}var n="https://github.com/Leaflet/Leaflet.markercluster#all-options";return m("div",{className:"mapp-option-clustering-options"},m(a.Select,{help:{href:n},label:m(h,null,__("Disable clustering at zoom"),m("code",null,"disableClusteringAtZoom")),onChange:function(e){return t("disableClusteringAtZoom",e)},options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],(function(e){return{value:e,label:e}})),placeholder:__("Auto"),title:__("Max zoom"),value:e.disableClusteringAtZoom}),m(a.Checkbox,{checked:e.spiderfyOnMaxZoom,help:{href:n},label:m(h,null,__("Spiderfy"),m("code",null,"spiderfyOnMaxZoom")),onChange:function(e){return t("spiderfyOnMaxZoom",e)},title:__("Spiderfy")}))}()),mappl10n.options.pro&&m(a.Section,{title:__("Mashups")},m(a.Option,{title:__("Filters")},m(a.MappGrid,{cols:[{id:"key",label:__("Taxonomy"),onRender:function(e){var t=A(j.helpers.taxonomies).map((function(t){return t.disabled=t.value!=e.value&&_.findWhere(j.filters,{key:t.value}),t}));return m(a.Select,{value:e.value,options:t,onChange:e.onChange,placeholder:""})}},{id:"sort",label:__("Sort"),onRender:function(e){return m(a.Select,{value:e.value,options:[{value:"name",label:__("Name")},{value:"slug",label:__("Slug")}],onChange:e.onChange})}},{id:"count",label:__("Show counts"),onRender:function(e){return m(a.Checkbox,{checked:e.value,onChange:e.onChange})}}],data:j.filters,onChange:function(e){I({filters:e})}})),function(){var 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 m(a.Radios,{title:__("Marker click"),checked:j.mashupClick,options:e,onChange:function(e){return I({mashupClick:e})}})}(),m(a.Radios,{title:__("Popup content"),checked:j.mashupBody,options:[{value:"poi",label:__("POI title + POI body")},{value:"post",label:__("Post title + post excerpt")}],onChange:function(e){return I({mashupBody:e})}}),m(a.Checkbox,{title:__("KMLs"),checked:j.mashupKml,label:__("Include KML POIs in mashups"),onChange:function(e){return I({mashupKml:e})}})),mappl10n.options.pro&&m(a.Section,{title:__("Mashup Search")},m(a.Checkbox,{title:__("Search"),checked:j.search,label:__("Enable search"),onChange:function(e){return I({search:e})}}),m(a.Select,{help:{href:"https://mappresspro.com/mappress-documentation/#toc-mashup-search"},title:__("Search radius"),label:__("Minimum search radius (km)"),value:j.radius,options:_.map([1,5,10,15,25,50,75,100,200,300],(function(e){return{value:e,label:e}})),onChange:function(e){return I({radius:e})}}),m(a.Select,{title:__("Search country"),label:__("Country code for searches"),value:j.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"],(function(e){return{value:e,label:e}})),onChange:function(e){return I({country:e})},help:{href:"https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements"}}),mappl10n.options.ssl?m(a.Checkbox,{title:__("User location"),checked:j.userLocation,label:__("Show user location on map"),onChange:function(e){return I({userLocation:e})}}):null,function(){if("google"!=j.engine)return m(a.Input,{onChange:function(e){return I({searchBox:e})},help:{href:"https://mappresspro.com/mappress-documentation/#toc-mashup-search"},label:__("Restrict searches to a bounding box (optional)"),title:__("Bounding box"),placeholder:"SW lon, SW lat, NE lng, NE lat",size:45,trim:!0,value:j.searchBox})}()),mappl10n.options.pro&&m(a.Section,{title:__("Geocoding")},m(a.Checkboxes,{title:__("Post types"),values:j.postTypes,options:A(j.helpers.post_types),onChange:function(e){return I({postTypes:e})}}),m(a.Option,{title:__("Geocoding fields")},m(a.MappGrid,{cols:[{id:"key",label:__("Map field"),type:"select",options:A(j.helpers.meta_fields)},{id:"value",label:__("Custom field"),type:"select",options:A(j.helpers.meta_keys)}],data:j.metaKeys,onChange:function(e){I({metaKeys:e})}})),m(a.Checkbox,{title:__("Overwrite"),label:__("Overwrite maps when posts are saved"),checked:j.metaSyncSave,onChange:function(e){I({metaSyncSave:e})}}),"google"==j.engine&&m(a.Input,{title:__("Google Server API key"),name:"apiKeyServer",value:j.apiKeyServer,onChange:function(e){return I({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"}}),(n=__("No errors found"),j.helpers.geocoding_errors&&j.helpers.geocoding_errors.length>0&&(n=_.map(j.helpers.geocoding_errors,(function(e){return m("div",{key:e.ID},m("a",{href:mappl10n.options.editurl+"?post="+e.ID+"&action=edit"},e.post_title),m("span",null," : "+e.error))}))),m(a.Option,{title:__("Geocoding errors")},n))),mappl10n.options.pro&&mappl10n.options.acfActive&&m(a.Section,{title:__("Frontend Forms")},m(a.Option,{title:__("Advanced Custom Fields")},m(a.Input,{className:"mapp-option-acf",name:"acf",value:j.acf,onChange:function(e){I({acf:e})},placeholder:__("ACF field"),size:20}),__("ACF map field to include on MapPress mashups"),m(a.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"}))),mappl10n.options.pro&&m(a.Section,{title:__("Templates")},m(a.Option,{title:__("Custom templates")},m(a.MappTemplateEditor)),m(a.Option,{title:__("Mashup thumbnails")},m(a.Select,{label:__("Popups"),onChange:function(e){return I({thumbsPopup:e})},options:[{value:"",label:__("None")},{value:"top",label:__("Top")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],value:j.thumbsPopup}),m(a.Select,{label:__("POI lists"),onChange:function(e){return I({thumbsList:e})},options:[{value:"",label:__("None")},{value:"top",label:__("Top")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],value:j.thumbsList})),m(a.Option,{title:__("Thumbnail size")},m(a.Select,{onChange:function(e){return I({thumbSize:e})},options:A(j.helpers.thumbnail_sizes),value:j.thumbSize}),m("span",null," "+__("or")+" "),m(a.Input,{value:j.thumbWidth,onChange:function(e){return I({thumbWidth:e})},type:"number",min:0,max:9999}),m("span",null," X "),m(a.Input,{value:j.thumbHeight,onChange:function(e){return I({thumbHeight:e})},type:"number",min:0,max:9999}),m("span",null," (px) "))),m(a.Section,{title:__("Localization")},(t="leaflet"==j.engine?"https://en.wikipedia.org/wiki/ISO_639-1":"http://code.google.com/apis/maps/faq.html#languagesupport",m(a.Select,{title:__("Language"),label:__("Language for searches and Google map controls"),value:j.language,options:A(j.helpers.languages),onChange:function(e){return I({language:e})},help:{href:t}})),m(a.Input,{title:__("Directions server"),value:j.directionsServer,onChange:function(e){return I({directionsServer:e})},size:25})),m(a.Section,{title:__("Miscellaneous")},m(a.Option,{title:__("Map sizes")},m(a.MappGrid,{cols:[{id:"width",label:__("Width")+" (px, %, vw)",size:4},{id:"height",label:__("Height")+" (px, %, vh)"}],data:j.sizes,onChange:function(e,t){return I({sizes:e,size:t})},selectionColumn:"rowid",selected:j.size})),j.helpers.jetpack?null:m(a.Checkbox,{title:__("Scripts"),checked:j.footer,label:__("Output scripts in footer"),onChange:function(e){return I({footer:e})},help:{text:__("Disable footer scripts if maps are output using AJAX")}}),m(a.Checkbox,{title:"WPML",checked:j.wpml,label:__("Copy maps when overwriting a translation"),onChange:function(e){return I({wpml:e})},help:{href:"https://mappresspro.com/mappress-documentation#wpml"}}),m(a.Option,{title:__("Compatibility")},m("div",null,m(a.Checkbox,{checked:j.deregister,label:__("Prevent loading Google Maps multiple times"),onChange:function(e){return I({deregister:e})}})),m("div",null,m(a.Checkbox,{checked:j.iframes,label:__("Output maps in iframes to prevent compatibility issues"),onChange:function(e){return I({iframes:e})}})))),m("div",{className:"mapp-options-toolbar"},m(k,{isBusy:j.isSaving,className:"mapp-options-save",type:"submit",isPrimary:!0},__("Save")),m(k,{isBusy:j.isSaving,isSecondary:!0,onClick:function(){return D("reset")}},__("Reset Defaults")))))}document.getElementById("mapp-options-settings")&&wp.element.render(m(S,mappress_options_state),document.getElementById("mapp-options-settings"))},824:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Checkbox:()=>S,Checkboxes:()=>C,Help:()=>x,Input:()=>P,Radios:()=>N,Select:()=>M,Textarea:()=>I,Section:()=>A,Option:()=>E,MappGrid:()=>D,MappTemplateEditor:()=>z});var a=n(143);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=wp.element.createElement,m=wp.element,f=m.Fragment,h=m.useEffect,g=(m.useLayoutEffect,m.useCallback),b=(m.useRef,m.useState),y=(wp.data.useSelect,wp.components),v=y.Button,w=(y.ColorPicker,y.Dashicon),k=(y.Dropdown,y.ExternalLink,y.Modal),O=(y.Panel,y.PanelBody,y.PanelRow,y.Popover,y.RadioControl,y.Spinner,y.TabPanel),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function S(e){var t=e.checked,n=e.title,a=e.label,o=e.onChange,r=e.help,i=u(e,["checked","title","label","onChange","help"]),l=d(f,null,d("label",null,d("input",c({type:"checkbox",onChange:function(e){o&&o(e.target.checked)},checked:void 0!==t&&t},i)),a&&d("span",{className:"mapp-option-label"},a)),r&&d(x,r));return n?d(E,{title:n},l):l}function C(e){var t=d(f,null,_.map(e.options,(function(t,n){var a=e.values?e.values.indexOf(t.value):-1;return d(S,{key:n,label:t.label,value:t.value,checked:a>=0,onChange:function(n){var o=r(e.values);n&&-1==a&&e.onChange(o.concat(t.value)),!n&&a>=0&&(o.splice(a,1),e.onChange(o))}})})),e.help&&d(x,e.help));return e.title?d(E,{title:e.title},t):t}function x(e){var t="mapp-help-text";e.type&&(t+=" mapp-help-"+e.type);var n=null;return e.href&&(n="#"==e.href.substr(0,1)?"https://mappresspro.com/mappress-documentation/"+e.href:e.href),d(f,null,n&&d("a",{className:"mapp-help-link",href:n,target:"_blank"},d(w,{icon:"editor-help"})),e.text&&d("div",{className:t},e.text))}function P(e){var t=e.title,n=e.value,a=e.label,o=e.onChange,r=e.help,i=e.trim,l=e.type,s=u(e,["title","value","label","onChange","help","trim","type"]);if(!o)return"Missing onChange handler in Input component";i=void 0===i||i;var p=d(f,null,d("input",c({value:null!==n?n:"",onChange:function(e){return o(i?e.target.value.trim():e.target.value)},type:l||"text"},s)),a&&d("span",{className:"mapp-option-label"},a),r&&d(x,r));return t?d(E,{title:t},p):p}var j=function(e){var t=e.onChange,n=e.label,a=u(e,["onChange","label"]);return d("label",null,d("input",c({type:"radio",onChange:function(e){return t(e.target.value)}},a)),n&&d("span",{className:"mapp-option-label"},n))};function N(e){var t=d(f,null,_.map(e.options,(function(t,n){return d(j,{key:n,value:t.value,checked:e.checked==t.value||null==e.checked&&""==t.value,onChange:function(t){return e.onChange(t)},disabled:t.disabled,label:t.label})})),e.help&&d(x,e.help));return e.title?d(E,{title:e.title},t):t}function M(e){var t=e.title,n=e.value,a=e.label,o=e.onChange,i=e.options,l=e.help,s=e.placeholder,p=u(e,["title","value","label","onChange","options","help","placeholder"]),m=r(i);void 0!==s&&m.unshift({value:"",label:s});var h=d(f,null,d("select",c({value:null!=n?n:"",onChange:function(e){return o(e.target.value)}},p),_.map(m,(function(e,t){return d("option",{key:t,value:e.value,disabled:e.disabled},e.label)}))),a&&d("span",{className:"mapp-option-label"},a),l&&d(x,l));return t?d(E,{title:t},h):h}function I(e){var t=e.title,n=e.onChange,a=e.label,o=e.help,r=u(e,["title","onChange","label","help"]),i=d(f,null,d("textarea",c({onChange:function(e){return n(e.target.value)}},r)),a&&d("span",{className:"mapp-option-label"},a),o&&d(x,o));return t?d(E,{title:t},i):i}function A(e){var t=e.className?" "+e.className:"";return d("div",{className:"mapp-option-section"+t},d("h2",null,e.title),e.children)}function E(e){var t=e.className?"mapp-option "+e.className:"mapp-option";return d("div",{className:t},d("div",{className:"mapp-option-title"},e.title),d("div",{className:"mapp-option-value"},e.children))}function D(e){var t,n,i=o(b({dragging:null,dragover:null}),2),l=i[0],s=i[1];function p(e){s((function(t){return c(c({},t),e)}))}function u(t,n){var a=r(e.data);switch(t){case"add":var o={};_.map(e.cols,(function(e){o[e.id]=""})),a.push(o),e.onChange(a,e.selected);break;case"change":a[n.i][n.id]=n.value,e.onChange(a,e.selected);break;case"delete":var i;a.splice(n,1),i=n==e.selected?null:n<e.selected?e.selected-1:e.selected,e.onChange(a,i);break;case"select":p({selected:n}),e.onChange(a,n);break;case"sort":var s=l.dragging,c=s<c?n-1:n;a.splice(c,0,a.splice(s,1)[0]),e.onChange(a,c),p({dragover:null})}}return h((function(){}),[]),d("div",{className:e.className?"mapp-grid "+e.className:"mapp-grid"},e.data&&!!e.data.length&&d("div",{className:"mapp-grid-table"},(t=e.selectionColumn?d("div",{className:"mapp-grid-cell",key:"select"},__("Default")):null,n=d("div",{className:"mapp-grid-cell",key:"actions"},""),d("div",{className:"mapp-grid-header"},d("div",{className:"mapp-grid-row"},t,_.map(e.cols,(function(e){return d("div",{className:"mapp-grid-cell",key:e.id},e.label)})),n))),d("div",{className:"mapp-grid-body"},_.map(e.data,(function(t,n){return function(t,n){return d("div",{className:"mapp-grid-row"+(l.dragover==n?" mapp-dragover":""),draggable:!0,key:n,onDragOver:function(e){return e.preventDefault()},onDragStart:function(e){return p({dragging:n})},onDragEnter:function(e){return p({dragover:n})},onDragEnd:function(e){return p({dragging:null,dragover:null})},onDrop:function(e){return u("sort",n)}},function(t,n){if(!e.selectionColumn)return null;var a,o;switch("rowid"==e.selectionColumn?a=n:t[e.selectionColumn]?a=t[e.selectionColumn]:o=!0,e.selectionType){case"checkbox":return d("div",{className:"mapp-grid-cell"},d(S,{value:a,checked:e.selected==a,disabled:o,onChange:function(e){u("select",e?a:null)}}));case"radio":default:return d("div",{className:"mapp-grid-cell"},d(j,{checked:e.selected==a,onChange:function(){return u("select",a)}}))}}(t,n),_.map(e.cols,(function(t,o){return d("div",{className:"mapp-grid-cell mapp-grid-cell-"+t.id,key:n+"-"+o},function(t,n){if(n.onRender)return n.onRender({id:n.id,value:e.data[t][n.id],onChange:function(e){return u("change",{i:t,id:n.id,value:e})}});switch(n.type){case"icon":return d(a.MappIconPicker,{iconid:e.data[t][n.id],onChange:function(e){return u("change",{i:t,id:n.id,value:e})}});case"input":default:return d(P,{size:e.data[t][n.size],value:e.data[t][n.id],onChange:function(e){return u("change",{i:t,id:n.id,value:e})}});case"select":return d(M,{value:e.data[t][n.id],options:n.options,onChange:function(e){u("change",{i:t,id:n.id,value:e})},placeholder:""})}}(n,t))})),function(e){return d("div",{className:"mapp-grid-cell",key:"delete"},d(v,{icon:"trash",onClick:function(){return u("delete",e)}}))}(n))}(t,n)})))),d("div",{className:"mapp-grid-toolbar"},d(v,{isSecondary:!0,onClick:function(){return u("add")}},__("Add"))))}function z(e){var t=o(b({codeEditor:null,isOpen:!1,name:null,tab:"editor",template:null,tokens:null}),2),n=t[0],a=t[1];function r(e){a((function(t){return c(c({},t),e)}))}var i,l,s=g((function(e){if(null!=e){var t=wp.codeEditor.initialize(e);t.codemirror.setSize("auto","auto"),t.codemirror.setOption("readOnly","editor"!=n.tab),r({codeEditor:t})}}),[]);function p(e,t){switch(e){case"close":r({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&(mapp.lib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:n.template.name,nonce:mappl10n.options.nonce}}),r({isOpen:!1}));break;case"insert":var a=n.codeEditor.codemirror.getDoc(),o=a.getCursor();a.replaceRange("{{{poi."+t+"}}}",o);break;case"open":mapp.lib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&r({isOpen:!0,name:t,tab:"editor",template:e.data.template,tokens:e.data.tokens})}});break;case"save":var i="editor"==n.tab?n.codeEditor.codemirror.getValue():n.template.content;mapp.lib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:i,name:n.template.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&r({isOpen:!1,template:null,tokens:null})}});break;case"tab-select":if("editor"!=t){var l=c({},n.template);l.content=n.codeEditor.codemirror.getValue(),r({template:l})}r({tab:t})}}return d("div",{className:"mapp-templates"},(l=[{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")}],d("div",{className:"mapp-templates-list"},_.map(l,(function(e,t){return d("a",{href:"#",key:e.name,className:"mapp-templates-item",onClick:function(t){t.preventDefault(),p("open",e.name)}},e.label)})))),n.isOpen&&n.template?d(k,{title:(i=n.template.name+" ("+(n.template.exists?__("Custom"):__("New"))+")",d("div",{className:"mapp-templates-name"},i)),className:"mapp-templates-modal",onRequestClose:function(){return p("close")},shouldCloseOnClickOutside:!1},d(O,{className:"mapp-templates-tabs",onSelect:function(e){return p("tab-select",e)},tabs:[{name:"editor",title:__("Editor")},{name:"standard",title:__("Default")}]},(function(e){return t=d("div",{className:"mapp-templates-tokens"},_.map(n.tokens,(function(e,t){return d("code",{onClick:function(){return p("insert",e)},key:t,title:e},e)}))),a=d("div",{className:"mapp-templates-path"},n.template.path),d(f,null,"editor"==n.tab&&a,"editor"==n.tab&&t,d("div",{className:"editor"==n.tab?"mapp-templates-editor":"mapp-templates-standard"},d("textarea",{ref:s,defaultValue:"editor"==n.tab?n.template.content:n.template.standard})));var t,a})),d("div",{className:"mapp-templates-toolbar"},d(v,{isPrimary:!0,onClick:function(){return p("save")}},__("Save")),d(v,{isSecondary:!0,onClick:function(){return p("close")}},__("Cancel")),n.template.exists&&d("a",{onClick:function(e){e.preventDefault(),p("delete")}},__("Delete")))):null)}},149:(e,t,n)=>{"use strict";n.d(t,{S:()=>l});var a=wp.element.createElement,o=(wp.data.select,wp.element),r=(o.Fragment,o.useEffect,o.useLayoutEffect,o.useRef,o.useState,wp.components),i=(r.BaseControl,r.Button),sprintf=(r.Dashicon,r.Modal,r.PanelBody,r.RadioControl,r.Spinner,r.TextControl,wp.i18n.sprintf);function l(e){function t(t,n){var a=Math.ceil(e.count/e.pageSize);switch(t){case"first":e.onChange(1);break;case"last":e.onChange(a);break;case"next":e.onChange(e.page+1);break;case"prev":e.onChange(e.page-1)}}return o=Math.ceil(e.count/e.pageSize),r=e.page<=1,l=e.page>=o,a("div",{className:"mapp-paginate"},a(i,{disabled:r,onClick:function(){return t("first")},isSecondary:!0},"«"),a(i,{disabled:r,onClick:function(){return t("prev")},isSecondary:!0},"‹"),a("div",{className:"mapp-paginate-count"},sprintf((n="%d of %d",wp.i18n.__(n,"mappress-google-maps-for-wordpress")),e.page,o)),a(i,{disabled:l,onClick:function(){return t("next")},isSecondary:!0},"›"),a(i,{disabled:l,onClick:function(){return t("last")},isSecondary:!0},"»"));var n,o,r,l}},694:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>L});var a=n(713),o=n(999),r=n(149);function i(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var m=wp.element,f=m.useEffect,h=m.useState,g=(React.createContext,wp.element.createElement);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var O=window.mapp||{},S=wp.element.createElement,C=wp.data.select,x=wp.element,P=(x.Fragment,x.useEffect),j=(x.useLayoutEffect,x.useRef),N=x.useState,M=wp.components,I=(M.BaseControl,M.Button),A=M.Dashicon,E=M.Modal,D=(M.PanelBody,M.RadioControl),z=M.Spinner,T=M.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function L(e){var t=w(N({isFetchingItems:!0,items:null,mode:e.mode?e.mode:"list",mapid:e.mapid?e.mapid:null,page:1,search:"",type:mappl10n.options.postid?"post":"all"}),2),n=t[0],l=t[1],c=function(){var e=p(h({snackbars:[]}),2),t=e[0],n=e[1];function a(e){n((function(t){return s(s({},t),e)}))}return f((function(){if(t.snackbars.length){var e=setTimeout((function(){var e=i(t.snackbars);e.shift(),a({snackbars:e})}),5e3);return function(){return clearTimeout(e)}}}),[t.snackbars]),{addSnackbar:function(e){return a({snackbars:[].concat(i(t.snackbars),[e])})},renderSnackbar:function(){return g("div",{className:"mapp-snackbars"},t.snackbars.map((function(e,t){return g("div",{className:"mapp-snackbar mapp-snackbar-show",key:t},e)})))}}}(),u=c.addSnackbar,d=c.renderSnackbar,m=j(null),b=j(null);function v(e){l((function(t){return y(y({},t),e)}))}function k(t,a){switch(t){case"attach":O.store.mutateMap({mapdata:a});break;case"add-new":v({mode:"edit",mapid:null});break;case"change-type":v({type:a});break;case"close":e.onAction("pick-close");break;case"duplicate":O.store.duplicateMap({mapid:a,success:function(e){u(__("Map copied")),v({mapid:e.mapid}),jQuery(".mapp-pick-items").scrollTop(0)}});break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(O.store.destroyMap({mapid:a}),u(__("Map deleted")),a==n.mapid&&e.onAction("pick-destroy",a)),m.current.focus();break;case"edit":v({mode:"edit",mapid:a});break;case"edit-close":"edit"==e.mode?e.onAction("pick-close"):v({mode:"list"});break;case"edit-destroy":v({mode:"list",mapid:null}),u(__("Map deleted")),e.onAction("pick-destroy",a);break;case"edit-save":"edit"==e.mode?e.onAction("pick-close",a):(v({mode:"list",mapid:a}),u(__("Map saved")));break;case"insert":e.onAction("pick-insert",a);break;case"shortcode":var o=jQuery("<input>");jQuery("body").append(o),o.val('[mappress mapid="'+a+'"]').select(),document.execCommand("copy"),o.remove(),u(__("Shortcode copied"));break;case"sort":O.store.setSort({sortBy:a,sortAsc:O.store.state.sortBy!=a||!O.store.state.sortAsc})}}function x(t){var o,r=t.mapid==n.mapid;o=t.map_title?t.map_title:__("Untitled");var i=function(t){var n;return n=(n="map"==e.context||"mashup"==e.context&&t.postid==mappl10n.options.postid?C("core/editor").getEditedPostAttribute("title"):t.post_title)||__("Untitled"),t.postid>0&&t.postid==mappl10n.options.postid&&(n=__("Current post")),t.postid>0?t.postid==mappl10n.options.postid?n:S("a",{href:mappl10n.options.editurl+"?post="+t.postid+"&action=edit",target:"_blank",title:__("Edit post")},n):__("Unattached")}(t),l=[{action:"edit",label:__("Edit")},{action:"insert",label:__("Insert into post")},{action:"duplicate",label:__("Copy")},{action:"destroy",label:__("Delete")}];"library"==e.context&&l.splice(1,1),l=S("div",{className:"mapp-pick-actions"},l.map((function(e){return S("a",{href:"#",key:e.action,onClick:function(n){n.stopPropagation(),n.preventDefault(),k(e.action,t.mapid)}},e.label)})));var s=null;return s=t.postid>0?S("a",{href:"#",onClick:function(){return k("attach",{mapid:t.mapid,postid:0})}},__("Detach")):"library"==e.context?S(a.default,{onChange:function(e,n){return k("attach",{mapid:t.mapid,postid:e,post_title:n})}},__("Attach")):S("a",{href:"#",onClick:function(){return k("attach",{mapid:t.mapid,postid:mappl10n.options.postid,post_title:null})}},__("Attach")),S("div",{className:"mapp-pick-item"+(r?" mapp-selected":""),key:t.mapid+"|"+t.postid,ref:r?b:null},S("div",{className:"mapp-pick-col-mapid",onClick:function(e){return k("edit",t.mapid)}},t.mapid),S("div",{className:"mapp-pick-col-map_title",onClick:function(e){return k("edit",t.mapid)}},S("div",null,o),S("div",null,l)),S("div",{className:"mapp-pick-col-post_title"},i,S("div",null,s)),"library"==e.context&&S("div",{className:"mapp-pick-col-shortcode"},S(I,{isSmall:!0,isSecondary:!0,onClick:function(e){e.stopPropagation(),e.preventDefault(),k("shortcode",t.mapid)}},__("Copy"))))}P((function(){var e=function(e){v({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return O.store.subscribe(e),function(){return O.store.unsubscribe(e)}})),P((function(){m.current&&m.current.focus(),O.store.fetchItems()}),[]),P((function(){v({page:1})}),[n.type,n.search]),P((function(){b.current&&O.lib.scrollTo(jQuery(".mapp-pick-items"),jQuery(b.current))}),[n.type,n.items]);var M=_.filter(n.items,(function(t){if("post"==n.type&&t.postid!=mappl10n.options.postid)return!1;if("current"==n.type&&t.mapid!=e.mapid)return!1;var a=n.search.toLowerCase();return!a||(t.mapid.indexOf(a)>=0||(!!(t.post_title&&t.post_title.toLowerCase().indexOf(a)>=0)||!!(t.map_title&&t.map_title.toLowerCase().indexOf(a)>=0)))})),L=S("div",{className:"mapp-list-panel"},S("div",{className:"mapp-gt-modal-header"},S("div",{className:"mapp-gt-modal-header-title"},S("h1",null,__("Select a map")),S(I,{isPrimary:!0,onClick:function(){return k("add-new")}},__("Add New"))),S(I,{onClick:function(){return k("close")},icon:"no-alt"})),function(){var t=[{label:__("Attached to post"),value:"post"},{label:__("All maps"),value:"all"}];e.mapid&&t.unshift({label:__("Current map"),value:"current"});var a="library"==e.context?null:S(D,{className:"mapp-pick-type",options:t,onChange:function(e){return k("change-type",e)},selected:n.type}),o=n.isFetchingItems||n.isAttaching&&"library"!=e.context;return S("div",{className:"mapp-pick-filter"},S("div",{className:"mapp-pick-search-wrapper"},S("span",{className:"mapp-pick-search-label"},__("Search")),S(T,{ref:m,className:"mapp-pick-search",tabIndex:1,placeholder:__("post title, map title, or map id"),onChange:function(e){return v({search:e})},size:50}),o&&S(z,null)),a)}(),function(t){if(t){var a=20*(n.page-1),o=a+20;t=t.slice(a,o)}var r="";return r=n.isFetchingItems?null:t.length?_.map(t,x):S("div",{className:"mapp-pick-message"},__("No maps found")),S("div",{className:"mapp-pick-items-section"},S("div",{className:"mapp-pick-items"},function(){var t=[{id:"mapid",label:__("ID"),sortable:!0},{id:"map_title",label:__("Map title"),sortable:!0},{id:"post_title",label:__("Attached to"),sortable:!0}];"library"==e.context&&t.push({id:"shortcode",label:__("Shortcode"),sortable:!1});return S("div",{className:"mapp-pick-items-header"},_.map(t,(function(e){return S("div",{className:"mapp-pick-col-"+e.id,onClick:function(){return k("sort",e.id)},key:e.id},e.label,e.sortable&&O.store.state.sortBy==e.id&&S(A,{icon:O.store.state.sortAsc?"arrow-up":"arrow-down"}),e.sortable&&O.store.state.sortBy!=e.id&&S(A,{icon:"leftright"}))})))}(),r))}(M),function(e){return S("div",{className:"mapp-pick-toolbar"},function(e){return e&&e.length?S(r.S,{count:e?e.length:0,onChange:function(e){return v({page:e})},page:n.page,pageSize:20}):null}(e))}(M)),B=null;if("edit"==n.mode){var F=S("div",{className:"mapp-edit-panel"},S(o.default,{context:e.context,mapid:n.mapid,onAction:k}));B="library"==e.context?S(E,{className:"mapp-gt-modal",isDismissible:!1},F):F}var R="mapp-pick mapp-mode-"+n.mode+" mapp-context-"+e.context;return"library"==e.context?S("div",{className:R},L,B,d()):S(E,{className:"mapp-gt-modal "+R,isDismissible:"list"==n.mode,onRequestClose:function(){return k("close")},shouldCloseOnEsc:"list"==n.mode,shouldCloseOnClickOutside:"list"==n.mode},L,B,d())}var B=document.getElementById("mapp-library");B&&(mappl10n.options.postid=0,wp.element.render(S(L,{context:"library"}),B))},429:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappSettings:()=>b});var a=n(710);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}window.mapp;var i=wp.element.createElement,l=wp.element,s=l.Fragment,c=(l.useEffect,l.useLayoutEffect,l.useRef,l.useState),p=wp.components,u=p.BaseControl,d=p.Button,m=p.ButtonGroup,f=(p.Dashicon,p.Dropdown,p.Panel,p.PanelBody),_=p.PanelRow,h=(p.RadioControl,p.SelectControl),g=p.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function b(e){var t,n=o(c({}),2);n[0],n[1];function r(e){if(!e||"string"!=typeof e)return e;var t={px:2048,vw:100,vh:100,"%":100},n=parseInt(e),a=2048,o="";for(var r in t)e.includes(r)&&(o=r,a=t[r]);return n>a?a+o:e}function l(t,n){var a=null;switch(t){case"poiList":e.map.set({poiList:n}),a={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=r(n.height)),n.hasOwnProperty("width")&&(n.width=r(n.width)),e.map.setSize(n),a=n;break;case"style-set-maptypeid":e.map&&e.map.set({mapTypeId:n}),a={mapTypeId:n};break;case"viewport-reset":e.map.center=e.map.zoom=null,e.map.recenter(),a={center:void 0,zoom:void 0};break;case"viewport-set":var o=e.map.getCenter().toJSON();e.map.center=o,e.map.zoom=e.map.getZoom(),a={center:o.lat+","+o.lng,zoom:e.map.getZoom()},"mce"==e.context||"library"==e.context?alert(__("Viewport set")):wp.data.dispatch("core/notices").createNotice("success",__("Viewport set"),{type:"snackbar",isDismissible:!0})}a&&e.onAction("change-settings",a)}return i("div",{className:"mapp-settings"},i(f,{title:__("Map settings")},(t=e.map.title?e.map.title:__("Untitled"),i(_,null,"map"==e.context&&i(u,{className:"mapp-settings-title"},t),i(u,{className:"mapp-settings-id",label:__("Map ID")},e.map.mapid))),function(){if("mashup"==e.context)return i(_,{className:"mapp-style-toggle"},__("Style"),i(a.m,{map:e.map,selected:e.map.mapTypeId,onChange:function(e){return l("style-set-maptypeid",e)}}))}(),function(){var t=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(e,t){return{label:e.width+" X "+e.height,height:e.height,width:e.width,value:t+1}}));n.unshift({height:"",label:__("Default"),value:0,width:""}),n.push({label:__("Custom"),value:"custom",disabled:!0});for(var a="custom",o=0;o<n.length-1;o++)n[o].width==e.width&&n[o].height==e.height&&(a=o);return i(s,null,i(h,{className:"mapp-settings-dims-select",help:"",label:__("Size"),value:a,options:n,onChange:function(e){return l("size",{width:n[e].width,height:n[e].height})}}),i(_,null,i(g,{className:"mapp-settings-dims-custom",help:__("px, %, vw"),label:__("Width"),onChange:function(e){return l("size",{width:e})},placeholder:t.width,value:e.width?e.width:""}),i(g,{className:"mapp-settings-dims-custom",help:__("px, %, vh"),label:__("Height"),onChange:function(e){return l("size",{height:e})},placeholder:t.height,value:e.height?e.height:""})))}(),(e.center&&(e.center.lat,e.center.lng,__("Zoom"),e.zoom),i(s,null,i(u,{className:"mapp-settings-viewport",label:__("Center/Zoom")},i(m,{label:__("Center/Zoom")},i(d,{onClick:function(){return l("viewport-reset")},isPressed:!e.center,isSmall:!0},__("Automatic")),i(d,{onClick:function(){return l("viewport-set")},isPressed:e.center,isSmall:!0},__("Set"))))))))}},787:()=>{function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var r=window.mapp||{};r.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,sortBy:"mapid",sortAsc:!1,maps:{},items:[]}},r.Store.prototype={createMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.success,n=void 0===t?function(){}:t;this.state.isFetchingMap=!1,this.publish(),n()},destroyMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapid,n=e.success,a=void 0===n?function(){}:n,o=e.failure,i=void 0===o?function(){}:o,l=this;r.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(delete l.state.maps[t],l.destroyItem(t),a(t)):i(),l.publish()}})},duplicateMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapid,n=e.success,a=void 0===n?function(){}:n,o=e.failure,i=void 0===o?function(){}:o,l=this;this.state.isSavingMap=!0,this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:t,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:function(e){if(e&&"OK"==e.status){var t=e.data,n=t.mapid;l.state.maps[n]=t,l.saveItem(t),a(t)}else i();l.state.isSavingMap=!1,l.publish()}})},fetchMap:function(e){var t=e.mapid,n=e.success,a=void 0===n?function(){}:n,o=(e.failure,this);if(void 0!==this.state.maps[t])return o.publish(),void a(this.state.maps[t]);this.state.isFetchingMap=!0,o.publish(),r.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(o.state.maps[t]=e.data,a(e.data)):o.state.maps[t]=null,o.state.isFetchingMap=!1,o.publish()}})},mutateMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapdata,n=e.success,a=void 0===n?function(){}:n,o=e.failure,i=void 0===o?function(){}:o,l=this;this.state.isSavingMap=!0,this.saveItem(t),this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_mutate",mapdata:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(l.state.maps[e.data.mapid]=e.data,a(t)):i(),l.state.isSavingMap=!1,l.publish()}})},saveMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapdata,n=e.success,a=void 0===n?function(){}:n,o=e.failure,i=void 0===o?function(){}:o,l=this;this.state.isSavingMap=!0,this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(t),nonce:mappl10n.options.nonce},callback:function(e){if(e&&"OK"==e.status){var t=e.data,n=t.mapid;l.state.maps[n]=t,l.saveItem(t),a(t)}else i();l.state.isSavingMap=!1,l.publish()}})},destroyItem:function(e){var t=this.state.items?this.state.items:[],a=_.findIndex(t,{mapid:e});a>-1&&t.splice(a,1),this.state.items=n(t),this.publish()},fetchItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.success,n=void 0===t?function(){}:t,a=e.failure,o=void 0===a?function(){}:a,i=this;if(this.state.itemsFetched)return n(this.state.items),void i.publish();this.state.isFetchingItems=!0,i.publish(),r.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(i.state.items=e.data,i.sort(),n(i.state.items),i.state.itemsFetched=!0):o(),i.state.isFetchingItems=!1,i.sort(),i.publish()}})},saveItem:function(n){var a=this.state.items?this.state.items:[],o=_.findWhere(a,{mapid:n.mapid});o?(o.mapid=void 0!==n.mapid?n.mapid:o.mapid,o.map_title=void 0!==n.title?n.title:o.map_title,o.postid=void 0!==n.postid?n.postid:o.postid,o.post_title=void 0!==n.post_title?n.post_title:o.post_title,o=function(n){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?e(Object(o),!0).forEach((function(e){t(n,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({},o)):(o={mapid:n.mapid,map_title:n.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){var n,a=this,o=(n="untitled",wp.i18n.__(n,"mappress-google-maps-for-wordpress"));this.state.items.sort((function(e,t){return function(e,t,n,a){if(a=a?1:-1,"mapid"==n)return a*(Number(e.mapid)-Number(t.mapid));var r=e[n]?e[n]:o,i=t[n]?t[n]:o,l=a*r.localeCompare(i);return 0==l?Number(e.mapid)-Number(t.mapid):l}(e,t,a.state.sortBy,a.state.sortAsc)}))},subscribe:function(e){this.subs.add(e)},unsubscribe:function(e){this.subs.delete(e)},publish:function(){var e,t=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(_e){throw _e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}(n(this.subs));try{for(t.s();!(e=t.n()).done;){(0,e.value)(this.state)}}catch(e){t.e(e)}finally{t.f()}}},r.store=new r.Store},710:(e,t,n)=>{"use strict";n.d(t,{m:()=>w});var a=n(824),o=n(149);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p=wp.element.createElement,u=wp.element,d=u.Fragment,m=(u.useEffect,u.useLayoutEffect,u.useRef,u.useState),f=wp.components,h=f.Button,g=(f.Dashicon,f.ExternalLink),b=f.Icon,y=f.Modal,v=(f.Panel,f.PanelBody,f.PanelRow,f.Spinner),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function w(e){var t,n,r,l,c,u,f,w=s(m({apiKey:"6a0cfe9e-3670-4598-a63e-f1627b5c9e56",snazzyPagination:null,snazzySearch:"",snazzyStyles:null,isOpen:!1,isSaving:!0,isSearching:!1,json:"",map:null,mapboxError:"",mapboxId:"",mapboxName:"",mapboxUser:"",mapboxUrl:"",mapboxParsedUrl:"",mode:"pick",page:1,style:mappl10n.options.style,standardStyles:mappl10n.options.standardStyles,userStyles:mappl10n.options.userStyles}),2),k=w[0],O=w[1];function S(e){O((function(t){return i(i({},t),e)}))}function C(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=_.findIndex(k.userStyles,{id:t.id});if(a>=0){if(!n&&!confirm(__("Style already exists, overwrite?")))return;mappl10n.options.userStyles[a]=t}else mappl10n.options.userStyles.push(t);S({isOpen:!1,mode:"pick",userStyles:mappl10n.options.userStyles,selected:t.id}),e.onChange(t.id),mapp.lib.ajax({type:"POST",data:{action:"mapp_option_save",settings:"leaflet"==mappl10n.options.engine?{stylesMapbox:mappl10n.options.userStyles}:{stylesGoogle:mappl10n.options.userStyles},nonce:mappl10n.options.nonce},callback:function(e){}})}function x(e){S({isSearching:!0,snazzyStyles:null}),mapp.lib.ajax({type:"GET",data:{sort:"popular",page:e,pageSize:20,text:k.snazzySearch,key:k.apiKey},url:"https://snazzymaps.com/explore.json",callback:function(e){(S({isSearching:!1,snazzyPagination:e&&e.pagination?e.pagination:null}),e&&e.styles)?S({snazzyStyles:_.map(e.styles,(function(e,t){return e.id=e.id+"",e}))}):alert("Error: unable to fetch styles")}})}function P(e,t){t="large"==t||"small"==t?t:"small",t=800;var n=mappl10n.options.baseurl+"/images/roadmap.png";return"leaflet"==mappl10n.options.engine?mappl10n.options.mapbox?e.user&&e.mapboxid&&(n="https://api.mapbox.com/styles/v1/"+e.user+"/"+e.mapboxid+"/static/-122.4194,37.7749,10,0/800x800?access_token="+mappl10n.options.mapbox):n=mappl10n.options.baseurl+"/images/osm.png":e.imageUrl&&(n=e.imageUrl),p("img",{src:n,title:e.name})}function j(t,n){switch(t){case"close":S({isOpen:!1});break;case"json-cancel":S({mode:"pick"});break;case"json-change":S({json:n});break;case"json-save":var a=_.findWhere(k.userStyles,{id:e.selected});a&&(a.json=JSON.stringify(JSON.parse(k.json)),C(a,!0));break;case"mapbox-cancel":S({mode:"pick"});break;case"mapbox-change-url":var o,r,i=n.trim().toLowerCase().replace(".html","").replace("https://api.mapbox.com/styles/v1/","").replace("mapbox://styles/","").split("?")[0].split("/");2==i.length&&(o=i[0],r=i[1]),S({mapboxUrl:n,mapboxUser:o,mapboxId:r});break;case"mapbox-save":k.mapboxName&&k.mapboxUser&&C({id:k.mapboxId,name:k.mapboxName,mapboxid:k.mapboxId,provider:"mapbox",url:k.mapboxUrl,user:k.mapboxUser});break;case"mode":S({mode:n});break;case"open":"leaflet"!=mappl10n.options.engine||mappl10n.options.mapbox?S({isOpen:!0}):alert(__("Please enter a Mapbox access token in the MapPress settings screen to use styled maps."));break;case"pick-add":alert(__("Please upgrade to MapPress Pro to use custom styles"));break;case"pick-cancel":S({isOpen:!1});break;case"pick-delete":confirm(mappl10n.delete_prompt)&&function(t){var n=_.findIndex(k.userStyles,{id:t});if(n<0)mapp.lib.alert("Invalid delete");else{var a=k.userStyles;a.splice(n,1),mappl10n.options.userStyles=a,S({userStyles:a}),e.selected==t&&e.onChange(null),mapp.lib.ajax({type:"POST",data:{action:"mapp_option_save",settings:"leaflet"==mappl10n.options.engine?{stylesMapbox:a}:{stylesGoogle:a},nonce:mappl10n.options.nonce},callback:function(e){}})}}(n);break;case"pick-edit":e.onChange(n.id),"leaflet"==mappl10n.options.engine?S({mode:"mapbox",mapboxId:n.mapboxid,mapboxName:n.name,mapboxUrl:n.url,mapboxUser:n.user}):S({json:n.json,mode:"json"});break;case"pick-select":e.onChange(n.id),S({isOpen:!1});break;case"snazzy-cancel":S({mode:"pick"});break;case"snazzy-save":var l=n;l&&C({id:l.id,imageUrl:l.imageUrl,json:l.json,name:l.name});break;case"snazzy-search":x()}}function N(e){var t;return t=e.styles&&e.styles.length?_.map(e.styles,(function(t,n){return function(e,t){var n="mapp-style"+(t.selected==e.id?" mapp-selected":""),a=t.onDelete?p(b,{icon:"trash",onClick:function(){return t.onDelete(e.id)}}):null,o=t.onEdit?p("a",{onClick:function(){return t.onEdit(e)}},__("Edit")):null;return p("div",{className:n,key:e.id},p("div",{className:"mapp-style-image",onClick:function(){return t.onSelect(e)}},P(e)),p("div",{className:"mapp-style-details"},p("div",{className:"mapp-style-title"},e.name),p("div",{className:"mapp-style-actions"},o,a)))}(t,e)})):k.isSearching?"":p("div",{className:"mapp-style-list-msg"},__("No results")),p("div",{className:"mapp-style-list-wrapper"},p("div",{className:"mapp-style-list-header"},e.title),p("div",{className:"mapp-style-list"},t))}return p(d,null,(c=k.standardStyles.concat(k.userStyles),u=!mappl10n.options.style||"roadmap"!=e.selected&&"streets"!=e.selected&&e.selected?e.selected:mappl10n.options.style,f=(f=_.findWhere(c,{id:u}))||k.standardStyles[0],p(h,{className:"mapp-style-toggle",icon:P(f),iconSize:75,isSecondary:!0,onClick:function(){return j("open",null)},title:f.name})),"edit"==k.mode&&k.isOpen&&renderEdit(),"json"==k.mode&&k.isOpen&&function(){var e,t,n;try{e=JSON.parse(k.json),t=JSON.stringify(e,null,2)}catch(e){n=e.toString(),t=k.json}var a=n?"mapp-style-json mapp-style-error":"mapp-style-json";return p(y,{title:__("Edit style JSON"),className:"mapp-style-modal",onRequestClose:function(){return j("json-cancel")},shouldCloseOnClickOutside:!0},p("div",{className:a},p("textarea",{value:t,spellCheck:!1,onChange:function(e){return j("json-change",e.target.value)}})),p("div",{className:"mapp-style-json-error"},n||""),p("div",{className:"mapp-style-toolbar"},p("div",null,p(h,{disabled:n,isPrimary:!0,onClick:function(){return j("json-save")}},__("Save")),p(h,{onClick:function(){return j("json-cancel")}},__("Cancel")))))}(),"mapbox"==k.mode&&k.isOpen&&(r=k.mapboxUser&&k.mapboxId?P({user:k.mapboxUser,mapboxid:k.mapboxId,name:k.mapboxName},"large"):null,l=!k.mapboxUser||!k.mapboxId||!k.mapboxName,p(y,{title:__("Add style"),className:"mapp-style-modal",onRequestClose:function(){return j("mapbox-cancel")},shouldCloseOnClickOutside:!0},p("div",{className:"mapp-style-mapbox-title"},__("Enter style from Mapbox Studio"),p(g,{href:"https://studio.mapbox.com"})),p("form",{className:"mapp-style-mapbox-form",onSubmit:function(e){e.stopPropagation(),e.preventDefault(),j("mapbox-save",k.snazzySelected)}},p("label",null,p("span",{className:"mapp-style-mapbox-label"},__("MapBox Share URL")),p(a.Help,{href:"#toc-mapbox-studio-styles"}),p(a.Input,{autoFocus:!0,className:"mapp-style-mapbox-url",value:k.mapboxUrl,onChange:function(e){return j("mapbox-change-url",e)}})),p("label",null,p("div",{className:"mapp-style-mapbox-label"},__("Style name")),p(a.Input,{className:"mapp-style-mapbox-name",value:k.mapboxName,onChange:function(e){return S({mapboxName:e})}})),p("div",{className:"mapp-style-mapbox-preview"},r),p("div",{className:"mapp-style-toolbar"},p("div",null,p(h,{isPrimary:!0,disabled:l,type:"submit"},__("Save")),p(h,{onClick:function(){return j("mapbox-cancel")}},__("Cancel"))))))),"pick"==k.mode&&k.isOpen&&(n="",k.userStyles&&k.userStyles.length&&(n=N({selected:e.selected,onEdit:function(e){return j("pick-edit",e)},onDelete:function(e){return j("pick-delete",e)},onSelect:function(e){return j("pick-select",e)},styles:k.userStyles,title:__("Custom styles")})),p(y,{title:p("div",{className:"mapp-style-header"},__("Select a style")),className:"mapp-style-modal",onRequestClose:function(){return j("close")}},p("div",{className:"mapp-style-list-wrapper"},N({onSelect:function(e){return j("pick-select",e)},selected:e.selected,styles:k.standardStyles,title:__("Standard styles")}),n),p("div",{className:"mapp-style-toolbar"},p("div",null,p(h,{isPrimary:!0,onClick:function(){return j("pick-add")}},__("New style")),p(h,{onClick:function(){return j("pick-cancel")}},__("Cancel")))))),"snazzy"==k.mode&&k.isOpen&&(k.snazzySelected,p(y,{title:__("Download style"),className:"mapp-style-modal mapp-style-modal-snazzy",onRequestClose:function(){return j("snazzy-cancel")},shouldCloseOnClickOutside:!0},p("form",{className:"mapp-style-snazzy-form",onSubmit:function(e){j("snazzy-search"),e.preventDefault()}},p(a.Input,{className:"mapp-style-snazzy-search",value:k.search,placeholder:__("Search"),onChange:function(e){return S({snazzySearch:e})}}),k.isSearching&&p(v,null),!k.isSearching&&p(h,{isPrimary:!0,icon:"search",onClick:function(){return j("snazzy-search")}})),N({selected:k.snazzySelected,styles:k.snazzyStyles,onSelect:function(e){return j("snazzy-save",e)}}),p("div",{className:"mapp-style-toolbar"},p("div",null,p(h,{onClick:function(){return j("snazzy-cancel")}},__("Cancel"))),(t=k.snazzyPagination)&&k.snazzyStyles&&k.snazzyStyles.length?p(o.S,{count:t.totalItems,onChange:function(e){return x(e)},page:t.currentPage,pageSize:t.pageSize}):null))))}},214:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappCard:()=>v});n(824);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,a=!1,_e=void 0;try{for(var o,r=e[Symbol.iterator]();!(_n=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function s(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=wp.element.createElement,p=wp.element,u=p.Fragment,d=p.useEffect,m=(p.useLayoutEffect,p.useCallback,p.useRef),f=p.useState,_=(wp.data.useSelect,wp.components),h=_.Button,g=_.Dashicon,b=_.ExternalLink,y=_.Guide,__=(_.Modal,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function v(e){var t=e.icon,n=e.title,a=s(e,["icon","title"]);return c("div",{className:"mapp-support-card"},n&&c("div",{className:"mapp-support-card-title"},c("h3",null,t&&c(g,{icon:t}),n)),c("div",{className:"mapp-support-card-content"},a.children))}document.getElementById("mapp-support-page")&&wp.element.render(c((function(e){var t=i(f({engine:e.engine?e.engine:"leaflet",isOpen:e.isOpen,apiKey:e.apiKey,mapbox:e.mapbox}),2),n=t[0],a=t[1];function r(e){a((function(t){return o(o({},t),e)}))}function l(e){return c("div",{className:"mapp-guide-engine"+(e.selected?" mapp-selected":""),onClick:function(){return e.onClick()}},c("h2",{className:"mapp-guide-engine-title"},e.title),c("div",{className:"mapp-guide-engine-content"},e.content))}return m(null),d((function(){}),[]),c("div",{className:"mapp-support"},c(u,null,c("div",{className:"mapp-support-section"},c("div",{className:"mapp-support-header"},c("img",{src:mappl10n.options.baseurl+"/images/icon-128x128.png"}),c("h1",null,__("MapPress Support")),c("i",null,__("Build amazing maps with the easiest and most powerful mapping plugin available")),c("div",null,c(h,{className:"mapp-support-guide-toggle",isPrimary:!0,onClick:function(){return r({isOpen:!0})}},__("Open Setup Wizard"))))),c("div",{className:"mapp-support-section"},c("div",{className:"mapp-support-cards"},c(v,{icon:"book",title:__("Documentation")},c("p",null,__("Detailed plugin documentation:")),c(b,{href:"https://mappresspro.com/mappress-documentation/"},__("Documentation")),c(b,{href:"https://mappresspro.com/whats-new/"},__("What's new")),c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-map-library-and-map-editors"},__("Creating your first map"))),c(v,{icon:"warning",title:__("Troubleshooting")},c("p",null,c("b",null,__("Check for a plugin or theme conflict:"))),c("ol",null,c("li",null,__("Deactivate ALL other plugins")),c("li",null,__("Switch to a standard WordPress theme")),c("li",null,__("If the maps are working, reactivate one by one to find the conflict."))),c("p",null,__("For more info:")),c(b,{href:"https://mappresspro.com/mappress-faq/"},__("MapPress FAQ"))),c(v,{icon:"megaphone",title:__("Support")},c("p",null,__("Need some help?")),c(b,{href:"https://mappresspro.com/forums/forum/mappress-support/"},__("Support forum")),c(b,{href:"https://mappresspro.com/chris-contact/"},__("Contact")))))),function(){if(n.isOpen)return c(y,{className:"mapp-guide",onFinish:function(){return function(e,t){switch(e){case"save":var a;r({isOpen:!1}),a="google"==n.engine?"google":n.mapbox?"mapbox":"nominatim",mapp.lib.ajax({type:"POST",data:{action:"mapp_option_save",nonce:mappl10n.options.nonce,settings:{engine:n.engine,apiKey:n.apiKey,mapbox:n.mapbox,geocoder:a}},callback:function(e){"OK"!=e.status&&alert("Unable to save settings. Please check the support troubleshooting guide.")}})}}("save")},pages:[{content:c("div",{className:"mapp-guide-page mapp-guide-engines"},c("h1",null,__("Please Choose a Mapping API")),c("p",null,__("MapPress supports both Leaflet and Google mapping APIs."),c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-picking-a-mapping-api"},__("Learn more"))),c("div",{className:"mapp-guide-engines"},l({onClick:function(){return r({engine:"leaflet"})},selected:"leaflet"==n.engine,title:"Leaflet",content:c("ul",null,c("li",null,__("No API key")),c("li",null,__("Free unlimited usage")),c("li",null,__("Good functionality")),c("li",null,__("Best for high traffic sites")))}),l({onClick:function(){return r({engine:"google"})},selected:"google"==n.engine,title:"Google",content:c("ul",null,c("li",null,__("API key required")),c("li",null,__("Limited free usage")),c("li",null,__("Excellent functionality")),c("li",null,__("Best for low traffic sites")))}))),image:c("div",{className:"mapp-guide-header mapp-guide-image-small"},c("img",{src:mappl10n.options.baseurl+"/images/icon-128x128.png"}),c("h1",null,__("Welcome to MapPress!")))},{content:"google"==n.engine?c("div",{className:"mapp-guide-page mapp-guide-apikey"},c("h1",null,__("Google API Key")),c("p",null,__("Google requires an API key to use Google Maps. Please enter your key below.")),c(h,{isPrimary:!0,href:"https://mappresspro.com/how-to-get-a-google-maps-api-key/",target:"_blank"},__("Get an API Key")),c("input",{className:"mapp-guide-apikey",onChange:function(e){return r({apiKey:e.target.value})},placeholder:__("Enter your API key here"),value:n.apiKey})):c("div",{className:"mapp-guide-page mapp-guide-apikey"},c("h1",null,__("Sign up with Mapbox")),c("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."),c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-using-mapbox-with-leaflet"},__("Learn more"))),c(h,{isPrimary:!0,href:"https://account.mapbox.com/auth/signup/",target:"_blank"},__("Get Mapbox Access Token")),c("input",{className:"mapp-guide-apikey",onChange:function(e){return r({mapbox:e.target.value})},placeholder:__("Enter your access token here"),value:n.mapbox})),image:c("div",{className:"mapp-guide-header mapp-guide-image-small"},"google"==n.engine&&c("img",{src:mappl10n.options.baseurl+"/images/google_logo.png"}),"leaflet"==n.engine&&c("img",{src:mappl10n.options.baseurl+"/images/mapbox_logo_white.png"}))},{content:c("div",{className:"mapp-guide-page mapp-guide-gutenberg"},c("h1",null,__("Maps in the Block Editor")),c("p",null,__("MapPress provides custom block types for the Gutenberg editor.")),c("p",null,__("Just insert a MapPress Map block to get started."),c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-create-a-map-with-the-gutenberg-block-editor"},__("Learn more")))),image:c("div",{className:"mapp-guide-header"},c("img",{src:mappl10n.options.baseurl+"/images/gutenberg_map_block.gif"}))},{content:c("div",{className:"mapp-guide-page mapp-guide-classic"},c("h1",null,__("Maps in the Classic Editor")),c("p",null,__('MapPress also supports the "classic" editor. Just click the MapPress button to open the map library.')),c("p",null,c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-create-a-map-with-the-classic-editor"},__("Learn more")))),image:c("div",{className:"mapp-guide-header"},c("img",{src:mappl10n.options.baseurl+"/images/classic_map.gif"}))},{content:c("div",{className:"mapp-guide-page mapp-guide-library"},c("h1",null,__("Map Library")),c("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.")),c("p",null,c(b,{href:"https://mappresspro.com/mappress-documentation/#toc-map-library-and-map-editors"},__("Learn more")))),image:c("div",{className:"mapp-guide-header"},c("img",{src:mappl10n.options.baseurl+"/images/library_menu.gif"}))},{content:c("div",{className:"mapp-guide-page mapp-guide-end"},c("h1",null,__("Happy Mapping")),c("p",null,__("Enjoy the plugin! Replay this guide any time from the MapPress support menu."))),image:c("div",{className:"mapp-guide-header"},c("img",{src:mappl10n.options.baseurl+"/images/icon-128x128"}))}]})}())}),mappress_support_state),document.getElementById("mapp-support-page"))},308:(e,t,n)=>{"use strict";e.exports=function(e,t){var a,o,r,i,l,s,c,p,u,d,m,f,_,h=String(e).replace(/^&/,"").replace(/&$/,"").split("&"),g=h.length,b=function(e){return decodeURIComponent(e.replace(/\+/g,"%20"))},y="undefined"!=typeof window?window:n.g;y.$locutus=y.$locutus||{};var v=y.$locutus;for(v.php=v.php||{},t||(t=y),a=0;a<g&&(u=b((p=h[a].split("="))[0]),d=p.length<2?"":b(p[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));a++){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(f=[],m=0,o=0;o<u.length;o++)if("["!==u.charAt(o)||m){if("]"===u.charAt(o)&&m&&(f.length||f.push(u.slice(0,m-1)),f.push(u.substr(m,o-m)),m=0,"["!==u.charAt(o+1)))break}else m=o+1;for(f.length||(f=[u]),o=0;o<f[0].length&&(" "!==(c=f[0].charAt(o))&&"."!==c&&"["!==c||(f[0]=f[0].substr(0,o)+"_"+f[0].substr(o+1)),"["!==c);o++);for(s=t,o=0,_=f.length;o<_;o++){if(l=s,(""===(u=f[o].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==o){for(i in r=-1,s)s.hasOwnProperty(i)&&+i>r&&i.match(/^\d+$/g)&&(r=+i);u=r+1}Object(s[u])!==s[u]&&(s[u]={}),s=s[u]}l[u]=d}}}}},t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(787),n(844),n(215),n(713),n(525),n(371),n(999),n(143),n(816),n(378),n(498),n(670),n(218),n(824),n(694),n(429),n(214)})();
css/mappress.css CHANGED
@@ -116,24 +116,27 @@ only screen and (min-device-pixel-ratio: 2) {
116
  background-size: 640px 640px;
117
  }
118
 
119
- .mapp-dialog {
120
- background-color: white;
121
- color: black;
122
- display: none;
123
- min-height: 40px;
124
- opacity: .95;
125
  padding: 10px;
126
  position: absolute;
127
- text-align: center;
128
- top: 0; left: 0; right: 0;
129
- z-index: 1000;
130
  }
131
 
132
 
133
- .mapp-dialog .mapp-spinner {
 
 
 
134
  display: inline-block;
 
 
135
  }
136
 
 
137
  /*
138
  -----------------------------------------------------------------------------------
139
  Geolocate control
@@ -187,7 +190,7 @@ only screen and (min-device-pixel-ratio: 2) {
187
  flex-direction: column;
188
  max-width: 45%;
189
  position: relative; /* Needed to scroll list for selection */
190
- transition-property : all;
191
  transition-duration: .1s;
192
  width: 0;
193
  }
@@ -1485,21 +1488,6 @@ img.mapp-icon, .mapp-icon img {
1485
  vertical-align: middle;
1486
  }
1487
 
1488
- .mapp-error {
1489
- background-color: #ffebe8;
1490
- margin: 0;
1491
- padding: 2px;
1492
- background-color: pink;
1493
- border: 1px solid red !important;
1494
- }
1495
-
1496
- .mapp-spinner {
1497
- background: transparent url(../images/loading.gif) no-repeat center center;
1498
- height:16px;
1499
- width: 16px;
1500
- margin-left: 10px;
1501
- margin-right: 10px;
1502
- }
1503
 
1504
  *[data-mapp-action] {
1505
  cursor: pointer;
116
  background-size: 640px 640px;
117
  }
118
 
119
+ .mapp-layout .mapp-spinner {
120
+ align-items: center;
121
+ display: flex;
122
+ justify-content: center;
 
 
123
  padding: 10px;
124
  position: absolute;
125
+ top: 0; left: 0; right: 0; bottom: 0;
126
+ z-index: 10001;
 
127
  }
128
 
129
 
130
+ /* https://icons8.com/preloaders/en/circular# */
131
+ .mapp-layout .mapp-spinner-icon {
132
+ background: transparent url(../images/loading.gif) no-repeat center center;
133
+ background-size: 64px;
134
  display: inline-block;
135
+ height: 64px;
136
+ width: 64px;
137
  }
138
 
139
+
140
  /*
141
  -----------------------------------------------------------------------------------
142
  Geolocate control
190
  flex-direction: column;
191
  max-width: 45%;
192
  position: relative; /* Needed to scroll list for selection */
193
+ transition-property: all;
194
  transition-duration: .1s;
195
  width: 0;
196
  }
1488
  vertical-align: middle;
1489
  }
1490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1491
 
1492
  *[data-mapp-action] {
1493
  cursor: pointer;
css/mappress_admin.css CHANGED
@@ -1034,10 +1034,6 @@ html.mapp-iframe {
1034
  margin-right: 20px;
1035
  }
1036
 
1037
- .mapp-options .mapp-license-status {
1038
- margin-left: 10px;
1039
- }
1040
-
1041
  button.mapp-options-save {
1042
  margin-right: 10px;
1043
  }
@@ -1056,10 +1052,6 @@ button.mapp-options-save {
1056
  color:red;
1057
  }
1058
 
1059
- .mapp-options-check-license {
1060
- margin-left: 10px;
1061
- }
1062
-
1063
  /* Override WP stuff */
1064
  .mapp-options a {
1065
  text-decoration: none;
@@ -1134,6 +1126,11 @@ button.mapp-options-save {
1134
  margin-right: 10px;
1135
  }
1136
 
 
 
 
 
 
1137
  .mapp-option-poilist-radios {
1138
  margin-top: 10px;
1139
  }
@@ -2263,6 +2260,29 @@ a.mapp-deactivate-help {
2263
  Misc
2264
  -----------------------------------------------------------------------------------
2265
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2266
  .mapp-tab {
2267
  border-bottom: 4px solid transparent;
2268
  cursor: pointer;
1034
  margin-right: 20px;
1035
  }
1036
 
 
 
 
 
1037
  button.mapp-options-save {
1038
  margin-right: 10px;
1039
  }
1052
  color:red;
1053
  }
1054
 
 
 
 
 
1055
  /* Override WP stuff */
1056
  .mapp-options a {
1057
  text-decoration: none;
1126
  margin-right: 10px;
1127
  }
1128
 
1129
+ .mapp-option-license .components-button {
1130
+ margin-left: 10px;
1131
+ }
1132
+
1133
+
1134
  .mapp-option-poilist-radios {
1135
  margin-top: 10px;
1136
  }
2260
  Misc
2261
  -----------------------------------------------------------------------------------
2262
  */
2263
+
2264
+ .mapp-snackbar {
2265
+ background-color: #333;
2266
+ color: white;
2267
+ left: 50%;
2268
+ transform: translateX(-50%);
2269
+ min-width: 200px;
2270
+ opacity: 0;
2271
+ padding: 20px;
2272
+ position: fixed;
2273
+ }
2274
+
2275
+ .mapp-snackbar-show {
2276
+ animation: mapp-snackbar-fade 4s;
2277
+ }
2278
+
2279
+ @keyframes mapp-snackbar-fade {
2280
+ from {bottom: 0; opacity: 0;}
2281
+ 5% {bottom: 30px; opacity: 1;}
2282
+ 95% {bottom: 30px; opacity: 1;}
2283
+ to {bottom: 0; opacity: 0;}
2284
+ }
2285
+
2286
  .mapp-tab {
2287
  border-bottom: 4px solid transparent;
2288
  cursor: pointer;
images/loading.gif CHANGED
Binary file
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.69.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-10-13T01:32:29+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:194
34
- #: mappress.php:789
35
  msgid "Settings"
36
  msgstr ""
37
 
@@ -59,125 +59,121 @@ msgstr ""
59
  msgid "MapPress Settings"
60
  msgstr ""
61
 
62
- #: mappress.php:517
63
- msgid "renew your license"
64
  msgstr ""
65
 
66
- #: mappress.php:518
67
- msgid "Your MapPress license has expired. Please %s to get the latest updates and prevent errors."
68
  msgstr ""
69
 
70
- #: mappress.php:527
71
  msgid "Please enter your MapPress license key to enable plugin updates"
72
  msgstr ""
73
 
74
- #: mappress.php:531
75
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
76
  msgstr ""
77
 
78
- #: mappress.php:535
79
  msgid "MapPress has many new features! %s."
80
  msgstr ""
81
 
82
- #: mappress.php:535
83
- #: mappress.php:539
84
- #: mappress.php:543
85
  msgid "Learn more"
86
  msgstr ""
87
 
88
- #: mappress.php:539
89
  msgid "MapPress popup templates have changed! Please update custom templates to the new format. %s."
90
  msgstr ""
91
 
92
- #: mappress.php:543
93
  msgid "MapPress templates and filters have changed. Please update custom templates and filters. %s."
94
  msgstr ""
95
 
96
- #: mappress.php:605
97
  msgid "Are you sure you want to delete?"
98
  msgstr ""
99
 
100
- #: mappress.php:606
101
  msgid "Permanently delete this map from the map library?"
102
  msgstr ""
103
 
104
- #: mappress.php:607
105
  msgid "Error reading KML file"
106
  msgstr ""
107
 
108
- #: mappress.php:608
109
  msgid "URL for KML file"
110
  msgstr ""
111
 
112
- #: mappress.php:609
113
- msgid "Loading"
114
- msgstr ""
115
-
116
- #: mappress.php:610
117
  msgid "Please select an editor to insert into."
118
  msgstr ""
119
 
120
- #: mappress.php:611
121
  msgid "Unable to get your location"
122
  msgstr ""
123
 
124
- #: mappress.php:612
125
  msgid "No results"
126
  msgstr ""
127
 
128
- #: mappress.php:613
129
  msgid "Save changes?"
130
  msgstr ""
131
 
132
- #: mappress.php:614
133
  msgid "Shape"
134
  msgstr ""
135
 
136
- #: mappress.php:646
137
- #: mappress.php:655
138
  msgid "Streets"
139
  msgstr ""
140
 
141
- #: mappress.php:647
142
  msgid "Outdoors"
143
  msgstr ""
144
 
145
- #: mappress.php:648
146
  msgid "Light"
147
  msgstr ""
148
 
149
- #: mappress.php:649
150
  msgid "Dark"
151
  msgstr ""
152
 
153
- #: mappress.php:650
154
- #: mappress.php:663
155
  msgid "Satellite"
156
  msgstr ""
157
 
158
- #: mappress.php:651
159
  msgid "Satellite Streets"
160
  msgstr ""
161
 
162
- #: mappress.php:661
163
  msgid "Roadmap"
164
  msgstr ""
165
 
166
- #: mappress.php:662
167
  msgid "Terrain"
168
  msgstr ""
169
 
170
- #: mappress.php:664
171
  msgid "Hybrid"
172
  msgstr ""
173
 
174
- #: mappress.php:790
175
- #: mappress_settings.php:403
176
- #: mappress_settings.php:434
177
  msgid "What's new"
178
  msgstr ""
179
 
180
- #: mappress.php:1098
181
  msgid "Version"
182
  msgstr ""
183
 
@@ -197,95 +193,83 @@ msgstr ""
197
  msgid "Post not found"
198
  msgstr ""
199
 
200
- #: mappress_settings.php:205
201
  msgid "Default"
202
  msgstr ""
203
 
204
- #: mappress_settings.php:253
205
  msgid "Maps for WordPress"
206
  msgstr ""
207
 
208
- #: mappress_settings.php:277
209
- msgid "Active"
210
- msgstr ""
211
-
212
- #: mappress_settings.php:280
213
- msgid "Communication error, please try again later: %s"
214
- msgstr ""
215
-
216
- #: mappress_settings.php:282
217
- msgid "License is invalid or expired"
218
- msgstr ""
219
-
220
- #: mappress_settings.php:290
221
  msgid "Address line "
222
  msgstr ""
223
 
224
- #: mappress_settings.php:291
225
  msgid "Latitude"
226
  msgstr ""
227
 
228
- #: mappress_settings.php:291
229
  msgid "Longitude"
230
  msgstr ""
231
 
232
- #: mappress_settings.php:291
233
  #: mappress_template.php:37
234
  msgid "Title"
235
  msgstr ""
236
 
237
- #: mappress_settings.php:291
238
  #: mappress_template.php:34
239
  msgid "Body"
240
  msgstr ""
241
 
242
- #: mappress_settings.php:291
243
  #: mappress_template.php:35
244
  msgid "Icon"
245
  msgstr ""
246
 
247
- #: mappress_settings.php:291
248
  msgid "Zoom"
249
  msgstr ""
250
 
251
- #: mappress_settings.php:380
252
  msgid "OK, you deserve it!"
253
  msgstr ""
254
 
255
- #: mappress_settings.php:381
256
  msgid "Nope, maybe later"
257
  msgstr ""
258
 
259
- #: mappress_settings.php:382
260
  msgid "I need help using the plugin"
261
  msgstr ""
262
 
263
- #: mappress_settings.php:384
264
  msgid "Help Spread the Word"
265
  msgstr ""
266
 
267
- #: mappress_settings.php:385
268
  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!"
269
  msgstr ""
270
 
271
- #: mappress_settings.php:398
272
- #: mappress_settings.php:429
273
  msgid "MapPress"
274
  msgstr ""
275
 
276
- #: mappress_settings.php:402
277
- #: mappress_settings.php:433
278
  #: templates/map.php:64
279
  msgid "Get help"
280
  msgstr ""
281
 
282
- #: mappress_settings.php:405
283
- #: mappress_settings.php:436
284
  msgid "Your account"
285
  msgstr ""
286
 
287
- #: mappress_settings.php:407
288
- #: mappress_settings.php:438
289
  msgid "Upgrade to MapPress Pro"
290
  msgstr ""
291
 
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.69.8\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-10-14T14:44:13+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:194
34
+ #: mappress.php:793
35
  msgid "Settings"
36
  msgstr ""
37
 
59
  msgid "MapPress Settings"
60
  msgstr ""
61
 
62
+ #: mappress.php:521
63
+ msgid "Renew your license"
64
  msgstr ""
65
 
66
+ #: mappress.php:523
67
+ msgid "Your MapPress license has expired. %s to get the latest updates and prevent errors."
68
  msgstr ""
69
 
70
+ #: mappress.php:532
71
  msgid "Please enter your MapPress license key to enable plugin updates"
72
  msgstr ""
73
 
74
+ #: mappress.php:536
75
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
76
  msgstr ""
77
 
78
+ #: mappress.php:540
79
  msgid "MapPress has many new features! %s."
80
  msgstr ""
81
 
82
+ #: mappress.php:540
83
+ #: mappress.php:544
84
+ #: mappress.php:548
85
  msgid "Learn more"
86
  msgstr ""
87
 
88
+ #: mappress.php:544
89
  msgid "MapPress popup templates have changed! Please update custom templates to the new format. %s."
90
  msgstr ""
91
 
92
+ #: mappress.php:548
93
  msgid "MapPress templates and filters have changed. Please update custom templates and filters. %s."
94
  msgstr ""
95
 
96
+ #: mappress.php:610
97
  msgid "Are you sure you want to delete?"
98
  msgstr ""
99
 
100
+ #: mappress.php:611
101
  msgid "Permanently delete this map from the map library?"
102
  msgstr ""
103
 
104
+ #: mappress.php:612
105
  msgid "Error reading KML file"
106
  msgstr ""
107
 
108
+ #: mappress.php:613
109
  msgid "URL for KML file"
110
  msgstr ""
111
 
112
+ #: mappress.php:614
 
 
 
 
113
  msgid "Please select an editor to insert into."
114
  msgstr ""
115
 
116
+ #: mappress.php:615
117
  msgid "Unable to get your location"
118
  msgstr ""
119
 
120
+ #: mappress.php:616
121
  msgid "No results"
122
  msgstr ""
123
 
124
+ #: mappress.php:617
125
  msgid "Save changes?"
126
  msgstr ""
127
 
128
+ #: mappress.php:618
129
  msgid "Shape"
130
  msgstr ""
131
 
132
+ #: mappress.php:650
133
+ #: mappress.php:659
134
  msgid "Streets"
135
  msgstr ""
136
 
137
+ #: mappress.php:651
138
  msgid "Outdoors"
139
  msgstr ""
140
 
141
+ #: mappress.php:652
142
  msgid "Light"
143
  msgstr ""
144
 
145
+ #: mappress.php:653
146
  msgid "Dark"
147
  msgstr ""
148
 
149
+ #: mappress.php:654
150
+ #: mappress.php:667
151
  msgid "Satellite"
152
  msgstr ""
153
 
154
+ #: mappress.php:655
155
  msgid "Satellite Streets"
156
  msgstr ""
157
 
158
+ #: mappress.php:665
159
  msgid "Roadmap"
160
  msgstr ""
161
 
162
+ #: mappress.php:666
163
  msgid "Terrain"
164
  msgstr ""
165
 
166
+ #: mappress.php:668
167
  msgid "Hybrid"
168
  msgstr ""
169
 
170
+ #: mappress.php:794
171
+ #: mappress_settings.php:380
172
+ #: mappress_settings.php:411
173
  msgid "What's new"
174
  msgstr ""
175
 
176
+ #: mappress.php:1102
177
  msgid "Version"
178
  msgstr ""
179
 
193
  msgid "Post not found"
194
  msgstr ""
195
 
196
+ #: mappress_settings.php:211
197
  msgid "Default"
198
  msgstr ""
199
 
200
+ #: mappress_settings.php:247
201
  msgid "Maps for WordPress"
202
  msgstr ""
203
 
204
+ #: mappress_settings.php:267
 
 
 
 
 
 
 
 
 
 
 
 
205
  msgid "Address line "
206
  msgstr ""
207
 
208
+ #: mappress_settings.php:268
209
  msgid "Latitude"
210
  msgstr ""
211
 
212
+ #: mappress_settings.php:268
213
  msgid "Longitude"
214
  msgstr ""
215
 
216
+ #: mappress_settings.php:268
217
  #: mappress_template.php:37
218
  msgid "Title"
219
  msgstr ""
220
 
221
+ #: mappress_settings.php:268
222
  #: mappress_template.php:34
223
  msgid "Body"
224
  msgstr ""
225
 
226
+ #: mappress_settings.php:268
227
  #: mappress_template.php:35
228
  msgid "Icon"
229
  msgstr ""
230
 
231
+ #: mappress_settings.php:268
232
  msgid "Zoom"
233
  msgstr ""
234
 
235
+ #: mappress_settings.php:357
236
  msgid "OK, you deserve it!"
237
  msgstr ""
238
 
239
+ #: mappress_settings.php:358
240
  msgid "Nope, maybe later"
241
  msgstr ""
242
 
243
+ #: mappress_settings.php:359
244
  msgid "I need help using the plugin"
245
  msgstr ""
246
 
247
+ #: mappress_settings.php:361
248
  msgid "Help Spread the Word"
249
  msgstr ""
250
 
251
+ #: mappress_settings.php:362
252
  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!"
253
  msgstr ""
254
 
255
+ #: mappress_settings.php:375
256
+ #: mappress_settings.php:406
257
  msgid "MapPress"
258
  msgstr ""
259
 
260
+ #: mappress_settings.php:379
261
+ #: mappress_settings.php:410
262
  #: templates/map.php:64
263
  msgid "Get help"
264
  msgstr ""
265
 
266
+ #: mappress_settings.php:382
267
+ #: mappress_settings.php:413
268
  msgid "Your account"
269
  msgstr ""
270
 
271
+ #: mappress_settings.php:384
272
+ #: mappress_settings.php:415
273
  msgid "Upgrade to MapPress Pro"
274
  msgstr ""
275
 
languages/texts.php CHANGED
@@ -10,8 +10,8 @@ __("MapPress database tables are missing. Please deactivate the plugin and acti
10
  __("A Google Maps API key is required");
11
  __("Please update your");
12
  __("MapPress Settings");
13
- __("renew your license");
14
- __("Your MapPress license has expired. Please %s to get the latest updates and prevent errors.");
15
  __("Please enter your MapPress license key to enable plugin updates");
16
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
17
  __("MapPress has many new features! %s.");
@@ -22,7 +22,6 @@ __("Are you sure you want to delete?");
22
  __("Permanently delete this map from the map library?");
23
  __("Error reading KML file");
24
  __("URL for KML file");
25
- __("Loading");
26
  __("Please select an editor to insert into.");
27
  __("Unable to get your location");
28
  __("No results");
@@ -45,9 +44,6 @@ __("Map not found");
45
  __("Post not found");
46
  __("Default");
47
  __("Maps for WordPress");
48
- __("Active");
49
- __("Communication error, please try again later: %s");
50
- __("License is invalid or expired");
51
  __("Address line ");
52
  __("Latitude");
53
  __("Longitude");
10
  __("A Google Maps API key is required");
11
  __("Please update your");
12
  __("MapPress Settings");
13
+ __("Renew your license");
14
+ __("Your MapPress license has expired. %s to get the latest updates and prevent errors.");
15
  __("Please enter your MapPress license key to enable plugin updates");
16
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
17
  __("MapPress has many new features! %s.");
22
  __("Permanently delete this map from the map library?");
23
  __("Error reading KML file");
24
  __("URL for KML file");
 
25
  __("Please select an editor to insert into.");
26
  __("Unable to get your location");
27
  __("No results");
44
  __("Post not found");
45
  __("Default");
46
  __("Maps for WordPress");
 
 
 
47
  __("Address line ");
48
  __("Latitude");
49
  __("Longitude");
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.69.6
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
@@ -36,7 +36,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
36
  }
37
 
38
  class Mappress {
39
- const VERSION = '2.69.6';
40
 
41
  static
42
  $baseurl,
@@ -230,17 +230,22 @@ class Mappress {
230
  }
231
  }
232
 
 
 
 
 
 
 
 
233
  static function admin_notices_dismiss($key, $dismiss) {
234
  if (!$key)
235
  return;
236
 
237
  $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
238
-
239
  if ($dismiss)
240
  $dismissed[] = $key;
241
  else
242
  unset($dismissed[$key]);
243
-
244
  update_user_meta( get_current_user_id(), 'mappress_dismissed', implode( ',', $dismissed ));
245
  }
246
 
@@ -512,10 +517,10 @@ class Mappress {
512
  $last_check = get_option('mappress_license_check');
513
  if (!$last_check || time() > $last_check + (60 * 60 * 24 * 7)) {
514
  $status = Mappress::$updater->get_status();
515
- if ($status != 'active') {
516
- self::admin_notices_dismiss('license_expired', false);
517
- $renew_link = sprintf("<a target='_blank' href='http://mappresspro.com/account'>%s</a>", __('renew your license', 'mappress-google-maps-for-wordpress'));
518
- self::$notices['expiredlicense'] = array('warning', sprintf(__('Your MapPress license has expired. Please %s to get the latest updates and prevent errors.', 'mappress-google-maps-for-wordpress'), $renew_link));
519
  }
520
  update_option('mappress_license_check', time());
521
  return;
@@ -606,7 +611,6 @@ class Mappress {
606
  'delete_map_prompt' => __('Permanently delete this map from the map library?', 'mappress-google-maps-for-wordpress'),
607
  'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
608
  'layer' => __('URL for KML file', 'mappress-google-maps-for-wordpress'),
609
- 'loading' => "<span class='mapp-spinner'></span>" . __('Loading', 'mappress-google-maps-for-wordpress'),
610
  'need_classic' => __('Please select an editor to insert into.', 'mappress-google-maps-for-wordpress'),
611
  'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
612
  'no_results' => __('No results', 'mappress-google-maps-for-wordpress'),
@@ -766,7 +770,7 @@ class Mappress {
766
  $deps[] = (self::$options->engine == 'leaflet') ? 'mappress-leaflet-markercluster' : 'mappress-markerclustererplus';
767
 
768
  wp_register_script('mappress', $js . "/index_mappress.js", $deps, self::$version, $footer);
769
- wp_register_script('mappress_admin', $js . "/index_mappress_admin.js", array('mappress', 'jquery-ui-position', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-url', 'wp-core-data', 'wp-i18n'), self::$version, $footer);
770
 
771
  // I18N
772
  if (function_exists('wp_set_script_translations')) {
@@ -1095,7 +1099,7 @@ class Mappress {
1095
  }
1096
 
1097
  static function wp_head() {
1098
- echo "\r\n<!-- MapPress Easy Google Maps " . __('Version', 'mappress-google-maps-for-wordpress') . ':' . self::$version . " (http://www.mappresspro.com/mappress) -->\r\n";
1099
  echo "<script type='text/javascript'>mapp = window.mapp || {}; mapp.data = [];</script>\r\n";
1100
  }
1101
  }
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.69.8
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
36
  }
37
 
38
  class Mappress {
39
+ const VERSION = '2.69.8';
40
 
41
  static
42
  $baseurl,
230
  }
231
  }
232
 
233
+ /**
234
+ * Dismiss/undismiss admin notices
235
+ *
236
+ * @param mixed $key - notice to dismiss/undismiss
237
+ * @param mixed $dismiss - true to dismiss, false to undismiss
238
+ * @return mixed
239
+ */
240
  static function admin_notices_dismiss($key, $dismiss) {
241
  if (!$key)
242
  return;
243
 
244
  $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
 
245
  if ($dismiss)
246
  $dismissed[] = $key;
247
  else
248
  unset($dismissed[$key]);
 
249
  update_user_meta( get_current_user_id(), 'mappress_dismissed', implode( ',', $dismissed ));
250
  }
251
 
517
  $last_check = get_option('mappress_license_check');
518
  if (!$last_check || time() > $last_check + (60 * 60 * 24 * 7)) {
519
  $status = Mappress::$updater->get_status();
520
+ if ($status == 'inactive') {
521
+ $renew_link = sprintf("<a target='_blank' href='http://mappresspro.com/account'>%s</a>", __('Renew your license', 'mappress-google-maps-for-wordpress'));
522
+ self::admin_notices_dismiss('expiredlicense', false);
523
+ self::$notices['expiredlicense'] = sprintf(__('Your MapPress license has expired. %s to get the latest updates and prevent errors.', 'mappress-google-maps-for-wordpress'), $renew_link);
524
  }
525
  update_option('mappress_license_check', time());
526
  return;
611
  'delete_map_prompt' => __('Permanently delete this map from the map library?', 'mappress-google-maps-for-wordpress'),
612
  'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
613
  'layer' => __('URL for KML file', 'mappress-google-maps-for-wordpress'),
 
614
  'need_classic' => __('Please select an editor to insert into.', 'mappress-google-maps-for-wordpress'),
615
  'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
616
  'no_results' => __('No results', 'mappress-google-maps-for-wordpress'),
770
  $deps[] = (self::$options->engine == 'leaflet') ? 'mappress-leaflet-markercluster' : 'mappress-markerclustererplus';
771
 
772
  wp_register_script('mappress', $js . "/index_mappress.js", $deps, self::$version, $footer);
773
+ 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);
774
 
775
  // I18N
776
  if (function_exists('wp_set_script_translations')) {
1099
  }
1100
 
1101
  static function wp_head() {
1102
+ echo "\r\n<!-- MapPress Easy Google Maps " . __('Version', 'mappress-google-maps-for-wordpress') . ':' . self::$version . " (http://www.mappresspro.com) -->\r\n";
1103
  echo "<script type='text/javascript'>mapp = window.mapp || {}; mapp.data = [];</script>\r\n";
1104
  }
1105
  }
mappress_obj.php CHANGED
@@ -11,6 +11,7 @@ class Mappress_Obj {
11
  $obj_atts = get_object_vars($this);
12
  $atts = (array) $atts;
13
 
 
14
  foreach ($obj_atts as $key => $value ) {
15
  $newvalue = (isset($atts[$key])) ? $atts[$key] : null;
16
 
11
  $obj_atts = get_object_vars($this);
12
  $atts = (array) $atts;
13
 
14
+ // Only the object's attributes are updated
15
  foreach ($obj_atts as $key => $value ) {
16
  $newvalue = (isset($atts[$key])) ? $atts[$key] : null;
17
 
mappress_settings.php CHANGED
@@ -109,14 +109,13 @@ class Mappress_Settings {
109
  if (!current_user_can('manage_options'))
110
  Mappress::ajax_response('Not authorized');
111
 
112
- ob_start();
113
- $settings = (isset($_POST['license'])) ? (object) $_POST['license'] : null;
114
- if (!$settings)
115
  Mappress::ajax_response('Internal error, missing license!');
116
 
117
- // For now, this just clears the cache because the page must still be reloaded to show (or clear) admin notices
118
- $result = Mappress::$updater->clear_cache();
119
- Mappress::ajax_response('OK');
120
  }
121
 
122
  // Save one or more options
@@ -150,7 +149,7 @@ class Mappress_Settings {
150
  self::assoc($settings->autoicons['values'], true);
151
  self::assoc($settings->metaKeys, true);
152
 
153
- // If license changed, re-check it
154
  if ($settings->license && $settings->license != Mappress::$options->license)
155
  Mappress::$updater->clear_cache();
156
 
@@ -167,7 +166,6 @@ class Mappress_Settings {
167
  $settings->filters = array();
168
  }
169
 
170
-
171
  // Merge in old values so they're not lost, e.g. stylesMapbox and stylesGoogle
172
  $options = Mappress_Options::get();
173
  $options->update($settings);
@@ -202,9 +200,6 @@ class Mappress_Settings {
202
  self::assoc($state->metaKeys, false);
203
 
204
  // Setup helpers
205
- $languages = array('' => __('Default', 'mappress-google-maps-for-wordpress'), 'ab' => 'Abkhazian', 'aa' => 'Afar', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'bm' => 'Bambara', 'ba' => 'Bashkir', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali', 'bh' => 'Bihari languages', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan, Valencian', 'km' => 'Central Khmer', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'ny' => 'Chichewa, Chewa, Nyanja', 'zh' => 'Chinese', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree', 'hr' => 'Croatian', 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi, Dhivehi, Maldivian', 'nl' => 'Dutch, Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijian', 'fi' => 'Finnish', 'fr' => 'French', 'ff' => 'Fulah', 'gd' => 'Gaelic, Scottish Gaelic', 'gl' => 'Galician', 'lg' => 'Ganda', 'ka' => 'Georgian', 'de' => 'German', 'ki' => 'Gikuyu, Kikuyu', 'el' => 'Greek (Modern)', 'kl' => 'Greenlandic, Kalaallisut', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian, Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'io' => 'Ido', 'ig' => 'Igbo', 'id' => 'Indonesian', 'iu' => 'Inuktitut', 'ik' => 'Inupiaq', 'ga' => 'Irish', 'it' => 'Italian', 'ja' => 'Japanese', 'jv' => 'Javanese', 'kn' => 'Kannada', 'kr' => 'Kanuri', 'ks' => 'Kashmiri', 'kk' => 'Kazakh', 'rw' => 'Kinyarwanda', 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kwanyama, Kuanyama', 'ku' => 'Kurdish', 'ky' => 'Kyrgyz', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'lb' => 'Letzeburgesch, Luxembourgish', 'li' => 'Limburgish, Limburgan, Limburger', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lu' => 'Luba-Katanga', 'mk' => 'Macedonian', 'mg' => 'Malagasy', 'ms' => 'Malay', 'ml' => 'Malayalam', 'mt' => 'Maltese', 'gv' => 'Manx', 'mi' => 'Maori', 'mr' => 'Marathi', 'mh' => 'Marshallese', 'ro' => 'Moldovan, Moldavian, Romanian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo, Navaho', 'nd' => 'Northern Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'se' => 'Northern Sami', 'no' => 'Norwegian', 'nb' => 'Norwegian Bokmål', 'nn' => 'Norwegian Nynorsk', 'ii' => 'Nuosu, Sichuan Yi', 'oc' => 'Occitan (post 1500)', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian, Ossetic', 'pi' => 'Pali', 'pa' => 'Panjabi, Punjabi', 'ps' => 'Pashto, Pushto', 'fa' => 'Persian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'qu' => 'Quechua', 'rm' => 'Romansh', 'rn' => 'Rundi', 'ru' => 'Russian', 'sm' => 'Samoan', 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sc' => 'Sardinian', 'sr' => 'Serbian', 'sn' => 'Shona', 'sd' => 'Sindhi', 'si' => 'Sinhala, Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'nr' => 'South Ndebele', 'es' => 'Spanish, Castilian', 'su' => 'Sundanese', 'sw' => 'Swahili', 'ss' => 'Swati', 'sv' => 'Swedish', 'tl' => 'Tagalog', 'ty' => 'Tahitian', 'tg' => 'Tajik', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'ts' => 'Tsonga', 'tn' => 'Tswana', 'tr' => 'Turkish', 'tk' => 'Turkmen', 'tw' => 'Twi', 'ug' => 'Uighur, Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volap_k', 'wa' => 'Walloon', 'cy' => 'Welsh', 'fy' => 'Western Frisian', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang, Chuang', 'zu' => 'Zulu');
206
- $license_status = self::get_license_status();
207
-
208
  $helpers = (object) array(
209
  'demo_map' => self::demo_map(),
210
  'geocoding_errors' => self::geocoding_errors(),
@@ -213,9 +208,8 @@ class Mappress_Settings {
213
  'is_super_admin' => is_super_admin(),
214
  'is_main_site' => is_main_site(),
215
  'jetpack' => (class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' )),
216
- 'languages' => $languages,
217
- 'license_status' => $license_status->status,
218
- 'license_message' => $license_status->message,
219
  'meta_fields' => self::get_meta_fields(),
220
  'meta_keys' => self::get_meta_keys(),
221
  'post_types' => self::get_post_types(),
@@ -268,23 +262,6 @@ class Mappress_Settings {
268
  return $geocoding_errors;
269
  }
270
 
271
- static function get_license_status() {
272
- $license = (object) array('status' => null, 'message' => null);
273
-
274
- if (Mappress::$pro && Mappress::$options->license) {
275
- $license->status = Mappress::$updater->get_status();
276
- if ($license->status == 'active')
277
- $license->message = __('Active', 'mappress-google-maps-for-wordpress');
278
- else {
279
- if (is_wp_error($license->status))
280
- $license->message = sprintf(__('Communication error, please try again later: %s', 'mappress-google-maps-for-wordpress'), $license_status->get_error_message());
281
- else
282
- $license->message = __('License is invalid or expired', 'mappress-google-maps-for-wordpress');
283
- }
284
- }
285
- return $license;
286
- }
287
-
288
  static function get_meta_fields() {
289
  for ($i = 1; $i < 7; $i++)
290
  $fields['address' . $i] = __('Address line ', 'mappress-google-maps-for-wordpress') . ' ' . $i;
109
  if (!current_user_can('manage_options'))
110
  Mappress::ajax_response('Not authorized');
111
 
112
+ $license = (isset($_POST['license'])) ? (object) $_POST['license'] : null;
113
+ if (!$license)
 
114
  Mappress::ajax_response('Internal error, missing license!');
115
 
116
+ ob_start();
117
+ $status = Mappress::$updater->check($license);
118
+ Mappress::ajax_response('OK', $status);
119
  }
120
 
121
  // Save one or more options
149
  self::assoc($settings->autoicons['values'], true);
150
  self::assoc($settings->metaKeys, true);
151
 
152
+ // If license changed, clear cache so it re-checks on next load
153
  if ($settings->license && $settings->license != Mappress::$options->license)
154
  Mappress::$updater->clear_cache();
155
 
166
  $settings->filters = array();
167
  }
168
 
 
169
  // Merge in old values so they're not lost, e.g. stylesMapbox and stylesGoogle
170
  $options = Mappress_Options::get();
171
  $options->update($settings);
200
  self::assoc($state->metaKeys, false);
201
 
202
  // Setup helpers
 
 
 
203
  $helpers = (object) array(
204
  'demo_map' => self::demo_map(),
205
  'geocoding_errors' => self::geocoding_errors(),
208
  'is_super_admin' => is_super_admin(),
209
  'is_main_site' => is_main_site(),
210
  'jetpack' => (class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' )),
211
+ 'languages' => array('' => __('Default', 'mappress-google-maps-for-wordpress'), 'ab' => 'Abkhazian', 'aa' => 'Afar', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'bm' => 'Bambara', 'ba' => 'Bashkir', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali', 'bh' => 'Bihari languages', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan, Valencian', 'km' => 'Central Khmer', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'ny' => 'Chichewa, Chewa, Nyanja', 'zh' => 'Chinese', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree', 'hr' => 'Croatian', 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi, Dhivehi, Maldivian', 'nl' => 'Dutch, Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijian', 'fi' => 'Finnish', 'fr' => 'French', 'ff' => 'Fulah', 'gd' => 'Gaelic, Scottish Gaelic', 'gl' => 'Galician', 'lg' => 'Ganda', 'ka' => 'Georgian', 'de' => 'German', 'ki' => 'Gikuyu, Kikuyu', 'el' => 'Greek (Modern)', 'kl' => 'Greenlandic, Kalaallisut', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian, Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'io' => 'Ido', 'ig' => 'Igbo', 'id' => 'Indonesian', 'iu' => 'Inuktitut', 'ik' => 'Inupiaq', 'ga' => 'Irish', 'it' => 'Italian', 'ja' => 'Japanese', 'jv' => 'Javanese', 'kn' => 'Kannada', 'kr' => 'Kanuri', 'ks' => 'Kashmiri', 'kk' => 'Kazakh', 'rw' => 'Kinyarwanda', 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kwanyama, Kuanyama', 'ku' => 'Kurdish', 'ky' => 'Kyrgyz', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'lb' => 'Letzeburgesch, Luxembourgish', 'li' => 'Limburgish, Limburgan, Limburger', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lu' => 'Luba-Katanga', 'mk' => 'Macedonian', 'mg' => 'Malagasy', 'ms' => 'Malay', 'ml' => 'Malayalam', 'mt' => 'Maltese', 'gv' => 'Manx', 'mi' => 'Maori', 'mr' => 'Marathi', 'mh' => 'Marshallese', 'ro' => 'Moldovan, Moldavian, Romanian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo, Navaho', 'nd' => 'Northern Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'se' => 'Northern Sami', 'no' => 'Norwegian', 'nb' => 'Norwegian Bokmål', 'nn' => 'Norwegian Nynorsk', 'ii' => 'Nuosu, Sichuan Yi', 'oc' => 'Occitan (post 1500)', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian, Ossetic', 'pi' => 'Pali', 'pa' => 'Panjabi, Punjabi', 'ps' => 'Pashto, Pushto', 'fa' => 'Persian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'qu' => 'Quechua', 'rm' => 'Romansh', 'rn' => 'Rundi', 'ru' => 'Russian', 'sm' => 'Samoan', 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sc' => 'Sardinian', 'sr' => 'Serbian', 'sn' => 'Shona', 'sd' => 'Sindhi', 'si' => 'Sinhala, Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'nr' => 'South Ndebele', 'es' => 'Spanish, Castilian', 'su' => 'Sundanese', 'sw' => 'Swahili', 'ss' => 'Swati', 'sv' => 'Swedish', 'tl' => 'Tagalog', 'ty' => 'Tahitian', 'tg' => 'Tajik', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'ts' => 'Tsonga', 'tn' => 'Tswana', 'tr' => 'Turkish', 'tk' => 'Turkmen', 'tw' => 'Twi', 'ug' => 'Uighur, Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volap_k', 'wa' => 'Walloon', 'cy' => 'Welsh', 'fy' => 'Western Frisian', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang, Chuang', 'zu' => 'Zulu'),
212
+ 'license_status' => (Mappress::$pro && Mappress::$options->license) ? Mappress::$updater->get_status() : null,
 
213
  'meta_fields' => self::get_meta_fields(),
214
  'meta_keys' => self::get_meta_keys(),
215
  'post_types' => self::get_post_types(),
262
  return $geocoding_errors;
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  static function get_meta_fields() {
266
  for ($i = 1; $i < 7; $i++)
267
  $fields['address' . $i] = __('Address line ', 'mappress-google-maps-for-wordpress') . ' ' . $i;
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.8
8
- Stable tag: 2.69.6
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interactive Google and Leaflet maps to WordPress.
@@ -89,6 +89,13 @@ Please see the plugin documentation pages:
89
 
90
  == Changelog ==
91
 
 
 
 
 
 
 
 
92
  = 2.69.6 =
93
  * Fixed: automatic icons not showing in filters dropdown
94
 
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.8
8
+ Stable tag: 2.69.8
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.69.8 =
93
+ * Added: improve license checking on settings screen
94
+
95
+ = 2.69.7 =
96
+ * Added: snackbar notifications instead of dialog boxes
97
+ * Added: new spinner
98
+
99
  = 2.69.6 =
100
  * Fixed: automatic icons not showing in filters dropdown
101
 
templates/map-directions.php CHANGED
@@ -12,7 +12,6 @@
12
 
13
  <div class='mapp-dir-toolbar'>
14
  <span class='mapp-button-submit' data-mapp-action='dir-get'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
15
- <span class='mapp-spinner'></span>
16
  </div>
17
  <div class='mapp-dir-renderer'></div>
18
  </div>
12
 
13
  <div class='mapp-dir-toolbar'>
14
  <span class='mapp-button-submit' data-mapp-action='dir-get'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
 
15
  </div>
16
  <div class='mapp-dir-renderer'></div>
17
  </div>
templates/map.php CHANGED
@@ -16,7 +16,7 @@
16
  <div class='mapp-geolocate-control' data-mapp-action='geolocate' title='<?php _e('Your Location', 'mappress-google-maps-for-wordpress');?>'></div>
17
  </div>
18
  <# } #>
19
- <div class='mapp-dialog'></div>
20
  </div>
21
  </div>
22
  <# print(mapp.lib.template('map-footer', { map : map })); #>
16
  <div class='mapp-geolocate-control' data-mapp-action='geolocate' title='<?php _e('Your Location', 'mappress-google-maps-for-wordpress');?>'></div>
17
  </div>
18
  <# } #>
19
+ <div class='mapp-spinner'></div>
20
  </div>
21
  </div>
22
  <# print(mapp.lib.template('map-footer', { map : map })); #>