1import{j as t,F as m,T as i,a0 as x,Z as y,k as u}from"./chakra.CNo8-LAt.js";import{c as T,b as _}from"./partnerSettingsMatch.CeNsCB3v.js";import{a as f}from"./emotion.DwsOS3er.js";import{P as k}from"./index.CV3ljN9_.js";import{c as Y,e as C,d as D,b6 as N,b7 as P}from"./index.BTIn1CTQ.js";import{r as e,d}from"./alicia.B0Mu1pxX.js";import"./forms.BKkyutuO.js";import"./formatPrice.Dsfe_nD6.js";import"./currency-symbol-map.CtHp7l9E.js";import"./framer.C7ABESK6.js";import"./dialog.BY_pIDGk.js";import"./modal-content-wrapper.CO3a-3qt.js";import"./index.DeNWp4ad.js";import"./index.Dd5rojvF.js";import"./sanitize.6Zl4IpWR.js";import"./sentry.TqamEh5Y.js";import"./lodash.DlBJHpcm.js";import"./posthog.Dw1T_2oi.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="605e1166-e8dd-4557-ad44-17768da6fccb",r._sentryDebugIdIdentifier="sentry-dbid-605e1166-e8dd-4557-ad44-17768da6fccb")}catch{}})();const X=()=>{const r=Y(),{t:a,i18n:p}=T(),{setTitle:j}=C(),{getColor:l}=D(),w=_(),{emails:g,setEmails:E}=N(),[I,h]=f.useState(!0),S=async()=>{try{h(!0);const o=await P();E(o)}catch(o){w({title:String(o),type:"error"})}finally{h(!1)}};f.useEffect(()=>{S()},[]),f.useEffect(()=>{j(a("pageTitles.inbox"))},[p.language]);const b=(o=>{const s={};return o.forEach(n=>{const c=d(n.date_sent).format("YYYY");s[c]||(s[c]=[]),s[c].push(n)}),s})(g),v=Object.keys(b).sort((o,s)=>Number(s)-Number(o));return t.jsx(m,{w:"100%",h:"100%",children:t.jsx(k,{showCart:!1,showSteps:!1,showHeaderNav:!0,showLeftNav:!0,children:t.jsxs(m,{mb:e(200),direction:"column",gap:e(16),children:[t.jsx(i,{as:"h1",fontSize:e(48),lineHeight:e(52),fontWeight:"bold",color:l("text"),children:a("userPages.myInbox.title")}),t.jsx(i,{fontSize:e(18),lineHeight:e(24),color:l("text"),maxW:["100%","100%","100%","50%"],children:a("userPages.myInbox.description")}),t.jsx(x,{w:"full",pb:e(50),children:I?t.jsxs(m,{"data-testid":"inbox-loading",mt:e(24),gap:e(16),h:"100%",direction:"column",children:[t.jsx(y,{loading:!0,height:e(50),width:e(100)}),t.jsx(y,{loading:!0,height:e(500),width:"100%"})]}):g.length?v.map(o=>t.jsxs(u,{children:[t.jsx(i,{as:"h2",fontSize:e(32),fontWeight:"bold",mt:e(24),mb:e(8),children:o}),t.jsx(x,{gap:e(8),mb:e(20),children:b[o].sort((s,n)=>d(n.date_sent).valueOf()-d(s.date_sent).valueOf()).map(s=>t.jsxs(u,{"data-testid":"inbox-email-item",bg:"#B5C9FF",p:e(16),rounded:"lg",_hover:{bg:l("background-card")},display:"flex",justifyContent:"space-between",onClick:()=>r(`/user/inbox/${s.id}`),cursor:"pointer",children:[t.jsx(i,{children:s.subject}),t.jsx(i,{children:d(s.date_sent).format("DD MMM")})]},s.id))})]},o)):t.jsx(u,{"data-testid":"inbox-empty",mt:2,children:a("userPages.myInbox.noItems")})})]})})})};export{X 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.