1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[800],{60888:function(e,n,a){var l=a(64836);n.Z=void 0;var r=l(a(64938)),t=a(85893);n.Z=(0,r.default)((0,t.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},52186:function(e,n,a){var l=a(82066),r=a(85893);n.Z=(0,l.Z)((0,r.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},45697:function(e,n,a){var l=a(82066),r=a(85893);n.Z=(0,l.Z)((0,r.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},32800:function(e,n,a){a.r(n),a.d(n,{default:function(){return G}});var l=a(47568);function r(e,n){return null!=n&&"undefined"!==typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n}var t,i=a(26042),o=a(69396),d=a(34051),s=a.n(d),u=a(85893),c=a(67294),p=a(87600),v=a(38777),m=a(49108),h=a(62461),y=a(52601),x=a(35618),b=a(7613),f=a(44876),g=function(e){var n,a,l,r,t,d,s,v,g,T,j,C,L,A,k,D,B,P,z,V,I,N,E,S,M=e.onNext,U=(0,m.w)(),w=U.formData,R=U.updateFormData,Z=U.updateProgress,q=U.settings,G=(0,c.useState)({lat:null===(n=w.parentDealer)||void 0===n?void 0:n.lat,lng:null===(a=w.parentDealer)||void 0===a?void 0:a.lng}),F=G[0],W=G[1],H=(0,x.RJ)((null===(l=w.parentDealer)||void 0===l?void 0:l.name)||"",[x.z2.required("Dealer/Shop name")]),J=(0,x.RJ)((null===(r=w.parentDealer)||void 0===r?void 0:r.url)||"",[x.z2.url()]),K=(0,x.RJ)((0,h.Cx)(null===(t=w.parentDealer)||void 0===t?void 0:t.phone)||"",[x.z2.required("Business phone"),x.z2.phone()]),Y=(0,x.RJ)((null===(d=w.parentDealer)||void 0===d?void 0:d.address)||"",[x.z2.required("Business address")]),O=(0,x.RJ)((null===(s=w.parentDealer)||void 0===s?void 0:s.address2)||"",[]),$=(0,x.RJ)((null===(v=w.parentDealer)||void 0===v?void 0:v.city)||"",[x.z2.required("City")]),_=(0,x.RJ)((null===(g=w.parentDealer)||void 0===g?void 0:g.state)||"",[x.z2.required("State"),x.z2.state()]),Q=(0,x.RJ)((null===(T=w.parentDealer)||void 0===T?void 0:T.zip)||"",[x.z2.required("ZIP code"),x.z2.zip()]),X=(0,x.QZ)({name:H,url:J,phone:K,address:Y,address2:O,city:$,state:_,zip:Q}),ee=(0,c.useRef)({name:H,url:J,phone:K,address:Y,address2:O,city:$,state:_,zip:Q});(0,c.useEffect)((function(){ee.current={name:H,url:J,phone:K,address:Y,address2:O,city:$,state:_,zip:Q}}),[H,J,K,Y,O,$,_,Q]),(0,c.useEffect)((function(){w.parentDealer&&(ee.current.name.setValue(w.parentDealer.name||""),ee.current.url.setValue(w.parentDealer.url||""),ee.current.phone.setValue((0,h.Cx)(w.parentDealer.phone)||""),ee.current.address.setValue(w.parentDealer.address||""),ee.current.address2.setValue(w.parentDealer.address2||""),ee.current.city.setValue(w.parentDealer.city||""),ee.current.state.setValue(w.parentDealer.state||""),ee.current.zip.setValue(w.parentDealer.zip||""))}),[w.parentDealer]);var ne=function(){var e;X.validateForm()&&(R({parentDealer:{name:H.value,url:J.value||void 0,phone:K.value,address:Y.value,address2:null!==(e=O.value)&&void 0!==e?e:void 0,city:$.value,state:_.value,zip:Q.value,lat:F.lat,lng:F.lng}}),Z({dealerInfoCompleted:!0}),M())};return(0,u.jsxs)(p.Box,{sx:{mt:2},children:[(0,u.jsx)(p.Typography,{variant:"body1",sx:{mb:3},children:(null===q||void 0===q||null===(j=q.dealerInfo)||void 0===j?void 0:j.description)||"Please provide information about your dealership or shop."}),(0,u.jsxs)(p.Grid,{container:!0,spacing:2,children:[(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"dealer-name",label:(null===q||void 0===q||null===(C=q.dealerInfo)||void 0===C?void 0:C.dealerNameLabel)||"Dealer/Shop Name",value:H.value,onChange:function(e){return H.setValue(e.target.value)},error:!!H.error,helperText:H.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,id:"dealer-website",label:(null===q||void 0===q||null===(L=q.dealerInfo)||void 0===L?void 0:L.dealerWebsiteLabel)||"Website URL (Optional)",type:"url",placeholder:"https://domain.com",value:J.value,onChange:function(e){return J.setValue(e.target.value)},error:!!J.error,helperText:J.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"dealer-phone",label:(null===q||void 0===q||null===(A=q.dealerInfo)||void 0===A?void 0:A.dealerPhoneLabel)||"Business Phone",value:K.value,type:"tel",placeholder:"(000) 000-0000",InputLabelProps:{shrink:!0},InputProps:{inputComponent:y.Z},onChange:function(e){return K.setValue(e.target.value)},error:!!K.error,helperText:K.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(f.Z,{value:Y.value,onChange:function(e){return Y.setValue(e)},onAddressSelect:function(e){ee.current.address.setValue(e.street),ee.current.address2.setValue(String(e.street2||"")),ee.current.city.setValue(e.city),ee.current.state.setValue(e.state),ee.current.zip.setValue(e.zip),W({lat:e.lat,lng:e.lng})},label:(null===q||void 0===q||null===(k=q.dealerInfo)||void 0===k?void 0:k.dealerAddressLabel)||"Business Address",required:!0,error:!!Y.error,helperText:Y.error||void 0,placeholder:(null===q||void 0===q||null===(D=q.dealerInfo)||void 0===D?void 0:D.dealerAddressPlaceholder)||""})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,id:"dealer-address2",label:(null===q||void 0===q||null===(B=q.dealerInfo)||void 0===B?void 0:B.dealerAddress2Label)||"Address Line 2 (Optional)",value:O.value,onChange:function(e){return O.setValue(e.target.value)}})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,sm:5,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"dealer-city",label:(null===q||void 0===q||null===(P=q.dealerInfo)||void 0===P?void 0:P.dealerCityLabel)||"City",value:$.value,onChange:function(e){return $.setValue(e.target.value)},error:!!$.error,helperText:$.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:6,sm:3,children:(0,u.jsxs)(p.FormControl,{fullWidth:!0,required:!0,error:!!_.error,children:[(0,u.jsx)(p.Select,{labelId:"dealer-state-label",id:"dealer-state",value:_.value,label:(null===q||void 0===q||null===(z=q.dealerInfo)||void 0===z?void 0:z.dealerStateLabel)||"State",onCh
1ange:function(e){return _.setValue(e.target.value)},children:(null===q||void 0===q||null===(V=q.dealerInfo)||void 0===V?void 0:V.states)&&q.dealerInfo.states.length>0?q.dealerInfo.states.map((function(e){return(0,u.jsx)(p.MenuItem,{value:e.value,children:e.label},e.value)})):null===q||void 0===q||null===(I=q.availableCountries)||void 0===I||null===(N=I[0])||void 0===N||null===(E=N.states)||void 0===E?void 0:E.map((function(e){return(0,u.jsx)(p.MenuItem,{value:e.value,children:e.text},e.value)}))}),_.error&&(0,u.jsx)(p.FormHelperText,{children:_.error})]})}),(0,u.jsx)(p.Grid,{item:!0,xs:6,sm:4,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"dealer-zip",label:(null===q||void 0===q||null===(S=q.dealerInfo)||void 0===S?void 0:S.dealerZipLabel)||"ZIP Code",value:Q.value,onChange:function(e){return Q.setValue(e.target.value)},error:!!Q.error,helperText:Q.error})})]}),(0,u.jsx)(p.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3},children:(null===q||void 0===q?void 0:q.nextButton)&&"string"!==typeof(null===q||void 0===q?void 0:q.nextButton)?(0,u.jsx)(b.Z,(0,o.Z)((0,i.Z)({standAlone:!0,isMobile:!1},null===q||void 0===q?void 0:q.nextButton),{onClick:ne,disabled:!X.isValid})):(0,u.jsx)(p.Button,{variant:"contained",color:"primary",onClick:ne,disabled:!X.isValid,children:"Next"})})]})},T=function(e){var n,a,l,r,t,d,s,v=e.onNext,f=(0,m.w)(),g=f.formData,T=f.updateFormData,j=f.updateProgress,C=f.settings,L=(0,x.RJ)((null===(n=g.adminUser)||void 0===n?void 0:n.name)||"",[x.z2.required("Name")]),A=(0,x.RJ)((null===(a=g.adminUser)||void 0===a?void 0:a.email)||"",[x.z2.required("Email"),x.z2.email()]),k=(0,x.RJ)((0,h.Cx)(null===(l=g.adminUser)||void 0===l?void 0:l.phone)||"",[x.z2.required("Phone number"),x.z2.phone()]),D=(0,x.QZ)({name:L,email:A,phone:k}),B=(0,c.useRef)({name:L,email:A,phone:k});(0,c.useEffect)((function(){B.current={name:L,email:A,phone:k}}),[L,A,k]),(0,c.useEffect)((function(){g.adminUser&&(B.current.name.setValue(g.adminUser.name||""),B.current.email.setValue(g.adminUser.email||""),B.current.phone.setValue((0,h.Cx)(g.adminUser.phone)||""))}),[g.adminUser]);var P=function(){D.validateForm()&&(T({adminUser:{name:L.value,email:A.value,phone:k.value}}),j({adminUserCompleted:!0}),v())};return(0,u.jsxs)(p.Box,{sx:{mt:2},children:[(0,u.jsx)(p.Typography,{variant:"body1",sx:{mb:3},children:(null===C||void 0===C||null===(r=C.adminUser)||void 0===r?void 0:r.description)||"Please provide information about the person who will administer the dealer account."}),(0,u.jsxs)(p.Grid,{container:!0,spacing:2,children:[(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"admin-name",label:(null===C||void 0===C||null===(t=C.adminUser)||void 0===t?void 0:t.adminNameLabel)||"Owner/Manager Name",value:L.value,onChange:function(e){return L.setValue(e.target.value)},error:!!L.error,helperText:L.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"admin-email",type:"email",label:(null===C||void 0===C||null===(d=C.adminUser)||void 0===d?void 0:d.adminEmailLabel)||"Owner/Manager Email",value:A.value,onChange:function(e){return A.setValue(e.target.value)},error:!!A.error,helperText:A.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"admin-phone",label:(null===C||void 0===C||null===(s=C.adminUser)||void 0===s?void 0:s.adminPhoneLabel)||"Owner/Manager Phone",value:k.value,type:"tel",placeholder:"(000) 000-0000",InputLabelProps:{shrink:!0},InputProps:{inputComponent:y.Z},onChange:function(e){return k.setValue(e.target.value)},error:!!k.error,helperText:k.error})})]}),(0,u.jsx)(p.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3},children:(null===C||void 0===C?void 0:C.nextButton)&&"string"!==typeof(null===C||void 0===C?void 0:C.nextButton)?(0,u.jsx)(b.Z,(0,o.Z)((0,i.Z)({standAlone:!0,isMobile:!1},null===C||void 0===C?void 0:C.nextButton),{onClick:P,disabled:!D.isValid})):(0,u.jsx)(p.Button,{variant:"contained",color:"primary",onClick:P,disabled:!D.isValid,children:"Next"})})]})},j=function(e){var n=e.value,a=e.onChange,l=e.label;
1return(0,u.jsxs)(p.FormControl,{component:"fieldset",sx:{mb:3},fullWidth:!0,children:[(0,u.jsx)(p.FormLabel,{component:"legend",children:l||"Payment Type"}),(0,u.jsxs)(p.RadioGroup,{row:!0,"aria-label":"payment-type",name:"payment-type",value:n,onChange:function(e){a(e.target.value)},children:[(0,u.jsx)(p.FormControlLabel,{value:v.LL.PAYPAL.value,control:(0,u.jsx)(p.Radio,{}),label:v.LL.PAYPAL.label}),(0,u.jsx)(p.FormControlLabel,{value:v.LL.ACH.value,control:(0,u.jsx)(p.Radio,{}),label:v.LL.ACH.label}),(0,u.jsx)(p.FormControlLabel,{value:v.LL.CHECK.value,control:(0,u.jsx)(p.Radio,{}),label:v.LL.CHECK.label})]})]})},C=function(e){var n=e.initialValues,a=e.onChange,l=e.title,r=e.emailLabel,t=(0,c.useState)(!1),i=t[0],o=t[1],d=(0,x.RJ)(n.paypalEmail||"",[x.z2.required("PayPal email"),x.z2.email()]);(0,c.useEffect)((function(){a({paypalEmail:d.value})}),[d.value,a]);return(0,u.jsxs)(p.Box,{sx:{mb:3},children:[(0,u.jsx)(p.Typography,{variant:"h6",sx:{mb:2},children:l||"PayPal Information"}),(0,u.jsx)(p.Grid,{container:!0,spacing:2,children:(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"paypal-email",type:"email",label:r||"PayPal Email",value:d.value,onChange:function(e){return d.setValue(e.target.value)},onBlur:function(){o(!0)},error:i&&!!d.error,helperText:i&&d.error})})})]})},L=a(52186),A=a(45697),k=function(e){var n=e.initialValues,a=e.onChange,l=e.title,r=e.bankNameLabel,t=e.accountTypeLabel,i=e.routingNumberLabel,o=e.accountNumberLabel,d=(0,c.useState)(!1),s=d[0],m=d[1],h=(0,x.RJ)(n.achBankName||"",[x.z2.required("Bank name")]),y=(0,x.RJ)(n.achRoutingNumber||"",[x.z2.required("Routing number"),x.z2.routingNumber()]),b=(0,x.RJ)(n.achAccountNumber||"",[x.z2.required("Account number"),x.z2.accountNumber()]),f=(0,c.useState)(n.achAccountType||"checking"),g=f[0],T=f[1];(0,c.useEffect)((function(){a({achBankName:h.value,achRoutingNumber:y.value,achAccountNumber:b.value,achAccountType:g})}),[h.value,y.value,b.value,g,a]);return(0,u.jsxs)(p.Box,{sx:{mb:3},children:[(0,u.jsx)(p.Typography,{variant:"h6",sx:{mb:2},children:l||"ACH Direct Deposit Information"}),(0,u.jsxs)(p.Grid,{container:!0,spacing:2,children:[(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"ach-bank-name",label:r||"Bank Name",value:h.value,onChange:function(e){return h.setValue(e.target.value)},error:!!h.error,helperText:h.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsxs)(p.FormControl,{fullWidth:!0,required:!0,children:[(0,u.jsx)(p.InputLabel,{id:"account-type-label",children:t||"Account Type"}),(0,u.jsx)(p.Select,{labelId:"account-type-label",id:"account-type",value:g,onChange:function(e){var n=e.target.value;T(n)},label:t||"Account Type",children:v.W0.map((function(e){return(0,u.jsx)(p.MenuItem,{value:e.value,children:e.label},e.value)}))})]})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,sm:6,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"ach-routing-number",label:i||"Routing Number",value:y.value,onChange:function(e){return y.setValue(e.target.value)},error:!!y.error,helperText:y.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,sm:6,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"ach-account-number",label:o||"Account Number",value:b.value,onChange:function(e){return b.setValue(e.target.value)},type:s?"text":"password",error:!!b.error,helperText:b.error,endAdornment:(0,u.jsx)(p.IconButton,{"aria-label":"toggle password visibility",onClick:function(){return m(!s)},onMouseDown:function(e){e.preventDefault()},edge:"end",children:s?(0,u.jsx)(L.Z,{}):(0,u.jsx)(A.Z,{})})})})]})]})},D=function(e){var n,a,l,r,t,i,o=e.initialValues,d=e.onChange,s=e.parentDealerAddress,v=e.title,m=e.payableToLabel,h=e.mailingAddressTitle,y=e.sameAsBusinessLabel,b=e.nameLabel,f=e.addressLabel,g=e.address2Label,T=e.cityLabel,j=e.stateLabel,C=e.zipLabel,L=(0,c.useState)(!1),A=L[0],k=L[1],D=(0,x.RJ)(o.checkPayableTo||"",[x.z2.required("Check payable to")]),B=(0,x.RJ)((null===(n=o.checkMailingAddress)||void 0===n?void 0:n.name)||"",A?[]:[x.z2.required("Name")]),P=(0,x.RJ)((null===(a=o.checkMailingAddress)||void 0===a?void 0:a.address)||"",A?[]:[x.z2.required("Address")]),z=(0,x.RJ)((null===(l=o.checkMailingAddress)||void 0===l?void 0:l.address2)||"",[]),V=(0,x.RJ)((null===(r=o.checkMailingAddress)||void 0===r?void 0:r.city)||"",A?[]:[x.z2.required("City")]),I=(0,x.RJ)((null===(t=o.checkMailingAddress)||void 0===t?void 0:t.state)||"",A?[]:[x.z2.required("State"),x.z2.state()]),N=(0,x.RJ)((null===(i=o.checkMailingAddress)||void 0===i?void 0:i.zip)||"",A?[]:[x.z2.required("ZIP code"),x.z2.zip()]);return(0,c.useEffect)((function(){A&&s&&(B.setValue(s.name||""),P.setValue(s.address||""),z.setValue(s.address2||""),V.setValue(s.city||""),I.setValue(s.state||""),N.setValue(s.zip||""))}),[A,s,B.setValue,P.setValue,z.setValue,V.setValue,I.setValue,N.setValue,P,z,V,B,I,N]),(0,c.useEffect)((function(){d({checkPayableTo:D.value,checkMailingAddress:{name:B.value,address:P.value,address2:z.value,city:V.value,state:I.value.toUpperCase(),zip:N.value}})}),[D.value,B.value,P.value,z.value,V.value,I.value,N.value,d]),(0,u.jsxs)(p.Box,{sx:{mb:3},children:[(0,u.jsx)(p.Typography,{variant:"h6",sx:{mb:2},children:v||"Check Payment Information"}),(0,u.jsxs)(p.Grid,{container:!0,spacing:2,children:[(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"check-payable-to",label:m||"Check Payable To",value:D.value,onChange:function(e){return D.setValue(e.target.value)},error:!!D.error,helperText:D.error})}),(0,u.jsxs)(p.Grid,{item:!0,xs:12,children:[(0,u.jsx)(p.Typography,{variant:"subtitle1",sx:{mb:1,mt:2},children:h||"Mailing Address"}
1),(0,u.jsx)(p.FormControlLabel,{control:(0,u.jsx)(p.Checkbox,{checked:A,onChange:function(e){return k(e.target.checked)}}),label:y||"Same as Business Address"})]}),!A&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"check-name",label:b||"Name",value:B.value,onChange:function(e){return B.setValue(e.target.value)},error:!!B.error,helperText:B.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"check-address",label:f||"Address",value:P.value,onChange:function(e){return P.setValue(e.target.value)},error:!!P.error,helperText:P.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.TextField,{fullWidth:!0,id:"check-address2",label:g||"Address Line 2 (Optional)",value:z.value,onChange:function(e){return z.setValue(e.target.value)}})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,sm:5,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"check-city",label:T||"City",value:V.value,onChange:function(e){return V.setValue(e.target.value)},error:!!V.error,helperText:V.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:6,sm:3,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"check-state",label:j||"State",value:I.value,onChange:function(e){return I.setValue(e.target.value.toUpperCase())},inputProps:{maxLength:2},error:!!I.error,helperText:I.error})}),(0,u.jsx)(p.Grid,{item:!0,xs:6,sm:4,children:(0,u.jsx)(p.TextField,{fullWidth:!0,required:!0,id:"check-zip",label:C||"ZIP Code",value:N.value,onChange:function(e){return N.setValue(e.target.value)},error:!!N.error,helperText:N.error})})]})]})]})},B=function(e){var n,a,l,r,t,d,s,h,y,x,f,g,T,L,A,B,P,z,V,I,N,E,S,M,U,w,R,Z,q,G,F,W,H,J,K,Y,O,$,_,Q,X,ee,ne=e.onNext,ae=(0,m.w)(),le=ae.formData,re=ae.updateFormData,te=ae.updateProgress,ie=ae.progress,oe=ae.settings,de=(0,c.useState)(le.paymentType||v.LL.PAYPAL.value),se=de[0],ue=de[1],ce=(0,c.useState)({paypalEmail:le.paymentType===v.LL.PAYPAL.value&&le.paymentTypeDetails&&le.paymentTypeDetails.paypalEmail||""}),pe=ce[0],ve=ce[1],me=(0,c.useState)({achBankName:le.paymentType===v.LL.ACH.value&&le.paymentTypeDetails&&le.paymentTypeDetails.achBankName||"",achAccountType:le.paymentType===v.LL.ACH.value&&le.paymentTypeDetails&&le.paymentTypeDetails.achAccountType||"checking",achRoutingNumber:le.paymentType===v.LL.ACH.value&&le.paymentTypeDetails&&le.paymentTypeDetails.achRoutingNumber||"",achAccountNumber:le.paymentType===v.LL.ACH.value&&le.paymentTypeDetails&&le.paymentTypeDetails.achAccountNumber||""}),he=me[0],ye=me[1],xe=(0,c.useState)({checkPayableTo:le.paymentType===v.LL.CHECK.value&&le.paymentTypeDetails&&le.paymentTypeDetails.checkPayableTo||"",checkMailingAddress:{name:le.paymentType===v.LL.CHECK.value&&le.paymentTypeDetails&&(null===(n=le.paymentTypeDetails.checkMailingAddress)||void 0===n?void 0:n.name)||"",address:le.paymentType===v.LL.CHECK.value&&le.paymentTypeDetails&&(null===(a=le.paymentTypeDetails.checkMailingAddress)||void 0===a?void 0:a.address)||"",address2:le.paymentType===v.LL.CHECK.value&&le.paymentTypeDetails&&(null===(l=le.paymentTypeDetails.checkMailingAddress)||void 0===l?void 0:l.address2)||"",city:le.paymentType===v.LL.CHECK.value&&le.paymentTypeDetails&&(null===(r=le.paymentTypeDetails.checkMailingAddress)||void 0===r?void 0:r.city)||"",state:le.paymentType===v.LL.CHECK.value&&le.paymentTypeDetails&&(null===(t=le.paymentTypeDetails.checkMailingAddress)||void 0===t?void 0:t.state)||"",zip:le.paymentType===v.LL.CHECK.value&&le.paymentTypeDetails&&(null===(d=le.paymentTypeDetails.checkMailingAddress)||void 0===d?void 0:d.zip)||""}}),be=xe[0],fe=xe[1],ge=(0,c.useState)(!1),Te=ge[0],je=ge[1],Ce=ie.paymentTypeCompleted,Le=(0,c.useState)({paymentType:se,paypalDetails:pe,achDetails:he,checkDetails:be}),Ae=Le[0],ke=Le[1];(0,c.useEffect)((function(){ke({paymentType:se,paypalDetails:pe,achDetails:he,checkDetails:be})}),[he,be,se,pe]),(0,c.useEffect)((function(){Ce||Ae.paymentType}),[se,Ae,Ce]),(0,c.useEffect)((function(){var e=!1;switch(se){case v.LL.PAYPAL.value:e=!!pe.paypalEmail;break;case v.LL.ACH.value:e=!!(he.achBankName&&he.achRoutingNumber&&/^\d{9}$/.test(he.achRoutingNumber)&&he.achAccountNumber&&/^\d+$/.test(he.achAccountNumber));break;case v.LL.CHECK.value:e=!(!be.checkPayableTo||!(le.parentDealer||be.checkMailingAddress.name&&be.checkMailingAddress.address&&be.checkMailingAddress.city&&be.checkMailingAddress.state&&/^[A-Z]{2}$/.test(be.checkMailingAddress.state)&&be.checkMailingAddress.zip&&/^\d{5}(-\d{4})?$/.test(be.checkMailingAddress.zip)))}je(e)}),[se,pe,he,be,le.parentDealer]);var De=(0,c.useCallback)((function(e){ue(e)}),[]),Be=function(){var e=se===v.LL.PAYPAL.value?pe:se===v.LL.ACH.value?he:be;re({paymentType:se,paymentTypeDetails:e}),te({paymentTypeCompleted:!0}),ne()};return(0,u.jsxs)(p.Box,{sx:{mt:2},children:[(0,u.jsx)(p.Typography,{variant:"body1",sx:{mb:3},children:(null===oe||void 0===oe||null===(s=oe.paymentType)||void 0===s?void 0:s.description)||"Please select how you would like to receive payments."}),(0,u.jsx)(j,{value:se,onChange:De,label:(null===oe||void 0===oe||null===(h=oe.paymentType)||void 0===h?void 0:h.paymentTypeLabel)||"Payment Type"}),se===v.LL.PAYPAL.value&&(0,u.jsx)(C,{initialValues:pe,onChange:ve,title:null===oe||void 0===oe||null===(y=oe.paymentType)||void 0===y||null===(x=y.paypal)||void 0===x?void 0:x.title,emailLabel:null===oe||void 0===oe||null===(f=oe.paymentType)||void 0===f||null===(g=f.paypal)||void 0===g?void 0:g.emailLabel}),se===v.LL.ACH.value&&(0,u.jsx)(k,{initialValues:he,onChange:ye,title:null===oe||void 0===oe||null===(T=oe.paymentType)||void 0===T||null===(L=T.ach)||void 0===L?void 0:L.title,bankNameLabel:null===oe||void 0===oe||null===(A=oe.paymentType)||void 0===A||null===(B=A.ach)||void 0===B?void 0:B.bankNameLabel,accountTypeLabel:null===oe||void 0===oe||null===(P=oe.paymentType)||void 0===P||null===(z=P.ach)||void 0===z?void 0:z.accountTypeLabel,routingNumberLabel:null===oe||void 0===oe||null===(V=oe.paymentType)||void 0===V||null===(I=V.ach)||void 0===I?void 0:I.routingNumberLabel,accountNumberLabel:null===oe||void 0===oe||null===(N=oe.paymentType)||void 0===N||null===(E=N.ach)||void 0===E?void 0:E.accountNumberLabel}),se===v.LL.CHECK.value&&(0,u.jsx)(D,{initialValues:be,onChange:fe,parentDealerAddress:le.parentDealer,title:null===oe||void 0===oe||null===(S=oe.paymentType)||void 0===S||null===(M=S.check)||void 0===M?void 0:M.title,payableToLabel:null===oe||void 0===oe||null===(U=oe.paymentType)||void 0===U||null===(w=U.check)||void 0===w?void 0:w.payableToLabel,mailingAddressTitle:null===oe||void 0===oe||null===(R=oe.paymentType)||void 0===R||null===(Z=R.check)||void 0===Z?void 0:Z.mailingAddressTitle,sameAsBusinessLabel:null===oe||void 0===oe||null===(q=oe.paymentType)||void 0===q||null===(G=q.check)||void 0===G?void 0:G.sameAsBusinessLabel,nameLabel:null===oe||void 0===oe||null===(F=oe.paymentType)||void 0===F||null===(W=F.check)||void 0===W?void 0:W.nameLabel,addressLabel:null===oe||void 0===oe||null===(H=oe.paymentType)||void 0===H||null===(J=H.check)||void 0===J?void 0:J.addressLabel,address2Label:null===oe||void 0===oe||null===(K=oe.paymentType)||void 0===K||null===(Y=K.check)||void 0===Y?void 0:Y.address2Label,cityLabel:null===oe||void 0===oe||null===(O=oe.paymentType)||void 0===O||null===($=O.check)||void 0===$?void 0:$.cityLabel,stateLabel:null===oe||void 0===oe||null===(_=oe.paymentType)||void 0===_||null===(Q=_.check)||void 0===Q?void 0:Q.stateLabel,zipLabel:null===oe||void 0===oe||null===(X=oe.paymentType)||void 0===X||null===(ee=X.check)||void 0===ee?void 0:ee.zipLabel}),(0,u.jsx)(p.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3},children:(null===oe||void 0===oe?void 0:oe.nextButton)&&"string"!==typeof(null===oe||void 0===oe?void 0:oe.nextButton)?(0,u.jsx)(b.Z,(0,o.Z)((0,i.Z)({standAlone:!0,isMobile:!1},null===oe||void 0===oe?void 0:oe.nextButton),{onClick:Be,disabled:!Te})):(0,u.jsx)(p.Button,{variant:"contained",color:"primary",onClick:Be,disabled:!Te,children:"Next"})})]})},P=a(5814),z=a(86099),V=function(e){var n,a,l,r=e.onNext,t=(0,m.w)(),d=t.updateProgress,s=t.settings,v=t.progress,h=(0,c.useState)(v.termsAccepted||!1),y=h[0],x=h[1];(0,c.useEffect)((function(){x(v.termsAccepted||!1)}),[v.termsAccepted]),(0,c.useEffect)((function(){var e=setTimeout((function(){d({termsAccepted:y})}),100);return function(){return clearTimeout(e)}}),[y,d]);var f=function(){y&&(d({termsAccepted:!0}),r())};return(0,u.jsxs)(p.Box,{sx:{mt:2},children:[(0,u.jsx)(p.Typography,{variant:"body1",sx:{mb:3},children:(null===s||void 0===s||null===(n=s.terms)||void 0===n?void 0:n.description)||"Please review and accept the terms and conditions before continuing."}),(0,u.jsx)(p.Paper,{variant:"outlined",sx:{p:3,mb:3,maxHeight:"400px",overflow:"auto"},children:(null===s||void 0===s||null===(a=s.terms)||void 0===a?void 0:a.content)&&Array.isArray(s.terms.c
1ontent)&&(0,u.jsx)(P.YI,{value:s.terms.content,components:z.Z})}),(0,u.jsx)(p.FormControlLabel,{control:(0,u.jsx)(p.Checkbox,{checked:y,onChange:function(e){return x(e.target.checked)}}),label:(null===s||void 0===s||null===(l=s.terms)||void 0===l?void 0:l.checkboxLabel)||"I have read and agree to the Terms and Conditions"}),(0,u.jsx)(p.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3},children:(null===s||void 0===s?void 0:s.nextButton)&&"string"!==typeof(null===s||void 0===s?void 0:s.nextButton)?(0,u.jsx)(b.Z,(0,o.Z)((0,i.Z)({standAlone:!0,isMobile:!1},null===s||void 0===s?void 0:s.nextButton),{onClick:f,disabled:!y})):(0,u.jsx)(p.Button,{variant:"contained",color:"primary",onClick:f,disabled:!y,children:"Next"})})]})},I=function(e){var n,a,l,r,t,d,s,v,h,y,x,f=e.onSubmit,g=(0,m.w)(),T=g.formData,j=g.updateProgress,C=g.settings,L=g.progress,A=(0,c.useState)(L.ownerConfirmed||!1),k=A[0],D=A[1];(0,c.useEffect)((function(){D(L.ownerConfirmed||!1)}),[L.ownerConfirmed]);var B=function(e){return e?(0,u.jsxs)(p.Box,{children:[e.name&&(0,u.jsx)(p.Typography,{variant:"body2",children:e.name}),e.address&&(0,u.jsx)(p.Typography,{variant:"body2",children:e.address}),e.address2&&(0,u.jsx)(p.Typography,{variant:"body2",children:e.address2}),e.city&&e.state&&(0,u.jsx)(p.Typography,{variant:"body2",children:"".concat(e.city,", ").concat(e.state," ").concat(e.zip||"")})]}):null};return(0,u.jsxs)(p.Box,{sx:{mt:2},children:[(0,u.jsx)(p.Typography,{variant:"body1",sx:{mb:3},children:(null===C||void 0===C||null===(n=C.confirm)||void 0===n?void 0:n.description)||"Please review your information before submitting your dealer application."}),(0,u.jsx)(p.Paper,{variant:"outlined",sx:{p:3,mb:3},children:(0,u.jsxs)(p.Grid,{container:!0,spacing:3,children:[(0,u.jsxs)(p.Grid,{item:!0,xs:12,children:[(0,u.jsx)(p.Typography,{variant:"h6",gutterBottom:!0,children:(null===C||void 0===C||null===(a=C.dealerInfo)||void 0===a?void 0:a.title)||"Dealer Information"}),(0,u.jsxs)(p.Box,{sx:{ml:2},children:[(0,u.jsx)(p.Typography,{variant:"body1",fontWeight:"bold",children:(null===(l=T.parentDealer)||void 0===l?void 0:l.name)||""}),(null===(r=T.parentDealer)||void 0===r?void 0:r.url)&&(0,u.jsx)(p.Typography,{variant:"body2",sx:{mb:1},children:T.parentDealer.url}),T.parentDealer&&B({address:T.parentDealer.address,address2:T.parentDealer.address2,city:T.parentDealer.city,state:T.parentDealer.state,zip:T.parentDealer.zip}),(0,u.jsx)(p.Typography,{variant:"body2",sx:{mt:1},children:(null===(t=T.parentDealer)||void 0===t?void 0:t.phone)||""})]})]}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.Divider,{})}),(0,u.jsxs)(p.Grid,{item:!0,xs:12,children:[(0,u.jsx)(p.Typography,{variant:"h6",gutterBottom:!0,children:(null===C||void 0===C||null===(d=C.adminUser)||void 0===d?void 0:d.title)||"Admin User"}),(0,u.jsxs)(p.Box,{sx:{ml:2},children:[(0,u.jsx)(p.Typography,{variant:"body1",fontWeight:"bold",children:(null===(s=T.adminUser)||void 0===s?void 0:s.name)||""}),(0,u.jsx)(p.Typography,{variant:"body2",children:(null===(v=T.adminUser)||void 0===v?void 0:v.email)||""}),(0,u.jsx)(p.Typography,{variant:"body2",sx:{mt:1},children:(null===(h=T.adminUser)||void 0===h?void 0:h.phone)||""})]})]}),(0,u.jsx)(p.Grid,{item:!0,xs:12,children:(0,u.jsx)(p.Divider,{})}),(0,u.jsxs)(p.Grid,{item:!0,xs:12,children:[(0,u.jsx)(p.Typography,{variant:"h6",gutterBottom:!0,children:(null===C||void 0===C||null===(y=C.paymentType)||void 0===y?void 0:y.title)||"Payment Information"}),(0,u.jsxs)(p.Box,{sx:{ml:2},children:[(0,u.jsx)(p.Typography,{variant:"body1",children:function(){var e=T.paymentType,n=T.paymentTypeDetails;if(!e||!n)return"No payment information provided";switch(e){case"paypal":return"PayPal - ".concat(n.paypalEmail);case"ach":var a=n;return a.achAccountNumber?"ACH Direct Deposit - ".concat(a.achBankName," (Routing: ").concat(a.achRoutingNumber,", Account: xxxx").concat(a.achAccountNumber.slice(-3),")"):(0,u.jsx)(p.Typography,{variant:"body2",color:"error",children:"Missing - Edit Required"});case"check":return"Check - Payable to ".concat(n.checkPayableTo);default:return"Unknown payment type"}}()}),"check"===T.paymentType&&(0,u.jsxs)(p.Box,{sx:{mt:2},children:[(0,u.jsx)(p.Typography,{variant:"body2",fontWeight:"bold",gutterBottom:!0,children:"Mailing Address:"}),function(){if("check"!==T.paymentType||!T.paymentTypeDetails)return null;var e=T.paymentTypeDetails;return e.checkMailingAddress?B(e.checkMailingAddress):null}()]})]})]})]})}
1),(0,u.jsx)(p.FormControlLabel,{control:(0,u.jsx)(p.Checkbox,{checked:k,onChange:function(e){D(e.target.checked),j({ownerConfirmed:e.target.checked})}}),label:(null===C||void 0===C||null===(x=C.confirm)||void 0===x?void 0:x.ownerCheckboxLabel)||"I confirm that I am the owner/manager and all information provided is accurate."}),(0,u.jsx)(p.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3},children:(null===C||void 0===C?void 0:C.confirm.submitButton)&&"string"!==typeof(null===C||void 0===C?void 0:C.confirm.submitButton)?(0,u.jsx)(b.Z,(0,o.Z)((0,i.Z)({standAlone:!0,isMobile:!1},null===C||void 0===C?void 0:C.confirm.submitButton),{onClick:f,disabled:!k})):(0,u.jsx)(p.Button,{variant:"contained",color:"primary",onClick:f,disabled:!k,children:"Submit Application"})})]})},N=a(60888),E=a(41664),S=a.n(E),M=a(13779),U=function(){var e,n,a,l=(0,m.w)().settings;return(0,u.jsxs)(p.Paper,{variant:"outlined",sx:{p:4,textAlign:"center",maxWidth:"800px",mx:"auto",mt:4},children:[(0,u.jsx)(p.Box,{sx:{mb:3,display:"flex",justifyContent:"center"},children:(0,u.jsx)(N.Z,{sx:{fontSize:64,color:"success.main"}})}),(0,u.jsx)(p.Typography,{variant:"h4",component:"h1",gutterBottom:!0,children:(null===l||void 0===l||null===(e=l.success)||void 0===e?void 0:e.title)||"Application Submitted Successfully!"}),(0,u.jsx)(p.Box,{sx:{my:4,textAlign:"left"},children:(null===l||void 0===l||null===(n=l.success)||void 0===n?void 0:n.message)&&Array.isArray(l.success.message)?(0,u.jsx)(P.YI,{value:l.success.message,components:z.Z}):(0,u.jsx)(p.Typography,{variant:"body1",children:"Thank you for applying to be a TPC Dealer. Your application has been received and is being reviewed. We will contact you soon with more information about the next steps in the process."})}),(0,u.jsx)(S(),{href:M.Z.DEALER_HOME,passHref:!0,children:(0,u.jsx)(p.Button,{variant:"contained",color:"primary",sx:{mt:2},children:(null===l||void 0===l||null===(a=l.success)||void 0===a?void 0:a.returnButtonText)||"Return to Home"})})]})},w=a(51127);!function(e){e[e.DealerInfo=0]="DealerInfo",e[e.AdminUser=1]="AdminUser",e[e.PaymentType=2]="PaymentType",e[e.Terms=3]="Terms",e[e.Confirm=4]="Confirm"}(t||(t={}));var R=function(e){var n=e.children;return(0,u.jsxs)(p.Box,{sx:{display:"flex",alignItems:"center"},children:[(0,u.jsx)(p.Typography,{variant:"body2",sx:{mr:1,lineHeight:1.5,mt:.125},children:"\u2022"}),(0,u.jsx)(p.Typography,{variant:"body2",sx:{lineHeight:1.5},children:n})]})},Z=function(e){var n=e.items;return(0,u.jsx)(p.Box,{sx:{display:"flex",flexDirection:"column",gap:.5},children:n.map((function(e,n){return(0,u.jsx)(R,{children:e},n)}))})},q=function(e){var n=e.title,a=e.content,l=e.onEdit,r=e.editButton;return(0,u.jsxs)(p.Paper,{sx:{mb:2,border:"1px solid",borderColor:"divider",borderRadius:"4px",bgcolor:"background.paper",overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,u.jsxs)(p.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid",borderColor:"divider",backgroundColor:"grey.100",p:1},children:[(0,u.jsx)(p.Typography,{variant:"subtitle1",fontWeight:"bold",children:n}),r&&"string"!==typeof r?(0,u.jsx)(b.Z,(0,o.Z)((0,i.Z)({standAlone:!0,isMobile:!1},r),{onClick:l})):(0,u.jsx)(p.Button,{variant:"outlined",color:"primary",onClick:l,sx:{width:{xs:"100%",md:"auto"}},children:"Edit"})]}),(0,u.jsx)(p.Box,{sx:{p:2,pt:1.5,pb:2},children:a})]})},G=function(e){var n,a,i,o,d,y,x,b,f,j,C,L,A,k,D,P,z=e.setIsLoading,N=e.setOpenAlert,E=(0,m.w)(),S=E.formData,M=E.progress,R=E.settings,G=E.setIsSubmitting,F=E.error,W=E.setError,H=E.clearStoredSignupData,J=E.setSubmitSuccess,K=E.submitSuccess;(0,c.useEffect)((function(){z(!1)}),[z]);var Y=(0,c.useState)((function(){return function(e){var n=[{isApplicable:function(e){return!e.dealerInfoCompleted},step:t.DealerInfo},{isApplicable:function(e){return!e.adminUserCompleted},step:t.AdminUser},{isApplicable:function(e){return!e.paymentTypeCompleted},step:t.PaymentType},{isApplicable:function(e){return!e.termsAccepted},step:t.Terms}].find((function(n){return(0,n.isApplicable)(e)}));return n?n.step:t.Confirm}(M)})),O=Y[0],$=Y[1],_=function(){setTimeout((function(){$((function(e){return e===t.Confirm?e:e+1}))}),0)},Q=function(e){switch(e){case t.DealerInfo:return!0;case t.AdminUser:return M.dealerInfoCompleted;case t.PaymentType:return M.dealerInfoCompleted&&M.adminUserCompleted;case t.Terms:return M.dealerInfoCompleted&&M.adminUserCompleted&&M.paymentTypeCompleted;case t.Confirm:return M.dealerInfoCompleted&&M.adminUserCompleted&&M.paymentTypeCompleted&&M.termsAccepted;default:return!1}},X=function(e){var n=!1;switch(e){case t.DealerInfo:n=M.dealerInfoCompleted;break;case t.AdminUser:n=M.adminUserCompleted;break;case t.PaymentType:n=M.paymentTypeCompleted;break;case t.Terms:n=M.termsAccepted;break;case t.Confirm:n=M.ownerConfirmed}return{optional:n?(0,u.jsx)(p.Typography,{variant:"caption",color:"text.secondary",children:"Completed"}):void 0,completed:n}},ee=function(){var e=(0,l.Z)(s().mark((function e(){var n,a,l,t,i,o,d,u,c,p,v,m,y,x,b;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,G(!0),z(!0),x={parentDealer:{name:(null===(n=S.parentDealer)||void 0===n?void 0:n.name)||"",url:null===(a=S.parentDealer)||void 0===a?void 0:a.url,phone:(null===(l=S.parentDealer)||void 0===l?void 0:l.phone)||"",address:(null===(t=S.parentDealer)||void 0===t?void 0:t.address)||"",address2:null===(i=S.parentDealer)||void 0===i?void 0:i.address2,city:(null===(o=S.parentDealer)||void 0===o?void 0:o.city)||"",state:(null===(d=S.parentDealer)||void 0===d?void 0:d.state)||"",zip:(null===(u=S.parentDealer)||void 0===u?void 0:u.zip)||"",lat:null===(c=S.parentDealer)||void 0===c?void 0:c.lat,lng:null===(p=S.parentDealer)||void 0===p?void 0:p.lng},adminUser:{name:(null===(v=S.adminUser)||void 0===v?void 0:v.name)||"",email:(null===(m=S.adminUser)||void 0===m?void 0:m.email)||"",phone:(null===(y=S.adminUser)||void 0===y?void 0:y.phone)||""},paymentType:S.paymentType,paymentTypeDetails:(0,h.ks)(S.paymentTypeDetails)},e.next=7,(0,w.F0)(x);case 7:(b=e.sent).success?(J(!0),N({type:"success",message:"Dealer signup submitted successfully!",open:!0}),H()):(W(b.error||"An error occurred during submission"),N({type:"error",message:b.error||"An error occurred during submission",open:!0})),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),W(r(e.t0,Error)?e.t0.message:"An error occurred"),N({type:"error",message:r(e.t0,Error)?e.t0.message:"An error occurred",open:!0});case 15:return e.prev=15,G(!1),z(!1),e.finish(15);case 19:case"end":return e.stop()}}),e,null,[[0,11,15,19]])})));return function(){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){F&&N({type:"error",message:F,open:!0})}),[F,N]);var ne=[{key:v.$f,label:(null===R||void 0===R||null===(n=R.dealerInfo)||void 0===n?void 0:n.title)||"Dealer Information",component:(0,u.jsx)(g,{onNext:_}),isComplete:M.dealerInfoCompleted,summary:M.dealerInfoCompleted&&(0,u.jsx)(Z,{items:[null===(a=S.parentDealer)||void 0===a?void 0:a.name,null===(i=S.parentDealer)||void 0===i?void 0:i.phone,"".concat(null===(o=S.parentDealer)||void 0===o?void 0:o.address).concat((null===(d=S.parentDealer)||void 0===d?void 0:d.address2)?", ".concat(null===(y=S.parentDealer)||void 0===y?void 0:y.address2):"",", ").concat(null===(x=S.parentDealer)||void 0===x?void 0:x.city,", ").concat(null===(b=S.parentDealer)||void 0===b?void 0:b.state," ").concat(null===(f=S.parentDealer)||void 0===f?void 0:f.zip)].filter(
1Boolean)})},{key:v.wn,label:(null===R||void 0===R||null===(j=R.adminUser)||void 0===j?void 0:j.title)||"Admin User",component:(0,u.jsx)(T,{onNext:_}),isComplete:M.adminUserCompleted,summary:M.adminUserCompleted&&(0,u.jsx)(Z,{items:[null===(C=S.adminUser)||void 0===C?void 0:C.name,null===(L=S.adminUser)||void 0===L?void 0:L.email,null===(A=S.adminUser)||void 0===A?void 0:A.phone].filter(Boolean)})},{key:v.V7,label:(null===R||void 0===R||null===(k=R.paymentType)||void 0===k?void 0:k.title)||"Payment Information",component:(0,u.jsx)(B,{onNext:_}),isComplete:M.paymentTypeCompleted,summary:M.paymentTypeCompleted&&(0,u.jsx)(Z,{items:[S.paymentType&&S.paymentType.charAt(0).toUpperCase()+S.paymentType.slice(1)].filter(Boolean)})},{key:v.$U,label:(null===R||void 0===R||null===(D=R.terms)||void 0===D?void 0:D.title)||"Terms & Conditions",component:(0,u.jsx)(V,{onNext:_}),isComplete:M.termsAccepted,summary:M.termsAccepted&&(0,u.jsx)(Z,{items:["Accepted"]})},{key:v.vU,label:(null===R||void 0===R||null===(P=R.confirm)||void 0===P?void 0:P.title)||"Confirm & Submit",component:(0,u.jsx)(I,{onSubmit:ee}),isComplete:M.ownerConfirmed}];return K?(0,u.jsx)(U,{}):(0,u.jsxs)(p.Box,{sx:{maxWidth:"xl",mx:"auto"},children:[F&&(0,u.jsxs)(p.Box,{sx:{backgroundColor:"error.light",color:"error.contrastText",p:2,mb:2,borderRadius:1},children:[(0,u.jsx)(p.Typography,{variant:"body1",children:(null===R||void 0===R?void 0:R.errorMessageText)||"An error occurred. Please try again."}),(0,u.jsx)(p.Typography,{variant:"body2",children:F})]}),(0,u.jsxs)(p.Grid,{container:!0,spacing:3,children:[(0,u.jsx)(p.Grid,{item:!0,xs:12,md:3,sx:{display:{xs:"none",md:"block"}},children:(0,u.jsxs)(p.Box,{sx:{position:"sticky",top:24},children:[(0,u.jsx)(p.Typography,{variant:"h6",gutterBottom:!0,children:"Application Progress"}),ne.map((function(e,n){return e.isComplete&&e.summary&&(0,u.jsx)(q,{title:e.label,content:e.summary,onEdit:function(){return function(e){var n=e;(n<=O||n===O+1&&Q(n))&&$(n)}(n)},editButton:null===R||void 0===R?void 0:R.editButton},e.key)}))]})}),(0,u.jsx)(p.Grid,{item:!0,xs:12,md:9,xl:8,children:(0,u.jsx)(p.Stepper,{activeStep:O,orientation:"vertical",children:ne.map((function(e,n){return(0,u.jsxs)(p.Step,{completed:X(n).completed,children:[(0,u.jsx)(p.StepLabel,{optional:X(n).optional,sx:{"&:hover":Q(n)?{backgroundColor:"rgba(0, 0, 0, 0.04)",borderRadius:"4px"}:{}},children:e.label}),(0,u.jsx)(p.StepContent,{children:e.component})]},e.key)}))})})]})]})}}}]);
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.