function MarkerClusterer(n,t,i){var r,u;this.extend(MarkerClusterer,google.maps.OverlayView);this.map_=n;this.markers_=[];this.clusters_=[];this.markersCluster_={};this.markersUniqueID=1;this.sizes=[53,56,66,78,90];this.styles_=[];this.cssClass_="";this.cssDefaultClass_="cluster";this.setIndex_=0;this.ready_=!1;r=i||{};this.gridSize_=r.gridSize!==undefined?r.gridSize:60;this.minClusterSize_=r.minimumClusterSize||2;this.ignoreHiddenMarkers_=r.ignoreHiddenMarkers||!1;this.maxZoom_=r.maxZoom||null;this.styles_=r.styles||[];this.cssClass_=r.cssClass||null;this.imagePath_=r.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_;this.imageExtension_=r.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_;this.zoomOnClick_=!0;r.zoomOnClick!=undefined&&(this.zoomOnClick_=r.zoomOnClick);this.averageCenter_=!1;r.averageCenter!=undefined&&(this.averageCenter_=r.averageCenter);this.onMouseoverCluster_=r.onMouseoverCluster;this.onMouseoutCluster_=r.onMouseoutCluster;this.drawCluster_=r.drawCluster;this.hideCluster_=r.hideCluster;this.showCluster_=r.showCluster;this.onAddCluster_=r.onAddCluster;this.onRemoveCluster_=r.onRemoveCluster;this.setupStyles_();this.setMap(n);this.prevZoom_=this.map_.getZoom();u=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var n=u.map_.getZoom();u.prevZoom_!=n&&(u.prevZoom_=n,u.resetViewport())});google.maps.event.addListener(this.map_,"idle",function(){u.redraw()});t&&t.length&&this.addMarkers(t,!1)}function Cluster(n){this.markerClusterer_=n;this.map_=n.getMap();this.gridSize_=n.getGridSize();this.minClusterSize_=n.getMinClusterSize();this.averageCenter_=n.isAverageCenter();this.center_=null;this.markers_=[];this.bounds_=null;this.clusterIcon_=new ClusterIcon(this,n.getStyles(),n.getGridSize())}function ClusterIcon(n,t,i){n.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.styles_=t;this.padding_=i||0;this.cluster_=n;this.center_=null;this.map_=n.getMap();this.div_=null;this.sums_=null;this.visible_=!1;this.setMap(this.map_)}function defaultClusterOnAdd(n){var r,u,t,i;n.div_=document.createElement("DIV");n.visible_&&(r=n.getPosFromLatLng_(n.center_),n.div_.style.cssText=n.createCss(r),n.div_.innerHTML=n.sums_.text,n.addClass());u=n.getPanes();u.overlayMouseTarget.appendChild(n.div_);t=!1;i=!1;google.maps.event.addDomListener(n.div_,"click",function(i){t||n.triggerClusterClick(i)});google.maps.event.addDomListener(n.div_,"mousedown",function(){t=!1;i=!0});google.maps.event.addDomListener(n.div_,"mouseup",function(){t=!1;i=!1});google.maps.event.addDomListener(n.div_,"mousemove",function(){i&&(t=!0)});google.maps.event.addDomListener(n.div_,"mouseover",function(t){n.triggerClusterMouseover(t)});google.maps.event.addDomListener(n.div_,"mouseout",function(t){n.triggerClusterMouseout(t)})}function defaultClusterDraw(n){if(n.visible_){var t=n.getPosFromLatLng_(n.center_);n.div_.style.top=t.y+"px";n.div_.style.left=t.x+"px"}}function defaultClusterHide(n){n.div_&&(n.div_.style.display="none",n.div_.className="");n.visible_=!1}function defaultClusterShow(n){if(n.div_){var t=n.getPosFromLatLng_(n.center_);n.div_.style.cssText=n.createCss(t);n.div_.style.display="";n.addClass()}n.visible_=!0}function defaultClusterOnRemove(n){n.div_&&n.div_.parentNode&&(n.hide(),n.div_.parentNode.removeChild(n.div_),n.div_=null)}MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_="https://raw.githubusercontent.com/gmaps-marker-clusterer/gmaps-marker-clusterer/master/images/m";MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_="png";MarkerClusterer.prototype.extend=function(n,t){return function(n){for(var t in n.prototype)this.prototype[t]=n.prototype[t];return this}.apply(n,[t])};MarkerClusterer.prototype.onAdd=function(){this.setReady_(!0)};MarkerClusterer.prototype.draw=function(){};MarkerClusterer.prototype.setupStyles_=function(){var n,t,i;if(!this.styles_.length)for(n=0;t=this.sizes[n];n++)i="",i=typeof this.imagePath_=="function"?this.imagePath_(n,t):this.imagePath_+(n+1)+"."+this.imageExtension_,this.styles_.push({url:i,height:t,width:t})};MarkerClusterer.prototype.fitMapToMarkers=function(){for(var r=this.getMarkers(),n=new google.maps.LatLngBounds,t=0,i;i=r[t];t++)n.extend(i.getPosition());this.map_.fitBounds(n)};MarkerClusterer.prototype.setStyles=function(n){this.styles_=n};MarkerClusterer.prototype.getStyles=function(){return this.styles_};MarkerClusterer.prototype.isZoomOnClick=function(){return this.zoomOnClick_};MarkerClusterer.prototype.isAverageCenter=function(){return this.averageCenter_};MarkerClusterer.prototype.getMarkers=function(){return this.markers_};MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length};MarkerClusterer.prototype.setMaxZoom=function(n){this.maxZoom_=n};MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_};MarkerClusterer.prototype.getMarkersCluster=function(n){return this.clusters_[this.markersCluster_[n.uniqueID]]};MarkerClusterer.prototype.calculator_=function(n,t){for(var i=0,u=n.length,r=u;r!==0;)r=parseInt(r/10,10),i++;return i=Math.min(i,t),{text:u,index:i}};MarkerClusterer.prototype.setCalculator=function(n){this.calculator_=n};MarkerClusterer.prototype.getCalculator=function(){return this.calculator_};MarkerClusterer.prototype.addMarkers=function(n,t){for(var i=0,r;r=n[i];i++)this.pushMarkerTo_(r);t||this.redraw()};MarkerClusterer.prototype.pushMarkerTo_=function(n){if(n.isAdded=!1,n.draggable){var t=this;google.maps.event.addListener(n,"dragend",function(){n.isAdded=!1;t.repaint()})}n.uniqueID=this.markersUniqueID;this.markersUniqueID++;this.markers_.push(n)};MarkerClusterer.prototype.addMarker=function(n,t){this.pushMarkerTo_(n);t||this.redraw()};MarkerClusterer.prototype.removeMarker_=function(n){var t=-1,i,r;if(this.markers_.indexOf)t=this.markers_.indexOf(n);else for(i=0;r=this.markers_[i];i++)if(r==n){t=i;break}return t==-1?!1:(n.setMap(null),this.markers_.splice(t,1),delete this.markersCluster_[n.uniqueID],!0)};MarkerClusterer.prototype.removeMarker=function(n,t){var i=this.removeMarker_(n);return!t&&i?(this.resetViewport(),this.redraw(),!0):!1};MarkerClusterer.prototype.removeMarkers=function(n,t){for(var u,f,i=!1,r=n.length;r>=0;r--)u=n[r],f=this.removeMarker_(u),i=i||f;if(!t&&i)return this.resetViewport(),this.redraw(),!0};MarkerClusterer.prototype.setReady_=function(n){this.ready_||(this.ready_=n,this.createClusters_())};MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length};MarkerClusterer.prototype.getClusters=function(){return this.clusters_};MarkerClusterer.prototype.getMap=function(){return this.map_};MarkerClusterer.prototype.setMap=function(n){this.map_=n};MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_};MarkerClusterer.prototype.setGridSize=function(n){this.gridSize_=n};MarkerClusterer.prototype.getMinClusterSize=function(){return this.minClusterSize_};MarkerClusterer.prototype.setMinClusterSize=function(n){this.minClusterSize_=n};MarkerClusterer.prototype.getExtendedBounds=function(n){var t=this.getProjection(),e=new google.maps.LatLng(n.getNorthEast().lat(),n.getNorthEast().lng()),o=new google.maps.LatLng(n.getSouthWest().lat(),n.getSouthWest().lng()),r=t.fromLatLngToDivPixel(e),i,u,f;return r.x+=this.gridSize_,r.y-=this.gridSize_,i=t.fromLatLngToDivPixel(o),i.x-=this.gridSize_,i.y+=this.gridSize_,u=t.fromDivPixelToLatLng(r),f=t.fromDivPixelToLatLng(i),n.extend(u),n.extend(f),n};MarkerClusterer.prototype.isMarkerInBounds_=function(n,t){return t.contains(n.getPosition())};MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport(!0);this.markers_=[];this.markersCluster_={};this.markersUniqueID=1};MarkerClusterer.prototype.resetViewport=function(n){for(var r,i,t=0;r=this.clusters_[t];t++)r.remove();for(t=0;i=this.markers_[t];t++)i.isAdded=!1,n&&i.setMap(null);this.clusters_=[];this.markersCluster_={};this.markersUniqueID=1};MarkerClusterer.prototype.repaint=function(){var n=this.clusters_.slice();this.clusters_.length=0;this.resetViewport();this.redraw();window.setTimeout(function(){for(var t=0,i;i=n[t];t++)i.remove()},0)};MarkerClusterer.prototype.redraw=function(){this.createClusters_()};MarkerClusterer.prototype.distanceBetweenPoints_=function(n,t){if(!n||!t)return 0;var i=(t.lat()-n.lat())*Math.PI/180,r=(t.lng()-n.lng())*Math.PI/180,u=Math.sin(i/2)*Math.sin(i/2)+Math.cos(n.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(r/2)*Math.sin(r/2),f=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*f};MarkerClusterer.prototype.addToClosestCluster_=function(n){for(var f,e,t,o=4e4,i=null,s=n.getPosition(),r=null,u=0;t=this.clusters_[u];u++)f=t.getCenter(),f&&(e=this.distanceBetweenPoints_(f,n.getPosition()),e<o&&(o=e,i=t,r=u));i&&i.isMarkerInClusterBounds(n)?i.addMarker(n):(t=new Cluster(this),t.addMarker(n),this.clusters_.push(t),r=this.clusters_.length-1);n.isAdded&&(this.markersCluster_[n.uniqueID]=r)};MarkerClusterer.prototype.createClusters_=function(){var i,r,t,n;if(this.ready_)for(i=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),r=this.getExtendedBounds(i),t=0;n=this.markers_[t];t++)!n.isAdded&&this.isMarkerInBounds_(n,r)&&(!this.ignoreHiddenMarkers_||n.getVisible())&&this.addToClosestCluster_(n)};Cluster.prototype.isMarkerAlreadyAdded=function(n){if(this.markers_.indexOf)return this.markers_.indexOf(n)!=-1;for(var t=0,i;i=this.markers_[t];t++)if(i==n)return!0;return!1};Cluster.prototype.addMarker=function(n){var t,r;if(this.isMarkerAlreadyAdded(n))return!1;if(this.center_){if(this.averageCenter_){var i=this.markers_.length+1,u=(this.center_.lat()*(i-1)+n.getPosition().lat())/i,f=(this.center_.lng()*(i-1)+n.getPosition().lng())/i;this.center_=new google.maps.LatLng(u,f);this.calculateBounds_()}}else this.center_=n.getPosition(),this.calculateBounds_();if(n.isAdded=!0,this.markers_.push(n),t=this.markers_.length,t<this.minClusterSize_&&n.getMap()!=this.map_&&n.setMap(this.map_),t==this.minClusterSize_)for(r=0;r<t;r++)this.markers_[r].setMap(null);return t>=this.minClusterSize_&&n.setMap(null),this.updateIcon(),!0};Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_};Cluster.prototype.getBounds=function(){for(var n=new google.maps.LatLngBounds(this.center_,this.center_),r=this.getMarkers(),t=0,i;i=r[t];t++)n.extend(i.getPosition());return n};Cluster.prototype.remove=function(){this.clusterIcon_.remove();this.markers_.length=0;delete this.markers_};Cluster.prototype.getSize=function(){return this.markers_.length};Cluster.prototype.getMarkers=function(){return this.markers_};Cluster.prototype.getCenter=function(){return this.center_};Cluster.prototype.calculateBounds_=function(){var n=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(n)};Cluster.prototype.isMarkerInClusterBounds=function(n){return this.bounds_.contains(n.getPosition())};Cluster.prototype.getMap=function(){return this.map_};Cluster.prototype.updateIcon=function(){var f=this.map_.getZoom(),t=this.markerClusterer_.getMaxZoom(),n,i,r,u;if(t&&f>t){for(n=0;i=this.markers_[n];n++)i.setMap(this.map_);return}if(this.markers_.length<this.minClusterSize_){this.clusterIcon_.hide();return}r=this.markerClusterer_.getStyles().length;u=this.markerClusterer_.getCalculator()(this.markers_,r);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.setSums(u);this.clusterIcon_.show()};ClusterIcon.prototype.triggerClusterClick=function(n){var t=this.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"clusterclick",this.cluster_,n);t.isZoomOnClick()&&this.map_.fitBounds(this.cluster_.getBounds())};ClusterIcon.prototype.triggerClusterMouseover=function(n){var t=this.cluster_.getMarkerClusterer();if(google.maps.event.trigger(t,"clustermouseover",this.cluster_,n),typeof this.cluster_.markerClusterer_.onMouseoverCluster_=="function")this.cluster_.markerClusterer_.onMouseoverCluster_(this,n)};ClusterIcon.prototype.triggerClusterMouseout=function(n){var t=this.cluster_.getMarkerClusterer();if(google.maps.event.trigger(t,"clustermouseout",this.cluster_,n),typeof this.cluster_.markerClusterer_.onMouseoutCluster_=="function")this.cluster_.markerClusterer_.onMouseoutCluster_(this,n)};ClusterIcon.prototype.onAdd=function(){if(typeof this.cluster_.markerClusterer_.onAddCluster_=="function")this.cluster_.markerClusterer_.onAddCluster_(this);else defaultClusterOnAdd(this)};ClusterIcon.prototype.getPosFromLatLng_=function(n){var t=this.getProjection().fromLatLngToDivPixel(n);return typeof this.iconAnchor_=="object"&&this.iconAnchor_.length===2?(t.x-=this.iconAnchor_[0],t.y-=this.iconAnchor_[1]):(t.x-=parseInt(this.width_/2,10),t.y-=parseInt(this.height_/2,10)),t};ClusterIcon.prototype.draw=function(){typeof this.cluster_.markerClusterer_.drawCluster_=="function"?this.cluster_.markerClusterer_.drawCluster_(this):defaultClusterDraw(this)};ClusterIcon.prototype.hide=function(){typeof this.cluster_.markerClusterer_.hideCluster_=="function"?this.cluster_.markerClusterer_.hideCluster_(this):defaultClusterHide(this)};ClusterIcon.prototype.show=function(){typeof this.cluster_.markerClusterer_.showCluster_=="function"?this.cluster_.markerClusterer_.showCluster_(this):defaultClusterShow(this)};ClusterIcon.prototype.remove=function(){this.setMap(null)};ClusterIcon.prototype.onRemove=function(){if(typeof this.cluster_.markerClusterer_.onRemoveCluster_=="function")this.cluster_.markerClusterer_.onRemoveCluster_(this);else defaultClusterOnRemove(this)};ClusterIcon.prototype.setSums=function(n){this.sums_=n;this.text_=n.text;this.index_=n.index;this.div_&&(this.div_.innerHTML=n.text);this.useStyle()};ClusterIcon.prototype.useStyle=function(){var t=Math.max(0,this.sums_.index-1),n;t=Math.min(this.styles_.length-1,t);n=this.styles_[t];this.url_=n.url;this.height_=n.height;this.width_=n.width;this.textColor_=n.textColor;this.anchor_=n.anchor;this.textSize_=n.textSize;this.backgroundPosition_=n.backgroundPosition;this.iconAnchor_=n.iconAnchor;this.setIndex_=t};ClusterIcon.prototype.setCenter=function(n){this.center_=n};ClusterIcon.prototype.createCss=function(n){var t=[],f=this.cluster_.getMarkerClusterer(),i,r,u;return f.cssClass_?t.push("top:"+n.y+"px; left:"+n.x+"px;"):(t.push("background-image:url("+this.url_+");"),i=this.backgroundPosition_?this.backgroundPosition_:"0 0",t.push("background-position:"+i+";"),typeof this.anchor_=="object"?(typeof this.anchor_[0]=="number"&&this.anchor_[0]>0&&this.anchor_[0]<this.height_?t.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):typeof this.anchor_[0]=="number"&&this.anchor_[0]<0&&-this.anchor_[0]<this.height_?t.push("height:"+this.height_+"px; line-height:"+(this.height_+this.anchor_[0])+"px;"):t.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),typeof this.anchor_[1]=="number"&&this.anchor_[1]>0&&this.anchor_[1]<this.width_?t.push("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):t.push("width:"+this.width_+"px; text-align:center;")):t.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;"),r=this.textColor_?this.textColor_:"black",u=this.textSize_?this.textSize_:11,t.push("cursor:pointer; top:"+n.y+"px; left:"+n.x+"px; color:"+r+"; position:absolute; font-size:"+u+"px; font-family:Arial,sans-serif; font-weight:bold")),t.join("")};ClusterIcon.prototype.addClass=function(){var n=this.cluster_.getMarkerClusterer();this.div_.className=n.cssClass_?n.cssClass_+" "+n.cssDefaultClass_+this.setIndex_:n.cssDefaultClass_+this.setIndex_};window.MarkerClusterer=MarkerClusterer;MarkerClusterer.prototype.addMarker=MarkerClusterer.prototype.addMarker;MarkerClusterer.prototype.addMarkers=MarkerClusterer.prototype.addMarkers;MarkerClusterer.prototype.clearMarkers=MarkerClusterer.prototype.clearMarkers;MarkerClusterer.prototype.fitMapToMarkers=MarkerClusterer.prototype.fitMapToMarkers;MarkerClusterer.prototype.getCalculator=MarkerClusterer.prototype.getCalculator;MarkerClusterer.prototype.getGridSize=MarkerClusterer.prototype.getGridSize;MarkerClusterer.prototype.getExtendedBounds=MarkerClusterer.prototype.getExtendedBounds;MarkerClusterer.prototype.getMap=MarkerClusterer.prototype.getMap;MarkerClusterer.prototype.getMarkers=MarkerClusterer.prototype.getMarkers;MarkerClusterer.prototype.getMaxZoom=MarkerClusterer.prototype.getMaxZoom;MarkerClusterer.prototype.getMarkersCluster=MarkerClusterer.prototype.getMarkersCluster;MarkerClusterer.prototype.getStyles=MarkerClusterer.prototype.getStyles;MarkerClusterer.prototype.getTotalClusters=MarkerClusterer.prototype.getTotalClusters;MarkerClusterer.prototype.getTotalMarkers=MarkerClusterer.prototype.getTotalMarkers;MarkerClusterer.prototype.redraw=MarkerClusterer.prototype.redraw;MarkerClusterer.prototype.removeMarker=MarkerClusterer.prototype.removeMarker;MarkerClusterer.prototype.removeMarkers=MarkerClusterer.prototype.removeMarkers;MarkerClusterer.prototype.resetViewport=MarkerClusterer.prototype.resetViewport;MarkerClusterer.prototype.repaint=MarkerClusterer.prototype.repaint;MarkerClusterer.prototype.setCalculator=MarkerClusterer.prototype.setCalculator;MarkerClusterer.prototype.setGridSize=MarkerClusterer.prototype.setGridSize;MarkerClusterer.prototype.setMaxZoom=MarkerClusterer.prototype.setMaxZoom;MarkerClusterer.prototype.onAdd=MarkerClusterer.prototype.onAdd;MarkerClusterer.prototype.draw=MarkerClusterer.prototype.draw;Cluster.prototype.getCenter=Cluster.prototype.getCenter;Cluster.prototype.getSize=Cluster.prototype.getSize;Cluster.prototype.getMarkers=Cluster.prototype.getMarkers;ClusterIcon.prototype.onAdd=ClusterIcon.prototype.onAdd;ClusterIcon.prototype.draw=ClusterIcon.prototype.draw;ClusterIcon.prototype.onRemove=ClusterIcon.prototype.onRemove,function(n){function d(){var c,i,f;s?(c=[{featureType:"landscape",stylers:[{saturation:-100},{lightness:65},{visibility:"on"}]},{featureType:"poi",stylers:[{saturation:-100},{lightness:51},{visibility:"simplified"}]},{featureType:"road.highway",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"road.arterial",stylers:[{saturation:-100},{lightness:30},{visibility:"on"}]},{featureType:"road.local",stylers:[{saturation:-100},{lightness:40},{visibility:"on"}]},{featureType:"transit",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"administrative.province",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"on"},{lightness:-25},{saturation:-100}]},{featureType:"water",elementType:"geometry",stylers:[{hue:"#ffff00"},{lightness:-25},{saturation:-97}]}],t=new google.maps.Map(document.getElementById("wrec-map"),{center:{lat:34.397,lng:0},scrollwheel:!1,styles:c,zoom:3,mapTypeControl:!1,streetViewControl:!1,zoomControl:!1}),nt(),google.maps.event.addListener(t,"click",function(){if(typeof r=="object"&&r.close(),u){var n=u.isRecent?o:e;u.setIcon({url:n.url,scaledSize:new google.maps.Size(21,28)})}}),i=document.createElement("div"),i.iD="zoom-control-container",new ot(i,t),i.index=1,t.controls[google.maps.ControlPosition.LEFT_TOP].push(i)):h&&(t=new BMap.Map("wrec-map",{enableMapClick:!1}),t.disableScrollWheelZoom(),t.disableContinuousZoom(),t.disableKeyboard(),t.disable3DBuilding(),t.disableInertialDragging(),t.setMapStyle({styleJson:[{featureType:"all",elementType:"all",stylers:{lightness:10,saturation:-100}},{featureType:"water",elementType:"geometry",stylers:{color:"#a6a6a0",lightness:17}},{featureType:"land",elementType:"geometry",stylers:{color:"#f5f5f5",lightness:20}},{featureType:"highway",elementType:"geometry.fill",stylers:{color:"#ffffff",lightness:17}},{featureType:"highway",elementType:"geometry.stroke",stylers:{color:"#cccccc",weight:"1",lightness:1}},{featureType:"arterial",elementType:"geometry",stylers:{color:"#ffffff",lightness:18}},{featureType:"arterial",elementType:"geometry.stroke",stylers:{color:"#cccccc",lightness:0,weight:1}},{featureType:"local",elementType:"geometry",stylers:{color:"#ffffff",lightness:16}},{featureType:"local",elementType:"geometry.stroke",stylers:{color:"#cccccc",lightness:0,weight:1}},{featureType:"poi",elementType:"geometry",stylers:{color:"#f5f5f5",lightness:21}},{featureType:"green",elementType:"geometry",stylers:{color:"#dedede",lightness:21}},{featureType:"manmade",elementType:"geometry",stylers:{color:"#f5f5f5",lightness:18}},{featureType:"administrative",elementType:"geometry.fill",stylers:{color:"#fefefe",lightness:20}},{featureType:"administrative",elementType:"geometry.stroke",stylers:{color:"#fefefe",lightness:17}},{featureType:"label",elementType:"geometry.stroke",stylers:{color:"#333333",lightness:40}},{featureType:"all",elementType:"labels.icon",stylers:{visibility:"off"}}]}),tt(),t.centerAndZoom(new BMap.Point(34.397,0),3),f=n("#Bzoom_control").show(),f.find("#Bzoom-c-plus").click(function(){t.setZoom(t.getZoom()+1)}),f.find("#Bzoom-c-minus").click(function(){t.setZoom(t.getZoom()-1)}))}function g(t,f,s,h){google.maps.event.addListener(t,"mouseout",function(){if(t!=u){var n=t.isRecent?o:e;t.setIcon({url:n.url,scaledSize:new google.maps.Size(21,28)})}});google.maps.event.addListener(t,"mouseover",function(){var n=t.isRecent?o:e;t.setIcon({url:n.url,scaledSize:new google.maps.Size(28,37)})});google.maps.event.addListener(t,"click",function(){var c,l;for(typeof r=="object"&&r.close(),r=new InfoBox(s),r.setContent(h),r.open(f,this),r.addListener("domready",function(){n(".infoBox .getQuote-modal").click(function(t){var i=t.target;n(window).one("shown.bs.modal",function(n,t){t=i;n.relatedTarget=t});n("#getPrices-modal").modal({keyboard:!0})})}),c=0;c<i.length;c++)l=i[c].isRecent?o:e,i[c].setIcon({url:l.url,scaledSize:new google.maps.Size(21,28)});t.setIcon({url:"/Images/city-v2/icon-marker-active-2.svg",scaledSize:new google.maps.Size(28,37)});u=t})}function nt(){e={url:"/Images/design-rebrand/marker-open-soon-location.png"};o={url:"/Images/city-v2/icon-marker-active-2.svg",scaledSize:new google.maps.Size(21,28)}}function tt(){window.innerWidth>767?(pin=new BMap.Icon("/Images/design-rebrand/marker-open-soon-location.png",new BMap.Size(22,32)),activePin=new BMap.Icon("/Images/design-rebrand/marker-open-soon-location-large.png",new BMap.Size(28,37)),l=new BMap.Icon(v,new BMap.Size(21,28)),a=new BMap.Icon(y,new BMap.Size(28,37)),iconActivePin=new BMap.Icon(k,new BMap.Size(28,37))):(pin=new BMap.Icon("/Images/design-rebrand/marker-open-soon-location.png",new BMap.Size(22,32)),activePin=new BMap.Icon("/Images/design-rebrand/marker-open-soon-location-large.png",new BMap.Size(28,37)),l=new BMap.Icon(v,new BMap.Size(17,20)),a=new BMap.Icon(y,new BMap.Size(17,20)))}function it(r,f,e){var s=BMap.Convertor.localConvert(r.latitude,r.longitude),h=new BMap.Point(s.lng,s.lat),o=new BMap.Marker(h,{icon:e?l:pin,enableMassClear:!1});return o.isRecent=e,o.addEventListener("mouseout",function(){this!=u&&this.setIcon(this.isRecent?l:pin)}),o.addEventListener("mouseover",function(){this.setIcon(this.isRecent?a:activePin)}),o.addEventListener("click",function(){var o=p(f,!0,e),r;for(c.setContent(o),t.openInfoWindow(c,this.point),n(".js-map-info-box--china .getQuote-modal").click(function(){n("#getQuote").modal("show",this)}),r=0;r<i.length;r++)i[r].setIcon(i[r].isRecent?l:pin);return window.innerWidth>767?this.setIcon(this.isRecent?a:iconActivePin):this.setIcon(this.isRecent?a:activePin),u=this,!0}),function(){}(e),o}function p(t,i,r){var f=n(".centr-urltext").val(),u;return u=i?'<div class="map-info-box map-info-box--china js-map-info-box--china">':'<div class="map-info-box">',r?(t.Image&&(u+='<div class="map-info-box__media"><img src="'+t.Image+'" alt="'+t.Centre+'" onerror="'+b+'"><\/div>'),u+='<div class="map-info-box__content">',u+='<h4 class="map-info-box__title">'+t.City+"<\/h4>",u+='<p class="map-info-box__text">'+t.Centre+"<\/p>",u+='<div class="map-info-box__footer">',u+='<div class="nwp-buttons--space-between">',u+=t.EnquiryButton,u+='<a class="nwp-button" href="'+t.Url+'">'+f+"<\/a>",u+="<\/div><\/div><\/div>"):(u+='<div class="map-info-box__content">',u+='<h4 class="map-info-box__title">'+t.City+"<\/h4>",u+='<p class="map-info-box__text">'+t.Centre+"<\/p>",u+='<p class="map-info-box__text">'+t.OpenDate+"<\/p>",u+="<\/div>"),u+"<\/div>"}function rt(n,r,u){var a="/Images/city-v2/icon-marker-cluster-active-2.svg",y,l;if(f&&f.clearMarkers(),s){function v(n,r){var s,u,f,h;n.Lat&&n.Lng&&(s=new google.maps.LatLng(n.Lat,n.Lng),u=new google.maps.Marker({map:t,position:s}),u.isRecent=r,u.setIcon(r?o:e),f=p(n,!1,r),h={content:f,enableEventPropagation:!1,alignBottom:!0,pixelOffset:new google.maps.Size(window.innerWidth>767?-160:-125,-50),closeBoxURL:"",disableAutoPan:!1,infoBoxClearance:new google.maps.Size(100,100)},g(u,t,h,f),i.push(u))}if(r)for(l=0;l<n.RecentlyOpened.length;l++)v(n.RecentlyOpened[l],!0);if(u)for(l=0;l<n.ComingSoon.length;l++)v(n.ComingSoon[l],!1);f=new MarkerClusterer(t,i,{styles:[{url:a,height:42,width:33,anchor:[0,0],textColor:"#ffffff",textSize:13}]})}else if(h){y={offset:{width:-15,height:25},enableMassClear:!0};c=new BMap.InfoWindow("",y);function w(n,t){if(n.Lat&&n.Lng){var r=it({latitude:n.Lat,longitude:n.Lng},n,t);i.push(r)}}if(r)for(l=0;l<n.RecentlyOpened.length;l++)w(n.RecentlyOpened[l],!0);if(u)for(l=0;l<n.ComingSoon.length;l++)w(n.ComingSoon[l],!1);f=new BMapLib.MarkerClusterer(t,{markers:i,styles:[{url:a,size:new BMap.Size(33,42),opt_anchor:[0,0],textColor:"#ffffff",opt_textSize:13}]})}}function ut(){var r=n.Deferred(),t;if(i.length){for(t=0;t<i.length;t++)s?i[t].setMap(null):h&&i[t].remove();f&&f.clearMarkers();i=[]}return r.resolve(),r.promise()}function ft(){s?typeof r=="object"&&r.close():h&&typeof c=="object"&&c.close()}function et(){var t=n.Deferred(),i=n(".js-recently-opened-list").map(function(t,i){var r=n("[data-lng]",i),u=r.data("image-url");return{Lat:r.data("lat"),Lng:r.data("lng"),City:n(".js-coming-soon-list--city",i).text(),Centre:n(".js-coming-soon-list--centre",i).text(),Image:u||"",Url:r.attr("href"),EnquiryButton:n(".js-recently-opened-enquiry",i).html()}}),r=n(".js-coming-soon-list").map(function(t,i){var r=n("[data-lng]",i);return{Lat:r.data("lat"),Lng:r.data("lng"),City:n(".js-coming-soon-list--city",i).text(),Centre:n(".js-coming-soon-list--centre",i).text(),OpenDate:r.data("opendate")}});return t.resolve({RecentlyOpened:i,ComingSoon:r}),t.promise()}function w(n,t){ut();ft();et().then(function(i){rt(i,n,t)})}function ot(n,t){var i,r,u;n.style.padding="25px";i=document.createElement("div");i.style.backgroundColor="black";i.style.borderStyle="solid";i.style.borderColor="black";i.style.borderWidth="0px";i.style.cursor="pointer";i.style.textAlign="center";i.style.width="30px";i.style.height="55px";n.appendChild(i);r=document.createElement("div");r.style.width="30px";r.style.height="30px";r.style.backgroundImage='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUJBM0M4QzhDRTk5MTFFNjlCRTFGQ0M2NzkyMDFCMzUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUJBM0M4QzlDRTk5MTFFNjlCRTFGQ0M2NzkyMDFCMzUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1QkEzQzhDNkNFOTkxMUU2OUJFMUZDQzY3OTIwMUIzNSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1QkEzQzhDN0NFOTkxMUU2OUJFMUZDQzY3OTIwMUIzNSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv9cYrwAAACjSURBVHjaYrSxsWGgDWBioBkYNXpYGM1CvNLKykolJSUgY86cOSdPnqSm0UBzNTQ0gAw+Pr6RGdYiIiKGhoZwLhcXF4QBCRYI+PTpE65wx2c00Ny6ujpM8bCwMDj7xo0buIwemmHNSHyhOnv2bEgoNzU17d69e7QMoWEZcuzYsUuXLgEZDx8+pHI0jlYFo0aPGo0rN5qampJq0OnTp9FEAAIMAMe+KF2PIUKrAAAAAElFTkSuQmCC")';i.appendChild(r);u=document.createElement("div");u.style.width="30px";u.style.height="25px";u.style.backgroundImage='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAZCAIAAACpVwlNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUI5MkMxODJDRTk5MTFFNjkxQjZFMDNCQkNFMUI0OUEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUI5MkMxODNDRTk5MTFFNjkxQjZFMDNCQkNFMUI0OUEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjkyQzE4MENFOTkxMUU2OTFCNkUwM0JCQ0UxQjQ5QSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjkyQzE4MUNFOTkxMUU2OTFCNkUwM0JCQ0UxQjQ5QSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pm9Jq/QAAAA8SURBVHjaYrSxsWGgDWBioBkYNXrU6OFoNAsuicOHDxNviq2t7bAPkKamJgqNZhwt+UaNHjV6+BsNEGAA3ZkGI4HaMksAAAAASUVORK5CYII=")';i.appendChild(u);google.maps.event.addDomListener(r,"click",function(){t.setZoom(t.getZoom()+1)});google.maps.event.addDomListener(u,"click",function(){t.setZoom(t.getZoom()-1)})}var b="this.onerror=null;this.src = '/images/gable.jpg';",t,i=[],f=null,r,u,s,h,c,v="/Images/city-v2/icon-marker-active-2-medium.svg",l="/Images/city-v2/icon-marker-active-2-medium-recent.svg",a="/Images/city-v2/icon-marker-active-2-recent.svg",y="/Images/city-v2/icon-marker-active-2.svg",k="/Images/city-v2/icon-marker-active-2.svg",e,o;n(function(){s=n(".google_autocomplete_enabled").length>0;h=n("body[data-countryname='China']").length>0;d();w(!0,!0);n(".js-toggler button").click(function(){var t=n(this),i,r;n(".js-toggler button").removeClass("active");t.addClass("active");i=t.hasClass("js-all")||t.hasClass("js-recently-opened");r=t.hasClass("js-all")||t.hasClass("js-coming-soon");w(i,r)})})}(jQuery)