1import{i as t,l as P,v as r,F as M,t as d,S as _,e as D,j as N,G as oe,I as ce,g as V,d as O,k as X,q as G,Q as Z,H as de,J as me,L as ue,E as ge,b as W,o as Y}from"./solid-vendor-CQ4bklhx.js";import{u as C,aA as he,S as E,h as q,l as ee,W as te,x as K,C as re,ac as U,i as ve,B as fe,bR as pe,A as xe,e as be}from"./index-BMJwaYYL.js";import{C as j}from"./Card-xg3jCnGU.js";import{m as h}from"./AppShell-BJTkHxR6.js";import{P as _e}from"./PageContainer-EK4IkFM8.js";import{P as $e}from"./PageHeader-Y1siV6n8.js";import"./ResumeImportDialog-cSc_tC38.js";import{E as ye}from"./EmptyMessages-DN_8R6DR.js";import{E as we}from"./EmptyState-DeyqlXR1.js";import{A as ae}from"./ArrowLeft-CWRLMrvH.js";import{A as ne}from"./ArrowCounterClockwise-Cv_m6uGd.js";import{I as Se}from"./Indicator-BIeRCWLi.js";import{S as ke}from"./Sparkle-D1Wcl2JM.js";import{A as He}from"./ArrowRight-Dwjy_iXJ.js";import{C as J}from"./ChatBubble-CBfVki60.js";import{M as Ce,r as Le}from"./MentionTextarea-ops467Xo.js";import{P as Te}from"./constants-BRRRLCnA.js";import"./ui-vendor-CMjh0a6q.js";import"./Dialog-CHpC-y1y.js";import"./focusReturn-DVsHGUsg.js";import"./gamificationCatalog-fRL7UYIx.js";import"./List-CKIc4tFB.js";import"./EnvelopeSimple-CXrRdzZ9.js";import"./emailVerificationSignal-CxN5gjpq.js";import"./Coin-OUMvt2Sl.js";import"./visibleActions-Bef-FR3s.js";import"./Activity-DOprSFYv.js";import"./Barbell-BG03pchE.js";import"./Bell-CXYucUi2.js";import"./Brain-DNy2RO9Z.js";import"./Briefcase-Bohp-giT.js";import"./Buildings-D2RJJxp5.js";import"./CalendarCheck-Bu1f0KfY.js";import"./ChartBar-DY_2iH4I.js";import"./Columns-BwP9XChp.js";import"./FileText-C8YXIpu-.js";import"./Flag-Cal5-tYg.js";import"./Gear-BVtxGog7.js";import"./Microphone-PA9oRevB.js";import"./SquaresFour-Np04Bv39.js";import"./Target-ChoK037U.js";import"./Trash-CNBTey9F.js";import"./Tray-Dk98svgj.js";import"./Trophy-2h5N-dvb.js";import"./User-CcQ1nDDb.js";import"./Users-CFx5EflW.js";import"./useFileParser-CkphKoZw.js";import"./useCvImport-a9Sn4PI2.js";import"./resume.api-C30YIl1N.js";import"./analytics-bdL2dtBw.js";import"./CompanionModeMark-BWQzKzlL.js";import"./ChatCircle-CxNNgvmg.js";import"./VoiceWave-Snua-fCv.js";import"./drawer.store-_PH7KqTm.js";import"./agent-drawer.store-nwz10ejO.js";import"./effect-CfYYUERt.js";import"./formatters-Ch-wDJY-.js";import"./Chat-BfnUlM5M.js";import"./ProfileHeader-FoKhTVB5.js";import"./AvatarDisplay-B5W3JH6C.js";import"./Pencil-DpDXFyGB.js";import"./avatarPresets-Cr-wxx7h.js";import"./ShieldWarning-pkNsYiT7.js";import"./breadcrumb.store-BYxfVcKJ.js";import"./Banner-DQ1DfhSN.js";import"./Lock-CGbkwPJz.js";import"./ArrowsDownUp-CPw6aUwL.js";import"./Rocket-C4rPvj2w.js";import"./SignOut-DWRXfq_i.js";import"./sidebar.store-DdWqwWfz.js";import"./ProfileSwitcher-CmDX94mN.js";import"./Camera-DtZOnbp8.js";import"./PaperPlaneTilt-Cywn6Jou.js";import"./support.api-6RksjCAf.js";import"./UploadSimple-DOGSpQPQ.js";const Ae=e=>{const{t:a}=C();return t(we,{size:"lg",illustration:ye,get title(){return a("messageHub.empty.title")},get description(){return P(()=>!!e.done)()?a("messageHub.empty.done"):a("messageHub.empty.body")}})},le=["all","mentions","sent","unread","done"],Ee=e=>le.includes(e),Re=e=>{const{t:a}=C(),s=()=>le.map(n=>({value:n,label:a(`messageHub.tab.${n}`)}));return t(he,{get items(){return s()},get value(){return e.active},get"aria-label"(){return a("messageHub.filterLabel")},onChange:n=>{Ee(n)&&e.onChange(n)}})};var Ie=d("<span role=status class=sr-only>"),De=d('<ul aria-hidden=true class="divide-y divide-[var(--color-border)]">'),Fe=d('<li class="flex items-start gap-3 py-4 pl-8 pr-4 sm:gap-4 sm:pl-10"><div class="flex min-w-0 flex-1 flex-col gap-2"><div class="flex items-center justify-between gap-3">'),Ne=d('<div class="flex h-full flex-col"><div class="flex items-center gap-3 border-b border-[var(--color-border)] px-3 py-3 sm:px-6"></div><div aria-hidden=true class="flex flex-1 flex-col justify-end gap-5 px-3 py-5 sm:px-6">'),Me=d('<div class="flex w-full max-w-3xl items-end gap-3"><div class="flex min-w-0 flex-1 flex-col gap-2">');const Pe=[0,1,2,3,4],Be=[0,1,2],se=()=>{const{t:e}=C();return(()=>{var a=Ie();return r(a,()=>e("common.loading")),a})()},je=()=>[t(se,{}),(()=>{var e=De();return r(e,t(M,{each:Pe,children:()=>(()=>{var a=Fe(),s=a.firstChild,n=s.firstChild;return r(a,t(E,{variant:"circular",width:40,height:40}),s),r(n,t(E,{width:"30%"}),null),r(n,t(E,{width:40,height:12}),null),r(s,t(E,{width:"85%"}),null),r(s,t(E,{width:96,height:20,class:"rounded-[var(--radius-capsule)]"}),null),a})()})),e})()],ze=e=>{const{t:a}=C();return(()=>{var s=Ne(),n=s.firstChild,m=n.nextSibling;return r(s,t(se,{}),n),r(n,t(q,{get label(){return a("messageHub.back")},onClick:()=>e.onBack(),get children(){return t(ae,{class:"h-4 w-4"})}}),null),r(n,t(E,{"aria-hidden":"true",width:"40%",height:20}),null),r(m,t(M,{each:Be,children:()=>(()=>{var u=Me(),f=u.firstChild;return r(u,t(E,{variant:"circular",width:40,height:40}),f),r(f,t(E,{width:"25%",height:12}),null),r(f,t(E,{variant:"rectangular",width:"70%",height:56}),null),u})()})),s})()};function Oe(e,a,s=new Date){const n=new Date(e);return n.toDateString()===s.toDateString()?n.toLocaleTimeString(a,{hour:"numeric",minute:"2-digit"}):n.getFullYear()===s.getFullYear()?n.toLocaleDateString(a,{day:"numeric",month:"short"}):n.toLocaleDateString(a,{day:"numeric",month:"short",year:"numeric"})}
1function Ue(e,a){return new Date(e).toLocaleString(a,{day:"numeric",month:"short",hour:"numeric",minute:"2-digit"})}const qe=new Set(["interview_completed"]);function ie(e,a){const s=e?.type;if(s&&qe.has(s)){const{type:n,...m}=e;return a(`systemMessage.${s}`,m)}return a("systemMessage.generic")}var Ge=d('<span aria-hidden=true class="flex h-10 w-10 flex-none items-center justify-center rounded-full bg-[var(--color-primary)] text-[var(--color-on-primary)]">');const B=()=>(()=>{var e=Ge();return r(e,t(ke,{class:"h-5 w-5",weight:"fill"})),e})();var We=d("<span class=sr-only>"),Ye=d('<span class="min-w-0 truncate">'),Ke=d('<li class="group relative flex items-start transition-colors hover:bg-[color-mix(in_srgb,var(--color-text)_6%,transparent)] focus-within:bg-[color-mix(in_srgb,var(--color-text)_6%,transparent)]"><button type=button class="flex min-w-0 flex-1 items-start gap-3 py-4 pl-3 text-left [@media(hover:hover)]:pr-5 [@media(hover:none)]:pr-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-primary-500)] sm:gap-4 sm:pl-4"><span class="flex h-10 w-2 flex-none items-center justify-center"></span><span class="flex min-w-0 flex-1 flex-col gap-1"><span class="flex items-baseline gap-3"><span class="min-w-0 flex-1 truncate text-[length:var(--text-sm)] text-[var(--color-text)]"></span><time class="flex-none whitespace-nowrap text-[length:var(--text-xs)] text-[var(--color-text-muted)] [@media(hover:hover)]:group-hover:invisible [@media(hover:hover)]:group-focus-within:invisible"></time></span><span class="line-clamp-3 text-[length:var(--text-sm)] leading-relaxed sm:line-clamp-2"></span><span class="mt-1 flex min-w-0 flex-wrap items-center gap-1.5"></span></span></button><div class="flex-none transition-opacity [@media(hover:none)]:self-start [@media(hover:none)]:pt-2.5 [@media(hover:none)]:pr-3 [@media(hover:hover)]:absolute [@media(hover:hover)]:top-2.5 [@media(hover:hover)]:right-5 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover:opacity-100 [@media(hover:hover)]:group-focus-within:opacity-100">'),Je=d("<span aria-hidden=true class=flex-none>");const Qe=e=>{const{t:a,locale:s}=C(),n=()=>e.thread.target_type==="candidate"?e.thread.candidate_name||e.thread.candidate_email||a("messageHub.source.candidate"):e.thread.candidate_name||e.thread.position_name||a("messageHub.source.interview"),m=()=>e.thread.is_mention?a("messageHub.kind.mention"):e.thread.is_sent?a("messageHub.kind.sent"):"",u=()=>e.thread.is_system?a("messageHub.sender.peatch"):e.thread.latest_author_name,f=()=>e.thread.is_system&&e.thread.system_payload?ie(e.thread.system_payload,a):e.thread.latest_snippet,v=()=>e.thread.done?a("messageHub.reopenNamed",{name:n()}):a("messageHub.markDoneNamed",{name:n()});return(()=>{var L=Ke(),g=L.firstChild,p=g.firstChild,x=p.nextSibling,$=x.firstChild,y=$.firstChild,S=y.nextSibling,w=$.nextSibling,R=w.nextSibling,I=g.nextSibling;return g.$$click=()=>e.onSelect(e.thread.root_note_id),r(p,t(_,{get when(){return e.thread.unread},get children(){return[t(Se,{status:"active",size:"xs"}),(()=>{var o=We();return r(o,()=>a("messageHub.unreadLabel")),o})()]}})),r(g,t(_,{get when(){return e.thread.is_system},get fallback(){return(()=>{var o=Je();return r(o,t(ee,{get name(){return e.thread.latest_author_name},get src(){return e.thread.latest_author_avatar},size:"md",alt:""})),o})()},get children(){return t(B,{})}}),x),r(y,u),r(S,()=>Oe(e.thread.last_activity,te[s()])),r(w,f),r(R,t(_,{get when(){return m()},get children(){return t(K,{get variant(){return e.thread.is_mention?"info":"success"},size:"sm",get children(){return m()}})}}),null),r(R,t(K,{variant:"outline",size:"sm",class:"min-w-0 max-w-full",get children(){var o=Ye();return r(o,n),o}}),null),r(I,t(q,{size:"sm",get label(){return v()},onClick:()=>e.onToggleDone(e.thread.root_note_id,!e.thread.done),get children(){return t(_,{get when(){return e.thread.done},get fallback(){return t(re,{class:"h-4 w-4"})},get children(){return t(ne,{class:"h-4 w-4"})}})}})),D(o=>{var c=e.thread.root_note_id,b=e.thread.unread?"true":"false",k=!!e.thread.unread,T=!e.thread.unread,H=e.thread.last_activity,l=!!e.thread.unread,i=!e.thread.unread;return c!==o.e&&N(g,"data-thread-row",o.e=c),b!==o.t&&N(g,"data-unread",o.t=b),k!==o.a&&y.classList.toggle("font-semibold",o.a=k),T!==o.o&&y.classList.toggle("font-medium",o.o=T),H!==o.i&&N(S,"datetime",o.i=H),l!==o.n&&w.classList.toggle("text-[var(--color-text)]",o.n=l),i!==o.s&&w.classList.toggle("text-[var(--color-text-muted)]",o.s=i),o},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),L})()};oe(["click"]);var Ve=d('<div class="flex gap-3"data-testid=peatch-upsell><div class="max-w-[78%] rounded-[var(--radius-16)] border border-[var(--color-primary-200)] bg-[var(--color-primary-50)] px-4 py-3"><div class="flex items-center gap-2 mb-1.5"><span class="text-[length:var(--text-xs)] font-semibold text-[var(--color-text)]"></span><span class="rounded-[var(--radius-capsule)] bg-[var(--color-primary-600)] px-2 py-0.5 text-[length:var(--text-2xs)] font-bold uppercase tracking-wide text-[var(--color-on-primary)]"></span></div><div class="text-[length:var(--text-sm)] font-semibold text-[var(--color-text)]"></div><p class="mt-1 text-[length:var(--text-sm)] leading-relaxed text-[var(--color-text-muted)]"></p><div class="mt-3 text-[length:var(--text-2xs)] font-semibold uppercase tracking-wide text-[var(--color-text-muted)]"></div><div class="mt-1.5 flex flex-wrap gap-1.5"></div><a class="mt-3 inline-flex items-center gap-2 rounded-[var(--radius-12)] bg-[var(--color-primary-600)] px-4 py-2 text-[length:var(--text-sm)] font-medium text-[var(--color-on-primary)] transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary-500)] focus-visible:ring-offset-2"> â</a><p class="mt-2 text-[length:var(--text-2xs)] leading-relaxed text-[var(--color-text-muted)]">'),Xe=d('<span class="rounded-[var(--radius-capsule)] border border-[var(--color-primary-200)] px-2.5 py-1 text-[length:var(--text-xs)] text-[var(--color-text)]">');const Ze=["messageHub.promo.example1","messageHub.promo.example2","messageHub.promo.example3"],et=()=>{const{t:e}=C(),a=()=>{const s=e("messageHub.promo.mailSubject",{workspace:U.workspace?.name??""});return`mailto:${Te}?subject=${encodeURIComponent(s)}`};return(()=>{var s=Ve(),n=s.firstChild,m=n.firstChild,u=m.firstChild,f=u.nextSibling,v=m.nextSibling,L=v.nextSibling,g=L.nextSibling,p=g.nextSibling,x=p.nextSibling,$=x.firstChild,y=x.nextSibling;return r(s,t(B,{}),n),r(u,()=>e("messageHub.sender.peatch")),r(f,()=>e("messageHub.promo.badge")),r(v,()=>e("messageHub.promo.title")),r(L,()=>e("messageHub.promo.body")),r(g,()=>e("messageHub.promo.examplesLabel")),r(p,t(M,{each:Ze,children:S=>(()=>{var w=Xe();return r(w,()=>e(S)),w})()})),r(x,()=>e("messageHub.promo.cta"),$),r(y,()=>e("messageHub.promo.note")),D(()=>N(x,"href",a())),s})()};var tt=d('<div class="border-t border-[var(--color-border)] px-3 py-3 sm:px-6 sm:py-4">');function rt(e){return e.target_type==="candidate"&&e.candidate_email?`api/hm/notes/mentionable?target_type=candidate&email=${encodeURIComponent(e.candidate_email)}`:`api/hm/notes/mentionable?target_type=interview_session&session_id=${e.session_id??0}`}const at=e=>{const{t:a}=C(),[s]=ce(()=>rt(e.thread),n=>ve(n));return(()=>{var n=tt();return r(n,t(Ce,{get mentionable(){return s()??[]},get onPost(){return e.onReply},get placeholder(){return a("messageHub.reply.placeholder")},get submitLabel(){return a("messageHub.reply.submit")}})),n})()};var Q=d("<span>
1"),nt=d("<span class=font-semibold>@"),lt=d('<div class="flex items-baseline gap-2 text-[length:var(--text-xs)] text-[var(--color-text-muted)]"><span class="font-semibold text-[var(--color-text)]"></span><time>'),st=d('<span class="sr-only sm:not-sr-only">'),it=d('<span class="italic text-[var(--color-text-muted)]">'),ot=d('<div class="mt-5 flex max-w-3xl items-end gap-3"><span class="hidden flex-none sm:block"></span><div class="flex min-w-0 flex-1 flex-col gap-1.5"><div class="text-[length:var(--text-xs)] font-semibold text-[var(--color-text)]">'),ct=d('<p class="mt-5 text-center text-[length:var(--text-xs)] text-[var(--color-text-muted)]">'),dt=d('<div class="w-full max-w-3xl pt-5">'),mt=d('<div class="flex h-full min-h-0 flex-col"><header class="flex items-center gap-3 border-b border-[var(--color-border)] px-3 py-3 sm:px-6"><div class="flex min-w-0 flex-1 flex-col"><h1 tabindex=-1 class="truncate font-[family-name:var(--font-display)] text-[length:var(--text-lg)] leading-snug font-semibold text-[var(--color-text)] focus:outline-none"></h1><a class="inline-flex w-fit items-center gap-1 rounded-[var(--radius-sm)] text-[length:var(--text-sm)] font-medium text-[var(--color-primary-600)] hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary-500)]"></a></div></header><div class="flex flex-1 flex-col overflow-y-auto px-3 py-5 sm:px-6"><ol class="mt-auto flex w-full flex-col gap-5"></ol><div aria-live=polite class=w-full>'),ut=d('<li class="flex w-full max-w-3xl items-end gap-3"><span aria-hidden=true class="hidden flex-none sm:block"></span><div class="flex min-w-0 flex-1 flex-col gap-1.5">');function gt(e){const a={...e.member_names??{}},s=n=>{a[n.author_member_id]=n.author_name};s(e);for(const n of e.replies??[])s(n);return a}const ht=e=>(()=>{var a=Q();return r(a,t(M,{get each(){return Le(e.body,e.lookup)},children:s=>s.kind==="mention"?(()=>{var n=nt();return n.firstChild,r(n,()=>s.name,null),D(m=>{var u=!!e.onFill,f=!e.onFill;return u!==m.e&&n.classList.toggle("underline",m.e=u),f!==m.t&&n.classList.toggle("text-[var(--color-primary-600)]",m.t=f),m},{e:void 0,t:void 0}),n})():(()=>{var n=Q();return r(n,()=>s.value),n})()})),a})(),vt=e=>{const{locale:a}=C();return(()=>{var s=lt(),n=s.firstChild,m=n.nextSibling;return r(n,()=>e.name),r(m,()=>Ue(e.at,te[a()])),D(u=>{var f=!!e.alignEnd,v=e.at;return f!==u.e&&s.classList.toggle("justify-end",u.e=f),v!==u.t&&N(m,"datetime",u.t=v),u},{e:void 0,t:void 0}),s})()},ft=e=>{const{t:a}=C();let s,n;const m=()=>gt(e.thread),u=()=>[e.thread,...e.thread.replies??[]],f=()=>e.thread.is_system&&e.thread.target_type==="interview_session"&&U.workspace!==null&&!U.isFeatureEnabled("peatch_ai_replies"),v=()=>{const g=e.thread;if(g.target_type==="candidate")return e.candidateName||g.candidate_email||a("messageHub.source.candidate");const p=g.position_name,x=g.candidate_email;return p&&x?`${p} (${x})`:p||x||a("messageHub.source.interview")},L=()=>{n&&(n.scrollTop=n.scrollHeight)};return V(()=>s?.focus({preventScroll:!0})),O(X([()=>e.thread.id,()=>u().length,()=>e.thinking],L)),(()=>{var g=mt(),p=g.firstChild,x=p.firstChild,$=x.firstChild,y=$.nextSibling,S=p.nextSibling,w=S.firstChild,R=w.nextSibling;r(p,t(q,{get label(){return a("messageHub.back")},onClick:()=>e.onBack(),get children(){return t(ae,{class:"h-4 w-4"})}}),x);var I=s;typeof I=="function"?G(I,$):s=$,r($,v),r(y,(()=>{var c=P(()=>e.thread.target_type==="candidate");return()=>c()?a("messageHub.viewCandidate"):a("messageHub.viewInterview")})(),null),r(y,t(He,{class:"h-3.5 w-3.5"}),null),r(p,t(fe,{variant:"ghost",size:"sm",class:"max-sm:px-2.5",onClick:()=>e.onToggleDone(),get children(){return[t(_,{get when(){return e.done},get fallback(){return t(re,{class:"h-4 w-4"})},get children(){return t(ne,{class:"h-4 w-4"})}}),(()=>{var c=st();return r(c,(()=>{var b=P(()=>!!e.done);return()=>b()?a("messageHub.markNotDone"):a("messageHub.markDone")})()),c})()]}}),null);var o=n;return typeof o=="function"?G(o,S):n=S,r(w,t(M,{get each(){return u()},children:c=>{const b=()=>!c.is_system&&c.author_member_id===e.meId;return(()=>{var k=ut(),T=k.firstChild,H=T.nextSibling;return r(T,t(_,{get when(){return c.is_system},get fallback(){return t(ee,{get name(){return c.author_name},get src(){return c.author_avatar},size:"md",alt:""})},get children(){return t(B,{})}})),r(H,t(vt,{get name(){return P(()=>!!c.is_system)()?a("messageHub.sender.peatch"):c.author_name},get at(){return c.created_at},get alignEnd(){return b()}}),null),r(H,t(J,{get role(){return b()?"user":"assistant"},get children(){return t(_,{get when(){return P(()=>!!c.is_system)()&&c.system_payload},get fallback(){return t(ht,{get body(){return c.body},get lookup(){return m()},get onFill(){return b()}})},children:l=>ie(l(),a)})}}),null),D(l=>Z(k,{"flex-row-reverse self-end":b()},l)),k})()}})),r(R,t(_,{get when(){return e.thinking},get children(){var c=ot(),b=c.firstChild,k=b.nextSibling,T=k.firstChild;return r(b,t(B,{})),r(T,()=>
1a("messageHub.sender.peatch")),r(k,t(J,{role:"assistant",get children(){var H=it();return r(H,()=>a("messageHub.peatchThinking")),H}}),null),c}}),null),r(R,t(_,{get when(){return e.peatchFailed},get children(){var c=ct();return r(c,()=>a("messageHub.peatchNoReply")),c}}),null),r(S,t(_,{get when(){return f()},get children(){var c=dt();return r(c,t(et,{})),c}}),null),r(g,t(at,{get thread(){return e.thread},get onReply(){return e.onReply}}),null),D(()=>N(y,"href",e.sourceHref)),g})()};var pt=d("<div>"),xt=d("<div class=mb-4>"),bt=d('<ul class="divide-y divide-[var(--color-border)]">');const z=()=>document.getElementById("main-content"),zr=()=>{const{t:e}=C(),a=de(),[s,n]=me(),m=ue(),u=ge(),f=()=>be.state.user?.id??-1,v=()=>{const l=Number(s.thread);return Number.isInteger(l)&&l>0?l:null},L=()=>{const l=v(),i=h.selected();return l!==null&&i?.id===l?i:null},g=()=>{const l=v();return h.threads().find(i=>i.root_note_id===l)},p=()=>g()?.done??!1;let x=0,$=null;const[y,S]=W(!1),[w,R]=W(!1),I=l=>{const i=h.threads(),A=i.findIndex(F=>F.root_note_id===l);return A===-1?null:(i[A+1]??i[A-1])?.root_note_id??null},o=l=>{const i=l===null?null:document.querySelector(`[data-thread-row="${l}"]`);if(i){i.focus({preventScroll:!0}),i.scrollIntoView({block:"nearest"});return}z()?.focus({preventScroll:!0})};V(()=>{h.load("all"),h.refreshUnread();const l=z(),i=()=>{v()===null&&l&&(x=l.scrollTop)};l?.addEventListener("scroll",i,{passive:!0}),Y(()=>l?.removeEventListener("scroll",i))}),Y(()=>h.close()),O(()=>{const l=v();if(l===null){h.selectedRoot()!==null&&h.close();return}l!==h.selectedRoot()&&(R(!1),h.open(l).catch(i=>{v()===l&&(R(pe(i)),n({thread:void 0},{replace:!0}))}))}),O(X(v,(l,i)=>{if(l!==null||i==null)return;S(!0);let A=i;if($!==null){const F=$;$=null,A=I(i),h.markDone(i,F)}requestAnimationFrame(()=>{z()?.scrollTo({top:x}),o(A)})},{defer:!0}));const c=l=>{n({thread:String(l)},{state:{fromHubList:!0}})},b=()=>{if(m.state?.fromHubList){u(-1);return}n({thread:void 0},{replace:!0})},k=(l,i)=>{const A=I(l);h.markDone(l,i),requestAnimationFrame(()=>o(A))},T=()=>{v()!==null&&($=!p(),b())},H=l=>{const i=a.workspaceSlug,F=`notes=open&focusNote=${"root_note_id"in l?l.root_note_id:l.id}`;return l.target_type==="candidate"&&l.candidate_email?`/app/w/${i}/candidates/${encodeURIComponent(l.candidate_email)}?${F}`:`/app/w/${i}/analytics/${l.session_id??""}?${F}`};return t(_e,{get fill(){return v()!==null},get class(){return v()!==null?"pb-4 lg:pb-6":""},get children(){return t(_,{get when(){return v()===null},get fallback(){return t(j,{padded:!1,class:"flex min-h-0 flex-1 flex-col overflow-hidden",get children(){return t(_,{get when(){return L()},get fallback(){return t(ze,{onBack:b})},children:l=>t(ft,{get thread(){return l()},get meId(){return f()},get candidateName(){return g()?.candidate_name??null},get done(){return p()},get sourceHref(){return H(l())},get thinking(){return h.thinking()},get peatchFailed(){return h.peatchFailed()},onReply:i=>h.reply(i),onBack:b,onToggleDone:T})})}})},get children(){return[(()=>{var l=pt();return r(l,t($e,{get title(){return e("messageHub.title")}})),D(i=>Z(l,{"*:animate-none!":y()},i)),l})(),t(_,{get when(){return w()},get children(){return t(xe,{variant:"info",class:"mb-4",get children(){return e("access.notAssigned.message")}})}}),(()=>{var l=xt();return r(l,t(Re,{get active(){return h.filter()},onChange:i=>h.load(i)})),l})(),t(_,{get when(){return!h.loadingList()},get fallback(){return t(j,{padded:!1,class:"overflow-hidden",get children(){return t(je,{})}})},get children(){return t(_,{get when(){return h.threads().length>0},get fallback(){return t(Ae,{get done(){return h.filter()==="done"}})},get children(){return t(j,{padded:!1,class:"overflow-hidden",get children(){var l=bt();return r(l,t(M,{get each(){return h.threads()},children:i=>t(Qe,{thread:i,onSelect:c,onToggleDone:k})})),l}})}})}})]}})}})};export{zr as default}; 2//# sourceMappingURL=MessageHubPage-B4RCVNv4.js.map
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.