1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[35],{1919:function(e,t,a){"use strict";var i=a(7294).createElement;t.Z=function(e){return i("div",{className:null!=e.className?"loader "+e.className:"loader"},i("div",{className:"lds-ring"},i("div",null),i("div",null),i("div",null),i("div",null)),i("span",{className:"loaderText"},e.msg?e.msg:"Loading..."))}},9035:function(e,t,a){"use strict";a.d(t,{Z:function(){return ne}});var i=a(809),s=a.n(i),n=a(2447),l=a(4047),r=a(2700),o=a(8127),u=a(4102),c=a(775),d=a(6265),p=a(7294),h=a(1163),m=a(5617),f=a(7872),g=p.createElement;function v(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var y=function(e){(0,o.Z)(a,e);var t=v(a);function a(e){var i;return(0,l.Z)(this,a),(i=t.call(this,e)).state={invalidPostCode:!1,invalidPEmail:!1,invalidSEmail:!1,invalidCEmail:!1,invalidMobile:!1,mobileMsg:null,invalidTel:!1,telMsg:null,curAddress:i.props.curAddress,addressUpdated:!1,subscribe:i.props.subscribe},i}return(0,r.Z)(a,[{key:"componentDidUpdate",value:function(e){}},{key:"checkEmail",value:function(e){var t=!0,a=!0,i=!0,s=e.split("@");if(2==s.length){var n=s[0].substring(0,1);if(/[aA-zZ0-9]/.test(n)){var l=s[0].split("."),r=/[aA-zZ0-9.!#$%&'*+/=?^_`{|}~-]+/;l.map((function(e){r.test(e)||(a=!1)}))}else a=!1;if(a){var o=s[1].split(".");if(2==o.length||3==o.length){var u=/[aA-zZ]/;/[aA-zZ0-9-]/.test(o[0])&&u.test(o[1])&&(3!=o.length||u.test(o[2]))||(i=!1)}else i=!1}}else a=!1,i=!1;return a&&i||(t=!1),t}},{key:"simpleCheckEmail",value:function(e){var t=!1,a=e.substring(0,1);/[aA-zZ0-9]/.test(a)&&(t=!0);var i=!1;e.includes("@")&&(i=!0);var s=!1,n=e.split("@");2==n.length&&n[1].includes(".")&&(s=!0);var l=!1,r=e.substring(e.length-1,1);/[aA-zZ]/.test(r)&&(l=!0);var o=!1;return t&&i&&s&&l&&(o=!0),o}},{key:"validEmail",value:function(e){var t=e.target.name,a=e.target.value;a.length>50&&(a=a.substring(0,50),e.target.value=a);var i=!1;"secondaryEmail"!=t||null!=a&&""!=a||(i=!0);this.simpleCheckEmail(a)||i?(this.props.onChange(e),"email"==t?(this.setState({mainEmail:a,invalidPEmail:!1}),this.confirmEmail(e,!0)):this.setState({invalidSEmail:!1})):"email"==t?(this.setState({invalidPEmail:!0}),this.confirmEmail(e,!0)):this.setState({invalidSEmail:!0})}},{key:"confirmEmail",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!0,i=e.target.value,s=this.props.defaultValues.email;t?(s=i,i=null!=this.props.defaultValues.confirmEmail?this.props.defaultValues.confirmEmail:""):(this.props.onChange(e),this.setState({confirmationEmail:i}));s==i&&(a=!1),this.state.invalidCEmail!=a&&this.setState({invalidCEmail:a})}},{key:"checkAddressChange",value:function(e,t){if("postCode"==e?this.checkPostCode(t):"country"==e?this.countryChange(t):this.props.onChange(t),null!=this.props.curAddress){var a="";"address"==t.target.name?a=a+t.target.value+", ":this.props.defaultValues.address&&(a=a+this.props.defaultValues.address+", "),"town"==t.target.name?a=a+t.target.value+", ":this.props.defaultValues.town&&(a=a+this.props.defaultValues.town+", "),"country"==t.target.name?a=a+t.target.value+", ":this.props.defaultValues.country&&(a=a+this.props.defaultValues.country+", "),"postCode"==t.target.name?a=a+t.target.value.toUpperCase()+", ":this.props.defaultValues.postCode&&(a=a+this.props.defaultValues.postCode.toUpperCase()+", ");var i=!1;a!=this.props.curAddress&&(i=!0),this.setState({addressUpdated:i})}}},{key:"checkPostCode",value:function(e){var t=e.target.value;t.length>8&&(t=t.substring(0,8)),e.target.value=t,this.props.onChange(e),new RegExp(f.m4).test(t)?t.length<5?this.setState({invalidPostCode:!0}):this.setState({invalidPostCode:!1}):this.setState({invalidPostCode:!0})}},{key:"checkMobile",value:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,""),this.props.onChange(e),this.validMobile(e.target.name,e.target.value,this.props.defaultValues.country)}},{key:"countryChange",value:function(e){this.props.onChange(e),this.props.defaultValues.mobile&&this.props.defaultValues.mobile.length>0&&this.validMobile("mobile",this.props.defaultValues.mobile,e.target.value),this.props.defaultValues.telephone&&""!=this.props.defaultValues.telephone&&this.validMobile("telep
1hone",this.props.defaultValues.telephone,e.target.value)}},{key:"validMobile",value:function(e,t,a){var i=!0,s="",n=t,l=44;if(""==a||null==a?l=0:"Republic of Ireland"==a&&(l=353),l>0){var r=n.slice(0,1),o=n.slice(0,2),u=n.slice(0,3);12==(n=0==r?l+t.substring(1):"Republic of Ireland"==a&&"353"==u||""!=a&&"Republic of Ireland"!=a&&"44"==o?t:l+t).length?i=!1:n.length<12?s="The number provided is too short":n.length>12&&(s="The number provided is too long")}else s="Please Select Country";var c=this.state,d=c.invalidMobile,p=c.mobileMsg,h=c.invalidTel,m=c.telMsg;"mobile"==e?(d=i,p=s,this.setState({invalidMobile:d,mobileMsg:p})):(0==n.length&&(i=!1,s=""),h=i,m=s,this.setState({invalidTel:h,telMsg:m}))}},{key:"onPasteMobile",value:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,""),this.props.onChange(e)}},{key:"checkForError",value:function(e){if("mobile"==e){if(this.state.invalidMobile&&this.props.defaultValues.mobile.length>0)return g("p",{className:"errorTextLine"},this.state.mobileMsg)}else if("telephone"==e&&this.state.telMsg)return g("p",{className:"errorTextLine"},this.state.telMsg)}},{key:"subscribe",value:function(e){this.props.onChange(e),this.setState((0,d.Z)({},e.target.name,e.target.checked))}},{key:"render",value:function(){var e=this;return g("div",{className:"cell large-6 medium-8 small-12",id:""},g("div",{style:{display:"inline",width:"100%"}},g("h2",{className:"decorated registration-form-control"},g("span",null,"ABOUT YOU"))),g("div",{className:""},g("div",{className:"formRow"},g("div",{style:{flexDirection:"column"}},g("p",{className:"elementHeading"},"Title*"),g("select",{name:"title",required:!0,className:"formElements",value:this.props.defaultValues.title,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},g("option",{value:""},"Please Select"),Object.keys(m.Dx).map((function(e){return g("option",{key:"t"+e,value:m.Dx[e]},m.Dx[e])}))))),g("div",{className:"formRow"},g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"elementHeading"},"First Name*"),g("input",{type:"text",maxLength:f.aB,required:!0,name:"forename",onChange:function(t){return e.props.onChange(t)},style:{width:"100%"},className:"formElements",onKeyPress:function(e){return(0,f.rV)(e)},defaultValue:this.props.defaultValues.forename})),g("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Surname*"),g("input",{type:"text",maxLength:f.aB,required:!0,name:"surname",onChange:function(t){return e.props.onChange(t)},style:{width:"100%"},className:"formElements",onKeyPress:function(e){return(0,f.rV)(e)},defaultValue:this.props.defaultValues.surname}))),g("p",{className:"elementHeading"},"Company Name (if applicable)"),g("input",{type:"text",maxLength:f.WN,name:"companyName",className:"formElements",onChange:function(t){return e.props.onChange(t)},defaultValue:this.props.defaultValues.companyName}),g("p",{className:"elementHeading"},"Address*"),g("input",{type:"text",maxLength:f.WN,required:!0,name:"address",className:"formElements",onChange:function(t){return e.checkAddressChange("address",t)},onKeyPress:function(e){return(0,f.sc)(e)},defaultValue:this.props.defaultValues.address}),1==this.state.addressUpdated&&g("p",{className:"errorTextLine"},g("b",null,"PLEASE NOTE:")," a change of address will temporarily make your listings unavailable"),g("div",{className:"formRow"},g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Town / City*"),g("input",{type:"text",maxLength:"75",required:!0,name:"town",className:"formElements",style:{width:"100%"},onChange:function(t){return e.checkAddressChange("town",t)},onKeyPress:function(e){return(0,f.rV)(e)},defaultValue:this.props.defaultValues.town})),g("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Postcode*"),g("input",{type:"text",minLength:"5",maxLength:"8",required:!0,name:"postCode",pattern:f.m4,className:"formElements uppercaseField",style:{width:"100%"},onChange:function(t){return e.checkAddressChange("postCode",t)},onKeyPress:function(e){return(0,f.Lv)(e)},defaultValue:this.props.defaultValues.postCode}))),g("div",{className:"formRow"},g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Country*"),g("select",{style:{marginBottom:"1rem"},name:"country",required:!0,className:"formElements",onChange:function(t){return e.checkAddressChange("country",t)},value:this.props.defaultValues.country},g("option",{value:""},"Please Select"),Object.keys(m.cH).map((function(e){return g("option",{key:"c"+e,value:e},e)}
1)))),this.state.invalidPostCode&&g("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},g("p",{className:"errorTextLine"},"The postcode provided is not valid"))),g("div",{className:"formRow"},g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Mobile* ",g("span",{className:"uploadBoxDescription",style:{marginBottom:"0px"}},"booking alerts will be texted to this number")),g("input",{type:"tel",required:!0,name:"mobile",pattern:f.$d,onKeyPress:function(e){return(0,f.qA)(e)},onPaste:function(t){return e.onPasteMobile(t)},onChange:function(t){return e.checkMobile(t)},style:{width:"100%"},className:"formElements",defaultValue:this.props.defaultValues.mobile}),this.checkForError("mobile")),g("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Landline"),g("input",{type:"tel",name:"telephone",pattern:f.$d,onKeyPress:function(e){return(0,f.qA)(e)},onPaste:function(t){return e.onPasteMobile(t)},onChange:function(t){return e.checkMobile(t)},style:{width:"100%"},className:"formElements",defaultValue:this.props.defaultValues.telephone}),this.checkForError("telephone"))),g("div",{className:"formRow"},g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Email* ",g("span",{className:"uploadBoxDescription",style:{marginBottom:"0px"}},"Changing your email address will change your login username")),g("input",{type:"email",autoComplete:"false",pattern:f.yH,maxLength:"50",required:!0,name:"email",className:"formElements",style:{width:"100%"},onChange:function(t){return e.validEmail(t)},defaultValue:this.props.defaultValues.email})),g("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Confirm Email*"),g("input",{type:"email",pattern:f.yH,maxLength:"50",required:!0,name:"confirmEmail",className:"formElements",style:{width:"100%"},onChange:function(t){return e.confirmEmail(t)},defaultValue:this.props.defaultValues.confirmEmail}))),(this.state.invalidPEmail||this.state.invalidCEmail)&&g("div",{className:"formRow"},1==this.state.invalidPEmail?g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"errorTextLine"},"The email address provided is in an invalid format")):g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}}),this.state.invalidCEmail&&g("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},g("p",{className:"errorTextLine"},"The confirmation email is not the same as 'Email'"),g("input",{type:"hidden",required:!0,name:"hiddenEmail",className:"formElements"}))),g("div",{className:"formRow"},g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Secondary Email"),g("input",{type:"email",pattern:f.yH,maxLength:"50",name:"secondaryEmail",className:"formElements",onChange:function(t){return e.validEmail(t)},defaultValue:this.props.defaultValues.secondaryEmail})),g("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}})),this.state.invalidSEmail&&g("div",{className:"formRow"},g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"errorTextLine"},"The email address provided is in an invalid format"))),g("div",{className:"formRow"},g("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},g("p",{className:"elementHeading"},"Subscribe to Receive News Letters?"),g("label",{style:{width:"100%"}},g("input",{checked:this.state.subscribe,type:"checkbox",name:"subscribe",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onClick:function(t){return e.subscribe(t)}}),g("div",{style:{marginLeft:"15px",height:"30px"}},"Yes")))),g("div",{className:"discountsContainer registration-form-control"},g("div",{className:"multiCarDiscountContainer"},g("p",{className:"multiCarOffer"},"Listing more than one vehicle? Offer multi-car discount."),g("p",null,"Many owners offer discounts to customers ",g("b",null,"hiring more than one vehicle for an event.")," You can opt into a multi-car discount by entering a % discount below"),g("div",{className:"multiCarDiscount_field"},g("input",{type:"number",min:f.ji,max:f.a6,pattern:f.cZ,name:"multiCarDiscount",className:"formElements",defaultValue:null!=this.props.defaultValues.multiCarDiscount?this.props.defaultValues.multiCarDiscount:10,onKeyPress:function(e){return(0,f.qA)(e)},onChange:function(t){return e.props.onChange(t)}
1}),g("b",{style:{fontSize:"20px"}},"%"))))))}}]),a}(p.Component);(0,d.Z)(y,"displayName",y.name);var b=p.createElement;function x(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var w=function(e){(0,o.Z)(a,e);var t=x(a);function a(e){var i;return(0,l.Z)(this,a),(i=t.call(this,e)).state={oneHrHire:null,halfDayHire:null,preData:!1,Price4hrSet:!1,Price24hrSet:!1},i}return(0,r.Z)(a,[{key:"componentDidMount",value:function(){!this.props.reRegisteringUser&&this.props.defaultValues.basePrice24hr&&this.setState({preData:!0})}},{key:"setValues",value:function(e,t){if(!this.state.preData){var a=(.7*t).toFixed(2),i=(.8*t).toFixed(2);this.setState({oneHrHire:a,halfDayHire:i}),0==this.state.Price4hrSet&&this.props.onChange({target:{value:a,name:"basePrice4hr"}}),0==this.state.Price24hrSet&&this.props.onChange({target:{value:i,name:"basePrice24hr"}}),this.state.Price4hrSet&&this.state.Price24hrSet&&this.setState({preData:!0})}}},{key:"roundUp",value:function(e){var t=e.target.value,a=0;t.toString().includes(".")&&(a=t.toString().split(".")[1].length),isNaN(+t)||a>2&&(e.target.value=parseFloat(t).toFixed(2)),("basePrice4hr"==e.target.name&&0==this.state.Price4hrSet||"basePrice24hr"==e.target.name&&0==this.state.Price24hrSet)&&this.setState({Price4hrSet:!0}),this.props.onChange(e)}},{key:"render",value:function(){var e=this,t=this.props.reRegisteringUser,a=this.props.windowInnerWidth>425;return b("div",null,b("div",{style:{display:"inline",width:"100%"}},b("h2",{className:"decorated registration-form-control"},b("span",null,"FEES"))),b("div",{className:"grid-x"},b("div",{className:"cell large-6 medium-12 small-12"},b("p",{className:"ratesTitle",id:"fees"},"Please adjust your hire rates below"),b("div",{className:"grid-x"},b("div",{className:"cell large-11 medium-11 small-12",id:"leftSideBlock"},b("div",{className:"feeContainer"},b("div",{style:{minWidth:"180px",width:"30%"}},b("p",{className:"leftTitle"},"Full day hire fee*"),!a&&t&&b("p",{className:"leftDescription",style:{margin:"0px auto",fontWeight:"bold"}},"Existing fee \xa3",this.props.originalPricing.basePriceFullDay)),b("div",{style:{display:"flex"}},b("div",{style:{minWidth:"90px",width:"20%",display:"flex",justifyContent:"space-around",alignItems:"center"}},b("p",{className:"leftTitle",style:{margin:"0px"}},"\xa3"),b("input",{type:"number",min:f.ji,max:f.X6,pattern:f.Le,step:".01",required:!0,className:"fullDayInput",name:"basePriceFullDay",defaultValue:!t&&this.props.defaultValues.basePriceFullDay,onKeyPress:function(e){return(0,f.FY)(e)},onChange:function(t){e.roundUp(t),e.setValues("fullDayHire",t.target.value)}})),b("div",{style:{marginLeft:"20px",alignSelf:"center"}},b("p",{className:"leftDescription",style:{margin:"0px",lineHeight:"unset"}},"Within 30 mins drive from vehicle base")))),a&&b("div",{className:"feeContainer"},b("div",{style:{minWidth:"30%"}}),b("div",{style:{display:"flex"}},b("div",{style:{minWidth:"90px",width:"20px",textAlign:"center"}},t&&b("p",{className:"leftDescription",style:{margin:"0px auto",fontWeight:"bold"}},"Existing fee \xa3",this.props.originalPricing.basePriceFullDay)),b("div",null)))),b("div",{className:"cell large-11 medium-11 small-12",id:"leftSideBlock"},b("div",{className:"feeContainer"},b("div",{style:{minWidth:"180px",width:"30%"}},b("p",{className:"leftTitle"},"Half day hire fee*"),!a&&t&&b("p",{className:"leftDescription",style:{margin:"0px auto",fontWeight:"bold"}},"Existing fee \xa3",this.props.originalPricing.basePrice24hr)),b("div",{style:{display:"flex"}},b("div",{style:{minWidth:"90px",width:"20%",display:"flex",justifyContent:"space-around",alignItems:"center"}},b("p",{className:"leftTitle",style:{margin:"0px"}},"\xa3"),b("input",{type:"number",min:f.ji,max:f.X6,pattern:f.Le,step:".01",required:!0,className:"fullDayInput",name:"basePrice24hr",defaultValue:this.state.halfDayHire?this.state.halfDayHire:t?"":this.props.defaultValues.basePrice24hr,onKeyPress:function(e){return(0,f.FY)(e)},onChange:function(t){e.roundUp(t)}})),b("div",{style:{marginLeft:"20px",alignSelf:"center"}},b("p",{className:"leftDescription",style:{margin:"0px",lineHeight:"unset"}},"We suggest reducing your full day rate by at least 20-25% to be competitive")))),a&&b("div",{className:"feeContainer"},b("div",{style:{minWidth:"30%"}}),b("div",{style:{display:"flex"}},b("div",{style:{minWidth:"90px",width:"20px",textAlign:"center"}},t&&b("p",{className:"leftDescription",style:{margin:"0px auto",fontWeight:"bold"}},"Existing fee \xa3",this.props.originalPricing.basePrice24hr)),b("div",null)))),b("div",{className:"cell large-11 medium-11 small-12",id:"leftSideBlock"},b("div",{className:"feeContainer"},b("div",{style:{minWidth:"180px",width:"30%"}},b("p",{className:"leftTitle"},"1 hour hire fee*"),!a&&t&&b("p",{className:"leftDescription",style:{margin:"0px auto",fontWeight:"bold"}},"Existing fee \xa3",this.props.originalPricing.basePrice4hr)),b("div",{style:{display:"flex"}},b("div",{style:{minWidth:"90px",width:"20%",display:"flex",justifyContent:"space-around",alignItems:"center"}},b("p",{className:"leftTitle",style:{margin:"0px"}},"\xa3"),b("input",{type:"number",min:f.ji,max:f.X6,pattern:f.Le,step:".01",required:!0,className:"fullDayInput",name:"basePrice4hr",defaultValue:this.state.oneHrHire?this.state.oneHrHire:t?"":this.props.defaultValues.basePrice4hr,onKeyPress:function(e){return(0,f.FY)(e)},onChange:function(t){return e.roundUp(t)}})),b("div",{style:{marginLeft:"20px",alignSelf:"center"}},b("p",{className:"leftDescription",style:{margin:"0px",lineHeight:"unset"}},"This is the price we will quote for jobs up to 1 hour")))),a&&b("div",{className:"feeContainer"},b("div",{style:{minWidth:"30%"}}),b("div",{style:{display:"flex"}},b("div",{style:{minWidth:"90px",width:"20px",textAlign:"center"}},t&&b("p",{className:"leftDescription",style:{margin:"0px auto",fontWeight:"bold"}},"Existing fee \xa3",this.props.originalPricing.basePrice4hr)),b("div",null)))))),b("div",{className:"cell large-6 medium-12 small-12"},b("p",null,"Examples from across the site..."),b("div",{className:"grid-x"},b("div",{className:"cell large-4 medium-4 small-5"},b("div",{className:"grid-x"},b("img",{className:"cell large-6 medium-12 small-12 register-image-control",src:"/assets/images/price_250.jpg",alt:"Example of Budget Rough & Ready Vehicle",style:{height:"120px",width:"180px"}}),b("p",{className:"cell large-12 medium-12 small-12 fullDayP"},"From \xa3250 per day"))),b("div",{className:"cell large-4 medium-4 small-5 small-offset-1 medium-offset-0"},b("div",{className:"grid-x"},b("img",{className:"cell large-12 medium-12 small-12 register-image-control",src:"/assets/images/price_300.jpg",alt:"Example of Budget Standard Vehicle",style:{height:"120px",width:"180px"}}),b("p",{className:"cell large-12 medium-12 small-12 fullDayP"},"From \xa3300 per day"))),b("div",{className:"cell large-4 medium-4 small-5"},b("div",{className:"grid-x"},b("img",{className:"cell large-12 medium-12 small-12 register-image-control",src:"/assets/images/price_400.jpg",alt:"Example of Standard Vehicle",style:{height:"120px",width:"180px"}}),b("p",{className:"cell large-12 medium-12 small-12 fullDayP"},"From \xa3400 per day"))),b("div",{className:"cell large-4 medium-4 small-5 small-offset-1 medium-offset-0"},b("div",{className:"grid-x"},b("img",{className:"cell large-12 medium-12 small-12 register-image-control",src:"/assets/images/price_500.jpg",alt:"Example of High-end Sports Vehicle",style:{height:"120px",width:"180px"}}),b("p",{className:"cell large-12 medium-12 small-12 fullDayP"},"From \xa3500 per day"))),b("div",{className:"cell large-4 medium-4 small-5"},b("div",{className:"grid-x"},b("img",{className:"cell large-12 medium-12 small-12 register-image-control",src:"/assets/images/price_750.jpg",alt:"Example of High-end Luxury Vehicle",style:{height:"120px",width:"180px"}}),b("p",{className:"cell large-12 medium-12 small-12 fullDayP"}
1,"From \xa3750 per day"))),b("div",{className:"cell large-4 medium-4 small-5 small-offset-1 medium-offset-0"},b("div",{className:"grid-x"},b("img",{className:"cell large-12 medium-12 small-12 register-image-control",src:"/assets/images/price_1000.jpg",alt:"Example of Exclusive Luxury Vehicle",style:{height:"120px",width:"180px"}}),b("p",{className:"cell large-12 medium-12 small-12 fullDayP"},"From \xa31000 per day")))))))}}]),a}(p.Component);(0,d.Z)(w,"displayName",w.name);var C=p.createElement;function N(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var D=function(e){(0,o.Z)(a,e);var t=N(a);function a(e){var i;return(0,l.Z)(this,a),(i=t.call(this,e)).state={chauffeur:!1,productionsDriven:!1,selfDriven:!1},i.Months=["Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec"],i}return(0,r.Z)(a,[{key:"componentDidMount",value:function(){if(null!=this.props.defaultValues.canDrive){var e=!1;this.props.defaultValues.canDrive.includes("chauffeur driven")&&(e=!0);var t=!1;this.props.defaultValues.canDrive.includes("productions only")&&(t=!0);var a=!1;
1this.props.defaultValues.canDrive.includes("full self-drive")&&(a=!0),this.setState({chauffeur:e,productionsDriven:t,selfDriven:a})}}},{key:"canDrive",value:function(e){var t=this;this.setState((0,d.Z)({},e.target.name,e.target.checked),(function(){var e=t.state,a="";e.chauffeur&&(a+="chauffeur driven, "),e.productionsDriven&&(a+="productions only, "),e.selfDriven&&(a+="full self-drive, "),a.length>0&&(a=a.slice(0,-2)),t.props.onChange({target:{value:a,name:"canDrive"}})}))}},{key:"render",value:function(){var e=this;return C("div",{className:"grid-x"},C("div",{className:"grid-container",id:"mileageContainer"},C("div",{className:"cell large-12 medium-12 small-12"},C("h2",{className:"decorated registration-form-control"},C("span",null,"MILEAGE & AVAILABILITY")),C("p",{className:"mileageQuantityQ"},"How many miles will you travel for a typical hire?"),C("p",{className:"mileageDescription"},"(Include mileage to, from and during the hire.)"),C("div",{className:"grid-x"},C("div",{className:"cell large-12 medium-12 small-12"},C("p",{className:"elementHeading",style:{margin:"0px"}},C("a",{href:this.props.router.pathname+"#canDrive",id:"canDrive",style:{color:"inherit",textDecoration:"none"}},"Who can drive your car?*:")),C("div",{className:"grid-x"},C("div",{className:"cell large-4 medium-6 small-12"},C("label",{style:{width:"100%"}},C("input",{checked:this.state.chauffeur,type:"checkbox",name:"chauffeur",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.canDrive(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Myself / My drivers"))),C("div",{className:"cell large-4 medium-6 small-12"},C("label",{style:{width:"100%"}},C("input",{checked:this.state.productionsDriven,type:"checkbox",name:"productionsDriven",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.canDrive(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Actors / Film Crews (if insured)"))),C("div",{className:"cell large-4 medium-6 small-12"},C("label",{style:{width:"100%"}},C("input",{checked:this.state.selfDriven,type:"checkbox",name:"selfDriven",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.canDrive(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Anyone (full self-drive)")))),C("p",{className:"suggestedText"},"*Please note - your vehicle will only be suggested for jobs within the range selected below."),C("div",{className:"availabilityMileage"},C("p",null,"I'm willing to travel"),C("select",{name:"canTravel",required:!0,className:"formElements canTravel",value:this.props.defaultValues.canTravel,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},C("option",{value:""},"Please Select"),Object.keys(m.mq).map((function(e){return C("option",{key:"ct"+e,value:e},m.mq[e])}))),C("p",null,"miles (roundtrip) for weddings")),C("div",{className:"availabilityMileage"},C("p",null,"I'm willing to travel"),C("select",{name:"canTravelEvents",required:!0,className:"formElements canTravel",value:this.props.defaultValues.canTravelEvents,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},C("option",{value:""},"Please Select"),Object.keys(m.mq).map((function(e){return C("option",{key:"cte"+e,value:e},m.mq[e])}))),C("p",null,"miles (roundtrip) for filming/events"))))),C("div",{className:"cell large-12 medium-12 small-12"},C("p",{style:{marginTop:"10px",marginBottom:"0px"}},C("a",{href:this.props.router.pathname+"#yearlyAvailability",id:"yearlyAvailability",style:{color:"#444",textDecoration:"none"}},"Please ",C("b",null,"untick")," any months of the year in which your vehicle will not be available e.g. winter months.")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityJan||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"jan",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Jan")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityFeb||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"feb",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}
1}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Feb")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityMar||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"mar",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Mar")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityApr||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"apr",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Apr")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityMay||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"may",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"May")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityJune||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"june",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Jun")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityJuly||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"july",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Jul")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityAug||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"aug",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Aug")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilitySep||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"sep",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Sep")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityOct||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"oct",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Oct")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityNov||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"nov",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Nov")),C("label",{style:{width:"60px",marginRight:"10px"}},C("input",{defaultChecked:this.props.defaultValues.availabilityDec||null==this.props.ut||3===this.props.ut?"Checked":"",type:"checkbox",name:"monthUnavailable",value:"dec",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.props.onChange(t)}}),C("div",{style:{marginLeft:"15px",height:"30px"}},"Dec")))))}}]),a}(p.Component);(0,d.Z)(D,"displayName",D.name);var k=(0,h.withRouter)(D),S=a(9999),V=a(6869),P=a(2854),T=a(1919),E=p.createElement;function R(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var I=function(e){(0,o.Z)(a,e);var t=R(a);function a(e){var i;
1return(0,l.Z)(this,a),(i=t.call(this,e)).state={invalidYear:!1,make:!1,makeList:null,modelList:null,seatingList:[],aiGenDescLoading:!1,aiGenDescError:"",aiGenDescUnavailable:!1,aiGenDescCalls:0,aiGenKeywordLoading:!1,aiGenKeywordError:"",aiGenKeywordUnavailable:!1,aiGenKeywordCalls:0},i.standardSeating=[{id:"1",name:"1"},{id:"2",name:"2"},{id:"3",name:"3"},{id:"4",name:"4"},{id:"5",name:"5"},{id:"6",name:"6"},{id:"7",name:"7"},{id:"8",name:"8"}],i.miniBusSeating=[{id:"8",name:"8"},{id:"10",name:"10"},{id:"12",name:"12"},{id:"14",name:"14"},{id:"16",name:"16"},{id:"18",name:"18"},{id:"20",name:"20"},{id:"25",name:"25"},{id:"30",name:"30"},{id:"36",name:"36"}],i.busSeating=[{id:"10",name:"10"},{id:"12",name:"12"},{id:"14",name:"14"},{id:"16",name:"16"},{id:"18",name:"18"},{id:"20",name:"20"},{id:"25",name:"25"},{id:"30",name:"30"},{id:"36",name:"36"},{id:"47",name:"47"},{id:"55",name:"55"},{id:"56",name:"56"}],i}return(0,r.Z)(a,[{key:"componentDidMount",value:function(){this.getMake(),this.setState({seatingList:this.standardSeating}),null!=this.props.defaultValues.vehicleMake&&this.getModelList(this.props.defaultValues.vehicleMake)}},{key:"categoryChange",value:function(e){this.props.onChange(e);e.target.value;var t=[];t=this.props.defaultValues.selectedCategories.includes(17)?[].concat((0,S.Z)(t),(0,S.Z)(this.standardSeating),(0,S.Z)(this.busSeating)):[].concat((0,S.Z)(t),(0,S.Z)(this.standardSeating)),this.setState({seatingList:t})}},{key:"getModelList",value:function(e){var t=this;(0,V.mJ)("SearchFilters","GetRegistrationModelList",{make:e}).then((function(e){t.setState({modelList:e})}))}},{key:"makeChange",value:function(e){this.props.onChange(e);var t=e.target.value;""!=t?this.getModelList(t):this.setState({modelList:null})}},{key:"getMake",value:function(){var e=this;(0,V.mJ)("SearchFilters","GetRegistrationMakeList").then((function(t){e.setState({makeList:t})}))}},{key:"checkYear",value:function(e){var t=e.target.value.replace(/[^0-9]/g,"");t.length>4&&(t=t.substring(0,4)),e.target.value=t,this.props.onChange(e),4!=t.length||t<1886||t>(new Date).getFullYear()?this.setState({invalidYear:!0}):this.setState({invalidYear:!1})}},{key:"maxSeatSize",value:function(e){e.target.value>100&&(e.target.value=100),this.props.onChange(e)}},{key:"maxEngineSize",value:function(e){e.target.value>2e4&&(e.target.value=2e4),this.props.onChange(e)}},{key:"roundUp",value:function(e){var t=e.target.value,a=0;t.toString().includes(".")&&(a=t.toString().split(".")[1].length),isNaN(+t)||a>2&&(e.target.value=parseFloat(t).toFixed(2)),this.props.onChange(e)}},{key:"canGenerateDescKeyword",value:function(e){var t=!0,a=e?"Missing the following vehicle details in order to us the 'AI Generated Keywords':":"Missing the following vehicle details in order to us the 'AI Generated Description':";if(e&&this.state.aiGenKeywordCalls>=5||!e&&this.state.aiGenDescCalls>=5)a="Max AI calls made",t=!1;else{if(null!=this.props.defaultValues.canTravel&&""!=this.props.defaultValues.canTravel||(a+=" If available for weddings,",t=!1),null!=this.props.defaultValues.canTravelEvents&&""!=this.props.defaultValues.canTravelEvents||(a+=" If available for events,",t=!1),null!=this.props.defaultValues.vehicleMake&&""!=this.props.defaultValues.vehicleMake||(a+=" Make,",t=!1),null!=this.props.defaultValues.vehicleModel&&""!=this.props.defaultValues.vehicleModel||(a+=" Model,",t=!1),0==this.props.defaultValues.selectedCategories.length)a+=" Category,",t=!1;else{var i=!1;this.props.defaultValues.selectedCategories.map((function(e){null!=e&&""!=e&&e>0&&(i=!0)})),i||(a+=" Category,",t=!1)}null!=this.props.defaultValues.vehicleYear&&""!=this.props.defaultValues.vehicleYear||(a+=" Year,",t=!1),null!=this.props.defaultValues.vehicleOrigin&&""!=this.props.defaultValues.vehicleOrigin||(a+=" Country of Origin,",t=!1),null!=this.props.defaultValues.vehicleCondition&&""!=this.props.defaultValues.vehicleCondition||(a+=" Condition,",t=!1),null!=this.props.defaultValues.vehicleExtColour1&&""!=this.props.defaultValues.vehicleExtColour1||(a+=" Exterior Colour,",t=!1),null!=this.props.defaultValues.vehicleIntColour1&&""!=this.props.defaultValues.vehicleIntColour1||(a+=" Interior Colour,",t=!1),a=t?"":a.substring(0,a.length-1)}return e?this.setState({aiGenKeywordError:a}):this.setState({aiGenDescError:a}),t}},{key:"generateDesc",value:function(){var e=this,t=this.state.aiGenDescCalls;!this.state.aiGenDescLoading&&this.canGenerateDescKeyword(!1)&&this.setState({aiGenDescLoading:!0},(function(){var a=parseInt(e.props.defaultValues.canTravel),i=parseInt(e.props.defaultValues.canTravelEvents),s=JSON.stringify({make:e.props.defaultValues.vehicleMake,model:e.props.defaultValues.vehicleModel,year:e.props.defaultValues.vehicleYear,origin:e.props.defaultValues.vehicleOrigin,condition:e.props.defaultValues.vehicleCondition,convertible:(0,P.bZ)(e.props.defaultValues.vehicleConvertible)?e.props.defaultValues.vehicleConvertible:"false",exterior
1Colour_main:e.props.defaultValues.vehicleExtColour1,exteriorColour_secndary:(0,P.bZ)(e.props.defaultValues.vehicleExtColour2)?e.props.defaultValues.vehicleExtColour2:"",interiorColour_main:e.props.defaultValues.vehicleIntColour1,interiorColour_secndary:(0,P.bZ)(e.props.defaultValues.vehicleIntColour2)?e.props.defaultValues.vehicleIntColour2:"",isAvaialveForWeddings:a>0,isAvaialveForEvents:i>0,selectedCategories:e.props.defaultValues.selectedCategories,ownerTown:null!=e.props.defaultValues.town?e.props.defaultValues.town:"",ownerCountry:null!=e.props.defaultValues.country?e.props.defaultValues.country:""}),n=e.props.defaultValues.updateId?e.props.defaultValues.updateId.toString():"0",l=null!=e.props.jwtToken?e.props.jwtToken:localStorage.getItem("jwtToken");(0,V.mJ)("VehicleRegistration","GenerateVehicleDesc",{vehicleDetails:s,id:n},l).then((function(a){if(t+=1,null!=a){var i=a.genText,s=""!=a.errorMsg,n=""==a.genText?"AI failed to generate text, please try again":"";s&&(n="AI currently unavaialbe, please try again at a later time")}e.setState({aiGenDescLoading:!1,aiGenDescError:n,aiGenDescUnavailable:s,aiGenDescCalls:t},(function(){e.props.onChange({target:{name:"vehicleAdditionalInfo",value:i}})}))}))}))}},{key:"generateKeywords",value:function(){var e=this,t=this.state.aiGenKeywordCalls;!this.state.aiGenKeywordLoading&&this.canGenerateDescKeyword(!0)&&this.setState({aiGenKeywordLoading:!0},(function(){var a=parseInt(e.props.defaultValues.canTravel),i=parseInt(e.props.defaultValues.canTravelEvents),s=JSON.stringify({make:e.props.defaultValues.vehicleMake,model:e.props.defaultValues.vehicleModel,year:e.props.defaultValues.vehicleYear,origin:e.props.defaultValues.vehicleOrigin,condition:e.props.defaultValues.vehicleCondition,convertible:(0,P.bZ)(e.props.defaultValues.vehicleConvertible)?e.props.defaultValues.vehicleConvertible:"false",exteriorColour_main:e.props.defaultValues.vehicleExtColour1,exteriorColour_secndary:(0,P.bZ)(e.props.defaultValues.vehicleExtColour2)?e.props.defaultValues.vehicleExtColour2:"",interiorColour_main:e.props.defaultValues.vehicleIntColour1,interiorColour_secndary:(0,P.bZ)(e.props.defaultValues.vehicleIntColour2)?e.props.defaultValues.vehicleIntColour2:"",isAvaialveForWeddings:a>0,isAvaialveForEvents:i>0,selectedCategories:e.props.defaultValues.selectedCategories,vehicleDescription:(0,P.bZ)(e.props.defaultValues.vehicleAdditionalInfo)?e.props.defaultValues.vehicleAdditionalInfo:"",ownerTown:null!=e.props.defaultValues.town?e.props.defaultValues.town:"",ownerCountry:null!=e.props.defaultValues.country?e.props.defaultValues.country:""}),n=e.props.defaultValues.updateId?e.props.defaultValues.updateId.toString():"0",l=null!=e.props.jwtToken?e.props.jwtToken:localStorage.getItem("jwtToken");(0,V.mJ)("VehicleRegistration","GenerateVehicleKeywords",{vehicleDetails:s,id:n},l).then((function(a){t+=1;var i=a.genText.replace(),s=""!=a.errorMsg,n=""==a.genText?"AI failed to generate keywprds, please try again":"";s&&(n="AI currently unavaialbe, please try again at a later time"),e.setState({aiGenKeywordLoading:!1,aiGenKeywordError:n,aiGenKeywordUnavailable:s,aiGenKeywordCalls:t},(function(){e.props.onChange({target:{name:"keywords",value:i}})}))}))}))}},{key:"render",value:function(){var e=this,t=this.props.defaultValues.vehicleId,a=this.props.defaultValues.vehicleYear+" "+this.props.defaultValues.vehicleMake+" "+this.props.defaultValues.vehicleModel;return E("div",{className:"grid-x"},E("div",{className:"grid-container",id:"mileageContainer"},E("div",{className:"cell large-12 medium-8 small-12"},E("div",{className:"cell large-12 medium-8 small-12",id:""},E("div",{style:{display:"inline",width:"100%"}},E("h2",{className:"decorated registration-form-control"},E("span",null,"ABOUT THE VEHICLE"))),E("div",{className:""},t>0&&E("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"}},E("label",{style:{fontSize:"16px"}},"If you no longer own / want to remove this vehicle please click 'Remove'"),E("button",{type:"button",className:"registerVehicleBtn",style:{marginLeft:"10px",backgroundColor:"#FFE5E5",color:"#FE0606"},onClick:function(){return e.props.removeVehicle(t,a)}},"Remove")),E("div",{className:"formRow",style:{padding:"10px 0px"}},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("p",{className:"elementHeading"},E("a",{href:this.props.router.pathname+"#vehicleMakeModel",id:"vehicleMakeModel",style:{color:"#444",textDecoration:"none"}},"Make*")),E("select",{name:"vehicleMake",required:!0,className:"formElements",value:this.props.defaultValues.vehicleMake,"aria-placeholder":"Please Select",onChange:function(t){return e.makeChange(t)}
1},E("option",{value:""},"Please Select"),this.state.makeList&&this.state.makeList.map((function(e){return E("option",{key:"make"+e,value:e},e)})))),this.state.modelList&&E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("p",{className:"elementHeading"},"Model*"),E("select",{name:"vehicleModel",required:!0,className:"formElements",value:this.props.defaultValues.vehicleModel,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),this.state.modelList.map((function(e){return E("option",{key:"model"+e,value:e},e)}))))),E("div",{className:"formRow"},E("div",{style:{display:"flex",width:"100%",flexDirection:"column"}},E("p",{className:"elementHeading"},"Model Derivative (Max 65 Chars)"),E("input",{type:"text",maxLength:f.Jx,name:"vehicleModelVar",style:{width:"100%"},className:"formElements",defaultValue:this.props.defaultValues.vehicleModelVar,placeholder:"E.g. GTi, fastback",onChange:function(t){return e.props.onChange(t)}}))),E("div",{className:"formRow"},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("p",{className:"elementHeading"},"Year*"),E("input",{type:"number",min:f.PP,max:f.ip,pattern:f.B7,required:!0,name:"vehicleYear",style:{width:"100%"},defaultValue:this.props.defaultValues.vehicleYear,className:"formElements",onKeyPress:function(e){return(0,f.qA)(e)},onChange:function(t){return e.checkYear(t)}})),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Country of Origin*"),E("select",{name:"vehicleOrigin",required:!0,className:"formElements",value:this.props.defaultValues.vehicleOrigin,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),Object.keys(m.BH).map((function(e){return E("option",{key:"vo"+e,value:m.BH[e]},m.BH[e])}))))),this.state.invalidYear&&E("div",{className:"formRow"},this.state.invalidYear?E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("p",{className:"errorTextLine"},"The year provided is not a valid year")):E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}}),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}})),E("div",{className:"formRow"},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("p",{className:"elementHeading"},"Registration*"),E("input",{type:"text",max:f.J1,pattern:f.Rh,required:!0,name:"vehicleRegistration",style:{width:"100%"},className:"formElements uppercaseField",defaultValue:this.props.defaultValues.vehicleRegistration,onKeyPress:function(e){return(0,f.dn)(e)},onChange:function(t){return e.props.onChange(t)}})),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Vehicle Condition*"),E("select",{name:"vehicleCondition",required:!0,id:"vehicleCondition",className:"formElements",value:this.props.defaultValues.vehicleCondition,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),Object.keys(m.G3).map((function(e){return E("option",{key:"cc"+e,value:m.G3[e]},m.G3[e])}))))),E("div",{className:"formRow",style:{backgroundColor:"#f5f5f5",borderRadius:"5px",padding:"10px"}},E("div",{style:{display:"flex",width:"100%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Vehicle Category*"),E("div",{className:"registrationCategories"},Object.keys(m.Rj).map((function(t,a){return a++,E("div",{key:"cat_"+a,className:"registrationCategoriesCheckbox"},E("input",{type:"checkbox",defaultChecked:e.props.defaultValues.selectedCategories.includes(parseInt(m.Rj[t]))&&"Checked",name:"categories",value:m.Rj[t],onChange:function(t){return e.categoryChange(t)}}),E("div",null,t))}))))),E("div",{className:"formRow",style:{backgroundColor:"#f5f5f5",borderRadius:"5px",padding:"10px"}},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Exterior Colour*"),E("select",{name:"vehicleExtColour1",required:!0,className:"formElements",value:this.props.defaultValues.vehicleExtColour1,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}
1},E("option",{value:""},"Please Select"),Object.keys(m.gG).map((function(e){return E("option",{key:"ve1"+e,value:m.gG[e]},m.gG[e])})))),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Exterior Colour 2"),E("select",{name:"vehicleExtColour2",className:"formElements",value:this.props.defaultValues.vehicleExtColour2,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),Object.keys(m.gG).map((function(e){return E("option",{key:"ve2"+e,value:m.gG[e]},m.gG[e])}))))),E("div",{className:"formRow",style:{backgroundColor:"#f5f5f5",borderRadius:"5px",padding:"10px",paddingBottom:"15px"}},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Interior Colour*"),E("select",{name:"vehicleIntColour1",required:!0,className:"formElements",value:this.props.defaultValues.vehicleIntColour1,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),Object.keys(m.gG).map((function(e){return E("option",{key:"vi1"+e,value:m.gG[e]},m.gG[e])})))),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Interior Colour 2"),E("select",{name:"vehicleIntColour2",className:"formElements",value:this.props.defaultValues.vehicleIntColour2,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),Object.keys(m.gG).map((function(e){return E("option",{key:"vi2"+e,value:m.gG[e]},m.gG[e])}))))),this.props.defaultValues.selectedCategories.includes(12)?E("div",{className:"formRow",style:{padding:"10px 0px"}},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Drive Side*"),E("select",{disabled:!0,required:!0,name:"vehicleRightHandDrive",className:"formElements",value:this.props.defaultValues.vehicleRightHandDrive,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{selected:"selected",value:"N\\A"},"N\\A"))),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("p",{className:"elementHeading"},"Convertible*"),E("select",{disabled:!0,name:"vehicleConvertible",required:!0,className:"formElements",value:this.props.defaultValues.vehicleConvertible,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{selected:"selected",value:"false"},"No")))):E("div",{className:"formRow",style:{padding:"10px 0px"}},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("label",{className:"elementHeading"},"Drive Side*"),E("select",{required:!0,name:"vehicleRightHandDrive",className:"formElements",value:this.props.defaultValues.vehicleRightHandDrive,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),E("option",{value:"LHD"},"LHD"),E("option",{value:"RHD"},"RHD"),E("option",{value:"N/A"},"N/A"))),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("p",{className:"elementHeading"},"Convertible*"),E("select",{name:"vehicleConvertible",required:!0,className:"formElements",value:this.props.defaultValues.vehicleConvertible,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),E("option",{value:"true"},"Yes"),E("option",{value:"false"},"No")))),E("div",{className:"formRow",style:{padding:"10px 0px"}},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("label",{className:"elementHeading"},"No. Seats (inc. driver)*"),E("input",{type:"number",min:f.cL,max:f.lV,pattern:f.cZ,name:"vehiclePassengers",required:!0,style:{width:"100%",marginBottom:"0px"},className:"formElements",defaultValue:this.props.defaultValues.vehiclePassengers,onKeyPress:function(e){return(0,f.qA)(e)},onChange:function(t){return e.maxSeatSize(t)}})),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("label",{className:"elementHeading"},"No. Doors*"),this.props.defaultValues.selectedCategories.includes(12)?E("select",{disabled:!0,name:"vehicleDoors",required:!0,value:this.props.defaultValues.vehicleDoors,className:"formElements","aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}
1},E("option",{selected:"selected",value:"0"},"N/A")):E("select",{name:"vehicleDoors",required:!0,value:this.props.defaultValues.vehicleDoors,className:"formElements","aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),E("option",{value:"2"},"2"),E("option",{value:"3"},"3"),E("option",{value:"4"},"4")))),E("div",{className:"formRow",style:{padding:"10px 0px"}},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("label",{className:"elementHeading"},E("a",{href:this.props.router.pathname+"#vehicleGearing",id:"vehicleGearing",style:{color:"#444",textDecoration:"none"}},"Gearing*")),E("select",{name:"vehicleGearing",required:!0,value:this.props.defaultValues.vehicleGearing,className:"formElements","aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},E("option",{value:""},"Please Select"),E("option",{value:"Automatic"},"Automatic"),E("option",{value:"Manual"},"Manual"))),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},E("p",{className:"elementHeading"},E("a",{href:this.props.router.pathname+"#vehicleEngineSize",id:"vehicleEngineSize",style:{color:"#444",textDecoration:"none"}},"Engine Size (cc)*")),E("input",{type:"number",min:f.ji,max:"20000",pattern:f.cZ,name:"vehicleEngineSize",required:!0,style:{width:"100%",marginBottom:"0px"},className:"formElements",defaultValue:this.props.defaultValues.vehicleEngineSize,onKeyPress:function(e){return(0,f.qA)(e)},onChange:function(t){return e.maxEngineSize(t)}}))),E("div",{className:"formRow"},E("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},E("p",{className:"elementHeading"},E("a",{href:this.props.router.pathname+"#vehicleValue",id:"vehicleValue",style:{color:"#444",textDecoration:"none"}},"Approx. Value (\xa3)*")),E("input",{type:"number",min:f.ji,max:f.iT,pattern:f.Le,step:".01",name:"vehicleValue",required:!0,style:{width:"100%"},className:"formElements",defaultValue:this.props.defaultValues.vehicleValue,onKeyPress:function(e){return(0,f.FY)(e)},onChange:function(t){return e.roundUp(t)}})),E("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}})),E("label",{className:"elementHeading aiControls"},"Additional Information",E("button",{type:"button",className:"registerVehicleBtn aiBtn",disabled:this.state.aiGenDescLoading||this.state.aiGenDescUnavailable?"disabled":"",onClick:function(){e.generateDesc()}},"AI Generate Description"),this.state.aiGenDescLoading&&E(T.Z,{msg:"Generating Vehicle Description...",className:"aiLoader"})),E("textarea",{maxLength:f.xM,name:"vehicleAdditionalInfo",style:{marginBottom:"10px"},onChange:function(t){return e.props.onChange(t)},value:this.props.defaultValues.vehicleAdditionalInfo,className:"formElements",rows:"4",cols:"40",placeholder:"Write a paragraph to describe your vehicle. (emails, phone numbers, and links to web pages are not permitted will be blanked out)"}),""!=this.state.aiGenDescError&&E("p",{className:"registrationDescription",style:{marginTop:"-12px"}},this.state.aiGenDescError),E("label",{className:"elementHeading aiControls"},"Add Keywords to help people find your vehicle",E("button",{type:"button",className:"registerVehicleBtn aiBtn",disabled:this.state.aiGenKeywordLoading||this.state.aiGenKeywordUnavailable?"disabled":"",onClick:function(){e.generateKeywords()}},"AI Generate Keyword"),this.state.aiGenKeywordLoading&&E(T.Z,{msg:"Generating Vehicle Description...",className:"aiLoader"})),E("textarea",{maxLength:f.Y7,className:"formElements",style:{marginBottom:"10px"},name:"keywords",rows:"2",cols:"40",placeholder:"Enter keyword(s) separated by commas. E.g. dukes, hazard, dodge, charger, general lee, orange",value:this.props.defaultValues.keywords,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}}),""!=this.state.aiGenKeywordError&&E("p",{className:"registrationDescription",style:{marginTop:"-12px"}},this.state.aiGenKeywordError),t>0&&E("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"}},E("label",{style:{fontSize:"16px"}},"If you no longer own / want to remove this vehicle please click 'Remove'"),E("button",{type:"button",className:"registerVehicleBtn",style:{marginLeft:"10px",backgroundColor:"#FFE5E5",color:"#FE0606"},onClick:function(){return e.props.removeVehicle(t,a)}},"Remove")))))))}}]),a}(p.Component);(0,d.Z)(I,"displayName",I.name);var L=(0,h.withRouter)(I),A=a(4056),M=p.createElement;function H(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var Z=function(e){(0,o.Z)(a,e);var t=H(a);function a(e){var i;return(0,l.Z)(this,a),(i=t.call(this,e)).state={images:null!=i.props.images?i.props.images:[],initialImages:[],dataLoaded:null},i}return(0,r.Z)(a,[{key:"getImageIndex",value:function(e){return this.state.images.findIndex((function(t){return t.uid==e.uid}))}},{key:"componentDidMount",value:function(){this.loadExistingImages(this.props.defaultValues)}},{key:"loadExistingImages",value:function(e){if(e.images){var t=[];e.images.map((function(e){t.push({name:"img_"+e.id,source:e.src,id:e.id})})),this.setState({initialImages:t,dataLoaded:!0})}else this.setState({dataLoaded:!0})}},{key:"render",value:function(){var e=this,t=null!=this.props.defaultValues.youTubeGUID&&""!=this.props.defaultValues.youTubeGUID?"youtube.com/watch?v="+this.props.defaultValues.youTubeGUID:"";return M("div",null,M("div",null,M("h2",{className:"decorated"},M("span",null,"ADD MEDIA")),M("div",{className:"formRow",style:{padding:"10px 0px"}},M("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},M("p",{className:"elementHeading"},"YouTube Link"),M("input",{type:"text",name:"youTubeGUID",style:{width:"100%"},defaultValue:t,className:"formElements",onChange:function(t){return e.props.onChange(t)}
1,placeholder:"E.g. youtube.com/watch?v=5aFIRIZYBvw"}))),M("div",{className:"formRow"},M("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},M("span",{className:"uploadBoxHeading"},"Drag your best images below"),M("p",{className:"uploadBoxDescription",style:{marginBottom:"0px"}},"Click and hold, drag and drop to reorder your images"),M("p",{className:"uploadBoxDescription"},"Please upload up to 8 images... (only one is mandatory)"),this.state.images.length<1&&M("span",{className:"uploadBoxHeading errorTextLine"},"Please upload an image*")))),M("div",{className:"grid-x"},M("div",{className:"cell large-6 medium-12 small-12"},M("div",{className:"cell large-2 medium-4 small-8"},this.state.dataLoaded&&M(A.ZP,{autoUpload:!1,inOrder:!0,initialState:this.state.initialImages,onChange:function(t){e.setState({images:t}),e.props.onImageChange(t)}},M(A.LF,null,(function(t){return M(A.gK,{className:"rugdrag"},(function(t){return M("div",{className:"cardHolder"},0==e.getImageIndex(t)&&M("div",{className:"uploadHeader"},"Main Image"),M(A.Zb,{image:t}))}))}))))),M("div",{className:"cell large-6 medium-12 small-12 add-images-control"},M("div",{className:"cell large-4 medium-10 small-12",id:"requirementContainer"},M("h3",{className:"imageAdviceHeading"},"Advice on images"),M("p",{className:"requirementDesc"},"Requirements"),M("ul",{className:"requirementText"},M("li",null,"Ideally images should be 1200px(w) x 900px(h) or 4:3 ratio"),M("li",null,"Use your camera or free apps to resize images before uploading."),M("li",null,"Landscape images only."),M("li",null,"Max Upload size: 2mb per image")),M("div",{style:{alignItems:"center"}},M("div",{className:"cell large-2 medium-6 small-6"},M("div",{className:"cell large-3 medium-6 small-8"},M("p",{className:"requirementText"},"Good images sell your vehicle. ",M("br",null),"Photograph the car from various angles on a bright day to ensure it fills the frame. ",M("br",null),"Include at least two interior shots."))),M("div",{className:"cell large-2 medium-6 small-6"},M("div",{className:"adviceBox"},M("img",{src:"/assets/images/advice01.png",alt:"Example of Acceptable Vehicle Image",className:"adviceImage"})),M("div",{className:"adviceBox"},M("img",{src:"/assets/images/advice02.png",alt:"Example of Unacceptable Vehicle Image",className:"adviceImage"})))),M("p",{className:"rejectText",style:{marginTop:"10px"}},"We reserve the right to reject imagery which does not meet our standards."),M("p",{className:"copyrightText"},"COPYRIGHT: You must own the copyright on the images you submit. We are not responsible for copyright infringement howsoever and wheresoever arising from your use of images on the site.")))))}}]),a}(p.Component);(0,d.Z)(Z,"displayName",Z.name);var j=p.createElement;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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var B=function(e){(0,o.Z)(a,e);var t=F(a);function a(e){var i;return(0,l.Z)(this,a),(i=t.call(this,e)).state={vehicleStatus:i.props.defaultValues.approval},i}return(0,r.Z)(a,[{key:"componentDidMount",value:function(){}},{key:"updateStatus",value:function(e){var t=this,a=this.props.defaultValues.vehicleId,i=this.props.defaultValues.rank;(0,V.mJ)("VehicleRegistration","UpdateVehicleStatus",{id:a,approval:e,rank:i}).then((function(e){var a=null;"True"==e.status&&(a=!0),"False"==e.status&&(a=!1),a&&i>10&&t.props.onChange({target:{value:10,name:"rank"}}),t.setState({vehicleStatus:a})}))}},{key:"isNumber",value:function(e){var t=!1;
1/[0-9]/.test(e.key)&&(t=!0),/./.test(e.key)&&(t=!0),t||e.preventDefault()}},{key:"render",value:function(){var e=this,t=this.props.defaultValues.updateType,a=this.props.defaultValues.adminOwnerData,i=this.state.vehicleStatus,s=this.props.defaultValues.images;return j("div",{className:"grid-x"},j("div",{className:"grid-container",id:"mileageContainer"},j("div",{className:"cell large-12 medium-8 small-12",id:"",style:{backgroundColor:"#f5f5f5",borderRadius:"15px",padding:"20px",margin:"10px 0px"}},j("div",{style:{display:"inline",width:"100%"}},j("div",{style:{display:"inline"}},j("h2",{className:"decorated",style:{margin:"0px"}},j("span",null,"ADMIN"))),1==t&&j("div",{className:""},j("div",{className:"formRow",style:{padding:"10px 0px"}},j("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},j("p",{className:"elementHeading"},"Override Commission (%)"),j("input",{type:"number",step:"0.01",name:"overrideCommission",onKeyPress:function(t){return e.isNumber(t)},onChange:function(t){return e.props.onChange(t)},style:{width:"100%"},className:"formElements",defaultValue:this.props.defaultValues.overrideCommision})),j("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},j("p",{className:"elementHeading"},"Base Rate Journey Time"),j("input",{type:"number",step:"0.01",name:"baseRateJourneyTime",onKeyPress:function(t){return e.isNumber(t)},onChange:function(t){return e.props.onChange(t)},style:{width:"100%"},className:"formElements",defaultValue:this.props.defaultValues.baseRateJourneyTime})))),(2==t||3==t)&&j("div",{className:""},j("div",{className:"formRow",style:{padding:"10px 0px"}},j("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},j("p",{className:"elementHeading"},"Rank"),j("select",{name:"rank",className:"formElements",value:this.props.defaultValues.rank,"aria-placeholder":"Please Select",onChange:function(t){return e.props.onChange(t)}},Object.keys(m.yw).map((function(e){return j("option",{key:"rank"+e,value:e},m.yw[e])})))),j("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},null==i?j("p",{className:"elementHeading"},"Status - ",j("i",{className:"fa fa-ellipsis-h"})," Pending"):j("p",{className:"elementHeading"},"Status - ",1==i?j("span",{style:{color:"#139b11"}},j("i",{className:"fa fa-check"})," Approved"):j("span",{style:{color:"#fe0606"}},j("i",{className:"fa fa-times"})," Rejected")),j("div",null,j("button",{disabled:1==i,type:"button",className:"registerVehicleBtn",style:{width:"100px",marginRight:"10px"},onClick:function(t){return e.updateStatus(!0)}},"Approve"),j("button",{disabled:0==i,type:"button",className:"registerVehicleBtnReject",style:{width:"100px"},onClick:function(t){return e.updateStatus(!1)}},"Reject")))),null!=s&&s.length>0&&j("div",{className:"formRow",style:{padding:"10px 0px",flexDirection:"column"}},j("p",{className:"elementHeading"},"Images"),j("div",{className:"adminImageGroupContainer"},s.map((function(e,t){return t++,j("div",{key:"img_"+t,className:"adminImageContainer"},j("img",{src:e.src||e.data,alt:""}))})))),j("div",{className:"formRow",style:{padding:"10px 0px"}},j("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},j("p",{className:"elementHeading"},"Owner Details"),j("table",{className:"whiteTable"},j("tbody",null,j("tr",null,j("th",null,"Owner ID"),j("td",null,a.id)),j("tr",null,j("th",null,"Name"),j("td",null,a.fullname)),j("tr",null,j("th",null,"Full Address"),j("td",null,a.address)),j("tr",null,j("th",null,"Country"),j("td",null,a.country)),j("tr",null,j("th",null,"Email"),j("td",null,a.email)),j("tr",null,j("th",null,"Mobile No."),j("td",null,a.mobile)),j("tr",null,j("th",null,"Telephone No."),j("td",null,a.phone)))),j("button",{type:"button",className:"registerVehicleBtn",onClick:function(){return window.location="/vehicleregistration/"+a.guid}},"Edit Owner Details"))))))))}}]),a}(p.Component);(0,d.Z)(B,"displayName",B.name);var G=p.createElement;function q(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var O=function(e){(0,o.Z)(a,e);
1var t=q(a);function a(e){var i;return(0,l.Z)(this,a),(i=t.call(this,e)).state={tcTextArea:!1,ppTextArea:!1,textArea:null},i}return(0,r.Z)(a,[{key:"componentDidMount",value:function(){this.setTextArea()}},{key:"setTextArea",value:function(){var e=this;(0,V.mJ)("Enquiry","GetTextAreaData").then((function(t){e.setState({textArea:t})}))}},{key:"getTextArea",value:function(e){var t="";return t="TC"==e?this.state.textArea.termsConditions:this.state.textArea.privacyPolicy,G("div",{className:"panel-TCPP-large",dangerouslySetInnerHTML:{__html:t}})}},{key:"showHideTextArea",value:function(e){"TC"==e?(this.setState({ppTextArea:!1}),this.state.tcTextArea?this.setState({tcTextArea:!1}):this.setState({tcTextArea:!0})):(this.setState({tcTextArea:!1}),this.state.ppTextArea?this.setState({ppTextArea:!1}):this.setState({ppTextArea:!0}))}},{key:"chkChanged",value:function(e){this.props.onChange(e)}},{key:"render",value:function(){var e=this;return G("div",null,G("h2",{className:"decorated"},G("span",null,"ALMOST THERE")),G("br",null),G("div",{className:"grid-x"},G("button",{className:this.state.tcTextArea?"accordionActive tcAccord":"accordion tcAccord",onClick:function(t){t.preventDefault(),e.showHideTextArea("TC")}},G("span",null,"Terms & Conditions")),1==this.state.tcTextArea&&this.getTextArea("TC"),G("button",{className:this.state.ppTextArea?"accordionActive tcAccord":"accordion tcAccord",style:{marginTop:"10px"},onClick:function(t){t.preventDefault(),e.showHideTextArea("PP")}},G("span",null,"Privacy Policy")),1==this.state.ppTextArea&&this.getTextArea("PP"),G("div",{className:"cell",style:{marginTop:"20px"}},G("div",{className:"cell large-6 medium-12 small-12"},G("label",{className:"cell large-12 medium-12 small-12"},G("input",{type:"checkbox",name:"termsCheckBox",value:"termsCheckBox",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.chkChanged(t)}}),G("div",{style:{marginLeft:"15px",height:"30px"}},"I have read and agree to Star Car Hire's Terms & Privacy Policy")),G("label",{className:"cell large-12 medium-12 small-12"},G("input",{type:"checkbox",name:"promotionalCheckBox",value:"promotionalCheckBox",style:{marginBottom:"0px",marginTop:"8px",float:"left"},onChange:function(t){return e.chkChanged(t)}}),G("div",{value:"mailingList",style:{marginLeft:"15px",height:"30px"}},"I agree to receive promotional mails from Star Car Hire Ltd."))))))}}]),a}(p.Component);(0,d.Z)(O,"displayName",O.name);var _=a(4706),U=a(615),Y=p.createElement;function K(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var W=function(e){(0,o.Z)(a,e);var t=K(a);function a(e){var i;return(0,l.Z)(this,a),i=t.call(this,e),(0,d.Z)((0,_.Z)(i),"getWindowSize",(function(){if(i.props.windowInnerWidth>=1024)var e=3;else if(i.props.windowInnerWidth>=640)e=2;else e=1;return e})),i.state={imageCount:0,currentImage:1,isPortrait:!1,allAuthorised:!0},i.imageLoaded=i.imageLoaded.bind((0,_.Z)(i)),i}return(0,r.Z)(a,[{key:"imageLoaded",value:function(e){var t=e.target;t.naturalHeight>t.naturalWidth&&this.setState({isPortrait:!0})}},{key:"componentDidMount",value:function(){var e=!0;this.props.vehicles&&this.props.vehicles.map((function(t){t.authorised||(e=!1)})),this.setState({allAuthorised:e})}},{key:"getImages",value:function(){var e,t,a,i=this,s=[],n=this.props.vehicles,l=this.getWindowSize();for(e=0,t=n.length;e<t;e+=l){a=n.slice(e,e+l);var r=[];a.map((function(e){var t="/vehicledetail/"+e.id+"/"+e.urlTitle.replace(/\s+/g,"-").toLowerCase();r.push(Y("div",{key:e.id,className:"smallImageHolder",style:{height:"auto",maxHeight:"300px",flexDirection:"column",justifyContent:"space-between"}},Y("div",{style:{display:"flex",justifyContent:"center",width:"100%",height:"100%",maxHeight:"205px"}},Y("img",{src:e.image,alt:e.title,style:{pointerEvents:"all"}})),Y("div",{className:"slideTitle",style:{position:"relative"}}
1,Y("div",{style:{minHeight:"45px"}},Y("span",{style:{display:"table",margin:"auto"}},e.title)),Y("div",{className:"slideTitleButtons",style:{margin:"5px 0"}},Y("button",{type:"button",className:"greenButton",style:{marginLeft:"0px"},onClick:function(){return i.props.navigate("/vehicleregistration/0/"+e.guid)}},e.authorised?"Modify":"Confirm Details"),Y("button",{type:"button",className:"greenButton",onClick:function(){return i.props.navigate(t)}},"View"),Y("button",{type:"button",className:"redButton",onClick:function(){return i.props.removeVehicle(e.id,e.title)}},"Remove"))),0==e.authorised&&Y("div",{className:"slideTitle warn"},Y("div",null,Y("span",null,"Please confirm vehicle details")))))})),s.push(Y("div",{key:"hold"+e,style:{display:"flex",justifyContent:"center",height:"100%"}},r))}return s}},{key:"changeItem",value:function(e){this.setState({currentImage:e+1})}},{key:"countAuthorised",value:function(){var e=0;return this.props.vehicles&&this.props.vehicles.map((function(t){t.authorised&&e++})),e}},{key:"render",value:function(){var e=this,t=this.countAuthorised();return Y("div",{style:{margin:"10px 0"}},Y("h2",{className:"decorated",style:{marginBottom:"10px"}},Y("span",null,"OWNER'S VEHICLES")),Y("div",{style:{marginBottom:"10px"}},Y("b",null,"Click to modify/view a vehicle or"),Y("button",{type:"button",className:"registerVehicleBtn",onClick:function(){return window.location="/vehicleregistration/"+e.props.ownerId+"/new"},style:{marginLeft:"10px"}},"Add a new vehicle"),!this.state.allAuthorised&&Y("div",null,Y("p",{style:{marginBottom:"2px"}},"Please ensure all details have been confirmed for all vehicles. Any vehicle which has not been confirmed will not be available to book."),Y("p",{style:{marginBottom:"2px"}},Y("a",{href:window.location.pathname+"#outstandingVehicles",id:"outstandingVehicles",style:{color:"#fe0606",textDecoration:"none"}},Y("b",null,t," of ",this.props.vehicles.length," vehicles authorised"))))),this.props.vehicles&&this.props.vehicles.length>0?Y(U.lr,{showThumbs:!1,showIndicators:!1,onChange:function(t){return e.changeItem(t)},className:"aleternateSlide"},this.getImages()):Y("div",null,Y("p",{className:"errorTextLine"},Y("b",null,Y("i",{className:"fa fa-exclamation-triangle"})," Warning:")," Please be aware that your account will be automatically deactivated if no vehicles are listed within 24hrs")))}}]),a}(p.Component);(0,d.Z)(W,"displayName",W.name);var z=p.createElement;function J(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var $=function(e){(0,o.Z)(a,e);var t=J(a);function a(e){var i;(0,l.Z)(this,a),i=t.call(this,e);var s=new Date,n=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0);return i.state={today:n,loading:!0,viewPedding:!0,viewHistorical:!1,confirmedEquiries:!0,quotedEquiries:!1,rejectedEquiries:!1,expiredEquiries:!1,jobDetails:[],jobContactDetails:[],actionList:[],pendingCount:0,messagesCount:0,fullList:[],pageList:[],page:1,maxPage:1},i}return(0,r.Z)(a,[{key:"componentDidMount",value:function(){var e=this;if(this.props.ownerId>0){var t=this.props.ownerId;(0,V.mJ)("VehicleRegistration","HireDetails",{id:t}).then((function(t){var a=[],i=[],s=[],n=0,l=0,r=1;if(t.jobDetails.length>0&&(n=(a=(a=t.jobDetails.filter((function(e){return"Pending"==e.status}))).sort((function(e,t){return new Date(e.startDate)-new Date(t.startDate)}))).length,l=t.jobDetails.filter((function(e){return e.newMessage>0})).length,(i=(i=t.jobDetails.filter((function(t){return new Date(t.startDate)-new Date(e.state.today)>=0&&"Confirmed"==t.status}))).sort((function(e,t){return new Date(e.startDate)-new Date(t.startDate)}))).length>0)){r=Math.floor(i.length/10)+1;for(var o=0;o<10;)null!=i[o]?s.push(i[o]):s.push({startDate:null,duration:0,type:"",status:"",totalMessage:-1,guid:null}),o++}e.setState({loading:!1,jobDetails:t.jobDetails,jobContactDetails:t.jobContactDetails,actionList:a,pendingCount:n,messagesCount:l,fullList:i,pageList:s,maxPage:r})}))}else this.setState({loading:!1})}},{key:"updateActionList",value:function(){var e=this;this.setState({viewPedding:!this.state.viewPedding},(function(){var t=[];e.state.viewPedding?t=(t=e.state.jobDetails.filter((function(e){return"Pending"==e.status}))).sort((function(e,t){return new Date(e.startDate)-new Date(t.startDate)})):t=(t=e.state.jobDetails.filter((function(e){return e.newMessage>0}))).sort((function(e,t){return new Date(t.lastMessageDate)-new Date(e.lastMessageDate)}));e.setState({actionList:t})}))}},{key:"updateFullList",value:function(e,t){var a=this;this.setState((0,d.Z)({},e,t),(function(){var e=a.state,t=e.jobDetails,i=e.confirmedEquiries,s=e.quotedEquiries,n=e.rejectedEquiries,l=e.expiredEquiries,r=e.viewHistorical,o=[],u=[];
1i&&(u=t.filter((function(e){return"Confirmed"==e.status}))).length>0&&u.map((function(e){o.push(e)}));var c=[];s&&(c=t.filter((function(e){return"Quoted"==e.status}))).length>0&&c.map((function(e){o.push(e)}));var d=[];n&&(d=t.filter((function(e){return"Rejected"==e.status}))).length>0&&d.map((function(e){o.push(e)}));var p=[];l&&(p=t.filter((function(e){return"Expired"==e.status}))).length>0&&p.map((function(e){o.push(e)}));var h=[],m=1;if(o.length>0){o=r?(o=o.filter((function(e){return new Date(e.startDate)-new Date(a.state.today)<0}))).sort((function(e,t){return new Date(t.startDate)-new Date(e.startDate)})):(o=o.filter((function(e){return new Date(e.startDate)-new Date(a.state.today)>=0}))).sort((function(e,t){return new Date(e.startDate)-new Date(t.startDate)})),m=Math.floor(o.length/10)+1;for(var f=0;f<10;)null!=o[f]?h.push(o[f]):h.push({startDate:null,duration:0,type:"",status:"",totalMessage:-1,guid:null}),f++}a.setState({fullList:o,pageList:h,maxPage:m,page:1})}))}},{key:"updatePage",value:function(e){var t=this.state,a=t.page,i=t.maxPage,s=t.fullList;(a+=e)<1?a=1:a>i&&(a=i);for(var n=[],l=10*(a-1),r=l+10;l<r;)null!=s[l]?n.push(s[l]):n.push({startDate:null,duration:0,type:"",status:"",totalMessage:-1,guid:null}),l++;this.setState({page:a,pageList:n})}},{key:"getDuration",value:function(e){var t="";if(1==e)t="1 Hour Hire";else if(4==e)t="Half Day Hire";else if(8==e)t="Full Day Hire";else if(16==e||24==e){t=e/8+" Days Hire"}return t}},{key:"render",value:function(){var e=this;return z("div",{className:"grid-x"},this.state.loading?z("div",{className:"searchLoading",style:{margin:"auto",minHeight:"auto",width:"auto"}},z(T.Z,{msg:"Retrieving Jobs..."})):z("div",{className:"cell RegDashboard"},z("div",{className:"dashTopTabs"},z("button",{className:this.state.viewPedding?"actRegTab":"inactRegTab",onClick:function(){return e.updateActionList()}},"Pending",this.state.pendingCount>0&&z("span",null,this.state.pendingCount)),z("button",{className:this.state.viewPedding?"inactRegTab":"actRegTab",onClick:function(){return e.updateActionList()}},"New Messages",this.state.messagesCount>0&&z("span",null,this.state.messagesCount))),z("div",{className:"dashTopTable"},z("table",null,z("tbody",null,z("tr",null,!this.state.viewPedding&&z("th",{className:"colHeader"},"Update Date"),z("th",{className:"colHeader"},"Event Date"),z("th",{className:"colHeader"},"Duration"),z("th",{className:"colHeader"},"Type"),this.state.viewPedding?z("th",{className:"colHeader"},"No. Vehicles"):z("th",{className:"colHeader"},"Status"),z("th",{className:"colHeader"})),this.state.actionList.length>0?this.state.actionList.map((function(t){return z("tr",null,!e.state.viewPedding&&z("td",null,new Date(t.lastMessageDate).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"numeric"})),z("td",null,new Date(t.startDate).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"numeric"})),z("td",null,e.getDuration(t.duration)),z("td",null,t.type),e.state.viewPedding?z("td",null,t.numVehicles):z("td",null,t.status),e.state.viewPedding?z("td",null,z("button",{className:"actRegTab",onClick:function(){return window.open("/ownerconfirmation/"+t.guid,"_blank")}},"Quote")):z("td",null,z("button",{className:"actRegTab",onClick:function(){return window.open("/orderreview/"+t.guid,"_blank")}},"Full Details")))})):z("tr",null,z("td",{colSpan:"5",style:{textAlign:"center"}},"No Items"))))),z("div",{className:"dashBottomActions"},z("div",{className:"dashBottomTabs"},z("button",{className:this.state.viewHistorical?"inactRegTab":"actRegTab",onClick:function(){return e.updateFullList("viewHistorical",!1)}},"Up & Coming"),z("button",{className:this.state.viewHistorical?"actRegTab":"inactRegTab",onClick:function(){return e.updateFullList("viewHistorical",!0)}},"Historical")),z("div",{className:"dashBottomFilters"},z("label",null,z("input",{type:"checkbox",name:"confirmedEquiries",defaultChecked:"checked",onClick:function(){return e.updateFullList("confirmedEquiries",!e.state.confirmedEquiries)}}),z("div",null,"Confirmed")),z("label",null,z("input",{type:"checkbox",name:"quotedEquiries",onClick:function(){return e.updateFullList("quotedEquiries",!e.state.quotedEquiries)}}),z("div",null,"Quoted")),z("label",null,z("input",{type:"checkbox",name:"rejectedEquiries",onClick:function(){return e.updateFullList("rejectedEquiries",!e.state.rejectedEquiries)}}),z("div",null,"Rejected")),z("label",null,z("input",{type:"checkbox",name:"expiredEquiries",onClick:function(){return e.updateFullList("expiredEquiries",!e.state.expiredEquiries)}}),z("div",null,"Expired")))),z("div",{className:"dashBottomTable"},z("table",{className:"dashMainTable"},z("tbody",{className:"dashMainTable_body"},z("tr",{className:"dashMainTable_headerRow"},z("th",{className:"dashMainTable_headerCol"},"Start Date"),z("th",{className:"dashMainTable_headerCol"},"Duration"),z("th",{className:"dashMainTable_headerCol"},"Type"),z("th",{className:"dashMainTable_headerCol"},"Couple Name"),z("th",{className:"dashMainTable_headerCol"},"Status"),z("th",{className:"dashMainTable_headerCol dashMainTable_headerColMessages"},"Messages"),z("th",{className:"dashMainTable_headerCol"})),this.state.pageList.length>0?z(p.Fragment,null,this.state.pageList.map((function(t,a){var i=e.state.jobContactDetails.find((function(e){return e.orderId==t.orderId}))||null;return"Confirmed"===t.status&&null!=i?z(p.Fragment,{key:"job_"+a},z("tr",{className:"dashMainTable_jobFullDetailsRow"},z("td",{className:"dashMainTable_jobFullDetailsCol",colSpan:"100%"},z("table",{className:"jobDetailsTable"},z("tbody",{className:"jobDetailsTable_body"},z("tr",{className:"jobDetailsTable_row"},null!=t.startDate?z("td",{className:"jobDetailsTable_col"},new Date(t.startDate).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"numeric"})):z("td",{className:"jobDetailsTable_col"}),z("td",{className:"jobDetailsTable_col"},e.getDuration(t.duration)),z("td",{className:"jobDetailsTable_col"},t.type),z("td",{className:"jobDetailsTable_col"},t.couplesName),z("td",{className:"jobDetailsTable_col"},t.status),t.totalMessage>=0?z("td",{className:"jobDetailsTable_col jobDetailsTable_colMessages"},z("button",{className:"actRegTab"},t.totalMessage," ",z("i",{className:"fas fa-comment-dots"}))):z("td",{className:"jobDetailsTable_col jobDetailsTable_colMessages"}),null!=t.guid?z("td",{className:"jobDetailsTable_col"},z("button",{className:"actRegTab",onClick:function(){return e.props.navigate("/orderreview/"+t.guid)}},"Full Details")):z("td",{className:"jobDetailsTable_col"})))),z("table",{className:"jobContactDetailsTable"},z("tbody",{className:"jobContactDetailsTable_body"},z("tr",{className:"jobContactDetailsTable_row"}
1,z("td",{className:"jobContactDetailsTable_col",colSpan:"33%"},z("b",null,"Contact Name:")," ",i.contactName),z("td",{className:"jobContactDetailsTable_col",colSpan:"33%"},z("b",null,"Contact Phone:")," ",i.contactPhone),z("td",{className:"jobContactDetailsTable_col",colSpan:"33%"},z("b",null,"Contact Email:")," ",i.contactEmail))))))):z("tr",{key:"job_"+a,className:"jobDetailsTable_row"},null!=t.startDate?z("td",{className:"jobDetailsTable_col"},new Date(t.startDate).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"numeric"})):z("td",{className:"jobDetailsTable_col"}),z("td",{className:"jobDetailsTable_col"},e.getDuration(t.duration)),z("td",{className:"jobDetailsTable_col"},t.type),z("td",{className:"jobDetailsTable_col"},t.couplesName),z("td",{className:"jobDetailsTable_col"},t.status),t.totalMessage>=0?z("td",{className:"jobDetailsTable_col jobDetailsTable_colMessages"},z("button",{className:"actRegTab"},t.totalMessage," ",z("i",{className:"fas fa-comment-dots"}))):z("td",{className:"jobDetailsTable_col jobDetailsTable_colMessages"}),null!=t.guid?z("td",{className:"jobDetailsTable_col"},z("button",{className:"actRegTab",onClick:function(){return e.props.navigate("/orderreview/"+t.guid)}},"Full Details")):z("td",{className:"jobDetailsTable_col"}))}))):z("tr",{className:"jobDetailsTable_row jobDetailsTable_rowNoItems"},z("td",{className:"jobDetailsTable_col jobDetailsTable_colNoItems",colSpan:"6",style:{textAlign:"center"}},"No Items")))),z("div",{className:"dashBottomTablePaging"},z("button",{onClick:function(){return e.updatePage(-e.state.maxPage)}},z("i",{className:"fa fa-angle-double-left"})),z("button",{onClick:function(){return e.updatePage(-1)}},z("i",{className:"fa fa-angle-left"})),z("p",null,"Pages ",z("b",null,this.state.page)," of ",z("b",null,this.state.maxPage)),z("button",{onClick:function(){return e.updatePage(1)}},z("i",{className:"fa fa-angle-right"})),z("button",{onClick:function(){return e.updatePage(e.state.maxPage)}},z("i",{className:"fa fa-angle-double-right"}))))))}}]),a}(p.Component);(0,d.Z)($,"displayName",$.name);var Q=p.createElement;function X(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var ee=function(e){(0,o.Z)(a,e);var t=X(a);function a(e){var i;return(0,l.Z)(this,a),(i=t.call(this,e)).state={password:i.props.defaultValues.password,confirmPassword:i.props.defaultValues.confirmPassword,minChar:!1,specChar:!1,numChar:!1,capChar:!1,passMatch:!1,invalidPass:!1},i}return(0,r.Z)(a,[{key:"matchPassword",value:function(e){var t=e.target.name,a=e.target.value,i=!1;"password"==t?(a==this.state.confirmPassword&&(i=!0),this.setState({password:a,passMatch:i})):(a==this.state.password&&(i=!0),this.setState({confirmPassword:a,passMatch:i}));var s=!0;this.state.minChar&&this.state.specChar&&this.state.numChar&&this.state.capChar&&i&&(s=!1),this.setState({invalidPass:s}),this.props.onChange(e)}},{key:"checkPassword",value:function(e){var t=e.target.value,a=!1;t.length>7&&(a=!0);var i=!1;(/[!$%^&*()\-_=+{}[\];:@#~|,<.>~,.?]/.test(t)||/[\u00A3\u00A6\u00AC\u20AC]/.test(t))&&(i=!0);var s=/[0-9]/,n=!1;s.test(t)&&(n=!0);var l=!1;(s=/[A-Z]/).test(t)&&(l=!0);var r=!0;a&&i&&n&&l&&this.state.passMatch&&(r=!1),this.setState({minChar:a,specChar:i,numChar:n,capChar:l,invalidPass:r}),this.matchPassword(e),this.props.onChange(e)}},{key:"render",value:function(){var e=this;return Q("div",{className:"cell large-6 medium-8 small-12",id:""},Q("div",{style:{display:"inline",width:"100%"}},Q("h2",{className:"decorated"},Q("span",null,"CREATE LOGIN"))),Q("div",null,Q("div",{className:"formRow"},Q("div",{style:{display:"flex",width:"45%",flexDirection:"column"}},Q("p",{className:"elementHeading"},"Password*"),Q("input",{type:"password",autoComplete:"false",required:!0,name:"password",onChange:function(t){return e.checkPassword(t)},style:{width:"100%"},className:"formElements",defaultValue:this.props.defaultValues.password})),Q("div",{style:{display:"flex",width:"45%",marginLeft:"10%",flexDirection:"column"}},Q("p",{className:"elementHeading"},"Confirm Password*"),Q("input",{type:"password",autoComplete:"false",required:!0,name:"confirmPassword",onChange:function(t){return e.matchPassword(t)},style:{width:"100%"},className:"formElements",defaultValue:this.props.defaultValues.confirmPassword}
1))),this.state.invalidPass?Q("div",{className:"formRow"},Q("ul",{style:{listStyle:"none"}},Q("li",{className:this.state.minChar?"passwordValid":"passwordInvalid"},"Password has more then 8 characters"),Q("li",{className:this.state.specChar?"passwordValid":"passwordInvalid"},"Password has a special characters"),Q("li",{className:this.state.numChar?"passwordValid":"passwordInvalid"},"Password has a number"),Q("li",{className:this.state.capChar?"passwordValid":"passwordInvalid"},"Password has a capital letter"),Q("li",{className:this.state.passMatch?"passwordValid":"passwordInvalid"},"Passwords match"))):Q("div",null)))}}]),a}(p.Component);(0,d.Z)(ee,"displayName",ee.name);var te=p.createElement;function ae(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 a,i=(0,c.Z)(e);if(t){var s=(0,c.Z)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,u.Z)(this,a)}}var ie="https://api.starcarhire.co.uk",se=function(e){(0,o.Z)(a,e);var t=ae(a);function a(e){var i;return(0,l.Z)(this,a),(i=t.call(this,e)).state={metaData:i.props.metaData,updateType:null,vehicleDetail:null,adminOwnerData:null,dataLoaded:!1,tc:!0,canSubmit:!1,formSubmitted:!1,carRemoved:!1,removalCarId:0,removalOwnerId:0,removalName:null,isAdmin:!1,legacyUsr:!1,curAddress:null,loading:!1,submitSuccessful:!1,submitErrorMSG:null,statusCodes:[],incompleteFields:[],unavailableMonths:[],selectedCategories:[],scrollTop:!1,ownerGuid:null,validFees:!0,viewDashboard:!1,aboutYouRequiredFields:["title","forename","surname","country","address","town","email","confirmEmail","mobile"],createLoginRequiredFields:["password","confirmPassword"],feeRequiredFields:["basePriceFullDay","basePrice24hr","basePrice4hr"],availabilityRequiredFields:["canTravel","canTravelEvents"],aboutVehicleRequiredFields:["vehicleMake","vehicleModel","vehicleYear","vehicleOrigin","vehicleRegistration","vehicleCondition","vehicleExtColour1","vehicleIntColour1","vehiclePassengers","vehicleGearing","vehicleEngineSize","vehicleValue"],originalPricing:{basePrice4hr:0,basePrice24hr:0,basePriceFullDay:0},failedSubmitsCodes:[1300,1301,1302,1310,1320,1340,1350,1400,1401,1402,1410,1420,1440,1450]},i}return(0,r.Z)(a,[{key:"componentDidMount",value:function(){this.setup()}},{key:"componentDidUpdate",value:function(e){}},{key:"setup",value:function(){var e=this,t=null!=this.props.login?this.props.login:null!=localStorage.getItem("loggedIn")&&localStorage.getItem("loggedIn");if(this.props.owner&&0!=this.props.owner)this.props.vehicle?"new"==this.props.vehicle?this.setState({updateType:3,updateId:this.props.owner,canSubmit:!1}):this.props.router.push("/404"):this.setState({updateType:1,updateId:this.props.owner,legacyUsr:!t},(function(){return e.fetchData(1,e.props.owner)}));else if(this.props.vehicle){this.state.carRemoved?this.setState({carRemoved:!1},(function(){e.props.router.push("/vehicleregistration/"+e.state.ownerGuid)})):t&&(window.scrollTo(0,0),this.setState({updateType:2,updateId:this.props.vehicle},(function(){return e.fetchData(2,e.props.vehicle)})))}else t?this.fetchOwnerID():(window.scrollTo(0,0),this.setState({dataLoaded:!0,tc:!1}))}},{key:"getMetaData",value:function(e){var t=this,a={pageId:e};(0,V.mJ)("CMSPages","GetPageSEO",a).then((function(e){null!=e&&null!=e.page&&t.setState({metaData:{title:e.page.seoTitle,desc:e.page.seoDescription,keywords:e.page.seoKeywords}})}))}},{key:"fetchOwnerID",value:function(){var e=this;(0,V.mJ)("VehicleRegistration","OwnerDetail",{}).then((function(t){t.guid.length>0?e.props.router.push("/vehicleregistration/"+t.guid+"/new"):(localStorage.removeItem("loggedIn"),e.props.updateLogin(!1),(0,V.eZ)("Login","Logout").then((function(t){e.props.router.push("/vehicleregistration/")})))}))}},{key:"fetchData",value:function(e,t){var a=this,i=null!=this.props.jwtToken?this.props.jwtToken:localStorage.getItem("jwtToken");
1(0,V.eZ)("VehicleRegistration?"+new URLSearchParams({type:e,id:t}),null,i).then((function(e){if(e.ret){var t=null!=a.props.login?a.props.login:null!=localStorage.getItem("loggedIn")&&localStorage.getItem("loggedIn");if(!e.authorised&&a.state.legacyUsr||e.authorised&&t){var i=!e.authorised;a.setState({legacyUsr:i},(function(){a.setData(e.ret,e.isAdmin)}))}else a.props.router.push("/login")}else a.props.router.push("/404");a.checkFields()}))}},{key:"setData",value:function(e,t){var a=this,i={basePrice4hr:0,basePrice24hr:0,basePriceFullDay:0},s=["Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec"],n=this.state.unavailableMonths,l=this.state.selectedCategories,r="",o="false";Object.keys(e.data).map((function(t){a.setState((0,d.Z)({},t,e.data[t])),"address"!=[t]&&"town"!=[t]&&"postCode"!=[t]&&"country"!=[t]||(r="postCode"==[t]?r+e.data[t].toUpperCase().trim()+", ":r+e.data[t]+", "),"email"==[t]&&a.setState({confirmEmail:e.data[t]}),"basePrice4hr"==[t]&&(i.basePrice4hr=e.data[t]),"basePrice24hr"==[t]&&(i.basePrice24hr=e.data[t]),"basePriceFullDay"==[t]&&(i.basePriceFullDay=e.data[t]),"subscribe"==[t]&&null!=e.data[t]&&(o=e.data[t].toString()),s.map((function(a){[t]=="availability"+a&&(e.data[t]||n.push(a.toLowerCase()))}))})),", , , , "==r&&(r=null),e.categories&&e.categories.length>0&&(l=e.categories);var u=e.adminOwnerData&&e.adminOwnerData.guid?e.adminOwnerData.guid:"",c=null!=e.images?e.images:[];this.setState({dataLoaded:!0,vehicleDetail:e.ownerVehicles,images:c,adminOwnerData:e.adminOwnerData,isAdmin:t,originalPricing:i,selectedCategories:l,curAddress:r,ownerGuid:u,ownerSubscribe:o},(function(){a.checkFields()}))}},{key:"validFees",value:function(){var e=!0,t=null!=this.state.basePriceFullDay?parseInt(this.state.basePriceFullDay):0,a=null!=this.state.basePrice24hr?parseInt(this.state.basePrice24hr):0,i=null!=this.state.basePrice4hr?parseInt(this.state.basePrice4hr):0;return(t<0||a<0||i<0||t<a||a<i)&&(e=!1),this.state.validFees!=e&&this.setState({validFees:e}),e}},{key:"validMobile",value:function(){var e=!1,t=this.state.mobile,a=44,i="";if(null==this.state.country&&""==this.state.country||(i=this.state.country),""==i?a=0:"Republic of Ireland"==i&&(a=353),a>0){var s=t.slice(0,1),n=t.slice(0,2),l=t.slice(0,3);12==(t=0==s?a+this.state.mobile.substring(1):"Republic of Ireland"==i&&"353"==l||""!=i&&"Republic of Ireland"!=i&&"44"==n?this.state.mobile:a+this.state.mobile).length&&(e=!0)}return e}},{key:"checkFields",value:function(){var e=this,t=!0,a=this.state.updateType,i=[],s=[];return null!=a&&1!=a||(this.state.aboutYouRequiredFields.map((function(e){i.push(e)})),null!=this.state.authorised||this.state.isAdmin||this.state.createLoginRequiredFields.map((function(e){i.push(e)}))),(null==a||2==a&&this.state.dataLoaded||3==a)&&(this.state.feeRequiredFields.map((function(e){i.push(e)})),this.state.availabilityRequiredFields.map((function(e){i.push(e)})),this.state.aboutVehicleRequiredFields.map((function(e){i.push(e)}))),i.map((function(t){"title"==t||"canDrive"==t||"milesDriven"==t||"vehicleMake"==t||"vehicleModel"==t||"vehicleOrigin"==t||"vehicleCondition"==t||"vehicleExtColour1"==t||"vehicleIntColour1"==t||"vehiclePassengers"==t||"vehicleGearing"==t?e.state[t]&&null!=e.state[t]&&0!=e.state[t]||s.push(t):"canTravel"==t||"canTravelEvents"==t?0!=e.state[t]&&(e.state[t]&&null!=e.state[t]||s.push(t)):e.state[t]&&null!=e.state[t]&&""!=e.state[t]||s.push(t)})),t=0==s.length,this.setState({incompleteFields:s}),(null==a||2==a&&this.state.dataLoaded||3==a)&&((!this.state.images||this.state.images.length<1)&&(t=!1),this.state.selectedCategories.includes(12)||(this.state.vehicleRightHandDrive&&null!=this.state.vehicleRightHandDrive&&0!=this.state.vehicleRightHandDrive||(t=!1),null==this.state.vehicleConvertible&&(t=!1),this.state.vehicleDoors&&null!=this.state.vehicleDoors&&0!=this.state.vehicleDoors||(t=!1)),this.state.vehicleYear&&(this.state.vehicleYear.length<4||this.state.vehicleYear<1886||this.state.vehicleYear>(new Date).getFullYear())&&(t=!1),this.validFees()||(t=!1)),2!=a&&3!=a&&t&&(null!=this.state.password&&null!=this.state.confirmPassword&&this.state.password!=this.state.confirmPassword&&(t=!1),null!=this.state.email&&null!=this.state.confirmEmail&&this.state.email!=this.state.confirmEmail&&(t=!1),null!=this.state.mobile&&(this.validMobile()||(t=!1))),this.setState({canSubmit:t}),t}},{key:"onChange",value:function(e){if("monthUnavailable"==e.target.name){var t=this.state.unavailableMonths,a=[];if(0==e.target.checked)t.push(e.target.value);else{var i=0;t.map((function(t){t==e.target.value&&a.push(i),i++})),a.map((function(e){t[e]=null}))}var s=!0;t.map((function(e){null!=e&&(s=!1)})),s&&(t=[]),this.setState({unavailableMonths:t})}else if("categories"==e.target.name){var n=this.state.selectedCategories;if(e.target.checked)n.push(parseInt(e.target.value));else{a=n.indexOf(parseInt(e.target.value));delete n[a]}}else"termsCheckBox"==e.target.name?this.setState({tc:e.target.checked}):"subscribe"==e.target.name&&this.setState({ownerSubscribe:e.target.checked.toString()}),this.setState((0,d.Z)({},e.target.name,e.target.value||e.target.checked),(function(){this.checkFields()}))}},{key:"removeDuplicateImages",value:function(e){return e.filter((function(e,t,a){return a.findIndex((function(t){return t.name===e.name}))===t}))}},{key:"getImgBase",value:function(e,t){var a=this,i=null;if(e.type&&e.type.match(/image.*/)){var s=new FileReader;s.addEventListener("load",(function(s){var n=new Image;n.addEventListener("load",(function(s){var l=document.createElement("canvas"),r=1200,o=n.width,u=n.height;o>u?o>r&&(u*=r/o,o=r):u>r&&(o*=r/u,u=r),l.width=o,l.height=u,l.getContext("2d").drawImage(n,
10,0,o,u),i=l.toDataURL("image/jpeg").replace("data:image/jpeg;base64,","");var c=a.state.images||[];c.push({name:e.name,data:i,existing:!1,orderId:t}),a.setState({images:c},(function(){a.checkFields()}))})),n.src=s.target.result})),s.readAsDataURL(e)}return i}},{key:"setExistingImage",value:function(e,t){var a=this,i=this.state.images;i.push({name:e.uid,data:e.source,existing:!0,orderId:t,id:e.id}),this.setState({images:i},(function(){a.checkFields()}))}},{key:"onChangeImage",value:function(e){var t=this,a=e.length;this.setState({images:[]},(function(){e.map((function(e){e.file?t.getImgBase(e.file,a):t.setExistingImage(e,a),a--}))}))}},{key:"navigate",value:function(e){var t=this;if(this.props.router.push(e),e.includes("/0/")){var a=e.split("/")[3];""!=a&&"new"!=a&&this.setState({updateType:2,updateId:a,legacyUsr:this.props.legacyUsr,images:[],dataLoaded:!1},(function(){t.fetchData(2,a)}))}}},{key:"handleSubmit",value:function(e){var t=this;e.preventDefault(),this.checkFields()&&this.state.tc?this.setState({loading:!0},(function(){var e=t.state,a={};e.images=e.images&&t.removeDuplicateImages(e.images),Object.keys(e).map((function(i){e[i]&&""!=i&&(a[i]="updateType"==i||"images"==i||"dataLoaded"==i?e[i]:e[i].toString()),a.ownerId=t.props.owner?t.props.owner:0}));var i=JSON.stringify(a);fetch(ie+"/api/VehicleRegistration",{method:t.state.updateType&&t.state.updateType<3?"PUT":"POST",body:i,headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){var a=!0,i=!0,s=null,n=[],l=t.state.legacyUsr;e.data.map((function(e){1200==e.Key?(s="successful",a=!1):i&&t.state.failedSubmitsCodes.includes(e.Key)&&(i=!1,s="(error: "+e.Key+"): "+e.Value)})),a&&(n=e.data),l&&i&&1==t.state.updateType&&t.onLogin();var r=t.state.ownerGuid;i&&(r=e.ownerId),t.setState({formSubmitted:!0,loading:!1,submitSuccessful:i,submitErrorMSG:s,statusCodes:n,legacyUsr:l,ownerGuid:r})}))})):this.validFees()||this.setState({formSubmitted:!0})}},{key:"onLogin",value:function(){var e=(0,n.Z)(s().mark((function e(){var t,a,i,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isPosting:!0}),t={username:this.state.email,password:this.state.password},a=JSON.stringify(t),e.next=5,fetch(ie+"/api/Login",{body:a,method:"post",headers:{"Content-Type":"application/json"}});case 5:return i=e.sent,e.next=8,i.json();case 8:n=e.sent,n.ret>0&&(localStorage.setItem("jwtToken",n.token),localStorage.setItem("userConfig",JSON.stringify(n.userConfig)),localStorage.setItem("loggedIn",!0),this.props.updateLogin(!0));case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"retruningOwnerMSG",value:function(){return te("div",{className:"registrationDescriptionList"},te("p",{className:"registrationDescription",style:{margin:"0px"}},"We have made some changes and the following fields are new/changed:"),this.props.windowInnerWidth>767?te("p",null,"\u2003-\u2002",te("a",{href:window.location.pathname+"#canDrive"},"Who can drive your car?"),"\u2003-\u2002",te("a",{href:window.location.pathname+"#yearlyAvailability"},"Yearly Availability"),"\u2003-\u2002",te("a",{href:window.location.pathname+"#vehicleMakeModel"},"Make & Model"),"\u2003-\u2002",te("a",{href:window.location.pathname+"#vehicleGearing"},"Gearing"),"\u2003-\u2002",te("a",{href:window.location.pathname+"#vehicleEngineSize"},"Engine Size"),"\u2003-\u2002",te("a",{href:window.location.pathname+"#vehicleValue"},"Approx. Value")):te("ul",null,te("li",null,te("a",{href:window.location.pathname+"#canDrive"},"Who can drive your car?")),te("li",null,te("a",{href:window.location.pathname+"#yearlyAvailability"},"Yearly Availability")),te("li",null,te("a",{href:window.location.pathname+"#vehicleMakeModel"},"Make & Model")),te("li",null,te("a",{href:window.location.pathname+"#vehicleGearing"},"Gearing")),te("li",null,te("a",{href:window.location.pathname+"#vehicleEngineSize"},"Engine Size")),te("li",null,te("a",{href:window.location.pathname+"#vehicleValue"},"Approx. Value"))))}},{key:"checkAllAuthorised",value:function(){var e=0;if(this.state.vehicleDetail.map((function(t){t.authorised&&e++})),e<this.state.vehicleDetail.length)return te("div",null,te("p",{style:{marginBottom:"2px",color:"#fe0606"}},te("a",{href:window.location.pathname+"#outstandingVehicles",style:{color:"#fe0606",textDecoration:"none"}},te("b",null,e," of ",this.state.vehicleDetail.length," Vehicles Authorised"))))}},{key:"removeOwnerPopup",value:function(e,t){this.setState({formSubmitted:!0,loading:!1,removalOwnerId:e,removalName:t})}},{key:"removeVehicle",value:function(e){var t=this;(0,V.mJ)("VehicleRegistration","RemoveVehicleById",{id:e}).then((function(e){t.setState({formSubmitted:!1,loading:!1,carRemoved:!0,removalCarId:0},(function(){t.setup()}))}))}},{key:"removeVehiclePopup",value:function(e,t){this.setState({formSubmitted:!0,removalCarId:e,removalName:t})}},{key:"removeOwner",value:function(e){var t=this;(0,V.mJ)("VehicleRegistration","RemoveOwnerById",{id:e}).then((function(e){t.setState({formSubmitted:!1,loading:!1,removalOwnerId:0},(function(){t.props.router.push("/login")}))}))}},{key:"confirmation",value:function(e){var t=this;if(e&&this.state.removalCarId>0)this.setState({formSubmitted:!1},(function(){return t.removeVehicle(t.state.removalCarId)}));else if(e&&this.state.removalOwnerId>0)this.setState({formSubmitted:!1},(function(){return t.removeOwner(t.state.removalOwnerId)}));else if(e){var a=this.state.ownerGuid?this.state.ownerGuid:this.props.owner?this.props.owner:0;this.setState({formSubmitted:!1,loading:!1,removalCarId:0,removalOwnerId:0,submitErrorMSG:null,statusCode:null}),this.state.submitSuccessful&&(1==this.state.updateType?this.setup():2==this.state.updateType&&0!=a?(this.props.router.push("/vehicleregistration/"+a),""!=a&&this.setState({updateType:1,updateId:a,legacyUsr:this.props.legacyUsr,images:[],dataLoaded:!1},(function(){t.fetchData(1,a)}))):this.props.router.push("/login"))}else this.setState({loading:!1,formSubmitted:!1,removalOwnerId:0,removalCarId:0})}},{key:"getPopMSG",value:function(e){var t=!1,a=!1,i=this.state.legacyUsr,s=this.state.isAdmin;return this.state.statusCodes.map((function(e){1301==e.Key||1401==e.Key?t=!0:1302
1!=e.Key&&1402!=e.Key||(a=!0)})),this.state.removalCarId>0?te("h5",{style:{color:"#545454"}},"Please confirm that you wish to remove ",te("b",null,"'",this.state.removalName,"'")," from your list of vehicles"):this.state.removalOwnerId>0?te("h5",{style:{color:"#545454"}},"Please confirm that you wish to remove ",te("b",null,"'",this.state.removalName,"'")," from the Star Car Hire site"):0==this.state.validFees?te("div",null,te("h5",{style:{color:"#545454"}},"The fees you have provided are invalid, please check that:"),te("ul",null,te("li",{style:{textAlign:"left"}},te("b",null,"1 hour hire fee")," is not greater than ",te("b",null,"Half day hire fee")),te("li",{style:{textAlign:"left"}},te("b",null,"Half day hire fee")," is not greater than ",te("b",null,"Full day hire fee")))):!this.state.submitSuccessful&&t?te("h5",{style:{color:"#545454"}},"The password provided is invalid, please try a different password"):!this.state.submitSuccessful&&a?te("h5",{style:{color:"#545454"}},"The email address ",te("b",null,"'",this.state.email,"'")," is already in use, please ",te("a",{style:{color:"#545454",textDecoration:"underline"},href:"/login"},"login")," or provide a different email"):this.state.submitSuccessful||null==this.state.submitErrorMSG?this.state.submitSuccessful&&this.state.statusCodes.length>0&&null==this.state.submitErrorMSG?te("div",null,te("h5",{style:{color:"#545454"}},null==e?"Your registery has now been submitted with errors, once your account has been approved you will be able to update these details":2==e?"Your vehicle has updated with errors, see below for list of errors":"Your changes have been updated with errors, see below for list of errors"),te("br",null),te("ul",null,this.state.statusCodes.map((function(e){return null!=e.value&&""!=e.value?te("li",{style:{textAlign:"left"}},"Error: ",e.key," - ",e.value):null}))),te("br",null),null!=e&&2==e?te("h5",{style:{color:"#545454"}},"Please re-view the updated vehicle details. retry resubmitting if required"):null!=e&&te("h5",{style:{color:"#545454"}},"Please re-view the updated details. retry resubmitting if required")):te("h5",{style:{color:"#545454"}},null==e?"Your registery has now been submitted and you will get an email to confirm if approved":3==e?"Vehicle has been listed successfully":i&&!s?"Thank you for confirming your account details, please review your vehicles and confirm their details":"Your changes have been saved"):te("h5",{style:{color:"#545454"}},this.state.submitErrorMSG,"; please check the provided information and retry submitting.",te("br",null),te("br",null),"If this continues please contact us at ",te("a",{style:{color:"#545454",textDecoration:"underline"},href:"mailto:".concat(P.B8)},P.B8)," ")}},{key:"getOkbtn",value:function(){var e=this,t="Ok";return(this.state.removalCarId>0||this.state.removalOwnerId>0)&&(t="Confirm"),te("button",{className:"cancel-btn",onClick:function(){return e.confirmation(!0)}},t)}},{key:"getCancelbtn",value:function(){var e=this;if(this.state.removalCarId>0||this.state.removalOwnerId>0)return te("button",{className:"cancel-btn",onClick:function(){return e.confirmation(!1)}},"Cancel")}},{key:"getRemovebtn",value:function(e){var t=this,a=this.state.forename+" "+this.state.surname,i=this.state.vehicleYear+" "+this.state.vehicleMake+" "+this.state.vehicleModel;if(e>0){if(e<2){var s="If you wish to remove your account, please click 'Remove'";return this.state.isAdmin&&(s="If you want to remove this owner please click 'Remove'"),te("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"}},te("label",{style:{fontSize:"16px"}},s),te("button",{type:"button",className:"registerVehicleBtn",style:{marginLeft:"10px",backgroundColor:"#FFE5E5",color:"#FE0606"},onClick:function(){return t.removeOwnerPopup(t.state.ownerId,a)}},"Remove"))}return te("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"}},te("label",{style:{fontSize:"16px"}},"If you want to remove this vehicle please click 'Remove'"),te("button",{type:"button",className:"registerVehicleBtn",style:{marginLeft:"10px",backgroundColor:"#FFE5E5",color:"#FE0606"},onClick:function(){return t.removeVehiclePopup(t.state.vehicleId,i)}},"Remove"))}}},{key:"render",value:function(){var e=this,t=this.state.updateType,a=null==this.state.authorised&&null==this.state.deleted;return te("div",{className:"grid-container grid-title-control"},te("div",{className:"grid-container"},1==t&&te("div",{className:"regTabs"},te("button",{className:this.state.viewDashboard?"inactRegTab":"actRegTab",onClick:function(){return e.setState({viewDashboard:!1})}},"Account Details"),te("button",{className:this.state.viewDashboard?"actRegTab":"inactRegTab",onClick:function(){return e.setState({viewDashboard:!0})}},"Job Details")),this.state.viewDashboard?te("div",{className:"cell regDashboard"},te($,{ownerId:this.state.ownerId,navigate:function(t){return e.navigate(t)}})):te("div",{className:"cell RegForm"},te("h3",{className:"registrationHeading"}
1,"List your vehicle with Star Car Hire"),te("hr",null),te("h2",{className:"registrationDescription"},te("b",null,"PLEASE REVIEW AND CONFIRM YOUR DETAILS BELOW")),te("p",{className:"registrationDescription"},"We require the info below to provide automated quotes and present your vehicle to suitable hirers. We'll never publish your data online. * Required"),t>1&&a&&this.retruningOwnerMSG(),1==t&&this.state.dataLoaded&&this.state.vehicleDetail&&this.checkAllAuthorised(),this.getRemovebtn(t),te("form",{onSubmit:function(t){return e.handleSubmit(t)},autoComplete:"off"},te("input",{autoComplete:"false",name:"hidden",type:"text",style:{display:"none"}}),(null==t||1==t&&this.state.dataLoaded)&&te("div",null,te(y,{onChange:function(t){return e.onChange(t)},defaultValues:this.state,subscribe:this.state.subscribe,curAddress:this.state.curAddress}),null==this.state.authorised&&!this.state.isAdmin&&te(ee,{onChange:function(t){return e.onChange(t)},defaultValues:this.state}),this.state.isAdmin&&te(B,{onChange:function(t){return e.onChange(t)},defaultValues:this.state})),(null==t||2==t&&this.state.dataLoaded||3==t)&&te("div",null,this.state.isAdmin&&te(B,{onChange:function(t){return e.onChange(t)},defaultValues:this.state}),te(w,{windowInnerWidth:this.props.windowInnerWidth,onChange:function(t){return e.onChange(t)},defaultValues:this.state,reRegisteringUser:a,originalPricing:this.state.originalPricing}),te(k,{onChange:function(t){return e.onChange(t)},defaultValues:this.state,ut:t}),te(L,{onChange:function(t){return e.onChange(t)},defaultValues:this.state,removeVehicle:function(t,a){return e.removeVehiclePopup(t,a)}}),te(Z,{onChange:function(t){return e.onChange(t)},onImageChange:function(t){return e.onChangeImage(t)},defaultValues:this.state,images:this.state.images})),null==t&&te(O,{onChange:function(t){return e.onChange(t)},defaultValues:this.state}),te("div",{style:{display:"flex",flexDirection:"row",marginTop:"20px"}},this.state.loading?te("div",{className:"searchLoading",style:{marginLeft:"10px",minHeight:"auto",width:"auto"}},te(T.Z,{msg:"Submitting..."})):te("button",{type:"submit",className:"registerVehicleBtn",style:{fontWeight:"600",maxHeight:"70px",margin:"auto 0px"}},null==t?"Register Vehicle":3==t?"Add Vehicle":"Save Changes"),te("div",{style:{alignSelf:"center"}},!this.state.canSubmit&&te("p",{className:"registrationDescription",style:{margin:"0px 10px"}},"Please complete all necessary * Required fields"),!this.state.validFees&&te("p",{className:"registrationDescription",style:{margin:"0px 10px"}},te("a",{href:window.location.pathname+"#fees",style:{color:"#b33434"}},"Please check fees fields, invalid values")),1!=t&&(null==this.state.images||0==this.state.images.length)&&te("p",{className:"registrationDescription",style:{margin:"0px 10px"}},"Please upload an image of your vehicle"),!this.state.tc&&te("p",{className:"registrationDescription",style:{margin:"0px 10px"}},"Please agree to the terms and conditions before proceeding"))),1==t&&this.state.dataLoaded&&te(W,{windowInnerWidth:this.props.windowInnerWidth,vehicles:this.state.vehicleDetail,ownerId:this.props.owner,navigate:function(t){return e.navigate(t)},removeVehicle:function(t,a){return e.removeVehiclePopup(t,a)}}),this.state.formSubmitted&&te("div",{className:"popup"},te("div",{className:"popup-inner"},te("h5",null," Important Note "),te("br",null),this.getPopMSG(t),te("br",null),te("div",{className:"popup-buttons"},this.getOkbtn(),this.getCancelbtn())))))))}}]),a}(p.Component);(0,d.Z)(se,"displayName",se.name);var ne=(0,h.withRouter)(se)},7872:function(e,t,a){"use strict";a.d(t,{IC:function(){return c},dd:function(){return d},zf:function(){return p},yU:function(){return h},Bl:function(){return m},aB:function(){return f},lV:function(){return g},WN:function(){return v},Y7:function(){return y},xM:function(){return b},iT:function(){return x},X6:function(){return w},ji:function(){return C},cL:function(){return N},a6:function(){return D},cZ:function(){return k},qA:function(){return S},Le:function(){return V},FY:function(){return P},Lv:function(){return T},kR:function(){return E},Kn:function(){return R},rV:function(){return I},$d:function(){return L},yH:function(){return A},m4:function(){return M},Jx:function(){return H},PP:function(){return Z},ip:function(){return j},B7:function(){return F},J1:function(){return B},Rh:function(){return G},dn:function(){return q},sc:function(){return O},YP:function(){return _}});var i=/[!$%^*()\_=+{}[\];:@#~|<>
1~?"\\/]/,s=/[!%^&*()\_=+{}[\];:~|,<>~,.?" ]/,n=/[\u00A3\u00A6\u00AC\u20AC]/,l=/[A-aZ-z]/,r=/[A-Za-z0-9]/,o=/[A-aZ-z0-9 ]/,u=/[0-9]/,c={weekday:"long",year:"numeric",month:"long",day:"2-digit"},d={hour12:!0,hour:"numeric",minute:"numeric"},p="en-US",h="en-GB",m=0,f=20,g=100,v=200,y=500,b=1e3,x=1e18,w=99999999999999.98,C=0,N=1,D=100,k="^[0-9]+$",S=function(e){/[0-9.]/.test(e.key)||e.preventDefault()},V="(^[0-9]+$)|(^[0-9]+.[0-9]{2})",P=function(e){/[.0-9]/.test(e.key)||e.preventDefault()},T=function(e){o.test(e.key)||e.preventDefault()},E=function(e){r.test(e.key)||s.test(e.key)||n.test(e.key)||e.preventDefault()},R=function(e){l.test(e.key)||s.test(e.key)||e.preventDefault()},I=function(e){(i.test(e.key)||n.test(e.key)||u.test(e.key))&&e.preventDefault()},L="^[0-9]+",A="(^[aA-zZ0-9]{1})([aA-zZ0-9.!#$%&'*+/=?^_`{|}~-]+)+(@[aA-zZ0-9-]+){1}(.[aA-zZ]+){2}$",M="^[A-aZ-z][A-aZ-z0-9 ]+[A-aZ-z0-9]$",H=65,Z=1886,j=(new Date).getFullYear(),F="^[0-9]{4}$",B=15,G="^[a-zA-Z0-9]{1}[a-zA-Z0-9- ]+$",q=function(e){e.target.value.length>0?/[a-zA-Z0-9- ]/.test(e.key)||e.preventDefault():/[a-zA-Z0-9]/.test(e.key)||e.preventDefault()},O=function(e){(i.test(e.key)||n.test(e.key))&&e.preventDefault()},_=[{regex:/(\d{5})/,msg:"Please avoid using long sequences of numbers (i.e., '{numbers}')."},{regex:/(\d{4}\s+\d{4})/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/(\d{4}\s+\d{3})/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/(\d{4}\s+\d{2})/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/(\d{4}\s+\d)/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/(\d{3}\s+\d{3})/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/(\d{3}\s+\d{2})/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/(\d{3}\s+\d)/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/(\d{2}\s+\d{2}\s+\d{2})/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/(\d{2}\s+\d{2}\s+\d)/,msg:"Please avoid using long numbers or consecutive sequences (i.e., {numbers}')."},{regex:/(\d\s+\d\s+\d\s+\d)/,msg:"Please avoid using long numbers or consecutive sequences (i.e., '{numbers}')."},{regex:/[A][T]/,msg:"Please avoid using 'AT' (no email addresses allowed)."},{regex:/\b(gmail|hotmail|yahoo|outlook|icloud)\b(\s*\.\s*(com|co\s*\.\s*uk))?/i,msg:"Please avoid including email addresses or references to email providers."},{regex:/\b[a-z0-9]+(?:[._\-\\?])*?(com|net|org|io|gov|edu)\b|\b[a-z0-9]+(?:[._\-\\?])*?co\.uk\b/i,msg:"Please avoid including website URLs or domain names."}]},5617:function(e,t,a){"use strict";a.d(t,{BH:function(){return i},Rj:function(){return s},gG:function(){return n},G3:function(){return l},cH:function(){return r},Dx:function(){return o},mq:function(){return u},yw:function(){return c},HA:function(){return d},PU:function(){return p},iI:function(){return h},nQ:function(){return m},XE:function(){return f},mL:function(){return g},jI:function(){return v},pb:function(){return y},Z8:function(){return b},s7:function(){return x},iF:function(){return w},gA:function(){return C}});var i={1:"American Vehicles",2:"British & European Vehicles",3:"Other World Manufacturers"},s={"Ambulance, Fire & Rescue":1,"Boat & Aircraft":2,"Cool Classics":3,"Daily Drivers":4,"Famous TV & Movie Cars":5,"Hearses & Funeral Cars":6,"Iconic Taxis":7,Military:8,Miscellaneous:9,Modified:10,"Modern Sports & Prestige":11,Motorcycles:12,"Motorhomes, Caravans & Trailers":18,"Peculiar Cars":13,"Pickups, SUV & Off Road":14,Police:15,"Rally & Track":16,"Trucks, Vans & Buses":17},n={1:"Black",2:"Blue",3:"Brown",4:"Bronze",5:"Burgundy",6:"Cream",7:"Gold",8:"Green",9:"Grey",10:"Orange",11:"Other",12:"Pink",13:"Purple",14:"Red",15:"Silver",16:"Turquoise",17:"White",18:"Yellow"},l={1:"Concours/New",2:"Excellent",3:"Good",4:"Average",5:"Rough & Ready"},r={England:"England","Northern Ireland":"Northern Ireland","Republic of Ireland":"Republic of Ireland",Scotland:"Scotland",Wales:"Wales"},o={Mr:"Mr",Mrs:"Mrs",Miss:"Miss",Ms:"Ms",Dr:"Dr",Other:"Other"},u={0:"Not available",50:"50",100:"100",150:"150",200:"200",250:"250",300:"300",9999:"National"},c={1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:10,11:11},d="AIzaSyDoEIO9PN1XyQHOCWQRFIijLT6RJUDkZLY",p={language:"en",types:[],fields:["formatted_address","geometry.location","address_components","name"],componentRestrictions:{country:["GB","IE"]}},h={1:"false",2:"true",3:"null"},m={Outdoor:1,Indoor:2,Both:3},f={1:"false",2:"true",3:"null"},g={No:1,Yes:2,NA:3},v={ItineryPopup:1,VehicleDetailsPage:2,SearchPage:3},y=[{id:1,text:"No longer own vehicle"},{id:2,text:"Date(s) unavailable"},{id:8,text:"Outside standard working hours"}
1,{id:3,text:"Self-drive unavailable"},{id:4,text:"Too short notice"},{id:5,text:"Vehicle currently off the road"},{id:6,text:"Roundtrip mileage too high"},{id:7,text:"Risk of vehicle damage"},{id:9,text:"Vehicle unsuitable for event"},{id:10,text:"Not licensed/insured for event"},{id:11,text:"Date too far in advance"}],b=Object.fromEntries(y.map((function(e){return[e.id,e.text]}))),x=[{id:"Pushed",name:"Vehicle Pushed Into Place"},{id:"BatDiscon",name:"Battery Disconnected"},{id:"DripTray",name:"Provide Drip Trays"},{id:"MinFuel",name:"Minimal Fuel in Tank"},{id:"EmptyFuel",name:"Tank Fully Drained"},{id:"Locked",name:"Vehicle Locked"},{id:"Handbrake",name:"Handbrake Engaged"}],w={Created:1,Pending:2,Quoted:3,Accepted:4,RejectedOwner:5,Cancelled:6,Expired:7,NotOwned:8,Billed:9,Confirmed:10,BillingOnAccount:11,CustomerRejected:12,AwaitingEmailConfirmation:13,ExpiredClosed:14,ReEnquiring:15,SystemAction:16,UpdateOrder:18,AdminQuoted:19,NoResponse:20},C={Pending:2,Quoted:3,Booked:4,OwnerRejected:5,Cancelled:6,Expired:7,CustomerRejected:12,Closed:14}}}]);
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.