1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2683,8357],{47176:function(e,t,s){var n,r,a=s(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}t.Z=function(e){return a.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=a.createElement("path",{stroke:"#2E2E2E",strokeLinecap:"round",strokeWidth:1.5,d:"M9 4.46A9.8 9.8 0 0 1 12 4c4.182 0 7.028 2.5 8.725 4.704C21.575 9.81 22 10.361 22 12c0 1.64-.425 2.191-1.275 3.296C19.028 17.5 16.182 20 12 20s-7.028-2.5-8.725-4.704C2.425 14.192 2 13.639 2 12c0-1.64.425-2.191 1.275-3.296A14.5 14.5 0 0 1 5 6.821"})),r||(r=a.createElement("path",{stroke:"#2E2E2E",strokeWidth:1.5,d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})))}},14943:function(e,t,s){var n,r=s(67294);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}t.Z=function(e){return r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=r.createElement("path",{fill:"#2E2E2E",d:"M2.69 6.705a.75.75 0 0 0-1.38.59L2 7zm12.897 6.624-.274-.698zm-6.546.409a.75.75 0 1 0-1.257-.818l.629.409zm-2.67 1.353a.75.75 0 1 0 1.258.818L7 15.5zM22.69 7.295a.75.75 0 0 0-1.378-.59L22 7zM19 11.13l-.513-.547zm.97 2.03a.75.75 0 1 0 1.06-1.06l-.53.53zM11.25 16.5a.75.75 0 0 0 1.5 0h-1.5m5.121-.591a.75.75 0 1 0 1.258-.818L17 15.5zm-10.84-4.25A.75.75 0 0 0 4.47 10.6l.53.53zm-2.561.44a.75.75 0 0 0 1.06 1.06l-.53-.53zM12 14v-.75c-3.224 0-5.539-1.605-7.075-3.26a13.6 13.6 0 0 1-1.702-2.28 12 12 0 0 1-.507-.946l-.022-.049-.004-.01-.001-.001L2 7l-.69.296h.001l.001.003.003.006.04.088q.039.088.117.243c.103.206.256.496.462.841.41.69 1.035 1.61 1.891 2.533C5.54 12.855 8.224 14.75 12 14.75zm3.587-.671-.274-.698c-.97.382-2.071.619-3.313.619v1.5c1.438 0 2.725-.276 3.862-.723zm-7.174 0-.629-.41-1.413 2.172L7 15.5l.629.409 1.412-2.171zM22 7l-.69-.296h.001v.002l-.007.013-.028.062a12.349 12.349 0 0 1-.64 1.162 13.3 13.3 0 0 1-2.15 2.639l.514.547.513.547a14.8 14.8 0 0 0 3.122-4.26l.039-.085.01-.024.004-.007v-.003h.001v-.001zm-3 4.129-.513-.547c-.86.806-1.913 1.552-3.174 2.049l.274.698.275.698c1.473-.58 2.685-1.444 3.651-2.351zm0 0-.53.53 1.5 1.5.53-.53.53-.53-1.5-1.5zM12 14h-.75v2.5h1.5V14zm3.587-.671-.628.409 1.412 2.171L17 15.5l.629-.409-1.413-2.171zM5 11.129l-.53-.53-1.5 1.5.53.53.53.53 1.5-1.5z"})))}},86935:function(e,t,s){var n,r=s(67294);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}t.Z=function(e){return r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=r.createElement("path",{fill:"#9EA2AE",d:"M12.014 2c2.966 0 5.383 2.378 5.384 5.3v1.598c1.8.622 3.102 2.29 3.102 4.27v4.29c0 2.505-2.071 4.542-4.617 4.542h-3.44a.757.757 0 0 1-.763-.75c0-.414.342-.75.762-.75h3.412c1.705 0 3.091-1.364 3.091-3.042 0-.052.02-.097.03-.144v-4.145c0-1.678-1.387-3.042-3.092-3.042H8.117c-1.705 0-3.093 1.364-3.093 3.042v4.145c.01.047.03.092.03.144 0 1.678 1.387 3.042 3.092 3.042.421 0 .763.336.763.75s-.342.75-.763.75l-.02-.002-.009.002C5.571 22 3.5 19.963 3.5 17.458v-4.29c0-1.98 1.302-3.648 3.102-4.27V7.301C6.615 4.363 9.03 2 11.99 2zM12 13.453c.42 0 .762.336.762.75v2.22c0 .415-.341.75-.762.75a.757.757 0 0 1-.763-.75v-2.22c0-.414.342-.75.763-.75M11.993 3.5c-2.125 0-3.856 1.694-3.866 3.784v1.343h7.746V7.301c0-2.096-1.733-3.8-3.862-3.801z"})))}},94144:function(e,t,s){s.r(t),s.d(t,{default:function(){return K}});var n,r,a,o,l,i,c,u,m,d,h=s(85893),p=s(67294),x=s(33654),f=s(85574),g=s(82940),w=s(6490),y=s(14762),b=s(11837),v=s(42466);let j={PHONE:"phone",EMAIL:"email",OTP:"otp",REGISTER:"register",FORGOT:"forgot"},E={PHONE:"phone",REGISTER:"register",GOOGLE:"google"};var C=s(52130);function N(){return(N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}var O=function(e){return p.createElement("svg",N({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=p.createElement("path",{stroke:"#9EA2AE",strokeLinecap:"round",strokeWidth:1.5,d:"M13.5 2s2.334.212 5.303 3.182c2.97 2.97 3.182 5.303 3.182 5.303M14.207 5.536s.99.282 2.475 1.767 1.768 2.475 1.768 2.475"})),r||(r=p.createElement("path",{fill:"#9EA2AE",d:"m15.102 15.027.543.517zm.455-.48-.544-.516zm2.417-.335-.374.65zm1.91 1.1-.374.65zm.539 3.446.544.517zm-1.42 1.496-.545-.517zm-1.326.71.074.745zm-9.86-4.489.543-.516zm-4.064-9.55a.75.75 0 1 0-1.498.081l.749-.04zm5.439 1.88.544.517zm.287-.302.543.517zm.156-2.81.613-.433zM8.375 3.91l-.613.433zm-3.656-.818a.75.75 0 1 0 1.087 1.033l-.544-.516zm6.345 9.964.544-.517zm-.399 6.756a.75.75 0 1 0 .798-1.27l-.399.635zm4.449.246a.75.75 0 0 0-.308 1.469l.154-.735zm-.012-5.03.543.516.456-.48-.544-.516-.544-.517-.455.48zm2.872-.816-.374.65 1.91 1.1.374-.65.375-.65-1.911-1.1zm2.449 4.546-.544-.516-1.42 1.495.543.517.544.516 1.42-1.495zM7.816 16.475l.544-.516c-3.876-4.081-4.526-7.523-4.607-9.033l-.75.04-.748.04c.1 1.85.884 5.634 5.
1018 9.986zm1.376-7.67.544.517.286-.302-.543-.517-.544-.516-.287.302zm.443-3.112.613-.433-1.261-1.783-.613.433-.612.433 1.26 1.783zm-.443 3.112c-.544-.516-.545-.516-.545-.515l-.002.002-.003.003a1 1 0 0 0-.123.16c-.052.083-.109.19-.157.325-.098.275-.15.639-.084 1.093.13.892.715 2.091 2.242 3.7l.544-.517.544-.517c-1.428-1.503-1.78-2.428-1.846-2.884-.032-.22 0-.335.013-.372l.008-.019a.3.3 0 0 1-.028.037l-.018.02zm1.872 4.25-.544.517c1.523 1.604 2.673 2.234 3.55 2.377.451.073.816.014 1.092-.095a1.5 1.5 0 0 0 .421-.25l.05-.048.007-.006.003-.003.001-.002s.002-.001-.542-.518c-.544-.516-.543-.517-.543-.518l.002-.001.002-.003.005-.005.048-.042q.014-.008-.005.001c-.02.008-.11.04-.3.009-.402-.066-1.27-.42-2.703-1.929zM8.374 3.91l.613-.433C7.973 2.043 5.945 1.8 4.719 3.092l.543.517.544.516c.523-.55 1.444-.507 1.956.218zm10.628 16.344-.544-.517c-.279.294-.57.452-.854.48l.073.746.074.746c.747-.073 1.352-.472 1.795-.939zM9.48 8.504l.543.516c.968-1.019 1.036-2.613.226-3.76l-.613.433-.612.433c.422.597.357 1.392-.088 1.86zm10.405 6.808-.374.65c.821.473.982 1.635.369 2.28l.544.516.544.517c1.305-1.374.924-3.673-.708-4.613zm-4.327-.764.544.516c.385-.406.986-.497 1.499-.202l.374-.65.374-.65c-1.098-.632-2.46-.45-3.335.47zm-4.493 4.63.4-.636c-.985-.618-2.032-1.454-3.104-2.583l-.544.516-.543.517c1.154 1.215 2.297 2.132 3.392 2.82zm6.613 1.785-.073-.746a8.3 8.3 0 0 1-2.49-.159l-.154.735-.154.734a9.8 9.8 0 0 0 2.945.182z"})))};function z(e){let{phoneNumber:t,phoneError:s,handlePhoneChange:n,handlePhoneContinue:r,submitLoading:a,onSwitchToEmail:o,onSwitchToRegister:l,googleLogin:i,googleLoading:c,googleAuthStatus:u}=e;return(0,h.jsxs)("div",{children:[(0,h.jsx)(C.kP,{title:"Welcome Back",subtitle:"Login/Signup to get exclusive privileges"}),(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(O,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:"tel",className:"flex-1 min-w-0 outline-none border-0 ring-0 text-sm bg-transparent placeholder-gray-400",placeholder:"Enter your phone number",value:t,onChange:n,maxLength:10,onKeyDown:e=>"Enter"===e.key&&!a&&r(),autoFocus:!0})]}),s&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1 mb-1",children:s}),(0,h.jsx)("button",{type:"button",onClick:o,className:"w-full text-center text-primary text-sm font-medium mt-2 mb-4 hover:underline",children:"Use Email Address"}),(0,h.jsx)("button",{type:"button",onClick:r,disabled:a,className:"w-full bg-primary text-white py-3 rounded-xl font-semibold text-base transition-opacity ".concat(a?"opacity-50 cursor-not-allowed":"hover:opacity-90"),children:a?"Please wait...":"Continue"}),(0,h.jsx)(C.iz,{}),1==u&&(0,h.jsx)(C.VL,{onClick:i,disabled:c}),(0,h.jsxs)("p",{className:"text-center text-sm text-gray-500 mt-4",children:["Don't have an Account?"," ",(0,h.jsx)("button",{type:"button",onClick:l,className:"text-primary font-semibold hover:underline",children:"Register"})]})]})}var k=s(87536),P=s(47533),S=s(47176),A=s(14943);function B(){return(B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}var M=function(e){return p.createElement("svg",B({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),a||(a=p.createElement("path",{fill:"#9EA2AE",d:"M16.197 3c3.201.01 5.793 2.621 5.803 5.846v1.46a.71.71 0 0 1-.708.714l-.009-.018a.7.7 0 0 1-.5-.209.72.72 0 0 1-.207-.504V8.846c-.024-2.426-1.97-4.387-4.379-4.411H7.803c-2.408.024-4.355 1.985-4.38 4.41v6.31c.025 2.425 1.971 4.386 4.38 4.41h8.394c2.409-.024 4.355-1.985 4.38-4.41a.72.72 0 0 1 .711-.642c.365 0 .671.276.712.641-.01 3.225-2.602 5.836-5.803 5.846H7.803C4.6 20.995 2.005 18.38 2 15.154V8.846C2 5.617 4.598 3 7.803 3zM6.295 8.387a.7.7 0 0 1 .518.155l4.157 3.315c.519.41 1.25.41 1.77 0l4.112-3.315h.01a.713.713 0 0 1 .998.107.717.717 0 0 1-.115 1.007l-4.112 3.324a2.84 2.84 0 0 1-3.583 0L5.928 9.657A.726.726 0 0 1 5.82 8.65a.7.7 0 0 1 .474-.262"})))},L=s(86935),T=s(16310);let _=T.Ry().shape({email:T.Z_().email("Invalid email address").matches(/^[\w-.]+@([\w-]+\.)+[\w-]{2,20}$/,"Invalid email address").required("Email is required"),password:T.Z_().required("Password is required")}),R=T.Ry().shape({username:T.Z_().required("Name is required").min(3,"Min 3 characters").max(30,"Max 30 characters").matches(/^(?=.*[A-Za-z])[A-Za-z0-9_ ]*$/,"Name is invali
1d"),email:T.Z_().email("Invalid email address").matches(/^[\w-.]+@([\w-]+\.)+[\w-]{2,20}$/,"Invalid email address").required("Email is required"),phoneNumber:T.Z_().matches(/^(\+91|91)?[-\s]?[6-9]\d{9}$/,"Phone number is not valid").required("Phone is required"),password:T.Z_().min(8,"Password should be at-least 8 characters.").required("Password is required"),confirmPassword:T.Z_().oneOf([T.iH("password"),null],"Passwords must match").required("Confirm password is required"),reference_code:T.Z_()}),I="flex-1 min-w-0 outline-none border-0 ring-0 text-sm bg-transparent placeholder-gray-400";function q(e){let{onSubmit:t,submitLoading:s,isOtpEnb:n,onSwitchToPhone:r,onSwitchToForgot:a,onSwitchToRegister:o,googleLogin:l,googleLoading:i,googleAuthStatus:c}=e,[u,m]=(0,p.useState)(!1),{register:d,handleSubmit:x,formState:{errors:f,isValid:g}}=(0,k.cI)({resolver:(0,P.X)(_),mode:"onChange"});return(0,h.jsxs)("form",{onSubmit:x(t),children:[(0,h.jsx)(C.kP,{title:"Welcome Back",subtitle:"Login/Signup to get exclusive privileges"}),(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(M,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:"email",className:I,placeholder:"Enter your email address",...d("email"),autoFocus:!0})]}),f.email&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:f.email.message}),(0,h.jsxs)("div",{className:"mt-3",children:[(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(L.Z,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:u?"text":"password",className:I,placeholder:"Enter your password",...d("password")}),(0,h.jsx)("button",{type:"button",onClick:()=>m(e=>!e),className:"text-gray-400 ml-2 shrink-0",children:u?(0,h.jsx)(S.Z,{className:"w-5 h-5"}):(0,h.jsx)(A.Z,{className:"w-5 h-5"})})]}),f.password&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:f.password.message})]}),(0,h.jsx)("div",{className:"flex justify-end mt-2 mb-1",children:(0,h.jsx)("button",{type:"button",onClick:a,className:"text-primary text-sm font-medium hover:underline",children:"Forgot password?"})}),n&&(0,h.jsx)("button",{type:"button",onClick:r,className:"w-full text-center text-primary text-sm font-medium mb-4 hover:underline",children:"Use Mobile Number"}),(0,h.jsx)("button",{type:"submit",disabled:!g||s,className:"w-full bg-primary text-white py-3 rounded-xl font-semibold text-base transition-opacity ".concat(!g||s?"opacity-50 cursor-not-allowed":"hover:opacity-90"),children:s?"Please wait...":"Continue"}),(0,h.jsx)(C.iz,{}),1==c&&(0,h.jsx)(C.VL,{onClick:l,disabled:i}),(0,h.jsxs)("p",{className:"text-center text-sm text-gray-500 mt-4",children:["Don't have an Account?"," ",(0,h.jsx)("button",{type:"button",onClick:o,className:"text-primary font-semibold hover:underline",children:"Register"})]})]})}function G(e){let{otpValues:t,setOtpValues:s,maskedPhone:n,googlePhoneNumber:r,otpMode:a,onVerify:o,onResend:l,verifyLoading:i,resendLoading:c,onEditNumber:u}=e,m=(e,n)=>{let{value:r}=e.target;if(/^\d?$/.test(r)){var a;let o=[...t];o[n]=r,s(o),r&&n<5&&(null===(a=document.getElementById("auth-otp-".concat(n+1)))||void 0===a||a.focus())}},d=(e,s)=>{var n;"Backspace"===e.key&&s>0&&!t[s]&&(null===(n=document.getElementById("auth-otp-".concat(s-1)))||void 0===n||n.focus())},p=e=>{let t=e.clipboardData.getData("text").slice(0,6);/^\d{6}$/.test(t)&&s(t.split(""))},x=6===t.join("").length;return(0,h.jsxs)("div",{children:[(0,h.jsx)(C.kP,{title:"Verify your Number",subtitle:(0,h.jsxs)(h.Fragment,{children:["We've sent a 6-digit code to"," ",(0,h.jsx)("span",{className:"font-medium text-gray-700",children:n||(r?"+91 ".concat(r):"")}),"."]})}),(0,h.jsx)("div",{className:"flex justify-center gap-2 mb-5",onPaste:p,children:t.map((e,t)=>(0,h.jsx)("div",{className:"w-11 h-12 border border-gray-300 rounded-lg flex items-center justify-center",children:(0,h.jsx)("input",{id:"auth-otp-".concat(t),type:"text",inputMode:"numeric",maxLength:1,value:e,onChange:e=>m(e,t),onKeyDown:e=>d(e,t),className:"w-full h-full text-center text-lg font-bold bg-transparent"})},t))}),(0,h.jsxs)("div",{className:"flex justify-between text-sm mb-5",children:[(0,h.jsx)("div",{children:a!==E.REGISTER&&(0,h.jsx)("button",{type:"button",onClick:u,className:"text-primary font-medium hover:underline",children:"Edit Number"})}),(0,h.jsxs)("span",{className:"text-gray-500",children:["Didn't get OTP Code?"," ",(0,h.jsx)("button",{type:"button",onClick:l,disabled:c,
1className:"text-primary font-medium hover:underline",children:c?"Resending...":"Resend"})]})]}),(0,h.jsx)("button",{type:"button",onClick:o,disabled:!x||i,className:"w-full bg-primary text-white py-3 rounded-xl font-semibold text-base transition-opacity ".concat(!x||i?"opacity-50 cursor-not-allowed":"hover:opacity-90"),children:i?"Verifying...":"Verify & Continue"})]})}function Z(){return(Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}var H=function(e){return p.createElement("svg",Z({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),o||(o=p.createElement("circle",{cx:10,cy:6,r:4,stroke:"#9EA2AE",strokeWidth:1.5})),l||(l=p.createElement("path",{fill:"#9EA2AE",d:"m18.043 12.366.444-.605zM19 8.69l-.519.542a.75.75 0 0 0 1.038 0zm.957 3.675-.444-.605zm-.957.462v.75zm-.957-.462.444-.605c-.418-.307-.879-.69-1.227-1.093-.369-.426-.51-.757-.51-.971h-1.5c0 .77.441 1.45.875 1.952.453.525 1.014.984 1.474 1.321zM16 9.696h.75c0-.575.263-.826.492-.906.25-.088.714-.06 1.24.443L19 8.691l.519-.541c-.825-.79-1.861-1.096-2.773-.776-.933.327-1.496 1.226-1.496 2.323zm3.957 2.67.444.604c.46-.337 1.02-.796 1.474-1.32.434-.502.875-1.183.875-1.953h-1.5c0 .214-.141.545-.51.971-.348.403-.809.786-1.226 1.093zM22 9.696h.75c0-1.096-.562-1.995-1.496-2.322-.912-.32-1.948-.014-2.773.776L19 8.69l.519.542c.525-.503.989-.531 1.24-.443.228.08.491.33.491.907zm-3.957 2.67-.444.604c.369.27.783.608 1.401.608v-1.5c-.024 0-.04 0-.094-.03a4 4 0 0 1-.42-.287zm1.914 0-.444-.605a4 4 0 0 1-.42.288c-.053.029-.069.029-.093.029v1.5c.618 0 1.032-.337 1.4-.608z"})),i||(i=p.createElement("path",{stroke:"#9EA2AE",strokeLinecap:"round",strokeWidth:1.5,d:"M17.998 18q.002-.246.002-.5c0-2.485-3.582-4.5-8-4.5s-8 2.015-8 4.5S2 22 10 22c2.231 0 3.84-.157 5-.437"})))};function V(){return(V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}var F=function(e){return p.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),c||(c=p.createElement("path",{stroke:"#9EA2AE",strokeLinecap:"round",strokeWidth:1.5,d:"M22 12H2M12 2v20M13 12a4 4 0 0 0 4 4M11 12a4 4 0 0 1-4 4"})),u||(u=p.createElement("path",{stroke:"#9EA2AE",strokeWidth:1.5,d:"M12 10.035a3.25 3.25 0 0 1 2.46-3.15c1.603-.4 3.056 1.052 2.655 2.656A3.25 3.25 0 0 1 13.965 12H12zM12 10.035a3.25 3.25 0 0 0-2.46-3.15c-1.603-.4-3.056 1.052-2.655 2.656A3.25 3.25 0 0 0 10.035 12H12z"})),m||(m=p.createElement("path",{stroke:"#9EA2AE",strokeLinecap:"round",strokeWidth:1.5,d:"M22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12s0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464c.974.974 1.3 2.343 1.41 4.536"})))};let W="flex-1 min-w-0 outline-none border-0 ring-0 text-sm bg-transparent placeholder-gray-400";function D(e){let{onSubmit:t,submitLoading:s,isOtpEnb:n,onSwitchToLogin:r}=e,[a,o]=(0,p.useState)(!1),[l,i]=(0,p.useState)(!1),{register:c,handleSubmit:u,formState:{errors:m,isValid:d}}=(0,k.cI)({resolver:(0,P.X)(R),mode:"onChange"});return(0,h.jsxs)("form",{onSubmit:u(t),className:"overflow-y-auto max-h-[85vh] pr-0.5",children:[(0,h.jsx)(C.kP,{title:"Create Your Account",subtitle:"Join us to unlock exclusive offers, gold plans & member-only privileges."}),(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(H,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:"text",className:W,placeholder:"We'd love to know your name.",...c("username")})]}),m.username&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:m.username.message}),(0,h.jsxs)("div",{className:"mt-3",children:[(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(M,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:"email",className:W,placeholder:"Enter your email address",...c("email")})]}),m.email&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:m.email.message})]}),(0,h.jsxs)("div",{className:"mt-3",children:[(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(O,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:"tel",className:W,placeholder:"Enter your mobile number",maxLength:10,...c("phoneNumber")})]}),m.phoneNumber&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:m.phoneNumber.message})]}),(0,h.jsxs)("div",{className:"mt-3",children:[(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(L.Z,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:a?"text":"password",className:W,placeholder:"Create a secure password",...c("password")}),(0,h.jsx)("button",{type:"button",onClick:()=>o(e=>!e),className:"text-gray-400 ml-2 shrink-0",children:a?(0,h.jsx)(S.Z,{className:"w-5 h-5"}):(0,h.jsx)(A.Z,{className:"w-5 h-5"})})]}),m.password&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:m.password.message})]}),(0,h.jsxs)("div",{className:"mt-3",children:[(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(L.Z,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:l?"text":"password",className:W,placeholder:"Re-enter your password",...c("confirmPassword")}),(0,h.jsx)("button",{type:"button",onClick:()=>i(e=>!e),className:"text-gray-400 ml-2 shrink-0",children:l?(0,h.jsx)(S.Z,{className:"w-5 h-5"}):(0,h.jsx)(A.Z,{className:"w-5 h-5"})})]}),m.confirmPassword&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:m.confirmPassword.message})]}),(0,h.jsxs)("div",{className:"mt-3",children:[(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(F,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:"text",className:W,placeholder:"Referral Code, if Any (Optional)",...c("reference_code")})]}),m.reference_code&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:m.reference_code.message})]}),(0,h.jsxs)("p",{className:"text-center text-sm text-gray-500 my-3",children:["Already have an Account?"," ",(0,h.jsx)("button",{type:"button",onClick:r,className:"text-primary font-semibold hover:underline",children:"Login"})]}),(0,h.jsx)("button",{type:"submit",disabled:!d||s,className:"w-full bg-primary text-white py-3 rounded-xl font-semibold text-base transition-opacity ".concat(!d||s?"opacity-50 cursor-not-allowed":"hover:opacity-90"),children:s?"Please wait...":"Create account"})]})}function $(e){let{onSubmit:t,submitLoading:s,onBack:n}=e,[r,a]=(0,p.useState)(""),o=e=>{e.preventDefault(),s||t(r)};return(0,h.jsxs)("form",{onSubmit:o,children:[(0,h.jsx)(C.kP,{title:"Forgot Password",subtitle:"Enter your email address and we'll send you a reset link."}),(0,h.jsxs)(C.Aq,{children:[(0,h.jsx)(M,{className:"w-5 h-5"}),(0,h.jsx)("input",{type:"email",className:"flex-1 min-w-0 outline-none border-0 ring-0 text-sm bg-transparent placeholder-gray-400",placeholder:"Enter your email address",value:r,onChange:e=>a(e.target.value),required:!0,autoFocus:!0})]}),(0,h.jsx)("button",{type:"submit",disabled:!r||s,className:"w-full bg-primary text-white py-3 rounded-xl font-semibold text-base transition-opacity mt-4 ".concat(!r||s?"opacity-50 cursor-not-allowed":"hover:opacity-90"),children:s?"Sending...":"Send Reset Link"}),(0,h.jsx)("button",{type:"button",onClick:n,className:"w-full text-center text-primary text-sm font-medium mt
1-3 hover:underline",children:"Back to Login"})]})}function U(){return(U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}var J=function(e){return p.createElement("svg",U({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),d||(d=p.createElement("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m13.99 10.01.84-.84M9.17 14.83l2.75-2.75M14.83 14.83 9.17 9.17M2 12.96V15c0 5 2 7 7 7h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9"})))};function K(){let{isOpen:e,closeAuthPopup:t,redirectUrl:s}=(0,x.Pd)(),{setUserId:n,setToken:r,setUserDetails:a}=(0,p.useContext)(f.UserContext),{isOtpEnb:o}=(0,p.useContext)(w.m),l=(0,g.b)(),[i,c]=(0,p.useState)(j.PHONE),[u,m]=(0,p.useState)(E.PHONE),[d,C]=(0,p.useState)(""),[N,O]=(0,p.useState)(""),[k,P]=(0,p.useState)(null),[S,A]=(0,p.useState)(""),[B,M]=(0,p.useState)(Array(6).fill("")),[L,T]=(0,p.useState)(null),[_,R]=(0,p.useState)(!1),[I,Z]=(0,p.useState)({}),[H,V]=(0,p.useState)(null),[F,W]=(0,p.useState)(null),[U,K]=(0,p.useState)(!1),[X,Y]=(0,p.useState)(!1),[Q,ee]=(0,p.useState)(!1),[et,es]=(0,p.useState)(!1),[en,er]=(0,p.useState)(!1),[ea,eo]=(0,p.useState)(!1),{login:el,loading:ei,PhoneNumberModals:ec}=(0,v.E)({onOtpVerified:()=>{c(j.OTP),m(E.GOOGLE)},setPhoneNumber:V});if((0,p.useEffect)(()=>{l.post("login/viewGoogleAuthuser").then(e=>{1==e.data.status&&W(e.data.data.enb)}).catch(()=>{})},[]),(0,p.useEffect)(()=>{e||(c(o?j.PHONE:j.EMAIL),C(""),O(""),M(Array(6).fill("")),V(null))},[e,o]),!e)return null;let eu=e=>{Z(e),R(!0)},em=()=>R(!1),ed=()=>{eu({type:"success",title:"Success!",subText:"Successfully logged in",autoClose:2,onClose:()=>{em(),t(),window.location.href=s||"/"},showConfirmButton:!1,showCancelButton:!1})},eh=e=>"+91 ".concat(e.slice(0,2),"*** **").concat(e.slice(-3)),ep=e=>{let t=e.user_details[0],s={...t,user_type:e.user_type};n(t.user_id),r(e.token),a(s),localStorage.setItem("userId",t.user_id),localStorage.setItem("token",e.token),localStorage.setItem("userDetails",JSON.stringify(s)),localStorage.setItem("privilegeStatus",e.privilege_card||0)},ex=e=>{let t=e.target.value;""===t||/^[6-9]\d{0,9}$/.test(t)?(C(t),O("")):t.length<=10&&O("Number must start with 6â9")},ef=async()=>{if(!U){if(10!==d.length){O("Phone number must be exactly 10 digits.");return}K(!0);try{let e=await l.post("login/userLogin",{phone_no:d});1==e.data.status?(P(e.data.user_id),A(eh(d)),m(E.PHONE),c(j.OTP)):eu({type:"error",title:"Error!",subText:e.data.msg,autoClose:3,onClose:em,showConfirmButton:!1,showCancelButton:!1})}catch(t){eu({type:"error",title:"Error!",subText:t.message,autoClose:2,onClose:em,showConfirmButton:!1,showCancelButton:!1})}finally{K(!1)}}},eg=async()=>{if(X)return;let e=B.join("");Y(!0);try{let t;t=u===E.PHONE?await l.post("/login/verifyOtp",{otp:e,login_user_id:k}):u===E.REGISTER?await l.post("/login/regVerifyOtp",{otp:e,log_id:L}):await l.post("/login/verifyMobileOtp",{otp:e,phone_no:H}),1===t.data.status?(u!==E.GOOGLE&&ep(t.data),M(Array(6).fill("")),ed()):eu({type:"error",title:"Error",subText:t.data.msg||"Invalid OTP.",autoClose:3,onClose:em,showConfirmButton:!1,showCancelButton:!1})}catch(s){eu({type:"error",title:"Error",subText:"Unable to verify OTP.",autoClose:3,onClose:em,showConfirmButton:!1,showCancelButton:!1})}finally{Y(!1)}},ew=async()=>{if(!Q){ee(!0);try{let e;e=u===E.PHONE?await l.post("/login/resendOtp",{login_user_id:k}):u===E.REGISTER?await l.post("/login/regResendOtp",{log_id:L}):await l.post("/login/resendMobileOtp",{phone_no:H}),1===e.data.status?(M(Array(6).fill("")),eu({type:"success",title:"Resent",subText:e.data.msg||"OTP Resent!",autoClose:3,onClose:em,showConfirmButton:!1,showCancelButton:!1})):eu({type:"error",title:"Error",subText:e.data.msg||"Unable to resend.",autoClose:3,onClose:em,showConfirmButton:!1,showCancelButton:!1})}catch(t){eu({type:"error",title:"Error",subText:"Unable to resend OTP.",autoClose:3,onClose:em,showConfirmButton:!1,showCancelButton:!1})}finally{ee(!1)}}},ey=async e=>{if(!et){es(!0);try{let t=await l.post("user/user_login",{email:e.email,password:e.password,remember:"on"});if("0"===t.data.status){eu({type:"error",title:"Error!",subText:t.data.message,autoClose:2,onClose:em,showConfirmButton:!1,showCancelButton:!1});return}ep(t.data),(0,b.kT)("initialReferrer"),ed()}catch(s){eu({type:"error",title:"Error!",subText:s.toString(),autoClose:2,onClose:em,showConfirmButton:!1,showCancelButton:!1})}finally{es(!1)}}},eb=async e=>{if(en)return;er(!0);let t={user_name:e.username,email:e.email,phone_no:e.phoneNumber,password:e.password,confirm_password:e.confirmPassword,reference_code:e.reference_code||""};try{if(o){let s=await l.post("login/userRegister",t);1===s.data.status?(T(s.data.log_id),A(eh(e.phoneNumber)),m(E.REGISTER),eu({type:"success",title:"Success",subText:s.data.msg||"OTP sent!",autoClose:3,onClose:()=>{em(),c(j.OTP)},showConfirmButton:!1,showCancelButton:!1})):eu({type:"error",title:"Error!",subText:s.data.msg,autoClose:2,onClose:em,showConfirmButton:!1,showCancelButton:!1})}else{let n=await l.post("user/user_register",t);"2"===n.data.status||0==n.data.status?eu({type:"error",title:"Error!",subText:n.data.message,autoClose:2,onClose:em,showConfirmButton:!1,showCancelButton:!1}):eu({type:"success",title:"Registration Success..",subText:"You can now sign in with your new account.",autoClose:2,onClose:()=>{em(),c(j.EMAIL)},showConfirmButton:!1,showCancelButton:!1})}}catch(r){eu({type:"error",title:"Error!",subText:r.message,autoClose:2,onClose:em,showConfirmButton:!1,showCancelButton:!1})}finally{er(!1)}},ev=async e=>{if(!ea){eo(!0);try{let t=await l.post("user/forgotPassword",{email:e});1==t.data.status?eu({type:"success",title:"Success!",subText:"Mail sent successfully",autoClose:3,onClose:()=>{em(),c(j.EMAIL)},showConfirmButton:!1,showCancelButton:!1}):eu({type:"error",title:"Error!",subText:t.data.msg,autoClose:3,onClose:em,showConfirmButton:!1,showCancelButton:!1})}catch(s){eu({type:"error",title:"Error!",subText:"Failed to send email",autoClose:3,onClose:em,showConfirmButton:!1,showCancelButton:!1})}finally{eo(!1)}}};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"fixed inset-0 z-[9998] bg-black bg-opacity-50 backdrop-blur-sm","aria-hidden":"true"}),(0,h.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center pointer-events-none px-4",role:"dialog","aria-modal":"true","aria-label":"Authentication",children:(0,h.jsxs)("div",{className:"auth-popup relative bg-white rounded-2xl shadow-2xl w-full max-w-sm pointer-events-auto",children:[(0,h.jsx)("button",{type:"button",onClick:t,className:"absolute top-3 right-3 w-7 h-7 flex items-center justify-center rounded-full bg-gray-100 hover:bg-gray-200 text-gray-600 transition-colors z-10","aria-label":"Close",children:(0,h.jsx)(J,{size:12})}),(0,h.jsxs)("div",{className:"px-6 py-6 max-h-[90vh] overflow-y-auto",children:[i===j.PHONE&&(0,h.jsx)(z,{phoneNumber:d,phoneError:N,handlePhoneChange:ex,handlePhoneContinue:ef,submitLoading:U,onSwitchToEmail:()=>c(j.EMAIL),onSwitchToRegister:()=>c(j.REGISTER),googleLogin:el,googleLoading:ei,googleAuthStatus:F}),i===j.EMAIL&&(0,h.jsx)(q,{onSubmit:ey,submitLoading:et,isOtpEnb:o,onSwitchToPhone:()=>c(j.PHONE),onSwitchToForgot:()=>c(j.FORGOT),onSwitchToRegister:()=>c(j.REGISTER),googleLogin:el,googleLoading:ei,googleAuthStatus:F}),i===j.OTP&&(0,h.jsx)(G,{otpValues:B,setOtpValues:M,maskedPhone:S,googlePhoneNumber:H,otpMode:u,onVerify:eg,onResend:ew,verifyLoading:X,resendLoading:Q,onEditNumber:()=>{M(Array(6).fill("")),c(u===E.REGISTER?j.REGISTER:j.PHONE)}}),i===j.REGISTER&&(0,h.jsx)(D,{onSubmit:eb,submitLoading:en,isOtpEnb:o,onSwitchToLogin:()=>c(o?j.PHONE:j.EMAIL)}),i===j.FORGOT&&(0,h.jsx)($,{onSubmit:ev,submitLoading:ea,onBack:()=>c(j.EMAIL)})]})]})}),(0,h.jsx)(ec,{}),(0,h.jsx)(y.Z,{isOpen:_,type:I.type,title:I.title,subText:I.subText,onConfirm:I.onConfirm,onClose:I.onClose,autoClose:I.autoClose,confirmLabel:I.confirmLabel,cancelLabel:I.cancelLabel,showConfirmButton:I.showConfirmButton,showCancelButton:I.showCancelButton,showCloseIcon:I.showCloseIcon})]})}},52130:function(e,t,s){s.d(t,{kP:function(){return m},iz:function(){return c},VL:function(){return d},Aq:function(){return u}});var n,r,a=s(85893),o=s(67294);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}var i=function(e){return o.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),n||(n=o.createElement("g",{clipPath:"url(#Google_svg__a)"},o.createElement("path",{fill:"#4285F4",d:"M15.81 8.15c0-.655-.053-1.133-.168-1.63H8.156v2.96h4.394c-.089.735-.567 1.842-1.63 2.586l-.015.1 2.367 1.833.164.016c1.506-1.39 2.374-3.437 2.374-5.864"}),o.createElement("path",{fill:"#34A853",d:"M8.157 15.945c2.153 0 3.96-.709 5.28-1.931l-2.516-1.949c-.673.47-1.577.797-2.764.797-2.108 0-3.897-1.39-4.535-3.313l-.094.008-2.46 1.905-.033.09a7.97 7.97 0 0 0 7.122 4.393"}),o.createElement("path",{fill:"#FBBC05",d:"M3.62 9.55a4.9 4.9 0 0 1-.265-1.577c0-.549.097-1.08.257-1.577l-.005-.105-2.492-1.935-.081.038a8 8 0 0 0-.85 3.58c0 1.284.31 2.497.85 3.578z"}),o.createElement("path",{fill:"#EB4335",d:"M8.157 3.083c1.497 0 2.507.646 3.083 1.187l2.25-2.197C12.108.788 10.31 0 8.157 0a7.97 7.97 0 0 0-7.122 4.394l2.578 2.002c.647-1.923 2.436-3.313 4.544-3.313"}))),r||(r=o.createElement("defs",null,o.createElement("clipPath",{id:"Google_svg__a"},o.createElement("path",{fill:"#fff",d:"M0 0h16v16H0z"})))))};let c=e=>{let{text:t="Or, Sign in with your email"}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-2 my-4",children:[(0,a.jsx)("div",{className:"flex-1 border-t border-gray-200"}),(0,a.jsx)("span",{className:"text-gray-400 text-xs whitespace-nowrap",children:t}),(0,a.jsx)("div",{className:"flex-1 border-t border-gray-200"})]})},u=e=>{let{children:t}=e;return(0,a.jsx)("div",{className:"flex items-center border border-gray-300 rounded-xl px-3 py-1 bg-white",children:t})},m=e=>{let{title:t,subtitle:s}=e;return(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-center text-gray-900 mb-1",children:t}),(0,a.jsx)("p",{className:"text-center text-gray-500 text-sm leading-snug",children:s})]})},d=e=>{let{onClick:t,disabled:s}=e;return(0,a.jsxs)("button",{type:"button",onClick:t,disabled:s,className:"w-full flex items-center justify-center gap-3 border border-gray-300 rounded-xl py-3 text-gray-700 font-medium hover:bg-gray-50 transition-colors disabled:opacity-60",children:[(0,a.jsx)(i,{className:"w-5 h-5"}),s?"Please wait...":"Continue with Google"]})}},88357:function(e,t,s){s.d(t,{w_:function(){return i}});var n=s(67294),r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=n.createContext&&n.createContext(r),o=function(){return(o=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var r in t=arguments[s])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},l=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]]);return s};function i(e){return function(t){return n.createElement(c,o({attr:o({},e.attr)},t),function e(t){return t&&t.map(function(t,s){return n.createElement(t.tag,o({key:s},t.attr),e(t.child))})}(e.child))}}function c(e){var t=function(t){var s,r=e.attr,a=e.size,i=e.title,c=l(e,["attr","size","title"]),u=a||t.size||"1em";return t.className&&(s=t.className),e.className&&(s=(s?s+" ":"")+e.className),n.createElement("svg",o({stroke:"currentColor",fill:"
1currentColor",strokeWidth:"0"},t.attr,r,c,{className:s,style:o(o({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),i&&n.createElement("title",null,i),e.children)};return void 0!==a?n.createElement(a.Consumer,null,function(e){return t(e)}):t(r)}}}]);
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.