1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4677],{14154:function(e,t,n){"use strict";var r=n(59499),i=n(67294),o=n(27856),a=n.n(o),s=n(9041),u=n(85490),l=n(667),c=n(47634),d=n(41120),p=n(71887),h=n(7512),m=n(69146),g=n(85893),f=(0,d.Z)((function(e){var t;return{editor:(t={},(0,r.Z)(t,e.breakpoints.down("sm"),{"&:hover":{"& .DraftEditor-editorContainer":{"&::before":{content:'""',position:"absolute",marginTop:-10,padding:5,color:"#8a8a8a",zIndex:0}}}}),(0,r.Z)(t,"borderRadius",e.shape.borderRadius),(0,r.Z)(t,"backgroundColor",e.palette.common.white),(0,r.Z)(t,"border","1px solid"),(0,r.Z)(t,"borderColor","rgba(0, 0, 0, 0.23)"),(0,r.Z)(t,"overflow","hidden"),(0,r.Z)(t,"& #mui-rte-container",{display:"flex",flexDirection:"column"}),(0,r.Z)(t,"& #mui-rte-editor",{padding:"0 16px",paddingBottom:"16px",overflow:"auto",maxHeight:"400px",minHeight:"200px",height:"100%"}),(0,r.Z)(t,"& .DraftEditor-editorContainer",(0,r.Z)({"&:hover::before":{content:'""',position:"absolute",marginTop:-10,padding:5,color:"#8a8a8a",zIndex:0}},e.breakpoints.down("sm"),{"&::before":{content:function(e){return e.isIOS&&!e.isValue?e.placeholder:'""'},position:"absolute",marginTop:-10,padding:5,color:"#8a8a8a",zIndex:0},"& > div":{zIndex:20,position:"relative",height:function(e){return e.isIOS&&165}}})),(0,r.Z)(t,"& #mui-rte-editor-container",{display:function(e){return e.isIOS&&"block !important"}}),(0,r.Z)(t,"& *::-webkit-scrollbar",{width:"4px",backgroundColor:"#E9ECEE",borderRadius:4}),(0,r.Z)(t,"& *::-webkit-scrollbar-thumb",{backgroundColor:"#C5CED5",borderRadius:4}),t),placeholder:{padding:"0 16px",marginTop:"54px",height:"100%",display:function(e){return e.isIOS&&"none"}}}}));t.Z=function(e){var t=e.label,n=e.displayError,r=e.input,o=r.value,d=r.onChange,b=e.meta,v=b.touched,x=b.error,w=e.placeholder,Z=v&&x||n,y=(0,s.convertFromHTML)(o).contentBlocks.length>0,j=f({isIOS:h.g,isValue:y,placeholder:w}),k=(0,i.useState)(),O=k[0],S=k[1],P=(0,i.useState)(""),D=P[0],q=P[1];return(0,i.useEffect)((function(){!D&&o&&q((0,p.B)(o))}),[o]),(0,g.jsx)(m.Z,{label:t,errorMessage:Z,error:!!Z,variant:"outlined",children:(0,g.jsx)(c.Z,{className:j.editor,children:(0,g.jsx)(l.Z,{classes:{placeHolder:j.placeholder},controls:["bold","italic","strikethrough","link","numberList","bulletList"],label:w,defaultValue:null!==D&&void 0!==D?D:"",onChange:function(e){S(e.getCurrentContent())},onBlur:function(){var e=(0,u.E)(O).replace(/</g,"<").replace(/>/g,">"),t=a().sanitize(e);d(null!==O&&void 0!==O&&O.hasText()?t:"")},error:!!Z})})})}},4677:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Y}});var r=n(59499),i=n(17674),o=n(67294),a=n(14416),s=n(13474),u=n(46887),l=n(94081),c=n(5208),d=n(7258),p=n(23763),h=(0,d.object)().shape({name:(0,d.string)().required("Company name is required"),email:p.Do,logo:(0,d.object)().nullable().required("Logo is required"),location_id:(0,d.string)().nullable().required("State is required")}),m=n(20073),g=n(44515),f=n(41749),b=n(28686),v=n(14154),x=n(91831),w=n(50029),Z=n(4730),y=n(87794),j=n.n(y),k=n(55162),O=n(4024),S=n(30585),P=n(95477),D=n(17812),q=n(47634),C=n(80366),E=n(20773),B=n(65082),M=n(71307),I=n.n(M),N=(0,n(41120).Z)((function(e){var t;return{logo:(t={width:300},(0,r.Z)(t,e.breakpoints.down(450),{width:"100%"}),(0,r.Z)(t,"height",200),(0,r.Z)(t,"position","relative"),(0,r.Z)(t,"display","flex"),(0,r.Z)(t,"justifyContent","center"),(0,r.Z)(t,"alignItems","center"),(0,r.Z)(t,"color",e.palette.primary.main),(0,r.Z)(t,"backgroundSize","cover"),(0,r.Z)(t,"backgroundPosition","center"),(0,r.Z)(t,"borderRadius","5px"),(0,r.Z)(t,"border","2px dashed ".concat(e.palette.primary.main)),t),deleteIcon:{position:"absolute",right:10,top:10,background:e.palette.error.main,borderRadius:"50%",boxShadow:e.shadows[0],"& .MuiSvgIcon-root":{color:e.palette.common.white}},button:{padding:"0 15px",color:e.palette.primary.main}}})),L=n(85893),R=["value","onChange"];function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?$(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=function(e){var t=e.input,n=t.value,r=t.onChange,i=(0,Z.Z)(t,R),a=e.meta,s=a.touched,u=a.error,l=e.disabled,c=e.helperText,d=e.onProcess,p=e.onComplete,h=e.onFail,m=e.setDisabledBtn,g=N(),f=(0,o.useState)(!1),b=f[0],v=f[1],x=(0,k.uI)({accept:"image/jpeg, image/png",maxSize:3145728,onDrop:function(){var e=(0,w.Z)(j().mark((function e(t){var n,i,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,d&&d(),v(!0),m(!0),e.next=6,E.Z.directUploadOne(t[0]);case 6:n=e.sent,i=n.origin,o=n.signed_id,r({url:URL.createObjectURL(i),signed_id:o}),p&&p(),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),console.log("err",e.t0),h&&h();case 17:return e.prev=17,v(!1),m(!1),e.finish(17);case 21:case"end":return e.stop()}}),e,null,[[0,13,17,21]])})));return function(t){return e.apply(this,arguments)}}(),onDropRejected:function(e){try{if("file-too-large"===e[0].errors[0].code)throw new B.Z("Photo size should be not more than 3Mb")}catch(u){h&&h()}}}),y=x.getRootProps,M=x.getInputProps,$=s&&u,T=!l||n,U=!l&&n,V=!!$||!!c,A=!b&&!n,F=$||c;return(0,L.jsxs)("section",{children:[T&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(O.Z,{onClick:y().onClick,className:g.logo,style:{backgroundImage:"url(".concat(null===n||void 0===n?void 0:n.url,")")},disabled:l,children:[A&&(0,L.jsx)(I(),{}),b&&(0,L.jsx)(P.Z,{disableShrink:!0}),U&&(0,L.jsx)(q.Z,{className:g.deleteIcon,children:(0,L.jsx)(D.Z,{onClick:function(e){e.stopPropagation(),e.preventDefault(),r(null)},size:"small",children:(0,L.jsx)(C.Z,{color:"inherit"})})})]}),(0,L.jsx)("input",z(z({},i),M()))]}),V&&(0,L.jsx)(S.Z,{error:!!$,children:F})]})},U=n(69146),V=n(16682),A=function(e){var t=e.isShowError,n=e.setDisabledBtn;return(0,L.jsxs)(f.Z,{container:!0,spacing:3,children:[(0,L.jsx)(f.Z,{item:!0,xs:12,children:(0,L.jsx)(g.Z,{id:"name",name:"name",label:"Dealer name",placeholder:"Dealer name",component:x.Z,required:!0})}),(0,L.jsx)(f.Z,{item:!0,xs:12,children:(0,L.jsx)(g.Z,{id:"location_id",name:"location_id",label:"State",placeholder:"State",component:b.Z,optionSettings:{key:V.l6.locations,loadOptions:E.Z.getLocations,deserialize:!0},required:!0})}),(0,L.jsx)(f.Z,{item:!0,xs:12,children:(0,L.jsx)(U.Z,{label:"Upload your company logo",required:!0,error:t,children:(0,L.jsx)(g.Z,{id:"logo",name:"logo",component:T,uploadFiles:E.Z.directUploadAll,required:!0,setDisabledBtn:n})})}),(0,L.jsx)(f.Z,{item:!0,xs:12,children:(0,L.jsx)(g.Z,{id:"email",name:"email",placeholder:"Email",label:"Email",component:x.Z,required:!0})}),(0,L.jsx)(f.Z,{item:!0,xs:12,children:(0,L.jsx)(g.Z,{id:"description",name:"description",label:"Description",component:v.Z,fullWidth:!0})})]})};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=(0,l.Z)({destroyOnUnmount:!1,shouldAsyncValidate:function(){return!0},asyncValidate:(0,m.aA)(h),onSubmit:function(e,t,n){(0,n.onNext)()}})((function(e){var t=e.handleSubmit,n=e.onNext,r=e.form,l=e.onBack,d=e.edit,p=e.paid,h=o.useState(!1),m=(0,i.Z)(h,2),g=m[0],f=m[1],b=(0,a.v9)((function(e){return(0,s.Z)(r)(e)})),v=(0,a.v9)((function(e){return(0,u.Z)(r)(e)})),x=!(null===b||void 0===b||!b.logo)&&v,w=!d||d&&!p;return(0,L.jsx)(c.Z,_(_({title:"Dealer information",onNext:n,handleSubmit:t,disabled:g},w&&{onBack:l}),{},{children:(0,L.jsx)(A,{isShowError:x,setDisabledBtn:f})}))}))},23763:function(e,t,n){"use strict";n.d(t,{n5:function(){return y},Do:function(){return b},v2:function(){return f},Bj:function(){return v},m7:function(){return Z},hG:function(){return x}});var r=n(7258),i=n(50029),o=n(87794),a=n.n(o),s=function(e,t){return 1===t?e:"".concat(e,"s")},u=function(e){return null===e||void 0===e||""===e};function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=t||"${path} must contain at least ${length} lowercase ".concat(s("letter",e));return this.test({name:"minLowercase",exclusive:!0,message:n,params:{length:e},test:function(t){return u(t)||(t.match(/[a-z]/g)||[]).length>=e}})}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=t||"${path} must contain at least ${length} uppercase ".concat(s("letter",e));return this.test({name:"minUppercase",exclusive:!0,message:n,params:{length:e},test:function(t){return u(t)||(t.match(/[A-Z]/g)||[]).length>=e}})}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=t||"${path} must contain at least ${length} ".concat(s("number",e));return this.test({name:"minNumber",exclusive:!0,message:n,params:{length:e},test:function(t){return u(t)||(t.match(/[0-9]/g)||[]).length>=e}})}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=t||"${path} must contain at least ${length} ".concat(s("symbol",e));return this.test({name:"minSymbol",exclusive:!0,message:n,params:{length:e},test:function(t){return u(t)||(t.match(/[^a-zA-Z0-9\s]/g)||[]).length>=e}})}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,t=arguments.length>1?arguments[1]:void 0,n=t||"${path} must not contain sequences of more than ${length} repeated ".concat(s("character",e));return this.test({name:"minRepeating",exclusive:!0,message:n,params:{length:e},test:function(t){return u(t)||!new RegExp("(.)\\1{".concat(e,",}")).test(t)}})}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,t=arguments.length>1?arguments[1]:void 0,n=t||"${path} must contain at least ${length} ".concat(s("word",e)),r=new RegExp("[a-zA-Z0-9]");return this.test({name:"minWords",exclusive:!0,message:n,params:{length:e},test:function(t){return u(t)||t.split(" ").filter((function(e){return!!e&&r.test(e)})).length>=e}})}function g(){return this.min(8).max(250).minLowercase(1).minUppercase(1).minNumbers(1).minSymbols(1)}(function(e){e.addMethod(e.string,"minLowercase",l),e.addMethod(e.string,"minUppercase",c),e.addMethod(e.string,"minNumber",d),e.addMethod(e.string,"minNumbers",d),e.addMethod(e.string,"minSymbol",p),e.addMethod(e.string,"minSymbols",p),e.addMethod(e.string,"minRepeating",h),e.addMethod(e.string,"minWords",m),e.addMethod(e.string,"password",g)}
1)(r),(0,r.addMethod)(r.string,"passwordConfirmation",(function(e){return this.test("passwordConfirmation",e,(function(e){var t=(null===this||void 0===this?void 0:this.parent).password;return!e&&!t||e===t}))})),(0,r.addMethod)(r.string,"phoneNumber",(function(e){return this.test("phoneNumber",e||"Phone number is invalid",(0,i.Z)(a().mark((function e(){var t,r,i,o=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=o.length>0&&void 0!==o[0]?o[0]:""){e.next=3;break}return e.abrupt("return",!0);case 3:return e.next=5,n.e(8005).then(n.bind(n,38005));case 5:if(i=e.sent.default,null!==(t=i(r,"AU"))&&void 0!==t&&t.isValid()){e.next=8;break}return e.abrupt("return",null);case 8:return e.abrupt("return",!!r.toString().trim());case 9:case"end":return e.stop()}}),e)}))))})),(0,r.addMethod)(r.string,"validateDate",(function(e){return this.test("validateDate",e||"Format is invalid",function(){var e=(0,i.Z)(a().mark((function e(t){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,n.e(9809).then(n.bind(n,99490));case 4:return r=e.sent,i=r.DateTime,e.abrupt("return",i.fromISO(t).isValid);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())})),(0,r.addMethod)(r.string,"integer",(function(){return this.matches(/^\d+$/,"The field should have digits only")})),(0,r.addMethod)(r.string,"validateYoutubeLink",(function(e){return this.test("validateYoutubeLink",e||"Youtube link is invalid",function(){var e=(0,i.Z)(a().mark((function e(t){var r,i,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,n.e(4329).then(n.bind(n,34329));case 4:return r=e.sent.default,i=r(t),o=i.service,e.abrupt("return","youtube"===o);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}));var f=(0,r.string)().required("Full name is required").max(255).trim(),b=((0,r.string)().required("First name is required"),(0,r.string)().required("Last name is required"),(0,r.string)().email("Invalid email").required("Email is required")),v=(0,r.string)().min(8,"Your password must have a minimum of 8 characters. Please try another.").max(50,"Your password must have a maximum of 50 characters. Please try another.").required("Password is required"),x=(0,r.string)().min(8,"Your password must have a minimum of 8 characters. Please try another.").max(50,"Your password must have a maximum of 50 characters. Please try another.").minLowercase(1).minUppercase(1).minNumber(1).required("Password is required"),w=/^[0-9()\- ]+$/,Z=(0,r.string)().test("validValue","Not valid phone number",(function(e){return w.test(e)})).test("validValue","The value cannot be more than 24 characters",(function(e){if((null===e||void 0===e?void 0:e.length)<=24)return!0})).nullable().required("Phone number is required"),y=((0,r.string)().nullable(),(0,r.string)().nullable());(0,r.string)().nullable(),(0,r.number)().nullable()},71887:function(e,t,n){"use strict";n.d(t,{B:function(){return o}});var r=n(9041),i=n(16682),o=function(e){if(!i.Qg)return"";var t=(0,r.convertFromHTML)(e),n=r.ContentState.createFromBlockArray(t.contentBlocks,t.entityMap);return JSON.stringify((0,r.convertToRaw)(n))}},13474:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e){var t=e.getIn;return function(e,n){return function(r){var i=n||function(e){return t(e,"form")};return t(i(r),e+".asyncErrors")}}}(n(83920).Z)},71307:function(e,t,n){var r=n(67294),i=n(87854),o=n(95348),a=new i({id:"cloud--sprite",use:"cloud--sprite-usage",viewBox:"0 0 40 33",content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 33" id="cloud--sprite"><path d="M13.099 25.115 20.004 32l6.905-6.885m-6.905-8.605V32" stroke="gray" stroke-linecap="round" stroke-linejoin="round" /><path d="M35.334 26.991a8.608 8.608 0 0 0 3.213-4.287 8.582 8.582 0 0 0 .05-5.351 8.606 8.606 0 0 0-3.132-4.346 8.648 8.648 0 0 0-5.103-1.66h-2.175a13.753 13.753 0 0 0-2.841-5.48 13.807 13.807 0 0 0-4.956-3.693 13.846 13.846 0 0 0-12.052.432A13.798 13.798 0 0 0 3.66 6.644a13.748 13.748 0 0 0-2.15 11.832 13.757 13.757 0 0 0 2.958 5.418" stroke="gray" stroke-linecap="round" stroke-linejoin="round" /></symbol>'});o.add(a);var s=a.viewBox?a.viewBox.split(" "):[],u=function(e){return r.createElement("svg",Object.assign({viewBox:a.viewBox,width:s[2],height:s[3]},e),r.createElement("use",{xlinkHref:"#"+a.id}))};u.viewBox=a.viewBox,u.width=s[2],u.height=s[3],u.id=a.id,u.content=a.content,u.url=a.url,u.toString=a.toString,e.exports=u,e.exports.default=u}}]); 2//# sourceMappingURL=4677.d53821c06454dffc.js.map
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.