PageSourceSearch

https://c1www.shuttledirect.com/shuttledirect/www/form.en.3b57ff1b.js

js shuttledirect.com collected 2026-10-02 06:07:05 UTC 118,209 bytes, 5 lines download raw bytes

1webpackJsonp([62],{"5Kko":function(e,t,i){var n,s,a;!function(i,r){s=[],n=r(),void 0!==(a="function"==typeof n?n.apply(t,s):n)&&(e.exports=a)}(0,function(){"use strict";var e=function(e){return e&&"getComputedStyle"in window&&"smooth"===window.getComputedStyle(e)["scroll-behavior"]};if("undefined"==typeof window||!("document"in window))return{};var t=function(t,i,n){i=i||999,n||0===n||(n=9);var s,a=function(e){s=e},r=function(){clearTimeout(s),a(0)},o=function(e){return Math.max(0,t.getTopOf(e)-n)},l=function(n,s,o){if(r(),0===s||s&&s<0||e(t.body))t.toY(n),o&&o();else{var l=t.getY(),d=Math.max(0,n)-l,u=(new Date).getTime();s=s||Math.min(Math.abs(d),i),function e(){a(setTimeout(function(){var i=Math.min(1,((new Date).getTime()-u)/s),n=Math.max(0,Math.floor(l+d*(i<.5?2*i*i:i*(4-2*i)-1)));t.toY(n),i<1&&t.getHeight()+n<t.body.scrollHeight?e():(setTimeout(r,99),o&&o())},9))}()}},d=function(e,t,i){l(o(e),t,i)},u=function(e,i,s){var a=e.getBoundingClientRect().height,r=t.getTopOf(e)+a,u=t.getHeight(),c=t.getY(),h=c+u;o(e)<c||a+n>u?d(e,i,s):r+n>h?l(r-u+n,i,s):s&&s()},c=function(e,i,n,s){l(Math.max(0,t.getTopOf(e)-t.getHeight()/2+(n||e.getBoundingClientRect().height/2)),i,s)};return{setup:function(e,t){return(0===e||e)&&(i=e),(0===t||t)&&(n=t),{defaultDuration:i,edgeOffset:n}},to:d,toY:l,intoView:u,center:c,stop:r,moving:function(){return!!s},getY:t.getY,getTopOf:t.getTopOf}},i=document.documentElement,n=function(){return window.scrollY||i.scrollTop},s=t({body:document.scrollingElement||document.body,toY:function(e){window.scrollTo(0,e)},getY:n,getHeight:function(){return window.innerHeight||i.clientHeight},getTopOf:function(e){return e.getBoundingClientRect().top+n()-i.offsetTop}});if(s.createScroller=function(e,n,s){return t({body:e,toY:function(t){e.scrollTop=t},getY:function(){return e.scrollTop},getHeight:function(){return Math.min(e.clientHeight,window.innerHeight||i.clientHeight)},getTopOf:function(e){return e.offsetTop}},n,s)},"addEventListener"in window&&!window.noZensmooth&&!e(document.body)){var a="history"in window&&"pushState"in history,r=a&&"scrollRestoration"in history;r&&(history.scrollRestoration="auto"),window.addEventListener("load",function(){r&&(setTimeout(function(){history.scrollRestoration="manual"},9),window.addEventListener("popstate",function(e){e.state&&"zenscrollY"in e.state&&s.toY(e.state.zenscrollY)},!1)),window.location.hash&&setTimeout(function(){var e=s.setup().edgeOffset;if(e){var t=document.getElementById(window.location.href.split("#")[1]);if(t){var i=Math.max(0,s.getTopOf(t)-e),n=s.getY()-i;0<=n&&n<9&&window.scrollTo(0,i)}}},9)},!1);var o=new RegExp("(^|\\s)noZensmooth(\\s|$)");window.addEventListener("click",function(e){for(var t=e.target;t&&"A"!==t.tagName;)t=t.parentNode;if(!(!t||1!==e.which||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)){if(r){var i=history.state&&"object"==typeof history.state?history.state:{};i.zenscrollY=s.getY();try{history.replaceState(i,"")}catch(e){}}var n=t.getAttribute("href")||"";if(0===n.indexOf("#")&&!o.test(t.className)){var l=0,d=document.getElementById(n.substring(1));if("#"!==n){if(!d)return;l=s.getTopOf(d)}e.preventDefault();var u=function(){window.location=n},c=s.setup().edgeOffset;c&&(l=Math.max(0,l-c),a&&(u=function(){history.pushState({},"",n)})),s.toY(l,null,u)}}},!1)}return s})},GERY:function(e,t,i){"use strict";(function(e){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i("sINv"),a=i.n(s),r=i("5Kko"),o=i.n(r),l=i("3cRD"),d=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();i("am/A");var u=function(){function t(i){n(this,t),this.project=i.project,this.site=i.site,this.currentRoute=i.currentRoute,this.isMobile=i.isMobile,this.isTablet=i.isTablet,this.lang=i.lang,this.proxyGPlaces=Number.parseInt(i.gpp),this.hasCalendars=i.hasCalendars,this.viewportMobile=i.isMobile&&!i.isTablet||e.innerWidth<768,this.bookingData=i.bk,this.pickstack=i.pickstack,this.timeout=0,this.modal=new l.a,this.formID=null,this.form=this.formObj=this.formBody=null,this.formParentContainer=document.getElementById("form-container"),this.formContainer=a()("#formContainer"),this.formContainer.length&&(this.formObj=this.formContainer.find("form"),this.formObj.length&&(this.formID=this.formObj.attr("id"),this.form=this.formObj[0],this.formBody=document.getElementById("formBody"))),this.suggestOrigen=document.getElementById(i.suggestOrigen),this.isHubOrigin=document.getElementById("hubOrigen"),this.originTable=document.getElementById("tablaOrigen"),this.suggestDestino=document.getElementById(i.suggestDestino),this.isHubDestination=document.getElementById("hubDestino"),this.destinationTable=document.getElementById("tablaDestino"),this.selectTransferType=document.getElementById("tipoTraslado"),this.switcher=document.getElementById("switcher"),this.switcherLabel=document.getElementById("label-switcher"),this.trip=document.getElementById("idaVuelta"),this.hasCalendars&&(this.outboundDateBox=document.getElementById("fechaIda"),this.outboundHourBox=document.getElementById("horaIda"),this.outboundTimeTxt=document.getElementById("outboundTimeText"),this.outboundDateTitle=document.getElementById("outboundDateTitle"),this.outboundTimeTitle=document.getElementById("outboundTimeTitle"),this.outboundHour=document.getElementById("outboundHour"),this.outboundMins=document.getElementById("outboundMins"),this.returnDateBox=document.getElementById("fechaVuelta"),this.returnHourBox=document.getElementById("horaVuelta"),this.returnCalendar=d
1ocument.getElementById("returnCalendar"),this.returnLabel=document.getElementById("returnLabel"),this.returnCalendar&&(this.returnCalendar.style.display="none",this.returnLabel.style.display="none"),this.returnTimeTxt=document.getElementById("returnTimeText"),this.returnDateTitle=document.getElementById("returnDateTitle"),this.returnTimeTitle=document.getElementById("returnTimeTitle"),this.returnHour=document.getElementById("returnHour"),this.returnMins=document.getElementById("returnMins"),this.selectTimeBtns=document.querySelectorAll(".selectTime"),this.toggleCalendarBtns=document.querySelectorAll(".toggleCalendar"),this.outboundDate=i.outboundDate,this.returnDate=i.returnDate),this.closeBtns=document.querySelectorAll(".closePop"),this.paxPopup=document.getElementById("pax-popup"),this.addPaxBtns=document.querySelectorAll("#pax-popup .plus"),this.removePaxBtns=document.querySelectorAll("#pax-popup .minus"),this.inputAdults=document.getElementById("adultPassengers"),this.inputChildren=document.getElementById("childPassengers"),this.ajaxChildren=document.getElementById("ajaxChildren"),this.originSelectedId=null,this.originSelected=null,this.originSelectedTable=null,this.originLat=null,this.originLng=null,this.originIsHub=0,this.destinationSelectedId=null,this.destinationSelected=null,this.destinationSelectedTable=null,this.destinationLat=null,this.destinationLng=null,this.destinationIsHub=0,this.oneWay=!0,this.quoteSelectedTransferType=1,this.editionOriginTypes=null,this.editionPlaceOriginId=null,this.editionPlaceOrigenCoords=null,this.editionDestinationTypes=null,this.editionPlaceDestinationId=null,this.editionPlaceDestinoCoords=null,this.googlePlacesToRemove=[],this.searchBtn=document.getElementById("searchBtn")}return d(t,[{key:"onResize",value:function(){this.viewportMobile=this.isMobile&&!this.isTablet||e.innerWidth<768}},{key:"toggleJourneyType",value:function(){"ida"===this.trip.value?this.journeyType.call(this,this.formID,"return"):this.journeyType.call(this,this.formID,"oneWay")}},{key:"journeyType",value:function(e,t){"oneWay"===t?(this.trip.value="ida",this.returnCalendar.style.display="none",this.returnLabel.style.display="none",this.switcherLabel.innerHTML=Translator.trans("No",{},"formJs")):(this.trip.value="vuelta",this.switcherLabel.innerHTML=Translator.trans("Yes",{},"formJs"),this.returnCalendar.style.display="block",this.returnLabel.style.display="block","editRide"!==this.currentRoute&&this.returnCalendar.click())}},{key:"addPassenger",value:function(e){e.classList.contains("addAdult")?(this.inputAdults.value=Number(this.inputAdults.value)+1,document.querySelector("span.minus--adult").classList.remove("disabled")):(this.inputChildren.value=Number(this.inputChildren.value)+1,this.showChildrenAges(Number(this.inputChildren.value)),document.querySelector("span.minus--child").classList.remove("disabled"));this.checkPassengers(Number(this.inputAdults.value),Number(this.inputChildren.value)),this.updateFakePaxBox(Number(this.inputAdults.value)+Number(this.inputChildren.value))}},{key:"removePassenger",value:function(e){e.classList.contains("removeAdult")?Number(this.inputAdults.value)-1>0?this.inputAdults.value=Number(this.inputAdults.value)-1:(this.inputAdults.value=0,e.classList.add("disabled")):(Number(this.inputChildren.value)-1>0?this.inputChildren.value=Number(this.inputChildren.value)-1:(this.inputChildren.value=0,e.classList.add("disabled")),this.showChildrenAges(Number(this.inputChildren.value))),this.checkPassengers(Number(this.inputAdults.value),Number(this.inputChildren.value)),this.updateFakePaxBox(Number(this.inputAdults.value)+Number(this.inputChildren.value))}},{key:"showChildrenAges",value:function(e){var t=this,i=this.ajaxChildren;if(i.style.display="block",i.innerHTML='<i style="color:#444; font-size:18px" class="fa fa-cog fa-spin"></i>',e>0){var n=new XMLHttpRequest;n.open("GET",Routing.generate("_childrenSelectAge",{page:"",num:e,locale:t.lang})),n.onload=function(){200===n.status?(i.innerHTML=n.responseText,i.style.display="block"):alert("Request failed.  Returned status of "+n.status)},n.send()}else i.style.display="none"}},{key:"checkChildrenAges",value:function(){this.hideFormErrors();var e=document.querySelectorAll("select.ajaxChildren"),t=!1;if(e)for(var i=0;i<e.length;i++)e[i].addEventListener("change",this.checkAgeValue.bind(this,e[i]),!1),this.isEmpty(e[i].value)&&(t=!0);return t}},{key:"checkAgeValue",value:function(e){this.isEmpty(e.value)?this.show
1FormError("children"):this.hideFormErrors()}},{key:"checkPassengers",value:function(e,t){e+t<=0||0===e?this.errorPassengers("show"):this.errorPassengers("hide"),this.updateStringPassengers(e,t)}},{key:"validatePassengers",value:function(){var e=this.inputAdults.value,t=this.inputChildren.value,i=this.checkChildrenAges();return i&&(this.showFormError("children"),this.showPopup("pax-popup")),e+t>0&&e>0&&!i}},{key:"emptyField",value:function(e){var t=document.getElementById(e);if(t){var i=t.parentNode;if(t.value="",t.focus(),"iframe"!==this.currentRoute&&o.a.intoView(t),i){var n=i.querySelectorAll(".glyphicon")[0];n&&(n.style.display="none")}}}},{key:"hideFormErrors",value:function(){var e,t=document.getElementsByClassName("errorForm"),i=document.getElementsByClassName("invalid");if(t)for(e=0;e<t.length;e++)t[e].style.display="none";if(i)for(e=0;e<i.length;e++)i[e].classList.remove("invalid")}},{key:"hideFormError",value:function(e){var t=document.getElementById(e+"Error"),i=document.getElementById(e);t&&(t.style.display="none"),i&&i.classList.remove("invalid")}},{key:"showFormError",value:function(e){var t=document.getElementById(e+"Error"),i=document.getElementById(e);t&&(t.style.display="block"),i&&(i.classList.add("invalid"),i.focus(),"iframe"!==this.currentRoute&&o.a.intoView(i))}},{key:"isEmpty",value:function(e){if("number"==typeof e||"boolean"==typeof e)return!1;if(void 0===e||null===e)return!0;if(void 0!==e.length)return 0===e.length;var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return 0===t}},{key:"showPopup",value:function(e){this.closePopup(!1),a()("#"+e).toggle(!0)}},{key:"hidePopup",value:function(e){a()("#"+e).toggle(!1)}},{key:"togglePopup",value:function(e){a()("#"+e).toggle(),"alpline"===this.project&&this.formParentContainer&&(a()("#"+e).is(":visible")?this.formParentContainer.style.zIndex=65:this.formParentContainer.style.zIndex=50),a()("#"+e).is(":visible")&&this.isMobile&&o.a.center(document.getElementById(e),500,85)}},{key:"checkTimeValue",value:function(e){var t=e.id;this.isEmpty(e.value)?this.showFormError(t):this.hideFormErrors()}}]),t}();t.a=u}).call(t,i("DuR2"))},"S+Hk":function(e,t,i){"use strict";(function(e,n){function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=i("5Kko"),l=i.n(o),d=i("GERY"),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),h=function(t){function i(t){s(this,i);var n=a(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return n.exoProjectId=t.exoProjectId,n.log=!1,n.GeoFencingCoords=t.GeoFencingCoords,n.GeoFencingRadius=t.GeoFencingRadius,n.originCategories=t.originCategories,n.originLimits=t.originLimits,n.originId=null,n.destinationCategories=t.destinationCategories,n.destinationLimits=t.destinationLimits,n.routesExo=t.routesExo,n.timeoutSuggest=null,n.popularLabel=Translator.trans("popular",{},"formJs"),n.poweredByShuttleDirect=Translator.trans("Powered by ShuttleDirect",{},"formJs"),n.noResultsFound=Translator.trans("No results found for",{},"formJs"),n.searchFieldPathOrigen="#"+t.suggestOrigen,n.searchFieldPathDestino="#"+t.suggestDestino,n.oParams=null,n.dParams=null,n.googleImgUrl="",n.oExtraParams={Language:n.lang,Bias:160,Geo_Fencing_Coords:n.getGeoFencingCoords.bind(n),Geo_Fencing_Coords_mode:"NOOP",Geo_Fencing_Radius:n.getGeoFencingRadius.bind(n),Geo_Fencing_Radius_mode:"NOOP",Category:n.getOriginCategories.bind(n),Category_mode:"NOOP",limit:n.getOriginLimits.bind(n)},n.dExtraParams={Language:e.lang,Bias:160,Geo_Fencing_Coords:n.getGeoFencingCoords.bind(n),Geo_Fencing_Coords_mode:"NOOP",Geo_Fencing_Radius:n.getGeoFencingRadius.bind(n),Geo_Fencing_Radius_mode:"NOOP",Coords:n.getCoords.bind(n),Coords_mode:"DETECT",AID:n.getOriginId.bind(n),AID_mode:"EXACT",Category:n.getDestinationCategories.bind(n),Category_mode:"NOOP",limit:n.getDestinationLimits.bind(n)},n.selectTransferType&&""===n.selectTransferType.value&&(n.selectTransferType.value=7),n.idSuggestOrigen=document.getElementById("idsuggestOrigen"),n.errorOrigin=document.getElementById("suggestOrigenError")?document.getElementById("suggestOrigenError").innerHTML:"",n.originCoords=document.getElementById("coordenadasOrigenFormateadas"),n.originHubType=document.getElementById("originHubType"),n.originTypes=document.getElementById("originTypes"),n.originAddr=document.getElementById("originAddr"),n.placeOriginId=document.getElementById("placeIdOrigen"),n.placeOriginCoords=document.getElementById("placeOrigenCoords"),n.originGooglePlace=
1document.getElementById("originGooglePlace"),n.idSuggestDestino=document.getElementById("idsuggestDestino"),n.errorDestination=document.getElementById("suggestDestinoError")?document.getElementById("suggestDestinoError").innerHTML:"",n.destinationCoords=document.getElementById("coordenadasDestinoFormateadas"),n.destinationHubType=document.getElementById("destinationHubType"),n.destinationTypes=document.getElementById("destinationTypes"),n.destinationAddr=document.getElementById("destinationAddr"),n.placeDestinationId=document.getElementById("placeIdDestino"),n.placeDestinationCoords=document.getElementById("placeDestinoCoords"),n.destinationGooglePlace=document.getElementById("destinationGooglePlace"),n.idPoi=document.getElementById("idPoi"),n.clearSuggestBtns=document.querySelectorAll(".suggest-remove"),n.closeBtns=document.querySelectorAll(".closePop"),n.txtPaxCards=document.getElementById("fakePax"),n.txtPaxInput=document.getElementById("fakePaxInput"),n.errorPax=document.getElementById("errorPassengers"),n.error2Pax=document.getElementById("passengersError"),n.additionalLuggageLink=document.getElementById("additionalLuggageLink"),n.addExtraBtns=document.querySelectorAll("#extras-popup .plus"),n.removeExtraBtns=document.querySelectorAll("#extras-popup .minus"),n.removeExtraFromListBtns=document.querySelectorAll("#selectedExtrasList .removeExtraFromList"),n.fillBookingData(),n}return r(i,t),c(i,[{key:"fillBookingData",value:function(){var e=this,t=this.bookingData;void 0!==t&&""!==t&&null!==t&&(this.originSelectedTable=t.origin.table,this.originIsHub=t.origin.isHub,this.destinationSelectedTable=t.destination.table,this.destinationIsHub=t.destination.isHub,this.oneWay=!t.roundTrip,this.quoteSelectedTransferType=Number.parseInt(t.transferType),this.originSelectedId=t.origin.id,this.originSelected=this.decodeHtml(t.origin.name),this.originLat=t.origin.latitude,this.originLng=t.origin.longitude,this.originSelectedTable=t.origin.table,this.destinationSelectedId=t.destination.id,this.destinationSelected=this.decodeHtml(t.destination.name),this.destinationLat=t.destination.latitude,this.destinationLng=t.destination.longitude,this.destinationSelectedTable=t.destination.table,this.editionOriginTypes=t.origin.hasOwnProperty("googleTypes")?t.origin.googleTypes:null,this.editionPlaceOriginId=t.origin.hasOwnProperty("googlePlaceId")?t.origin.googlePlaceId:null,this.editionDestinationTypes=t.destination.hasOwnProperty("googleTypes")?t.destination.googleTypes:null,this.editionPlaceDestinationId=t.destination.hasOwnProperty("googlePlaceId")?t.destination.googlePlaceId:null,"editRide"!==e.currentRoute&&"_quoteLogHerramienta"!==e.currentRoute||(this.fillListExtras(),this.oneWay?this.journeyType(this.formID,"oneWay"):this.journeyType(this.formID,"roundTrip"),this.quoteSelectedTransferType>=1&&this.quoteSelectedTransferType<=8&&(this.selectTransferType.value=this.quoteSelectedTransferType,this.fillCalendarTexts()),this.idSuggestOrigen.value=this.originSelectedId,this.idSuggestDestino.value=this.destinationSelectedId,this.suggestOrigen.value=this.originSelected,this.suggestDestino.value=this.destinationSelected,this.showClearBtn("suggestOrigen"),this.showClearBtn("suggestDestino"),this.originTable.value=this.originSelectedTable,this.destinationTable.value=this.destinationSelectedTable,this.isHubOrigin.value=this.originIsHub,this.isHubDestination.value=this.destinationIsHub,this.placeOriginId&&(this.placeOriginId.value=this.editionPlaceOriginId),this.placeOriginCoords&&(this.placeOriginCoords.value=this.originLat+","+this.originLng),this.placeDestinationId&&(this.placeDestinationId.value=this.editionPlaceDestinationId),this.placeDestinationCoords&&(this.placeDestinationCoords.value=this.destinationLat+","+this.destinationLng),this.originGooglePlace=t.origin.hasOwnProperty("googlePlaceData")?t.origin.googlePlaceData:"",this.destinationGooglePlace=t.destination.hasOwnProperty("googlePlaceData")?t.destination.googlePlaceData:"")),this.events(),this.jQueryEvents();var i=this.getQueryVariable("mt");1!==Number.parseInt(i)&&this.exorbyteEvents()}},{key:"events",value:function(){var t=this,i=this,n=void 0,s=this.getQueryVariable("l");if(this.formID){!1!==s&&1===Number.parseInt(s)&&(this.log=!0),this.hasCalendars&&this.fillCalendarTexts();var a=this.getQueryVariable("mt");if(this.isMobile){var r=this.validateSuggest("Origen"),o=this.validateSuggest("Destino");(r||o)&&1!==Number.parseInt(a)&&this.formBody.classList.remove("formBodyHidden")}if(this.suggestOrigen&&(this.suggestOrigen.addEventListener("focus",function(){l.a.intoView(i.suggestOrigen)},!1),this.suggestOrigen.addEventListener("blur",function(){t.hideFormError.bind(t,t.suggestOrigen.getAttribute("id"))},!1),this.suggestOrigen.addEventListener("paste",this.limpiarHiddenOrigen.bind(this),!1),this.suggestOrigen.addEventListener("keypress",this.showClearBtn.bind(this,this.suggestOrigen.getAttribute("id")),!1),this.suggestOrigen.onkeydown=function(n){t.comprobarLimpiarHiddenOrigen(t.suggestOrigen.getAttribute("id")),e.clearTimeout(i.timeoutSuggest),i.timeoutSuggest=setTimeout(i.checkExoDivExists.bind(i),1500)}),this.suggestDestino&&(this.suggestDestino.addEventListener("focus",function(){l.a.intoView(i.suggestDestino)},!1),this.suggestDestino.addEventListener("blur",function(){t.hideFormError.bind(t,t.suggestDestino.getAttribute("id"))},!1),this.suggestDestino.addEventListener("paste",this.limpiarHiddenDestino.bind(this),!1),this.suggestDestino.addEventListener("keyup",this.comprobarLimpiarHiddenDestino.bind(this,this.suggestDestino.getAttribute("id")),!1),this.suggestDestino.addEventListener("keypress",this.showClearBtn.bind(this,this.suggestDestino.getAttribute("id")),!1),this.suggestDestino.onkeyup=function(t){e.clearTimeout(i.timeoutSuggest),i.timeoutSuggest=setTimeout(i.checkExoDivExists.bind(i),1500)}),this.additionalLuggageLink&&this.additionalLuggageLink.addEventListener("click",this.togglePopup.bind(this,"extras-popup"),!1),this.txtPaxCards&&this.txtPaxCards.addEventListener("click",this.togglePopup.bind(this,"pax-popup"),!1),this.hasCalendars){if(this.switcher&&this.switcher.addEventListener("change",function(e){e.preventDefault(),i.toggleJourneyType.call(i)},!1),this.outboundDateBox&&this.outboundDateBox.addEventListener("click",this.togglePopup.bind(this,"cal-pop-out"),!1),this.outboundHourBox&&this.outboundHourBox.addEventListener("click",this.togglePopup.bind(this,"cal-pop-out"),!1),this.outboundHour&&this.outboundHour.addEventListener("change",this.checkTimeValue.bind(this,this.outboundHour),!1),this.outboundMins&&this.outboundMins.addEventListener("change",this.checkTimeValue.bind(this,this.outboundMins),!1),this.returnDateBox&&this.returnDateBox.addEventListener("click",this.togglePopup.bind(this,"cal-pop-ret"),!1),this.returnHourBox&&this.returnHourBox.addEventListener("click",this.togglePopup.bind(this,"cal-pop-ret"),!1),this.returnHour&&this.returnHour.addEventListener("change",this.checkTimeValue.bind(this,this.returnHour),!1),this.returnMins&&this.returnMins.addEventListener("change",this.checkTimeValue.bind(this,this.returnMins),!1),this.selectTimeBtns)for(n=0;n<this.selectTimeBtns.length;n++)this.selectTimeBtns[n].addEventListener("change",this.checkCorrectTime.bind(this,this.selectTimeBtns[n]),!1);if(this.toggleCalendarBtns){var d;for(n=0;n<this.toggleCalendarBtns.length;n++)d=this.toggleCalendarBtns[n],d.classList.contains("outbound")?d.addEventListener("click",this.togglePopup.bind(this,"cal-pop-out"),!1):d.addEventListener("click",this.togglePopup.bind(this,"cal-pop-ret"),!1)}}if(this.searchBtn&&this.searchBtn.addEventListener("click",this.validateSearchForm.bind(this),!1),this.form&&this.form.addEventListener("submit",this.validateSearchForm.bind(this),!1),this.clearSuggestBtns)for(n=0;n<this.clearSuggestBtns.length;n++){var u=this.clearSuggestBtns[n].previousElementSibling,c=u.getAttribute("id");"suggestOrigen"===c?(this.clearSuggestBtns[n].addEventListener("click",this.limpiarHiddenOrigen.bind(this),!1),this.clearSuggestBtns[n].addEventListener("click",this.emptyField.bind(this,this.suggestOrigen.getAttribute("id")),!1)):(this.clearSuggestBtns[n].addEventListener("click",this.limpiarHiddenDestino.bind(this),!1),this.clearSuggestBtns[n].addEventListener("click",this.emptyField.bind(this,this.suggestDestino.getAttribute("id")),!1))}if(this.closeBtns)for(n=0;n<this.closeBtns.length;n++)this.closeBtns[n].addEventListener("click",this.closePopup.bind(this),!1);if(this.addPaxBtns)for(n=0;n<this.addPaxBtns.length;n++)this.addPaxBtns[n].addEventListener("click",this.addPassenger.bind(this,this.addPaxBtns[n]),!1);if(this.removePaxBtns)for(n=0;n<this.removePaxBtns.length;n++)this.removePaxBtns[n].addEventListener("click",this.removePassenger.bind(this,this.removePaxBtns[n]),!1);if(this.addExtraBtns)for(n=0;n<this.addExtraBtns.length;n++)this.addExtraBtns[n].addEventListener("click",this.addExtra.bind(this,this.addExtraBtns[n]),!1);if(this.removeExtraBtns)for(n=0;n<this.removeExtraBtns.length;n++)this.removeExtraBtns[n].addEventListener("click",this.removeExtra.bind(this,this.removeExtraBtns[n]),!1);if(this.removeExtraFromListBtns)for(n=0;n<this.removeExtraFromListBtns.length;n++)this.removeExtraFromListBtns[n].addEventListener("click",this.removeExtraFromList.bind(this,this.removeExtraFromListBtns[n]),!1)}}},{key:"exorbyteEvents",value:function(){var t=this;$exoJ(document).ready(function(i){t.timeout=setTimeout(t.onResize,400),window.onresize=function(){clearTimeout(t.timeout),t.timeout=setTimeout(t.onResize,400),t.onResize()},-1!==t.routesExo.indexOf(t.currentRoute)&&(e.getEcsServers(e.exoServersUrl),t.exoInitSuggest(i))})}},{key:"jQueryEvents",value:function(){var e=this;n(function(){n(e.searchFieldPathOrigen+","+e.searchFieldPathDestino).keydown(function(e){if(13===Number.parseInt(e.keyCode))return e.preventDefault(),!1}),"shuttledirect"===e.project&&n('[data-toggle="popover"]').popover(),e.hasCalendars&&(n(".changedate").click(function(){n(this).parent().next().slideDown()}),n("#showSingle").datepicker({inline:!0,altField:"#fechaIda",dateFormat:"dd/mm/yy",minDate:0,maxDate:"+1y",defaultDate:"+3d",showOtherMonths:!0,selectOtherMonths:!0,numberOfMonths:1,onSelect:function(t,i){var s=new Date(n(this).datepicker("getDate")),a=new Date(s),r=new Date(s);a.setDate(s.getDate()),r.setDate(s.getDate()+7),n("#showReturn").datepicker("setDate",r).datepicker("option","minDate",a),e.viewportMobile&&n(this).slideUp()}}),n("#showReturn").datepicker({inline:!0,altField:"#fechaVuelta",dateFormat:"dd/mm/yy",defaultDate:"+7d",minDate:"+2d",maxDate:"+1y",showOtherMonths:!0,selectOtherMonths:!0,numberOfMonths:1,onSelect:function(t,i){n(this).datepicker("refresh"),e.viewportMobile&&n(this).slideUp("slow")},beforeShowDay:function(e){var t=n("#showSingle").datepicker("getDate"),i=n(this).datepicker("getDate");if(t&&i){var s=+t.getTime(),a=+i.getTime(),r=+e.getTime();if(s===r)return[!0,"hightlight highlight-start",""];if(s<r&&r<a)return[!0,"hightlight highlight-between",""];if(a===r)return[!0,"hightlight highlight-end",""]}return[!0,""]}}),"editRide"!==e.currentRoute&&"_quoteLogHerramienta"!==e.currentRoute||(void 0!==e.outboundDate&&null!==e.outboundDate&&""!==e.outboundDate&&n("#showSingle").datepicker("setDate",e.outboundDate),void 0!==e.returnDate&&null!==e.returnDate&&""!==e.returnDate&&n("#showReturn").datepicker("setDate",e.returnDate),n("#showReturn").datepicker("option","minDate",n("#showSingle").datepicker("getDate")))),n(document).mouseup(function(t){var i=n(".popcontainer");if(i.is(":visible")){var s=["fechaIda","horaIda","fakePaxInput","fechaVuelta","horaVuelta","additionalLuggageLink"];i.is(t.target)||0!==i.has(t.target).length||-1!==n.inArray(t.target.id,s)?-1!==n.inArray(t.target.id,s)&&("fechaIda"===t.target.id||"horaIda"===t.target.id?i.not("#cal-pop-out").hide():"fechaVuelta"===t.target.id||"horaVuelta"===t.target.id?i.not("#cal-pop-ret").hide():"fakePaxInput"
1===t.target.id?i.not("#pax-popup").hide():"additionalLuggageLink"===t.target.id&&i.not("#extras-popup").hide()):i.hide(),"alpline"===e.project&&e.formParentContainer&&(e.formParentContainer.style.zIndex=50)}})})}},{key:"getGeoFencingCoords",value:function(){return this.GeoFencingCoords}},{key:"getGeoFencingRadius",value:function(){return this.GeoFencingRadius}},{key:"getOriginCategories",value:function(){return this.originCategories}},{key:"getOriginLimits",value:function(){return this.originLimits}},{key:"getOriginId",value:function(){return this.originId}},{key:"getOriginParams",value:function(){return this.oParams}},{key:"getOriginExtraParams",value:function(){return this.oExtraParams}},{key:"getDestinationCategories",value:function(){return this.destinationCategories}},{key:"getDestinationLimits",value:function(){return this.destinationLimits}},{key:"getDestinationParams",value:function(){return this.dParams}},{key:"getDestinationExtraParams",value:function(){return this.dExtraParams}},{key:"resetExtraParams",value:function(){this.resetOriginExtraParams(),this.resetDestinationExtraParams()}},{key:"resetOriginExtraParams",value:function(){this.originCategories="Airport-Train-Port-Hotel-City Centre-Place",this.originLimits="3-2-2-3-3-3"}},{key:"resetDestinationExtraParams",value:function(){1===this.isHubOrigin?(this.destinationCategories="City Centre-Hotel-Airport-Train-Port-Place",this.destinationLimits="3-3-3-3-2-2"):(this.destinationCategories="Airport-Train-Port-Hotel-City Centre-Place",this.destinationLimits="3-2-2-3-3-3")}},{key:"distance",value:function(){var e,t,i,n,s,a;this.isEmpty(this.originCoords.value)||this.isEmpty(this.destinationCoords.value)?this.isEmpty(this.originCoords.value)?this.isEmpty(this.destinationCoords.value)?(s=this.placeOriginCoords.value.split(","),e=s[0],i=s[1],a=this.placeDestinationCoords.value.split(","),t=s[0],n=s[1]):(s=this.destinationCoords.value.split(","),t=s[0]/1e5,n=s[1]/1e5,a=this.placeOriginCoords.value.split(","),e=a[0],i=a[1]):(s=this.originCoords.value.split(","),e=s[0]/1e5,i=s[1]/1e5,a=this.placeDestinationCoords.value.split(","),t=a[0],n=a[1]):(s=this.originCoords.value.split(","),e=s[0]/1e5,i=s[1]/1e5,a=this.destinationCoords.value.split(","),t=a[0]/1e5,n=a[1]/1e5);var r=Math.PI*e/180,o=Math.PI*t/180,l=(Math.PI,Math.PI,i-n),d=Math.PI*l/180,u=Math.sin(r)*Math.sin(o)+Math.cos(r)*Math.cos(o)*Math.cos(d);return u=Math.acos(u),u=180*u/Math.PI,u=60*u*1.1515}},{key:"slug",value:function(e){var t="";return t=e.trim().replace(/[^a-z0-9-]/gi,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),t.toLowerCase()}},{key:"decodeHtml",value:function(e){e=decodeURIComponent((e+"").replace(/\+/g,"%20"));var t=document.createElement("textarea");return t.innerHTML=e,t.value}},{key:"getQueryVariable",value:function(e){for(var t=window.location.search.substring(1),i=t.split("&"),n=0;n<i.length;n++){var s=i[n].split("=");if(s[0]===e)return s[1]}return!1}},{key:"showFormFields",value:function(e,t,i){var n;if("standard"===e){if(t)for(n=0;n<t.length;n++)t[n].style.display="block";if(i)for(n=0;n<i.length;n++)i[n].style.display="none"}else{if(t)for(n=0;n<t.length;n++)t[n].style.display="none";if(i)for(n=0;n<i.length;n++)i[n].style.display="block"}}},{key:"getIcon",value:function(e){var t;switch(e){case"airport":t='<i class="fa fa-plane"></i> ';break;case"train":t='<i class="fa fa-train"></i> ';break;case"port":t='<i class="fa fa-ship"></i> ';break;case"hotel":t='<i class="fa fa-bed"></i> ';break;case"city-centre":case"place":t='<i class="fa fa-map-marker"></i> '}return t}},{key:"getCoords",value:function(){return this.originCoords.value}},{key:"getCoords2",value:function(){return this.destinationCoords.value}},{key:"formatItem",value:function(e,t,i,n,s){var a="cat_1"===e.SN_params,r=e.Category.trim(),o=a?"":this.getIcon(this.slug(r)),l=e.Brand.trim(),d=e.Image.trim(),u=""===e.Bias||isNaN(e.Bias)?"":e.Bias.trim(),c="",h=void 0,g="";return""!==l&&this.useGooglePlaces&&""!==u&&(l+=", "+u),""!==l&&(d=", "+d),1===Number.parseInt(e.Price)&&(c=' <span class="label label-success">'+this.popularLabel+"</span>"),h=a?r:e.ecs_q,a?(h=this.translateCategory(h),"Place"===r&&(h+='  <span class="googleLogo"></span>'),g='<div class="result-category cat_1 '+this.slug(r)+'">',g+='<span class="name">'+h+"</span>",g+="</div>"):(g+='<div class="location">',g+='<span class="name">'+o+" "+h+"</span>","Place"!==r&&(g+='<span class="where">, '+l+d+"</span>"),g+=c,g+="</div>"),g.trim()}},{key:"translateCategory",value:function(e){var t="";switch(e){case"Airport":t=Translator.trans("Airport",{},"formJs");break;case"Train":t=Translator.trans("Train",{},"formJs");break;case"Port":t=Translator.trans("Port",{},"formJs");break;case"Hotel":t=Translator.trans("Hotel",{},"formJs");break;case"City Centre":t=Translator.trans("City Centre",{},"formJs");break;case"Place":t=Translator.trans("Place",{},"formJs")}return t}},{key:"shuttleDirectPreprocess",value:function(e){var t=this,i=document.activeElement,n=[],s=[],a=[],r={},o=void 0,l=["ChIJkU9wkBYXuxIRrq7C76IUWEY","ChIJR8pCNAujyhQRvjpuxCATpQ0","ChIJzX2PsZURYw0RNUE4yw8ZksI","ChIJVVVVuclPYg0RikZNj_ji4Z8"];for(t.log&&console.log("Preprocessing rows",e),o=0;o<e.length;o++){var d=e[o],u=d.SN_params.trim(),c=d.Category.trim(),h=void 0;t.log&&console.log("Looping row",d),""===u&&"Place"===c&&(h=d.AID,a.push(h))}r.ids=a.join(","),t.log&&(console.log("places ids returned by exorbyte"),console.log(r));var g=[].concat(t.googlePlacesToRemove,l);for(t.log&&(console.log("checking active input is destination: "+("suggestDestino"===i.id
1)),console.log("checking active input is origin: "+("suggestOrigen"===i.id))),o=0;o<e.length;o++){var p=e[o],m=p.SN_params.trim(),f=p.Category.trim(),v=p.AID.trim();""===m&&"Place"===f&&-1!==g.indexOf(v)&&n.push(o)}for(n.length>0&&(t.log&&(console.log("----------------------------------------"),console.log("Proceed to remove elements that resulted in a reflexive route or were bad google places"),console.log("Total results returned by Exorbyte: "+e.length)),n.forEach(function(i,n){t.log&&console.log("position to be removed from rows: "+i),e.splice(i,1),t.log&&console.log("Results length after removing position "+i+": "+e.length)}),t.log&&console.log("----------------------------------------")),o=0;o<e.length;o++){var y=e[o],k=y.SN_params.trim(),b=y.Category.trim();if("cat_1"===k)if(t.log&&(console.log("Checking if category "+b+" is orphan..."),console.log("Position of the category header in results: "+o)),o+1<e.length){var D=e[o+1];D.Category.toLowerCase().trim()!==b.toLowerCase()&&(t.log&&console.log("Category "+b+" is orphan!!!",D,"result of comparison: "+D.Category.toLowerCase().trim()!==b.toLowerCase()),s.push(o))}else t.log&&console.log("Category "+b+" is NOT orphan!!!")}s.length>0&&(t.log&&(console.log("----------------------------------------"),console.log("Proceed to remove orphan categories")),s.forEach(function(i,n){t.log&&console.log("category to be removed from rows: "+i),e.splice(i,1),t.log&&console.log("Results length after removing category in position "+i+": "+e.length)}),t.log&&console.log("----------------------------------------"))}},{key:"clickFirstResultOfCategory",value:function(t){var i=t?this.slug(t):"",n=e.$exoJ(".exsg_results > ul"),s=null,a=null,r=void 0;this.log&&console.log("------ clickFirstResultOfCategory -------"),n.length&&(r=n.find("> li"),r.length&&r.each(function(t,n){var a=e.$exoJ(n);""!==i?a.find("."+i).length>0&&a.next().length&&(s=a.next()):1===t&&(s=a)})),null!==s&&(this.log&&(console.log(s.find(".name").html()),this.logDivEvents(s.find(".exsg_item"))),a=s.find(".exsg_item"),a.length>0&&a.click()),this.log&&console.log("-----------------------")}},{key:"shuttleDirectResult",value:function(e,t,i,s){var a=this,r=null,o="",l="",d=this.idPoi.value,u=this.originTable.value,c=this.destinationTable.value,h=e.hasOwnProperty("target")?e.target:e,g=h.id,p=this.searchFieldPathOrigen.replace("#",""),m=this.searchFieldPathDestino.replace("#",""),f=this.idSuggestOrigen,v=this.idSuggestDestino,y=this.selectTransferType.value,k=document.getElementById("suggestOrigenError"),b=document.getElementById("suggestDestinoError"),D=0,_="C",T=!1,w=!0,x=void 0,C=void 0,I=t.Category.trim(),E=t.Display.trim(),P=t.ecs_q.trim();return"cat_1"===t.SN_params.trim()?(h.value="",this.log&&(console.log("------ Selected item -------"),console.log("It is a category header, so we try to select first result of this category"),console.log("----------------------------")),this.clickFirstResultOfCategory(I)):(this.log&&(console.log("------ Selected item -------"),console.log(t),console.log("----------------------------")),h.value=""!==E?E:P,"Place"===I?(x=t.AID.trim(),this.log&&console.log("Calling google API to grab details"),n.post(Routing.generate("_gPlacesDetails",{}),{placeID:x,p:this.proxyGPlaces}).done(function(e){a.log&&(console.log("------ Google data for "+x+" -------"),console.log(e),console.log("-----------------------------------------------"));var t=e,i=t.result.geometry.location.lat,s=t.result.geometry.location.lng,r=i+","+s,o=t.result.hasOwnProperty("types")?t.result.types:[],l=P,d=t.result.formatted_address,u={type:g===p?"origen":"destino",formattedAddress:d,latitude:i,longitude:s,placeId:x,plusCode:t.result.hasOwnProperty("plus_code")&&t.result.plus_code.hasOwnProperty("global_code")?t.result.plus_code.global_code:"",types:o};o.length>0&&(o.includes("lodging")||o.includes("bar")||o.includes("bus_station")||o.includes("transit_station")||o.includes("point_of_interest")||o.includes("night_club")||o.includes("supermarket")||o.includes("store"))&&(l=t.result.name+"|",l+=d),""!==l&&(l=l.replace(/"/g,'\\"')),_=String(a.mapGPlacesTypes(o)),g===p?(a.log&&console.log("Origin field checks"),a.selectTransferType.value=7,"A"===_?a.selectTransferType.value=1:"R"===_&&(a.selectTransferType.value=3),a.originHubType.value="C"!==_?_:"",a.rellenarHidden(a.formID,"coordenadasOrigenFormateadas",""),a.rellenarHidden(a.formID,"placeOrigenCoords",r),a.rellenarHidden(a.formID,"tablaOrigen",""),a.originTypes.value=o.length>0?o.toString():"route",a.originAddr.value=l,a.rellenarHidden(a.formID,"idsuggestOrigen",""),a.rellenarHidden(a.formID,"placeIdOrigen",x),a.originId=x,a.originGooglePlace.value=JSON.stringify(u),"A"!==_&&"R"!==_&&(a.log&&console.log("2nd test to check if selected place is a known hub"),n.ajax({type:"POST",url:Routing.generate("_checkPlaceIsHub",{}),data:"coords="+r,dataType:"json",beforeSend:function(e,t){null!==a.pickstack&&""!==a.pickstack&&e.setRequestHeader("x-pickstack",a.pickstack)},success:function(e){if(a.log&&(console.log(e),console.log(r)),e.mapped){switch(e.type){case"A":a.selectTransferType.value=1,a.originTypes.value=a.originTypes.value+",airport";break;case"R":a.selectTransferType.value=3,a.originTypes.value=a.originTypes.value+",train_station";break;case"P":a.selectTransferType.value=5,a.originTypes.value=a.originTypes.value+",port"}a.originHubType.value=e.type,a.isHubOrigin.value=1}a.hasCalendars&&a.fillCalendarTexts()}}))):(a.destinationGooglePlace.value=JSON.stringify(u),a.log&&(console.log("--------------------------"),console.log("Destination field checks"),console.log("2nd test to check if destination selected is a known hub")),n.ajax({type:"POST",url:Routing.generate("_checkPlaceIsHub",{}),data:"coords="+r,dataType:"json",beforeSend:function(e,t){null!==a.pickstack&&""!==a.pickstack&&e.setRequestHeader("x-pickstack",a.pickstack)},success:function(e){a.log&&(console.log(e),console.log(r));var t=1!==Number.parseInt(a.isHubOrigin.value)&&-1===a.originTypes.value.indexOf("airport")&&-1===a.originTypes.value.indexOf("train");if(e.mapped)a.log&&console.log("Destination mapped as a hub"),a.destinationTypes.value+=""!==a.destinationTypes.value?",":"",t?(a.log&&(console.log("Origin was not a hub"),console.log("We then modify transfer type from "+a.selectTransferType.value)),"A"===e.type?(a.selectTransferType.value=2,a.destinationTypes.value+="airport"):"R"===e.type?(a.selectTransferType.value=4,a.destinationTypes.value+="train_station"):"P"===e.type?(a.selectTransferType.value=6,a.destinationTypes.value+="port",_="P"):a.selectTransferType.value=7,a.log&&console.log("to "+a.selectTransferType.value)):(a.log&&console.log("Hub-to-Hub"),"A"===e.type?a.destinationTypes.value+="airport":"R"===e.type?a.destinationTypes.value+="train_station":"P"===e.type&&(a.destinationTypes.value+="port",_="P")),a.destinationHubType.value=e.type,a.isHubDestination.value=1;else{if(a.destinationHubType.value="C"!==_?_:"",a.destinationTypes.value=o.length>0?o.toString():"route",a.isHubDestination.value=0,t)a.selectTransferType.value=7;else{var i=a.originHubType.value;"A"===i?a.selectTransferType.value=1:"R"===i?a.selectTransferType.value=3:"P"===i&&(a.selectTransferType.value=5)}a.log&&(console.log("Destination not mapped as a hub"),console.log("Setting transfer type to: "+a.selectTransferType.value))}a.rellenarHidden(a.formID,"coordenadasDestinoFormateadas",""),a.rellenarHidden(a.formID,"placeDestinoCoords",r),a.rellenarHidden(a.formID,"tablaDestino",""),a.destinationAddr.value=l,a.rellenarHidden(a.formID,"idsuggestDestino",""),a.rellenarHidden(a.formID,"placeIdDestino",x),a.checkDistance(),a.hasCalendars&&a.fillCalendarTexts()}}))})):(this.log&&(console.log("Selected row is not a google place"),console.log("Display: "+t.Display,"SN_value: "+P)),r=t.AID.trim().split("-"),o=r[0],l=r[1],"Airport"===I||"Port"===I||"Train"===I?(D=1,"Airport"===I?(_="A",this.selectTransferType.value="suggestOrigen"===g?1:2):"Port"===I?(_="P",this.selectTransferType.value="suggestOrigen"===g?5:6):"Train"===I&&(_="R",this.selectTransferType.value="suggestOrigen"===g?3:4)):g===p&&(this.selectTransferType.value=7),g===p?(f&&(this.originTypes.value="",this.originAddr.value="",this.originGooglePlace.value="",this.rellenarHidden(this.formID,"idsuggestOrigen",o),this.rellenarHidden(this.formID,"hubOrigen",D),this.originId=null,this.rellenarHidden(a.formID,"placeIdOrigen",""),this.rellenarHidden(a.formID,"placeOrigenCoords",""),this.originHubType.value="C"!==_?_:"",this.originCoords&&this.rellenarHidden(this.formID,"coordenadasOrigenFormateadas",t.URL),this.rellenarHidden(this.formID,"tablaOrigen",l)),C=Number.parseInt(this.selectTransferType.value),T=2===C||4===C||6===C||7===C,w=1===C||3===C||5===C,"Hotel"===I?this.rellenarHidden(this.formID,"idPoi",o):(w&&""===d||""!==d&&"Poi"!==c)&&this.rellenarHidden(this.formID,"idPoi","-1"),k&&"block"===k.style.display&&(k.style.display="none")):g===m&&(v&&(this.destinationTypes.value="",this.destinationAddr.value="",this.destinationGooglePlace.value="",this.destinationHubType.value="C"!==_?_:"",this.rellenarHidden(this.formID,"idsuggestDestino",o),this.rellenarHidden(this.formID,"hubDestino",D),this.rellenarHidden(this.formID,"placeIdDestino",""),this.rellenarHidden(this.formID,"placeDestinoCoords",""),this.destinationCoords&&this.rellenarHidden(this.formID,"coordenadasDestinoFormateadas",t.URL),this.rellenarHidden(this.formID,"tablaDestino",l),b&&"block"===b.style.display&&(b.style.display="none")),""===f.value&&("A"===_?this.selectTransferType.value=2:"R"===_?this.selectTransferType.value=4:"P"===_?this.selectTransferType.value=6:1!==Number.parseInt(this.isHubOrigin.value)&&-1===this.originTypes.value.indexOf("airport")&&-1===this.originTypes.value.indexOf("train")&&-1===this.originTypes.value.indexOf("port")&&(this.selectTransferType.value=7)),1===Number.parseInt(this.isHubOrigin.value)&&1===Number.parseInt(this.isHubDestination.value)&&(this.log&&(console.log("hub to hub: restauring initial transfer type value"),console.log("from: "+this.selectTransferType.value+" to: "+y)),this.selectTransferType.value=y),C=Number.parseInt(this.selectTransferType.value),"Hotel"===I&&7===C?-1!==Number.parseInt(d)?(this.log&&console.log("hotel-hotel: restore idPoi to -1 and treating as point-to-point"),this.rellenarHidden(this.formID,"idPoi",-1),n.ajax({type:"POST",url:Routing.generate("_accommodation",{}),data:"id="+d,dataType:"json",beforeSend:function(e,t){null!==a.pickstack&&""!==a.pickstack&&e.setRequestHeader("x-pickstack",a.pickstack)},success:function(e){a.log&&(console.log("getting origin accommodation "+d),console.log(e));var t=a.originCoords.value.split(","),i=void 0,n=void 0,s=void 0,r=void 0,o=e.hasOwnProperty("town"),l="";""!==e.address&&null!==e.address&&(l+=e.address.trim()),""!==e.number&&null!==e.number&&(l+=(""!==l?", ":"")+e.number.trim()),a.originHubType.value="",a.originTypes.value="lodging",a.originAddr.value=""!==l?l:o?e.town.name.trim():"",i=t[0]/1e5,n=i.toPrecision(5),s=t[1]/1e5,r=s.toPrecision(5),a.rellenarHidden(a.formID,"placeOrigenCoords",n+","+r),o?(a.rellenarHidden(a.formID,"tablaOrigen","Poblacion"),a.rellenarHidden(a.formID,"idsuggestOrigen",""!==e.town.id&&null!==e.town.id?e.town.id:"")):(a.rellenarHidden(a.formID,"tablaOrigen","Poi"),a.rellenarHidden(a.formID,"idsuggestOrigen",e.id)),a.rellenarHidden(a.formID,"placeIdDestino","")}}),n.ajax({type:"POST",url:Routing.generate("_accommodation",{}),data:"id="+o,dataType:"json",beforeSend:function(e,t){null!==a.pickstack&&""!==a.pickstack&&e.setRequestHeader("x-pickstack",a.pickstack)},success:function(e){a.log&&(console.log("getting destination accommodation "+o),console.log(e));var i=t.URL.split(","),n=void 0,s=void 0,r=void 0,l=void 0,d=e.hasOwnProperty("town"),u="";""!==e.address&&null!==e.address&&(u+=e.address.trim()),""!==e.number&&null!==e.number&&(u+=(""!==u?", ":"")+e.number.trim()),a.destinationHubType.value="",a.destinationTypes.value="lodging",a.destinationAddr.value=""!==u?u:d?e.town.name.trim():"",n=i[0]/1e5,s=n.toPrecision(5),r=i[1]/1e5,l=r.toPrecision(5),a.rellenarHidden(a.formID,"placeDestinoCoords",s+","+l),d?(a.rellenarHidden(a.formID,"tablaDestino","Poblacion"),a.rellenarHidden(a.formID,"idsuggestDestino",""!==e.town.id&&null!==e.town.id?e.town.id:"")):(a.rellenarHidden(a.formID,"tablaDestino","Poi"),a.rellenarHidden(a.formID,"idsuggestDestino",e.id)),a.rellenarHidden(a.formID,"placeIdDestino","")}})):this.rellenarHidden(this.formID,"idPoi",o):(T=2===C||4===C||6===C,w=1===C||3===C||5===C,"Hotel"===I&&w?this.rellenarHidden(this.formID,"idPoi",o):(T&&""===d||""!==d&&"Poi"!==u)&&this.rellenarHidden(this.formID,"idPoi","-1")),this.checkDistance()),this.hasCalendars&&this.fillCalendarTexts())),h.classList.contains("invalid")&&h.classList.remove("invalid"),!0}},{key:"mapGPlacesTypes",value:function(e){var t="C";return-1!==e.indexOf("airport")?t="A":-1!==e.indexOf("train_station")&&(t="R"),t}},{key:"fillCalendarTexts",value:function(){var e=parseInt(this.selectTransferType.value),t="",i="",n="",s="",a="",r="";switch(e){case 1:t=Translator.trans("Flight arrival date",{},"formJs"),i=Translator.trans("Flight return date",{},"formJs"),n=Translator.trans("Flight arrival time",{},"formJs"),s=Translator.trans("Flight departure time",{},"formJs"),a=Translator.trans("Please insert the date and time of your flight arrival (not take off), as informed by the airline. The driver will take into account luggage collection and immigration formalities.",{},"formJs"),r=Translator.trans("Please insert the date and time the flight takes off, as informed by the airline. The pick-up time will be calculated automatically taking into account journey time and check-in time at airport.",{},"formJs"),this.originCategories="Airport-Train-Port-Hotel-City Centre-Place",this.originLimits="3-3-2-2-3-2",this.destinationCategories="Hotel-City Centre-Airport-Train-Port-Place",this.destinationLimits="3-3-2-2-3-2";break;case 2:t=Translator.trans("Flight departure date",{},"formJs"),i=Translator.trans("Flight return date",{},"formJs"),n=Translator.trans("Flight departure time",{},"formJs"),s=Translator.trans("Flight arrival time",{},"formJs"),a=Translator.trans("Please insert the date and time the flight takes off, as informed by the airline. The pick-up time will be calculated automatically taking into account journey time and check-in time at airport.",{},"formJs"),r=Translator.trans("Please insert the date and time of your flight arrival (not take off), as informed by the airline. The driver will take into account luggage collection and immigration formalities.",{},"formJs"),this.originCategories="Hotel-City Centre-Airport-Train-Port-Place",this.originLimits="3-3-2-2-3-2",this.destinationCategories="Airport-Train-Port-Hotel-City Centre-Place",this.destinationLimits="3-3-2-2-3-2";break;case 3:case 5:t=Translator.trans("Pick-up date",{},"formJs"),i=Translator.trans("Pick-up date",{},"formJs"),n=Translator.trans("Pick-up time",{},"formJs"),s=Translator.trans("Pick-up time",{},"formJs"),a=Translator.trans("Please insert the date and time you would like to be collected",{},"formJs"),r=Translator.trans("Please insert the date and time you would like to be collected",{},"formJs"),this.originCategories="Airport-Train-Port-Hotel-City Centre-Place",this.originLimits="3-3-2-2-3-2",this.destinationCategories="Hotel-City Centre-Airport-Train-Port-Place",this.destinationLimits="3-3-2-2-3-2";break;case 4:case 6:t=Translator.trans("Pick-up date",{},"formJs"),i=Translator.trans("Pick-up date",{},"formJs"),n=Translator.trans("Pick-up time",{},"formJs"),s=Translator.trans("Pick-up time",{},"formJs"),a=Translator.trans("Please insert the date and time you would like to be collected",{},"formJs"),r=Translator.trans("Please insert the date and time you would like to be collected",{},"formJs"),this.originCategories="Hotel-City Centre-Airport-Train-Port-Place",this.originLimits="3-3-2-2-3-2",this.destinationCategories="Airport-Train-Port-Hotel-City Centre-Place",this.destinationLimits="3-3-2-2-3-2";break;case 7:t=Translator.trans("Pick-up date",{},"formJs"),i=Translator.trans("Pick-up date",{},"formJs"),n=Translator.trans("Pick-up time",{},"formJs"),s=Translator.trans("Pick-up time",{},"formJs"),a=Translator.trans("Please insert the date and time you would like to be collected",{},"formJs"),r=Translator.trans("Please insert the date and tim
1e you would like to be collected",{},"formJs"),this.originCategories="Airport-Train-Port-Hotel-City Centre-Place",this.originLimits="3-2-2-3-3-3",this.destinationCategories="Airport-Train-Port-Hotel-City Centre-Place",this.destinationLimits="3-2-2-3-3-3"}if(1===Number.parseInt(this.isHubOrigin.value)&&1===Number.parseInt(this.isHubDestination.value)&&""!==this.destinationHubType.value)switch(this.destinationHubType.value){case"A":i=Translator.trans("Flight arrival date",{},"formJs"),s=Translator.trans("Flight arrival time",{},"formJs"),r=Translator.trans("Please insert the date and time of your flight arrival (not take off), as informed by the airline. The driver will take into account luggage collection and immigration formalities.",{},"formJs");break;case"P":i=Translator.trans("Pick-up date",{},"formJs"),s=Translator.trans("Pick-up time",{},"formJs"),r=Translator.trans("Please insert the date and time you would like to be collected",{},"formJs");break;case"R":i=Translator.trans("Train return date",{},"formJs"),s=Translator.trans("Train arrival time",{},"formJs"),r=Translator.trans("Please insert the date and time the train arrives at the station. The driver will take into account luggage collection and immigration formalities.",{},"formJs")}this.outboundDateTitle&&(this.outboundDateTitle.textContent=t),this.returnDateTitle&&(this.returnDateTitle.textContent=i),this.outboundTimeTitle&&(this.outboundTimeTitle.textContent=n),this.returnTimeTitle&&(this.returnTimeTitle.textContent=s),this.outboundTimeTxt&&(this.outboundTimeTxt.textContent=a),this.returnTimeTxt&&(this.returnTimeTxt.textContent=r)}},{key:"fillOriginCoordinates",value:function(e){this.suggestDestino.focus(),"iframe"!==this.currentRoute&&l.a.intoView(this.suggestDestino),void 0!==e&&(this.originCoords.value=e.data.URL,this.shuttleDirectResult.call(this,this.suggestOrigen,e.data,"",""))}},{key:"moveToSugg2",value:function(e,t,i){this.suggestDestino.focus(),"iframe"!==this.currentRoute&&l.a.intoView(this.suggestDestino),this.log&&console.log(t),void 0!==t&&(this.originCoords.value=t.URL,this.originId="Place"===t.Category?t.AID:"",this.shuttleDirectResult.call(this,e,t,i,""),""!==this.suggestDestino.innerHTML.trim()&&this.validateOriginDestinationHaveValidContent())}},{key:"moveToSugg3",value:function(e,t,i){this.log&&console.log(t),this.shuttleDirectResult.call(this,e,t,i,""),this.isMobile&&this.formBody.classList.remove("formBodyHidden"),this.validateOriginDestinationHaveValidContent(),this.hasCalendars&&this.outboundDateBox&&(this.outboundDateBox.click(),this.outboundDateBox.focus(),"iframe"!==this.currentRoute&&l.a.intoView(this.outboundDateBox))}},{key:"checkDistance",value:function(){var e=this.distance();e>500&&(this.showDistanceWarning(e),setTimeout(this.removeDistanceWarning,1e4))}},{key:"showDistanceWarning",value:function(e){var t=document.getElementById("formHeader");if(t){var i=document.createElement("div");i.id="warningDistance",i.classList.add("col-xs-12");var n=document.createElement("div");n.classList.add("alert","alert-distance");var s=document.createElement("p");s.textContent=Translator.trans("Remember that you are hiring a ground service (%distance% Km)",{distance:e.toFixed(2)},"formJs"),n.appendChild(s),i.appendChild(n),t.appendChild(i)}}},{key:"removeDistanceWarning",value:function(){var e=document.getElementById("formHeader"),t=document.getElementById("warningDistance");e&&t&&e.removeChild(t)}},{key:"addExtra",value:function(e){var t=e.id,i=t.replace("addExtra",""),n=document.getElementById("extra"+i+"Val"),s=document.querySelector("#extraContainer"+i+" label.extrastext span").textContent;if(n.value=Number(n.value)+1,Number(n.value)>0){var a=t.replace("add","remove");document.getElementById(a).classList.remove("disabled")}this.updateListExtras("add",s,n.value,i,n.id)}},{key:"removeExtra",value:function(e){var t=e.id,i=t.replace("removeExtra",""),n=document.getElementById("extra"+i+"Val"),s=document.querySelector("#extraContainer"+i+" label.extrastext span").textContent;Number(n.value)-1>0?n.value=Number(n.value)-1:(n.value=0,e.classList.add("disabled")),this.updateListExtras("remove",s,n.value,i,n.id)}},{key:"updateListExtras",value:function(e,t,i,n,s){var a=document.getElementById("selectedExtrasList"),r=document.querySelectorAll("ul#selectedExtrasList li");if(r){for(var o=!1,l=0;l<r.length&&!o;l++){var d=r[l];d.id==="selectedExtra"+n&&(o=!0,"remove"===e?d.parentNode.removeChild(d):(d.parentNode.removeChild(d),this.addExtraLiToList(a,n,i,t)))}o||"add"!==e||this.addExtraLiToList(a,n,i,t)}else this.addExtraLiToList(a,n,i,t);this.checkExtrasListLength()}},{key:"addExtraLiToList",value:function(e,t,i,n){var s=document.createElement("li");s.id="selectedExtra"+t,s.classList.add("clearfix");var a=document.createElement("span");a.textContent=i+" x "+n,s.appendChild(a);var r=document.createElement("i");r.classList.add("fa"),r.classList.add("fa-trash-o");var o=document.createElement("a");o.href="#",o.id="removeExtraFromList"+t,o.classList.add("pull-right"),o.classList.add("removeExtraFromList"),o.appendChild(r),s.appendChild(o),o.addEventListener("click",this.removeExtraFromList.bind(this,o),!1),e.appendChild(s)}},{key:"removeExtraFromList",value:function(e,t){t.preventDefault();var i=e.id.replace("removeExtraFromList",""),n=document.querySelector("ul#selectedExtrasList li#selectedExtra"+i);n&&(document.getElementById("extra"+i+"Val").value=0,document.getElementById("removeExtra"+i).classList.add("disabled"),n.parentNode.removeChild(n)),this.checkExtrasListLength()}},{key:"checkExtrasListLength",value:function(){var e=document.getElementById("selectedExtrasList");e.querySelectorAll("li").length>0?e.style.display="block":e.style.display="none"}},{key:"fillListExtras",value:function(){var e=document.getElementsByClassName("inputExtra");if(e){for(var t=document.getElementById("selectedExtrasList"),i=0;i<e.length;i++){var n=e[i];if(Number(n.value)>0){var s=n.id.replace("extra","").replace("Val",""),a=document.querySelector("#extraContainer"+s+" label.extrastext span").textContent;this.addExtraLiToList(t,s,n.value,a)}}this.checkExtrasListLength()}}},{key:"updateFakePaxBox",value:function(e){this.txtPaxInput.value=e}},{key:"errorPassengers",value:function(e){"show"===e?(this.errorPax.style.display="block",this.error2Pax&&(this.error2Pax.style.display="block")):(this.errorPax.style.display="none",this.error2Pax&&(this.error2Pax.style.display="none"))}},{key:"updateStringPassengers",value:function(e,t){var i=e+t;this.txtPaxInput.value=i}},{key:"showClearBtn",value:function(e){var t=document.getElementById(e);if(t){var i=t.parentNode;if(i){var n=i.querySelectorAll(".glyphicon")[0];n&&(""!==t.value?n.style.display="block":n.style.display="none")}}}},{key:"limpiarHiddenOrigen",value:function(){this.idSuggestOrigen.value="",this.isHubOrigin.value="",this.originHubType.value="",("Poi"===this.originTable.value||"Poi"!==this.destinationTable.value&&""===this.originTable.value)&&(this.idPoi.value="-1"),this.originTable.value="",this.originTypes.value="",this.originAddr.value="",this.originCoords.value="",this.placeOriginId.value="",this.placeOriginCoords.value="",this.originGooglePlace.value=""}},{key:"comprobarLimpiarHiddenOrigen",value:function(e){this.log&&console.log("comprobar limpiar hidden origen");var t=document.getElementById(e);t&&""===t.value&&this.limpiarHiddenOrigen()}},{key:"limpiarHiddenDestino",value:function(){this.idSuggestDestino.value="",this.isHubDestination.value="",this.destinationHubType.value="",("Poi"===this.destinationTable.value||"Poi"!==this.originTable.value&&""===this.destinationTable.value)&&(this.idPoi.value="-1"),this.destinationTable.value="",this.destinationTypes.value="",this.destinationAddr.value="",this.destinationCoords.value="",this.placeDestinationId.value="",this.placeDestinationCoords.value="",this.destinationGooglePlace.value=""}},{key:"comprobarLimpiarHiddenDestino",value:function(e){var t=document.getElementById(e);t&&""===t.value&&this.limpiarHiddenDestino()}},{key:"rellenarHidden",value:function(e,t,i){var n=document.querySelector("#"+e+" #"+t);n&&(n.value=i)}},{key:"closePopup",value:function(){var e,t,i=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=document.querySelectorAll(".popcontainer");if(n)for(t=0;t<n.length;t++)"block"===n[t].style.display&&(e=n[t]),n[t].style.display="none";if("destinations"!==window.currentRoute&&"iframe"!==window.currentRoute&&l.a.intoView(this.form),e&&i){var s=e.id,a=this.btnReturn;if("cal-pop-out"===s)if(this.isEmpty(this.outboundHour.value)||this.isEmpty(this.outboundMins.value)){if(this.showPopup(s),this.isEmpty(this.outboundHour.value))return this.show
1FormError("outboundHour"),!1;if("iframe"!==window.currentRoute&&l.a.intoView(this.outboundMins),this.isEmpty(this.outboundMins.value))return this.showFormError("outboundMins"),!1}else a&&a.checked?(this.returnDateBox.click(),"iframe"!==window.currentRoute&&l.a.intoView(this.returnDateBox)):this.txtPaxCards&&(this.txtPaxCards.click(),"iframe"!==window.currentRoute&&l.a.intoView(this.txtPaxCards));else if("cal-pop-ret"===s){if(this.isEmpty(this.returnHour.value)||this.isEmpty(this.returnMins.value)){if(this.showPopup(s),this.isEmpty(this.returnHour.value))return this.showFormError("returnHour"),!1;if("iframe"!==window.currentRoute&&l.a.intoView(this.returnMins),this.isEmpty(this.returnMins.value))return this.showFormError("returnMins"),!1}}else"pax-popup"===s&&(this.checkChildrenAges()?(this.showFormError("children"),this.showPopup(s)):this.btnReturn&&this.btnReturn.classList.contains("active")&&(this.returnCalendar.click(),l.a.intoView(this.returnCalendar)))}}},{key:"toggleAlertValidOriginDestination",value:function(e){var t=Translator.trans("Please enter the full address to receive an accurate price.",{},"formJs"),i=document.getElementById("suggestOrigenError"),n=document.getElementById("suggestDestinoError");e?(i.innerHTML=this.errorOrigin,n.innerHTML=this.errorDestination,this.hideFormError("suggestOrigen"),this.hideFormError("suggestDestino")):(i.innerHTML=t,n.innerHTML=t,this.showFormError("suggestOrigen"),this.showFormError("suggestDestino"))}},{key:"validateOriginDestinationHaveValidContent",value:function(){var e=!0,t=Number.parseInt(this.selectTransferType.value),i=this.idSuggestOrigen.value.trim(),n=this.originTable.value.trim(),s=this.placeOriginId.value.trim(),a=this.idSuggestDestino.value.trim(),r=this.destinationTable.value.trim(),o=this.placeDestinationId.value.trim(),l=i===a,d=n===r,u=-1!==Number.parseInt(this.idPoi.value),c=""!==this.placeOriginId.value.trim()||""!==this.placeDestinationId.value.trim(),h=""!==i&&"-1"!==i&&""!==n&&""!==a&&"-1"!==a&&""!==r&&l&&d||(""===i||"-1"===i)&&(""===a||"-1"===a)&&s===o;return this.log&&(console.log(7===t),console.log("Equals",h),console.log("hasPoi",u),console.log("hasPlace",c)),7===t&&h&&(e=!1),this.toggleAlertValidOriginDestination(e),e}},{key:"validateSuggest",value:function(e){return"Origen"===e&&""!==this.originAddr.value&&""!==this.originTypes.value||"Destino"===e&&""!==this.destinationAddr.value&&""!==this.destinationTypes.value?""!==document.getElementById("suggest"+e).value.trim()&&""!==document.getElementById("place"+e+"Coords").value.trim():""!==document.getElementById("suggest"+e).value.trim()&&""!==document.getElementById("idsuggest"+e).value.trim()&&""!==document.getElementById("hub"+e).value.trim()&&""!==document.getElementById("tabla"+e).value.trim()}},{key:"checkCorrectTime",value:function(e){var t,i="outbound",n=e.id;t=document.getElementById("horaIda"),e.classList.contains("return")&&(i="return",t=document.getElementById("horaVuelta"));var s=document.getElementById(i+"Hour"),a=document.getElementById(i+"Mins");"00"===s.value?(a.options[0].disabled=!0,a.options[1].disabled=!0,0!==a.selectedIndex&&1!==a.selectedIndex||(a.selectedIndex=2)):(a.options[0].disabled=!1,a.options[1].disabled=!1),-1!==n.indexOf("Mins")&&(t.value=s.value+":"+a.value,this.closePopup(),"return"!==i&&(this.txtPaxCards.click(),l.a.intoView(this.txtPaxCards)))}},{key:"validateTime",value:function(){var e=!0;if("vuelta"===this.trip.value){if((this.isEmpty(this.outboundHour.value)||this.isEmpty(this.outboundMins.value))&&(e=!1,this.showPopup("cal-pop-out"),this.isEmpty(this.outboundHour.value)&&this.showFormError("outboundHour"),this.isEmpty(this.outboundMins.value)&&this.showFormError("outboundMins"),!e))return e;if((this.isEmpty(this.returnHour.value)||this.isEmpty(this.returnMins.value))&&(e=!1,this.showPopup("cal-pop-ret"),this.isEmpty(this.returnHour.value)&&this.showFormError("returnHour"),this.isEmpty(this.returnMins.value)&&this.showFormError("returnMins"),!e))return e}else(this.isEmpty(this.outboundHour.value)||this.isEmpty(this.outboundMins.value))&&(e=!1,this.showPopup("cal-pop-out"),this.isEmpty(this.outboundHour.value)&&this.show
1FormError("outboundHour"),this.isEmpty(this.outboundMins.value)&&this.showFormError("outboundMins"));return e}},{key:"validateSearchForm",value:function(t){t.preventDefault(),this.hideFormErrors(),this.closePopup();var i=this.validateSuggest("Origen"),n=this.validateSuggest("Destino"),s=this.validateOriginDestinationHaveValidContent(),a=this.validatePassengers(),r=this.validateTime(),o=this.getQueryVariable("fromAffiliateArea");if(!i)return this.showFormError("suggestOrigen"),!1;if(!n)return this.showFormError("suggestDestino"),!1;if(!s)return this.showFormError("suggestOrigen"),this.showFormError("suggestDestino"),!1;if(!a)return this.showFormError("passengers"),!1;if(r||!this.hasCalendars){var l=e.navigator.userAgent,d=!1;return"iframe"===this.currentRoute&&1!==Number.parseInt(o)&&(l.toLowerCase().indexOf("chrome")>-1||l.toLowerCase().indexOf("safari")>-1?(this.form.target="_top",d=!0):this.form.target="_blank",this.log&&(console.log(l.toLowerCase()),console.log(this.form.target))),this.modal.show(Translator.trans("Please wait...",{},"formJs"),Translator.trans("Searching",{},"formJs")),"shuttledirect"===this.project&&e.dataLayer&&(e.dataLayer.push({event:"search",origin:this.suggestOrigen.value,destination:this.suggestDestino.value,outboundDate:this.outboundDateBox.value,pax:this.txtPaxInput.value,returnDate:"vuelta"===this.trip.value?this.returnDateBox.value:"-",userIsLoggedIn:e.isLoggedIn,page:this.currentRoute,isMobile:this.isMobile,isTablet:this.isTablet,lang:this.lang}),console.log(e.dataLayer)),this.form.submit(),"iframe"!==this.currentRoute||1===Number.parseInt(o)||d||e.location.reload(!0),!0}}},{key:"exoInitSuggest",value:function(t){var i=this;e.exoBridgeParams.url=e.exoAltUrls,e.$exoJ.ecsBridge=e.$exoJ.EcsBridge(e.exoBridgeParams),t.cookie&&t.cookie("exoSearchDisable")||e.suppressExo()||"object"!==u(e.exoSuggestParams)||(e.exoSuggestParams.selectFirst=!0,e.exoSuggestParams.showLogo=!1,e.exoSuggestParams.preprocessResults=this.shuttleDirectPreprocess.bind(this),e.exoSuggestParams.formatHeader=function(e,t){return void 0===e?null:n("<p>"+Translator.trans("Search results",{},"formJs")+" <span>"+e+"</span></p>")},e.exoSuggestParams.formatFooter=function(){return"<p>"+i.poweredByShuttleDirect+"</p>"},e.exoSuggestParams.formatNoResult=function(e){return"<li>"+i.noResultsFound+": "+e+"<li>"},e.exoSuggestParams.formatSuggestItem=this.formatItem.bind(this),e.exoSuggestParams.leftOffset=0,e.exoSuggestParams.width=this.suggestOrigen.offsetWidth,this.oParams=e.exoSuggestParams,this.dParams=e.exoSuggestParams,e.$exoJ(this.searchFieldPathOrigen).ecsSuggest(e.$exoJ.ecsBridge,this.getOriginParams()).ecsSuggSetOptions({extraParams:this.getOriginExtraParams()}).ecsSuggResult(this.moveToSugg2.bind(this)),e.$exoJ(this.searchFieldPathDestino).ecsSuggest(e.$exoJ.ecsBridge,this.getDestinationParams()).ecsSuggSetOptions({extraParams:this.getDestinationExtraParams()}).ecsSuggResult(this.moveToSugg3.bind(this)))}},{key:"checkExoDivExists",value:function(){var t=this,i=n(".exsg_box");if(t.log,i.length){t.log;var s=i.find(".exsg_results ul > li");s.length&&s.each(function(i,n){var s=e.$exoJ(n),a=s.find(".cat_1").length>0,r=void 0;a&&(t.log,r=s.find(".exsg_item"),r.length?(r.addClass("exsg_item--cat1"),t.log&&console.log("Found div",r),r.data("events"),r.unbind(),r.click(function(e){e.preventDefault(),s.next().find(".exsg_item").click()}).keydown(function(e){13!==e.keyCode&&9!==event.keyCode||s.next().find(".exsg_item").click()}).keypress(function(e){13!==e.keyCode&&9!==e.keyCode||s.next().find(".exsg_item").click()}),t.log):t.log&&console.log(".exsg_item not fetched"))})}t.log&&(console.log("Exiting category checker"),console.log("========================================================="))}},{key:"logDivEvents",value:function(t){var i=t.data("events");void 0!==i?(console.log("looping events"),e.$exoJ.each(i,function(t,i){e.$exoJ.each(i,function(e,t){console.log(t)})})):console.log("No events")}}]),i}(d.a);t.a=h}).call(t,i("DuR2"),i("sINv"))},SDgq:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){var t=i("S+Hk"),n=e("html"),s=e("body"),a={project:"shuttledirect",lang:n.attr("lang"),isMobile:""!==n.data("ismobile")&&null!==n.data("ismobile")?n.data("ismobile"):s.data("ismobile"),isTablet:""!==n.data("istablet")&&null!==n.data("istablet")?n.data("istablet"):s.data("istablet"),currentRoute:n.data("route")?n.data("route"):s.data("route"),site:n.data("site")?n.data("site"):s.data("site"),routesExo:["home","destinations","hub","country","destination","transferTo","district","services","region","editRide","_quoteLogHerramienta","iframe","affiliateIframeGeneratorForm","intranet_customers_add_new_service","intranet_reservations_modify","apib2b_form",""],GeoFencingCoords:"4190223,1245607",GeoFencingRadius:8e6,exoProjectId:"4752_Shuttle_Direct_6_2",originCategories:"Airport-Train-Port-Hotel-City Centre-Place",originLimits:"3-3-2-2-3-2",destinationCategories:"Hotel-City Centre-Airport-Train-Port-Place",destinationLimits:"3-3-2-2-3-2",hasCalendars:!0,suggestOrigen:"suggestOrigen",suggestDestino:"suggestDestino",bk:n.data("bk")?n.data("bk"):s.data("bk"),outboundDate:n.data("outbound")?n.data("outbound"):s.data("outbound"),returnDate:n.data("return")?n.data("return"):s.data("return"),gpp:n.data("gpp")?n.data("gpp"):s.data("gpp"),pickstack:n.data("pickstack")?n.data("pickstack"):s.data("pickstack")};new t.a(a)}.call(t,i("sINv"))},"am/A":function(e,t,i){var n,s,a,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};/*! jQuery UI - v1.12.1 - 2017-06-30
2* http://jqueryui.com
3* Includes: widget.js, position.js, keycode.js, widgets/datepicker.js
4* Copyright jQuery Foundation and other contributors; Licensed MIT */
5!function(r){s=[i("sINv")],n=r,void 0!==(a="function"==typeof n?n.apply(t,s):n)&&(e.exports=a)}(function(e){function t(e){for(var t,i;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
vendor: 18,983 bytes, line 5
5ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=n(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",i,function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,s)}function s(){e.datepicker._isDisabledDatepicker(d.inline?d.dpDiv.parent()[0]:d.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function a(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}e.ui=e.ui||{},e.ui.version="1.12.1";var o=0,l=Array.prototype.slice;e.cleanData=function(t){return function(i){var n,s,a;for(a=0;null!=(s=i[a]);a++)try{(n=e._data(s,"events"))&&n.remove&&e(s).triggerHandler("remove")}catch(e){}t(i)}}(e.cleanData),e.widget=function(t,i,n){var s,a,r,o={},l=t.split(".")[0];t=t.split(".")[1];var d=l+"-"+t;return n||(n=i,i=e.Widget),e.isArray(n)&&(n=e.extend.apply(null,[{}].concat(n))),e.expr[":"][d.toLowerCase()]=function(t){return!!e.data(t,d)},e[l]=e[l]||{},s=e[l][t],a=e[l][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new a(e,t)},e.extend(a,s,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(n,function(t,n){return e.isFunction(n)?void(o[t]=function(){function e(){return i.prototype[t].apply(this,arguments)}function s(e){return i.prototype[t].apply(this,e)}return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=s,t=n.apply(this,arguments),this._super=i,this._superApply=a,t}}()):void(o[t]=n)}),a.prototype=e.widget.extend(r,{widgetEventPrefix:s?r.widgetEventPrefix||t:t},o,{constructor:a,namespace:l,widgetName:t,widgetFullName:d}),s?(e.each(s._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,a,i._proto)}),delete s._childConstructors):i._childConstructors.push(a),e.widget.bridge(t,a),a},e.widget.extend=function(t){for(var i,n,s=l.call(arguments,1),a=0,r=s.length;r>a;a++)for(i in s[a])n=s[a][i],s[a].hasOwnProperty(i)&&void 0!==n&&(t[i]=e.isPlainObject(n)?e.isPlainObject(t[i])?e.widget.extend({},t[i],n):e.widget.extend({},n):n);return t},e.widget.bridge=function(t,i){var n=i.prototype.widgetFullName||t;e.fn[t]=function(s){var a="string"==typeof s,r=l.call(arguments,1),o=this;return a?this.length||"instance"!==s?this.each(function(){var i,a=e.data(this,n);return"instance"===s?(o=a,!1):a?e.isFunction(a[s])&&"_"!==s.charAt(0)?(i=a[s].apply(a,r),i!==a&&void 0!==i?(o=i&&i.jquery?o.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+s+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+s+"'")}):o=void 0:(r.length&&(s=e.widget.extend.apply(null,[s].concat(r))),this.each(function(){var t=e.data(this,n);t?(t.option(s||{}),t._init&&t._init()):e.data(this,n,new i(s,this))})),o}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=o++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,i){t._removeClass(i,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,s,a,r=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},n=t.split("."),t=n.shift(),n.length){for(s=r[t]=e.widget.extend({},this.options[t]),a=0;n.length-1>a;a++)s[n[a]]=s[n[a]]||{},s=s[n[a]];if(t=n.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];r[t]=i}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var i,n,s;for(i in t)s=this.classesElementLookup[i],t[i]!==this.options.classes[i]&&s&&s.length&&(n=e(s.get()),this._removeClass(s,i),n.addClass(this._classes({element:n,keys:i,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function i(i,a){var r,o;for(o=0;i.length>o;o++)r=s.classesElementLookup[i[o]]||e(),r=e(t.add?e.unique(r.get().concat(t.element.get())):r.not(t.element).get()),s.classesElementLookup[i[o]]=r,n.push(i[o]),a&&t.classes[i[o]]&&n.push(t.classes[i[o]])}var n=[],s=this;return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&i(t.keys.match(/\S+/g)||[],!0),t.extra&&i(t.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(t){var i=this;e.each(i.classesElementLookup,function(n,s){-1!==e.inArray(t.target,s)&&(i.classesElementLookup[n]=e(s.not(t.target).get()))})},_removeClass:function(e,t,i){return this._toggleClass(e,t,i,!1)},_addClass:function(e,t,i){return this._toggleClass(e,t,i,!0)},_toggleClass:function(e,t,i,n){n="boolean"==typeof n?n:i;var s="string"==typeof e||null===e,a={extra:s?t:i,keys:s?e:t,element:s?this.element:e,add:n};return a.element.toggleClass(this._classes(a),n),this},_on:function(t,i,n){var s,a=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,function(n,r){function o(){return t||!0!==a.options.disabled&&!e(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):void 0}"string"!=typeof r&&(o.guid=r.guid=r.guid||o.guid||e.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),d=l[1]+a.eventNamespace,u=l[2];u?s.on(d,u,o):i.on(d,o)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(i).off(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,i,n){var s,a,r=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(s in a)s in i||(i[s]=a[s]);return this.element.trigger(i,n),!(e.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,s,a){"string"==typeof s&&(s={effect:s});var r,o=s?!0===s||"number"==typeof s?i:s.effect||i:t;s=s||{},"number"==typeof s&&(s={duration:s}),r=!e.isEmptyObject(s),s.complete=a,s.delay&&n.delay(s.delay),r&&e.effects&&e.effects.effect[o]?n[t](s):o!==t&&n[o]?n[o](s.duration,s.easing,a):n.queue(function(i){e(this)[t](),a&&a.call(n[0]),i()})}}),e.widget,function(){function t(e,t,i){return[parseFloat(e[0])*(c.test(e[0])?t/100:1),parseFloat(e[1])*(c.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function n(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}var s,a=Math.max,r=Math.abs,o=/left|center|right/,l=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,u=/^\w+/,c=/%$/,h=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,i,n=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return e("body").append(n),t=a.offsetWidth,n.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=n[0].clientWidth),n.remove(),s=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]),s=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:s,offset:n||s?{left:0,top:0}:e(t).offset(),scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},e.fn.position=function(s){if(!s||!s.of)return h.apply(this,arguments);s=e.extend({},s);var c,g,p,m,f,v,y=e(s.of),k=e.position.getWithinInfo(s.within),b=e.position.getScrollInfo(k),D=(s.collision||"flip").split(" "),_={};return v=n(y),y[0].preventDefault&&(s.at="left top"),g=v.width,p=v.height,m=v.offset,f=e.extend({},m),e.each(["my","at"],function(){var e,t,i=(s[this]||"").split(" ");1===i.length&&(i=o.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=o.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",e=d.exec(i[0]),t=d.exec(i[1]),_[this]=[e?e[0]:0,t?t[0]:0],s[this]=[u.exec(i[0])[0],u.exec(i[1])[0]]}),1===D.length&&(D[1]=D[0]),"right"===s.at[0]?f.left+=g:"center"===s.at[0]&&(f.left+=g/2),"bottom"===s.at[1]?f.top+=p:"center"===s.at[1]&&(f.top+=p/2),c=t(_.at,g,p),f.left+=c[0],f.top+=c[1],this.each(function(){var n,o,l=e(this),d=l.outerWidth(),u=l.outerHeight(),h=i(this,"marginLeft"),v=i(this,"marginTop"),T=d+h+i(this,"marginRight")+b.width,w=u+v+i(this,"marginBottom")+b.height,x=e.extend({},f),C=t(_.my,l.outerWidth(),l.outerHeight());"right"===s.my[0]?x.left-=d:"center"===s.my[0]&&(x.left-=d/2),"bottom"===s.my[1]?x.top-=u:"center"===s.my[1]&&(x.top-=u/2),x.left+=C[0],x.top+=C[1],n={marginLeft:h,marginTop:v},e.each(["left","top"],function(t,i){e.ui.position[D[t]]&&e.ui.position[D[t]][i](x,{targetWidth:g,targetHeight:p,elemWidth:d,elemHeight:u,collisionPosition:n,collisionWidth:T,collisionHeight:w,offset:[c[0]+C[0],c[1]+C[1]],my:s.my,at:s.at,within:k,elem:l})}),s.using&&(o=function(e){var t=m.left-x.left,i=t+g-d,n=m.top-x.top,o=n+p-u,c={target:{element:y,left:m.left,top:m.top,width:g,height:p},element:{element:l,left:x.left,top:x.top,width:d,height:u},horizontal:0>i?"left":t>0?"right":"center",vertical:0>o?"top":n>0?"bottom":"middle"};d>g&&g>r(t+i)&&(c.horizontal="center"),u>p&&p>r(n+o)&&(c.vertical="middle"),c.important=a(r(t),r(i))>a(r(n),r(o))?"horizontal":"vertical",s.using.call(this,e,c)}),l.offset(e.extend(x,{using:o}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,o=e.left-t.collisionPosition.marginLeft,l=s-o,d=o+t.collisionWidth-r-s;t.collisionWidth>r?l>0&&0>=d?(i=e.left+l+t.collisionWidth-r-s,e.left+=l-i):e.left=d>0&&0>=l?s:l>d?s+r-t.collisionWidth:s:l>0?e.left+=l:d>0?e.left-=d:e.left=a(e.left-o,e.left)},top:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollTop:n.offset.top,r=t.within.height,o=e.top-t.collisionPosition.marginTop,l=s-o,d=o+t.collisionHeight-r-s;t.collisionHeight>r?l>0&&0>=d?(i=e.top+l+t.collisionHeight-r-s,e.top+=l-i):e.top=d>0&&0>=l?s:l>d?s+r-t.collisionHeight:s:l>0?e.top+=l:d>0?e.top-=d:e.top=a(e.top-o,e.top)}},flip:{left:function(e,t){var i,n,s=t.within,a=s.offset.left+s.scrollLeft,o=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,d=e.left-t.collisionPosition.marginLeft,u=d-l,c=d+t.collisionWidth-o-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,g="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];0>u?(0>(i=e.left+h+g+p+t.collisionWidth-o-a)||r(u)>i)&&(e.left+=h+g+p):c>0&&((n=e.left-t.collisionPosition.marginLeft+h+g+p-l)>0||c>r(n))&&(e.left+=h+g+p)},top:function(e,t){var i,n,s=t.within,a=s.offset.top+s.scrollTop,o=s.height,l=s.isWindow?s.scrollTop:s.offset.top,d=e.top-t.collisionPosition.marginTop,u=d-l,c=d+t.collisionHeight-o-l,h="top"===t.my[1],g=h?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,p="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(0>(n=e.top+g+p+m+t.collisionHeight-o-a)||r(u)>n)&&(e.top+=g+p+m):c>0&&((i=e.top-t.collisionPosition.marginTop+g+p+m-l)>0||c>r(i))&&(e.top+=g+p+m)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.ui.position,e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},e.extend(e.ui,{datepicker:{version:"1.12.1"}});var d;e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return a(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,s,a;n=t.nodeName.toLowerCase(),s="div"===n||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),a=this._newInst(e(t),s),a.settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,a):s&&this._inlineDatepicker(t,a)},_newInst:function(t,i){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,s,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[o?"before":"after"](i.append)),t.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&t.on("focus",this._showDatepicker),("button"===n||"both"===n)&&(s=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:a,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(a?e("<img/>").attr({src:a,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.on("click",function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,s,a=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,n=0,s=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,n=s);return n},a.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,n,s,r){var o,l,d,u,c,h=this._dialogInst;return h||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>
5"),this._dialogInput.on("keydown",this._doKeyDown),e("body").append(this._dialogInput),h=this._dialogInst=this._newInst(this._dialogInput,!1),h.settings={},e.data(this._dialogInput[0],"datepicker",h)),a(h.settings,s||{}),i=i&&i.constructor===Date?this._formatDate(h,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,d=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,d/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(t){var i,n=e(t),s=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty(),d===s&&(d=null))},_enableDatepicker:function(t){var i,n,s=e(t),a=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,s=e(t),a=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,n){var s,r,o,l,d=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):d?"all"===i?e.extend({},d.settings):this._get(d,i):null:(s=i||{},"string"==typeof i&&(s={},s[i]=n),void(d&&(this._curInst===d&&this._hideDatepicker(),r=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(d,"min"),l=this._getMinMaxDate(d,"max"),a(d.settings,s),null!==o&&void 0!==s.dateFormat&&void 0===s.minDate&&(d.settings.minDate=this._formatDate(d,o)),null!==l&&void 0!==s.dateFormat&&void 0===s.maxDate&&(d.settings.maxDate=this._formatDate(d,l)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),d),this._autoSize(d),this._setDate(d,r),this._updateAlternate(d),this._updateDatepicker(d))))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,s,a=e.datepicker._getInst(t.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),s[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,s[0]),i=e.datepicker._get(a,"onSelect"),i?(n=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[n,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,s=e.datepicker._getInst(t.target);return e.datepicker._get(s,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(t){var i=e.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{e.datepicker.parseDate(e.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,e.datepicker._getFormatConfig(i))&&(e.datepicker._setDateFromField(i),e.datepicker._updateAlternate(i),e.datepicker._updateDatepicker(i))}catch(e){}return!0},_showDatepicker:function(i){if(i=i.target||i,"input"!==i.nodeName.toLowerCase()&&(i=e("input",i.parentNode)[0]),!e.datepicker._isDisabledDatepicker(i)&&e.datepicker._lastInput!==i){var n,s,r,o,l,d,u;n=e.datepicker._getInst(i),e.datepicker._curInst&&e.datepicker._curInst!==n&&(e.datepicker._curInst.dpDiv.stop(!0,!0),n&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),s=e.datepicker._get(n,"beforeShow"),!1!==(r=s?s.apply(i,[i,n]):{})&&(a(n.settings,r),n.lastVal=null,e.datepicker._lastInput=i,e.datepicker._setDateFromField(n),e.datepicker._inDialog&&(i.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(i),e.datepicker._pos[1]+=i.offsetHeight),o=!1,e(i).parents().each(function(){return!(o|="fixed"===e(this).css("position"))}),l={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(n),l=e.datepicker._checkOffset(n,l,o),n.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:l.left+"px",to
vendor: 9,514 bytes, line 5
5p:l.top+"px"}),n.inline||(d=e.datepicker._get(n,"showAnim"),u=e.datepicker._get(n,"duration"),n.dpDiv.css("z-index",t(e(i))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[d]?n.dpDiv.show(d,e.datepicker._get(n,"showOptions"),u):n.dpDiv[d||"show"](d?u:null),e.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),e.datepicker._curInst=n))}},_updateDatepicker:function(t){this.maxRows=4,d=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,n=this._getNumberOfMonths(t),a=n[1],r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&s.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),a>1&&t.dpDiv.addClass("ui-datepicker-multi-"+a).css("width",17*a+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,n){var s=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),d=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+a>d&&d>a?Math.abs(a+o):0),i},_findPos:function(t){for(var i,n=this._getInst(t),s=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,s,a,r=this._curInst;!r||t&&r!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(r,"showAnim"),n=this._get(r,"duration"),s=function(){e.datepicker._tidyDialog(r)},e.effects&&(e.effects.effect[i]||e.effects[i])?r.dpDiv.hide(i,e.datepicker._get(r,"showOptions"),n,s):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,a=this._get(r,"onClose"),a&&a.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==n)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var s=e(t),a=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(a,i+("M"===n?this._get(a,"showCurrentAtPos"):0),n),this._updateDatepicker(a))},_gotoToday:function(t){var i,n=e(t),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var s=e(t),a=this._getInst(s[0]);a["selected"+("M"===n?"Month":"Year")]=a["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(s)},_selectDay:function(t,i,n,s){var a,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=e("a",s).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=n,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,s=e(t),a=this._getInst(s[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),n=this._get(a,"onSelect"),n?n.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=r(a.input[0])&&a.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var i,n,s,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),s=this.formatDate(i,n,this._getFormatConfig(t)),e(a).val(s))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(""===(i="object"==(void 0===i?"undefined":r(i))?""+i:i+""))return null;var s,a,o,l,d=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,g=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,f=-1,v=-1,y=-1,k=-1,b=!1,D=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},_=function(e){var t=D(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s="y"===e?n:1,a=RegExp("^\\d{"+s+","+n+"}"),r=i.substring(d).match(a);if(!r)throw"Missing number at position "+d;return d+=r[0].length,parseInt(r[0],10)},T=function(t,n,s){var a=-1,r=e.map(D(t)?s:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(r,function(e,t){var n=t[1];return i.substr(d,n.length).toLowerCase()===n.toLowerCase()?(a=t[0],d+=n.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+d},w=function(){if(i.charAt(d)!==t.charAt(s))throw"Unexpected literal at position "+d;d++};for(s=0;t.length>s;s++)if(b)"'"!==t.charAt(s)||D("'")?w():b=!1;else switch(t.charAt(s)){case"d":y=_("d");break;case"D":T("D",h,g);break;case"o":k=_("o");break;case"m":v=_("m");break;case"M":v=T("M",p,m);break;case"y":f=_("y");break;case"@":l=new Date(_("@")),f=l.getFullYear(),v=l.getMonth()+1,y=l.getDate();break;case"!":l=new Date((_("!")-this._ticksTo1970)/1e4),f=l.getFullYear(),v=l.getMonth()+1,y=l.getDate();break;case"'":D("'")?w():b=!0;break;default:w()}if(i.length>d&&(o=i.substr(d),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=f?0:-100)),k>-1)for(v=1,y=k;!((a=this._getDaysInMonth(f,v-1))>=y);)v++,y-=a;if(l=this._daylightSavingAdjust(new Date(f,v-1,y)),l.getFullYear()!==f||l.getMonth()+1!==v||l.getDate()!==y)throw"Invalid date";return l},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},d=function(e,t,i){var n=""+t;if(l(e))for(;i>n.length;)n="0"+n;return n},u=function(e,t,i,n){return l(e)?n[t]:i[t]},c="",h=!1;if(t)for(n=0;e.length>n;n++)if(h)"'"!==e.charAt(n)||l("'")?c+=e.charAt(n):h=!1;else switch(e.charAt(n)){case"d":c+=d("d",t.getDate(),2);break;case"D":c+=u("D",t.getDay(),s,a);break;case"o":c+=d("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=d("m",t.getMonth()+1,2);break;case"M":c+=u("M",t.getMonth(),r,o);break;case"y":c+=l("y")?t.getFullYear():(10>t.getFullYear()%100?"0":"")+t.getFullYear()%100;break;case"@":c+=t.getTime();break;case"!":c+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?c+="'":h=!0;break;default:c+=e.charAt(n)}return c},_possibleChars:function(e){var t,i="",n=!1,s=function(i){var n=e.length>t+1&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;e.length>t;t++)if(n)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,
vendor: 2,183 bytes, line 5
5s=this._getDefaultDate(e),a=s,r=this._getFormatConfig(e);try{a=this.parseDate(i,n,r)||s}catch(e){n=t?"":n}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=n?a.getDate():0,e.currentMonth=n?a.getMonth():0,e.currentYear=n?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var s=null==i||""===i?n:"string"==typeof i?function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(e){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,s=n.getFullYear(),a=n.getMonth(),r=n.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=o.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(s,a));break;case"y":case"Y":s+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(s,a))}l=o.exec(i)}return new Date(s,a,r)}(i):"number"==typeof i?isNaN(i)?n:function(e){var t=new Date;return t.setDate(t.getDate()+e),t}(i):new Date(i.getTime());return s=s&&"Invalid Date"==""+s?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,s=e.selectedMonth,a=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");
vendor: 5,539 bytes, line 5
5t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,n,s,a,r,o,l,d,u,c,h,g,p,m,f,v,y,k,b,D,_,T,w,x,C,I,E,P,M,O,S,L,H,B,F,A,N,R,Y=new Date,j=this._daylightSavingAdjust(new Date(Y.getFullYear(),Y.getMonth(),Y.getDate())),J=this._get(e,"isRTL"),W=this._get(e,"showButtonPanel"),V=this._get(e,"hideIfNoPrevNext"),K=this._get(e,"navigationAsDateFormat"),G=this._getNumberOfMonths(e),q=this._get(e,"showCurrentAtPos"),z=this._get(e,"stepMonths"),U=1!==G[0]||1!==G[1],$=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,"min"),Z=this._getMinMaxDate(e,"max"),X=e.drawMonth-q,ee=e.drawYear;if(0>X&&(X+=12,ee--),Z)for(t=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-G[0]*G[1]+1,Z.getDate())),t=Q&&Q>t?Q:t;this._daylightSavingAdjust(new Date(ee,X,1))>t;)0>--X&&(X=11,ee--);for(e.drawMonth=X,e.drawYear=ee,i=this._get(e,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,X-z,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,ee,X)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(J?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(J?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=K?this.formatDate(s,this._daylightSavingAdjust(new Date(ee,X+z,1)),this._getFormatConfig(e)):s,a=this._canAdjustMonth(e,1,ee,X)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(J?"w":"e")+"'>"+s+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(J?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?$:j,r=K?this.formatDate(r,o,this._getFormatConfig(e)):r,l=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",d=W?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(J?l:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(J?"":l)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,c=this._get(e,"showWeek"),h=this._get(e,"dayNames"),g=this._get(e,"dayNamesMin"),p=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),k=this._getDefaultDate(e),b="",_=0;G[0]>_;_++){for(T="",this.maxRows=4,w=0;G[1]>w;w++){if(x=this._daylightSavingAdjust(new Date(ee,X,e.selectedDay)),C=" ui-corner-all",I="",U){if(I+="<div class='ui-datepicker-group",G[1]>1)switch(w){case 0:I+=" ui-datepicker-group-first",C=" ui-corner-"+(J?"right":"left");break;case G[1]-1:I+=" ui-datepicker-group-last",C=" ui-corner-"+(J?"left":"right");break;default:I+=" ui-datepicker-group-middle",C=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===_?J?a:n:"")+(/all|right/.test(C)&&0===_?J?n:a:"")+this._generateMonthYearHeader(e,X,ee,Q,Z,_>0||w>0,p,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",E=c?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",D=0;7>D;D++)P=(D+u)%7,E+="<th scope='col'"+((D+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[P]+"'>"+g[P]+"</span></th>";for(I+=E+"</tr></thead><tbody>",M=this._getDaysInMonth(ee,X),ee===e.selectedYear&&X===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,M)),O=(this._getFirstDayOfMonth(ee,X)-u+7)%7,S=Math.ceil((O+M)/7),L=U&&this.maxRows>S?this.maxRows:S,this.maxRows=L,H=this._daylightSavingAdjust(new Date(ee,X,1-O)),B=0;L>B;B++){for(I+="<tr>",F=c?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(H)+"</td>":"",D=0;7>D;D++)A=f?f.apply(e.input?e.input[0]:null,[H]):[!0,""],N=H.getMonth()!==X,R=N&&!y||!A[0]||Q&&Q>H||Z&&H>Z,F+="<td class='"+((D+u+6)%7>=5?" ui-datepicker-week-end":"")+(N?" ui-datepicker-other-month":"")+(H.getTime()===x.getTime()&&X===e.selectedMonth&&e._keyEvent||k.getTime()===H.getTime()&&k.getTime()===x.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(N&&!v?"":" "+A[1]+(H.getTime()===$.getTime()?" "+this._currentClass:"")+(H.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(N&&!v||!A[2]?"":" title='"+A[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(N&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+H.getDate()+"</span>
5":"<a class='ui-state-default"+(H.getTime()===j.getTime()?" ui-state-highlight":"")+(H.getTime()===$.getTime()?" ui-state-active":"")+(N?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);I+=F+"</tr>"}X++,X>11&&(X=0,ee++),I+="</tbody></table>"+(U?"</div>"+(G[0]>0&&w===G[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),T+=I}b+=T}return b+=d,e._keyEvent=!1,b},_generateMonthYearHeader:function(e,t,i,n,s,a,r,o){var l,d,u,c,h,g,p,m,f=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),k="<div class='ui-datepicker-title'>",b="";if(a||!f)b+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(l=n&&n.getFullYear()===i,d=s&&s.getFullYear()===i,b+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!l||u>=n.getMonth())&&(!d||s.getMonth()>=u)&&(b+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+o[u]+"</option>");b+="</select>"}if(y||(k+=b+(!a&&f&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",a||!v)k+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(c=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),g=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t},p=g(c[0]),m=Math.max(p,g(c[1]||"")),p=n?Math.max(p,n.getFullYear()):p,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=p;p++)e.yearshtml+="<option value='"+p+"'"+(p===i?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),y&&(k+=(!a&&f&&v?"":"&#xa0;")+b),k+="</div>"},_adjustInstDate:function(e,t,i){var n=e.selectedYear+("Y"===i?t:0),s=e.selectedMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,a)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return n&&s>n?n:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var s=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,n+(0>t?t:s[0]*s[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,n,s=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),r=null,o=null,l=this._get(e,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(o+=n)),(!s||t.getTime()>=s.getTime())&&(!a||t.getTime()<=a.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==(void 0===t?"undefined":r(t))?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).on("mousedown",e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);
5var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.12.1",e.datepicker})}},["SDgq"]);

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.