1import{j as e,L as Le,f as L,r as p,d as Te}from"./vendor-react-C5PewRsl.js";import{a8 as R,at as c,d1 as q,a as me,E as ue,cD as he,aG as v,ap as z,ch as J,h as j,i as te,cJ as pe,bm as Ie,cK as P,ag as ge,b8 as xe,a4 as N,dO as Pe,g3 as Fe,g4 as Ge,g5 as Ue,g6 as Be,bb as re,aj as ze,hC as Me,cB as He,fC as Ve,fD as qe,fE as Ze,cC as Qe,cm as ae,hN as We}from"./main-DoxpiNgY.js";import{a as M,aC as Ye,J as Ke}from"./vendor-misc-DVk-0spb.js";import{C as O}from"./CalendarEvent-BCcUilmz.js";import{b as Xe}from"./utils-CCfIE1kz.js";import{D as Je,W as _e}from"./WebHub-HHw38nd1.js";import{D as $e}from"./DropdownButton-DKp9kap5.js";import{C as es,u as ss}from"./ChatHistoryDrawer-BRHQPXn4.js";import{u as ts}from"./vendor-analytics-aNB2-Vwh.js";import{A as rs,a as as}from"./AnalyticsTopStats-Ce0p_riE.js";import{A as be,c as fe,d as ye,a as je,b as ve,e as Ne}from"./AnnouncementDialog-CPuMUj7M.js";import{u as ns,m as F,A as Ce}from"./vendor-ui-BKWhI8D_.js";import{D as is}from"./DashboardChatThreadPanel-CeiCU8qd.js";import{L as ne}from"./LabelledIconButton-KDjPwz0k.js";import{D as os}from"./DashboardGreeting-BJQyOIkm.js";import{c as ls}from"./inboxThreadGrouping-C4vptpKC.js";import{u as we,S as _}from"./SeatLocked-DufWglWu.js";import{N as Se}from"./NumberFlow-client-48rw3j0J-0RnkfHpX.js";import{P as cs}from"./CheckoutSession-Uyh4QRnw.js";import{N as ds}from"./NewMeetingsSection-DB5oFYye.js";import{N as ms}from"./NewSchedulingLinkSection-3iR5nzhn.js";import"./vendor-runtime-DG-GlVKR.js";import"./index-FFROJYLR.js";import"./vendor-icons-Nh3lIdcn.js";import"./vendor-sentry-SKD9L_Jy.js";import"./useIsOutsideDashboardOnboardingWindow-DOSpKEfd.js";import"./useEmailForwardingConnections-fHoNEjpk.js";import"./DashboardChatMessages-D7DljgCh.js";import"./ChatMessageContent-7H3lhDYB.js";import"./documents-BdJCmYft.js";import"./useHasDocumentAccess-CczcC0ux.js";import"./utils-C2A-qYlQ.js";import"./useEmailInboxes-C0IYBzpX.js";import"./mermaid-3ZIDBTTL-BQtYO9pL.js";import"./index-DirJCEvl.js";import"./marked.esm-arQYK1KV.js";import"./ChatToolUsage-CVgoZGld.js";/* empty css */import"./ChatInput-B-RDd5XN.js";import"./useDebounce-D59gqLuZ.js";import"./index-C3qxNN0c.js";import"./index-BHJ2L8hx.js";import"./index-BoCVrkPy.js";import"./index-CEXy5VPo.js";import"./getBrowserTimezone-s91SEF56.js";import"./index-Dv1bGROt.js";import"./index-CMGZUsy1.js";import"./webHubTracking-DFuUKJnL.js";import"./WebHubTourProvider-CWXLXPXU.js";import"./TourTooltipCard-Dl0dh8U4.js";import"./tokens-BxNv064D.js";import"./useIntegrationAccessGuard-DzM4Q1Tu.js";import"./useConnectedMailboxLimit-BrXuCs1P.js";import"./pricing2026Copy-ClCi7IQW.js";import"./trials-CfKKyfjt.js";import"./connectedMailboxLimit-HTcz_Mju.js";import"./integrationSettingKey-wfe_NT02.js";import"./webHubTourStorage-cyP4L9fI.js";import"./UserPersona-B26PX-KO.js";import"./chatSuggestions-Td41LgWs.js";import"./CardIconButton-CL5iBaEI.js";import"./WebHubOrganisationLayout-D0h85smh.js";import"./ErrorBoundary-BKSUgt6p.js";import"./useIsCalendarPageEnabled-C2zIILf3.js";import"./useRecentSpaces-BxmHFCrw.js";import"./useAccessibleSpaces-Bna_bKTv.js";import"./queryKeys-Bioab_aL.js";import"./useSpaceUserPreferences-Da8K8_0h.js";import"./Space-YsH2CuNS.js";import"./PriorityVisualization-Bw8i7HXR.js";import"./classifyTermsDocumentForOrganisation-BANDevW1.js";import"./isEnterpriseOrganisation-__FKNpvM.js";import"./ThreadRow-CPSoEn_-.js";import"./friendlyLabelName-PYQei73U.js";import"./resolveForMembership-vlUJe36m.js";import"./useLabels-CQVM_iAx.js";import"./labelPresentationalData-LCwAkoKF.js";import"./inboxUtils-CMQfpZGA.js";import"./spaceCompanyLogo-Bj8WM4pr.js";import"./getRadarMeetingNotesPath-CwLWEHrK.js";import"./navigation-B1x0y9vW.js";import"./ActionItem-Dq1aVDKK.js";import"./useEmailSetup-B87f2BCu.js";import"./InboxSearch-D2zc1csV.js";import"./useInboxSetupPrompt-CNIDCQ0O.js";import"./Accordion-D62H95mb.js";import"./Textarea-DPee92Vl.js";import"./useConnectEmail-CIkrI9A1.js";import"./updateCalendarEventNotetaker-CeKiu_bz.js";import"./getCallRecordingUrl-D3bKA0A8.js";import"./useWebHubRouteTour-Z9c3dIbF.js";import"./useChatHistory-CybKmKor.js";import"./getPlainTextFromMarkdown-Du6FUcz6.js";import"./dateLabel-BhO2GJTA.js";import"./useChatThreadModeSelection-BhNrKs-i.js";import"./inboxDeepLink-G-axyWoV.js";import"./SheetDrawer-CoquK8Wb.js";import"./dropdown-menu-CTxQ4zKB.js";import"./ThreadDayDivider-C2nL7Id5.js";import"./PendingFlowQuestionnairePanel-Bd4MNs_t.js";import"./ThreadRadio-uN-gwsux.js";import"./groupBy-BRISzjna.js";import"./CardButtonList-D4gFtyeN.js";import"./buildSchedulingLink-BGx8N3Wh.js";try{let s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="9a0b38f5-9868-4068-9751-96361380dbc4",s._sentryDebugIdIdentifier="sentry-dbid-9a0b38f5-9868-4068-9751-96361380dbc4")}catch{}const us=({basicCalendarEvent:s,userEmail:t})=>{const r=Xe(s),{organiserEmail:a,attendees:n}=s,i=t.toLowerCase(),l=r===1||(a==null?void 0:a.toLowerCase())===i,o=(n==null?void 0:n.some(m=>m.email.toLowerCase()===i&&m.responseStatus===O.ACCEPTED))??!1;return l||o},hs="/assets/customize-inbox-mock-Ber55d7f.png",ps="/assets/meeting-notes-mock-B3d9-qjK.png",gs=()=>{const{organisationId:s}=R();return e.jsxs("section",{className:"mt-4 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(c,{level:"h3",weight:500,children:"Analytics"}),e.jsx(Le,{to:`/org/${s}/analytics`,className:"flex items-center gap-1 text-rb-black hover:opacity-80",children:e.jsx(c,{level:"p",weight:500,className:"text-[14px]",children:"View more"})})]}),e.jsx(rs,{children:e.jsx(as,{})})]})},xs="data:image/webp;base64,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",ie=[{id:"p4",left:"20.96%",right:"58.85%",top:212,riseFrom:10},{id:"p3",left:"35.96%",right:"43.85%",top:150,riseFrom:72},{id:"p2",left:"50.96%",right:"28.85%",top:88,riseFrom:134},{id:"p1",left:"65.96%",right:"13.85%",top:26,riseFrom:196}],bs=.35,fs=.1,ys=({open:s,organisationId:t,onClose:r})=>{const a=L(),{flags:n}=q(),{logEvent:i,logButtonPress:l}=me(),o=ns(),m=p.useRef(!1);p.useEffect(()=>{!s||m.current||(m.current=!0,i(ue.SHOW_ANALYTICS_ANNOUNCEMENT))},[s,i]);const b=async()=>{await n.updateFlag("hasSeenAnalyticsAnnouncement",!0)},g=async()=>{l(z.ANALYTICS_ANNOUNCEMENT_CLOSE),r(),b()},h=async()=>{l(z.ANALYTICS_ANNOUNCEMENT_CTA),r(),b(),a(`/org/${t}/analytics`)},u=d=>{d||r()};return e.jsx(he,{open:s,onOpenChange:u,children:e.jsxs(be,{children:[e.jsx(fe,{className:"bg-rb-orange-neutral",children:ie.map((d,y)=>e.jsx(F.div,{initial:o?!1:{y:d.riseFrom},animate:{y:0},transition:{duration:.7,delay:o?0:bs+y*fs,ease:[.22,1,.36,1]},style:{top:d.top,left:d.left,right:d.right,zIndex:ie.length-y},className:"absolute aspect-312/1322",children:e.jsx("img",{src:xs,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 size-full object-cover select-none"})},d.id))}),e.jsxs(ye,{children:[e.jsx(je,{children:"Analytics are here"}),e.jsx(ve,{children:"Track time saved, inbox noise removed, and ROI for you and your team."})]}),e.jsxs(Ne,{children:[e.jsx(v,{variant:"secondary",label:"Close",onClick:g}),e.jsx(v,{variant:"primary",label:"See my analytics",icon:"ArrowRight",iconDir:"right",onClick:h})]})]})})},js="/assets/chat-discovery-hero-BXCHZUDt.png",vs=({open:s,onClose:t})=>{const{flags:r}=q(),a=()=>{t(),r.updateFlag("hasSeenChatDiscovery",!0)},n=i=>{i||a()};return e.jsx(he,{open:s,onOpenChange:n,children:e.jsxs(be,{children:[e.jsx(fe,{className:"bg-rb-parchment",children:e.jsx("img",{src:js,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 size-full object-cover select-none"})}),e.jsxs(ye,{children:[e.jsx(je,{children:"All your conversations, in one place"}),e.jsx(ve,{children:"Find and pick up any past conversations in your chat section, any time."})]}),e.jsx(Ne,{className:"justify-center pb-6",children:e.jsx(v,{variant:"primary",label:"Got it",onClick:a,className:"w-full max-w-[280px]"})})]})})},Ns=({chatId:s,onClose:t})=>{const r=J();return e.jsx(Ce,{initial:!1,children:s&&e.jsx(F.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.18,ease:"easeOut"},className:j("fixed inset-0 z-50 flex flex-col overflow-hidden sm:p-6",r?"sm:bg-rb-darkbtn/30":"sm:bg-rb-black/30"),children:e.jsx("div",{className:j("flex h-full w-full flex-col overflow-hidden bg-rb-white",r?"sm:rounded-2xl sm:border sm:border-rb-darkbtn/8 sm:shadow-[0_8px_40px_-8px_rgba(26,26,23,0.30)]":"sm:rounded-lg sm:shadow-rb-shadow-lifted"),children:e.jsx(Cs,{chatId:s,onClose:t})})},s)})},Cs=({chatId:s,onClose:t})=>{const r=J(),[a,n]=p.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(es,{open:a,onOpenChange:n,activeChatId:s}),e.jsx(is,{chatId:s,surface:"dash_home_tab",header:r?e.jsxs(e.Fragment,{children:[e.jsx(te,{variant:"ghost",size:"sm",icon:"Chat",label:"History",onClick:()=>n(!0)}),e.jsx("div",{className:"flex-1"}),e.jsx(te,{variant:"ghost",size:"sm",icon:"X",label:"Close",onClick:t})]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{icon:"Chat",label:"History",pillSide:"right",onClick:()=>n(!0)}),e.jsx("div",{className:"flex-1"}),e.jsx(ne,{icon:"X",label:"Close",pillSide:"left",onClick:t})]})})]})},ws="/assets/connect-calendar-BOxUVHKs.png",Ss="/assets/connect-email-DNyZDkiY.png",ks="/assets/subscribe-padlock-VX_mwKW4.png",ke=()=>{const{organisationId:s,planData:t,subscription:r}=R(),{hasEmailConnection:a,hasCalendarConnection:n,inboxConnected:i}=pe(),l=(r==null?void 0:r.data().status)===Ie.TRIAL&&(r==null?void 0:r.data().paymentProvider)===cs.STRIPE,o=t.planTypeSource===P.SUBSCRIPTION,m=t.planTypeSource===P.CUSTOM_PLAN,h=!o&&!l&&!m&&(a&&n),u=[{id:"connect-email",title:"Connect your email",description:"Link Gmail or Outlook to unlock inbox sorting and draft replies.",isCompleted:a,ctaLabel:"Connect inbox",ctaPath:`/org/${s}/settings/integrations`,icon:"Envelope"},{id:"connect-calendar",title:"Connect your calendar",description:"Sync your calendar for meeting prep, notes, and scheduling.",isCompleted:n,ctaLabel:"Connect calendar",ctaPath:`/org/${s}/settings/integrations`,icon:"CalendarBlank"},...h?[{id:"subscribe",title:t.planTypeSource===P.NONE?"Subscribe to continue":"Subscribe for full access",description:t.planTypeSource===P.NONE?"Your trial has ended. Subscribe to keep Fyxer AI working for you.":"Start a subscription to keep your automations running after your trial.",isCompleted:!1,ctaLabel:"View plans",ctaPath:`/org/${s}/settings/billing`,icon:"Tag",isUrgent:t.planTypeSource===P.NONE}]:[]],d=u.filter(I=>I.isCompleted).length,y=u.length,k=d===y;return{steps:u,completedCount:d,totalCount:y,allComplete:k,isEligible:!k||a&&!i}},oe=1e4,As=({enabled:s=!0}={})=>{const t=ge(),{organisationId:r}=R(),{userId:a}=xe(),n=t.organisations.id(r).users.id(a),i=s&&!!(r&&a),l=M({queryKey:["onboarding-live-stats",r,a,"email-count"],queryFn:()=>n.systemLabelledEmails.totalCount(),refetchInterval:i?oe:!1,enabled:i}),o=M({queryKey:["onboarding-live-stats",r,a,"draft-count"],queryFn:()=>n.systemCreatedDrafts.totalCount(),refetchInterval:i?oe:!1,enabled:i});return{emailCount:l.data??0,draftCount:o.data??0,isLoading:l.isLoading||o.isLoading}},Es=s=>s<.1?"Connecting...":s<.35?"Syncing emails...":s<1?"Categorizing emails...":"Creating drafts...",Ds=s=>s<.1?"connected":s<.35?"synced":s<1?"categorizing":"drafts",Rs=[{key:"connected",label:"Connected"},{key:"synced",label:"Synced emails"},{key:"categorizing",label:"Categorizing"},{key:"drafts",label:"Creating drafts"}],Os={connected:0,synced:1,categorizing:2,drafts:3},Ls={"emails-processed":{icon:"Envelope",label:"Emails categorized"},"drafts-created":{icon:"PencilSimple",label:"Drafts created"}},S=180,f=120,K=14,H=10,X=(S-K)/2,V=(f-H)/2,W=2*Math.PI*X,Y=2*Math.PI*V,Ts=({progress:s})=>{const t=Math.round(s*100),r=W*(1-s),a=Y*(1-s);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative flex items-center justify-center md:hidden",style:{width:f,height:f},children:[e.jsxs("svg",{width:f,height:f,className:"-rotate-90",children:[e.jsx("circle",{cx:f/2,cy:f/2,r:V,fill:"none",stroke:"currentColor",strokeWidth:H,className:"text-rb-gray-neutral"}),e.jsx(F.circle,{cx:f/2,cy:f/2,r:V,fill:"none",stroke:"currentColor",strokeWidth:H,strokeLinecap:"round",className:"text-rb-orange-neutral",strokeDasharray:Y,initial:{strokeDashoffset:Y},animate:{strokeDashoffset:a},transition:{duration:.8,ease:"easeOut"}})]}),e.jsxs("div",{className:"absolute flex flex-col items-center",children:[e.jsxs("span",{className:"text-2xl leading-none font-semibold text-rb-black tabular-nums",children:[t,"%"]}),e.jsx(c,{level:"label",color:"secondary-dark",className:"mt-0.5",children:"complete"})]})]}),e.jsxs("div",{className:"relative hidden items-center justify-center md:flex",style:{width:S,height:S},children:[e.jsxs("svg",{width:S,height:S,className:"-rotate-90",children:[e.jsx("circle",{cx:S/2,cy:S/2,r:X,fill:"none",stroke:"currentColor",strokeWidth:K,className:"text-rb-gray-neutral"}),e.jsx(F.circle,{cx:S/2,cy:S/2,r:X,fill:"none",stroke:"currentColor",strokeWidth:K,strokeLinecap:"round",className:"text-rb-orange-neutral",strokeDasharray:W,initial:{strokeDashoffset:W},animate:{strokeDashoffset:r},transition:{duration:.8,ease:"easeOut"}})]}),e.jsxs("div",{className:"absolute flex flex-col items-center",children:[e.jsxs("span",{className:"text-[32px] leading-none font-semibold text-rb-black tabular-nums",children:[t,"%"]}),e.jsx(c,{level:"label",color:"secondary-dark",className:"mt-1",children:"complete"})]})]})]})},Ae=({stat:s})=>{const t=Ls[s.key];if(!t)return null;const r=Number(s.value)||0;return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-rb-parchment",children:e.jsx(N,{name:t.icon,size:16,color:"secondary-dark"})}),s.isLoading?e.jsx("div",{className:"h-6 w-12 shrink-0 animate-pulse rounded-sm bg-rb-gray-neutral"}):e.jsx(Se,{value:r,className:"shrink-0 text-xl leading-none font-semibold text-rb-black tabular-nums",format:{maximumFractionDigits:0,notation:Math.abs(r)>=1e4?"compact":"standard"}}),e.jsx(c,{level:"label",color:"secondary-dark",className:"min-w-0",children:t.label})]})},Is=({progress:s})=>{const t=Ds(s),r=Os[t];return e.jsx("div",{className:"grid grid-cols-2 gap-0 border-t border-rb-gray-neutral sm:grid-cols-4",children:Rs.map((a,n)=>{const i=n<r,l=n===r;return e.jsxs("div",{className:j("flex items-center gap-2 px-3 py-2",{"border-l border-rb-gray-neutral":n%2!==0,"sm:border-l sm:border-rb-gray-neutral":n>0,"border-t border-rb-gray-neutral sm:border-t-0":n>=2}),children:[i?e.jsx(N,{name:"Check",size:14,color:"primary-dark",className:"shrink-0 text-rb-green-dark"}):l?e.jsxs("span",{className:"relative flex h-2.5 w-2.5 shrink-0",children:[e.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-rb-orange-neutral opacity-75"}),e.jsx("span",{className:"relative inline-flex h-2.5 w-2.5 rounded-full bg-rb-orange-neutral"})]}):e.jsx("span",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-rb-gray-neutral"}),e.jsx(c,{level:"label",color:i||l?"primary-dark":"disabled",weight:l?500:void 0,className:"text-xs",children:a.label})]},a.key)})})},Ps=({organisationId:s})=>{const t=L();return e.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-rb-gray-neutral bg-rb-white px-3 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-rb-parchment",children:e.jsx(N,{name:"CalendarBlank",size:16,color:"secondary-dark"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx(c,{level:"p",weight:500,className:"text-sm",children:"Connect your calendar"}),e.jsx(c,{level:"label",color:"secondary-dark",children:"With calendar access, Fyxer will recommend times to meet when drafting replies"})]})]}),e.jsx(v,{variant:"secondary",label:"Connect",icon:"ArrowRight",iconDir:"right",onClick:()=>t(`/org/${s}/settings/integrations`),className:"shrink-0"})]})},Fs=new Set(["connect-email","connect-calendar"]),Gs=({step:s})=>{const t=L(),{isSeatLocked:r}=we("emailConnection"),a=r&&s.id==="connect-email",n=e.jsx(v,{variant:"secondary",label:s.ctaLabel,icon:"ArrowRight",iconDir:"right",disabled:a,onClick:()=>t(s.ctaPath),className:"shrink-0"});return e.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-rb-gray-neutral bg-rb-white px-3 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-rb-parchment",children:e.jsx(N,{name:s.icon,size:16,color:"secondary-dark"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx(c,{level:"p",weight:500,className:"text-sm",children:s.title}),e.jsx(c,{level:"label",color:"secondary-dark",children:s.description})]})]}),a?e.jsx(_,{feature:"emailConnection",children:n}):n]})},Us=({step:s})=>{const t=L();return e.jsxs("button",{type:"button",onClick:()=>t(s.ctaPath),className:j("group flex w-full cursor-pointer items-center gap-4 roun
1ded-lg border px-4 py-3 text-left transition-colors",s.isUrgent?"border-rb-orange-neutral/50 bg-rb-orange-neutral/4 hover:bg-rb-orange-neutral/[0.07]":"border-rb-gray-neutral bg-rb-white hover:bg-rb-parchment-light"),children:[e.jsx("img",{src:ks,alt:"",className:"h-[52px] w-[52px] shrink-0 transition-transform select-none group-hover:translate-x-0.5"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx(c,{level:"p",weight:500,className:"text-sm",children:s.title}),e.jsx(c,{level:"label",color:"secondary-dark",className:"leading-[1.6]",children:s.description})]}),e.jsxs("span",{className:j("flex shrink-0 items-center gap-2 rounded-[4px] border px-2 py-1 text-sm font-medium transition-colors",s.isUrgent?"border-rb-orange-neutral/40 text-rb-orange-neutral hover:border-rb-orange-neutral":"border-transparent text-rb-black hover:border-rb-gray-hovered"),children:[s.ctaLabel,e.jsx(N,{name:"ArrowRight",size:14,"aria-hidden":"true"})]})]})},Ee=({steps:s})=>e.jsx(e.Fragment,{children:s.map(t=>t.id==="subscribe"?e.jsx(Us,{step:t},t.id):e.jsx(Gs,{step:t},t.id))}),Bs=new Set(["emails-processed","drafts-created"]),le=({illustration:s,title:t,description:r,onClick:a,disabled:n=!1})=>e.jsxs("button",{type:"button",onClick:a,disabled:n,className:j("group flex w-full items-center gap-4 border-b border-rb-gray-neutral bg-rb-white px-4 py-3 text-left transition-colors last:border-b-0",n?"cursor-not-allowed text-rb-disabled":"cursor-pointer hover:bg-rb-parchment-light"),children:[e.jsx("img",{src:s,alt:"",className:"h-[52px] w-[52px] shrink-0 transition-transform select-none group-hover:translate-x-0.5"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx(c,{level:"p",weight:500,className:"text-sm",children:t}),e.jsx(c,{level:"label",color:"secondary-dark",className:"leading-[1.6]",children:r})]}),e.jsxs("span",{className:"flex shrink-0 items-center gap-2 rounded-[4px] border border-transparent px-2 py-1 text-sm font-medium text-rb-black transition-colors hover:border-rb-gray-hovered",children:["Connect",e.jsx(N,{name:"ArrowRight",size:14,"aria-hidden":"true"})]})]}),zs=({organisationId:s,hasEmailConnection:t,hasCalendarConnection:r})=>{const a=L(),{isSeatLocked:n}=we("emailConnection"),i=()=>a(`/org/${s}/settings/integrations`);return e.jsxs("section",{className:"space-y-3",children:[e.jsx(c,{level:"h3",weight:500,children:"Finish setting up Fyxer"}),e.jsxs("div",{className:"overflow-hidden rounded-lg border border-rb-gray-neutral bg-rb-white",children:[!t&&e.jsx(_,{feature:"emailConnection",className:"w-full",side:"bottom",children:e.jsx(le,{illustration:Ss,title:"Connect your email",description:"Link Gmail or Outlook to unlock inbox sorting and draft replies",onClick:i,disabled:n})}),!r&&e.jsx(le,{illustration:ws,title:"Connect your calendar",description:"Sync your calendar for meeting prep, notes, and scheduling",onClick:i})]})]})},Ms=()=>e.jsxs("div",{className:"relative flex items-center justify-center",style:{width:f,height:f},children:[e.jsx("svg",{width:f,height:f,className:"-rotate-90",children:e.jsx("circle",{cx:f/2,cy:f/2,r:V,fill:"none",stroke:"currentColor",strokeWidth:H,className:"text-rb-orange-neutral"})}),e.jsx("div",{className:"absolute",children:e.jsx(N,{name:"Check",size:32,color:"orange"})})]}),Hs=({relevantStats:s,isGmail:t,isOutlook:r,emailAddress:a,outstandingSteps:n})=>{const i=ls({isGmail:t,isOutlook:r,emailAddress:a}),l=t?"Gmail":r?"Outlook":"your inbox";return e.jsx(Ce,{mode:"wait",children:e.jsxs(F.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"space-y-8",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx(c,{level:"h3",weight:500,children:"Your inbox is set up"}),e.jsxs(c,{level:"label",color:"secondary-dark",className:"mt-1",children:["Fyxer has categorized your emails and created reply drafts. Head to ",l," to review them."]})]}),e.jsx("div",{className:"overflow-hidden rounded-lg border border-rb-gray-neutral bg-rb-white",children:e.jsxs("div",{className:"flex flex-col md:flex-row",children:[e.jsx("div",{className:"flex flex-col items-center justify-center gap-3 border-b border-rb-gray-neutral bg-rb-parchment-light px-6 py-6 md:border-r md:border-b-0 md:px-8 md:py-10",children:e.jsx(Ms,{})}),e.jsxs("div",{className:"flex flex-1 flex-col justify-center gap-4 px-4 py-4 md:px-6 md:py-6",children:[e.jsx("div",{className:"flex flex-col gap-3",children:s.map(o=>e.jsx(Ae,{stat:o},o.key))}),e.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:e.jsx(v,{variant:"primary",label:`Open ${l}`,icon:"ArrowRight",iconDir:"right"})})]})]})})]}),e.jsx(Ee,{steps:n})]})})},Vs=({stats:s,onRefresh:t})=>{const{organisationId:r}=R(),{hasEmailConnection:a,hasCalendarConnection:n,hasGmailEmailConnection:i,hasOutlookEmailConnection:l,emailConnection:o,inboxConnected:m,progress:b}=pe(),{steps:g}=ke(),h=a&&!m,u=a&&m,d=As({enabled:h}),y=p.useRef({emailCount:0,draftCount:0});h&&(y.current={emailCount:d.emailCount,draftCount:d.draftCount});const k=p.useRef(!1);p.useEffect(()=>{u&&!k.current&&(k.current=!0,t==null||t())},[u,t]);const T=g.filter(x=>!x.isCompleted&&!Fs.has(x.id)),A=p.useMemo(()=>{const x=s.filter(C=>Bs.has(C.key));if(h){const C={"emails-processed":{value:String(d.emailCount),isLoading:d.isLoading},"drafts-created":{value:String(d.draftCount),isLoading:d.isLoading}};return x.map(E=>{const w=C[E.key];return w?{...E,value:w.value,isLoading:w.isLoading}:E})}const G=y.current,Z={"emails-processed":String(G.emailCount),"drafts-created":String(G.draftCount)};return x.map(C=>{const E=Number(C.value)||0,w=Number(Z[C.key])||0;return{...C,value:String(Math.max(E,w))}})},[s,h,d.emailCount,d.draftCount,d.isLoading]);if(!a)return e.jsx(zs,{organisationId:r,hasEmailConnection:a,hasCalendarConnection:n});if(u)return e.jsx(Hs,{relevantStats:A,isGmail:i,isOutlook:l,emailAddress:o==null?void 0:o.data().metadata.email,outstandingSteps:[...n?[]:[g.find(x=>x.id==="connect-calendar")].filter(x=>!!x),...T]});const I=Es(b);return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"overflow-hidden rounded-lg border border-rb-gray-neutral bg-rb-white",children:[e.jsxs("div",{className:"flex flex-col md:flex-row",children:[e.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 border-b border-rb-gray-neutral bg-rb-parchment-light px-6 py-5 md:gap-3 md:border-r md:border-b-0 md:px-8 md:py-10",children:[e.jsx(Ts,{progress:b}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-rb-orange-neutral opacity-75"}),e.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-rb-orange-neutral"})]}),e.jsx(c,{level:"label",color:"secondary-dark",className:"text-xs",children:I})]})]}),e.jsx("div",{className:"flex flex-1 flex-col justify-center gap-3 px-4 py-4 md:gap-4 md:px-6 md:py-6",children:A.map(x=>e.jsx(Ae,{stat:x},x.key))})]}),e.jsx(Is,{progress:b})]}),!n&&e.jsx(Ps,{organisationId:r}),e.jsx(Ee,{steps:T})]})},ce=({organisationId:s})=>{const t=L(),{logButtonPress:r,logEvent:a}=me(),{flags:n}=q(),i=p.useRef(!1);p.useEffect(()=>{i.current||(i.current=!0,a(ue.SHOW_INVITE_NUDGE_BANNER))},[a]);const l=()=>{r(z.INVITE_NUDGE_BANNER_CTA),t(`/org/${s}/settings/team`)},o=async()=>{r(z.INVITE_NUDGE_BANNER_DISMISS),await n.updateFlag("hasDismissedInv
1iteNudgeBanner",!0)};return e.jsx(Pe,{variant:"elevated",className:"bg-rb-parchment",children:e.jsxs(Fe,{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between md:gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{name:"Users",size:20,color:"primary-dark",className:"hidden shrink-0 md:block"}),e.jsx(Ge,{children:"Fyxer gets smarter when your whole team uses it"})]}),e.jsx(Ue,{children:"Invite your team to share meeting notes, unlock smarter drafts and save time scheduling meetings."})]}),e.jsxs(Be,{className:"flex w-full items-center gap-2 sm:w-auto sm:self-center",children:[e.jsx(_,{feature:"teamInvites",children:e.jsx(v,{variant:"primary",label:"Invite team",icon:"UserPlus",iconDir:"left",onClick:l,className:"w-full sm:w-auto"})}),e.jsx(v,{variant:"secondary",size:"icon",icon:"X",onClick:o,tooltip:"Dismiss",className:"shrink-0"})]})]})})},qs=({title:s,value:t,helperText:r,isLoading:a,hasError:n,onRefresh:i})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border border-rb-gray-neutral",children:[e.jsxs("div",{className:"border-b border-rb-gray-neutral bg-rb-parchment px-4 py-3",children:[e.jsx(c,{level:"p",weight:500,className:"text-[14px] leading-[1.1]",children:s}),r&&e.jsx(c,{level:"label",color:"secondary-dark",children:r})]}),e.jsx("div",{className:"bg-rb-white p-4",children:a?e.jsx(Zs,{}):n?e.jsx(Qs,{onRefresh:i}):e.jsx(Ws,{value:t,title:s})})]}),Zs=()=>e.jsx("div",{className:"flex items-baseline gap-1",children:e.jsx("div",{className:"h-9 w-20 animate-pulse rounded-sm bg-rb-gray-neutral"})}),Qs=({onRefresh:s})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(c,{level:"label",color:"secondary-dark",children:"Failed to load"}),s&&e.jsx(v,{variant:"plain",size:"icon-sm",icon:"ArrowsCounterClockwise",onClick:s,tooltip:"Refresh"})]}),Ws=({value:s,title:t})=>{const r=Number(s)||0,a=t==="Meeting time"?"h":"";return e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx(Se,{value:r,className:"text-[32px] leading-none font-medium text-rb-black tabular-nums",format:{maximumFractionDigits:0,notation:Math.abs(r)>=1e4?"compact":"standard"}}),a&&e.jsx(c,{level:"p",color:"secondary-dark",className:"text-[20px]",children:a})]})},Ys=({stats:s,onRefresh:t})=>s.length===0?null:e.jsxs("section",{className:"space-y-3",children:[e.jsx(c,{level:"h3",weight:500,children:"Analytics"}),e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:s.map(({key:r,...a})=>e.jsx(qs,{...a,onRefresh:t},r))})]}),Ks=({data:s,isLoading:t,isError:r})=>p.useMemo(()=>[{key:"emails-processed",title:"Emails processed",value:String((s==null?void 0:s.emailCount)??0),isLoading:t,hasError:r},{key:"drafts-created",title:"Drafts created",value:String((s==null?void 0:s.draftCount)??0),isLoading:t,hasError:r},{key:"meeting-hours",title:"Meeting time",value:String((s==null?void 0:s.meetingHours)??0),isLoading:t,hasError:r}],[s==null?void 0:s.emailCount,s==null?void 0:s.draftCount,s==null?void 0:s.meetingHours,t,r]),Xs=({organisationId:s,userId:t})=>{const r=ge(),[a,n]=p.useState("personal"),[i,l]=p.useState(!1),o=M({queryKey:["organisation",s,"users",t,"stats"],queryFn:()=>r.organisations.id(s).users.id(t).stats.total(),refetchOnWindowFocus:!1,enabled:!!(s&&t),staleTime:1e3*60*5,gcTime:1e3*60*30}),m=M({queryKey:["organisation",s,"stats"],queryFn:()=>r.organisations.id(s).stats.total(),refetchOnWindowFocus:!1,enabled:!!s&&i,staleTime:1e3*60*5,gcTime:1e3*60*30}),b=p.useCallback(y=>{n(y),y==="organization"&&!i&&l(!0)},[i]),g=p.useCallback(()=>{a==="personal"?o.refetch():m.refetch()},[a,o,m]),h={data:o.data,isLoading:o.isLoading,isError:o.isError,isRefetching:o.isFetching&&!o.isLoading},u={data:m.data,isLoading:m.isLoading,isError:m.isError,isRefetching:m.isFetching&&!m.isLoading};return{statsViewType:a,setStatsViewType:b,personalStats:h,orgStats:u,currentStats:a==="personal"?h:u,handleRefresh:g}},Js=({calendarEventFilter:s})=>{var se;const{userId:t}=xe(),{organisationId:r,connections:a,organisation:n,memberships:i,isAdmin:l}=R(),{flags:o}=q(),{statsViewType:m,setStatsViewType:b,currentStats:g,handleRefresh:h}=Xs({organisationId:r,userId:t}),u=Ks({data:g.data,isLoading:g.isLoading,isError:g.isError}),d=a.some(D=>{var B;return((B=D.data())==null?void 0:B.serviceType)==="CALENDAR"}),k=re({feature:"teamInvites",action:"read",asBefore:!0})&&!!n.domain&&i.length===1&&!ze(n)&&!((se=o.value)!=null&&se.hasDismissedInv
1iteNudgeBanner),{isEligible:T}=ke(),A=ss(),I=re({feature:"analytics",asBefore:Me(n)}),x=ts("dashboard-chat-widget"),[G,Z]=p.useState(!0),[C,E]=Te(),w=C.get("chat"),U=p.useCallback(D=>{E(B=>{const Q=new URLSearchParams(B);return D?Q.set("chat",D):Q.delete("chat"),Q},{replace:!0})},[E]),[De,$]=p.useState(!1);p.useEffect(()=>{A===!1&&w&&U(null)},[A,w,U]);const Re=T,ee=l&&I,Oe=!!ee&&G&&o.value!==void 0&&!o.value.hasSeenAnalyticsAnnouncement;return e.jsxs(He,{className:"relative h-full max-sm:mt-2",children:[e.jsxs(Ve,{children:[e.jsx(qe,{children:"Dashboard"}),e.jsxs(Ze,{children:[e.jsx($e,{variant:"secondary",label:m==="personal"?"Personal":"Organization",header:"Switch to:",items:[{label:"Personal",onClick:()=>b("personal")},{label:"Organization",onClick:()=>b("organization")}].filter(({label:D})=>D.toLowerCase()!==m)}),e.jsx(v,{variant:"secondary",size:"icon",tooltip:"Refresh stats",icon:({isHovered:D})=>e.jsx(N,{name:"ArrowsCounterClockwise",size:16,color:D?"primary-dark":"secondary-dark",className:j(g.isRefetching&&"animate-spin")}),onClick:h,disabled:g.isRefetching})]})]}),e.jsxs(Qe,{maxWidth:"5xl",contentClassName:"space-y-8",children:[A&&x&&e.jsxs("div",{className:"flex flex-col items-center gap-6 py-6 sm:py-10",children:[e.jsx(os,{}),e.jsx(Je,{onChatCreated:U})]}),Re?e.jsxs(e.Fragment,{children:[e.jsx(Vs,{stats:u,onRefresh:h}),k&&e.jsx(ce,{organisationId:r})]}):e.jsxs(e.Fragment,{children:[k&&e.jsx(ce,{organisationId:r}),ee?e.jsx(gs,{}):e.jsx(Ys,{stats:u,onRefresh:h})]}),e.jsx(ds,{hasCalendarConnection:d,calendarEventFilter:s}),e.jsx(ms,{}),e.jsx(_s,{organisationId:r})]}),e.jsx(ys,{open:Oe,organisationId:r,onClose:()=>Z(!1)}),e.jsx(Ns,{chatId:A&&x?w:null,onClose:()=>{U(null),o.value&&!o.value.hasSeenChatDiscovery&&$(!0)}}),x&&e.jsx(vs,{open:De,onClose:()=>$(!1)})]})},de=({href:s,image:t,imageAlt:r,title:a,description:n,imageSlotClassName:i,imageClassName:l})=>e.jsxs("a",{href:s,className:j("group flex flex-col gap-6 overflow-hidden rounded-lg border border-rb-gray-neutral bg-rb-white pb-6 transition-all","hover:border-rb-gray-hovered hover:shadow-rb-shadow"),children:[e.jsx("div",{className:j("flex h-[180px] items-center overflow-hidden rounded-[4px] bg-rb-parchment-light py-4 pl-8",i),children:e.jsx("img",{src:t,alt:r,className:j("h-full w-full object-contain object-right transition-transform duration-300 group-hover:scale-[1.05]",l)})}),e.jsxs("div",{className:"flex items-center gap-2 px-8",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[e.jsx(c,{level:"h3",weight:500,className:"leading-[1.1]",children:a}),e.jsx(c,{level:"p",color:"secondary-dark",className:"max-w-[306px] leading-[1.6]",children:n})]}),e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-sm text-rb-secondary-dark transition-colors group-hover:text-rb-black",children:e.jsx(N,{name:"ArrowRight",size:16,"aria-hidden":"true"})})]})]}),_s=({organisationId:s})=>e.jsxs("section",{className:"space-y-3",children:[e.jsx(c,{level:"h3",weight:500,children:"Do more with Fyxer"}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[e.jsx(de,{href:`/org/${s}/meeting-assistant/call-recordings`,image:ps,imageAlt:"Meeting notes preview",imageSlotClassName:"py-0 pl-0 lg:py-4 lg:pl-8 xl:py-8 xl:pl-16",title:"Browse your meeting notes",description:"Watch meeting recordings, read full transcripts, and get concise summaries"}),e.jsx(de,{href:`/org/${s}/settings/categorization`,image:hs,imageAlt:"Inbox customization preview",imageSlotClassName:"pl-0 lg:pl-8 xl:pl-32 2xl:pl-48 py-0",imageClassName:"object-cover object-center",title:"Customize your inbox",description:"Choose what stays visible, and quietly sort everything else away"})]})]}),$s=()=>{const{allUserEmailAddresses:s}=R(),t=Ye(Ke(new Date,1)),r=a=>{var b,g,h;const n=s.some(u=>us({basicCalendarEvent:a,userEmail:u})),i=a.organiserEmail&&s.includes(a.organiserEmail),l=((b=a.attendees)==null?void 0:b.some(u=>s.includes(u.email)))??!1,o=i?O.ACCEPTED:l?((h=(g=a.attendees)==null?void 0:g.find(u=>s.includes(u.email)))==null?void 0:h.responseStatus)??O.PENDING:O.DECLINED;return(n||[O.ACCEPTED,O.PENDING].includes(o))&&a.endsAt<t};return e.jsx(Js,{calendarEventFilter:r})},Xr=()=>{const s=J(),{organisationId:t}=R();return s?e.jsx(ae,{children:e.jsx(_e,{},t)}):e.jsx(ae,{children:e.jsx(We,{children:e.jsx($s,{})})})};export{$s as Dashboard,Xr as DashboardRoute};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.