PageSourceSearch

https://bankruptcy.manus.space/assets/Portal-Bw303Onu.js

js bankruptcy.manus.space collected 2026-10-03 05:00:24 UTC 235,467 bytes, 21 lines download raw bytes

1import{r as u,j as e}from"./vendor-BMTqjksT.js";import{r as Ns,t as w,i as g,C as F,f as M,c as Y,s as Ee,d as U,e as le,v as R,j as V,w as ye,x as we,k as J,L as E,I as W,B as y,D as ie,l as de,y as X,U as re,z as Q,P as Gs,u as ys,n as Z,E as Ge,F as cs,G as ss,H as zs,J as _s,X as ns,K as ws,N as qs,T as Hs,O as os,m as fe,o as ge,Q as Te,R as Pe,V as Ce,W as ke,Y as H,Z as Ts,_ as Ps,$ as ee,a0 as ae,a1 as Qs,a2 as oe,a3 as ze,a4 as me,a5 as Cs,a6 as ks,a7 as We,a8 as Se,a9 as $e,aa as Ie,ab as Ss,ac as Js,M as ce,ad as Ks,ae as Zs,af as Ye,ag as Ls,ah as Ds,ai as Xs,aj as et,ak as As,al as st,am as tt,an as at,ao as rs,ap as ct,g as Bs,aq as nt,ar as ot,a as lt,as as rt,at as it,au as Qe,b as Os,av as is,S as dt,aw as ds,ax as mt,ay as ms,az as ts,aA as xt}from"./index-C0VezhcQ.js";import{S as _e,B as Vs}from"./sparkles-D2L2V_UA.js";import{P as Le}from"./plus-D4rfRKof.js";import{T as ls}from"./trash-2-CA8IhsIs.js";import{S as pt}from"./save-DUOKGcc5.js";import{P as Fs}from"./pencil-BVTEjTzr.js";import{E as Ue}from"./eye-DVSAdHcm.js";import{S as ut}from"./separator-dhGOqPeb.js";import{E as xs}from"./eye-off-Cf0vp_LU.js";import{I as bt}from"./info-BO-QtXKd.js";import"./trpc-c2OaEmLI.js";import"./d3-ngNJxV2x.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ft=Ns("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
7 * @license lucide-react v0.453.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const as=Ns("PhoneCall",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}],["path",{d:"M14.05 2a9 9 0 0 1 8 7.94",key:"vmijpz"}],["path",{d:"M14.05 6A5 5 0 0 1 18 10",key:"13nbpp"}]]);function gt(){const t=w.useUtils(),{data:a,isLoading:i}=w.portal.getNacbaBadgeStatus.useQuery(),[m,x]=u.useState(""),[o,l]=u.useState(""),[h,v]=u.useState(!1),p=w.portal.claimNacbaMembership.useMutation({onSuccess:()=>{g.success("Claim submitted — your NACBA membership claim is under review."),t.portal.getNacbaBadgeStatus.invalidate(),x(""),l("")},onError:N=>{g.error(N.message??"Submission failed")}}),b=async N=>{N.preventDefault();const P=parseInt(o,10);if(!m.trim()){g.error("Member number is required");return}if(!P||P<1970||P>new Date().getFullYear()){g.error("Please enter a valid year (1970 – present)");return}v(!0);try{await p.mutateAsync({nacbaMemberNumber:m.trim(),nacbaMemberSince:P})}finally{v(!1)}};if(i)return e.jsx(F,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:53",className:"border border-border",children:e.jsx(M,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:54",className:"p-6",children:e.jsx("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:55",className:"h-24 bg-muted animate-pulse rounded"})})});const T=a?.nacbaBadgeStatus??"none";return e.jsxs(F,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:64",className:"border border-border",children:[e.jsx(Y,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:65",className:"pb-3",children:e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:66",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:67",className:"w-10 h-10 rounded-full bg-accent/10 flex items-center justify-center flex-shrink-0",children:e.jsx(Ee,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:68",className:"w-5 h-5 text-accent"})}),e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:70",children:[e.jsx(U,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:71",className:"text-base",children:"NACBA Member Badge"}),e.jsx(le,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:72",className:"text-xs mt-0.5",children:"National Association of Consumer Bankruptcy Attorneys"})]}),T==="verified"&&e.jsxs(R,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:77",className:"ml-auto bg-emerald-100 text-emerald-800 border-emerald-200 text-xs",children:[e.jsx(V,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:78",className:"w-3 h-3 mr-1"})," Verified"]}),T==="pending"&&e.jsxs(R,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:82",className:"ml-auto bg-amber-100 text-amber-800 border-amber-200 text-xs",children:[e.jsx(ye,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:83",className:"w-3 h-3 mr-1"})," Pending Review"]}),T==="rejected"&&e.jsxs(R,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:87",className:"ml-auto bg-red-100 text-red-800 border-red-200 text-xs",children:[e.jsx(we,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:88",className:"w-3 h-3 mr-1"})," Rejected"]})]})}),e.jsxs(M,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:94",className:"space-y-4",children:[T==="verified"&&e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:97",className:"rounded-lg bg-emerald-50 border border-emerald-200 p-4 space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:98",className:"flex items-center gap-2 text-emerald-800 font-semibold text-sm",children:[e.jsx(V,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:99",className:"w-4 h-4"}),"Your NACBA membership has been verified"]}),e.jsx("p",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:102",className:"text-xs text-emerald-700",children:"Your NACBA Member Badge is now displayed on your public profile and directory listing."}),e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:105",className:"grid grid-cols-2 gap-3 mt-3 text-xs text-emerald-800",children:[e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:106",children:[e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:107",className:"text-emerald-600 block uppercase tracking-wide text-[10px]",children:"Member Number"}),e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:108",className:"font-medium",children:a?.nacbaMemberNumber??"—"})]}),e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:110",children:[e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:111",className:"text-emerald-600 block uppercase tracking-wide text-[10px]",children:"Member Since"}),e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:112",className:"font-medium",children:a?.nacbaMemberSince??"—"})]}),a?.nacbaBadgeVerifiedAt&&e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:115",className:"col-span-2",children:[e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:116",className:"text-emerald-600 block uppercase tracking-wide text-[10px]",children:"Verified On"}),e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:117",className:"font-medium",children:new Date(a.nacbaBadgeVerifiedAt).toLocaleDateString()})]})]})]}),T==="pending"&&e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:128",className:"rounded-lg bg-amber-50 border border-amber-200 p-4 space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:129",className:"flex items-center gap-2 text-amber-800 font-semibold text-sm",children:[e.jsx(ye,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:130",className:"w-4 h-4"}),"Your claim is under review"]}),e.jsx("p",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:133",className:"text-xs text-amber-700",children:"Our team will verify your NACBA membership and approve your badge within 1–2 business days."}),e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:136",className:"grid grid-cols-2 gap-3 mt-3 text-xs text-amber-800",children:[e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:137",children:[e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:138",className:"text-amber-600 block uppercase tracking-wide text-[10px]",children:"Member Number"}),e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:139",className:"font-medium",children:a?.nacbaMemberNumber??"—"})]}),e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:141",children:[e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:142",className:"text-amber-600 block uppercase tracking-wide text-[10px]",children:"Member Since"}),e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:143",className:"font-medium",children:a?.nacbaMemberSince??"—"})]})]})]}),T==="rejected"&&e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:151",className:"rounded-lg bg-red-50 border border-red-200 p-4 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:152",className:"flex items-center gap-2 text-red-800 font-semibold text-sm",children:[e.jsx(we,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:153",className:"w-4 h-4"}),"Your claim was not approved"]}),a?.nacbaBadgeRejectedReason&&e.jsxs("p",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:157",className:"text-xs text-red-700",children:[e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:158",className:"font-medium",children:"Reason: "}),a.nacbaBadgeRejectedReason]}),e.jsx("p",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:161",className:"text-xs text-red-600",children:"You may re-submit your claim below with corrected information."})]}),(T==="none"||T==="rejected")&&e.jsxs("form",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:169",onSubmit:b,className:"space-y-4",children:[T==="none"&&e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:171",className:"flex items-start gap-2 p-3 rounded-lg bg-muted/50 text-xs text-muted-foreground",children:[e.jsx(J,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:172",className:"w-4 h-4 flex-shrink-0 mt-0.5 text-accent"}),e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:173",children:"Are you a NACBA member? Submit your member number and join year and our team will verify your membership and add the badge to your profile."})]}),e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:178",className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:179",className:"space-y-1.5",children:[e.jsxs(E,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:180",htmlFor:"nacba-member-number",className:"text-xs font-medium",children:["NAC
11BA Member Number ",e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:181",className:"text-destructive",children:"*"})]}),e.jsx(W,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:183",id:"nacba-member-number",value:m,onChange:N=>x(N.target.value),placeholder:"e.g. 12345",className:"h-9 text-sm",maxLength:50,required:!0})]}),e.jsxs("div",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:193",className:"space-y-1.5",children:[e.jsxs(E,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:194",htmlFor:"nacba-member-since",className:"text-xs font-medium",children:["Member Since (Year) ",e.jsx("span",{"data-loc":"client/src/components/NacbaBadgeCard.tsx:195",className:"text-destructive",children:"*"})]}),e.jsx(W,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:197",id:"nacba-member-since",value:o,onChange:N=>l(N.target.value),placeholder:`e.g. ${new Date().getFullYear()-5}`,className:"h-9 text-sm",type:"number",min:1970,max:new Date().getFullYear(),required:!0})]})]}),e.jsx(y,{"data-loc":"client/src/components/NacbaBadgeCard.tsx:210",type:"submit",disabled:h||p.isPending,className:"w-full",size:"sm",children:h||p.isPending?"Submitting…":"Submit NACBA Membership Claim"})]})]})]})}function ps({open:t,onClose:a,firmName:i,assignedLeadCount:m,onViewLeads:x,onUpdateProfile:o,autoVerified:l}){return e.jsx(ie,{"data-loc":"client/src/components/WelcomeModal.tsx:29",open:t,onOpenChange:h=>!h&&a(),children:e.jsxs(de,{"data-loc":"client/src/components/WelcomeModal.tsx:30",className:"max-w-md p-0 overflow-hidden border-border",children:[e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:32",className:"bg-gradient-to-br from-emerald-600 to-emerald-700 px-8 pt-8 pb-6 text-white text-center",children:[e.jsx("div",{"data-loc":"client/src/components/WelcomeModal.tsx:33",className:"w-16 h-16 bg-white/20 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(V,{"data-loc":"client/src/components/WelcomeModal.tsx:34",className:"w-8 h-8 text-white"})}),e.jsx("h2",{"data-loc":"client/src/components/WelcomeModal.tsx:36",className:"text-2xl font-bold mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Welcome to Your Portal!"}),e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:42",className:"text-emerald-100 text-sm leading-relaxed",children:l?`Your profile for ${i} is now verified and live.`:`Your claim for ${i} has been submitted for review.`})]}),e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:50",className:"px-8 py-6 space-y-4",children:[m>0&&e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:53",className:"bg-amber-50 border border-amber-200 rounded-sm p-4 flex items-start gap-3",children:[e.jsx(_e,{"data-loc":"client/src/components/WelcomeModal.tsx:54",className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:55",children:[e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:56",className:"text-sm font-semibold text-amber-900",children:m===1?"1 submission is waiting for you!":`${m} submissions are waiting for you!`}),e.jsxs("p",{"data-loc":"client/src/components/WelcomeModal.tsx:61",className:"text-xs text-amber-700 mt-0.5 leading-relaxed",children:["We retroactively assigned"," ",m===1?"a submission":`${m} submissions`," from your state that came in before you claimed your profile."]})]})]}),l&&e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:72",className:"bg-emerald-50 border border-emerald-200 rounded-sm p-4 flex items-start gap-3",children:[e.jsx(X,{"data-loc":"client/src/components/WelcomeModal.tsx:73",className:"w-5 h-5 text-emerald-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:74",children:[e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:75",className:"text-sm font-semibold text-emerald-900",children:"Your 3 free submission credits are ready"}),e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:76",className:"text-xs text-emerald-700 mt-0.5 leading-relaxed",children:"Use them to unlock incoming submissions at no cost. Once they’re used, you can buy more credits or subscribe to keep receiving submissions — no commitment required."})]})]}),!l&&e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:86",className:"bg-blue-50 border border-blue-200 rounded-sm p-4 text-sm text-blue-800 leading-relaxed",children:["Our team will verify your bar credentials within"," ",e.jsx("span",{"data-loc":"client/src/components/WelcomeModal.tsx:88",className:"font-semibold",children:"1–2 business days"}),". You'll receive an email once approved. In the meantime, you can already update your profile information."]}),e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:94",className:"text-sm font-semibold text-foreground",children:"What would you like to do first?"}),e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:96",className:"space-y-3",children:[e.jsxs("button",{"data-loc":"client/src/components/WelcomeModal.tsx:98",onClick:()=>{x(),a()},className:"w-full flex items-center gap-4 p-4 rounded-sm border border-border bg-card hover:bg-secondary/50 transition-colors text-left group",children:[e.jsx("div",{"data-loc":"client/src/components/WelcomeModal.tsx:102",className:"w-10 h-10 rounded-full bg-accent/10 flex items-center justify-center flex-shrink-0 group-hover:bg-accent/20 transition-colors",children:e.jsx(re,{"data-loc":"client/src/components/WelcomeModal.tsx:103",className:"w-5 h-5 text-accent"})}),e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:105",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:106",className:"text-sm font-semibold text-foreground",children:m>0?"View My Waiting Submissions":"View My Submissions"}),e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:109",className:"text-xs text-muted-foreground mt-0.5",children:m>0?`See the ${m===1?"submission":`${m} submissions`} assigned to you`:"New submissions from your state will appear here"})]}),e.jsx(Q,{"data-loc":"client/src/components/WelcomeModal.tsx:115",className:"w-4 h-4 text-muted-foreground group-hover:text-foreground transition-colors flex-shrink-0"})]}),e.jsxs("button",{"data-loc":"client/src/components/WelcomeModal.tsx:119",onClick:()=>{o(),a()},className:"w-full flex items-center gap-4 p-4 rounded-sm border border-border bg-card hover:bg-secondary/50 transition-colors text-left group",children:[e.jsx("div",{"data-loc":"client/src/components/WelcomeModal.tsx:123",className:"w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center flex-shrink-0 group-hover:bg-purple-200 transition-colors",children:e.jsx(Gs,{"data-loc":"client/src/components/WelcomeModal.tsx:124",className:"w-5 h-5 text-purple-600"})}),e.jsxs("div",{"data-loc":"client/src/components/WelcomeModal.tsx:126",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:127",className:"text-sm font-semibold text-foreground",children:"Update My Profile"}),e.jsx("p",{"data-loc":"client/src/components/WelcomeModal.tsx:128",className:"text-xs text-muted-foreground mt-0.5",children:"Correct your info — changes also update what ChatGPT knows about you"})]}),e.jsx(Q,{"data-loc":"client/src/components/WelcomeModal.tsx:132",className:"w-4 h-4 text-muted-foreground group-hover:text-foreground transition-colors flex-shrink-0"})]})]})]}),e.jsx("div",{"data-loc":"client/src/components/WelcomeModal.tsx:138",className:"px-8 pb-6",children:e.jsx(y,{"data-loc":"client/src/components/WelcomeModal.tsx:139",variant:"ghost",className:"w-full text-muted-foreground hover:text-foreground text-sm",onClick:a,children:"I'll explore on my own"})})]})})}function ht({profileId:t,onBioGenerated:a}){const i=w.portal.generateAiBio.useMutation({onSuccess:m=>{a(m.bio),g.success("AI bio generated — review and save when ready")},onError:m=>g.error(m.message)});return e.jsxs("button",{"data-loc":"client/src/components/ProfileTab.tsx:20",type:"button",onClick:()=>i.mutate({attorneyId:t}),disabled:i.isPending,className:"flex items-center gap-1 text-[11px] font-semibold text-purple-700 hover:text-purple-900 disabled:opacity-50 transition-colors",children:[e.jsx(_e,{"data-loc":"client/src/components/ProfileTab.tsx:26",className:"w-3 h-3"}),i.isPending?"Generating…":"Generate with AI"]})}const jt=[{value:"chapter7",label:"Chapter 7 Bankruptcy"},{value:"chapter11",label:"Chapter 11 Bankruptcy"},{value:"chapter12",label:"Chapter 12 Bankruptcy"},{value:"chapter13",label:"Chapter 13 Bankruptcy"},{value:"debtRelief",label:"Debt Relief"},{value:"foreclosureDefense",label:"Foreclosure Defense"},{value:"businessBankruptcy",label:"Business Bankruptcy"},{value:"assetProtection",label:"Asset Protection"}],Je=["English","Spanish","Mandarin","Cantonese","Vietnamese","Korean","Tagalog","Arabic","French","German","Russian","Portuguese","Hindi","Urdu","Japanese","Italian","Polish","Haitian Creole","Farsi","Hebrew","American Sign Language"],vt=["Eastern Time (ET)","Central Time (CT)","Mountain Time (MT)","Pacific Time (PT)","Alaska Time (AKT)","Hawaii Time (HT)"],Nt=[{value:"$",label:"$ — Budget-Friendly"},{value:"$$",label:"$$ — Moderate"},{value:"$$$",label:"$$$ — Above Average"},{value:"$$$$",label:"$$$$ — Premium"}];function us({label:t,description:a,icon:i,currentUrl:m,onFileSelected:x,onClear:o,pendingPreview:l,isPending:h,onSave:v,shape:p="square"}){const b=u.useRef(null),[T,N]=u.useState(!1),P=l??m,d=!!l;function S(r){if(r.size>5*1024*1024){g.error("Image must be under 5MB");return}if(!["image/jpeg","image/png","image/webp"].includes(r.type)){g.error("Please upload a JPEG, PNG, or WebP image");return}x(r)}const j=u.useCallback(r=>{r.preventDefault(),N(!1);const A=r.dataTransfer.files[0];A&&S(A)},[x]),D=r=>{r.preventDefault(),N(!0)},B=()=>N(!1),s=p==="circle"?"rounded-full":"rounded-sm";return e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:181",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:182",children:[e.jsx("h4",{"data-loc":"client/src/components/ProfileTab.tsx:183",className:"text-xs font-bold tracking-[0.08em] uppercase text-foreground mb-0.5",children:t}),e.jsx("p",{"data-loc":"client/src/components/ProfileTab.tsx:186",className:"text-xs text-muted-foreground",children:a})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:189",className:"flex items-start gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:191",className:`relative flex-shrink-0 border-2 overflow-hidden bg-secondary flex items-center justify-center cursor-pointer transition-colors ${s} ${T?"border-accent border-dashed bg-accent/5":"border-border"} ${p==="circle"?"w-20 h-20":"w-24 h-24"}`,onClick:()=>b.current?.click(),onDrop:j,onDragOver:D,onDragLeave:B,children:[P?e.jsx("img",{"data-loc":"client/src/components/ProfileTab.tsx:201",src:P,alt:t,className:`w-full h-full object-cover ${s}`,loading:"lazy",decoding:"async"}):e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:209",className:"flex flex-col items-center gap-1 p-2 text-center",children:[i,e.jsx("span",{"data-loc":"client/src/components/ProfileTab.tsx:211",className:"text-[10px] text-muted-foreground leading-tight",children:T?"Drop here":"Click or drag"})]}),d&&e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:217",className:"absolute inset-0 bg-black/20 flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/components/ProfileTab.tsx:218",className:"text-[10px] text-white font-semibold bg-black/60 px-1.5 py-0.5 rounded",children:"Unsaved"})})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:226",className:"space-y-2 flex-1",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:227",className:"flex flex-wrap gap-2",children:[e.jsxs(y,{"data-loc":"client/src/components/ProfileTab.tsx:228",size:"sm",variant:"outline",className:"text-xs",onClick:()=>b.current?.click(),children:[e.jsx(qs,{"data-loc":"client/src/components/ProfileTab.tsx:234",className:"w-3.5 h-3.5 mr-1.5"}),P?"Replace":"Choose File"]}),d&&e.jsxs(e.Fragment,{children:[e.jsx(y,{"data-loc":"client/src/components/ProfileTab.tsx:240",size:"sm",className:"text-xs",onClick:v,disabled:h,children:h?"Uploading...":"Save Image"}),e.jsx(y,{"data-loc":"client/src/components/ProfileTab.tsx:248",size:"sm",variant:"ghost",className:"text-xs text-muted-foreground",onClick:o,children:e.jsx(ns,{"data-loc":"client/src/components/ProfileTab.tsx:254",className:"w-3.5 h-3.5"})})]})]}),e.jsxs("p",{"data-loc":"client/src/components/ProfileTab.tsx:260",className:"text-[11px] text-muted-foreground leading-relaxed",children:["JPEG, PNG, or WebP · Max 5MB",e.jsx("br",{"data-loc":"client/src/components/ProfileTab.tsx:262"}),"Drag & drop onto the preview or click to browse."]})]})]}),e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:268",ref:b,type:"file",accept:"image/jpeg,image/png,image/webp",className:"hidden",onChange:r=>{const A=r.target.files?.[0];A&&S(A),r.target.value=""}})]})}function yt({myProfile:t,claimSlug:a,onNavigate:i}){const[,m]=ys(),{data:x,isLoading:o}=w.portal.getAttorneyPreviewBySlug.useQuery({slug:a},{enabled:!!a&&!t}),l=w.useUtils(),[h,v]=u.useState({open:!1,firmName:"",assignedLeadCount:0,autoVerified:!1}),p=w.portal.claimProfile.useMutation({onSuccess:n=>
11{l.portal.getMyProfile.invalidate(),v({open:!0,firmName:x?.firmName??"",assignedLeadCount:n.assignedLeadCount??0,autoVerified:n.autoVerified??!1})},onError:n=>g.error(n.message)}),[b,T]=u.useState({firmName:"",attorneyName:"",phone:"",email:"",website:"",description:"",shortBio:"",address:""}),[N,P]=u.useState([]),[d,S]=u.useState([]),[j,D]=u.useState([]),[B,s]=u.useState({}),[r,A]=u.useState({}),[K,G]=u.useState(null),[z,_]=u.useState(null),[L,$]=u.useState("image/jpeg"),[q,xe]=u.useState(null),[De,Ae]=u.useState(null),[O,Be]=u.useState("image/jpeg");u.useEffect(()=>{t&&(T({firmName:t.firmName??"",attorneyName:t.attorneyName??"",phone:t.phone??"",email:t.email??"",website:t.website??"",description:t.description??"",shortBio:t.shortBio??"",address:t.address??""}),P(t.practiceAreas??[]),S(t.education??[]),D(t.languages??[]),s(t.feeStructure??{}),A(t.officeHours??{}))},[t]);const se=w.portal.updateProfile.useMutation({onSuccess:()=>{g.success("Profile updated successfully"),l.portal.getMyProfile.invalidate()},onError:n=>g.error(n.message)}),I=w.portal.uploadPhoto.useMutation({onSuccess:n=>{n.imageType==="headshot"?(g.success("Headshot uploaded successfully"),G(null),_(null)):(g.success("Firm logo uploaded successfully"),xe(null),Ae(null)),l.portal.getMyProfile.invalidate()},onError:n=>g.error(n.message)});function he(n){return new Promise(f=>{const k=new FileReader;k.onload=c=>{const C=c.target?.result,ne=C.split(",")[1];f({base64:ne??"",mime:n.type,preview:C})},k.readAsDataURL(n)})}async function je(n){const{base64:f,mime:k,preview:c}=await he(n);_(f),$(k),G(c)}async function ve(n){const{base64:f,mime:k,preview:c}=await he(n);Ae(f),Be(k),xe(c)}function Oe(){z&&I.mutate({imageBase64:z,mimeType:L,imageType:"headshot"})}function te(){De&&I.mutate({imageBase64:De,mimeType:O,imageType:"logo"})}function Ve(){se.mutate({firmName:b.firmName||void 0,attorneyName:b.attorneyName||void 0,phone:b.phone||void 0,email:b.email||void 0,website:b.website||void 0,description:b.description||void 0,shortBio:b.shortBio||void 0,address:b.address||void 0,practiceAreas:N.length>0?N:void 0,education:d.length>0?d.filter(n=>n.school.trim()):void 0,languages:j.length>0?j:void 0,feeStructure:Object.values(B).some(n=>n)?B:void 0,officeHours:Object.values(r).some(n=>n)?r:void 0})}function He(){S(n=>[...n,{school:"",degree:"",year:void 0}])}function Fe(n){S(f=>f.filter((k,c)=>c!==n))}function pe(n,f,k){S(c=>c.map((C,ne)=>ne===n?{...C,[f]:k}:C))}function Ne(n){D(f=>f.includes(n)?f.filter(k=>k!==n):[...f,n])}function Re(n){P(f=>f.includes(n)?f.filter(k=>k!==n):[...f,n])}if(!t){if(a){if(o)return e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:468",className:"max-w-lg mx-auto py-16 text-center",children:e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:469",className:"animate-spin w-8 h-8 border-2 border-accent border-t-transparent rounded-full mx-auto"})});if(x){const n=x.claimStatus==="claimed";return e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:476",className:"max-w-xl mx-auto py-10",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:478",className:"text-center mb-8",children:[e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:479",className:"w-14 h-14 bg-emerald-50 border border-emerald-200 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(Z,{"data-loc":"client/src/components/ProfileTab.tsx:480",className:"w-7 h-7 text-emerald-600"})}),e.jsx("h2",{"data-loc":"client/src/components/ProfileTab.tsx:482",className:"text-2xl font-bold mb-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:n?"Profile Already Claimed":"Claim Your Profile"}),e.jsx("p",{"data-loc":"client/src/components/ProfileTab.tsx:485",className:"text-sm text-muted-foreground leading-relaxed",children:n?"This profile has already been claimed by a verified attorney.":"You're one step away from accessing your submissions and managing your listing."})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:493",className:"bg-white border border-border rounded-sm p-6 mb-6 shadow-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:494",className:"flex items-start gap-4",children:[x.photoUrl?e.jsx("img",{"data-loc":"client/src/components/ProfileTab.tsx:496",src:x.photoUrl,alt:x.firmName,className:"w-16 h-16 rounded-sm object-cover flex-shrink-0 border border-border"}):e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:498",className:"w-16 h-16 rounded-sm bg-secondary flex items-center justify-center flex-shrink-0 border border-border",children:e.jsx(Ee,{"data-loc":"client/src/components/ProfileTab.tsx:499",className:"w-7 h-7 text-muted-foreground"})}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:502",className:"flex-1 min-w-0",children:[e.jsx("h3",{"data-loc":"client/src/components/ProfileTab.tsx:503",className:"font-bold text-foreground text-lg leading-tight",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:x.firmName}),x.attorneyName&&e.jsx("p",{"data-loc":"client/src/components/ProfileTab.tsx:507",className:"text-sm text-muted-foreground mt-0.5",children:x.attorneyName}),e.jsx("p",{"data-loc":"client/src/components/ProfileTab.tsx:509",className:"text-xs text-muted-foreground mt-1",children:[x.city,x.state].filter(
11Boolean).join(", ")}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:512",className:"mt-2 flex flex-wrap gap-1.5",children:(x.practiceAreas??[]).slice(0,3).map(f=>e.jsx("span",{"data-loc":"client/src/components/ProfileTab.tsx:514",className:"text-[10px] font-semibold bg-secondary text-muted-foreground border border-border px-2 py-0.5 rounded-full uppercase tracking-wide",children:f.replace("chapter","Ch. ")},f))})]})]}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:521",className:"mt-4 pt-4 border-t border-border",children:e.jsxs("p",{"data-loc":"client/src/components/ProfileTab.tsx:522",className:"text-xs text-muted-foreground leading-relaxed",children:[e.jsx("span",{"data-loc":"client/src/components/ProfileTab.tsx:523",className:"font-semibold text-foreground",children:"Note:"})," The information currently displayed on your profile was sourced from publicly available data. Once you claim your profile, you can correct or update any details — and those corrections will also update what AI assistants like ChatGPT know about you."]})})]}),!n&&e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:531",className:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-6",children:[{icon:_e,label:"Free to Claim",desc:"No cost, no credit card, no strings attached"},{icon:Ee,label:"Update Your Data",desc:"Correct outdated info and update ChatGPT’s knowledge"},{icon:Z,label:"Receive Submissions",desc:"Get matched with bankruptcy clients in your area"}].map(({icon:f,label:k,desc:c})=>e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:537",className:"bg-secondary/40 border border-border rounded-sm p-4 text-center",children:[e.jsx(f,{"data-loc":"client/src/components/ProfileTab.tsx:538",className:"w-5 h-5 text-accent mx-auto mb-2"}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:539",className:"text-xs font-bold text-foreground mb-1",children:k}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:540",className:"text-[11px] text-muted-foreground leading-snug",children:c})]},k))}),e.jsx(y,{"data-loc":"client/src/components/ProfileTab.tsx:546",className:"w-full bg-accent hover:bg-accent/90 text-accent-foreground font-semibold h-12 text-base gap-2",onClick:()=>p.mutate({attorneySlug:a,verificationEmail:x.email??""}),disabled:p.isPending,children:p.isPending?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:557",className:"animate-spin w-4 h-4 border-2 border-white border-t-transparent rounded-full"})," Submitting…"]}):e.jsxs(e.Fragment,{children:[e.jsx(Z,{"data-loc":"client/src/components/ProfileTab.tsx:559",className:"w-5 h-5"})," Claim This Profile — It’s Free"]})}),e.jsx("p",{"data-loc":"client/src/components/ProfileTab.tsx:562",className:"text-xs text-muted-foreground text-center mt-3",children:"Our team will verify your bar credentials within 1–2 business days. You'll receive an email confirmation once approved."})]}),e.jsx(ps,{"data-loc":"client/src/components/ProfileTab.tsx:569",open:h.open,onClose:()=>v(f=>({...f,open:!1})),firmName:h.firmName,assignedLeadCount:h.assignedLeadCount,autoVerified:h.autoVerified,onViewLeads:()=>{i?.("leads"),v(f=>({...f,open:!1}))},onUpdateProfile:()=>{i?.("profile"),v(f=>({...f,open:!1}))}})]})}}return e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:585",className:"max-w-lg mx-auto text-center py-16",children:[e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:586",className:"w-14 h-14 bg-amber-50 border border-amber-200 rounded-full flex items-center justify-center mx-auto mb-5",children:e.jsx(Z,{"data-loc":"client/src/components/ProfileTab.tsx:587",className:"w-7 h-7 text-amber-600"})}),e.jsx("h3",{"data-loc":"client/src/components/ProfileTab.tsx:589",className:"text-xl font-bold mb-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Credentials Not Yet Verified"}),e.jsx("p",{"data-loc":"client/src/components/ProfileTab.tsx:592",className:"text-sm text-muted-foreground mb-6 leading-relaxed",children:"To manage your profile, you need to find your existing listing and verify your credentials. Once verified by our team, you can edit your bio, upload photos, manage practice areas, and start receiving qualified case submissions."}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:595",className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsxs(y,{"data-loc":"client/src/components/ProfileTab.tsx:596",onClick:()=>m("/claim-profile?step=choose&source=portal-profile"),className:"gap-2",children:[e.jsx(Ee,{"data-loc":"client/src/components/ProfileTab.tsx:597",className:"w-4 h-4"})," Verify Your Credentials"]}),e.jsx(y,{"data-loc":"client/src/components/ProfileTab.tsx:599",variant:"outline",onClick:()=>m("/claim-profile?step=choose&source=portal-profile"),className:"gap-2",children:"Find My Profile"})]}),e.jsxs("p",{"data-loc":"client/src/components/ProfileTab.tsx:603",className:"text-xs text-muted-foreground mt-5",children:["Already submitted a verification request?"," ",e.jsx(Ge,{"data-loc":"client/src/components/ProfileTab.tsx:605",className:"text-accent hover:underline",defaultSubject:"Verification / Bar Credentials",children:"Contact us"}
11)," ","if you haven’t heard back within 2 business days."]})]})}return e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:613",className:"max-w-2xl space-y-8",children:[t.verified&&e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:616",className:"flex items-center gap-2 text-sm text-green-700 bg-green-50 border border-green-200 rounded-sm px-4 py-2.5",children:[e.jsx(V,{"data-loc":"client/src/components/ProfileTab.tsx:617",className:"w-4 h-4 flex-shrink-0"}),"Your profile is verified and active. Changes will be reflected publicly within minutes."]}),!t.verified&&t.claimStatus==="pending"&&e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:622",className:"flex items-center gap-2 text-sm text-amber-700 bg-amber-50 border border-amber-200 rounded-sm px-4 py-2.5",children:[e.jsx(V,{"data-loc":"client/src/components/ProfileTab.tsx:623",className:"w-4 h-4 flex-shrink-0"}),"Your credential verification is under review. You'll be notified once approved."]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:629",children:[e.jsx("h3",{"data-loc":"client/src/components/ProfileTab.tsx:630",className:"text-sm font-bold tracking-[0.08em] uppercase text-foreground mb-4",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Profile Images"}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:636",className:"space-y-6 border border-border rounded-sm p-4 bg-secondary/20",children:[e.jsx(us,{"data-loc":"client/src/components/ProfileTab.tsx:638",label:"Attorney Headshot",description:"A professional photo of the attorney. Shown on your public profile.",icon:e.jsx(cs,{"data-loc":"client/src/components/ProfileTab.tsx:641",className:"w-6 h-6 text-muted-foreground"}),currentUrl:t.photoUrl??null,pendingPreview:K,onFileSelected:je,onClear:()=>{_(null),G(null)},isPending:I.isPending&&I.variables?.imageType==="headshot",onSave:Oe,shape:"circle"}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:651",className:"border-t border-border"}),e.jsx(us,{"data-loc":"client/src/components/ProfileTab.tsx:654",label:"Firm Logo",description:"Your law firm's logo. Displayed in directory listings and on your profile.",icon:e.jsx(ss,{"data-loc":"client/src/components/ProfileTab.tsx:657",className:"w-6 h-6 text-muted-foreground"}),currentUrl:t.logoUrl??null,pendingPreview:q,onFileSelected:ve,onClear:()=>{Ae(null),xe(null)},isPending:I.isPending&&I.variables?.imageType==="logo",onSave:te,shape:"square"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:670",children:[e.jsx("h3",{"data-loc":"client/src/components/ProfileTab.tsx:671",className:"text-sm font-bold tracking-[0.08em] uppercase text-foreground mb-3",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Basic Information"}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:677",className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[{key:"firmName",label:"Firm Name",placeholder:"Smith & Associates Law Firm"},{key:"attorneyName",label:"Attorney Name",placeholder:"John Smith, Esq."},{key:"phone",label:"Phone Number",placeholder:"(555) 123-4567"},{key:"email",label:"Contact Email",placeholder:"[email protected]"},{key:"website",label:"Website URL",placeholder:"https://smithlaw.com"},{key:"address",label:"Office Address",placeholder:"3201 W Commercial Blvd #228"}].map(n=>e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:686",children:[e.jsx("label",{"data-loc":"client/src/components/ProfileTab.tsx:687",className:"block text-xs font-semibold text-foreground/70 mb-1.5 tracking-wide uppercase",children:n.label}),e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:690",type:"text",value:b[n.key],onChange:f=>T(k=>({...k,[n.key]:f.target.value})),placeholder:n.placeholder,className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent"})]},n.key))})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:703",children:[e.jsx("h3",{"data-loc":"client/src/components/ProfileTab.tsx:704",className:"text-sm font-bold tracking-[0.08em] uppercase text-foreground mb-3",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Practice Areas"}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:710",className:"flex flex-wrap gap-2",children:jt.map(n=>e.jsx("button",{"data-loc":"client/src/components/ProfileTab.tsx:712",onClick:()=>
11Re(n.value),className:`px-3 py-1.5 text-xs font-medium rounded-sm border transition-colors ${N.includes(n.value)?"bg-accent text-accent-foreground border-accent":"bg-white text-foreground border-border hover:border-accent"}`,children:n.label},n.value))})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:728",children:[e.jsx("h3",{"data-loc":"client/src/components/ProfileTab.tsx:729",className:"text-sm font-bold tracking-[0.08em] uppercase text-foreground mb-3",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Profile Content"}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:735",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:736",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:737",className:"flex items-center justify-between mb-1.5",children:[e.jsx("label",{"data-loc":"client/src/components/ProfileTab.tsx:738",className:"block text-xs font-semibold text-foreground/70 tracking-wide uppercase",children:"Short Bio (shown in directory listings)"}),t&&e.jsx(ht,{"data-loc":"client/src/components/ProfileTab.tsx:741",profileId:t.id,onBioGenerated:n=>T(f=>({...f,shortBio:n}))})]}),e.jsx("textarea",{"data-loc":"client/src/components/ProfileTab.tsx:743",value:b.shortBio,onChange:n=>T(f=>({...f,shortBio:n.target.value})),placeholder:"Brief 1–2 sentence summary of your practice...",rows:2,className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent resize-none"})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:751",children:[e.jsx("label",{"data-loc":"client/src/components/ProfileTab.tsx:752",className:"block text-xs font-semibold text-foreground/70 mb-1.5 tracking-wide uppercase",children:"Full Description (shown on your profile page)"}),e.jsx("textarea",{"data-loc":"client/src/components/ProfileTab.tsx:755",value:b.description,onChange:n=>T(f=>({...f,description:n.target.value})),placeholder:"Describe your firm's experience, approach, and the clients you serve...",rows:5,className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent resize-none"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:767",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:768",className:"flex items-center justify-between mb-3",children:[e.jsxs("h3",{"data-loc":"client/src/components/ProfileTab.tsx:769",className:"text-sm font-bold tracking-[0.08em] uppercase text-foreground flex items-center gap-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:[e.jsx(zs,{"data-loc":"client/src/components/ProfileTab.tsx:773",className:"w-4 h-4"})," Education"]}),e.jsxs("button",{"data-loc":"client/src/components/ProfileTab.tsx:775",type:"button",onClick:He,className:"flex items-center gap-1 text-xs font-medium text-accent hover:text-accent/80 transition-colors",children:[e.jsx(Le,{"data-loc":"client/src/components/ProfileTab.tsx:780",className:"w-3.5 h-3.5"})," Add School"]})]}),d.length===0&&e.jsx("p",{"data-loc":"client/src/components/ProfileTab.tsx:784",className:"text-xs text-muted-foreground italic",children:'No education entries yet. Click "Add School" to add your law school and degrees.'}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:786",className:"space-y-3",children:d.map((n,f)=>e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:788",className:"border border-border rounded-sm p-3 bg-secondary/20 space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:789",className:"flex items-start justify-between",children:[e.jsxs("span",{"data-loc":"client/src/components/ProfileTab.tsx:790",className:"text-xs font-semibold text-foreground/60 uppercase",children:["School #",f+1]}),e.jsx("button",{"data-loc":"client/src/components/ProfileTab.tsx:791",type:"button",onClick:()=>Fe(f),className:"text-red-500 hover:text-red-700 p-0.5",children:e.jsx(ls,{"data-loc":"client/src/components/ProfileTab.tsx:792",className:"w-3.5 h-3.5"})})]}),e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:795",type:"text",value:n.school,onChange:k=>pe(f,"school",k.target.value),placeholder:"e.g., Harvard Law School",className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent"}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:802",className:"grid grid-cols-2 gap-2",children:[e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:803",type:"text",value:n.degree??"",onChange:k=>pe(f,"degree",k.target.value),placeholder:"e.g., Juris Doctor",className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent"}),e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:810",type:"number",value:n.year??"",onChange:k=>pe(f,"year",k.target.value?parseInt(k.target.value):void 0),placeholder:"Graduation year",min:1950,max:2030,className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent"})]})]},f))})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:826",children:[e.jsxs("h3",{"data-loc":"client/src/components/ProfileTab.tsx:827",className:"text-sm font-bold tracking-[0.08em] uppercase text-foreground mb-3 flex items-center gap-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:[e.jsx(_s,{"data-loc":"client/src/components/ProfileTab.tsx:831",className:"w-4 h-4"})," Languages Spoken"]}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:833",className:"flex flex-wrap gap-2",children:Je.map(n=>e.jsx("button",{"data-loc":"client/src/components/ProfileTab.tsx:835",type:"button",onClick:()=>Ne(n),className:`px-3 py-1.5 text-xs font-medium rounded-sm border transition-colors ${j.includes(n)?"bg-accent text-accent-foreground border-accent":"bg-white text-foreground border-border hover:border-accent"}`,children:n},n))}),j.filter(n=>!Je.includes(n)).length>0&&e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:850",className:"mt-2 flex flex-wrap gap-2",children:j.filter(n=>!Je.includes(n)).map(n=>e.jsxs("span",{"data-loc":"client/src/components/ProfileTab.tsx:852",className:"px-3 py-1.5 text-xs font-medium rounded-sm bg-accent text-accent-foreground border border-accent flex items-center gap-1",children:[n,e.jsx("button",{"data-loc":"client/src/components/ProfileTab.tsx:854",type:"button",onClick:()=>Ne(n),className:"ml-1",children:e.jsx(ns,{"data-loc":"client/src/components/ProfileTab.tsx:854",className:"w-3 h-3"})})]},n))}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:859",className:"mt-2",children:e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:860",type:"text",placeholder:"Type another language and press Enter...",className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent",onKeyDown:n=>{if(n.key==="Enter"){n.preventDefault();const f=n.target.value.trim();f&&!j.includes(f)&&(D(k=>[...k,f]),n.target.value="")}}})})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:879",children:[e.jsxs("h3",{"data-loc":"client/src/components/ProfileTab.tsx:880",className:"text-sm font-bold tracking-[0.08em] uppercase text-foreground mb-3 flex items-center gap-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:[e.jsx(ws,{"data-loc":"client/src/components/ProfileTab.tsx:884",className:"w-4 h-4"})," Fee Structure & Payment Options"]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:886",className:"border border-border rounded-sm p-4 bg-secondary/20 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:887",children:[e.jsx("label",{"data-loc":"client/src/components/ProfileTab.tsx:888",className:"block text-xs font-semibold text-foreground
11/70 mb-2 tracking-wide uppercase",children:"Price Range"}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:889",className:"flex flex-wrap gap-2",children:Nt.map(n=>e.jsx("button",{"data-loc":"client/src/components/ProfileTab.tsx:891",type:"button",onClick:()=>s(f=>({...f,priceRange:f.priceRange===n.value?void 0:n.value})),className:`px-3 py-1.5 text-xs font-medium rounded-sm border transition-colors ${B.priceRange===n.value?"bg-accent text-accent-foreground border-accent":"bg-white text-foreground border-border hover:border-accent"}`,children:n.label},n.value))})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:906",children:[e.jsx("label",{"data-loc":"client/src/components/ProfileTab.tsx:907",className:"block text-xs font-semibold text-foreground/70 mb-2 tracking-wide uppercase",children:"Payment Options"}),e.jsx("div",{"data-loc":"client/src/components/ProfileTab.tsx:908",className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[{key:"freeConsultation",label:"Free Initial Consultation"},{key:"paymentPlans",label:"Payment Plans Available"},{key:"flatFee",label:"Flat Fee Options"},{key:"hourly",label:"Hourly Billing"},{key:"contingency",label:"Contingency Fee"}].map(n=>e.jsxs("label",{"data-loc":"client/src/components/ProfileTab.tsx:916",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:917",type:"checkbox",checked:!!B[n.key],onChange:f=>s(k=>({...k,[n.key]:f.target.checked})),className:"w-4 h-4 rounded border-border text-accent focus:ring-accent"}),e.jsx("span",{"data-loc":"client/src/components/ProfileTab.tsx:923",className:"text-sm text-foreground",children:n.label})]},n.key))})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:928",children:[e.jsx("label",{"data-loc":"client/src/components/ProfileTab.tsx:929",className:"block text-xs font-semibold text-foreground/70 mb-1.5 tracking-wide uppercase",children:"Fee Notes"}),e.jsx("textarea",{"data-loc":"client/src/components/ProfileTab.tsx:930",value:B.notes??"",onChange:n=>s(f=>({...f,notes:n.target.value})),placeholder:"e.g., Most Chapter 7 cases handled on a flat fee basis starting at $1,500...",rows:2,className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent resize-none"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:942",children:[e.jsxs("h3",{"data-loc":"client/src/components/ProfileTab.tsx:943",className:"text-sm font-bold tracking-[0.08em] uppercase text-foreground mb-3 flex items-center gap-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:[e.jsx(ye,{"data-loc":"client/src/components/ProfileTab.tsx:947",className:"w-4 h-4"})," Office Hours"]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:949",className:"border border-border rounded-sm p-4 bg-secondary/20 space-y-3",children:[["monday","tuesday","wednesday","thursday","friday","saturday","sunday"].map(n=>e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:951",className:"flex items-center gap-3",children:[e.jsx("span",{"data-loc":"client/src/components/ProfileTab.tsx:952",className:"w-24 text-sm font-medium text-foreground capitalize",children:n}),e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:953",type:"text",value:r[n]??"",onChange:f=>A(k=>({...k,[n]:f.target.value})),placeholder:"e.g., 9:00 AM - 5:00 PM or Closed",className:"flex-1 px-3 py-1.5 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent"})]},n)),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:962",className:"pt-2 border-t border-border space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:963",children:[e.jsx("label",{"data-loc":"client/src/components/ProfileTab.tsx:964",className:"block text-xs font-semibold text-foreground/70 mb-1.5 tracking-wide uppercase",children:"Timezone"}),e.jsxs("select",{"data-loc":"client/src/components/ProfileTab.tsx:965",value:r.timezone??"",onChange:n=>A(f=>({...f,timezone:n.target.value})),className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent",children:[e.jsx("option",{"data-loc":"client/src/components/ProfileTab.tsx:970",value:"",children:"Select timezone..."}),vt.map(n=>e.jsx("option",{"data-loc":"client/src/components/ProfileTab.tsx:971",value:n,children:n},n))]})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:974",children:[e.jsx("label",{"data-loc":"client/src/components/ProfileTab.tsx:975",className:"block text-xs font-semibold text-foreground
11/70 mb-1.5 tracking-wide uppercase",children:"Additional Notes"}),e.jsx("input",{"data-loc":"client/src/components/ProfileTab.tsx:976",type:"text",value:r.notes??"",onChange:n=>A(f=>({...f,notes:n.target.value})),placeholder:"e.g., Evening appointments available upon request",className:"w-full px-3 py-2 text-sm border border-border rounded-sm bg-white focus:outline-none focus:ring-1 focus:ring-accent"})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/ProfileTab.tsx:989",className:"flex items-center gap-3 pt-2",children:[e.jsxs(y,{"data-loc":"client/src/components/ProfileTab.tsx:990",onClick:Ve,disabled:se.isPending,className:"gap-2",children:[e.jsx(pt,{"data-loc":"client/src/components/ProfileTab.tsx:991",className:"w-4 h-4"}),se.isPending?"Saving...":"Save Profile Changes"]}),e.jsx("p",{"data-loc":"client/src/components/ProfileTab.tsx:994",className:"text-xs text-muted-foreground",children:"Changes are reflected on your public profile within minutes."})]}),e.jsx(gt,{"data-loc":"client/src/components/ProfileTab.tsx:1000"}),e.jsx(ps,{"data-loc":"client/src/components/ProfileTab.tsx:1003",open:h.open,onClose:()=>v(n=>({...n,open:!1})),firmName:h.firmName,assignedLeadCount:h.assignedLeadCount,autoVerified:h.autoVerified,onViewLeads:()=>i?.("leads"),onUpdateProfile:()=>i?.("profile")})]})}const bs={chapter7:"Chapter 7",chapter11:"Chapter 11",chapter12:"Chapter 12",chapter13:"Chapter 13",debtRelief:"Debt Relief",foreclosureDefense:"Foreclosure Defense",other:"Other"},wt={chapter7:"bg-blue-50 text-blue-700 border-blue-200",chapter11:"bg-purple-50 text-purple-700 border-purple-200",chapter12:"bg-teal-50 text-teal-700 border-teal-200",chapter13:"bg-indigo-50 text-indigo-700 border-indigo-200",debtRelief:"bg-green-50 text-green-700 border-green-200",foreclosureDefense:"bg-orange-50 text-orange-700 border-orange-200",other:"bg-secondary text-muted-foreground border-border"},ue={caseType:"chapter7",outcome:"",debtDischarged:"",description:"",year:String(new Date().getFullYear())};function Tt({attorneyId:t}){const[a,i]=u.useState(!1),[m,x]=u.useState(null),[o,l]=u.useState(ue),[h,v]=u.useState(null),p=w.useUtils(),{data:b=[],isLoading:T}=w.portal.getCaseResults.useQuery({attorneyId:t}),N=w.portal.addCaseResult.useMutation({onSuccess:()=>{g.success("Case result added successfully"),p.portal.getCaseResults.invalidate({attorneyId:t}),i(!1),l(ue)},onError:s=>g.error(s.message)}),P=w.portal.updateCaseResult.useMutation({onSuccess:()=>{g.success("Case result updated"),p.portal.getCaseResults.invalidate({attorneyId:t}),i(!1),x(null),l(ue)},onError:s=>g.error(s.message)}),d=w.portal.deleteCaseResult.useMutation({onSuccess:()=>{g.success("Case result deleted"),p.portal.getCaseResults.invalidate({attorneyId:t}),v(null)},onError:s=>g.error(s.message)});function S(s){x(s.id),l({caseType:s.caseType,outcome:s.outcome,debtDischarged:s.debtDischarged??"",description:s.description??"",year:s.year?String(s.year):""}),i(!0)}function j(){x(null),l(ue),i(!0)}function D(){const s=o.year?parseInt(o.year):void 0;if(!o.outcome.trim()){g.error("Outcome is required");return}const r={caseType:o.caseType,outcome:o.outcome.trim(),debtDischarged:o.debtDischarged.trim()||void 0,description:o.description.trim()||void 0,year:s};m!==null?P.mutate({id:m,...r}):N.mutate(r)}const B=new Date().getFullYear();return e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:144",children:[e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:145",className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:146",children:[e.jsx("h2",{"data-loc":"client/src/components/CaseResultsTab.tsx:147",className:"text-xl font-bold",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Case Results"}),e.jsx("p",{"data-loc":"client/src/components/CaseResultsTab.tsx:148",className:"text-sm text-muted-foreground mt-0.5",children:"Showcase successful outcomes to build trust with prospective clients."})]}),e.jsxs(y,{"data-loc":"client/src/components/CaseResultsTab.tsx:152",onClick:j,className:"gap-2",children:[e.jsx(Le,{"data-loc":"client/src/components/CaseResultsTab.tsx:153",className:"w-4 h-4"})," Add Case Result"]})]}),T?e.jsx("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:158",className:"space-y-3",children:[1,2].map(s=>e.jsx("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:160",className:"h-24 bg-secondary/40 rounded-sm animate-pulse"},s))}):b.length===0?e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:164",className:"text-center py-16 bg-white border border-border rounded-sm",children:[e.jsx(Hs,{"data-loc":"client/src/components/CaseResultsTab.tsx:165",className:"w-12 h-12 text-muted-foreground
11/30 mx-auto mb-4"}),e.jsx("h3",{"data-loc":"client/src/components/CaseResultsTab.tsx:166",className:"text-lg font-bold mb-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"No case results yet"}),e.jsx("p",{"data-loc":"client/src/components/CaseResultsTab.tsx:169",className:"text-sm text-muted-foreground mb-5 max-w-sm mx-auto",children:"Add notable case outcomes to demonstrate your track record. These appear publicly on your profile."}),e.jsxs(y,{"data-loc":"client/src/components/CaseResultsTab.tsx:172",onClick:j,variant:"outline",className:"gap-2",children:[e.jsx(Le,{"data-loc":"client/src/components/CaseResultsTab.tsx:173",className:"w-4 h-4"})," Add Your First Case Result"]})]}):e.jsx("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:177",className:"space-y-3",children:b.map(s=>e.jsx("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:179",className:"bg-white border border-border rounded-sm p-5",children:e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:180",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:181",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:182",className:"flex items-center gap-2 flex-wrap mb-2",children:[e.jsx(R,{"data-loc":"client/src/components/CaseResultsTab.tsx:183",variant:"outline",className:`text-xs ${wt[s.caseType]??""}`,children:bs[s.caseType]??s.caseType}),s.year&&e.jsxs("span",{"data-loc":"client/src/components/CaseResultsTab.tsx:187",className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(os,{"data-loc":"client/src/components/CaseResultsTab.tsx:188",className:"w-3 h-3"})," ",s.year]}),s.debtDischarged&&e.jsxs("span",{"data-loc":"client/src/components/CaseResultsTab.tsx:192",className:"flex items-center gap-1 text-xs text-green-700 font-medium",children:[e.jsx(ws,{"data-loc":"client/src/components/CaseResultsTab.tsx:193",className:"w-3 h-3"})," ",s.debtDischarged," discharged"]})]}),e.jsx("p",{"data-loc":"client/src/components/CaseResultsTab.tsx:197",className:"font-semibold text-foreground",children:s.outcome}),s.description&&e.jsx("p",{"data-loc":"client/src/components/CaseResultsTab.tsx:199",className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:s.description})]}),e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:202",className:"flex items-center gap-2 shrink-0",children:[e.jsx("button",{"data-loc":"client/src/components/CaseResultsTab.tsx:203",onClick:()=>S(s),className:"p-1.5 hover:bg-secondary rounded-sm transition-colors text-muted-foreground hover:text-foreground",title:"Edit",children:e.jsx(Fs,{"data-loc":"client/src/components/CaseResultsTab.tsx:208",className:"w-4 h-4"})}),e.jsx("button",{"data-loc":"client/src/components/CaseResultsTab.tsx:210",onClick:()=>v(s.id),className:"p-1.5 hover:bg-red-50 rounded-sm transition-colors text-muted-foreground hover:text-red-600",title:"Delete",children:e.jsx(ls,{"data-loc":"client/src/components/CaseResultsTab.tsx:215",className:"w-4 h-4"})})]})]})},s.id))}),e.jsx(ie,{"data-loc":"client/src/components/CaseResultsTab.tsx:225",open:a,onOpenChange:s=>{s||(i(!1),x(null),l(ue))},children:e.jsxs(de,{"data-loc":"client/src/components/CaseResultsTab.tsx:226",className:"max-w-lg",children:[e.jsx(fe,{"data-loc":"client/src/components/CaseResultsTab.tsx:227",children:e.jsx(ge,{"data-loc":"client/src/components/CaseResultsTab.tsx:228",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:m!==null?"Edit Case Result":"Add Case Result"})}),e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:232",className:"space-y-4 mt-2",children:[e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:233",children:[e.jsx(E,{"data-loc":"client/src/components/CaseResultsTab.tsx:234",children:"Case Type *"}),e.jsxs(Te,{"data-loc":"client/src/components/CaseResultsTab.tsx:235",value:o.caseType,onValueChange:s=>l(r=>({...r,caseType:s})),children:[e.jsx(Pe,{"data-loc":"client/src/components/CaseResultsTab.tsx:236",className:"mt-1",children:e.jsx(Ce,{"data-loc":"client/src/components/CaseResultsTab.tsx:237"})}),e.jsx(ke,{"data-loc":"client/src/components/CaseResultsTab.tsx:239",children:Object.entries(bs).map(([s,r])=>e.jsx(H,{"data-loc":"client/src/components/CaseResultsTab.tsx:241",value:s,children:r},s))})]})]}),e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:246",children:[e.jsx(E,{"data-loc":"client/src/components/CaseResultsTab.tsx:247",children:"Outcome Summary *"}),e.jsx(W,{"data-loc":"client/src/components/CaseResultsTab.tsx:248",className:"mt-1",placeholder:"e.g., $85,000 in unsecured debt fully discharged",value:o.outcome,onChange:s=>l(r=>({...r,outcome:s.target.value})),maxLength:255})]}),e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:256",className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:257",children:[e.jsx(E,{"data-loc":"client/src/components/CaseResultsTab.tsx:258",children:"Debt Discharged (optional)"}),e.jsx(W,{"data-loc":"client/src/components/CaseResultsTab.tsx:259",className:"mt-1",placeholder:"e.g., $85,000",value:o.debtDischarged,onChange:s=>l(r=>({...r,debtDischarged:s.target.value})),maxLength:100})]}),e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:267",children:[e.jsx(E,{"data-loc":"client/src/components/CaseResultsTab.tsx:268",children:"Year (optional)"}),e.jsx(W,{"data-loc":"client/src/components/CaseResultsTab.tsx:269",className:"mt-1",type:"number",placeholder:String(B),value:o.year,onChange:s=>l(r=>({...r,year:s.target.value})),min:1990,max:B})]})]}),e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:280",children:[e.jsx(E,{"data-loc":"client/src/components/CaseResultsTab.tsx:281",children:"Description (optional)"}),e.jsx(Ts,{"data-loc":"client/src/components/CaseResultsTab.tsx:282",className:"mt-1 resize-none",rows:3,placeholder:"Brief description of the case circumstances and result...",value:o.description,onChange:s=>l(r=>({...r,description:s.target.value})),maxLength:2e3}),e.jsxs("p",{"data-loc":"client/src/components/CaseResultsTab.tsx:290",className:"text-xs text-muted-foreground mt-1",children:[o.description.length,"/2000"]})]}),e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:292",className:"flex gap-3 pt-2",children:[e.jsx(y,{"data-loc":"client/src/components/CaseResultsTab.tsx:293",className:"flex-1",onClick:D,disabled:N.isPending||P.isPending,children:N.isPending||P.isPending?"Saving...":m!==null?"Save Changes":"Add Case Result"}),e.jsx(y,{"data-loc":"client/src/components/CaseResultsTab.tsx:300",variant:"outline",onClick:()=>{i(!1),x(null),l(ue)},children:"Cancel"})]})]})]})}),e.jsx(ie,{"data-loc":"client/src/components/CaseResultsTab.tsx:309",open:h!==null,onOpenChange:s=>{s||v(null)},children:e.jsxs(de,{"data-loc":"client/src/components/CaseResultsTab.tsx:310",className:"max-w-sm",children:[e.jsx(fe,{"data-loc":"client/src/components/CaseResultsTab.tsx:311",children:e.jsx(ge,{"data-loc":"client/src/components/CaseResultsTab.tsx:312",children:"Delete Case Result?"})}),e.jsx("p",{"data-loc":"client/src/components/CaseResultsTab.tsx:314",className:"text-sm text-muted-foreground",children:"This will permanently remove this case result from your public profile. This action cannot be undone."}),e.jsxs("div",{"data-loc":"client/src/components/CaseResultsTab.tsx:317",className:"flex gap-3 mt-4",children:[e.jsx(y,{"data-loc":"client/src/components/CaseResultsTab.tsx:318",variant:"destructive",className:"flex-1",onClick:()=>h!==null&&d.mutate({id:h}),disabled:d.isPending,children:d.isPending?"Deleting...":"Delete"}),e.jsx(y,{"data-loc":"client/src/components/CaseResultsTab.tsx:326",variant:"outline",onClick:()=>v(null),children:"Cancel"})]})]})})]})}const fs={chapter7:"Chapter 7",chapter11:"Chapter 11",chapter12:"Chapter 12",chapter13:"Chapter 13",debtRelief:"Debt Relief",foreclosureDefense:"Foreclosure Defense",other:"Other"},be={clientName:"",rating:5,content:"",caseType:""};function Ke({rating:t,onChange:a}){return e.jsx("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:48",className:"flex gap-1",children:[1,2,3,4,5].map(i=>e.jsx("button",{"data-loc":"client/src/components/TestimonialsTab.tsx:50",type:"button",onClick:()=>a?.(i),className:`transition-colors ${a?"cursor-pointer hover:scale-110":"cursor-default"}`,children:e.jsx(ee,{"data-loc":"client/src/components/TestimonialsTab.tsx:56",className:`w-5 h-5 ${i<=t?"fill-amber-400 text-amber-400":"text-muted-foreground
11/30"}`})},i))})}function Pt({attorneyId:t}){const[a,i]=u.useState(!1),[m,x]=u.useState(null),[o,l]=u.useState(be),[h,v]=u.useState(null),p=w.useUtils(),{data:b=[],isLoading:T}=w.portal.getTestimonials.useQuery({attorneyId:t}),N=w.portal.addTestimonial.useMutation({onSuccess:()=>{g.success("Testimonial added successfully"),p.portal.getTestimonials.invalidate({attorneyId:t}),i(!1),l(be)},onError:s=>g.error(s.message)}),P=w.portal.updateTestimonial.useMutation({onSuccess:()=>{g.success("Testimonial updated"),p.portal.getTestimonials.invalidate({attorneyId:t}),i(!1),x(null),l(be)},onError:s=>g.error(s.message)}),d=w.portal.deleteTestimonial.useMutation({onSuccess:()=>{g.success("Testimonial deleted"),p.portal.getTestimonials.invalidate({attorneyId:t}),v(null)},onError:s=>g.error(s.message)});function S(s){x(s.id),l({clientName:s.clientName,rating:s.rating,content:s.content,caseType:s.caseType??""}),i(!0)}function j(){x(null),l(be),i(!0)}function D(){if(!o.clientName.trim()){g.error("Client name is required");return}if(!o.content.trim()){g.error("Testimonial content is required");return}const s={clientName:o.clientName.trim(),rating:o.rating,content:o.content.trim(),caseType:o.caseType?o.caseType:void 0};m!==null?P.mutate({id:m,...s}):N.mutate(s)}const B=b.length>0?(b.reduce((s,r)=>s+r.rating,0)/b.length).toFixed(1):null;return e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:147",children:[e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:148",className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:149",children:[e.jsx("h2",{"data-loc":"client/src/components/TestimonialsTab.tsx:150",className:"text-xl font-bold",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Client Testimonials"}),e.jsx("p",{"data-loc":"client/src/components/TestimonialsTab.tsx:151",className:"text-sm text-muted-foreground mt-0.5",children:"Add reviews from satisfied clients to build credibility on your public profile."})]}),e.jsxs(y,{"data-loc":"client/src/components/TestimonialsTab.tsx:155",onClick:j,className:"gap-2",children:[e.jsx(Le,{"data-loc":"client/src/components/TestimonialsTab.tsx:156",className:"w-4 h-4"})," Add Testimonial"]})]}),b.length>0&&B&&e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:162",className:"flex items-center gap-4 mb-5 p-4 bg-amber-50 border border-amber-200 rounded-sm",children:[e.jsx("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:163",className:"text-3xl font-bold text-amber-600",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:B}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:166",children:[e.jsx(Ke,{"data-loc":"client/src/components/TestimonialsTab.tsx:167",rating:Math.round(parseFloat(B))}),e.jsxs("p",{"data-loc":"client/src/components/TestimonialsTab.tsx:168",className:"text-xs text-muted-foreground mt-0.5",children:[b.length," client review",b.length!==1?"s":""]})]})]}),T?e.jsx("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:174",className:"space-y-3",children:[1,2].map(s=>e.jsx("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:176",className:"h-28 bg-secondary/40 rounded-sm animate-pulse"},s))}):b.length===0?e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:180",className:"text-center py-16 bg-white border border-border rounded-sm",children:[e.jsx(Ps,{"data-loc":"client/src/components/TestimonialsTab.tsx:181",className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-4"}),e.jsx("h3",{"data-loc":"client/src/components/TestimonialsTab.tsx:182",className:"text-lg font-bold mb-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"No testimonials yet"}),e.jsx("p",{"data-loc":"client/src/components/TestimonialsTab.tsx:185",className:"text-sm text-muted-foreground mb-5 max-w-sm mx-auto",children:"Add client reviews to build social proof. Testimonials appear prominently on your public profile."}),e.jsxs(y,{"data-loc":"client/src/components/TestimonialsTab.tsx:188",onClick:j,variant:"outline",className:"gap-2",children:[e.jsx(Le,{"data-loc":"client/src/components/TestimonialsTab.tsx:189",className:"w-4 h-4"})," Add Your First Testimonial"]})]}):e.jsx("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:193",className:"space-y-3",children:b.map(s=>e.jsx("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:195",className:"bg-white border border-border rounded-sm p-5",children:e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:196",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:197",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:198",className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:199",className:"w-8 h-8 bg-primary/10 rounded-full flex items-center justify-center shrink-0",children:e.jsx(cs,{"data-loc":"client/src/components/TestimonialsTab.tsx:200",className:"w-4 h-4 text-primary"})}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:202",children:[e.jsx("p",{"data-loc":"client/src/components/TestimonialsTab.tsx:203",className:"font-semibold text-sm",children:s.clientName}),e.jsx(Ke,{"data-loc":"client/src/components/TestimonialsTab.tsx:204",rating:s.rating})]}),s.caseType&&e.jsx(R,{"data-loc":"client/src/components/TestimonialsTab.tsx:207",variant:"outline",className:"text-xs ml-auto",children:fs[s.caseType]??s.caseType})]}),e.jsxs("p",{"data-loc":"client/src/components/TestimonialsTab.tsx:212",className:"text-sm text-muted-foreground leading-relaxed line-clamp-3",children:['"',s.content,'"']})]}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:214",className:"flex items-center gap-2 shrink-0",children:[e.jsx("button",{"data-loc":"client/src/components/TestimonialsTab.tsx:215",onClick:()=>S(s),className:"p-1.5 hover:bg-secondary rounded-sm transition-colors text-muted-foreground hover:text-foreground",title:"Edit",children:e.jsx(Fs,{"data-loc":"client/src/components/TestimonialsTab.tsx:220",className:"w-4 h-4"})}),e.jsx("button",{"data-loc":"client/src/components/TestimonialsTab.tsx:222",onClick:()=>v(s.id),className:"p-1.5 hover:bg-red-50 rounded-sm transition-colors text-muted-foreground hover:text-red-600",title:"Delete",children:e.jsx(ls,{"data-loc":"client/src/components/TestimonialsTab.tsx:227",className:"w-4 h-4"})})]})]})},s.id))}),e.jsx(ie,{"data-loc":"client/src/components/TestimonialsTab.tsx:237",open:a,onOpenChange:s=>{s||(i(!1),x(null),l(be))},children:e.jsxs(de,{"data-loc":"client/src/components/TestimonialsTab.tsx:238",className:"max-w-lg",children:[e.jsx(fe,{"data-loc":"client/src/components/TestimonialsTab.tsx:239",children:e.jsx(ge,{"data-loc":"client/src/components/TestimonialsTab.tsx:240",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:m!==null?"Edit Testimonial":"Add Client Testimonial"})}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:244",className:"space-y-4 mt
11-2",children:[e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:245",children:[e.jsx(E,{"data-loc":"client/src/components/TestimonialsTab.tsx:246",children:"Client Name *"}),e.jsx(W,{"data-loc":"client/src/components/TestimonialsTab.tsx:247",className:"mt-1",placeholder:"e.g., John D. (first name + last initial)",value:o.clientName,onChange:s=>l(r=>({...r,clientName:s.target.value})),maxLength:200})]}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:255",children:[e.jsx(E,{"data-loc":"client/src/components/TestimonialsTab.tsx:256",children:"Star Rating *"}),e.jsx("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:257",className:"mt-2",children:e.jsx(Ke,{"data-loc":"client/src/components/TestimonialsTab.tsx:258",rating:o.rating,onChange:s=>l(r=>({...r,rating:s}))})})]}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:261",children:[e.jsx(E,{"data-loc":"client/src/components/TestimonialsTab.tsx:262",children:"Case Type (optional)"}),e.jsxs(Te,{"data-loc":"client/src/components/TestimonialsTab.tsx:263",value:o.caseType||"none",onValueChange:s=>l(r=>({...r,caseType:s==="none"?"":s})),children:[e.jsx(Pe,{"data-loc":"client/src/components/TestimonialsTab.tsx:264",className:"mt-1",children:e.jsx(Ce,{"data-loc":"client/src/components/TestimonialsTab.tsx:265",placeholder:"Select case type..."})}),e.jsxs(ke,{"data-loc":"client/src/components/TestimonialsTab.tsx:267",children:[e.jsx(H,{"data-loc":"client/src/components/TestimonialsTab.tsx:268",value:"none",children:"No specific case type"}),Object.entries(fs).map(([s,r])=>e.jsx(H,{"data-loc":"client/src/components/TestimonialsTab.tsx:270",value:s,children:r},s))]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:275",children:[e.jsx(E,{"data-loc":"client/src/components/TestimonialsTab.tsx:276",children:"Testimonial *"}),e.jsx(Ts,{"data-loc":"client/src/components/TestimonialsTab.tsx:277",className:"mt-1 resize-none",rows:4,placeholder:"Client's review in their own words...",value:o.content,onChange:s=>l(r=>({...r,content:s.target.value})),maxLength:2e3}),e.jsxs("p",{"data-loc":"client/src/components/TestimonialsTab.tsx:285",className:"text-xs text-muted-foreground mt-1",children:[o.content.length,"/2000"]})]}),e.jsx("p",{"data-loc":"client/src/components/TestimonialsTab.tsx:287",className:"text-xs text-muted-foreground bg-secondary/50 rounded-sm p-3",children:"By adding this testimonial, you confirm that it is a genuine review from a real client and that you have their permission to publish it."}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:290",className:"flex gap-3 pt-2",children:[e.jsx(y,{"data-loc":"client/src/components/TestimonialsTab.tsx:291",className:"flex-1",onClick:D,disabled:N.isPending||P.isPending,children:N.isPending||P.isPending?"Saving...":m!==null?"Save Changes":"Add Testimonial"}),e.jsx(y,{"data-loc":"client/src/components/TestimonialsTab.tsx:298",variant:"outline",onClick:()=>{i(!1),x(null),l(be)},children:"Cancel"})]})]})]})}),e.jsx(ie,{"data-loc":"client/src/components/TestimonialsTab.tsx:307",open:h!==null,onOpenChange:s=>{s||v(null)},children:e.jsxs(de,{"data-loc":"client/src/components/TestimonialsTab.tsx:308",className:"max-w-sm",children:[e.jsx(fe,{"data-loc":"client/src/components/TestimonialsTab.tsx:309",children:e.jsx(ge,{"data-loc":"client/src/components/TestimonialsTab.tsx:310",children:"Delete Testimonial?"})}),e.jsx("p",{"data-loc":"client/src/components/TestimonialsTab.tsx:312",className:"text-sm text-muted-foreground",children:"This will permanently remove this testimonial from your public profile. This action cannot be undone."}),e.jsxs("div",{"data-loc":"client/src/components/TestimonialsTab.tsx:315",className:"flex gap-3 mt-4",children:[e.jsx(y,{"data-loc":"client/src/components/TestimonialsTab.tsx:316",variant:"destructive",className:"flex-1",onClick:()=>h!==null&&d.mutate({id:h}),disabled:d.isPending,children:d.isPending?"Deleting...":"Delete"}),e.jsx(y,{"data-loc":"client/src/components/TestimonialsTab.tsx:324",variant:"outline",onClick:()=>v(null),children:"Cancel"})]})]})})]})}const Ct=[{icon:Qs,title:"Verified Badge on Your Profile",description:"A prominent green 'Verified Attorney' badge appears on your public listing and in search results, instantly signalling trust to prospective clients."},{icon:oe,title:"Unlocked Contact Information",description:"Your phone number and website are hidden on unverified profiles. Verification makes them fully visible and clickable — removing friction for clients ready to call."},{icon:ze,title:"Higher Search Ranking",description:"Verified profiles are ranked above unverified ones in our directory search results, putt
11ing you in front of more potential clients every day."},{icon:ee,title:"Case Results & Testimonials",description:"Only verified attorneys can publish case results and client testimonials on their profiles — powerful social proof that converts visitors into consultations."},{icon:re,title:"Qualified Submission Delivery",description:"Verified attorneys are eligible to receive qualified case submissions matched to their practice areas and geography, sent directly to their portal."},{icon:me,title:"Featured Placement Eligibility",description:"Only verified attorneys can be promoted to featured status, which includes premium placement on state and practice-area landing pages."},{icon:ee,title:"3 Free Submission Credits — On Us",description:"When your bar credentials are verified, we instantly add 3 free submission credits to your account. Your first 3 qualified case submissions are completely free."}],kt=[{abbr:"AL",name:"Alabama"},{abbr:"AK",name:"Alaska"},{abbr:"AZ",name:"Arizona"},{abbr:"AR",name:"Arkansas"},{abbr:"CA",name:"California"},{abbr:"CO",name:"Colorado"},{abbr:"CT",name:"Connecticut"},{abbr:"DE",name:"Delaware"},{abbr:"FL",name:"Florida"},{abbr:"GA",name:"Georgia"},{abbr:"HI",name:"Hawaii"},{abbr:"ID",name:"Idaho"},{abbr:"IL",name:"Illinois"},{abbr:"IN",name:"Indiana"},{abbr:"IA",name:"Iowa"},{abbr:"KS",name:"Kansas"},{abbr:"KY",name:"Kentucky"},{abbr:"LA",name:"Louisiana"},{abbr:"ME",name:"Maine"},{abbr:"MD",name:"Maryland"},{abbr:"MA",name:"Massachusetts"},{abbr:"MI",name:"Michigan"},{abbr:"MN",name:"Minnesota"},{abbr:"MS",name:"Mississippi"},{abbr:"MO",name:"Missouri"},{abbr:"MT",name:"Montana"},{abbr:"NE",name:"Nebraska"},{abbr:"NV",name:"Nevada"},{abbr:"NH",name:"New Hampshire"},{abbr:"NJ",name:"New Jersey"},{abbr:"NM",name:"New Mexico"},{abbr:"NY",name:"New York"},{abbr:"NC",name:"North Carolina"},{abbr:"ND",name:"North Dakota"},{abbr:"OH",name:"Ohio"},{abbr:"OK",name:"Oklahoma"},{abbr:"OR",name:"Oregon"},{abbr:"PA",name:"Pennsylvania"},{abbr:"RI",name:"Rhode Island"},{abbr:"SC",name:"South Carolina"},{abbr:"SD",name:"South Dakota"},{abbr:"TN",name:"Tennessee"},{abbr:"TX",name:"Texas"},{abbr:"UT",name:"Utah"},{abbr:"VT",name:"Vermont"},{abbr:"VA",name:"Virginia"},{abbr:"WA",name:"Washington"},{abbr:"WV",name:"West Virginia"},{abbr:"WI",name:"Wisconsin"},{abbr:"WY",name:"Wyoming"},{abbr:"DC",name:"Washington D.C."}];function St({myProfile:t}){return t.verified||t.barVerified?e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:111",className:"bg-emerald-50 border border-emerald-200 rounded-sm p-5 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:112",className:"w-10 h-10 bg-emerald-100 border border-emerald-300 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(Z,{"data-loc":"client/src/components/VerificationTab.tsx:113",className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:115",children:[e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:116",className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:117",className:"font-bold text-emerald-900",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Your Profile Is Verified"}),e.jsx("span",{"data-loc":"client/src/components/VerificationTab.tsx:120",className:"text-[10px] font-bold uppercase tracking-wider bg-emerald-600 text-white px-2 py-0.5 rounded-full",children:"Active"})]}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:124",className:"text-sm text-emerald-800 leading-relaxed",children:"Congratulations — your identity and bar license have been confirmed. Your verified badge is live, your contact information is visible to clients, and you have full access to case results, testimonials, and submission delivery."}),e.jsx("ul",{"data-loc":"client/src/components/VerificationTab.tsx:127",className:"mt-3 grid grid-cols-1 sm:grid-cols-3 gap-2",children:["Identity confirmed","Active bar license verified","Bankruptcy practice confirmed"].map(a=>e.jsxs("li",{"data-loc":"client/src/components/VerificationTab.tsx:129",className:"flex items-center gap-2 text-xs text-emerald-700 bg-white border border-emerald-200 rounded-sm px-3 py-2",children:[e.jsx(V,{"data-loc":"client/src/components/VerificationTab.tsx:130",className:"w-3.5 h-3.5 text-emerald-500 flex-shrink-0"}),a]},a))})]})]}):t.barNumber&&!t.barVerified?e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:142",className:"bg-amber-50 border border-amber-200 rounded-sm p-5 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:143",className:"w-10 h-10 bg-amber-100 border border-amber-300 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(We,{"data-loc":"client/src/components/VerificationTab.tsx:144",className:"w-5 h-5 text-amber-600"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:146",children:[e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:147",className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:148",className:"font-bold text-amber-900",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Bar Number Under Review"}),e.jsx("span",{"data-loc":"client/src/components/VerificationTab.tsx:151",className:"text-[10px] font-bold uppercase tracking-wider bg-amber-500 text-white px-2 py-0.5 rounded-full",children:"Pending"})]}),e.jsxs("p",{"data-loc":"client/src/components/VerificationTab.tsx:155",className:"text-sm text-amber-800 leading-relaxed",children:["Your bar number ",e.jsxs("strong",{"data-loc":"client/src/components/VerificationTab.tsx:156",children:["#",t.barNumber]})," has been submitted and is being reviewed against state bar records. For most states this completes within 1 business day. You'll receive an email once approved."]}),e.jsxs("p",{"data-loc":"client/src/components/VerificationTab.tsx:158",className:"text-xs text-amber-700 mt-3",children:["Questions?"," ",e.jsx(Ge,{"data-loc":"client/src/components/VerificationTab.tsx:160",className:"underline hover:no-underline",defaultSubject:"Verification / Bar Credentials",children:"Contact us"})]})]})]}):t.claimStatus==="pending"?e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:171",className:"bg-amber-50 border border-amber-200 rounded-sm p-5 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:172",className:"w-10 h-10 bg-amber-100 border border-amber-300 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(We,{"data-loc":"client/src/components/VerificationTab.tsx:173",className:"w-5 h-5 text-amber-600"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:175",children:[e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:176",className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:177",className:"font-bold text-amber-900",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Profile Claim Under Review"}),e.jsx("span",{"data-loc":"client/src/components/VerificationTab.tsx:180",className:"text-[10px] font-bold uppercase tracking-wider bg-amber-500 text-white px-2 py-0.5 rounded-full",children:"Pending"})]}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:184",className:"text-sm text-amber-800 leading-relaxed",children:"Your profile claim is under review. Once approved, you'll be able to enter your bar number here to complete bar verification and unlock your full profile."})]})]}):e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:194",className:"bg-stone-50 border border-stone-200 rounded-sm p-5 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:195",className:"w-10 h-10 bg-stone-100 border border-stone-300 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(ae,{"data-loc":"client/src/components/VerificationTab.tsx:196",className:"w-5 h-5 text-stone-400"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:198",children:[e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:199",className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:200",className:"font-bold text-stone-700",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Credentials Not Yet Verified"}),e.jsx("span",{"data-loc":"client/src/components/VerificationTab.tsx:203",className:"text-[10px] font-bold uppercase tracking-wider bg-stone-400 text-white px-2 py-0.5 rounded-full",children:"Unverified"})]}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:207",className:"text-sm text-stone-600 leading-relaxed",children:"Your credentials have not yet been verified. Follow the steps below to complete the verification process — it's free and takes under 2 minutes."})]})]})}function Lt({myProfile:t,onVerified:a}){const[i,m]=u.useState(t.barNumber??""),[x,o]=u.useState(t.barState??t.state??""),l=w.useUtils(),h=w.portal.verifyBarNumber.useMutation({onSuccess:p=>
11{l.portal.getMyProfile.invalidate(),p.alreadyVerified?g.success("Your bar credentials are already verified."):p.autoVerified?g.success("Bar number verified! Your profile is now live."):p.pendingManual?g.success("Bar number submitted. Our team will review it within 1 business day."):g.error("We couldn't verify that bar number. Please check it and try again, or contact support."),a(p)},onError:p=>g.error(p.message)}),v=p=>{if(p.preventDefault(),!i.trim()){g.error("Please enter your bar number.");return}if(!x){g.error("Please select your state.");return}h.mutate({barNumber:i.trim(),stateAbbr:x})};return e.jsxs("form",{"data-loc":"client/src/components/VerificationTab.tsx:256",onSubmit:v,className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:257",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:258",className:"space-y-1.5",children:[e.jsxs("label",{"data-loc":"client/src/components/VerificationTab.tsx:259",className:"text-xs font-semibold text-foreground uppercase tracking-wider flex items-center gap-1.5",children:[e.jsx(ks,{"data-loc":"client/src/components/VerificationTab.tsx:260",className:"w-3.5 h-3.5"})," Bar Number"]}),e.jsx("input",{"data-loc":"client/src/components/VerificationTab.tsx:262",type:"text",value:i,onChange:p=>m(p.target.value),placeholder:"e.g. 123456",className:"w-full text-sm border border-border rounded-sm px-3 py-2 bg-white text-foreground focus:outline-none focus:ring-1 focus:ring-accent"}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:269",className:"text-xs text-muted-foreground",children:"Your state bar registration or license number"})]}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:271",className:"space-y-1.5",children:[e.jsxs("label",{"data-loc":"client/src/components/VerificationTab.tsx:272",className:"text-xs font-semibold text-foreground uppercase tracking-wider flex items-center gap-1.5",children:[e.jsx(Se,{"data-loc":"client/src/components/VerificationTab.tsx:273",className:"w-3.5 h-3.5"})," State of Licensure"]}),e.jsxs("select",{"data-loc":"client/src/components/VerificationTab.tsx:275",value:x,onChange:p=>o(p.target.value),className:"w-full text-sm border border-border rounded-sm px-3 py-2 bg-white text-foreground focus:outline-none focus:ring-1 focus:ring-accent",children:[e.jsx("option",{"data-loc":"client/src/components/VerificationTab.tsx:280",value:"",children:"Select state…"}),kt.map(p=>e.jsx("option",{"data-loc":"client/src/components/VerificationTab.tsx:282",value:p.abbr,children:p.name},p.abbr))]}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:285",className:"text-xs text-muted-foreground",children:"The state where you are licensed to practice"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:289",className:"bg-blue-50 border border-blue-200 rounded-sm px-4 py-3 flex items-start gap-2.5",children:[e.jsx(_e,{"data-loc":"client/src/components/VerificationTab.tsx:290",className:"w-4 h-4 text-blue-600 flex-shrink-0 mt-0.5"}),e.jsxs("p",{"data-loc":"client/src/components/VerificationTab.tsx:291",className:"text-xs text-blue-800 leading-relaxed",children:["We cross-reference your bar number with official state bar public records. For New York and California, verification is ",e.jsx("strong",{"data-loc":"client/src/components/VerificationTab.tsx:292",children:"instant"}),". For all other states, our team completes a manual spot-check within 1 business day."]})]}),e.jsx(y,{"data-loc":"client/src/components/VerificationTab.tsx:296",type:"submit",disabled:h.isPending,className:"gap-2 w-full sm:w-auto",children:h.isPending?e.jsxs(e.Fragment,{children:[e.jsx($e,{"data-loc":"client/src/components/VerificationTab.tsx:298",className:"w-4 h-4 animate-spin"})," Checking state bar records…"]}):e.jsxs(e.Fragment,{children:[e.jsx(Z,{"data-loc":"client/src/components/VerificationTab.tsx:300",className:"w-4 h-4"})," Verify Bar Number — It's Free"]})})]})}function Dt({result:t}){return t.autoVerified?e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:310",className:"bg-emerald-50 border border-emerald-300 rounded-sm p-5 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:311",className:"w-10 h-10 bg-emerald-100 border border-emerald-300 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(Z,{"data-loc":"client/src/components/VerificationTab.tsx:312",className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:314",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:315",className:"font-bold text-emerald-900 mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Bar Verified — Profile Is Now Live!"}),e.jsxs("p",{"data-loc":"client/src/components/VerificationTab.tsx:318",className:"text-sm text-emerald-800 leading-relaxed",children:["Your bar number was confirmed against official state records. Your profile is now verified, your contact information is visible to clients, and ",e.jsx("strong",{"data-loc":"client/src/components/VerificationTab.tsx:319",children:"3 free submission credits"})," have been added to your account."]}),t.barName&&e.jsxs("p",{"data-loc":"client/src/components/VerificationTab.tsx:322",className:"text-xs text-emerald-700 mt-2 bg-white border border-emerald-200 rounded-sm px-3 py-2 inline-flex items-center gap-2",children:[e.jsx(V,{"data-loc":"client/src/components/VerificationTab.tsx:323",className:"w-3.5 h-3.5"})," Matched: ",e.jsx("strong",{"data-loc":"client/src/components/VerificationTab.tsx:323",children:t.barName})," · Status: ",t.barStatus]})]})]}):t.pendingManual?e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:333",className:"bg-amber-50 border border-amber-300 rounded-sm p-5 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:334",className:"w-10 h-10 bg-amber-100 border border-amber-300 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(We,{"data-loc":"client/src/components/VerificationTab.tsx:335",className:"w-5 h-5 text-amber-600"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:337",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:338",className:"font-bold text-amber-900 mb
11-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Bar Number Submitted — Under Review"}),e.jsxs("p",{"data-loc":"client/src/components/VerificationTab.tsx:341",className:"text-sm text-amber-800 leading-relaxed",children:["Your bar number has been saved. Our team will cross-reference it with state bar records and activate your profile within ",e.jsx("strong",{"data-loc":"client/src/components/VerificationTab.tsx:342",children:"1 business day"}),". You'll receive an email notification once approved."]})]})]}):e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:351",className:"bg-red-50 border border-red-200 rounded-sm p-5 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:352",className:"w-10 h-10 bg-red-100 border border-red-200 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(J,{"data-loc":"client/src/components/VerificationTab.tsx:353",className:"w-5 h-5 text-red-500"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:355",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:356",className:"font-bold text-red-900 mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Bar Number Not Found"}),e.jsxs("p",{"data-loc":"client/src/components/VerificationTab.tsx:359",className:"text-sm text-red-800 leading-relaxed",children:["We couldn't find an active license matching that bar number in the selected state. Please double-check the number and state, then try again. If the issue persists,"," ",e.jsx(Ge,{"data-loc":"client/src/components/VerificationTab.tsx:361",className:"underline",defaultSubject:"Bar Verification Issue",children:"contact our team"})," ","and we'll verify manually."]})]})]})}function At({myProfile:t,onGoToClaim:a}){const i=(t?.verified||t?.barVerified)??!1,m=t?.claimStatus==="claimed",x=!i&&t?.claimStatus==="pending",o=m&&!i,l=!!t?.barNumber,[h,v]=u.useState(null),p=i?3:m?2:1,b=[{number:"01",icon:Cs,title:"Claim Your Profile",description:"Find your existing listing in our directory and submit a claim. Provide your bar number and email — we'll link your account to your profile."},{number:"02",icon:ks,title:"Enter Your Bar Number",description:"Once your profile is claimed, enter your state bar number below. We cross-reference it against official state bar public records — no documents needed."},{number:"03",icon:Z,title:"Profile Goes Live",description:"For NY and CA, verification is instant. For all other states, our team completes a spot-check within 1 business day. Your contact info unlocks and your badge appears."}];return e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:407",className:"max-w-3xl space-y-10",children:[t?e.jsx(St,{"data-loc":"client/src/components/VerificationTab.tsx:410",myProfile:t}):e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:412",className:"bg-stone-50 border border-stone-200 rounded-sm p-5 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:413",className:"w-10 h-10 bg-stone-100 border border-stone-300 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(ae,{"data-loc":"client/src/components/VerificationTab.tsx:414",className:"w-5 h-5 text-stone-400"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:416",children:[e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:417",className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:418",className:"font-bold text-stone-700",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Credentials Not Yet Verified"}),e.jsx("span",{"data-loc":"client/src/components/VerificationTab.tsx:421",className:"text-[10px] font-bold uppercase tracking-wider bg-stone-400 text-white px-2 py-0.5 rounded-full",children:"Unverified"})]}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:425",className:"text-sm text-stone-600 leading-relaxed mb-3",children:"You don't have an attorney profile linked to this account yet. Find your listing and verify your credentials to unlock your full profile and start receiving submissions."}),e.jsxs(y,{"data-loc":"client/src/components/VerificationTab.tsx:428",size:"sm",onClick:a,className:"gap-2 text-xs",children:[e.jsx(Q,{"data-loc":"client/src/components/VerificationTab.tsx:429",className:"w-3.5 h-3.5"})," Verify Your Credentials"]})]})]}),!i&&e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:437",className:"bg-amber-50 border border-amber-300 rounded-sm p-4 flex items-start gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:438",className:"w-9 h-9 bg-
11amber-100 border border-amber-300 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(ee,{"data-loc":"client/src/components/VerificationTab.tsx:439",className:"w-4 h-4 text-amber-600"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:441",children:[e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:442",className:"text-sm font-bold text-amber-900",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Your First 3 Submissions Are On Us"}),e.jsxs("p",{"data-loc":"client/src/components/VerificationTab.tsx:445",className:"text-xs text-amber-800 leading-relaxed mt-0.5",children:["Complete bar verification and we'll instantly credit your account with ",e.jsx("strong",{"data-loc":"client/src/components/VerificationTab.tsx:446",children:"3 free submission credits"}),". No credit card required — start receiving qualified bankruptcy case inquiries the moment your credentials are confirmed."]})]})]}),o&&!h&&e.jsxs("section",{"data-loc":"client/src/components/VerificationTab.tsx:454",children:[e.jsx("h2",{"data-loc":"client/src/components/VerificationTab.tsx:455",className:"text-xl font-bold text-foreground mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:l?"Update Your Bar Number":"Enter Your Bar Number"}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:458",className:"text-sm text-muted-foreground mb-5",children:l?`Your bar number on file is #${t?.barNumber}. You can update it below if needed.`:"Enter your state bar number to verify your credentials instantly. No documents required."}),e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:463",className:"bg-white border border-border rounded-sm p-5",children:e.jsx(Lt,{"data-loc":"client/src/components/VerificationTab.tsx:464",myProfile:t,onVerified:v})})]}),h&&e.jsx(Dt,{"data-loc":"client/src/components/VerificationTab.tsx:470",result:h}),e.jsxs("section",{"data-loc":"client/src/components/VerificationTab.tsx:473",children:[e.jsx("h2",{"data-loc":"client/src/components/VerificationTab.tsx:474",className:"text-xl font-bold text-foreground mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Why Get Verified?"}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:477",className:"text-sm text-muted-foreground mb-6",children:"Verification unlocks the full power of your National Bankruptcy Advocates profile and puts you ahead of unverified competitors in search results."}),e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:480",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:Ct.map(({icon:T,title:N,description:P})=>e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:482",className:"bg-white border border-border rounded-sm p-4 flex items-start gap-3 hover:border-accent/40 transition-colors",children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:483",className:"w-8 h-8 bg-accent/10 rounded-sm flex items-center justify-center flex-shrink-0",children:e.jsx(T,{"data-loc":"client/src/components/VerificationTab.tsx:484",className:"w-4 h-4 text-accent"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:486",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:487",className:"text-sm font-bold text-foreground mb-1",children:N}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:488",className:"text-xs text-muted-foreground leading-relaxed",children:P})]})]},N))})]}),e.jsxs("section",{"data-loc":"client/src/components/VerificationTab.tsx:496",children:[e.jsx("h2",{"data-loc":"client/src/components/VerificationTab.tsx:497",className:"text-xl font-bold text-foreground mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"How Verification Works"}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:500",className:"text-sm text-muted-foreground mb-6",children:"The entire process is free and takes under 2 minutes. No document uploads required."}),e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:503",className:"space-y-4",children:b.map((T,N)=>{const P=N+1,d=P<p,S=P===p&&!i,j=T.icon;return e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:510",className:`relative flex items-start gap-4 p-4 rounded-sm border transition-colors ${d?"bg-emerald-50 border-emerald-200":S?"bg-accent/5 border-accent/30":"bg-white border-border"}`,children:[e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:516",className:`w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0 font-black text-sm ${d?"bg-emerald-100 border border-emerald-300 text-emerald-700":S?"bg-accent text-accent-foreground":"bg-secondary border border-border text-muted-foreground"}`,children:d?e.jsx(V,{"data-loc":"client/src/components/VerificationTab.tsx:519",className:"w-5 h-5"}):e.jsx(j,{"data-loc":"client/src/components/VerificationTab.tsx:519",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:521",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:522",className:"flex items-center gap-2 mb-1",children:[e.jsxs("span",{"data-loc":"client/src/components/VerificationTab.tsx:523",className:`text-xs font-bold uppercase tracking-wider ${d?"text-emerald-600":S?"text-accent":"text-muted-foreground"}`,children:["Step ",T.number]}),d&&e.jsx("span",{"data-loc":"client/src/components/VerificationTab.tsx:526",className:"text-[10px] font-bold uppercase tracking-wider bg-emerald-600 text-white px-2 py-0.5 rounded-full",children:"Complete"}),S&&e.jsx("span",{"data-loc":"client/src/components/VerificationTab.tsx:527",className:"text-[10px] font-bold uppercase tracking-wider bg-accent text-accent-foreground px-2 py-0.5 rounded-full",children:"Current Step"})]}),e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:529",className:`text-base font-bold mb-1 ${d?"text-emerald-900":"text-foreground"}`,style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:T.title}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:532",className:"text-sm text-muted-foreground leading-relaxed",children:T.description})]})]},T.number)})}),!i&&!x&&!m&&e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:541",className:"mt-6 flex flex-col sm:flex-row gap-3",children:[e.jsxs(y,{"data-loc":"client/src/components/VerificationTab.tsx:542",onClick:a,className:"gap-2",children:[e.jsx(Z,{"data-loc":"client/src/components/VerificationTab.tsx:543",className:"w-4 h-4"})," Claim Your Profile — It's Free"]}),e.jsxs(y,{"data-loc":"client/src/components/VerificationTab.tsx:545",variant:"outline",className:"gap-2 w-full sm:w-auto",onClick:a,children:["Find My Profile ",e.jsx(Q,{"data-loc":"client/src/components/VerificationTab.tsx:546",className:"w-4 h-4"})]})]}),x&&e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:551",className:"mt-6 p-4 bg-amber-50 border border-amber-200 rounded-sm text-sm text-amber-800",children:[e.jsx("strong",{"data-loc":"client/src/components/VerificationTab.tsx:552",children:"Your profile claim is under review."})," Once approved, you'll be able to enter your bar number here to complete verification. If you haven't heard back within 2 business days,"," ",e.jsx(Ge,{"data-loc":"client/src/components/VerificationTab.tsx:553",className:"underline",defaultSubject:"Verification / Bar Credentials",children:"contact us"}),"."]})]}),e.jsxs("section",{"data-loc":"client/src/components/VerificationTab.tsx:559",children:[e.jsx("h2",{"data-loc":"client/src/components/VerificationTab.tsx:560",className:"text-xl font-bold text-foreground mb-4",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Frequently Asked Questions"}),e.jsx("div",{"data-loc":"client/src/components/VerificationTab.tsx:563",className:"space-y-3",children:[{q:"Is verification free?",a:"Yes — completely free. There is no charge to verify your credentials. Paid plans are available for premium features like featured placement and additional submission credits, but verification itself costs nothing."},{q:"How long does verification take?",a:"For New York and California, verification is instant — we query the state bar's public re
11cords in real time. For all other states, our team completes a manual spot-check within 1 business day."},{q:"Do I need to upload any documents?",a:"No. We verify your bar number directly against official state bar public records. No document uploads, no faxes, no waiting for email replies — just enter your bar number and state."},{q:"What if my bar number isn't found?",a:"Double-check the number and the state you selected. If the issue persists, use the Contact Us form with your full name, bar number, and licensed state — our team will verify manually within 1 business day."},{q:"Can I update my profile before verification is complete?",a:"Yes. You can edit your bio, practice areas, and contact information at any time from the My Profile tab. Changes will be visible publicly once your profile is verified."}].map(({q:T,a:N})=>e.jsxs("div",{"data-loc":"client/src/components/VerificationTab.tsx:586",className:"bg-white border border-border rounded-sm p-4",children:[e.jsx("h3",{"data-loc":"client/src/components/VerificationTab.tsx:587",className:"text-sm font-bold text-foreground mb-1.5",children:T}),e.jsx("p",{"data-loc":"client/src/components/VerificationTab.tsx:588",className:"text-sm text-muted-foreground leading-relaxed",children:N})]},T))})]})]})}const Bt={free:e.jsx(X,{"data-loc":"client/src/components/BillingTab.tsx:10",className:"h-5 w-5 text-muted-foreground"}),professional:e.jsx(me,{"data-loc":"client/src/components/BillingTab.tsx:11",className:"h-5 w-5 text-amber-500"}),featured:e.jsx(ee,{"data-loc":"client/src/components/BillingTab.tsx:12",className:"h-5 w-5 text-yellow-500"})},Ot={free:"border-border bg-card",professional:"border-amber-500 bg-amber-500/5",featured:"border-yellow-500 bg-yellow-500/5"};function Vt(){const{data:t}=w.leads.getLeadDemandByState.useQuery();return!t||t.count===0?null:e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:25",className:"flex items-center gap-4 roun
11ded-xl border border-emerald-200 bg-emerald-50 px-5 py-4",children:[e.jsx("div",{"data-loc":"client/src/components/BillingTab.tsx:26",className:"w-10 h-10 rounded-lg bg-emerald-100 flex items-center justify-center flex-shrink-0",children:e.jsx(ze,{"data-loc":"client/src/components/BillingTab.tsx:27",className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:29",children:[e.jsxs("p",{"data-loc":"client/src/components/BillingTab.tsx:30",className:"text-sm font-semibold text-emerald-900",children:[t.count," submission",t.count!==1?"s":""," submitted from ",t.state," in the last 30 days"]}),e.jsx("p",{"data-loc":"client/src/components/BillingTab.tsx:33",className:"text-xs text-emerald-700 mt-0.5",children:"Upgrade your plan to receive these submissions directly and grow your caseload."})]})]})}function Ft({myProfile:t}){const[a,i]=u.useState(null),[m,x]=u.useState(!1),{data:o,isLoading:l}=w.payments.getAttorneyPlanConfig.useQuery(),{data:h,isLoading:v,refetch:p}=w.payments.getMyAttorneyPlan.useQuery(void 0,{enabled:!!t}),b=w.payments.createAttorneyPlanCheckout.useMutation({onSuccess:j=>{j.url&&(window.open(j.url,"_blank"),g.success("Redirecting to checkout…",{description:"Complete your payment in the new tab."})),i(null)},onError:j=>{g.error("Checkout failed",{description:j.message}),i(null)}}),T=w.payments.cancelAttorneyPlan.useMutation({onSuccess:()=>{g.success("Subscription canceled",{description:"Your plan will remain active until the end of the billing period."}),p(),x(!1)},onError:j=>{g.error("Cancellation failed",{description:j.message}),x(!1)}}),N=h?.plan??"free",P=j=>j===N,d=j=>{if(!t){g.error("No profile linked",{description:"Verify your attorney credentials first to link your profile."});return}i(j),b.mutate({planId:j,origin:window.location.origin})},S=()=>{confirm("Cancel your subscription? You'll keep access until the end of the billing period.")&&(x(!0),T.mutate())};return l||v?e.jsx("div",{"data-loc":"client/src/components/BillingTab.tsx:97",className:"flex items-center justify-center py-24",children:e.jsx($e,{"data-loc":"client/src/components/BillingTab.tsx:98",className:"h-8 w-8 animate-spin text-muted-foreground"})}):e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:104",className:"space-y-8",children:[h&&N!=="free"&&e.jsx(F,{"data-loc":"client/src/components/BillingTab.tsx:107",className:"border-green-500/40 bg-green-500/5",children:e.jsx(M,{"data-loc":"client/src/components/BillingTab.tsx:108",className:"pt-5",children:e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:109",className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:110",className:"flex items-center gap-3",children:[e.jsx(Ie,{"data-loc":"client/src/components/BillingTab.tsx:111",className:"h-5 w-5 text-green-500 shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:112",children:[e.jsxs("p",{"data-loc":"client/src/components/BillingTab.tsx:113",className:"font-semibold text-foreground",children:[N==="professional"?"Professional":"Featured"," Plan — Active"]}),t?.activePlanSlug&&e.jsxs("p",{"data-loc":"client/src/components/BillingTab.tsx:117",className:"text-xs text-muted-foreground mt-0.5",children:["Submission package: ",e.jsx("span",{"data-loc":"client/src/components/BillingTab.tsx:118",className:"font-medium text-foreground",children:t.activePlanSlug}),t.leadPreference&&e.jsx(R,{"data-loc":"client/src/components/BillingTab.tsx:120",variant:"outline",className:`ml-2 text-xs ${t.leadPreference==="exclusive"?"border-amber-500/50 text-amber-700":"border-blue-500/50 text-blue-700"}`,children:t.leadPreference==="exclusive"?"Exclusive":"Non-Exclusive"})]}),h.currentPeriodEnd&&e.jsxs("p",{"data-loc":"client/src/components/BillingTab.tsx:127",className:"text-sm text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[e.jsx(os,{"data-loc":"client/src/components/BillingTab.tsx:128",className:"h-3.5 w-3.5"}),h.cancelAtPeriodEnd?`Cancels on ${new Date(h.currentPeriodEnd).toLocaleDateString()}`:`Renews on ${new Date(h.currentPeriodEnd).toLocaleDateString()}`]})]})]}),!h.cancelAtPeriodEnd&&e.jsxs(y,{"data-loc":"client/src/components/BillingTab.tsx:137",variant:"outline",size:"sm",className:"text-destructive border-destructive/40 hover:bg-destructive/10",onClick:S,disabled:m,children:[m?e.jsx($e,{"data-loc":"client/src/components/BillingTab.tsx:144",className:"h-4 w-4 animate-spin mr-2"}):e.jsx(we,{"data-loc":"client/src/components/BillingTab.tsx:144",className:"h-4 w-4 mr-2"}),"Cancel Subscription"]}),h.cancelAtPeriodEnd&&e.jsx(R,{"data-loc":"client/src/components/BillingTab.tsx:149",variant:"outline",className:"text-amber-600 border-amber-500/40",children:"Canceling at period end"})]})})}),!t&&e.jsx(F,{"data-loc":"client/src/components/BillingTab.tsx:160",className:"border-amber-500/40 bg-amber-500/5",children:e.jsxs(M,{"data-loc":"client/src/components/BillingTab.tsx:161",className:"pt-5 flex items-center gap-3",children:[e.jsx(J,{"data-loc":"client/src/components/BillingTab.tsx:162",className:"h-5 w-5 text-amber-500 shrink-0"}),e.jsx("p",{"data-loc":"client/src/components/BillingTab.tsx:163",className:"text-sm text-muted-foreground",children:"You need to verify your attorney credentials before upgrading your plan."})]})}),e.jsx(Vt,{"data-loc":"client/src/components/BillingTab.tsx:171"}),e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:174",children:[e.jsx("h2",{"data-loc":"client/src/components/BillingTab.tsx:175",className:"text-xl font-bold text-foreground mb-1",children:"Profile & Listing Plans"}),e.jsxs("p",{"data-loc":"client/src/components/BillingTab.tsx:176",className:"text-sm text-muted-foreground mb-6",children:["Your listing plan determines your profile visibility, verification badge, and access to submission rout
11ing features. Submission credit pricing is separate and depends on your market tier and submission type — see the ",e.jsx("strong",{"data-loc":"client/src/components/BillingTab.tsx:177",children:"Buy Credits"})," tab for details."]}),e.jsx("div",{"data-loc":"client/src/components/BillingTab.tsx:180",className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:o?.map(j=>e.jsxs(F,{"data-loc":"client/src/components/BillingTab.tsx:182",className:`relative flex flex-col border-2 transition-all ${Ot[j.id]} ${P(j.id)?"ring-2 ring-offset-2 ring-amber-500":""}`,children:[j.popular&&!P(j.id)&&e.jsx("div",{"data-loc":"client/src/components/BillingTab.tsx:187",className:"absolute -top-3 left-1/2 -translate-x-1/2",children:e.jsx(R,{"data-loc":"client/src/components/BillingTab.tsx:188",className:"bg-amber-500 text-white text-xs px-3",children:"Most Popular"})}),P(j.id)&&e.jsx("div",{"data-loc":"client/src/components/BillingTab.tsx:192",className:"absolute -top-3 left-1/2 -translate-x-1/2",children:e.jsx(R,{"data-loc":"client/src/components/BillingTab.tsx:193",className:"bg-green-500 text-white text-xs px-3",children:"Current Plan"})}),e.jsxs(Y,{"data-loc":"client/src/components/BillingTab.tsx:197",className:"pb-3",children:[e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:198",className:"flex items-center gap-2 mb-2",children:[Bt[j.id],e.jsx(U,{"data-loc":"client/src/components/BillingTab.tsx:200",className:"text-base",children:j.name})]}),e.jsx("div",{"data-loc":"client/src/components/BillingTab.tsx:202",className:"flex items-baseline gap-1 flex-wrap",children:j.priceMonthly===0?e.jsx("span",{"data-loc":"client/src/components/BillingTab.tsx:204",className:"text-2xl font-bold text-foreground",children:"Free"}):j.id==="professional"?e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:206",children:[e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:207",className:"text-sm font-semibold text-foreground",children:["From $850 ",e.jsx("span",{"data-loc":"client/src/components/BillingTab.tsx:207",className:"text-muted-foreground font-normal",children:"/month"})]}),e.jsx("div",{"data-loc":"client/src/components/BillingTab.tsx:208",className:"text-xs text-muted-foreground",children:"(Tier 3 non-exclusive) — up to $10,625/mo (Tier 1 exclusive)"})]}):e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:211",children:[e.jsxs("div",{"data-loc":"client/src/components/BillingTab.tsx:212",className:"text-sm font-semibold text-foreground",children:["From $1,500 ",e.jsx("span",{"data-loc":"client/src/components/BillingTab.tsx:212",className:"text-muted-foreground font-normal",children:"/month"})]}),e.jsx("div",{"data-loc":"client/src/components/BillingTab.tsx:213",className:"text-xs text-muted-foreground",children:"(Tier 3 non-exclusive) — up to $18,750/mo (Tier 1 exclusive)"})]})})]}),e.jsxs(M,{"data-loc":"client/src/components/BillingTab.tsx:219",className:"flex flex-col flex-1 gap-4",children:[e.jsx("ul",{"data-loc":"client/src/components/BillingTab.tsx:220",className:"space-y-2 flex-1",children:j.features.map(D=>e.jsxs("li",{"data-loc":"client/src/components/BillingTab.tsx:222",className:"flex items-start gap-2 text-sm",children:[e.jsx(Ie,{"data-loc":"client/src/components/BillingTab.tsx:223",className:"h-4 w-4 text-green-500 shrink-0 mt-0.5"}),e.jsx("span",{"data-loc":"client/src/components/BillingTab.tsx:224",className:"text-muted-foreground",children:D})]},D))}),P(j.id)?e.jsxs(y,{"data-loc":"client/src/components/BillingTab.tsx:230",variant:"outline",disabled:!0,className:"w-full",children:[e.jsx(Ie,{"data-loc":"client/src/components/BillingTab.tsx:231",className:"h-4 w-4 mr-2 text-green-500"}),"Current Plan"]}):j.id==="free"?e.jsx(y,{"data-loc":"client/src/components/BillingTab.tsx:235",variant:"outline",disabled:!0,className:"w-full opacity-50",children:"Downgrade"}):e.jsxs(y,{"data-loc":"client/src/components/BillingTab.tsx:239",className:`w-full ${j.id==="featured"?"bg-yellow-500 hover:bg-yellow-600 text-black":"bg-amber-500 hover:bg-amber-600 text-white"}`,onClick:()=>d(j.id),disabled:!!a||!t,children:[a===j.id?e.jsx($e,{"data-loc":"client/src/components/BillingTab.tsx:245",className:"h-4 w-4 animate-spin mr-2"}):null,j.cta]})]})]},j.id))})]})]})}function Rs({onNavigateTab:t}){const{data:a,isLoading:i}=w.portal.getCompletenessScore.useQuery();if(i)return e.jsx(F,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:15",className:"border border-border/60",children:e.jsxs(M,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:16",className:"p-6",children:[e.jsx("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:17",className:"h-4 bg-muted rounded animate-pulse mb-3 w-1/2"}),e.jsx("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:18",className:"h-2 bg-muted rounded animate-pulse w-full mb-4"}),e.jsx("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:19",className:"space-y-2",children:[...Array(4)].map((p,b)=>e.jsx("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:21",className:"h-3 bg-muted rounded animate-pulse",style:{width:`${70+b*5}%`}},b))})]})});if(!a)return null;const{score:m,sections:x}=a,o=x.filter(p=>!p.complete),l=x.filter(p=>p.complete),h=m>=80?"text-green-500":m>=50?"text-amber-500":"text-red-500",v=m>=80?"bg-green-500":m>=50?"bg-amber-500":"bg-red-500";return e.jsxs(F,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:41",className:"border border-border/60",children:[e.jsx(Y,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:42",className:"pb-3",children:e.jsxs(U,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:43",className:"text-base flex items-center justify-between",children:[e.jsx("span",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:44",children:"Profile Completeness"}),e.jsxs("span",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:45",className:`text-2xl font-bold tabular-nums ${h}`,children:[m,"%"]})]})}),e.jsxs(M,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:48",className:"space-y-4",children:[e.jsx("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:50",className:"w-full bg-muted rounded-full h-2.5 overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:51",className:`h-2.5 rounded-full transition-all duration-500 ${v}`,style:{width:`${m}%`}})}),o.length>0&&e.jsxs("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:59",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:60",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"To improve your profile"}),o.map(p=>e.jsxs("button",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:64",onClick:()=>t?.(p.tab),className:"w-full flex items-start gap-2.5 text-left group hover:bg-muted/50 rounded-md p-2 -mx-2 transition-colors",children:[e.jsx(ft,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:69",className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:70",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:71",className:"text-sm font-medium text-foreground group-hover:text-primary transition-colors",children:p.label}),e.jsx("p",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:74",className:"text-xs text-muted-foreground leading-snug",children:p.tip})]}),e.jsx(Ss,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:76",className:"h-3.5 w-3.5 mt-1 text-muted-foreground shrink-0 group-hover:text-primary transition-colors"})]},p.key))]}),l.length>0&&e.jsxs("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:84",className:"space-y-1.5",children:[e.jsxs("p",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:85",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:["Completed (",l.length,"/",x.length,")"]}),l.map(p=>e.jsxs("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:89",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Ie,{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:90",className:"h-4 w-4 text-green-500 shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:91",children:p.label})]},p.key))]}),m===100&&e.jsxs("div",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:98",className:"rounded-lg bg-green-500/10 border border-green-500/20 p-3 text-center",children:[e.jsx("p",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:99",className:"text-sm font-semibold text-green-600 dark:text-green-400",children:"🎉 Profile 100% complete!"}),e.jsx("p",{"data-loc":"client/src/components/ProfileCompletenessWidget.tsx:102",className:"text-xs text-muted-foreground mt-0.5",children:"Your profile is fully optimised for search visibility."})]})]})]})}const Rt={chapter7:"Chapter 7",chapter11:"Chapter 11",chapter12:"Chapter 12",chapter13:"Chapter 13",debtRelief:"Debt Relief",foreclosureDefense:"Foreclosure Defense",other:"Other"},gs={new:{label:"New",color:"bg-blue-50 text-blue-700 border-blue-200"}
11,viewed:{label:"Viewed",color:"bg-amber-50 text-amber-700 border-amber-200"},contacted:{label:"Contacted",color:"bg-purple-50 text-purple-700 border-purple-200"},converted:{label:"Converted",color:"bg-green-50 text-green-700 border-green-200"},invalid:{label:"Invalid",color:"bg-gray-50 text-gray-500 border-gray-200"}};function Mt({onNavigate:t}){const{data:a}=w.leads.getLeadStats.useQuery(),{data:i}=w.leads.getMyLeads.useQuery({limit:5,offset:0}),{data:m}=w.auth.me.useQuery(),x=a&&a.total>0?Math.round(a.converted/a.total*100):0,o=[{title:"Total Submissions",value:a?.total??0,icon:re,color:"text-blue-600",bg:"bg-blue-50",desc:"All time"},{title:"New Submissions",value:a?.new??0,icon:me,color:"text-amber-600",bg:"bg-amber-50",desc:"Awaiting review",urgent:(a?.new??0)>0},{title:"Conversion Rate",value:`${x}%`,icon:ze,color:"text-green-600",bg:"bg-green-50",desc:`${a?.converted??0} converted`},{title:"Contacted",value:a?.contacted??0,icon:Js,color:"text-purple-600",bg:"bg-purple-50",desc:"In progress"}];return e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:76",className:"space-y-6",children:[a&&a.creditBalance===0&&(a.locked??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:79",className:"flex items-center gap-3 rounded-xl border border-amber-300 bg-amber-50 px-5 py-4",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:80",className:"w-9 h-9 rounded-lg bg-amber-100 flex items-center justify-center flex-shrink-0",children:e.jsx(ae,{"data-loc":"client/src/components/DashboardOverview.tsx:81",className:"w-4 h-4 text-amber-600"})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:83",className:"flex-1 min-w-0",children:[e.jsxs("p",{"data-loc":"client/src/components/DashboardOverview.tsx:84",className:"text-sm font-semibold text-amber-900",children:["You have ",a.locked," new submission",a.locked!==1?"s":""," waiting — your credits are used up."]}),e.jsx("p",{"data-loc":"client/src/components/DashboardOverview.tsx:87",className:"text-xs text-amber-700 mt-0.5",children:"Buy credits to reveal contact details and start connecting with potential clients."})]}),e.jsxs(y,{"data-loc":"client/src/components/DashboardOverview.tsx:91",size:"sm",className:"bg-amber-600 hover:bg-amber-700 text-white gap-1.5 flex-shrink-0",onClick:()=>t("credits"),children:[e.jsx(X,{"data-loc":"client/src/components/DashboardOverview.tsx:96",className:"w-3.5 h-3.5"})," Buy Credits"]})]}),a&&a.creditBalance>0&&a.creditBalance<=2&&(a.locked??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:103",className:"flex items-center gap-3 rounded-xl border border-blue-200 bg-blue-50 px-5 py-3",children:[e.jsx(me,{"data-loc":"client/src/components/DashboardOverview.tsx:104",className:"w-4 h-4 text-blue-600 flex-shrink-0"}),e.jsxs("p",{"data-loc":"client/src/components/DashboardOverview.tsx:105",className:"text-sm text-blue-800 flex-1",children:[e.jsxs("span",{"data-loc":"client/src/components/DashboardOverview.tsx:106",className:"font-semibold",children:[a.creditBalance," credit",a.creditBalance!==1?"s":""," remaining"]})," ","— top up soon to keep unlocking new submissions without interruption."]}),e.jsxs(y,{"data-loc":"client/src/components/DashboardOverview.tsx:109",size:"sm",variant:"outline",className:"border-blue-300 text-blue-700 hover:bg-blue-100 gap-1.5 flex-shrink-0",onClick:()=>t("credits"),children:[e.jsx(X,{"data-loc":"client/src/components/DashboardOverview.tsx:115",className:"w-3.5 h-3.5"})," Top Up"]})]}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:121",className:"rounded-xl bg-gradient-to-r from-primary to-primary/80 text-primary-foreground p-6",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:122",className:"flex items-center justify-between flex-wrap gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:123",children:[e.jsx("p",{"data-loc":"client/src/components/DashboardOverview.tsx:124",className:"text-primary-foreground/70 text-sm font-medium mb-1",children:"Welcome back,"}),e.jsx("h2",{"data-loc":"client/src/components/DashboardOverview.tsx:125",className:"text-2xl font-bold",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:m?.name??"Attorney"}),e.jsx("p",{"data-loc":"client/src/components/DashboardOverview.tsx:128",className:"text-primary-foreground
11/70 text-sm mt-1",children:"Here's what's happening with your submissions today."})]}),(a?.new??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:133",className:"flex items-center gap-2 bg-white/10 rounded-lg px-4 py-2",children:[e.jsx(J,{"data-loc":"client/src/components/DashboardOverview.tsx:134",className:"w-4 h-4 text-amber-300"}),e.jsxs("span",{"data-loc":"client/src/components/DashboardOverview.tsx:135",className:"text-sm font-semibold",children:[a.new," new submission",a.new!==1?"s":""," waiting"]})]})]})}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:144",className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:o.map(l=>e.jsx(F,{"data-loc":"client/src/components/DashboardOverview.tsx:146",className:`relative overflow-hidden ${l.urgent?"ring-2 ring-amber-400":""}`,children:e.jsxs(M,{"data-loc":"client/src/components/DashboardOverview.tsx:147",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:148",className:"flex items-start justify-between mb-3",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:149",className:`w-9 h-9 rounded-lg ${l.bg} flex items-center justify-center`,children:e.jsx(l.icon,{"data-loc":"client/src/components/DashboardOverview.tsx:150",className:`w-4 h-4 ${l.color}`})}),l.urgent&&e.jsx("span",{"data-loc":"client/src/components/DashboardOverview.tsx:153",className:"text-[10px] font-bold uppercase tracking-wide text-amber-600 bg-amber-50 px-1.5 py-0.5 rounded",children:"Action needed"})]}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:158",className:"text-2xl font-bold tabular-nums",children:l.value}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:159",className:"text-xs text-muted-foreground mt-0.5",children:l.title}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:160",className:"text-[11px] text-muted-foreground/70 mt-1",children:l.desc})]})},l.title))}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:167",className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs(F,{"data-loc":"client/src/components/DashboardOverview.tsx:169",className:"lg:col-span-2",children:[e.jsxs(Y,{"data-loc":"client/src/components/DashboardOverview.tsx:170",className:"flex flex-row items-center justify-between pb-3",children:[e.jsx(U,{"data-loc":"client/src/components/DashboardOverview.tsx:171",className:"text-base font-semibold",children:"Recent Submissions"}),e.jsxs(y,{"data-loc":"client/src/components/DashboardOverview.tsx:172",variant:"ghost",size:"sm",className:"text-xs gap-1",onClick:()=>t("leads"),children:["View all ",e.jsx(Q,{"data-loc":"client/src/components/DashboardOverview.tsx:178",className:"w-3 h-3"})]})]}),e.jsx(M,{"data-loc":"client/src/components/DashboardOverview.tsx:181",className:"p-0",children:i?.leads?.length?e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:188",className:"divide-y divide-border",children:i.leads.map(l=>{const h=gs[l.status]??gs.new;return e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:192",className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 transition-colors",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:193",className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 text-xs font-bold text-primary",children:[l.firstName[0],l.lastName[0]]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:196",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:197",className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("span",{"data-loc":"client/src/components/DashboardOverview.tsx:198",className:"font-medium text-sm",children:[l.firstName," ",l.lastName]}),e.jsx(R,{"data-loc":"client/src/components/DashboardOverview.tsx:199",variant:"outline",className:`text-[10px] px-1.5 py-0 border ${h.color}`,children:h.label})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:203",className:"flex items-center gap-3 mt-0.5 text-xs text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/components/DashboardOverview.tsx:204",children:Rt[l.caseType]??l.caseType}),l.city&&e.jsxs("span",{"data-loc":"client/src/components/DashboardOverview.tsx:205",children:["· ",l.city,", ",l.state]}),e.jsxs("span",{"data-loc":"client/src/components/DashboardOverview.tsx:206",children:["· ",new Date(l.createdAt).toLocaleDateString()]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:209",className:"flex items-center gap-1.5 flex-shrink-0",children:[l.phone&&e.jsx("a",{"data-loc":"client/src/components/DashboardOverview.tsx:211",href:`tel:${l.phone}`,className:"p-1.5 rounded hover:bg-muted transition-colors",children:e.jsx(oe,{"data-loc":"client/src/components/DashboardOverview.tsx:212",className:"w-3.5 h-3.5 text-muted-foreground"})}),e.jsx("a",{"data-loc":"client/src/components/DashboardOverview.tsx:215",href:`mailto:${l.email}`,className:"p-1.5 rounded hover:bg-muted transition-colors",children:e.jsx(ce,{"data-loc":"client/src/components/DashboardOverview.tsx:216",className:"w-3.5 h-3.5 text-muted-foreground"})})]})]},l.id)})}):e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:183",className:"text-center py-10 text-muted-foreground text-sm px-6",children:[e.jsx(re,{"data-loc":"client/src/components/DashboardOverview.tsx:184",className:"w-8 h-8 mx-auto mb-2 opacity-30"}),"No submissions yet. Your profile is live and submissions will appear here."]})})]}),e.jsxs(F,{"data-loc":"client/src/components/DashboardOverview.tsx:228",children:[e.jsx(Y,{"data-loc":"client/src/components/DashboardOverview.tsx:229",className:"pb-3",children:e.jsx(U,{"data-loc":"client/src/components/DashboardOverview.tsx:230",className:"text-base font-semibold",children:"Qu
11ick Actions"})}),e.jsxs(M,{"data-loc":"client/src/components/DashboardOverview.tsx:232",className:"space-y-2",children:[e.jsxs("button",{"data-loc":"client/src/components/DashboardOverview.tsx:233",onClick:()=>t("leads"),className:"w-full flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 transition-colors text-left group",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:237",className:"w-8 h-8 rounded-lg bg-blue-50 flex items-center justify-center flex-shrink-0",children:e.jsx(re,{"data-loc":"client/src/components/DashboardOverview.tsx:238",className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:240",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:241",className:"text-sm font-medium",children:"Manage Submissions"}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:242",className:"text-xs text-muted-foreground",children:"View and respond to inquiries"})]}),e.jsx(Q,{"data-loc":"client/src/components/DashboardOverview.tsx:244",className:"w-3.5 h-3.5 text-muted-foreground group-hover:text-foreground transition-colors"})]}),e.jsxs("button",{"data-loc":"client/src/components/DashboardOverview.tsx:247",onClick:()=>t("profile"),className:"w-full flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 transition-colors text-left group",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:251",className:"w-8 h-8 rounded-lg bg-purple-50 flex items-center justify-center flex-shrink-0",children:e.jsx(Cs,{"data-loc":"client/src/components/DashboardOverview.tsx:252",className:"w-4 h-4 text-purple-600"})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:254",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:255",className:"text-sm font-medium",children:"Edit Profile"}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:256",className:"text-xs text-muted-foreground",children:"Update your public listing"})]}),e.jsx(Q,{"data-loc":"client/src/components/DashboardOverview.tsx:258",className:"w-3.5 h-3.5 text-muted-foreground group-hover:text-foreground transition-colors"})]}),e.jsxs("button",{"data-loc":"client/src/components/DashboardOverview.tsx:261",onClick:()=>t("billing"),className:"w-full flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 transition-colors text-left group",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:265",className:"w-8 h-8 rounded-lg bg-green-50 flex items-center justify-center flex-shrink-0",children:e.jsx(X,{"data-loc":"client/src/components/DashboardOverview.tsx:266",className:"w-4 h-4 text-green-600"})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:268",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:269",className:"text-sm font-medium",children:"Billing & Credits"}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:270",className:"text-xs text-muted-foreground",children:"Manage your plan and credits"})]}),e.jsx(Q,{"data-loc":"client/src/components/DashboardOverview.tsx:272",className:"w-3.5 h-3.5 text-muted-foreground group-hover:text-foreground transition-colors"})]}),e.jsxs("button",{"data-loc":"client/src/components/DashboardOverview.tsx:275",onClick:()=>t("settings"),className:"w-full flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 transition-colors text-left group",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:279",className:"w-8 h-8 rounded-lg bg-amber-50 flex items-center justify-center flex-shrink-0",children:e.jsx(ee,{"data-loc":"client/src/components/DashboardOverview.tsx:280",className:"w-4 h-4 text-amber-600"})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:282",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:283",className:"text-sm font-medium",children:"Account Settings"}),e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:284",className:"text-xs text-muted-foreground",children:"Password, notifications"})]}),e.jsx(Q,{"data-loc":"client/src/components/DashboardOverview.tsx:286",className:"w-3.5 h-3.5 text-muted-foreground group-hover:text-foreground transition-colors"})]})]})]})]}),a&&a.total>0&&e.jsxs(F,{"data-loc":"client/src/components/DashboardOverview.tsx:294",children:[e.jsx(Y,{"data-loc":"client/src/components/DashboardOverview.tsx:295",className:"pb-3",children:e.jsxs(U,{"data-loc":"client/src/components/DashboardOverview.tsx:296",className:"text-base font-semibold flex items-center gap-2",children:[e.jsx(Ks,{"data-loc":"client/src/components/DashboardOverview.tsx:297",className:"w-4 h-4"})," Submission Pipeline"]})}),e.jsx(M,{"data-loc":"client/src/components/DashboardOverview.tsx:300",children:e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:301",className:"grid grid-cols-2 sm:grid-cols-5 ga
11p-3",children:[{label:"New",value:a.new,color:"bg-blue-500"},{label:"Viewed",value:a.viewed,color:"bg-amber-500"},{label:"Contacted",value:a.contacted,color:"bg-purple-500"},{label:"Converted",value:a.converted,color:"bg-green-500"},{label:"Invalid",value:a.total-a.new-a.viewed-a.contacted-a.converted,color:"bg-gray-300"}].map(l=>e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:309",className:"text-center",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:310",className:"text-xl font-bold tabular-nums",children:l.value}),e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:311",className:"flex items-center justify-center gap-1.5 mt-1",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardOverview.tsx:312",className:`w-2 h-2 rounded-full ${l.color}`}),e.jsx("span",{"data-loc":"client/src/components/DashboardOverview.tsx:313",className:"text-xs text-muted-foreground",children:l.label})]}),a.total>0&&e.jsxs("div",{"data-loc":"client/src/components/DashboardOverview.tsx:316",className:"text-[11px] text-muted-foreground/60 mt-0.5",children:[Math.round(l.value/a.total*100),"%"]})]},l.label))})})]})]})}const Ze={chapter7:"Chapter 7",chapter11:"Chapter 11",chapter12:"Chapter 12",chapter13:"Chapter 13",debtRelief:"Debt Relief",foreclosureDefense:"Foreclosure Defense",other:"Other"},Xe={under10k:"Under $10k","10k_25k":"$10k–$25k","25k_50k":"$25k–$50k","50k_100k":"$50k–$100k",over100k:"Over $100k"},hs={immediate:"Immediate",within30days:"Within 30 days",justExploring:"Just exploring"},Me={new:{label:"New",color:"bg-blue-50 text-blue-700 border-blue-200",icon:Ue},viewed:{label:"Viewed",color:"bg-amber-50 text-amber-700 border-amber-200",icon:Ue},contacted:{label:"Contacted",color:"bg-purple-50 text-purple-700 border-purple-200",icon:as},converted:{label:"Converted",color:"bg-green-50 text-green-700 border-green-200",icon:V},invalid:{label:"Invalid",color:"bg-gray-50 text-gray-500 border-gray-200",icon:we}},es=20;function Et({onNavigate:t}){const[a,i]=u.useState("all"),[m,x]=u.useState(0),[o,l]=u.useState(null),[h,v]=u.useState(null),p=w.useUtils(),{data:b,isLoading:T}=w.leads.getMyLeads.useQuery({status:a==="all"?void 0:a,limit:es,offset:m*es}),N=w.leads.updateLeadStatus.useMutation({onSuccess:()=>{p.leads.getMyLeads.invalidate(),p.leads.getLeadStats.invalidate(),g.success("Submission status updated")},onError:()=>g.error("Failed to update status")}),P=w.leads.viewLead.useMutation({onSuccess:s=>{p.leads.getMyLeads.invalidate(),p.leads.getLeadStats.invalidate(),v(null),l(s),g.success("Submission unlocked successfully")},onError:s=>{v(null),s.message.includes("Insufficient credits")?g.error("Not enough credits — buy more to unlock this submission.",{action:t?{label:"Buy Credits",onClick:()=>t("credits")}:void 0}):g.error("Failed to unlock submission")}}),d=(s,r)=>{s.stopPropagation(),v(r),P.mutate({leadId:r})},S=(s,r)=>{N.mutate({leadId:s,status:r}),o?.id===s&&l(A=>A&&{...A,status:r})},j=b?.creditBalance??0,D=b?Math.ceil(b.total/es):0,B=s=>!s.creditCharged&&s.status==="new";return e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:119",className:"space-y-4",children:[j===0&&(b?.lockedCount??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:122",className:"flex items-center gap-3 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3",children:[e.jsx(ae,{"data-loc":"client/src/components/LeadsTab.tsx:123",className:"w-4 h-4 text-amber-600 flex-shrink-0"}),e.jsxs("p",{"data-loc":"client/src/components/LeadsTab.tsx:124",className:"text-sm text-amber-800 flex-1",children:[e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:125",className:"font-semibold",children:[b.lockedCount," submission",b.lockedCount!==1?"s are":" is"," locked"]})," ","— you have no credits remaining. Buy credits to reveal contact details."]}),t&&e.jsxs(y,{"data-loc":"client/src/components/LeadsTab.tsx:131",size:"sm",className:"bg-amber-600 hover:bg-amber-700 text-white gap-1.5 flex-shrink-0",onClick:()=>t("credits"),children:[e.jsx(X,{"data-loc":"client/src/components/LeadsTab.tsx:136",className:"w-3.5 h-3.5"})," Buy Credits"]})]}),j>0&&j<=2&&(b?.lockedCount??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:144",className:"flex items-center gap-3 rounded-lg border border-blue-200 bg-blue-50 px-4 py-3",children:[e.jsx(me,{"data-loc":"client/src/components/LeadsTab.tsx:145",className:"w-4 h-4 text-blue-600 flex-shrink-0"}),e.jsxs("p",{"data-loc":"client/src/components/LeadsTab.tsx:146",className:"text-sm text-blue-800 flex-1",children:[e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:147",className:"font-semibold",children:[j," credit",j!==1?"s":""," remaining"]})," ","— top up soon so you don't miss incoming submissions."]}),t&&e.jsxs(y,{"data-loc":"client/src/components/LeadsTab.tsx:153",size:"sm",variant:"outline",className:"border-blue-300 text-blue-700 hover:bg-blue-100 gap-1.5 flex-shrink-0",onClick:()=>t("credits"),children:[e.jsx(X,{"data-loc":"client/src/components/LeadsTab.tsx:159",className:"w-3.5 h-3.5"})," Top Up"]})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:166",className:"flex items-center gap-3 flex-wrap",children:[e.jsxs(Te,{"data-loc":"client/src/components/LeadsTab.tsx:167",value:a,onValueChange:s=>{i(s),x(0)},children:[e.jsx(Pe,{"data-loc":"client/src/components/LeadsTab.tsx:174",className:"w-40 h-8 text-xs",children:e.jsx(Ce,{"data-loc":"client/src/components/LeadsTab.tsx:175",placeholder:"All statuses"})}),e.jsxs(ke,{"data-loc":"client/src/components/LeadsTab.tsx:177",children:[e.jsx(H,{"data-loc":"client/src/components/LeadsTab.tsx:178",value:"all",children:"All statuses"}),e.jsx(H,{"data-loc":"client/src/components/LeadsTab.tsx:179",value:"new",children:"New"}),e.jsx(H,{"data-loc":"client/src/components/LeadsTab.tsx:180",value:"viewed",children:"Viewed"}),e.jsx(H,{"data-loc":"client/src/components/LeadsTab.tsx:181",value:"contacted",children:"Contacted"}),e.jsx(H,{"data-loc":"client/src/components/LeadsTab.tsx:182",value:"converted",children:"Converted"}),e.jsx(H,{"data-loc":"client/src/components/LeadsTab.tsx:183",value:"invalid",children:"Invalid"})]})]}),b&&e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:187",className:"text-xs text-muted-foreground ml-auto",children:[b.total," submission",b.total!==1?"s":"",(b.lockedCount??0)>0&&e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:190",className:"ml-1 text-amber-600 font-medium",children:["· ",b.lockedCount," locked"]})]})]}),T?e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:200",className:"space-y-2",children:[...Array(5)].map((s,r)=>e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:202",className:"h-20 rounded-lg bg-muted animate-pulse"},r))}):b?.leads?.length?e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:218",className:"space-y-2",children:b.leads.map(s=>{const r=B(s),A=Me[s.status]??Me.new,K=A.icon,G=h===s.id;return r?e.jsx(F,{"data-loc":"client/src/components/LeadsTab.tsx:227",className:"relative overflow-hidden border-dashed border-amber-300 bg-amber-50/30",children:e.jsx(M,{"data-loc":"client/src/components/LeadsTab.tsx:231",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:232",className:"flex items-start gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:234",className:"w-10 h-10 rounded-full bg-amber-100 flex items-center justify-center flex-shrink-0",children:e.jsx(ae,{"data-loc":"client/src/components/LeadsTab.tsx:235",className:"w-4 h-4 text-amber-500"})}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:239",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:240",className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/components/LeadsTab.tsx:241",className:"font-semibold text-sm select-none blur-[5px] pointer-events-none","aria-hidden":"true",children:"████ ████████"}),e.jsxs(R,{"data-loc":"client/src/components/LeadsTab.tsx:247",variant:"outline",className:"text-[10px] px-1.5 py-0 border bg-amber-50 text-amber-700 border-amber-300 flex items-center gap-1",children:[e.jsx(ae,{"data-loc":"client/src/components/LeadsTab.tsx:251",className:"w-2.5 h-2.5"})," Locked"]}),s.isExclusive&&e.jsx(R,{"data-loc":"client/src/components/LeadsTab.tsx:254",variant:"outline",className:"text-[10px] px-1.5 py-0 border bg-amber-50 text-amber-700 border-amber-200",children:"Exclusive"})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:264",className:"flex items-center gap-3 mt-1 text-xs text-muted-foreground flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/components/LeadsTab.tsx:265",className:"font-medium text-foreground
11/70",children:Ze[s.caseType]??s.caseType}),s.debtAmount&&e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:268",children:["· ",Xe[s.debtAmount]]}),s.urgency&&s.urgency!=="justExploring"&&e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:270",className:`font-medium ${s.urgency==="immediate"?"text-red-600":"text-amber-600"}`,children:["· ",hs[s.urgency]]}),s.state&&e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:279",className:"flex items-center gap-1",children:[e.jsx(Se,{"data-loc":"client/src/components/LeadsTab.tsx:280",className:"w-2.5 h-2.5"}),s.state]}),e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:284",className:"flex items-center gap-1",children:[e.jsx(ye,{"data-loc":"client/src/components/LeadsTab.tsx:285",className:"w-2.5 h-2.5"}),new Date(s.createdAt).toLocaleDateString()]})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:291",className:"flex items-center gap-3 mt-1.5 text-xs text-muted-foreground",children:[e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:292",className:"flex items-center gap-1 blur-[5px] select-none pointer-events-none","aria-hidden":"true",children:[e.jsx(oe,{"data-loc":"client/src/components/LeadsTab.tsx:296",className:"w-2.5 h-2.5"})," (555) 000-0000"]}),e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:298",className:"flex items-center gap-1 blur-[5px] select-none pointer-events-none","aria-hidden":"true",children:[e.jsx(ce,{"data-loc":"client/src/components/LeadsTab.tsx:302",className:"w-2.5 h-2.5"})," [email protected]"]})]})]}),e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:308",className:"flex-shrink-0",children:e.jsx(y,{"data-loc":"client/src/components/LeadsTab.tsx:309",size:"sm",className:"bg-amber-600 hover:bg-amber-700 text-white gap-1.5 text-xs whitespace-nowrap",disabled:G,onClick:z=>{j===0?(z.stopPropagation(),t?t("credits"):g.error("No credits remaining. Please buy more credits.")):d(z,s.id)},children:G?e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/components/LeadsTab.tsx:325",className:"animate-spin inline-block",children:"⏳"})," Unlocking…"]}):j===0?e.jsxs(e.Fragment,{children:[e.jsx(X,{"data-loc":"client/src/components/LeadsTab.tsx:329",className:"w-3.5 h-3.5"})," Buy Credits"]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{"data-loc":"client/src/components/LeadsTab.tsx:333",className:"w-3.5 h-3.5"})," Unlock — 1 credit"]})})})]})})},s.id):e.jsx(F,{"data-loc":"client/src/components/LeadsTab.tsx:346",className:"cursor-pointer hover:shadow-sm transition-shadow",onClick:()=>l(s),children:e.jsx(M,{"data-loc":"client/src/components/LeadsTab.tsx:351",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:352",className:"flex items-start gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:353",className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 text-sm font-bold text-primary",children:[s.firstName[0],s.lastName[0]]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:357",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:358",className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:359",className:"font-semibold text-sm",children:[s.firstName," ",s.lastName]}),e.jsxs(R,{"data-loc":"client/src/components/LeadsTab.tsx:362",variant:"outline",className:`text-[10px] px-1.5 py-0 border ${A.color} flex items-center gap-1`,children:[e.jsx(K,{"data-loc":"client/src/components/LeadsTab.tsx:366",className:"w-2.5 h-2.5"}),A.label]}),s.isExclusive&&e.jsx(R,{"data-loc":"client/src/components/LeadsTab.tsx:370",variant:"outline",className:"text-[10px] px-1.5 py-0 border bg-amber-50 text-amber-700 border-amber-200",children:"Exclusive"})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:378",className:"flex items-center gap-3 mt-1 text-xs text-muted-foreground flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/components/LeadsTab.tsx:379",className:"font-medium text-foreground
11/70",children:Ze[s.caseType]??s.caseType}),s.debtAmount&&e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:382",children:["· ",Xe[s.debtAmount]]}),s.city&&e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:384",className:"flex items-center gap-1",children:[e.jsx(Se,{"data-loc":"client/src/components/LeadsTab.tsx:385",className:"w-2.5 h-2.5"}),s.city,", ",s.state]}),e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:389",className:"flex items-center gap-1",children:[e.jsx(ye,{"data-loc":"client/src/components/LeadsTab.tsx:390",className:"w-2.5 h-2.5"}),new Date(s.createdAt).toLocaleDateString()]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:395",className:"flex items-center gap-1.5 flex-shrink-0",onClick:z=>z.stopPropagation(),children:[s.phone&&e.jsx("a",{"data-loc":"client/src/components/LeadsTab.tsx:400",href:`tel:${s.phone}`,className:"p-2 rounded-lg hover:bg-muted transition-colors",title:"Call",children:e.jsx(oe,{"data-loc":"client/src/components/LeadsTab.tsx:405",className:"w-3.5 h-3.5 text-muted-foreground"})}),e.jsx("a",{"data-loc":"client/src/components/LeadsTab.tsx:408",href:`mailto:${s.email}`,className:"p-2 rounded-lg hover:bg-muted transition-colors",title:"Email",children:e.jsx(ce,{"data-loc":"client/src/components/LeadsTab.tsx:413",className:"w-3.5 h-3.5 text-muted-foreground"})})]})]})})},s.id)})}):e.jsx(F,{"data-loc":"client/src/components/LeadsTab.tsx:206",children:e.jsxs(M,{"data-loc":"client/src/components/LeadsTab.tsx:207",className:"text-center py-16 text-muted-foreground",children:[e.jsx(re,{"data-loc":"client/src/components/LeadsTab.tsx:208",className:"w-10 h-10 mx-auto mb-3 opacity-30"}),e.jsx("p",{"data-loc":"client/src/components/LeadsTab.tsx:209",className:"text-sm font-medium",children:"No submissions found"}),e.jsx("p",{"data-loc":"client/src/components/LeadsTab.tsx:210",className:"text-xs mt-1",children:a!=="all"?`No ${a} submissions. Try a different filter.`:"Submissions from your profile page will appear here."})]})}),D>1&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:426",className:"flex items-center justify-between pt-2",children:[e.jsxs(y,{"data-loc":"client/src/components/LeadsTab.tsx:427",variant:"outline",size:"sm",onClick:()=>x(s=>Math.max(0,s-1)),disabled:m===0,className:"gap-1 text-xs",children:[e.jsx(Zs,{"data-loc":"client/src/components/LeadsTab.tsx:434",className:"w-3.5 h-3.5"})," Previous"]}),e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:436",className:"text-xs text-muted-foreground",children:["Page ",m+1," of ",D]}),e.jsxs(y,{"data-loc":"client/src/components/LeadsTab.tsx:439",variant:"outline",size:"sm",onClick:()=>x(s=>Math.min(D-1,s+1)),disabled:m>=D-1,className:"gap-1 text-xs",children:["Next ",e.jsx(Ss,{"data-loc":"client/src/components/LeadsTab.tsx:446",className:"w-3.5 h-3.5"})]})]}),e.jsx(ie,{"data-loc":"client/src/components/LeadsTab.tsx:452",open:!!o,onOpenChange:s=>!s&&l(null),children:e.jsx(de,{"data-loc":"client/src/components/LeadsTab.tsx:453",className:"max-w-lg",children:o&&(()=>{const s=Me[o.status]??Me.new;return e.jsxs(e.Fragment,{children:[e.jsx(fe,{"data-loc":"client/src/components/LeadsTab.tsx:459",children:e.jsxs(ge,{"data-loc":"client/src/components/LeadsTab.tsx:460",className:"flex items-center gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:461",className:"w-9 h-9 rounded-full bg-primary/10 flex items-center justify-center text-sm font-bold text-primary",children:[o.firstName[0],o.lastName[0]]}),o.firstName," ",o.lastName]})}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:469",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:470",className:"flex items-center gap-2",children:[e.jsx(R,{"data-loc":"client/src/components/LeadsTab.tsx:471",variant:"outline",className:`text-xs px-2 py-0.5 border ${s.color}`,children:s.label}),o.isExclusive&&e.jsx(R,{"data-loc":"client/src/components/LeadsTab.tsx:478",variant:"outline",className:"text-xs px-2 py-0.5 border bg-amber-50 text-amber-700 border-amber-200",children:"Exclusive Submission"})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:487",className:"grid grid-cols-2 gap-3",children:[e.jsxs("a",{"data-loc":"client/src/components/LeadsTab.tsx:488",href:`mailto:${o.email}`,className:"flex items-center gap-2 text-sm p-2.5 rounded-lg bg-muted/50 hover:bg-muted transition-colors",children:[e.jsx(ce,{"data-loc":"client/src/components/LeadsTab.tsx:492",className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/LeadsTab.tsx:493",className:"truncate",children:o.email})]}),o.phone?e.jsxs("a",{"data-loc":"client/src/components/LeadsTab.tsx:496",href:`tel:${o.phone}`,className:"flex items-center gap-2 text-sm p-2.5 rounded-lg bg-muted/50 hover:bg-muted transition-colors",children:[e.jsx(oe,{"data-loc":"client/src/components/LeadsTab.tsx:500",className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/LeadsTab.tsx:501",children:o.phone})]}):e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:504",className:"flex items-center gap-2 text-sm p-2.5 rounded-lg bg-muted/30 text-muted-foreground",children:[e.jsx(oe,{"data-loc":"client/src/components/LeadsTab.tsx:505",className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/LeadsTab.tsx:506",children:"No phone"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:511",className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:512",className:"p-2.5 rounded-lg bg-muted/30",children:[e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:513",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-0.5",children:"Case Type"}),e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:516",className:"font-medium",children:Ze[o.caseType]??o.caseType})]}),o.debtAmount&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:521",className:"p-2.5 rounded-lg bg-muted/30",children:[e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:522",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-0.5",children:"Debt Amount"}),e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:525",className:"font-medium",children:Xe[o.debtAmount]})]}),o.urgency&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:529",className:"p-2.5 rounded-lg bg-muted/30",children:[e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:530",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-0.5",children:"Urgency"}),e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:533",className:"font-medium",children:hs[o.urgency]??o.urgency})]}),o.city&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:539",className:"p-2.5 rounded-lg bg-muted/30",children:[e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:540",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-0.5",children:"Location"}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:543",className:"font-medium",children:[o.city,", ",o.state," ",o.zipCode]})]})]}),o.sourceUrl&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:551",className:"p-2.5 rounded-lg bg-muted/30",children:[e.jsx("div",{"data-loc":"client/src/components/LeadsTab.tsx:552",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-0.5",children:"Source Page"}),e.jsxs("a",{"data-loc":"client/src/components/LeadsTab.tsx:553",href:Ye(o.sourceUrl),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-sm text-blue-600 hover:underline truncate",title:o.sourceUrl,children:[e.jsx(Ls,{"data-loc":"client/src/components/LeadsTab.tsx:560",className:"w-3 h-3 flex-shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/LeadsTab.tsx:561",className:"truncate",children:(()=>
11{try{const r=new URL(o.sourceUrl);return r.pathname+(r.search||"")}catch{return o.sourceUrl}})()})]})]}),o.message&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:568",className:"p-3 rounded-lg bg-muted/30 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:569",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1.5 flex items-center gap-1",children:[e.jsx(Ps,{"data-loc":"client/src/components/LeadsTab.tsx:570",className:"w-3 h-3"})," Message"]}),e.jsx("p",{"data-loc":"client/src/components/LeadsTab.tsx:572",className:"leading-relaxed",children:o.message})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:576",className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:577",className:"flex items-center gap-1",children:[e.jsx(os,{"data-loc":"client/src/components/LeadsTab.tsx:578",className:"w-3 h-3"}),"Received ",new Date(o.createdAt).toLocaleString()]}),o.contactedAt&&e.jsxs("span",{"data-loc":"client/src/components/LeadsTab.tsx:582",className:"flex items-center gap-1",children:[e.jsx(as,{"data-loc":"client/src/components/LeadsTab.tsx:583",className:"w-3 h-3"}),"Contacted ",new Date(o.contactedAt).toLocaleString()]})]}),o.status!=="converted"&&o.status!=="invalid"&&e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:590",className:"border-t pt-4",children:[e.jsx("p",{"data-loc":"client/src/components/LeadsTab.tsx:591",className:"text-xs text-muted-foreground mb-2",children:"Update status:"}),e.jsxs("div",{"data-loc":"client/src/components/LeadsTab.tsx:592",className:"flex gap-2 flex-wrap",children:[o.status!=="contacted"&&e.jsxs(y,{"data-loc":"client/src/components/LeadsTab.tsx:594",size:"sm",variant:"outline",className:"text-xs gap-1",onClick:()=>S(o.id,"contacted"),disabled:N.isPending,children:[e.jsx(as,{"data-loc":"client/src/components/LeadsTab.tsx:603",className:"w-3 h-3"})," Mark Contacted"]}),e.jsxs(y,{"data-loc":"client/src/components/LeadsTab.tsx:606",size:"sm",variant:"outline",className:"text-xs gap-1 border-green-300 text-green-700 hover:bg-green-50",onClick:()=>S(o.id,"converted"),disabled:N.isPending,children:[e.jsx(V,{"data-loc":"client/src/components/LeadsTab.tsx:615",className:"w-3 h-3"})," Mark Converted"]}),e.jsxs(y,{"data-loc":"client/src/components/LeadsTab.tsx:617",size:"sm",variant:"outline",className:"text-xs gap-1 border-gray-300 text-gray-500 hover:bg-gray-50",onClick:()=>S(o.id,"invalid"),disabled:N.isPending,children:[e.jsx(we,{"data-loc":"client/src/components/LeadsTab.tsx:626",className:"w-3 h-3"})," Mark Invalid"]})]})]})]})]})})()})})]})}var qe="Switch",[$t]=et(qe),[It,Wt]=$t(qe),Ms=u.forwardRef((t,a)=>{const{__scopeSwitch:i,name:m,checked:x,defaultChecked:o,required:l,disabled:h,value:v="on",onCheckedChange:p,form:b,...T}=t,[N,P]=u.useState(null),d=Ds(a,s=>P(s)),S=u.useRef(!1),j=N?b||!!N.closest("form"):!0,[D,B]=Xs({prop:x,defaultProp:o??!1,onChange:p,caller:qe});return e.jsxs(It,{scope:i,checked:D,disabled:h,children:[e.jsx(As.button,{type:"button",role:"switch","aria-checked":D,"aria-required":l,"data-state":Ws(D),"data-disabled":h?"":void 0,disabled:h,value:v,...T,ref:d,onClick:st(t.onClick,s=>{B(r=>!r),j&&(S.current=s.isPropagationStopped(),S.current||s.stopPropagation())})}),j&&e.jsx(Is,{control:N,bubbles:!S.current,name:m,value:v,checked:D,required:l,disabled:h,form:b,style:{transform:"translateX(-100%)"}})]})});Ms.displayName=qe;var Es="SwitchThumb",$s=u.forwardRef((t,a)=>{const{__scopeSwitch:i,...m}=t,x=Wt(Es,i);return e.jsx(As.span,{"data-state":Ws(x.checked),"data-disabled":x.disabled?"":void 0,...m,ref:a})});$s.displayName=Es;var Yt="SwitchBubbleInput",Is=u.forwardRef(({__scopeSwitch:t,control:a,checked:i,bubbles:m=!0,...x},o)=>{const l=u.useRef(null),h=Ds(l,o),v=tt(i),p=at(a);return u.useEffect(()=>{const b=l.current;if(!b)return;const T=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(T,"checked").set;if(v!==i&&P){const d=new Event("click",{bubbles:m});P.call(b,i),b.dispatchEvent(d)}},[v,i,m]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i,...x,tabIndex:-1,ref:h,style:{...x.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Is.displayName=Yt;function Ws(t){return t?"checked":"unchecked"}var Ut=Ms,Gt=$s;function Ys({className:t,...a}){return e.jsx(Ut,{"data-loc":"client/src/components/ui/switch.tsx:11","data-slot":"switch",className:rs("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:e.jsx(Gt,{"data-loc":"client/src/components/ui/switch.tsx:19","data-slot":"switch-thumb",className:rs("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function zt(){const{data:t,isLoading:a,refetch:i}=w.portal.getMyListings.useQuery(),[m,x]=u.useState(!1),[o,l]=u.useState(""),h=w.portal.setPrimaryEmail.useMutation({onSuccess:d=>{g.success(`Primary email updated to ${d.primaryEmail}`),x(!1),i()},onError:d=>g.error(d.message)}),v=w.portal.toggleListingActive.useMutation({onSuccess:()=>{g.success("Listing status updated"),i()},onError:d=>g.error(d.message)});if(a)return e.jsx(F,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:47",children:e.jsx(M,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:48",className:"py-8",children:e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:49",className:"flex items-center justify-center gap-2 text-muted-foreground",children:[e.jsx("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:50",className:"w-4 h-4 border-2 border-current border-t-transparent roun
11ded-full animate-spin"}),e.jsx("span",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:51",className:"text-sm",children:"Loading office listings..."})]})})});if(!t||t.listings.length===0)return e.jsx(F,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:60",children:e.jsxs(Y,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:61",children:[e.jsxs(U,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:62",className:"text-base flex items-center gap-2",children:[e.jsx(ss,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:63",className:"w-4 h-4"})," Office Listings"]}),e.jsx(le,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:65",children:"No office listings found for your account."})]})});const{listings:p,primaryEmail:b,primaryProfileId:T}=t,N=Array.from(new Set(p.map(d=>d.email).filter(Boolean))),P=()=>{if(!o.trim()||!o.includes("@")){g.error("Please enter a valid email address");return}h.mutate({email:o.trim()})};return e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:85",className:"space-y-6",children:[e.jsxs(F,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:87",children:[e.jsxs(Y,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:88",children:[e.jsxs(U,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:89",className:"text-base flex items-center gap-2",children:[e.jsx(ce,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:90",className:"w-4 h-4"})," Primary Contact Email"]}),e.jsx(le,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:92",children:"This email receives all submission notifications. When you have multiple office listings, notifications are sent to this single address instead of each listing's email."})]}),e.jsxs(M,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:97",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:98",className:"flex items-center gap-3 p-3 rounded-lg bg-muted/40",children:[e.jsx(ce,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:99",className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:100",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:101",className:"text-sm font-medium truncate",children:b??"No primary email set"}),e.jsx("p",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:104",className:"text-xs text-muted-foreground",children:b?"All submission notifications are sent to this address":"Submission notifications go to each listing's individual email"})]}),e.jsxs(R,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:110",variant:"outline",className:"text-xs flex-shrink-0",children:[e.jsx(V,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:111",className:"w-3 h-3 mr-1"}),"Active"]})]}),m?e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:117",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:118",className:"space-y-1.5",children:[e.jsx(E,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:119",className:"text-xs font-medium",children:"New Primary Email"}),e.jsx(W,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:120",type:"email",value:o,onChange:d=>l(d.target.value),placeholder:"Enter your preferred contact email",className:"h-9"})]}),N.length>1&&e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:129",className:"space-y-1.5",children:[e.jsx("p",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:130",className:"text-xs text-muted-foreground",children:"Or select from your listing emails:"}),e.jsx("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:131",className:"flex flex-wrap gap-2",children:N.map(d=>e.jsx("button",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:133",type:"button",onClick:()=>l(d),className:`text-xs px-2.5 py-1 rounded-md border transition-colors ${o===d?"border-primary bg-primary/10 text-primary":"border-border hover:border-primary/50 text-muted-foreground hover:text-foreground"}`,children:d},d))})]}),e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:149",className:"flex gap-2",children:[e.jsx(y,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:150",size:"sm",className:"text-xs",onClick:P,disabled:h.isPending,children:h.isPending?"Saving...":"Save Email"}),e.jsx(y,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:158",size:"sm",variant:"outline",className:"text-xs",onClick:()=>x(!1),children:"Cancel"})]})]}):e.jsx(y,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:169",size:"sm",variant:"outline",className:"text-xs",onClick:()=>{l(b??""),x(!0)},children:"Change Primary Email"})]})]}),e.jsxs(F,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:185",children:[e.jsxs(Y,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:186",children:[e.jsxs(U,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:187",className:"text-base flex items-center gap-2",children:[e.jsx(ss,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:188",className:"w-4 h-4"}
11)," Office Locations",e.jsxs(R,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:189",variant:"secondary",className:"text-xs ml-auto",children:[p.length," ",p.length===1?"listing":"listings"]})]}),e.jsx(le,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:193",children:"Manage your office listings across different locations. Inactive listings won't appear in search results or receive submissions."})]}),e.jsxs(M,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:198",className:"space-y-3",children:[p.map(d=>{const S=d.id===T,j=d.status==="active";return e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:204",className:`relative p-4 rounded-lg border transition-colors ${S?"border-primary/30 bg-primary/5":j?"border-border bg-card":"border-border/50 bg-muted/30 opacity-70"}`,children:[S&&e.jsxs(R,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:216",className:"absolute -top-2 right-3 text-[10px] px-2 py-0",children:[e.jsx(ee,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:217",className:"w-2.5 h-2.5 mr-0.5"}),"Primary"]}),e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:222",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:223",className:"flex-1 min-w-0 space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:225",children:[e.jsx("h4",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:226",className:"text-sm font-semibold truncate",children:d.firmName}),d.attorneyName&&e.jsx("p",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:230",className:"text-xs text-muted-foreground",children:d.attorneyName})]}),e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:235",className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[e.jsxs("span",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:236",className:"flex items-center gap-1",children:[e.jsx(Se,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:237",className:"w-3 h-3"}),d.city,", ",d.stateAbbreviation??d.state,d.zipCode&&` ${d.zipCode}`]}),d.phone&&e.jsxs("span",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:242",className:"flex items-center gap-1",children:[e.jsx(oe,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:243",className:"w-3 h-3"}),d.phone]}),d.email&&e.jsxs("span",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:248",className:"flex items-center gap-1",children:[e.jsx(ce,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:249",className:"w-3 h-3"}),d.email]})]}),d.address&&e.jsxs("p",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:257",className:"text-xs text-muted-foreground/80 leading-snug",children:[e.jsx("span",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:258",className:"block truncate",children:d.address}),e.jsxs("span",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:259",className:"block",children:[d.city,", ",d.stateAbbreviation??d.state,d.zipCode?` ${d.zipCode}`:""]})]}),e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:266",className:"flex items-center gap-3 text-xs",children:[d.verified&&e.jsxs(R,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:268",variant:"outline",className:"text-[10px] text-green-700 border-green-200 bg-green-50",children:[e.jsx(V,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:269",className:"w-2.5 h-2.5 mr-0.5"}),"Verified"]}),d.totalLeads>0&&e.jsxs("span",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:274",className:"text-muted-foreground",children:[d.totalLeads," submission",d.totalLeads!==1?"s":""]}),e.jsxs("a",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:278",href:`/attorney/${d.slug}/`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-0.5 text-primary hover:underline",children:[e.jsx(Ls,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:284",className:"w-3 h-3"}),"View"]}
11)]})]}),e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:291",className:"flex flex-col items-center gap-1 flex-shrink-0",children:[e.jsx(Ys,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:292",checked:j,disabled:S||v.isPending,onCheckedChange:D=>{v.mutate({listingId:d.id,active:D})}}),e.jsx("span",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:299",className:"text-[10px] text-muted-foreground",children:S?"Primary":j?"Active":"Inactive"})]})]})]},d.id)}),e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:309",className:"flex items-start gap-2 p-3 rounded-lg bg-amber-50 border border-amber-100 text-xs text-amber-800",children:[e.jsx(J,{"data-loc":"client/src/components/OfficeListingsSettings.tsx:310",className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:311",children:[e.jsx("p",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:312",className:"font-medium",children:"About multiple listings"}),e.jsx("p",{"data-loc":"client/src/components/OfficeListingsSettings.tsx:313",className:"mt-0.5 text-amber-700",children:"Listings are grouped by email address. If you have offices in multiple states, each will appear here. Your primary profile cannot be deactivated. Inactive listings are hidden from public search results."})]})]})]})]})]})}function _t(){const{data:t,refetch:a}=w.auth.me.useQuery(),[i,m]=u.useState(!1),[x,o]=u.useState(t?.name??""),[l,h]=u.useState(t?.email??""),[v,p]=u.useState(!1),[b,T]=u.useState(""),[N,P]=u.useState(""),[d,S]=u.useState(""),[j,D]=u.useState(!1),[B,s]=u.useState(!1),[r,A]=u.useState(!1),K=async()=>{if(!x.trim()){g.error("Name cannot be empty");return}p(!0);try{const L=await fetch("/api/auth/update-profile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:x.trim(),email:l.trim()}),credentials:"include"}),$=await L.json();if(!L.ok)throw new Error($.error??"Failed to update profile");await a(),g.success("Profile updated successfully")}catch(L){g.error(L.message??"Failed to update profile")}finally{p(!1)}},G=async()=>{if(!b){g.error("Please enter your current password");return}if(N.length<8){g.error("New password must be at least 8 characters");return}if(N!==d){g.error("Passwords do not match");return}A(!0);try{const L=await fetch("/api/auth/change-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:b,newPassword:N}),credentials:"include"}),$=await L.json();if(!L.ok)throw new Error($.error??"Failed to change password");T(""),P(""),S(""),g.success("Password changed successfully")}catch(L){g.error(L.message??"Failed to change password")}finally{A(!1)}},_=(L=>{if(!L)return null;let $=0;return L.length>=8&&$++,L.length>=12&&$++,/[A-Z]/.test(L)&&$++,/[0-9]/.test(L)&&$++,/[^A-Za-z0-9]/.test(L)&&$++,$<=1?{label:"Weak",color:"bg-red-500",width:"w-1/5"}:$<=2?{label:"Fair",color:"bg-amber-500",width:"w-2/5"}:$<=3?{label:"Good",color:"bg-yellow-500",width:"w-3/5"}:$<=4?{label:"Strong",color:"bg-green-500",width:"w-4/5"}:{label:"Very Strong",color:"bg-green-600",width:"w-full"}})(N);return e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:107",className:"space-y-6 max-w-2xl",children:[e.jsxs(F,{"data-loc":"client/src/components/AccountSettings.tsx:109",children:[e.jsxs(Y,{"data-loc":"client/src/components/AccountSettings.tsx:110",children:[e.jsxs(U,{"data-loc":"client/src/components/AccountSettings.tsx:111",className:"text-base flex items-center gap-2",children:[e.jsx(cs,{"data-loc":"client/src/components/AccountSettings.tsx:112",className:"w-4 h-4"})," Profile Information"]}),e.jsx(le,{"data-loc":"client/src/components/AccountSettings.tsx:114",children:"Update your account name and email address."})]}),e.jsxs(M,{"data-loc":"client/src/components/AccountSettings.tsx:118",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:119",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:120",className:"space-y-1.5",children:[e.jsx(E,{"data-loc":"client/src/components/AccountSettings.tsx:121",htmlFor:"name",className:"text-xs font-medium",children:"Full Name"}),e.jsx(W,{"data-loc":"client/src/components/AccountSettings.tsx:122",id:"name",value:x,onChange:L=>o(L.target.value),placeholder:"Your full name",className:"h-9"})]}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:130",className:"space-y-1.5",children:[e.jsx(E,{"data-loc":"client/src/components/AccountSettings.tsx:131",htmlFor:"email",className:"text-xs font-medium",children:"Email Address"}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:132",className:"relative",children:[e.jsx(ce,{"data-loc":"client/src/components/AccountSettings.tsx:133",className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground"}),e.jsx(W,{"data-loc":"client/src/components/AccountSettings.tsx:134",id:"email",type:"email",value:l,onCh
11ange:L=>h(L.target.value),placeholder:"[email protected]",className:"h-9 pl-8"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:147",className:"rounded-lg bg-muted/40 p-3 text-xs text-muted-foreground space-y-1",children:[e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:148",className:"flex items-center gap-2",children:[e.jsx(We,{"data-loc":"client/src/components/AccountSettings.tsx:149",className:"w-3.5 h-3.5"}),e.jsxs("span",{"data-loc":"client/src/components/AccountSettings.tsx:150",children:["Login method: ",e.jsx("span",{"data-loc":"client/src/components/AccountSettings.tsx:150",className:"font-medium text-foreground",children:t?.loginMethod??"email"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:152",className:"flex items-center gap-2",children:[e.jsx(V,{"data-loc":"client/src/components/AccountSettings.tsx:153",className:"w-3.5 h-3.5"}),e.jsxs("span",{"data-loc":"client/src/components/AccountSettings.tsx:154",children:["Account role: ",e.jsx("span",{"data-loc":"client/src/components/AccountSettings.tsx:154",className:"font-medium text-foreground capitalize",children:t?.role??"user"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:156",className:"flex items-center gap-2",children:[e.jsx(J,{"data-loc":"client/src/components/AccountSettings.tsx:157",className:"w-3.5 h-3.5"}),e.jsxs("span",{"data-loc":"client/src/components/AccountSettings.tsx:158",children:["Email verified: ",e.jsx("span",{"data-loc":"client/src/components/AccountSettings.tsx:158",className:`font-medium ${t?.emailVerified?"text-green-600":"text-amber-600"}`,children:t?.emailVerified?"Yes":"No"})]})]})]}),e.jsx(y,{"data-loc":"client/src/components/AccountSettings.tsx:162",onClick:K,disabled:v,size:"sm",className:"text-xs",children:v?"Saving...":"Save Changes"})]})]}),e.jsx(zt,{"data-loc":"client/src/components/AccountSettings.tsx:174"}),e.jsx(ut,{"data-loc":"client/src/components/AccountSettings.tsx:176"}),e.jsxs(F,{"data-loc":"client/src/components/AccountSettings.tsx:179",children:[e.jsxs(Y,{"data-loc":"client/src/components/AccountSettings.tsx:180",children:[e.jsxs(U,{"data-loc":"client/src/components/AccountSettings.tsx:181",className:"text-base flex items-center gap-2",children:[e.jsx(ae,{"data-loc":"client/src/components/AccountSettings.tsx:182",className:"w-4 h-4"})," Change Password"]}),e.jsx(le,{"data-loc":"client/src/components/AccountSettings.tsx:184",children:"Update your password. You'll receive a security notification email after the change."})]}),e.jsx(M,{"data-loc":"client/src/components/AccountSettings.tsx:188",className:"space-y-4",children:t?.loginMethod==="google"?e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:190",className:"rounded-lg bg-muted/40 p-4 text-sm text-muted-foreground flex items-start gap-3",children:[e.jsx(J,{"data-loc":"client/src/components/AccountSettings.tsx:191",className:"w-4 h-4 mt-0.5 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:192",children:[e.jsx("p",{"data-loc":"client/src/components/AccountSettings.tsx:193",className:"font-medium text-foreground",children:"Google account"}),e.jsx("p",{"data-loc":"client/src/components/AccountSettings.tsx:194",className:"mt-0.5",children:"Your account uses Google sign-in. Password management is handled by Google — visit your Google account settings to change your password."})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:199",className:"space-y-1.5",children:[e.jsx(E,{"data-loc":"client/src/components/AccountSettings.tsx:200",htmlFor:"currentPassword",className:"text-xs font-medium",children:"Current Password"}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:201",className:"relative",children:[e.jsx(W,{"data-loc":"client/src/components/AccountSettings.tsx:202",id:"currentPassword",type:j?"text":"password",value:b,onChange:L=>T(L.target.value),placeholder:"Enter current password",className:"h-9 pr-9"}),e.jsx("button",{"data-loc":"client/src/components/AccountSettings.tsx:210",type:"button",onClick:()=>D(!j),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",children:j?e.jsx(xs,{"data-loc":"client/src/components/AccountSettings.tsx:215",className:"w-3.5 h-3.5"}):e.jsx(Ue,{"data-loc":"client/src/components/AccountSettings.tsx:215",className:"w-3.5 h-3.5"})})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:220",className:"space-y-1.5",children:[e.jsx(E,{"data-loc":"client/src/components/AccountSettings.tsx:221",htmlFor:"newPassword",className:"text-xs font-medium",children:"New Password"}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:222",className:"relative",children:[e.jsx(W,{"data-loc":"client/src/components/AccountSettings.tsx:223",id:"newPassword",type:B?"text":"password",value:N,onChange:L=>P(L.target.value),placeholder:"At least 8 characters",className:"h-9 pr-9"}),e.jsx("button",{"data-loc":"client/src/components/AccountSettings.tsx:231",type:"button",onClick:()=>s(!B),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",children:B?e.jsx(xs,{"data-loc":"client/src/components/AccountSettings.tsx:236",className:"w-3.5 h-3.5"}):e.jsx(Ue,{"data-loc":"client/src/components/AccountSettings.tsx:236",className:"w-3.5 h-3.5"})})]}),_&&e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:240",className:"space-y-1",children:[e.jsx("div",{"data-loc":"client/src/components/AccountSettings.tsx:241",className:"h-1 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/components/AccountSettings.tsx:242",className:`h-full rounded-full transition-all ${_.color} ${_.width}`})}),e.jsxs("p",{"data-loc":"client/src/components/AccountSettings.tsx:244",className:"text-[11px] text-muted-foreground",children:["Strength: ",e.jsx("span",{"data-loc":"client/src/components/AccountSettings.tsx:244",className:"font-medium",children:_.label})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:249",className:"space-y-1.5",children:[e.jsx(E,{"data-loc":"client/src/components/AccountSettings.tsx:250",htmlFor:"confirmPassword",className:"text-xs font-medium",children:"Confirm New Password"}),e.jsx(W,{"data-loc":"client/src/components/AccountSettings.tsx:251",id:"confirmPassword",type:"password",value:d,onChange:L=>S(L.target.value),placeholder:"Repeat new password",className:"h-9"}),d&&N!==d&&e.jsxs("p",{"data-loc":"client/src/components/AccountSettings.tsx:260",className:"text-[11px] text-red-500 flex items-center gap-1",children:[e.jsx(J,{"data-loc":"client/src/components/AccountSettings.tsx:261",className:"w-3 h-3"})," Passwords do not match"]}),d&&N===d&&N.length>=8&&e.jsxs("p",{"data-loc":"client/src/components/AccountSettings.tsx:265",className:"text-[11px] text-green-600 flex items-center gap-1",children:[e.jsx(V,{"data-loc":"client/src/components/AccountSettings.tsx:266",className:"w-3 h-3"})," Passwords match"]})]}),e.jsx(y,{"data-loc":"client/src/components/AccountSettings.tsx:271",onClick:G,disabled:r||!b||!N||N!==d,size:"sm",className:"text-xs",children:r?"Updating...":"Update Password"})]})})]}),e.jsxs(F,{"data-loc":"client/src/components/AccountSettings.tsx:285",className:"border-red-200",children:[e.jsxs(Y,{"data-loc":"client/src/components/AccountSettings.tsx:286",children:[e.jsxs(U,{"data-loc":"client/src/components/AccountSettings.tsx:287",className:"text-base text-red-600 flex items-center gap-2",children:[e.jsx(J,{"data-loc":"client/src/components/AccountSettings.tsx:288",className:"w-4 h-4"})," Danger Zone"]}),e.jsx(le,{"data-loc":"client/src/components/AccountSettings.tsx:290",children:"Irreversible account actions. Proceed with caution."})]}),e.jsx(M,{"data-loc":"client/src/components/AccountSettings.tsx:294",children:e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:295",className:"flex items-center justify-between p-3 rounded-lg border border-red-100 bg-red-50/50",children:[e.jsxs("div",{"data-loc":"client/src/components/AccountSettings.tsx:296",children:[e.jsx("p",{"data-loc":"client/src/components/AccountSettings.tsx:297",className:"text-sm font-medium",children:"Delete Account"}),e.jsx("p",{"data-loc":"client/src/components/AccountSettings.tsx:298",className:"text-xs text-muted-foreground mt-0.5",children:"Permanently delete your account and all associated data."})]}),e.jsx(y,{"data-loc":"client/src/components/AccountSettings.tsx:300",variant:"outline",size:"sm",className:"text-xs border-red-300 text-red-600 hover:bg-red-50",onClick:()=>m(!0),children:"Delete Account"})]})})]}),e.jsx(ct,{"data-loc":"client/src/components/AccountSettings.tsx:311",open:i,onOpenChange:m,defaultSubject:"Account Deletion Request"})]})}function qt({enabled:t,onNewLead:a}){const i=u.useRef(null),m=u.useRef(null),x=u.useRef(a);x.current=a;const o=u.useCallback(()=>
11{if(!t)return;i.current&&(i.current.close(),i.current=null);const l=new EventSource("/api/sse",{withCredentials:!0});i.current=l,l.onmessage=h=>{try{const v=JSON.parse(h.data);v.type==="new_lead"&&x.current(v.payload)}catch{}},l.onerror=()=>{l.close(),i.current=null,m.current=setTimeout(()=>{t&&o()},5e3)}},[t]);u.useEffect(()=>{if(t)return o(),()=>{i.current?.close(),i.current=null,m.current&&clearTimeout(m.current)}},[t,o])}const Ht={chapter7:"Chapter 7",chapter13:"Chapter 13",chapter11:"Chapter 11",chapter12:"Chapter 12",debtRelief:"Debt Relief",foreclosureDefense:"Foreclosure Defense",other:"General Bankruptcy"},Qt={immediate:"Immediate",within30days:"Within 30 Days",justExploring:"Just Exploring"};function Jt({payload:t,onDismiss:a}){const[i,m]=u.useState(!1);u.useEffect(()=>{const l=setTimeout(()=>m(!0),50),h=setTimeout(()=>{m(!1),setTimeout(a,400)},12e3);return()=>{clearTimeout(l),clearTimeout(h)}},[a]);const x=()=>{m(!1),setTimeout(a,400)},o=[t.city,t.state].filter(Boolean).join(", ");return e.jsxs("div",{"data-loc":"client/src/components/LeadToast.tsx:52",className:`
12        fixed bottom-6 right-6 z-[9999] w-80 max-w-[calc(100vw-2rem)]
13        bg-white dark:bg-zinc-900 border border-emerald-500 rounded-xl shadow-2xl
14        transition-all duration-400 ease-out
15        ${i?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}
16      `,role:"alert","aria-live":"assertive",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadToast.tsx:63",className:"flex items-center gap-2 px-4 pt-4 pb-2",children:[e.jsx("span",{"data-loc":"client/src/components/LeadToast.tsx:64",className:"flex h-8 w-8 items-center justify-center rounded-full bg-emerald-100 text-emerald-600 flex-shrink-0",children:e.jsx(Vs,{"data-loc":"client/src/components/LeadToast.tsx:65",className:"h-4 w-4"})}),e.jsxs("div",{"data-loc":"client/src/components/LeadToast.tsx:67",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/LeadToast.tsx:68",className:"text-xs font-semibold text-emerald-600 uppercase tracking-wide",children:"New Submission Received"}),e.jsxs("p",{"data-loc":"client/src/components/LeadToast.tsx:69",className:"text-sm font-bold text-foreground truncate",children:[t.firstName," ",t.lastName]})]}),e.jsx("button",{"data-loc":"client/src/components/LeadToast.tsx:73",onClick:x,className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Dismiss notification",children:e.jsx(ns,{"data-loc":"client/src/components/LeadToast.tsx:78",className:"h-4 w-4"})})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadToast.tsx:83",className:"px-4 pb-3 space-y-1",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadToast.tsx:84",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/components/LeadToast.tsx:85",className:"inline-flex items-center rounded-full bg-primary/10 text-primary px-2 py-0.5 font-medium",children:Ht[t.caseType]??t.caseType}),t.urgency&&e.jsx("span",{"data-loc":"client/src/components/LeadToast.tsx:89",className:"inline-flex items-center rounded-full bg-amber-100 text-amber-700 px-2 py-0.5 font-medium",children:Qt[t.urgency]??t.urgency})]}),o&&e.jsx("p",{"data-loc":"client/src/components/LeadToast.tsx:95",className:"text-xs text-muted-foreground",children:o}),e.jsx("p",{"data-loc":"client/src/components/LeadToast.tsx:97",className:"text-xs text-muted-foreground",children:"Just now · 1 credit to unlock full details"})]}),e.jsx("div",{"data-loc":"client/src/components/LeadToast.tsx:103",className:"px-4 pb-4",children:e.jsxs(Bs,{"data-loc":"client/src/components/LeadToast.tsx:104",href:"/portal/",onClick:x,className:"flex items-center justify-center gap-1.5 w-full rounded-lg bg-emerald-600 hover:bg-emerald-700 text-white text-sm font-semibold py-2 transition-colors",children:["View Submission ",e.jsx(Q,{"data-loc":"client/src/components/LeadToast.tsx:109",className:"h-3.5 w-3.5"})]})}),e.jsx("div",{"data-loc":"client/src/components/LeadToast.tsx:114",className:"absolute bottom-0 left-0 right-0 h-1 rounded-b-xl overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/components/LeadToast.tsx:115",className:"h-full bg-emerald-500 origin-left",style:{animation:"shrink 12s linear forwards"}})}),e.jsx("style",{"data-loc":"client/src/components/LeadToast.tsx:121",children:`
17        @keyframes shrink {
18          from { transform: scaleX(1); }
19          to { transform: scaleX(0); }
20        }
21      `})]})}function js({title:t,description:a}){return e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:42",className:"max-w-lg mx-auto text-center py-16",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:43",className:"w-14 h-14 bg-amber-50 border border-amber-200 rounded-full flex items-center justify-center mx-auto mb-5",children:e.jsx(Os,{"data-loc":"client/src/pages/Portal.tsx:44",className:"w-7 h-7 text-amber-600"})}),e.jsx("h3",{"data-loc":"client/src/pages/Portal.tsx:46",className:"text-xl font-bold mb-2",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:t}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:49",className:"text-sm text-muted-foreground mb-6 leading-relaxed",children:a}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:50",className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx("a",{"data-loc":"client/src/pages/Portal.tsx:51",href:Ye(ts("portal-access")),children:e.jsxs(y,{"data-loc":"client/src/pages/Portal.tsx:52",className:"gap-2 w-full sm:w-auto",children:[e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:53",className:"w-4 h-4"})," Verify Your Credentials"]})}),e.jsx("a",{"data-loc":"client/src/pages/Portal.tsx:56",href:Ye(ts("portal-access")),children:e.jsxs(y,{"data-loc":"client/src/pages/Portal.tsx:57",variant:"outline",className:"gap-2 w-full sm:w-auto",children:["Find My Profile ",e.jsx(Q,{"data-loc":"client/src/pages/Portal.tsx:58",className:"w-4 h-4"})]})})]}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:62",className:"text-xs text-muted-foreground mt-5",children:"Already submitted a verification request? Our team reviews credentials within 1–2 business days."})]})}const vs={new:"bg-accent/10 text-accent border-accent/20",contacted:"bg-blue-50 text-blue-700 border-blue-200",converted:"bg-green-50 text-green-700 border-green-200",closed:"bg-secondary text-muted-foreground border-border"};function Kt({onNavigateTab:t}){const{data:a,isLoading:i}=w.portal.getCompletenessScore.useQuery();return i||!a||a.score===100?null:e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:96",className:"hidden lg:block w-72 flex-shrink-0 sticky top-8 self-start",children:e.jsx(Rs,{"data-loc":"client/src/pages/Portal.tsx:97",onNavigateTab:t})})}function xa(){const{user:t,isAuthenticated:a,loading:i}=nt(),{tab:m}=ot(),[,x]=ys(),o=lt(),l=(()=>{try{return new URLSearchParams(o).get("claimSlug")??void 0}catch{return}})(),v=["overview","leads","credits","caseResults","testimonials","verification","billing","profile","settings"].includes(m)?m:"overview",p=c=>x("/portal/"+c),[b,T]=u.useState([]);qt({enabled:a&&(t?.role==="attorney"||t?.role==="admin"),onNewLead:c=>{T(C=>[...C,c]),je()}});const[N,P]=u.useState(null),[d,S]=u.useState(null),[j,D]=u.useState({firmName:"",attorneyName:"",phone:"",email:"",website:"",description:"",address:""}),[B,s]=u.useState(!1),[r,A]=u.useState(null),[K,G]=u.useState(!1),[z,_]=u.useState("3"),[L,$]=u.useState(""),[q,xe]=u.useState("nonexclusive"),[De,Ae]=u.useState("t2"),{data:O,isLoading:Be}=w.portal.getMyProfile.useQuery(void 0,{enabled:a}),se=new URLSearchParams(o).get("onboarding")==="complete";u.useEffect(()=>{if(i||!a||Be)return;const c=rt({hasLinkedAttorneyProfile:!!O,requestedTab:m,isCompletionOnboarding:se});c&&x(c)},[a,se,Be,i,O,x,m]);const I=O?.stateAbbreviation?it(O.stateAbbreviation):De,{data:he,refetch:je}=w.leads.getMyLeads.useQuery({limit:20,offset:0},{enabled:a}),{data:ve}=w.payments.getCreditPackages.useQuery(),{data:Oe}=w.payments.getSubscriptionPlans.useQuery(),{data:te}=w.payments.getCreditBalance.useQuery(void 0,{enabled:a,staleTime:0});w.leads.viewLead.useMutation({onSuccess:c=>{A(c),je(),He.payments.getCreditBalance.invalidate()},onError:c=>g.error(c.message)});
21const Ve=w.payments.updateAutoTopUp.useMutation({onSuccess:()=>g.success("Auto top-up settings saved"),onError:c=>g.error(c.message)}),He=w.useUtils(),Fe=w.leads.updateLeadStatus.useMutation({onSuccess:()=>{je(),g.success("Submission status updated")},onError:c=>g.error(c.message)}),pe=w.payments.createCreditCheckout.useMutation({onSuccess:c=>{g.info("Redirecting to checkout..."),c.checkoutUrl&&window.open(c.checkoutUrl,"_blank")},onError:c=>g.error(c.message)}),Ne=w.payments.createSubscriptionCheckout.useMutation({onSuccess:c=>{g.info("Redirecting to checkout..."),c.checkoutUrl&&window.open(c.checkoutUrl,"_blank")},onError:c=>g.error(c.message)});if(u.useEffect(()=>{te&&(G(te.autoTopUp??!1),_(String(te.autoTopUpThreshold??3)),$(String(te.autoTopUpPackageId??"")))},[te]),i)return e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:212",className:"min-h-screen bg-background",children:[e.jsx(Qe,{"data-loc":"client/src/pages/Portal.tsx:213"}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:214",className:"container py-20 text-center",children:e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:215",className:"animate-spin w-8 h-8 border-2 border-accent border-t-transparent rounded-full mx-auto"})})]});if(!a)return e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:223",className:"min-h-screen bg-background",children:[e.jsx(Qe,{"data-loc":"client/src/pages/Portal.tsx:224"}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:225",className:"container py-20",children:e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:226",className:"max-w-md mx-auto text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:227",className:"w-16 h-16 bg-primary rounded-sm flex items-center justify-center mx-auto mb-5",children:e.jsx(Os,{"data-loc":"client/src/pages/Portal.tsx:228",className:"w-8 h-8 text-primary-foreground"})}),e.jsx("h1",{"data-loc":"client/src/pages/Portal.tsx:230",className:"text-3xl font-bold mb-3",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Attorney Portal"}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:233",className:"text-muted-foreground mb-6 leading-relaxed",children:"Sign in to access your submission dashboard, purchase credit packages, and manage your attorney profile."}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:236",className:"space-y-3 w-full",children:[e.jsx("a",{"data-loc":"client/src/pages/Portal.tsx:237",href:"/sign-up/",className:"block",children:e.jsx(y,{"data-loc":"client/src/pages/Portal.tsx:238",size:"lg",className:"w-full font-semibold bg-amber-500 hover:bg-amber-600 text-white",children:"Create Free Account"})}),e.jsx("a",{"data-loc":"client/src/pages/Portal.tsx:242",href:Ye(xt()),className:"block",children:e.jsx(y,{"data-loc":"client/src/pages/Portal.tsx:243",size:"lg",variant:"outline",className:"w-full font-semibold",children:"Sign In"})})]}),e.jsxs("p",{"data-loc":"client/src/pages/Portal.tsx:248",className:"text-xs text-muted-foreground mt-4",children:["New to National Bankruptcy Advocates? ",e.jsx(Bs,{"data-loc":"client/src/pages/Portal.tsx:249",href:"/claim-profile/",className:"text-accent hover:underline",children:"Claim or create your profile →"})]})]})}),e.jsx(is,{"data-loc":"client/src/pages/Portal.tsx:253"})]});const Re=he?.leads??[],n=he?.total??0,f=Re.filter(c=>c.status==="new").length,k=te?.creditBalance??0;return e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:263",className:"min-h-screen bg-background",children:[e.jsx(dt,{"data-loc":"client/src/pages/Portal.tsx:264",title:"Attorney Portal — Manage Submissions & Profile",description:"Access your National Bankruptcy Advocates attorney dashboard to view new bankruptcy submissions, update your profile, track conversions, and manage your subscription.",canonical:"https://bankruptcylawyersin.com/portal",noIndex:!0}),e.jsx(Qe,{"data-loc":"client/src/pages/Portal.tsx:270"}),e.jsx("section",{"data-loc":"client/src/pages/Portal.tsx:273",className:"bg-primary text-primary-foreground py-10",children:e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:274",className:"container",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:275",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:276",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:277",className:"text-[10px] font-semibold tracking-[0.2em] uppercase text-accent mb-1",children:"Attorney Portal"}),e.jsxs("h1",{"data-loc":"client/src/pages/Portal.tsx:278",className:"text-2xl font-bold",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:["Welcome back, ",t?.name?.split(" ")[0]??"Attorney"]}),O&&e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:282",className:"text-primary-foreground
21/70 text-sm mt-1",children:O.firmName})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:285",className:"flex items-center gap-3",children:[e.jsxs("button",{"data-loc":"client/src/pages/Portal.tsx:287",onClick:()=>p("leads"),className:"relative p-2 hover:bg-white/10 rounded-sm transition-colors",title:`${f} new submission${f!==1?"s":""}`,children:[e.jsx(Vs,{"data-loc":"client/src/pages/Portal.tsx:292",className:"w-5 h-5 text-primary-foreground"}),f>0&&e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:294",className:"absolute -top-1 -right-1 bg-accent text-primary text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center",children:f>9?"9+":f})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:299",className:"text-right",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:300",className:"text-[10px] text-primary-foreground/60 uppercase tracking-wide",children:"Credit Balance"}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:301",className:"text-2xl font-bold text-accent",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:k}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:304",className:"text-[10px] text-primary-foreground/60",children:"submission credits"})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:310",className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-8",children:[{label:"Total Submissions",value:n,icon:re,color:"text-accent"},{label:"New Submissions",value:f,icon:me,color:"text-accent"},{label:"Credit Balance",value:k,icon:X,color:"text-accent"},{label:"Conversion Rate",value:n>0?`${Math.round(Re.filter(c=>c.status==="converted").length/n*100)}%`:"—",icon:ze,color:"text-accent"}].map((c,C)=>e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:317",className:"bg-white/10 rounded-sm p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:318",className:"flex items-center gap-2 mb-1",children:[e.jsx(c.icon,{"data-loc":"client/src/pages/Portal.tsx:319",className:`w-4 h-4 ${c.color}`}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:320",className:"text-xs text-primary-foreground/60 uppercase tracking-wide",children:c.label})]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:322",className:"text-xl font-bold",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:c.value})]},C))})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:329",className:"container py-8",children:[(()=>{const c=[{id:"overview",label:"Overview"},{id:"leads",label:"My Submissions",count:f>0?f:void 0},{id:"credits",label:"Buy Credits"},{id:"caseResults",label:"Case Results"},{id:"testimonials",label:"Testimonials"},{id:"verification",label:"Verification",highlight:!O?.verified},{id:"billing",label:"Packages"},{id:"profile",label:"My Profile"},{id:"settings",label:"Account Settings"}];return c.find(C=>C.id===v)?.label,e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:347",className:"md:hidden mb-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:348",className:"relative",children:[e.jsx("select",{"data-loc":"client/src/pages/Portal.tsx:349",value:v,onChange:C=>p(C.target.value),className:"w-full appearance-none bg-white border border-border rounded-sm px-4 py-3 pr-10 text-sm font-medium text-foreground focus:outline-none focus:ring-2 focus:ring-accent/40 cursor-pointer",children:c.map(C=>e.jsxs("option",{"data-loc":"client/src/pages/Portal.tsx:355",value:C.id,children:[C.label,C.count?` (${C.count})`:"","highlight"in C&&C.highlight?" ●":""]},C.id))}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:360",className:"pointer-events-none absolute inset-y-0 right-3 flex items-center",children:e.jsx("svg",{"data-loc":"client/src/pages/Portal.tsx:361",className:"w-4 h-4 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{"data-loc":"client/src/pages/Portal.tsx:362",strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:366",className:"mt-1 text-xs text-muted-foreground text-right",children:[c.findIndex(C=>C.id===v)+1," of ",c.length]})]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:372",className:"hidden md:flex gap-1 border-b border-border mb-8 overflow-x-auto",children:c.map(C=>e.jsxs("button",{"data-loc":"client/src/pages/Portal.tsx:374",onClick:()=>p(C.id),className:`flex items-center gap-2 px-4 py-2.5 text-sm font-medium border-b-2 transition-colors whitespace-nowrap flex-shrink-0 ${v===C.id?"border-accent text-accent":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[C.label,C.count!==void 0&&e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:385",className:"bg-accent text-accent-foreground text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center",children:C.count}),"highlight"in C&&C.highlight&&v!==C.id&&e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:390",className:"w-2 h-2 rounded-full bg-amber-400 flex-shrink-0",title:"Action required"})]},C.id))})]})})(),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:399",className:"flex gap-8 items-start",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:400",className:"flex-1 min-w-0",children:[v==="overview"&&e.jsx(Mt,{"data-loc":"client/src/pages/Portal.tsx:403",onNavigate:c=>p(c)}),v==="leads"&&e.jsx(Et,{"data-loc":"client/src/pages/Portal.tsx:408",onNavigate:c=>p(c)}),!1,v==="credits"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:518",className:"space-y-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:520",children:[e.jsx("h2",{"data-loc":"client/src/pages/Portal.tsx:521",className:"text-xl font-bold text-foreground mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Purchase Submission Credits"}),e.jsxs("p",{"data-loc":"client/src/pages/Portal.tsx:524",className:"text-sm text-muted-foreground",children:["Each credit unlocks one qualified submission inquiry. Credits never expire. Current balance:"," ",e.jsxs("strong",{"data-loc":"client/src/pages/Portal.tsx:526",className:"text-foreground",children:[k," credits"]})]})]}),k<5&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:531",className:"flex items-center gap-3 bg-accent/5 border border-accent/20 rounded-sm p-4",children:[e.jsx(J,{"data-loc":"client/src/pages/Portal.tsx:532",className:"w-5 h-5 text-accent flex-shrink-0"}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:533",className:"text-sm text-foreground",children:"Your credit balance is low. Purchase credits to continue receiving submissions."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:540",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:541",className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:542",className:"w-6 h-6 rounded-full bg-accent text-accent-foreground text-xs font-bold flex items-center justify-center flex-shrink-0",children:"1"}),e.jsx("h3",{"data-loc":"client/src/pages/Portal.tsx:543",className:"text-base font-bold text-foreground",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Choose Your Submission Type"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:545",className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:547",className:`border rounded-sm p-5 cursor-pointer transition-all ${q==="nonexclusive"?"border-accent bg-accent/5 shadow-sm":"border-border bg-white hover:border-accent/40"}`,onClick:()=>xe("nonexclusive"),children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:551",className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:552",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:553",className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${q==="nonexclusive"?"border-accent":"border-muted-foreground"}`,children:q==="nonexclusive"&&e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:554",className:"w-2 h-2 rounded-full bg-accent"})}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:556",className:"font-bold text-foreground text-sm",children:"Non-Exclusive Submission"})]}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:558",className:"text-[10px] font-semibold bg-blue-50 text-blue-700 border border-blue-200 px-2 py-0.5 rounded-full uppercase tracking-wide",children:"Lower Cost"})]}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:560",className:"text-xs text-muted-foreground leading-relaxed mb-3",children:"The same submission is shared with up to 3 attorneys in your area. You compete for the client, but pay significantly less per submission. Best for attorneys who respond quickly and have strong intake processes."}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:563",className:"space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:564",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:565",className:"w-3.5 h-3.5 text-emerald-500 flex-shrink-0"}
21),"Shared with up to 3 attorneys"]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:568",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:569",className:"w-3.5 h-3.5 text-emerald-500 flex-shrink-0"}),"Lower cost per submission"]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:572",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:573",className:"w-3.5 h-3.5 text-emerald-500 flex-shrink-0"}),"Higher volume available"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:580",className:`border rounded-sm p-5 cursor-pointer transition-all ${q==="exclusive"?"border-accent bg-accent/5 shadow-sm":"border-border bg-white hover:border-accent/40"}`,onClick:()=>xe("exclusive"),children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:584",className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:585",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:586",className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${q==="exclusive"?"border-accent":"border-muted-foreground"}`,children:q==="exclusive"&&e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:587",className:"w-2 h-2 rounded-full bg-accent"})}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:589",className:"font-bold text-foreground text-sm",children:"Exclusive Submission"})]}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:591",className:"text-[10px] font-semibold bg-amber-50 text-amber-700 border border-amber-200 px-2 py-0.5 rounded-full uppercase tracking-wide",children:"Higher Close Rate"})]}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:593",className:"text-xs text-muted-foreground leading-relaxed mb-3",children:"The submission is sent only to you — no other attorney sees it. You have the client's full attention and no competition. Best for attorneys focused on quality over volume and willing to pay a premium for a higher close rate."}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:596",className:"space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:597",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:598",className:"w-3.5 h-3.5 text-emerald-500 flex-shrink-0"}),"Sent to you only — no competition"]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:601",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:602",className:"w-3.5 h-3.5 text-emerald-500 flex-shrink-0"}),"Significantly higher close rates"]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:605",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:606",className:"w-3.5 h-3.5 text-emerald-500 flex-shrink-0"}),"Premium pricing reflects exclusivity"]})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:615",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:616",className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:617",className:"w-6 h-6 rounded-full bg-accent text-accent-foreground text-xs font-bold flex items-center justify-center flex-shrink-0",children:"2"}),e.jsx("h3",{"data-loc":"client/src/pages/Portal.tsx:618",className:"text-base font-bold text-foreground",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Your Market Tier"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:622",className:"flex items-center gap-3 bg-emerald-50 border border-emerald-200 rounded-sm p-4 mb-4",children:[e.jsx(Se,{"data-loc":"client/src/pages/Portal.tsx:623",className:"w-5 h-5 text-emerald-600 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:624",className:"flex-1",children:[e.jsxs("p",{"data-loc":"client/src/pages/Portal.tsx:625",className:"text-sm font-semibold text-emerald-900",children:["Your market (",O?.city?`${O.city}, ${O.stateAbbreviation||O.state}`:O?.state||"your area",") is classified as:"]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:628",className:"flex items-center gap-2 mt-1",children:e.jsxs("span",{"data-loc":"client/src/pages/Portal.tsx:629",className:"inline-flex items-center gap-1.5 bg-emerald-100 border border-emerald-300 rounded-sm px-3 py-1 text-sm font-bold text-emerald-800",children:[e.jsx(ae,{"data-loc":"client/src/pages/Portal.tsx:630",className:"w-3.5 h-3.5"}),ds[I]]})}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:634",className:"text-xs text-emerald-700 mt-1.5",children:"Prices below reflect your local market rates."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:641",className:"bg-secondary/40 border border-border rounded-sm p-4 mb-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:642",className:"flex items-start gap-2 mb-3",children:[e.jsx(bt,{"data-loc":"client/src/pages/Portal.tsx:643",className:"w-4 h-4 text-muted-foreground mt-0.5 flex-shrink-0"}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:644",className:"text-xs text-muted-foreground leading-relaxed",children:"Your pricing tier is automatically determined by your practice location. Submission prices vary by market size \\u2014 larger metropolitan areas have higher demand and competition, reflected in higher per-submission pricing."})]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:648",className:"space-y-2 mt-3",children:["t1","t2","t3"].map(c=>e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:650",className:`flex items-start gap-2 px-3 py-2 rounded-sm text-xs border ${I===c?"bg-accent/5 border-accent/30 text-foreground font-medium":"bg-white border-border text-muted-foreground"}`,children:[I===c&&e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:658",className:"w-3.5 h-3.5 text-accent flex-shrink-0 mt-0.5"}),I!==c&&e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:659",className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:660",children:[e.jsxs("span",{"data-loc":"client/src/pages/Portal.tsx:661",className:"font-semibold",children:[ds[c],":"]})," ",mt[c]]})]},c))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:669",className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 ga
21p-4",children:[(ve??[]).filter(c=>c.geoTier===I&&c.leadType===q).sort((c,C)=>c.credits-C.credits).map(c=>e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:674",className:`bg-white border rounded-sm p-4 flex flex-col ${c.popular?"border-accent shadow-md":"border-border"}`,children:[c.popular&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:679",className:"text-[10px] font-bold tracking-[0.1em] uppercase text-accent mb-2 flex items-center gap-1",children:[e.jsx(ee,{"data-loc":"client/src/pages/Portal.tsx:680",className:"w-3 h-3"})," Popular"]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:683",className:"mb-3 flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:684",className:"text-sm font-bold text-foreground mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:[c.credits," Credits"]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:687",className:"flex items-baseline gap-1",children:e.jsxs("span",{"data-loc":"client/src/pages/Portal.tsx:688",className:"text-xl font-black text-foreground",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:["$",(Number(c.priceInCents)/100).toFixed(0)]})}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:692",className:"text-xs text-muted-foreground mt-0.5",children:["$",(Number(c.priceInCents)/100/c.credits).toFixed(2),"/submission"]})]}),e.jsx(y,{"data-loc":"client/src/pages/Portal.tsx:696",className:`w-full text-xs ${c.popular?"bg-accent hover:bg-accent/90 text-accent-foreground":""}`,size:"sm",variant:c.popular?"default":"outline",onClick:()=>pe.mutate({packageSlug:c.slug,origin:window.location.origin}),disabled:pe.isPending,children:"Buy"})]},c.id)),(ve??[]).filter(c=>c.geoTier===I&&c.leadType===q).length===0&&e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:708",className:"col-span-full text-center py-8 text-sm text-muted-foreground",children:"No packages available for this combination. Please contact support."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:718",className:"bg-white border border-border rounded-sm p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:719",className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:720",children:[e.jsx("h3",{"data-loc":"client/src/pages/Portal.tsx:721",className:"text-base font-bold text-foreground",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Auto Top-Up"}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:722",className:"text-xs text-muted-foreground mt-0.5",children:"Automatically purchase credits when your balance falls below a threshold."})]}),e.jsx(Ys,{"data-loc":"client/src/pages/Portal.tsx:724",checked:K,onCheckedChange:G})]}),K&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:730",className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-4 border-t border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:731",children:[e.jsx(E,{"data-loc":"client/src/pages/Portal.tsx:732",className:"text-xs text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Top-up when balance falls below"}),e.jsxs(Te,{"data-loc":"client/src/pages/Portal.tsx:733",value:z,onValueChange:_,children:[e.jsx(Pe,{"data-loc":"client/src/pages/Portal.tsx:734",className:"text-sm",children:e.jsx(Ce,{"data-loc":"client/src/pages/Portal.tsx:735",placeholder:"Select threshold"})}),e.jsx(ke,{"data-loc":"client/src/pages/Portal.tsx:737",children:["1","2","3","5","10"].map(c=>e.jsxs(H,{"data-loc":"client/src/pages/Portal.tsx:739",value:c,children:[c," credit",c!=="1"?"s":""]},c))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:744",children:[e.jsx(E,{"data-loc":"client/src/pages/Portal.tsx:745",className:"text-xs text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Package to purchase"}),e.jsxs(Te,{"data-loc":"client/src/pages/Portal.tsx:746",value:L,onValueChange:$,children:[e.jsx(Pe,{"data-loc":"client/src/pages/Portal.tsx:747",className:"text-sm",children:e.jsx(Ce,{"data-loc":"client/src/pages/Portal.tsx:748",placeholder:"Select package"})}),e.jsx(ke,{"data-loc":"client/src/pages/Portal.tsx:750",children:(ve??[]).filter(c=>c.geoTier===I&&c.leadType===q).map(c=>e.jsxs(H,{"data-loc":"client/src/pages/Portal.tsx:754",value:String(c.id
21),children:[c.credits," credits — $",(Number(c.priceInCents)/100).toFixed(0)]},c.id))})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:761",className:"mt-4 flex justify-end",children:e.jsxs(y,{"data-loc":"client/src/pages/Portal.tsx:762",size:"sm",onClick:()=>Ve.mutate({enabled:K,threshold:parseInt(z),packageSlug:L||void 0}),disabled:Ve.isPending,className:"text-xs",children:[e.jsx(ms,{"data-loc":"client/src/pages/Portal.tsx:772",className:"w-3.5 h-3.5 mr-1.5"}),"Save Auto Top-Up Settings"]})})]})]}),(Oe??[]).length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:781",className:"mt-8 border-t border-border pt-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:782",className:"flex items-center gap-2 mb-1",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:783",className:"w-6 h-6 rounded-full bg-accent text-accent-foreground text-xs font-bold flex items-center justify-center flex-shrink-0",children:"4"}),e.jsx("h3",{"data-loc":"client/src/pages/Portal.tsx:784",className:"text-base font-bold text-foreground",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Monthly Credit Subscriptions"})]}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:786",className:"text-xs text-muted-foreground mb-5 ml-8",children:"Prefer a predictable monthly budget? Subscribe to receive a fixed number of submission credits automatically each billing cycle. Credits are added on your renewal date and roll over if unused. Pricing below reflects your selected submission type and market tier above."}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:789",className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:(Oe??[]).map(c=>e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:791",className:`bg-white border rounded-sm p-5 flex flex-col ${c.popular?"border-accent shadow-sm":"border-border"}`,children:[c.popular&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:796",className:"text-[10px] font-bold tracking-[0.1em] uppercase text-accent mb-2 flex items-center gap-1",children:[e.jsx(ee,{"data-loc":"client/src/pages/Portal.tsx:797",className:"w-3 h-3"})," Best Value"]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:800",className:"mb-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:801",className:"text-base font-bold text-foreground mb-1",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:c.name}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:804",className:"text-sm font-semibold text-accent",children:[c.monthlyCredits," submission credits/month"]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:807",className:"text-xs text-muted-foreground mt-1",children:"Price calculated at checkout based on your market tier and submission type selection above"})]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:811",className:"space-y-1.5 mb-4 flex-1",children:[`${c.monthlyCredits}
21 credits added on renewal`,"Auto-renewal each month","Cancel anytime","Credits reflect your tier & submission type"].map((C,ne)=>e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:818",className:"flex items-center gap-2 text-xs text-foreground",children:[e.jsx(V,{"data-loc":"client/src/pages/Portal.tsx:819",className:"w-3 h-3 text-accent flex-shrink-0"}),C]},ne))}),e.jsxs(y,{"data-loc":"client/src/pages/Portal.tsx:824",size:"sm",className:`w-full ${c.popular?"bg-accent hover:bg-accent/90 text-accent-foreground":""}`,variant:c.popular?"default":"outline",onClick:()=>Ne.mutate({planSlug:c.slug,origin:window.location.origin}),disabled:Ne.isPending,children:[e.jsx(ms,{"data-loc":"client/src/pages/Portal.tsx:831",className:"w-3.5 h-3.5 mr-1.5"}),"Subscribe — ",c.monthlyCredits," credits/mo"]})]},c.id))}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:837",className:"mt-4 p-3 bg-secondary/50 rounded-sm text-xs text-muted-foreground",children:"Subscriptions renew automatically. Cancel anytime from your billing settings. Credits from the current period are non-refundable. Final price is determined at checkout based on your geo tier and submission type."})]})]}),v==="profile"&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:847",className:"space-y-6",children:[se&&O&&e.jsx("section",{"data-loc":"client/src/pages/Portal.tsx:849",className:"rounded-sm border border-amber-200 bg-amber-50 p-5",children:e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:850",className:"flex flex-col gap-5 lg:flex-row lg:items-start",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:851",className:"flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:852",className:"text-xs font-bold uppercase tracking-[0.16em] text-amber-700",children:"Next step"}),e.jsx("h2",{"data-loc":"client/src/pages/Portal.tsx:853",className:"mt-1 text-xl font-bold text-foreground",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:"Complete your attorney profile"}),e.jsx("p",{"data-loc":"client/src/pages/Portal.tsx:856",className:"mt-2 max-w-xl text-sm leading-relaxed text-muted-foreground",children:"Your profile is connected. Use the completeness checklist to fill in the details potential clients need before you begin managing submissions."})]}),e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:860",className:"w-full lg:max-w-sm",children:e.jsx(Rs,{"data-loc":"client/src/pages/Portal.tsx:861",onNavigateTab:c=>p(c)})})]})}),e.jsx(yt,{"data-loc":"client/src/pages/Portal.tsx:866",myProfile:O,claimSlug:l,onNavigate:c=>p(c)})]}),v==="caseResults"&&(O?e.jsx(Tt,{"data-loc":"client/src/pages/Portal.tsx:877",attorneyId:O.id}):e.jsx(js,{"data-loc":"client/src/pages/Portal.tsx:879",title:"Credentials Not Yet Verified",description:"Case results are a powerful trust signal for potential clients. Verify your attorney credentials to start showcasing your track record."})),v==="testimonials"&&(O?e.jsx(Pt,{"data-loc":"client/src/pages/Portal.tsx:889",attorneyId:O.id}):e.jsx(js,{"data-loc":"client/src/pages/Portal.tsx:891",title:"Credentials Not Yet Verified",description:"Client testimonials help build trust and convert more visitors into submissions. Verify your credentials to start collecting and displaying reviews."})),v==="verification"&&e.jsx(At,{"data-loc":"client/src/pages/Portal.tsx:900",myProfile:O,onGoToClaim:()=>x(ts("portal-verification"))}),v==="billing"&&e.jsx(Ft,{"data-loc":"client/src/pages/Portal.tsx:907",myProfile:O??null}),v==="settings"&&e.jsx(_t,{"data-loc":"client/src/pages/Portal.tsx:912"})]}),O&&!se&&e.jsx(Kt,{"data-loc":"client/src/pages/Portal.tsx:918",onNavigateTab:c=>p(c)})]})]}),e.jsx(ie,{"data-loc":"client/src/pages/Portal.tsx:924",open:!!r,onOpenChange:c=>!c&&A(null),children:e.jsxs(de,{"data-loc":"client/src/pages/Portal.tsx:925",className:"max-w-lg",children:[e.jsx(fe,{"data-loc":"client/src/pages/Portal.tsx:926",children:e.jsxs(ge,{"data-loc":"client/src/pages/Portal.tsx:927",style:{fontFamily:"'Playfair Display', 'Playfair Display Fallback', Georgia, serif"},children:["Submission Detail — ",r?.firstName," ",r?.lastName]})}),r&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:932",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:933",className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:934",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:935",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1",children:"Email"}),e.jsx("a",{"data-loc":"client/src/pages/Portal.tsx:936",href:`mailto:${r.email}`,className:"text-accent hover:underline font-medium",children:r.email})]}),r.phone&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:939",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:940",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1",children:"Phone"}),e.jsx("a",{"data-loc":"client/src/pages/Portal.tsx:941",href:`tel:${r.phone}`,className:"text-accent hover:underline font-medium",children:r.phone})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:944",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:945",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1",children:"Case Type"}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:946",className:"font-medium capitalize",children:r.caseType?.replace("chapter","Chapter ")})]}),r.debtAmount&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:949",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:950",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1",children:"Debt Amount"}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:951",className:"font-medium",children:r.debtAmount})]}),r.urgency&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:955",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:956",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1",children:"Urgency"}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:957",className:"font-medium capitalize",children:r.urgency.replace(/([A-Z])/g," $1").trim()})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:960",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:961",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1",children:"Received"}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:962",className:"font-medium",children:new Date(r.createdAt).toLocaleDateString("en-US")})]})]}),r.message&&e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:966",children:[e.jsx("div",{"data-loc":"client/src/pages/Portal.tsx:967",className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1",children:"Message"}),e.jsxs("p",{"data-loc":"client/src/pages/Portal.tsx:968",className:"text-sm text-foreground bg-secondary/50 rounded-sm p-3 italic leading-relaxed",children:['"',r.message,'"']})]}),e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:971",className:"flex items-center justify-between gap-3 pt-2 border-t border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/Portal.tsx:972",className:"flex gap-2",children:[r.status==="new"&&e.jsx(y,{"data-loc":"client/src/pages/Portal.tsx:974",size:"sm",variant:"outline",className:"text-xs",onClick:()=>{Fe.mutate({leadId:r.id,status:"contacted"}),A({...r,status:"contacted"})},children:"Mark Contacted"}),r.status==="contacted"&&e.jsx(y,{"data-loc":"client/src/pages/Portal.tsx:980",size:"sm",className:"text-xs bg-green-600 hover:bg-green-700",onClick:()=>{Fe.mutate({leadId:r.id,status:"converted"}),A({...r,status:"converted"})},children:"Mark Converted"})]}),e.jsx("span",{"data-loc":"client/src/pages/Portal.tsx:986",className:`text-[10px] font-semibold uppercase tracking-wide px-2 py-0.5 rounded-sm border ${vs[r.status]||vs.new}`,children:r.status})]})]})]})}),e.jsx(is,{"data-loc":"client/src/pages/Portal.tsx:995"}),b.map((c,C)=>e.jsx(Jt,{"data-loc":"client/src/pages/Portal.tsx:999",payload:c,onDismiss:()=>T(ne=>ne.filter((Zt,Us)=>Us!==C))},`${c.leadId}-${C}`))]})}
21export{xa 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.