function ClusterIcon(a,b){a.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.cluster_=a;this.styles_=b;this.sums_=this.div_=this.center_=null;this.visible_=false;this.setMap(a.getMap())}
ClusterIcon.prototype.onAdd=function(){var a=this;this.div_=document.createElement("div");this.visible_&&this.show();this.getPanes().overlayMouseTarget.appendChild(this.div_);google.maps.event.addDomListener(this.div_,"click",function(b){var c,d=a.cluster_.getMarkerClusterer();google.maps.event.trigger(d,"click",a.cluster_);google.maps.event.trigger(d,"clusterclick",a.cluster_);if(d.getZoomOnClick()){c=d.getMaxZoom();d.getMap().fitBounds(a.cluster_.getBounds());c!==null&&d.getMap().getZoom()>c&&d.getMap().setZoom(c+
1)}b.cancelBubble=true;b.stopPropagation&&b.stopPropagation()});google.maps.event.addDomListener(this.div_,"mouseover",function(){var b=a.cluster_.getMarkerClusterer();google.maps.event.trigger(b,"mouseover",a.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var b=a.cluster_.getMarkerClusterer();google.maps.event.trigger(b,"mouseout",a.cluster_)})};
ClusterIcon.prototype.onRemove=function(){if(this.div_&&this.div_.parentNode){this.hide();google.maps.event.clearInstanceListeners(this.div_);this.div_.parentNode.removeChild(this.div_);this.div_=null}};ClusterIcon.prototype.draw=function(){if(this.visible_){var a=this.getPosFromLatLng_(this.center_);this.div_.style.top=a.y+"px";this.div_.style.left=a.x+"px"}};ClusterIcon.prototype.hide=function(){if(this.div_)this.div_.style.display="none";this.visible_=false};
ClusterIcon.prototype.show=function(){if(this.div_){this.div_.style.cssText=this.createCss(this.getPosFromLatLng_(this.center_));this.div_.innerHTML=this.cluster_.printable_?"
"+this.sums_.text+"
":this.sums_.text;this.div_.title=this.cluster_.getMarkerClusterer().getTitle();this.div_.style.display=""}this.visible_=true};
ClusterIcon.prototype.useStyle=function(a){this.sums_=a;a=Math.max(0,a.index-1);a=Math.min(this.styles_.length-1,a);a=this.styles_[a];this.url_=a.url;this.height_=a.height;this.width_=a.width;this.anchor_=a.anchor;this.anchorIcon_=a.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=a.textColor||"black";this.textSize_=a.textSize||11;this.textDecoration_=a.textDecoration||"none";this.fontWeight_=a.fontWeight||"bold";this.fontStyle_=a.fontStyle||"normal";this.fontFamily_=
a.fontFamily||"Arial,sans-serif";this.backgroundPosition_=a.backgroundPosition||"0 0"};ClusterIcon.prototype.setCenter=function(a){this.center_=a};
ClusterIcon.prototype.createCss=function(a){var b=[];b.push("border-radius:"+this.width_/2+"px;");b.push("border:1px solid black;");b.push("background:#FE0;");if(typeof this.anchor_==="object"){typeof this.anchor_[0]==="number"&&this.anchor_[0]>0&&this.anchor_[0]0&&this.anchor_[1]<
this.width_?b.push("width:"+(this.width_-2-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):b.push("width:"+(this.width_-2)+"px; text-align:center;")}else b.push("height:"+this.height_+"px; line-height:"+(this.height_-2)+"px; width:"+this.width_+"px; text-align:center;");b.push("cursor:pointer; top:"+a.y+"px; left:"+a.x+"px; color:"+this.textColor_+"; position:absolute; font-size:"+this.textSize_+"px; font-family:"+this.fontFamily_+"; font-weight:"+this.fontWeight_+"; font-style:"+this.fontStyle_+
"; text-decoration:"+this.textDecoration_+";");return b.join("")};ClusterIcon.prototype.getPosFromLatLng_=function(a){a=this.getProjection().fromLatLngToDivPixel(a);a.x-=this.anchorIcon_[1];a.y-=this.anchorIcon_[0];return a};
function Cluster(a){this.markerClusterer_=a;this.map_=a.getMap();this.gridSize_=a.getGridSize();this.minClusterSize_=a.getMinimumClusterSize();this.averageCenter_=a.getAverageCenter();this.printable_=a.getPrintable();this.markers_=[];this.bounds_=this.center_=null;this.clusterIcon_=new ClusterIcon(this,a.getStyles())}Cluster.prototype.getSize=function(){return this.markers_.length};Cluster.prototype.getMarkers=function(){return this.markers_};Cluster.prototype.getCenter=function(){return this.center_};
Cluster.prototype.getMap=function(){return this.map_};Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_};Cluster.prototype.getBounds=function(){var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers();for(a=0;a
c)a.getMap()!==this.map_&&a.setMap(this.map_);else if(bb)this.clusterIcon_.hide();else if(a0))for(a=0;a