@neuctra/authix 1.1.76 → 1.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4265,10 +4265,8 @@ const qs = [
|
|
|
4265
4265
|
const [r, s] = R(!1), [i, o] = R(null);
|
|
4266
4266
|
if (te(() => {
|
|
4267
4267
|
s(!0);
|
|
4268
|
-
const h = document.cookie.split(";").map((u) => u.trim()).
|
|
4269
|
-
|
|
4270
|
-
);
|
|
4271
|
-
o(h);
|
|
4268
|
+
const h = document.cookie.split(";").map((u) => u.trim()).find((u) => u.startsWith("a_s_b="));
|
|
4269
|
+
o(h?.split("=")[1] === "true");
|
|
4272
4270
|
}, []), !r) return null;
|
|
4273
4271
|
const a = (c) => typeof c == "function" ? c() : c;
|
|
4274
4272
|
return i === null ? a(e) ?? null : i ? /* @__PURE__ */ n.jsx(n.Fragment, { children: t }) : a(e);
|
|
@@ -4279,10 +4277,8 @@ const qs = [
|
|
|
4279
4277
|
const [r, s] = R(!1), [i, o] = R(null);
|
|
4280
4278
|
if (te(() => {
|
|
4281
4279
|
s(!0);
|
|
4282
|
-
const h = document.cookie.split(";").map((u) => u.trim()).
|
|
4283
|
-
|
|
4284
|
-
);
|
|
4285
|
-
o(!h);
|
|
4280
|
+
const h = document.cookie.split(";").map((u) => u.trim()).find((u) => u.startsWith("a_s_b="));
|
|
4281
|
+
o(h?.split("=")[1] !== "true");
|
|
4286
4282
|
}, []), !r) return null;
|
|
4287
4283
|
const a = (c) => typeof c == "function" ? c() : c;
|
|
4288
4284
|
return i === null ? a(e) ?? null : i ? /* @__PURE__ */ n.jsx(n.Fragment, { children: t }) : a(e);
|
|
@@ -209,7 +209,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
209
|
from { transform: rotate(0deg); }
|
|
210
210
|
to { transform: rotate(360deg); }
|
|
211
211
|
}
|
|
212
|
-
`})]})},es=({logoUrl:t,logoLinkUrl:e,title:r="Sign In to Your Account",subtitle:s="Welcome back! Please enter your details",footerText:i="Secure authentication powered by Neuctra Authix",primaryColor:a="#00C214",gradient:o="linear-gradient(135deg, #22c55e, #00C214)",darkMode:d=!0,signupUrl:h,onSuccess:u,onError:c})=>{const m=me(),[I,R]=b.useState("login"),[p,S]=b.useState(1),[x,T]=b.useState(!1),[P,_]=b.useState(!1),[y,A]=b.useState(null),[g,v]=b.useState(""),[F,N]=b.useState(""),[M,X]=b.useState({email:"",otp:"",newPassword:""}),[C,V]=b.useState(!1),z=d?"#ffffff":"#111827",O=d?"#a1a1aa":"#6b7280",W=d?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)",ee=d?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)";b.useEffect(()=>{if(typeof window<"u"){const E=()=>V(window.innerWidth<768);return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)}},[]);const B=async E=>{E.preventDefault(),_(!0),A(null);try{const j=await m.loginUser({email:g,password:F}),{user:G}=j;if(!G)throw new Error(j.message||"Login failed");A({type:"success",text:`Welcome ${G.name}`}),u?.(G)}catch(j){const G=j.message||"Login failed";A({type:"error",text:G}),c?.(j)}finally{_(!1)}},J=E=>{X({...M,[E.target.name]:E.target.value})},L=async E=>{E.preventDefault(),_(!0),A(null);try{const j=await m.requestResetUserPasswordOTP({email:M.email});j.success?(S(2),A({type:"success",text:j.message||"OTP sent to your email"})):A({type:"error",text:j.message||"Failed to send OTP"})}catch(j){A({type:"error",text:j.message||"Something went wrong"})}finally{_(!1)}},l=async E=>{E.preventDefault(),_(!0),A(null);try{const j=await m.resetUserPassword({email:M.email,otp:M.otp,newPassword:M.newPassword});j.success?(A({type:"success",text:j.message||"Password reset successfully!"}),S(1),X({email:"",otp:"",newPassword:""}),R("login")):A({type:"error",text:j.message||"Reset failed"})}catch(j){A({type:"error",text:j.message||"Something went wrong"})}finally{_(!1)}},w={width:"100%",padding:C?"10px 14px 10px 44px":"10px 16px 10px 44px",backgroundColor:W,border:`1px solid ${ee}`,borderRadius:"10px",color:z,fontSize:"15px",outline:"none",transition:"all 0.2s ease"};return n.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:n.jsxs("div",{style:{minWidth:C?"320px":"380px",maxWidth:C?"340px":"390px",width:"100%",display:"flex",flexDirection:"column",borderRadius:"10px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",backgroundColor:d?"#000000":"#ffffff",padding:C?"30px 24px":"18px 28px"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"10px"},children:[t?n.jsx("a",{href:e||"/",target:"_self",rel:"noopener noreferrer",children:n.jsx("img",{src:t,alt:"Logo",style:{height:"50px",width:"50px",marginBottom:"10px"}})}):n.jsx(Se,{size:40,color:a,style:{marginBottom:"10px"}}),n.jsx("h2",{style:{fontSize:"24px",fontWeight:700,color:z,margin:0},children:I==="login"?r:p===1?"Forgot Password":"Reset Password"}),n.jsx("p",{style:{fontSize:"14px",color:O},children:I==="login"?s:"Follow the steps to reset your password"})]}),I==="login"&&n.jsxs("form",{onSubmit:B,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"login-email",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"Email Address"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(ue,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"login-email",type:"email",placeholder:"Enter your email",value:g,onChange:E=>v(E.target.value),style:w})]})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"login-password",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"Password"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"login-password",type:x?"text":"password",placeholder:"Enter your password",value:F,onChange:E=>N(E.target.value),style:w}),n.jsx("button",{type:"button",onClick:()=>T(!x),style:{position:"absolute",right:"14px",padding:"4px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:O,cursor:"pointer"},children:x?n.jsx(st,{size:20}):n.jsx(it,{size:20})})]})]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"13px"},children:[h&&n.jsx("a",{href:h,style:{color:a,textDecoration:"none",fontWeight:500},children:"Create new account"}),n.jsx("button",{type:"button",onClick:()=>R("forgot"),style:{background:"none",border:"none",color:a,fontWeight:500,cursor:"pointer"},children:"Forgot password?"})]}),n.jsx("button",{type:"submit",disabled:P,style:{padding:"12px",background:o,color:"#fff",border:"none",borderRadius:"10px",fontSize:"14px",fontWeight:600},children:P?"Signing In...":"Sign In"})]}),I==="forgot"&&n.jsxs("form",{onSubmit:p===1?L:l,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[p===1?n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"forgot-email",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"Email Address"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(ue,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"forgot-email",type:"email",name:"email",placeholder:"Enter your email",value:M.email,onChange:J,style:w})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[n.jsx("label",{htmlFor:"otp",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"One-Time Password (OTP)"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(tr,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"otp",type:"text",name:"otp",placeholder:"Enter OTP",value:M.otp,onChange:J,style:w})]})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[n.jsx("label",{htmlFor:"newPassword",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"New Password"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"newPassword",type:"password",name:"newPassword",placeholder:"Enter new password",value:M.newPassword,onChange:J,style:w})]})]})]}),n.jsx("button",{type:"submit",disabled:P,style:{padding:"12px",background:o,color:"#fff",border:"none",fontSize:"14px",borderRadius:"10px",fontWeight:600},children:P?"Please wait...":p===1?"Send Reset OTP":"Reset Password"}),n.jsx("button",{type:"button",onClick:()=>{R("login"),S(1)},style:{background:"none",border:"none",fontSize:"14px",color:O,marginTop:"6px",cursor:"pointer"},children:"Back to Login"})]}),y&&n.jsxs("div",{style:{marginTop:"16px",padding:"12px",borderRadius:"12px",fontSize:"14px",display:"flex",alignItems:"center",gap:"10px",backgroundColor:y.type==="success"?`${a}15`:"rgba(239,68,68,0.1)",border:y.type==="success"?`1px solid ${a}30`:"1px solid rgba(239,68,68,0.3)",color:y.type==="success"?a:"#ef4444"},children:[y.type==="success"?n.jsx(ce,{size:20}):n.jsx(ie,{size:20}),n.jsx("span",{children:y.text})]}),n.jsxs("div",{style:{textAlign:"center",fontSize:"12px",color:O,marginTop:"16px",padding:"0 4px"},children:["Secure authentication powered by"," ",n.jsx("span",{style:{color:a,fontWeight:600},children:"Neuctra Authix"})]})]})})},ts=({children:t,fallback:e=null})=>{const[r,s]=b.useState(!1),[i,a]=b.useState(null);if(b.useEffect(()=>{s(!0);const h=document.cookie.split(";").map(u=>u.trim()).some(u=>u.startsWith("authix_session="));a(h)},[]),!r)return null;const o=d=>typeof d=="function"?d():d;return i===null?o(e)??null:i?n.jsx(n.Fragment,{children:t}):o(e)},rs=({children:t,fallback:e=null})=>{const[r,s]=b.useState(!1),[i,a]=b.useState(null);if(b.useEffect(()=>{s(!0);const h=document.cookie.split(";").map(u=>u.trim()).some(u=>u.startsWith("authix_session="));a(!h)},[]),!r)return null;const o=d=>typeof d=="function"?d():d;return i===null?o(e)??null:i?n.jsx(n.Fragment,{children:t}):o(e)},ns=({isOpen:t,onClose:e,onSuccess:r,onError:s,userId:i,token:a,colors:o})=>{const d=me(),[h,u]=b.useState(!1),[c,m]=b.useState(""),[I,R]=b.useState("warning"),[p,S]=b.useState(!1);if(b.useEffect(()=>{if(typeof window>"u")return;const y=()=>{S(window.innerWidth<640)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]),!t)return null;const x=async()=>{u(!0),R("processing");try{const y=await d.deleteUser({userId:i});y.success?(r(y.message||"Account deleted successfully"),R("success"),setTimeout(()=>{localStorage.removeItem("userInfo"),localStorage.removeItem("userToken"),window.location.href="/"},2e3)):(s(y.message||"Failed to delete account"),R("warning"))}catch(y){s(y.response?.data?.message||"Something went wrong"),R("warning")}finally{u(!1)}},T=c.toLowerCase()==="delete my account",P=y=>{y.target===y.currentTarget&&I!=="processing"&&I!=="success"&&e()},_=()=>{switch(I){case"warning":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px",gap:"16px"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #ef4444, #dc2626)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(We,{size:20})}),n.jsx("div",{children:n.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Delete Account"})})]}),n.jsx("button",{onClick:e,"aria-label":"Close modal",style:{background:"transparent",border:"none",color:o.textTertiary,cursor:"pointer",padding:"8px",borderRadius:"8px",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=o.border,y.currentTarget.style.color=o.textPrimary},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.color=o.textTertiary},children:n.jsx(Ie,{size:20})})]}),n.jsxs("div",{style:{display:"flex",gap:"16px",padding:"20px",background:`${o.error}15`,border:`1px solid ${o.error}30`,borderRadius:"12px",marginBottom:"20px"},children:[n.jsx("div",{style:{color:o.error,flexShrink:0,display:"flex",alignItems:"flex-start"},children:n.jsx(nr,{size:24})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h4",{style:{color:o.textPrimary,margin:"0 0 12px 0",fontSize:"16px",fontWeight:600},children:"Before you proceed..."}),n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[{icon:n.jsx(qn,{size:16}),text:"All your data will be permanently deleted"},{icon:n.jsx(Xn,{size:16}),text:"This action cannot be reversed"},{icon:n.jsx(at,{size:16}),text:"You will lose access to all services"}].map((y,A)=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"14px",color:o.textSecondary},children:[n.jsx("div",{style:{color:o.error,flexShrink:0},children:y.icon}),n.jsx("span",{children:y.text})]},A))})]})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:p?"column-reverse":"row",justifyContent:"flex-end",alignItems:"stretch"},children:[n.jsx("button",{onClick:e,style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${o.border}`,background:"transparent",color:o.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:p?"none":1,minWidth:p?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=o.border,y.currentTarget.style.transform="translateY(-1px)"},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.transform="translateY(0)"},children:"Cancel"}),n.jsxs("button",{onClick:()=>R("confirmation"),style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:"pointer",flex:p?"none":1,minWidth:p?"100%":"140px",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:y=>{y.currentTarget.style.transform="translateY(-1px)",y.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)"},onMouseOut:y=>{y.currentTarget.style.transform="translateY(0)",y.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)"},children:[n.jsx(We,{size:16}),"Continue to Delete"]})]})]});case"confirmation":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #f59e0b, #d97706)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(nr,{size:24})}),n.jsx("div",{style:{flex:1},children:n.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Confirm Deletion"})})]}),n.jsxs("div",{style:{marginBottom:"24px"},children:[n.jsxs("p",{style:{color:o.textSecondary,marginBottom:"16px",fontSize:"14px",lineHeight:"1.5"},children:["Type"," ",n.jsx("strong",{style:{color:o.textPrimary},children:'"delete my account"'})," ","to confirm:"]}),n.jsx("input",{type:"text",value:c,onChange:y=>m(y.target.value),placeholder:"delete my account",style:{width:"100%",padding:"14px 16px",borderRadius:"10px",border:`2px solid ${T?o.success:o.error}`,backgroundColor:"transparent",color:o.textPrimary,fontSize:"15px",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:y=>{y.target.style.boxShadow=`0 0 0 3px ${o.accent}20`},onBlur:y=>{y.target.style.boxShadow="none"},autoFocus:!0}),T&&n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"10px",color:o.success,fontSize:"14px",fontWeight:500},children:[n.jsx(nt,{size:16}),n.jsx("span",{children:"Confirmation accepted"})]})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:"column-reverse",justifyContent:"flex-end",alignItems:"stretch"},children:[n.jsx("button",{onClick:()=>{R("warning"),m("")},style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${o.border}`,background:"transparent",color:o.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:p?"none":1,minWidth:p?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=o.border,y.currentTarget.style.transform="translateY(-1px)"},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.transform="translateY(0)"},children:"Go Back"}),n.jsxs("button",{onClick:x,disabled:!T||h,style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:!T||h?"not-allowed":"pointer",flex:p?"none":1,minWidth:p?"100%":"140px",opacity:!T||h?.6:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:!T||h?"none":"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:y=>{T&&!h&&(y.currentTarget.style.transform="translateY(-1px)",y.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)")},onMouseOut:y=>{T&&!h&&(y.currentTarget.style.transform="translateY(0)",y.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)")},children:[n.jsx(We,{size:16}),"Yes, Delete My Account"]})]})]});case"processing":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #6b7280, #4b5563)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(oe,{size:20,style:{animation:"spin 1s linear infinite"}})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Deleting Account"}),n.jsx("p",{style:{color:o.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Please wait while we process your request"})]})]}),n.jsx("div",{style:{marginBottom:"20px"},children:n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[{text:"Removing your data",active:!0},{text:"Closing active sessions",active:!1},{text:"Finalizing deletion",active:!1}].map((y,A)=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",borderRadius:"8px",transition:"all 0.2s ease",backgroundColor:y.active?`${o.accent}10`:"transparent"},children:[n.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:y.active?o.accent:o.textTertiary,transition:"all 0.3s ease",boxShadow:y.active?`0 0 0 4px ${o.accent}20`:"none"}}),n.jsx("span",{style:{fontSize:"14px",color:y.active?o.textPrimary:o.textSecondary,fontWeight:y.active?500:400},children:y.text})]},A))})}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${o.accent}10`,borderRadius:"10px",fontSize:"14px",color:o.textSecondary},children:[n.jsx(rr,{size:18,style:{color:o.accent,flexShrink:0}}),n.jsx("span",{children:"You will be redirected to the login page shortly"})]})]});case"success":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #10b981, #059669)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(nt,{size:20})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Account Deleted"}),n.jsx("p",{style:{color:o.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Your account has been successfully deleted"})]})]}),n.jsxs("div",{style:{textAlign:"center",padding:"20px",background:`${o.success}10`,border:`1px solid ${o.success}20`,borderRadius:"12px",marginBottom:"24px"},children:[n.jsx(nt,{size:48,style:{color:o.success,marginBottom:"12px",display:"block",margin:"0 auto 12px auto"}}),n.jsx("p",{style:{color:o.textPrimary,fontSize:"16px",fontWeight:600,margin:"0 0 8px 0"},children:"Goodbye!"}),n.jsx("p",{style:{color:o.textSecondary,fontSize:"14px",margin:0,lineHeight:"1.5"},children:"Your account and all associated data have been permanently removed from our systems."})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${o.accent}10`,borderRadius:"10px",fontSize:"14px",color:o.textSecondary,justifyContent:"center"},children:[n.jsx(oe,{size:16,style:{animation:"spin 1s linear infinite",color:o.accent}}),n.jsx("span",{children:"Redirecting to login page..."})]})]})}};return n.jsxs("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.8)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:1e4,animation:"fadeIn 0.3s ease-out"},onClick:P,children:[n.jsx("div",{style:{backgroundColor:o.surface,border:`1px solid ${o.border}`,borderRadius:"20px",width:"100%",maxWidth:"480px",padding:"24px",boxShadow:"0 32px 64px rgba(0,0,0,0.4)",animation:"scaleIn 0.3s ease-out"},className:"delete-modal-container",children:_()}),n.jsx("style",{children:`
|
|
212
|
+
`})]})},es=({logoUrl:t,logoLinkUrl:e,title:r="Sign In to Your Account",subtitle:s="Welcome back! Please enter your details",footerText:i="Secure authentication powered by Neuctra Authix",primaryColor:a="#00C214",gradient:o="linear-gradient(135deg, #22c55e, #00C214)",darkMode:d=!0,signupUrl:h,onSuccess:u,onError:c})=>{const m=me(),[I,R]=b.useState("login"),[p,S]=b.useState(1),[x,T]=b.useState(!1),[P,_]=b.useState(!1),[y,A]=b.useState(null),[g,v]=b.useState(""),[F,N]=b.useState(""),[M,X]=b.useState({email:"",otp:"",newPassword:""}),[C,V]=b.useState(!1),z=d?"#ffffff":"#111827",O=d?"#a1a1aa":"#6b7280",W=d?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)",ee=d?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)";b.useEffect(()=>{if(typeof window<"u"){const E=()=>V(window.innerWidth<768);return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)}},[]);const B=async E=>{E.preventDefault(),_(!0),A(null);try{const j=await m.loginUser({email:g,password:F}),{user:G}=j;if(!G)throw new Error(j.message||"Login failed");A({type:"success",text:`Welcome ${G.name}`}),u?.(G)}catch(j){const G=j.message||"Login failed";A({type:"error",text:G}),c?.(j)}finally{_(!1)}},J=E=>{X({...M,[E.target.name]:E.target.value})},L=async E=>{E.preventDefault(),_(!0),A(null);try{const j=await m.requestResetUserPasswordOTP({email:M.email});j.success?(S(2),A({type:"success",text:j.message||"OTP sent to your email"})):A({type:"error",text:j.message||"Failed to send OTP"})}catch(j){A({type:"error",text:j.message||"Something went wrong"})}finally{_(!1)}},l=async E=>{E.preventDefault(),_(!0),A(null);try{const j=await m.resetUserPassword({email:M.email,otp:M.otp,newPassword:M.newPassword});j.success?(A({type:"success",text:j.message||"Password reset successfully!"}),S(1),X({email:"",otp:"",newPassword:""}),R("login")):A({type:"error",text:j.message||"Reset failed"})}catch(j){A({type:"error",text:j.message||"Something went wrong"})}finally{_(!1)}},w={width:"100%",padding:C?"10px 14px 10px 44px":"10px 16px 10px 44px",backgroundColor:W,border:`1px solid ${ee}`,borderRadius:"10px",color:z,fontSize:"15px",outline:"none",transition:"all 0.2s ease"};return n.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:n.jsxs("div",{style:{minWidth:C?"320px":"380px",maxWidth:C?"340px":"390px",width:"100%",display:"flex",flexDirection:"column",borderRadius:"10px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",backgroundColor:d?"#000000":"#ffffff",padding:C?"30px 24px":"18px 28px"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"10px"},children:[t?n.jsx("a",{href:e||"/",target:"_self",rel:"noopener noreferrer",children:n.jsx("img",{src:t,alt:"Logo",style:{height:"50px",width:"50px",marginBottom:"10px"}})}):n.jsx(Se,{size:40,color:a,style:{marginBottom:"10px"}}),n.jsx("h2",{style:{fontSize:"24px",fontWeight:700,color:z,margin:0},children:I==="login"?r:p===1?"Forgot Password":"Reset Password"}),n.jsx("p",{style:{fontSize:"14px",color:O},children:I==="login"?s:"Follow the steps to reset your password"})]}),I==="login"&&n.jsxs("form",{onSubmit:B,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"login-email",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"Email Address"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(ue,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"login-email",type:"email",placeholder:"Enter your email",value:g,onChange:E=>v(E.target.value),style:w})]})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"login-password",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"Password"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"login-password",type:x?"text":"password",placeholder:"Enter your password",value:F,onChange:E=>N(E.target.value),style:w}),n.jsx("button",{type:"button",onClick:()=>T(!x),style:{position:"absolute",right:"14px",padding:"4px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:O,cursor:"pointer"},children:x?n.jsx(st,{size:20}):n.jsx(it,{size:20})})]})]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"13px"},children:[h&&n.jsx("a",{href:h,style:{color:a,textDecoration:"none",fontWeight:500},children:"Create new account"}),n.jsx("button",{type:"button",onClick:()=>R("forgot"),style:{background:"none",border:"none",color:a,fontWeight:500,cursor:"pointer"},children:"Forgot password?"})]}),n.jsx("button",{type:"submit",disabled:P,style:{padding:"12px",background:o,color:"#fff",border:"none",borderRadius:"10px",fontSize:"14px",fontWeight:600},children:P?"Signing In...":"Sign In"})]}),I==="forgot"&&n.jsxs("form",{onSubmit:p===1?L:l,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[p===1?n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"forgot-email",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"Email Address"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(ue,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"forgot-email",type:"email",name:"email",placeholder:"Enter your email",value:M.email,onChange:J,style:w})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[n.jsx("label",{htmlFor:"otp",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"One-Time Password (OTP)"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(tr,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"otp",type:"text",name:"otp",placeholder:"Enter OTP",value:M.otp,onChange:J,style:w})]})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[n.jsx("label",{htmlFor:"newPassword",style:{fontSize:"14px",fontWeight:500,color:d?"#ffffff":"#000000"},children:"New Password"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),n.jsx("input",{id:"newPassword",type:"password",name:"newPassword",placeholder:"Enter new password",value:M.newPassword,onChange:J,style:w})]})]})]}),n.jsx("button",{type:"submit",disabled:P,style:{padding:"12px",background:o,color:"#fff",border:"none",fontSize:"14px",borderRadius:"10px",fontWeight:600},children:P?"Please wait...":p===1?"Send Reset OTP":"Reset Password"}),n.jsx("button",{type:"button",onClick:()=>{R("login"),S(1)},style:{background:"none",border:"none",fontSize:"14px",color:O,marginTop:"6px",cursor:"pointer"},children:"Back to Login"})]}),y&&n.jsxs("div",{style:{marginTop:"16px",padding:"12px",borderRadius:"12px",fontSize:"14px",display:"flex",alignItems:"center",gap:"10px",backgroundColor:y.type==="success"?`${a}15`:"rgba(239,68,68,0.1)",border:y.type==="success"?`1px solid ${a}30`:"1px solid rgba(239,68,68,0.3)",color:y.type==="success"?a:"#ef4444"},children:[y.type==="success"?n.jsx(ce,{size:20}):n.jsx(ie,{size:20}),n.jsx("span",{children:y.text})]}),n.jsxs("div",{style:{textAlign:"center",fontSize:"12px",color:O,marginTop:"16px",padding:"0 4px"},children:["Secure authentication powered by"," ",n.jsx("span",{style:{color:a,fontWeight:600},children:"Neuctra Authix"})]})]})})},ts=({children:t,fallback:e=null})=>{const[r,s]=b.useState(!1),[i,a]=b.useState(null);if(b.useEffect(()=>{s(!0);const h=document.cookie.split(";").map(u=>u.trim()).find(u=>u.startsWith("a_s_b="));a(h?.split("=")[1]==="true")},[]),!r)return null;const o=d=>typeof d=="function"?d():d;return i===null?o(e)??null:i?n.jsx(n.Fragment,{children:t}):o(e)},rs=({children:t,fallback:e=null})=>{const[r,s]=b.useState(!1),[i,a]=b.useState(null);if(b.useEffect(()=>{s(!0);const h=document.cookie.split(";").map(u=>u.trim()).find(u=>u.startsWith("a_s_b="));a(h?.split("=")[1]!=="true")},[]),!r)return null;const o=d=>typeof d=="function"?d():d;return i===null?o(e)??null:i?n.jsx(n.Fragment,{children:t}):o(e)},ns=({isOpen:t,onClose:e,onSuccess:r,onError:s,userId:i,token:a,colors:o})=>{const d=me(),[h,u]=b.useState(!1),[c,m]=b.useState(""),[I,R]=b.useState("warning"),[p,S]=b.useState(!1);if(b.useEffect(()=>{if(typeof window>"u")return;const y=()=>{S(window.innerWidth<640)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]),!t)return null;const x=async()=>{u(!0),R("processing");try{const y=await d.deleteUser({userId:i});y.success?(r(y.message||"Account deleted successfully"),R("success"),setTimeout(()=>{localStorage.removeItem("userInfo"),localStorage.removeItem("userToken"),window.location.href="/"},2e3)):(s(y.message||"Failed to delete account"),R("warning"))}catch(y){s(y.response?.data?.message||"Something went wrong"),R("warning")}finally{u(!1)}},T=c.toLowerCase()==="delete my account",P=y=>{y.target===y.currentTarget&&I!=="processing"&&I!=="success"&&e()},_=()=>{switch(I){case"warning":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px",gap:"16px"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #ef4444, #dc2626)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(We,{size:20})}),n.jsx("div",{children:n.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Delete Account"})})]}),n.jsx("button",{onClick:e,"aria-label":"Close modal",style:{background:"transparent",border:"none",color:o.textTertiary,cursor:"pointer",padding:"8px",borderRadius:"8px",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=o.border,y.currentTarget.style.color=o.textPrimary},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.color=o.textTertiary},children:n.jsx(Ie,{size:20})})]}),n.jsxs("div",{style:{display:"flex",gap:"16px",padding:"20px",background:`${o.error}15`,border:`1px solid ${o.error}30`,borderRadius:"12px",marginBottom:"20px"},children:[n.jsx("div",{style:{color:o.error,flexShrink:0,display:"flex",alignItems:"flex-start"},children:n.jsx(nr,{size:24})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h4",{style:{color:o.textPrimary,margin:"0 0 12px 0",fontSize:"16px",fontWeight:600},children:"Before you proceed..."}),n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[{icon:n.jsx(qn,{size:16}),text:"All your data will be permanently deleted"},{icon:n.jsx(Xn,{size:16}),text:"This action cannot be reversed"},{icon:n.jsx(at,{size:16}),text:"You will lose access to all services"}].map((y,A)=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"14px",color:o.textSecondary},children:[n.jsx("div",{style:{color:o.error,flexShrink:0},children:y.icon}),n.jsx("span",{children:y.text})]},A))})]})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:p?"column-reverse":"row",justifyContent:"flex-end",alignItems:"stretch"},children:[n.jsx("button",{onClick:e,style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${o.border}`,background:"transparent",color:o.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:p?"none":1,minWidth:p?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=o.border,y.currentTarget.style.transform="translateY(-1px)"},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.transform="translateY(0)"},children:"Cancel"}),n.jsxs("button",{onClick:()=>R("confirmation"),style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:"pointer",flex:p?"none":1,minWidth:p?"100%":"140px",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:y=>{y.currentTarget.style.transform="translateY(-1px)",y.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)"},onMouseOut:y=>{y.currentTarget.style.transform="translateY(0)",y.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)"},children:[n.jsx(We,{size:16}),"Continue to Delete"]})]})]});case"confirmation":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #f59e0b, #d97706)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(nr,{size:24})}),n.jsx("div",{style:{flex:1},children:n.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Confirm Deletion"})})]}),n.jsxs("div",{style:{marginBottom:"24px"},children:[n.jsxs("p",{style:{color:o.textSecondary,marginBottom:"16px",fontSize:"14px",lineHeight:"1.5"},children:["Type"," ",n.jsx("strong",{style:{color:o.textPrimary},children:'"delete my account"'})," ","to confirm:"]}),n.jsx("input",{type:"text",value:c,onChange:y=>m(y.target.value),placeholder:"delete my account",style:{width:"100%",padding:"14px 16px",borderRadius:"10px",border:`2px solid ${T?o.success:o.error}`,backgroundColor:"transparent",color:o.textPrimary,fontSize:"15px",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:y=>{y.target.style.boxShadow=`0 0 0 3px ${o.accent}20`},onBlur:y=>{y.target.style.boxShadow="none"},autoFocus:!0}),T&&n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"10px",color:o.success,fontSize:"14px",fontWeight:500},children:[n.jsx(nt,{size:16}),n.jsx("span",{children:"Confirmation accepted"})]})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:"column-reverse",justifyContent:"flex-end",alignItems:"stretch"},children:[n.jsx("button",{onClick:()=>{R("warning"),m("")},style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${o.border}`,background:"transparent",color:o.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:p?"none":1,minWidth:p?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=o.border,y.currentTarget.style.transform="translateY(-1px)"},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.transform="translateY(0)"},children:"Go Back"}),n.jsxs("button",{onClick:x,disabled:!T||h,style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:!T||h?"not-allowed":"pointer",flex:p?"none":1,minWidth:p?"100%":"140px",opacity:!T||h?.6:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:!T||h?"none":"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:y=>{T&&!h&&(y.currentTarget.style.transform="translateY(-1px)",y.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)")},onMouseOut:y=>{T&&!h&&(y.currentTarget.style.transform="translateY(0)",y.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)")},children:[n.jsx(We,{size:16}),"Yes, Delete My Account"]})]})]});case"processing":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #6b7280, #4b5563)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(oe,{size:20,style:{animation:"spin 1s linear infinite"}})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Deleting Account"}),n.jsx("p",{style:{color:o.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Please wait while we process your request"})]})]}),n.jsx("div",{style:{marginBottom:"20px"},children:n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[{text:"Removing your data",active:!0},{text:"Closing active sessions",active:!1},{text:"Finalizing deletion",active:!1}].map((y,A)=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",borderRadius:"8px",transition:"all 0.2s ease",backgroundColor:y.active?`${o.accent}10`:"transparent"},children:[n.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:y.active?o.accent:o.textTertiary,transition:"all 0.3s ease",boxShadow:y.active?`0 0 0 4px ${o.accent}20`:"none"}}),n.jsx("span",{style:{fontSize:"14px",color:y.active?o.textPrimary:o.textSecondary,fontWeight:y.active?500:400},children:y.text})]},A))})}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${o.accent}10`,borderRadius:"10px",fontSize:"14px",color:o.textSecondary},children:[n.jsx(rr,{size:18,style:{color:o.accent,flexShrink:0}}),n.jsx("span",{children:"You will be redirected to the login page shortly"})]})]});case"success":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #10b981, #059669)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(nt,{size:20})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Account Deleted"}),n.jsx("p",{style:{color:o.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Your account has been successfully deleted"})]})]}),n.jsxs("div",{style:{textAlign:"center",padding:"20px",background:`${o.success}10`,border:`1px solid ${o.success}20`,borderRadius:"12px",marginBottom:"24px"},children:[n.jsx(nt,{size:48,style:{color:o.success,marginBottom:"12px",display:"block",margin:"0 auto 12px auto"}}),n.jsx("p",{style:{color:o.textPrimary,fontSize:"16px",fontWeight:600,margin:"0 0 8px 0"},children:"Goodbye!"}),n.jsx("p",{style:{color:o.textSecondary,fontSize:"14px",margin:0,lineHeight:"1.5"},children:"Your account and all associated data have been permanently removed from our systems."})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${o.accent}10`,borderRadius:"10px",fontSize:"14px",color:o.textSecondary,justifyContent:"center"},children:[n.jsx(oe,{size:16,style:{animation:"spin 1s linear infinite",color:o.accent}}),n.jsx("span",{children:"Redirecting to login page..."})]})]})}};return n.jsxs("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.8)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:1e4,animation:"fadeIn 0.3s ease-out"},onClick:P,children:[n.jsx("div",{style:{backgroundColor:o.surface,border:`1px solid ${o.border}`,borderRadius:"20px",width:"100%",maxWidth:"480px",padding:"24px",boxShadow:"0 32px 64px rgba(0,0,0,0.4)",animation:"scaleIn 0.3s ease-out"},className:"delete-modal-container",children:_()}),n.jsx("style",{children:`
|
|
213
213
|
@keyframes fadeIn {
|
|
214
214
|
from { opacity: 0; }
|
|
215
215
|
to { opacity: 1; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignedIn.d.ts","sourceRoot":"","sources":["../../src/react/SignedIn.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAE9D,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SignedIn.d.ts","sourceRoot":"","sources":["../../src/react/SignedIn.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAE9D,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2BtD,CAAC"}
|