PageSourceSearch

https://corama.ai/static/app/assets/Login-BmHluei3.js

js corama.ai collected 2026-10-05 12:55:04 UTC 6,835 bytes, 1 lines download raw bytes

1import{r as s,j as e}from"./react-vendor-gT-OydQZ.js";import{E as j,a as y}from"./eye-DIV_QlfP.js";import{L as v}from"./loader-circle-BGeSVPZL.js";import"./createLucideIcon-in9Qc8Ri.js";const A=()=>{const[c,g]=s.useState(""),[d,f]=s.useState(""),[i,u]=s.useState(!1),[p,n]=s.useState(""),[m,x]=s.useState(!1),[h,w]=s.useState("");s.useEffect(()=>{(async()=>{try{const o=await(await fetch(new URL("/api/auth/recaptcha-site-key",window.location.origin).href)).json();if(o.site_key){w(o.site_key);const t=document.createElement("script");t.src=`https://www.google.com/recaptcha/api.js?render=${o.site_key}`,t.async=!0,document.head.appendChild(t)}}catch(r){console.warn("reCAPTCHA not available:",r)}})()},[]);const b=async a=>{a.preventDefault(),n(""),x(!0);try{let r="";if(h&&window.grecaptcha)try{await new Promise(l=>window.grecaptcha.ready(l)),r=await window.grecaptcha.execute(h,{action:"login"})}catch(l){console.error("reCAPTCHA error:",l)}const t=await(await fetch(new URL("/api/auth/login",window.location.origin).href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c,password:d,recaptcha_token:r})})).json();t.success?window.location.href=t.redirect||"/dashboard":n(t.error||"Login failed. Please try again.")}catch{n("An error occurred. Please try again.")}finally{x(!1)}};return e.jsxs("div",{className:"min-h-screen bg-[#0B0B0F] relative flex flex-col",children:[e.jsx("div",{className:"prelogin-flicker-bg"}),e.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-[#0B0B0F] backdrop-blur-sm",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-2 sm:px-4 lg:px-6 h-16 sm:h-20 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 sm:gap-5",children:[e.jsx("a",{href:"/",children:e.jsx("img",{src:"/static/app/landing/corama-logo-new.png",alt:"CORAMA",className:"h-6 sm:h-8 lg:h-8 w-auto"})}),e.jsx("div",{className:"h-6 w-px bg-white/20"}),e.jsx("a",{href:"https://ihccbusiness.net/",target:"_blank",rel:"noopener noreferrer",children:e.jsx("img",{src:"/static/app/dashboard/IHCC-new.png",alt:"IHCC",className:"h-5 sm:h-6 lg:h-6 w-auto"})})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-4 lg:gap-8",children:[e.jsxs("nav",{className:"prelogin-nav flex items-center gap-2 sm:gap-4 lg:gap-6",children:[e.jsx("a",{href:"/faq",className:"text-gray-300 hover:text-white font-poppins text-[10px] sm:text-sm transition-colors",children:"FAQ"}),e.jsx("a",{href:"/about-us",className:"text-gray-300 hover:text-white font-poppins text-[10px] sm:text-sm transition-colors",children:"About Us"})]}),e.jsx("a",{href:"/signup",className:"text-white font-poppins text-[10px] sm:text-xs lg:text-sm font-semibold px-3 sm:px-4 lg:px-6 py-1.5 sm:py-2 lg:py-2.5 rounded-lg hover:opacity-90 transition-all text-center",style:{background:"linear-gradient(90deg, #1C4262 6%, #284165 96%)"},children:"Sign up"})]})]})}),e.jsx("div",{className:"relative z-10 pt-24 sm:pt-32 pb-16 px-4 sm:px-6 flex items-center justify-center flex-1",children:e.jsx("div",{className:"w-full max-w-md animate-fade-in",children:e.jsxs("div",{className:"bg-gradient-to-br from-[#1c4262] to-[#0f1419] border border-corama-teal/20 rounded-2xl p-8 sm:p-12 shadow-2xl",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("img",{src:"/static/app/landing/corama-logo.png",alt:"CORAMA",className:"h-20 mx-auto mb-6"}),e.jsx("h1",{className:"font-poppins text-2xl text-white",children:"Welcome Back"})]}),p&&e.jsxs("div",{className:"rounded-lg p-4 mb-6 text-sm flex items-start gap-3",style:{backgroundColor:"#2F3C4F"},children:[e.jsx("img",{src:"/static/app/landing/information-icon-white.svg",alt:"Info",className:"w-5 h-5 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-white",children:p})]}),e.jsxs("form",{onSubmit:b,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("label",{className:"block text-gray-300 font-poppins text-sm mb-2",children:"Email"}),e.jsx("input",{type:"email",value:c,onChange:a=>g(a.target.value),placeholder:"Enter your email address",required:!0,autoFocus:!0,autoComplete:"email",className:"w-full bg-white text-gray-900 rounded-lg px-4 py-3.5 font-poppins text-sm border border-gray-300/30 focus:border-corama-teal focus:ring-2 focus:ring-corama-teal/20 outline-none transition-all placeholder:text-gray-400"})]}),e.jsxs("div",{className:"mb-6 relative",children:[e.jsx("label",{className:"block text-gray-300 font-poppins text-sm mb-2",children:"Password"}),e.jsx("input",{type:i?"text":"password",value:d,onChange:a=>f(a.target.value),placeholder:"Enter your password",required:!0,autoComplete:"current-password",className:"w-full bg-white text-gray-900 rounded-lg px-4 py-3.5 pr-12 font-poppins text-sm border border-gray-300/30 focus:border-corama-teal focus:ring-2 focus:ring-corama-teal/20 outline-none transition-all placeholder:text-gray-400"}),e.jsx("button",{type:"button",onClick:()=>u(!i),className:"absolute right-4 top-[38px] text-gray-500 hover:text-corama-teal transition-colors",children:i?e.jsx(j,{size:20}):e.jsx(y,{size:20})})]}),e.jsx("button",{type:"submit",disabled:m,className:"w-full bg-gradient-to-b from-corama-teal via-[#9cd6d7] to-[#85c4c7] text-[#0B0B0F] font-poppins font-semibold py-3.5 rounded-lg hover:shadow-lg hover:shadow-corama-teal/30 transition-all disabled:opacity-70 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:m?e.jsxs(e.Fragment,{children:[e.jsx(v,{className:"animate-spin",size:20}),"Signing in..."]}):"Sign in"})]}),e.jsx("div",{className:"text-center mt-6",children:e.jsx("a",{href:"/reset-password",className:"text-corama-teal font-poppins text-sm hover:text-[#6BA4A7] transition-colors",children:"Forgot your password?"})})]})})}),e.jsx("footer",{className:"bg-[#0B0B0F] pt-8 pb-5",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-white font-poppins",children:[e.jsxs("div",{className:"text-center sm:text-left",children:[e.jsx("div",{children:"180 North Michigan Avenue"}),e.jsx("div",{className:"sm:text-center",children:"Suite 500 Chicago, IL 60601"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4 sm:gap-6",children:[e.jsx("a",{href:"https://ihccbusiness.net/",target:"_blank",rel:"noopener noreferrer",className:"hover:text-white transition-colors",children:"Learn More About IHCC"}),e.jsx("a",{href:"/terms-of-use",className:"hover:text-white transition-colors",children:"Terms of Use"}),e.jsx("a",{href:"/static/docs/policy.pdf",target:"_blank",className:"hover:text-white transition-colors",children:"Policy Notice"}),e.jsx("a",{href:"/faq",className:"hover:text-white transition-colors",children:"Frequently Asked Questions"})]}),e.jsx("div",{children:"[email protected]"})]})})]})};export{A as default};

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.