1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b095f716-c465-4e27-995a-e6bfa7864115",e._sentryDebugIdIdentifier="sentry-dbid-b095f716-c465-4e27-995a-e6bfa7864115")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7333],{42270:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/inbox/letters/[id]",function(){return n(6298)}])},86913:function(e,t,n){"use strict";n.d(t,{g:function(){return l}});let l=e=>{switch(e){case!0:return{labelKey:"read",labelColor:"signal_green"};case!1:return{labelKey:"unread",labelColor:"signal_red"}}}},57739:function(e,t,n){"use strict";n.d(t,{S:function(){return A}});var l=n(85893),i=n(67294),r=n(11163),o=n(33934),a=n(76383),d=n(28541),s=n(22790),u=n(79796),c=n(60667),v=n(64359),h=n(14286),p=n(81058),m=n(30621),b=n(2748),f=n(94481),g=n(94673),y=n(73730),x=n(67622),j=n(34801),w=n(94059),_=n(57946),T=n(589),I=n(73949),C=n(86913),S=n(22393),E=n(581),Z=n(69267),k=n(53252),D=n(55757),N=n(39092),L=n(41633),B=n(1162),R=n(73650);let A=e=>{let{htmlContent:t}=e,n=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(n.current){let e=n.current.shadowRoot;e||(e=n.current.attachShadow({mode:"open"})),e.innerHTML=t}},[t]),(0,l.jsx)("div",{ref:n})};t.Z=()=>{var e,t,n,O;let Y=(0,w.rc)(),{companyData:q,userData:K,hasPrivate:M,hasEF:U}=(0,R.E)(),F=null==q?void 0:q.find(e=>e.businessId===(null==K?void 0:K.customer_id)),W=(null==F?void 0:F.orgType)==="E"&&(null==F?void 0:F.accountStatus)==="ACTIVE"&&(null==K?void 0:K.ssn)===(null==F?void 0:F.orgNumber),{t:X}=(0,a.$G)(["common","documents"]),{TABS:G}=(0,T.p)(),P=(0,r.useRouter)(),Q="sv"===P.locale,{id:z,page:H,categoryId:V}=P.query,$=(0,j.Z)(1024),[J,ee]=(0,i.useState)(P.query["active-tab"]||G.INBOX.key);(0,i.useEffect)(()=>{d.Tu.workerSrc=(0,D.Z)()});let{data:et,isLoading:en,isError:el}=(0,o.a)({queryKey:[k.U.letter,z],queryFn:async()=>{let{data:e}=await (0,s.so)(z);return e},enabled:!!z,refetchOnWindowFocus:!1}),{label:ei,key:er}=(0,I.W)(G.INBOX.key),eo=(null==et?void 0:et.supplier)||(null==et?void 0:et.sender)||X("documents:selfUploaded");if(en)return null;if(el)return(0,l.jsx)(p.Z,{});let ea=(0,C.g)(!!(null==et?void 0:et.isRead)),ed={read:X("documents:read"),unread:X("documents:unread")},es=(0,y.nq)({filepath:null==et?void 0:null===(e=et.attachments[0])||void 0===e?void 0:e.filepath,contentType:null==et?void 0:null===(t=et.attachments[0])||void 0===t?void 0:t.contentType,hasAttachments:Array.isArray(null==et?void 0:et.attachments)&&(null==et?void 0:et.attachments.length)>0,documentSource:null==et?void 0:et.documentSource});return(0,l.jsx)(L.i,{children:(0,l.jsx)(B.Z,{children:(0,l.jsxs)(x.Z,{type:w.u0.letter,tabs:G,activeTab:J,setActiveTab:ee,children:[(0,l.jsx)(N.Z,{titleTranslationKey:"singleLetterPageTitle"}),(0,l.jsx)(g.b,{items:[{label:ei,path:"".concat(_.QY.Letters,"?active-tab=").concat(er,"&page=").concat(H||"1","&supplierId=&categoryId=")},...(null==et?void 0:et.supplier)&&er===G.SENDERS.key?[{label:null==et?void 0:et.supplier,path:"".concat(_.QY.Letters,"?active-tab=").concat(er,"&supplierId=").concat(null==et?void 0:et.supplierId,"&categoryId=").concat(V||"")}]:(null==et?void 0:et.labels[0])&&er===G.CATEGORIES.key?[{label:null==et?void 0:et.labels[0].labelName,path:"".concat(_.QY.Letters,"?active-tab=").concat(er,"&labelId=").concat(null==et?void 0:et.labels[0].labelId)}]:[],{label:null!==(n=null==et?void 0:et.title)&&void 0!==n?n:""}]}),(0,l.jsxs)(E.kD,{children:[(0,l.jsxs)(E.Fq,{children:[(null==et?void 0:et.diggBodyText)&&!$&&(0,l.jsx)(E.ev,{children:(0,l.jsx)(A,{htmlContent:null==et?void 0:et.diggBodyText})}),es]}),(0,l.jsxs)(E.jr,{flexDirection:"column",children:[(0,l.jsxs)(E.Ez,{height:"auto",width:"37.2rem",columnDirection:!0,padding:"1.6rem 2rem",children:[(0,l.jsxs)(h.Z,{gap:"1.3rem",withBottomBorder:!0,padding:"0 0 1.6rem",margin:"0",direction:"row",alignItems:"center",children:[(0,l.jsx)(c.Z,{isSelfUpload:(null==et?void 0:et.documentSource)===b.z,logoUrl:null==et?void 0:et.supplierLogoUrl,textToAbbreviate:(null==et?void 0:et.title)||(null==et?void 0:et.supplier)}
1),(0,l.jsxs)(u.k.Container,{flexDirection:"column",justifyContent:"space-between",gap:"0.4rem",width:"100%",children:[(0,l.jsx)(Z.Tb,{variant2:"small-title",children:null==et?void 0:et.title}),(0,l.jsx)(v.Z,{variant2:"body",color:"ui_medium_emphasis",children:eo})]})]}),(0,l.jsx)(h.Z,{direction:"row",margin:"0",padding:"1.6rem 0 0 0",justifyContent:"space-between",alignItems:"center",children:(0,l.jsxs)(u.k.Container,{justifyContent:"center",alignItems:"center",width:"100%",children:[(0,l.jsxs)(u.k.Container,{width:"90%",gap:"1.2rem",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",children:[(0,l.jsx)(Z.MR,{readStatus:null==ea?void 0:ea.labelKey,children:(0,l.jsx)(v.Z,{variant2:"body",color:null==ea?void 0:ea.labelColor,fontWeight:700,children:ed[null==ea?void 0:ea.labelKey].toUpperCase()})}),(0,l.jsxs)(u.k.Container,{justifyContent:"flex-start",gap:"0.8rem",flexWrap:"wrap",children:[(0,l.jsx)(v.Z,{variant2:"large-button-text",color:"ui_medium_emphasis",style:{marginTop:"0.2rem"},children:"".concat(X("documents:received")," ")}),(0,l.jsx)(v.Z,{variant2:"large-button-text",color:"ui_medium_emphasis",style:{marginTop:"0.2rem"},children:(0,S.mh)(null!==(O=null==et?void 0:et.created)&&void 0!==O?O:null,"MMM D YYYY",Q)})]})]}),(0,l.jsx)(f.Z,{labels:null==et?void 0:et.labels,documentType:w.u0.letter})]})})]}),(null==et?void 0:et.diggBodyText)&&$&&(0,l.jsx)(E.ev,{children:(0,l.jsx)(A,{htmlContent:null==et?void 0:et.diggBodyText})}),(0,l.jsx)(m.Z,{id:z,data:et,isDocumentDataLoading:en,isError:el,actionMenuOptions:{changeLetterStatus:!0,changeInvoiceStatus:!1,downLoad:!0,archive:!0,delete:!0,restore:!1,changeInvoiceReadStatus:!1,transferFile:(!Y||W)&&U&&M}})]})]})]})})})}},6298:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return i}});var l=n(57739),i=!0;t.default=l.Z}},function(e){e.O(0,[60,8967,4559,2888,9774,179],function(){return e(e.s=42270)}),_N_E=e.O()}]);
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.