PageSourceSearch

https://www.aximon.ai/_next/static/chunks/3848.5169b9602ca02ad7.js

js aximon.ai collected 2026-10-05 13:52:24 UTC 46,459 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3848],{10695:(e,t,s)=>{s.d(t,{D:()=>u});var n=s(54568);s(7620);var a=s(54616),r=s(95400),l=s(33444),i=s(78622),o=s(25703);let d=(0,a.F)("",{variants:{size:{sm:"h-9 pl-8",md:"h-10 pl-9"}},defaultVariants:{size:"md"}}),c=(0,a.F)("pointer-events-none absolute top-1/2 -translate-y-1/2 text-muted-foreground/60",{variants:{size:{sm:"left-2.5 size-3.5",md:"left-3 size-4"}},defaultVariants:{size:"md"}});function u(e){let{value:t,onValueChange:s,onClear:a,size:u,className:m,containerClassName:x,...p}=e;return(0,n.jsxs)("div",{className:(0,o.cn)("relative",x),"data-slot":"search-input",children:[(0,n.jsx)(i.Search,{className:(0,o.cn)(c({size:u})),strokeWidth:1.75}),(0,n.jsx)(l.p,{type:"search",value:t,onChange:e=>s(e.target.value),className:(0,o.cn)(d({size:u}),a&&t?"pr-9":void 0,m),...p}),a&&t?(0,n.jsx)(r.$,{type:"button",variant:"ghost",size:"icon",onClick:a,"aria-label":"Clear search",className:"absolute right-1.5 top-1/2 size-7 -translate-y-1/2 text-muted-foreground/60 hover:text-foreground",children:(0,n.jsx)(i.X,{className:"size-3.5",strokeWidth:2})}):null]})}},13848:(e,t,s)=>{s.r(t),s.d(t,{ComposeEmailDialog:()=>V,ContactCell:()=>Y,MyPeople:()=>et,normKeyPart:()=>P});var n=s(54568),a=s(7620),r=s(27541),l=s(69885),i=s(11375),o=s(77156),d=s(95400),c=s(1832),u=s(78622),m=s(54226);function x(e){let{open:t,onOpenChange:s,onImported:r,onCloseAutoFocus:i}=e,[x,p]=(0,a.useState)(null),[h,f]=(0,a.useState)(!1),g=(0,a.useRef)(null),v=(0,a.useRef)(!0);function j(){g.current=null,p(null),f(!1)}function b(e){e||j(),s(e)}async function y(){if(!x||h||g.current)return;let e=Symbol("import-people");g.current=e,f(!0);try{let a=new FormData;a.append("file",x);let i=await (0,o.nr)("/scout/investors/import",{method:"POST",body:a,timeoutMs:12e4}),d=await i.json().catch(()=>null);if(!v.current)return;let c=null==d?void 0:d.imported;if(!i.ok||!d||d.error||"number"!=typeof c||!Number.isSafeInteger(c)||c<1){var t,n;let s=(null==d?void 0:d.error)==="no_rows"?"No people found in that file":(null==d?void 0:d.error)==="save_failed"?"Couldn't save those people":(null==d?void 0:d.error)==="unreadable"?"Couldn't read that file":"Couldn't import that file",a=null!=(n=null!=(t="string"==typeof(null==d?void 0:d.reason)?d.reason:void 0)?t:Array.isArray(null==d?void 0:d.warnings)&&"string"==typeof d.warnings[0]?d.warnings[0]:void 0)?n:(null==d?void 0:d.error)==="no_rows"?"We couldn't find a header row with columns like Name and Email.":"Your file is kept here. Try importing it again.";g.current===e&&l.oR.error(s,{description:a});return}if(r(),g.current!==e)return;let u=[null!=d.withEmail?"".concat(d.withEmail," with an email"):"",d.skipped?"".concat(d.skipped," skipped (no name)"):"",d.merged?"".concat(d.merged," merged as duplicates"):""].filter(Boolean);for(let e of(l.oR.success("Imported ".concat(c," ").concat(1===c?"person":"people"),{description:u.join(" \xb7 ")}),Array.isArray(d.warnings)?d.warnings:[]))"string"==typeof e&&l.oR.warning(e);s(!1),j()}catch(t){v.current&&g.current===e&&l.oR.error("Couldn't import that file")}finally{v.current&&g.current===e&&(g.current=null,f(!1))}}return(0,a.useEffect)(()=>(v.current=!0,()=>{v.current=!1,g.current=null}),[]),(0,n.jsx)(c.lG,{open:t,onOpenChange:b,children:(0,n.jsxs)(c.Cf,{onCloseAutoFocus:i,className:"sm:max-w-lg",children:[(0,n.jsxs)(c.c7,{children:[(0,n.jsx)(c.L3,{children:"Import your investor list"}),(0,n.jsx)(c.rr,{children:"A .csv or .xlsx with your contacts. We'll match columns like Name, Email, Firm and Phone automatically."})]}),(0,n.jsxs)(m.w,{busy:h,onFiles:e=>(function(e){if(g.current)return;let t=e[0];if(t){if(!/\.(csv|xlsx?)$/i.test(t.name))return void l.oR.error("Use a .csv or .xlsx file");p(t)}})(e),accept:".csv,.xlsx,.xls",radius:"lg",weight:"thin",label:x?x.name:"Drop your file here",className:"gap-2 bg-muted/20 p-6",children:[(0,n.jsx)(u._O,{className:"size-5 text-muted-foreground",strokeWidth:1.75}),(0,n.jsx)("p",{className:"text-sm text-foreground",children:x?x.name:"Drop your file here"}),(0,n.jsx)(d.$,{type:"button",variant:"outline",size:"sm",tabIndex:-1,
1children:x?"Choose a different file":"Choose a file"})]}),(0,n.jsxs)(c.Es,{children:[(0,n.jsx)(d.$,{variant:"ghost",onClick:()=>b(!1),disabled:h,children:"Cancel"}),(0,n.jsx)(d.$,{onClick:y,disabled:!x||h,children:h?"Importing…":"Import"})]})]})})}var p=s(33444),h=s(58946);function f(e){let{open:t,onOpenChange:s,onAdded:r,onCloseAutoFocus:i}=e,[m,x]=(0,a.useState)(""),[f,g]=(0,a.useState)(""),[v,j]=(0,a.useState)(""),[b,y]=(0,a.useState)(""),[N,w]=(0,a.useState)(!1),k=(0,a.useRef)(null),C=(0,a.useRef)(!0);function S(){k.current=null,x(""),g(""),j(""),y(""),w(!1)}function z(e){e||S(),s(e)}(0,a.useEffect)(()=>(C.current=!0,()=>{C.current=!1,k.current=null}),[]);let E=v.trim().length>0&&!/^[^@\s]+@[^@\s.]+\.[^@\s]+$/.test(v.trim()),_=m.trim().length>0&&!E&&!N;async function A(){if(!_||k.current)return;let e=Symbol("add-person");k.current=e,w(!0);try{let t=await (0,o.nr)("/scout/investors/add",{method:"POST",timeoutMs:3e4,json:{name:m.trim(),firm:f.trim()||null,email:v.trim()||null,phone:b.trim()||null}}),n=await t.json().catch(()=>null);if(!C.current)return;if(!t.ok||(null==n?void 0:n.error)||(null==n?void 0:n.added)!==1){k.current===e&&l.oR.error("Couldn't add that person",{description:"string"==typeof(null==n?void 0:n.reason)?n.reason:"Your details are kept here. Try saving again."});return}if(r(),k.current!==e)return;l.oR.success("".concat(m.trim()," added to My People"),{description:v.trim()?void 0:"No email yet — select them and choose Enrich to look one up."}),s(!1),S()}catch(t){C.current&&k.current===e&&l.oR.error("Couldn't add that person")}finally{C.current&&k.current===e&&(k.current=null,w(!1))}}return(0,n.jsx)(c.lG,{open:t,onOpenChange:z,children:(0,n.jsxs)(c.Cf,{onCloseAutoFocus:i,className:"sm:max-w-lg",children:[(0,n.jsxs)(c.c7,{children:[(0,n.jsxs)(c.L3,{className:"flex items-center gap-2.5",children:[(0,n.jsx)("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:(0,n.jsx)(u.yp,{className:"size-4",strokeWidth:2})}),"Add a person"]}),(0,n.jsx)(c.rr,{children:"Only a name is required. You can add the rest later, or use Enrich to find a work email."})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)(h.J,{htmlFor:"add-name",className:"text-xs font-medium text-muted-foreground",children:["Name ",(0,n.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,n.jsx)(p.p,{id:"add-name",value:m,onChange:e=>x(e.target.value),placeholder:"Amanda Reyes",disabled:N,autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&_&&A()}})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)(h.J,{htmlFor:"add-firm",className:"text-xs font-medium text-muted-foreground",children:["Firm ",(0,n.jsx)("span",{className:"font-normal text-muted-foreground/60",children:"\xb7 optional"})]}),(0,n.jsx)(p.p,{id:"add-firm",value:f,onChange:e=>g(e.target.value),placeholder:"Northbridge Capital Partners",disabled:N,onKeyDown:e=>{"Enter"===e.key&&_&&A()}})]}),(0,n.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)(h.J,{htmlFor:"add-email",className:"text-xs font-medium text-muted-foreground",children:["Email ",(0,n.jsx)("span",{className:"font-normal text-muted-foreground/60",children:"\xb7 optional"})]}),(0,n.jsx)(p.p,{id:"add-email",type:"email",value:v,onChange:e=>j(e.target.value),placeholder:"[email protected]",disabled:N,"aria-invalid":E||void 0,onKeyDown:e=>{"Enter"===e.key&&_&&A()}}),E&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:"That doesn't look like an email address."})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)(h.J,{htmlFor:"add-phone",className:"text-xs font-medium text-muted-foreground",children:["Phone ",(0,n.jsx)("span",{className:"font-normal text-muted-foreground/60",children:"\xb7 optional"})]}),(0,n.jsx)(p.p,{id:"add-phone",value:b,onChange:e=>y(e.target.value),placeholder:"(212) 555-0142",disabled:N,onKeyDown:e=>{"Enter"===e.key&&_&&A()}})]})]})]}),(0,n.jsxs)(c.Es,{children:[(0,n.jsx)(d.$,{variant:"ghost",onClick:()=>z(!1),disabled:N,children:"Cancel"}),(0,n.jsx)(d.$,{onClick:()=>void A(),disabled:!_,loading:N,loadingLabel:"Adding…",children:"Add person"})]})]})})}var g=s(46824),v=s(80084),j=s(88186),b=s(29977),y=s(60029),N=s(14641),w=s(51443),k=s(44628);let C={queued:{label:"Waiting to send",tone:"muted"},sending:{label:"Sending now",tone:"muted"},sent:{label:"Sent",tone:"good"},needs_review:{label:"Check sending mailbox",tone:"warn"},uncertain:{label:"Checking send status",tone:"warn"},suppressed_duplicate:{label:"Duplicate selection",tone:"muted"}
1,failed:{label:"Couldn't deliver",tone:"bad"},skipped_no_email:{label:"No email address",tone:"warn"},skipped_invalid_email:{label:"Correct email address",tone:"warn"},refused_reg_d:{label:"Not allowed on this offering",tone:"bad"},suppressed_already_sent:{label:"Already emailed",tone:"muted"},suppressed_already_queued:{label:"Already scheduled",tone:"muted"},suppressed_unsubscribed:{label:"Unsubscribed",tone:"warn"},cancelled:{label:"Cancelled",tone:"muted"}},S={good:"text-primary",warn:"text-amber-600 dark:text-amber-500",bad:"text-destructive",muted:"text-muted-foreground"};function z(e){return(0,n.jsx)(E,{...e},e.campaignId)}function E(e){var t,s,r,i,c,m;let{campaignId:x,onDone:p,onDismiss:h}=e,[f,z]=(0,a.useState)(null),[E,_]=(0,a.useState)(null),[A,R]=(0,a.useState)(!1),[D,I]=(0,a.useState)(!1),[F,$]=(0,a.useState)(!1),O=(0,a.useRef)(!1),T=(0,a.useRef)(p);T.current=p;let M=(0,a.useRef)(null),W=(0,a.useCallback)(()=>{if(M.current)return M.current;let e=(async()=>{try{let e=await (0,o.nr)("/scout/investors/campaign/".concat(encodeURIComponent(x)),{timeoutMs:2e4});if(!e.ok)return _(404===e.status?"Campaign unavailable in this workspace":"Couldn’t refresh send progress"),null;let t=await e.json();return z(t),_(null),t}catch(e){return _("Couldn’t refresh send progress"),null}})();return M.current=e,e.finally(()=>{M.current=null}),e},[x]);async function q(){if(!A){R(!0);try{if(!(await (0,o.nr)("/scout/investors/campaign/".concat(encodeURIComponent(x),"/cancel"),{method:"POST",timeoutMs:2e4})).ok)throw Error("Could not stop this send. Try again.");await W()}catch(e){l.oR.error(e.message)}finally{R(!1)}}}async function L(e){if(!D){I(!0);try{var t;let s=(await (0,g.Wx)()).find(e=>{var t;return e.email.toLowerCase()===(null==f||null==(t=f.senderEmail)?void 0:t.toLowerCase())&&["active","connected"].includes(e.status)});if(!s)throw Error("Reconnect ".concat(null!=(t=null==f?void 0:f.senderEmail)?t:"the original sender"," in Settings first."));if(!(await (0,o.nr)("/scout/investors/campaign/".concat(encodeURIComponent(x),"/").concat(e?"resume":"reconcile"),{method:"POST",timeoutMs:6e4,json:{connectionId:s.id}})).ok)throw Error("Could not check the original sender. Try again.");await W()}catch(e){l.oR.error(e.message)}finally{I(!1)}}}if((0,a.useEffect)(()=>{W()},[W]),(0,v.d)({active:!!f&&"Campaign unavailable in this workspace"!==E&&!(0,k.Z)(f.status),baseMs:5e3,maxMs:2e4,tick:async()=>{let e=await W();return e&&(e.status!==(null==f?void 0:f.status)||JSON.stringify(e.counts)!==JSON.stringify(f.counts))?"changed":"unchanged"}}),(0,a.useEffect)(()=>{if(f&&(0,k.Z)(f.status)&&!O.current){var e;O.current=!0,null==(e=T.current)||e.call(T)}},[f]),!f)return(0,n.jsx)(j.Zp,{className:"flex-row items-center gap-2.5 px-4 py-3",children:E?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.H5,{className:"size-3.5"}),(0,n.jsx)("span",{role:"status",className:"text-[13px] text-muted-foreground",children:E}),(0,n.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>void W(),children:"Retry"}),h&&(0,n.jsx)(d.$,{variant:"ghost",size:"sm",onClick:h,children:"Dismiss"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.y$,{className:"size-3.5"}),(0,n.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"Loading send progress…"})]})});let K=null!=(t=f.counts.sent)?t:0,U=(null!=(s=f.counts.queued)?s:0)+(null!=(r=f.counts.sending)?r:0),J=null!=(i=f.counts.failed)?i:0,P=(null!=(c=f.counts.uncertain)?c:0)+(null!=(m=f.counts.needs_review)?m:0),Z=K+U+J+P,B="paused"===f.status,Q=!B&&!(0,k.Z)(f.status),Y=0===Z?100:Math.round(K/Z*100);return(0,n.jsxs)(j.Zp,{className:"gap-3 px-4 py-3.5",children:[(f.subject||f.dealId)&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[f.subject&&(0,n.jsx)("span",{className:"min-w-0 break-words font-medium",children:f.subject}),f.dealId&&(0,n.jsx)("a",{href:"/deals/".concat(encodeURIComponent(f.dealId),"?tab=scout"),className:"ml-auto shrink-0 underline underline-offset-2",children:"Open deal investors"})]}),f.senderEmail&&(0,n.jsxs)("p",{className:"break-words text-xs text-muted-foreground",children:["From ",f.senderEmail]}),E&&(0,n.jsxs)("div",{role:"status",className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,n.jsxs)("span",{children:[E,". Showing the last recorded status."]}),(0,n.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>void W(),children:"Retry"})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,n.jsx)(N.b5,{tone:Q?"brand":J>0||P>0?"warning":"success",className:"size-7",children:Q?(0,n.jsx)(w.y$,{className:"size-3.5"}):J>0||P>0?(0,n.jsx)(u.H5,{className:"size-3.5",strokeWidth:2}):(0,n.jsx)(u.Co,{className:"size-3.5",strokeWidth:2})}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,n.jsx)("span",{className:"text-[13px] font-semibold text-foreground",children:"needs_review"===f.status?"Send needs review":Q?"Sending — ".concat(K," of ").concat(Z," done"):"cancelled"===f.status?"Send cancelled — ".concat(K," already went out"):"paused"===f.status?"Send paused — reconnect your mailbox to resume":0===K?"Nothing to send":"Sent to ".concat(K," ").concat(1===K?"person":"people")}),(0,n.jsx)("span",{className:"text-[11px] text-muted-foreground",children:P>0?"".concat(P," send ").concat(1===P?"result is":"results are"," unconfirmed. These messages will not be resent automatically."):B?"".concat(U," waiting \xb7 reconnect your mailbox in Settings"):Q?"".concat(U," to go \xb7 this keeps running if you close the page"):J>0?"".concat(J," couldn't be delivered"):0===K?"Nobody was emailed.":"Accepted by the sending provider."})]}),f.redirectedTo.length>0&&(0,n.jsxs)(b.E,{variant:"outline",className:"gap-1 border-amber-500/40 text-[10px] font-normal text-amber-600 dar
1k:text-amber-500",children:["Test mode → ",f.redirectedTo.join(", ")]}),(0,n.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(B||P>0)&&(0,n.jsx)(d.$,{variant:"outline",size:"sm",disabled:D,onClick:()=>void L(B),children:D?"Checking…":B?"Resume with original sender":"Check send status"}),(Q||B)&&(0,n.jsxs)(d.$,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2.5 text-[11px]",onClick:()=>void q(),disabled:A,children:[(0,n.jsx)(u.X,{className:"size-3 shrink-0",strokeWidth:2}),"Stop"]}),!Q&&!B&&h&&(0,n.jsx)(d.$,{variant:"ghost",size:"sm",className:"h-7 px-2 text-[11px] text-muted-foreground",onClick:h,children:"Dismiss"})]})]}),Z>0&&(0,n.jsx)(y.k,{value:Y,className:"h-1.5"}),f.skipped.length>0&&(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>$(e=>!e),className:"flex w-fit items-center gap-1.5 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[(0,n.jsx)(u.Mi,{className:"size-3 shrink-0",strokeWidth:1.75}),f.skipped.length," recipient ",1===f.skipped.length?"outcome":"outcomes"," — ",F?"hide":"see who and why"]}),F&&(0,n.jsx)("div",{className:"flex flex-col divide-y divide-border/50 rounded-lg border border-border/60",children:f.skipped.map((e,t)=>{var s;let a=null!=(s=C[e.status])?s:{label:e.status,tone:"muted"};return(0,n.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5 px-3 py-2",children:[(0,n.jsx)("span",{className:"text-[12px] font-medium text-foreground",children:e.name}),e.firm&&(0,n.jsx)("span",{className:"text-[11px] text-muted-foreground",children:e.firm}),(0,n.jsx)("span",{className:"ml-auto text-[11px] font-medium ".concat(S[a.tone]),children:a.label}),e.reason&&(0,n.jsx)("p",{className:"w-full text-[11px] leading-4 text-muted-foreground/80",children:e.reason})]},"".concat(e.name,"-").concat(t))})})]})]})}var _=s(1561),A=s(73675);function R(e,t){if(e)try{let s="rook.campaignDraft.v1:".concat(e);t?window.sessionStorage.setItem(s,JSON.stringify(t)):window.sessionStorage.removeItem(s)}catch(e){}}var D=s(65968),I=s(62703),F=s(80795),$=s(988),O=s(7162),T=s(79953),M=s(132),W=s(89273),q=s(10695),L=s(25703),K=s(32487),U=s(77538);function J(e){var t;let{person:s}=e,a=(0,K.s)(s.sourceUrl),r=null==(t=s.why)?void 0:t.trim();return r||a?(0,n.jsx)(U.nD,{type:"single",collapsible:!0,className:"max-w-lg",children:(0,n.jsxs)(U.As,{value:"evidence",children:[(0,n.jsx)(U.$m,{"aria-label":"Evidence for ".concat(s.name),className:"gap-2 py-1 text-xs font-normal text-muted-foreground [&>svg]:size-3",children:"Evidence"}),(0,n.jsxs)(U.ub,{className:"space-y-1 pb-1 pr-0 text-xs",children:[r&&(0,n.jsx)("p",{children:r}),a&&(0,n.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:s.sourceLabel||"View source"})]})]})}):null}function P(e){return(e||"").normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9\s]/g," ").replace(/\s+/g," ").trim()}function Z(e){let t=e.dedupKey&&e.dedupKey.trim();return t||"".concat(P(e.name),"|").concat(P(e.firm))}function B(e){return(0,I.bd)(e.contact)}function Q(e){if(!e)return null;let t=new Date(e);if(Number.isNaN(t.getTime()))return null;let s=Date.now()-t.getTime();if(s<0)return"just now";if(s<864e5)return"today";if(s<1728e5)return"yesterday";let n=Math.floor(s/864e5);return n<7?"".concat(n," days ago"):t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Y(e){var t;let{contact:s}=e,a=(0,I.bd)(s),r=(null==s?void 0:s.phone)||(null==s||null==(t=s.phones)?void 0:t[0])||null;return a||r?(0,n.jsxs)("div",{className:"flex flex-col items-start gap-1",children:[a?(0,n.jsxs)("span",{className:"flex min-w-0 max-w-full items-center gap-1.5",children:[(0,n.jsxs)("a",{href:"mailto:".concat(a),title:"Email ".concat(a),className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-medium text-foreground underline-offset-2 hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",children:[(0,n.jsx)(u.Mail,{className:"size-3.5 shrink-0 text-primary",strokeWidth:1.75}),(0,n.jsx)("span",{className:"truncate",children:a})]}),(null==s?void 0:s.sentAt)?s.sentDemo?(0,n.jsx)("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",title:"Demo send ".concat(new Date(s.sentAt).toLocaleStr
1ing()," — your email was personalized for this person and delivered to the sandbox inboxes. They were not contacted."),children:"Demo send"}):(0,n.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",title:"Emailed ".concat(new Date(s.sentAt).toLocaleString()),children:[(0,n.jsx)(u.Check,{className:"size-2.5 shrink-0",strokeWidth:2.5}),"Sent"]}):null]}):null,r?(0,n.jsxs)("a",{href:"tel:".concat(r.replace(/[^\d+]/g,"")),className:"inline-flex w-fit items-center gap-1.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[(0,n.jsx)(u.bc,{className:"size-3.5 shrink-0",strokeWidth:1.75}),(0,n.jsx)("span",{className:"tabular-nums",children:r})]}):null,r&&(null==s?void 0:s.phoneSource)==="sec-lane"?(0,n.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[s.phoneSourceUrl&&/^https?:\/\//i.test(s.phoneSourceUrl)?(0,n.jsx)("a",{href:s.phoneSourceUrl,target:"_blank",rel:"noreferrer",className:"underline underline-offset-2",children:"Filing phone"}):"Filing phone",s.phoneObservedAt&&Number.isFinite(Date.parse(s.phoneObservedAt))?" \xb7 ".concat(new Date(s.phoneObservedAt).toLocaleDateString(void 0,{timeZone:"UTC",month:"short",year:"numeric"})):""]}):null]}):(0,n.jsx)("span",{className:"text-xs text-muted-foreground/40",children:"—"})}function H(){return(0,n.jsx)(j.Zp,{className:"gap-0 overflow-hidden p-0",children:(0,n.jsx)("div",{className:"flex flex-col divide-y divide-border/60",children:[0,1,2,3,4].map(e=>(0,n.jsxs)("div",{className:"flex items-center gap-4 px-4 py-4",children:[(0,n.jsx)(T.E,{className:"h-4 w-32"}),(0,n.jsx)(T.E,{className:"h-4 w-28"}),(0,n.jsx)(T.E,{className:"h-4 w-20"}),(0,n.jsx)(T.E,{className:"ml-auto h-4 w-40"})]},e))})})}function G(e){let{onImport:t,onAdd:s,addRef:a,importRef:r}=e;return(0,n.jsxs)(j.Zp,{className:"items-center gap-2 py-12 text-center",children:[(0,n.jsx)(N.b5,{tone:"neutral",className:"size-11",children:(0,n.jsx)(u.HD,{className:"size-5",strokeWidth:1.75})}),(0,n.jsx)("p",{className:"text-sm font-semibold text-foreground",children:"No saved people yet"}),(0,n.jsxs)("p",{className:"max-w-sm text-sm leading-6 text-muted-foreground",children:["Enrich and save investors from the ",(0,n.jsx)("span",{className:"font-medium text-foreground",children:"Investors"})," tab and they'll show up here as your people."]}),(0,n.jsxs)("div",{className:"mt-1 flex flex-wrap items-center justify-center gap-2",children:[s?(0,n.jsxs)(d.$,{ref:a,size:"sm",onClick:s,className:"gap-1.5",children:[(0,n.jsx)(u.yp,{className:"size-3.5 shrink-0",strokeWidth:1.75}),"Add a person"]}):null,t?(0,n.jsxs)(d.$,{ref:r,variant:"outline",size:"sm",onClick:t,className:"gap-1.5",children:[(0,n.jsx)(u._O,{className:"size-3.5 shrink-0",strokeWidth:1.75}),"Import your list"]}):null]})]})}function V(e){var t;let{user:s}=(0,_.A)(),a=(null==s?void 0:s.id)&&e.dealId?"".concat(s.id,":").concat(null!=(t=(0,A.lh)())?t:"default",":").concat(e.dealId):"";return(0,n.jsx)(X,{...e,scope:a},a)}function X(e){let{open:t,onOpenChange:s,people:i,dealId:m,onQueued:x,onCloseAutoFocus:f,scope:v}=e,j=(0,r.useRouter)(),[b,y]=(0,a.useState)(""),[N,w]=(0,a.useState)(""),[k,C]=(0,a.useState)(!1),[S,z]=(0,a.useState)([]),[E,_]=(0,a.useState)("loading"),[A,I]=(0,a.useState)(0),[F,T]=(0,a.useState)(""),M=(0,a.useRef)(""),W=(0,a.useRef)(""),q=(0,a.useRef)(!1),[L,K]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=function(e){if(!e)return null;try{var t;let s=JSON.parse(null!=(t=window.sessionStorage.getItem("rook.campaignDraft.v1:".concat(e)))?t:"null");if(!s||!["subject","body","connectionId","requestKey","requestBody"].every(e=>"string"==typeof s[e]))return null;return s}catch(e){return null}}(v);e&&(y(e.subject),w(e.body),T(e.connectionId),M.current=e.requestKey,W.current=e.requestBody),K(!0)},[v]),(0,a.useEffect)(()=>{L&&R(v,{subject:b,body:N,connectionId:F,requestKey:M.current,requestBody:W.current})},[v,b,N,F,L]),(0,a.useEffect)(()=>{if(!t||!L)return;let e=!0;return _("loading"),(0,g.Wx)().then(t=>{if(!e)return;let s=t.filter(e=>"active"===e.status||"connected"===e.status);z(s),T(e=>e||(1===s.length?s[0].id:"")),_("ready")}
1).catch(()=>{e&&_("error")}),()=>{e=!1}},[t,L,A]);let U=(0,a.useMemo)(()=>i.map(e=>({p:e,email:B(e)})).filter(e=>!!e.email),[i]),J=i.length-U.length,P=U[0],Z=(0,a.useMemo)(()=>U.filter(e=>{var t;let{p:s}=e;return null==(t=s.contact)?void 0:t.sentAt}).length,[U]),Q="ready"===E&&F&&!S.some(e=>e.id===F),Y=L&&"ready"===E&&S.some(e=>e.id===F)&&U.length>0&&(b.trim().length>0||N.trim().length>0)&&!k;async function H(){if(!Y||q.current)return;q.current=!0,C(!0);let e={dealId:m,connectionId:F,subject:b,body:N,recipients:i.map(e=>({name:e.name,email:B(e),firm:e.firm}))},t=JSON.stringify(e);W.current!==t&&(W.current=t,M.current=crypto.randomUUID()),R(v,{subject:b,body:N,connectionId:F,requestKey:M.current,requestBody:W.current});try{var n,a,r,d;let t=await (0,o.nr)("/scout/investors/campaign",{method:"POST",timeoutMs:3e4,json:{...e,requestKey:M.current}}),i=await t.json().catch(()=>({}));if(!t.ok)throw Error("campaign_".concat(t.status));if(i.needsConnect)return void l.oR.error("Connect your Gmail or Outlook first",{description:"Link a mailbox in Settings, then send.",action:{label:"Settings",onClick:()=>j.push("/settings")}});let c=null!=(n=i.queued)?n:0;if(!i.campaignId)return void l.oR.error("Couldn't queue that send",{description:null!=(a=i.reason)?a:"Nothing was sent."});if(0===c)l.oR.warning("No additional messages queued",{description:"Open the send panel for each person's recorded status, including earlier sends and anyone skipped."});else if(i.mocked)l.oR.success("Test send queued — ".concat(c," ").concat(1===c?"message":"messages"),{description:"Every message goes to ".concat((null!=(r=i.to)?r:[]).join(", ")," instead of the investor. No investor will be contacted.")});else{let e=null!=(d=i.droppedForCap)?d:0;l.oR.success("Queued ".concat(c," ").concat(1===c?"email":"emails"),{description:e?"".concat(e," more were over the per-send limit and were NOT queued — send them in a second batch. Sending starts now and continues even if you close this page."):"Sending starts now and continues even if you close this page."})}s(!1),x(i.campaignId),M.current="",W.current="",y(""),w(""),R(v,null)}catch(e){l.oR.error("Couldn't queue that send. Try again.")}finally{q.current=!1,C(!1)}}return(0,n.jsx)(c.lG,{open:t,onOpenChange:e=>k?void 0:s(e),children:(0,n.jsxs)(c.Cf,{onCloseAutoFocus:f,className:"max-h-[92vh] gap-0 overflow-y-auto scrollbar-none p-0 sm:max-w-2xl",children:[(0,n.jsxs)(c.c7,{className:"space-y-1.5 border-b border-border/60 px-7 pb-5 pt-6",children:[(0,n.jsxs)(c.L3,{className:"flex items-center gap-2.5 text-lg",children:[(0,n.jsx)("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:(0,n.jsx)(u.Mail,{className:"size-4",strokeWidth:2})}),"Write your email"]}),(0,n.jsx)(c.rr,{className:"text-sm",children:"One email, sent separately to each person from your own mailbox."})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-5 px-7 py-6",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-1 rounded-lg border border-border/60 bg-muted/25 px-4 py-3 text-[13px]",children:[(0,n.jsxs)("span",{className:"font-semibold text-foreground",children:["Going to ",U.length," ",1===U.length?"person":"people"]}),J>0||Z>0?(0,n.jsxs)("span",{className:"text-muted-foreground",children:["\xb7"," ",[J>0?"".concat(J," skipped, no email address"):null,Z>0?"".concat(Z," skipped, already emailed"):null].filter(Boolean).join(" \xb7 ")]}):null]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(h.J,{htmlFor:"campaign-sender",children:"From"}),(0,n.jsxs)(D.l6,{value:F,onValueChange:T,disabled:k||"ready"!==E,children:[(0,n.jsx)(D.bq,{id:"campaign-sender",children:(0,n.jsx)(D.yv,{placeholder:"Choose your sending mailbox"})}),(0,n.jsx)(D.gC,{children:S.map(e=>(0,n.jsx)(D.eb,{value:e.id,children:e.email},e.id))})]}),"loading"===E&&(0,n.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Checking your mailboxes…"}),"error"===E&&(0,n.jsxs)("div",{role:"alert",children:[(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Couldn't check your mailboxes. Your draft is kept."}),(0,n.jsx)(d.$,{variant:"link",className:"px-0",onClick:()=>I(e=>e+1),children:"Retry mailbox check"})]}),Q&&(0,n.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Your previously selected mailbox is unavailable. Reconnect it in Settings or choose a sending mailbox."}),"ready"===E&&(!S.length||Q)&&(0,n.jsx)(d.$,{variant:"link",className:"self-start px-0",onClick:()=>j.push("/settings"),children:"Connect Gmail or Outlook in Settings"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(h.J,{htmlFor:"campaign-subject",className:"text-[13px] font-medium text-foreground",children:"Subject"}),(0,n.jsx)(p.p,{id:"campaign-subject",value:b,onChange:e=>y(e.target.value),placeholder:"Quick note for {name}",className:"h-10 text-[15px]",disabled:k})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(h.J,{htmlFor:"campaign-body",className:"text-[13px] font-medium text-foreground",children:"Message"}),(0,n.jsx)(O.T,{id:"campaign-body",value:N,onChange:e=>w(e.target.value),rows:10,placeholder:"Hi {name},\n\nI came across {firm} and wanted to reach out about…\n\nBest,\nYour name",className:"min-h-56 resize-y text-[15px] leading-7",disabled:k}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[(0,n.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"Insert:"}),["name","firm"].map(e=>(0,n.jsx)(d.$,{type:"button",variant:"outline",size:"sm",disabled:k,onClick:()=>w(t=>"".concat(t,"{").concat(e,"}")),className:"h-6 rounded-md px-2 font-mono text-[11px]",children:"{".concat(e,"}")},e)),(0,n.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"— swapped for each person’s real details when it sends."})]})]}),P&&(b.trim()||N.trim())?(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("span",{className:"text-[13px] font-medium text-foreground",children:["Preview — what ",(0,$.QC)(P.p.name)," receives"]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-border/60 bg-card px-4 py-3",children:[(0,n.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["To ",(0,n.jsx)("span",{className:"font-medium text-foreground",children:P.email})]}),(0,n.jsx)("span",{className:"text-[13px] font-semibold text-foreground",children:ee(b,P.p)||(0,n.jsx)("span",{className:"text-muted-foreground
1/60",children:"(no subject)"})}),(0,n.jsx)("p",{className:"whitespace-pre-wrap text-[13px] leading-6 text-muted-foreground",children:ee(N,P.p)||"(no message yet)"})]}),U.length>1?(0,n.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["The other ",U.length-1," get the same email with their own name and firm."]}):null]}):null]}),(0,n.jsxs)(c.Es,{className:"items-center gap-2 border-t border-border/60 px-7 py-4",children:[(0,n.jsx)(d.$,{variant:"ghost",onClick:()=>s(!1),disabled:k,children:"Cancel"}),(0,n.jsxs)(d.$,{onClick:H,disabled:!Y,loading:k,loadingLabel:"Queueing…",className:"gap-1.5",children:[(0,n.jsx)(u.Mail,{className:"size-4 shrink-0",strokeWidth:1.75}),"Send".concat(U.length?" to ".concat(U.length):"")]})]})]})})}function ee(e,t){var s,n,a,r;return(0,i.M4E)(e,{name:t.name.trim()||"there",firm:null!=(a=null==(s=t.firm)?void 0:s.trim())?a:"",email:null!=(r=null==(n=B(t))?void 0:n.trim())?r:""})}function et(){let{dealId:e,refreshVersion:t=0,campaignId:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[r,l]=(0,a.useState)(null),[i,c]=(0,a.useState)(!1),[m,p]=(0,a.useState)(new Set),[h,g]=(0,a.useState)(!1),[v,y]=(0,a.useState)(""),[w,k]=(0,a.useState)(!1),C=(0,a.useRef)(null),[S,E]=(0,a.useState)(!1),[_,A]=(0,a.useState)(!1),R=(0,a.useRef)(null),D=(0,a.useRef)(null);function O(e,t){(null==t?void 0:t.isConnected)&&(e.preventDefault(),t.focus())}let[T,K]=(0,a.useState)(null!=s?s:null);(0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await (0,o.nr)("/scout/investors/saved",{timeoutMs:3e4});if(!t.ok)throw Error("saved_".concat(t.status));let s=await t.json(),n=Array.isArray(s.people)?s.people:[];e&&(l(n),p(new Set),c(!1))}catch(t){e&&(l(null),c(!0))}})(),()=>{e=!1}},[t]),(0,a.useEffect)(()=>{if(s)return void K(s);let t=!0;return(async()=>{try{var s,n;let a=e?"?dealId=".concat(encodeURIComponent(e)):"",r=await (0,o.nr)("/scout/investors/campaigns".concat(a),{timeoutMs:2e4});if(!r.ok)return;let l=null!=(s=(await r.json()).campaigns)?s:[],i=null!=(n=l.find(e=>{var t,s,n,a,r,l;return"needs_review"===e.status||"cancelled"===e.status&&(null!=(a=null==(t=e.counts)?void 0:t.uncertain)?a:0)+(null!=(r=null==(s=e.counts)?void 0:s.needs_review)?r:0)+(null!=(l=null==(n=e.counts)?void 0:n.sending)?l:0)>0}))?n:l.find(e=>"queued"===e.status||"running"===e.status||"paused"===e.status);t&&i&&K(i.id)}catch(e){}})(),()=>{t=!1}},[e,s]);let U=(0,a.useMemo)(()=>new Set((null!=r?r:[]).filter(e=>e.pinned).map(Z)),[r]),P=(0,a.useMemo)(()=>(null!=r?r:[]).filter(e=>m.has(Z(e))),[r,m]),B=(0,a.useMemo)(()=>P.filter(e=>!e.pinned),[P]),X=(0,a.useMemo)(()=>{let e=v.trim().toLowerCase();return e?(null!=r?r:[]).filter(t=>{var s;let n=(null!=(s=(0,I.bd)(t.contact))?s:"").toLowerCase();return t.name.toLowerCase().includes(e)||(t.firm||"").toLowerCase().includes(e)||n.includes(e)}):null!=r?r:[]},[r,v]);async function ee(){try{let e=await (0,o.nr)("/scout/investors/saved",{timeoutMs:3e4}),t=await e.json();Array.isArray(t.people)&&l(t.people)}catch(e){}}function et(e){U.has(e)||p(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})}async function es(e){let t=e.filter(e=>!e.pinned);if(!t.length||h)return;let s=new Set(t.map(Z)),n=null!=r?r:[];g(!0),l(n.filter(e=>!s.has(Z(e)))),p(e=>{let t=new Set(e);for(let e of s)t.delete(e);return t});try{let e=await (0,o.nr)("/scout/investors/saved",{method:"DELETE",timeoutMs:3e4,headers:{"Content-Type":"application/json"},body:JSON.stringify({dedupKeys:t.map(e=>e.dedupKey).filter(e=>!!e),people:t.map(e=>({name:e.name,firm:e.firm}))})});if(!e.ok)throw Error("remove_".concat(e.status))}catch(e){try{let e=await (0,o.nr)("/scout/investors/saved",{timeoutMs:3e4}),t=await e.json();l(Array.isArray(t.people)?t.people:n)}catch(e){l(n)}}finally{g(!1)}}let en=T?(0,n.jsx)(z,{campaignId:T,onDone:()=>void ee(),onDismiss:()=>K(null)},T):null;if(null==r&&i)return(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[en,(0,n.jsxs)(N.mN,{className:"flex flex-col items-center gap-3 px-4 py-10 text-center",children:[(0,n.jsx)("p",{className:"text-sm font-semibold text-foreground",children:"Couldn't load your saved people"}),(0,n.jsx)("p",{className:"max-w-sm text-xs text-muted-foreground",children:"Your list is safe — this was a problem reading it, not a change to it."}),(0,n.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>void ee(),children:"Try again"})]})]});if(null==r)return(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[en,(0,n.jsx)(H,{})]});if(0===r.length)return(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[en,(0,n.jsx)(G,{addRef:R,importRef:D,onImport:()=>E(!0),onAdd:()=>A(!0)}),(0,n.jsx)(x,{open:S,onOpenChange:E,onImported:()=>void ee(),onCloseAutoFocus:e=>O(e,D.current)},"import-people"),(0,n.jsx)(f,{open:_,onOpenChange:A,onAdded:()=>void ee(),onCloseAutoFocus:e=>O(e,R.current)},"add-person")]});let ea=r.length>0&&r.every(e=>m.has(Z(e))),er=r.some(e=>m.has(Z(e)))&&!ea;return(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[en,(0,n.jsx)(q.D,{size:"md",value:v,onValueChange:y,onClear:()=>y(""),placeholder:"Search saved people by name, firm, or email…","aria-label":"Search saved people"}),(0,n.jsxs)("div",{className:"flex min-h-7 items-center justify-between gap-3",children:[(0,n.jsxs)("p",{className:"text-[11px] text-muted-foreground
1/70",children:[(0,n.jsx)("span",{className:"font-medium text-foreground",children:r.length})," saved ",1===r.length?"person":"people",v&&(0,n.jsxs)("span",{className:"ml-2 text-muted-foreground/50",children:["\xb7 ",X.length," shown"]}),P.length>0&&(0,n.jsxs)("span",{className:"ml-2 text-foreground",children:["\xb7 ",P.length," selected"]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)(d.$,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2.5",onClick:()=>A(!0),ref:R,children:[(0,n.jsx)(u.yp,{className:"size-3.5 shrink-0",strokeWidth:1.75}),"Add person"]}),(0,n.jsxs)(d.$,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2.5",onClick:()=>E(!0),ref:D,children:[(0,n.jsx)(u._O,{className:"size-3.5 shrink-0",strokeWidth:1.75}),"Import your list"]}),P.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(d.$,{variant:"ghost",size:"sm",className:"h-7 px-2 text-muted-foreground",onClick:()=>p(new Set(U)),disabled:h,children:[(0,n.jsx)(u.X,{className:"size-3.5 shrink-0",strokeWidth:2}),"Clear"]}),(0,n.jsxs)(d.$,{ref:C,size:"sm",className:"h-7 gap-1.5 px-2.5",onClick:()=>k(!0),disabled:h,children:[(0,n.jsx)(u.Mail,{className:"size-3.5 shrink-0",strokeWidth:1.75}),"Send email"]}),B.length>0&&(0,n.jsxs)(d.$,{variant:"outline",size:"sm",className:"h-7 gap-1.5 border-destructive/40 px-2.5 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:()=>es(B),disabled:h,children:[(0,n.jsx)(u.TB,{className:"size-3.5 shrink-0",strokeWidth:1.75}),"Remove ",B.length]})]})]})]}),(0,n.jsx)(x,{open:S,onOpenChange:E,onImported:()=>void ee(),onCloseAutoFocus:e=>O(e,D.current)},"import-people"),(0,n.jsx)(f,{open:_,onOpenChange:A,onAdded:()=>void ee(),onCloseAutoFocus:e=>O(e,R.current)},"add-person"),(0,n.jsx)(V,{open:w,onOpenChange:k,onCloseAutoFocus:e=>{C.current&&(e.preventDefault(),C.current.focus())},people:P,dealId:e,onQueued:e=>{K(e),p(new Set)}}),v&&0===X.length?(0,n.jsxs)(j.Zp,{className:"items-center gap-1.5 py-10 text-center",children:[(0,n.jsx)(u.Search,{className:"size-5 text-muted-foreground/50",strokeWidth:1.75}),(0,n.jsxs)("p",{className:"text-sm text-muted-foreground",children:["No saved people match ",(0,n.jsxs)("span",{className:"font-medium text-foreground",children:["“",v,"”"]}),"."]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.Zp,{className:"hidden gap-0 overflow-hidden p-0 shadow-(--shadow-control) sm:block",children:(0,n.jsxs)(M.XI,{children:[(0,n.jsx)(M.A0,{className:"sticky top-0 z-10 [&_th]:h-11 [&_th]:text-[11px] [&_th]:font-semibold [&_th]:uppercase [&_th]:tracking-wide [&_th]:text-muted-foreground/70",children:(0,n.jsxs)(M.Hj,{className:"border-b border-border/70 bg-muted/50 backdrop-blur hover:bg-muted/50 supp
1orts-backdrop-filter:bg-muted/40",children:[(0,n.jsx)(M.nd,{className:"w-9 pl-4 pr-0",children:(0,n.jsx)(F.S,{"aria-label":ea?"Deselect all":"Select all",checked:!!ea||!!er&&"indeterminate",onCheckedChange:()=>{p(e=>new Set(r.length>0&&r.every(t=>e.has(Z(t)))?U:r.map(Z)))}})}),(0,n.jsx)(M.nd,{className:"min-w-64",children:"Investor"}),(0,n.jsx)(M.nd,{children:"Contact"}),(0,n.jsx)(M.nd,{className:"whitespace-nowrap",children:"Saved"}),(0,n.jsx)(M.nd,{className:"w-12 pr-4","aria-label":"Actions"})]})}),(0,n.jsx)(M.BF,{children:X.map((e,t)=>{let s=Q(e.savedAt),a=Z(e),r=m.has(a);return(0,n.jsxs)(M.Hj,{"data-state":r?"selected":void 0,className:(0,L.cn)("border-b border-border/50 align-top transition-[background-color,box-shadow] duration-200 ease-out","shadow-[inset_0_0_0_0_transparent]","data-[state=selected]:bg-primary-soft/50 data-[state=selected]:shadow-[inset_3px_0_0_0_var(--primary)]",e.pinned?"bg-primary-soft/20":"cursor-pointer hover:bg-accent/50 hover:shadow-[inset_2px_0_0_0_var(--border)] data-[state=selected]:hover:bg-primary-soft/60"),onClick:t=>{!e.pinned&&(t.target.closest('a, button, input, [role="checkbox"], [data-slot="checkbox"]')||et(a))},children:[(0,n.jsx)(M.nA,{className:"w-9 pl-4 pr-0 align-middle",children:(0,n.jsx)(F.S,{"aria-label":e.pinned?"".concat(e.name," is always included"):"Select ".concat(e.name),checked:r,onCheckedChange:()=>et(a),disabled:e.pinned})}),(0,n.jsx)(M.nA,{className:"min-w-64 whitespace-normal py-3",children:(0,n.jsxs)("div",{className:"flex min-w-0 items-start gap-2.5",children:[(0,n.jsx)("span",{"aria-hidden":!0,className:"mt-0.5 inline-flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:(0,$.yC)(e.name)}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,n.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[(0,n.jsx)("span",{className:"text-[13px] font-semibold leading-tight text-foreground",title:e.name,children:(0,$.QC)(e.name)}),e.pinned?(0,n.jsx)(b.E,{variant:"outline",className:"shrink-0 border-primary/40 px-1.5 py-0 text-[10px] font-normal text-primary",children:"You"}):null]}),e.firm?(0,n.jsx)("span",{className:"text-[12px] leading-tight text-muted-foreground",title:e.firm,children:(0,$.QC)(e.firm)}):null,(0,n.jsx)(J,{person:e})]})]})}),(0,n.jsx)(M.nA,{className:"min-w-40 whitespace-normal py-3",children:(0,n.jsx)(Y,{contact:e.contact})}),(0,n.jsx)(M.nA,{className:"whitespace-nowrap py-3 text-xs text-muted-foreground",children:null!=s?s:"—"}),(0,n.jsx)(M.nA,{className:"w-12 py-3 pr-4 text-right",children:!e.pinned&&(0,n.jsxs)(W.m_,{children:[(0,n.jsx)(W.k$,{asChild:!0,children:(0,n.jsx)(d.$,{variant:"ghost",size:"icon","aria-label":"Remove ".concat(e.name),className:"size-7 shrink-0 text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive",onClick:()=>es([e]),disabled:h,children:(0,n.jsx)(u.TB,{className:"size-3.5 shrink-0",strokeWidth:1.75})})}),(0,n.jsx)(W.ZI,{children:"Remove from My People"})]})})]},"".concat(a,"-").concat(t))})})]})}),(0,n.jsx)("div",{className:"flex flex-col gap-3 sm:hidden",children:X.map((e,t)=>{let s=Q(e.savedAt),a=Z(e),r=m.has(a);return(0,n.jsx)(j.Zp,{"data-state":r?"selected":void 0,className:"gap-2 py-4 data-[state=selected]:border-primary/40 data-[state=selected]:bg-primary/3",children:(0,n.jsxs)("div",{className:"flex flex-col gap-2 px-4",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,n.jsx)(F.S,{"aria-label":e.pinned?"".concat(e.name," is always included"):"Select ".concat(e.name),checked:r,onCheckedChange:()=>et(a),disabled:e.pinned,className:"mt-0.5 shrink-0"}),(0,n.jsx)("span",{className:"min-w-0 font-semibold text-foreground",title:e.name,children:(0,$.QC)(e.name)}),e.pinned&&(0,n.jsx)(b.E,{variant:"outline",className:"shrink-0 border-primary/40 text-[10px] font-normal text-primary",children:"You"})]}),(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-1.5",children:!e.pinned&&(0,n.jsx)(d.$,{variant:"ghost",size:"icon","aria-label":"Remove ".concat(e.name),className:"size-7 shrink-0 text-muted-foreground
1/60 hover:bg-destructive/10 hover:text-destructive",onClick:()=>es([e]),disabled:h,children:(0,n.jsx)(u.TB,{className:"size-3.5 shrink-0",strokeWidth:1.75})})})]}),e.firm&&(0,n.jsx)("span",{className:"text-sm text-muted-foreground",title:e.firm,children:(0,$.QC)(e.firm)}),(0,n.jsx)(Y,{contact:e.contact}),(0,n.jsx)(J,{person:e}),s&&(0,n.jsxs)("span",{className:"text-[11px] text-muted-foreground/70",children:["Saved ",s]})]})},"".concat(a,"-m-").concat(t))})})]})]})}},54226:(e,t,s)=>{s.d(t,{w:()=>o});var n=s(54568),a=s(7620),r=s(54616),l=s(25703);let i=(0,r.F)("flex cursor-pointer flex-col items-center justify-center border-dashed text-center transition-colors outline-hidden focus-visible:ring-2 focus-visible:ring-ring",{variants:{size:{sm:"px-4 py-6",smTall:"px-4 py-8",md:"px-6 py-8",lg:"p-10",hero:"px-6 py-20"},weight:{thin:"border",thick:"border-2"},radius:{lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},state:{idle:"border-border hover:bg-muted/50",over:"border-primary bg-primary/5",error:"border-tier-conflict bg-tier-conflict-soft/40"}},defaultVariants:{size:"md",weight:"thin",radius:"lg",state:"idle"}});function o(e){let{onFiles:t,accept:s,multiple:r=!1,disabled:o=!1,busy:d=!1,size:c,weight:u,radius:m,icon:x,label:p,hint:h,error:f,children:g,className:v,...j}=e,b=a.useRef(null),[y,N]=a.useState(0),w=o||d,k=a.useCallback(e=>{e&&0!==e.length&&t(Array.from(e))},[t]),C=()=>{var e;w||null==(e=b.current)||e.click()};return(0,n.jsxs)("div",{"data-slot":"drop-zone",role:"button",tabIndex:w?-1:0,"aria-disabled":w||void 0,"aria-busy":d||void 0,onClick:C,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),C())},onDragEnter:e=>{e.preventDefault(),w||N(e=>e+1)},onDragOver:e=>e.preventDefault(),onDragLeave:e=>{e.preventDefault(),N(e=>Math.max(0,e-1))},onDrop:e=>{e.preventDefault(),N(0),w||k(e.dataTransfer.files)},className:(0,l.cn)(i({size:c,weight:u,radius:m,state:f?"error":y>0?"over":"idle"}),w&&"pointer-events-none opacity-60",v),...j,children:[(0,n.jsx)("input",{ref:b,type:"file",accept:s,multiple:r,className:"hidden",tabIndex:-1,onChange:e=>{k(e.target.files),e.target.value=""}}),null!=g?g:(0,n.jsxs)(n.Fragment,{children:[x?(0,n.jsx)("span",{className:"mb-2",children:x}):null,(0,n.jsx)("p",{className:"text-sm font-medium text-foreground",children:p}),h?(0,n.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:h}):null]}),f?(0,n.jsx)("p",{className:"mt-2 text-xs font-medium text-danger-ink",children:f}):null]})}},60029:(e,t,s)=>{s.d(t,{k:()=>l});var n=s(54568);s(7620);var a=s(1161),r=s(25703);function l(e){let{className:t,value:s,...l}=e;return(0,n.jsx)(a.Root,{"data-slot":"progress",className:(0,r.cn)("bg-muted relative h-2 w-full overflow-hidden rounded-full",t),...l,children:(0,n.jsx)(a.Indicator,{"data-slot":"progress-indicator",className:"bg-foreground
1/70 h-full w-full flex-1 transition-all",style:{transform:"translateX(-".concat(100-(s||0),"%)")}})})}},77538:(e,t,s)=>{s.d(t,{$m:()=>d,As:()=>o,nD:()=>i,ub:()=>c});var n=s(54568);s(7620);var a=s(91298),r=s(78622),l=s(25703);function i(e){let{...t}=e;return(0,n.jsx)(a.Root,{"data-slot":"accordion",...t})}function o(e){let{className:t,...s}=e;return(0,n.jsx)(a.Item,{"data-slot":"accordion-item",className:(0,l.cn)("border-b border-border/70 last:border-b-0",t),...s})}function d(e){let{className:t,children:s,...i}=e;return(0,n.jsx)(a.Header,{className:"flex",children:(0,n.jsxs)(a.Trigger,{"data-slot":"accordion-trigger",className:(0,l.cn)("flex flex-1 items-center justify-between gap-4 py-5 text-left text-base font-semibold text-foreground outline-hidden transition-colors hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",t),...i,children:[s,(0,n.jsx)(r.yQ,{className:"size-5 shrink-0 text-muted-foreground transition-transform duration-200"})]})})}function c(e){let{className:t,children:s,...r}=e;return(0,n.jsx)(a.Content,{"data-slot":"accordion-content",className:"overflow-hidden text-base text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:(0,n.jsx)("div",{className:(0,l.cn)("pb-5 pr-10 leading-relaxed",t),children:s})})}}}]);

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.