@remit/web-client-dist 0.0.412 → 0.0.413
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-R_viiaK1.js → BriefPane-BHHJWYXX.js} +1 -1
- package/assets/{ErrorState-D8sE7Pfl.js → ErrorState-0VbnEcAz.js} +1 -1
- package/assets/{FlaggedPane-fPdu4vb-.js → FlaggedPane-B6qNh7Jg.js} +1 -1
- package/assets/{FullCompose-BYhiYm_v.js → FullCompose-DWFI6B3l.js} +1 -1
- package/assets/{MailListHeader-DP2Oq6aG.js → MailListHeader-DMttBs-5.js} +2 -2
- package/assets/{MailViewChrome-BFvNfkz6.js → MailViewChrome-C07Dmc2P.js} +1 -1
- package/assets/{MailboxPane-BYvBZDbG.js → MailboxPane-Bn7nibmd.js} +1 -1
- package/assets/{NavMenuButton-BFkQTRSb.js → NavMenuButton-8dEZRvia.js} +1 -1
- package/assets/{OnboardingWizard-CpUxFWg2.js → OnboardingWizard-B1VZnbtx.js} +1 -1
- package/assets/{OutboxPane-DQlNpyg0.js → OutboxPane-D_V5XUyg.js} +1 -1
- package/assets/_mailboxId-CEKBDtzM.js +1 -0
- package/assets/_messageId-BTgC7k_P.js +1 -0
- package/assets/_messageId-CNqCX8lV.js +1 -0
- package/assets/_messageId-QGs8TOFr.js +1 -0
- package/assets/_outboxMessageId-CJLIRz9-.js +1 -0
- package/assets/_threadId-Bvp2W9og.js +1 -0
- package/assets/_threadId-C5UGNEsm.js +1 -0
- package/assets/_threadId-DiDz_a9_.js +1 -0
- package/assets/{accounts-C0h4w_Nw.js → accounts-DRQjqG7C.js} +1 -1
- package/assets/{advanced-lkYLTwGO.js → advanced-PEB_S9Pe.js} +1 -1
- package/assets/{appearance-C9UZ-O-1.js → appearance-szQoSnrL.js} +1 -1
- package/assets/{attachment-file-5wLk0YdL.js → attachment-file-CKdTsgvP.js} +1 -1
- package/assets/{avatar-Dt7R_F-I.js → avatar-suJlLJwU.js} +1 -1
- package/assets/{bottom-sheet-Bka4oJ5I.js → bottom-sheet-D_SKfREi.js} +1 -1
- package/assets/{brief-cRUCFj7H.js → brief-DrmmOw4u.js} +1 -1
- package/assets/brief-OpwI4g8t.js +1 -0
- package/assets/{browser-ponyfill-DYIJbOtG.js → browser-ponyfill-CEVeZ53h.js} +1 -1
- package/assets/{bug-7hXaNjfy.js → bug-LZtkwITr.js} +1 -1
- package/assets/{circle-check-CegPFcdj.js → circle-check-CeegzzHk.js} +1 -1
- package/assets/{circle-check-big-CWYNhI41.js → circle-check-big-BPR47Bil.js} +1 -1
- package/assets/{circle-help-BQdNCn_9.js → circle-help-BJffPy7R.js} +1 -1
- package/assets/{clock-DCzohYVC.js → clock-jFmqomwa.js} +1 -1
- package/assets/compose._-_outboxMessageId_-DQl1zgYh.js +1 -0
- package/assets/compose._-_outboxMessageId_-DUNmuFpk.js +1 -0
- package/assets/compose._-_outboxMessageId_-G76oCgkJ.js +1 -0
- package/assets/compose._-_outboxMessageId_-j2Cj1Wg5.js +1 -0
- package/assets/{confirm-dialog-D6LTn1UC.js → confirm-dialog-DmHhbWHf.js} +1 -1
- package/assets/{download-D7diTZFq.js → download-B1qg7bWh.js} +1 -1
- package/assets/{filters-Bs6VLisO.js → filters-BfZjSBue.js} +1 -1
- package/assets/flagged-5PwHfzbL.js +1 -0
- package/assets/{flagged-D9j5wqND.js → flagged-DuT1Egal.js} +1 -1
- package/assets/{folders-_KulxZGi.js → folders-Bi465N3-.js} +1 -1
- package/assets/{help-copy-C3UFe6Uj.js → help-copy-76McPZW_.js} +1 -1
- package/assets/{index-Bn5xhoaE.js → index-BIxj3Put.js} +3 -3
- package/assets/index-BTgC7k_P.js +1 -0
- package/assets/index-BoTJ1157.js +1 -0
- package/assets/index-C2pZjQvE.js +1 -0
- package/assets/index-CNqCX8lV.js +1 -0
- package/assets/index-D4RGeef-.js +1 -0
- package/assets/index-D9jUJ-9T.js +1 -0
- package/assets/index-DK9a2wzj.js +1 -0
- package/assets/{index-FAXmjZ6R.js → index-DLL-HX3j.js} +4 -4
- package/assets/index-hycMLqg4.js +1 -0
- package/assets/{kbd-BU8IaqEZ.js → kbd-Kn37lY8n.js} +1 -1
- package/assets/{labels-CUHP1M1k.js → labels-DIV_DQVq.js} +1 -1
- package/assets/mail-BKj7YZym.js +1 -0
- package/assets/{mail-DoUd-22G.js → mail-D8kIUy15.js} +1 -1
- package/assets/{menu-CuvC7U2C.js → menu-BekrekSA.js} +1 -1
- package/assets/{onboarding-CTBz7oaX.js → onboarding-BhiH9HFx.js} +1 -1
- package/assets/outbox-Zas8HDGg.js +1 -0
- package/assets/{pencil-pBHc1n_Y.js → pencil-CoGemzoG.js} +1 -1
- package/assets/{rich-text-CkzCkR81.js → rich-text-hC9VoWot.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-BxEKWnOS.js → rich-text-spellcheck-worker-provider-d5UGz2ZB.js} +1 -1
- package/assets/{rotate-ccw-BnOnXWwJ.js → rotate-ccw-Bzq8EhGC.js} +1 -1
- package/assets/{row-actions-BRcqU2jb.js → row-actions-tee4trsN.js} +1 -1
- package/assets/{search-scope-Dx4M0USV.js → search-scope-BIANZLZE.js} +1 -1
- package/assets/{search-token-index-1fhAZZdx.js → search-token-index-BIsBiA79.js} +1 -1
- package/assets/{search-view-DOHdnfJ_.js → search-view-DN1bu7qk.js} +1 -1
- package/assets/{senders-DaxexAu8.js → senders-BSTteGCk.js} +1 -1
- package/assets/settings-BqHUpfzM.js +1 -0
- package/assets/{settings-screen-_qBYDWrE.js → settings-screen-86W8q73W.js} +1 -1
- package/assets/{shield-check-D5ncMely.js → shield-check-Bp93fhHW.js} +1 -1
- package/assets/{suggested-vips-B379b3iL.js → suggested-vips--3VtyrEu.js} +1 -1
- package/assets/{useDebouncedValue-D1InyA4p.js → useDebouncedValue-BeknqUM6.js} +1 -1
- package/assets/{useFilters-CmsreEn5.js → useFilters-TQW6REqU.js} +1 -1
- package/assets/{useLabels-DCqyjgPT.js → useLabels-DJ5uuui0.js} +1 -1
- package/assets/{useMediaQuery-BK5or2PB.js → useMediaQuery-DU7djm18.js} +1 -1
- package/assets/{useMessageBodyContent-CVn84V2p.js → useMessageBodyContent-CbE0xQAo.js} +1 -1
- package/assets/{useRefreshControl-DrMBODto.js → useRefreshControl-BG24E6Tw.js} +1 -1
- package/assets/useSearchMirror-RdXuaDuQ.js +1 -0
- package/assets/{useSearchTokenContext-B1wY1D6x.js → useSearchTokenContext-BKIbbSP5.js} +1 -1
- package/assets/{useSemanticSearch-T0VLPoeB.js → useSemanticSearch-7VfKGRpn.js} +1 -1
- package/assets/{useSignature-3fHNsxg0.js → useSignature-Dds9H_qB.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/assets/_mailboxId-BwvD545v.js +0 -1
- package/assets/_messageId-B7e3niee.js +0 -1
- package/assets/_messageId-BMzMhSCa.js +0 -1
- package/assets/_messageId-CAGCka87.js +0 -1
- package/assets/_outboxMessageId-Sme7diVl.js +0 -1
- package/assets/_threadId-B-KDOwEK.js +0 -1
- package/assets/_threadId-B97w-HHH.js +0 -1
- package/assets/_threadId-Di5n0E6V.js +0 -1
- package/assets/brief-CGlrdfw4.js +0 -1
- package/assets/compose._-_outboxMessageId_-8Cyj27QE.js +0 -1
- package/assets/compose._-_outboxMessageId_-CKYQLRKs.js +0 -1
- package/assets/compose._-_outboxMessageId_-CkX8PJGb.js +0 -1
- package/assets/compose._-_outboxMessageId_-DMADI07n.js +0 -1
- package/assets/flagged-bpTQDjL9.js +0 -1
- package/assets/index-B7e3niee.js +0 -1
- package/assets/index-By1rSUF4.js +0 -1
- package/assets/index-CAGCka87.js +0 -1
- package/assets/index-CqU0xnHr.js +0 -1
- package/assets/index-Ddo7w4Sb.js +0 -1
- package/assets/index-Dh0JGuX_.js +0 -1
- package/assets/index-PFxrJR4d.js +0 -1
- package/assets/index-m8aejppI.js +0 -1
- package/assets/mail-Bsf8m9fI.js +0 -1
- package/assets/outbox-DPrFHNKR.js +0 -1
- package/assets/settings-BtPqYLcp.js +0 -1
- package/assets/useSearchMirror-BymMZDR6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as L,bM as p,n,a7 as l,bN as d,r as o,bO as y,bP as c,bQ as g}from"./index-
|
|
1
|
+
import{s as L,bM as p,n,a7 as l,bN as d,r as o,bO as y,bP as c,bQ as g}from"./index-DLL-HX3j.js";const u=e=>y({path:{accountId:e}}),f=e=>{const s=L({...p({path:{accountId:e??""}}),enabled:!!e});return{labels:s.data?.items??[],isPending:s.isPending,isError:s.isError,error:s.error,refetch:s.refetch}},m=e=>{const s=n(),t=l({...d(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutateAsync:r}=t;return{createLabel:o.useCallback((a,i="Default")=>e?r({path:{accountId:e},body:{name:a,color:i}}):Promise.reject(new Error("No account")),[e,r]),isPending:t.isPending,isError:t.isError,error:t.error,reset:t.reset}},h=e=>{const s=n(),t=l({...c(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutate:r}=t;return{updateLabel:o.useCallback((a,i)=>{e&&r({path:{accountId:e,labelId:a},body:i})},[e,r]),isPending:t.isPending,updatingLabelId:t.isPending?t.variables?.path.labelId:void 0}},C=e=>{const s=n(),t=l({...g(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutate:r}=t;return{deleteLabel:o.useCallback(a=>{e&&r({path:{accountId:e,labelId:a}})},[e,r]),isPending:t.isPending,deletingLabelId:t.isPending?t.variables?.path.labelId:void 0}};export{f as a,h as b,C as c,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-DLL-HX3j.js";const r=1024,c=`(min-width: ${r}px) and (not ((orientation: portrait) and (pointer: coarse)))`,d=e=>{const[o,n]=s.useState(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches);return s.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const t=window.matchMedia(e);n(t.matches);const a=i=>n(i.matches);return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e]),o},m=()=>d(c);export{c as D,d as a,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as M,c5 as T,c6 as O,w as f,r as i,c7 as P,m as h,j as W,c8 as Y,c9 as V,W as H,k as z,n as J,s as Z,ca as ee,cb as te}from"./index-
|
|
1
|
+
import{G as M,c5 as T,c6 as O,w as f,r as i,c7 as P,m as h,j as W,c8 as Y,c9 as V,W as H,k as z,n as J,s as Z,ca as ee,cb as te}from"./index-DLL-HX3j.js";import{u as se}from"./useMediaQuery-DU7djm18.js";function re(e){const t=M({warn:e?.router===void 0}),s=e?.router||t;return T(s.stores.__store,O(e,s))}function ne(e){const t=M();return T(t.stores.location,O(e,t))}const A="/mail/brief",S="/mail/$mailboxId",v="/mail/outbox",L="/mail/flagged";function oe(e){for(const t of e){if(t.routeId===A)return{list:"brief"};if(t.routeId===L)return{list:"flagged"};if(t.routeId===v)return{list:"outbox"};if(t.routeId===S)return{list:"mailbox",mailboxId:t.params?.mailboxId}}}function Te(e){const t=e.split(/[?#]/)[0].split("/").filter(Boolean);if(t[0]!=="mail")return"";const s=t[1];return s?s==="brief"?A:s==="flagged"?L:s==="outbox"?v:ae(s):""}function Oe(e){if(typeof e!="object"||e===null)return"";const{q:t}=e;return typeof t=="string"?t:""}function ae(e){return`${S}:${e}`}function Pe(e,t){return e===t?!0:e.startsWith(`${t}/`)}function Ae(e){const t=e.split(/[?#]/)[0].split("/").filter(Boolean);return t[0]==="mail"&&t.length>2}function g(){const e=re({select:s=>oe(s.matches)?.list}),t=f({from:"/mail/$mailboxId",shouldThrow:!1});return{list:e,mailboxId:t?.mailboxId}}const k=["intelligence","nav","shortcuts"],ie=["nav","shortcuts"],ue=e=>ie.includes(e),ce=P(k);function x(e){const t=new Set(e.split(",").map(s=>ce.safeParse(s)).filter(s=>s.success).map(s=>s.data));return k.filter(s=>t.has(s))}function w(e){return k.filter(t=>e.includes(t)).join(",")}function Se(){const e=ne({select:t=>w(x(t.hash))});return i.useMemo(()=>x(e),[e])}const le=(e,t)=>!ue(e)&&t;function de(e){return(t="")=>w(x(t).filter(s=>le(s,e)))}function y(){const e=se();return i.useMemo(()=>de(e),[e])}function ve(){const e=h();return i.useCallback(t=>{e({search:!0,hash:w(t),replace:!0,hashScrollIntoView:!1})},[e])}const _="/mail/brief/compose/{-$outboxMessageId}",D="/mail/flagged/compose/{-$outboxMessageId}",B="/mail/outbox/compose/{-$outboxMessageId}",U="/mail/$mailboxId/compose/{-$outboxMessageId}";function F(){const e=f({from:_,shouldThrow:!1}),t=f({from:D,shouldThrow:!1}),s=f({from:B,shouldThrow:!1}),r=f({from:U,shouldThrow:!1});return e??t??s??r}function Le(){return F()!==void 0}function _e(){return F()?.outboxMessageId}function fe(e,t,s){return e==="flagged"?{to:D,params:{outboxMessageId:s}}:e==="outbox"?{to:B,params:{outboxMessageId:s}}:e==="mailbox"&&t?{to:U,params:{mailboxId:t,outboxMessageId:s}}:{to:_,params:{outboxMessageId:s}}}function C(){const e=h(),t=y(),{list:s,mailboxId:r}=g();return i.useCallback((n,o)=>{e({...fe(s,r,n),search:a=>a,hash:o?.keepPanels?!0:t,replace:o?.replace??!1})},[e,t,s,r])}function De(){const e=C();return i.useCallback(()=>e(void 0),[e])}function Be(){const e=C();return i.useCallback(t=>e(t),[e])}function Ue(){const e=C();return i.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function Fe(){const e=h(),t=y(),{list:s,mailboxId:r}=g();return i.useCallback(()=>{const n=a=>a,o=t;if(s==="flagged"){e({to:"/mail/flagged",search:n,hash:o});return}if(s==="outbox"){e({to:"/mail/outbox",search:n,hash:o});return}if(s==="mailbox"&&r){e({to:"/mail/$mailboxId",params:{mailboxId:r},search:n,hash:o});return}e({to:"/mail/brief",search:n,hash:o})},[e,t,s,r])}const me=Y(V);function Ne({fragment:e,...t}){const s=y();return W.jsx(me,{...t,hash:e??s})}const he=["reply","reply-all","forward"],pe=P(he),N="/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}",K="/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}",q="/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}";function G(){const e=f({from:N,shouldThrow:!1}),t=f({from:K,shouldThrow:!1}),s=f({from:q,shouldThrow:!1});return e??t??s}function $(){const e=G();return i.useMemo(()=>{if(!e)return;const t=pe.safeParse(e.mode);return t.success?{kind:"reply",mode:t.data,threadId:e.threadId,sourceMessageId:e.messageId,outboxMessageId:e.outboxMessageId}:{kind:"unknown",segment:e.mode}},[e])}function Ke(){return $()?.kind==="reply"}function Q(e,t,s,r){return e==="flagged"?{to:K,params:{...s,outboxMessageId:r}}:e==="mailbox"&&t?{to:q,params:{...s,mailboxId:t,outboxMessageId:r}}:{to:N,params:{...s,outboxMessageId:r}}}function ge(e,t){if(e?.kind==="reply"&&e.threadId===t.threadId&&e.sourceMessageId===t.messageId)return e.outboxMessageId}function qe(){const e=h(),t=y(),{list:s,mailboxId:r}=g(),n=$();return i.useCallback(o=>{e({...Q(s,r,o,ge(n,o)),search:a=>a,hash:t})},[e,t,s,r,n])}function Ge(e,t,s){if(!(!t||!s))return r=>e({threadId:t,messageId:s,mode:r})}function Qe(){const e=h(),{list:t,mailboxId:s}=g(),r=$();return i.useCallback(n=>{r?.kind==="reply"&&e({...Q(t,s,{threadId:r.threadId,messageId:r.sourceMessageId,mode:r.mode},n),search:o=>o,hash:!0,replace:!0})},[e,t,s,r])}function Xe(){const e=h(),t=y(),{list:s,mailboxId:r}=g(),n=G();return i.useCallback(()=>{if(!n)return;const o=c=>c,a=t,u={threadId:n.threadId,messageId:n.messageId};if(s==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:u,search:o,hash:a});return}if(s==="mailbox"&&r){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{...u,mailboxId:r},search:o,hash:a});return}e({to:"/mail/brief/$threadId/$messageId",params:u,search:o,hash:a})},[e,t,s,r,n])}const ye=e=>{const t=e.filter(n=>!n.isMultipart&&n.disposition!=="attachment"&&n.mediaType==="TEXT"&&n.contentUrl.length>0),s=t.find(n=>n.mediaSubtype.toUpperCase()==="HTML");if(s)return{kind:"html",contentUrl:s.contentUrl};const r=t.find(n=>n.mediaSubtype.toUpperCase()==="PLAIN");return r?{kind:"text",contentUrl:r.contentUrl}:null},R={all:["messages"],detail:e=>[...R.all,"detail",e],body:e=>[...R.detail(e),"body"]};class m extends Error{reason;status;retryAfterSeconds;constructor(t,s,r,n){super(s),this.name="BodyFetchError",this.reason=t,this.status=r,this.retryAfterSeconds=n}}const be=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},Ie=8,xe="x-remit-403-reason",Re=(e,t)=>{const s=t?.trim()??"";return e===401?"auth":e===403?s.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},ke=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,we=(e,t)=>{const s=(t??"").toLowerCase();return!!(e==="text"&&s.startsWith("text/html"))},Ce=async(e,t,s=async()=>null)=>{const r={},n=await s();n&&(r.Authorization=`Bearer ${n}`);const o=await te(e,{headers:r});if(o.status===202)throw new m("not-ready","Message body is still syncing",202,be(o.headers.get("Retry-After")));if(!o.ok){const c=o.headers.get(xe),b=Re(o.status,c);throw new m(b,`Failed to load message body (${o.status} ${o.statusText})`,o.status)}const a=o.headers.get("content-type");if(we(t,a))throw new m("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${a}`);const u=await o.text();if(ke(u,a))throw new m("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return u},$e=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),je=({messageId:e,bodyParts:t,enabled:s=!0})=>{const r=t?ye(t):null,n=H(),{getToken:o}=z(),a=i.useRef(null),u=J(),c=i.useRef(!1),b=i.useRef(null),E=e&&r?`${e}:${r.contentUrl}`:null;b.current!==E&&(b.current=E,c.current=!1);const l=Z({queryKey:e?[...R.body(e),r?.contentUrl??null]:["messages","body","noop"],queryFn:()=>{if(!r)throw new Error("No renderable body part");if(!e)throw new Error("No messageId");const p=c.current;return c.current=!1,$e({fetchContent:(d,j)=>Ce(d,j,o),refetchDescribeMessage:()=>u.refetchQueries({queryKey:ee({path:{messageId:e}})})},{contentUrl:r.contentUrl,kind:r.kind,isRetryAfterNotReady:p})},enabled:s&&!!e&&!!r,staleTime:300*1e3,gcTime:1800*1e3,retry:(p,d)=>d instanceof m&&d.reason==="not-ready"?p<Ie:p<1,retryDelay:(p,d)=>d instanceof m&&d.reason==="not-ready"?(c.current=!0,(d.retryAfterSeconds??1)*1e3):1e3,meta:{softError:!0}}),I=l.isLoading&&!!r;i.useEffect(()=>{I&&(a.current=performance.now())},[I]),i.useEffect(()=>{l.isSuccess&&a.current!==null&&(n.recordTiming("message.body.load",Math.round(performance.now()-a.current)),a.current=null)},[l.isSuccess,n]);const X=l.data&&r?{kind:r.kind,body:l.data}:void 0;return{picked:r,data:X,isLoading:I,isError:l.isError,error:l.error,refetch:l.refetch}};export{m as B,Ne as N,ne as a,Se as b,ve as c,re as d,Oe as e,Le as f,oe as g,Ke as h,ue as i,Pe as j,_e as k,Ae as l,Te as m,Be as n,y as o,qe as p,je as q,Ge as r,Ue as s,Fe as t,De as u,Qe as v,Xe as w,Re as x,$ as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as E,e as q,b as j,B as D,r as i,ax as R,n as C,l as K,W as A,K as Q,J as $,L as z,N as B}from"./index-
|
|
1
|
+
import{j as E,e as q,b as j,B as D,r as i,ax as R,n as C,l as K,W as A,K as Q,J as $,L as z,N as B}from"./index-DLL-HX3j.js";import{C as G}from"./circle-check-big-BPR47Bil.js";import{R as H,c as N}from"./search-token-index-BIsBiA79.js";function oe({state:e,onRefresh:t,label:s,errorMessage:a,hasUpdate:n,size:u="sm",className:c}){const o=e==="refreshing",f=e==="error",h=e==="success",g=f?E.jsx(q,{className:"size-4 text-danger"}):h?E.jsx(G,{className:"size-4 text-positive"}):E.jsx(H,{className:j("size-4",o&&"animate-spin")}),y=f?`${s} — failed: ${a??"try again"}`:o?`${s} — refreshing`:h?`${s} — up to date`:n?`${s} — new mail`:s;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(D,{variant:"ghost",size:u,icon:g,onClick:t,disabled:o,"aria-label":y,"aria-busy":o||void 0,title:f?a:s,className:c}),e==="idle"&&n&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const W=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function P(e){return!!e&&W.has(e)}const L=3e3,U=L*2,M={syncing:!1,resolved:!1,synced:0,total:0};function ie(e,t){const s=e.join(","),[a,n]=i.useState(!1),[u,c]=i.useState(!1);i.useEffect(()=>{n(!1),c(!1)},[s,t]),i.useEffect(()=>{if(!t)return;const r=setTimeout(()=>c(!0),U);return()=>clearTimeout(r)},[s,t]);const o=N({queries:e.map(r=>({...R({path:{accountId:r}}),enabled:t&&!a,refetchInterval:L,meta:{softError:!0}}))}),f=o.every(r=>r.isSuccess||r.isError),h=o.length===0||f||u;let g=!1,y=0,w=0;for(const r of o)if(P(r.data?.syncPhase)){g=!0;for(const l of r.data?.mailboxes??[])y+=l.messagesSynced,w+=l.messagesTotal}const S=t&&h&&!g;return i.useEffect(()=>{S&&n(!0)},[S]),!t||!h?M:{syncing:g,resolved:!0,synced:y,total:w}}const k=6e4,I=new Set(["sent","drafts","trash","archive"]),v=(e,t)=>{const s=new Map;for(const a of e){const n=t.get(a.mailboxId)?.role;n&&I.has(n)||s.set(a.mailboxId,a.messagesTotal)}return s},J=(e,t)=>{for(const[s,a]of t)if(a>(e.get(s)??0))return!0;return!1},_=i.createContext(null),X=()=>{const e=i.useContext(_);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function ce({accountIds:e,children:t}){const s=C(),{resultFolderIndex:a}=K(),n=i.useRef(new Map),u=i.useRef(new Set),[c,o]=i.useState(new Set),f=N({queries:e.map(r=>({...R({path:{accountId:r}}),refetchInterval:k,staleTime:k,meta:{softError:!0}}))}),h=f.map(r=>r.dataUpdatedAt).join(","),g=e.join(",");i.useEffect(()=>{let r=!1;const l=new Set(c);e.forEach((d,x)=>{const p=f[x]?.data;if(!p)return;const m=v(p.mailboxes??[],a);if(!u.current.has(d)){u.current.add(d),n.current.set(d,m);return}if(l.has(d))return;const T=n.current.get(d)??new Map;J(T,m)&&(l.add(d),r=!0)}),r&&o(l)},[g,h]);const y=i.useCallback(r=>r.some(l=>c.has(l)),[c]),w=i.useCallback(r=>{o(l=>{if(r.every(x=>!l.has(x)))return l;const d=new Set(l);for(const x of r)d.delete(x);return d});for(const l of r){const d=s.getQueryData(R({path:{accountId:l}}).queryKey);n.current.set(l,v(d?.mailboxes??[],a)),u.current.add(l)}},[s,a]),S=i.useMemo(()=>({hasNewMail:y,acknowledge:w}),[y,w]);return E.jsx(_.Provider,{value:S,children:t})}const V=2e3,Y=45e3,Z=e=>new Promise(t=>setTimeout(t,e)),b=e=>e instanceof Error&&e.message?e.message:"Something went wrong",ee=e=>{z(e,{softError:!0},"user")&&B(e)},F=e=>e.reduce((t,s)=>Math.max(t,s.lastSyncedAt??0),0),O=(e,t)=>e.fetchQuery({...R({path:{accountId:t}}),staleTime:0}),se=async(e,t,s,a)=>{let n=!1;for(;;){const u=await O(e,t).then(f=>({ok:!0,data:f})).catch(f=>({ok:!1,error:f}));if(!u.ok)return{accountId:t,message:b(u.error)};const{syncPhase:c,mailboxes:o}=u.data;if(P(c))n=!0;else if(n||F(o??[])>s)return c==="error"?{accountId:t,message:"Sync failed for this account"}:void 0;if(Date.now()>=a)return{accountId:t,message:"Refresh is taking longer than usual"};await Z(V)}},te=async(e,t,s,a)=>{const n=await O(e,s).then(o=>({ok:!0,maxLastSynced:F(o.mailboxes??[])})).catch(o=>({ok:!1,error:o}));if(!n.ok)return{accountId:s,enqueued:!1,ok:!1,message:b(n.error)};const u=await $({path:{accountId:s},throwOnError:!0}).then(()=>({ok:!0})).catch(o=>({ok:!1,error:o}));if(!u.ok)return ee(u.error),{accountId:s,enqueued:!1,ok:!1,message:b(u.error)};t.recordEvent("sync.triggered");const c=await se(e,s,n.maxLastSynced,a);return c?{accountId:s,enqueued:!0,ok:!1,message:c.message}:{accountId:s,enqueued:!0,ok:!0}},ue=(e,t={})=>{const s=C(),a=A(),{acknowledge:n}=X(),[u,c]=i.useState("idle"),[o,f]=i.useState(),h=i.useRef(0),g=i.useRef(e);g.current=e;const y=i.useRef(t);y.current=t,i.useEffect(()=>{if(u!=="success")return;const S=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(S)},[u]);const w=i.useCallback(()=>{const S=g.current;if(S.length===0){c("error"),f("Nothing to refresh yet");return}const r=++h.current;c("refreshing"),f(void 0),(async()=>{const l=Date.now()+Y,d=await Promise.all(S.map(m=>te(s,a,m,l)));if(h.current!==r)return;const x=d.filter(m=>m.enqueued).map(m=>m.accountId);for(const m of x)s.invalidateQueries({queryKey:Q({path:{accountId:m}})});x.length>0&&(y.current.onSettled?.(),n(x));const p=d.filter(m=>!m.ok);p.length===0?c("success"):(c("error"),f(p[0]?.message))})()},[n,s,a]);return{state:u,errorMessage:o,refresh:w}};export{ce as M,oe as R,ue as a,ie as b,P as i,X as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as v,l as x,r as I}from"./index-DLL-HX3j.js";import{d as p,f as g,h as Q,e as b}from"./useMessageBodyContent-CbE0xQAo.js";import{b as q}from"./search-view-DN1bu7qk.js";function W(a){const t=v(),{searchInput:c,searchQuery:e}=x(),i=p({select:o=>b(o.location.search)}),u=p({select:o=>o.location.pathname}),h=g(),f=Q(),m=h||f,{to:s}=a,r="params"in a?a.params.mailboxId:void 0,l=r?`/mail/${r}`:s;I.useEffect(()=>{if(!q({searchInput:c,committedQuery:e,urlQuery:i,pathname:u,listPath:l}))return;const y=!!e&&i!==e&&!m,n=d=>({...d,q:e||void 0});if(!y){t({to:".",search:n,hash:!0,replace:!0});return}if(s==="/mail/$mailboxId"){if(!r)return;t({to:s,params:{mailboxId:r},search:n,hash:!0,replace:!0});return}t({to:s,search:n,hash:!0,replace:!0})},[c,e,i,t,s,r,l,u,m])}export{W as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cf as V,r as g,j as a,b,I as Q,n as q,a5 as Y,a7 as X,a8 as Z,ca as J,bk as ee,k as te,e as se,X as re,by as L,l as ne}from"./index-
|
|
1
|
+
import{cf as V,r as g,j as a,b,I as Q,n as q,a5 as Y,a7 as X,a8 as Z,ca as J,bk as ee,k as te,e as se,X as re,by as L,l as ne}from"./index-DLL-HX3j.js";import{K as k}from"./kbd-Kn37lY8n.js";import{B as ae,q as oe,d as ie}from"./useMessageBodyContent-CbE0xQAo.js";import{i as ce}from"./search-scope-BIANZLZE.js";const le=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},de=()=>`
|
|
2
2
|
/* Zero the UA default body margin and clamp the document to the iframe width so
|
|
3
3
|
wide author markup can't push the body (and the page) past the viewport. */
|
|
4
4
|
html, body {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as T,a5 as I,a7 as C,bv as k,bH as A,r as v,j as p,bI as h,bJ as E,bK as j,l as D,s as R,bL as z,by as Q}from"./index-
|
|
1
|
+
import{n as T,a5 as I,a7 as C,bv as k,bH as A,r as v,j as p,bI as h,bJ as E,bK as j,l as D,s as R,bL as z,by as Q}from"./index-DLL-HX3j.js";import{P as w}from"./attachment-file-CKdTsgvP.js";import{E as O,F as P,ao as _,ap as N}from"./MailListHeader-DMttBs-5.js";import{a as q}from"./useLabels-DJ5uuui0.js";import{d as F}from"./useMessageBodyContent-CbE0xQAo.js";import{n as H}from"./search-query-Cr_ZXBCp.js";import{s as U}from"./search-scope-BIANZLZE.js";import{u as B,p as G}from"./useSearchTokenContext-BKIbbSP5.js";const ne=e=>{const t=new Set;for(const a of e)a&&t.add(a);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}},K=e=>{const{mailboxId:t,messages:a}=e,c=T(),{pushError:l}=I(),{mutateAsync:i,isPending:o}=C({...A(),onError:(n,u)=>{l({title:u.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:k(n),error:n})},onSettled:(n,u,d)=>{O(c,P(_(d.body.messageIds??[],a??[],t)))}});return{applyLabel:v.useCallback((n,u,d)=>{n.length!==0&&N(n,m=>i({body:{messageIds:m,labelId:u,action:d}}))},[i]),isPending:o}};function re({accountId:e,mailboxId:t,messageIds:a}){const{labels:c}=q(e),{applyLabel:l}=K({mailboxId:t}),i=v.useMemo(()=>c.map(o=>({key:o.labelId,label:o.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${E(o.color)?h[o.color]:h.Default}`}),onSelect:()=>l(a,o.labelId,"Apply")})),[c,a,l]);return i.length===0?null:p.jsx(w,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(j,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:i,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 J=20,V=new Set(Object.values(Q)),$=e=>e!==void 0&&V.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 ie({mailboxId:e,filterCategory:t}={}){const{searchQuery:a}=D(),c=B(),l=F({select:s=>s.matches}),i=H(a),{freeText:o,tokens:r}=G(i,c),n=o.length>0,u=r.find(s=>s.type==="category"),d=$(t)??u?.category,m=r.some(s=>s.type==="hasAttachment")?!0:void 0,b=r.some(s=>s.type==="isStarred")?!0:void 0,y=W(r),f=r.find(s=>s.type==="after"),g=r.find(s=>s.type==="before"),S=r.find(s=>s.type==="in"),x=U({matches:l,callerMailboxId:e,inTokenMailboxId:S?.mailboxId}),{data:L,isLoading:M}=R({...z({query:{query:o,mailboxId:x,limit:J,...d!==void 0?{category:d}:{},...m!==void 0?{hasAttachment:m}:{},...b!==void 0?{hasStars:b}:{},...y!==void 0?{isRead:y}:{},...f?{sentDateFrom:f.epochSeconds}:{},...g?{sentDateTo:g.epochSeconds}:{}}}),enabled:n,staleTime:6e4});return{hits:L?.items??[],isLoading:n&&M}}export{re as L,ne as r,ie as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as g,a5 as p,s as f,Q as m,r,a7 as y,a8 as T,V as E,a9 as x}from"./index-
|
|
1
|
+
import{n as g,a5 as p,s as f,Q as m,r,a7 as y,a8 as T,V as E,a9 as x}from"./index-DLL-HX3j.js";const i={html:"",plainText:""},d=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({...x(),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{d 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-DLL-HX3j.js"></script>
|
|
42
42
|
<link rel="stylesheet" crossorigin href="/assets/index-OWhz0EKb.css">
|
|
43
43
|
</head>
|
|
44
44
|
<body>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Y as m,j as o,U as p}from"./index-FAXmjZ6R.js";import{a}from"./search-view-DOHdnfJ_.js";import{M as r}from"./MailboxPane-BYvBZDbG.js";import{u as e}from"./useSearchMirror-BymMZDR6.js";import"./useMessageBodyContent-CVn84V2p.js";import{f as s}from"./search-token-index-1fhAZZdx.js";import"./FullCompose-BYhiYm_v.js";import"./ErrorState-D8sE7Pfl.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./useMediaQuery-BK5or2PB.js";import"./confirm-dialog-D6LTn1UC.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./search-scope-Dx4M0USV.js";import"./useRefreshControl-DrMBODto.js";import"./circle-check-big-CWYNhI41.js";import"./MailListHeader-DP2Oq6aG.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./MailViewChrome-BFvNfkz6.js";import"./NavMenuButton-BFkQTRSb.js";import"./useLabels-DCqyjgPT.js";import"./useSemanticSearch-T0VLPoeB.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-Bka4oJ5I.js";import"./circle-help-BQdNCn_9.js";import"./circle-check-CegPFcdj.js";function K(){const{mailboxId:t}=m.useParams(),i=s();return e({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{K as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FAXmjZ6R.js";import{F as r}from"./FlaggedPane-fPdu4vb-.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./MailListHeader-DP2Oq6aG.js";import"./search-token-index-1fhAZZdx.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./MailViewChrome-BFvNfkz6.js";import"./wizard-selection-B1bng5Jq.js";function w(){return o.jsx(r.Reading,{})}export{w as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FAXmjZ6R.js";import{M as r}from"./MailboxPane-BYvBZDbG.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./useRefreshControl-DrMBODto.js";import"./circle-check-big-CWYNhI41.js";import"./search-token-index-1fhAZZdx.js";import"./MailListHeader-DP2Oq6aG.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./MailViewChrome-BFvNfkz6.js";import"./NavMenuButton-BFkQTRSb.js";import"./useLabels-DCqyjgPT.js";import"./useSemanticSearch-T0VLPoeB.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-Bka4oJ5I.js";import"./circle-help-BQdNCn_9.js";import"./circle-check-CegPFcdj.js";function H(){return o.jsx(r.Reading,{})}export{H as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-FAXmjZ6R.js";import{B as o}from"./BriefPane-R_viiaK1.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./MailListHeader-DP2Oq6aG.js";import"./search-token-index-1fhAZZdx.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./useRefreshControl-DrMBODto.js";import"./circle-check-big-CWYNhI41.js";import"./useLabels-DCqyjgPT.js";import"./useSemanticSearch-T0VLPoeB.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function C(){return r.jsx(o.Reading,{})}export{C as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FAXmjZ6R.js";import{O as t}from"./OutboxPane-DQlNpyg0.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./circle-check-big-CWYNhI41.js";import"./clock-DCzohYVC.js";import"./row-actions-BRcqU2jb.js";import"./rotate-ccw-BnOnXWwJ.js";import"./NavMenuButton-BFkQTRSb.js";import"./menu-CuvC7U2C.js";import"./format-23Av07Go.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function R(){return o.jsx(t.Reading,{})}export{R as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as o}from"./index-FAXmjZ6R.js";const n=o;export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as o}from"./index-FAXmjZ6R.js";const n=o;export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as o}from"./index-FAXmjZ6R.js";const n=o;export{n as component};
|
package/assets/brief-CGlrdfw4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,U as i}from"./index-FAXmjZ6R.js";import{a as m}from"./search-view-DOHdnfJ_.js";import{B as o}from"./BriefPane-R_viiaK1.js";import{u as p}from"./useSearchMirror-BymMZDR6.js";import"./useMessageBodyContent-CVn84V2p.js";import{f as e}from"./search-token-index-1fhAZZdx.js";import"./FullCompose-BYhiYm_v.js";import"./ErrorState-D8sE7Pfl.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./useMediaQuery-BK5or2PB.js";import"./confirm-dialog-D6LTn1UC.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./search-scope-Dx4M0USV.js";import"./MailListHeader-DP2Oq6aG.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./useRefreshControl-DrMBODto.js";import"./circle-check-big-CWYNhI41.js";import"./useLabels-DCqyjgPT.js";import"./useSemanticSearch-T0VLPoeB.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function F(){const t=e();return p({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{F as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-BYhiYm_v.js";import"./index-FAXmjZ6R.js";import"./ErrorState-D8sE7Pfl.js";import"./index-Bn5xhoaE.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./confirm-dialog-D6LTn1UC.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-BYhiYm_v.js";import"./index-FAXmjZ6R.js";import"./ErrorState-D8sE7Pfl.js";import"./index-Bn5xhoaE.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./confirm-dialog-D6LTn1UC.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-BYhiYm_v.js";import"./index-FAXmjZ6R.js";import"./ErrorState-D8sE7Pfl.js";import"./index-Bn5xhoaE.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./confirm-dialog-D6LTn1UC.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-BYhiYm_v.js";import"./index-FAXmjZ6R.js";import"./ErrorState-D8sE7Pfl.js";import"./index-Bn5xhoaE.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./confirm-dialog-D6LTn1UC.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,U as i}from"./index-FAXmjZ6R.js";import{a as m}from"./search-view-DOHdnfJ_.js";import{F as r}from"./FlaggedPane-fPdu4vb-.js";import{u as p}from"./useSearchMirror-BymMZDR6.js";import"./useMessageBodyContent-CVn84V2p.js";import{f as e}from"./search-token-index-1fhAZZdx.js";import"./FullCompose-BYhiYm_v.js";import"./ErrorState-D8sE7Pfl.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./useMediaQuery-BK5or2PB.js";import"./confirm-dialog-D6LTn1UC.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./search-scope-Dx4M0USV.js";import"./MailListHeader-DP2Oq6aG.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./MailViewChrome-BFvNfkz6.js";import"./wizard-selection-B1bng5Jq.js";function w(){const t=e();return p({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{w as component};
|
package/assets/index-B7e3niee.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FAXmjZ6R.js";import{F as r}from"./FlaggedPane-fPdu4vb-.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./MailListHeader-DP2Oq6aG.js";import"./search-token-index-1fhAZZdx.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./MailViewChrome-BFvNfkz6.js";import"./wizard-selection-B1bng5Jq.js";function w(){return o.jsx(r.Reading,{})}export{w as component};
|
package/assets/index-By1rSUF4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FAXmjZ6R.js";import{M as i}from"./MailboxPane-BYvBZDbG.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./useRefreshControl-DrMBODto.js";import"./circle-check-big-CWYNhI41.js";import"./search-token-index-1fhAZZdx.js";import"./MailListHeader-DP2Oq6aG.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./MailViewChrome-BFvNfkz6.js";import"./NavMenuButton-BFkQTRSb.js";import"./useLabels-DCqyjgPT.js";import"./useSemanticSearch-T0VLPoeB.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-Bka4oJ5I.js";import"./circle-help-BQdNCn_9.js";import"./circle-check-CegPFcdj.js";function H(){return o.jsx(i.Reading,{})}export{H as component};
|
package/assets/index-CAGCka87.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-FAXmjZ6R.js";import{B as o}from"./BriefPane-R_viiaK1.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./MailListHeader-DP2Oq6aG.js";import"./search-token-index-1fhAZZdx.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./useRefreshControl-DrMBODto.js";import"./circle-check-big-CWYNhI41.js";import"./useLabels-DCqyjgPT.js";import"./useSemanticSearch-T0VLPoeB.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function C(){return r.jsx(o.Reading,{})}export{C as component};
|
package/assets/index-CqU0xnHr.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FAXmjZ6R.js";import{F as r}from"./FlaggedPane-fPdu4vb-.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./MailListHeader-DP2Oq6aG.js";import"./search-token-index-1fhAZZdx.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./MailViewChrome-BFvNfkz6.js";import"./wizard-selection-B1bng5Jq.js";function y(){return o.jsx(r.Reading,{})}export{y as component};
|
package/assets/index-Ddo7w4Sb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,$ as o}from"./index-FAXmjZ6R.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
|
package/assets/index-Dh0JGuX_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FAXmjZ6R.js";import{M as r}from"./MailboxPane-BYvBZDbG.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./useRefreshControl-DrMBODto.js";import"./circle-check-big-CWYNhI41.js";import"./search-token-index-1fhAZZdx.js";import"./MailListHeader-DP2Oq6aG.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./MailViewChrome-BFvNfkz6.js";import"./NavMenuButton-BFkQTRSb.js";import"./useLabels-DCqyjgPT.js";import"./useSemanticSearch-T0VLPoeB.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-Bka4oJ5I.js";import"./circle-help-BQdNCn_9.js";import"./circle-check-CegPFcdj.js";function G(){return o.jsx(r.Reading,{})}export{G as component};
|
package/assets/index-PFxrJR4d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FAXmjZ6R.js";import{O as t}from"./OutboxPane-DQlNpyg0.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./circle-check-big-CWYNhI41.js";import"./clock-DCzohYVC.js";import"./row-actions-BRcqU2jb.js";import"./rotate-ccw-BnOnXWwJ.js";import"./NavMenuButton-BFkQTRSb.js";import"./menu-CuvC7U2C.js";import"./format-23Av07Go.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function d(){return o.jsx(t.Reading,{})}export{d as component};
|
package/assets/index-m8aejppI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-FAXmjZ6R.js";import{B as o}from"./BriefPane-R_viiaK1.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./useMessageBodyContent-CVn84V2p.js";import"./useMediaQuery-BK5or2PB.js";import"./search-scope-Dx4M0USV.js";import"./MailListHeader-DP2Oq6aG.js";import"./search-token-index-1fhAZZdx.js";import"./attachment-file-5wLk0YdL.js";import"./mail-DoUd-22G.js";import"./avatar-Dt7R_F-I.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./ErrorState-D8sE7Pfl.js";import"./format-23Av07Go.js";import"./download-D7diTZFq.js";import"./shield-check-D5ncMely.js";import"./useFilters-CmsreEn5.js";import"./confirm-dialog-D6LTn1UC.js";import"./clock-DCzohYVC.js";import"./menu-CuvC7U2C.js";import"./useRefreshControl-DrMBODto.js";import"./circle-check-big-CWYNhI41.js";import"./useLabels-DCqyjgPT.js";import"./useSemanticSearch-T0VLPoeB.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function D(){return r.jsx(o.Reading,{})}export{D as component};
|
package/assets/mail-Bsf8m9fI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as z,r as c,u as Fe,j as e,S as De,a as pe,b as w,C as te,d as se,e as _e,f as ge,F as Be,g as Ke,X as be,T as Qe,O as Ve,M as qe,A as He,h as $e,I as Ue,i as ve,B as F,k as We,l as ye,m as G,o as je,n as Se,p as Ge,q as Y,s as Ne,t as Ye,v as Je,w as Xe,x as $,y as Ze,z as et,D as tt,E as st,G as at,H as nt,J as rt,K as ot,L as it,N as lt,P as ct,Q as ut,R as dt,U as mt}from"./index-FAXmjZ6R.js";import{B as xt,S as ht,D as ft,a as pt,b as gt,u as bt,s as vt,c as J,K as yt,d as jt,e as St,f as Nt,g as Ct,h as kt,i as wt}from"./search-token-index-1fhAZZdx.js";import{u as X,a as Ce,l as It,N as P,b as U,m as ae,c as Mt,d as Ot,e as Et,i as Rt,f as Pt,g as Lt}from"./useMessageBodyContent-CVn84V2p.js";import{P as At}from"./pencil-pBHc1n_Y.js";import{c as zt,s as Tt,M as Ft}from"./search-view-DOHdnfJ_.js";import{u as Dt,a as _t,R as Bt,M as Kt}from"./useRefreshControl-DrMBODto.js";import{M as Qt}from"./menu-CuvC7U2C.js";import{B as ke}from"./bug-7hXaNjfy.js";import{A as Vt}from"./avatar-Dt7R_F-I.js";import{i as qt}from"./outbox-status-BlKn6P0x.js";import{E as Ht}from"./ErrorState-D8sE7Pfl.js";import{K as ne}from"./kbd-BU8IaqEZ.js";import{u as $t}from"./index-Bn5xhoaE.js";import{u as Ut}from"./useDebouncedValue-D1InyA4p.js";import"./search-scope-Dx4M0USV.js";import"./useMediaQuery-BK5or2PB.js";import"./FullCompose-BYhiYm_v.js";import"./confirm-dialog-D6LTn1UC.js";import"./circle-check-big-CWYNhI41.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";const Wt=z("BookmarkPlus",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}],["line",{x1:"12",x2:"12",y1:"7",y2:"13",key:"1cppfj"}],["line",{x1:"15",x2:"9",y1:"10",y2:"10",key:"1gty7f"}]]);const Gt=z("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);const we=z("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);const Ie=z("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Yt=z("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),Jt="button:not([disabled]), a[href]",E="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface-sunken";function Xt({active:t,dimmed:s,indent:a}){return w("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors",E,a&&"pl-7",t?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg",s&&"opacity-55")}function Zt({icon:t,label:s,count:a,active:n}){return e.jsxs(e.Fragment,{children:[t&&e.jsx("span",{className:w("shrink-0",n?"text-accent-2":"text-fg-subtle"),children:t}),e.jsx("span",{className:"flex-1 truncate",children:s}),a!=null&&a>0&&e.jsx("span",{className:w("text-2xs tabular-nums",n?"text-accent-2":"text-fg-subtle"),children:a})]})}function L({icon:t,label:s,count:a,active:n,dimmed:r,indent:o,navId:l,linkComponent:u,ariaLabel:h,title:x,onClick:b}){const d=Xt({active:n,dimmed:r,indent:o}),f=e.jsx(Zt,{icon:t,label:s,count:a,active:n});return l&&u?u({navId:l,className:d,ariaLabel:h??s,title:x,onClick:b,children:f}):e.jsx("button",{type:"button",onClick:b,className:d,"aria-label":h,title:x,children:f})}const re={inbox:0,flagged:1,drafts:2,sent:3,archive:4,all:5,junk:6,trash:7};function es(t){switch(t){case"inbox":return e.jsx(Ue,{className:"size-4"});case"flagged":return e.jsx(pe,{className:"size-4"});case"drafts":return e.jsx($e,{className:"size-4"});case"sent":return e.jsx(ge,{className:"size-4"});case"archive":return e.jsx(He,{className:"size-4"});case"all":return e.jsx(qe,{className:"size-4"});case"junk":return e.jsx(Ve,{className:"size-4"});case"trash":return e.jsx(Qe,{className:"size-4"})}}const oe=t=>t.role!=null,H=8,ie="remit.nav.folders.open.",le="remit.nav.account.open.";function ce(t,s,a){if(typeof localStorage>"u")return a;const n=localStorage.getItem(t+s);return n===null?a:n!=="0"}function ue(t,s,a){typeof localStorage>"u"||localStorage.setItem(t+s,a?"1":"0")}function ts({query:t,onSelect:s,onRemove:a}){return e.jsxs("div",{className:"group flex w-full items-center gap-1 rounded-md pr-1 hover:bg-surface",children:[e.jsxs("button",{type:"button",onClick:s,className:w("flex min-w-0 flex-1 items-center gap-2 px-2 py-1 text-left text-sm text-fg-muted transition-colors hover:text-fg",E),children:[e.jsx(Ke,{className:"size-4 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t})]}),a&&e.jsx("button",{type:"button",onClick:a,"aria-label":`Remove saved search: ${t}`,className:w("shrink-0 rounded-full p-1 text-fg-subtle opacity-0 transition-opacity hover:bg-surface-sunken hover:text-fg group-hover:opacity-100 focus-visible:opacity-100",E),children:e.jsx(be,{className:"size-3.5"})})]})}function ss({savedSearches:t,saveableQuery:s,onSelectSavedSearch:a,onRemoveSavedSearch:n,onSaveCurrentSearch:r}){return t.length===0&&!s?null:e.jsxs("div",{className:"mt-3",children:[e.jsx("div",{className:"px-2 pb-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Saved searches"}),s&&e.jsxs("button",{type:"button",onClick:r,className:w("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-accent transition-colors hover:bg-surface",E),children:[e.jsx(Wt,{className:"size-4 shrink-0"}),e.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["Save “",s,"”"]})]}),t.map(o=>e.jsx(ts,{query:o,onSelect:()=>a?.(o),onRemove:n?()=>n(o):void 0},o))]})}function as({account:t,selectedNavId:s,onSelectNav:a,linkComponent:n}){const[r,o]=c.useState(()=>ce(le,t.id,!0)),[l,u]=c.useState(()=>ce(ie,t.id,!0)),[h,x]=c.useState(!1),b=()=>{o(i=>{const v=!i;return ue(le,t.id,v),v})},d=()=>{u(i=>{const v=!i;return ue(ie,t.id,v),v})},f=t.mailboxes.filter(oe).sort((i,v)=>re[i.role]-re[v.role]),p=t.mailboxes.filter(i=>!oe(i)),g=h||p.length<=H?p:p.slice(0,H),j=p.length-g.length,y=t.status??"ready",A=y==="ready"&&f.length===0&&p.length===0;return e.jsxs("div",{className:"mt-3",children:[e.jsxs("button",{type:"button",onClick:b,"aria-expanded":r,className:w("flex w-full items-center gap-1.5 px-2 pb-1 text-left transition-colors hover:text-fg",E,t.muted&&"opacity-55"),children:[r?e.jsx(te,{className:"size-3 shrink-0 text-fg-subtle"}):e.jsx(se,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),t.muted&&e.jsxs(e.Fragment,{children:[e.jsx(xt,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:"muted"})]})]}),r&&e.jsxs(e.Fragment,{children:[y==="loading"&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"Loading…"}),y==="error"&&e.jsxs("div",{role:"alert",className:"mx-2 my-1 flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-2 py-1.5 text-sm",children:[e.jsx(_e,{className:"mt-0.5 size-4 shrink-0 text-danger","aria-hidden":"true"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("p",{className:"font-medium text-danger",children:"Couldn't load mailboxes"})}),t.onRetry&&e.jsx("button",{type:"button",onClick:t.onRetry,className:"shrink-0 text-sm font-medium text-accent hover:underline",children:"Retry"})]}),A&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"No mailboxes"}),y==="ready"&&e.jsxs(e.Fragment,{children:[f.map(i=>e.jsx(L,{navId:i.id,linkComponent:n,icon:es(i.role),label:i.name,ariaLabel:i.name,title:i.fullPath??i.name,count:i.unseen,active:s===i.id,dimmed:t.muted,onClick:()=>a?.(i.id)},i.id)),t.outboxPending!==void 0&&e.jsx(L,{navId:"outbox",linkComponent:n,icon:e.jsx(ge,{className:"size-4"}),label:"Outbox",ariaLabel:"Outbox",count:t.outboxPending>0?t.outboxPending:void 0,active:s==="outbox",dimmed:t.muted,onClick:()=>a?.("outbox")}),p.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:d,"aria-expanded":l,className:w("mt-1 flex w-full items-center gap-1 px-2 py-1 text-left text-2xs font-semibold uppercase tracking-wider text-fg-subtle transition-colors hover:text-fg",E),children:[l?e.jsx(te,{className:"size-3 shrink-0"}):e.jsx(se,{className:"size-3 shrink-0"}),e.jsx("span",{className:"flex-1",children:"Folders"}),e.jsx("span",{className:"tabular-nums opacity-70",children:p.length})]}),l&&e.jsxs(e.Fragment,{children:[g.map(i=>e.jsx(L,{navId:i.id,linkComponent:n,icon:e.jsx(Be,{className:"size-4"}),label:i.name,ariaLabel:i.name,title:i.fullPath??i.name,count:i.unseen,active:s===i.id,dimmed:t.muted,onClick:()=>a?.(i.id)},i.id)),(j>0||h)&&p.length>H&&e.jsx("button",{type:"button",onClick:()=>x(i=>!i),className:w("ml-7 flex items-center px-2 py-1 text-2xs font-medium text-accent transition-colors hover:underline",E),children:h?"Show less":`Show all (${p.length})`})]})]})]})]})]})}function ns({accounts:t,selectedNavId:s,briefUnseen:a,onSelectNav:n,variant:r="desktop",linkComponent:o,calendarNav:l="hidden",savedSearches:u=[],saveableQuery:h,onSelectSavedSearch:x,onRemoveSavedSearch:b,onSaveCurrentSearch:d}){const f=c.useRef(null);Fe({containerRef:f,itemSelector:Jt});const p=r==="drawer",g=e.jsxs("nav",{ref:p?f:void 0,className:p?"px-2 py-2":"flex-1 overflow-y-auto px-2 py-2","aria-label":"Mailboxes",children:[e.jsx(L,{navId:"brief",linkComponent:o,icon:e.jsx(De,{className:"size-4"}),label:"Daily brief",ariaLabel:"Daily brief",count:a,active:s==="brief",onClick:()=>n?.("brief")}),l==="shown"&&e.jsx(L,{navId:"calendar",linkComponent:o,icon:e.jsx(Gt,{className:"size-4"}),label:"Calendar",ariaLabel:"Calendar",active:s==="calendar",onClick:()=>n?.("calendar")}),e.jsx(L,{navId:"flagged",linkComponent:o,icon:e.jsx(pe,{className:"size-4"}),label:"Starred",ariaLabel:"Starred",active:s==="flagged",onClick:()=>n?.("flagged")}),e.jsx(ss,{savedSearches:u,saveableQuery:h,onSelectSavedSearch:x,onRemoveSavedSearch:b,onSaveCurrentSearch:d}),t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-sm text-fg-muted",children:"No accounts configured"}):t.map(j=>e.jsx(as,{account:j,selectedNavId:s,onSelectNav:n,linkComponent:o},j.id))]});return p?g:e.jsx("aside",{ref:f,className:"flex h-full w-full flex-col bg-surface-sunken",children:g})}function rs({leading:t,search:s,actions:a,className:n}){return e.jsxs("header",{className:w("flex min-h-pane-header w-full shrink-0 items-center gap-2 border-b border-line bg-canvas px-row-inset py-1",n),children:[t&&e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:t}),e.jsx("div",{className:"flex min-w-0 flex-1 justify-start",children:e.jsx("div",{className:"w-full max-w-xs transition-[max-width] duration-150 ease-out focus-within:max-w-lg",children:s})}),a&&e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:a})]})}function os(){const t=ve();if(!t)return null;const s=t.showNavPane?!t.navCollapsed:!1;return e.jsx(F,{variant:"ghost",size:"sm",icon:e.jsx(Qt,{className:"size-4"}),onClick:t.toggleNav,"aria-label":s?"Hide folders":"Show folders","aria-expanded":s,title:"Folders",className:"shrink-0"})}const is={global:"Search all mail",pending:"Search mail",scoped:"Search this folder"};function ls({search:t,onCompose:s,onReportBug:a,onOpenSettings:n,composeShortcut:r,refreshControl:o,account:l}){return e.jsx(rs,{leading:e.jsx(os,{}),search:e.jsx(ht,{value:t.value,onChange:t.onChange,onClear:t.onClear,onClearQuery:t.onClearQuery,chips:t.chips,onRemoveChip:t.onRemoveChip,placeholder:is[t.scope]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(F,{variant:"ghost",size:"sm",icon:e.jsx(Yt,{className:"size-4"}),title:r?`Compose (${r})`:"Compose","aria-label":"Compose",onClick:s}),e.jsx(F,{variant:"ghost",size:"sm",icon:e.jsx(ke,{className:"size-4"}),title:"Report a bug","aria-label":"Report a bug",onClick:a}),e.jsx(F,{variant:"ghost",size:"sm",icon:e.jsx(Ie,{className:"size-4"}),title:"Settings","aria-label":"Settings",onClick:n}),o,l]})})}const cs=()=>{const t=X(),s=Ce();return It(s.pathname)?null:e.jsx("button",{type:"button",onClick:t,"aria-label":"Compose new message",className:"lg:hidden fixed right-4 z-30 h-14 w-14 rounded-full bg-accent text-accent-fg shadow-lg flex items-center justify-center hover:opacity-90 active:scale-95 transition-all",style:{bottom:"calc(env(safe-area-inset-bottom, 0) + 1rem)"},children:e.jsx(At,{className:"size-6"})})},Me=({children:t})=>{const{Account:s}=We();return e.jsx(s,{children:t})},us=({email:t,onSignOut:s})=>{const a=t??"Account";return e.jsxs(ft,{trigger:e.jsx(Vt,{name:a,email:t??void 0,size:"sm"}),align:"right",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-3 py-2 text-xs text-fg-muted truncate",title:t,"data-testid":"account-menu-email",children:t}),e.jsx(pt,{})]}),e.jsxs(gt,{onClick:s,children:[e.jsx(we,{className:"size-4"}),"Sign out"]})]})},ds=()=>e.jsx(Me,{children:({email:t,signOut:s})=>e.jsx(us,{email:t,onSignOut:s})});function ms({accounts:t}){const{searchInput:s,onSearchChange:a,onSearchClear:n,onSearchClearQuery:r}=ye(),o=G(),l=X(),{scope:u,clearScope:h}=bt(t),x=u.kind==="scoped"?[{id:u.chip.id,label:u.chip.label,tone:"scope"}]:void 0,b=c.useMemo(()=>t.map(j=>j.accountId),[t]),{hasNewMail:d}=Dt(),{state:f,errorMessage:p,refresh:g}=_t(b);return e.jsx(ls,{search:{value:s,scope:u.kind,chips:x,onChange:a,onClear:n,onClearQuery:r,onRemoveChip:h},onCompose:l,onReportBug:je,onOpenSettings:()=>o({to:"/settings/accounts"}),composeShortcut:vt("compose"),refreshControl:e.jsx(Bt,{state:f,onRefresh:g,label:"Refresh all accounts",errorMessage:p,hasUpdate:d(b)}),account:e.jsx(ds,{})})}const Z="remit.savedSearches",xs=25;function _(){try{const t=localStorage.getItem(Z);if(!t)return[];const s=JSON.parse(t);return Array.isArray(s)?s.filter(a=>typeof a=="string"):[]}catch{return[]}}function hs(t){const s=t.trim();if(!s)return _();const a=[s,..._().filter(n=>n!==s)].slice(0,xs);try{localStorage.setItem(Z,JSON.stringify(a))}catch{return a}return a}function fs(t){const s=_().filter(a=>a!==t);try{localStorage.setItem(Z,JSON.stringify(s))}catch{return s}return s}const de=t=>/^\d/.test(t),ps=(t,s)=>{const a=de(t),n=de(s);return a&&!n?-1:!a&&n?1:t.localeCompare(s,void 0,{sensitivity:"base",numeric:!0})};function gs(t,s,a){const n=[],r=[];for(const o of t)s.has(o.mailboxId)?n.push(o):r.push(o);return r.sort((o,l)=>ps($(o,void 0,a),$(l,void 0,a))),{system:n,labels:r}}function bs(t,s,a){const n=Ze(s)&&t.unseenCount>0;return{id:t.mailboxId,name:$(t,s,a),unseen:n?t.unseenCount:void 0,role:s,fullPath:t.fullPath}}function vs(){const t=Ce(),s=Xe({strict:!1});return t.pathname.startsWith("/settings")?"settings":t.pathname.startsWith("/mail/outbox")?"outbox":t.pathname.startsWith("/mail/flagged")?"flagged":t.pathname.startsWith("/mail/brief")?"brief":s.mailboxId?s.mailboxId:""}function me({accounts:t,onMailboxSelect:s,variant:a="desktop"}){const n=Se(),r=G(),o=vs(),{searchInput:l,onSearchChange:u}=ye(),[h,x]=c.useState(_),{t:b}=Ge("mail",{useSuspense:!1}),d=c.useCallback((m,N)=>b(m,{defaultValue:N}),[b]),f=J({queries:t.map(m=>({...Y({path:{accountId:m.accountId}}),staleTime:1/0}))}),{data:p}=Ne(Ye()),g=c.useMemo(()=>(p?.items??[]).filter(m=>qt(m.status)).length,[p?.items]),j=c.useMemo(()=>t.map((m,N)=>{const C=f[N],M=C?.data?.items??[],I=Je(m.folderAppointments),{system:O,labels:V}=gs(M,I,d),q=C?.isError?"error":C?.isLoading?"loading":"ready";return{id:m.accountId,label:m.email,email:m.email,muted:!!m.muted,outboxPending:g,status:q,onRetry:()=>C?.refetch(),mailboxes:[...O,...V].map(S=>bs(S,I.get(S.mailboxId),d))}}),[t,f,g,d]),y=m=>{n.invalidateQueries({queryKey:et({path:{mailboxId:m},query:{order:"desc"}})})},A=({navId:m,className:N,ariaLabel:C,title:M,children:I,onClick:O})=>m==="brief"?e.jsx(P,{to:"/mail/brief",search:{q:void 0},activeOptions:{includeSearch:!1},onClick:()=>O?.(),className:N,"aria-label":C,title:M,children:I}):m==="outbox"?e.jsx(P,{to:"/mail/outbox",search:{q:void 0},onClick:()=>O?.(),className:N,"aria-label":C,title:M,children:I}):m==="flagged"?e.jsx(P,{to:"/mail/flagged",search:{q:void 0},onClick:()=>O?.(),className:N,"aria-label":C,title:M,children:I}):m==="settings"?e.jsx(P,{to:"/settings/accounts",onClick:()=>O?.(),className:N,"aria-label":C,title:M,children:I}):e.jsx(P,{to:"/mail/$mailboxId",params:{mailboxId:m},search:{q:void 0},onClick:()=>{y(m),O?.()},className:N,"aria-label":C,title:M,children:I}),i=()=>{u(""),s?.()},v=l.trim(),R=v.length>0&&!h.includes(v)?v:void 0,B=c.useCallback(()=>{R&&x(hs(R))},[R]),K=c.useCallback(m=>{x(fs(m))},[]),Q=c.useCallback(m=>{u(m),r({to:"/mail/brief",search:{q:m}}),s?.()},[u,r,s]);return e.jsx(ns,{accounts:j,selectedNavId:o,onSelectNav:i,linkComponent:A,variant:a,savedSearches:h,saveableQuery:R,onSaveCurrentSearch:B,onSelectSavedSearch:Q,onRemoveSavedSearch:K})}function ys(){return e.jsxs("button",{type:"button",onClick:je,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg",children:[e.jsx(ke,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Report a bug"})]})}function js({accounts:t,onMailboxSelect:s}){return ve()?.showNavPane??!0?e.jsx(me,{accounts:t}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(me,{accounts:t,onMailboxSelect:s,variant:"drawer"})}),e.jsxs("div",{className:"border-t border-line px-2 py-2",children:[e.jsxs(P,{to:"/settings/accounts",onClick:s,children:[e.jsx(Ie,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Settings"})]}),e.jsx(ys,{}),e.jsx(Me,{children:({signOut:r})=>e.jsxs("button",{type:"button",onClick:()=>{s?.(),r()},className:"flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg","data-testid":"sign-out-button",children:[e.jsx(we,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Sign out"})]})})]})]})}const Ss=({isOpen:t,onClose:s})=>{const a=c.useCallback(n=>{n.key==="Escape"&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),s())},[s]);return c.useEffect(()=>{if(t)return window.addEventListener("keydown",a,!0),()=>window.removeEventListener("keydown",a,!0)},[t,a]),t?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx(tt,{label:"Dismiss keyboard shortcuts",onDismiss:s,className:"backdrop-blur-sm"}),e.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:w("relative z-10 max-h-[85vh] w-full max-w-2xl overflow-y-auto","rounded-lg border border-line bg-surface shadow-lg","p-6"),children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard shortcuts"}),e.jsx("button",{type:"button",onClick:s,className:"p-1 text-fg-muted transition-colors hover:text-fg","aria-label":"Close",children:e.jsx(be,{className:"size-5"})})]}),e.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2",children:yt.map(n=>e.jsxs("div",{children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-fg-muted",children:n.title}),e.jsx("div",{className:"space-y-2",children:n.hints.map(r=>e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-sm",children:r.description}),e.jsx("span",{className:"flex shrink-0 items-center gap-1",children:r.keys.map((o,l)=>e.jsxs(c.Fragment,{children:[l>0&&r.keys[0]==="g"&&e.jsx("span",{className:"text-2xs text-fg-subtle",children:"then"}),e.jsx(ne,{children:o})]},o))})]},`${r.action}-${r.keys.join("+")}`))})]},n.title))}),e.jsx("div",{className:"mt-6 border-t border-line pt-4",children:e.jsxs("p",{className:"text-center text-xs text-fg-muted",children:["Press ",e.jsx(ne,{children:"Esc"})," to close"]})})]})]}):null};function Ns(t){const s=J({queries:t.map(a=>({...Y({path:{accountId:a.accountId}}),staleTime:1/0}))});return c.useMemo(()=>jt(s.map(a=>a.data?.items??[])),[s])}const Cs=t=>t.map(s=>s.data?.items??[]);function ks(t){const s=J({queries:t.map(a=>({...Y({path:{accountId:a.accountId}}),staleTime:1/0})),combine:Cs});return c.useMemo(()=>st(t.map((a,n)=>({folderAppointments:a.folderAppointments,mailboxes:s[n]??[]}))),[t,s])}function ws(){const t=at(),s=U({select:x=>ae(x.location.pathname)}),a=U({select:x=>Mt(x.location.search)}),[n,r]=c.useState(a),o=Ut(n,200),[l,u]=c.useState(s);if(l!==s){const x=Tt(l,s,a);u(s),x!==void 0&&r(x)}const h=c.useCallback(x=>{u(ae(t.state.location.pathname)),r(x)},[t]);return{searchInput:n,committedQuery:zt(n,o),viewKey:s,setSearchInput:h}}var T={exports:{}},xe;function Is(){if(xe)return T.exports;xe=1;const t=(s,a,n)=>new Promise((r,o)=>{if(n=Object.assign({concurrency:1/0},n),typeof a!="function")throw new TypeError("Mapper function is required");const{concurrency:l}=n;if(!(typeof l=="number"&&l>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${l}\` (${typeof l})`);const u=[],h=s[Symbol.iterator]();let x=!1,b=!1,d=0,f=0;const p=()=>{if(x)return;const g=h.next(),j=f;if(f++,g.done){b=!0,d===0&&r(u);return}d++,Promise.resolve(g.value).then(y=>a(y,j)).then(y=>{u[j]=y,d--,p()},y=>{x=!0,o(y)})};for(let g=0;g<l&&(p(),!b);g++);});return T.exports=t,T.exports.default=t,T.exports}var Ms=Is();const Os=nt(Ms),Es=900*1e3,Rs=300,Ps=(t,s)=>{if(!t)return s;const a=Number.parseInt(t,10);return Number.isFinite(a)&&a>0?a:s},Ls=60*1e3,As=t=>Math.max(Ps(t,Rs)*1e3,Ls),D=As(ct().mailboxPollIntervalSeconds),zs=5,W=new Set,Ts=(t,s,a=Es)=>t.filter(n=>{const r=n.lastSyncAt;return r==null?!0:s-r>a}).map(n=>n.accountId),Fs=(t,s,a=D)=>t-s>=a,Ds=(t,s)=>t.filter(a=>!s.has(a)),he=(t,s)=>{if(W.delete(t),it(s,{softError:!0},"nobody")){lt(s);return}console.warn("[remit] background mailbox sync failed",{accountId:t,error:s})},fe=(t,s)=>rt({path:{accountId:t},throwOnError:!0}).then(()=>{s.invalidateQueries({queryKey:ot({path:{accountId:t}})})}),_s=t=>{const s=Se(),a=c.useRef(t);a.current=t;const n=t.map(r=>r.accountId).join(",");c.useEffect(()=>{const r=Date.now(),l=Ts(a.current,r).filter(u=>!W.has(u));if(l.length!==0)for(const u of l)W.add(u),fe(u,s).catch(h=>{he(u,h)})},[n,s]),c.useEffect(()=>{let r=Date.now(),o;const l=new Set,u=()=>{r=Date.now();const b=Ds(a.current.map(d=>d.accountId),l);for(const d of b)l.add(d);Os(b,d=>fe(d,s).catch(f=>{he(d,f)}).finally(()=>{l.delete(d)}),{concurrency:zs})},h=()=>{if(document.visibilityState==="visible"){u(),o=setTimeout(h,D);return}},x=()=>{document.visibilityState==="visible"&&Fs(Date.now(),r)&&(o!==void 0&&clearTimeout(o),u(),o=setTimeout(h,D))};return o=setTimeout(h,D),document.addEventListener("visibilitychange",x),()=>{o!==void 0&&clearTimeout(o),document.removeEventListener("visibilitychange",x)}},[n,s])},Oe="remit:intelligence-open";function Bs(){try{return localStorage.getItem(Oe)!=="closed"}catch{return!0}}function Ks(t){try{localStorage.setItem(Oe,t?"open":"closed")}catch{}}function Qs({panels:t,prefersOpen:s,isDesktop:a,hasThread:n}){return t.length>0?t.includes("intelligence"):a&&n&&s}function ua(){const t=G(),s=St(),a=wt(s),n=Ot(),r=Et(),o=n.find(Rt),l=o==="shortcuts",u=o==="nav",h=Nt(),[x,b]=c.useState(Bs),d=Qs({panels:n,prefersOpen:x,isDesktop:s==="desktop",hasThread:h!==void 0}),f=c.useCallback((k,ee)=>{r([...k?["intelligence"]:[],...ee?[ee]:[]])},[r]),p=c.useCallback(k=>{Ks(k),b(k),f(k,o)},[o,f]),g=c.useCallback(k=>{f(d,k)},[d,f]),{searchInput:j,committedQuery:y,viewKey:A,setSearchInput:i}=ws(),{data:v,isLoading:R,isError:B,error:K,refetch:Q}=Ne({...ut(),staleTime:1/0}),m=!!(v&&(v.accounts?.length??0)===0);c.useEffect(()=>{m&&t({to:"/onboarding",replace:!0})},[m,t]),$t({enabled:!l,bindings:[{key:"?",handler:()=>g("shortcuts"),noModifiers:!1,preventDefault:!0}]});const N=X(),C=Pt(),M=U({select:k=>Lt(k.matches)?.list==="mailbox"}),I=c.useMemo(()=>({compose:N}),[N]);Ct({enabled:!M&&!C,handlers:I});const O=c.useCallback(()=>{i("")},[i]),V=c.useCallback(()=>{i("")},[i]),q=c.useCallback(()=>{p(!d)},[p,d]),S=v?.accounts??[],Ee=c.useMemo(()=>S.map(k=>k.accountId),[S]),Re=Ns(S),Pe=ks(S),Le=c.useMemo(()=>kt(S),[S]);_s(S);const Ae=c.useCallback(()=>{o==="nav"&&g(void 0)},[o,g]),ze={accounts:S,mailboxNameIndex:Re,accountNameIndex:Le,resultFolderIndex:Pe,searchQuery:y,searchInput:j,searchViewKey:A,onSearchChange:i,onSearchClear:O,onSearchClearQuery:V,intelligenceOpen:d,onToggleIntelligence:q},Te={isSinglePane:a,isLoading:R||m,intelligenceOpen:d,nav:e.jsx(js,{accounts:S,onMailboxSelect:Ae}),topBar:a?void 0:e.jsx(ms,{accounts:S}),overlay:a?e.jsx(cs,{}):void 0,navOpen:u,onOpenNav:()=>g("nav"),onCloseNav:()=>g(void 0)};return e.jsx(dt.Provider,{value:ze,children:e.jsxs(Kt,{accountIds:Ee,children:[B?e.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:e.jsx(Ht,{title:"Couldn't load your account",error:K,onRetry:()=>{Q()}})}):e.jsx(Ft,{chrome:Te,children:e.jsx(mt,{})}),e.jsx(Ss,{isOpen:l,onClose:()=>g(void 0)})]})})}export{ua as component,ye as useMailContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as i,j as o,U as m}from"./index-FAXmjZ6R.js";import{a as s}from"./search-view-DOHdnfJ_.js";import{O as t}from"./OutboxPane-DQlNpyg0.js";import{u as p}from"./useSearchMirror-BymMZDR6.js";import"./useMessageBodyContent-CVn84V2p.js";import"./FullCompose-BYhiYm_v.js";import"./ErrorState-D8sE7Pfl.js";import"./index-Bn5xhoaE.js";import"./useSignature-3fHNsxg0.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D1InyA4p.js";import"./useMediaQuery-BK5or2PB.js";import"./confirm-dialog-D6LTn1UC.js";import"./useSearchTokenContext-B1wY1D6x.js";import"./kbd-BU8IaqEZ.js";import"./search-scope-Dx4M0USV.js";import"./circle-check-big-CWYNhI41.js";import"./clock-DCzohYVC.js";import"./row-actions-BRcqU2jb.js";import"./rotate-ccw-BnOnXWwJ.js";import"./NavMenuButton-BFkQTRSb.js";import"./menu-CuvC7U2C.js";import"./format-23Av07Go.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function a(){return i({from:"/mail/outbox/draft/$outboxMessageId",shouldThrow:!1})?.outboxMessageId}function $(){const r=a();return p({to:"/mail/outbox"}),o.jsx(t,{outboxMessageId:r,children:o.jsx(s,{phone:o.jsx(t.Phone,{}),list:o.jsx(t.List,{}),reading:o.jsx(m,{})})})}export{$ as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,U as o}from"./index-FAXmjZ6R.js";const n=()=>t.jsx(o,{});export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as v,l as x,r as I}from"./index-FAXmjZ6R.js";import{b as p,f as b,h as g,c as Q}from"./useMessageBodyContent-CVn84V2p.js";import{b as q}from"./search-view-DOHdnfJ_.js";function W(a){const t=v(),{searchInput:n,searchQuery:e}=x(),i=p({select:o=>Q(o.location.search)}),u=p({select:o=>o.location.pathname}),h=b(),f=g(),m=h||f,{to:s}=a,r="params"in a?a.params.mailboxId:void 0,l=r?`/mail/${r}`:s;I.useEffect(()=>{if(!q({searchInput:n,committedQuery:e,urlQuery:i,pathname:u,listPath:l}))return;const y=!!e&&i!==e&&!m,c=d=>({...d,q:e||void 0});if(!y){t({to:".",search:c,hash:!0,replace:!0});return}if(s==="/mail/$mailboxId"){if(!r)return;t({to:s,params:{mailboxId:r},search:c,hash:!0,replace:!0});return}t({to:s,search:c,hash:!0,replace:!0})},[n,e,i,t,s,r,l,u,m])}export{W as u};
|