function ClusterIcon(n,t){n.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.cluster_=n;this.className_=n.getMarkerClusterer().getClusterClass();this.styles_=t;this.center_=null;this.div_=null;this.sums_=null;this.visible_=!1;this.setMap(n.getMap())}function Cluster(n){this.markerClusterer_=n;this.map_=n.getMap();this.gridSize_=n.getGridSize();this.minClusterSize_=n.getMinimumClusterSize();this.averageCenter_=n.getAverageCenter();this.markers_=[];this.center_=null;this.bounds_=null;this.clusterIcon_=new ClusterIcon(this,n.getStyles())}function MarkerClusterer(n,t,i){this.extend(MarkerClusterer,google.maps.OverlayView);t=t||[];i=i||{};this.markers_=[];this.clusters_=[];this.listeners_=[];this.activeMap_=null;this.ready_=!1;this.gridSize_=i.gridSize||60;this.minClusterSize_=i.minimumClusterSize||2;this.maxZoom_=i.maxZoom||null;this.styles_=i.styles||[];this.title_=i.title||"";this.zoomOnClick_=!0;i.zoomOnClick!==undefined&&(this.zoomOnClick_=i.zoomOnClick);this.averageCenter_=!1;i.averageCenter!==undefined&&(this.averageCenter_=i.averageCenter);this.ignoreHidden_=!1;i.ignoreHidden!==undefined&&(this.ignoreHidden_=i.ignoreHidden);this.enableRetinaIcons_=!1;i.enableRetinaIcons!==undefined&&(this.enableRetinaIcons_=i.enableRetinaIcons);this.imagePath_=i.imagePath||MarkerClusterer.IMAGE_PATH;this.imageExtension_=i.imageExtension||MarkerClusterer.IMAGE_EXTENSION;this.imageSizes_=i.imageSizes||MarkerClusterer.IMAGE_SIZES;this.calculator_=i.calculator||MarkerClusterer.CALCULATOR;this.batchSize_=i.batchSize||MarkerClusterer.BATCH_SIZE;this.batchSizeIE_=i.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE;this.clusterClass_=i.clusterClass||"cluster";navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize_=this.batchSizeIE_);this.setupStyles_();this.addMarkers(t,!0);this.setMap(n)}ClusterIcon.prototype.onAdd=function(){var n=this,i,r,t=google.maps.version.split(".");t=parseInt(t[0]*100,10)+parseInt(t[1],10);this.div_=document.createElement("div");this.div_.className=this.className_;this.visible_&&this.show();this.getPanes().overlayMouseTarget.appendChild(this.div_);this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){r=i});google.maps.event.addDomListener(this.div_,"mousedown",function(){i=!0;r=!1});t>=332&&google.maps.event.addDomListener(this.div_,"touchstart",function(n){n.stopPropagation()});google.maps.event.addDomListener(this.div_,"click",function(t){if(i=!1,!r){var e,f,u=n.cluster_.getMarkerClusterer();google.maps.event.trigger(u,"click",n.cluster_);google.maps.event.trigger(u,"clusterclick",n.cluster_);u.getZoomOnClick()&&(f=u.getMaxZoom(),e=n.cluster_.getBounds(),u.getMap().fitBounds(e),setTimeout(function(){u.getMap().fitBounds(e);f!==null&&u.getMap().getZoom()>f&&u.getMap().setZoom(f+1)},100));t.cancelBubble=!0;t.stopPropagation&&t.stopPropagation()}});google.maps.event.addDomListener(this.div_,"mouseover",function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseover",n.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseout",n.cluster_)})};ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)};ClusterIcon.prototype.draw=function(){if(this.visible_){var n=this.getPosFromLatLng_(this.center_);this.div_.style.top=n.y+"px";this.div_.style.left=n.x+"px";this.div_.style.zIndex=google.maps.Marker.MAX_ZINDEX+1}};ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none");this.visible_=!1};ClusterIcon.prototype.show=function(){if(this.div_){var n="",r=this.backgroundPosition_.split(" "),t=parseInt(r[0].replace(/^\s+|\s+$/g,""),10),i=parseInt(r[1].replace(/^\s+|\s+$/g,""),10),u=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(u);n="<img src='"+this.url_+"' style='position: absolute; top: "+i+"px; left: "+t+"px; ";n+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px; height: "+this.height_+"px;":"clip: rect("+-1*i+"px, "+(-1*t+this.width_)+"px, "+(-1*i+this.height_)+"px, "+-1*t+"px);";n+="'>";this.div_.innerHTML=n+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"<\/div>";this.div_.title=typeof this.sums_.title=="undefined"||this.sums_.title===""?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title;this.div_.style.display=""}this.visible_=!0};ClusterIcon.prototype.useStyle=function(n){var i,t;this.sums_=n;i=Math.max(0,n.index-1);i=Math.min(this.styles_.length-1,i);t=this.styles_[i];this.url_=t.url;this.height_=t.height;this.width_=t.width;this.anchorText_=t.anchorText||[0,0];this.anchorIcon_=t.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=t.textColor||"black";this.textSize_=t.textSize||11;this.textDecoration_=t.textDecoration||"none";this.fontWeight_=t.fontWeight||"bold";this.fontStyle_=t.fontStyle||"normal";this.fontFamily_=t.fontFamily||"Arial,sans-serif";this.backgroundPosition_=t.backgroundPosition||"0 0"};ClusterIcon.prototype.setCenter=function(n){this.center_=n};ClusterIcon.prototype.createCss=function(n){var t=[];return t.push("cursor: pointer;"),t.push("position: absolute; top: "+n.y+"px; left: "+n.x+"px;"),t.push("width: "+this.width_+"px; height: "+this.height_+"px;"),t.push("-webkit-user-select: none;"),t.push("-khtml-user-select: none;"),t.push("-moz-user-select: none;"),t.push("-o-user-select: none;"),t.push("user-select: none;"),t.join("")};ClusterIcon.prototype.getPosFromLatLng_=function(n){var t=this.getProjection().fromLatLngToDivPixel(n);return t.x-=this.anchorIcon_[1],t.y-=this.anchorIcon_[0],t.x=parseInt(t.x,10),t.y=parseInt(t.y,10),t};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(){for(var t=new google.maps.LatLngBounds(this.center_,this.center_),i=this.getMarkers(),n=0;n<i.length;n++)t.extend(i[n].getPosition());return t};Cluster.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=[];delete this.markers_};Cluster.prototype.addMarker=function(n){var t,i,u;if(this.isMarkerAlreadyAdded_(n))return!1;if(this.center_){if(this.averageCenter_){var r=this.markers_.length+1,f=(this.center_.lat()*(r-1)+n.getPosition().lat())/r,e=(this.center_.lng()*(r-1)+n.getPosition().lng())/r;this.center_=new google.maps.LatLng(f,e);this.calculateBounds_()}}else this.center_=n.getPosition(),this.calculateBounds_();if(n.isAdded=!0,this.markers_.push(n),i=this.markers_.length,u=this.markerClusterer_.getMaxZoom(),u!==null&&this.map_.getZoom()>u)n.getMap()!==this.map_&&n.setMap(this.map_);else if(i<this.minClusterSize_)n.getMap()!==this.map_&&n.setMap(this.map_);else if(i===this.minClusterSize_)for(t=0;t<i;t++)this.markers_[t].setMap(null);else n.setMap(null);return this.updateIcon_(),!0};Cluster.prototype.isMarkerInClusterBounds=function(n){return this.bounds_.contains(n.getPosition())};Cluster.prototype.calculateBounds_=function(){var n=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(n)};Cluster.prototype.updateIcon_=function(){var r=this.markers_.length,n=this.markerClusterer_.getMaxZoom(),t,i;if(n!==null&&this.map_.getZoom()>n){this.clusterIcon_.hide();return}if(r<this.minClusterSize_){this.clusterIcon_.hide();return}t=this.markerClusterer_.getStyles().length;i=this.markerClusterer_.getCalculator()(this.markers_,t);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.useStyle(i);this.clusterIcon_.show()};Cluster.prototype.isMarkerAlreadyAdded_=function(n){var t;if(this.markers_.indexOf)return this.markers_.indexOf(n)!==-1;for(t=0;t<this.markers_.length;t++)if(n===this.markers_[t])return!0;return!1};MarkerClusterer.prototype.onAdd=function(){var n=this;this.activeMap_=this.getMap();this.ready_=!0;this.repaint();this.prevZoom_=this.getMap().getZoom();this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){var n=this.getMap().getZoom(),t=this.getMap().minZoom||0,i=Math.min(this.getMap().maxZoom||100,this.getMap().mapTypes[this.getMap().getMapTypeId()].maxZoom);n=Math.min(Math.max(n,t),i);this.prevZoom_!=n&&(this.prevZoom_=n,this.resetViewport_(!1))}.bind(this)),google.maps.event.addListener(this.getMap(),"idle",function(){n.redraw_()})]};MarkerClusterer.prototype.onRemove=function(){for(var n=0;n<this.markers_.length;n++)this.markers_[n].getMap()!==this.activeMap_&&this.markers_[n].setMap(this.activeMap_);for(n=0;n<this.clusters_.length;n++)this.clusters_[n].remove();for(this.clusters_=[],n=0;n<this.listeners_.length;n++)google.maps.event.removeListener(this.listeners_[n]);this.listeners_=[];this.activeMap_=null;this.ready_=!1};MarkerClusterer.prototype.draw=function(){};MarkerClusterer.prototype.setupStyles_=function(){var n,t;if(!(this.styles_.length>0))for(n=0;n<this.imageSizes_.length;n++)t=this.imageSizes_[n],this.styles_.push({url:this.imagePath_+(n+1)+"."+this.imageExtension_,height:t,width:t})};MarkerClusterer.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),i=new google.maps.LatLngBounds,n=0;n<t.length;n++)(t[n].getVisible()||!this.getIgnoreHidden())&&i.extend(t[n].getPosition());this.getMap().fitBounds(i)};MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_};MarkerClusterer.prototype.setGridSize=function(n){this.gridSize_=n};MarkerClusterer.prototype.getMinimumClusterSize=function(){return this.minClusterSize_};MarkerClusterer.prototype.setMinimumClusterSize=function(n){this.minClusterSize_=n};MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_};MarkerClusterer.prototype.setMaxZoom=function(n){this.maxZoom_=n};MarkerClusterer.prototype.getStyles=function(){return this.styles_};MarkerClusterer.prototype.setStyles=function(n){this.styles_=n};MarkerClusterer.prototype.getTitle=function(){return this.title_};MarkerClusterer.prototype.setTitle=function(n){this.title_=n};MarkerClusterer.prototype.getZoomOnClick=function(){return this.zoomOnClick_};MarkerClusterer.prototype.setZoomOnClick=function(n){this.zoomOnClick_=n};MarkerClusterer.prototype.getAverageCenter=function(){return this.averageCenter_};MarkerClusterer.prototype.setAverageCenter=function(n){this.averageCenter_=n};MarkerClusterer.prototype.getIgnoreHidden=function(){return this.ignoreHidden_};MarkerClusterer.prototype.setIgnoreHidden=function(n){this.ignoreHidden_=n};MarkerClusterer.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_};MarkerClusterer.prototype.setEnableRetinaIcons=function(n){this.enableRetinaIcons_=n};MarkerClusterer.prototype.getImageExtension=function(){return this.imageExtension_};MarkerClusterer.prototype.setImageExtension=function(n){this.imageExtension_=n};MarkerClusterer.prototype.getImagePath=function(){return this.imagePath_};MarkerClusterer.prototype.setImagePath=function(n){this.imagePath_=n};MarkerClusterer.prototype.getImageSizes=function(){return this.imageSizes_};MarkerClusterer.prototype.setImageSizes=function(n){this.imageSizes_=n};MarkerClusterer.prototype.getCalculator=function(){return this.calculator_};MarkerClusterer.prototype.setCalculator=function(n){this.calculator_=n};MarkerClusterer.prototype.getBatchSizeIE=function(){return this.batchSizeIE_};MarkerClusterer.prototype.setBatchSizeIE=function(n){this.batchSizeIE_=n};MarkerClusterer.prototype.getClusterClass=function(){return this.clusterClass_};MarkerClusterer.prototype.setClusterClass=function(n){this.clusterClass_=n};MarkerClusterer.prototype.getMarkers=function(){return this.markers_};MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length};MarkerClusterer.prototype.getClusters=function(){return this.clusters_};MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length};MarkerClusterer.prototype.addMarker=function(n,t){this.pushMarkerTo_(n);t||this.redraw_()};MarkerClusterer.prototype.addMarkers=function(n,t){for(var i in n)n.hasOwnProperty(i)&&this.pushMarkerTo_(n[i]);t||this.redraw_()};MarkerClusterer.prototype.pushMarkerTo_=function(n){if(n.getDraggable()){var t=this;google.maps.event.addListener(n,"dragend",function(){t.ready_&&(this.isAdded=!1,t.repaint())})}n.isAdded=!1;this.markers_.push(n)};MarkerClusterer.prototype.removeMarker=function(n,t){var i=this.removeMarker_(n);return!t&&i&&this.repaint(),i};MarkerClusterer.prototype.removeMarkers=function(n,t){for(var u,r=!1,i=0;i<n.length;i++)u=this.removeMarker_(n[i]),r=r||u;return!t&&r&&this.repaint(),r};MarkerClusterer.prototype.removeMarker_=function(n){var t,i=-1;if(this.markers_.indexOf)i=this.markers_.indexOf(n);else for(t=0;t<this.markers_.length;t++)if(n===this.markers_[t]){i=t;break}return i===-1?!1:(n.setMap(null),this.markers_.splice(i,1),!0)};MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport_(!0);this.markers_=[]};MarkerClusterer.prototype.repaint=function(){var n=this.clusters_.slice();this.clusters_=[];this.resetViewport_(!1);this.redraw_();setTimeout(function(){for(var t=0;t<n.length;t++)n[t].remove()},0)};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.redraw_=function(){this.createClusters_(0)};MarkerClusterer.prototype.resetViewport_=function(n){for(var i,t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();for(this.clusters_=[],t=0;t<this.markers_.length;t++)i=this.markers_[t],i.isAdded=!1,n&&i.setMap(null)};MarkerClusterer.prototype.distanceBetweenPoints_=function(n,t){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.isMarkerInBounds_=function(n,t){return t.contains(n.getPosition())};MarkerClusterer.prototype.addToClosestCluster_=function(n){for(var u,t,f,e=4e4,r=null,i=0;i<this.clusters_.length;i++)t=this.clusters_[i],f=t.getCenter(),f&&(u=this.distanceBetweenPoints_(f,n.getPosition()),u<e&&(e=u,r=t));r&&r.isMarkerInClusterBounds(n)?r.addMarker(n):(t=new Cluster(this),t.addMarker(n),this.clusters_.push(t))};MarkerClusterer.prototype.createClusters_=function(n){var i,t,u,e=this,f,r;if(this.ready_){for(n===0&&(google.maps.event.trigger(this,"clusteringbegin",this),typeof this.timerRefStatic!="undefined"&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),u=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.020707717434718,-178.48388434375),new google.maps.LatLng(-85.081364443845445,178.00048865625)),f=this.getExtendedBounds(u),r=Math.min(n+this.batchSize_,this.markers_.length),i=n;i<r;i++)t=this.markers_[i],!t.isAdded&&this.isMarkerInBounds_(t,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&t.getVisible())&&this.addToClosestCluster_(t);r<this.markers_.length?this.timerRefStatic=setTimeout(function(){e.createClusters_(r)},0):(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this))}};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.CALCULATOR=function(n,t){for(var i=0,u=n.length.toString(),r=u;r!==0;)r=parseInt(r/10,10),i++;return i=Math.min(i,t),{text:u,index:i,title:""}};MarkerClusterer.BATCH_SIZE=2e3;MarkerClusterer.BATCH_SIZE_IE=500;MarkerClusterer.IMAGE_PATH="../images/m";MarkerClusterer.IMAGE_EXTENSION="png";MarkerClusterer.IMAGE_SIZES=[53,56,66,78,90];typeof module=="object"&&(module.exports=MarkerClusterer);var stockistsGMaps={};(function(n){function y(){var r=new google.maps.LatLngBounds,n=$(".js-stockist-list").data("stockist-list"),u;n!==null&&typeof n!="undefined"&&n.forEach(n=>{var u,f,e,t;n.Location!==null&&typeof n.Location!="undefined"&&(u=n.Location.Latitude,f=n.Location.Longitude,u!==""&&f!==""&&(e=new google.maps.LatLng(u,f),t=new google.maps.Marker({position:e,icon:p(l),stockistId:n.Id,regionId:n.RegionId,isInCluster:!0,stockist:n}),google.maps.event.addListener(t,"click",function(){b(t)}),i.push(t),r.extend(e)))});u=[{width:40,height:40,url:w(l),textColor:"white",textSize:14}];f=new MarkerClusterer(t,i,{styles:u});a&&(e=!0,t.fitBounds(r))}function p(n){return{path:"M160,0C71.641,0,0,71.625,0,160c0,24.75,5.625,48.219,15.672,69.125 C16.233, 230.313,160,512,160,512l142.594-279.375C313.719, 210.844,320,186.156,320,160C320, 71.625,248.375,0,160,0",anchor:new google.maps.Point(160,512),fillColor:n,fillOpacity:1,scale:.09}}function w(n){var t=window.btoa('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="40" width="40"><circle cx="20" cy="20" r="20" fill="'+n+'"><\/circle><\/svg>');return"data:image/svg+xml;base64,"+t}function b(n){k(n)}function k(n){o&&o.setMap(null);o=new google.maps.InfoWindow({content:'<div class="info-window">'+d(n.stockist)+"<\/div>"});o.open(t,n)}function d(n){var t=n.Website?n.Website.startsWith("http")?n.Website:"https://"+n.Website:"";return'<div class="outlet-single js-outlet" data-id="'+n.Id+'"><h4 class="stockist-name">'+n.Name+'<\/h4><div class="stockist-content"><div class="details">'+(n.Phone?'<p>Phone: <strong><a href="tel:'+n.Phone+'">'+n.Phone+"<\/a><\/strong><\/p>":"")+(n.Email?'<p>Email: <strong><a href="mailto:'+n.Email+'">'+n.Email+"<\/a><\/strong><\/p>":"")+(n.Website?'<p>Website: <strong><a href="'+t+'" target="_blank">'+n.Name+"<\/a><\/strong><\/p>":"")+(n.Address?'<p class="stockist-address">'+n.Address+"<\/p>":"")+"<\/div><\/div>"}function g(){var n=t.getCenter();if((n.lat!==r||n.lng!==u)&&(r=n.lat,u=n.lng,e)){e=!1;return}}function nt(){var n=[];$(".js-stock-range-filter:checked").each(function(){n.push($(this).val())});n.length>0?stockistsGMaps.filterMarkersByPetTypes(n):stockistsGMaps.showAllMarkers()}var t=null,r=-24.8864364907877,u=134.0771484375,s=3,h=null,i=[],e=!1,a=!0,v=$("#stockists-map").data("enablegeolocation"),l=$(".js-stockist-list").attr("data-brandcolor"),f=null,o,c=$(".location-autocomplete").data("restrictcountry");c==="NZ"?(r=-41.278422800000008,u=174.77669200000003):c="AU";n.init=function(){t=new google.maps.Map($("#stockists-map")[0],{center:new google.maps.LatLng(r,u),zoom:s});google.maps.event.addListener(t,"idle",g);y();h=new google.maps.places.Autocomplete($(".location-autocomplete")[0],{componentRestrictions:{country:c},types:["geocode"]});h.addListener("place_changed",n.autocompletePicked);v&&navigator.geolocation&&navigator.geolocation.getCurrentPosition(n.geoLocated)};n.setCentre=function(n,i){r=n;u=i;t===null||t.setCenter(new google.maps.LatLng(r,u))};n.setZoom=function(n){s=n;t===null||t.setZoom(s)};n.geoLocated=function(t){located=!0;recalculateDistances=!0;n.setCentre(t.coords.latitude,t.coords.longitude);n.setZoom(10)};n.autocompletePicked=function(){var t=h.getPlace();located=!0;recalculateDistances=!0;n.setCentre(t.geometry.location.lat(),t.geometry.location.lng());n.setZoom(10)};n.openListing=function(n){if(n.data("lat")!==""&&n.data("lng")!==""){var r=new google.maps.LatLng(n.data("lat"),n.data("lng"));$.each(i,function(){if(this.setAnimation(null),r.equals(this.getPosition())){e=!0;t.panTo(this.getPosition());t.zoom<15&&t.setZoom(15);this.setAnimation(google.maps.Animation.BOUNCE);return}})}};n.closeListing=function(){$.each(i,function(){this.setAnimation(null)})};n.showAllMarkers=function(){var n=new google.maps.LatLngBounds;$.each(i,function(){this.isInCluster||f.addMarker(this);this.isInCluster=!0;n.extend(this.position)});t.fitBounds(n)};n.hideAllMarkers=function(){$.each(i,function(){this.isInCluster&&f.removeMarker(this);this.isInCluster=!1})};n.filterMarkersByPetTypes=function(n){var r=new google.maps.LatLngBounds,u=i.some(t=>t.stockist.PetTypes.some(t=>n.includes(t.UrlSegment))),e;u?($.each(i,function(){var t=this.stockist.PetTypes.some(t=>n.includes(t.UrlSegment));t?(this.isInCluster||f.addMarker(this),this.isInCluster=!0,r.extend(this.position)):(this.isInCluster&&f.removeMarker(this),this.isInCluster=!1)}),t.fitBounds(r)):(stockistsGMaps.hideAllMarkers(),e=t.getBounds)};$(".js-stock-range-filter").on("click",nt)})(stockistsGMaps)