(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2129],{1110:(e,t,r)=>{"use strict";r.d(t,{L:()=>o});var a=r(95155),n=r(12115),s=r(65142),l=r(76444),i=r(52508);function o(e){let{value:t,onChange:r,label:o="شماره موبایل",placeholder:u="09123456789",error:d,disabled:c=!1,autoFocus:f=!1,required:h=!0}=e,[p,m]=(0,n.useState)(!1),g=(0,n.useCallback)(e=>{let t=e.replace(/\D/g,"").substring(0,11);return t.length<=4?t:t.length<=7?"".concat(t.substring(0,4)," ").concat(t.substring(4)):"".concat(t.substring(0,4)," ").concat(t.substring(4,7)," ").concat(t.substring(7))},[])(t);return(0,a.jsxs)("div",{className:"space-y-2",children:[o&&(0,a.jsxs)(l.J,{htmlFor:"phone",className:"text-white",children:[o,h&&(0,a.jsx)("span",{className:"text-red-400 mr-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(s.p,{id:"phone",type:"tel",dir:"ltr",value:g,onChange:e=>{let t=e.target.value.replace(/\D/g,"");t.length<=11&&r(t)},onFocus:()=>m(!0),onBlur:()=>m(!1),disabled:c,autoFocus:f,autoComplete:"off",placeholder:u,className:"\n            bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10\n            text-left font-mono rounded-2xl\n            ".concat(d?"border-red-500":"","\n            ").concat(p?"ring-2 ring-purple-500":"","\n          ")}),(0,a.jsx)(i.A,{className:"\n            absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4\n            ".concat(d?"text-red-400":p?"text-purple-400":"text-gray-400","\n          ")})]}),d&&(0,a.jsx)("p",{className:"text-sm text-red-400 mt-1",children:d}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"شماره موبایل باید با 09 شروع شود"})]})}},3998:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var a=r(95155);r(12115);var n=r(32467),s=r(83101),l=r(64269);let i=(0,s.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:r,size:s,asChild:o=!1,...u}=e,d=o?n.DX:"button";return(0,a.jsx)(d,{"data-slot":"button",className:(0,l.cn)(i({variant:r,size:s,className:t})),...u})}},7420:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});var a=r(95155);function n(e){let{className:t,variant:r="short",...n}=e;return"full"===r?(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 169.26 53.85",className:t,...n,children:(0,a.jsx)("g",{id:"Layer_2","data-name":"Layer 2",children:(0,a.jsxs)("g",{id:"Layer_1-2","data-name":"Layer 1",children:[(0,a.jsx)("path",{d:"M0,26.2V9.62A9.32,9.32,0,0,1,14,1.55L28.34,9.84l14.37,8.29a9.32,9.32,0,0,1,0,16.14l-14.37,8.3L14,50.86A9.32,9.32,0,0,1,0,42.79Z",fill:"currentColor"}),(0,a.jsx)("circle",{cx:"143.34",cy:"27.93",r:"25.92",fill:"currentColor"}),(0,a.jsx)("path",{d:"M111,7.61v37.2a7.6,7.6,0,0,1-7.6,7.6H61.36a7.61,7.61,0,0,1-7.6-7.6V7.66A7.6,7.6,0,0,1,64.86.91l14,7.23a7.59,7.59,0,0,0,7,0L99.94.85A7.6,7.6,0,0,1,111,7.61Z",fill:"currentColor"}),(0,a.jsx)("ellipse",{cx:"72.81",cy:"30.22",rx:"7.44",ry:"2.29",fill:"#ffffff"}),(0,a.jsx)("circle",{cx:"93.25",cy:"30.22",r:"6.18",fill:"#ffffff"})]})})}):(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 57.26 52.41",className:t,...n,children:(0,a.jsx)("g",{id:"Layer_2","data-name":"Layer 2",children:(0,a.jsxs)("g",{id:"Layer_1-2","data-name":"Layer 1",children:[(0,a.jsx)("path",{d:"M57.26,7.61v37.2a7.6,7.6,0,0,1-7.6,7.6H7.6A7.6,7.6,0,0,1,0,44.81V7.66A7.6,7.6,0,0,1,11.09.91l14,7.23a7.61,7.61,0,0,0,7,0L46.18.85A7.6,7.6,0,0,1,57.26,7.61Z",fill:"currentColor"}),(0,a.jsx)("ellipse",{cx:"19.04",cy:"30.22",rx:"7.44",ry:"2.29",fill:"#ffffff"}),(0,a.jsx)("circle",{cx:"39.48",cy:"30.22",r:"6.18",fill:"#ffffff"})]})})})}r(12115)},10489:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var a=r(12115),n=r(97602),s=r(95155),l=a.forwardRef((e,t)=>(0,s.jsx)(n.sG.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null==(r=e.onMouseDown)||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));l.displayName="Label";var i=l},18332:(e,t,r)=>{"use strict";r.d(t,{Fc:()=>o,TN:()=>u});var a=r(95155),n=r(12115),s=r(83101),l=r(64269);let i=(0,s.F)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:right-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pr-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=n.forwardRef((e,t)=>{let{className:r,variant:n,...s}=e;return(0,a.jsx)("div",{ref:t,role:"alert",className:(0,l.cn)(i({variant:n}),r),...s})});o.displayName="Alert",n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("h5",{ref:t,className:(0,l.cn)("mb-1 font-medium leading-none tracking-tight",r),...n})}).displayName="AlertTitle";let u=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("text-sm [&_p]:leading-relaxed",r),...n})});u.displayName="AlertDescription"},20063:(e,t,r)=>{"use strict";var a=r(47260);r.o(a,"redirect")&&r.d(t,{redirect:function(){return a.redirect}}),r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},23664:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},28722:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});var a=r(95155),n=r(12115),s=r(20063),l=r(52619),i=r.n(l),o=r(36489),u=r(3998),d=r(65142),c=r(55010),f=r(76444),h=r(18332),p=r(23664),m=r(99708),g=r(70532),x=r(57828),v=r(1110),b=r(39137),y=r(66091),A=r(67734),w=r(7420);function _(){let e=(0,s.useRouter)(),t=(0,A.Ps)(),r=(0,A.jA)(),[l,_]=(0,n.useState)(!0),[T,N]=(0,n.useState)({email:"",phone:"",password:""}),[j,E]=(0,n.useState)(!1),[O,C]=(0,n.useState)(!1),[I,P]=(0,n.useState)(""),L=t?"OTP":"EMAIL";(0,n.useEffect)(()=>{_(!1)},[t,r]),(0,n.useEffect)(()=>{N({email:"",phone:"",password:""}),document.querySelectorAll('input[type="tel"], input[name="phone"]').forEach(e=>{e instanceof HTMLInputElement&&(e.value="")})},[]);let k=e=>{let{name:t,value:r}=e.target;N(e=>({...e,[t]:r}))},S=async t=>{if(t.preventDefault(),P(""),"OTP"===L&&!(0,b.To)(T.phone))return void P("شماره تلفن معتبر نیست");C(!0);try{let t="EMAIL"===L?{email:T.email,password:T.password,portalRole:"CUSTOMER"}:{phone:T.phone,password:T.password,portalRole:"CUSTOMER"},r=await (0,o.signIn)("EMAIL"===L?"credentials-email":"credentials-phone",{...t,redirect:!1});(null==r?void 0:r.error)?"CredentialsSignin"===r.error?P("EMAIL"===L?"ایمیل یا رمز عبور اشتباه است":"شماره تلفن یا رمز عبور اشتباه است"):P(r.error):(null==r?void 0:r.ok)&&e.push("/dashboard")}catch(e){P("خطایی در ورود رخ داد")}finally{C(!1)}};return(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-purple-900 via-blue-900 to-indigo-900 p-4",children:(0,a.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-3xl border border-white/20 p-8 shadow-2xl",children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"flex justify-center mb-4",children:(0,a.jsx)("div",{className:"p-4 rounded-2xl",style:{backgroundColor:"#ffa515"},children:(0,a.jsx)(w.W,{className:"h-12 w-auto"})})}),(0,a.jsx)("h2",{className:"text-2xl font-bold text-white mb-2",children:"ورود بازیکن"}),(0,a.jsx)("p",{className:"text-gray-300",children:"به دنیای پلیمو وارد شو"})]}),I&&(0,a.jsx)(h.Fc,{className:"border-red-500/50 bg-red-500/10 text-red-200",children:(0,a.jsx)(h.TN,{children:I})}),(0,a.jsxs)("form",{onSubmit:S,className:"space-y-6",autoComplete:"off",children:["EMAIL"===L?(0,a.jsxs)("div",{children:[(0,a.jsx)(f.J,{htmlFor:"email",className:"text-white",children:"ایمیل"}),(0,a.jsxs)("div",{className:"relative mt-1",children:[(0,a.jsx)(d.p,{id:"email",name:"email",type:"email",required:!0,value:T.email,onChange:k,className:"bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10 rounded-2xl",placeholder:"ایمیل خود را وارد کنید"}),(0,a.jsx)(p.A,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"})]})]}):(0,a.jsx)(v.L,{value:T.phone,onChange:e=>N(t=>({...t,phone:e})),disabled:O}),(0,a.jsxs)("div",{children:[(0,a.jsx)(f.J,{htmlFor:"password",className:"text-white",children:"رمز عبور"}),(0,a.jsxs)("div",{className:"relative mt-1",children:[(0,a.jsx)(c.y,{id:"password",name:"password",type:j?"text":"password",required:!0,value:T.password,onChange:k,className:"bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10 pl-10 rounded-2xl",placeholder:"رمز عبور خود را وارد کنید"}),(0,a.jsx)(m.A,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,a.jsx)("button",{type:"button",onClick:()=>E(!j),className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-white",children:j?(0,a.jsx)(g.A,{className:"h-4 w-4"}):(0,a.jsx)(x.A,{className:"h-4 w-4"})})]})]}),(0,a.jsx)(u.$,{type:"submit",disabled:O,className:"w-full bg-gradient-to-r from-purple-600 to-blue-600 hover:from-purple-700 hover:to-blue-700 text-white font-medium py-3 rounded-2xl shadow-lg transition-all",children:O?"در حال ورود...":"ورود"}),(0,a.jsx)("div",{className:"text-center text-sm space-y-2",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"text-gray-300",children:["حساب کاربری ندارید؟"," "]}),(0,a.jsx)(i(),{href:(0,y.Ku)(),className:"text-amber-400 font-medium hover:text-amber-300 hover:underline",children:"ثبت نام کنید"})]})}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsx)(i(),{href:(0,y.O$)("customer"),className:"text-sm text-gray-300 hover:text-white hover:underline",children:"رمز عبور خود را فراموش کرده‌اید؟"})})]}),(0,a.jsx)("div",{className:"text-center mt-6",children:(0,a.jsx)(i(),{href:"/auth/business/signin",className:"text-medium text-green-400 hover:text-green-300 hover:underline",children:"ورود کسب و کار"})})]})})}},32467:(e,t,r)=>{"use strict";r.d(t,{DX:()=>i,TL:()=>l});var a=r(12115),n=r(94446),s=r(95155);function l(e){let t=function(e){let t=a.forwardRef((e,t)=>{let{children:r,...s}=e;if(a.isValidElement(r)){var l;let e,i,o=(l=r,(i=(e=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.ref:(i=(e=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.props.ref:l.props.ref||l.ref),u=function(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...e)=>{let t=s(...e);return n(...e),t}:n&&(r[a]=n):"style"===a?r[a]={...n,...s}:"className"===a&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}(s,r.props);return r.type!==a.Fragment&&(u.ref=t?(0,n.t)(t,o):o),a.cloneElement(r,u)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=a.forwardRef((e,r)=>{let{children:n,...l}=e,i=a.Children.toArray(n),o=i.find(u);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...l,ref:r,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return(0,s.jsx)(t,{...l,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var i=l("Slot"),o=Symbol("radix.slottable");function u(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o}},39137:(e,t,r)=>{"use strict";function a(e){let t=e.replace(/[\s\-()]/g,"");return/^09\d{9}$/.test(t)?{isValid:!0,normalized:t}:{isValid:!1,message:"شماره موبایل باید با 09 شروع شود و 11 رقم باشد (مثال: 09123456789)"}}function n(e){let t=e.replace(/[\s\-()]/g,"");return 11===t.length&&t.startsWith("09")?"".concat(t.substring(0,4)," ").concat(t.substring(4,7)," ").concat(t.substring(7)):e}r.d(t,{FI:()=>n,To:()=>a})},43610:(e,t,r)=>{"use strict";r.d(t,{T:()=>a});var a=function(e){return e.EMAIL_PASSWORD_AUTH="email_password_auth",e.OTP_AUTH="otp_auth",e.ADMIN_EMAIL_AUTH="admin_email_auth",e.GOOGLE_AUTH="google_auth",e.FORCE_PHONE_MIGRATION="force_phone_migration",e.OTP_RATE_LIMITING="otp_rate_limiting",e.SHOW_AUTH_METHOD_SWITCH="show_auth_method_switch",e.AUTO_SUGGEST_PHONE="auto_suggest_phone",e.SHOW_EMAIL_DEPRECATION_WARNING="show_email_deprecation_warning",e.ALLOW_EMAIL_FALLBACK="allow_email_fallback",e}({})},44876:(e,t,r)=>{"use strict";r.d(t,{FeatureFlagProvider:()=>s,useFeatureFlags:()=>l});var a=r(12115);let n=a.createContext(void 0);function s(e){let{children:t,initialFlags:r}=e,[s,l]=a.useState(r),[i,o]=a.useState(!0),[u,d]=a.useState(null),c=a.useCallback(async()=>{try{o(!0);let e=await fetch("/api/feature-flags",{cache:"no-store",headers:{"Cache-Control":"no-cache, no-store, must-revalidate"}});if(!e.ok)throw Error("API returned ".concat(e.status));let t=await e.json();if(t.success&&t.data){let e={...s};Object.entries(t.data).forEach(t=>{let[r,a]=t;r.startsWith("is")||(e[r]=a)}),l(e),d(null)}}catch(e){console.error("Failed to refresh feature flags:",e),d(null)}finally{o(!1)}},[s]);a.useEffect(()=>{c();let e=setInterval(c,3e4);return()=>clearInterval(e)},[c]);let f=a.useCallback(e=>!!s[e],[s]),h=a.useCallback(e=>s[e],[s]),p=a.useMemo(()=>({flags:s,isEnabled:f,getValue:h,isLoading:i}),[s,f,h,i]);return a.createElement(n.Provider,{value:p},t)}function l(){let e=a.useContext(n);if(!e)throw Error("useFeatureFlags must be used within FeatureFlagProvider");return e}},52508:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]])},55010:(e,t,r)=>{"use strict";r.d(t,{y:()=>s});var a=r(95155);r(12115);var n=r(64269);function s(e){let{className:t,type:r="password",...s}=e;return(0,a.jsx)("input",{type:r,"data-slot":"input",lang:"en",inputMode:"text",autoCapitalize:"none",autoCorrect:"off",autoComplete:(()=>{var e,t;if(s.autoComplete)return s.autoComplete;let r=(null==(e=s.placeholder)?void 0:e.toString())||"",a=(null==(t=s.name)?void 0:t.toString())||"";return r.includes("جدید")||r.includes("new")||a.includes("new")?"new-password":(r.includes("فعلی")||r.includes("current")||a.includes("current"),"current-password")})(),className:(0,n.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),onInput:e=>{let t=e.currentTarget,r=t.value,a=r.replace(/[^a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\s]/g,"");if(r!==a&&(t.value=a,s.onChange)){let r={...e,target:{...t,value:a}};s.onChange(r)}},...s})}},57828:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},64269:(e,t,r)=>{"use strict";r.d(t,{cn:()=>s});var a=r(2821),n=r(75889);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.QP)((0,a.$)(t))}},65142:(e,t,r)=>{"use strict";r.d(t,{p:()=>s});var a=r(95155);r(12115);var n=r(64269);function s(e){let{className:t,type:r,...s}=e;return(0,a.jsx)("input",{type:r,"data-slot":"input",className:(0,n.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...s})}},66091:(e,t,r)=>{"use strict";function a(){return"/auth/customer/signin"}function n(){return"/auth/customer/signup/phone"}function s(){return"/auth/business/signin"}function l(){return"/auth/business/signup/phone"}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"customer";return"business"===e?"/auth/business/forgot-password":"/auth/customer/forgot-password"}r.d(t,{Ku:()=>n,O$:()=>i,aC:()=>s,al:()=>l,kk:()=>a})},67734:(e,t,r)=>{"use strict";r.d(t,{sm:()=>i.FeatureFlagProvider,of:()=>l,jA:()=>o.useEmailPasswordAuth,Ps:()=>o.useOTPAuth});var a=r(43610),n=r(95704);let s={[a.T.EMAIL_PASSWORD_AUTH]:!1,[a.T.OTP_AUTH]:!0,[a.T.ADMIN_EMAIL_AUTH]:!0,[a.T.GOOGLE_AUTH]:!1,[a.T.FORCE_PHONE_MIGRATION]:!1,[a.T.OTP_RATE_LIMITING]:!0,[a.T.SHOW_AUTH_METHOD_SWITCH]:!1,[a.T.AUTO_SUGGEST_PHONE]:!1,[a.T.SHOW_EMAIL_DEPRECATION_WARNING]:!1,[a.T.ALLOW_EMAIL_FALLBACK]:!1},l=function(){let e={};for(let[t,r]of Object.entries(s))e[t]=function(e,t){let r=e.toUpperCase(),a="FEATURE_".concat(r);"OTP_AUTH"===r&&(a="NEXT_PUBLIC_FEATURE_OTP_AUTH");let s=n.env[a];if(void 0===s)return t;if("boolean"==typeof t)return"true"===s||"1"===s;if("number"==typeof t){let e=parseFloat(s);return isNaN(e)?t:e}return s}(t,r);let t=e[a.T.OTP_AUTH];return e[a.T.EMAIL_PASSWORD_AUTH]=!t,function(e){let t=e[a.T.EMAIL_PASSWORD_AUTH],r=e[a.T.OTP_AUTH],n=e[a.T.ADMIN_EMAIL_AUTH];t||r||(console.error("❌ CRITICAL: No authentication method for customers enabled!"),console.error("❌ Enabling OTP_AUTH as fallback..."),e[a.T.OTP_AUTH]=!0,e[a.T.EMAIL_PASSWORD_AUTH]=!1),n||r||(console.error("❌ CRITICAL: No authentication method for admin enabled!"),console.error("❌ Enabling ADMIN_EMAIL_AUTH as fallback..."),e[a.T.ADMIN_EMAIL_AUTH]=!0),e[a.T.FORCE_PHONE_MIGRATION]&&!r&&(console.error("❌ FORCE_PHONE_MIGRATION requires OTP_AUTH to be enabled"),e[a.T.FORCE_PHONE_MIGRATION]=!1)}(e),e}();var i=r(44876),o=r(77339)},70532:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},71847:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(12115);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},s=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,a.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:d,iconNode:c,...f}=e;return(0,a.createElement)("svg",{ref:t,...l,width:n,height:n,stroke:r,strokeWidth:o?24*Number(i)/Number(n):i,className:s("lucide",u),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(f)&&{"aria-hidden":"true"},...f},[...c.map(e=>{let[t,r]=e;return(0,a.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),o=(e,t)=>{let r=(0,a.forwardRef)((r,l)=>{let{className:o,...u}=r;return(0,a.createElement)(i,{ref:l,iconNode:t,className:s("lucide-".concat(n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),o),...u})});return r.displayName=n(e),r}},76444:(e,t,r)=>{"use strict";r.d(t,{J:()=>l});var a=r(95155);r(12115);var n=r(10489),s=r(64269);function l(e){let{className:t,...r}=e;return(0,a.jsx)(n.b,{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}},77339:(e,t,r)=>{"use strict";r.d(t,{useAuthMethodsConfig:()=>u,useEmailPasswordAuth:()=>i,useFeature:()=>s,useFeatureValue:()=>l,useOTPAuth:()=>o});var a=r(44876),n=r(43610);function s(e){let{isEnabled:t}=(0,a.useFeatureFlags)();return t(e)}function l(e){let{getValue:t}=(0,a.useFeatureFlags)();return t(e)}function i(){return s(n.T.EMAIL_PASSWORD_AUTH)}function o(){return s(n.T.OTP_AUTH)}function u(){let e=s(n.T.EMAIL_PASSWORD_AUTH),t=s(n.T.OTP_AUTH);return{isEmailPasswordEnabled:e,isOTPEnabled:t,shouldShowEmailAuth:e,shouldShowPhoneAuth:t,shouldShowAuthSwitch:!1}}},83101:(e,t,r)=>{"use strict";r.d(t,{F:()=>l});var a=r(2821);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,s=a.$,l=(e,t)=>r=>{var a;if((null==t?void 0:t.variants)==null)return s(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:i}=t,o=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],a=null==i?void 0:i[e];if(null===t)return null;let s=n(t)||n(a);return l[e][s]}),u=r&&Object.entries(r).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return s(e,o,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...u}[t]):({...i,...u})[t]===r})?[...e,r,a]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},88555:(e,t,r)=>{Promise.resolve().then(r.bind(r,28722))},94446:(e,t,r)=>{"use strict";r.d(t,{s:()=>l,t:()=>s});var a=r(12115);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}function l(...e){return a.useCallback(s(...e),e)}},97602:(e,t,r)=>{"use strict";r.d(t,{hO:()=>o,sG:()=>i});var a=r(12115),n=r(47650),s=r(32467),l=r(95155),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,s.TL)(`Primitive.${t}`),n=a.forwardRef((e,a)=>{let{asChild:n,...s}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(n?r:t,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function o(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}},99708:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])}},e=>{e.O(0,[4909,2619,6489,8441,1255,7358],()=>e(e.s=88555)),_N_E=e.O()}]);