1window.wp=window.wp||{},function(a,b){a.wp=a.wp||{};var c=a.document,d=a.jQuery,e=wp.listifyResults||{};e.MapServices=[],e.MapService=e.Class.extend({$mapWrapper:d(".job_listings-map-wrapper"),canvas:null,firstLoad:!0,activeCanvas:d.Deferred(),listings:[],markers:[],clusterer:null,bounds:null,geocoder:null,infoBubbleTemplate:wp.template("infoBubbleTemplate"),markerTemplate:wp.template("pinTemplate"),initialize:function(b){d.extend(this,b||{});var c=this;this.canvas&&d(a).on("resize",function(){c.reDraw()})},drawMap:function(){"resolved"!==this.activeCanvas.state()&&(this.activeCanvas.resolve(),a.console&&e.settings.scriptDebug&&console.log("Map Service ready..."),1==e.settings.mapService.useClusters&&this.createClusterer(),d(c).trigger("listifyMapServiceLoaded"))},addMarkers:function(){a.console&&e.settings.scriptDebug&&console.log("Adding markers...");var b=this;_.each(this.listings,function(a,c){b.addMarker(a)})},addMarker:function(a){},resetView:function(){},showDefaultView:function(){},fitBounds:function(){},reDraw:function(){this.fitBounds(),this.listings&&0!==this.listings.length||this.showDefaultView()},autoComplete:null,geocode:null,createClusterer:function(){},maybeClusterOverlay:function(a){},getCanvas:function(){},getCenterLat:function(){},getCenterLng:function(){},getNeLat:function(){},getNeLng:function(){},getRadius:function(){var a=e.mapUnit,b="mi"===a?3959:6371,c=this.getCenterLat()/57.2958,d=this.getCenterLng()/57.2958,f=this.getNeLat()/57.2958,g=this.getNeLng()/57.2958,h=b*Math.acos(Math.sin(c)*Math.sin(f)+Math.cos(c)*Math.cos(f)*Math.cos(g-d));return h<1?1:h}}),e.MapServices.GoogleMaps=e.MapService.extend({initialize:function(b){e.MapService.prototype.initialize.call(this,b),this.bounds=new google.maps.LatLngBounds,this.geocoder=new google.maps.Geocoder,InfoBubble.prototype.getAnchorHeight_=function(){return 55},this.infoBubble=new InfoBubble({backgroundClassName:"map-marker-info",borderRadius:4,padding:15,borderColor:"#ffffff",shadowStyle:0,minHeight:120,maxHeight:800,minWidth:225,maxWidth:275,hideCloseButton:!0,flat:!0,anchor:RichMarkerPosition.BOTTOM,disableAutoPan:"1"!=e.settings.mapService.autoPan});var c=this;google.maps.event.addDomListener(a,"load",function(){c.drawMap()})},drawMap:function(){c.getElementById("job_listings-map-canvas")&&(this.canvas=new google.maps.Map(c.getElementById("job_listings-map-canvas"),{center:new google.maps.LatLng(e.settings.mapService.center[0],e.settings.mapService.center[1]),zoom:parseInt(e.settings.mapService.zoom),maxZoom:parseInt(e.settings.mapService.maxZoom),minZoom:parseInt(e.settings.mapService.maxZoomOut),scrollwheel:e.settings.mapService.googlemaps.scrollwheel,styles:e.settings.mapService.googlemaps.styles,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM},streetViewControl:!0,streetViewControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM}}),e.MapService.prototype.drawMap.call(this))},addMarkers:function(a){if(this.resetView(),this.listings=a,!this.listings||0===this.listings.length)return this.showDefaultView();e.MapService.prototype.addMarkers.call(this),(this.firstLoad&&e.settings.mapService.autofit||!this.firstLoad)&&this.fitBounds(),this.clusterer&&this.clusterer.addMarkers(this.markers),this.firstLoad=!1},addMarker:function(a){var b=this;if(null!==a.location.lat){var c=new RichMarker({content:b.markerTemplate(a),flat:!0,draggable:!1,position:new google.maps.LatLng(a.location.lat,a.location.lng),data:a});this.clusterer||c.setMap(this.canvas),this.bounds.extend(c.getPosition()),this.markers.push(c),google.maps.event.addListener(c,e.settings.mapService.googlemaps.infoBubbleTrigger,function(){b.infoBubble.get("isOpen")&&b.infoBubble.get("anchor")==c||(b.infoBubble.setContent(b.infoBubbleTemplate(a)),b.infoBubble.open(b.canvas,this))}),google.maps.event.addListener(this.canvas,"click",function(){b.infoBubble.close()})}},resetView:function(){_.each(this.markers,function(a){a.setMap(null)}),this.bounds=new google.maps.LatLngBounds,this.markers=[],this.clusterer&&this.clusterer.clearMarkers(),this.infoBubble.close()},showDefaultView:function(){var a=e.controllers.dataService.getDefaultCoordinates();this.canvas.setZoom(parseInt(e.settings.mapService.zoom)),this.canvas.setCenter(new google.maps.LatLng(a.lat,a.lng))},fitBounds:function(){e.MapService.prototype.fitBounds.call(this),this.canvas.fitBounds(this.bounds)},reDraw:function(){google.maps.event.trigger(this.canvas,"resize"),e.MapService.prototype.reDraw.call(this)},autoComplete:function(a){var b=this,f=d("#"+a);if(0!==f.length){var g=new google.maps.places.Autocomplete(c.getElementById(a),e.settings.mapService.googlemaps.autoCompleteArgs);this.canvas&&g.bindTo("bounds",this.canvas),f.unbind("change"),f.keypress(function(a){13==a.which&&e.controllers.dataService.update(
1)}),g.addListener("place_changed",function(){var a=g.getPlace();a.geometry?(e.controllers.dataService.isAddressGeocoded=!0,e.controllers.dataService.radiusSearch(a.geometry.location.lat(),a.geometry.location.lng())):(e.controllers.dataService.isAddressGeocoded=!1,b.geocode(a.name))})}},geocode:function(a){this.isAddressGeocoding=!0,this.geocoder.geocode({address:a},function(b,c){if(c==google.maps.GeocoderStatus.OK){var f=b[0].geometry.location;e.controllers.dataService.prevAddress=a,e.controllers.dataService.isAddressGeocoded=!0,e.controllers.dataService.$address.each(function(){d(this).val(b[0].formatted_address)}),e.controllers.dataService.radiusSearch(f.lat(),f.lng())}else e.controllers.dataService.isAddressGeocoded=!1;this.isAddressGeocoding=!1})},createClusterer:function(){this.clusterer=new MarkerClusterer(this.canvas,this.makers,{gridSize:e.settings.mapService.gridSize,maxZoom:e.settings.mapService.maxZoom,ignoreHiddenMarkers:!0,cssClass:"cluster",imagePath:"",width:53,height:53});var a=this;google.maps.event.addListener(this.clusterer,"clusterclick",function(b){a.maybeClusterOverlay(b)})},maybeClusterOverlay:function(a){var b=this,c=a.getMarkers(),f=this.canvas.getZoom();if(!(f<e.settings.mapService.maxZoom)){var g=_.map(c,function(a){return b.infoBubbleTemplate(a.data)});d.magnificPopup.open({type:"inline",items:{src:'<div class="cluster-overlay popup"><ul><li>'+g.join("</li><li>")+"</li></ul></div>"},callbacks:{close:function(){b.canvas.setZoom(f-1),b.canvas.setZoom(f)}}})}},getCanvas:function(){return this.canvas},getCenterLat:function(){return this.getCanvas().getBounds().getCenter().lat()},getCenterLng:function(){return this.getCanvas().getBounds().getCenter().lng()},getNeLat:function(){return this.getCanvas().getBounds().getNorthEast().lat()},getNeLng:function(){return this.getCanvas().getBounds().getNorthEast().lng()}}),e.MapServices.Mapbox=e.MapService.extend({initialize:function(b){e.MapService.prototype.initialize.call(this,b),this.bounds=new L.latLngBounds,this.geocoder=new a.GeoSearch.OpenStreetMapProvider,this.drawMap()},drawMap:function(){c.getElementById("job_listings-map-canvas")&&(this.canvas=L.map("job_listings-map-canvas").setView([e.settings.mapService.center[0],e.settings.mapService.center[1]],e.settings.mapService.zoom),L.tileLayer(e.settings.mapService.mapbox.tileUrl,{attribution:'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://mapbox.com">Mapbox</a>',maxZoom:e.settings.mapService.maxZoom}).addTo(this.canvas),e.settings.mapService.googlemaps.scrollwheel||this.canvas.scrollWheelZoom.disable(),e.MapService.prototype.drawMap.apply(this))},addMarkers:function(a){if(this.resetView(),this.listings=a,!this.listings||0===this.listings.length)return this.showDefaultView();e.MapService.prototype.addMarkers.call(this),this.canvas.addLayer(this.markers),(this.firstLoad&&e.settings.mapService.autofit||!this.firstLoad)&&this.fitBounds(),this.firstLoad=!1},addMarker:function(a){if(null!==a.location.lat){var b=L.divIcon({iconSize:[30,30],iconAnchor:[15,30],className:"",html:this.markerTemplate(a)}),c=L.marker([a.location.lat,a.location.lng],{icon:b,data:a});c.bindPopup(this.infoBubbleTemplate(a),{closeButton:!1,autoPan:"1"==e.settings.mapService.autoPan,offset:[0,-60],maxHeight:800,minWidth:225,maxWidth:275,className:"map-marker-info"}),this.clusterer?this.markers.addLayer(c):(this.markers.push(c),c.addTo(this.canvas)),this.bounds.extend(c.getLatLng())}},resetView:function(){this.bounds=new L.latLngBounds,this.clusterer?this.markers.clearLayers():(_.each(this.markers,function(a){a.remove()}),this.markers=[])},showDefaultView:function(){var a=e.controllers.dataService.getDefaultCoordinates();this.canvas.setZoom(e.settings.mapService.zoom),this.canvas.setView(L.latLng(a.lat,a.lng))},fitBounds:function(){this.bounds.isValid()&&(e.MapService.prototype.fitBounds.call(this),this.canvas.fitBounds(this.bounds))},reDraw:function(){this.canvas.invalidateSize(),e.MapService.prototype.reDraw.call(this)},geocode:function(a){this.isAddressGeocoding=!0,this.geocoder.search({query:a}
1).then(function(a){if(a.length>=1){var b=a[0];e.controllers.dataService.prevAddress=b.label,e.controllers.dataService.$address.val(b.label),e.controllers.dataService.isAddressGeocoded=!0,e.controllers.dataService.radiusSearch(b.y,b.x)}else e.controllers.dataService.isAddressGeocoded=!1;this.isAddressGeocoding=!1})},createClusterer:function(){this.markers=L.markerClusterGroup({maxClusterRadius:e.settings.mapService.gridSize,showCoverageOnHover:!1,iconCreateFunction:function(a){return L.divIcon({html:'<div class="cluster">'+a.getChildCount()+"</div>",className:""})}});var a=this;this.markers.on("clusterclick",function(b){a.maybeClusterOverlay(b.layer)}),this.clusterer=!0},maybeClusterOverlay:function(a){var b=this,c=a.getAllChildMarkers();if(a.zoomToBounds(),this.canvas.getZoom()==e.settings.mapService.maxZoom){var f=_.map(c,function(a){return b.infoBubbleTemplate(a.options.data)});d.magnificPopup.open({type:"inline",items:{src:'<div class="cluster-overlay popup"><ul><li>'+f.join("</li><li>")+"</li></ul></div>"},callbacks:{close:function(){a.unspiderfy()}}})}},autoComplete:null,getCanvas:function(){return this.canvas},getCenterLat:function(){return this.getCanvas().getBounds().getCenter().lat},getCenterLng:function(){return this.getCanvas().getBounds().getCenter().lng},getNeLat:function(){return this.getCanvas().getBounds().getNorthEast().lat},getNeLng:function(){return this.getCanvas().getBounds().getNorthEast().lng}}),"googlemaps"==e.settings.mapService.service?e.controllers.mapService=new e.MapServices.GoogleMaps:e.controllers.mapService=new e.MapServices.Mapbox,e.controllers.mapService.autoComplete&&e.settings.mapService.googlemaps.autoComplete&&e.controllers.mapService.autoComplete(e.controllers.dataService.autoComplete),1==e.settings.displayMap&&d.when(e.controllers.mapService.activeCanvas,e.controllers.dataService.activeResponse).done(function(){d(c).trigger("listifyActiveResultsMap"),a.console&&e.settings.scriptDebug&&console.log("Data Service and Map Service are ready..."),d(c).on("listifyDataServiceLoaded",function(){e.controllers.mapService.addMarkers(e.controllers.dataService.response.listings)}),d(c).on("listifyMapServiceLoaded",function(){e.controllers.mapService.addMarkers(e.controllers.dataService.response.listings)})}),d(c).ready(function(){var b=d("body"),c=d(a),e=d(".job_listings-map-wrapper"),f=d(".site-header"),g=d("#wpadminbar"),h=function(){b.hasClass("fixed-map")&&e.css("height",c.outerHeight()-f.outerHeight()-g.outerHeight())};h(),c.on("resize",h)})}(window);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.