1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9584,9782],{67151:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/wholesale",function(){return n(24249)}])},24249:function(e,l,n){"use strict";n.r(l),n.d(l,{__N_SSP:function(){return L}});var r=n(47568),i=n(26042),t=n(69396),a=n(97582),s=n(85893),o=n(80419),d=n(48641),u=n(18034),m=n(47741),c=n(82580);n(96486);var p=n(11163),x=n(67294),h=n(1451),f=n(9782),b=n(74231),Z=n(48046),g=n(27966),v=n(35119),y=n(98087),j=n(21949),N=n(75989),q=n(94017),C=n(1728),S=/^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/,w=b.Ry().shape({firstName:b.Z_().required("First Name is required"),lastName:b.Z_().nullable(),email:b.Z_().email("Must be a valid email").max(255).required("Email is required"),phoneNumber:b.Z_().required("Phone Number is required").matches(S,"Phone number is not valid"),companyName:b.Z_().required("Company Name is required"),companyAddress:b.Z_().nullable(),websites:b.Z_().nullable(),message:b.Z_().nullable(),IRS:b.Z_().nullable(),stateLicense:b.Z_().nullable(),resellerPermit:b.Z_().nullable()}),k=function(e){var l={},n=(null==e?void 0:e.fields)||[];return l.firstName=b.Z_().required("First Name is required"),l.lastName=b.Z_().nullable(),l.email=b.Z_().email("Must be a valid email").max(255).required("Email is required"),l.phoneNumber=b.Z_().required("Phone Number is required").matches(S,"Phone number is not valid"),l.companyName=b.Z_().required("Company Name is required"),l.companyAddress=b.Z_().nullable(),l.websites=b.Z_().nullable(),l.message=b.Z_().nullable(),l.IRS=b.Z_().nullable(),l.stateLicense=b.Z_().nullable(),l.resellerPermit=b.Z_().nullable(),n&&0!==n.length&&n.forEach(function(e){var n=e.required||e.mandatory;switch(e.name){case"firstName":l.firstName=n?b.Z_().required("First Name is required"):b.Z_().nullable();break;case"lastName":l.lastName=n?b.Z_().required("Last Name is required"):b.Z_().nullable();break;case"email":l.email=n?b.Z_().email("Must be a valid email").max(255).required("Email is required"):b.Z_().email("Must be a valid email").max(255).nullable();break;case"phoneNumber":l.phoneNumber=n?b.Z_().required("Phone Number is required").matches(S,"Phone number is not valid"):b.Z_().matches(S,"Phone number is not valid").nullable();break;case"companyName":l.companyName=n?b.Z_().required("Company Name is required"):b.Z_().nullable();break;case"companyAddress":l.companyAddress=n?b.Z_().required("Company Address is required"):b.Z_().nullable();break;case"websites":l.websites=n?b.Z_().required("Website is required"):b.Z_().nullable();break;case"message":l.message=n?b.Z_().required("License # is required"):b.Z_().nullable();break;case"IRS":l.IRS=n?b.Z_().required("W-9 form is required"):b.Z_().nullable();break;case"stateLicense":l.stateLicense=n?b.Z_().required("State License is required"):b.Z_().nullable();break;case"resellerPermit":l.resellerPermit=n?b.Z_().required("Sellers Permit is required"):b.Z_().nullable();break;default:l[e.name]=n?b.Z_().required("".concat(e.label||e.name," is required")):b.Z_().nullable()}}),b.Ry().shape(l)},I=function(){var e,l,n,b,S=(0,x.useState)({IRS:"",stateLicense:"",resellerPermit:""}),I=S[0],L=S[1],P=(0,x.useState)("buyer"),A=P[0],F=P[1],E=(0,x.useContext)(j.Z).phonePrefix,R=(0,x.useState)(E),T=R[0],D=R[1],M=(0,x.useContext)(y.Z).cms,U=(0,o.pm)(),z=(0,p.useRouter)(),B=(null==M?void 0:null===(e=M.wholesale)||void 0===e?void 0:e.sections)?null==M?void 0:null===(l=M.wholesale)||void 0===l?void 0:l.sections[0]:{title:{text:"Whole Sale"}},W=(0,q.Z)("name","phoneNumber",null==B?void 0:B.fields),V=(0,q.Z)("name","companyName",null==B?void 0:B.fields),K=(0,q.Z)("name","companyAddress",null==B?void 0:B.fields),O=(0,q.Z)("name","websites",null==B?void 0:B.fields),H=(0,q.Z)("name","message",null==B?void 0:B.fields),X=(0,q.Z)("name","IRS",null==B?void 0:B.fields),$=(0,q.Z)("name","stateLicense",null==B?void 0:B.fields),J=(0,q.Z)("name","resellerPermit",null==B?void 0:B.fields),Y=null==B?void 0:B.tabConfig,Q=function(e){return e&&(e.required||e.mandatory)},G=(b=(0,r.Z)(function(e){var l,n;return(0,a.__generator)(this,function(r){switch(r.label){case 0:return Object.keys(l=(0,i.Z)({}
1,e,I)).forEach(function(e){""===l[e]&&delete l[e]}),l.phone_prefix=T||E,[4,v.Z.wholesaleMessage(l,A=(null==Y?void 0:Y.showTabs)?A:null)];case 1:return(n=r.sent()).success?(U({title:n.message,status:"success",duration:3e3,isClosable:!0,position:"top-right"}),z.push("/")):U({title:"failed to send request",status:"info",duration:3e3,isClosable:!0,position:"top-right"}),[2]}})}),function(e){return b.apply(this,arguments)});return(0,s.jsxs)(d.xu,{children:[(0,s.jsx)(f.default,(0,i.Z)({},B)),(null==Y?void 0:Y.showTabs)&&(0,s.jsx)(d.xu,{mb:6,children:(0,s.jsxs)(u.mQ,{defaultIndex:0,variant:"enclosed",colorScheme:"brand.400",onChange:function(e){return F(0===e?"buyer":"seller")},children:[(0,s.jsxs)(u.td,(0,t.Z)((0,i.Z)({bg:"#f5f6f7",rounded:"md",p:"1",justifyContent:"center",maxW:"400px",mx:"auto",border:"none"},null==Y?void 0:Y.tabSettings),{children:[(0,s.jsxs)(u.OK,(0,t.Z)((0,i.Z)({rounded:"md",_selected:{bg:"brand.400",color:"#fff",shadow:"sm"},width:"50%",fontSize:"md",color:"primary",gap:2},null==Y?void 0:Y.buyTabSettings),{children:[(0,s.jsx)(h.tU0,{}),null==Y?void 0:Y.buyerLabel]})),(0,s.jsxs)(u.OK,(0,t.Z)((0,i.Z)({rounded:"md",_selected:{bg:"brand.400",color:"#fff",shadow:"sm"},width:"50%",fontSize:"md",color:"primary",gap:2},null==Y?void 0:Y.sellTabSettings),{children:[(0,s.jsx)(h.FqC,{}),null==Y?void 0:Y.sellerLabel]}))]})),(0,s.jsxs)(u.nP,{children:[(0,s.jsx)(u.x4,{p:0,children:(0,s.jsx)(d.xv,{textAlign:"center",mt:4,children:"Submit your wholesale buying request"})}),(0,s.jsx)(u.x4,{p:0,children:(0,s.jsx)(d.xv,{textAlign:"center",mt:4,children:"Apply to become a wholesale seller"})})]})]})}),(0,s.jsx)(c.J9,{initialValues:{phoneNumber:"",firstName:"",lastName:"",email:"",companyName:"",companyAddress:"",websites:"",message:"",IRS:"",stateLicense:"",resellerPermit:""},validationSchema:(null==B?void 0:null===(n=B.fields)||void 0===n?void 0:n.length)?k(B):w,onSubmit:function(e){G(e)},children:function(e){var l=e.handleSubmit,n=(e.handleChange,e.setFieldValue);return(0,s.jsx)("form",{onSubmit:l,children:(0,s.jsxs)(d.Kq,{spacing:{sm:"3",md:"6",lg:"8"},padding:{sm:"1rem 0",md:"2rem"},children:[(0,s.jsxs)(d.kC,{flexDir:{sm:"column",md:"row"},alignItems:{sm:"center",md:"start"},gap:"16px",children:[(0,s.jsx)(Z.Z,{label:null,padding:"1.5rem",placeholder:"First Name".concat(Q((0,q.Z)("name","firstName",null==B?void 0:B.fields))?" *":""),type:"text",errorBorderColor:"red.300",name:"firstName",paddingLeft:{sm:"26px"},height:{sm:"40px"}}),(0,s.jsx)(Z.Z,{label:null,padding:"1.5rem",placeholder:"Last Name".concat(Q((0,q.Z)("name","lastName",null==B?void 0:B.fields))?" *":""),type:"text",paddingLeft:{sm:"26px"},errorBorderColor:"red.300",name:"lastName",height:{sm:"40px"}})]}),(0,s.jsxs)(d.kC,{flexDir:{sm:"column",md:"row"},alignItems:{sm:"center",md:"Start"},gap:"16px",children:[(0,s.jsx)(Z.Z,{label:null,padding:"1.5rem",placeholder:"Email".concat(Q((0,q.Z)("name","email",null==B?void 0:B.fields))?" *":""),type:"text",errorBorderColor:"red.300",name:"email",paddingLeft:{sm:"26px"},height:{sm:"40px"}}),W&&(0,s.jsx)(Z.Z,(0,i.Z)({label:null,padding:"1.5rem",placeholder:"Phone Number".concat(Q(W)?" *":""),type:"tel",paddingLeft:{sm:"26px"},errorBorderColor:"red.300",name:"phoneNumber",suffix:(0,s.jsx)(N.Z,{defaultCode:(0,C.Z)(T||E),handleChange:function(e){D(e)}}),height:{sm:"40px"}},W))]}),(0,s.jsxs)(d.kC,{flexDir:{sm:"column",md:"row"},alignItems:{sm:"center",md:"Start"},gap:"16px",children:[V&&(0,s.jsx)(Z.Z,(0,i.Z)({label:null,padding:"1.5rem",placeholder:"Company Name".concat(Q(V)?" *":""),type:"text",errorBorderColor:"red.300",name:"companyName",paddingLeft:{sm:"26px"},height:{sm:"40px"}},V)),K&&(0,s.jsx)(Z.Z,(0,i.Z)({label:null,padding:"1.5rem",placeholder:"Company Address".concat(Q(K)?" *":""),type:"text",paddingLeft:{sm:"26px"},errorBorderColor:"red.300",name:"companyAddress",height:{sm:"40px"}},K))]}),(0,s.jsxs)(d.kC,{flexDir:{sm:"column",md:"row"},alignItems:{sm:"center",md:"Start"},gap:"16px",children:[O&&(0,s.jsx)(Z.Z,(0,i.Z)({label:null,padding:"1.5rem",placeholder:"Website".concat(Q(O)?" *":""),type:"text",paddingLeft:{sm:"26px"},errorBorderColor:"red.300",name:"websites",height:{sm:"40px"}},O)),H&&(0,s.jsx)(Z.Z,(0,i.Z)({label:null,padding:"1.5rem",placeholder:"License #".concat(Q(H)?" *":""),type:"text",paddingLeft:{sm:"26px"}
1,errorBorderColor:"red.300",name:"message",height:{sm:"40px"}},H))]}),(0,s.jsxs)(d.kC,{width:"100%",flexDir:{sm:"column",md:"row"},alignItems:{sm:"center",md:"Start"},gap:"16px",children:[X&&(0,s.jsx)(g.Z,(0,i.Z)({onUpload:function(e){L(function(l){return(0,t.Z)((0,i.Z)({},l),{IRS:e})}),n("IRS",e)},label:"Complete & Upload W-9".concat(Q(X)?" *":""),fileExtension:"image/*, application/pdf ,.pdf",filetype:"Image",maxFiles:"1"},X)),$&&(0,s.jsx)(g.Z,(0,i.Z)({onUpload:function(e){L(function(l){return(0,t.Z)((0,i.Z)({},l),{stateLicense:e})}),n("stateLicense",e)},label:"Attach Your State License".concat(Q($)?" *":""),fileExtension:"image/*,.pdf , application/pdf",filetype:"Image",maxFiles:"5"},$))]}),J&&(0,s.jsx)(g.Z,(0,i.Z)({onUpload:function(e){L(function(l){return(0,t.Z)((0,i.Z)({},l),{resellerPermit:e})}),n("resellerPermit",e)},label:"Attach Your Sellers Permit".concat(Q(J)?" *":""),fileExtension:"image/*,.pdf ,application/pdf",filetype:"Image",maxFiles:"5"},J)),(0,s.jsx)(d.Kq,{spacing:"6",children:(0,s.jsx)(m.zx,{height:{sm:"40px"},type:"submit",variant:"primary",children:"Send Message"})})]})})}})]})},L=!0;l.default=I},27966:function(e,l,n){"use strict";var r=n(47568),i=n(26042),t=n(69396),a=n(99534),s=n(10253),o=n(29815),d=n(97582),u=n(85893),m=n(48641),c=n(95868),p=n(83234),x=n(35610),h=n(20979),f=n(47741),b=n(67294),Z=n(38074),g=n(35119),v=n(98087),y=n(82580);l.Z=function(e){var l,n,j=e.label,N=(e.filetype,e.fileExtension),q=e.maxFiles,C=e.onUpload,S=void 0===C?function(){}:C,w=(0,a.Z)(e,["label","filetype","fileExtension","maxFiles","onUpload"]),k=(0,b.useContext)(v.Z).cms,I=(0,b.useState)(!1),L=I[0],P=I[1],A=(0,s.Z)((0,y.U$)(w),2),F=(A[0],A[1]),E=(0,y.u6)(),R=E.submitCount;E.setFieldTouched;var T,D=(0,b.useState)([]),M=D[0],U=D[1],z=(0,b.useCallback)((T=(0,r.Z)(function(e){var l;return(0,d.__generator)(this,function(n){switch(n.label){case 0:return P(!0),[4,g.Z.uploadMultipleFile(e)];case 1:return(l=n.sent())&&S(l.url),U(function(l){return(0,o.Z)(l).concat((0,o.Z)(e))}),P(!1),[2]}})}),function(e){return T.apply(this,arguments)}),[]),B=(0,Z.uI)({onDrop:z,maxFiles:"".concat(void 0===q?1:q),accept:"".concat(N)}),W=B.acceptedFiles,V=B.getRootProps,K=B.getInputProps,O=Array.isArray(null==k?void 0:null===(l=k.globals)||void 0===l?void 0:l.inputVariant)&&k.globals.inputVariant.length>0?k.globals.inputVariant[0].customInputSettings:{},H=W.map(function(e){return(0,u.jsx)(m.HC,{border:"1px",borderColor:"gray.200",rounded:"md",ps:2,backgroundColor:"white",children:(0,u.jsxs)(m.kC,{justifyContent:"space-between",children:[(0,u.jsx)(m.xv,{p:.5,children:e.path}),(0,u.jsx)(c.P,{onClick:function(){U(M.filter(function(l){return l.path!==e.path})),S("")}})]})},e.path)}),X=!!F.error&&(F.touched||R>0);return(0,u.jsx)("div",{style:{width:"100%"},children:(0,u.jsxs)(p.NI,{isInvalid:X,children:[j&&(0,u.jsx)(m.xv,{mb:{sm:"3",md:"6"},variant:"inputLabel",children:j}),(null==M?void 0:M.length)?(0,u.jsx)(m.aV,{children:H}):(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(m.kC,(0,t.Z)((0,i.Z)({align:"center",justify:"center",borderRadius:"4px",border:"0.5px solid",borderColor:"color",w:"100%",minH:"100px",cursor:"pointer"},null==O?void 0:O.dragUploadFileSetting,V({className:"dropzone"})),{children:L?(0,u.jsx)(x.$,{}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(h.II,(0,i.Z)({name:"media",type:"file",accept:"image/x-png,image/gif,image/jpeg,application/pdf,application/vnd.ms-excel",label:j},K()))," ",(0,u.jsx)(f.zx,{variant:"no-hover",py:12,children:(0,u.jsx)(m.xv,{color:"gray.400",px:12,variant:"pageTextDim",children:"Drag & Drop or Click here to upload"})})]})}))}),(0,u.jsx)(p.J1,(0,t.Z)((0,i.Z)({fontSize:"xs"},null==O?void 0:O.ErrorMessageSettings),{children:"string"==typeof F.error?F.error:null===(n=F.error)||void 0===n?void 0:n.message}))]})})}},9782:function(e,l,n){"use strict";n.r(l);var r=n(26042),i=n(69396),t=n(85893),a=n(48641),s=n(47741),o=n(11163);n(67294);var d=function(e){var l=e.title,n=e.preTitle,d=e.subTitle,u=e.settings,m=e.button,c=e.description,p=(0,o.useRouter)();return(0,t.jsxs)(a.Kq,(0,i.Z)((0,r.Z)({justifyContent:"center",alignItems:"center",padding:{sm:"24px 0 0 0",md:"32px 0 0 0"},textAlign:"center",spacing:2,width:"100%"},u),{children:[(null==n?void 0:n.text)&&(0,t.jsx)(a.xv,{variant:"preTitle",style:n.settings,children:n.text}),(null==l?void 0:l.text)&&(0,t.jsx)(a.X6,(0,i.Z)((0,r.Z)({as:"p",textAlign:{sm:"center",md:"left"},size:"md",style:(0,r.Z)({},null==l?void 0:l.settings)},null==l?void 0:l.settings),{fontWeight:"700",children:l.text})),(null==d?void 0:d.text)&&(0,t.jsx)(a.xv,(0,i.Z)((0,r.Z)({variant:"description",style:d.settings},null==d?void 0:d.settings),{children:d.text})),c&&(null==c?void 0:c.text)&&(0,t.jsx)(a.xv,(0,i.Z)((0,r.Z)({width:"100%",variant:"detail"},null==c?void 0:c.settings),{children:(0,t.jsx)("p",{style:{width:"100%"},dangerouslySetInnerHTML:{__html:null==c?void 0:c.text}})})),(null==m?void 0:m.text)&&(0,t.jsx)(s.zx,(0,i.Z)((0,r.Z)({onClick:function(){return p.push(null==m?void 0:m.link)},variant:(null==m?void 0:m.variant)||"primary"},null==m?void 0:m.settings),{children:null==m?void 0:m.text}))]}))};l.default=d},94017:function(e,l,n){"use strict";function r(e,l,n){return!((null==n?void 0:n.length)>0)||_.find(n,function(n){return n[e]===l&&n})}n.d(l,{Z:function(){return r}})}},function(e){e.O(0,[9570,8074,9774,2888,179],function(){return e(e.s=67151)}),_N_E=e.O()}]);
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.