(self.webpackChunkspayee_micro_frontend=self.webpackChunkspayee_micro_frontend||[]).push([[5408],{2044:function(e,t,a){"use strict";a.d(t,{c:function(){return i}});var n=a(58702),o=a(96540);const i=()=>o.createElement("div",{className:"flex items-center my-7 justify-center"},o.createElement("span",{className:"border-[0.5px] border-darkSlate03 flex-1"}),o.createElement(n.o,{size:"CAPTION",className:"px-4"},"Or"),o.createElement("span",{className:"border-[0.5px] border-darkSlate03 flex-1"}))},33448:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return pe}});var n=a(49456),o=a(64557),i=a(62371),r=a(38080),s=a(71884),l=a(41999),c=a(86162),u=a(27893),d=a(76063),m=a(46942),p=a.n(m),f=a(96540),E=a(56347),g=a(77399),_=a(33919),b=a(32035),h=a(16128),v=a(50772),N=a(74036),S=a(89707),C=a(14622),T=a(90952),w=function(){const[e]=(0,S.i)(),t=e,a=t?.org?.extraInfo?.countryCode?.toLowerCase()??"in",n=new URLSearchParams(window.location.search).get("phone")||"",o=t?.emailWOAlias||(0,C.n4)(n);return f.createElement(T.lV,{initialValues:{phone:o},validate:e=>{let t={};return e.phone||(t.phone="Enter a valid mobile"),t},onSubmit:async e=>{if(e.phone){const t={phone:e.phone};try{const{data:e}=await h.F.account.update(null,{formData:JSON.stringify(t)});if(!e.response)return void g.oR.error(e?.message??(0,u.U)(e.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER});window.parent.location.href="/s/mycourses",window.parent.history.replaceState(null,"","/s/mycourses")}catch(e){g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})}}},render:({handleSubmit:e,submitting:t,dirty:o})=>f.createElement("form",{onSubmit:e},f.createElement("div",{className:"justify-between"},f.createElement("div",{className:"w-full"},f.createElement(v.Ay,{name:"phone",placeholder:"",label:"Enter your phone number",className:"",validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,labelCss:b.A.lable_css,countryCode:a}))),f.createElement("div",{className:"mt-2 mb-6"},f.createElement(_.A,{type:N.II.SUBMIT,disabled:!n&&(t||!o),isLoading:t,onClick:e,className:"w-full"},"Next")))})},y=a(31387),O=a(15685),A=a(55843),R=function({email:e}){return f.createElement(f.Fragment,null,f.createElement("div",{className:p()("justify-between",b.A.forgot_email)},f.createElement("div",{className:b.A.icon_div},f.createElement("div",{className:b.A.icon},f.createElement(A.A,{"aria-hidden":"true",icon:O.OgW}))),f.createElement(y.A,{className:b.A.title},"Check your inbox"),f.createElement("div",{className:b.A.sub_title_div},f.createElement(y.A,null,"We’ve sent you a link to reset your password to"," ",e||"example@gmail.com"))))},I=a(37875),P=a(77129),k=a(74736),L=a.n(k);function x(e){return f.createElement("div",{className:"mr-3",style:"sm"===e.type?{marginLeft:"3px"}:{marginLeft:"3px",fontSize:"18px"}},f.createElement(A.A,{icon:I.aUl,"aria-hidden":!0}))}function U(){return f.createElement("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.18 8.68324C16.18 8.11597 16.1291 7.57051 16.0345 7.04688H8.5V10.1414H12.8055C12.62 11.1414 12.0564 11.9887 11.2091 12.556V14.5632H13.7945C15.3073 13.1705 16.18 11.1196 16.18 8.68324Z",fill:"#4285F4"}),f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.49968 16.4956C10.6597 16.4956 12.4706 15.7793 13.7942 14.5574L11.2088 12.5502C10.4924 13.0302 9.57604 13.3138 8.49968 13.3138C6.41604 13.3138 4.6524 11.9065 4.02331 10.0156H1.35059V12.0884C2.66695 14.7029 5.3724 16.4956 8.49968 16.4956Z",fill:"#34A853"}),f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.02364 10.019C3.86364 9.53898 3.77273 9.02625 3.77273 8.49898C3.77273 7.9717 3.86364 7.45898 4.02364 6.97898V4.90625H1.35091C0.809091 5.98625 0.5 7.20807 0.5 8.49898C0.5 9.78989 0.809091 11.0117 1.35091 12.0917L4.02364 10.019Z",fill:"#FBBC05"}),f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.49968 3.68182C9.67422 3.68182 10.7288 4.08545 11.5579 4.87818L13.8524 2.58364C12.4669 1.29273 10.656 0.5 8.49968 0.5C5.3724 0.5 2.66695 2.29273 1.35059 4.90727L4.02331 6.98C4.6524 5.08909 6.41604 3.68182 8.49968 3.68182Z",fill:"#EA4335"}))}var F=function({onClose:e,org:t,type:a,manageState:n,source:o}){const i=new URLSearchParams(window.parent.location.search),[r,l]=(0,f.useState)(!1);(0,f.useEffect)((()=>{const e=window.navigator,t=e.userAgent.toLowerCase(),a=/ip(ad|hone|od)/.test(t)||"MacIntel"===e.platform&&e.maxTouchPoints>1,n=/android/.test(t),o=/safari/.test(t),i=n&&/; wv\)/.test(t)||a&&!o;l(i)}),[]);const m=i.get("url"),[E,v]=(0,f.useState)("");(0,f.useEffect)((()=>{E&&g.oR.error((0,u.U)({message:E}),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})}),[E]);return f.createElement(f.Fragment,null,t.loginWithGoogle&&!r&&f.createElement("div",{className:p()("sm"===a?"flex-1":"")},f.createElement(_.A,{type:N.II.BUTTON,onClick:()=>{(new c.Ay).sendEvent({type:s.j.CONTINUE_WITH_BTN,properties:{button_tapped:"google",source:o}});const e=new URLSearchParams({uri:`${m||(0,d.DX)()}`,signupParams:encodeURIComponent(JSON.stringify(window.parent.signupParams))});setTimeout((()=>{window.parent.location.href=`/t/${P.fp.PUBLIC.GOOGLE_AUTHENTICATE}?${e}`}),1e3)},className:p()("w-full",b.A.social_login_btn,"sm"===a?b.A.social_login_btn_sm:"")},f.createElement("div",{className:"mr-3",style:"sm"===a?{marginLeft:"3px"}:{}},f.createElement(U,null)," "),"sm"===a?"":"Continue with Google")),t.loginWithFb&&f.createElement("div",{className:p()("sm"===a?"flex-1":"")},f.createElement(L(),{appId:t.facebookLoginAppId,fields:"name,email,picture",callback:a=>{var o,i;(o=a)&&o.userID&&o.accessToken&&(i={userID:o.userID,accessToken:o.accessToken,type:"fb",url:m?encodeURIComponent(m):(0,d.DX)()},h.F.account.socialLogin(i).then((a=>{if("failed"===a.data.login)g.oR.error((0,u.U)(a.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER});else if(a.data.newAccount){var o={...a.data};delete o.newAccount,delete o.response,(0,d.qs)(t)?n({state:"signupgetstarted",data:o,backState:t.loginWithOTP?"otp":"social",title:"Create an account"}):n({state:"socialTNC",data:o,title:null})}else a.data.url==(0,d.DX)()?window.parent.location.reload():window.parent.location.href=a.data.url?a.data.url:"/",e?.()}),(e=>{g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})})))},textButton:"",disableMobileRedirect:!0,isMobile:!1,cssClass:p()(b.A.social_login_btn,"sm"===a?b.A.social_login_btn_sm:""),render:e=>f.createElement(_.A,{type:N.II.BUTTON,onClick:t=>{(new c.Ay).sendEvent({type:s.j.CONTINUE_WITH_BTN,properties:{button_tapped:"facebook",source:o}}),e.onClick(t)},title:"Continue with Facebook",disabled:e.disabled,className:p()("w-full",b.A.social_login_btn,"sm"===a?b.A.social_login_btn_sm:"")}," ",f.createElement(x,{type:a}),"sm"===a?"":"Continue with Facebook")})))};function M(e){return f.createElement("div",{className:p()("mr-3",e.loginWithGoogle||e.loginWithFb||!e.loginWithOTP?"":b.A.absolute_position),style:{marginLeft:"2px"}},f.createElement(A.A,{"aria-hidden":"true",icon:O.y_8}))}var B=function({manageState:e,loginState:t,onClose:a}){const[n]=(0,r.P)(),o=n,i=(0,l.A)((e=>e.publicCountryCode)),d=new URLSearchParams(window.top.location.search).get("phone")||"";return f.createElement(T.lV,{initialValues:{phone:(0,C.n4)(d)},validate:e=>{let t={};return e.phone||(t.phone="Enter a valid mobile"),t},onSubmit:t=>h.F.account.validateAccount({phone:t.phone}).then((a=>{a.data.response?(e({state:"mobile",userName:t.phone,backState:"otp"}),g.oR.success((0,u.U)(a.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})):g.oR.error((0,u.U)(a.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})}),(e=>{g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})})),render:({handleSubmit:n,submitting:r,dirty:l})=>f.createElement("form",{onSubmit:n},f.createElement("div",{className:"justify-between"},f.createElement("div",{className:"w-full"},f.createElement(v.Ay,{name:"phone",placeholder:"",label:"Enter your phone number",className:b.A.edge_corner,validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,labelCss:b.A.lable_css,countryCode:i}))),f.createElement("div",{className:"mt-2 mb-6"},f.createElement(_.A,{type:N.II.SUBMIT,disabled:!d&&(r||!l),isLoading:r,onClick:n,className:"w-full"},"Next")),o&&(o.loginWithGoogle||o.loginWithFb||o.loginWithOTP)&&f.createElement(f.Fragment,null,f.createElement("div",{className:p()("divider text-center",b.A.l_h_8),"data-content":"or continue with"}),f.createElement("div",{className:p()(o.loginWithGoogle||o.loginWithFb||!o.loginWithOTP?b.A.social_login_btn_wrapper:"")},f.createElement(F,{type:o.loginWithGoogle||o.loginWithFb||!o.loginWithOTP?"sm":"",manageState:e,org:o,onClose:a,source:"login"}),f.createElement("div",{className:o.loginWithGoogle||o.loginWithFb||!o.loginWithOTP?"flex-1":"mt-4"},!(!o.loginWithGoogle&&!o.loginWithFb&&o.loginWithOTP)&&f.createElement(_.A,{title:"Continue with email",type:N.II.BUTTON,onClick:()=>{(new c.Ay).sendEvent({type:s.j.CONTINUE_WITH_BTN,properties:{button_tapped:"email",source:"login"}}),e({...t,firstScreen:!1,state:"email",backState:"otp",title:"Log in to "+o.name})},className:p()(b.A.social_login_btn,b.A.social_login_btn_sm,b.A.unset_position)},f.createElement(M,null)),!o.loginWithGoogle&&!o.loginWithFb&&o.loginWithOTP&&f.createElement(_.A,{title:"Continue with email",type:N.II.BUTTON,onClick:()=>{(new c.Ay).sendEvent({type:s.j.CONTINUE_WITH_BTN,properties:{button_tapped:"email",source:"login"}}),e({...t,firstScreen:!1,state:"email",backState:"otp",title:"Log in to "+o.name})},className:p()(b.A.social_login_btn,b.A.unset_position)},f.createElement(M,{currentOrg:o})," Continue with email")))))})},D=a(44885),W=function({initialValue:e,manageState:t,onClose:a}){const[n]=(0,r.P)(),[o,i]=(0,f.useState)(!0),[l,m]=(0,f.useState)(!1);return f.createElement(T.lV,{validate:e=>{let t={};return e.otp||(t.otp="Enter a otp"),t},onSubmit:n=>((new c.Ay).sendEvent({type:s.j.ENTERED_MOBILE_OTP,properties:{}}),h.F.account.validateOtp(e.userName,n.otp,(0,d.DX)(),"login").then((n=>{n.data.response?n.data.otpLoginToken&&!n.data.unique?(t({state:"mobileWithEmail",userName:e.userName,title:"Multiple emails detected",token:n.data.otpLoginToken,backState:"otp",multipleUsers:n.data?.multipleUsers}),g.oR.success((0,u.U)({message:"Mobile number verified successfully"}),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER}),i(!1),(new c.Ay).sendEvent({type:s.j.MOBILE_OTP_LOGIN_SUCCESS,properties:{}})):"failed"===n.data.login?g.oR.error((0,u.U)(n.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER}):(n.data.url==(0,d.DX)()?window.parent.location.reload():window.parent.location.href=n.data.url?n.data.url:"/",a(),i(!1)):(g.oR.error((0,u.U)(n.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER}),n.data.attempts>=3&&(i(!1),t({state:"email",title:"You’ve entered the incorrect OTP three times",firstScreen:!0})))}),(e=>{g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})}))),render:({handleSubmit:t,submitting:a,dirty:n,values:r})=>f.createElement("form",{onSubmit:t},f.createElement("div",{className:"justify-between"},f.createElement("div",{className:"w-full"},f.createElement(D.A,{boxSize:4,name:"otp",label:"Enter OTP sent to "+e.userName,className:b.A.edge_corner,validate:void 0,hint:void 0,boxWidthClass:b.A.otp_box_width,seperator:f.createElement("span",{className:"pr-4"}),labelCss:b.A.lable_css})),o&&f.createElement("div",{className:p()("text-center",b.A.resend_otp)},f.createElement(j,{onComplete:()=>i(!1),timeInSec:30,prifix:"Resend OTP in"})),!o&&f.createElement("div",{className:p()("text-center cursor-pointer",b.A.resend_otp)},f.createElement("a",{className:p()(b.A.forgot_password,l?"loading":""),onClick:()=>((new c.Ay).sendEvent({type:s.j.RESENT_MOBILE_OTP,properties:{}}),i(!1),m(!0),h.F.account.sendOtp(e.userName).then((e=>{e.data.response?(i(!0),m(!1),g.oR.success((0,u.U)({message:"OTP has been sent to your registered mobile number."}),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})):(m(!1),g.oR.error((0,u.U)(e.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER}))}),(e=>{m(!1),g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})})))},"Resend OTP"))),f.createElement("div",{className:"mt-2 mb-6"},f.createElement(_.A,{type:N.II.BUTTON,disabled:a||!n,isLoading:a,onClick:t,className:"w-full"},"Next")))})};function j({onComplete:e,timeInSec:t,prifix:a}){const[n,o]=f.useState(0),[i,r]=f.useState(t),[s,l]=f.useState(Math.random());f.useEffect((()=>{let e;return o(i),e=setInterval((()=>{o((e=>e-1))}),1e3),()=>clearInterval(e)}),[s]),f.useEffect((()=>{n<0&&(o(0),e(!0))}),[n]);const c=String(n%60).padStart(2,0);return String(Math.floor(n/60)).padStart(2,0),f.createElement("span",null,a&&f.createElement(f.Fragment,null,a," "),c)}var G=a(49689),V=a(96614),q=a(42496),H=a(5556),$=a.n(H),z=a(5340),X=a(64063),Y=a(70424);function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t={};return e.email||(t.email="Enter a valid email"),e.email&&!(0,ee.DT)(e.email)&&(t.email="Enter a valid email"),e.password||(t.password="Enter a password"),t},onSubmit:()=>{(new c.Ay).sendEvent({type:s.j.LOGIN_START,properties:{}}),document.forms.loginForm.submit()},render:({handleSubmit:n,submitting:o,dirty:i,values:r})=>f.createElement("form",{action:"/s/authenticate",method:"POST",target:"_parent",id:"loginForm"},f.createElement("div",{className:"justify-between"},f.createElement("div",{className:"w-full"},f.createElement(Q.A,{name:"email",placeholder:"Email address",label:void 0,className:b.A.edge_corner,validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,labelCss:b.A.lable_css})),f.createElement("div",{className:"w-full"},f.createElement(K,{name:"password",placeholder:"Password",label:void 0,className:b.A.edge_corner,validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,showPassword:!0,labelCss:b.A.lable_css,passwordAutoFill:!0})),f.createElement("div",{className:"w-full"},f.createElement(V.A,{type:q.nl.HIDDEN,name:"age",containerMargin:"",id:"input-age"})),f.createElement("div",{className:"w-full"},f.createElement(V.A,{type:q.nl.HIDDEN,name:"url",containerMargin:"",value:(0,d.DX)(),id:"input-age"}))),f.createElement("div",{className:"text-center cursor-pointer mb-6"},f.createElement("a",{className:p()(b.A.forgot_password,t?"loading":""),onClick:()=>(t=>{if(t.email)return(new c.Ay).sendEvent({type:s.j.FORGET_PASSWORD,properties:{}}),a(!0),h.F.account.forgotPassword(t).then((n=>{n.data.response?(e({state:"forgotMail",title:" ",email:t.email}),a(!1)):(a(!1),g.oR.error((0,u.U)(n.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER}))}),(e=>{a(!1),g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})}));(!t.email||t.email&&!(0,ee.DT)(t.email))&&g.oR.error((0,u.U)({message:"Enter a valid email"}),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})})(r)},"Forgot password"," ")),f.createElement("div",{className:"mt-2 mb-6"},f.createElement(_.A,{type:N.II.SUBMIT,disabled:o||!i,isLoading:o,onClick:n,className:"w-full"},"Next")))})},ae=a(49039);const ne=({value:e,selected:t,onSelect:a})=>f.createElement("div",{className:p()("cursor-pointer flex items-center py-3 px-3 rounded",t?"border border-primary bg-[#E7F0FE]":"border border-graphite03"),onClick:a},f.createElement(ae.A,{checked:t,value:e,groupId:"",name:"",containerMargin:"mr-3"}),f.createElement("p",{className:"text-body font-medium"},e));var oe=function({initialValue:e,manageState:t,onClose:a}){const n=e?.multipleUsers||[];return f.createElement(T.lV,{initialValues:e,validate:e=>{let t={};return e.email?e.email&&!(0,ee.DT)(e.email)&&(t.email="Enter a valid email"):t.email="Enter a valid email",t},onSubmit:t=>h.F.account.otpMultiAccountLogin({email:t.email,phone:e.userName,token:e.token}).then((e=>{"failed"===e.data.login?g.oR.error((0,u.U)(e.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER}):(window.parent.location.href=e.data.url,a())}),(e=>{g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})})),render:({handleSubmit:e,submitting:t,dirty:a,values:o,form:i})=>f.createElement("form",{onSubmit:e},f.createElement("div",{className:"justify-between"},f.createElement("div",{className:"w-full"},f.createElement("p",{className:"text-body"},"Select one email you’d like to continue using. This email will be used exclusively so please choose carefully."),f.createElement("div",{className:"flex flex-col gap-3 my-4"},n?.map((e=>{const t=o.email===e;return f.createElement(ne,{value:e,selected:t,onSelect:()=>{i.change("email",e)}})}))))),f.createElement("div",{className:"mt-2 mb-6 flex justify-end"},f.createElement(_.A,{type:N.II.BUTTON,disabled:t||!o.email,isLoading:t,onClick:e,className:"w-full"},"Use this email")))})};function ie(){return f.createElement("div",{className:"mr-3"},f.createElement(A.A,{"aria-hidden":"true",icon:O.y_8}))}var re=function({data:e,manageState:t,onClose:a}){const[n]=(0,r.P)(),o=n;return f.createElement("div",{className:p()(b.A.social_btn_container,"justify-between")},f.createElement(F,{org:o,manageState:t,onClose:a,source:"login"}),f.createElement("div",{className:b.A.login_mt_16},f.createElement(_.A,{title:"Continue with email",type:N.II.BUTTON,onClick:()=>{(new c.Ay).sendEvent({type:s.j.CONTINUE_WITH_BTN,properties:{button_tapped:"email"}}),t({...e,state:"email",backState:"social"})},className:"w-full"},f.createElement(ie,null)," Continue with email")))},se=a(66189),le=a(59351),ce=a(68613),ue=a(2044),de=function({initialValue:e,manageState:t,onClose:a,loginState:n}){const[o]=(0,r.P)(),i=o,[m,p]=(0,f.useState)(!0),E=new URLSearchParams(window.parent.location.search),S=(0,l.A)((e=>e.publicCountryCode)),C=(0,d.Cl)(i),w=E.get("url"),y=()=>{(new c.Ay).sendEvent({type:s.j.ALREARY_HAVE_LOGIN,properties:{}}),t({state:n.backState,title:"Log in to "+i.name})};return!e&&i.marketingConsentRequired&&(e={provideMarketingConsent:!0}),f.createElement(T.lV,{initialValues:e,validate:e=>{let t={};return p(!1),e.fname||(t.fname="Enter a first name",p(!0)),e.fname?.length>34&&(t.fname="First name must be 34 characters or less",p(!0)),e.email||(t.email="Enter a valid email",p(!0)),e.email&&!(0,ee.DT)(e.email)&&(t.email="Enter a valid email"),C&&C?.isRequired&&!e.phone&&(t.phone="Enter a valid phone number",p(!0)),e.password||(t.password="Enter a password",p(!0)),t},onSubmit:e=>{const n=(e=>{let t={};return p(!1),e.password&&(!1===i?.passwordPolicyRequired?e.password.length<6&&(t.password="Minimum 6 characters required for password."):(0,ee.Z$)(e.password)||(t.password="Must contain atleast 1 uppercase, 1 lowercase and 1 numeric characters. Minimum 8 characters.")),t})(e);if(!(0,le.R)(n))return n;{const n=localStorage.getItem("ipInfo");e={...e,type:"external",agreeTC:!0},n&&(e.ipInfo=n),e.signupParams=window.parent.signupParams||(0,ce.j)();var o=(0,d.qj)("utmSource");null!==o&&""!==o&&(e.utmSource=o);var r=(0,d.qj)("utmMedium");null!==r&&""!==r&&(e.utmMedium=r);var l=(0,d.qj)("utmCampaign");null!==l&&""!==l&&(e.utmCampaign=l);var m=(0,d.qj)("utmTerm");null!==m&&""!==m&&(e.utmTerm=m);var f=(0,d.qj)("utmContent");null!==f&&""!==f&&(e.utmContent=f);let p={promotional_email_alert:!!e.provideMarketingConsent,referral_code:""};if(e.referralCode&&(p.referral_code=e.referralCode),(new c.Ay).sendEvent({type:s.j.USER_SIGNUP_BASIC,properties:p}),i&&!(0,d.qs)(i))return h.F.account.create({formData:JSON.stringify(e),url:w||(0,d.DX)()}).then((e=>{e.data.response?(window.parent.location.href=e.data.url?e.data.url:"/",a()):g.oR.error((0,u.U)(e.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})}),(e=>{g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})}));if((0,d.E4)(i)){var E=(0,d.oT)(i.userProfileFields),_=h.F.account.create,b=!1;return i.userMobileVerify&&E&&(b=!0,_=h.F.account.verify),_({formData:JSON.stringify(e),url:w||(0,d.DX)()}).then((e=>{e.data.response?b?window.parent.location.href="/s/signup/verify?url="+(0,d.DX)():(window.parent.location.href=e.data.url?e.data.url:"/",a?.()):(g.oR.error((0,u.U)(e.data),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER}),e.data.alreadyExist)}),(e=>{g.oR.error((0,u.U)(e),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER})}))}t({state:"signupgetstarted",data:{...e},backState:"signupForm",title:"Before you get started"})}},render:({handleSubmit:n,submitting:o})=>f.createElement("form",{onSubmit:n},f.createElement("div",{className:"justify-between"},f.createElement("div",{className:"w-full"},f.createElement(Q.A,{name:"fname",placeholder:"Name",label:void 0,className:` ${b.A.edge_corner}`,validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,labelCss:b.A.lable_css})),f.createElement("div",{className:"w-full"},f.createElement(Q.A,{name:"email",placeholder:"Email address",label:void 0,className:` ${b.A.edge_corner}`,validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,labelCss:b.A.lable_css})),f.createElement("div",{className:"w-full"},f.createElement(K,{name:"password",placeholder:"Password",label:void 0,className:` ${b.A.edge_corner}`,validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,showPassword:!0,labelCss:b.A.lable_css,showErrorOnSubmit:!0})),C&&f.createElement("div",{className:"w-full"},f.createElement(v.Ay,{isRequired:!0,name:"phone",placeholder:"Phone",label:void 0,className:` ${b.A.edge_corner}`,validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,labelCss:b.A.lable_css,countryCode:S})),i&&i.learnerWallet&&i.referralMarketing&&f.createElement("div",{className:"w-full"},f.createElement(Q.A,{name:"referralCode",placeholder:"Referral code (optional)",label:void 0,className:` ${b.A.edge_corner}`,validate:void 0,hint:void 0,prefix:void 0,checked:void 0,suffix:void 0,labelCss:b.A.lable_css})),i&&i.marketingConsentRequired&&f.createElement("div",{className:"w-full"},f.createElement(se.A,{name:"provideMarketingConsent",label:i?.marketingConsentText||"I’d like to receive promotional and instructional emails",suffix:!0,value:!0,defaultValue:!0}))),f.createElement("div",{className:"mt-2 mb-6"},f.createElement(_.A,{type:N.II.BUTTON,disabled:(o||m)&&!e,isLoading:o,onClick:n,className:"w-full"},"Next")),(i.loginWithGoogle||i.loginWithFb)&&f.createElement(ue.c,null),f.createElement(F,{onClose:a,org:i,type:void 0,manageState:t,source:"signup"}),f.createElement("div",{className:b.A.signup_lable},f.createElement("span",null,"Already have an account? ")," ",f.createElement("strong",{className:"cursor-pointer",onClick:y},"Log in")),f.createElement("div",{className:b.A.signup_hint},"By continuing, you agree to our"," ",f.createElement("a",{target:"_blank",href:"/termsofuse"},"Terms of Service")," ","and"," ",f.createElement("a",{target:"_blank",href:"/privacypolicy"},"Privacy Policy")),f.createElement("div",{className:b.A.signup_lable},f.createElement("span",null,"Unable to Login? We are here - "),f.createElement("strong",{className:"cursor-pointer"},f.createElement("a",{id:"help-email",href:`mailto:${i.supportEmailBCC?i.supportEmailBCC:"contact@spayee.com"}`,"amplitude-event":"support_tapped_login_page","amplitude-payload":{custom_domain:i.domainName[0]}},i.supportEmailBCC?i.supportEmailBCC:"contact@spayee.com"))))})},me=a(91943),pe=function({onClose:e,popup:t,hash:a}){const[m]=(0,r.P)(),_=m;let[h,v]=(0,f.useState)({state:"",firstScreen:!0}),[N,S]=(0,f.useState)("Log in to");const{state:C}=(0,E.zy)(),T=new URLSearchParams(window.location.search),y="true"===(T.get("checkoutFlow")||"false").toLowerCase(),O=(0,l.A)((e=>e.publicCountryCode));function A(e){let t=""!=e.state?e.state:(0,d.gl)(_,O);v({...e,state:t,firstScreen:(0,d.gl)(_,O)===e.state}),e.title?S(e.title):S("Welcome Back!")}return(0,f.useEffect)((()=>{let e=!1;const t=window?.parent?.microfePopupLoginParams;"string"==typeof t&&(e=t.includes("signup"));const a=T.get("phoneOTPLoginUnverified");if(_){if(a)return S("Log in to "+_.name),void v({state:"collectPhone",firstScreen:!0});_&&e||window.location.href.includes("checkout")&&("signup"===_?.checkoutRedirectGuestUsers||!_?.checkoutRedirectGuestUsers)?(S("Create an Account"),v({state:"signupForm",backState:(0,d.gl)(_,O),firstScreen:!0})):(S("Log in to "+_.name),v({state:(0,d.gl)(_,O),firstScreen:!0}))}}),[_,O]),(0,f.useEffect)((()=>{const e=window;"failed"===e.parent.login&&""!=e.parent.message&&e.parent.location.href.includes("authenticate")&&(g.oR.error((0,u.U)({message:e.parent.message}),{autoClose:3e3,position:g.oR.POSITION.TOP_CENTER}),e.parent.login="",e.parent.message="",v({state:"email",firstScreen:!0}))}),[]),(0,f.useEffect)((()=>{_&&(window.parent.location.href.includes("authenticate")&&"signup"===a?.hash||window.parent.location.href.includes("checkout")&&"signup"===_?.checkoutRedirectGuestUsers)&&(S("Create an Account"),v({state:"signupForm",backState:(0,d.gl)(_,O),firstScreen:!0})),y&&A({state:C.state,data:C.user,title:null})}),[_]),(0,f.useEffect)((()=>{_?.ssoEnabled&&_.ssoLoginUrl&&(window.top.location.href=_.ssoLoginUrl)}),[_]),f.createElement(f.Fragment,null,f.createElement(f.Fragment,null,h.state&&!["otp","signupForm","socialTNC","social","forgotMail"].includes(h.state)&&!h.firstScreen&&f.createElement("div",{onClick:()=>function(e){(new c.Ay).sendEvent({type:s.j.BACK_TABBED,properties:{}}),"otp"===e||"social"===e||"email"===e?S("Log in to "+_.name):("signupForm"===e||"signupgetstarted"===e)&&S("Create an Account"),v({...h,state:e,backState:(0,d.gl)(_,O)})}(h?.backState),className:p()("cursor-pointer flex-left",t?b.A.back_button:b.A.back_button_2)},(0,o.s)(n.CeG,"text-title3")),t&&f.createElement("div",{onClick:function(){let t=!1;const a=window?.parent?.microfePopupLoginParams;"string"==typeof a&&(t=a.includes("signup")),_&&!t&&(S("Log in to "+_.name),v({state:(0,d.gl)(_,O),firstScreen:!0})),"signup"===_?.checkoutRedirectGuestUsers&&t&&(S("Create an Account"),v({state:"signupForm",backState:(0,d.gl)(_,O),firstScreen:!0})),e?.(),g.oR.dismiss()},id:"loginPopupCloseBtn",className:p()("cursor-pointer flex-right",b.A.close_button)},(0,o.s)(n.GRI,"text-title3"))),f.createElement("div",{className:"sticky top-0 flex bg-white z-10"},h.state&&!["socialTNC"].includes(h.state)&&f.createElement("div",{className:"flex-grow mb-10"},f.createElement(i.A,{className:p()("text-darkSlate01",b.A.title)},N))),f.createElement("div",{className:"pb-4"},"collectPhone"==h.state&&f.createElement(w,null),"otp"==h.state&&f.createElement(B,{key:Math.random(),loginState:h,manageState:A,onClose:e}),"email"==h.state&&f.createElement(te,{key:Math.random(),manageState:A}),"social"==h.state&&f.createElement(re,{data:h,manageState:A,onClose:e}),"mobile"==h.state&&f.createElement(W,{initialValue:{userName:h.userName},manageState:A,onClose:e}),"socialTNC"==h.state&&f.createElement(G.A,{data:h.data,onClose:e}),"forgotMail"==h.state&&f.createElement(R,{email:h.email}),"mobileWithEmail"==h.state&&f.createElement(oe,{initialValue:h,manageState:A,onClose:e}),"signupForm"==h.state&&f.createElement(de,{initialValue:h.data,loginState:h,manageState:A,onClose:e}),"signupgetstarted"==h.state&&f.createElement(me.A,{initialValue:h.data,loginState:h,manageState:A,onClose:e}),("otp"==h.state||"social"==h.state||h.firstScreen)&&"signupForm"!=h.state&&"signupgetstarted"!=h.state&&"collectPhone"!=h.state&&f.createElement("div",{className:b.A.signup_lable},f.createElement("span",null,"Don’t have an account?")," ",f.createElement("strong",{className:"cursor-pointer",onClick:()=>{(new c.Ay).sendEvent({type:s.j.WANT_TO_SIGNUP,properties:{}}),A({state:"signupForm",title:"Create an account",backState:h.state})}},"Sign up"))))}},44885:function(e,t,a){"use strict";var n=a(46942),o=a.n(n),i=a(5556),r=a.n(i),s=a(96540),l=a(90952),c=a(34037),u=a(5340),d=a(64063),m=a(70424);function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const m=Object.assign(Object.assign({},{outerSize:"h-3 w-3",innerSize:"h-[6px] w-[6px]",unselectedColor:"darkSlate01",selectedColor:"primary",spacings:"mr-2"}),r||{});var p=t+"-"+e;return r=(0,n.useMemo)((()=>{let e=m.outerSize+" border rounded-full flex items-center justify-center "+m.spacings;return e+=s?" border-"+m.selectedColor:" border-"+m.unselectedColor,e}),[s]),t=(0,n.useMemo)((()=>{let e=` bg-${m.unselectedColor} `;return s&&(e=` bg-${m.selectedColor} ${m.innerSize} rounded-full `),e}),[s]),n.createElement(n.Fragment,null,n.createElement("input",{ref:d,type:o.nl.RADIO,name:l,id:p,value:e,className:"hidden",checked:s,onChange:()=>{"function"==typeof c&&c(e,l)}}),n.createElement("label",{className:"cursor-pointer items-center flex "+u,htmlFor:p},n.createElement(i.A,{className:"flex items-center"},n.createElement(i.A,{className:r},n.createElement(i.A,{className:t}))),n.createElement(i.A,null,a)))}));r.displayName="Radio",r.defaultProps={checked:!1,containerMargin:"mr-5"}},71884:function(e,t,a){"use strict";a.d(t,{j:function(){return n},u:function(){return o}});const n={ALREARY_HAVE_LOGIN:"sign_in_tapped_user_website_signup",WANT_TO_SIGNUP:"sign_up_tapped_user_website_login",ENTERED_MOBILE_OTP:"next_tapped_otp_login",RESENT_MOBILE_OTP:"resend_code_tapped_mobile_verification_login",MOBILE_OTP_LOGIN_SUCCESS:"mobile_verification_login_success",CONTINUE_WITH_BTN:"continue_tapped_user_website",USER_SIGNUP_BASIC:"next_tapped_user_website_signup",GETSTARTED_SIGNUP:"get_started_tapped_user_website_signup",LOGIN_START:"next_tapped_user_website_login",FORGET_PASSWORD:"forgot_password_tapped_user_website_login",BACK_TABBED:"back_tapped_mobile_verification_login"},o={CONTINUE_TAPPED_USER_WEBSITE:{LABEL:"continue_tapped_user_website",PROPERTIES:{SOURCE:"source",BUTTON_TAPPED:"button_tapped"}},FORGOT_PASSWORD_TAPPED_USER_WEBSITE_LOGIN:{LABEL:"forgot_password_tapped_user_website_login"},RESEND_MAIL_TAPPED_FORGOT_PASSWORD:{LABEL:"resend_mail_tapped_forgot_password"},NEXT_TAPPED_USER_WEBSITE_SIGNUP:{LABEL:"next_tapped_user_website_signup",PROPERTIES:{REFERRAL_CODE:"referral_code",PROMOTIONAL_EMAIL_ALERT:"promotional_email_alert"}},SIGN_ME_UP_TAPPED_USER_WEBSITE_SIGNUP:{LABEL:"sign_me_up_tapped_user_website_signup",PROPERTIES:{REFERRAL_CODE:"referral_code",PROMOTIONAL_EMAIL_ALERT:"promotional_email_alert",CUSTOM_FIELDS_EXIST:"custom_fields_exist"}},PAYMENT_STATUS:{LABEL:"payment_status",PROPERTIES:{STATUS:"status",ITEM_PURCHASED_TYPE:"item_purchased_type",MEMBERSHIP_ID:"membership_id",COURSE_ID:"course_id",PACKAGE_ID:"package_id",FINAL_PRICE:"final_price",AMOUNT_SAVED:"amount_saved",WALLET_COINS_APPLIED:"wallet_coins_applied",PROMO_CODE_APPLIED:"promo_code_applied",PLAN_TYPE:"plan_type",MEMBERSHIP_PLAN:"membership_plan",CURRENCY:"currency",FINAL_PRICE_USD:"final_price_usd"}}}},74736:function(e,t,a){var n;e.exports=(n=a(96540),function(e){function t(n){if(a[n])return a[n].exports;var o=a[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var a={};return t.m=e,t.c=a,t.p="",t(0)}([function(e,t,a){e.exports=a(4)},function(e,t,a){e.exports=a(6)()},function(e,t){e.exports=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return decodeURIComponent(e.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}},function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t