1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[454],{2166:function(e,t,r){"use strict";r.d(t,{Y:function(){return E}});var l=r(809),i=r.n(l),n=r(2447),a=r(4047),s=r(2700),o=r(4706),c=r(8127),u=r(4102),p=r(775),h=r(6265),f=r(7294),d=r(9770),v=r(2142),m=r(7872),g=(r(1919),f.createElement);function y(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,l=(0,p.Z)(e);if(t){var i=(0,p.Z)(this).constructor;r=Reflect.construct(l,arguments,i)}else r=l.apply(this,arguments);return(0,u.Z)(this,r)}}var S=function(e){(0,c.Z)(r,e);var t=y(r);function r(e){var l;return(0,a.Z)(this,r),(l=t.call(this,e)).state={values:[]},l}return(0,s.Z)(r,[{key:"componentDidMount",value:function(){}},{key:"updateState",value:function(e,t){}},{key:"render",value:function(){var e=this,t=this.props,r=t.keyvalues;t.selected,t.onValueChange;return r&&g("div",null,Object.keys(r).map((function(t,l){return g("p",{key:l,style:{marginBottom:"0px"}},g("input",{type:"checkbox",value:t,style:{marginBottom:"0px",marginRight:"10px"},onChange:function(r){return e.updateState(t,r.target)}}),r[t])})))}}]),r}(f.Component);(0,h.Z)(S,"displayName",S.name);var C=f.createElement;function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,h.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,l=(0,p.Z)(e);if(t){var i=(0,p.Z)(this).constructor;r=Reflect.construct(l,arguments,i)}else r=l.apply(this,arguments);return(0,u.Z)(this,r)}}var N={True:"Convertible",False:"Non-Convertible"},x={2:"2",3:"3",4:"4"},I={LHD:"Left-hand Drive",RHD:"Right-hand Drive"},O={Automatic:"Automatic",Manual:"Manual"},b=function(e){(0,c.Z)(r,e);var t=F(r);function r(e){var l;return(0,a.Z)(this,r),(l=t.call(this,e)).state={vehicleMake:null,vehicleModel:null,vehicleOrigin:null,vehicleExtColour1:null,vehicleIntColour1:null,convertable:null,fromyear:null,toyear:null,category:null,vehicleDoors:null,vehicleSeating:null,vehicleDriveOrientation:null,vehicleGearing:null,startDate:null,duration:null,locations:null,chauffeurDriven:!1,commercialDriven:!1,privateDriven:!1},l.showFilters={model:!1},l}return(0,s.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props.filterValues;e?this.setState(k({},e)):this.props.onStateChange&&this.props.onStateChange(this.state,!1,!0),null==this.props.filterValues||0==this.props.filterValues.vehicleMake||"undefined"==typeof this.props.filterValues.vehicleMake?this.showeFilters={model:!1}:this.showeFilters={model:!0}}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(e.filterValues){var t=!1,r=Object.assign({},this.state),l=e.filterValues;if(l.category!=r.category&&(t=!0,r.category=l.category),l.vehicleMake!=r.vehicleMake&&(t=!0,r.vehicleMake=l.vehicleMake),l.vehicleModel!=r.vehicleModel&&(t=!0,r.vehicleModel=l.vehicleModel),l.vehicleOrigin!=r.vehicleOrigin&&(t=!0,r.vehicleOrigin=l.vehicleOrigin),l.vehicleExtColour1!=r.vehicleExtColour1&&(t=!0,r.vehicleExtColour1=l.vehicleExtColour1),l.vehicleIntColour1!=r.vehicleIntColour1&&(t=!0,r.vehicleIntColour1=l.vehicleIntColour1),l.vehicleYearsFrom!=r.vehicleYearsFrom&&(t=!0,r.vehicleYearsFrom=l.vehicleYearsFrom),l.vehicleYearsTo!=r.vehicleYearsTo&&(t=!0,r.vehicleYearsTo=l.vehicleYearsTo),l.vehiclePassengers!=r.vehiclePassengers&&(t=!0,r.vehiclePassengers=l.vehiclePassengers),1==t){var i=k({},r);this.setState(i)}}}},{key:"updateFilter",value:function(e,t){"vehicleMake"==e&&(this.show
1Filters=0==t||"undefined"==typeof t?{model:!1}:{model:!0});var r=this.props.onStateChange,l=Object.assign({},this.state),i=JSON.parse(localStorage.getItem("searchFilter"));null!=i&&(null!=i.startDate&&i.startDate!=l.startDate&&(l.startDate=i.startDate),null!=i.duration&&i.duration!=l.duration&&(l.duration=i.duration),null!=i.locations&&i.locations!=l.locations&&(l.locations=i.locations)),l[e]=t;var n=k({},l);this.setState(n),r&&r(n)}},{key:"checkValidPassenger",value:function(e){var t=e.target.value;t<0?t=0:t>60&&(t=60),this.updateFilter("vehicleSeating",t)}},{key:"render",value:function(){var e=this,t=this.props,r=t.filterValues,l=t.numFilters,i=l?1==l?"( 1 filter active":"( "+l+" filters active":"( No filters active";return C("div",{className:"filterPanelForm"},C("div",{className:"grid-x grid-margin-x"},this.props.windowInnerWidth<450&&C("div",{className:"cell"},C("h2",{className:"filterTitle"},"Advanced Filters"),C("hr",{style:{margin:"0px"}})),C("div",{className:"cell large-6 medium-12 small-12"},this.props.windowInnerWidth<450&&C("div",{className:"filterPanelField"},C(v.M,{boldStyle:!1,options:this.props.filters.vehicleCat,value:null!=r?r.category:null,placeh:"Select Vehicle Type",onChange:function(t){return e.updateFilter("category",t)}})),C("div",{className:"filterPanelField"},C(v.M,{options:this.props.filters.vehicleMake,value:null!=r?r.vehicleMake:null,placeh:"Select Make",onChange:function(t){return e.updateFilter("vehicleMake",t)}})),null!=r&&r.vehicleMake&&"0"!=r.vehicleMake&&C(v.M,{options:this.props.filters.vehicleModel,value:r.vehicleModel,stepped:!0,placeh:"Select Model",onChange:function(t){return e.updateFilter("vehicleModel",t)}}),C("div",{className:"filterPanelField_Split"},C("div",{className:"filterPanelField"},C(v.M,{options:this.props.filters.vehicleYearsFrom,value:null!=r?r.fromyear:null,placeh:"Year from",onChange:function(t){return e.updateFilter("fromyear",t)}})),C("div",{className:"filterPanelField"},C(v.M,{options:this.props.filters.vehicleYearsTo,value:null!=r?r.toyear:null,placeh:"Year to",onChange:function(t){return e.updateFilter("toyear",t)}}))),C("div",{className:"filterPanelField"},C(v.M,{options:this.props.filters.vehicleOrigin,value:null!=r?r.vehicleOrigin:null,placeh:"Select Country of Origin",onChange:function(t){return e.updateFilter("vehicleOrigin",t)}})),C("div",{className:"filterPanelField"},C(v.M,{options:N,value:null!=r?r.convertable:null,placeh:"Roof Type",onChange:function(t){return e.updateFilter("convertable",t)}}))),C("div",{className:"cell large-6 medium-12 small-12"},C("div",{className:"filterPanelField"},C(v.M,{options:this.props.filters.vehicleExtColour1,value:null!=r?r.vehicleExtColour1:null,placeh:"Exterior Colour",onChange:function(t){return e.updateFilter("vehicleExtColour1",t)}})),C("div",{className:"filterPanelField"},C(v.M,{options:this.props.filters.vehicleIntColour1,value:null!=r?r.vehicleIntColour1:null,placeh:"Interior Colour",onChange:function(t){return e.updateFilter("vehicleIntColour1",t)}})),C("div",{className:"filterPanelField_Split"},C("div",{className:"filterPanelField"},C(v.M,{options:x,value:null!=r?r.vehicleDoors:null,placeh:"No. of Doors",onChange:function(t){return e.updateFilter("vehicleDoors",t)}})),C("div",{className:"filterPanelField"},C("input",{type:"number",min:m.ji,max:60,pattern:m.cZ,name:"vehicleSeating",className:"filterPanelTextBox",value:null!=r&&null!=r.vehicleSeating?r.vehicleSeating:"",placeholder:"- No. of Passengers -",onKeyPress:function(e){return(0,m.qA)(e)},onChange:function(t){return e.checkValidPassenger(t)}}))),C("div",{className:"filterPanelField"},C(v.M,{options:I,value:null!=r?r.vehicleDriveOrientation:null,placeh:"Drive orientation",onChange:function(t){return e.updateFilter("vehicleDriveOrientation",t)}})),C("div",{className:"filterPanelField"},C(v.M,{options:O,value:null!=r?r.vehicleGearing:null,placeh:"Gearing",onChange:function(t){return e.updateFilter("vehicleGearing",t)}}))),C("div",{className:"cell large-12 medium-12 small-12 drivenFilters"},C("div",{className:"grid-x"},C("div",{className:"cell large-4 medium-6 small-12"},C("label",{style:{width:"100%"}},C("input",{checked:null!=r&&r.chauffeurDriven,type:"checkbox",name:"chauffeur",style:{marginBottom:"0px",marginTop:"8px",float:"left",accentColor:"#1C5C6C "},onChange:function(t){return e.updateFilter("chauffeurDriven",t.target.checked)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Chauffeur / Owner Driven"))),C("div",{className:"cell large-4 medium-6 small-12"},C("label",{style:{width:"100%"}},C("input",{checked:null!=r&&r.commercialDriven,type:"checkbox",name:"commercial",style:{marginBottom:"0px",marginTop:"8px",float:"left",accentColor:"#1C5C6C "},onChange:function(t){return e.updateFilter("commercialDriven",t.target.checked)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Self-Drive for Tv/Film (Commercial)"))),C("div",{className:"cell large-4 medium-6 small-12"},C("label",{style:{width:"100%"}},C("input",{checked:null!=r&&r.privateDriven,type:"checkbox",name:"commercial",style:{marginBottom:"0px",marginTop:"8px",float:"left",accentColor:"#1C5C6C "},onChange:function(t){return e.updateFilter("privateDriven",t.target.checked)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Fully self-drive (private individual)"))))),C("div",{className:"cell"},this.props.windowInnerWidth<450?C("div",{className:"grid-x filterButtonContainer"},C("div",{className:"cell large-8 medium-4 small-12",style:{marginBottom:"10px"}},C("span",null,i," ",l>0&&C("a",{className:"clearAllLink",id:"",onClick:function(t){return e.props.clearFilter(t)}},"Clear filter")," )")),C("div",{className:"cell large-4 medium-8 small-12 filterButtons"},C("button",{className:"btnNearby_Acpt",style:{backgroundColor:"#808080"},onClick:function(t){return e.props.clearFilter(t)}},"Clear filter"),C("button",{className:"btnNearby_Acpt",style:{backgroundColor:"#49ba9e"},onClick:function(t){return e.props.close(t)}},"View Results"))):C("div",{className:"grid-x filterButtonContainer"},C("div",{className:"cell large-12 medium-12 small-12",style:{marginBottom:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center"}},C("span",null,i," ",l>0&&C("a",{className:"clearAllLink",id:"",onClick:function(t){return e.props.clearFilter(t)}},"Clear filter")," )"),C("button",{className:"closeFilter",onClick:function(){e.props.close()}},C("i",{className:"fa fa-chevron-up"})))))))}}]),r}(f.Component);(0,h.Z)(b,"displayName",b.name);var D=r(1598),P=f.createElement;function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?M(Object(r),!0).forEach((function(t){(0,h.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Z(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,l=(0,p.Z)(e);if(t){var i=(0,p.Z)(this).constructor;r=Reflect.construct(l,arguments,i)}else r=l.apply(this,arguments);return(0,u.Z)(this,r)}}var T=function(e){(0,c.Z)(r,e);var t=Z(r);function r(e){var l;return(0,a.Z)(this,r),l=t.call(this,e),(0,h.Z)((0,o.Z)(l),"cyclePlaceholder",(function(){l.setState({fade:!1}),setTimeout((function(){l.currentIndex=(l.currentIndex+1)%l.placeholders.length,l.setState({placeholder:l.placeholders[l.currentIndex],fade:!0})}),500)})),l.state={txtSearch:null,placeholder:"Back to the Future Car",fade:!0},l.placeholders=["Back to the Future Car","Ford Mustang","Convertibles","1960s cars","White Cars","Red interior","Yellow Taxi","Muscle Cars"],l.currentIndex=0,l}return(0,s.Z)(r,[{key:"componentDidMount",value:function(){this.placeholderInterval=setInterval(this.cyclePlaceholder,4e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.placeholderInterval)}},{key:"clearSearch",value:function(){var e=this;this.setState({txtSearch:null},(function(){e.props.removeTxtSearch()}))}},{key:"updateTxtSearch",value:function(e){var t=this;this.setState({txtSearch:e},(function(){var r=null!=localStorage.getItem("searchFilter")?JSON.parse(localStorage.getItem("searchFilter")):null;null!=r&&null!=r.textSearch?r.textSearch=e:r=A(A({},r),{},{textSearch:e}),localStorage.setItem("searchFilter",JSON.stringify(r)),t.props.updateText(e)}))}},{key:"getTextSearch",value:function(){var e="",t=this.state.txtSearch,r=this.props.txtSearch;return null!=t?e=t:null!=r&&(e=r),e}},{key:"render",value:function(){var e=this,t=this.getTextSearch(),r=this.state,l=r.placeholder,i=r.fade,n=""==t;return P("div",{className:"filterSearch"},P("input",{type:"textbox",className:"formElements",value:t,placeholder:"",onChange:function(t){return e.updateTxtSearch(t.target.value)},onKeyPress:function(t){"Enter"===t.key&&e.props.textSearch()}}),n&&P("span",{className:"phText",style:{opacity:i?1:0}},l),P("div",{className:"filterSearchIcons",style:{position:"absolute",right:"0",margin:"0px"}},null!=this.props.txtSearch&&""!=this.props.txtSearch&&P("button",{className:"fltBtn",style:{border:"none"},onClick:function(){return e.clearSearch()}},P("i",{className:"fal fa-times"})),P("button",{className:"fltBtn",onClick:function(){return e.props.textSearch()}},P("i",{className:"fal fa-search"}))))}}]),r}(f.Component);(0,h.Z)(T,"displayName",T.name);r(6869);var B=r(2854),j=f.createElement;function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){(0,h.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function W(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,l=(0,p.Z)(e);if(t){var i=(0,p.Z)(this).constructor;r=Reflect.construct(l,arguments,i)}else r=l.apply(this,arguments);return(0,u.Z)(this,r)}}var E=function(e){(0,c.Z)(r,e);var t=W(r);function r(e){var l;return(0,a.Z)(this,r),(l=t.call(this,e)).state={initalFilterClick:!1,filters:{},filtersApplied:{},numberOfFiltersApplied:0,filterOpen:!1,showSortOpts:!1,txtSearch:null,hasItinerary:!1,itineraryFilters:["startDate","duration","locations","minDate","itinerySet","initalLoc","error","duration_time","duration_day"],searchPageURLs:["search","england","scotland","wales","northern-ireland","republic-of-ireland"],showFilters:null!=l.props.filterModalIsOpen&&l.props.filterModalIsOpen},l.onFiltersChange=l.onFiltersChange.bind((0,o.Z)(l)),l}
1return(0,s.Z)(r,[{key:"componentDidMount",value:function(){if(localStorage.getItem("searchFilter")){this.onFiltersChange(JSON.parse(localStorage.getItem("searchFilter")));var e=JSON.parse(localStorage.getItem("searchFilter"));if(null!=e){null!=e.textSearch&&this.setState({txtSearch:e.textSearch});var t=JSON.stringify({duration:e.duration,duration_time:e.duration_time,duration_day:e.duration_day,locations:e.locations,startDate:e.startDate});this.props.updateItinerary(JSON.parse(t))}}else this.props.updateItinerary([]);this.popFilters()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(e.updatedFilter){var t=this.state.filters,r=e.updatedFilter;this.checkFilterChange(r,t)}e.filterModalIsOpen!=this.state.showFilters&&this.setState({showFilters:e.filterModalIsOpen})}},{key:"checkFilterChange",value:function(e,t){var r=!1;e.vehicleMake!=t.vehicleMake&&(r=!0,t.vehicleMake=e.vehicleMake),e.vehicleModel!=t.vehicleModel&&(r=!0,t.vehicleModel=e.vehicleModel),e.vehicleOrigin!=t.vehicleOrigin&&(r=!0,t.vehicleOrigin=e.vehicleOrigin),e.vehicleExtColour1!=t.vehicleExtColour1&&(r=!0,t.vehicleExtColour1=e.vehicleExtColour1),e.vehicleIntColour1!=t.vehicleIntColour1&&(r=!0,t.vehicleIntColour1=e.vehicleIntColour1),e.vehicleYearsFrom!=t.vehicleYearsFrom&&(r=!0,t.vehicleYearsFrom=e.vehicleYearsFrom),e.vehicleYearsTo!=t.vehicleYearsTo&&(r=!0,t.vehicleYearsTo=e.vehicleYearsTo),e.vehiclePassengers!=t.vehiclePassengers&&(r=!0,t.vehiclePassengers=e.vehiclePassengers),r&&this.setState(R(R({},this.state),{},{filters:t}))}},{key:"popFilters",value:function(){var e=(0,n.Z)(i().mark((function e(){var t,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://api.starcarhire.co.uk/api/searchfilters");case 2:return t=e.sent,e.next=5,t.json();case 5:r=e.sent,this.setState(R(R({},this.state),{},{filters:r}));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"countFilters",value:function(){var e=0,t=!0,r=this.state,l=r.filtersApplied,i=r.itineraryFilters;return l&&Object.keys(l).map((function(r,n){i.includes(r)||("categories"==r?e+=l[r].length:0!=l[r]&&null!=l[r]&&"0"!=l[r]&&0!=l[r]&&("vehicleMake"==r?(e+=1,t=!1):((r=!t)||"undefined"!=l[r])&&(e+=1)))})),this.setState(R(R({},this.state),{},{numberOfFiltersApplied:e})),e}},{key:"checkItineraryChanged",value:function(e){var t=!1,r=JSON.parse(localStorage.getItem("searchFilter")),l=r&&r.duration_time?r.duration_time:null,i=r&&r.duration_day?r.duration_day:null,n=r&&r.locations?r.locations:null,a=r&&r.startDate?new Date(r.startDate).toLocaleString():null,s=e&&e.startDate?new Date(e.startDate).toLocaleString():null,o=null!=e&&e.duration_time?e.duration_time:null;return null!=e&&null!=r&&(l==o&&i==e.duration_day&&n==e.locations&&a==s||(t=!0)),t}},{key:"filterData",value:function(e){var t=e,r=JSON.parse(localStorage.getItem("initalLoc"));return null==r?t:null!=r.postcode||r.coords?t=R(R({},r),e):t}},{key:"onFiltersChange",value:function(e,t){var r=this,l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.checkItineraryChanged(e),n=0;null!=e&&(n=e.vehicleMake),0!=n&&"undefined"!=typeof n||null==e||(e.vehicleMake=null,e.vehicleModel=null),this.setState(R(R({},this.state),{},{filtersApplied:e}),(function(){if(!l)if(i){if(1==t){e=r.filterData(r.state.filtersApplied);r.updateItinerary(e)}}else{r.countFilters();var e=r.filterData(r.state.filtersApplied);r.updateItinerary(e)}}));var a=R(R({},this.state),{},{filtersApplied:e});null!=a.filtersApplied&&null!=a.filtersApplied.startDate&&0==this.state.hasItinerary&&this.setState({hasItinerary:!0}),localStorage.setItem("searchFilter",JSON.stringify(e))}},{key:"clearFilter",value:function(e){var t=this;e.preventDefault();var r=JSON.parse(localStorage.getItem("searchFilter"));return r&&(Object.keys(r).map((function(e){t.state.itineraryFilters.includes(e)||(r[e]=null)})),localStorage.setItem("searchFilter",JSON.stringify(r)),this.setState(R(R({},this.state),{},{filtersApplied:r,txtSearch:""}),(function(){return t.onFiltersChange(r)}))),!1}},{key:"textSearch",value:function(){var e=this.state.filtersApplied;null!=e&&null!=e.textSearch?e.textSearch=this.state.txtSearch:e=R(R({},e),{},{textSearch:this.state.txtSearch}),this.onFiltersChange(e,!0)}},{key:"removeTxtSearch",value:function(){var e=this;this.setState({txtSearch:""},(function(){return e.textSearch()}))}},{key:"updateItinerary",value:function(e){if(this.props.updateItinerary(e),this.props.getResults&&null!=this.state.filtersApplied){var t=this.filterData(this.state.filtersApplied);this.props.getResults(t,!0)}}},{key:"updateCat",value:function(e,t){var r=null!=localStorage.getItem("searchFilter")?JSON.parse(localStorage.getItem("searchFilter")):null;null!=r&&null!=r.category?r.category=t:r=R(R({},r),{},{category:t}),this.onFiltersChange(r,!1)}},{key:"checkIfLoggedIn",value:function(){var e=!1;return null!=localStorage.getItem("jwtToken")&&null!=localStorage.getItem("loggedIn")&&(e=localStorage.getItem("loggedIn")),e}},{key:"checkMissingPostcode",value:function(){var e=!1,t=JSON.parse(window.localStorage.getItem("initalLoc")),r=window.localStorage.getItem("searchFilter");if(null==t&&null!=r){var l=JSON.parse(window.localStorage.getItem("searchFilter"))&&JSON.parse(window.localStorage.getItem("searchFilter")).locations?JSON.parse(JSON.parse(window.localStorage.getItem("searchFilter")).locations):null;null!=l&&l.length>0&&l.map((function(t){null!=t&&(1==t.error||null!=t.postcode&&t.postcode.includes("County "))&&(e=!0)}))}return e}},{key:"getHeaderClass",value:function(e,t,r){var l=this.state.showFilters&&this.props.windowInnerWidth>1023?467:this.state.showFilters&&this.props.windowInnerWidth>449?683:143;return e?r>1&&t>110?"filterMobile filterSticky":"filterMobile":r<=4&&this.props.windowInnerWidth>1023?"filterDesktop":r>3&&this.props.windowInnerWidth<1024&&this.props.windowInnerWidth>639?t>l?"filterDesktop filterStickyTablet":"filterDesktop":r<=3&&this.props.windowInnerWidth<1024&&this.props.windowInnerWidth>639?"filterDesktop":r>1&&this.props.windowInnerWidth<640?t>l?"filterDesktop filterStickyTablet":"filterDesktop":r<=1&&this.props.windowInnerWidth<640?"filterDesktop":t>l?"filterDesktop filterStickyDesktop":"filterDesktop"}},{key:"getCategory",value:function(){var e="";return null!=this.state.filtersApplied&&null!=this.state.filtersApplied.category&&(e=this.state.filtersApplied.category),e}},{key:"getTxtSearch",value:function(){var e=this.state.txtSearch,t=null!=window.localStorage.getItem("searchFilter")?JSON.parse(window.localStorage.getItem("searchFilter")):null;return null!=t&&null!=t.textSearch&&""!=t.textSearch?e!=t.textSearch&&(e=t.textSearch):e=null,e}},{key:"sortBySelect",value:function(e){this.setState({showSortOpts:!1});var t={target:{name:"arrangeBy",value:e}};this.props.changeArrangeBy(t)}},{key:"checkIfSearchPage",value:function(){var e=!1;if(null!=this.props.pathURL){var t=this.props.pathURL.split("/");if(t.length>1){var r=t[1];e=this.state.searchPageURLs.includes(r.toLowerCase())}}return e}},{key:"render",value:function(){var e=this;this.getCategory();var t=this.state.numberOfFiltersApplied,r=this.checkIfSearchPage(),l=t?1==t?"1 f
1ilter active ":t+" filters active ":"No filters active",i=this.props.nearbyObject,n=window.localStorage.getItem("searchArrangeBy")?window.localStorage.getItem("searchArrangeBy"):"popular",a=window.scrollY,s=this.getTxtSearch();return j("div",null,r?j("div",{className:this.props.windowInnerWidth>449?"grid-x":"grid-x grid-margin-x",style:{paddingBottom:"5px"}},j("div",{className:this.props.windowInnerWidth>449?"cell":"",style:{flexDirection:"row",display:"",alignItems:"baseline",position:"relative",padding:"0px",width:"100%"}},j(d.m,{modalIsOpen:this.props.itinModalIsOpen,doClose:function(t){return e.props.doClose(t)},showPopup:function(t){return e.props.showPopupItin(t)},windowInnerWidth:this.props.windowInnerWidth},j(D.S,{filterValues:this.state.filtersApplied,onStateChange:this.onFiltersChange,updateItinerary:function(t){return e.updateItinerary(t)},mode:this.props.mode,filterUpdated:function(t){return e.props.filterUpdated(t)},windowInnerWidth:this.props.windowInnerWidth})),this.props.windowInnerWidth<450?j("div",{className:this.getHeaderClass(!0,a,this.props.totalVehicles)},j("div",{className:"filterOptionLine"},j(T,{textSearch:function(){return e.textSearch()},ph:"Search by Keywords",txtSearch:s,updateText:function(t){return e.setState({txtSearch:t})},removeTxtSearch:function(){return e.removeTxtSearch()}}),j(d.m,{iconClass:null,imageName:"filters.svg",imageText:"Filter Icon",modalClass:"filterForm",modalIsOpen:this.props.filterModalIsOpen,doClose:function(t){return e.props.doClose(t)},showPopup:function(t){return e.props.showPopupFilt(t)},windowInnerWidth:this.props.windowInnerWidth},j(b,{windowInnerWidth:this.props.windowInnerWidth,filters:this.state.filters,filterValues:this.state.filtersApplied,onStateChange:this.onFiltersChange,clearFilter:function(t){return e.clearFilter(t)},close:function(t){return e.props.doClose(t)},numFilters:t})),j("div",{className:"filterAdvSearch",onClick:function(){e.setState({showFilters:!e.state.showFilters},(function(){e.props.showPopupFilt(e.state.showFilters)}))}},j("img",{src:"/assets/images/filters.svg",alt:"Filter Icon"}),j("p",null,"Filter")),j("div",{className:"filterOptionAarangeBy",onClick:function(){return e.setState({showSortOpts:!e.state.showSortOpts})}},j("img",{src:"/assets/images/sort.svg",alt:"Filter Icon"}),j("p",{className:"filterAarangeByText"},"Sort")),this.state.showSortOpts&&j("div",{className:"filterAarangeBySelection"},this.state.hasItinerary?j("div",{className:"filterAarangeByOps"},j("p",{onClick:function(){return e.sortBySelect(0)}},"Popular"),j("p",{onClick:function(){return e.sortBySelect(1)}},"Price (low to high)"),j("p",{onClick:function(){return e.sortBySelect(2)}},"Price (high to low)"),j("p",{onClick:function(){return e.sortBySelect(3)}},"Distance (nearby)"),j("p",{onClick:function(){return e.sortBySelect(4)}},"Distance (further)")):j("div",{className:"filterAarangeByOps"},j("p",{onClick:function(){return e.sortBySelect(0)}},"Popular"),j("p",{onClick:function(){return e.sortBySelect(3)}},"Distance (nearby)"),j("p",{onClick:function(){return e.sortBySelect(4)}},"Distance (further)")))),j("div",{className:"filterTextLine"},j("div",{className:"filterTextTopLine"},j("button",{onClick:function(){return e.props.showPopupItin(!0)}},this.state.hasItinerary?j("span",null,i.nearbyCount+i.nationCount," Vehicles match ",j("u",{className:"clearAllLink"},"Your Itinerary")):j("span",null,"Add ",j("u",{className:"clearAllLink"},"Your Itinerary"))),j("span",{className:t>0?"filterActiveFilter":"filterInactiveFilter"},l,t>0&&j("a",{className:"clearAllLink",id:"",onClick:function(t){return e.clearFilter(t)}},"clear"))),this.props.seasonalDrop>1?j("div",{className:"filterVehicleDrops"},j("p",null,j("span",null,this.props.seasonalDrop)," vehicles are unavailable on your event date. Need help? ",j("a",{href:"tel:".concat(B.Zl.replace(/\s+/g,""))},"Call ",B.Zl))):this.props.seasonalDrop>0&&j("div",{className:"filterVehicleDrops"},j("p",null,j("span",null,this.props.seasonalDrop)," vehicle is unavailable on your event date. Need help? ",j("a",{href:"tel:".concat(B.Zl.replace(/\s+/g,""))},"Call ",B.Zl))),this.checkMissingPostcode()&&j("span",{className:"errorTextLine"},j("i",{className:"fa fa-exclamation-triangle"}),"1 or more locations provided are missing postcode, pricing may not be accurate"))):j("div",{className:this.getHeaderClass(!1,a,this.props.totalVehicles)},j("div",{className:"filterBar"},j("div",{className:"filterOptionLine"},j("div",{className:"filterOptions"},j(T,{textSearch:function(){return e.textSearch()},txtSearch:s,updateText:function(t){return e.setState({txtSearch:t})},removeTxtSearch:function(){return e.removeTxtSearch()}}),j("div",{className:"filterCat"},j(v.M,{boldStyle:!1,options:this.props.updatedFilter&&this.props.updatedFilter.vehicleCat?this.props.updatedFilter.vehicleCat:[],value:this.getCategory(),nomargin:!0,placeh:"Select Vehicle Type",onChange:function(t){return e.updateCat("category",t)}}))),j("div",{className:"filterButtons"},j("div",{className:"filterAdvSearch",onClick:function(){e.setState({showFilters:!e.state.showFilters},(function(){e.props.showPopupFilt(e.state.showFilters)}
1))}},j("img",{src:"/assets/images/filters.svg",alt:"Filter Icon"}),j("p",null,"Advanced Search")),j("div",{className:"filterOptionAarangeBy"},j("p",{className:"filterAarangeByText"},"Sort By"),j("div",{className:"filterAarangeBySelect"},this.state.hasItinerary?j("select",{name:"arrangeBy",className:"formElements",value:n,onChange:function(t){return e.props.changeArrangeBy(t)}},j("option",{value:"0"},"Popular"),j("option",{value:"1"},"Price (low to high)"),j("option",{value:"2"},"Price (high to Low)"),j("option",{value:"3"},"Distance (nearby)"),j("option",{value:"4"},"Distance (further)")):j("select",{name:"arrangeBy",className:"formElements",value:n,onChange:function(t){return e.props.changeArrangeBy(t)}},j("option",{value:"0"},"Popular"),j("option",{value:"3"},"Distance (nearby)"),j("option",{value:"4"},"Distance (further)")))))),this.props.windowInnerWidth>1023?j(f.Fragment,null,j("div",{className:"filterTextLine"},j("div",{className:"filterTopLine"},j("button",{onClick:function(){return e.props.showPopupItin(!0)},style:{display:"flex",flexDirection:"row"}},this.state.hasItinerary?j("span",null,i.nearbyCount+i.nationCount," Vehicles match ",j("u",{className:"clearAllLink"},"Your Itinerary")):j("span",null,"Add ",j("u",{className:"clearAllLink"},"Your Itinerary")," to view rental estimates")),this.checkMissingPostcode()&&j("span",{style:{marginLeft:"7px",color:"#b33434"}},j("i",{className:"fa fa-exclamation-triangle"})," 1 or more locations provided are missing postcode, pricing may not be accurate")),j("span",{className:t>0?"filterActiveFilter":"filterInactiveFilter"},l,t>0&&j("a",{className:"clearAllLink",id:"",onClick:function(t){return e.clearFilter(t)}},"clear"))),this.props.seasonalDrop>1?j("div",{className:"filterVehicleDrops"},j("p",null,j("span",null,this.props.seasonalDrop)," vehicles are unavailable on your event date. Need help? ",j("a",{href:"tel:".concat(B.Zl.replace(/\s+/g,""))},"Call ",B.Zl))):this.props.seasonalDrop>0&&j("div",{className:"filterVehicleDrops"},j("p",null,j("span",null,this.props.seasonalDrop)," vehicle is unavailable on your event date. Need help? ",j("a",{href:"tel:".concat(B.Zl.replace(/\s+/g,""))},"Call ",B.Zl)))):j("div",{className:"filterTextLine"},j("div",{className:"filterTopLine"},j("button",{onClick:function(){return e.props.showPopupItin(!0)},style:{display:"flex",flexDirection:"row"}},this.state.hasItinerary?j("span",null,i.nearbyCount+i.nationCount," Vehicles match ",j("u",{className:"clearAllLink"},"Your Itinerary")):j("span",null,"Add ",j("u",{className:"clearAllLink"},"Your Itinerary")," to view rental estimates")),j("span",null,l,t>0&&j("a",{className:"clearAllLink",id:"",onClick:function(t){return e.clearFilter(t)}},"clear"))),this.props.seasonalDrop>1?j("div",{className:"filterVehicleDrops"},j("p",null,j("span",null,this.props.seasonalDrop)," vehicles are unavailable on your event date. Need help? ",j("a",{href:"tel:".concat(B.Zl.replace(/\s+/g,""))},"Call ",B.Zl))):this.props.seasonalDrop>0&&j("div",{className:"filterVehicleDrops"},j("p",null,j("span",null,this.props.seasonalDrop)," vehicle is unavailable on your event date. Need help? ",j("a",{href:"tel:".concat(B.Zl.replace(/\s+/g,""))},"Call ",B.Zl))),this.checkMissingPostcode()&&j("span",{className:"errorTextLine"},j("i",{className:"fa fa-exclamation-triangle"})," 1 or more locations provided are missing postcode, pricing may not be accurate"))),this.state.showFilters&&j("div",null,j(b,{windowInnerWidth:this.props.windowInnerWidth,filters:this.state.filters,filterValues:this.state.filtersApplied,onStateChange:this.onFiltersChange,clearFilter:function(t){return e.clearFilter(t)},close:function(){return e.setState({showFilters:!1},(function(){e.props.showPopupFilt(e.state.showFilters)}))},numFilters:t}))))):j("div",{className:"vehicleDetailItineryPanel"},j(d.m,{modalIsOpen:this.props.itinModalIsOpen,doClose:function(t){return e.props.doClose(t)},showPopup:function(t){return e.props.showPopupItin(t)},windowInnerWidth:this.props.windowInnerWidth},j(D.S,{filterValues:this.state.filtersApplied,onStateChange:this.onFiltersChange,updateItinerary:function(t){return e.updateItinerary(t)},mode:this.props.mode,filterUpdated:function(t){return e.props.filterUpdated(t)},windowInnerWidth:this.props.windowInnerWidth}))))}}]),r}(f.Component);(0,h.Z)(E,"displayName",E.name)},1187:function(e,t,r){"use strict";r.d(t,{o:function(){return h}});var l=r(4047),i=r(2700),n=r(8127),a=r(4102),s=r(775),o=r(6265),c=r(7294),u=c.createElement;function p(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,l=(0,s.Z)(e);if(t){var i=(0,s.Z)(this).constructor;r=Reflect.construct(l,arguments,i)}else r=l.apply(this,arguments);return(0,a.Z)(this,r)}}var h=function(e){(0,n.Z)(r,e);var t=p(r);function r(e){return(0,l.Z)(this,r),t.call(this,e)}return(0,i.Z)(r,[{key:"render",value:function(){var e=this.props.info;return u("div",{className:"infoIconBar"},e.vehiclePassengers&&e.vehiclePassengers>1?u("div",null,u("span",{className:"material-icons"},"person"),e.vehiclePassengers-1):u("div",null,u("span",{className:"material-icons"},"person")))}}]),r}(c.Component);(0,o.Z)(h,"displayName",h.name)}}]);
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.