1import{j as e,L as d,bP as g,v as j,eR as S,F as w,eS as N,b as I,u as F,q as D,J as k,C as l,o as B,p as O,x as U,G as L,eT as R,cm as T,B as E}from"./index-2CwtICst.js";import{P as q}from"./privacy_disclaimer-DCDugmUg.js";import{P as z}from"./phone_number_component-C1gt8jI4.js";import{P as A}from"./password_component-BaevmVrj.js";import{E as W}from"./email_component-BsN06P9k.js";import{F as $}from"./full_name_component-D2qgUq7f.js";import{v as G}from"./form_utils-BRD3em_d.js";import{s as a}from"./input_styles.module-DexRyFjS.js";import{W as H}from"./whatsapp_optin_component-CGyRXcK1.js";import{A as J}from"./auth_header-Rrk6WMha.js";import{a as V}from"./signup_now-DYMWbpio.js";import{u as M}from"./use_redirect_if_user_exists-tCZRMN9n.js";import{C as K}from"./index-B1EyPq4z.js";import"./CheckOutlined-BXgii8XF.js";import"./CloseOutlined-DrYqvwGF.js";import"./index-DdKyALA4.js";import"./css-CG3sgCP8.js";import"./DialogWrap-DDRffVA8.js";import"./Portal-m7W4unkL.js";import"./getScrollBarSize-CHB1zEd-.js";import"./useId-BeW6vcu-.js";import"./signup_utils-Daz7t_aI.js";import"./Skeleton-DmHcwJm8.js";import"./index-DaN20Aem.js";import"./Dropdown-CSDSyzzq.js";import"./PlusOutlined-ByZyTB3m.js";const Q=[{label:"0 Days",value:0},{label:"15 Days",value:15},{label:"30 Days",value:30},{label:"60 Days",value:60}];function X(){return e.jsx(d,{prefix:e.jsx(S,{className:a.icon}),component:g,options:Q,required:!0,name:"credit_period",label:"What credit period can you offer your customers?",placeholder:"1 Month",wrapperClassName:a.labeledInput,validate:G([{test:j.required,message:"Credit Period is required"}])})}function Y(){return e.jsx(d,{prefix:e.jsx(N,{className:a.icon}),component:w,size:"large",name:"instant_payment_discount",label:"What discount percentage can you offer to customers who can make immediate payment?",placeholder:"0",wrapperClassName:a.labeledInput})}const Z="_authContainer_1xw0o_10",P="_authenticationCard_1xw0o_14",v="_form_1xw0o_46",tt="_submitButton_1xw0o_55",s={authContainer:Z,authenticationCard:P,form:v,submitButton:tt};function Ft(){const r=I(),[h]=F(),o=D(h),{search:_}=k(),[f,t]=M(),x=async(n,p)=>{p.setSubmitting(!0);const b={...n,phone:`+91${n.phone}`,utm_params:JSON.stringify(f),preferences:{whatsapp:n.whatsapp_optin,insights_whatsapp_optin:n.whatsapp_optin},invite_uuid:t==null?void 0:t.invite_uuid,application_uuid:t==null?void 0:t.application_uuid,application_type:o.next==="payments"?"payments":(t==null?void 0:t.application_type)||null},{data:u}=await R({payload:b});if(u){const{uuid:m,otp_uuid:c,masked_phone:C}=u;if(m){T({uuid:m});const i=o.next?`/auth/phone_verification?next=${o.next}`:"/auth/phone_verification";r(i,{state:{phone:t==null?void 0:t.phone_number}})}else if(c){E({uuid:c,maskedPhone:C});const i=o.next?`/auth/otp_verify${_}`:"/auth/otp_verify";r(i)}}p.setSubmitting(!1)},y=(o==null?void 0:o.next)==="payments";return e.jsxs(l,{direction:"vertical",size:"large",className:s.authContainer,children:[e.jsx(K,{className:s.authenticationCard,children:e.jsxs(l,{direction:"vertical",size:"large",children:[e.jsx(J,{title:"Sign up to continue",showBackAction:!1}),e.jsx("div",{style:{textAlign:"left"},children:e.jsx(B,{initialValues:{email:((t==null?void 0:t.email)||"").trim(),full_name:t==null?void 0:t.full_name,phone:(t==null?void 0:t.phone)||(t==null?void 0:t.phone_number),whatsapp_opt_in:t==null?void 0:t.whatsapp_opt_in},onSubmit:x,children:e.jsxs(O,{noValidate:!0,className:s.form,children:[e.jsx($,{}),e.jsx(W,{readOnly:t==null?void 0:t.invite_uuid}),e.jsx(z,{readOnly:(t==null?void 0:t.phone)||(t==null?void 0:t.phone_number)}),e.jsx(H,{}),e.jsx(A,{strongPassword:!0,showForgotSection:!1}),y&&e.jsxs(e.Fragment,{children:[e.jsx(X,{}),e.jsx(Y,{})]}),e.jsx(U,{Component:L,size:"large",id:"b_signup_submit",className:s.submitButton,children:"SIGN UP"})]})})}),e.jsx(q,{})]})}),e.jsx(V,{})]})}export{Ft as Component};
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.