!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs/internal/operators/debounceTime"),require("moment"),require("@angular/forms"),require("rxjs"),require("lodash"),require("@angular/common")):"function"==typeof define&&define.amd?define("ts-angular-components",["exports","@angular/core","@angular/common/http","rxjs/operators","rxjs/internal/operators/debounceTime","moment","@angular/forms","rxjs","lodash","@angular/common"],e):e(t["ts-angular-components"]={},t.ng.core,t.ng.common.http,t.rxjs.operators,t.rxjs["internal/operators/debounceTime"],t.moment_,t.ng.forms,t.rxjs,t._,t.ng.common)}(this,function(t,o,r,p,s,n,i,a,c,e){"use strict";var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function h(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var d=function(){return(d=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,s=n.call(t),i=[];try{for(;(void 0===e||0<e--)&&!(o=s.next()).done;)i.push(o.value)}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=s["return"])&&n.call(s)}finally{if(r)throw r.error}}return i}function m(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t}var f=function(){function t(t){this.http=t}return t.prototype.getHeaders=function(){return new r.HttpParams},t.prototype.get=function(t,e,n){this.baseUrl=n||this.baseUrl;var o=null;return e&&(o=new r.HttpParams,Object.keys(e).forEach(function(t){o=o.append(t,e[t])})),this.http.get(""+this.baseUrl+t,{params:o}).pipe()},t.prototype.post=function(t,e,n){this.baseUrl=n||this.baseUrl;var o=(new r.HttpHeaders).set("Content-Type","application/json");return this.http.post(this.baseUrl+t,e,{headers:o}).pipe()},t.prototype.put=function(t,e,n){this.baseUrl=n||this.baseUrl;var o=(new r.HttpHeaders).set("Content-Type","application/json");return this.http.put(this.baseUrl+t,e,{headers:o}).pipe()},t.prototype.postTest=function(t,e,n){this.baseUrl=n||this.baseUrl;var o=(new r.HttpHeaders).set("Content-Type","application/x-www-form-urlencoded");return this.http.post(t,e,{headers:o}).pipe()},t.decorators=[{type:o.Injectable}],t.ctorParameters=function(){return[{type:r.HttpClient}]},t}(),y=(function(n){function o(t){var e=n.call(this)||this;return e.children=null,e.code=t.code,e.name=t.name,t.children&&t.children.length&&(e.children=t.children.map(function(t){return new o(t)}),e.code||(e.code=e.children.map(function(t){return t.code}).join(","))),e}h(o,n),o.find=function(t,e){var n,o=function(t){return e(t)?(n=t,!0):!!t.children&&t.children.some(o)};return t&&e&&t.some(o),n},o.findByCode=function(t,e){return-1<e.indexOf(",")?o.find(t,function(t){return t.code===e}):o.getSingleAirportByCode(t,e)},o.getSingleAirportByCode=function(t,e){if(!t||-1<e.indexOf(","))return null;for(var n=0;n<t.length;n++)if(t[n].children)for(var o=0;o<t[n].children.length;o++){var r=t[n].children[o];if(r&&r.code===e)return r}else if(t[n].code===e)return t[n];return null},o.findByName=function(t,e){return o.find(t,function(t){return t.name===e})},o.findClosestMatchingAirportGroupByCodes=function(o,t){if(!o||!t||t.indexOf(",")<0)return null;var r=t.split(",");if(!r)return null;for(var s=[],e=function(t){var e=o[t],n=0;e.children&&(e.children.forEach(function(t){-1<r.indexOf(t.code)&&(n+=1)}),0<n&&s.push({airport:e,numberOfMatches:n}))},n=0;n<o.length;n++)e(n);return 0===s.length?null:(s.sort(function(t,e){return t.numberOfMatches>e.numberOfMatches?-1:1}),s[0].airport)}}(function H(){}),function(){function t(t){this.apiService=t}return t.prototype.getWhere=function(t){return this.apiService.get("/api/v1/json/packages/destinations",t).pipe(p.map(function(t){var e=function(t,e){return t.name<e.name?-1:1},n=t.destinations.map(function(t){return d({},t,{type:"destination"})}),o=t.categories.map(function(t){return{name:t,code:t,type:"category"}});return n.sort(e),o.sort(e),{destinations:n,categories:o}}))},t.prototype.getFrom=function(t){return this.apiService.get("/api/v1/json/packages/airports/list","",t)},t.prototype.getDestinationsByRoute=function(t,e){return this.apiService.get("/api/v1/json/packages/destinations/routes/"+t,"",e).pipe(p.map(function(t){return t}))},t.prototype.getHotels=function(t,e,n){var o="";if(e.codes.length)for(var r=0;r<e.codes.length;r++)o+=e.codes[r],e.codes.length!==r+1&&(o+=",");return this.apiService.get("/api/v1/json/packages/search/hotels/"+t+"/"+o,"",n).pipe(p.map(function(t){return t}),p.share())},t.prototype.searchHotels=function(t,e){var n="";if(e.codes.length)for(var o=0;o<e.codes.length;o++)n+=e.codes[o],e.codes.length!==o+1&&(n+=",");return this.apiService.get("/api/v1/json/packages/search/hotels/"+t+"/"+n).pipe(s.debounceTime(500),p.map(function(t){for(var e=[],n=0;n<t.length;n++)for(var o=t[n],r=0;r<o.regions.length;r++)for(var s=o.regions[r],i=0;i<s.resorts.length;i++)for(var a=s.resorts[i],c=0;c<a.hotels.length;c++){var p=a.hotels[c],l={name:p,type:"hotel",resort:a.name,region:s.name,country:o.name,label:p};a.name&&(l.label=l.label+", "+a.name),s.name&&(a.name&&a.name===s.name||(l.label=l.label+", "+s.name)),o.name&&(l.label=l.label+", "+o.name),e.push(l)}return e}))},t.prototype.performSearch=function(t,e,n,o,r,s,i,a){var c={startDate:e,endDate:n};return c.departureCodes=o.map(function(t){return t.code}),c.destinations=JSON.stringify(r),c.passengers=JSON.stringify(s),c.duration=i,c.occupancy=JSON.stringify(s),this.apiService.get("search/dp",c,t).pipe(p.map(function(t){return t}))},t.prototype.getOccupancy=function(t){var e=0,n=0;return t.forEach(function(t){e+=t.adults,n+=t.children}),{adults:e,children:n,infants:0}},t.prototype.formatDestination=function(t){var e="";return t.hotel&&(e=t.hotel),!t.hotel&&t.resort&&(e=t.resort),!t.resort&&t.country&&(e+=" "+t.country),e.replace(/^\s+/g,"")},t.decorators=[{type:o.Injectable}],t.ctorParameters=function(){return[{type:f}]},t}()),g=function(){function t(t){this.searchService=t,this.baseUrl="http://travelsmart.uat.fleetway.com",this.isExternal=!1,this.moment=n,this.airports=[],this.showFromDropdown=!1,this.showWhereDropdown=!1,this.showWhenDropdown=!1,this.showPartyDropdown=!1,this.minDate=new Date,this.isFormValid=!0,this.where=[],this.destinations=[],this.dropdownNumbers=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],this.childrenDropdownNumbers=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],this.selectedAirport={name:"",codes:[]},this.selectedWhere={name:"",resorts:[],selectedResort:"any"},this.selectedDate="",this.rooms=[{adults:2,children:0,infants:0}],this.guestsTotal=2,this.selectedResort="",this.isDestinationsLoading=!0,this.numberOfAdults=2,this.numberOfChildren=0,this.duration=5,this.country="UK",this.onSearch=new o.EventEmitter,this.formChange=new o.EventEmitter}return t.prototype.ngOnInit=function(){var e=this;this.searchService.getFrom(this.baseUrl).subscribe(function(t){e.airports=e.flattenAirports(t)}),this.updateGuestsTotal()},t.prototype.ngOnChanges=function(t){t.selectedAirport&&(this.selectedAirport=t.selectedAirport.currentValue),t.selectedWhere&&(this.selectedWhere=t.selectedWhere.currentValue),t.selectedDate&&(this.selectedDate=t.selectedDate.currentValue),t.duration&&(this.duration=parseInt(t.duration.currentValue)),t.rooms&&this.updateGuestsTotal()},t.prototype.flattenDestinations=function(t){for(var e=[],n=0;n<t.length;n++){var o=t[n];if(e.push({name:o.name,type:"country",country:o.name}),o.regions)for(var r=0;r<o.regions.length;r++){var s=o.regions[r];s.type="region",s.country=o.name,e.push(s);for(var i=0;i<s.resorts.length;i++){var a=s.resorts[i];a.type="resort",a.region=s.name,a.country=o.name,e.push(a)}}}return e},t.prototype.flattenAirports=function(t){for(var e=[],n=0;n<t.length;n++){for(var o=t[n],r=[],s=[],i=0;i<o.children.length;i++){var a=o.children[i];r.push(a.code),s.push({name:a.name,type:"airport",codes:[a.code],regions:a.regions,country:o.country})}e.push({name:o.name,country:o.country,type:"region",children:o.children,codes:r}),e=e.concat(s)}return e},t.prototype.destinationEnter=function(t){this.destinationSelected(t)},t.prototype.changeSelectedDate=function(t){this.selectedDate=t},t.prototype.onSubmit=function(){if(""!==this.selectedAirport.name&&""!==this.selectedWhere.name&&""!==this.selectedDate){var t={selectedAirport:this.selectedAirport,selectedWhere:this.selectedWhere,rooms:this.rooms,duration:this.duration,selectedDate:this.selectedDate,baseUrl:this.baseUrl};this.onSearch.emit(t)}else this.isFormValid=!1},t.prototype.destinationSelected=function(t){this.resorts=[],this.selectedWhere=null===t?(this.destinations=[],{name:"",resortName:"",resorts:[],selectedResort:"",type:""}):t,this.closeAllDropdowns()},t.prototype.airpottSelected=function(t){this.selectedAirport=null===t?{name:"",codes:[]}:t,this.destinationSelected(null),this.closeAllDropdowns()},t.prototype.onUpdateRoom=function(t){var e=m(this.rooms);e[t.roomIndex][t.name]=parseInt(t.value),this.rooms=m(e),this.updateGuestsTotal()},t.prototype.onAddRoom=function(){this.rooms=m(this.rooms,[{adults:2,children:0,infants:0}]),this.updateGuestsTotal()},t.prototype.updateGuestsTotal=function(){for(var t=0,e=0;e<this.rooms.length;e++){var n=this.rooms[e];t+=n.adults,t+=n.children,t+=n.infants}this.guestsTotal=t},t.prototype.onRemoveRoom=function(t){var e=m(this.rooms);e.splice(t,1),this.rooms=e,this.updateGuestsTotal()},t.prototype.inputFocus=function(t){var e=this;switch(this.closeAllDropdowns(),t){case"from":this.showFromDropdown=!0;break;case"where":if(this.showWhereDropdown=!0,this.isDestinationsLoading=!0,0<this.selectedAirport.codes.length){for(var n="",o=0;o<this.selectedAirport.codes.length;o++)n+=this.selectedAirport.codes[o],this.selectedAirport.codes.length!==o+1&&(n+=",");this.searchService.getDestinationsByRoute(n,this.baseUrl).subscribe(function(t){e.destinations=e.flattenDestinations(t),e.isDestinationsLoading=!1})}else this.searchService.getHotels("all",this.airports,this.baseUrl).subscribe(function(t){e.destinations=e.flattenDestinations(t),e.isDestinationsLoading=!1});break;case"when":this.showWhenDropdown=!0;break;case"duration":break;case"party":this.showPartyDropdown=!0}},t.prototype.closeAllDropdowns=function(){this.showFromDropdown=!1,this.showWhereDropdown=!1,this.showWhenDropdown=!1,this.showPartyDropdown=!1},t.decorators=[{type:o.Component,args:[{selector:"ts-search",template:'  <form class="ts-search-container" novalidate="novalidate" #searchForm="ngForm" (ngSubmit)="onSubmit()"\n    autocomplete="off">\n    <div class="search-block col-sm-3" clickOutside (clickOutside)="showFromDropdown ? closeAllDropdowns() : null">\n      <p class="p-b-sm">\n        Fly from\n      </p>\n      <div class="search-input-block">\n        <input class="search-input b-r" [class.not-valid]="!isFormValid && selectedAirport.name === \'\'"\n          placeholder=\'Departure airport\' (focus)="$event.stopPropagation(); inputFocus(\'from\');"\n          [value]="selectedAirport.name">\n        <span class="input-icon b-r-none fa fa-chevron-down">\n        </span>\n      </div>\n      <ts-airport-picker *ngIf="showFromDropdown && airports" [airports]="airports" [country]="country"\n        [selectedAirport]="selectedAirport.name" (airportSelected)="airpottSelected($event)"\n        (closeDropDown)="closeAllDropdowns()"></ts-airport-picker>\n    </div>\n    <div class="search-block col-sm-3" clickOutside (clickOutside)="showWhereDropdown ? closeAllDropdowns() : null">\n      <p class="p-b-sm">\n        Destination or Hotel\n      </p>\n      <div class="search-input-block">\n        \x3c!-- <span class="input-icon fa fa-globe location-icon">\n        </span> --\x3e\n        <input class="search-input b-r" [class.not-valid]="!isFormValid && selectedWhere.name === \'\'"\n          placeholder=\'e.g Italy or Aragona Palace\' (focus)="$event.stopPropagation(); inputFocus(\'where\')"\n          [value]="selectedWhere.name">\n        <span class="input-icon b-r-none fa fa-chevron-down">\n        </span>\n      </div>\n      <ts-destination-picker [destinations]="destinations" (destinationSelected)="destinationSelected($event)"\n        (enterClicked)="destinationEnter($event)" [selectedDestination]="selectedWhere.name"\n        *ngIf="showWhereDropdown && destinations" [isDestinationsLoading]="isDestinationsLoading"\n        (closeDropDown)="closeAllDropdowns()" [departureAirports]="selectedAirport"></ts-destination-picker>\n    </div>\n    <div class="search-block col-sm-2" clickOutside (clickOutside)="showWhenDropdown ? closeAllDropdowns() : null">\n      <p class="p-b-sm">\n        When\n      </p>\n      <div class="search-input-block">\n        \x3c!-- <span class="input-icon fa fa-calendar location-icon">\n        </span> --\x3e\n        <input class="search-input b-r" placeholder=\'Select Date\'\n          [class.not-valid]="!isFormValid && selectedDate === \'\'" (focus)="$event.stopPropagation();inputFocus(\'when\')"\n          [value]="selectedDate | formatDate: \'DD MMM YYYY\'" required>\n        <span class="input-icon b-r-none fa fa-chevron-down">\n        </span>\n      </div>\n      <ts-date-picker *ngIf="showWhenDropdown" (newDateSelected)="changeSelectedDate($event)" [date]="selectedDate"\n        (closeDropDown)="closeAllDropdowns()"></ts-date-picker>\n    </div>\n    <div class="search-block col-sm-2">\n      <p class="p-b-sm">\n        How long\n      </p>\n      <div class="search-input-block">\n        \x3c!-- <span class="input-icon fa fa-hotel location-icon">\n        </span> --\x3e\n        <select class="search-select b-r" name="duration" [(ngModel)]="duration" (focus)="closeAllDropdowns()" required>\n          <option *ngFor="let number of dropdownNumbers" [ngValue]="number">{{number}} nights</option>\n        </select>\n        <span class="input-icon b-r-none fa fa-chevron-down">\n        </span>\n      </div>\n    </div>\n    <div class="search-block col-sm-2" clickOutside (clickOutside)="showPartyDropdown ? closeAllDropdowns() : null">\n      <p class="p-b-sm">\n        Rooms\n      </p>\n      <div class="search-input-block">\n        \x3c!-- <span class="input-icon fa fa-users location-icon">\n        </span> --\x3e\n        <input class="search-input b-r" placeholder=\'Party size\' (focus)="$event.stopPropagation();inputFocus(\'party\')"\n          [value]="guestsTotal + \' Adults\'" required>\n        <span class="input-icon b-r-none fa fa-chevron-down">\n        </span>\n      </div>\n      <ts-party-size-picker *ngIf="showPartyDropdown" [rooms]="this.rooms" (updateRoom)="onUpdateRoom($event)"\n        (addRoom)="onAddRoom()" (removeRoom)="onRemoveRoom($event)" [guestsTotal]="guestsTotal"\n        (closeDropDown)="closeAllDropdowns()"></ts-party-size-picker>\n    </div>\n    <div class="search-block col-sm-2">\n      <button type="submit" class="btn btn-secondary btn-block search-btn" *ngIf="!isSearching">\n        <span>SEARCH</span>\n      </button>\n      <button class="btn btn-secondary btn-block search-btn search-active-btn" type="button" disabled\n        *ngIf="isSearching">\n        <span class="p-r-xs">Searching </span>\n        <ts-spinner-svg class="color-white size-sm stroke-md"></ts-spinner-svg>\n      </button>\n    </div>\n  </form>\n',styles:[":host .ts-search-container{display:flex;margin:0;font-family:Montserrat!important}:host .ts-search-container button,:host .ts-search-container li,:host .ts-search-container p{font-family:Montserrat!important}:host .ts-search-container li,:host .ts-search-container p{font-size:14px!important}:host .ts-search-container .search-block{padding-left:0;padding-right:0;margin:5px;font-family:Montserrat!important}:host .ts-search-container .search-block .search-input-block{display:flex;background-color:#fff;border-radius:8px;margin-top:-5px;font-family:Montserrat!important}:host .ts-search-container .search-block .search-input-block .input-icon{align-items:center;justify-content:center;padding:12px;-webkit-text-stroke:1px #fff}:host .ts-search-container .search-block .search-input-block .search-input{border-radius:8px;font-family:Montserrat!important}@media only screen and (max-width:767px){:host .ts-search-container{display:block;padding:0}:host .ts-search-container .search-block .search-input-block .input-icon{padding:20px}:host .ts-search-container .search-block{margin-bottom:10px;font-family:Montserrat!important}:host .ts-search-container .search-block .search-input{height:55px;font-family:Montserrat!important}:host .ts-search-container .search-block .search-select{height:55px!important;font-family:Montserrat!important}}:host .ts-search-container .search-block .search-select{height:40px;-webkit-appearance:none;border-radius:8px;border:0;width:100%;background-color:#fff;padding-left:10px;font-family:Montserrat!important}:host .ts-search-container .search-block .not-valid{border:2px solid red;font-family:Montserrat!important}:host .ts-search-container .search-block .search-btn{margin-top:33px;height:40px;background-color:#01a9ba;color:#fff;border-radius:8px;font-size:20px!important;font-family:Montserrat!important}:host .ts-search-container .search-block .search-btn.search-active-btn{display:flex;align-items:center;justify-content:center;font-family:Montserrat!important}:host .ts-search-container .search-block .search-btn.search-active-btn:disabled{opacity:.8}:host .ts-search-container .search-block .search-btn:hover{opacity:.75}","@import url(https://fonts.googleapis.com/css?family=Montserrat&display=swap);:host{font-family:Montserrat!important}:host .search-input{text-overflow:ellipsis;padding-left:10px;border-radius:10px;width:100%;height:40px;border:none;font-family:Montserrat!important}:host .search-input:focus{outline:0;font-family:Montserrat!important}:host .search-input::-webkit-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::-ms-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input-container{display:flex;border-radius:10px;font-family:Montserrat!important;padding-bottom:0}:host .search-input-container .side-icon{align-items:center;justify-content:center}:host .search-input-container .back-icon{display:none;padding:10px;font-family:Montserrat!important}:host .search-input-container .input-side-icon{padding:15px;font-family:Montserrat!important}:host .picker-input{border:none;box-shadow:none;font-family:Montserrat!important}:host .search-dropdown{border-radius:10px;position:absolute;width:100%;background-color:#fff;z-index:50;max-height:350px;font-family:Montserrat!important}:host .search-dropdown .search-input{border:none;font-family:Montserrat!important}@media only screen and (max-width:767px){:host .search-input-container .back-icon{display:flex;font-family:Montserrat!important}:host .search-input-container .input-side-icon{display:none;font-family:Montserrat!important}:host .search-dropdown{max-height:unset;height:100vh;width:100%;position:fixed;right:0;top:0;z-index:10001;margin:0;font-family:Montserrat!important}}:host .dropdown-right{right:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box{position:relative;height:42px;display:flex;margin-right:0!important;color:#4c4c4c;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box .type-select-search{width:100%;height:100%;border:none;border-radius:0;border-right:.5px solid #eaeaea;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box.type-select-selected{padding:3px}:host .type-select-picker-container .type-select-search-box button{width:100%;display:flex;align-items:center;border-radius:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box button .selected-type-select{width:100%}:host .type-select-picker-container .type-select-search-box button:focus{outline:0}:host .type-select-picker-container .result-item-heading{background:#fff;color:#b2b2b2;padding:8px;text-transform:uppercase;font-weight:600;margin-top:10px;font-size:14px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper{position:absolute;background-color:#fff;z-index:50;box-shadow:0 3px 5px 0 rgba(23,35,44,.24);width:400px;max-height:530px;overflow:auto;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list{padding-left:0;list-style:none;margin-bottom:0;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .all-airport-name{color:#878787;font-weight:300;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .anywhere{margin-top:16px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item{padding:8px 8px 8px 16px;color:#737373;font-weight:500;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item .location-icon{padding-right:6px}:host .type-select-picker-container .results-wrapper .results-list .result-item:first-child{border-top:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.focused{background-color:#f1f4f7;cursor:pointer}:host .type-select-picker-container .results-wrapper .results-list .result-item.disable-hover{pointer-events:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.no-hover:hover{background-color:unset;color:unset;cursor:unset}:host .type-select-picker-container .results-wrapper .results-list .result-item .country{font-weight:700}@media only screen and (max-width:767px){:host .type-select-picker-container .results-wrapper{max-height:unset;height:calc(100% - 56px);overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:40px;font-family:Montserrat!important}}:host .b-l-none{border-left:none!important}:host .b-r-none{border-right:none!important}@media only screen and (min-width:767px){:host .search-dropdown{top:35px;font-family:Montserrat!important}:host .b-l-desktop-none{border-left:none!important}:host .b-r-desktop-none{border-right:none!important}}"]}]}],t.ctorParameters=function(){return[{type:y}]},t.propDecorators={baseUrl:[{type:o.Input}],isExternal:[{type:o.Input}],selectedAirport:[{type:o.Input}],selectedWhere:[{type:o.Input}],selectedDate:[{type:o.Input}],rooms:[{type:o.Input}],numberOfAdults:[{type:o.Input}],numberOfChildren:[{type:o.Input}],duration:[{type:o.Input}],country:[{type:o.Input}],isSearching:[{type:o.Input}],lastSearchParams:[{type:o.Input}],onSearch:[{type:o.Output}],formChange:[{type:o.Output}]},t}(),b=function(){function t(){this.closeDropDown=new o.EventEmitter}return t.prototype.ngAfterViewInit=function(){this.dropdownInput.nativeElement.focus()},t.propDecorators={dropdownInput:[{type:o.ViewChild,args:["dropdownInput"]}],closeDropDown:[{type:o.Output}]},t}(),x=function(n){function t(t){var e=n.call(this)||this;return e.searchService=t,e.isDestinationsLoading=!0,e.destinationSelected=new o.EventEmitter,e.enterClicked=new o.EventEmitter,e.searchFormControl=new i.FormControl(""),e.previousSearchValue="",e.isTyping=!1,e.isDestination=!1,e.isHoverDisabled=!1,e.searchedDestinationFocusIndex=null,e.withRefresh=!1,e.hotelSearchText$=new a.Subject,e.searchTerm=new i.FormControl,e.myBooks=[],e}return h(t,n),t.prototype.ngOnInit=function(){var o=this;this.searchTerm.valueChanges.subscribe(function(e){if(e){o.isTyping=!0,o.searchedDestinations=[];var t=m(o.destinations),n=c.filter(t,function(t){if(t.name.toLowerCase().includes(e.toLowerCase())||t.country.toLowerCase().includes(e.toLowerCase()))return t});0<n.length&&(o.searchedDestinations=o.searchedDestinations.concat(n)),""!==e&&4<e.length&&o.searchService.searchHotels(e,o.departureAirports).subscribe(function(t){t.length<=100&&(o.searchedDestinations=o.searchedDestinations.concat(t))})}else o.reset()}),this.setupHotelSearch(),this.initDestinations()},t.prototype.ngOnChanges=function(t){t.selectedDestination&&(this.destination=this.selectedDestination),t.destinations&&this.initDestinations()},t.prototype.initDestinations=function(){this.destination=this.selectedDestination,this.searchedDestinations=m(this.destinations)},t.prototype.setupHotelSearch=function(){var o=this;this.hotelSearchResults$=this.hotelSearchText$.pipe(p.debounceTime(400),p.distinctUntilChanged(),p.switchMap(function(t){return o.searchService.getHotels(t,o.departureAirports,o.baseURL)})),this.hotelSearchResults$.subscribe(function(t){var e,n=o.flattenDestinationsByHotels(t);(e=o.searchedDestinations).push.apply(e,m(n))})},t.prototype.flattenDestinationsByHotels=function(t){for(var e=[],n=0;n<t.length;n++)for(var o=t[n],r=0;r<o.regions.length;r++)for(var s=o.regions[r],i=0;i<s.resorts.length;i++)for(var a=s.resorts[i],c=0;c<a.hotels.length;c++){var p=a.hotels[c],l={name:p,type:"hotel",resort:a.name,region:s.name,country:o.name,label:p};a.name&&(l.label=l.label+", "+a.name),s.name&&(a.name&&a.name===s.name||(l.label=l.label+", "+s.name)),o.name&&(l.label=l.label+", "+o.name),e.push(l)}return e},t.prototype.incrementSearchedHotelsFocusIndex=function(){0<this.searchedDestinations.length&&(null===this.searchedDestinationFocusIndex?this.setNextDestinationFocusInDropdown():this.searchedDestinationFocusIndex<this.searchedDestinations.length-1&&this.setNextDestinationFocusInDropdown())},t.prototype.decrementSearcedHotelsFocusIndex=function(){0<this.searchedDestinations.length&&(null===this.searchedDestinationFocusIndex?this.setPreviousDestinationFocusInDropdown():0<this.searchedDestinationFocusIndex&&this.setPreviousDestinationFocusInDropdown())},t.prototype.setNextDestinationFocusInDropdown=function(){var t=1;null===this.searchedDestinationFocusIndex&&(t=0);var e=this.searchedDestinations[this.searchedDestinationFocusIndex+t];if(!this.isTyping)for(;e&&"resort"===e.type;)t+=1,e=this.searchedDestinations[this.searchedDestinationFocusIndex+t];null===e&&e===undefined||(this.searchedDestinationFocusIndex=this.searchedDestinationFocusIndex+t)},t.prototype.setPreviousDestinationFocusInDropdown=function(){var t=this,e=1,n=this.searchedDestinations[this.searchedDestinationFocusIndex-e];if(!this.isTyping)for(;n&&"resort"===n.type;)e+=1,n=this.searchedDestinations[this.searchedDestinationFocusIndex-e];null!==n||n!==undefined?this.searchedDestinationFocusIndex=this.searchedDestinationFocusIndex-e:n||(this.searchedDestinationFocusIndex=null,this.searchResultsListElement&&requestAnimationFrame(function(){return t.scrollToPosition(t.searchResultsListElement.nativeElement,0,"up")}))},t.prototype.preventInputCaretMovement=function(t){!t||40!==t.keyCode&&38!==t.keyCode&&13!==t.keyCode||t.preventDefault()},t.prototype.search=function(t){!t||40!==t.keyCode&&38!==t.keyCode&&13!==t.keyCode||(t.preventDefault(),this.disableHover()),t&&40===t.keyCode?this.searchedDestinationFocusIndex!==this.searchedDestinations.length-1&&(this.incrementSearchedHotelsFocusIndex(),this.scrollToFocusedHotelItem("down")):t&&38===t.keyCode?null===this.searchedDestinationFocusIndex||0===this.searchedDestinationFocusIndex?(this.searchedDestinationFocusIndex=null,this.searchInput.nativeElement.focus()):(this.decrementSearcedHotelsFocusIndex(),this.scrollToFocusedHotelItem("up")):t&&13===t.keyCode&&null!==this.searchedDestinationFocusIndex&&("hotel"===this.searchedDestinations[this.searchedDestinationFocusIndex].type?this.onHotelClicked(this.searchedDestinations[this.searchedDestinationFocusIndex].name,"hotel"):this.onDestinationClicked(this.searchedDestinations[this.searchedDestinationFocusIndex]))},t.prototype.sortSearch=function(e){var n=[];m(this.destinations).forEach(function(t){"region"!==t.type&&"resort"!==t.type&&"country"!==t.type||(t.name.toLowerCase().includes(e.toLowerCase())||t.country.toLowerCase().includes(e.toLowerCase()))&&n.push(t)}),4<=this.searchFormControl.value.length&&this.hotelSearchText$.next(this.searchFormControl.value),this.searchedDestinations=n},t.prototype.onSelect=function(){},t.prototype.focus=function(){this.searchedDestinationFocusIndex=null},t.prototype.enableHover=function(){this.isHoverDisabled=!1},t.prototype.disableHover=function(){this.isHoverDisabled=!0},t.prototype.setSearchedDestinationsFocusIndex=function(t){this.searchedDestinationFocusIndex=t},t.prototype.onMouseLeave=function(){this.enableHover(),this.setSearchedDestinationsFocusIndex(null)},t.prototype.scrollToFocusedHotelItem=function(p){var l=this;setTimeout(function(){var t=l.searchResultsListElement?l.searchResultsListElement.nativeElement:null;if(t){var e=t.getElementsByClassName("focused")?t.getElementsByClassName("focused")[0]:null;if(e){var n=l.searchResultsWrapper.nativeElement,o=n.offsetHeight||n.clientHeight||n.scrollHeight,r=n.scrollTop,s=n.scrollTop+o,i=e.offsetTop+e.offsetHeight;if(!(e.offsetTop>=r&&e.offsetTop<s&&r<=i&&i<s)){var a=0;if(l.searchedDestinationFocusIndex===l.searchedDestinations.length-1){var c=n.scrollHeight-(n.offsetHeight||n.clientHeight);a=c}else 0===l.searchedDestinationFocusIndex?a=0:(a="down"===p?Math.ceil(n.scrollTop+e.offsetHeight):Math.floor(n.scrollTop-e.offsetHeight),"down"===p&&e.previousElementSibling&&e.previousElementSibling.classList.contains("result-item-heading")?a=Math.ceil(a+e.previousElementSibling.offsetHeight)+10:"up"===p&&e.nextElementSibling&&e.nextElementSibling.classList.contains("result-item-heading")&&(a=Math.floor(a-e.nextElementSibling.offsetHeight)-10)<0&&(a=0));requestAnimationFrame(function(){return l.scrollToPosition(n,a,p)})}}}})},t.prototype.scrollToPosition=function(t,e,n){var o=this;"down"===n?t.scrollTop+9<e?(t.scrollTop=t.scrollTop+9,t.scrollTop<e?requestAnimationFrame(function(){return o.scrollToPosition(t,e,n)}):t.scrollTop=e):t.scrollTop=e:t.scrollTop-9>e?(t.scrollTop=t.scrollTop-9,t.scrollTop>e?requestAnimationFrame(function(){return o.scrollToPosition(t,e,n)}):t.scrollTop=e):t.scrollTop=e},t.prototype.deselectDestination=function(){var t=this;this.destination="",this.clear(),setTimeout(function(){return t.isDestination=!0})},t.prototype.clear=function(){this.isTyping=!1,this.searchFormControl.setValue(""),this.reset()},t.prototype.onDestinationClicked=function(t){if(t){this.destination=t.name;var e={country:t.country,name:t.name,resorts:t.resorts,type:t.type};"resort"===t.type&&(e.region=t.region,e.resorts=[]),this.searchFormControl.setValue(t.name),this.destinationSelected.emit(e),this.isDestination=!1}},t.prototype.onHotelClicked=function(t,e){var n={name:this.destination=t,type:e,resorts:[]};this.destinationSelected.emit(n),this.isDestination=!1},t.prototype.reset=function(){var t=this;setTimeout(function(){t.isTyping=!1,t.searchedDestinations=m(t.destinations)})},t.prototype.dismissResultsPopover=function(){var t=this;this.destination||this.clear(),setTimeout(function(){t.isDestination=!1})},t.prototype.onClick=function(t){this.searchResultsWrapper&&this.searchResultsWrapper.nativeElement&&this.searchInput&&(this.searchResultsWrapper.nativeElement.contains(t)||this.searchInput.nativeElement.contains(t)||this.dismissResultsPopover())},t.decorators=[{type:o.Component,args:[{selector:"ts-destination-picker",template:'<div class="search-dropdown dropdown-left type-select-picker-container">\n  <div class="search-input-container" #searchInputWrapper>\n    <span class="fa fa-arrow-left back-icon side-icon" (click)="closeDropDown.emit()">\n    </span>\n    \x3c!-- <span class="fa fa-globe side-icon input-side-icon">\n    </span> --\x3e\n    \x3c!-- <input #dropdownInput autofocus class="search-input type-select-search picker-input" #searchInput\n      (keyup)="search($event)" (keydown)="preventInputCaretMovement($event)" (focus)="focus()" [value]="destination"\n      (click)="this.clear()" [formControl]="searchFormControl" placeholder=\'Where to\'\n      (keydown.Tab)="dismissResultsPopover()"> --\x3e\n    <input #dropdownInput #searchInput autofocus class="search-input type-select-search picker-input" type="text"\n      placeholder="e.g Italy or Aragona Palace" [formControl]="searchTerm" (keydown.Tab)="dismissResultsPopover()" (keyup)="search($event)"\n      (keydown)="preventInputCaretMovement($event)" (focus)="focus()">\n  </div>\n  <div class="results-wrapper" #searchResultsWrapper (mousemove)="enableHover()" (mouseleave)="onMouseLeave()">\n    <ul *ngIf="destinations.length > 0; else noDestinations" class="results-list" #searchResultsList>\n      <ng-container *ngFor="let destination of searchedDestinations; let i = index;">\n        <li class="result-item-heading sticky-header country-heading"\n          [class.focused]="i === searchedDestinationFocusIndex" [class.disable-hover]="isHoverDisabled"\n          (mouseover)="setSearchedDestinationsFocusIndex(i)" *ngIf="destination.type === \'country\'"\n          (click)="$event.stopPropagation(); onDestinationClicked(destination) ">{{destination.name}}</li>\n        \x3c!-- <li class="result-item font-h5 " *ngIf="destination.type === \'country\'"\n          [class.focused]="i === searchedDestinationFocusIndex" [class.disable-hover]="isHoverDisabled"\n          (mouseover)="setSearchedDestinationsFocusIndex(i)" (click)="onDestinationClicked(destination)">\n          <span class="fa fa-map-marker location-icon">\n          </span>All deals in {{destination.name}}\n        </li> --\x3e\n        <li class="result-item font-h5 " *ngIf="destination.type === \'resort\' && isTyping && (destination.name != destination.region)"\n          [class.focused]="i === searchedDestinationFocusIndex" [class.disable-hover]="isHoverDisabled"\n          (mouseover)="setSearchedDestinationsFocusIndex(i)" (click)="onDestinationClicked(destination)">\n          <span class="fa fa-map-marker location-icon">\n          </span>{{destination.name}}<span>, {{ destination.country }}</span>\n        </li>\n        <li class="result-item font-h5 " *ngIf="destination.type === \'region\'"\n          [class.focused]="i === searchedDestinationFocusIndex" [class.disable-hover]="isHoverDisabled"\n          (mouseover)="setSearchedDestinationsFocusIndex(i)" (click)="onDestinationClicked(destination)">\n          <span class="fa fa-map-marker location-icon">\n          </span>{{destination.name}}<span *ngIf="isTyping">, {{ destination.country }}</span>\n        </li>\n        <li class="result-item font-h5 " *ngIf="destination.type === \'hotel\'"\n          [class.focused]="i === searchedDestinationFocusIndex" [class.disable-hover]="isHoverDisabled"\n          (mouseover)="setSearchedDestinationsFocusIndex(i)" (click)="onHotelClicked(destination.name, \'hotel\')"\n          [class.anywhere]="destination.type === \'anywhere\'">\n          <span class="fa fa-hotel location-icon">\n          </span>\n          {{ destination.label }}\n        </li>\n        \x3c!-- <li class="result-item font-h5 " *ngIf="destination.type === \'anywhere\'"\n          [class.focused]="i === searchedDestinationFocusIndex" [class.disable-hover]="isHoverDisabled"\n          (mouseover)="setSearchedDestinationsFocusIndex(i)" (click)="onHotelClicked(destination.name, \'anywhere\')"\n          [class.anywhere]="destination.type === \'anywhere\'">\n          <span class="fa fa-globe location-icon">\n          </span>\n          {{ destination.label }}\n        </li> --\x3e\n      </ng-container>\n      \x3c!-- <div *ngFor="let destination of searchedDestinations">\n        {{destination.name}}\n      </div> --\x3e\n    </ul>\n    <ng-template #noDestinations>\n      <div class="loading-message" *ngIf="isDestinationsLoading">\n        Loading destinations...\n      </div>\n      <div class="loading-message" *ngIf="!isDestinationsLoading">\n        Sorry we have no destinations from your chosen airport. Please try another airport.\n      </div>\n    </ng-template>\n  </div>\n</div>\n',styles:[".loading-message{padding:10px}.country-heading{cursor:pointer;font-family:Montserrat!important}.country-heading.focused,.country-heading:hover{text-decoration:underline}","@import url(https://fonts.googleapis.com/css?family=Montserrat&display=swap);:host{font-family:Montserrat!important}:host .search-input{text-overflow:ellipsis;padding-left:10px;border-radius:10px;width:100%;height:40px;border:none;font-family:Montserrat!important}:host .search-input:focus{outline:0;font-family:Montserrat!important}:host .search-input::-webkit-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::-ms-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input-container{display:flex;border-radius:10px;font-family:Montserrat!important;padding-bottom:0}:host .search-input-container .side-icon{align-items:center;justify-content:center}:host .search-input-container .back-icon{display:none;padding:10px;font-family:Montserrat!important}:host .search-input-container .input-side-icon{padding:15px;font-family:Montserrat!important}:host .picker-input{border:none;box-shadow:none;font-family:Montserrat!important}:host .search-dropdown{border-radius:10px;position:absolute;width:100%;background-color:#fff;z-index:50;max-height:350px;font-family:Montserrat!important}:host .search-dropdown .search-input{border:none;font-family:Montserrat!important}@media only screen and (max-width:767px){:host .search-input-container .back-icon{display:flex;font-family:Montserrat!important}:host .search-input-container .input-side-icon{display:none;font-family:Montserrat!important}:host .search-dropdown{max-height:unset;height:100vh;width:100%;position:fixed;right:0;top:0;z-index:10001;margin:0;font-family:Montserrat!important}}:host .dropdown-right{right:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box{position:relative;height:42px;display:flex;margin-right:0!important;color:#4c4c4c;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box .type-select-search{width:100%;height:100%;border:none;border-radius:0;border-right:.5px solid #eaeaea;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box.type-select-selected{padding:3px}:host .type-select-picker-container .type-select-search-box button{width:100%;display:flex;align-items:center;border-radius:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box button .selected-type-select{width:100%}:host .type-select-picker-container .type-select-search-box button:focus{outline:0}:host .type-select-picker-container .result-item-heading{background:#fff;color:#b2b2b2;padding:8px;text-transform:uppercase;font-weight:600;margin-top:10px;font-size:14px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper{position:absolute;background-color:#fff;z-index:50;box-shadow:0 3px 5px 0 rgba(23,35,44,.24);width:400px;max-height:530px;overflow:auto;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list{padding-left:0;list-style:none;margin-bottom:0;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .all-airport-name{color:#878787;font-weight:300;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .anywhere{margin-top:16px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item{padding:8px 8px 8px 16px;color:#737373;font-weight:500;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item .location-icon{padding-right:6px}:host .type-select-picker-container .results-wrapper .results-list .result-item:first-child{border-top:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.focused{background-color:#f1f4f7;cursor:pointer}:host .type-select-picker-container .results-wrapper .results-list .result-item.disable-hover{pointer-events:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.no-hover:hover{background-color:unset;color:unset;cursor:unset}:host .type-select-picker-container .results-wrapper .results-list .result-item .country{font-weight:700}@media only screen and (max-width:767px){:host .type-select-picker-container .results-wrapper{max-height:unset;height:calc(100% - 56px);overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:40px;font-family:Montserrat!important}}:host .b-l-none{border-left:none!important}:host .b-r-none{border-right:none!important}@media only screen and (min-width:767px){:host .search-dropdown{top:35px;font-family:Montserrat!important}:host .b-l-desktop-none{border-left:none!important}:host .b-r-desktop-none{border-right:none!important}}"]}]}],t.ctorParameters=function(){return[{type:y}]},t.propDecorators={searchInput:[{type:o.ViewChild,args:["searchInput"]}],searchResultsWrapper:[{type:o.ViewChild,args:["searchResultsWrapper"]}],searchResultsListElement:[{type:o.ViewChild,args:["searchResultsList"]}],searchInputWrapper:[{type:o.ViewChild,args:["searchInputWrapper"]}],baseURL:[{type:o.Input}],destinations:[{type:o.Input}],departureAirports:[{type:o.Input}],isDestinationsLoading:[{type:o.Input}],searchedDestinations:[{type:o.Input}],selectedDestination:[{type:o.Input}],destinationSelected:[{type:o.Output}],enterClicked:[{type:o.Output}],onClick:[{type:o.HostListener,args:["document:click",["$event.target"]]}]},t}(b),v=function(n){function t(t){var e=n.call(this)||this;return e.searchService=t,e.airportSelected=new o.EventEmitter,e.enterClicked=new o.EventEmitter,e.searchFormControl=new i.FormControl(""),e.previousSearchValue="",e.isTyping=!1,e.isDestination=!1,e.isHoverDisabled=!1,e.searchedDestinationFocusIndex=null,e.withRefresh=!1,e.hotelSearchText$=new a.Subject,e}return h(t,n),t.prototype.ngOnInit=function(){this.airport=this.selectedAirport,this.searchedDestinations=m(this.airports)},t.prototype.ngOnChanges=function(t){t.selectedAirport&&(this.airport=this.selectedAirport)},t.prototype.incrementSearchedHotelsFocusIndex=function(){0<this.searchedDestinations.length&&(null===this.searchedDestinationFocusIndex?this.setNextDestinationFocusInDropdown():this.searchedDestinationFocusIndex<this.searchedDestinations.length-1&&this.setNextDestinationFocusInDropdown())},t.prototype.decrementSearcedHotelsFocusIndex=function(){0<this.searchedDestinations.length&&(null===this.searchedDestinationFocusIndex?this.setPreviousDestinationFocusInDropdown():0<this.searchedDestinationFocusIndex&&this.setPreviousDestinationFocusInDropdown())},t.prototype.setNextDestinationFocusInDropdown=function(){var t=1;null===this.searchedDestinationFocusIndex&&(t=0);var e=this.searchedDestinations[this.searchedDestinationFocusIndex+t];!e||"region"!==e.type&&"airport"!==e.type||(this.searchedDestinationFocusIndex=this.searchedDestinationFocusIndex+t)},t.prototype.setPreviousDestinationFocusInDropdown=function(){var t=this,e=this.searchedDestinations[this.searchedDestinationFocusIndex-1];!e||"region"!==e.type&&"airport"!==e.type?e||(this.searchedDestinationFocusIndex=null,this.searchResultsListElement&&requestAnimationFrame(function(){return t.scrollToPosition(t.searchResultsListElement.nativeElement,0,"up")})):this.searchedDestinationFocusIndex=this.searchedDestinationFocusIndex-1},t.prototype.preventInputCaretMovement=function(t){!t||40!==t.keyCode&&38!==t.keyCode&&13!==t.keyCode||t.preventDefault()},t.prototype.search=function(t){this.searchFormControl.value||this.reset(),!t||40!==t.keyCode&&38!==t.keyCode&&13!==t.keyCode||(t.preventDefault(),this.disableHover()),t&&40===t.keyCode?this.searchedDestinationFocusIndex!==this.searchedDestinations.length-1&&(this.incrementSearchedHotelsFocusIndex(),this.scrollToFocusedHotelItem("down")):t&&38===t.keyCode?null===this.searchedDestinationFocusIndex||0===this.searchedDestinationFocusIndex?(this.searchedDestinationFocusIndex=null,this.searchInput.nativeElement.focus()):(this.decrementSearcedHotelsFocusIndex(),this.scrollToFocusedHotelItem("up")):t&&13===t.keyCode&&null!==this.searchedDestinationFocusIndex?this.onDestinationClicked(this.searchedDestinations[this.searchedDestinationFocusIndex]):t&&27===t.keyCode||this.searchFormControl.value!==this.previousSearchValue&&(this.searchedDestinationFocusIndex=null,this.previousSearchValue=this.searchFormControl.value,this.sortSearch(this.searchFormControl.value))},t.prototype.sortSearch=function(e){var n=[];m(this.airports).forEach(function(t){t.name.toLowerCase().includes(e.toLowerCase())&&n.push(t)}),this.searchedDestinations=n},t.prototype.onSelect=function(){},t.prototype.focus=function(){this.searchedDestinationFocusIndex=null},t.prototype.enableHover=function(){this.isHoverDisabled=!1},t.prototype.disableHover=function(){this.isHoverDisabled=!0},t.prototype.setSearchedDestinationsFocusIndex=function(t){this.searchedDestinationFocusIndex=t},t.prototype.onMouseLeave=function(){this.enableHover(),this.setSearchedDestinationsFocusIndex(null)},t.prototype.scrollToFocusedHotelItem=function(p){var l=this;setTimeout(function(){var t=l.searchResultsListElement?l.searchResultsListElement.nativeElement:null;if(t){var e=t.getElementsByClassName("focused")?t.getElementsByClassName("focused")[0]:null;if(e){var n=l.searchResultsWrapper.nativeElement,o=n.offsetHeight||n.clientHeight||n.scrollHeight,r=n.scrollTop,s=n.scrollTop+o,i=e.offsetTop+e.offsetHeight;if(!(e.offsetTop>=r&&e.offsetTop<s&&r<=i&&i<s)){var a=0;if(l.searchedDestinationFocusIndex===l.searchedDestinations.length-1){var c=n.scrollHeight-(n.offsetHeight||n.clientHeight);a=c}else 0===l.searchedDestinationFocusIndex?a=0:(a="down"===p?Math.ceil(n.scrollTop+e.offsetHeight):Math.floor(n.scrollTop-e.offsetHeight),"down"===p&&e.previousElementSibling&&e.previousElementSibling.classList.contains("result-item-heading")?a=Math.ceil(a+e.previousElementSibling.offsetHeight)+10:"up"===p&&e.nextElementSibling&&e.nextElementSibling.classList.contains("result-item-heading")&&(a=Math.floor(a-e.nextElementSibling.offsetHeight)-10)<0&&(a=0));requestAnimationFrame(function(){return l.scrollToPosition(n,a,p)})}}}})},t.prototype.scrollToPosition=function(t,e,n){var o=this;"down"===n?t.scrollTop+9<e?(t.scrollTop=t.scrollTop+9,t.scrollTop<e?requestAnimationFrame(function(){return o.scrollToPosition(t,e,n)}):t.scrollTop=e):t.scrollTop=e:t.scrollTop-9>e?(t.scrollTop=t.scrollTop-9,t.scrollTop>e?requestAnimationFrame(function(){return o.scrollToPosition(t,e,n)}):t.scrollTop=e):t.scrollTop=e},t.prototype.deselectDestination=function(){var t=this;this.airport="",this.clear(),setTimeout(function(){return t.isDestination=!0})},t.prototype.clear=function(){this.searchFormControl.setValue(""),this.reset()},t.prototype.onDestinationClicked=function(t){if(t){var e={name:t.name,codes:t.codes};this.searchFormControl.setValue(t.name),this.airportSelected.emit(e),this.isDestination=!1}},t.prototype.reset=function(){var t=this;setTimeout(function(){t.searchedDestinations=m(t.airports)})},t.prototype.dismissResultsPopover=function(){var t=this;this.airport||this.clear(),setTimeout(function(){t.isDestination=!1})},t.prototype.onClick=function(t){this.searchResultsWrapper&&this.searchResultsWrapper.nativeElement&&this.searchInput&&(this.searchResultsWrapper.nativeElement.contains(t)||this.searchInput.nativeElement.contains(t)||this.dismissResultsPopover())},t.decorators=[{type:o.Component,args:[{selector:"ts-airport-picker",template:'<div class="search-dropdown dropdown-left type-select-picker-container">\n  <div class="search-input-container" #searchInputWrapper>\n    <span class="fa fa-arrow-left back-icon side-icon" (click)="closeDropDown.emit()">\n    </span>\n    \x3c!-- <span class="fa fa-plane side-icon input-side-icon">\n      </span> --\x3e\n    <input #dropdownInput autofocus class="search-input type-select-search picker-input" #searchInput (keyup)="search($event)"\n      (keydown)="preventInputCaretMovement($event)" (focus)="focus()" [value]="airport" (click)="this.clear()"\n      [formControl]="searchFormControl" placeholder=\'Departure airport\' autocomplete="false">\n      \x3c!-- <span class="side-icon input-side-icon b-r-none fa fa-chevron-down">\n      </span> --\x3e\n  </div>\n  <div class="results-wrapper" #searchResultsWrapper (mousemove)="enableHover()" (mouseleave)="onMouseLeave()">\n      <ul class="results-list" #searchResultsList>\n      <ng-container *ngFor="let airport of searchedDestinations; let i = index;">\n        <li class="result-item-heading sticky-header" *ngIf="airport.type === \'region\' && airport.country === country"\n          (click)="$event.stopPropagation()">{{airport.name}}</li>\n        <li class="result-item font-h5 " *ngIf="airport.type === \'region\'  && airport.country === country"\n          [class.focused]="i === searchedDestinationFocusIndex" [class.disable-hover]="isHoverDisabled" (mouseover)="setSearchedDestinationsFocusIndex(i)"\n          (click)="onDestinationClicked(airport)">\n          <span class="fa fa-plane location-icon">\n          </span>\n          All airports in <span class="all-airport-name">{{airport.name}}</span>\n        </li>\n        <li class="result-item font-h5 " *ngIf="airport.type === \'airport\'  && airport.country === country"\n          [class.focused]="i === searchedDestinationFocusIndex" [class.disable-hover]="isHoverDisabled" (mouseover)="setSearchedDestinationsFocusIndex(i)"\n          (click)="onDestinationClicked(airport)">\n          <span class="fa fa-plane location-icon">\n          </span>\n          {{airport.name}}\n        </li>\n      </ng-container>\n    </ul>\n  </div>\n</div>\n',styles:["","@import url(https://fonts.googleapis.com/css?family=Montserrat&display=swap);:host{font-family:Montserrat!important}:host .search-input{text-overflow:ellipsis;padding-left:10px;border-radius:10px;width:100%;height:40px;border:none;font-family:Montserrat!important}:host .search-input:focus{outline:0;font-family:Montserrat!important}:host .search-input::-webkit-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::-ms-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input-container{display:flex;border-radius:10px;font-family:Montserrat!important;padding-bottom:0}:host .search-input-container .side-icon{align-items:center;justify-content:center}:host .search-input-container .back-icon{display:none;padding:10px;font-family:Montserrat!important}:host .search-input-container .input-side-icon{padding:15px;font-family:Montserrat!important}:host .picker-input{border:none;box-shadow:none;font-family:Montserrat!important}:host .search-dropdown{border-radius:10px;position:absolute;width:100%;background-color:#fff;z-index:50;max-height:350px;font-family:Montserrat!important}:host .search-dropdown .search-input{border:none;font-family:Montserrat!important}@media only screen and (max-width:767px){:host .search-input-container .back-icon{display:flex;font-family:Montserrat!important}:host .search-input-container .input-side-icon{display:none;font-family:Montserrat!important}:host .search-dropdown{max-height:unset;height:100vh;width:100%;position:fixed;right:0;top:0;z-index:10001;margin:0;font-family:Montserrat!important}}:host .dropdown-right{right:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box{position:relative;height:42px;display:flex;margin-right:0!important;color:#4c4c4c;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box .type-select-search{width:100%;height:100%;border:none;border-radius:0;border-right:.5px solid #eaeaea;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box.type-select-selected{padding:3px}:host .type-select-picker-container .type-select-search-box button{width:100%;display:flex;align-items:center;border-radius:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box button .selected-type-select{width:100%}:host .type-select-picker-container .type-select-search-box button:focus{outline:0}:host .type-select-picker-container .result-item-heading{background:#fff;color:#b2b2b2;padding:8px;text-transform:uppercase;font-weight:600;margin-top:10px;font-size:14px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper{position:absolute;background-color:#fff;z-index:50;box-shadow:0 3px 5px 0 rgba(23,35,44,.24);width:400px;max-height:530px;overflow:auto;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list{padding-left:0;list-style:none;margin-bottom:0;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .all-airport-name{color:#878787;font-weight:300;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .anywhere{margin-top:16px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item{padding:8px 8px 8px 16px;color:#737373;font-weight:500;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item .location-icon{padding-right:6px}:host .type-select-picker-container .results-wrapper .results-list .result-item:first-child{border-top:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.focused{background-color:#f1f4f7;cursor:pointer}:host .type-select-picker-container .results-wrapper .results-list .result-item.disable-hover{pointer-events:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.no-hover:hover{background-color:unset;color:unset;cursor:unset}:host .type-select-picker-container .results-wrapper .results-list .result-item .country{font-weight:700}@media only screen and (max-width:767px){:host .type-select-picker-container .results-wrapper{max-height:unset;height:calc(100% - 56px);overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:40px;font-family:Montserrat!important}}:host .b-l-none{border-left:none!important}:host .b-r-none{border-right:none!important}@media only screen and (min-width:767px){:host .search-dropdown{top:35px;font-family:Montserrat!important}:host .b-l-desktop-none{border-left:none!important}:host .b-r-desktop-none{border-right:none!important}}"]}]}],t.ctorParameters=function(){return[{type:y}]},t.propDecorators={airports:[{type:o.Input}],searchInput:[{type:o.ViewChild,args:["searchInput"]}],searchResultsWrapper:[{type:o.ViewChild,args:["searchResultsWrapper"]}],searchResultsListElement:[{type:o.ViewChild,args:["searchResultsList"]}],searchInputWrapper:[{type:o.ViewChild,args:["searchInputWrapper"]}],baseURL:[{type:o.Input}],destinations:[{type:o.Input}],searchedDestinations:[{type:o.Input}],selectedAirport:[{type:o.Input}],country:[{type:o.Input}],airportSelected:[{type:o.Output}],enterClicked:[{type:o.Output}],onClick:[{type:o.HostListener,args:["document:click",["$event.target"]]}]},t}(b),w=function(e){function t(){var t=e.call(this)||this;return t.adultsNumbers=[1,2,3,4,5,6,7,8,9],t.childsNumbers=[0,1,2,3,4,5,6,7,8,9],t.isDropDownOpen=!1,t.updateRoom=new o.EventEmitter,t.removeRoom=new o.EventEmitter,t.addRoom=new o.EventEmitter,t}return h(t,e),t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(t){},t.prototype.handleSelect=function(t,e,n){this.updateRoom.emit({roomIndex:t,name:e,value:n})},t.prototype.toggleDropDown=function(t){t&&(t.preventDefault(),t.stopPropagation()),this.isDropDownOpen=!this.isDropDownOpen},t.decorators=[{type:o.Component,args:[{selector:"ts-party-size-picker",template:'<div class="search-dropdown dropdown-right party-picker-container">\n  <div class="search-input-container">\n      <span class="fa fa-arrow-left back-icon side-icon" (click)="closeDropDown.emit()">\n        </span>\n        \x3c!-- <span class="fa fa-users side-icon input-side-icon">\n        </span> --\x3e\n    <input readonly #dropdownInput autofocus class="search-input picker-input" [value]="guestsTotal + \' Adults\'">\n  </div>\n  <div class="party-picker-container" (click)="$event.stopPropagation()">\n    <div class="party-picker-content">\n      <div class="row party-picker-header">\n        <div class="col-xs-3 cell border-right ">\n          Room\n        </div>\n        <div class="col-xs-3 cell border-right ">\n          Adults\n        </div>\n        <div class="col-xs-3 cell border-right ">\n          Children\n        </div>\n        <div class="col-xs-3 cell">\n\n        </div>\n      </div>\n      <div class="party-picker-rooms row" *ngFor="let room of rooms; let i = index">\n        <div class="cell col-xs-3 border-right ">#{{i + 1}}</div>\n        <div class="cell col-xs-3 border-right ">\n          <select name="adult-{{i}}" (change)="handleSelect(i, \'adults\', $event.target.value)">\n            <option *ngFor="let number of adultsNumbers" [selected]="room.adults === number" [value]="number">{{number}}</option>\n          </select>\n        </div>\n        <div class="cell col-xs-3 border-right ">\n          <select name="child-{{i}}" (change)="handleSelect(i, \'children\', $event.target.value)">\n            <option *ngFor="let number of childsNumbers" [selected]="room.children === number" [value]="number">{{number}}</option>\n          </select>\n        </div>\n        <div *ngIf="i !== 0" class="cell col-xs-3 " (click)="$event.preventDefault(); removeRoom.emit(i)">\n          <div class="remove-btn party-btn">\n            x\n          </div>\n        </div>\n      </div>\n      <div class="row add-button-row">\n        <div class="cell col-xs-3">\n          \x3c!-- <button type="button" class="btn btn-sm" (click)="addRoom.emit()">Add another room\n          </button> --\x3e\n        </div>\n        <div class="cell col-xs-3">\n\n        </div>\n        <div class="cell col-xs-3">\n\n        </div>\n        <div class="cell col-xs-3">\n          <div *ngIf="rooms.length !== 4" class="party-btn" (click)="addRoom.emit()">Add\n          </div>\n        </div>\n      </div>\n      <div class="row done-btn" style="margin: 30px;">\n        <div class="">\n          <button type="button" class="btn btn-xs btn-secondary btn-block"  (click)="closeDropDown.emit()">Done\n          </button>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n',styles:[":host .party-picker-container{background-color:#fff;font-family:Montserrat!important}:host .party-picker-container .party-picker-content .cell{text-align:center}:host .party-picker-container .party-picker-content .border-right{border-right:1px dotted #000;font-family:Montserrat!important}:host .party-picker-container .party-picker-content .party-btn{background-color:#fbac2d;color:#fff;font-size:small;font-weight:600;cursor:pointer;height:20px;font-family:Montserrat!important}:host .party-picker-container .party-picker-content .party-picker-header{margin-right:0;margin-left:0;background:#fff;color:#b2b2b2;padding:8px;text-transform:uppercase;font-weight:600;font-size:14px;font-family:Montserrat!important}:host .party-picker-container .party-picker-content .party-picker-rooms{font-size:14px;padding:8px;margin-right:0;margin-left:0;font-family:Montserrat!important}:host .party-picker-container .party-picker-content .party-picker-rooms .remove-btn{background-color:#d74949}:host .party-picker-container .party-picker-content .add-button-row{padding:8px;margin-right:0;margin-left:0;font-family:Montserrat!important}@media only screen and (min-width:767px){:host .party-picker-container{position:absolute;box-shadow:0 3px 5px 0 rgba(23,35,44,.24);width:380px;font-family:Montserrat!important}:host .party-picker-container .done-btn{display:none}}","@import url(https://fonts.googleapis.com/css?family=Montserrat&display=swap);:host{font-family:Montserrat!important}:host .search-input{text-overflow:ellipsis;padding-left:10px;border-radius:10px;width:100%;height:40px;border:none;font-family:Montserrat!important}:host .search-input:focus{outline:0;font-family:Montserrat!important}:host .search-input::-webkit-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::-ms-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input-container{display:flex;border-radius:10px;font-family:Montserrat!important;padding-bottom:0}:host .search-input-container .side-icon{align-items:center;justify-content:center}:host .search-input-container .back-icon{display:none;padding:10px;font-family:Montserrat!important}:host .search-input-container .input-side-icon{padding:15px;font-family:Montserrat!important}:host .picker-input{border:none;box-shadow:none;font-family:Montserrat!important}:host .search-dropdown{border-radius:10px;position:absolute;width:100%;background-color:#fff;z-index:50;max-height:350px;font-family:Montserrat!important}:host .search-dropdown .search-input{border:none;font-family:Montserrat!important}@media only screen and (max-width:767px){:host .search-input-container .back-icon{display:flex;font-family:Montserrat!important}:host .search-input-container .input-side-icon{display:none;font-family:Montserrat!important}:host .search-dropdown{max-height:unset;height:100vh;width:100%;position:fixed;right:0;top:0;z-index:10001;margin:0;font-family:Montserrat!important}}:host .dropdown-right{right:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box{position:relative;height:42px;display:flex;margin-right:0!important;color:#4c4c4c;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box .type-select-search{width:100%;height:100%;border:none;border-radius:0;border-right:.5px solid #eaeaea;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box.type-select-selected{padding:3px}:host .type-select-picker-container .type-select-search-box button{width:100%;display:flex;align-items:center;border-radius:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box button .selected-type-select{width:100%}:host .type-select-picker-container .type-select-search-box button:focus{outline:0}:host .type-select-picker-container .result-item-heading{background:#fff;color:#b2b2b2;padding:8px;text-transform:uppercase;font-weight:600;margin-top:10px;font-size:14px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper{position:absolute;background-color:#fff;z-index:50;box-shadow:0 3px 5px 0 rgba(23,35,44,.24);width:400px;max-height:530px;overflow:auto;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list{padding-left:0;list-style:none;margin-bottom:0;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .all-airport-name{color:#878787;font-weight:300;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .anywhere{margin-top:16px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item{padding:8px 8px 8px 16px;color:#737373;font-weight:500;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item .location-icon{padding-right:6px}:host .type-select-picker-container .results-wrapper .results-list .result-item:first-child{border-top:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.focused{background-color:#f1f4f7;cursor:pointer}:host .type-select-picker-container .results-wrapper .results-list .result-item.disable-hover{pointer-events:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.no-hover:hover{background-color:unset;color:unset;cursor:unset}:host .type-select-picker-container .results-wrapper .results-list .result-item .country{font-weight:700}@media only screen and (max-width:767px){:host .type-select-picker-container .results-wrapper{max-height:unset;height:calc(100% - 56px);overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:40px;font-family:Montserrat!important}}:host .b-l-none{border-left:none!important}:host .b-r-none{border-right:none!important}@media only screen and (min-width:767px){:host .search-dropdown{top:35px;font-family:Montserrat!important}:host .b-l-desktop-none{border-left:none!important}:host .b-r-desktop-none{border-right:none!important}}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={rooms:[{type:o.Input}],guestsTotal:[{type:o.Input}],updateRoom:[{type:o.Output}],removeRoom:[{type:o.Output}],addRoom:[{type:o.Output}]},t}(b),k=function(e){function t(){var t=e.call(this)||this;return t.monthData=null,t.dayWords=["Mo","Tu","We","Th","Fr","Sa","Su"],t.monthsWords=["January","February","March","April","May","June","July","August","September","October","November","December"],t.daysCount=-1,t.newDateSelected=new o.EventEmitter,t.checkedFlexible=new o.EventEmitter,t.showPicker=!1,t.selectedDate=null,t.moment=n,t}return h(t,e),t.prototype.ngOnInit=function(){var t=new Date;if(this.selectedDate=this.createDateObject(this.date),this.validateDateInput(this.date)){var e=this.moment(this.date).get("year"),n=this.moment(this.date).get("month");this.monthData=this.getMonthData(e,n+1,this.selectedDate)}else this.monthData=this.getMonthData(t.getFullYear(),t.getMonth()+1,this.selectedDate)},t.prototype.ngOnChanges=function(t){},t.prototype.flexibleChecked=function(){this.isflexible=!this.isflexible,this.checkedFlexible.emit(this.isflexible)},t.prototype.componentWillUpdate=function(){this.daysCount=-1},t.prototype.validateDateInput=function(t){return/([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/.test(t)},t.prototype.createDateObject=function(t){if(this.validateDateInput(t)){var e=this.date.split("-");return{month:parseInt(e[1].replace(/^0+/,"")),date:parseInt(e[2].replace(/^0+/,""))}}return null},t.prototype.getMonthData=function(t,e,n){var o=[],r=new Date(t,e-1,1),s=r.getDay();0===s&&(s=7),t=r.getFullYear(),e=r.getMonth()+1;for(var i=new Date(t,e-1,0).getDate(),a=s-1,c=new Date(t,e,0).getDate(),p="",l=0;l<42;l++){var h=l+1-a,d=h,u=e;if(h<=0)u=e-1,d=i+h,p="nice-gray";else if(c<h)u=e+1,d-=c,p="nice-gray";else if(null!==n)p=h===n.date&&u===n.month?"normal-date current-selection":"normal-date";else{var m=new Date;p=d===m.getDate()&&u===m.getMonth()+1?"normal-date current-selection":"normal-date"}13===u&&(u=1),0===u&&(u=12),o.push({month:u,date:h,showDate:d,styleCls:p})}return{year:t,month:e,date:o}},t.prototype.changeMonth=function(t){var e,n;if(this.daysCount=-1,this.monthData&&(e=this.monthData.year,n=this.monthData.month),"prev"===t){if(this.moment().month()+1===this.monthData.month&&this.moment().year()===this.monthData.year)return;0===--n&&(n=12,e-=1)}"next"===t&&n++,this.buildUI(e,n)},t.prototype.buildUI=function(t,e){this.monthData=this.getMonthData(t,e,this.selectedDate)},t.prototype.setSelected=function(t){var e=this.monthData.year,n=this.monthData.month;this.daysCount=-1,this.selectedDateValue=e+"-"+this.numberFormat(t.month)+"-"+this.numberFormat(t.date),this.newDateSelected.emit(this.selectedDateValue),this.monthData=this.getMonthData(e,n,t)},t.prototype.numberFormat=function(t){return((t=parseInt(t))<10?"0":"")+t},t.decorators=[{type:o.Component,args:[{selector:"ts-date-picker",template:'<div class="search-dropdown dropdown-left date-picker-container">\n  <div class="search-input-container">\n      <span class="fa fa-arrow-left back-icon side-icon" (click)="closeDropDown.emit()">\n        </span>\n        \x3c!-- <span class="fa fa-calendar side-icon input-side-icon">\n        </span> --\x3e\n    <input #dropdownInput autofocus class="search-input picker-input" [value]="date | formatDate: \'DD MMM YYYY\'"\n      readonly>\n  </div>\n  <div class="destination-select">\n    <div id="ts-calendar" class="date-picker-warpper">\n      <div class="ts-date-picker-header">\n        <button id="prev-btn" type="button" (click)="this.changeMonth(\'prev\')" class="calendar-btn">&lt;</button>\n        <span class="date-picker-header-title">{{this.monthsWords[this.monthData.month - 1]}} {{this.monthData.year}} </span>\n        <button id="next-btn" type="button" (click)="this.changeMonth(\'next\')" class=" calendar-btn">&gt;</button>\n      </div>\n      <div class="nice-date-picker-body">\n        <div class="picker-content">\n          <div class="calendar-header">\n            <div class="calender-cell" *ngFor="let day of dayWords">{{day}}</div>\n          </div>\n          <div *ngFor="let date of monthData.date; let i=index;">\n            <br *ngIf="(i)%7==0">\n            <div class="calender-cell {{date.styleCls}}" (click)="date.styleCls === \'normal-date\' ? this.setSelected(date) : null">\n              {{date.showDate}} </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n',styles:[":host .date-picker-container{max-height:unset;font-family:Montserrat!important}:host .date-picker-container .date-picker-warpper{background-color:#fff;font-family:Montserrat!important}@media only screen and (max-width:767px){:host .date-picker-container{height:100vh!important;width:100%!important}}@media only screen and (min-width:767px){:host .date-picker-container .date-picker-warpper{position:absolute;box-shadow:0 3px 5px 0 rgba(23,35,44,.24)}}:host .date-picker-container .ts-date-picker-header{margin-right:0;margin-left:0;background:#fff;color:#b2b2b2;padding:8px;text-transform:uppercase;font-weight:600;font-size:14px;display:flex;justify-content:space-between;vertical-align:middle;margin-bottom:10px;font-family:Montserrat!important}:host .date-picker-container .ts-date-picker-header .date-picker-header-title{margin-top:5px;font-family:Montserrat!important}:host .date-picker-container .ts-date-picker-header .calendar-btn{border:1px solid #aaa;border-radius:2px;font-size:unset;background:0 0;width:35px;font-family:Montserrat!important}:host .date-picker-container .ts-date-picker-header .calendar-btn:hover{background:#fbac2d;color:#fff}:host .date-picker{border:unset;border-radius:unset;display:unset;font-family:Montserrat!important}:host .nice-date-picker-body{width:350px;font-family:Montserrat!important}:host .nice-date-picker-body .calendar-header{font-weight:600}:host .nice-date-picker-body .calender-cell{text-align:center;width:50px;float:left;height:40px;vertical-align:middle;line-height:40px}:host .nice-date-picker-body .nice-gray{opacity:.3}:host .nice-date-picker-body .normal-date{cursor:pointer}:host .nice-date-picker-body .normal-date:hover{background:#fbac2d;color:#fff}:host .nice-date-picker-body .current-selection{background:#fbac2d;color:#fff;transition:.2s}@media only screen and (max-width:767px){:host .nice-date-picker-body .picker-content{position:absolute;top:35%;left:50%;margin-right:-50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}}@media only screen and (max-width:330px){:host .nice-date-picker-body .picker-content{width:280px;top:40%}:host .nice-date-picker-body .calender-cell{width:40px}}","@import url(https://fonts.googleapis.com/css?family=Montserrat&display=swap);:host{font-family:Montserrat!important}:host .search-input{text-overflow:ellipsis;padding-left:10px;border-radius:10px;width:100%;height:40px;border:none;font-family:Montserrat!important}:host .search-input:focus{outline:0;font-family:Montserrat!important}:host .search-input::-webkit-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::-ms-input-placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input::placeholder{color:#b6b6b6;font-family:Montserrat!important}:host .search-input-container{display:flex;border-radius:10px;font-family:Montserrat!important;padding-bottom:0}:host .search-input-container .side-icon{align-items:center;justify-content:center}:host .search-input-container .back-icon{display:none;padding:10px;font-family:Montserrat!important}:host .search-input-container .input-side-icon{padding:15px;font-family:Montserrat!important}:host .picker-input{border:none;box-shadow:none;font-family:Montserrat!important}:host .search-dropdown{border-radius:10px;position:absolute;width:100%;background-color:#fff;z-index:50;max-height:350px;font-family:Montserrat!important}:host .search-dropdown .search-input{border:none;font-family:Montserrat!important}@media only screen and (max-width:767px){:host .search-input-container .back-icon{display:flex;font-family:Montserrat!important}:host .search-input-container .input-side-icon{display:none;font-family:Montserrat!important}:host .search-dropdown{max-height:unset;height:100vh;width:100%;position:fixed;right:0;top:0;z-index:10001;margin:0;font-family:Montserrat!important}}:host .dropdown-right{right:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box{position:relative;height:42px;display:flex;margin-right:0!important;color:#4c4c4c;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box .type-select-search{width:100%;height:100%;border:none;border-radius:0;border-right:.5px solid #eaeaea;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box.type-select-selected{padding:3px}:host .type-select-picker-container .type-select-search-box button{width:100%;display:flex;align-items:center;border-radius:0;font-family:Montserrat!important}:host .type-select-picker-container .type-select-search-box button .selected-type-select{width:100%}:host .type-select-picker-container .type-select-search-box button:focus{outline:0}:host .type-select-picker-container .result-item-heading{background:#fff;color:#b2b2b2;padding:8px;text-transform:uppercase;font-weight:600;margin-top:10px;font-size:14px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper{position:absolute;background-color:#fff;z-index:50;box-shadow:0 3px 5px 0 rgba(23,35,44,.24);width:400px;max-height:530px;overflow:auto;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list{padding-left:0;list-style:none;margin-bottom:0;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .all-airport-name{color:#878787;font-weight:300;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .anywhere{margin-top:16px;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item{padding:8px 8px 8px 16px;color:#737373;font-weight:500;font-family:Montserrat!important}:host .type-select-picker-container .results-wrapper .results-list .result-item .location-icon{padding-right:6px}:host .type-select-picker-container .results-wrapper .results-list .result-item:first-child{border-top:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.focused{background-color:#f1f4f7;cursor:pointer}:host .type-select-picker-container .results-wrapper .results-list .result-item.disable-hover{pointer-events:none}:host .type-select-picker-container .results-wrapper .results-list .result-item.no-hover:hover{background-color:unset;color:unset;cursor:unset}:host .type-select-picker-container .results-wrapper .results-list .result-item .country{font-weight:700}@media only screen and (max-width:767px){:host .type-select-picker-container .results-wrapper{max-height:unset;height:calc(100% - 56px);overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:40px;font-family:Montserrat!important}}:host .b-l-none{border-left:none!important}:host .b-r-none{border-right:none!important}@media only screen and (min-width:767px){:host .search-dropdown{top:35px;font-family:Montserrat!important}:host .b-l-desktop-none{border-left:none!important}:host .b-r-desktop-none{border-right:none!important}}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={date:[{type:o.Input}],newDateSelected:[{type:o.Output}],checkedFlexible:[{type:o.Output}]},t}(b),D=function(){function t(t){this._elementRef=t,this.clickOutside=new o.EventEmitter}return t.prototype.onClick=function(t){this._elementRef.nativeElement.contains(t)||this.clickOutside.emit(null)},t.decorators=[{type:o.Directive,args:[{selector:"[clickOutside]"}]}],t.ctorParameters=function(){return[{type:o.ElementRef}]},t.propDecorators={clickOutside:[{type:o.Output}],onClick:[{type:o.HostListener,args:["document:click",["$event.target"]]}]},t}(),M=function(){function t(){}return t.decorators=[{type:o.NgModule,args:[{declarations:[D],imports:[e.CommonModule],exports:[D]}]}],t}(),I=function(){function t(t){this.element=t,this.sectionPosition=new o.EventEmitter}return t.prototype.ngOnInit=function(){this.sectionPosition.emit({name:this.title,position:this.element.nativeElement.offsetTop})},t.prototype.onResize=function(t){this.sectionPosition.emit({name:this.title,position:this.element.nativeElement.offsetTop})},t.decorators=[{type:o.Component,args:[{selector:"sticky-header",template:'<li class="result-item-heading" (click)="$event.stopPropagation()">{{title}}</li>',styles:["img{height:320px}hr{margin-bottom:21px;border:0;border-top:1px solid #434857}"]}]}],t.ctorParameters=function(){return[{type:o.ElementRef}]},t.propDecorators={sectionPosition:[{type:o.Output}],title:[{type:o.Input}],onResize:[{type:o.HostListener,args:["window:resize",["$event"]]}]},t}(),F=function(){function t(){this.moment=n}return t.prototype.transform=function(t,e){return t?this.moment.utc(t).format(e):""},t.decorators=[{type:o.Pipe,args:[{name:"formatDate"}]}],t}(),C=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:o.Component,args:[{selector:"ts-spinner-svg",template:'<div class="spinner-svg-content">\n    <svg class="spinner-crescent" viewBox="0 0 64 64">\n        <circle transform="translate(32,32)" r="26"></circle>\n    </svg>\n</div>\n',styles:[".spinner-svg-content{position:relative;display:inline-block;width:56px;height:56px}.spinner-svg-content svg.spinner-crescent{left:0;top:0;position:absolute;width:100%;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:1s linear infinite spinner-rotate;animation:1s linear infinite spinner-rotate}.spinner-svg-content svg.spinner-crescent circle{fill:transparent;stroke-width:3px;stroke-dasharray:128px;stroke-dashoffset:82px;stroke:#fbac2d}@-webkit-keyframes spinner-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}:host.color-white svg.spinner-crescent circle{stroke:#fff}:host.size-sm .spinner-svg-content{height:24px;width:24px}:host.stroke-md svg.spinner-crescent circle{stroke-width:5px}"]}]}],t.ctorParameters=function(){return[]},t}(),S=function(){function t(){}return t.decorators=[{type:o.NgModule,args:[{declarations:[C],imports:[e.CommonModule],exports:[C]}]}],t}(),T=function(){function t(t){this.injector=t}return t.prototype.ngDoBootstrap=function(){},t.decorators=[{type:o.NgModule,args:[{imports:[e.CommonModule,M,r.HttpClientModule,i.ReactiveFormsModule,i.FormsModule,S],declarations:[g,x,v,w,k,F,I],exports:[g,F],providers:[y,f],entryComponents:[g]}]}],t.ctorParameters=function(){return[{type:o.Injector}]},t}();t.TsSearchModule=T,t.ɵj=v,t.ɵl=k,t.ɵh=x,t.ɵk=w,t.ɵi=b,t.ɵn=I,t.ɵe=g,t.ɵd=C,t.ɵc=S,t.ɵb=D,t.ɵa=M,t.ɵm=F,t.ɵg=f,t.ɵf=y,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ts-angular-components.umd.min.js.map