@remit/web-client-dist 0.0.568 → 0.0.570
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{BriefPane-De-DAjhl.js → BriefPane-XC-tKwAK.js} +1 -1
- package/assets/{CalendarComposePane-BeE93M6P.js → CalendarComposePane-DLEtK17V.js} +1 -1
- package/assets/{CalendarComposeSeed-DT6zkzsS.js → CalendarComposeSeed-C3NOqPd_.js} +1 -1
- package/assets/{CalendarShell-D9YAY2VX.js → CalendarShell-ltoidhfo.js} +1 -1
- package/assets/{EmptyState-Dxkpw01s.js → EmptyState-dxrslxcn.js} +1 -1
- package/assets/{ErrorState-i4wZuDi0.js → ErrorState-BbBYoDqJ.js} +1 -1
- package/assets/{FlaggedPane-up9rEFn0.js → FlaggedPane-BoA0y3TO.js} +1 -1
- package/assets/{FullCompose-PrOIUtTb.js → FullCompose-DT4cH5sJ.js} +1 -1
- package/assets/{MailListHeader-CGTCa2hn.js → MailListHeader-DGZBTAxU.js} +2 -2
- package/assets/{MailNav-D06JCnwz.js → MailNav-KJ1uPLNk.js} +1 -1
- package/assets/{MailShell-D-CrYeRX.js → MailShell-B9TC9bBx.js} +1 -1
- package/assets/{MailViewChrome-BBxhML8f.js → MailViewChrome-ft-e0TYX.js} +1 -1
- package/assets/{MailboxPane-IjpTfp7f.js → MailboxPane-BIV8pGpk.js} +1 -1
- package/assets/{NavMenuButton-D-n0ApzZ.js → NavMenuButton-D2udmQF1.js} +1 -1
- package/assets/{OnboardingWizard-B_UeIfRq.js → OnboardingWizard-BTfQ7o6M.js} +1 -1
- package/assets/{OpenCalendarEvent-Drx3K8mz.js → OpenCalendarEvent-ONOtQrC9.js} +1 -1
- package/assets/{OutboxPane-DiKqzDea.js → OutboxPane-sCpFHeIP.js} +1 -1
- package/assets/_calendarObjectId-Cy89pJgh.js +1 -0
- package/assets/_mailboxId-E5Y9SiAa.js +1 -0
- package/assets/_messageId-CpxXWqrB.js +1 -0
- package/assets/_messageId-DPrfbJ4h.js +1 -0
- package/assets/_messageId-DY6-I3Th.js +1 -0
- package/assets/_outboxMessageId-DaqX0WtJ.js +1 -0
- package/assets/_recurrenceId-Bv5BvELP.js +1 -0
- package/assets/_threadId-BC7gEbP1.js +1 -0
- package/assets/_threadId-C5e7iZMt.js +1 -0
- package/assets/_threadId-CKFscbDG.js +1 -0
- package/assets/{_view._date-ByTBLtHG.js → _view._date-DR11ml_3.js} +1 -1
- package/assets/{accounts-BoaasV7l.js → accounts-D9nJPykS.js} +1 -1
- package/assets/{advanced-CmWX1xAw.js → advanced-DTAzqoJY.js} +1 -1
- package/assets/{appearance-Gnz3bPeK.js → appearance-j7nRhASu.js} +1 -1
- package/assets/{attachment-file-Chu-2Nf4.js → attachment-file-D1CABsD4.js} +1 -1
- package/assets/{attendee-row-GCOl9CSt.js → attendee-row-D8WAgWfR.js} +1 -1
- package/assets/{avatar-BIJccDrR.js → avatar-B-Jdod5y.js} +1 -1
- package/assets/{bottom-sheet-DD3IwRYs.js → bottom-sheet-Byghy45z.js} +1 -1
- package/assets/brief-C7u393cN.js +1 -0
- package/assets/{brief-C-BXrYC3.js → brief-_Fewnep1.js} +1 -1
- package/assets/{browser-ponyfill-BTTjV0XJ.js → browser-ponyfill-Dg07f7Cw.js} +1 -1
- package/assets/{bug-oH9Zn_Oq.js → bug-CMk8egTQ.js} +1 -1
- package/assets/{calendar-C_BJMKxL.js → calendar-Cbu8NAh3.js} +1 -1
- package/assets/{calendar-color-DJKpK5br.js → calendar-color-CoVToffA.js} +1 -1
- package/assets/{calendar-event-chip-D4SiEFwB.js → calendar-event-chip-CceLO1qb.js} +1 -1
- package/assets/{calendars-BiMjOKGs.js → calendars-CsAQMHyw.js} +1 -1
- package/assets/{card-DArqjjyQ.js → card-BhKt59AV.js} +1 -1
- package/assets/chevron-left-CinSrsr-.js +1 -0
- package/assets/{circle-check-4H3bfTaV.js → circle-check-DUFSP6Gb.js} +1 -1
- package/assets/{circle-check-big-BZqF2TzE.js → circle-check-big-6lhjfOMe.js} +1 -1
- package/assets/{circle-help-6Z8BzR4J.js → circle-help-D8mcr-KW.js} +1 -1
- package/assets/{clock-BPYem3Ta.js → clock-DZ60YfeC.js} +1 -1
- package/assets/compose._-_outboxMessageId_-B2qOjIk7.js +1 -0
- package/assets/compose._-_outboxMessageId_-CCNDGXrI.js +1 -0
- package/assets/compose._-_outboxMessageId_-Diqag_bx.js +1 -0
- package/assets/compose._-_outboxMessageId_-nu9iYBHx.js +1 -0
- package/assets/{config-import-7gVWR7RW.js → config-import--708QjqI.js} +1 -1
- package/assets/{confirm-dialog-DvkCt72n.js → confirm-dialog-CmDtIFBh.js} +1 -1
- package/assets/{copy-BmhBEBER.js → copy-Cqd4i4D-.js} +1 -1
- package/assets/{credential-steps-iwYk1CZH.js → credential-steps-DyYyDhB1.js} +1 -1
- package/assets/{download-Dayqeqw-.js → download-DKanDVdl.js} +1 -1
- package/assets/{file-json-CQMSPFCG.js → file-json-D6WOUKll.js} +1 -1
- package/assets/{filters-CyMmSbhx.js → filters-AlbkauLd.js} +1 -1
- package/assets/flagged-D1JhBkBx.js +1 -0
- package/assets/{flagged-GVA7uI-V.js → flagged-ceyucBNg.js} +1 -1
- package/assets/{folders-bODgDL7f.js → folders-CMQ3H7h9.js} +1 -1
- package/assets/{help-copy-B8u1jNy9.js → help-copy-D4CxuX7I.js} +1 -1
- package/assets/{import-Bke_zyrV.js → import-B-fgHzXU.js} +1 -1
- package/assets/{index-B_g7_yKS.js → index-3hHGDIWI.js} +4 -4
- package/assets/index-B50ZhLt1.js +1 -0
- package/assets/index-C9kNc4Vs.js +1 -0
- package/assets/index-CYFkstCB.js +1 -0
- package/assets/{index-U1tWIcsb.js → index-CiDSM8LB.js} +1 -1
- package/assets/index-CpxXWqrB.js +1 -0
- package/assets/{index-B5lviCgZ.js → index-D2fhGpzy.js} +4 -4
- package/assets/index-D8R33o3j.js +1 -0
- package/assets/index-DLcuA6m1.js +1 -0
- package/assets/index-DWisBpd2.js +1 -0
- package/assets/index-DY6-I3Th.js +1 -0
- package/assets/index-Dpi4AnXl.js +1 -0
- package/assets/{kbd-CxLbnV1r.js → kbd-CP2U5kDR.js} +1 -1
- package/assets/{labels-CbH7E1Bp.js → labels-Q0ps2PHe.js} +1 -1
- package/assets/{mail-D-yNLDcN.js → mail-BSEZvuZz.js} +1 -1
- package/assets/{mail-3wxGcCCf.js → mail-CN3zCGaG.js} +1 -1
- package/assets/{map-pin-DVZsQzCD.js → map-pin-Dv8Zk4-b.js} +1 -1
- package/assets/{menu-Dab43Apc.js → menu-rYjmQNkP.js} +1 -1
- package/assets/{new-C_KgRHMe.js → new-Tb7alUcn.js} +1 -1
- package/assets/onboarding-BjLNeilL.js +1 -0
- package/assets/{onboarding-completion-BSvLNx0w.js → onboarding-completion-D3XdWEju.js} +1 -1
- package/assets/outbox-BgPvM8n_.js +1 -0
- package/assets/{pencil-B7hr7Ewl.js → pencil-CADFeyHa.js} +1 -1
- package/assets/{refresh-cw-BEaKSXud.js → refresh-cw-VZer4aPE.js} +1 -1
- package/assets/{rich-text-DVO8JAiv.js → rich-text-Dx2lQcAy.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-B1d3SPy5.js → rich-text-spellcheck-worker-provider-DIeOnt3b.js} +1 -1
- package/assets/{rotate-ccw-BghNW0Cb.js → rotate-ccw-DXUSLddD.js} +1 -1
- package/assets/{roving-focus-C51tV1Ry.js → roving-focus-g46bjSnj.js} +1 -1
- package/assets/{row-actions-7OdWgNil.js → row-actions-DJe1-dFi.js} +1 -1
- package/assets/{search-mirror-D98DP_Vi.js → search-mirror-Lzv9SQKw.js} +1 -1
- package/assets/{search-token-index-Bo4nLqUU.js → search-token-index-Bl0q6Tm7.js} +1 -1
- package/assets/{sections-D6zYYPPA.js → sections-C13P8cD3.js} +1 -1
- package/assets/{senders-D9KoCeNN.js → senders-DOQ6Yo9P.js} +1 -1
- package/assets/settings-DVrCVVwi.js +1 -0
- package/assets/{settings-screen-YloFfa98.js → settings-screen-BuIMWJDs.js} +1 -1
- package/assets/{shield-check-B3oZ5BY0.js → shield-check-BrZP1WNT.js} +1 -1
- package/assets/{suggested-vips-Dvjyl1GU.js → suggested-vips-Do-GRHLL.js} +1 -1
- package/assets/{useCalendarData-D8r9PCex.js → useCalendarData-DaqE6ZuQ.js} +1 -1
- package/assets/{useCalendars-BQVp6bQc.js → useCalendars-DClCZnuV.js} +1 -1
- package/assets/{useDebouncedValue-BtvB3JSG.js → useDebouncedValue-SCyifByH.js} +1 -1
- package/assets/{useFilters-CDMvFcQ4.js → useFilters-By61gJdy.js} +1 -1
- package/assets/{useLabels-2MHDpLPE.js → useLabels-D0pazLEp.js} +1 -1
- package/assets/{useLayoutTier-GgdsrsTh.js → useLayoutTier-CHeoC8Mn.js} +1 -1
- package/assets/{useMessageBodyContent-Cl45Pefn.js → useMessageBodyContent-BCL_0B5Z.js} +1 -1
- package/assets/{useQueries-R8ywGA5H.js → useQueries-BrPkvY6f.js} +1 -1
- package/assets/{useRefreshControl-CQUM8maG.js → useRefreshControl-DiJ5lR9W.js} +1 -1
- package/assets/{useResultFolderIndex-DTBDHRdM.js → useResultFolderIndex-CF04AClm.js} +1 -1
- package/assets/useSearchTokenContext-DtlsV91o.js +84 -0
- package/assets/{useSemanticSearch-BLtRsTX2.js → useSemanticSearch-QAW84IKY.js} +1 -1
- package/assets/{useSignature-CrNY6J3D.js → useSignature-C_Kqp4Jk.js} +1 -1
- package/assets/{window-BlRVSsTw.js → window-ci4hvX-n.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/assets/_calendarObjectId-DN1wiJ0_.js +0 -1
- package/assets/_mailboxId-B_66YFld.js +0 -1
- package/assets/_messageId-3TzQLNx6.js +0 -1
- package/assets/_messageId-C17NNXY0.js +0 -1
- package/assets/_messageId-yVX0skYs.js +0 -1
- package/assets/_outboxMessageId-C9ZWuuGd.js +0 -1
- package/assets/_recurrenceId-Bbm3pgbG.js +0 -1
- package/assets/_threadId-D6dy9S5w.js +0 -1
- package/assets/_threadId-DVR1JYBC.js +0 -1
- package/assets/_threadId-yUNsfmmv.js +0 -1
- package/assets/brief-BzRqNW6D.js +0 -1
- package/assets/chevron-left-CNK3FBEm.js +0 -1
- package/assets/compose._-_outboxMessageId_-4KhvLP82.js +0 -1
- package/assets/compose._-_outboxMessageId_-B3UY6KO4.js +0 -1
- package/assets/compose._-_outboxMessageId_-CIITY2Nl.js +0 -1
- package/assets/compose._-_outboxMessageId_-DOAFgblW.js +0 -1
- package/assets/flagged-CCf6esRP.js +0 -1
- package/assets/index-3TzQLNx6.js +0 -1
- package/assets/index-B19nQ_jY.js +0 -1
- package/assets/index-BHd5xbMt.js +0 -1
- package/assets/index-CR5ACWgB.js +0 -1
- package/assets/index-CtLgQagd.js +0 -1
- package/assets/index-DbMz0mS2.js +0 -1
- package/assets/index-Dnjo9nOg.js +0 -1
- package/assets/index-Pr0WSyqU.js +0 -1
- package/assets/index-yVX0skYs.js +0 -1
- package/assets/onboarding-AwVH_lB3.js +0 -1
- package/assets/outbox-ynbaQaP_.js +0 -1
- package/assets/settings-BZ-1ys9j.js +0 -1
- package/assets/useSearchTokenContext-Dy8wpike.js +0 -84
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{cq as Y,r as h,j as a,t as b,I as X,h as Z,au as J,i as ee,aw as te,cG as se,bP as re,ac as ne,a0 as ae,X as oe,c$ as _,d0 as $,C as ie,ck as ce}from"./index-3hHGDIWI.js";import{K as A}from"./kbd-CP2U5kDR.js";import{B as le,b as de}from"./useMessageBodyContent-BCL_0B5Z.js";import{i as ue}from"./search-scope-B5-OK3Cq.js";const me=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},fe=()=>`
|
|
2
|
+
/* Zero the UA default body margin and clamp the document to the iframe width so
|
|
3
|
+
wide author markup can't push the body (and the page) past the viewport. */
|
|
4
|
+
html, body {
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
}
|
|
9
|
+
body {
|
|
10
|
+
overflow-wrap: anywhere;
|
|
11
|
+
word-break: break-word;
|
|
12
|
+
}
|
|
13
|
+
/* Media never wider than the frame; keep aspect ratio when width is capped. */
|
|
14
|
+
img, video, iframe, svg, canvas {
|
|
15
|
+
max-width: 100% !important;
|
|
16
|
+
height: auto;
|
|
17
|
+
}
|
|
18
|
+
/* Fixed-width author tables (\`<table width="600">\`) collapse to fit. */
|
|
19
|
+
table {
|
|
20
|
+
max-width: 100% !important;
|
|
21
|
+
table-layout: auto;
|
|
22
|
+
}
|
|
23
|
+
/* Cells carry the fixed widths in real newsletters (\`<td width="600">\`);
|
|
24
|
+
cap them too or the table can't actually shrink. */
|
|
25
|
+
td, th {
|
|
26
|
+
max-width: 100% !important;
|
|
27
|
+
}
|
|
28
|
+
/* \`max-width\` alone can't beat an inline \`min-width\`; zeroing the min lets
|
|
29
|
+
flex / grid / table children actually collapse to the clamped width. */
|
|
30
|
+
* {
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
/* An author \`nowrap\` assumes a viewport as wide as the line. The frame is the
|
|
34
|
+
pane's width whatever the mail is, so a pinned paragraph turns reading one
|
|
35
|
+
sentence into a sideways drag — and inside an author \`overflow:hidden\` it is
|
|
36
|
+
cut mid-character with nothing left to scroll at all. Flowing text wraps. The
|
|
37
|
+
\`i\` flag is load-bearing: Outlook and older generators emit \`WHITE-SPACE:
|
|
38
|
+
NOWRAP\`, and an attribute value match is case-sensitive without it. */
|
|
39
|
+
[nowrap]:not(pre, code, pre *, code *),
|
|
40
|
+
[style*="nowrap" i]:not(pre, code, pre *, code *) {
|
|
41
|
+
white-space: normal !important;
|
|
42
|
+
}
|
|
43
|
+
/* Long unbroken strings (URLs, tokens) wrap instead of forcing a wide line. */
|
|
44
|
+
pre, code {
|
|
45
|
+
white-space: pre-wrap;
|
|
46
|
+
overflow-wrap: anywhere;
|
|
47
|
+
word-break: break-word;
|
|
48
|
+
}
|
|
49
|
+
/* Preformatted text keeps its spacing even where a nowrap is declared — on the
|
|
50
|
+
block or on a span inside it. \`normal\` would collapse the runs of spaces that
|
|
51
|
+
are the entire content of a \`pre\`, and the un-important rule above cannot
|
|
52
|
+
defend an inline style, so this wraps to \`pre-wrap\` instead of unwrapping. */
|
|
53
|
+
:is(pre, code, pre *, code *):is([nowrap], [style*="nowrap" i]) {
|
|
54
|
+
white-space: pre-wrap !important;
|
|
55
|
+
}
|
|
56
|
+
`,he=e=>{const t=new Map;for(const s of e){if(!s.contentId||s.contentUrl.length===0)continue;const r=s.contentId.replace(/^<|>$/g,"");t.set(r,s.contentUrl)}return s=>t.get(s.replace(/^<|>$/g,""))},ge=/^(none|transparent|inherit|initial|unset)\s*$/i,I=e=>{const t=[],s=/<style[^>]*>([\s\S]*?)<\/style>/gi;let r;for(r=s.exec(e);r!==null;)t.push(r[1]),r=s.exec(e);return t},pe=e=>{const t=/background(?:-color)?\s*:\s*([^;}\n]+)/gi;let s;for(s=t.exec(e);s!==null;){const r=s[1].trim();if(!ge.test(r))return!0;s=t.exec(e)}return!1},be=e=>{if(/\bstyle\s*=\s*["'][^"']*background/i.test(e)||/\bbgcolor\s*=/i.test(e))return!0;for(const t of I(e))if(pe(t))return!0;return!1},ye=new Set(["auto","none","initial","inherit","unset","revert","revert-layer"]),xe=new RegExp(`(?<![-\\w])(?:padding|margin)(?:-(top|right|bottom|left|block|inline)(?:-(?:start|end))?)?\\s*:\\s*([^;}"']+)`,"gi"),we=new Set(["top","bottom","block"]),B=e=>e.replace(/\/\*[\s\S]*?\*\//g,""),N=e=>{const t=e.toLowerCase();if(!t||ye.has(t)||t.startsWith("-"))return!1;const s=/^\+?(\d*\.?\d+)[a-z%]*$/.exec(t);return s?Number.parseFloat(s[1])!==0:!0},ve=e=>{const t=e.split(/\s+/).filter(Boolean);return t.length<2?t:t.length<4?[t[1]]:[t[1],t[3]]},ke=(e,t)=>{if(e&&we.has(e))return!1;const s=t.replace(/!\s*important/gi,"").trim();return s?e?s.split(/\s+/).some(N):ve(s).some(N):!1},C=e=>{for(const t of B(e).matchAll(xe))if(ke(t[1],t[2]))return!0;return!1},O=new Set(["blockquote"]),Ae=e=>e.replace(/<!--[\s\S]*?-->/g,""),Se=e=>{const t=[],s=/<([a-zA-Z][\w:-]*)((?:"[^"]*"|'[^']*'|[^>"'])*)>/g,r=/\bstyle\s*=\s*(?:"([^"]*)"|'([^']*)')/gi;for(const[,n,o]of e.matchAll(s))for(const d of o.matchAll(r))t.push({tag:n.toLowerCase(),style:d[1]??d[2]??""});return t},Ee=e=>[...B(e).matchAll(/([^{}]*)\{([^{}]*)\}/g)].map(t=>({selector:t[1].trim(),body:t[2]})),Ne=e=>{const t=e.trim().split(/[\s>+~]+/).pop()??"";return(/^[a-zA-Z][\w-]*/.exec(t)?.[0]??"").toLowerCase()},Ce=e=>e.split(",").every(t=>O.has(Ne(t))),Te=e=>{const t=I(e),s=Ae(e);if(/\bcellpadding\s*=\s*["']?(?!0["'\s>])\d/i.test(s))return!0;for(const{tag:r,style:n}of Se(s))if(!O.has(r)&&C(n))return!0;for(const r of t)for(const n of Ee(r))if(!Ce(n.selector)&&C(n.body))return!0;return!1},je=["script","iframe","object","embed","form","input","button","textarea","select","meta","link","base"],Le=["onerror","onload","onclick","onmouseover","onmouseout","onfocus","onblur","onsubmit","onkeydown","onkeyup","formaction","xlink:href","data-bind"],Re="data:image/svg+xml,"+encodeURIComponent(`
|
|
57
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
|
|
58
|
+
<rect fill="#f0f0f0" width="100" height="100"/>
|
|
59
|
+
<text x="50" y="50" text-anchor="middle" dy=".3em" fill="#999" font-size="12">
|
|
60
|
+
Image blocked
|
|
61
|
+
</text>
|
|
62
|
+
</svg>
|
|
63
|
+
`),_e=e=>e.replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),$e=e=>e.replace(/@import[^;]*;/gi,"/* @import blocked */").replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),Ie=(e={})=>{const t=Y(),s={FORBID_TAGS:je,FORBID_ATTR:Le,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1};return t.addHook("afterSanitizeAttributes",r=>{if(e.allowExternalImages||(r.tagName==="IMG"&&r.removeAttribute("srcset"),r.tagName==="SOURCE"&&(r.removeAttribute("srcset"),r.removeAttribute("src")),r.tagName==="VIDEO"&&r.removeAttribute("poster")),r.tagName==="IMG"){const n=r.getAttribute("src")||"";if(n.startsWith("data:"))return;if(n.startsWith("cid:")){const d=n.slice(4).replace(/^<|>$/g,""),g=e.resolveCid?.(d);g&&(r.setAttribute("src",g),r.classList.add("inline-content"));return}e.allowExternalImages||(r.setAttribute("data-blocked-src",n),r.setAttribute("src",Re),r.setAttribute("alt","[Blocked image]"),r.classList.add("blocked-image"))}if(r.tagName==="A"){const n=r.getAttribute("href")||"";if(/^(javascript|data):/i.test(n)){r.removeAttribute("href");return}r.setAttribute("target","_blank"),r.setAttribute("rel","noopener noreferrer nofollow"),r.classList.add("external-link")}if(r.hasAttribute("style")){const n=r.getAttribute("style")||"";r.setAttribute("style",_e(n))}}),t.addHook("uponSanitizeElement",(r,n)=>{if(n.tagName==="style"){const o=r.textContent||"";r.textContent=$e(o)}}),r=>{const n=be(r),o=Te(r),d=t.sanitize(r,s);return{html:`<style>${fe()}</style>${d}`,hasAuthorBackground:n,hasAuthorSpacing:o}}},Be='"Geist Variable", "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',k={light:{fg:"oklch(0.3 0.025 235)",canvas:"oklch(0.96 0.015 90)",accent:"oklch(0.55 0.14 150)"},dark:{fg:"oklch(0.88 0.02 90)",canvas:"oklch(0.22 0.025 220)",accent:"oklch(0.78 0.16 150)"}},Oe={background:!1,spacing:!1},Me="16px",De=()=>`html{padding:0}body{padding:${Me};box-sizing:border-box}`,ze=()=>"html{overflow:hidden}body{overflow-x:auto}",Pe=/prefers-color-scheme\s*:\s*dark|color-scheme\s*:\s*[^;}"']*\bdark\b/i,Ke='<meta name="viewport" content="width=device-width, initial-scale=1">',Fe=e=>{const t=e?k.dark:k.light;return`
|
|
64
|
+
/* Plain-email base: UI font-stack + theme-aware colors (#424) */
|
|
65
|
+
html, body {
|
|
66
|
+
font-family: ${Be};
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
line-height: 1.6;
|
|
69
|
+
color: ${t.fg};
|
|
70
|
+
background-color: ${t.canvas};
|
|
71
|
+
margin: 0;
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
/* Strip author unreadable text colors and element backgrounds, scoped to body
|
|
75
|
+
descendants so the themed html/body surface above survives this reset. */
|
|
76
|
+
body * {
|
|
77
|
+
color: inherit !important;
|
|
78
|
+
background-color: transparent !important;
|
|
79
|
+
}
|
|
80
|
+
a, a:visited {
|
|
81
|
+
color: ${t.accent} !important;
|
|
82
|
+
text-decoration: underline;
|
|
83
|
+
}
|
|
84
|
+
`},E="invert(0.92) hue-rotate(180deg)",T=`img,picture,video,svg,canvas,[style*='background-image'],[background]{filter:${E}}`,He=(e,t,s)=>{const r=e?k.dark.canvas:k.light.canvas;return s?e?t?`html,body{margin:0;background-color:${r};color-scheme:dark light}`:`html{margin:0;background-color:#ffffff;filter:${E}}body{margin:0}${T}`:"html,body{margin:0;background-color:#ffffff;color-scheme:light}":e?t?`html,body{margin:0;background-color:${r};color-scheme:dark light}`:`html{margin:0;background-color:${r}}body{margin:0;filter:${E}}${T}`:`html,body{margin:0;background-color:${r};color-scheme:light}`},Ge=(e,t,s,r=Oe)=>{const n=t==="plain"?Fe(s):He(s,Pe.test(e),r.background),o=r.spacing?"":De();return`${Ke}<style>${n}</style>${e}<style>${ze()}${o}</style>`},Ue=5e4,We="allow-same-origin allow-popups allow-popups-to-escape-sandbox",Ve=(e,t,s)=>Math.min(Math.ceil(Math.max(e,t)),s),Qe=new Set(["Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),qe=e=>e===" "?!1:e.length===1?!0:Qe.has(e),S=e=>{if(e.metaKey||e.ctrlKey||e.altKey||!qe(e.key))return;const t=e.currentTarget??e.target,s=t?.defaultView?.parent;!s||s===t?.defaultView||s.dispatchEvent(new KeyboardEvent("keydown",{key:e.key,code:e.code,shiftKey:e.shiftKey,bubbles:!0,cancelable:!0}))},j=({html:e,variant:t="framed",isDark:s=!1,declares:r,className:n})=>{const o=h.useRef(null),[d,g]=h.useState(0),i=h.useMemo(()=>Ge(e,t,s,r),[e,t,s,r]);return h.useEffect(()=>{const c=o.current;if(!c)return;const u=()=>{const l=c.contentDocument;if(!l?.body)return;const x=l.documentElement,w=Ve(l.body.scrollHeight,x?.scrollHeight??0,Ue);g(y=>y===w?y:w)};let m,f;const p=()=>{u(),m?.disconnect(),m=void 0,f?.removeEventListener("keydown",S),f?.removeEventListener("load",u,!0),f=void 0;const l=c.contentDocument;l?.body&&(m=new ResizeObserver(u),m.observe(l.body),l.documentElement&&m.observe(l.documentElement),l.addEventListener("load",u,!0),l.fonts?.ready.then(u),l.addEventListener("keydown",S),f=l)};return c.addEventListener("load",p),()=>{c.removeEventListener("load",p),f?.removeEventListener("keydown",S),f?.removeEventListener("load",u,!0),m?.disconnect()}},[]),a.jsx("iframe",{ref:o,title:"Email content",sandbox:We,srcDoc:i,className:n,style:{width:"100%",border:"none",display:"block",height:d===0?"1px":`${d}px`,colorScheme:"normal"}})},L=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),Et=({className:e,children:t})=>a.jsx("div",{className:b("[&_.message-body-frame]:-mx-2 lg:[&_.message-body-frame]:-mx-4",e),children:t}),Ye=({html:e,text:t,isDark:s=!1,category:r,allowImages:n=!1,resolveCid:o,className:d,renderBlockedNotice:g})=>{const i=h.useMemo(()=>!e||typeof document>"u"?null:Ie({allowExternalImages:n,resolveCid:o})(e),[e,n,o]),c=i?.html??null,{framed:u,isPlain:m}=me(r,i?.hasAuthorBackground??!1),f=h.useMemo(()=>({background:i?.hasAuthorBackground??!1,spacing:i?.hasAuthorSpacing??!1}),[i?.hasAuthorBackground,i?.hasAuthorSpacing]),p=h.useMemo(()=>!c||n?0:(c.match(/data-blocked-src/g)||[]).length,[c,n]);return!c&&!t?a.jsx("div",{className:b("message-body",d),children:a.jsx(L,{})}):a.jsxs("div",{className:b("message-body",d),children:[p>0&&a.jsx("div",{children:g?.(p)}),c?a.jsx("div",{className:"message-body-frame",children:u?a.jsx("div",{className:"w-full max-w-full",children:a.jsx(j,{html:c,variant:"framed",isDark:s,declares:f})}):a.jsx("div",{className:"max-w-full lg:max-w-2xl",children:a.jsx(j,{html:c,variant:m?"plain":"framed",isDark:s,declares:f})})}):t?a.jsx("pre",{className:"email-text whitespace-pre-wrap text-sm leading-relaxed",children:t}):a.jsx(L,{})]})};function Nt({message:e="Select a thread to read",icon:t,showHints:s=!0,className:r}){return a.jsxs("div",{className:b("flex flex-1 flex-col items-center justify-center text-center",r),children:[t??a.jsx(X,{className:"size-10 text-fg-subtle"}),a.jsx("p",{className:"mt-3 text-sm text-fg-muted",children:e}),s&&a.jsxs("p",{className:"text-2xs text-fg-subtle",children:[a.jsx(A,{children:"j"})," / ",a.jsx(A,{children:"k"})," to move, ",a.jsx(A,{children:"Enter"})," to open"]})]})}function M(e){const t=[];let s=-1,r=!1;for(let n=0;n<e.length;n++){const o=e[n];if(o==='"'){r=!r,s<0&&(s=n);continue}if(!r&&/\s/.test(o)){s>=0&&t.push({raw:e.slice(s,n),start:s,end:n}),s=-1;continue}s<0&&(s=n)}return s>=0&&t.push({raw:e.slice(s),start:s,end:e.length}),t}const Xe=e=>{if(!e.startsWith('"'))return e;const t=e.slice(1);return t.endsWith('"')?t.slice(0,-1):t};function Ze(e){const t=e.indexOf(":");if(t<=0)return;const s=e.slice(t+1);return{name:e.slice(0,t).toLowerCase(),value:Xe(s),rawValue:s}}const Je=e=>/[\s"]/.test(e),et=e=>Je(e)?`"${e.replace(/"/g,"")}"`:e,Ct=(e,t)=>`${e}:${et(t)}`,D=(e,t=Date.now())=>({value:e,setAt:t}),tt=(e,t,s,r)=>{if(e.addressId!==t)return e;const n={...e.flags??{}};return s?n.trusted=D(!0,r):delete n.trusted,{...e,flags:n}},st=(e,t,s,r)=>{const n=o=>o.map(d=>tt(d,t,s,r));return{...e,envelope:{...e.envelope,from:n(e.envelope.from),to:n(e.envelope.to),cc:n(e.envelope.cc),bcc:n(e.envelope.bcc),replyTo:n(e.envelope.replyTo)}}},rt=({messageId:e})=>{const t=Z(),{pushError:s}=J(),{mutate:r,isPending:n,error:o,reset:d}=ee({...re(),onMutate:async i=>{const c=i.path.addressId,m=i.body.flags?.trusted?.value===!0,f=se({path:{messageId:e}});await t.cancelQueries({queryKey:f});const p=t.getQueriesData({queryKey:f}).filter(l=>l[1]!==void 0).map(([l,x])=>({queryKey:l,data:x}));return t.setQueriesData({queryKey:f},l=>l&&st(l,c,m)),{describePrefix:f,previous:p}},onError:(i,c,u)=>{if(u)for(const m of u.previous)t.setQueryData(m.queryKey,m.data);s(te("Couldn't trust sender","The change wasn't saved.",i))},onSettled:(i,c,u,m)=>{m&&t.invalidateQueries({queryKey:m.describePrefix})}});return{toggleTrusted:(i,c)=>{r({path:{addressId:i},body:{flags:{trusted:D(!c)}}})},isPending:n,error:o,reset:d}},nt=()=>{const[e,t]=h.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark"));return h.useEffect(()=>{const s=document.documentElement,r=new MutationObserver(()=>{t(s.classList.contains("dark"))});return r.observe(s,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),e},at=(e,t)=>{const s=`${e} image${e>1?"s":""}`;return t?`${s} hidden — you blocked this sender`:`${s} blocked for privacy`},ot=({blockedImageCount:e,canAlwaysTrust:t,isTrustPending:s,isSenderBlocked:r,onLoadOnce:n,onAlwaysTrust:o})=>a.jsxs("div",{"data-testid":"blocked-images-notice",className:"mb-3 flex items-center justify-between rounded-md bg-surface-sunken/50 px-3 py-2 text-sm",children:[a.jsx("span",{className:"text-fg-muted",children:at(e,r)}),!r&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("button",{type:"button",onClick:n,className:"text-accent hover:underline",children:"Load once"}),t&&a.jsx("button",{type:"button",onClick:o,"aria-busy":s,className:"text-accent hover:underline aria-busy:opacity-50",children:s?"Trusting…":"Always trust"})]})]}),it=(e,t)=>{switch(e){case"auth":return{title:"Your session expired",detail:"Sign in again to reload the message body. Other parts of the app may also stop responding until you do."};case"body-missing":return{title:"Message body is missing in storage",detail:"A sync failure may have left this message without its body bytes. Contact support, or run the reconcile script to refetch from the upstream IMAP server."};case"content-type-mismatch":return{title:"Couldn't load message body",detail:"The server returned an unexpected content type for this part. The message body has not been rendered to keep you safe."};case"spa-shell-leak":return{title:"Couldn't load message body",detail:"The server returned the app shell instead of the message body. This is an infrastructure bug — please report it."};case"not-ready":return{title:"Message body is still syncing",detail:"This message's body hasn't finished downloading from the mail server yet. It should appear shortly — reopen the message to try again."};default:return{title:"Couldn't load message body",detail:t}}},ct=e=>e instanceof le?e.reason:"generic",lt=e=>e instanceof Error?e.message:typeof e=="string"?e:"An unexpected error occurred while loading the message body.",dt=({error:e,onRetry:t})=>{const s=ct(e),r=lt(e),{title:n,detail:o}=it(s,r),[d,g]=h.useState(!1),{Account:i}=ne();return d?null:a.jsxs("div",{role:"alert","data-testid":"message-body-error-banner","data-reason":s,className:"flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm",children:[a.jsx(ae,{className:"size-4 shrink-0 text-danger mt-0.5","aria-hidden":"true"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium text-danger",children:n}),a.jsx("p",{className:"text-fg-muted mt-1 break-words",children:o})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[s==="auth"&&a.jsx(i,{children:({signOut:c})=>a.jsx("button",{type:"button",onClick:()=>c(),className:"text-sm font-medium text-accent hover:underline",children:"Sign in again"})}),t&&a.jsx("button",{type:"button",onClick:t,className:"text-sm font-medium text-accent hover:underline",children:"Retry"}),a.jsx("button",{type:"button",onClick:()=>g(!0),"aria-label":"Dismiss message body error",className:"rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors",children:a.jsx(oe,{className:"size-4","aria-hidden":"true"})})]})]})},ut=()=>a.jsxs("div",{className:"animate-pulse space-y-2",role:"status","aria-label":"Loading message body",children:[a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-full"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-11/12"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-3/4"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-5/6"})]}),R=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),Tt=({bodyParts:e,html:t,text:s,isTrusted:r=!1,isBlocked:n=!1,messageId:o,fromAddressId:d,category:g,className:i})=>{const[c,u]=h.useState(!1),[m,f]=h.useState(o);m!==o&&(f(o),u(!1));const p=!n&&(r||c),l=nt(),{toggleTrusted:x,isPending:w}=rt({messageId:o??""}),y=!!e&&e.length>0,{picked:z,data:v,isLoading:P,isError:K,error:F,refetch:H}=de({messageId:o,bodyParts:e,enabled:y}),G=h.useMemo(()=>he(e??[]),[e]),U=y&&v?.kind==="html"?v.body:t,W=y&&v?.kind==="text"?v.body:s;if(y){if(P)return a.jsx("div",{className:b("message-body",i),children:a.jsx(ut,{})});if(K)return a.jsx("div",{className:b("message-body",i),children:a.jsx(dt,{error:F,onRetry:()=>H()})});if(!z)return a.jsx("div",{className:b("message-body",i),children:a.jsx(R,{})})}else if(!t&&!s)return a.jsx("div",{className:b("message-body",i),children:a.jsx(R,{})});const V=!!(d&&o),Q=()=>{!d||w||(u(!0),x(d,!1))};return a.jsx(Ye,{className:i,html:U,text:W,isDark:l,category:g,allowImages:p,resolveCid:G,renderBlockedNotice:q=>a.jsx(ot,{blockedImageCount:q,canAlwaysTrust:V,isTrustPending:w,isSenderBlocked:n,onLoadOnce:()=>u(!0),onAlwaysTrust:Q})})},mt=Object.values(_).map(e=>({value:e,label:$[e]})),ft={unclassified:"uncategorized"},ht=[{name:"from",label:"Sender",values:"contact"},{name:"subject",label:"Subject",values:"text"},{name:"category",label:"Category",values:"fixed",options:mt},{name:"is",label:"State",values:"fixed",options:[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"starred",label:"Starred"}]},{name:"has",label:"Contents",values:"fixed",options:[{value:"attachment",label:"Has attachment"}]},{name:"in",label:"Folder",values:"mailbox"},{name:"account",label:"Account",values:"account"},{name:"after",label:"Sent on or after",values:"date"},{name:"before",label:"Sent before",values:"date"}],gt=new Map(ht.map(e=>[e.name,e])),jt=e=>gt.get(e.toLowerCase()),pt=/^\d{4}-\d{2}-\d{2}$/;function bt(e,t,s){if(!pt.test(s))return;const r=Date.parse(`${s}T00:00:00Z`);if(!Number.isNaN(r))return{type:e,raw:t,value:s,epochSeconds:Math.floor(r/1e3)}}function yt(e){const t=e.toLowerCase(),s=ft[t];return s||Object.values(_).find(n=>n===t)}function xt(e,t){switch(t.toLowerCase()){case"unread":return{type:"isUnread",raw:e};case"read":return{type:"isRead",raw:e};case"starred":case"flagged":return{type:"isStarred",raw:e};default:return}}function wt(e,t){const s=Ze(e);if(!s||s.value.length===0)return;const{name:r,value:n}=s;switch(r){case"from":return{type:"from",raw:e,value:n};case"subject":return{type:"subject",raw:e,value:n};case"category":{const o=yt(n);return o?{type:"category",raw:e,value:n,category:o}:void 0}case"is":return xt(e,n);case"has":return n.toLowerCase()==="attachment"?{type:"hasAttachment",raw:e}:void 0;case"before":case"after":return bt(r,e,n);case"in":{const o=t.mailboxesByName?.get(n.toLowerCase());return o?{type:"in",raw:e,value:n,mailboxId:o}:void 0}case"account":{const o=t.accountsByName?.get(n.toLowerCase());return o?{type:"account",raw:e,value:n,accountId:o}:void 0}default:return}}function Lt(e,t={}){const s=[],r=[];for(const n of M(e)){const o=wt(n.raw,t);o?s.push(o):r.push(n.raw)}return{freeText:r.join(" "),tokens:s}}function Rt(e,t){return M(e).filter(s=>s.raw!==t.raw).map(s=>s.raw).join(" ")}function _t(e){switch(e.type){case"from":return`From: ${e.value}`;case"subject":return`Subject: ${e.value}`;case"category":return`Category: ${$[e.category]}`;case"hasAttachment":return"Has attachment";case"isUnread":return"Unread";case"isRead":return"Read";case"isStarred":return"Starred";case"before":return`Before ${e.value}`;case"after":return`After ${e.value}`;case"in":return`In: ${e.value}`;case"account":return`Account: ${e.value}`}}function $t(){const{mailboxNameIndex:e,accountNameIndex:t}=ie(),s=ce();return{...ue(s)?{}:{mailboxesByName:e},accountsByName:t}}export{Et as M,Nt as R,ht as S,Ye as a,rt as b,Tt as c,jt as d,M as e,Ze as f,Ct as g,Lt as p,Rt as r,_t as s,$t as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as T,au as L,i as k,E as I,F as E,cC as A,ef as R,r as v,dr as j,j as p,eg as h,eh as w,ei as D,C as _,ck as N,c as Q,dM as z,c$ as O}from"./index-
|
|
1
|
+
import{h as T,au as L,i as k,E as I,F as E,cC as A,ef as R,r as v,dr as j,j as p,eg as h,eh as w,ei as D,C as _,ck as N,c as Q,dM as z,c$ as O}from"./index-3hHGDIWI.js";import{P}from"./attachment-file-D1CABsD4.js";import{aj as U}from"./MailListHeader-DGZBTAxU.js";import{a as q}from"./useLabels-D0pazLEp.js";import{n as B}from"./search-query-Cr_ZXBCp.js";import{b as F}from"./search-scope-B5-OK3Cq.js";import{u as G,p as H}from"./useSearchTokenContext-DtlsV91o.js";const ne=e=>{const t=new Set;for(const s of e)s&&t.add(s);return t.size>1?{accountId:void 0,restriction:"spansAccounts",moveDisabledHint:"Move only works within one account — clear selection or pick messages from a single account"}:{accountId:t.size===1?[...t][0]:void 0,restriction:void 0,moveDisabledHint:void 0}},$=e=>{const{mailboxId:t,messages:s}=e,n=T(),{pushError:l}=L(),{mutateAsync:c,isPending:a}=k({...R(),onError:(r,u)=>{l({title:u.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:A(r),error:r})},onSettled:(r,u,d)=>{I(n,E(U(d.body.messageIds??[],s??[],t)))}});return{applyLabel:v.useCallback((r,u,d)=>{r.length!==0&&j(r,m=>c({body:{messageIds:m,labelId:u,action:d}}))},[c]),isPending:a}};function re({accountId:e,mailboxId:t,messageIds:s}){const{labels:n}=q(e),{applyLabel:l}=$({mailboxId:t}),c=v.useMemo(()=>n.map(a=>({key:a.labelId,label:a.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${w(a.color)?h[a.color]:h.Default}`}),onSelect:()=>l(s,a.labelId,"Apply")})),[n,s,l]);return c.length===0?null:p.jsx(P,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(D,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:c,align:"start",nested:!0,touch:!1,triggerClassName:"min-h-11 w-full justify-start gap-3 px-4 py-2.5 text-sm font-normal text-fg"})}const K=3,ie=({hasSearchQuery:e,freeText:t,residualTokenCount:s})=>{if(!e||s>0)return!1;const n=t.trim();return n.length===0||n.length>=K},ce=e=>e===void 0?{kind:"unknown"}:{kind:"exact",value:e},V=20,Y=new Set(Object.values(O)),J=e=>e!==void 0&&Y.has(e)?e:void 0,W=e=>{if(e.some(t=>t.type==="isUnread"))return!1;if(e.some(t=>t.type==="isRead"))return!0};function le({mailboxId:e,filterCategory:t}={}){const{searchQuery:s}=_(),n=G(),l=N(),c=B(s),{freeText:a,tokens:i}=H(c,n),r=a.length>0,u=i.find(o=>o.type==="category"),d=J(t)??u?.category,m=i.some(o=>o.type==="hasAttachment")?!0:void 0,f=i.some(o=>o.type==="isStarred")?!0:void 0,y=W(i),g=i.find(o=>o.type==="after"),b=i.find(o=>o.type==="before"),x=i.find(o=>o.type==="in"),S=F({browsed:l,callerMailboxId:e,inTokenMailboxId:x?.mailboxId}),{data:C,isLoading:M}=Q({...z({query:{query:a,mailboxId:S,limit:V,...d!==void 0?{category:d}:{},...m!==void 0?{hasAttachment:m}:{},...f!==void 0?{hasStars:f}:{},...y!==void 0?{isRead:y}:{},...g?{sentDateFrom:g.epochSeconds}:{},...b?{sentDateTo:b.epochSeconds}:{}}}),enabled:r,staleTime:6e4});return{hits:C?.items??[],isLoading:r&&M}}export{re as L,ne as r,ie as s,ce as t,le as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as g,au as p,c as f,d as m,r,i as y,aw as T,o as E,l as d}from"./index-
|
|
1
|
+
import{h as g,au as p,c as f,d as m,r,i as y,aw as T,o as E,l as d}from"./index-3hHGDIWI.js";const i={html:"",plainText:""},x=e=>{const u=g(),{pushError:o}=p(),{data:n}=f({...m(),staleTime:1/0}),l=r.useMemo(()=>{if(!e||!n)return i;const t=n.accounts.find(a=>a.accountId===e);return t?{html:t.signatureHtml??"",plainText:t.signaturePlainText??""}:i},[e,n]),s=y({...d(),onSuccess:()=>{u.invalidateQueries({queryKey:E()})},onError:t=>{o(T("Couldn't save signature","The signature wasn't saved.",t))}}),c=r.useCallback((t,a)=>{e&&s.mutate({path:{accountId:e},body:{signatureHtml:t,signaturePlainText:a}})},[e,s]);return{signature:l,setSignature:c,isSaving:s.isPending}};export{x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aa as d,eD as g,r as u,eE as y,bV as m,u as D,cj as b,eC as C}from"./index-
|
|
1
|
+
import{aa as d,eD as g,r as u,eE as y,bV as m,u as D,cj as b,eC as C}from"./index-3hHGDIWI.js";const i="/calendar/$view/$date";function I(){const e=d({from:i,shouldThrow:!1}),a=g({from:i,shouldThrow:!1}),t=e?.view??"",n=e?.date??"",r=a?.calendarId;return u.useMemo(()=>({...y({view:t,date:n},m(new Date)),calendarIds:r??[]}),[t,n,r])}function j(){const e=d({from:"/calendar/$view/$date/$calendarObjectId",shouldThrow:!1}),a=d({from:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",shouldThrow:!1}),t=e?.calendarObjectId,n=a?.recurrenceId;return u.useMemo(()=>t?{calendarObjectId:t,recurrenceId:n}:void 0,[t,n])}function z(){return d({from:"/calendar/$view/$date/new",shouldThrow:!1})!==void 0}function A(){const e=D(),a=b(),{view:t,date:n}=I(),r=u.useCallback(s=>{e({to:i,params:s,search:!0,hash:a})},[e,a]);return u.useMemo(()=>({goToView:s=>r({view:s,date:n}),step:s=>r({view:t,date:C(n,t,s)}),goToToday:()=>r({view:t,date:m(new Date)}),setAnchorDate:s=>e({to:i,params:{view:t,date:s},search:!0,hash:a,replace:!0}),zoomToDay:s=>r({view:"day",date:s}),openEvent:(s,o)=>e(o===void 0||o===""?{to:"/calendar/$view/$date/$calendarObjectId",params:{view:t,date:n,calendarObjectId:s},search:!0,hash:a}:{to:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",params:{view:t,date:n,calendarObjectId:s,recurrenceId:o},search:!0,hash:a}),closeEvent:()=>r({view:t,date:n}),openComposer:()=>e({to:"/calendar/$view/$date/new",params:{view:t,date:n},search:!0,hash:a})}),[r,e,a,t,n])}const c=e=>String(e).padStart(2,"0"),N=e=>`${e.getUTCFullYear()}-${c(e.getUTCMonth()+1)}-${c(e.getUTCDate())}`,p=e=>{const a=e<0?"-":"+",t=Math.abs(e);return`${a}${c(Math.floor(t/60))}:${c(t%60)}`};function w(e,a){const t=new Date(`${e}T${a}:00`);return`${e}T${a}:00${p(-t.getTimezoneOffset())}`}const l=new Map;function O(e){if(l.has(e))return l.get(e);let a;try{a=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{a=void 0}return l.set(e,a),a}function $(e,a){const t=O(e);if(!t)return Number.NaN;const n=t.formatToParts(new Date(a)),r=T=>Number(n.find(v=>v.type===T)?.value),s=r("hour")%24;return(Date.UTC(r("year"),r("month")-1,r("day"),s,r("minute"),r("second"))-a)/6e4}function P(e,a,t){if(t==="")return`${e}T${a}:00+00:00`;const n=Date.parse(`${e}T${a}:00Z`),r=$(t,n);if(Number.isNaN(r))return w(e,a);const s=$(t,n-r*6e4);return`${e}T${a}:00${p(Number.isNaN(s)?r:s)}`}const h=e=>w(e,"00:00");function f(e,a){const[t,n,r]=e.split("-").map(Number);return N(new Date(Date.UTC(t,n-1,r+a)))}function U(e){const[a,t,n]=e.split("-").map(Number),r=new Date(Date.UTC(a,t-1,n));return f(e,-((r.getUTCDay()+6)%7))}function E(e,a){const[t,n]=a.split("-").map(Number);if(e==="year")return[`${t}-01-01`,`${t+1}-01-01`];if(e==="month"){const s=`${t}-${c(n)}-01`,o=n===12?`${t+1}-01-01`:`${t}-${c(n+1)}-01`;return[s,o]}if(e==="day")return[a,f(a,1)];const r=U(a);return[r,f(r,7)]}function S(e,a){const[t,n]=E(e,a);return{from:h(t),to:h(n)}}export{f as a,A as b,S as c,j as d,z as e,P as i,I as u};
|
package/index.html
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
} catch (_) {}
|
|
39
39
|
})();
|
|
40
40
|
</script>
|
|
41
|
-
<script type="module" crossorigin src="/assets/index-
|
|
41
|
+
<script type="module" crossorigin src="/assets/index-3hHGDIWI.js"></script>
|
|
42
42
|
<link rel="stylesheet" crossorigin href="/assets/index-BqWgpRnh.css">
|
|
43
43
|
</head>
|
|
44
44
|
<body>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as o}from"./index-B_g7_yKS.js";const n=o;export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ak as m,j as o,O as p}from"./index-B_g7_yKS.js";import{a}from"./MailShell-D-CrYeRX.js";import{M as r}from"./MailboxPane-IjpTfp7f.js";import{d as e}from"./search-token-index-Bo4nLqUU.js";import{u as s}from"./search-mirror-D98DP_Vi.js";import"./FullCompose-PrOIUtTb.js";import"./ErrorState-i4wZuDi0.js";import"./index-B5lviCgZ.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./confirm-dialog-DvkCt72n.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-CQUM8maG.js";import"./circle-check-big-BZqF2TzE.js";import"./refresh-cw-BEaKSXud.js";import"./useQueries-R8ywGA5H.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./EmptyState-Dxkpw01s.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./useLayoutTier-GgdsrsTh.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./menu-Dab43Apc.js";import"./MailViewChrome-BBxhML8f.js";import"./NavMenuButton-D-n0ApzZ.js";import"./useLabels-2MHDpLPE.js";import"./useSemanticSearch-BLtRsTX2.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-DD3IwRYs.js";import"./circle-help-6Z8BzR4J.js";import"./circle-check-4H3bfTaV.js";function oo(){const{mailboxId:t}=m.useParams(),i=e();return s({to:"/mail/$mailboxId",params:{mailboxId:t}}),o.jsx(r,{mailboxId:t,thread:i,children:o.jsx(a,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(p,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!i})})}export{oo as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-B_g7_yKS.js";import{F as r}from"./FlaggedPane-up9rEFn0.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./useQueries-R8ywGA5H.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./MailViewChrome-BBxhML8f.js";import"./refresh-cw-BEaKSXud.js";import"./wizard-selection-DxUM65kM.js";function H(){return o.jsx(r.Reading,{})}export{H as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-B_g7_yKS.js";import{M as r}from"./MailboxPane-IjpTfp7f.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-CQUM8maG.js";import"./circle-check-big-BZqF2TzE.js";import"./refresh-cw-BEaKSXud.js";import"./useQueries-R8ywGA5H.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./MailViewChrome-BBxhML8f.js";import"./NavMenuButton-D-n0ApzZ.js";import"./useLabels-2MHDpLPE.js";import"./useSemanticSearch-BLtRsTX2.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-DD3IwRYs.js";import"./circle-help-6Z8BzR4J.js";import"./circle-check-4H3bfTaV.js";function S(){return o.jsx(r.Reading,{})}export{S as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-B_g7_yKS.js";import{B as o}from"./BriefPane-De-DAjhl.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./useQueries-R8ywGA5H.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./useRefreshControl-CQUM8maG.js";import"./circle-check-big-BZqF2TzE.js";import"./refresh-cw-BEaKSXud.js";import"./useSemanticSearch-BLtRsTX2.js";import"./useLabels-2MHDpLPE.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function L(){return r.jsx(o.Reading,{})}export{L as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-B_g7_yKS.js";import{O as t}from"./OutboxPane-DiKqzDea.js";import"./roving-focus-C51tV1Ry.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-BZqF2TzE.js";import"./clock-BPYem3Ta.js";import"./row-actions-7OdWgNil.js";import"./rotate-ccw-BghNW0Cb.js";import"./NavMenuButton-D-n0ApzZ.js";import"./menu-Dab43Apc.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function P(){return o.jsx(t.Reading,{})}export{P as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eK as o,j as m}from"./index-B_g7_yKS.js";import{O as e}from"./OpenCalendarEvent-Drx3K8mz.js";import"./CalendarComposePane-BeE93M6P.js";import"./window-BlRVSsTw.js";import"./ErrorState-i4wZuDi0.js";import"./calendar-color-DJKpK5br.js";import"./attendee-row-GCOl9CSt.js";import"./avatar-BIJccDrR.js";import"./clock-BPYem3Ta.js";import"./map-pin-DVZsQzCD.js";import"./mail-3wxGcCCf.js";import"./pencil-B7hr7Ewl.js";import"./useCalendars-BQVp6bQc.js";import"./useCalendarData-D8r9PCex.js";import"./useQueries-R8ywGA5H.js";function E(){const{calendarObjectId:r,recurrenceId:t}=o.useParams();return m.jsx(e,{calendarObjectId:r,recurrenceId:t})}export{E as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as o}from"./index-B_g7_yKS.js";const n=o;export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as o}from"./index-B_g7_yKS.js";const n=o;export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as o}from"./index-B_g7_yKS.js";const n=o;export{n as component};
|
package/assets/brief-BzRqNW6D.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,O as i}from"./index-B_g7_yKS.js";import{a as m}from"./MailShell-D-CrYeRX.js";import{B as o}from"./BriefPane-De-DAjhl.js";import{d as p}from"./search-token-index-Bo4nLqUU.js";import{u as e}from"./search-mirror-D98DP_Vi.js";import"./FullCompose-PrOIUtTb.js";import"./ErrorState-i4wZuDi0.js";import"./index-B5lviCgZ.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./confirm-dialog-DvkCt72n.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./EmptyState-Dxkpw01s.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./useLayoutTier-GgdsrsTh.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./useQueries-R8ywGA5H.js";import"./menu-Dab43Apc.js";import"./useRefreshControl-CQUM8maG.js";import"./circle-check-big-BZqF2TzE.js";import"./refresh-cw-BEaKSXud.js";import"./useSemanticSearch-BLtRsTX2.js";import"./useLabels-2MHDpLPE.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function W(){const t=p();return e({to:"/mail/brief"}),r.jsx(o,{thread:t,children:r.jsx(m,{phone:r.jsx(o.Phone,{}),list:r.jsx(o.List,{}),reading:r.jsx(i,{}),intelligence:r.jsx(o.Intelligence,{}),hasThread:!!t})})}export{W as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e}from"./index-B_g7_yKS.js";const t=e("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);export{t as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-PrOIUtTb.js";import"./index-B_g7_yKS.js";import"./ErrorState-i4wZuDi0.js";import"./index-B5lviCgZ.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./confirm-dialog-DvkCt72n.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-PrOIUtTb.js";import"./index-B_g7_yKS.js";import"./ErrorState-i4wZuDi0.js";import"./index-B5lviCgZ.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./confirm-dialog-DvkCt72n.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-PrOIUtTb.js";import"./index-B_g7_yKS.js";import"./ErrorState-i4wZuDi0.js";import"./index-B5lviCgZ.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./confirm-dialog-DvkCt72n.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-PrOIUtTb.js";import"./index-B_g7_yKS.js";import"./ErrorState-i4wZuDi0.js";import"./index-B5lviCgZ.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./confirm-dialog-DvkCt72n.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,O as i}from"./index-B_g7_yKS.js";import{a as m}from"./MailShell-D-CrYeRX.js";import{F as r}from"./FlaggedPane-up9rEFn0.js";import{d as p}from"./search-token-index-Bo4nLqUU.js";import{u as e}from"./search-mirror-D98DP_Vi.js";import"./FullCompose-PrOIUtTb.js";import"./ErrorState-i4wZuDi0.js";import"./index-B5lviCgZ.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./confirm-dialog-DvkCt72n.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./EmptyState-Dxkpw01s.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./useLayoutTier-GgdsrsTh.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./useQueries-R8ywGA5H.js";import"./menu-Dab43Apc.js";import"./MailViewChrome-BBxhML8f.js";import"./refresh-cw-BEaKSXud.js";import"./wizard-selection-DxUM65kM.js";function N(){const t=p();return e({to:"/mail/flagged"}),o.jsx(r,{thread:t,children:o.jsx(m,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(i,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!t})})}export{N as component};
|
package/assets/index-3TzQLNx6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-B_g7_yKS.js";import{F as r}from"./FlaggedPane-up9rEFn0.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./useQueries-R8ywGA5H.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./MailViewChrome-BBxhML8f.js";import"./refresh-cw-BEaKSXud.js";import"./wizard-selection-DxUM65kM.js";function H(){return o.jsx(r.Reading,{})}export{H as component};
|
package/assets/index-B19nQ_jY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-B_g7_yKS.js";import{M as r}from"./MailboxPane-IjpTfp7f.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-CQUM8maG.js";import"./circle-check-big-BZqF2TzE.js";import"./refresh-cw-BEaKSXud.js";import"./useQueries-R8ywGA5H.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./MailViewChrome-BBxhML8f.js";import"./NavMenuButton-D-n0ApzZ.js";import"./useLabels-2MHDpLPE.js";import"./useSemanticSearch-BLtRsTX2.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-DD3IwRYs.js";import"./circle-help-6Z8BzR4J.js";import"./circle-check-4H3bfTaV.js";function Q(){return o.jsx(r.Reading,{})}export{Q as component};
|
package/assets/index-BHd5xbMt.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-B_g7_yKS.js";import{B as o}from"./BriefPane-De-DAjhl.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./useQueries-R8ywGA5H.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./useRefreshControl-CQUM8maG.js";import"./circle-check-big-BZqF2TzE.js";import"./refresh-cw-BEaKSXud.js";import"./useSemanticSearch-BLtRsTX2.js";import"./useLabels-2MHDpLPE.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function M(){return r.jsx(o.Reading,{})}export{M as component};
|
package/assets/index-CR5ACWgB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eI as o,j as r}from"./index-B_g7_yKS.js";import{O as m}from"./OpenCalendarEvent-Drx3K8mz.js";import"./CalendarComposePane-BeE93M6P.js";import"./window-BlRVSsTw.js";import"./ErrorState-i4wZuDi0.js";import"./calendar-color-DJKpK5br.js";import"./attendee-row-GCOl9CSt.js";import"./avatar-BIJccDrR.js";import"./clock-BPYem3Ta.js";import"./map-pin-DVZsQzCD.js";import"./mail-3wxGcCCf.js";import"./pencil-B7hr7Ewl.js";import"./useCalendars-BQVp6bQc.js";import"./useCalendarData-D8r9PCex.js";import"./useQueries-R8ywGA5H.js";function R(){const{calendarObjectId:t}=o.useParams();return r.jsx(m,{calendarObjectId:t})}export{R as component};
|
package/assets/index-CtLgQagd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-B_g7_yKS.js";import{O as t}from"./OutboxPane-DiKqzDea.js";import"./roving-focus-C51tV1Ry.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-BZqF2TzE.js";import"./clock-BPYem3Ta.js";import"./row-actions-7OdWgNil.js";import"./rotate-ccw-BghNW0Cb.js";import"./NavMenuButton-D-n0ApzZ.js";import"./menu-Dab43Apc.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function c(){return o.jsx(t.Reading,{})}export{c as component};
|
package/assets/index-DbMz0mS2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,ao as o}from"./index-B_g7_yKS.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
|
package/assets/index-Dnjo9nOg.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-B_g7_yKS.js";import{F as r}from"./FlaggedPane-up9rEFn0.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./useQueries-R8ywGA5H.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./MailViewChrome-BBxhML8f.js";import"./refresh-cw-BEaKSXud.js";import"./wizard-selection-DxUM65kM.js";function I(){return o.jsx(r.Reading,{})}export{I as component};
|
package/assets/index-Pr0WSyqU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-B_g7_yKS.js";import{M as i}from"./MailboxPane-IjpTfp7f.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-CQUM8maG.js";import"./circle-check-big-BZqF2TzE.js";import"./refresh-cw-BEaKSXud.js";import"./useQueries-R8ywGA5H.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./MailViewChrome-BBxhML8f.js";import"./NavMenuButton-D-n0ApzZ.js";import"./useLabels-2MHDpLPE.js";import"./useSemanticSearch-BLtRsTX2.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-DD3IwRYs.js";import"./circle-help-6Z8BzR4J.js";import"./circle-check-4H3bfTaV.js";function S(){return o.jsx(i.Reading,{})}export{S as component};
|
package/assets/index-yVX0skYs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-B_g7_yKS.js";import{B as o}from"./BriefPane-De-DAjhl.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CGTCa2hn.js";import"./roving-focus-C51tV1Ry.js";import"./search-token-index-Bo4nLqUU.js";import"./useLayoutTier-GgdsrsTh.js";import"./useQueries-R8ywGA5H.js";import"./attachment-file-Chu-2Nf4.js";import"./mail-3wxGcCCf.js";import"./avatar-BIJccDrR.js";import"./index-B5lviCgZ.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./EmptyState-Dxkpw01s.js";import"./ErrorState-i4wZuDi0.js";import"./download-Dayqeqw-.js";import"./calendar-event-chip-D4SiEFwB.js";import"./calendar-color-DJKpK5br.js";import"./map-pin-DVZsQzCD.js";import"./attendee-row-GCOl9CSt.js";import"./clock-BPYem3Ta.js";import"./shield-check-B3oZ5BY0.js";import"./useFilters-CDMvFcQ4.js";import"./confirm-dialog-DvkCt72n.js";import"./menu-Dab43Apc.js";import"./useRefreshControl-CQUM8maG.js";import"./circle-check-big-BZqF2TzE.js";import"./refresh-cw-BEaKSXud.js";import"./useSemanticSearch-BLtRsTX2.js";import"./useLabels-2MHDpLPE.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function L(){return r.jsx(o.Reading,{})}export{L as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as n,h as i,u as a,r as m,j as s}from"./index-B_g7_yKS.js";import{O as p}from"./OnboardingWizard-B_UeIfRq.js";import{c}from"./onboarding-completion-BSvLNx0w.js";import"./kbd-CxLbnV1r.js";import"./credential-steps-iwYk1CZH.js";import"./card-DArqjjyQ.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-3wxGcCCf.js";import"./file-json-CQMSPFCG.js";function O(){const o=n(),e=i(),t=a(),r=m.useCallback(l=>{c({queryClient:e,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,e]);return s.jsx(p,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{t({to:"/import"})}})}export{O as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,O as i}from"./index-B_g7_yKS.js";import{a as m}from"./MailShell-D-CrYeRX.js";import{u as p,O as t}from"./OutboxPane-DiKqzDea.js";import{u as s}from"./search-mirror-D98DP_Vi.js";import"./FullCompose-PrOIUtTb.js";import"./ErrorState-i4wZuDi0.js";import"./index-B5lviCgZ.js";import"./useMessageBodyContent-Cl45Pefn.js";import"./useSignature-CrNY6J3D.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BtvB3JSG.js";import"./sections-D6zYYPPA.js";import"./confirm-dialog-DvkCt72n.js";import"./roving-focus-C51tV1Ry.js";import"./useSearchTokenContext-Dy8wpike.js";import"./kbd-CxLbnV1r.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-BZqF2TzE.js";import"./clock-BPYem3Ta.js";import"./row-actions-7OdWgNil.js";import"./rotate-ccw-BghNW0Cb.js";import"./NavMenuButton-D-n0ApzZ.js";import"./menu-Dab43Apc.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function v(){const r=p();return s({to:"/mail/outbox"}),o.jsx(t,{outboxMessageId:r,children:o.jsx(m,{phone:o.jsx(t.Phone,{}),list:o.jsx(t.List,{}),reading:o.jsx(i,{})})})}export{v as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,O as o}from"./index-B_g7_yKS.js";const n=()=>t.jsx(o,{});export{n as component};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import{cq as V,r as g,j as a,t as b,I as Q,h as q,au as Y,i as X,aw as Z,cG as J,bP as ee,ac as te,a0 as se,X as re,c$ as R,d0 as _,C as ne,ck as ae}from"./index-B_g7_yKS.js";import{K as k}from"./kbd-CxLbnV1r.js";import{B as oe,b as ie}from"./useMessageBodyContent-Cl45Pefn.js";import{i as ce}from"./search-scope-B5-OK3Cq.js";const le=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},de=()=>`
|
|
2
|
-
/* Zero the UA default body margin and clamp the document to the iframe width so
|
|
3
|
-
wide author markup can't push the body (and the page) past the viewport. */
|
|
4
|
-
html, body {
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
max-width: 100%;
|
|
8
|
-
}
|
|
9
|
-
body {
|
|
10
|
-
overflow-wrap: anywhere;
|
|
11
|
-
word-break: break-word;
|
|
12
|
-
}
|
|
13
|
-
/* Media never wider than the frame; keep aspect ratio when width is capped. */
|
|
14
|
-
img, video, iframe, svg, canvas {
|
|
15
|
-
max-width: 100% !important;
|
|
16
|
-
height: auto;
|
|
17
|
-
}
|
|
18
|
-
/* Fixed-width author tables (\`<table width="600">\`) collapse to fit. */
|
|
19
|
-
table {
|
|
20
|
-
max-width: 100% !important;
|
|
21
|
-
table-layout: auto;
|
|
22
|
-
}
|
|
23
|
-
/* Cells carry the fixed widths in real newsletters (\`<td width="600">\`);
|
|
24
|
-
cap them too or the table can't actually shrink. */
|
|
25
|
-
td, th {
|
|
26
|
-
max-width: 100% !important;
|
|
27
|
-
}
|
|
28
|
-
/* \`max-width\` alone can't beat an inline \`min-width\`; zeroing the min lets
|
|
29
|
-
flex / grid / table children actually collapse to the clamped width. */
|
|
30
|
-
* {
|
|
31
|
-
min-width: 0;
|
|
32
|
-
}
|
|
33
|
-
/* An author \`nowrap\` assumes a viewport as wide as the line. The frame is the
|
|
34
|
-
pane's width whatever the mail is, so a pinned paragraph turns reading one
|
|
35
|
-
sentence into a sideways drag — and inside an author \`overflow:hidden\` it is
|
|
36
|
-
cut mid-character with nothing left to scroll at all. Flowing text wraps. The
|
|
37
|
-
\`i\` flag is load-bearing: Outlook and older generators emit \`WHITE-SPACE:
|
|
38
|
-
NOWRAP\`, and an attribute value match is case-sensitive without it. */
|
|
39
|
-
[nowrap]:not(pre, code, pre *, code *),
|
|
40
|
-
[style*="nowrap" i]:not(pre, code, pre *, code *) {
|
|
41
|
-
white-space: normal !important;
|
|
42
|
-
}
|
|
43
|
-
/* Long unbroken strings (URLs, tokens) wrap instead of forcing a wide line. */
|
|
44
|
-
pre, code {
|
|
45
|
-
white-space: pre-wrap;
|
|
46
|
-
overflow-wrap: anywhere;
|
|
47
|
-
word-break: break-word;
|
|
48
|
-
}
|
|
49
|
-
/* Preformatted text keeps its spacing even where a nowrap is declared — on the
|
|
50
|
-
block or on a span inside it. \`normal\` would collapse the runs of spaces that
|
|
51
|
-
are the entire content of a \`pre\`, and the un-important rule above cannot
|
|
52
|
-
defend an inline style, so this wraps to \`pre-wrap\` instead of unwrapping. */
|
|
53
|
-
:is(pre, code, pre *, code *):is([nowrap], [style*="nowrap" i]) {
|
|
54
|
-
white-space: pre-wrap !important;
|
|
55
|
-
}
|
|
56
|
-
`,ue=e=>{const t=new Map;for(const s of e){if(!s.contentId||s.contentUrl.length===0)continue;const r=s.contentId.replace(/^<|>$/g,"");t.set(r,s.contentUrl)}return s=>t.get(s.replace(/^<|>$/g,""))},me=/^(none|transparent|inherit|initial|unset)\s*$/i,B=e=>{const t=[],s=/<style[^>]*>([\s\S]*?)<\/style>/gi;let r;for(r=s.exec(e);r!==null;)t.push(r[1]),r=s.exec(e);return t},fe=e=>{const t=/background(?:-color)?\s*:\s*([^;}\n]+)/gi;let s;for(s=t.exec(e);s!==null;){const r=s[1].trim();if(!me.test(r))return!0;s=t.exec(e)}return!1},he=e=>{if(/\bstyle\s*=\s*["'][^"']*background/i.test(e)||/\bbgcolor\s*=/i.test(e))return!0;for(const t of B(e))if(fe(t))return!0;return!1},ge=new Set(["auto","none","initial","inherit","unset","revert","revert-layer"]),pe=new RegExp(`(?<![-\\w])(?:padding|margin)(?:-(top|right|bottom|left|block|inline)(?:-(?:start|end))?)?\\s*:\\s*([^;}"']+)`,"gi"),be=new Set(["top","bottom","block"]),I=e=>e.replace(/\/\*[\s\S]*?\*\//g,""),E=e=>{const t=e.toLowerCase();if(!t||ge.has(t)||t.startsWith("-"))return!1;const s=/^\+?(\d*\.?\d+)[a-z%]*$/.exec(t);return s?Number.parseFloat(s[1])!==0:!0},ye=e=>{const t=e.split(/\s+/).filter(Boolean);return t.length<2?t:t.length<4?[t[1]]:[t[1],t[3]]},xe=(e,t)=>{if(e&&be.has(e))return!1;const s=t.replace(/!\s*important/gi,"").trim();return s?e?s.split(/\s+/).some(E):ye(s).some(E):!1},T=e=>{for(const t of I(e).matchAll(pe))if(xe(t[1],t[2]))return!0;return!1},M=new Set(["blockquote"]),we=e=>e.replace(/<!--[\s\S]*?-->/g,""),ve=e=>{const t=[],s=/<([a-zA-Z][\w:-]*)((?:"[^"]*"|'[^']*'|[^>"'])*)>/g,r=/\bstyle\s*=\s*(?:"([^"]*)"|'([^']*)')/gi;for(const[,n,o]of e.matchAll(s))for(const l of o.matchAll(r))t.push({tag:n.toLowerCase(),style:l[1]??l[2]??""});return t},ke=e=>[...I(e).matchAll(/([^{}]*)\{([^{}]*)\}/g)].map(t=>({selector:t[1].trim(),body:t[2]})),Se=e=>{const t=e.trim().split(/[\s>+~]+/).pop()??"";return(/^[a-zA-Z][\w-]*/.exec(t)?.[0]??"").toLowerCase()},Ae=e=>e.split(",").every(t=>M.has(Se(t))),Ee=e=>{const t=B(e),s=we(e);if(/\bcellpadding\s*=\s*["']?(?!0["'\s>])\d/i.test(s))return!0;for(const{tag:r,style:n}of ve(s))if(!M.has(r)&&T(n))return!0;for(const r of t)for(const n of ke(r))if(!Ae(n.selector)&&T(n.body))return!0;return!1},Te=["script","iframe","object","embed","form","input","button","textarea","select","meta","link","base"],Ce=["onerror","onload","onclick","onmouseover","onmouseout","onfocus","onblur","onsubmit","onkeydown","onkeyup","formaction","xlink:href","data-bind"],Ne="data:image/svg+xml,"+encodeURIComponent(`
|
|
57
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
|
|
58
|
-
<rect fill="#f0f0f0" width="100" height="100"/>
|
|
59
|
-
<text x="50" y="50" text-anchor="middle" dy=".3em" fill="#999" font-size="12">
|
|
60
|
-
Image blocked
|
|
61
|
-
</text>
|
|
62
|
-
</svg>
|
|
63
|
-
`),je=e=>e.replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),Le=e=>e.replace(/@import[^;]*;/gi,"/* @import blocked */").replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),Re=(e={})=>{const t=V(),s={FORBID_TAGS:Te,FORBID_ATTR:Ce,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1};return t.addHook("afterSanitizeAttributes",r=>{if(r.tagName==="IMG"){const n=r.getAttribute("src")||"";if(n.startsWith("data:"))return;if(n.startsWith("cid:")){const l=n.slice(4).replace(/^<|>$/g,""),m=e.resolveCid?.(l);m&&(r.setAttribute("src",m),r.classList.add("inline-content"));return}e.allowExternalImages||(r.setAttribute("data-blocked-src",n),r.setAttribute("src",Ne),r.setAttribute("alt","[Blocked image]"),r.classList.add("blocked-image"))}if(r.tagName==="A"){const n=r.getAttribute("href")||"";if(/^(javascript|data):/i.test(n)){r.removeAttribute("href");return}r.setAttribute("target","_blank"),r.setAttribute("rel","noopener noreferrer nofollow"),r.classList.add("external-link")}if(r.hasAttribute("style")){const n=r.getAttribute("style")||"";r.setAttribute("style",je(n))}}),t.addHook("uponSanitizeElement",(r,n)=>{if(n.tagName==="style"){const o=r.textContent||"";r.textContent=Le(o)}}),r=>{const n=he(r),o=Ee(r),l=t.sanitize(r,s);return{html:`<style>${de()}</style>${l}`,hasAuthorBackground:n,hasAuthorSpacing:o}}},_e='"Geist Variable", "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',v={light:{fg:"oklch(0.3 0.025 235)",canvas:"oklch(0.96 0.015 90)",accent:"oklch(0.55 0.14 150)"},dark:{fg:"oklch(0.88 0.02 90)",canvas:"oklch(0.22 0.025 220)",accent:"oklch(0.78 0.16 150)"}},Be={background:!1,spacing:!1},Ie="16px",Me=()=>`html{padding:0}body{padding:${Ie};box-sizing:border-box}`,Oe=()=>"html{overflow:hidden}body{overflow-x:auto}",$e=/prefers-color-scheme\s*:\s*dark|color-scheme\s*:\s*[^;}"']*\bdark\b/i,De='<meta name="viewport" content="width=device-width, initial-scale=1">',ze=e=>{const t=e?v.dark:v.light;return`
|
|
64
|
-
/* Plain-email base: UI font-stack + theme-aware colors (#424) */
|
|
65
|
-
html, body {
|
|
66
|
-
font-family: ${_e};
|
|
67
|
-
font-size: 14px;
|
|
68
|
-
line-height: 1.6;
|
|
69
|
-
color: ${t.fg};
|
|
70
|
-
background-color: ${t.canvas};
|
|
71
|
-
margin: 0;
|
|
72
|
-
padding: 0;
|
|
73
|
-
}
|
|
74
|
-
/* Strip author unreadable text colors and element backgrounds, scoped to body
|
|
75
|
-
descendants so the themed html/body surface above survives this reset. */
|
|
76
|
-
body * {
|
|
77
|
-
color: inherit !important;
|
|
78
|
-
background-color: transparent !important;
|
|
79
|
-
}
|
|
80
|
-
a, a:visited {
|
|
81
|
-
color: ${t.accent} !important;
|
|
82
|
-
text-decoration: underline;
|
|
83
|
-
}
|
|
84
|
-
`},A="invert(0.92) hue-rotate(180deg)",C=`img,picture,video,svg,canvas,[style*='background-image'],[background]{filter:${A}}`,Pe=(e,t,s)=>{const r=e?v.dark.canvas:v.light.canvas;return s?e?t?`html,body{margin:0;background-color:${r};color-scheme:dark light}`:`html{margin:0;background-color:#ffffff;filter:${A}}body{margin:0}${C}`:"html,body{margin:0;background-color:#ffffff;color-scheme:light}":e?t?`html,body{margin:0;background-color:${r};color-scheme:dark light}`:`html{margin:0;background-color:${r}}body{margin:0;filter:${A}}${C}`:`html,body{margin:0;background-color:${r};color-scheme:light}`},Ke=(e,t,s,r=Be)=>{const n=t==="plain"?ze(s):Pe(s,$e.test(e),r.background),o=r.spacing?"":Me();return`${De}<style>${n}</style>${e}<style>${Oe()}${o}</style>`},Fe=5e4,He="allow-same-origin allow-popups allow-popups-to-escape-sandbox",Ge=(e,t,s)=>Math.min(Math.ceil(Math.max(e,t)),s),Ue=new Set(["Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),We=e=>e===" "?!1:e.length===1?!0:Ue.has(e),S=e=>{if(e.metaKey||e.ctrlKey||e.altKey||!We(e.key))return;const t=e.currentTarget??e.target,s=t?.defaultView?.parent;!s||s===t?.defaultView||s.dispatchEvent(new KeyboardEvent("keydown",{key:e.key,code:e.code,shiftKey:e.shiftKey,bubbles:!0,cancelable:!0}))},N=({html:e,variant:t="framed",isDark:s=!1,declares:r,className:n})=>{const o=g.useRef(null),[l,m]=g.useState(0),d=g.useMemo(()=>Ke(e,t,s,r),[e,t,s,r]);return g.useEffect(()=>{const c=o.current;if(!c)return;const f=()=>{const i=c.contentDocument;if(!i?.body)return;const x=i.documentElement,y=Ge(i.body.scrollHeight,x?.scrollHeight??0,Fe);m(w=>w===y?w:y)};let u,h;const p=()=>{f(),u?.disconnect(),u=void 0,h?.removeEventListener("keydown",S),h?.removeEventListener("load",f,!0),h=void 0;const i=c.contentDocument;i?.body&&(u=new ResizeObserver(f),u.observe(i.body),i.documentElement&&u.observe(i.documentElement),i.addEventListener("load",f,!0),i.fonts?.ready.then(f),i.addEventListener("keydown",S),h=i)};return c.addEventListener("load",p),()=>{c.removeEventListener("load",p),h?.removeEventListener("keydown",S),h?.removeEventListener("load",f,!0),u?.disconnect()}},[]),a.jsx("iframe",{ref:o,title:"Email content",sandbox:He,srcDoc:d,className:n,style:{width:"100%",border:"none",display:"block",height:l===0?"1px":`${l}px`,colorScheme:"normal"}})},j=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),vt=({className:e,children:t})=>a.jsx("div",{className:b("[&_.message-body-frame]:-mx-2 lg:[&_.message-body-frame]:-mx-4",e),children:t}),Ve=({html:e,text:t,isDark:s=!1,category:r,allowImages:n=!1,resolveCid:o,className:l,renderBlockedNotice:m})=>{const d=g.useMemo(()=>!e||typeof document>"u"?null:Re({allowExternalImages:n,resolveCid:o})(e),[e,n,o]),c=d?.html??null,{framed:f,isPlain:u}=le(r,d?.hasAuthorBackground??!1),h=g.useMemo(()=>({background:d?.hasAuthorBackground??!1,spacing:d?.hasAuthorSpacing??!1}),[d?.hasAuthorBackground,d?.hasAuthorSpacing]),p=g.useMemo(()=>!c||n?0:(c.match(/data-blocked-src/g)||[]).length,[c,n]);return!c&&!t?a.jsx("div",{className:b("message-body",l),children:a.jsx(j,{})}):a.jsxs("div",{className:b("message-body",l),children:[p>0&&a.jsx("div",{children:m?.(p)}),c?a.jsx("div",{className:"message-body-frame",children:f?a.jsx("div",{className:"w-full max-w-full",children:a.jsx(N,{html:c,variant:"framed",isDark:s,declares:h})}):a.jsx("div",{className:"max-w-full lg:max-w-2xl",children:a.jsx(N,{html:c,variant:u?"plain":"framed",isDark:s,declares:h})})}):t?a.jsx("pre",{className:"email-text whitespace-pre-wrap text-sm leading-relaxed",children:t}):a.jsx(j,{})]})};function kt({message:e="Select a thread to read",icon:t,showHints:s=!0,className:r}){return a.jsxs("div",{className:b("flex flex-1 flex-col items-center justify-center text-center",r),children:[t??a.jsx(Q,{className:"size-10 text-fg-subtle"}),a.jsx("p",{className:"mt-3 text-sm text-fg-muted",children:e}),s&&a.jsxs("p",{className:"text-2xs text-fg-subtle",children:[a.jsx(k,{children:"j"})," / ",a.jsx(k,{children:"k"})," to move, ",a.jsx(k,{children:"Enter"})," to open"]})]})}function O(e){const t=[];let s=-1,r=!1;for(let n=0;n<e.length;n++){const o=e[n];if(o==='"'){r=!r,s<0&&(s=n);continue}if(!r&&/\s/.test(o)){s>=0&&t.push({raw:e.slice(s,n),start:s,end:n}),s=-1;continue}s<0&&(s=n)}return s>=0&&t.push({raw:e.slice(s),start:s,end:e.length}),t}const Qe=e=>{if(!e.startsWith('"'))return e;const t=e.slice(1);return t.endsWith('"')?t.slice(0,-1):t};function qe(e){const t=e.indexOf(":");if(t<=0)return;const s=e.slice(t+1);return{name:e.slice(0,t).toLowerCase(),value:Qe(s),rawValue:s}}const Ye=e=>/[\s"]/.test(e),Xe=e=>Ye(e)?`"${e.replace(/"/g,"")}"`:e,St=(e,t)=>`${e}:${Xe(t)}`,$=(e,t=Date.now())=>({value:e,setAt:t}),Ze=(e,t,s,r)=>{if(e.addressId!==t)return e;const n={...e.flags??{}};return s?n.trusted=$(!0,r):delete n.trusted,{...e,flags:n}},Je=(e,t,s,r)=>{const n=o=>o.map(l=>Ze(l,t,s,r));return{...e,envelope:{...e.envelope,from:n(e.envelope.from),to:n(e.envelope.to),cc:n(e.envelope.cc),bcc:n(e.envelope.bcc),replyTo:n(e.envelope.replyTo)}}},et=({messageId:e})=>{const t=q(),{pushError:s}=Y(),{mutate:r,isPending:n,error:o,reset:l}=X({...ee(),onMutate:async d=>{const c=d.path.addressId,u=d.body.flags?.trusted?.value===!0,h=J({path:{messageId:e}});await t.cancelQueries({queryKey:h});const p=t.getQueriesData({queryKey:h}).filter(i=>i[1]!==void 0).map(([i,x])=>({queryKey:i,data:x}));return t.setQueriesData({queryKey:h},i=>i&&Je(i,c,u)),{describePrefix:h,previous:p}},onError:(d,c,f)=>{if(f)for(const u of f.previous)t.setQueryData(u.queryKey,u.data);s(Z("Couldn't trust sender","The change wasn't saved.",d))},onSettled:(d,c,f,u)=>{u&&t.invalidateQueries({queryKey:u.describePrefix})}});return{toggleTrusted:(d,c)=>{r({path:{addressId:d},body:{flags:{trusted:$(!c)}}})},isPending:n,error:o,reset:l}},tt=()=>{const[e,t]=g.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark"));return g.useEffect(()=>{const s=document.documentElement,r=new MutationObserver(()=>{t(s.classList.contains("dark"))});return r.observe(s,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),e},st=({blockedImageCount:e,canAlwaysTrust:t,isTrustPending:s,onLoadOnce:r,onAlwaysTrust:n})=>a.jsxs("div",{className:"mb-3 flex items-center justify-between rounded-md bg-surface-sunken/50 px-3 py-2 text-sm",children:[a.jsxs("span",{className:"text-fg-muted",children:[e," image",e>1?"s":""," blocked for privacy"]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("button",{type:"button",onClick:r,className:"text-accent hover:underline",children:"Load once"}),t&&a.jsx("button",{type:"button",onClick:n,"aria-busy":s,className:"text-accent hover:underline aria-busy:opacity-50",children:s?"Trusting…":"Always trust"})]})]}),rt=(e,t)=>{switch(e){case"auth":return{title:"Your session expired",detail:"Sign in again to reload the message body. Other parts of the app may also stop responding until you do."};case"body-missing":return{title:"Message body is missing in storage",detail:"A sync failure may have left this message without its body bytes. Contact support, or run the reconcile script to refetch from the upstream IMAP server."};case"content-type-mismatch":return{title:"Couldn't load message body",detail:"The server returned an unexpected content type for this part. The message body has not been rendered to keep you safe."};case"spa-shell-leak":return{title:"Couldn't load message body",detail:"The server returned the app shell instead of the message body. This is an infrastructure bug — please report it."};case"not-ready":return{title:"Message body is still syncing",detail:"This message's body hasn't finished downloading from the mail server yet. It should appear shortly — reopen the message to try again."};default:return{title:"Couldn't load message body",detail:t}}},nt=e=>e instanceof oe?e.reason:"generic",at=e=>e instanceof Error?e.message:typeof e=="string"?e:"An unexpected error occurred while loading the message body.",ot=({error:e,onRetry:t})=>{const s=nt(e),r=at(e),{title:n,detail:o}=rt(s,r),[l,m]=g.useState(!1),{Account:d}=te();return l?null:a.jsxs("div",{role:"alert","data-testid":"message-body-error-banner","data-reason":s,className:"flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm",children:[a.jsx(se,{className:"size-4 shrink-0 text-danger mt-0.5","aria-hidden":"true"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium text-danger",children:n}),a.jsx("p",{className:"text-fg-muted mt-1 break-words",children:o})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[s==="auth"&&a.jsx(d,{children:({signOut:c})=>a.jsx("button",{type:"button",onClick:()=>c(),className:"text-sm font-medium text-accent hover:underline",children:"Sign in again"})}),t&&a.jsx("button",{type:"button",onClick:t,className:"text-sm font-medium text-accent hover:underline",children:"Retry"}),a.jsx("button",{type:"button",onClick:()=>m(!0),"aria-label":"Dismiss message body error",className:"rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors",children:a.jsx(re,{className:"size-4","aria-hidden":"true"})})]})]})},it=()=>a.jsxs("div",{className:"animate-pulse space-y-2",role:"status","aria-label":"Loading message body",children:[a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-full"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-11/12"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-3/4"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-5/6"})]}),L=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),At=({bodyParts:e,html:t,text:s,isTrusted:r=!1,messageId:n,fromAddressId:o,category:l,className:m})=>{const[d,c]=g.useState(!1),f=r||d,u=tt(),{toggleTrusted:h,isPending:p}=et({messageId:n??""}),i=!!e&&e.length>0,{picked:x,data:y,isLoading:w,isError:D,error:z,refetch:P}=ie({messageId:n,bodyParts:e,enabled:i}),K=g.useMemo(()=>ue(e??[]),[e]),F=i&&y?.kind==="html"?y.body:t,H=i&&y?.kind==="text"?y.body:s;if(i){if(w)return a.jsx("div",{className:b("message-body",m),children:a.jsx(it,{})});if(D)return a.jsx("div",{className:b("message-body",m),children:a.jsx(ot,{error:z,onRetry:()=>P()})});if(!x)return a.jsx("div",{className:b("message-body",m),children:a.jsx(L,{})})}else if(!t&&!s)return a.jsx("div",{className:b("message-body",m),children:a.jsx(L,{})});const G=!!(o&&n),U=()=>{!o||p||(c(!0),h(o,!1))};return a.jsx(Ve,{className:m,html:F,text:H,isDark:u,category:l,allowImages:f,resolveCid:K,renderBlockedNotice:W=>a.jsx(st,{blockedImageCount:W,canAlwaysTrust:G,isTrustPending:p,onLoadOnce:()=>c(!0),onAlwaysTrust:U})})},ct=Object.values(R).map(e=>({value:e,label:_[e]})),lt={unclassified:"uncategorized"},dt=[{name:"from",label:"Sender",values:"contact"},{name:"subject",label:"Subject",values:"text"},{name:"category",label:"Category",values:"fixed",options:ct},{name:"is",label:"State",values:"fixed",options:[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"starred",label:"Starred"}]},{name:"has",label:"Contents",values:"fixed",options:[{value:"attachment",label:"Has attachment"}]},{name:"in",label:"Folder",values:"mailbox"},{name:"account",label:"Account",values:"account"},{name:"after",label:"Sent on or after",values:"date"},{name:"before",label:"Sent before",values:"date"}],ut=new Map(dt.map(e=>[e.name,e])),Et=e=>ut.get(e.toLowerCase()),mt=/^\d{4}-\d{2}-\d{2}$/;function ft(e,t,s){if(!mt.test(s))return;const r=Date.parse(`${s}T00:00:00Z`);if(!Number.isNaN(r))return{type:e,raw:t,value:s,epochSeconds:Math.floor(r/1e3)}}function ht(e){const t=e.toLowerCase(),s=lt[t];return s||Object.values(R).find(n=>n===t)}function gt(e,t){switch(t.toLowerCase()){case"unread":return{type:"isUnread",raw:e};case"read":return{type:"isRead",raw:e};case"starred":case"flagged":return{type:"isStarred",raw:e};default:return}}function pt(e,t){const s=qe(e);if(!s||s.value.length===0)return;const{name:r,value:n}=s;switch(r){case"from":return{type:"from",raw:e,value:n};case"subject":return{type:"subject",raw:e,value:n};case"category":{const o=ht(n);return o?{type:"category",raw:e,value:n,category:o}:void 0}case"is":return gt(e,n);case"has":return n.toLowerCase()==="attachment"?{type:"hasAttachment",raw:e}:void 0;case"before":case"after":return ft(r,e,n);case"in":{const o=t.mailboxesByName?.get(n.toLowerCase());return o?{type:"in",raw:e,value:n,mailboxId:o}:void 0}case"account":{const o=t.accountsByName?.get(n.toLowerCase());return o?{type:"account",raw:e,value:n,accountId:o}:void 0}default:return}}function Tt(e,t={}){const s=[],r=[];for(const n of O(e)){const o=pt(n.raw,t);o?s.push(o):r.push(n.raw)}return{freeText:r.join(" "),tokens:s}}function Ct(e,t){return O(e).filter(s=>s.raw!==t.raw).map(s=>s.raw).join(" ")}function Nt(e){switch(e.type){case"from":return`From: ${e.value}`;case"subject":return`Subject: ${e.value}`;case"category":return`Category: ${_[e.category]}`;case"hasAttachment":return"Has attachment";case"isUnread":return"Unread";case"isRead":return"Read";case"isStarred":return"Starred";case"before":return`Before ${e.value}`;case"after":return`After ${e.value}`;case"in":return`In: ${e.value}`;case"account":return`Account: ${e.value}`}}function jt(){const{mailboxNameIndex:e,accountNameIndex:t}=ne(),s=ae();return{...ce(s)?{}:{mailboxesByName:e},accountsByName:t}}export{vt as M,kt as R,dt as S,Ve as a,et as b,At as c,Et as d,O as e,qe as f,St as g,Tt as p,Ct as r,Nt as s,jt as u};
|