1import{y as p,a as r,x as i,j as e,I as l,B as g,z as b}from"./index-C62i2RBb.js";import{S as j}from"./shield-check-DREc-502.js";function w(t){return!t||!t.startsWith("/")||t.startsWith("//")?"/":t}function N(){const{next:t}=p({from:"/auth"}),n=w(t),[o,d]=r.useState(""),[u,m]=r.useState(""),[h,c]=r.useState(!1);r.useEffect(()=>{const s=i.auth.onAuthStateChange((a,f)=>{f?.user&&(window.location.href=n)});return i.auth.getSession().then(({data:a})=>{a.session?.user&&(window.location.href=n)}),()=>s.data.subscription.unsubscribe()},[n]);async function x(s){s.preventDefault(),c(!0);const{error:a}=await i.auth.signInWithPassword({email:o,password:u});c(!1),a&&b.error(a.message)}return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-6",children:e.jsxs("form",{onSubmit:x,className:"w-full max-w-sm rounded-2xl border bg-card p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-[0.22em] text-muted-foreground",children:[e.jsx(j,{className:"h-3.5 w-3.5"})," Carbin Intelligence"]}),e.jsx("h1",{className:"mt-2 text-2xl font-bold",children:"Executive sign in"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Private management access. Accounts are provisioned internally."}),e.jsxs("div",{className:"mt-5 space-y-3",children:[e.jsx(l,{type:"email",required:!0,placeholder:"Work email",value:o,onChange:s=>d(s.target.value)}),e.jsx(l,{type:"password",required:!0,placeholder:"Password",value:u,onChange:s=>m(s.target.value)}),e.jsx(g,{type:"submit",disabled:h,className:"w-full",children:"Sign in"}),e.jsx("p",{className:"pt-1 text-center text-[11px] text-muted-foreground",children:"Authorised Carbin personnel only. Contact an administrator for access."})]})]})})}export{N as component,w as safeNext};
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.