1!function(){function t(e,n,o){function r(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[s]={exports:{}};e[s][0].call(p.exports,function(t){return r(e[s][1][t]||t)},p,p.exports,t,e,n,o)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)r(o[s]);return r}return t}()({1:[function(t,e,n){"use strict";function o(){var t=new r.BushubJourneyPlanner(null),e=function(){t.setOrigin(t.autocomplete[0].getPlace().formatted_address)},n=function(){t.setDestination(t.autocomplete[1].getPlace().formatted_address)};t.addAutoComplete(document.getElementById("origin")).addListener("place_changed",e),t.addAutoComplete(document.getElementById("destination")).addListener("place_changed",n),jQuery(document).ready(function(e){e(document).on("click","[set-location]",function(n){t.geolocate$().then(function(n){t.getPlaceFromLocation$(n).then(function(n){t.setOrigin(n.formatted_address),e("[origin]").val(n.formatted_address)})})}),e(document).on("change keyup copy paste cut","[origin], [destination]",function(){this.value||(this.hasAttribute("origin")?t.setOrigin(""):t.setDestination(""))}),e(document).on("submit","[plan-journey]",function(t){})})}Object.defineProperty(n,"__esModule",{value:!0});var r=t("../../classes/journeyPlanner/BushubJourneyPlanner");google.maps.event.addDomListener(window,"load",o),n.createJourneyPlannerWidget=o},{"../../classes/journeyPlanner/BushubJourneyPlanner":2}],2:[function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r.apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0});var i=t("../map/BushubMap"),s=function(t){function e(e){var n=t.call(this,e)||this;return n.autocomplete=[],n.directionsRequest={travelMode:google.maps.TravelMode.TRANSIT,provideRouteAlternatives:!0,transitOptions:{modes:[google.maps.TransitMode.BUS],routingPreference:google.maps.TransitRoutePreference.FEWER_TRANSFERS}},n.settings={operators:[],vehicleTypes:[]},n.directionsService=new google.maps.DirectionsService,n.directionsDisplay=new google.maps.DirectionsRenderer,n.directionsDisplay.setMap(n.map),n}return o(e,t),e.prototype._filterVehicleTypes=function(t){var e=this;return e.settings.vehicleTypes.length?(t.routes=t.routes.filter(function(t){var n=!0;return t.legs.forEach(function(t){t.steps.forEach(function(t){t.transit&&e.settings.vehicleTypes.indexOf(t.transit.line.vehicle.type.toString())<0&&(n=!1)})}),n}),t):t},e.prototype._filterOperators=function(t){var e=r({},t),n=this;if(!n.settings.operators.length)return t;var o=t.routes.filter(function(t){var e=!0;return t.legs.forEach(function(t){t.steps.forEach(function(t){t.transit&&t.transit.line.agencies.forEach(function(t){n.settings.operators.indexOf(t.name)<0&&(e=!1)})})}),e});return e.routes=o,e},e.prototype.addSettings=function(t){return this.settings=r(r({},this.settings),t),this},e.prototype.setDirectionsPanel=function(t){var e=document.getElementById(t);return e&&this.directionsDisplay.setPanel(e),this},e.prototype.addAutoComplete=function(t){var e={bounds:this._defaultBounds,componentRestrictions:{country:"uk"}},n=new google.maps.places.Autocomplete(t,e);return n.setFields(["formatted_address"]),this.autocomplete.push(n),n},e.prototype.setAutoCompleteBounds=function(){var t=this;return this.geolocate$().then(function(e){var n=new google.maps.Circle({center:e,radius:1});t.autocomplete.forEach(function(t){t.setBounds(n.getBounds())})}),this},e.prototype.setOrigin=function(t){return this.directionsRequest.origin=t,this},e.prototype.setDestination=function(t){return this.directionsRequest.destination=t,this},e.prototype.planJourney$=function(){var t=this;return new Promise(function(e,n){t.directionsRequest.origin&&t.directionsRequest.destination?t.directionsService.route(t.directionsRequest,function(o,r){var i;if(google.maps.DirectionsStatus.OK==r){var s=t._filterOperators(o),a=t._filterVehicleTypes(s),u=a.routes.length?a:o;u.isFiltered=!!a.routes.length,t.directionsDisplay.setDirections(u);var c=t.directionsRequest.transitOptions.arrivalTime?t.directionsRequest.transitOptions.arrivalTime:null!==(i=t.directionsRequest.transitOptions.departureTime)&&void 0!==i?i:new Date;
1c.setHours(0,0,0,0),u.routes.forEach(function(t){t.legs.forEach(function(t){var e,n,o=null===(e=t.departure_time)||void 0===e?void 0:e.value;o&&(o.setHours(0,0,0,0),o.getTime()!=c.getTime()&&(t.departure_time.date=null===(n=t.departure_time)||void 0===n?void 0:n.value.toLocaleDateString()))})}),e(u)}else{var p=r.toString();switch(r){case google.maps.DirectionsStatus.ZERO_RESULTS:p="There are no results for this journey, please try different locations. You may simply need to refer to them differently e.g. The O2 vs The Millenium Dome";break;case google.maps.DirectionsStatus.NOT_FOUND:p="The origin or destination could not be found, please try different locations."}n(p)}}):n("Please ensure both origin and destination are set.")})},e.prototype.setDepartureTime=function(t){return this.directionsRequest.transitOptions.arrivalTime=null,this.directionsRequest.transitOptions.departureTime=t,this},e.prototype.setArrivalTime=function(t){return this.directionsRequest.transitOptions.departureTime=null,this.directionsRequest.transitOptions.arrivalTime=t,this},e.prototype.setRoutePreference=function(t){return this.directionsRequest.transitOptions.routingPreference=t,this},e}(i.BushubMap);n.BushubJourneyPlanner=s},{"../map/BushubMap":3}],3:[function(t,e,n){"use strict";var o=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t){void 0===t&&(t=null),this._center=new google.maps.LatLng(51.509865,-.118092),this._defaultBounds=new google.maps.Circle({center:this._center,radius:1}).getBounds(),this.geocoder=new google.maps.Geocoder,t&&(this.map=new google.maps.Map(t,{center:new google.maps.LatLng(-25.344,131.036),zoom:12,noClear:!0,clickableIcons:!1,mapTypeControl:!1,streetViewControl:!1}))}return t.prototype.geolocate$=function(){var t=this;return new Promise(function(e,n){if(!navigator.geolocation)return e(t._center);navigator.geolocation.getCurrentPosition(function(t){e(new google.maps.LatLng(t.coords.latitude,t.coords.longitude))})})},t.prototype.getPlaceFromLocation$=function(t){var e=this;return new Promise(function(n,o){e.geocoder.geocode({location:t},function(t,e){e==google.maps.GeocoderStatus.OK?n(t[0]):o("Geocode was not successful for the following reason: "+e)})})},t.prototype.setCenter=function(t){return this._center=new google.maps.LatLng(t.lat,t.lng),this},t.prototype.centerMap=function(){return this.map.setCenter(this._center),this},t.prototype.getBoundsFromLocations=function(t){for(var e=new google.maps.LatLngBounds,n=0;n<t.length;n++)e.extend(t[n]);return e},t.prototype.triggerEvent=function(t,e){var n=document.createEvent("CustomEvent");n.initCustomEvent(t,!0,!0,e),this.map.getDiv().dispatchEvent(n)},t.prototype.findDistance=function(t,e){function n(t){return t*Math.PI/180}var o,r,i,s,a,u,c,p,l,h=t.lat(),d=t.lng(),f=e.lat(),g=e.lng();return o=h,r=d,i=f,s=g,h=n(o),d=n(r),f=n(i),g=n(s),a=f-h,u=g-d,c=Math.pow(Math.sin(a/2),2)+Math.cos(h)*Math.cos(f)*Math.pow(Math.sin(u/2),2),p=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),l=3961*p,function(t){return Math.round(1e3*t)/1e3}(l)},t}();n.BushubMap=r;var i=function(t){function e(e,n,o){void 0===o&&(o="default");var r=t.call(this)||this;return r.content="",r.position=e,r.content=n,r.anchor=document.createElement("div"),r.anchor.classList.add("popup-anchor",o),r.anchor.innerHTML=r.content,r}return o(e,t),e.prototype.onAdd=function(){this.anchor.innerHTML=this.content,this.getPanes().floatPane.appendChild(this.anchor);var t=this.getMap();this.listener=google.maps.event.addListener(t,"idle",function(){this.projection=this.getProjection()})},e.prototype.onRemove=function(){this.anchor.parentElement&&this.anchor.parentElement.removeChild(this.anchor),google.maps.event.removeListener(this.listener)},e.prototype.draw=function(){if(this.projection){this.content!=this.anchor.innerHTML&&(this.anchor.innerHTML=this.content);var t=this.projection.fromLatLngToDivPixel(this.position),e=Math.abs(t.x)<4e3&&Math.abs(t.y)<4e3?"block":"none";"block"===e&&(this.anchor.style.left=t.x+"px",this.anchor.style.top=t.y-this.anchor.offsetHeight+"px"),this.anchor.style.display!==e&&(this.anchor.style.display=e)}},e.prototype.stopEventPropagation=function(){var t=this.anchor;t.style.cursor="auto",["click","dblclick","contextmenu","wheel","mousedown","touchstart","pointerdown"].forEach(function(e){t.addEventListener(e,function(t){t.stopPropagation()})})},e}(google.maps.OverlayView);n.BusHubPopup=i},{}]},{},[1]);
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.