PageSourceSearch

https://sabeeorbit.netlify.app/assets/HSInboxesPage-Co5zMrQi.js

js sabeeorbit.netlify.app collected 2026-10-03 11:22:36 UTC 19,348 bytes, 1 lines download raw bytes

1import{cJ as Ke,cN as Qe,cQ as Ze,cW as Je,cn as r,cx as I,c5 as t,Y as Ye,y as Xe,q as et,z as tt,m as st,aw as Se,o as rt,ba as Ce,Q as at,aC as nt}from"./index-BUmD633_.js";import{u as it}from"./useStaticPageHeader-CBvCG2GQ.js";import{S as ot}from"./SearchableSelect--8wvYAeO.js";import{C as lt}from"./ConversationBody-BdYVpKiW.js";import{p as Ee,e as ct}from"./hubspotBodyRenderer-Bq0Oz0EL.js";import{F as dt}from"./FunnelIcon-B_wZr4vI.js";import{f as ut}from"./formatDistanceToNow-BgilRVuC.js";import{p as D}from"./parseISO-9NG3IDfx.js";import{f as Q}from"./format-BcpM71SC.js";import"./SandboxedHtml-B05_Rn6A.js";import"./endOfMonth-C7Kv2Od0.js";const A=50,xt=3e3,Ie=[{id:"all",label:"All emails"},{id:"in",label:"Incoming"},{id:"out",label:"Sent"},{id:"noticket",label:"No ticket"}];function V(s){return s instanceof Error||s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"?s.message:"Failed to load HubSpot emails"}function Z(s){const n=(s||"").toUpperCase();return n==="OUTGOING"||n==="OUTBOUND"}function mt(s){return s.trim().split(/\s+/).map(n=>n.replace(/[^a-zA-Z0-9@_./-]/g,"")).filter(Boolean).join(" ")}function Fe(s,n,i){return n==="unassigned"?s.is("hs_inbox_id",null):n?s.eq("hs_inbox_id",n):i.length===0?s.is("hs_inbox_id",null):s.in("hs_inbox_id",i)}function bt(s){if(!s)return"";const n=ct(s).replace(/\s+/g," ").trim();return n?n.length>88?`${n.slice(0,88)}…`:n:""}function gt(s){return s.hs_thread_id?`t:${s.hs_thread_id}`:`e:${s.id}`}function ft(s){const n=new Set,i=[];for(const l of s){const k=gt(l);n.has(k)||(n.add(k),i.push({key:k,threadId:l.hs_thread_id,latest:l,snippet:bt(l.body)}))}return i}function ht(s,n){const i=(s||n||"?").trim(),l=i.split(/[\s@._-]+/).filter(Boolean);return l.length>=2?(l[0][0]+l[1][0]).toUpperCase():i.slice(0,2).toUpperCase()}function pt(s){const n=["bg-teal-600 text-white","bg-cyan-700 text-white","bg-blue-600 text-white","bg-indigo-600 text-white","bg-slate-600 text-white"];let i=0;for(let l=0;l<s.length;l+=1)i=(i+s.charCodeAt(l))%n.length;return n[i]}function $e(s){var n,i;return Z(s.direction)?((n=s.recipient_emails)==null?void 0:n[0])||s.sender_name||s.sender_email||"Unknown":s.sender_name||s.sender_email||((i=s.recipient_emails)==null?void 0:i[0])||"Unknown"}function yt(s){if(!s)return"";try{return Q(D(s),"d MMM")}catch{return""}}const K=({name:s,email:n,size:i="sm"})=>{const l=n||s||"?",k=i==="md"?"w-9 h-9 text-sm":"w-8 h-8 text-[11px]";return t.jsx("div",{className:`${k} rounded-full flex items-center justify-center font-semibold flex-shrink-0 ${pt(l)}`,"aria-hidden":!0,children:ht(s,n)})},$t=()=>{var we;it("HS Inboxes");const s=Ke(),n=Qe(),{emailId:i}=Ze(),[l,k]=Je(),[J,Y]=r.useState([]),[Te,X]=r.useState(new Map),[Me,ee]=r.useState(!0),[te,B]=r.useState(null),[se,re]=r.useState(0),[$,Re]=r.useState([]),[R,ae]=r.useState(!1),L=r.useMemo(()=>$.map(e=>e.hubspot_id),[$]),[O,Le]=r.useState([]),[ne,Oe]=r.useState(!1),[Ue,ie]=r.useState(!1),[x,oe]=r.useState(l.get("inbox")||""),[_,Ae]=r.useState(l.get("view")||"all"),[w,le]=r.useState(l.get("q")||""),[ce,De]=r.useState(w),[m,H]=r.useState(l.get("from")||""),[j,de]=r.useState(l.get("to")||""),[P,Be]=r.useState(j),[N,ue]=r.useState(l.get("fromDate")||""),[v,xe]=r.useState(l.get("toDate")||""),[S,h]=r.useState(parseInt(l.get("page")||"1",10)||1),[u,T]=r.useState(l.get("sel")||""),[M,F]=r.useState([]),[He,me]=r.useState(!1),[be,q]=r.useState(null),[Pe,G]=r.useState(null),ge=r.useRef(null);r.useEffect(()=>{const e=setTimeout(()=>De(w),300);return()=>clearTimeout(e)},[w]),r.useEffect(()=>{const e=setTimeout(()=>Be(j),300);return()=>clearTimeout(e)},[j]),r.useEffect(()=>{const e=new URLSearchParams;S!==1&&e.set("page",String(S)),x&&e.set("inbox",x),_!=="all"&&e.set("view",_),w&&e.set("q",w),m&&e.set("from",m),j&&e.set("to",j),N&&e.set("fromDate",N),v&&e.set("toDate",v),u&&e.set("sel",u),i||k(e,{replace:!0})},[S,x,_,w,m,j,N,v,u,i,k]),r.useEffect(()=>{let e=!1;return(async()=>{const{data:c,error:a}=await I.from("hubspot_conversation_inboxes").select("hubspot_id, name, type, archived").eq("archived",!1).eq("sync_enabled",!0).order("name",{ascending:!0});if(e)return;if(a){B(V(a)),ae(!0);return}const b=c||[];Re(b),ae(!0);const g=new Set(b.map(d=>d.hubspot_id));oe(d=>d&&d!=="unassigned"&&!g.has(d)?"":d)})(),()=>{e=!0}},[]),r.useEffect(()=>{if(!R)return;let e=!1;return(async()=>{let c=I.from("hubspot_ticket_conversations").select("sender_email").eq("type","EMAIL").not("sender_email","is",null).order("sent_at",{ascending:!1,nullsFirst:!1}).limit(xt);c=Fe(c,x,L);const{data:a}=await c;if(e)return;const b=(a??[]).map(d=>(d.sender_email||"").toLowerCase()).filter(d=>d.length>0),g=[...new Set(b)];g.sort((d,f)=>d.localeCompare(f)),Le(g)})(),()=>{e=!0}},[x,L,R]);const fe=r.useCallback(async()=>
1{if(R){ee(!0),B(null);try{const e=(S-1)*A,c=e+A-1;let a=I.from("hubspot_ticket_conversations").select("id, hubspot_ticket_id, conversation_id, type, direction, sender_name, sender_email, subject, recipient_emails, sent_at, hs_inbox_id, hs_thread_id, body",{count:"estimated"}).eq("type","EMAIL").order("sent_at",{ascending:!1,nullsFirst:!1}).range(e,c);a=Fe(a,x,L);const b=mt(ce);if(b&&(a=a.textSearch("search_vector",b,{type:"plain",config:"simple"})),m.trim()&&(a=a.eq("sender_email",m.trim().toLowerCase())),P.trim()){const C=P.trim().toLowerCase().replace(/[%,"\\{}]/g,"");C&&(a=a.contains("recipient_emails",[C]))}N&&(a=a.gte("sent_at",new Date(N).toISOString())),v&&(a=a.lte("sent_at",new Date(`${v}T23:59:59`).toISOString())),_==="in"?a=a.in("direction",["INCOMING","INBOUND"]):_==="out"?a=a.in("direction",["OUTGOING","OUTBOUND"]):_==="noticket"&&(a=a.is("hubspot_ticket_id",null));const{data:g,error:d,count:f}=await a;if(d)throw d;const y=g||[];Y(y),re(f||0);const je=[...new Set(y.map(C=>C.hubspot_ticket_id).filter(C=>!!C))];if(je.length>0){const{data:C}=await I.from("hubspot_tickets").select("hubspot_id, subject").in("hubspot_id",je),Ne=new Map;for(const ve of C||[])Ne.set(ve.hubspot_id,ve.subject);X(Ne)}else X(new Map)}catch(e){B(V(e)),Y([]),re(0)}finally{ee(!1)}}},[S,x,L,R,_,ce,m,P,N,v]);r.useEffect(()=>{fe()},[fe]);const E=r.useMemo(()=>ft(J),[J]);r.useEffect(()=>{if(i){T(e=>e.startsWith("t:")?e:`e:${i}`);return}!u&&E.length>0&&!s&&T(E[0].key)},[i,E,u,s]);const p=r.useMemo(()=>E.find(e=>e.key===u)||null,[E,u]);r.useEffect(()=>{let e=!1;return(async()=>{if(!u){F([]),G(null);return}me(!0),q(null);const c=p==null?void 0:p.latest,a=p==null?void 0:p.threadId,b=u.startsWith("e:")?u.slice(2):i||(c==null?void 0:c.id);try{if(a){const{data:g,error:d}=await I.from("hubspot_ticket_conversations").select("id, hubspot_ticket_id, conversation_id, type, direction, sender_name, sender_email, subject, recipient_emails, sent_at, hs_inbox_id, hs_thread_id, body, raw_data").eq("type","EMAIL").eq("hs_thread_id",a).order("sent_at",{ascending:!0});if(d)throw d;if(e)return;const f=(g||[]).map(y=>({...y,body:Ee(y.body,y.raw_data)})).filter(y=>!(y.type==="WELCOME_MESSAGE"||y.type==="MESSAGE"&&!(y.body||"").trim()));F(f)}else if(b){const{data:g,error:d}=await I.from("hubspot_ticket_conversations").select("id, hubspot_ticket_id, conversation_id, type, direction, sender_name, sender_email, subject, recipient_emails, sent_at, hs_inbox_id, hs_thread_id, body, raw_data").eq("id",b).maybeSingle();if(d)throw d;if(e)return;if(!g)q("Email not found"),F([]);else{const f=g;if(f.hs_thread_id&&u.startsWith("e:")){T(`t:${f.hs_thread_id}`);return}F([{...f,body:Ee(f.body,f.raw_data)}])}}else F([])}catch(g){e||(q(V(g)),F([]))}finally{e||me(!1)}})(),()=>{e=!0}},[u,p,i]);const o=M[M.length-1]||(p==null?void 0:p.latest)||null;r.useEffect(()=>{let e=!1;const c=o==null?void 0:o.hubspot_ticket_id;if(!c){G(null);return}return(async()=>{const{data:a}=await I.from("hubspot_tickets").select("subject").eq("hubspot_id",c).maybeSingle();e||G((a==null?void 0:a.subject)??null)})(),()=>{e=!0}},[o==null?void 0:o.hubspot_ticket_id]),r.useEffect(()=>{var e;(e=ge.current)==null||e.scrollIntoView({block:"end"})},[M.length]);const W=$.find(e=>e.hubspot_id===x),he=x==="unassigned"?"Unassigned":(W==null?void 0:W.name)||"All inboxes",z=Math.max(1,Math.ceil(se/A)),pe=[w,m,j,N,v].filter(Boolean).length,qe=r.useMemo(()=>m&&!O.includes(m.toLowerCase())?[m.toLowerCase(),...O]:O,[O,m]),U=e=>{oe(e),H(""),h(1),ie(!1),i&&n("/crm-hs-inboxes")},ye=e=>{Ae(e),h(1),i&&n("/crm-hs-inboxes")},Ge=e=>{T(e.key),i&&n(`/crm-hs-inboxes?sel=${encodeURIComponent(e.key)}`)},We=()=>{le(""),H(""),de(""),ue(""),xe(""),h(1)},ze=!!u&&(!s||!!u),Ve=!s||!u,_e=o?$e(o):"Conversation",ke=o?Z(o.direction)&&((we=o.recipient_emails)==null?void 0:we[0])||o.sender_email:null;return t.jsxs("div",{className:"h-full min-h-0 flex bg-white dark:bg-gray-900 overflow-hidden",children:[t.jsxs("aside",{className:`${s?"hidden":"flex"} w-[220px] flex-shrink-0 flex-col border-r border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-950`,children:[t.jsxs("div",{className:"relative z-30 px-3 py-3 border-b border-gray-100 dark:border-gray-800",children:[t.jsxs("button",{type:"button",onClick:()=>ie(e=>!e),className:"w-full flex items-center justify-between gap-2 text-left px-1 py-1 rounded-md hover:bg-gray-50 dark:hover:bg-gray-800",children:[t.jsx("span",{className:"text-sm font-semibold text-gray-900 dark:text-gray-50 truncate",children:he}),t.jsx(Ye,{className:"w-4 h-4 text-gray-400 flex-shrink-0"})]}),Ue&&t.jsxs("div",{className:"absolute z-40 left-2 right-2 mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg max-h-72 overflow-y-auto",children:[t.jsx("button",{type:"button",onClick:()=>U(""),className:`block w-full text-left px-3 py-2 text-sm ${x===""?"bg-gray-100 dark:bg-gray-700 font-medium":"hover:bg-gray-50 dark:hover:bg-gray-700"}`,children:"All inboxes"}),$.map(e=>t.jsx("button",{type:"button",onClick:()=>U(e.hubspot_id),className:`block w-full text-left px-3 py-2 text-sm truncate ${x===e.hubspot_id?"bg-gray-100 dark:bg-gray-700 font-medium":"hover:bg-gray-50 dark:hover:bg-gray-700"}`,children:e.name},e.hubspot_id)),t.jsx("button",{type:"button",onClick:()=>U("unassigned"),className:`block w-full text-left px-3 py-2 text-sm ${x==="unassigned"?"bg-gray-100 dark:bg-gray-700 font-medium":"hover:bg-gray-50 dark:hover:bg-gray-700"}`,children:"Unassigned"})]})]}),t.jsx("nav",{className:"flex-1 overflow-y-auto py-2",children:Ie.map(e=>t.jsx("button",{type:"button",onClick:()=>ye(e.id),className:`w-full flex items-center justify-between px-4 py-2 text-sm ${_===e.id?"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-50 font-medium border-l-2 border-gray-900 dark:border-gray-100":"text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-800 border-l-2 border-transparent"}`,children:e.label},e.id))})]}),Ve&&t.jsxs("section",{className:`${s?"flex-1":"w-[340px] flex-shrink-0"} flex flex-col min-h-0 border-r border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-950`,children:[t.jsxs("div",{className:"px-3 py-2 border-b border-gray-100 dark:border-gray-800 space-y-2",children:[s&&t.jsx("div",{className:"relative",children:t.jsxs("select",{value:x,onChange:e=>U(e.target.value),className:"w-full text-sm font-semibold bg-transparent text-gray-900 dark:text-gray-50 py-1 pr-6",children:[t.jsx("option",{value:"",children:"All inboxes"}),$.map(e=>t.jsx("option",{value:e.hubspot_id,children:e.name},e.hubspot_id)),t.jsx("option",{value:"unassigned",children:"Unassigned"})]})}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("div",{className:"relative flex-1",children:[t.jsx(Xe,{className:"w-4 h-4 absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-400"}),t.jsx("input",{type:"search",placeholder:"Search…",value:w,onChange:e=>{le(e.target.value),h(1)},className:"w-full pl-8 pr-3 py-1.5 text-sm border border-gray-200 dark:border-gray-700 rounded-md bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-gray-100"})]}),t.jsx("button",{type:"button",onClick:()=>Oe(e=>!e),className:`p-1.5 rounded-md ${pe>0||ne?"bg-blue-50 text-blue-700 dark:bg-blue-950/40 dark:text-blue-200":"text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800"}`,"aria-label":"Filters",children:t.jsx(dt,{className:"w-4 h-4"})}),t.jsx("span",{className:"text-xs text-gray-400 whitespace-nowrap",children:"Newest"})]}),s&&t.jsx("div",{className:"flex gap-1 overflow-x-auto",children:Ie.map(e=>t.jsx("button",{type:"button",onClick:()=>ye(e.id),className:`px-2.5 py-1 rounded-full text-[11px] whitespace-nowrap border ${_===e.id?"bg-gray-900 text-white border-gray-900":"border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-300"}`,children:e.label},e.id))}),ne&&t.jsxs("div",{className:"grid grid-cols-1 gap-2 pb-1",children:[t.jsx(ot,{options:qe,value:m,onChange:e=>{H(e),h(1)},placeholder:"All senders",label:"Sent by",isActive:!!m}),t.jsx("input",{type:"text",value:j,onChange:e=>{de(e.target.value),h(1)},placeholder:"Sent to",className:"w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800"}),t.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[t.jsx("input",{type:"date",value:N,onChange:e=>{ue(e.target.value),h(1)},className:"w-full px-2 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800"}
1),t.jsx("input",{type:"date",value:v,onChange:e=>{xe(e.target.value),h(1)},className:"w-full px-2 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800"})]}),pe>0&&t.jsxs("button",{type:"button",onClick:We,className:"inline-flex items-center text-xs text-gray-500",children:[t.jsx(et,{className:"w-3.5 h-3.5 mr-1"}),"Clear filters"]})]})]}),te&&t.jsxs("div",{className:"mx-3 mt-2 bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-300 px-3 py-2 rounded-md text-xs flex items-center",children:[t.jsx(tt,{className:"w-4 h-4 mr-2 flex-shrink-0"}),te]}),t.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:Me?t.jsx("p",{className:"p-6 text-sm text-gray-500",children:"Loading conversations…"}):E.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center p-8 text-center",children:[t.jsx(st,{className:"w-10 h-10 text-gray-300 mb-3"}),t.jsx("p",{className:"text-sm text-gray-500",children:"No emails match these filters."})]}):t.jsx("ul",{children:E.map(e=>{const c=e.latest,a=e.key===u,b=$e(c);return t.jsx("li",{children:t.jsx("button",{type:"button",onClick:()=>Ge(e),className:`w-full text-left px-3 py-3 border-b border-gray-100 dark:border-gray-800 ${a?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-900"}`,children:t.jsxs("div",{className:"flex gap-2.5",children:[t.jsx(K,{name:c.sender_name,email:c.sender_email||b}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex items-start justify-between gap-2",children:[t.jsx("p",{className:"text-sm font-semibold text-gray-900 dark:text-gray-50 truncate",children:b}),t.jsx("span",{className:"text-[11px] text-gray-400 whitespace-nowrap",children:yt(c.sent_at)})]}),t.jsx("p",{className:"text-[13px] text-gray-800 dark:text-gray-200 truncate",children:c.subject||"(no subject)"}),e.snippet&&t.jsx("p",{className:"text-[12px] text-gray-500 dark:text-gray-400 truncate mt-0.5",children:e.snippet})]})]})})},e.key)})})}),se>A&&t.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-t border-gray-100 dark:border-gray-800 text-xs text-gray-500",children:[t.jsxs("button",{type:"button",disabled:S<=1,onClick:()=>h(e=>Math.max(1,e-1)),className:"inline-flex items-center disabled:opacity-40",children:[t.jsx(Se,{className:"w-4 h-4 mr-0.5"}),"Prev"]}),t.jsxs("span",{children:[S," / ",z]}
1),t.jsxs("button",{type:"button",disabled:S>=z,onClick:()=>h(e=>Math.min(z,e+1)),className:"inline-flex items-center disabled:opacity-40",children:["Next",t.jsx(rt,{className:"w-4 h-4 ml-0.5"})]})]})]}),ze&&t.jsxs("section",{className:"flex-1 min-w-0 min-h-0 flex flex-col bg-[#f5f8fa] dark:bg-gray-900",children:[s&&t.jsxs("button",{type:"button",onClick:()=>T(""),className:"flex items-center gap-1 px-3 py-2 text-sm text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-950 border-b border-gray-200 dark:border-gray-800",children:[t.jsx(Se,{className:"w-4 h-4"}),"Inbox"]}),u?He&&M.length===0?t.jsx("p",{className:"p-6 text-sm text-gray-500",children:"Loading conversation…"}):be?t.jsx("div",{className:"p-6 text-sm text-red-600",children:be}):t.jsxs(t.Fragment,{children:[t.jsx("header",{className:"px-5 py-3 bg-white dark:bg-gray-950 border-b border-gray-200 dark:border-gray-800",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx(K,{name:(o==null?void 0:o.sender_name)||_e,email:ke,size:"md"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-semibold text-gray-900 dark:text-gray-50 truncate",children:ke||_e}),t.jsxs("p",{className:"text-xs text-gray-500 truncate",children:[he,o!=null&&o.sent_at?` · Created ${ut(D(o.sent_at),{addSuffix:!0})}`:""]})]}),o&&t.jsx(Ce,{to:`/crm-hs-inboxes/${o.id}`,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200",title:"Open in new tab",children:t.jsx(at,{className:"w-4 h-4"})})]}),o!=null&&o.hubspot_ticket_id?t.jsxs(Ce,{to:`/crm-tickets/${o.hubspot_ticket_id}`,className:"mt-1 inline-flex items-center gap-1 text-xs text-blue-600 dark:text-blue-300 hover:underline",children:[t.jsx(nt,{className:"w-3.5 h-3.5"}),Pe||Te.get(o.hubspot_ticket_id)||o.hubspot_ticket_id]}):t.jsx("p",{className:"mt-1 text-xs text-gray-400",children:"No ticket (inbox only)"})]})]})}),t.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto px-5 py-4 space-y-4",children:[M.map(e=>{const c=Z(e.direction);return t.jsxs("article",{className:"max-w-3xl",children:[e.subject&&t.jsx("p",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-1.5 truncate",children:e.subject}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 shadow-sm px-4 py-3",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(K,{name:e.sender_name,email:e.sender_email}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-50 truncate",children:e.sender_name||e.sender_email||"Unknown"}),t.jsxs("p",{className:"text-[11px] text-gray-400 truncate",children:[c?"To":"From"," ",c?(e.recipient_emails||[]).join(", ")||"—":e.sender_email||"—"]})]})]}),t.jsx("span",{className:"text-[11px] text-gray-400 whitespace-nowrap",children:e.sent_at?Q(D(e.sent_at),"d MMM HH:mm"):""})]}),t.jsx(lt,{body:e.body,type:e.type||"EMAIL"})]}),e.sent_at&&t.jsxs("p",{className:"mt-1 text-[11px] text-gray-400",children:["Sent at ",Q(D(e.sent_at),"HH:mm")]})]},e.id)}),t.jsx("div",{ref:ge})]}),t.jsx("div",{className:"px-5 py-3 bg-white dark:bg-gray-950 border-t border-gray-200 dark:border-gray-800 text-xs text-gray-400",children:"Read-only HubSpot archive. Reply in HubSpot."})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-gray-400",children:"Select a conversation"})]})]})};export{$t 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.