1import{t as _,j as e,as as R,bw as B,a as x,r as d,q as M,B as b,s as c,ar as L,a2 as l,aQ as Q,G as U,k as D,a9 as H}from"./index-BV1hn8pg.js";import{O as Y,F as G}from"./FoundersList-BABTJ-P9.js";import{T as P}from"./textarea-16CQZfue.js";import{T as X,a as Z,b as w,c as N}from"./tabs-KsEqOvjH.js";import{E as J}from"./external-link-3vVIVXbq.js";import"./otwFounders-CMT5O420.js";/** 2 * @license lucide-react v0.462.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 $=_("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/** 7 * @license lucide-react v0.462.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 z=_("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/** 12 * @license lucide-react v0.462.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const ee=_("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]),u="#71F7E7",F="#7B61FF",te=["longlist","shortlist","top20","top3","reviewing"],A=[{value:2,label:"Strong yes",tone:u},{value:1,label:"Yes",tone:u},{value:-1,label:"No",tone:"#F97066"},{value:-2,label:"Strong no",tone:"#F97066"}];function de(){return e.jsxs(e.Fragment,{children:[e.jsxs(R,{children:[e.jsx("title",{children:"Committee review | Ones to Watch"}),e.jsx("meta",{name:"robots",content:"noindex"})]}),e.jsx("main",{className:"min-h-screen py-16",style:{background:"#12102B"},children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsx(Y,{title:"Committee sign-in",blurb:"Screening committee members only. We will email you a one-time sign-in link.",children:n=>e.jsx(se,{session:n})})})})]})}function se({session:n}){const i=B(),o=n.user.id,{data:h,isLoading:O}=x({queryKey:["otw-committee-access",o],queryFn:async()=>{const{data:t,error:a}=await c.rpc("is_otw_committee",{_user_id:o});if(a)throw a;const{data:r}=await c.rpc("is_admin",{_user_id:o});return!!t||!!r}}),{data:p,isLoading:I}=x({enabled:!!h,queryKey:["otw-committee-companies"],queryFn:async()=>{const{data:t,error:a}=await c.from("ones_to_watch_nominations").select("id, company_name, company_website, company_linkedin, one_liner, why_watch, traction, hq_country, stage, total_raised, agetech_sector, founders, founded_year, memo_url, stage_flag, nominator_name, nominator_email, status").in("status",te).order("company_name").limit(500);if(a)throw a;return t??[]}}),{data:j}=x({enabled:!!h,queryKey:["otw-my-votes",o],queryFn:async()=>{const{data:t,error:a}=await c.from("otw_votes").select("nomination_id, vote, note").eq("user_id",o);if(a)throw a;return t??[]}}),{data:V,isLoading:W}=x({enabled:!!h,queryKey:["otw-rankings"],queryFn:async()=>{const{data:t,error:a}=await c.rpc("get_otw_rankings");if(a)throw a;return t??[]}}),k=d.useMemo(()=>new Set((j??[]).map(t=>t.nomination_id)),[j]),g=d.useMemo(()=>(p??[]).filter(t=>!k.has(t.id)),[p,k]),[C,S]=d.useState(0),[T,q]=d.useState(""),[f,E]=d.useState(!1),s=g[C],m=async t=>{if(!s||f)return;E(!0);const{error:a}=await c.from("otw_votes").upsert({nomination_id:s.id,user_id:o,vote:t,note:T.trim()||null},{onConflict:"nomination_id,user_id"});if(E(!1),a){H.error(a.message);return}q(""),i.invalidateQueries({queryKey:["otw-my-votes",o]}),i.invalidateQueries({queryKey:["otw-rankings"]})};return d.useEffect(()=>{const t=a=>{if(!s||a.isComposing)return;const r=a.target,y=r==null?void 0:r.tagName;y==="TEXTAREA"||y==="INPUT"||y==="SELECT"||r!=null&&r.isContentEditable||(a.key==="ArrowRight"&&m(1),a.key==="ArrowLeft"&&m(-1),a.key==="ArrowUp"&&m(2),a.key==="ArrowDown"&&m(-2),a.key===" "&&(a.preventDefault(),S(K=>K+1)))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)}),O?e.jsx("div",{className:"py-24 flex justify-center",children:e.jsx(M,{className:"w-6 h-6 animate-spin",style:{color:u}})}):h?e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-[0.2em] mb-2",style:{color:F},children:"Ones to Watch · Screening committee"}),e.jsx("h1",{className:"text-3xl font-semibold text-foreground",children:"Review and rank"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Signed in as ",n.user.email,". Strong yes +2, yes +1, no -1, strong no -2. Arrow keys work; space skips."]})]}),e.jsxs(X,{defaultValue:"review",children:[e.jsxs(Z,{children:[e.jsxs(w,{value:"review",children:["Review (",g.length," left)"]}),e.jsx(w,{value:"rank",children:"Stack rank"}),e.jsx(w,{value:"status",children:"Status"})]}),e.jsx(N,{value:"review",className:"pt-6",children:I?e.jsx(L,{className:"h-80 w-full"}):s?e.jsxs("article",{className:"rounded-2xl border p-8",style:{borderColor:"rgba(123,97,255,0.3)",background:"rgba(255,255,255,0.02)"},children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:s.company_name}),s.one_liner&&e.jsx("p",{className:"text-muted-foreground mt-1",children:s.one_liner})]}),e.jsxs("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:[C+1," / ",g.length]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-6",children:[s.agetech_sector&&e.jsx(l,{variant:"outline",children:s.agetech_sector}),s.hq_country&&e.jsx(l,{variant:"outline",children:s.hq_country}),s.stage&&e.jsx(l,{variant:"outline",children:s.stage}),s.total_raised&&e.jsxs(l,{variant:"outline",children:["Raised ",s.total_raised]}),s.founded_year&&e.jsxs(l,{variant:"outline",children:["Founded ",s.founded_year]}),s.stage_flag&&e.jsx(l,{variant:"destructive",children:s.stage_flag})]}),s.why_watch&&e.jsx(v,{title:"Why one to watch",children:s.why_watch}),s.traction&&e.jsx(v,{title:"Traction",children:s.traction}),s.founders&&e.jsx(v,{title:"Founding team",children:e.jsx(G,{value:s.founders})}),e.jsxs("div",{className:"flex flex-wrap gap-4 text-sm mt-6",children:[s.memo_url&&e.jsxs("a",{href:s.memo_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 hover:underline",style:{color:u},children:[e.jsx(Q,{className:"w-4 h-4"})," Investment memo ",e.jsx(J,{className:"w-3 h-3"})]}),s.company_website&&e.jsxs("a",{href:s.company_website,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground",children:[e.jsx(U,{className:"w-4 h-4"})," Website"]}),s.company_linkedin&&e.jsxs("a",{href:s.company_linkedin,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground",children:[e.jsx(D,{className:"w-4 h-4"})," LinkedIn"]})]}),e.jsx(P,{className:"mt-6",rows:2,placeholder:"Optional note for the team",value:T,onChange:t=>q(t.target.value),maxLength:800}),e.jsxs("div",{className:"flex flex-wrap gap-3 mt-6",children:[A.map(t=>e.jsxs(b,{variant:"outline",disabled:f,onClick:()=>m(t.value),style:{borderColor:`${t.tone}55`,color:t.tone},children:[t.value>0?e.jsx(ee,{className:"w-4 h-4 mr-2"}):e.jsx(z,{className:"w-4 h-4 mr-2"}),t.label]},t.value)),e.jsxs(b,{variant:"ghost",onClick:()=>S(t=>t+1),disabled:f,children:[e.jsx($,{className:"w-4 h-4 mr-2"})," Skip"]})]})]}):e.jsxs("div",{className:"rounded-2xl border p-12 text-center",style:{borderColor:"rgba(123,97,255,0.25)"},children:[e.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"You are all caught up"}),e.jsx("p",{className:"text-muted-foreground",children:"Every company in the queue has your vote. Check the stack rank tab."})]})}),e.jsx(N,{value:"rank",className:"pt-6",children:W?e.jsx(L,{className:"h-72 w-full"}):e.jsx("div",{className:"overflow-x-auto rounded-2xl border",style:{borderColor:"rgba(123,97,255,0.25)"},children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"text-left text-muted-foreground",children:e.jsxs("tr",{className:"border-b",style:{borderColor:"rgba(123,97,255,0.2)"},children:[e.jsx("th",{className:"p-3",children:"#"}),e.jsx("th",{className:"p-3",children:"Company"}),e.jsx("th",{className:"p-3",children:"Score"}),e.jsx("th",{className:"p-3",children:"Avg"}),e.jsx("th",{className:"p-3",children:"Votes"}),e.jsx("th",{className:"p-3",children:"Yes / No"}),e.jsx("th",{className:"p-3",children:"Status"})]})}),e.jsx("tbody",{children:(V??[]).map((t,a)=>e.jsxs("tr",{className:"border-b last:border-0",style:{borderColor:"rgba(123,97,255,0.12)"},children:[e.jsx("td",{className:"p-3 text-muted-foreground",children:a+1}),e.jsx("td",{className:"p-3 text-foreground",children:t.company_name}),e.jsx("td",{className:"p-3 font-semibold",style:{color:u},children:t.total_score}),e.jsx("td",{className:"p-3",children:t.avg_score}),e.jsx("td",{className:"p-3",children:t.vote_count}),e.jsxs("td",{className:"p-3",children:[t.yes_votes," / ",t.no_votes]}),e.jsx("td",{className:"p-3",children:e.jsx(l,{variant:"outline",children:t.status})})]},t.nomination_id))})]})})}),e.jsx(N,{value:"status",className:"pt-6",children:e.jsx("div",{className:"overflow-x-auto rounded-2xl border",style:{borderColor:"rgba(123,97,255,0.25)"},children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"text-left text-muted-foreground",children:e.jsxs("tr",{className:"border-b",style:{borderColor:"rgba(123,97,255,0.2)"},children:[e.jsx("th",{className:"p-3",children:"Company"}),e.jsx("th",{className:"p-3",children:"Status"}),e.jsx("th",{className:"p-3",children:"Your vote"}),e.jsx("th",{className:"p-3",children:"Nominated by"})]})}),e.jsx("tbody",{children:(p??[]).map(t=>{const a=(j??[]).find(r=>r.nomination_id===t.id);return e.jsxs("tr",{className:"border-b last:border-0",style:{borderColor:"rgba(123,97,255,0.12)"},children:[e.jsx("td",{className:"p-3 text-foreground",children:t.company_name}),e.jsx("td",{className:"p-3",children:e.jsx(l,{variant:"outline",children:t.status})}),e.jsx("td",{className:"p-3",children:a?ae(a.vote):"â"}),e.jsx("td",{className:"p-3 text-muted-foreground",children:t.nominator_name||"â"})]},t.id)})})]})})})]})]}):e.jsxs("div",{className:"max-w-md mx-auto py-24 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Not on the committee list"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"This tool is limited to the Ones to Watch screening committee. If you should have access, contact the AgeTechX team."}),e.jsx(b,{variant:"outline",onClick:()=>c.auth.signOut(),children:"Sign out"})]})}function ae(n){var i;return((i=A.find(o=>o.value===n))==null?void 0:i.label)??String(n)}function v({title:n,children:i}){return e.jsxs("div",{className:"mb-5",children:[e.jsx("h3",{className:"text-[11px] uppercase tracking-[0.16em] mb
16-2",style:{color:F},children:n}),e.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line leading-relaxed",children:i})]})}export{de 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.