@remit/web-client-dist 0.0.601 → 0.0.603

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.
Files changed (151) hide show
  1. package/assets/{BriefPane-Dkxhbmf3.js → BriefPane-PoCwW_rw.js} +1 -1
  2. package/assets/CalendarComposePane-CPgvMuhs.js +1 -0
  3. package/assets/{CalendarComposeSeed-DAAWogXI.js → CalendarComposeSeed-BNxq0PPg.js} +1 -1
  4. package/assets/{CalendarShell-Dfhdii1j.js → CalendarShell-D_NxjO1T.js} +1 -1
  5. package/assets/{EmptyState-B8pxCvgq.js → EmptyState-6r0r5FVG.js} +1 -1
  6. package/assets/{ErrorState-BND_1CuC.js → ErrorState-Cjdi1Pbp.js} +1 -1
  7. package/assets/{FlaggedPane-CkWsw0HI.js → FlaggedPane-D2_45Zph.js} +1 -1
  8. package/assets/{FullCompose-L3u0M9jx.js → FullCompose-ZmZmBukk.js} +1 -1
  9. package/assets/{MailListHeader-DiI5otvq.js → MailListHeader-D2YY1oCj.js} +1 -1
  10. package/assets/{MailNav-Bq08jgH1.js → MailNav-dXSXwtSS.js} +1 -1
  11. package/assets/{MailShell-NsicYXmr.js → MailShell-D8B5KgJY.js} +1 -1
  12. package/assets/{MailViewChrome-Dhd5NwZT.js → MailViewChrome-Ca_PpFLh.js} +1 -1
  13. package/assets/{MailboxPane-B2ufgVwI.js → MailboxPane-D0KDT0nA.js} +1 -1
  14. package/assets/{NavMenuButton-DURIiOWw.js → NavMenuButton-UuS12b8o.js} +1 -1
  15. package/assets/{OnboardingWizard-BBQws18N.js → OnboardingWizard-Bg0oMi5d.js} +1 -1
  16. package/assets/{OpenCalendarEvent-DrqU23A_.js → OpenCalendarEvent-eXphsQkd.js} +1 -1
  17. package/assets/{OutboxPane-BdzyB0yX.js → OutboxPane-KyfD-xAT.js} +1 -1
  18. package/assets/_calendarObjectId-bOBkPp1e.js +1 -0
  19. package/assets/_mailboxId-CBnetBDe.js +1 -0
  20. package/assets/_messageId-CC7P0NKV.js +1 -0
  21. package/assets/_messageId-CyzEwcHf.js +1 -0
  22. package/assets/_messageId-D9ErNE0i.js +1 -0
  23. package/assets/_outboxMessageId-BAuSfwjW.js +1 -0
  24. package/assets/_recurrenceId-BYVaWJco.js +1 -0
  25. package/assets/_threadId-Bf_hxH8H.js +1 -0
  26. package/assets/_threadId-DGaPE-UV.js +1 -0
  27. package/assets/_threadId-DNmbMRxQ.js +1 -0
  28. package/assets/_view._date-Buy6VJ4Y.js +1 -0
  29. package/assets/{accounts-D3aQAQEO.js → accounts-slqMhpwq.js} +1 -1
  30. package/assets/{advanced-MuGaRYCq.js → advanced-DJYUnJcM.js} +1 -1
  31. package/assets/{appearance-B_euwBFm.js → appearance-B9Zd5MxX.js} +1 -1
  32. package/assets/{attachment-file-DBmXtWWD.js → attachment-file-bw6jpX2a.js} +1 -1
  33. package/assets/{attendee-row-CFZyUMUp.js → attendee-row-y73RSxi6.js} +1 -1
  34. package/assets/{avatar-DsC7KMh_.js → avatar-C5DZJDZl.js} +1 -1
  35. package/assets/{bottom-sheet-BVoaqyZL.js → bottom-sheet-BMfA1os-.js} +1 -1
  36. package/assets/brief-BSP8cSU6.js +1 -0
  37. package/assets/{brief-DOtEY9cM.js → brief-CWpVPlag.js} +1 -1
  38. package/assets/{browser-ponyfill-BeKHtO0j.js → browser-ponyfill-BtE6DJaU.js} +1 -1
  39. package/assets/{bug-De-q0Zl4.js → bug-XlVUpJy1.js} +1 -1
  40. package/assets/{calendar-color-CXQvTXXO.js → calendar-color-DgHc36b7.js} +1 -1
  41. package/assets/{calendar-event-chip-aW3iXF3m.js → calendar-event-chip-C1T8fqpx.js} +1 -1
  42. package/assets/{calendar-0D1Aok7_.js → calendar-u1hgf3tg.js} +1 -1
  43. package/assets/{calendars-D_BRIbCo.js → calendars-BLCqhIG7.js} +1 -1
  44. package/assets/{card-D5vkdB74.js → card-k-jKWhR7.js} +1 -1
  45. package/assets/chevron-left-CrajKg1c.js +1 -0
  46. package/assets/{circle-check-BG2_X7qM.js → circle-check-DsecdMli.js} +1 -1
  47. package/assets/{circle-check-big-BhJgBM3A.js → circle-check-big-DJeT115E.js} +1 -1
  48. package/assets/{circle-help-DmmRA9UB.js → circle-help-PfoCuRx4.js} +1 -1
  49. package/assets/{clock-C871fqyU.js → clock-BoxKHt-D.js} +1 -1
  50. package/assets/compose._-_outboxMessageId_-B4Esrx1s.js +1 -0
  51. package/assets/compose._-_outboxMessageId_-Bkav_--V.js +1 -0
  52. package/assets/compose._-_outboxMessageId_-DKmOtVWX.js +1 -0
  53. package/assets/compose._-_outboxMessageId_-Eu5BpvJ5.js +1 -0
  54. package/assets/{config-import-C2tOC-s3.js → config-import-Cob6KRxW.js} +1 -1
  55. package/assets/{confirm-dialog-DJwDI10e.js → confirm-dialog-BV8yPk0Z.js} +1 -1
  56. package/assets/{copy-DwoxXH17.js → copy-dsQZ9_Tq.js} +1 -1
  57. package/assets/{credential-steps-DD5HljSU.js → credential-steps-BSDUae-c.js} +1 -1
  58. package/assets/{download-Cg086Q1a.js → download-pgJibm8f.js} +1 -1
  59. package/assets/{file-json-BAHI7df8.js → file-json-BaQxcYdZ.js} +1 -1
  60. package/assets/{filters-DKc4giAx.js → filters-CpRRg5mW.js} +1 -1
  61. package/assets/{flagged-B95s3NdW.js → flagged-6pOoeZxm.js} +1 -1
  62. package/assets/flagged-BFSPdfnJ.js +1 -0
  63. package/assets/{folders-DNYaNs7I.js → folders-Bu7Ke42f.js} +1 -1
  64. package/assets/{help-copy-F4bWua7S.js → help-copy-DlRaQ3-c.js} +1 -1
  65. package/assets/{import-dGEeUqae.js → import-CLgzHXP3.js} +1 -1
  66. package/assets/index-3zQFhWS_.js +1 -0
  67. package/assets/{index-CxubvY-b.js → index-88kWC0mY.js} +1 -1
  68. package/assets/index-BHFrxX5A.js +1 -0
  69. package/assets/index-BRJl-vWl.js +1 -0
  70. package/assets/index-Bh1nz_PB.js +1 -0
  71. package/assets/index-BoTmstF8.js +1 -0
  72. package/assets/index-CyzEwcHf.js +1 -0
  73. package/assets/index-D9ErNE0i.js +1 -0
  74. package/assets/{index-D356i3SP.js → index-DembAj_D.js} +4 -4
  75. package/assets/{index-B7Z_VTQH.js → index-YYH_p-Ox.js} +4 -4
  76. package/assets/index-Z8mU620o.js +1 -0
  77. package/assets/index-d-DkNljh.js +1 -0
  78. package/assets/{kbd-DC1TU-ib.js → kbd-BHWNGlF5.js} +1 -1
  79. package/assets/{labels-N8kTkbQD.js → labels-BEzmtjRK.js} +1 -1
  80. package/assets/{mail-Dc80bLtZ.js → mail-Bw_opxSY.js} +1 -1
  81. package/assets/{mail-CE9mZHRO.js → mail-D_9uR_xf.js} +1 -1
  82. package/assets/{map-pin-fc35L0nf.js → map-pin-C7QrVAH3.js} +1 -1
  83. package/assets/{menu-BFEzC3rH.js → menu-DPopx5EJ.js} +1 -1
  84. package/assets/new-7ha2oCKa.js +1 -0
  85. package/assets/onboarding-DVkSteAy.js +1 -0
  86. package/assets/{onboarding-completion-Cj1X5Vfi.js → onboarding-completion-gdz3-ZZG.js} +1 -1
  87. package/assets/outbox-Chk8Sk4b.js +1 -0
  88. package/assets/{pencil-Bw-KIM6o.js → pencil-701ohwSi.js} +1 -1
  89. package/assets/{refresh-cw-BGeOxWhI.js → refresh-cw-Di3kvivg.js} +1 -1
  90. package/assets/{rich-text-C26wbF1i.js → rich-text-C4evizno.js} +1 -1
  91. package/assets/{rich-text-spellcheck-worker-provider-Dh-4zmjL.js → rich-text-spellcheck-worker-provider-BI4F1onx.js} +1 -1
  92. package/assets/{rotate-ccw-DZYCC0q2.js → rotate-ccw-CY4_PNoH.js} +1 -1
  93. package/assets/{roving-focus-DOho_TJw.js → roving-focus-CFhWtHQV.js} +1 -1
  94. package/assets/{row-actions-CgvAWKly.js → row-actions-e8dcmEFt.js} +1 -1
  95. package/assets/{search-mirror-gwKyvyS3.js → search-mirror-C4Q_FmCR.js} +1 -1
  96. package/assets/{search-token-index-Cp8U_9CO.js → search-token-index-CF-eJ9n9.js} +1 -1
  97. package/assets/{sections-CoGcGCNP.js → sections-BZ0O_NV5.js} +1 -1
  98. package/assets/{senders-5riMSNkV.js → senders-RmiQhHZD.js} +1 -1
  99. package/assets/settings-BtStj6GW.js +1 -0
  100. package/assets/{settings-screen-BbWxKV6I.js → settings-screen-ClyspzuZ.js} +1 -1
  101. package/assets/{shield-check-BTT2FIky.js → shield-check-D9zGpyyh.js} +1 -1
  102. package/assets/{suggested-vips-DrVDQPt6.js → suggested-vips-sI4H9GLc.js} +1 -1
  103. package/assets/{useCalendarData-yJ6hC9z8.js → useCalendarData-B6t-M5Ly.js} +1 -1
  104. package/assets/{useCalendars-fIST617L.js → useCalendars-BIBQT7Wk.js} +1 -1
  105. package/assets/{useDebouncedValue-cuoS7Za9.js → useDebouncedValue-BMYHRqha.js} +1 -1
  106. package/assets/{useFilters-R75OGKuu.js → useFilters-DXXBrpPW.js} +1 -1
  107. package/assets/{useLabels-BhpyswcI.js → useLabels-D8sluUEk.js} +1 -1
  108. package/assets/{useLayoutTier-m2Yj3Bit.js → useLayoutTier-MqmqPhVY.js} +1 -1
  109. package/assets/{useMessageBodyContent-D1pso69a.js → useMessageBodyContent-D-lqah5s.js} +1 -1
  110. package/assets/{useQueries-OnbrANu7.js → useQueries-Dm82vk6v.js} +1 -1
  111. package/assets/{useRefreshControl-ChwiMB1J.js → useRefreshControl-B9v4eUjG.js} +1 -1
  112. package/assets/{useResultFolderIndex-B8NL34jx.js → useResultFolderIndex-D6xs6h1E.js} +1 -1
  113. package/assets/{useSearchTokenContext-BI18VCbl.js → useSearchTokenContext-DMTmSJiu.js} +1 -1
  114. package/assets/{useSemanticSearch-fU6QEg8I.js → useSemanticSearch-zOQZMrAG.js} +1 -1
  115. package/assets/{useSignature-DkKAGoyM.js → useSignature-15aE8XaV.js} +1 -1
  116. package/assets/window-DNm0-rvw.js +1 -0
  117. package/index.html +1 -1
  118. package/package.json +1 -1
  119. package/assets/CalendarComposePane-BD4pTRBc.js +0 -1
  120. package/assets/_calendarObjectId-B1FRBkCC.js +0 -1
  121. package/assets/_mailboxId-CnueEzRZ.js +0 -1
  122. package/assets/_messageId-CcHxaziM.js +0 -1
  123. package/assets/_messageId-CgSbxfQW.js +0 -1
  124. package/assets/_messageId-CzaQd6Rw.js +0 -1
  125. package/assets/_outboxMessageId-CHW97N06.js +0 -1
  126. package/assets/_recurrenceId-cMf0Sjf9.js +0 -1
  127. package/assets/_threadId-Cdt-BTzL.js +0 -1
  128. package/assets/_threadId-CeHzexUr.js +0 -1
  129. package/assets/_threadId-CeZUKd8r.js +0 -1
  130. package/assets/_view._date-L09dCcUu.js +0 -1
  131. package/assets/brief-DiXcsZRQ.js +0 -1
  132. package/assets/chevron-left-CXY1ffcB.js +0 -1
  133. package/assets/compose._-_outboxMessageId_-BgMvbEV2.js +0 -1
  134. package/assets/compose._-_outboxMessageId_-C1zlZc45.js +0 -1
  135. package/assets/compose._-_outboxMessageId_-GGPO338F.js +0 -1
  136. package/assets/compose._-_outboxMessageId_-e4Y8u9ZM.js +0 -1
  137. package/assets/flagged-CnYY4RqX.js +0 -1
  138. package/assets/index-BgxMwZ8G.js +0 -1
  139. package/assets/index-CgSbxfQW.js +0 -1
  140. package/assets/index-CzaQd6Rw.js +0 -1
  141. package/assets/index-DE8DkWf9.js +0 -1
  142. package/assets/index-DYTkkk17.js +0 -1
  143. package/assets/index-Dtbr1c3D.js +0 -1
  144. package/assets/index-Dx-OdWG7.js +0 -1
  145. package/assets/index-Kl2oWgHI.js +0 -1
  146. package/assets/index-dwBc-qt7.js +0 -1
  147. package/assets/new-14h8cu99.js +0 -1
  148. package/assets/onboarding-C6U7Q2aY.js +0 -1
  149. package/assets/outbox-D5Gnyi3x.js +0 -1
  150. package/assets/settings-B4jLnDtd.js +0 -1
  151. package/assets/window-CHmnHHPE.js +0 -1
@@ -1 +1 @@
1
- import{r as p,i as b,eo as x,c as C,ep as I,dW as F,eq as D,h as y,er as N,es as P,et as L,eu as z}from"./index-B7Z_VTQH.js";const B=(e,t)=>{if(e.state==="Expired")return"Expired";if(e.scope!=="Temporary"||!e.expiresAt)return"Active";const r=Date.parse(e.expiresAt);return Number.isNaN(r)?"Active":r<=t?"Expired":"Active"},K=e=>{if(!e)return;const t=Date.parse(e);if(!Number.isNaN(t))return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},M=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,a,i,n]=r,s=new Date(Number(a),Number(i)-1,Number(n),23,59,59,0);if(Number.isNaN(s.getTime()))return;const o=-t.getTimezoneOffset(),d=o>=0?"+":"-",l=Math.abs(o),c=String(Math.floor(l/60)).padStart(2,"0"),f=String(l%60).padStart(2,"0"),u=m=>String(m).padStart(2,"0");return`${s.getFullYear()}-${u(s.getMonth()+1)}-${u(s.getDate())}T${u(s.getHours())}:${u(s.getMinutes())}:${u(s.getSeconds())}${d}${c}:${f}`},h="None",V=e=>!e.literalClauses.some(t=>t.field==="HasWords"),O=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h}),G=({mode:e,ruleScope:t})=>t==="standing"?"standing":t==="until"?"temporary":e==="selected"?"just-these":"all-like-these",X=({mode:e,ruleScope:t,anchorMessageId:r,clauses:a,matchOperator:i,moveMailboxId:n,until:s})=>({...e==="similar"&&r?{anchorMessageId:r}:{},matchOperator:i==="all"?"And":"Or",literalClauses:a.map(o=>({field:o.field,value:o.value})),moveMailboxId:n,expiresAt:t==="until"?M(s??""):void 0}),S=(e,t,r)=>({name:r,scope:t==="standing"?"Standing":"Temporary",...t==="temporary"&&e.expiresAt?{expiresAt:e.expiresAt}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),T=new Set(["Complete","Failed"]),v=e=>e!==void 0&&T.has(e),w=1e3,J=15e3,_=e=>{const t=Math.max(0,e),r=w*2**t;return Math.min(r,J)},$=(e,t,r)=>{if(e)return{kind:r?"restartFailed":"startFailed",error:e};if(t)return{kind:"statusUnreadable",error:t}},Y=e=>{const[t,r]=p.useState(),a=b({...x(),onSuccess:g=>r(g.organizeJobId)}),{mutate:i}=a,n=C({...I({path:{accountId:e??"",organizeJobId:t??""}}),enabled:!!e&&!!t,refetchInterval:g=>{const E=g.state.data?.state;return v(E)?!1:_(g.state.dataUpdateCount)}}),s=p.useCallback(g=>{e&&i({path:{accountId:e},body:O(g)})},[e,i]),{refetch:o}=n,d=p.useCallback(()=>{o()},[o]),l=n.data,c=a.isPending?void 0:l,f=c?.state??a.data?.state,u=v(c?.state),m={state:f,matchedCount:c?.matchedCount??0,appliedCount:c?.appliedCount??0,failedCount:c?.failedCount??0,errorMessage:c?.errorMessage??""};return{start:s,refreshStatus:d,progress:m,isStarting:a.isPending,isRunning:!!t&&!u,isDone:u,failure:$(a.error,n.error,!!l)}},Z=["From","Subject","HasWords","ListId","FromDomain"],k=e=>{const t=e.trim(),r=t.match(/<([^>]+)>/);return(r?r[1]:t).trim().toLowerCase()},ee=(e,t)=>e==="ListId"?k(t):t.trim(),R=e=>e==="all"?"And":"Or",U=(e,t)=>{const r=e.widen!==void 0&&!e.widen.inactive,a=e.clauses.map(i=>({field:i.field,value:i.value}));return{...r&&t?{anchorMessageId:t}:{},matchOperator:R(e.matchOperator),literalClauses:a}},q=e=>e.anchorMessageId!==void 0||!e.literalClauses.some(t=>t.field==="HasWords"),Q=e=>JSON.stringify({anchor:e.anchorMessageId??null,operator:e.matchOperator,clauses:e.literalClauses.map(t=>`${t.field} ${t.value}`)}),te=(e,t)=>{const r=U(e,t);return{...r.anchorMessageId?{anchorMessageId:r.anchorMessageId}:{},matchOperator:r.matchOperator,literalClauses:r.literalClauses,moveMailboxId:e.moveMailboxId,labelId:e.labelId,expiresAt:e.scope==="until"?M(e.until??""):void 0}},W=(e,t)=>{if(e.error!==void 0&&e.errorSignature===t)return{status:"error",reason:e.error};if(e.count===void 0)return{status:"loading"};const r=e.indexEmpty===!0?{indexEmpty:!0}:{};return e.previewedSignature===t?{status:"ready",count:e.count,...r}:{status:"ready",count:e.count,stale:!0,...r}},j=350,re=(e,t,r)=>{const a=b(F()),{mutateAsync:i}=a,n=Q(t),[s,o]=p.useState(()=>({})),d=p.useRef(t);d.current=t;const l=p.useRef(n),c=q(t);return p.useEffect(()=>{if(!e||!c||n===s.previewedSignature||n===s.errorSignature)return;const f=setTimeout(()=>{const u=n;l.current=u,i({path:{accountId:e},body:O({...d.current})}).then(m=>{l.current===u&&o({count:m.matchedCount,matchedIds:m.messageIds,indexEmpty:m.semanticIndexEmpty===!0,previewedSignature:u})}).catch(m=>{l.current===u&&o(g=>({...g,error:m instanceof Error?m.message:"Couldn't count matches.",errorSignature:u}))})},j);return()=>clearTimeout(f)},[e,c,n,s.previewedSignature,s.errorSignature,i]),c?{count:W(s,n),matchedIds:s.previewedSignature===n?s.matchedIds??[]:[]}:{count:{status:"error",reason:D},matchedIds:[]}},A=e=>P({path:{accountId:e}}),se=e=>{const t=C({...L({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},ae=e=>{const t=y(),r=b({...N(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a,mutateAsync:i}=r,n=p.useCallback((o,d,l)=>{e&&a({path:{accountId:e},body:S(o,d,l)})},[e,a]),s=p.useCallback(async(o,d,l)=>e?i({path:{accountId:e},body:S(o,d,l)}).then(()=>!0,()=>!1):!1,[e,i]);return{createFilter:n,createFilterAsync:s,isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},ne=e=>{const t=y(),r=b({...z(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a}=r;return{deleteFilter:p.useCallback(n=>{e&&a({path:{accountId:e,filterId:n}})},[e,a]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}};export{h as N,Z as S,Y as a,A as b,te as c,K as d,se as e,B as f,ne as g,O as h,ae as i,X as j,V as k,ee as n,G as o,M as p,U as r,re as u};
1
+ import{r as p,i as b,eo as x,c as C,ep as I,dW as F,eq as D,h as y,er as N,es as P,et as L,eu as z}from"./index-YYH_p-Ox.js";const B=(e,t)=>{if(e.state==="Expired")return"Expired";if(e.scope!=="Temporary"||!e.expiresAt)return"Active";const r=Date.parse(e.expiresAt);return Number.isNaN(r)?"Active":r<=t?"Expired":"Active"},K=e=>{if(!e)return;const t=Date.parse(e);if(!Number.isNaN(t))return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},M=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,a,i,n]=r,s=new Date(Number(a),Number(i)-1,Number(n),23,59,59,0);if(Number.isNaN(s.getTime()))return;const o=-t.getTimezoneOffset(),d=o>=0?"+":"-",l=Math.abs(o),c=String(Math.floor(l/60)).padStart(2,"0"),f=String(l%60).padStart(2,"0"),u=m=>String(m).padStart(2,"0");return`${s.getFullYear()}-${u(s.getMonth()+1)}-${u(s.getDate())}T${u(s.getHours())}:${u(s.getMinutes())}:${u(s.getSeconds())}${d}${c}:${f}`},h="None",V=e=>!e.literalClauses.some(t=>t.field==="HasWords"),O=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h}),G=({mode:e,ruleScope:t})=>t==="standing"?"standing":t==="until"?"temporary":e==="selected"?"just-these":"all-like-these",X=({mode:e,ruleScope:t,anchorMessageId:r,clauses:a,matchOperator:i,moveMailboxId:n,until:s})=>({...e==="similar"&&r?{anchorMessageId:r}:{},matchOperator:i==="all"?"And":"Or",literalClauses:a.map(o=>({field:o.field,value:o.value})),moveMailboxId:n,expiresAt:t==="until"?M(s??""):void 0}),S=(e,t,r)=>({name:r,scope:t==="standing"?"Standing":"Temporary",...t==="temporary"&&e.expiresAt?{expiresAt:e.expiresAt}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),T=new Set(["Complete","Failed"]),v=e=>e!==void 0&&T.has(e),w=1e3,J=15e3,_=e=>{const t=Math.max(0,e),r=w*2**t;return Math.min(r,J)},$=(e,t,r)=>{if(e)return{kind:r?"restartFailed":"startFailed",error:e};if(t)return{kind:"statusUnreadable",error:t}},Y=e=>{const[t,r]=p.useState(),a=b({...x(),onSuccess:g=>r(g.organizeJobId)}),{mutate:i}=a,n=C({...I({path:{accountId:e??"",organizeJobId:t??""}}),enabled:!!e&&!!t,refetchInterval:g=>{const E=g.state.data?.state;return v(E)?!1:_(g.state.dataUpdateCount)}}),s=p.useCallback(g=>{e&&i({path:{accountId:e},body:O(g)})},[e,i]),{refetch:o}=n,d=p.useCallback(()=>{o()},[o]),l=n.data,c=a.isPending?void 0:l,f=c?.state??a.data?.state,u=v(c?.state),m={state:f,matchedCount:c?.matchedCount??0,appliedCount:c?.appliedCount??0,failedCount:c?.failedCount??0,errorMessage:c?.errorMessage??""};return{start:s,refreshStatus:d,progress:m,isStarting:a.isPending,isRunning:!!t&&!u,isDone:u,failure:$(a.error,n.error,!!l)}},Z=["From","Subject","HasWords","ListId","FromDomain"],k=e=>{const t=e.trim(),r=t.match(/<([^>]+)>/);return(r?r[1]:t).trim().toLowerCase()},ee=(e,t)=>e==="ListId"?k(t):t.trim(),R=e=>e==="all"?"And":"Or",U=(e,t)=>{const r=e.widen!==void 0&&!e.widen.inactive,a=e.clauses.map(i=>({field:i.field,value:i.value}));return{...r&&t?{anchorMessageId:t}:{},matchOperator:R(e.matchOperator),literalClauses:a}},q=e=>e.anchorMessageId!==void 0||!e.literalClauses.some(t=>t.field==="HasWords"),Q=e=>JSON.stringify({anchor:e.anchorMessageId??null,operator:e.matchOperator,clauses:e.literalClauses.map(t=>`${t.field} ${t.value}`)}),te=(e,t)=>{const r=U(e,t);return{...r.anchorMessageId?{anchorMessageId:r.anchorMessageId}:{},matchOperator:r.matchOperator,literalClauses:r.literalClauses,moveMailboxId:e.moveMailboxId,labelId:e.labelId,expiresAt:e.scope==="until"?M(e.until??""):void 0}},W=(e,t)=>{if(e.error!==void 0&&e.errorSignature===t)return{status:"error",reason:e.error};if(e.count===void 0)return{status:"loading"};const r=e.indexEmpty===!0?{indexEmpty:!0}:{};return e.previewedSignature===t?{status:"ready",count:e.count,...r}:{status:"ready",count:e.count,stale:!0,...r}},j=350,re=(e,t,r)=>{const a=b(F()),{mutateAsync:i}=a,n=Q(t),[s,o]=p.useState(()=>({})),d=p.useRef(t);d.current=t;const l=p.useRef(n),c=q(t);return p.useEffect(()=>{if(!e||!c||n===s.previewedSignature||n===s.errorSignature)return;const f=setTimeout(()=>{const u=n;l.current=u,i({path:{accountId:e},body:O({...d.current})}).then(m=>{l.current===u&&o({count:m.matchedCount,matchedIds:m.messageIds,indexEmpty:m.semanticIndexEmpty===!0,previewedSignature:u})}).catch(m=>{l.current===u&&o(g=>({...g,error:m instanceof Error?m.message:"Couldn't count matches.",errorSignature:u}))})},j);return()=>clearTimeout(f)},[e,c,n,s.previewedSignature,s.errorSignature,i]),c?{count:W(s,n),matchedIds:s.previewedSignature===n?s.matchedIds??[]:[]}:{count:{status:"error",reason:D},matchedIds:[]}},A=e=>P({path:{accountId:e}}),se=e=>{const t=C({...L({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},ae=e=>{const t=y(),r=b({...N(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a,mutateAsync:i}=r,n=p.useCallback((o,d,l)=>{e&&a({path:{accountId:e},body:S(o,d,l)})},[e,a]),s=p.useCallback(async(o,d,l)=>e?i({path:{accountId:e},body:S(o,d,l)}).then(()=>!0,()=>!1):!1,[e,i]);return{createFilter:n,createFilterAsync:s,isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},ne=e=>{const t=y(),r=b({...z(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a}=r;return{deleteFilter:p.useCallback(n=>{e&&a({path:{accountId:e,filterId:n}})},[e,a]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}};export{h as N,Z as S,Y as a,A as b,te as c,K as d,se as e,B as f,ne as g,O as h,ae as i,X as j,V as k,ee as n,G as o,M as p,U as r,re as u};
@@ -1 +1 @@
1
- import{c as L,ej as p,h as n,i as l,ek as d,r as o,el as y,em as c,en as g}from"./index-B7Z_VTQH.js";const u=e=>y({path:{accountId:e}}),P=e=>{const r=L({...p({path:{accountId:e??""}}),enabled:!!e});return{labels:r.data?.items??[],isPending:r.isPending,isError:r.isError,error:r.error,refetch:r.refetch}},f=e=>{const r=n(),t=l({...d(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutateAsync:s}=t;return{createLabel:o.useCallback((a,i="Default")=>e?s({path:{accountId:e},body:{name:a,color:i}}):Promise.reject(new Error("No account")),[e,s]),isPending:t.isPending,isError:t.isError,error:t.error,reset:t.reset}},h=e=>{const r=n(),t=l({...c(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutate:s}=t;return{updateLabel:o.useCallback((a,i)=>{e&&s({path:{accountId:e,labelId:a},body:i})},[e,s]),isPending:t.isPending,updatingLabelId:t.isPending?t.variables?.path.labelId:void 0}},C=e=>{const r=n(),t=l({...g(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutate:s}=t;return{deleteLabel:o.useCallback(a=>{e&&s({path:{accountId:e,labelId:a}})},[e,s]),isPending:t.isPending,deletingLabelId:t.isPending?t.variables?.path.labelId:void 0}};export{P as a,h as b,C as c,f as u};
1
+ import{c as L,ej as p,h as n,i as l,ek as d,r as o,el as y,em as c,en as g}from"./index-YYH_p-Ox.js";const u=e=>y({path:{accountId:e}}),P=e=>{const r=L({...p({path:{accountId:e??""}}),enabled:!!e});return{labels:r.data?.items??[],isPending:r.isPending,isError:r.isError,error:r.error,refetch:r.refetch}},f=e=>{const r=n(),t=l({...d(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutateAsync:s}=t;return{createLabel:o.useCallback((a,i="Default")=>e?s({path:{accountId:e},body:{name:a,color:i}}):Promise.reject(new Error("No account")),[e,s]),isPending:t.isPending,isError:t.isError,error:t.error,reset:t.reset}},h=e=>{const r=n(),t=l({...c(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutate:s}=t;return{updateLabel:o.useCallback((a,i)=>{e&&s({path:{accountId:e,labelId:a},body:i})},[e,s]),isPending:t.isPending,updatingLabelId:t.isPending?t.variables?.path.labelId:void 0}},C=e=>{const r=n(),t=l({...g(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutate:s}=t;return{deleteLabel:o.useCallback(a=>{e&&s({path:{accountId:e,labelId:a}})},[e,s]),isPending:t.isPending,deletingLabelId:t.isPending?t.variables?.path.labelId:void 0}};export{P as a,h as b,C as c,f as u};
@@ -1 +1 @@
1
- import{e as s,bZ as t,b_ as a}from"./index-B7Z_VTQH.js";const p=s("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]),o=768,r=e=>e!=="desktop",c=()=>{const e=t(`(min-width: ${o}px)`);return t(a)?"desktop":e?"tablet":"phone"};export{p as B,r as i,c as u};
1
+ import{e as s,bZ as t,b_ as a}from"./index-YYH_p-Ox.js";const p=s("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]),o=768,r=e=>e!=="desktop",c=()=>{const e=t(`(min-width: ${o}px)`);return t(a)?"desktop":e?"tablet":"phone"};export{p as B,r as i,c as u};
@@ -1 +1 @@
1
- import{r as c,u as S,cj as O,ck as B,a9 as h,cl as N,q as P,ab as U,h as $,c as D,cG as F,cH as v}from"./index-B7Z_VTQH.js";const R="/mail/brief/compose/{-$outboxMessageId}",w="/mail/flagged/compose/{-$outboxMessageId}",E="/mail/outbox/compose/{-$outboxMessageId}",k="/mail/$mailboxId/compose/{-$outboxMessageId}";function T(){const e=h({from:R,shouldThrow:!1}),t=h({from:w,shouldThrow:!1}),r=h({from:E,shouldThrow:!1}),s=h({from:k,shouldThrow:!1});return e??t??r??s}function z(){return T()!==void 0}function Y(){return T()?.outboxMessageId}function L(e,t,r){return e==="flagged"?{to:w,params:{outboxMessageId:r}}:e==="outbox"?{to:E,params:{outboxMessageId:r}}:e==="mailbox"&&t?{to:k,params:{mailboxId:t,outboxMessageId:r}}:{to:R,params:{outboxMessageId:r}}}function g(){const e=S(),t=O(),{list:r,mailboxId:s}=B();return c.useCallback((n,o)=>{e({...L(r,s,n),search:a=>a,hash:o?.keepPanels?!0:t,replace:o?.replace??!1})},[e,t,r,s])}function J(){const e=g();return c.useCallback(()=>e(void 0),[e])}function V(){const e=g();return c.useCallback(t=>e(t),[e])}function Z(){const e=g();return c.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function ee(){return N()}const _=e=>{const t=e.filter(n=>!n.isMultipart&&n.disposition!=="attachment"&&n.mediaType==="TEXT"&&n.contentUrl.length>0),r=t.find(n=>n.mediaSubtype.toUpperCase()==="HTML");if(r)return{kind:"html",contentUrl:r.contentUrl};const s=t.find(n=>n.mediaSubtype.toUpperCase()==="PLAIN");return s?{kind:"text",contentUrl:s.contentUrl}:null},b={all:["messages"],detail:e=>[...b.all,"detail",e],body:e=>[...b.detail(e),"body"]};class f extends Error{reason;status;retryAfterSeconds;constructor(t,r,s,n){super(r),this.name="BodyFetchError",this.reason=t,this.status=s,this.retryAfterSeconds=n}}const q=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},K=8,Q="x-remit-403-reason",I=(e,t)=>{const r=t?.trim()??"";return e===401?"auth":e===403?r.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},X=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,G=(e,t)=>{const r=(t??"").toLowerCase();return!!(e==="text"&&r.startsWith("text/html"))},H=async(e,t,r=async()=>null)=>{const s={},n=await r();n&&(s.Authorization=`Bearer ${n}`);const o=await v(e,{headers:s});if(o.status===202)throw new f("not-ready","Message body is still syncing",202,q(o.headers.get("Retry-After")));if(!o.ok){const l=o.headers.get(Q),y=I(o.status,l);throw new f(y,`Failed to load message body (${o.status} ${o.statusText})`,o.status)}const a=o.headers.get("content-type");if(G(t,a))throw new f("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${a}`);const m=await o.text();if(X(m,a))throw new f("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return m},W=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),te=({messageId:e,bodyParts:t,enabled:r=!0})=>{const s=t?_(t):null,n=P(),{getToken:o}=U(),a=c.useRef(null),m=$(),l=c.useRef(!1),y=c.useRef(null),C=e&&s?`${e}:${s.contentUrl}`:null;y.current!==C&&(y.current=C,l.current=!1);const i=D({queryKey:e?[...b.body(e),s?.contentUrl??null]:["messages","body","noop"],queryFn:()=>{if(!s)throw new Error("No renderable body part");if(!e)throw new Error("No messageId");const d=l.current;return l.current=!1,W({fetchContent:(u,M)=>H(u,M,o),refetchDescribeMessage:()=>m.refetchQueries({queryKey:F({path:{messageId:e}})})},{contentUrl:s.contentUrl,kind:s.kind,isRetryAfterNotReady:d})},enabled:r&&!!e&&!!s,staleTime:300*1e3,gcTime:1800*1e3,retry:(d,u)=>u instanceof f&&u.reason==="not-ready"?d<K:d<1,retryDelay:(d,u)=>u instanceof f&&u.reason==="not-ready"?(l.current=!0,(u.retryAfterSeconds??1)*1e3):1e3,meta:{softError:!0}}),p=i.isLoading&&!!s,x=t!==void 0&&s===null;c.useEffect(()=>{p&&(a.current=performance.now())},[p]),c.useEffect(()=>{i.isSuccess&&a.current!==null&&(n.recordTiming("message.body.load",Math.round(performance.now()-a.current)),a.current=null)},[i.isSuccess,n]);const A=i.data&&s?{kind:s.kind,body:i.data}:void 0;return{picked:s,data:A,isLoading:p,hasNoRenderablePart:x,isError:i.isError,error:i.error,refetch:i.refetch}};export{f as B,z as a,te as b,Y as c,Z as d,ee as e,V as f,I as g,J as u};
1
+ import{r as c,u as S,cj as O,ck as B,a9 as h,cl as N,q as P,ab as U,h as $,c as D,cG as F,cH as v}from"./index-YYH_p-Ox.js";const R="/mail/brief/compose/{-$outboxMessageId}",w="/mail/flagged/compose/{-$outboxMessageId}",E="/mail/outbox/compose/{-$outboxMessageId}",k="/mail/$mailboxId/compose/{-$outboxMessageId}";function T(){const e=h({from:R,shouldThrow:!1}),t=h({from:w,shouldThrow:!1}),r=h({from:E,shouldThrow:!1}),s=h({from:k,shouldThrow:!1});return e??t??r??s}function z(){return T()!==void 0}function Y(){return T()?.outboxMessageId}function L(e,t,r){return e==="flagged"?{to:w,params:{outboxMessageId:r}}:e==="outbox"?{to:E,params:{outboxMessageId:r}}:e==="mailbox"&&t?{to:k,params:{mailboxId:t,outboxMessageId:r}}:{to:R,params:{outboxMessageId:r}}}function g(){const e=S(),t=O(),{list:r,mailboxId:s}=B();return c.useCallback((n,o)=>{e({...L(r,s,n),search:a=>a,hash:o?.keepPanels?!0:t,replace:o?.replace??!1})},[e,t,r,s])}function J(){const e=g();return c.useCallback(()=>e(void 0),[e])}function V(){const e=g();return c.useCallback(t=>e(t),[e])}function Z(){const e=g();return c.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function ee(){return N()}const _=e=>{const t=e.filter(n=>!n.isMultipart&&n.disposition!=="attachment"&&n.mediaType==="TEXT"&&n.contentUrl.length>0),r=t.find(n=>n.mediaSubtype.toUpperCase()==="HTML");if(r)return{kind:"html",contentUrl:r.contentUrl};const s=t.find(n=>n.mediaSubtype.toUpperCase()==="PLAIN");return s?{kind:"text",contentUrl:s.contentUrl}:null},b={all:["messages"],detail:e=>[...b.all,"detail",e],body:e=>[...b.detail(e),"body"]};class f extends Error{reason;status;retryAfterSeconds;constructor(t,r,s,n){super(r),this.name="BodyFetchError",this.reason=t,this.status=s,this.retryAfterSeconds=n}}const q=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},K=8,Q="x-remit-403-reason",I=(e,t)=>{const r=t?.trim()??"";return e===401?"auth":e===403?r.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},X=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,G=(e,t)=>{const r=(t??"").toLowerCase();return!!(e==="text"&&r.startsWith("text/html"))},H=async(e,t,r=async()=>null)=>{const s={},n=await r();n&&(s.Authorization=`Bearer ${n}`);const o=await v(e,{headers:s});if(o.status===202)throw new f("not-ready","Message body is still syncing",202,q(o.headers.get("Retry-After")));if(!o.ok){const l=o.headers.get(Q),y=I(o.status,l);throw new f(y,`Failed to load message body (${o.status} ${o.statusText})`,o.status)}const a=o.headers.get("content-type");if(G(t,a))throw new f("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${a}`);const m=await o.text();if(X(m,a))throw new f("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return m},W=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),te=({messageId:e,bodyParts:t,enabled:r=!0})=>{const s=t?_(t):null,n=P(),{getToken:o}=U(),a=c.useRef(null),m=$(),l=c.useRef(!1),y=c.useRef(null),C=e&&s?`${e}:${s.contentUrl}`:null;y.current!==C&&(y.current=C,l.current=!1);const i=D({queryKey:e?[...b.body(e),s?.contentUrl??null]:["messages","body","noop"],queryFn:()=>{if(!s)throw new Error("No renderable body part");if(!e)throw new Error("No messageId");const d=l.current;return l.current=!1,W({fetchContent:(u,M)=>H(u,M,o),refetchDescribeMessage:()=>m.refetchQueries({queryKey:F({path:{messageId:e}})})},{contentUrl:s.contentUrl,kind:s.kind,isRetryAfterNotReady:d})},enabled:r&&!!e&&!!s,staleTime:300*1e3,gcTime:1800*1e3,retry:(d,u)=>u instanceof f&&u.reason==="not-ready"?d<K:d<1,retryDelay:(d,u)=>u instanceof f&&u.reason==="not-ready"?(l.current=!0,(u.retryAfterSeconds??1)*1e3):1e3,meta:{softError:!0}}),p=i.isLoading&&!!s,x=t!==void 0&&s===null;c.useEffect(()=>{p&&(a.current=performance.now())},[p]),c.useEffect(()=>{i.isSuccess&&a.current!==null&&(n.recordTiming("message.body.load",Math.round(performance.now()-a.current)),a.current=null)},[i.isSuccess,n]);const A=i.data&&s?{kind:s.kind,body:i.data}:void 0;return{picked:s,data:A,isLoading:p,hasNoRenderablePart:x,isError:i.isError,error:i.error,refetch:i.refetch}};export{f as B,z as a,te as b,Y as c,Z as d,ee as e,V as f,I as g,J as u};
@@ -1 +1 @@
1
- import{b$ as Q,c0 as y,c1 as S,c2 as w,c3 as C,h as k,c4 as q,c5 as x,r as p,c6 as M,c7 as H,c8 as L,c9 as P,ca as O,cb as B,cc as A}from"./index-B7Z_VTQH.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var z=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#a(t,s)]}#a(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function U({queries:r,...e},s){const t=k(),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{M(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new z(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>O(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
1
+ import{b$ as Q,c0 as y,c1 as S,c2 as w,c3 as C,h as k,c4 as q,c5 as x,r as p,c6 as M,c7 as H,c8 as L,c9 as P,ca as O,cb as B,cc as A}from"./index-YYH_p-Ox.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var z=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#a(t,s)]}#a(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function U({queries:r,...e},s){const t=k(),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{M(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new z(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>O(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
@@ -1 +1 @@
1
- import{j as E,a0 as K,t as Q,f as U,r as o,aP as R,h as T,C as $,E as z,F as B,q as G,P as I,Q as X,R as V,S as J}from"./index-B7Z_VTQH.js";import{C as Y}from"./circle-check-big-BhJgBM3A.js";import{R as Z}from"./refresh-cw-BGeOxWhI.js";import{u as N}from"./useQueries-OnbrANu7.js";function ye({state:e,onRefresh:s,label:t,errorMessage:n,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",r=e==="error",h=e==="success",S=r?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(Y,{className:"size-4 text-positive"}):E.jsx(Z,{className:Q("size-4",i&&"animate-spin")}),w=r?`${t} — failed: ${n??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:S,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:r?n:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const ee=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function L(e){return!!e&&ee.has(e)}const F=3e3,te=F*2,C={syncing:!1,resolved:!1,synced:0,total:0};function we(e,s){const t=e.join(","),[n,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),te);return()=>clearTimeout(m)},[t,s]);const i=N({queries:e.map(m=>({...R({path:{accountId:m}}),enabled:s&&!n,refetchInterval:F,meta:{softError:!0}}))}),r=i.every(m=>m.isSuccess||m.isError),h=i.length===0||r||u;let S=!1,w=0,y=0;for(const m of i)if(L(m.data?.syncPhase)){S=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,y+=l.messagesTotal}const x=s&&h&&!S;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?C:{syncing:S,resolved:!0,synced:w,total:y}}const se=180*1e3,xe=30*1e3;let q=0;const M=new Set,re=(e=Date.now())=>{q=e+se;for(const s of M)s()},pe=(e=Date.now())=>e<q,Ee=e=>(M.add(e),()=>{M.delete(e)}),_=6e4,ne=new Set(["sent","drafts","trash","archive"]),O=(e,s)=>{const t=new Map;for(const n of e){const a=s.get(n.mailboxId)?.role;a&&ne.has(a)||t.set(n.mailboxId,n.highWaterMarkUid)}return t},j=(e,s)=>{const t=[];for(const[n,a]of s)a>(e.get(n)??0)&&t.push(n);return t},oe=(e,s)=>j(e,s).length>0,D=o.createContext(null),ae=()=>{const e=o.useContext(D);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function be({accountIds:e,children:s}){const t=T(),{resultFolderIndex:n}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,r]=o.useState(new Set),h=N({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:_,staleTime:_,meta:{softError:!0}}))}),S=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=O(b.mailboxes??[],n),v=c.current.get(d);if(c.current.set(d,g),v){const A=j(v,g);A.length>0&&z(t,B(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const W=a.current.get(d)??new Map;oe(W,g)&&(f.add(d),l=!0)}),l&&r(f)},[w,S]);const y=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{r(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(R({path:{accountId:f}}).queryKey);a.current.set(f,O(d?.mailboxes??[],n)),u.current.add(f)}},[t,n]),m=o.useMemo(()=>({hasNewMail:y,acknowledge:x}),[y,x]);return E.jsx(D.Provider,{value:m,children:s})}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),k=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{V(e,{softError:!0},"user")&&J(e)},P=(e,s)=>e.fetchQuery({...R({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,fe=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:n=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const r=await s().then(y=>({ok:!0,data:y})).catch(y=>({ok:!1,error:y}));if(!r.ok)return{accountId:e,message:k(r.error)};const{syncPhase:h,lastSyncAt:S}=r.data;if((S??0)>t&&!L(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(r.data)>n&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,n,a)=>{const u=await P(e,t).then(r=>({ok:!0,lastSyncAt:r.lastSyncAt??0,inboxSyncedAt:H(r)})).catch(r=>({ok:!1,error:r}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(r=>({ok:!1,error:r}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>P(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:n});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=T(),n=G(),{acknowledge:a}=ae(),[u,c]=o.useState("idle"),[i,r]=o.useState(),h=o.useRef(0),S=o.useRef(e);S.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const y=o.useCallback(()=>{const x=S.current;if(x.length===0){c("error"),r("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),r(void 0),re();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,n,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),r(b[0]?.message))})()},[a,t,n]);return{state:u,errorMessage:i,refresh:y}};export{xe as H,be as M,ye as R,Re as a,L as b,we as c,pe as i,Ee as s,ae as u};
1
+ import{j as E,a0 as K,t as Q,f as U,r as o,aP as R,h as T,C as $,E as z,F as B,q as G,P as I,Q as X,R as V,S as J}from"./index-YYH_p-Ox.js";import{C as Y}from"./circle-check-big-DJeT115E.js";import{R as Z}from"./refresh-cw-Di3kvivg.js";import{u as N}from"./useQueries-Dm82vk6v.js";function ye({state:e,onRefresh:s,label:t,errorMessage:n,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",r=e==="error",h=e==="success",S=r?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(Y,{className:"size-4 text-positive"}):E.jsx(Z,{className:Q("size-4",i&&"animate-spin")}),w=r?`${t} — failed: ${n??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:S,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:r?n:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const ee=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function L(e){return!!e&&ee.has(e)}const F=3e3,te=F*2,C={syncing:!1,resolved:!1,synced:0,total:0};function we(e,s){const t=e.join(","),[n,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),te);return()=>clearTimeout(m)},[t,s]);const i=N({queries:e.map(m=>({...R({path:{accountId:m}}),enabled:s&&!n,refetchInterval:F,meta:{softError:!0}}))}),r=i.every(m=>m.isSuccess||m.isError),h=i.length===0||r||u;let S=!1,w=0,y=0;for(const m of i)if(L(m.data?.syncPhase)){S=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,y+=l.messagesTotal}const x=s&&h&&!S;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?C:{syncing:S,resolved:!0,synced:w,total:y}}const se=180*1e3,xe=30*1e3;let q=0;const M=new Set,re=(e=Date.now())=>{q=e+se;for(const s of M)s()},pe=(e=Date.now())=>e<q,Ee=e=>(M.add(e),()=>{M.delete(e)}),_=6e4,ne=new Set(["sent","drafts","trash","archive"]),O=(e,s)=>{const t=new Map;for(const n of e){const a=s.get(n.mailboxId)?.role;a&&ne.has(a)||t.set(n.mailboxId,n.highWaterMarkUid)}return t},j=(e,s)=>{const t=[];for(const[n,a]of s)a>(e.get(n)??0)&&t.push(n);return t},oe=(e,s)=>j(e,s).length>0,D=o.createContext(null),ae=()=>{const e=o.useContext(D);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function be({accountIds:e,children:s}){const t=T(),{resultFolderIndex:n}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,r]=o.useState(new Set),h=N({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:_,staleTime:_,meta:{softError:!0}}))}),S=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=O(b.mailboxes??[],n),v=c.current.get(d);if(c.current.set(d,g),v){const A=j(v,g);A.length>0&&z(t,B(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const W=a.current.get(d)??new Map;oe(W,g)&&(f.add(d),l=!0)}),l&&r(f)},[w,S]);const y=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{r(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(R({path:{accountId:f}}).queryKey);a.current.set(f,O(d?.mailboxes??[],n)),u.current.add(f)}},[t,n]),m=o.useMemo(()=>({hasNewMail:y,acknowledge:x}),[y,x]);return E.jsx(D.Provider,{value:m,children:s})}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),k=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{V(e,{softError:!0},"user")&&J(e)},P=(e,s)=>e.fetchQuery({...R({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,fe=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:n=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const r=await s().then(y=>({ok:!0,data:y})).catch(y=>({ok:!1,error:y}));if(!r.ok)return{accountId:e,message:k(r.error)};const{syncPhase:h,lastSyncAt:S}=r.data;if((S??0)>t&&!L(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(r.data)>n&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,n,a)=>{const u=await P(e,t).then(r=>({ok:!0,lastSyncAt:r.lastSyncAt??0,inboxSyncedAt:H(r)})).catch(r=>({ok:!1,error:r}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(r=>({ok:!1,error:r}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>P(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:n});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=T(),n=G(),{acknowledge:a}=ae(),[u,c]=o.useState("idle"),[i,r]=o.useState(),h=o.useRef(0),S=o.useRef(e);S.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const y=o.useCallback(()=>{const x=S.current;if(x.length===0){c("error"),r("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),r(void 0),re();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,n,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),r(b[0]?.message))})()},[a,t,n]);return{state:u,errorMessage:i,refresh:y}};export{xe as H,be as M,ye as R,Re as a,L as b,we as c,pe as i,Ee as s,ae as u};
@@ -1 +1 @@
1
- import{K as r,r as s,b5 as t}from"./index-B7Z_VTQH.js";import{u as m}from"./useQueries-OnbrANu7.js";const a=i=>({items:i.map(e=>e.data?.items??[]),isPending:i.some(e=>e.isPending),error:i.find(e=>e.error)?.error??null});function u(i){const e=m({queries:i.map(o=>({...r({path:{accountId:o.accountId}}),staleTime:1/0})),combine:a});return{index:s.useMemo(()=>t(i.map((o,n)=>({folderAppointments:o.folderAppointments,mailboxes:e.items[n]??[]}))),[i,e]),isPending:e.isPending,error:e.error}}export{u};
1
+ import{K as r,r as s,b5 as t}from"./index-YYH_p-Ox.js";import{u as m}from"./useQueries-Dm82vk6v.js";const a=i=>({items:i.map(e=>e.data?.items??[]),isPending:i.some(e=>e.isPending),error:i.find(e=>e.error)?.error??null});function u(i){const e=m({queries:i.map(o=>({...r({path:{accountId:o.accountId}}),staleTime:1/0})),combine:a});return{index:s.useMemo(()=>t(i.map((o,n)=>({folderAppointments:o.folderAppointments,mailboxes:e.items[n]??[]}))),[i,e]),isPending:e.isPending,error:e.error}}export{u};
@@ -1,4 +1,4 @@
1
- import{cq as Y,r as h,j as a,t as b,I as X,h as Z,at as J,i as ee,av as te,cG as se,bN as re,ab as ne,a0 as ae,X as oe,c$ as _,d0 as $,C as ie,ck as ce}from"./index-B7Z_VTQH.js";import{K as A}from"./kbd-DC1TU-ib.js";import{B as le,b as de}from"./useMessageBodyContent-D1pso69a.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=()=>`
1
+ import{cq as Y,r as h,j as a,t as b,I as X,h as Z,at as J,i as ee,av as te,cG as se,bN as re,ab as ne,a0 as ae,X as oe,c$ as _,d0 as $,C as ie,ck as ce}from"./index-YYH_p-Ox.js";import{K as A}from"./kbd-BHWNGlF5.js";import{B as le,b as de}from"./useMessageBodyContent-D-lqah5s.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
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{h as T,at 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-B7Z_VTQH.js";import{P}from"./attachment-file-DBmXtWWD.js";import{aj as U}from"./MailListHeader-DiI5otvq.js";import{a as q}from"./useLabels-BhpyswcI.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-BI18VCbl.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
+ import{h as T,at 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-YYH_p-Ox.js";import{P}from"./attachment-file-bw6jpX2a.js";import{aj as U}from"./MailListHeader-D2YY1oCj.js";import{a as q}from"./useLabels-D8sluUEk.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-DMTmSJiu.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,at as p,c as f,d as m,r,i as y,av as T,o as E,l as d}from"./index-B7Z_VTQH.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
+ import{h as g,at as p,c as f,d as m,r,i as y,av as T,o as E,l as d}from"./index-YYH_p-Ox.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};
@@ -0,0 +1 @@
1
+ import{a9 as m,eE as I,r as p,eF as E,bV as S,u as x,cj as L,eD as A}from"./index-YYH_p-Ox.js";const h=480,f=1320,M=90;function $(t){return Number(t.slice(11,13))*60+Number(t.slice(14,16))}function X(t){const e=Math.max(0,Math.min(1440,Math.round(t)));return`${String(Math.floor(e/60)).padStart(2,"0")}:${String(e%60).padStart(2,"0")}`}function Z(t){const e=Math.round(t);if(e<60)return`${e}m`;const n=Math.floor(e/60),a=e%60;return a===0?`${n}h`:`${n}h ${a}m`}function v(t,e){const n=new Date(`${t}T00:00:00Z`);return n.setUTCDate(n.getUTCDate()+e),n.toISOString().slice(0,10)}function tt(t,e){return Math.round((Date.parse(`${e}T00:00:00Z`)-Date.parse(`${t}T00:00:00Z`))/864e5)}function et(t){const e=t.start.slice(0,10),n=t.end.slice(0,10);if(!t.allDay)return n;const a=v(n,-1);return a<e?e:a}function nt(t,e){const n=[];for(let a=t;a<=e;a=v(a,1))n.push(a);return n}function at(t){const[e,n,a]=t.split("-").map(Number);return new Date(e,n-1,a).toLocaleDateString("en-GB",{month:"long",year:"numeric"})}function rt(t){const[e,n,a]=t.split("-").map(Number);return new Date(e,n-1,a).toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"short"})}function ot(t){const[e,n,a]=t.split("-").map(Number);return new Date(e,n-1,a).toLocaleDateString("en-GB",{weekday:"long"})}function st(t,e){const[n,a,o]=t.split("-").map(Number),[r,s,c]=e.split("-").map(Number),i=new Date(n,a-1,o),u=new Date(r,s-1,c),D=i.toLocaleDateString("en-GB",{weekday:"short",day:"numeric",...a===s?{}:{month:"short"}}),U=u.toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"short"});return`${D} – ${U}`}function j(t){const[e,n,a]=t.split("-").map(Number);return new Date(e,n-1,a).toLocaleDateString("en-GB",{weekday:"short"})}function l(t){return new Date(t).getTime()}function B(t,e){return t.allDay?e>=t.start.slice(0,10)&&e<t.end.slice(0,10):t.start.slice(0,10)===e}function R(t,e){return l(t.start)<l(e.end)&&l(e.start)<l(t.end)}function z(t){const e=t.map(r=>[l(r.start),l(r.end)]).sort((r,s)=>r[0]-s[0]);let n=0,a=0,o=0;for(const[r,s]of e){if(r>o){n+=o-a,a=r,o=s;continue}o=Math.max(o,s)}return n+=o-a,Math.round(n/6e4)}function F(t){const e=[];for(const n of t){const a=t.filter(r=>r.id===n.id||R(n,r)).map(r=>r.id).sort();if(a.length<2)continue;const o=a.join("|");e.some(r=>r.join("|")===o)||e.push(a)}return e.filter(n=>!e.some(a=>a!==n&&n.every(o=>a.includes(o))))}function ct(t,e,n){const a=e.filter(r=>B(r,t)),o=a.filter(r=>!r.allDay).sort((r,s)=>l(r.start)-l(s.start));return{date:t,weekdayLabel:j(t),dayNumber:Number(t.slice(8)),isToday:t===n,timed:o,allDay:a.filter(r=>r.allDay),busyMinutes:z(o),conflicts:F(o)}}function _(t){return t.timed.length===0&&t.allDay.length===0}function G(t){return O(t.timed.map(e=>({from:$(e.start),to:$(e.end)})))}function O(t){const e=[...t].sort((a,o)=>a.from-o.from),n=[];for(const a of e){const o=n[n.length-1];if(o&&a.from<=o.to){o.to=Math.max(o.to,a.to);continue}n.push({...a})}return n}function T(t){return Math.min(Math.max(t,h),f)}function P(t,e,n=M){const a=O(e);if(a.length===0)return[{date:t,startMinute:h,endMinute:f,minutes:f-h,wholeDay:!0}];const o=[];let r=h;for(const s of a){const c=T(s.from),i=T(s.to);c-r>=n&&o.push({date:t,startMinute:r,endMinute:c,minutes:c-r,wholeDay:!1}),r=Math.max(r,c,i)}return f-r>=n&&o.push({date:t,startMinute:r,endMinute:f,minutes:f-r,wholeDay:!1}),o}function Y(t,e=M){return P(t.date,G(t),e)}function ut(t,e){const n=[];let a=[];const o=()=>{a.length!==0&&(a.length===1?n.push({kind:"day",key:a[0].date,day:a[0]}):n.push({kind:"run",key:`run_${a[0].date}`,from:a[0].date,to:a[a.length-1].date,days:a.length}),a=[])};for(const r of t){if(_(r)&&!e.includes(r.date)){a.push(r);continue}o(),n.push({kind:"day",key:r.date,day:r})}return o(),n}function it(t){const e=[];for(const n of t){const a=e[e.length-1],o=a?Math.max(...a.map(r=>Date.parse(r.end))):0;if(a&&Date.parse(n.start)<o){a.push(n);continue}e.push([n])}return e}function lt(t,e){const n=Date.parse(e),a=e.slice(0,10),o=t.flatMap(u=>u.timed).sort((u,D)=>Date.parse(u.start)-Date.parse(D.start)),r=o.filter(u=>Date.parse(u.start)<=n&&Date.parse(u.end)>n),s=o.filter(u=>Date.parse(u.start)>n),c=s[0],i=r.filter(u=>u.start.slice(0,10)===a).length+s.filter(u=>u.start.slice(0,10)===a).length;return{running:r,next:c,minutesUntilNext:c?Math.round((Date.parse(c.start)-n)/6e4):0,after:s[1],restOfDay:i,free:W(t,e,1)[0]}}function W(t,e,n){const a=e.slice(0,10),o=$(e),r=[];for(const s of t)if(!(s.date<a))for(const c of Y(s)){if(s.date>a)r.push(c);else{const i=Math.max(c.startMinute,o);if(c.endMinute-i<M)continue;r.push({...c,startMinute:i,minutes:c.endMinute-i,wholeDay:c.wholeDay&&i===c.startMinute})}if(r.length===n)return r}return r}const y="/calendar/$view/$date";function V(){const t=m({from:y,shouldThrow:!1}),e=I({from:y,shouldThrow:!1}),n=t?.view??"",a=t?.date??"",o=e?.calendarId;return p.useMemo(()=>({...E({view:n,date:a},S(new Date)),calendarIds:o??[]}),[n,a,o])}function ft(){const t=m({from:"/calendar/$view/$date/$calendarObjectId",shouldThrow:!1}),e=m({from:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",shouldThrow:!1}),n=t?.calendarObjectId,a=e?.recurrenceId;return p.useMemo(()=>n?{calendarObjectId:n,recurrenceId:a}:void 0,[n,a])}function dt(){return m({from:"/calendar/$view/$date/new",shouldThrow:!1})!==void 0}function ht(){const t=x(),e=L(),{view:n,date:a}=V(),o=p.useCallback(r=>{t({to:y,params:r,search:!0,hash:e})},[t,e]);return p.useMemo(()=>({goToView:r=>o({view:r,date:a}),step:r=>o({view:n,date:A(a,n,r)}),goToToday:()=>o({view:n,date:S(new Date)}),setAnchorDate:r=>t({to:y,params:{view:n,date:r},search:!0,hash:e,replace:!0}),zoomToDay:r=>o({view:"day",date:r}),openEvent:(r,s)=>t(s===void 0||s===""?{to:"/calendar/$view/$date/$calendarObjectId",params:{view:n,date:a,calendarObjectId:r},search:!0,hash:e}:{to:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",params:{view:n,date:a,calendarObjectId:r,recurrenceId:s},search:!0,hash:e}),closeEvent:()=>o({view:n,date:a}),openComposer:()=>t({to:"/calendar/$view/$date/new",params:{view:n,date:a},search:!0,hash:e})}),[o,t,e,n,a])}const d=t=>String(t).padStart(2,"0"),q=t=>`${t.getUTCFullYear()}-${d(t.getUTCMonth()+1)}-${d(t.getUTCDate())}`,k=t=>{const e=t<0?"-":"+",n=Math.abs(t);return`${e}${d(Math.floor(n/60))}:${d(n%60)}`};function C(t,e){const n=new Date(`${t}T${e}:00`);return`${t}T${e}:00${k(-n.getTimezoneOffset())}`}const g=new Map;function H(t){if(g.has(t))return g.get(t);let e;try{e=new Intl.DateTimeFormat("en-US",{timeZone:t,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{e=void 0}return g.set(t,e),e}function b(t,e){const n=H(t);if(!n)return Number.NaN;const a=n.formatToParts(new Date(e)),o=c=>Number(a.find(i=>i.type===c)?.value),r=o("hour")%24;return(Date.UTC(o("year"),o("month")-1,o("day"),r,o("minute"),o("second"))-e)/6e4}function mt(t,e,n){if(n==="")return`${t}T${e}:00+00:00`;const a=Date.parse(`${t}T${e}:00Z`),o=b(n,a);if(Number.isNaN(o))return C(t,e);const r=b(n,a-o*6e4);return`${t}T${e}:00${k(Number.isNaN(r)?o:r)}`}const N=t=>C(t,"00:00");function w(t,e){const[n,a,o]=t.split("-").map(Number);return q(new Date(Date.UTC(n,a-1,o+e)))}function J(t){const[e,n,a]=t.split("-").map(Number),o=new Date(Date.UTC(e,n-1,a));return w(t,-((o.getUTCDay()+6)%7))}function K(t,e){const[n,a]=e.split("-").map(Number);if(t==="year")return[`${n}-01-01`,`${n+1}-01-01`];if(t==="month"){const r=`${n}-${d(a)}-01`,s=a===12?`${n+1}-01-01`:`${n}-${d(a+1)}-01`;return[r,s]}if(t==="day")return[e,w(e,1)];const o=J(e);return[o,w(o,7)]}function pt(t,e){const[n,a]=K(t,e);return{from:N(n),to:N(a)}}export{et as A,h as D,st as a,ut as b,$ as c,X as d,G as e,Y as f,it as g,f as h,Z as i,v as j,rt as k,w as l,at as m,nt as n,pt as o,P as p,O as q,lt as r,ht as s,ft as t,V as u,ct as v,ot as w,dt as x,tt as y,mt as z};
package/index.html CHANGED
@@ -38,7 +38,7 @@
38
38
  } catch (_) {}
39
39
  })();
40
40
  </script>
41
- <script type="module" crossorigin src="/assets/index-B7Z_VTQH.js"></script>
41
+ <script type="module" crossorigin src="/assets/index-YYH_p-Ox.js"></script>
42
42
  <link rel="stylesheet" crossorigin href="/assets/index-EEhH2FDf.css">
43
43
  </head>
44
44
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client-dist",
3
- "version": "0.0.601",
3
+ "version": "0.0.603",
4
4
  "description": "Built Remit web client — static assets and the default runtime config.",
5
5
  "files": [
6
6
  "**/*"
@@ -1 +0,0 @@
1
- import{a as ee,i as _}from"./window-CHmnHHPE.js";import{j as n,f as j,t as d,_ as te,$ as ne,az as f,r as p,ay as ae,X as se,i as T,eG as re,eH as ie,eI as le,h as oe,s as ce,b3 as de,a0 as ue}from"./index-B7Z_VTQH.js";import{f as me}from"./ErrorState-BND_1CuC.js";import{R as z,c as he}from"./calendar-color-CXQvTXXO.js";const xe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],fe=["first","second","third","fourth","last"],A="";function ye(e,t){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return[];const[a,s,i]=e.split("-").map(Number),r=new Date(Date.UTC(a,s-1,i)),l=xe[r.getUTCDay()],o=fe[Math.min(Math.floor((i-1)/7),4)],c=t===""?"":`, ${t}`,y=r.getUTCDay()>=1&&r.getUTCDay()<=5;return[`Every day${c}`,...y?[`Every weekday${c}`]:[],`Every week on ${l}${c}`,`Every month on the ${o} ${l}${c}`,`Every year on ${i} ${pe[s-1]}${c}`]}const ve="w-full rounded-md border border-line bg-surface-sunken px-3 py-2 text-sm text-fg outline-none placeholder:text-fg-subtle focus-visible:border-line-strong focus-visible:ring-2 focus-visible:ring-ring/30",u=({draft:e,onChange:t},a,s)=>t({...e,[a]:s});function x({label:e,children:t}){return n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:e}),t]})}function ge({draft:e,onChange:t,layout:a="compact",touch:s}){const i=a==="pane";return n.jsx(f,{value:e.title,placeholder:"Title","aria-label":"Title",onChange:r=>u({draft:e,onChange:t},"title",r.target.value),className:d(i?"text-lg font-medium":"text-md font-medium",i?"h-11":s?"min-h-11":"")})}function H(e){return e.allDay||e.startTime===""||e.endTime===""?!1:e.endTime<e.startTime}function be({draft:e,onChange:t,touch:a}){const s=a?"min-h-11":"",i=H(e),r=p.useId();return n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(f,{type:"date",value:e.date,"aria-label":"Date",onChange:l=>u({draft:e,onChange:t},"date",l.target.value),className:d("w-40",s)}),e.allDay?n.jsx("span",{className:"text-sm text-fg-muted",children:"All day"}):n.jsxs(n.Fragment,{children:[n.jsx(f,{type:"time",value:e.startTime,"aria-label":"Start time",max:e.endTime===""?void 0:e.endTime,"aria-invalid":i,"aria-describedby":i?r:void 0,onChange:l=>u({draft:e,onChange:t},"startTime",l.target.value),className:d("w-28",s,i&&"border-danger/60")}),n.jsx("span",{className:"text-sm text-fg-subtle",children:"to"}),n.jsx(f,{type:"time",value:e.endTime,"aria-label":"End time",min:e.startTime===""?void 0:e.startTime,"aria-invalid":i,"aria-describedby":i?r:void 0,onChange:l=>u({draft:e,onChange:t},"endTime",l.target.value),className:d("w-28",s,i&&"border-danger/60")})]}),n.jsxs("label",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[n.jsx("input",{type:"checkbox",checked:e.allDay,onChange:l=>u({draft:e,onChange:t},"allDay",l.target.checked),className:"size-4 accent-current"}),"All day"]})]}),i&&n.jsxs("p",{id:r,className:"text-xs text-danger",role:"alert",children:["Ends before it starts. Move the end past ",e.startTime,", or start earlier."]})]})}function Ee({draft:e,onChange:t,calendars:a,touch:s}){return n.jsx(Ae,{calendars:a,value:e.calendarId,onChange:i=>u({draft:e,onChange:t},"calendarId",i),touch:s})}function Ne({draft:e,onChange:t,touch:a,repeatEditable:s=!0,onCustom:i}){return s?n.jsx(ke,{value:e.repeat,date:e.date,startTime:e.startTime,onChange:r=>u({draft:e,onChange:t},"repeat",r),onCustom:i,className:a?"min-h-11":""}):n.jsxs("p",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[n.jsx(z,{className:"size-4 shrink-0 text-fg-subtle","aria-hidden":!0}),e.repeat===A?"Does not repeat":e.repeat]})}function je({draft:e,onChange:t,touch:a}){return n.jsx(f,{value:e.location,placeholder:"Location","aria-label":"Location",onChange:s=>u({draft:e,onChange:t},"location",s.target.value),className:a?"min-h-11":""})}function Te({draft:e,onChange:t,touch:a}){return n.jsx(f,{value:e.guests,placeholder:"Guests, comma separated","aria-label":"Guests",onChange:s=>u({draft:e,onChange:t},"guests",s.target.value),className:a?"min-h-11":""})}function Ce({draft:e,onChange:t,layout:a="compact"}){return n.jsx("textarea",{value:e.notes,placeholder:"Notes","aria-label":"Notes",onChange:s=>u({draft:e,onChange:t},"notes",s.target.value),rows:a==="pane"?6:3,className:ve})}function De({draft:e,onChange:t,calendars:a,layout:s="compact",expanded:i=!1,onToggleExpanded:r,onSave:l,onCancel:o,onDelete:c,saveLabel:y="Add",header:g,repeatEditable:b=!0,guestsEditable:I=!1,calendarEditable:M=!0,onCustomRepeat:X,touch:m,className:$}){const v=s==="pane",h={draft:e,onChange:t,layout:s,touch:m},w=n.jsx(ge,{...h}),S=n.jsx(be,{...h}),R=n.jsx(Ee,{...h,calendars:a}),F=n.jsx(Ne,{...h,repeatEditable:b,onCustom:X}),Y=n.jsx(je,{...h}),L=n.jsx(Te,{...h}),P=n.jsx(Ce,{...h}),W=n.jsxs("div",{className:d("flex items-center gap-2",v?"pt-2":"pt-1"),children:[n.jsx(j,{variant:"primary",size:m||v?"md":"sm",onClick:l,disabled:H(e),className:m?"min-h-11 flex-1":"",children:y}),n.jsx(j,{variant:"ghost",size:m||v?"md":"sm",onClick:o,className:m?"min-h-11":"",children:"Cancel"}),c&&n.jsx(j,{variant:"ghost",size:m||v?"md":"sm",onClick:c,className:d("ml-auto text-danger",m&&"min-h-11"),children:"Delete"})]});if(v)return n.jsxs("div",{className:d("flex flex-col gap-5",$),children:[g,n.jsx(x,{label:"Title",children:w}),n.jsx(x,{label:"When",children:S}),M&&n.jsx(x,{label:"Calendar",children:R}),n.jsx(x,{label:"Repeat",children:F}),n.jsx(x,{label:"Location",children:Y}),I&&n.jsx(x,{label:"Guests",children:L}),n.jsx(x,{label:"Notes",children:P}),W]});const Z=r!==void 0&&!i;return n.jsxs("div",{className:d("flex flex-col gap-3",$),children:[g,w,S,M&&R,r&&n.jsxs("button",{type:"button",onClick:r,"aria-expanded":i,className:d("flex items-center gap-1 self-start rounded-sm text-xs font-medium text-fg-muted outline-none hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",m&&"min-h-11"),children:[i?n.jsx(te,{className:"size-3.5"}):n.jsx(ne,{className:"size-3.5"}),i?"Fewer details":"More details"]}),!Z&&n.jsxs("div",{className:"flex flex-col gap-2 border-t border-line pt-3",children:[Y,I&&L,F,P]}),W]})}const U="__custom__";function ke({value:e,date:t,startTime:a,onChange:s,onCustom:i,className:r}){const l=ye(t,a),o=e===A||l.includes(e)?l:[e,...l];return n.jsxs(ae,{icon:n.jsx(z,{className:"size-4"}),"aria-label":"Repeat",value:e,onChange:c=>{if(c.target.value===U){i?.();return}s(c.target.value)},className:r,children:[n.jsx("option",{value:A,children:"Does not repeat"}),o.map(c=>n.jsx("option",{value:c,children:c},c)),i&&n.jsx("option",{value:U,children:"Custom…"})]})}function Ae({calendars:e,value:t,onChange:a,touch:s}){const i=p.useId();return n.jsxs("fieldset",{className:"flex flex-wrap gap-1.5",children:[n.jsx("legend",{className:"sr-only",children:"Calendar"}),e.map(r=>{const l=he(r.color),o=r.id===t;return n.jsxs("label",{className:d("inline-flex cursor-pointer items-center gap-1.5 rounded-full border px-2.5 text-xs transition-colors","has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring",s?"min-h-11":"h-7",o?d(l.soft,l.text,l.border):"border-line text-fg-muted hover:bg-surface-sunken"),children:[n.jsx("input",{type:"radio",name:i,value:r.id,checked:o,onChange:()=>a(r.id),className:"sr-only"}),n.jsx("span",{className:d("size-2 rounded-full",l.solid)}),r.name]},r.id)})]})}function Oe({title:e,subtitle:t,onClose:a,children:s,className:i}){return n.jsxs("section",{className:d("flex h-full w-full flex-col bg-surface",i),children:[n.jsxs("header",{className:"flex h-pane-header shrink-0 items-center gap-2 border-b border-line px-row-inset",children:[n.jsx("h2",{className:"shrink-0 text-xs font-medium text-fg",children:e}),t!==void 0&&t!==""&&n.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-fg-muted",children:t}),n.jsx("button",{type:"button","aria-label":"Close editor",onClick:a,className:"ml-auto flex size-7 shrink-0 items-center justify-center rounded-md text-fg-subtle outline-none hover:bg-surface-sunken hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",children:n.jsx(se,{className:"size-4"})})]}),n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-row-inset py-5",children:n.jsx("div",{className:"mx-auto w-full max-w-2xl",children:s})})]})}const E=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],N=["SU","MO","TU","WE","TH","FR","SA"],Q=["January","February","March","April","May","June","July","August","September","October","November","December"],G=["first","second","third","fourth","last"],K=[1,2,3,4,-1],J="MO,TU,WE,TH,FR",Ie=e=>e.replace(/,\s*\d{2}:\d{2}$/,"").trim();function O(e){const t=Ie(e);if(t==="")return"";if(t==="Every day")return"FREQ=DAILY";if(t==="Every weekday")return`FREQ=WEEKLY;BYDAY=${J}`;const a=t.match(/^Every week on (\w+)$/);if(a){const r=E.indexOf(a[1]);return r===-1?void 0:`FREQ=WEEKLY;BYDAY=${N[r]}`}const s=t.match(/^Every month on the (\w+) (\w+)$/);if(s){const r=G.indexOf(s[1]),l=E.indexOf(s[2]);return r===-1||l===-1?void 0:`FREQ=MONTHLY;BYDAY=${K[r]}${N[l]}`}const i=t.match(/^Every year on (\d{1,2}) (\w+)$/);if(i){const r=Q.indexOf(i[2]);return r===-1?void 0:`FREQ=YEARLY;BYMONTH=${r+1};BYMONTHDAY=${Number(i[1])}`}}const Me=e=>e===""?"":`, ${e}`;function Pe(e,t){const a=new Map(e.split(";").map(l=>l.split("=")).filter(l=>l.length===2).map(([l,o])=>[l.toUpperCase(),o.toUpperCase()])),s=Me(t),i=a.get("FREQ"),r=a.get("BYDAY");if(!(a.has("INTERVAL")&&a.get("INTERVAL")!=="1")&&!(a.has("UNTIL")||a.has("COUNT"))){if(i==="DAILY")return`Every day${s}`;if(i==="WEEKLY"){if(r===void 0)return;if(r===J)return`Every weekday${s}`;const l=N.indexOf(r);return l===-1?void 0:`Every week on ${E[l]}${s}`}if(i==="MONTHLY"){const l=r?.match(/^(-?\d)([A-Z]{2})$/);if(!l)return;const o=K.indexOf(Number(l[1])),c=N.indexOf(l[2]);return o===-1||c===-1?void 0:`Every month on the ${G[o]} ${E[c]}${s}`}if(i==="YEARLY"){const l=Number(a.get("BYMONTH")),o=Number(a.get("BYMONTHDAY"));return!l||!o||l>12?void 0:`Every year on ${o} ${Q[l-1]}${s}`}}}function We(e,t){return{title:"",date:e,startTime:"09:00",endTime:"10:00",allDay:!1,calendarId:t,location:"",guests:"",notes:"",repeat:""}}function _e(e,t){return{title:e.title,date:e.start.slice(0,10),startTime:e.allDay?"":e.start.slice(11,16),endTime:e.allDay?"":e.end.slice(11,16),allDay:e.allDay,calendarId:e.calendarId,location:t.location,guests:"",notes:t.notes,repeat:t.repeat}}function q(e,t){return e.allDay?{start:e.date,end:ee(e.date,1)}:{start:_(e.date,e.startTime,t),end:_(e.date,e.endTime,t)}}function V(e,t){return e.title.trim()===""?"Give the event a title before saving it.":e.date===""?"Pick the day the event is on.":e.calendarId===""?"Pick the calendar to save the event in.":!e.allDay&&(e.startTime===""||e.endTime==="")?"Set a start and an end time, or mark the event all day.":!e.allDay&&e.endTime<=e.startTime?"The end time is not after the start time. Move one of them.":t&&O(e.repeat)===void 0?"This calendar can't store that repeat rule. Pick one of the offered rules, or turn the repeat off.":""}function Ue(e,t){const a=V(e,!0);if(a!=="")return{ok:!1,problem:a};const{start:s,end:i}=q(e,t);return{ok:!0,input:{calendarId:e.calendarId,summary:e.title.trim(),description:e.notes,location:e.location,start:s,end:i,allDay:e.allDay,...t===""?{}:{timeZone:t},recurrenceRule:O(e.repeat)??""}}}function Be(e,t,a){const s=t.repeat!==e.repeat,i=V(t,s);if(i!=="")return{ok:!1,problem:i};const r={};if(t.title.trim()!==e.title.trim()&&(r.summary=t.title.trim()),t.location!==e.location&&(r.location=t.location),t.notes!==e.notes&&(r.description=t.notes),t.date!==e.date||t.startTime!==e.startTime||t.endTime!==e.endTime||t.allDay!==e.allDay){const{start:o,end:c}=q(t,a);r.start=o,r.end=c,r.allDay=t.allDay,a!==""&&(r.timeZone=a)}return s&&(r.recurrenceRule=O(t.repeat)??""),{ok:!0,patch:r}}const C=ce(400,404,412),$e=new Set(["calendarEventOperationsListCalendarEvents","calendarEventDetailOperationsGetCalendarEvent","calendarFreeBusyOperationsListCalendarFreeBusy"]),D={kind:"written"},k=e=>de(e)===412?{kind:"conflict"}:{kind:"refused",message:me(e)},we={this:"This",following:"Following",all:"All"};function Se(){const e=oe();return p.useCallback(()=>{e.invalidateQueries({predicate:t=>{const a=t.queryKey[0];if(typeof a!="object"||a===null)return!1;const s=a._id;return typeof s=="string"&&$e.has(s)}})},[e])}const B=({scope:e,recurrenceId:t})=>e===void 0||e==="all"?{}:{scope:we[e],recurrenceId:t};function ze(){const e=Se(),t=T({...re(),meta:C,onSuccess:e}),a=T({...ie(),meta:C,onSuccess:e}),s=T({...le(),meta:C,onSuccess:e}),i=p.useCallback(o=>t.mutateAsync({body:o}).then(()=>D).catch(k),[t]),r=p.useCallback((o,c)=>a.mutateAsync({path:{calendarObjectId:o.calendarObjectId},query:{calendarId:o.calendarId,...B(o)},headers:{"If-Match":o.etag},body:c}).then(()=>D).catch(k),[a]),l=p.useCallback(o=>s.mutateAsync({path:{calendarObjectId:o.calendarObjectId},query:{calendarId:o.calendarId,...B(o)},headers:{"If-Match":o.etag}}).then(()=>D).catch(k),[s]);return p.useMemo(()=>({createEvent:i,updateEvent:r,deleteEvent:l,isWriting:t.isPending||a.isPending||s.isPending}),[i,r,l,t.isPending,a.isPending,s.isPending])}function He({title:e,subtitle:t,calendars:a,draft:s,onChange:i,problem:r,saveLabel:l,isSaving:o,repeatEditable:c=!0,calendarEditable:y=!0,onSave:g,onCancel:b}){return n.jsx(Oe,{title:e,subtitle:t,onClose:b,children:n.jsx(De,{draft:s,onChange:i,calendars:a,layout:"pane",repeatEditable:c,calendarEditable:y,saveLabel:o?"Saving…":l,onSave:g,onCancel:b,header:r===""?void 0:n.jsxs("div",{role:"alert",className:"flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm",children:[n.jsx(ue,{className:"mt-0.5 size-4 shrink-0 text-danger","aria-hidden":"true"}),n.jsx("p",{className:"min-w-0 flex-1 break-words text-fg",children:r})]})})})}export{He as C,Ue as c,_e as d,We as e,Be as p,Pe as t,ze as u};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-B7Z_VTQH.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{aj as m,j as o,O as p}from"./index-B7Z_VTQH.js";import{a}from"./MailShell-NsicYXmr.js";import{M as r}from"./MailboxPane-B2ufgVwI.js";import{d as e}from"./search-token-index-Cp8U_9CO.js";import{u as s}from"./search-mirror-gwKyvyS3.js";import"./FullCompose-L3u0M9jx.js";import"./ErrorState-BND_1CuC.js";import"./index-D356i3SP.js";import"./useMessageBodyContent-D1pso69a.js";import"./useSignature-DkKAGoyM.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-cuoS7Za9.js";import"./sections-CoGcGCNP.js";import"./confirm-dialog-DJwDI10e.js";import"./useSearchTokenContext-BI18VCbl.js";import"./kbd-DC1TU-ib.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-ChwiMB1J.js";import"./circle-check-big-BhJgBM3A.js";import"./refresh-cw-BGeOxWhI.js";import"./useQueries-OnbrANu7.js";import"./MailListHeader-DiI5otvq.js";import"./roving-focus-DOho_TJw.js";import"./attachment-file-DBmXtWWD.js";import"./mail-CE9mZHRO.js";import"./avatar-DsC7KMh_.js";import"./EmptyState-B8pxCvgq.js";import"./download-Cg086Q1a.js";import"./calendar-event-chip-aW3iXF3m.js";import"./calendar-color-CXQvTXXO.js";import"./map-pin-fc35L0nf.js";import"./attendee-row-CFZyUMUp.js";import"./clock-C871fqyU.js";import"./useLayoutTier-m2Yj3Bit.js";import"./shield-check-BTT2FIky.js";import"./useFilters-R75OGKuu.js";import"./menu-BFEzC3rH.js";import"./MailViewChrome-Dhd5NwZT.js";import"./NavMenuButton-DURIiOWw.js";import"./useLabels-BhpyswcI.js";import"./useSemanticSearch-fU6QEg8I.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-BVoaqyZL.js";import"./circle-help-DmmRA9UB.js";import"./circle-check-BG2_X7qM.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-B7Z_VTQH.js";import{M as r}from"./MailboxPane-B2ufgVwI.js";import"./useSearchTokenContext-BI18VCbl.js";import"./kbd-DC1TU-ib.js";import"./useMessageBodyContent-D1pso69a.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-ChwiMB1J.js";import"./circle-check-big-BhJgBM3A.js";import"./refresh-cw-BGeOxWhI.js";import"./useQueries-OnbrANu7.js";import"./MailListHeader-DiI5otvq.js";import"./roving-focus-DOho_TJw.js";import"./search-token-index-Cp8U_9CO.js";import"./attachment-file-DBmXtWWD.js";import"./mail-CE9mZHRO.js";import"./avatar-DsC7KMh_.js";import"./index-D356i3SP.js";import"./useSignature-DkKAGoyM.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-cuoS7Za9.js";import"./sections-CoGcGCNP.js";import"./EmptyState-B8pxCvgq.js";import"./ErrorState-BND_1CuC.js";import"./download-Cg086Q1a.js";import"./calendar-event-chip-aW3iXF3m.js";import"./calendar-color-CXQvTXXO.js";import"./map-pin-fc35L0nf.js";import"./attendee-row-CFZyUMUp.js";import"./clock-C871fqyU.js";import"./useLayoutTier-m2Yj3Bit.js";import"./shield-check-BTT2FIky.js";import"./useFilters-R75OGKuu.js";import"./confirm-dialog-DJwDI10e.js";import"./menu-BFEzC3rH.js";import"./MailViewChrome-Dhd5NwZT.js";import"./NavMenuButton-DURIiOWw.js";import"./useLabels-BhpyswcI.js";import"./useSemanticSearch-fU6QEg8I.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-BVoaqyZL.js";import"./circle-help-DmmRA9UB.js";import"./circle-check-BG2_X7qM.js";function S(){return o.jsx(r.Reading,{})}export{S as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B7Z_VTQH.js";import{F as r}from"./FlaggedPane-CkWsw0HI.js";import"./useSearchTokenContext-BI18VCbl.js";import"./kbd-DC1TU-ib.js";import"./useMessageBodyContent-D1pso69a.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-DiI5otvq.js";import"./roving-focus-DOho_TJw.js";import"./search-token-index-Cp8U_9CO.js";import"./useQueries-OnbrANu7.js";import"./attachment-file-DBmXtWWD.js";import"./mail-CE9mZHRO.js";import"./avatar-DsC7KMh_.js";import"./index-D356i3SP.js";import"./useSignature-DkKAGoyM.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-cuoS7Za9.js";import"./sections-CoGcGCNP.js";import"./EmptyState-B8pxCvgq.js";import"./ErrorState-BND_1CuC.js";import"./download-Cg086Q1a.js";import"./calendar-event-chip-aW3iXF3m.js";import"./calendar-color-CXQvTXXO.js";import"./map-pin-fc35L0nf.js";import"./attendee-row-CFZyUMUp.js";import"./clock-C871fqyU.js";import"./useLayoutTier-m2Yj3Bit.js";import"./shield-check-BTT2FIky.js";import"./useFilters-R75OGKuu.js";import"./confirm-dialog-DJwDI10e.js";import"./menu-BFEzC3rH.js";import"./MailViewChrome-Dhd5NwZT.js";import"./refresh-cw-BGeOxWhI.js";import"./wizard-selection-DxUM65kM.js";function H(){return o.jsx(r.Reading,{})}export{H as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-B7Z_VTQH.js";import{B as o}from"./BriefPane-Dkxhbmf3.js";import"./useSearchTokenContext-BI18VCbl.js";import"./kbd-DC1TU-ib.js";import"./useMessageBodyContent-D1pso69a.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-DiI5otvq.js";import"./roving-focus-DOho_TJw.js";import"./search-token-index-Cp8U_9CO.js";import"./useQueries-OnbrANu7.js";import"./attachment-file-DBmXtWWD.js";import"./mail-CE9mZHRO.js";import"./avatar-DsC7KMh_.js";import"./index-D356i3SP.js";import"./useSignature-DkKAGoyM.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-cuoS7Za9.js";import"./sections-CoGcGCNP.js";import"./EmptyState-B8pxCvgq.js";import"./ErrorState-BND_1CuC.js";import"./download-Cg086Q1a.js";import"./calendar-event-chip-aW3iXF3m.js";import"./calendar-color-CXQvTXXO.js";import"./map-pin-fc35L0nf.js";import"./attendee-row-CFZyUMUp.js";import"./clock-C871fqyU.js";import"./useLayoutTier-m2Yj3Bit.js";import"./shield-check-BTT2FIky.js";import"./useFilters-R75OGKuu.js";import"./confirm-dialog-DJwDI10e.js";import"./menu-BFEzC3rH.js";import"./useRefreshControl-ChwiMB1J.js";import"./circle-check-big-BhJgBM3A.js";import"./refresh-cw-BGeOxWhI.js";import"./useSemanticSearch-fU6QEg8I.js";import"./useLabels-BhpyswcI.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-B7Z_VTQH.js";import{O as t}from"./OutboxPane-BdzyB0yX.js";import"./roving-focus-DOho_TJw.js";import"./useSearchTokenContext-BI18VCbl.js";import"./kbd-DC1TU-ib.js";import"./useMessageBodyContent-D1pso69a.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-BhJgBM3A.js";import"./clock-C871fqyU.js";import"./row-actions-CgvAWKly.js";import"./rotate-ccw-DZYCC0q2.js";import"./NavMenuButton-DURIiOWw.js";import"./menu-BFEzC3rH.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{eL as o,j as m}from"./index-B7Z_VTQH.js";import{O as e}from"./OpenCalendarEvent-DrqU23A_.js";import"./CalendarComposePane-BD4pTRBc.js";import"./window-CHmnHHPE.js";import"./ErrorState-BND_1CuC.js";import"./calendar-color-CXQvTXXO.js";import"./attendee-row-CFZyUMUp.js";import"./avatar-DsC7KMh_.js";import"./clock-C871fqyU.js";import"./map-pin-fc35L0nf.js";import"./mail-CE9mZHRO.js";import"./pencil-Bw-KIM6o.js";import"./useCalendars-fIST617L.js";import"./useCalendarData-yJ6hC9z8.js";import"./useQueries-OnbrANu7.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-B7Z_VTQH.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-B7Z_VTQH.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-B7Z_VTQH.js";const n=o;export{n as component};