1import{r as a,j as e}from"./vendor-BMTqjksT.js";import{u as E,a as T,t as B,S as F,b as I,C as L,c as R,d as H,e as M,f as q,B as f,L as d,I as p,g as r,h as z,i as c}from"./index-C0VezhcQ.js";import{S as O}from"./separator-dhGOqPeb.js";import{C as Y}from"./checkbox-D6Hx3CuH.js";import{E as G}from"./eye-off-Cf0vp_LU.js";import{E as $}from"./eye-DVSAdHcm.js";import"./trpc-c2OaEmLI.js";import"./d3-ngNJxV2x.js";function Z(){const[,S]=E(),w=T(),j=B.useUtils(),g=(()=>{try{const s=new URLSearchParams(w).get("redirect");if(s&&s.startsWith("/"))return s}catch{}return"/portal"})(),[n,U]=a.useState(""),[i,y]=a.useState(""),[l,v]=a.useState(""),[x,N]=a.useState(!1),[m,h]=a.useState(!1),[u,C]=a.useState(!1),[b,o]=a.useState(!1),k=async t=>{if(t.preventDefault(),!(!n||!i||!l)){if(!u){o(!0),c.error("You must agree to the Terms of Service to create an account.");return}if(o(!1),l.length<8){c.error("Password must be at least 8 characters");return}h(!0);try{const s=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n,email:i,password:l}),credentials:"include"}),A=await s.json();if(!s.ok){c.error(A.error||"Registration failed");return}await j.auth.me.invalidate(),c.success("Account created! Welcome to National Bankruptcy Advocates."),S(g)}catch{c.error("Something went wrong. Please try again.")}finally{h(!1)}}},P=()=>{window.location.href=`/api/auth/google?origin=${encodeURIComponent(window.location.origin)}&returnPath=${encodeURIComponent(g)}`};return e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:78",className:"min-h-screen bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 flex items-center justify-center p-4",children:[e.jsx(F,{"data-loc":"client/src/pages/SignUp.tsx:79",title:"Create Your Attorney Account â Free Bankruptcy Submission Access",description:"Sign up for National Bankruptcy Advocates to access qualified bankruptcy submissions in your area. Free account setup for licensed bankruptcy attorneys. Chapter 7, 13 & 11 submissions available.",canonical:"https://bankruptcylawyersin.com/sign-up",noIndex:!1}),e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:85",className:"w-full max-w-md",children:[e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:87",className:"flex items-center justify-center gap-2 mb-8",children:[e.jsx("div",{"data-loc":"client/src/pages/SignUp.tsx:88",className:"w-10 h-10 bg-amber-500 rounded-lg flex items-center justify-center",children:e.jsx(I,{"data-loc":"client/src/pages/SignUp.tsx:89",className:"w-6 h-6 text-white"})}),e.jsx("span",{"data-loc":"client/src/pages/SignUp.tsx:91",className:"text-white font-bold text-xl",children:"National Bankruptcy Advocates"})]}),e.jsxs(L,{"data-loc":"client/src/pages/SignUp.tsx:94",className:"bg-white/5 border-white/10 text-white backdrop-blur-sm",children:[e.jsxs(R,{"data-loc":"client/src/pages/SignUp.tsx:95",className:"space-y-1",children:[e.jsx(H,{"data-loc":"client/src/pages/SignUp.tsx:96",className:"text-2xl font-bold text-center text-white",children:"Create your account"}),e.jsx(M,{"data-loc":"client/src/pages/SignUp.tsx:97",className:"text-center text-slate-400",children:"Get access to your attorney portal and submissions"})]}),e.jsxs(q,{"data-loc":"client/src/pages/SignUp.tsx:102",className:"space-y-4",children:[e.jsxs(f,{"data-loc":"client/src/pages/SignUp.tsx:104",variant:"outline",className:"w-full bg-white text-slate-900 border-white hover:bg-slate-100 hover:text-slate-900 font-medium h-11",onClick:P,type:"button",children:[e.jsxs("svg",{"data-loc":"client/src/pages/SignUp.tsx:110",className:"w-5 h-5 mr-2",viewBox:"0 0 24 24",children:[e.jsx("path",{"data-loc":"client/src/pages/SignUp.tsx:111",fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{"data-loc":"client/src/pages/SignUp.tsx:112",fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{"data-loc":"client/src/pages/SignUp.tsx:113",fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{"data-loc":"client/src/pages/SignUp.tsx:114",fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]}),e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:119",className:"relative",children:[e.jsx(O,{"data-loc":"client/src/pages/SignUp.tsx:120",className:"bg-white/10"}),e.jsx("span",{"data-loc":"client/src/pages/SignUp.tsx:121",className:"absolute left-1/2 -translate-x-1/2 -translate-y-1/2 bg-slate-800 px-3 text-xs text-slate-400",children:"or create account with email"})]}),e.jsxs("form",{"data-loc":"client/src/pages/SignUp.tsx:127",onSubmit:k,className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:128",className:"space-y-2",children:[e.jsx(d,{"data-loc":"client/src/pages/SignUp.tsx:129",htmlFor:"name",className:"text-slate-300",children:"Full name"}),e.jsx(p,{"data-loc":"client/src/pages/SignUp.tsx:130",id:"name",type:"text",placeholder:"Jane Smith",value:n,onChange:t=>U(t.target.value),required:!0,autoComplete:"name",className:"bg-white/10 border-white/20 text-white placeholder:text-slate-500 focus:border-amber-500 focus:ring-amber-500/20"})]}),e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:142",className:"space-y-2",children:[e.jsx(d,{"data-loc":"client/src/pages/SignUp.tsx:143",htmlFor:"email",className:"text-slate-300",children:"Email address"}),e.jsx(p,{"data-loc":"client/src/pages/SignUp.tsx:144",id:"email",type:"email",placeholder:"[email protected]",value:i,onChange:t=>y(t.target.value),required:!0,autoComplete:"email",className:"bg-white/10 border-white/20 text-white placeholder:text-slate-500 focus:border-amber-500 focus:ring-amber-500/20"})]}),e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:156",className:"space-y-2",children:[e.jsx(d,{"data-loc":"client/src/pages/SignUp.tsx:157",htmlFor:"password",className:"text-slate-300",children:"Password"}),e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:158",className:"relative",children:[e.jsx(p,{"data-loc":"client/src/pages/SignUp.tsx:159",id:"password",type:x?"text":"password",placeholder:"At least 8 characters",value:l,onCh
1ange:t=>v(t.target.value),required:!0,autoComplete:"new-password",minLength:8,className:"bg-white/10 border-white/20 text-white placeholder:text-slate-500 focus:border-amber-500 focus:ring-amber-500/20 pr-10"}),e.jsx("button",{"data-loc":"client/src/pages/SignUp.tsx:170",type:"button",onClick:()=>N(t=>!t),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-white",children:x?e.jsx(G,{"data-loc":"client/src/pages/SignUp.tsx:175",className:"w-4 h-4"}):e.jsx($,{"data-loc":"client/src/pages/SignUp.tsx:175",className:"w-4 h-4"})})]}),e.jsx("p",{"data-loc":"client/src/pages/SignUp.tsx:178",className:"text-xs text-slate-500",children:"Minimum 8 characters"})]}),e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:182",className:`rounded-lg border p-4 space-y-1 transition-colors ${b?"border-red-500/60 bg-red-500/5":"border-white/10 bg-white/5"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/SignUp.tsx:185",className:"flex items-start gap-3",children:[e.jsx(Y,{"data-loc":"client/src/pages/SignUp.tsx:186",id:"terms-agreement",checked:u,onCheckedChange:t=>{C(t===!0),t&&o(!1)},className:"mt-0.5 border-white/30 data-[state=checked]:bg-amber-500 data-[state=checked]:border-amber-500"}),e.jsxs("label",{"data-loc":"client/src/pages/SignUp.tsx:195",htmlFor:"terms-agreement",className:"text-sm text-slate-300 leading-snug cursor-pointer select-none",children:["I have read and agree to the"," ",e.jsx(r,{"data-loc":"client/src/pages/SignUp.tsx:200",href:"/terms/",target:"_blank",className:"text-amber-400 hover:text-amber-300 underline underline-offset-2",onClick:t=>t.stopPropagation(),children:"Terms of Service"})," ","and"," ",e.jsx(r,{"data-loc":"client/src/pages/SignUp.tsx:209",href:"/privacy/",target:"_blank",className:"text-amber-400 hover:text-amber-300 underline underline-offset-2",onClick:t=>t.stopPropagation(),children:"Privacy Policy"}),". I understand that submitting my information may result in attorneys contacting me."]})]}),b&&e.jsx("p",{"data-loc":"client/src/pages/SignUp.tsx:221",className:"text-xs text-red-400 pl-7",children:"You must agree to continue."})]}),e.jsx(f,{"data-loc":"client/src/pages/SignUp.tsx:225",type:"submit",className:"w-full bg-amber-500 hover:bg-amber-600 text-white font-semibold h-11 disabled:opacity-50 disabled:cursor-not-allowed",disabled:m,children:m?"Creating accountâ¦":"Create Account"})]})]}),e.jsxs(z,{"data-loc":"client/src/pages/SignUp.tsx:235",className:"flex flex-col gap-2 text-center text-sm text-slate-400",children:[e.jsxs("p",{"data-loc":"client/src/pages/SignUp.tsx:236",children:["Already have an account?"," ",e.jsx(r,{"data-loc":"client/src/pages/SignUp.tsx:238",href:"/sign-in/",className:"text-amber-400 hover:text-amber-300 font-medium",children:"Sign in"})]}),e.jsxs("p",{"data-loc":"client/src/pages/SignUp.tsx:242",className:"text-xs text-slate-500",children:["Your information is protected under our"," ",e.jsx(r,{"data-loc":"client/src/pages/SignUp.tsx:244",href:"/privacy/",className:"text-slate-400 hover:text-slate-300",children:"Privacy Policy"}),"."]}),e.jsx(r,{"data-loc":"client/src/pages/SignUp.tsx:246",href:"/",className:"text-slate-500 hover:text-slate-300 text-xs",children:"â Back to directory"})]})]})]})]})}export{Z 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.