"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7185],{97185:(e,t,n)=>{n.d(t,{buildMdnMessage:()=>l});let i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function a(e){let t=new TextEncoder().encode(e),n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}function o(e){return/[^\x00-\x7F]/.test(e)?`=?UTF-8?B?${a(e)}?=`:e}function s(){let e=Math.random().toString(36).slice(2);return`${Date.now().toString(36)}.${e}`}function l(e){let t=e.originalRecipient||e.fromEmail,n=(e.fromEmail.split("@")[1]||"localhost").trim(),l=`<mdn.${s()}@${n}>`,u=`----=_MDN_${s()}`,c=function(e){let t=Array.isArray(e)?e[0]:e;if("string"!=typeof t)return"";let n=t.trim();return n?n.startsWith("<")?n:`<${n}>`:""}(e.originalMessageId),g=e.fromName?`${o(e.fromName)} <${e.fromEmail}>`:e.fromEmail,p=o(e.subject??`Read: ${e.originalSubject||""}`.trim()),$=e.automatic?"automatic-action/MDN-sent-automatically; displayed":"manual-action/MDN-sent-manually; displayed",m=e.reportingUa||`${n}; Bulwark Webmail`,d=e.humanText??`This is a return receipt for the message you sent to ${t}.\r
\r
Note: This receipt only acknowledges that the message was displayed on the\r
recipient's computer. There is no guarantee that the recipient has read or\r
understood the message contents.`,f=[`Reporting-UA: ${m}`,`Final-Recipient: rfc822;${t}`,...e.originalRecipient?[`Original-Recipient: rfc822;${e.originalRecipient}`]:[],...c?[`Original-Message-ID: ${c}`]:[],`Disposition: ${$}`].join("\r\n");return[`Date: ${function(e=new Date){let t=e=>String(e).padStart(2,"0");return`${i[e.getUTCDay()]}, ${t(e.getUTCDate())} ${r[e.getUTCMonth()]} ${e.getUTCFullYear()} ${t(e.getUTCHours())}:${t(e.getUTCMinutes())}:${t(e.getUTCSeconds())} +0000`}()}`,`From: ${g}`,`To: ${e.to}`,`Subject: ${p}`,`Message-ID: ${l}`,...c?[`In-Reply-To: ${c}`]:[],"MIME-Version: 1.0","Content-Type: multipart/report; report-type=disposition-notification;",`	boundary="${u}"`,"",`--${u}`,"Content-Type: text/plain; charset=utf-8","Content-Transfer-Encoding: base64","",(a(d).match(/.{1,76}/g)||[]).join("\r\n"),"",`--${u}`,"Content-Type: message/disposition-notification","Content-Transfer-Encoding: 7bit","",f,"",`--${u}--`,""].join("\r\n")}}}]);