import{r as e,j as t}from"./vendor-react-Dp9pL_Wn.js";import{c as s}from"./c0f96d0e0-DGUPaEDS.js";import{a,v as r}from"./ca8998c31-P9hjFFxa.js";import{D as o,s as i}from"./vendor-ant-cds-DvTmcYA1.js";import{S as n}from"./c8f0d167d-KY4YFj2w.js";import{u as d}from"./vendor-intl-BDR1NhN_.js";import"./c4b350ac1-KLFM4jkb.js";import"./vendor-base-ui-CdQU4JQh.js";import"./vendor-radix-D3USJ4lr.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-zod-DIcz3Rbr.js";import"./vendor-zustand-CI9omAwJ.js";import"./vendor-icons-BBStP_8q.js";import"./vendor-lodash-CIro4mst.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-query-DgCRID2b.js";import"./vendor-motion-D7Z1qgzM.js";import"./vendor-luxon-Y8l99kBI.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-growthbook-C66YtMMX.js";import"./vendor-virtual-DRz8lJfQ.js";import"./c62933a29-Bny4k5NF.js";import"./cdabaac79-3sBTRaya.js";import"./ca4e68303-2GEI1XEE.js";import"./ce5824dc6-DCrxq2nV.js";import"./c5decd681-BZUxtT_J.js";import"./ca9bd5d1a-BwvQdQH8.js";import"./c1f96d614-CNpmgQ8l.js";import"./c393cb7f5-HUvLXarC.js";import"./ccca85712-CxU_jF8g.js";const l=`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`,c={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:r,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=a()()?.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]),P=e.useCallback(()=>{k.current||(k.current=!0,C()||i(),v(!1))},[C,i]);e.useEffect(()=>()=>{k.current||C()},[C]);const A=e.useCallback(e=>{if(k.current)return;const{keepOpen:t,...s}=e??{},a=Object.keys(s).length>0?s:void 0;t?b.current={metadata:a}:(b.current=null,n(a),M())},[n,M]),D=e.useCallback(e=>{e||P()},[P]),N=r({handleDismiss:P,handleAction:A}),R=void 0!==m?{maxWidth:m}:void 0,z=R?{...R,width:"calc(100vw - 2rem)"}:void 0;return t.jsx(o.Root,{open:j,onOpenChange:D,dismissible:f,children:t.jsx(o.Popup,{size:d,unstyled:x,backdropClassName:p,className:s(x&&[l,"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]",c[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:z?t.jsx("div",{style:z,children:N}):N}):R?t.jsx("div",{style:R,children:N}):N})})});m.displayName="SpotlightModal";const u=e.memo(function({onDismiss:s,onUpgrade:a}){const o=d(),i=e.useMemo(()=>({layout:"vertical",maxWidth:640,title:o.formatMessage({defaultMessage:"Don't just chat. Cowork.",id:"QIuIPejoPN"}),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?a():s()},render:({handleDismiss:e,handleAction:s})=>t.jsx(n,{content:i,videoAsset:r["desktop-cowork-tab"],onDismiss:e,onCtaClick:e=>s({isPrimary:e.isPrimary}),classNames:{bulletList:"space-y-1.5"}})})});export{u as CoworkUpsellModalChorus};
