import{r as e,j as t}from"./vendor-react-Dp9pL_Wn.js";import{c as s}from"./c5669b8e4-CUL6Tg6A.js";import{a as r,v as a}from"./c9a5287df-D_Z7ffFR.js";import{D as o,s as i}from"./vendor-ant-cds-BLsR_p72.js";import{S as n}from"./c8f0d167d-vopO71zT.js";import{u as d}from"./vendor-intl-D2wGIp4M.js";import"./c2ee0272b-DPDuX889.js";import"./vendor-base-ui-N1VQ4ctE.js";import"./vendor-radix-Dv3qPI0v.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-zod-B8MhECV7.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-DGChWNxR.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-query-CRl6sF7K.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-growthbook-HDTqppl-.js";import"./vendor-virtual-DRz8lJfQ.js";import"./c62933a29-BTmwOnJk.js";import"./caf7c7e06-DiSIOZ2Y.js";import"./ca4e68303-2GEI1XEE.js";import"./ce5824dc6-DCrxq2nV.js";import"./cb3073067-VsOwq8wi.js";import"./c1e35bcba-VJ15EpPv.js";import"./c80791b3a-C9RrC3yS.js";import"./c7d6fc21a-XgEBZrGw.js";import"./c86a1b907-DGD2pwio.js";import"./c33b2042a-BXM4oh1L.js";import"./index-XoaBlZfC.js";import"./c51e217b4-CQax1dv1.js";import"./c627fcdb6-1_bsVTpt.js";import"./c6a992d55-BwJodww6.js";import"./cba0eac33-DiCKjNP1.js";const c=`fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-col w-[calc(100vw-2rem)] max-h-[calc(100dvh-2rem)] ${i("popover")} shadow-panel-lg cds-reset text-body text-primary outline-none`,l={sm:"max-w-[400px]",md:"max-w-[520px]",lg:"max-w-[720px]",xl:"max-w-[880px]","2xl":"max-w-[1024px]","3xl":"max-w-[1152px]"},m=e.memo(({render:a,onDismiss:i,onAction:n,size:d="xl",maxWidth:m,popupClassName:u,backdropClassName:p,dismissible:f=!0,unstyled:x=!1})=>{const[j,v]=e.useState(!0),h=r()()?.setSpotlightActive,b=e.useRef(h);b.current=h;const g=void 0!==h;e.useEffect(()=>{if(!g||!j)return;const e=b.current;return e?.(!0),()=>e?.(!1)},[j,g]);const y=e.useRef(null),k=e.useRef(!1),w=e.useRef(n);w.current=n;const C=e.useCallback(()=>!!y.current&&(w.current(y.current.metadata),y.current=null,!0),[]),M=e.useCallback(()=>{k.current||(k.current=!0,C(),v(!1))},[C]),A=e.useCallback(()=>{k.current||(k.current=!0,C()||i(),v(!1))},[C,i]);e.useEffect(()=>()=>{k.current||C()},[C]);const D=e.useCallback(e=>{if(k.current)return;const{keepOpen:t,...s}=e??{},r=Object.keys(s).length>0?s:void 0;t?y.current={metadata:r}:(y.current=null,n(r),M())},[n,M]),P=e.useCallback(e=>{e||A()},[A]),N=a({handleDismiss:A,handleAction:D}),z=void 0!==m?{maxWidth:m}:void 0,R=z?{...z,width:"calc(100vw - 2rem)"}:void 0;return t.jsx(o.Root,{open:j,onOpenChange:P,dismissible:f,children:t.jsx(o.Popup,{size:d,unstyled:x,backdropClassName:p,className:s(x&&[c,"transition-[opacity,transform] duration-base ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]",l[d]],"overflow-hidden !border-0",void 0!==m&&"!max-w-fit",u),children:x?t.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto rounded-[inherit]",children:R?t.jsx("div",{style:R,children:N}):N}):z?t.jsx("div",{style:z,children:N}):N})})}),u=e.memo(function({onDismiss:s,onUpgrade:r}){const o=d(),i=e.useMemo(()=>({layout:"vertical",maxWidth:640,title:o.formatMessage({defaultMessage:"Don\u2019t just chat. Cowork.",id:"6zhJS6JZlH"}),bodyText:o.formatMessage({defaultMessage:"With Cowork, Claude tackles complex tasks independently. It can organize files, draft docs, and more.",id:"b3c1n4ee56"}),bulletPoints:[{text:o.formatMessage({defaultMessage:"Point Claude at a folder and let it work",id:"r7PmBqqkcB"})},{text:o.formatMessage({defaultMessage:"Runs in the background while you do other things",id:"xI7A14X+gA"})},{text:o.formatMessage({defaultMessage:"Claude checks in when it needs your input",id:"B33QiHqTkv"})}],ctaActions:[{text:o.formatMessage({defaultMessage:"Later",id:"uQDRsYlg+S"}),type:"href",value:""},{text:o.formatMessage({defaultMessage:"Upgrade",id:"0h/lPMeYkq"}),type:"upgrade",value:"/upgrade?feature=cowork&hide_free=true",isPrimary:!0}]}),[o]);return t.jsx(m,{unstyled:!0,popupClassName:"!max-w-fit",onDismiss:s,onAction:e=>{e?.isPrimary?r():s()},render:({handleDismiss:e,handleAction:s})=>t.jsx(n,{content:i,videoAsset:a["desktop-cowork-tab"],onDismiss:e,onCtaClick:e=>s({isPrimary:e.isPrimary}),classNames:{bulletList:"space-y-1.5"}})})});export{u as CoworkUpsellModalChorus};
