1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="c52a7373-42c2-67b9-c2ba-1e1ecffe2765")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,632034,628022,885050,118786,e=>{"use strict";var t=e.i(764362),s=e.i(452675),r=e.i(870080);e.i(301728);var n=e.i(986535),a=e.i(517424),i=e.i(886946),l=e.i(683951),d=e.i(456889),o=e.i(391028),c=e.i(185615),u=e.i(867666),m=e.i(10458),x=e.i(330633),h=e.i(440087);let p=(0,r.createContext)(new Map),f=p.Provider;function g(){return(0,r.useContext)(p)}e.s(["EmailLookupProvider",0,f,"useEmailLookup",0,g],628022);var j=e.i(593182),v=e.i(395910),b=e.i(966970);let N=(0,b.createServerReference)("7f7479e58c57ee46e42a331e33bef16ea34bb8875b",b.callServer,void 0,b.findSourceMapURL,"archiveThreadAction"),y=(0,b.createServerReference)("7fad904ae17081aee3a3f486f9f1c0fd823a3e7ed8",b.callServer,void 0,b.findSourceMapURL,"markReadThreadAction");var C=e.i(62173),w=e.i(10827),I=e.i(263809),k=e.i(34903),A=e.i(935308),E=e.i(466691),S=e.i(715813),T=e.i(574831),_=e.i(457072),z=e.i(724041),R=e.i(901772),M=e.i(850062);let D=(0,r.createContext)(null);function $({id:e,threadid:s,index:n,children:a}){let p=g(),f=(0,r.useContext)(D),b=(0,j.useInlineEmailActionContext)(),{emailAccountId:C,provider:w,userEmail:E}=(0,v.useAccount)(),[T,_]=(0,r.useState)("idle"),[z,R]=(0,r.useState)("idle"),[M,F]=(0,r.useState)(!1),[O,L]=(0,r.useState)(!1),H=U({id:e,threadid:s}),q=H?p.get(H):void 0,V=!!H&&!!f?.archivedThreadIds.has(H),K=!!H&&!!f?.readThreadIds.has(H),W=P({threadId:H,messageId:q?.messageId,externalUrl:q?.externalUrl,userEmail:E,provider:w});async function G(){if(H&&"idle"===T){_("loading");try{let e=await N(C,{threadId:H});if(e?.serverError){(0,A.toastError)({description:e.serverError}),_("idle");return}f?.markArchived([H]),b?.queueAction("archive_threads",[H]),(0,A.toastSuccess)({description:"Archived"}),_("done")}catch{(0,A.toastError)({description:"Failed to archive"}),_("idle")}}}async function J(){if(H&&"idle"===z){R("loading");try{let e=await y(C,{threadId:H,read:!0});if(e?.serverError){(0,A.toastError)({description:e.serverError}),R("idle");return}f?.markRead([H]),b?.queueAction("mark_read_threads",[H]),(0,A.toastSuccess)({description:"Marked as read"}),R("done")}catch{(0,A.toastError)({description:"Failed to mark as read"}),R("idle")}}}let Q="done"===T||V,X=K||"done"===z,Y=!!H,Z=!!a;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{role:H?"button":void 0,tabIndex:H?0:void 0,className:`group flex items-center gap-2 border-b border-border/40 pl-2 pr-3 text-sm last:border-b-0 ${Z?"py-3":"py-1.5"} ${H?"cursor-pointer":""} ${Q?"bg-muted/30 line-through opacity-50":"hover:bg-muted/50"}`,onClick:()=>H&&F(!M),onKeyDown:e=>{H&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),F(!M))},children:[void 0!==n?(0,t.jsxs)("span",{className:"w-5 shrink-0 text-right text-xs tabular-nums text-muted-foreground",children:[n,"."]}):null,q?Z?(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-sm text-foreground",children:a}),(0,t.jsxs)("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:[(0,t.jsx)(S.Tooltip,{content:(0,k.extractEmailAddress)(q.from)||q.from,side:"right",children:(0,t.jsx)("span",{className:"font-medium",children:(0,k.extractNameFromEmail)(q.from)})})," · ",(0,t.jsx)("span",{className:"tabular-nums",children:(0,I.formatShortDate)(new Date(q.date),{lowercase:!0})})]})]}):(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,t.jsx)(S.Tooltip,{content:(0,k.extractEmailAddress)(q.from)||q.from,side:"right",children:(0,t.jsx)("span",{className:"w-40 shrink-0 truncate text-sm font-medium",children:(0,k.extractNameFromEmail)(q.from)})}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:q.subject}),(0,t.jsx)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:(0,I.formatShortDate)(new Date(q.date),{lowercase:!0})})]}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[H?(0,t.jsxs)(h.DropdownMenu,{children:[(0,t.jsx)(S.Tooltip,{content:"More actions",children:(0,t.jsx)(h.DropdownMenuTrigger,{className:"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50","aria-label":"More actions",onClick:e=>e.stopPropagation(),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&e.stopPropagation()},children:(0,t.jsx)(x.MoreVerticalIcon,{className:"size-3.5"})})}),(0,t.jsxs)(h.DropdownMenuContent,{align:"end",className:"w-48",children:[Y?(0,t.jsxs)(h.DropdownMenuItem,{disabled:Q||"loading"===T,onClick:G,children:[Q?(0,t.jsx)(l.CheckIcon,{className:"mr-2 size-4"}):(0,t.jsx)(i.ArchiveIcon,{className:"mr-2 size-4"}),Q?"Archived":"Archive"]}):null,(0,t.jsxs)(h.DropdownMenuItem,{disabled:X||"loading"===z,onClick:J,children:[X?(0,t.jsx)(l.CheckIcon,{className:"mr-2 size-4"}):(0,t.jsx)(m.MailOpenIcon,{className:"mr-2 size-4"}),X?"Marked read":"Mark as read"]}),(0,t.jsxs)(h.DropdownMenuItem,{onClick:()=>{L(e=>!e),M||F(!0)},children:[(0,t.jsx)(u.InfoIcon,{className:"mr-2 size-4"}),O?"Hide details":"Show details"]}
2),W?(0,t.jsx)(h.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("a",{href:W,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)(c.ExternalLinkIcon,{className:"mr-2 size-4"}),"Open in email"]})}):null]})]}):null,H?(0,t.jsx)("span",{className:"inline-flex h-7 w-7 items-center justify-center text-muted-foreground","aria-hidden":"true",children:M?(0,t.jsx)(d.ChevronDownIcon,{className:"size-3.5"}):(0,t.jsx)(o.ChevronRightIcon,{className:"size-3.5"})}):null]})]}),M&&H&&(0,t.jsx)(B,{threadId:H,showDetails:O})]})}function B({threadId:e,compact:s=!1,showDetails:r=!1}){let{emailAccountId:n}=(0,v.useAccount)(),{data:i,isLoading:l,error:d}=(0,R.useThread)({id:e});if(l)return(0,t.jsx)("div",{className:"flex justify-center px-3 py-4 text-muted-foreground",children:(0,t.jsx)(M.LoadingMiniSpinner,{})});if(d)return(0,t.jsxs)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:["Could not load email content: ",d.error]});if(!i?.thread?.messages?.length)return(0,t.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No email content found."});let o=i.thread.messages[i.thread.messages.length-1],c=(0,t.jsxs)(a.OpenedConversationAttachments,{emailAccountId:n,threadId:e,allowUncached:!0,children:[o.textHtml?(0,t.jsx)(_.HtmlEmail,{emailAccountId:n,html:o.textHtml,inlineAttachments:o.inline,messageId:o.id}):(0,t.jsx)(_.PlainEmail,{text:o.textPlain||o.snippet||"No content available."}),o.attachments?.length?(0,t.jsx)(T.EmailAttachments,{message:o}):null]});return s?(0,t.jsx)("div",{className:"max-h-[32rem] overflow-auto px-4 py-3",children:c}):(0,t.jsxs)("div",{className:"max-h-[32rem] overflow-auto border-t bg-muted/20 px-4 py-3",children:[r?(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(z.EmailDetails,{message:o})}):null,c]})}function U({id:e,threadid:t}){return t?t:e?e.startsWith("user-content-")?e.slice(13)||void 0:e:void 0}function P({threadId:e,messageId:t,externalUrl:s,userEmail:r,provider:n}){return s||(e&&"microsoft"!==n?(0,w.getEmailUrlForMessage)(t??e,e,r,n):null)}function F(e,t){if(!t.length)return e;let s=new Set(e);for(let e of t)s.add(e);return s}function O(e,t){return e.filter((e,s)=>!t[s]?.serverError)}var L=e.i(449339),H=e.i(755505),q=e.i(370317);function V({title:e,status:s,actions:r,children:n}){return(0,t.jsxs)(q.Card,{children:[(0,t.jsx)(K,{title:e,status:s,actions:r}),(0,t.jsx)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:n})]})}function K({title:e,status:s,actions:r}){return(0,t.jsxs)(q.CardHeader,{className:"flex flex-row items-center justify-between gap-3 space-y-0 border-b px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("h3",{className:"truncate text-base font-semibold",children:e}),s]}),r]})}function W({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(J,{className:"pt-0.5",children:e}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:s})]})}function G({children:e}){return(0,t.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e})}function J({children:e,className:r}){return(0,t.jsx)("span",{className:(0,s.cn)("shrink-0 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",r),children:e})}var Q=e.i(303670),X=e.i(604546),Y=e.i(259109),Z=e.i(411402);function ee({actions:e}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.map((e,s)=>{let r=(0,Q.getActionIcon)(e.type);return(0,t.jsxs)(H.Badge,{color:(0,X.getActionColor)(e.type),className:"w-fit shrink-0",children:[(0,t.jsx)(r,{className:"mr-1.5 size-3"}),(0,Q.getActionDisplay)({type:e.type,label:e.label,notificationDestination:e.notificationDestination},"",[])]},`${e.type}-${e.label??s}`)})})}function et(e){return"true"===es(e)}function es(e){return e?.replace(/^user-content-/,"").trim()||""}let er={emails:[],email:["id","threadid","index"],"email-detail":["id","threadid"],"rule-suggestions":[],"rule-suggestion":["name","when","do","label","archive","notify","draft","markread"]},en=Object.keys(er).join("|"),ea="(?:\"[^\"]*\"|'[^']*'|[ââ][^ââ]*[ââ]|[ââ][^ââ]*[ââ])",ei=RegExp(`</?(?:${en})(?=[\\s/]|>)`,"gi"),el=RegExp(`\\\\(</?(?:${en})(?=[\\s/>]))`,"gi"),ed=RegExp(`</?(?:${en})(?=[\\s/>])(?:${ea}|[^>"'ââââ])*>`,"gi"),eo=RegExp(`<(${en})(?=[\\s/>])((?:${ea}|[^>"'ââââ])*?)\\s*/>`,"gi"),ec=/=\s*[ââ]([^ââ]*)[ââ]/g,eu=/=\s*[ââ]([^ââ]*)[ââ]/g,em=/("[^"]*"|'[^']*')|\s+/g,ex=[""",""","""],eh=["'","'","'"];function ep(e){return e.replace(ec,'="$1"').replace(eu,"='$1'").replace(em,(e,t)=>t??" ")}function ef(e,t,s){return e.slice(t,t+s.length).toLowerCase()===s.toLowerCase()}let eg=new Set(Object.keys(er)),ej={p:function({children:e,node:s,...n}){let a=r.Children.toArray(e).filter(e=>""!==e);return 1===a.length&&function(e){if(!(0,r.isValidElement)(e))return!1;let t=e.props,s=t.node?.tagName?.toLowerCase();return!!(s&&eg.has(s))||"img"===s||"code"===s&&"data-block"in t}(a[0])?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsx)("p",{...n,children:e})},emails:function({children:e}){var s;let n,{emailAccountId:a}=(0,v.useAccount)(),d=(0,j.useInlineEmailActionContext)(),[c,u]=(0,r.useState)("idle"),[x,h]=(0,r.useState)("idle"),[p,f]=(0,r.useState)(!1),[g,b]=(0,r.useState)(!1),[w,I]=(0,r.useState)(()=>new Set),[k,T]=(0,r.useState)(()=>new Set),_=(0,r.useMemo)(()=>{var t;let s;return t=e,s=0,r.Children.map(t,e=>{if(!(0,r.isValidElement)(e)||!U(e.props))return e;if(void 0!==e.props.index){let t=Number(e.props.index);return Number.isFinite(t)&&(s=Math.max(s,t)),e}return s+=1,(0,r.cloneElement)(e,{index:s})})},[e]),z=(0,C.normalizeInlineEmailThreadIds)((s=e,n=[],r.Children.forEac
2h(s,e=>{if(!(0,r.isValidElement)(e))return;let t=U(e.props);t&&n.push(t)}),n)),R=z.filter(e=>!w.has(e)),M=z.filter(e=>!k.has(e)),$="done"===c||0===R.length,B="done"===x||0===M.length,P=z.length>0&&z.every(e=>w.has(e)||k.has(e));function L(e){I(t=>F(t,e))}function H(e){T(t=>F(t,e))}async function q(){if("idle"===c&&0!==R.length){u("loading");try{let e=await Promise.all(R.map(e=>N(a,{threadId:e}))),t=O(R,e),s=e.filter(e=>e?.serverError).length;s===e.length?((0,A.toastError)({description:"Failed to archive emails"}),u("idle")):s>0?(L(t),d?.queueAction("archive_threads",t),(0,A.toastSuccess)({description:`Archived ${e.length-s} of ${e.length} emails`}),u("idle")):(L(t),d?.queueAction("archive_threads",t),(0,A.toastSuccess)({description:`Archived ${R.length} emails`}),u("done"))}catch{(0,A.toastError)({description:"Failed to archive emails"}),u("idle")}}}async function V(){if("idle"===x&&0!==M.length){h("loading");try{let e=await Promise.all(M.map(e=>y(a,{threadId:e,read:!0}))),t=O(M,e),s=e.filter(e=>e?.serverError).length;s===e.length?((0,A.toastError)({description:"Failed to mark emails as read"}),h("idle")):s>0?(H(t),d?.queueAction("mark_read_threads",t),(0,A.toastSuccess)({description:`Marked ${e.length-s} of ${e.length} as read`}),h("idle")):(H(t),d?.queueAction("mark_read_threads",t),(0,A.toastSuccess)({description:`Marked ${M.length} as read`}),h("done"))}catch{(0,A.toastError)({description:"Failed to mark emails as read"}),h("idle")}}}return(0,r.useEffect)(()=>{if(!P){f(!1),b(!1);return}if(g)return;let e=window.setTimeout(()=>{f(!0),b(!0)},800);return()=>window.clearTimeout(e)},[P,g]),(0,t.jsx)(D.Provider,{value:{archivedThreadIds:w,readThreadIds:k,markArchived:L,markRead:H},children:p?(0,t.jsxs)("button",{type:"button",className:"my-2 flex w-full items-center justify-between gap-3 overflow-hidden rounded-lg border bg-card px-3 py-2 text-left shadow-sm transition-colors hover:bg-muted/30",onClick:()=>f(!1),children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:"Completed emails"}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:function({threadIds:e,archivedThreadIds:t,readThreadIds:s}){let r=e.filter(e=>t.has(e)).length,n=e.filter(e=>!t.has(e)&&s.has(e)).length,a=[];return r>0&&a.push(`${r} archived`),n>0&&a.push(`${n} marked read`),a.join(", ")}({threadIds:z,archivedThreadIds:w,readThreadIds:k})})]}),(0,t.jsx)(o.ChevronRightIcon,{className:"size-4 shrink-0 text-muted-foreground"})]}):(0,t.jsxs)("div",{className:"my-2 overflow-hidden rounded-lg border bg-card shadow-sm",children:[z.length>0&&(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1 border-b px-3 py-1.5",children:[(0,t.jsx)(S.Tooltip,{content:$?"All archived":"Archive all",children:(0,t.jsx)(E.Button,{variant:"ghost",size:"iconXs",loading:"loading"===c,disabled:$,onClick:q,Icon:$?l.CheckIcon:i.ArchiveIcon})}),(0,t.jsx)(S.Tooltip,{content:B?"All marked read":"Mark all read",children:(0,t.jsx)(E.Button,{variant:"ghost",size:"iconXs",loading:"loading"===x,disabled:B,onClick:V,Icon:B?l.CheckIcon:m.MailOpenIcon})})]}),_]})})},email:$,"email-detail":function({id:e,threadid:s,children:r}){let n=g(),{provider:a,userEmail:i}=(0,v.useAccount)(),l=U({id:e,threadid:s}),d=l?n.get(l):void 0,o=P({threadId:l,messageId:d?.messageId,externalUrl:d?.externalUrl,userEmail:i,provider:a});return(0,t.jsxs)("div",{className:"my-2 overflow-hidden rounded-lg border bg-card shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"truncate text-sm font-medium",children:d?.subject||"Email"}),d?(0,t.jsxs)("div",{className:"text-xs text-muted-foreground",children:[d.from," · ",(0,I.formatShortDate)(new Date(d.date),{lowercase:!0})]}):null,r?(0,t.jsx)("div",{className:"mt-1 text-xs text-muted-foreground",children:r}):null]}),o?(0,t.jsx)(S.Tooltip,{content:"Open in email",children:(0,t.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",children:(0,t.jsx)(c.ExternalLinkIcon,{className:"size-3.5"})})}):null]}),l?(0,t.jsx)(B,{threadId:l,compact:!0}):(0,t.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No email content found."})]})},"rule-suggestions":function({children:e}){return(0,t.jsx)("div",{className:"my-3 grid gap-2",children:e})},"rule-suggestion":function({name:e,when:s,do:n,label:a,archive:i,notify:d,draft:o,markread:c,children:u}){let{submitTextMessage:m}=(0,Z.useChat)(),[x,h]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),g=es(e)||"Suggested rule",j=es(s),v=es(n),b=(function e(t){return"string"==typeof t||"number"==typeof t?String(t):Array.isArray(t)?t.map(e).join(""):(0,r.isValidElement)(t)?e(t.props.children):r.Children.toArray(t).map(e).join("")})(u).trim(),N=function({label:e,archive:t,notify:s,draft:r,markread:n}){let a=[],i=es(e),l=es(s);return i&&a.push({type:Y.ActionType.LABEL,label:i}),et(t)&&a.push({type:Y.ActionType.ARCHIVE}),et(r)&&a.push({type:Y.ActionType.DRAFT_EMAIL}),l&&a.push({type:Y.ActionType.NOTIFY_MESSAGING_CHANNEL,notificationDestination:l}),et(n)&&a.push({type:Y.ActionType.MARK_READ}),a}({label:a,archive:i,notify:d,draft:o,markread:c}),y=[N.map(e=>(0,Q.getActionDisplay)({type:e.type,label:e.label,notificationDestination:e.notificationDestination}
2,"",[])).join(", "),v].filter(Boolean).join(", ");async function C(){h(!0);try{await m([`Create this suggested rule: ${g}`,j?`It should catch: ${j}`:null,y?`It should do: ${y}`:null,b?`Context: ${b}`:null].filter(Boolean).join("\n")),f(!0)}finally{h(!1)}}return(0,t.jsxs)(V,{title:g,actions:p?(0,t.jsxs)(H.Badge,{color:"green",className:"shrink-0 gap-1.5",children:[(0,t.jsx)(l.CheckIcon,{className:"size-3.5"}),"Rule created"]}):(0,t.jsxs)(E.Button,{type:"button",size:"sm",className:"h-8 shrink-0 gap-1.5",disabled:x,onClick:C,children:[x?(0,t.jsx)(L.Loader2Icon,{className:"size-3.5 animate-spin"}):(0,t.jsx)(l.CheckIcon,{className:"size-3.5"}),"Approve"]}),children:[j&&(0,t.jsx)(W,{label:"When",children:(0,t.jsx)(G,{children:j})}),(v||N.length>0)&&(0,t.jsx)(W,{label:"Then",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[N.length>0&&(0,t.jsx)(ee,{actions:N}),v&&(0,t.jsx)("span",{children:v})]})})]})}},ev=["email","email-detail","rule-suggestion"],eb=(0,r.memo)(({className:e,children:t,...a})=>(0,r.createElement)(n.Streamdown,{className:(0,s.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0","[&_[data-streamdown='heading-1']]:!mt-8","[&_[data-streamdown='heading-2']]:!mt-8","[&_[data-streamdown='heading-3']]:!mt-7","[&_a]:!text-inherit [&_a]:underline [&_a]:underline-offset-2 [&_a:hover]:opacity-80",e),allowedTags:er,components:ej,literalTagContent:ev,normalizeHtmlIndentation:!0,...a},"string"==typeof t?(function(e){let t="",s=0;for(let r of e.matchAll(ei)){let n=r.index;if(n<s)continue;let a=function(e,t){let s,r=t;for(;r<e.length;){let t=function(e,t){let s=e[t];if('"'===s)return{kind:"ascii-double",length:1};if("'"===s)return{kind:"ascii-single",length:1};if("â"===s||"â"===s)return{kind:"smart-double",length:1};if("â"===s||"â"===s)return{kind:"smart-single",length:1};let r=ex.find(s=>ef(e,t,s));if(r)return{kind:"encoded-double",length:r.length};let n=eh.find(s=>ef(e,t,s));if(n)return{kind:"encoded-single",length:n.length}}(e,r);if(t){s=s===t.kind?void 0:s??t.kind,r+=t.length;continue}if(!s&&ef(e,r,">"))return r;r+=1}}(e,n+r[0].length);if(void 0===a)break;t+=e.slice(s,n),t+=`<${e.slice(n+4,a)}>`.replace(/&(?:quot|#34|#x22);/gi,'"').replace(/&(?:apos|#39|#x27);/gi,"'").replace(/&/gi,"&"),s=a+4}return 0===s?e:t+e.slice(s)})(t).replace(el,"$1").replace(ed,ep).replace(eo,"<$1$2></$1>"):t));eb.displayName="AssistantInlineEmailResponse",e.s(["AssistantInlineEmailResponse",0,eb],632034);var eN=e.i(314868),ey=e.i(394041),eC=e.i(524365),ew=e.i(306662),eI=e.i(714650),ek=e.i(699100),eA=e.i(293507),eE=e.i(17760),eS=e.i(81304),eT=e.i(724855),e_=e.i(24154);let ez=(0,b.createServerReference)("7f6c56100a88087d54dc5bb45f7809791e885ff2ab",b.callServer,void 0,b.findSourceMapURL,"confirmAssistantCreateRule"),eR=(0,b.createServerReference)("7f3b362d1daffde76c3cd407fb4a3dfb1ac8e1f0ea",b.callServer,void 0,b.findSourceMapURL,"confirmAssistantEmailAction"),eM=(0,b.createServerReference)("7f7da973274158b883bee1c5b0dc71d2b991f133c8",b.callServer,void 0,b.findSourceMapURL,"confirmAssistantSaveMemory");var eD=e.i(358795),e$=e.i(528322);e.i(933416);var eB=e.i(613394),eU=e.i(74840),eP=e.i(56152);function eF({text:e,maxLength:s=280,className:n}){let[a,i]=(0,r.useState)(!1);return e.length<s?(0,t.jsx)(eO,{className:n,children:e}):(0,t.jsxs)(eO,{className:n,children:[(0,t.jsxs)("div",{className:"relative overflow-hidden",children:[(0,t.jsx)(eP.motion.div,{initial:{height:"4rem"},animate:{height:a?"auto":"4rem"},transition:{duration:.3,ease:"easeInOut"},className:a?"":"overflow-hidden",children:e}),!a&&(0,t.jsx)("div",{className:"absolute bottom-0 left-0 h-6 w-full bg-gradient-to-t from-background to-transparent"})]}),(0,t.jsx)(eP.motion.button,{type:"button",onClick:e=>{e.stopPropagation(),i(!a)},className:"mt-1 flex items-center text-xs text-muted-foreground hover:text-primary",whileHover:{scale:1.05},whileTap:{scale:.95},children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eU.ChevronUpIcon,{className:"mr-1 h-3 w-3"}),"Less"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.ChevronDownIcon,{className:"mr-1 h-3 w-3"}),"More"]})})]})}function eO({children:e,className:r}){return(0,t.jsx)("div",{className:(0,s.cn)("whitespace-pre-wrap break-words",r),children:e})}var eL=e.i(790467),eH=e.i(910714),eq=e.i(463756),eV=e.i(375482),eK=e.i(314557);let eW=["archive_threads","trash_threads","label_threads","remove_label_threads","mark_read_threads","bulk_archive_senders","unsubscribe_senders"],eG=["archive_threads","trash_threads","label_threads","remove_label_threads","mark_read_threads"];function eJ(e){return!!e&&eW.includes(e)}e.s(["isManageInboxAction",0,eJ,"requiresThreadIds",0,function(e){return!!e&&eG.includes(e)}
2],885050);var eQ=e.i(96222),eX=e.i(405046);function eY(e,t){if("object"==typeof e&&null!==e&&t in e)return e[t]}function eZ({text:e}){return(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:e})}function e0({title:e,children:n}){let[a,i]=(0,r.useState)(!1);return(0,t.jsxs)(eQ.Collapsible,{open:a,onOpenChange:i,children:[(0,t.jsxs)(eQ.CollapsibleTrigger,{className:"flex items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)(o.ChevronRightIcon,{className:(0,s.cn)("size-3 shrink-0 transition-transform duration-200",a&&"rotate-90")}),(0,t.jsx)("span",{children:e})]}),(0,t.jsx)(eQ.CollapsibleContent,{children:(0,t.jsx)("div",{className:"mt-2 space-y-3 rounded-md border p-3",children:n})})]})}function e3({title:e,badge:n,description:a,children:i,initialOpen:l=!1}){let[d,c]=(0,r.useState)(l);return(0,t.jsx)(q.Card,{className:"overflow-hidden",children:(0,t.jsxs)(eQ.Collapsible,{open:d,onOpenChange:c,children:[(0,t.jsx)(eQ.CollapsibleTrigger,{className:"w-full text-left",children:(0,t.jsx)(q.CardHeader,{className:(0,s.cn)("px-4 py-3.5",d&&"border-b"),children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(o.ChevronRightIcon,{className:(0,s.cn)("size-4 shrink-0 text-muted-foreground transition-transform duration-200",d&&"rotate-90")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("h3",{className:"text-sm font-medium leading-snug",children:e}),n]}),a&&(0,t.jsx)("div",{className:"mt-1 text-xs text-muted-foreground",children:a})]})]})})}),(0,t.jsx)(eQ.CollapsibleContent,{children:(0,t.jsx)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:i})})]})})}function e1({actionType:e,output:s,chatMessageId:n,toolCallId:a,disableConfirm:i}){var d,o;let{emailAccountId:u,provider:m,userEmail:x}=(0,v.useAccount)(),{chatId:h,persistedMessageIds:p}=(0,Z.useChat)(),[f,g]=(0,r.useState)(!1),[j,b]=(0,r.useState)(null),[N,y]=(0,r.useState)(!1),[C,w]=(0,r.useState)(!1),I=eY(s,"pendingAction"),k=eY(s,"reference"),S=!0===eY(s,"requiresConfirmation"),T=eY(s,"confirmationState")||"pending",_=tc(eY(s,"confirmationResult")),z=j||_,R="processing"===T,M=p.has(n),D="confirmed"===T||!!z||!S&&!0===eY(s,"success"),$=tm({pendingAction:I,output:s,key:"to"}),B=tu(I,"cc"),U=tu(I,"bcc"),P=tm({pendingAction:I,output:s,key:"subject"}),F=tu(k,"from"),O=$||("reply_email"===e?F:void 0),L=tu(k,"subject"),H=(0,eK.decodeHtmlEntities)(P||L),V=function({actionType:e,pendingAction:t}){if(t){if("send_email"===e){let e,s=tu(t,"messageHtml");if(!s)return;return e=s.replace(/<br\s*\/?>/gi,"\n").replace(/<\/p>/gi,"\n").replace(/<[^>]*>/g," ").replace(/[<>]/g,""),(0,eK.decodeHtmlEntities)(e).replace(/\u00a0/g," ").replace(/ {2,}/g," ").replace(/\s+\n/g,"\n").replace(/\n{3,}/g,"\n\n").trim()}return(0,eK.decodeHtmlEntities)(tu(t,"content"))}}({actionType:e,pendingAction:I}),[K,W]=(0,r.useState)(V||""),G=tx({messageId:z?.messageId||eY(s,"messageId")||tu(k,"messageId"),threadId:z?.threadId||eY(s,"threadId")||tu(k,"threadId"),userEmail:x,provider:m}),J="reply_email"===(d=e)?"Reply to":"forward_email"===d?"Forward to":"",Q=O?O.charAt(0).toUpperCase():"?",X="microsoft"===m?"Outlook":"Gmail",Y=async()=>{g(!0);try{var t;if(!h)return void(0,A.toastError)({description:"Could not confirm this email action."});let s=K&&K!==V,r={chatId:h,toolCallId:a,actionType:e,...s?{contentOverride:K}:{}},n=await eR(u,r);if(n?.serverError)return void(0,A.toastError)({description:n.serverError});let i=tc(n?.data?.confirmationResult);if(!i)return void(0,A.toastError)({description:"Could not confirm this email action."});b(i),(0,A.toastSuccess)({description:(t=e,"send_email"===t?"Email sent.":"reply_email"===t?"Reply sent.":"Email forwarded.")})}catch{(0,A.toastError)({description:"Could not confirm this email action."})}finally{g(!1)}},ee=D?"send_email"===(o=e)?"Sent email to":"reply_email"===o?"Replied to":"Forwarded to":J;return(0,t.jsxs)(q.Card,{children:[(0,t.jsxs)(q.CardHeader,{className:"flex flex-row items-center gap-3 space-y-0 border-b px-4 py-3.5",children:[(0,t.jsx)(eI.Avatar,{className:"size-8",children:(0,t.jsx)(eI.AvatarFallbackColor,{content:Q,className:"text-xs"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"text-sm font-semibold leading-tight",children:[ee?`${ee} `:"",O]}),B&&(0,t.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:["CC: ",B]}),U&&(0,t.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:["BCC: ",U]})]}),D&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs font-medium text-green-600",children:[(0,t.jsx)(l.CheckIcon,{className:"size-3.5"}),"Sent"]})]}),(0,t.jsxs)(q.CardContent,{className:"p-0",children:[H&&(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b px-4 py-2.5",children:[(0,t.jsx)(tb,{children:"Subject"}),(0,t.jsxs)("span",{className:"truncate text-sm font-medium text-foreground",children:[(0,eX.getPendingEmailSubjectPrefix)(e),H]})]}),(0,t.jsx)("div",{className:"px-4 py-3.5",children:N?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ew.Textarea,{value:K,onChange:e=>W(e.target.value),className:"min-h-[140px] resize-y text-sm leading-relaxed"}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(E.Button,{variant:"outline",size:"sm",onClick:()=>{W(V||""),y(!1)},children:"Cancel"}),(0,t.jsx)(E.Button,{size:"sm",onClick:()=>y(!1),children:"Save changes"})]})]}):(0,t.jsx)("div",{className:"whitespace-pre-line text-sm leading-relaxed text-foreground",children:K||V})})]}),!N&&(0,t.jsxs)(q.CardFooter,{className:"flex items-center justify-between border-t px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[!D&&S&&(0,t.jsxs)(E.Button,{variant:"ghostMuted",size:"sm",className:"h-8 gap-1.5 text-xs",onClick:()=>y(!0),children:[(0,t.jsx)(eS.PencilIcon,{className:"size-3.5"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Edit"})]}),(0,t.jsxs)(E.Button,{variant:"ghost",size:"sm",className:`h-8 gap-1.5 text-xs ${C?"text-green-600":"text-muted-foreground"}`,onClick:()=>{navigator.clipboard.writeText(K||V||"").catch(()=>{}),w(!0),setTimeout(()=>w(!1),2e3)},children:[C?(0,t.jsx)(l.CheckIcon,{className:"size-3.5"}):(0,t.jsx)(eT.CopyIcon,{className:"size-3.5"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:C?"Copied":"Copy"})]}),G&&(0,t.jsx)(E.Button,{variant:"ghostMuted",size:"sm",className:"h-8 gap-1.5 text-xs",asChild:!0,children:(0,t.jsxs)("a",{href:G,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)(c.ExternalLinkIcon,{className:"size-3.5"}),(0,t.jsxs)("span",{className:"hidden sm:inline",children:["Open in ",X]})]})})]}),!D&&S&&(0,t.jsx)(E.Button,{onClick:Y,disabled:f||R||i,size:"sm",className:"gap-2",children:R?"Sending...":f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eE.Loader2,{className:"size-4 animate-spin"}),"Sending..."]}):M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e_.SendIcon,{className:"hidden size-3.5 sm:inline"}),"Send"]}):"Saving..."})]})]})}function e5({args:e,ruleId:s,preview:r,status:n}){let a=tj(e.condition),i=n?"created"===n:!!s;return(0,t.jsxs)(V,{title:e.name,status:(0,t.jsx)(te,{label:i?"Created":"Pending",color:i?"green":"yellow"}),actions:r?(0,t.jsx)(e7,{}):s?(0,t.jsx)(e2,{ruleId:s}
2):null,children:[(0,t.jsx)(W,{label:"When",children:(0,t.jsx)(G,{children:a})}),(0,t.jsx)(W,{label:"Then",children:(0,t.jsx)(tp,{actions:e.actions})})]})}function e4({args:e,disableConfirm:s,isConfirming:r,isProcessing:n,onConfirm:a,riskMessages:i,ruleId:l}){return l?(0,t.jsx)(e5,{args:e,ruleId:l}):(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)(eC.Alert,{variant:"default",className:"border-amber-500/40 bg-amber-500/5",children:[(0,t.jsx)(ek.AlertTriangleIcon,{className:"size-4 text-amber-600"}),(0,t.jsx)(eC.AlertTitle,{children:"Review before enabling"}),(0,t.jsxs)(eC.AlertDescription,{className:"space-y-2 text-sm",children:[(0,t.jsx)("p",{children:"This rule can send email automatically. Review it before enabling."}),1===i.length?(0,t.jsx)("p",{className:"text-muted-foreground",children:i[0]}):i.length>1?(0,t.jsx)("ul",{className:"list-disc space-y-1 pl-4 text-muted-foreground",children:i.map(e=>(0,t.jsx)("li",{children:e},e))}):null]})]}),(0,t.jsx)(e5,{args:e,preview:!0}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(E.Button,{onClick:a,disabled:r||n||s,size:"sm",className:"gap-2",children:n?"Creating...":r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eE.Loader2,{className:"size-4 animate-spin"}),"Creating..."]}):"Create & enable rule"})})]})}function e2({ruleId:e,initialEnabled:s=!0}){let{emailAccountId:r}=(0,v.useAccount)();return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(e8,{ruleId:e,initialEnabled:s}),(0,t.jsx)(S.Tooltip,{content:"Delete rule",children:(0,t.jsx)(E.Button,{variant:"ghostMuted",size:"iconSm",onClick:async()=>{if(confirm("Are you sure you want to delete this rule?"))try{let t=await (0,eD.deleteRuleAction)(r,{id:e});t?.serverError?(0,A.toastError)({description:t.serverError}):(0,A.toastSuccess)({description:"The rule has been deleted."})}catch{(0,A.toastError)({description:"Failed to delete rule."})}},children:(0,t.jsx)(eA.TrashIcon,{className:"size-4"})})})]})}function e8({ruleId:e,initialEnabled:s=!0}){let{emailAccountId:n}=(0,v.useAccount)(),a=(0,eH.useDialogState)(),[i,l]=(0,r.useState)(s),{executeAsync:d}=(0,eB.useAction)(e$.toggleRuleAction.bind(null,n));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.Tooltip,{content:"Edit rule",children:(0,t.jsx)(E.Button,{variant:"ghostMuted",size:"iconSm",onClick:()=>a.onOpen({ruleId:e}),children:(0,t.jsx)(eS.PencilIcon,{className:"size-4"})})}),(0,t.jsx)(eq.Switch,{checked:i,onCheckedChange:async t=>{l(t);try{let s=await d({ruleId:e,enabled:t});s?.serverError&&(l(!t),(0,A.toastError)({description:`Failed to ${t?"enable":"disable"} rule.`}))}catch{l(!t),(0,A.toastError)({description:`Failed to ${t?"enable":"disable"} rule.`})}}}),(0,t.jsx)(eL.RuleDialog,{ruleId:a.data?.ruleId,isOpen:a.isOpen,onClose:a.onClose,editMode:!0})]})}function e7({enabled:e=!0}){return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(e6,{enabled:e}),(0,t.jsx)(S.Tooltip,{content:"Delete rule",children:(0,t.jsx)(E.Button,{variant:"ghostMuted",size:"iconSm",children:(0,t.jsx)(eA.TrashIcon,{className:"size-4"})})})]})}function e6({enabled:e=!0}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.Tooltip,{content:"Edit rule",children:(0,t.jsx)(E.Button,{variant:"ghostMuted",size:"iconSm",children:(0,t.jsx)(eS.PencilIcon,{className:"size-4"})})}),(0,t.jsx)(eq.Switch,{checked:e})]})}function e9({ruleId:e}){let s=(0,eH.useDialogState)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.Tooltip,{content:"Edit rule",children:(0,t.jsx)(E.Button,{variant:"ghostMuted",size:"iconSm",onClick:()=>s.onOpen({ruleId:e}),children:(0,t.jsx)(eS.PencilIcon,{className:"size-4"})})}),(0,t.jsx)(eL.RuleDialog,{ruleId:s.data?.ruleId,isOpen:s.isOpen,onClose:s.onClose,editMode:!0})]})}function te({label:e,color:s}){return(0,t.jsx)(H.Badge,{color:s,className:"shrink-0 text-[10px]",children:e})}function tt({title:e,badge:s,description:r,actions:n,children:a}){return(0,t.jsxs)(q.Card,{className:"overflow-hidden",children:[(0,t.jsxs)(q.CardHeader,{className:"flex flex-row items-start justify-between gap-3 space-y-0 px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("h3",{className:"text-base font-semibold leading-tight",children:e}),s]}),r&&(0,t.jsx)("div",{className:"mt-1 text-xs text-muted-foreground",children:r})]}),n]}),(0,t.jsx)(q.CardContent,{className:"space-y-3 border-t px-4 py-3.5",children:a})]})}function ts({children:e}){return(0,t.jsxs)(eQ.Collapsible,{children:[(0,t.jsxs)(eQ.CollapsibleTrigger,{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[(0,t.jsx)(o.ChevronRightIcon,{className:"size-4 transition-transform [[data-state=open]>&]:rotate-90"}),"View changes"]}),(0,t.jsx)(eQ.CollapsibleContent,{className:"mt-2",children:e})]})}function tr({title:e,originalText:s,updatedText:r}){return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:e}),(0,t.jsxs)("div",{className:"max-h-96 overflow-auto rounded-md border bg-muted/30 p-3 font-mono text-sm",children:[s&&(0,t.jsxs)("div",{className:"mb-2 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-red-50 px-2 py-1 text-red-800 dark:bg-red-950/30 dark:text-red-200",children:[(0,t.jsx)("span",{className:"mr-2 text-red-500",children:"-"}),s]}),r&&(0,t.jsxs)("div",{className:"max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-green-50 px-2 py-1 text-green-800 dark:bg-green-950/30 dark:text-green-200",children:[(0,t.jsx)("span",{className:"mr-2 text-green-500",children:"+"}),r]})]})]})}function tn({action:e,read:t,labelApplied:s,inProgress:r}){return"bulk_archive_senders"===e?r?"Bulk archiving senders":"Bulk archived senders":"unsubscribe_senders"===e?r?"
2Unsubscribing senders":"Unsubscribed senders":"archive_threads"===e?r?s?"Archiving and labeling emails":"Archiving emails":s?"Archived and labeled emails":"Archived emails":"trash_threads"===e?r?"Trashing emails":"Trashed emails":"label_threads"===e?r?"Labeling emails":"Labeled emails":"remove_label_threads"===e?r?"Removing labels":"Removed labels":"mark_read_threads"===e?r?!1===t?"Marking emails as unread":"Marking emails as read":!1===t?"Marked emails as unread":"Marked emails as read":"Updated emails"}function ta({label:e,children:s}){return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(tb,{children:e}),s]})}function ti({children:e,className:r}){return(0,t.jsx)("div",{className:(0,s.cn)("rounded-md border bg-muted/20 p-3",r),children:e})}function tl({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"w-20 pt-0.5",children:e}),(0,t.jsx)("div",{className:"min-w-0 flex-1 text-foreground",children:s})]})}function td({href:e,children:s}){return(0,t.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex w-fit items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[s,(0,t.jsx)(c.ExternalLinkIcon,{className:"size-3.5"})]})}function to({label:e,value:s}){return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground/80",children:e}),(0,t.jsx)("span",{className:"text-foreground/80",children:s})]})}function tc(e){var t,s;if("object"!=typeof(t=e)||null===t)return null;let r="send_email"===(s=e.actionType)||"reply_email"===s||"forward_email"===s?s:null,n=th(e.confirmedAt);return r&&n?{actionType:r,confirmedAt:n,messageId:th(e.messageId)||null,threadId:th(e.threadId)||null,to:th(e.to)||null,subject:th(e.subject)||null}:null}function tu(e,t){if(e)return(0,eV.trimToNonEmptyString)(e[t])}function tm({pendingAction:e,output:t,key:s}){return tu(e,s)||eY(t,s)}function tx({messageId:e,threadId:t,externalUrl:s,userEmail:r,provider:n}){return s||("microsoft"===n?null:(0,w.getEmailUrlForOptionalMessage)({messageId:e,threadId:t,emailAddress:r,provider:n}))}function th(e){return(0,eV.trimToNonEmptyString)(e)??null}function tp({actions:e}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.map((e,s)=>{if(!e)return null;let r=(0,Q.getActionIcon)(e.type);return(0,t.jsxs)(H.Badge,{color:(0,X.getActionColor)(e.type),className:"w-fit shrink-0",children:[(0,t.jsx)(r,{className:"mr-1.5 size-3"}),(0,Q.getActionDisplay)({type:e.type,label:e.fields?.label,to:e.fields?.to,content:e.fields?.content},"",[])]},s)})})}function tf(e){if(!e)return null;let t=[e.from&&`From: ${e.from}`,e.subject&&`Subject: ${e.subject}`].filter(Boolean);return t.length>0?t.join(", "):null}function tg({emails:e}){let s=new Set,r=e.filter(e=>!s.has(e.threadId)&&(s.add(e.threadId),!0)),n=new Map(r.map(e=>[e.threadId,{messageId:e.messageId,from:e.from,subject:e.subject,snippet:e.snippet||"",date:e.date,isUnread:e.isUnread,externalUrl:e.externalUrl}]));return(0,t.jsx)(f,{value:n,children:(0,t.jsx)("div",{className:"overflow-hidden",children:r.map(e=>(0,t.jsx)($,{threadid:e.threadId},e.threadId))})})}function tj(e){let t=[];if(e.aiInstructions&&t.push(e.aiInstructions),e.static){let s=e.static,r=[s.from&&`From: ${s.from}`,s.to&&`To: ${s.to}`,s.subject&&`Subject: ${s.subject}`].filter(Boolean);r.length>0&&t.push(r.join(", "))}return t.join(` ${e.conditionalOperator||"AND"} `)}function tv(e){return e.map(e=>{let t=[e.type];return e.fields?.label&&t.push(`Label: ${e.fields.label}`),e.fields?.to&&t.push(`To: ${e.fields.to}`),e.fields?.content&&t.push(`Content: ${e.fields.content}`),e.fields?.webhookUrl&&t.push(`Webhook: ${e.fields.webhookUrl}`),t.join(", ")}).join("\n")}function tb({children:e,className:s}){return(0,t.jsx)(J,{className:s,children:e})}e.s(["AddToKnowledgeBase",0,function({args:e}){let[s,r]=(0,eN.useQueryState)("tab");return(0,t.jsxs)(tt,{title:"Added to Knowledge Base",actions:(0,t.jsx)("div",{className:"self-center",children:(0,t.jsx)(E.Button,{variant:"ghostMuted",size:"sm",className:"h-8 px-2",onClick:()=>r("rules"),children:"View Knowledge Base"})}),children:[(0,t.jsx)(tl,{label:"Title",value:e.title}),(0,t.jsx)(ta,{label:"Content",children:(0,t.jsx)(ti,{className:"text-sm leading-relaxed",children:(0,t.jsx)(eF,{text:e.content})})})]})},"BasicToolInfo",0,eZ,"CreatedRuleToolCard",0,e5,"ForwardEmailResult",0,function({output:e,chatMessageId:s,toolCallId:r,disableConfirm:n}){return(0,t.jsx)(e1,{actionType:"forward_email",output:e,chatMessageId:s,toolCallId:r,disableConfirm:n})},"ManageInboxResult",0,function({input:e,output:s,threadIds:r,threadLookup:n,isInProgress:a=!1}){var i;let{provider:l,userEmail:d}=(0,v.useAccount)(),o=eY(s,"action"),u="remove_category_threads"===(i=e?.action||o)?"remove_label_threads":eJ(i)?i:void 0,m=eY(s,"successCount"),x=eY(s,"requestedCount"),h=eY(s,"sendersCount"),p=eY(s,"failedCount"),f=eY(s,"senders"),g=tn({action:u,read:e?.action==="mark_read_threads"?!1!==e.read:eY(s,"read"),labelApplied:e?.action==="archive_threads"?!!e.label:!!eY(s,"labelId"),inProgress:a}),j="bulk_archive_senders"===u||"unsubscribe_senders"===u,b=j?h??f?.length:m??x,N=j?"sender":"item",y=r?r.map(e=>{let t=n.get(e);if(t)return{threadId:e,...t}}).filter(ey.isDefined):void 0;return(0,t.jsxs)(e3,{title:g,badge:"number"==typeof b?(0,t.jsxs)(H.Badge,{color:p?"yellow":a?"blue":"green",className:"text-[10px]",children:[b," ",N,1===b?"":"s"]}):void 0,initialOpen:a,children:[a&&(0,t.jsx)(ti,{className:"border-blue-200 bg-blue-50/60 text-blue-700 dark:border-blue-900 dark:bg-blue-950/20 dark:text-blue-200",children:(0,t.jsx)("div",{className:"text-sm",children:"Processing senders now."})}),"number"==typeof p&&p>0&&(0,t.jsx)(ti,{className:"border-red-200 bg-red-50/60 text-red-700 dark:border-red-900 dark:bg-red-950/20 dark:text-red-200",children:(0,t.jsxs)("div",{className:"text-sm",children:["Failed on ",p," ",N,1===p?"":"s","."]})}),y&&y.length>0&&(0,t.jsx)("div",{className:"-mx-4 -my-3.5",children:(0,t.jsx)(tg,{emails:y})}),f&&f.length>0&&(0,t.jsx)(ta,{label:"Senders",children:(0,t.jsx)("div",{className:"space-y-2",children:f.map(e=>(0,t.jsxs)(ti,{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"min-w-0 truncate text-sm text-foreground",children:e}),(0,t.jsx)("a",{href:(0,w.getEmailSearchUrl)(e,d,l),target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-muted-foreground hover:text-foreground","aria-label":`View ${e} in ${"microsoft"===l?"Outlook":"Gmail"}`,children:(0,t.jsx)(c.ExternalLinkIcon,{className:"size-3.5"})})]},e))})})]})},"ManageSenderCategoryResult",0,function({output:e}){let{provider:s,userEmail:r}=(0,v.useAccount)(),n=eY(e,"category"),a=eY(e,"sendersCount")??0,i=eY(e,"senders")??[],l=n?.name?.trim()||"Category";if(0===i.length)return(0,t.jsx)(eZ,{text:`No senders to archive in "${l}"`});let d=Math.max(a-i.length,0);return(0,t.jsx)(e3,{title:`Archived "${l}" category`,badge:(0,t.jsxs)(H.Badge,{color:"green",className:"text-[10px]",children:[a," sender",1===a?"":"s"]}),children:(0,t.jsxs)(ta,{label:"Senders",children:[(0,t.jsx)("div",{className:"max-h-96 space-y-2 overflow-y-auto pr-1",children:i.map(e=>(0,t.jsxs)(ti,{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"min-w-0 truncate text-sm text-foreground",children:e}),(0,t.jsx)("a",{href:(0,w.getEmailSearchUrl)(e,r,s),target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-muted-foreground hover:text-foreground","aria-label":`View ${e} in ${"microsoft"===s?"Outlook":"Gmail"}`,children:(0,t.jsx)(c.ExternalLinkIcon,{className:"size-3.5"})})]},e))}),d>0&&(0,t.jsxs)("div",{className:"text-xs text-muted-foreground",children:["+ ",d," more sender",1===d?"":"s"," not shown"]})]})})},"PendingCreateRulePreviewCard",0,function({args:e,riskMessages:s}){return(0,t.jsx)(e4,{args:e,disableConfirm:!0,isConfirming:!1,isProcessing:!1,onConfirm:()=>{},riskMessages:s})},"PendingCreateRuleToolCard",0,function({args:e,output:s,chatMessageId:n,toolCallId:a,disableConfirm:i}){let{emailAccountId:l}=(0,v.useAccount)(),{chatId:d}=(0,Z.useChat)(),[o,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(null),x=eY(s,"riskMessages")?.filter(Boolean)??[],h=eY(s,"confirmationState")||"pending",p=eY(s,"ruleId"),f=async()=>{c(!0);try{if(!d)return void(0,A.toastError)({description:"Could not create this rule."});let e=await ez(l,{chatId:d,chatMessageId:n,toolCallId:a});if(e?.serverError)return void(0,A.toastError)({description:e.serverError});let t=e?.data?.ruleId;if(!t)return void(0,A.toastError)({description:"Could not create this rule."});m(t),(0,A.toastSuccess)({description:"Rule created and enabled."})}catch{(0,A.toastError)({description:"Could not create this rule."})}finally{c(!1)}};return(0,t.jsx)(e4,{args:e,disableConfirm:i,isConfirming:o,isProcessing:"processing"===h,onConfirm:f,riskMessages:x,ruleId:u||p})},"PendingDeleteRulePreviewCard",0,function({args:e,output:s}){let r="confirmed"===s.confirmationState,n=s.ruleName||e.ruleName;return(0,t.jsxs)(q.Card,{children:[(0,t.jsxs)(q.CardHeader,{className:"flex flex-row items-start gap-3 space-y-0 border-b px-4 py-3.5",children:[(0,t.jsx)(eA.TrashIcon,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"truncate text-base font-semibold",children:n}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r?"Deleted rule":"Pending deleti
2on"})]}),r&&(0,t.jsx)(H.Badge,{color:"green",className:"shrink-0",children:"Deleted"})]}),!r&&(0,t.jsxs)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:[(0,t.jsxs)(eC.Alert,{variant:"default",className:"border-amber-500/40 bg-amber-500/5",children:[(0,t.jsx)(ek.AlertTriangleIcon,{className:"size-4 text-amber-600"}),(0,t.jsx)(eC.AlertTitle,{children:"Confirm rule deletion"}),(0,t.jsx)(eC.AlertDescription,{className:"text-sm text-muted-foreground",children:"This will permanently delete the rule and its actions."})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(E.Button,{variant:"destructive",size:"sm",disabled:!0,children:"Delete rule"})})]})]})},"PendingDeleteRuleToolCard",0,function({args:e,output:s,disableConfirm:n}){let{emailAccountId:a}=(0,v.useAccount)(),[i,l]=(0,r.useState)(!1),[d,o]=(0,r.useState)("confirmed"===s.confirmationState),c=s.ruleId,u=s.ruleName||e.ruleName,m=async()=>{if(!c)return void(0,A.toastError)({description:"Could not delete this rule."});l(!0);try{let e=await (0,eD.deleteRuleAction)(a,{id:c});if(e?.serverError)return void(0,A.toastError)({description:e.serverError});o(!0),(0,A.toastSuccess)({description:"The rule has been deleted."})}catch{(0,A.toastError)({description:"Failed to delete rule."})}finally{l(!1)}};return(0,t.jsxs)(q.Card,{children:[(0,t.jsxs)(q.CardHeader,{className:"flex flex-row items-start gap-3 space-y-0 border-b px-4 py-3.5",children:[(0,t.jsx)(eA.TrashIcon,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"truncate text-base font-semibold",children:u}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:d?"Deleted rule":"Pending deletion"})]}),d&&(0,t.jsx)(H.Badge,{color:"green",className:"shrink-0",children:"Deleted"})]}),!d&&(0,t.jsxs)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:[(0,t.jsxs)(eC.Alert,{variant:"default",className:"border-amber-500/40 bg-amber-500/5",children:[(0,t.jsx)(ek.AlertTriangleIcon,{className:"size-4 text-amber-600"}),(0,t.jsx)(eC.AlertTitle,{children:"Confirm rule deletion"}),(0,t.jsx)(eC.AlertDescription,{className:"text-sm text-muted-foreground",children:"This will permanently delete the rule and its actions."})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(E.Button,{variant:"destructive",size:"sm",onClick:m,disabled:n||i||!c,className:"gap-2",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eE.Loader2,{className:"size-4 animate-spin"}),"Deleting..."]}):"Delete rule"})})]})]})},"PendingSaveMemoryToolCard",0,function({output:e,chatMessageId:s,toolCallId:n,disableConfirm:a}){let{emailAccountId:i}=(0,v.useAccount)(),{chatId:l}=(0,Z.useChat)(),[d,o]=(0,r.useState)(!1),[c,u]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),h=eY(e,"content")||"",p=eY(e,"reason"),f=!0===eY(e,"requiresConfirmation"),g=eY(e,"confirmationState")||"pending",j=eY(e,"confirmationResult"),b="processing"===g,N=c||("string"==typeof j?.confirmedAt?j.confirmedAt:null),y=m??("boolean"==typeof j?.deduplicated&&j.deduplicated),C="confirmed"===g||!!N,w=async()=>{o(!0);try{if(!l)return void(0,A.toastError)({description:"Could not save this memory."});let e=await eM(i,{chatId:l,chatMessageId:s,toolCallId:n});if(e?.serverError)return void(0,A.toastError)({description:e.serverError});let t=e?.data?.confirmationResult;if(!t?.confirmedAt)return void(0,A.toastError)({description:"Could not save this memory."});u(t.confirmedAt),x(!!t.deduplicated),(0,A.toastSuccess)({description:t.deduplicated?"Memory was already saved.":"Memory saved."})}catch{(0,A.toastError)({description:"Could not save this memory."})}finally{o(!1)}};return(0,t.jsxs)(q.Card,{children:[(0,t.jsx)(q.CardHeader,{className:"px-4 py-3.5",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:"Save memory"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:C?y?"Already saved in memory":"Saved for future conversations":"Pending confirmation"})]}),N&&(0,t.jsx)(H.Badge,{color:y?"gray":"green",className:"text-xs",children:y?"Already saved":"Saved"})]})}),(0,t.jsxs)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:[(0,t.jsx)("div",{className:"rounded-md border bg-muted/30 px-3 py-2 text-sm",children:h}),p&&!C&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p})]}),!C&&f&&(0,t.jsx)(q.CardFooter,{className:"justify-end border-t px-4 py-3",children:(0,t.jsx)(E.Button,{onClick:w,disabled:a||d||b,size:"sm",className:"gap-2",children:b?"Saving...":d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eE.Loader2,{className:"size-4 animate-spin"}),"Saving..."]}):"Confirm save"})})]})},"ReadEmailResult",0,function({output:e}){let{provider:s,userEmail:r}=(0,v.useAccount)(),n=eY(e,"subject"),a=eY(e,"from"),i=eY(e,"to"),l=eY(e,"date"),d=eY(e,"content"),o=eY(e,"messageId"),c=tx({messageId:o,threadId:eY(e,"threadId"),externalUrl:eY(e,"externalUrl"),userEmail:r,provider:s}),u=l?(0,I.formatShortDate)(new Date(l),{lowercase:!0}):null;return(0,t.jsx)(e0,{title:"Read Email",children:(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[(n||a||i||u)&&(0,t.jsxs)("div",{className:"space-y-1",children:[n&&(0,t.jsx)("div",{className:"text-sm font-medium leading-snug text-foreground",children:n}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[a&&(0,t.jsx)(to,{label:"From",value:a}),i&&(0,t.jsx)(to,{label:"To",value:i}),u&&(0,t.jsx)(to,{label:"Date",value:u})]})]}),d&&(0,t.jsx)(ti,{className:"text-sm leading-relaxed",children:(0,t.jsx)(eF,{text:d})}),c&&(0,t.jsxs)(td,{href:c,children:["Open in ","microsoft"===s?"Outlook":"Gmail"]})]})})},"ReplyEmailResult",0,function({output:e,chatMessageId:s,toolCallId:r,disableConfirm:n}){return(0,t.jsx)(e1,{actionType:"reply_email",output:e,chatMessageId:s,toolCallId:r,disableConfirm:n})},"SearchInboxResult",0,function({output:e}){let s=eY(e,"error"),r=eY(e,"queryUsed"),n=eY(e,"messages");return(0,t.jsxs)(e0,{title:"Search Inbox",children:[r&&(0,t.jsx)(tl,{label:"Query",value:(0,t.jsx)("span",{className:"font-mono text-xs",children:r})}),s&&(0,t.jsxs)("div",{className:"space-y-1 text-sm text-muted-foreground",children:[(0,t.jsx)("p",{children:"Search results were unavailable for that request."}),(0,t.jsx)("p",{className:"text-xs",children:s})]}),n&&n.length>0&&(0,t.jsx)(tg,{emails:n})]})},"SendEmailResult",0,function({output:e,chatMessageId:s,toolCallId:r,disableConfirm:n}){return(0,t.jsx)(e1,{actionType:"send_email",output:e,chatMessageId:s,toolCallId:r,disableConfirm:n})},"UpdatePersonalInstructions",0,function({args:e}){return(0,t.jsx)(tt,{title:"Updated Personal Instructions",children:(0,t.jsx)(ti,{className:"text-sm leading-relaxed",children:e.personalInstructions})})},"UpdatedLearnedPatterns",0,function({args:e,ruleId:s,preview:r}){let n=r?(0,t.jsx)(S.Tooltip,{content:"Edit rule",children:(0,t.jsx)(E.Button,{variant:"ghostMuted",size:"iconSm",children:(0,t.jsx)(eS.PencilIcon,{className:"size-4"})})}):(0,t.jsx)(e9,{ruleId:s}
2);return(0,t.jsxs)(q.Card,{children:[(0,t.jsx)(K,{title:e.ruleName,status:(0,t.jsx)(te,{label:"Patterns updated",color:"blue"}),actions:n}),(0,t.jsx)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:e.learnedPatterns.map((e,s)=>{if(!e)return null;let r=tf(e.include),n=tf(e.exclude);return r||n?(0,t.jsxs)(ti,{className:"space-y-2",children:[r&&(0,t.jsx)(tl,{label:"Include",value:r}),n&&(0,t.jsx)(tl,{label:"Exclude",value:n})]},s):null})})]})},"UpdatedRule",0,function({args:e,output:s,preview:r}){let n=s.ruleId,a=s.updatedName||e.updates.name||e.ruleName,i=s.updatedConditions?tj(s.currentRule?.conditions||function({originalConditions:e,updatedConditions:t}){let s=e?.static;"static"in t&&(s=null===t.static?null:{...e?.static||{},...t.static||{}});let r=e?.aiInstructions;return"aiInstructions"in t?r=t.aiInstructions:t.clearAiInstructions&&(r=null),{aiInstructions:r,static:s,conditionalOperator:null!=t.conditionalOperator?t.conditionalOperator:e?.conditionalOperator}}({originalConditions:s.originalConditions,updatedConditions:s.updatedConditions})):null,l=s.updatedActions,d=s.originalName&&s.updatedName&&s.originalName!==s.updatedName,o=void 0!==s.originalEnabled&&void 0!==s.updatedEnabled&&s.originalEnabled!==s.updatedEnabled,c=o&&!d&&!s.updatedConditions&&!s.updatedActions,u=function({alreadyApplied:e,onlyEnabledChanged:t,updatedEnabled:s}){return e?{label:"Already applied",color:"gray"}:t?s?{label:"Enabled",color:"green"}:{label:"Disabled",color:"gray"}:{label:"Updated",color:"blue"}}({alreadyApplied:s.alreadyApplied,onlyEnabledChanged:c,updatedEnabled:s.updatedEnabled});return(0,t.jsxs)(q.Card,{children:[(0,t.jsx)(K,{title:a,status:(0,t.jsx)(te,{label:u.label,color:u.color}),actions:r?(0,t.jsx)(e7,{}):n?(0,t.jsx)(e2,{ruleId:n}):null}),(0,t.jsxs)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:[d&&s.updatedName&&(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"pt-0.5",children:"Name"}),(0,t.jsx)("p",{children:s.updatedName})]}),i&&(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"pt-0.5",children:"When"}),(0,t.jsx)(G,{children:i})]}),o&&void 0!==s.updatedEnabled&&(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"pt-0.5",children:"Status"}),(0,t.jsx)("p",{children:s.updatedEnabled?"Enabled":"Disabled"})]}),l&&(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"pt-0.5",children:"Then"}),(0,t.jsx)(tp,{actions:l})]}),d&&s.originalName&&s.updatedName&&(0,t.jsx)(ts,{children:(0,t.jsx)(tr,{title:"Name:",originalText:s.originalName,updatedText:s.updatedName})})]})]})},"UpdatedRuleActions",0,function({args:e,ruleId:s,originalActions:r,updatedActions:n,condition:a,preview:i}){let l=r&&n&&JSON.stringify(r)!==JSON.stringify(n),d=a?tj(a):null;return(0,t.jsxs)(q.Card,{children:[(0,t.jsx)(K,{title:e.ruleName,status:(0,t.jsx)(te,{label:"Updated",color:"blue"}),actions:i?(0,t.jsx)(e7,{}):(0,t.jsx)(e2,{ruleId:s})}),(0,t.jsxs)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:[d&&(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"pt-0.5",children:"When"}),(0,t.jsx)(G,{children:d})]}),(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"pt-0.5",children:"Then"}),(0,t.jsx)(tp,{actions:e.actions})]}),l&&(0,t.jsx)(ts,{children:(0,t.jsx)(tr,{title:"Actions:",originalText:tv(r||[]),updatedText:tv(n||[])})})]})]})},"UpdatedRuleConditions",0,function({args:e,ruleId:s,originalConditions:r,updatedConditions:n,actions:a,preview:i}){let l=r&&n&&r.aiInstructions!==n.aiInstructions,d=tj(e.condition);return(0,t.jsxs)(q.Card,{children:[(0,t.jsx)(K,{title:e.ruleName,status:(0,t.jsx)(te,{label:"Updated",color:"blue"}),actions:i?(0,t.jsx)(e7,{}):(0,t.jsx)(e2,{ruleId:s})}),(0,t.jsxs)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"pt-0.5",children:"When"}),(0,t.jsx)(G,{children:d})]}),a&&a.length>0&&(0,t.jsxs)("div",{className:"flex gap-4 text-sm",children:[(0,t.jsx)(tb,{className:"pt-0.5",children:"The
2n"}),(0,t.jsx)(tp,{actions:a})]}),l&&(0,t.jsx)(ts,{children:(0,t.jsx)(tr,{title:"Instructions:",originalText:r?.aiInstructions||void 0,updatedText:n?.aiInstructions||void 0})})]})]})},"UpdatedRuleState",0,function({args:e,output:s,preview:r}){let n=s.ruleId,a=s.ruleName||e.ruleName,i=s.enabled??"enable"===e.operation,l=i?"Enabled":"Disabled";return(0,t.jsxs)(q.Card,{children:[(0,t.jsx)(K,{title:a,status:(0,t.jsx)(te,{label:l,color:i?"green":"gray"}),actions:r?(0,t.jsx)(e7,{enabled:i}):n?(0,t.jsx)(e2,{ruleId:n,initialEnabled:i}):null}),(0,t.jsx)(q.CardContent,{className:"space-y-3 px-4 py-3.5",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(tb,{children:"Status"}),(0,t.jsx)(H.Badge,{color:i?"green":"gray",children:l})]})})]})},"getManageInboxActionLabel",0,tn],118786)}]); 3 4//# debugId=c52a7373-42c2-67b9-c2ba-1e1ecffe2765
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.