import{r as e,j as t}from"./vendor-react-Dp9pL_Wn.js";import{c as s}from"./cc2e285cb-XbqxPJb1.js";import{a as r,v as o}from"./caf7c7e06-DJYXCm3T.js";import{D as a,s as i}from"./vendor-ant-cds-bBedrtIN.js";import{S as n}from"./c8f0d167d-CF518t7n.js";import{u as d}from"./vendor-intl-D2wGIp4M.js";import"./c6eedc03a-CsEFTfjy.js";import"./vendor-base-ui-DNypCIlh.js";import"./vendor-radix-Ch96tRrt.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-zod-0xcuG3aM.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-CokWnmlw.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-query-BwvgHhJ1.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-growthbook-C66YtMMX.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-virtual-DRz8lJfQ.js";import"./c62933a29-BojHUSii.js";import"./c60f5ad19-R8w-svgU.js";import"./c32c0d97f-BRKlKuDE.js";import"./ca4e68303-2GEI1XEE.js";import"./ce5824dc6-DCrxq2nV.js";import"./c393cb7f5-B9bpbpka.js";import"./c41323917-D2qX4YRv.js";import"./c57c2877c-CDK50aMX.js";import"./cd78d010c-Dyg6Wpc_.js";import"./c5f3f4681-re2ND0pU.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:o,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,g=e.useRef(h);g.current=h;const y=void 0!==h;e.useEffect(()=>{if(!y||!j)return;const e=g.current;return e?.(!0),()=>e?.(!1)},[j,y]);const b=e.useRef(null),k=e.useRef(!1),w=e.useRef(n);w.current=n;const C=e.useCallback(()=>!!b.current&&(w.current(b.current.metadata),b.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?b.current={metadata:r}:(b.current=null,n(r),M())},[n,M]),P=e.useCallback(e=>{e||A()},[A]),N=o({handleDismiss:A,handleAction:D}),z=void 0!==m?{maxWidth:m}:void 0,R=z?{...z,width:"calc(100vw - 2rem)"}:void 0;return t.jsx(a.Root,{open:j,onOpenChange:P,dismissible:f,children:t.jsx(a.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})})});m.displayName="SpotlightModal";const u=e.memo(function({onDismiss:s,onUpgrade:r}){const a=d(),i=e.useMemo(()=>({layout:"vertical",maxWidth:640,title:a.formatMessage({defaultMessage:"Don\u2019t just chat. Cowork.",id:"6zhJS6JZlH"}),bodyText:a.formatMessage({defaultMessage:"With Cowork, Claude tackles complex tasks independently. It can organize files, draft docs, and more.",id:"b3c1n4ee56"}),bulletPoints:[{text:a.formatMessage({defaultMessage:"Point Claude at a folder and let it work",id:"r7PmBqqkcB"})},{text:a.formatMessage({defaultMessage:"Runs in the background while you do other things",id:"xI7A14X+gA"})},{text:a.formatMessage({defaultMessage:"Claude checks in when it needs your input",id:"B33QiHqTkv"})}],ctaActions:[{text:a.formatMessage({defaultMessage:"Later",id:"uQDRsYlg+S"}),type:"href",value:""},{text:a.formatMessage({defaultMessage:"Upgrade",id:"0h/lPMeYkq"}),type:"upgrade",value:"/upgrade?feature=cowork&hide_free=true",isPrimary:!0}]}),[a]);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:o["desktop-cowork-tab"],onDismiss:e,onCtaClick:e=>s({isPrimary:e.isPrimary}),classNames:{bulletList:"space-y-1.5"}})})});export{u as CoworkUpsellModalChorus};
