!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0879f-7bbf-76a1-90c6-45360dffdca5")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,364374,e=>{"use strict";var t=e.i(222666),s=e.i(505962),l=e.i(452473),a=e.i(79247),n=e.i(477248),i=e.i(270401);let c=i.forwardRef(function({title:e,titleId:t,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},s),e?i.createElement("title",{id:t},e):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15a4.5 4.5 0 0 0 4.5 4.5H18a3.75 3.75 0 0 0 1.332-7.257 3 3 0 0 0-3.758-3.848 5.25 5.25 0 0 0-10.233 2.33A4.502 4.502 0 0 0 2.25 15Z"}))});var r=e.i(221718),o=e.i(820941),d=e.i(956506);let x=[{icon:r.CpuChipIcon,title:"Agent Agnostic",description:"Explore and experiment with every agent in one place. Switch between them with a single command."},{icon:c,title:"Bring Your Own Cloud",description:"Deploy on any cloud provider. Run on infrastructure you already have. Your keys, your data, your rules."},{icon:o.LockClosedIcon,title:"Fully Sandboxed",description:"Aside from local, every agent runs in an isolated environment. No cross-contamination, no side effects."},{icon:n.BoltIcon,title:"OpenRouter Inference",description:"Inference powered by OpenRouter with automatic fallbacks, load balancing, and rate limit handling."}];function m(){let e,l,a=(0,s.c)(2);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"mb-12 text-center",children:[(0,t.jsx)("h2",{className:"mb-4 text-2xl font-bold md:text-4xl",children:"Why Spawn?"}),(0,t.jsx)("p",{className:"text-slate-11 text-lg max-w-2xl mx-auto",children:"The fastest way to deploy AI agents on your infrastructure"})]}),a[0]=e):e=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsxs)("div",{className:"w-full max-w-5xl",children:[e,(0,t.jsx)("div",{className:"grid gap-6 md:grid-cols-2",children:x.map(p)})]}),a[1]=l):l=a[1],l}function p(e){return(0,t.jsx)(d.Card,{className:"p-6",children:(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"shrink-0 flex items-start pt-1",children:(0,t.jsx)("div",{className:"flex size-10 items-center justify-center rounded-lg bg-slate-3 border border-slate-6",children:(0,t.jsx)(e.icon,{className:"size-5 text-slate-11"})})}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-slate-12",children:e.title}),(0,t.jsx)("p",{className:"text-slate-11",children:e.description})]})]})},e.title)}var u=e.i(859672);let f=[{title:"Provision",description:"Spins up a fresh VM on your cloud provider. No Terraform, no YAML."},{title:"Install",description:"Sets up the agent and dependencies automatically."},{title:"Authenticate",description:"Injects your OpenRouter and cloud credentials into the agent via a CLI OAuth flow."},{title:"Configure",description:"Configure your agent for your cloud environment — credentials, endpoints, and model routing handled automatically."},{title:"Connect",description:"Opens an SSH session. You are in."}],h=`spawn # Interactive picker spawn claude gcp # Launch directly spawn ls # List created spawns spawn matrix # Show supported agents & clouds`,g=`# Works without the CLI too bash <(curl -fsSL https://openrouter.ai/labs/spawn/gcp/claude.sh)`;function j(){let e,l,a,n=(0,s.c)(3);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"mb-10 text-center",children:[(0,t.jsx)("h2",{className:"mb-3 text-2xl font-bold md:text-4xl",children:"Under the Hood"}),(0,t.jsx)("p",{className:"mx-auto max-w-2xl text-lg text-slate-11",children:"Every agent + cloud combination is a self-contained script."})]}),n[0]=e):e=n[0],n[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("div",{className:"flex flex-1 flex-col",children:f.map(b)}),n[1]=l):l=n[1],n[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsxs)("div",{className:"w-full max-w-5xl",children:[e,(0,t.jsxs)("div",{className:"flex flex-col gap-10 md:flex-row md:gap-12",children:[l,(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4",children:[(0,t.jsx)(u.CodeBlock,{value:h,language:"shell",className:"text-sm"}),(0,t.jsx)(u.CodeBlock,{value:g,language:"shell",className:"text-sm"})]})]})]}),n[2]=a):a=n[2],a}function b(e,s){return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:(0,l.cn)("flex size-8 shrink-0 items-center justify-center rounded-full","border border-slate-6 bg-slate-2","text-xs font-bold text-slate-12"),children:s+1}),s{let s=e.id===d;return(0,t.jsxs)("button",{type:"button",onClick:()=>{x(e.id)},className:(0,l.cn)("spawn-pick-card relative flex flex-row items-center gap-3.5 overflow-hidden rounded-xl border-2 p-4 text-left","border-slate-6 bg-slate-2"),"aria-pressed":s,"aria-label":`Select ${e.name}`,children:[(0,t.jsx)("div",{className:"spawn-pick-shine pointer-events-none absolute inset-0 z-0 rounded-xl"}),(0,t.jsx)("div",{className:"spawn-pick-glare pointer-events-none absolute inset-0 z-0 rounded-xl"}),(0,t.jsx)("div",{className:"spawn-pick-icon relative z-10 flex size-10 shrink-0 items-center justify-center rounded-lg bg-white p-1.5",children:(0,t.jsx)(M,{provider:e})}),(0,t.jsxs)("div",{className:"relative z-10 flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("p",{className:"truncate text-sm font-semibold text-slate-12",children:e.name}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 text-xs leading-relaxed text-slate-10",children:e.description})]})]},e.id)},r[8]=x,r[9]=d,r[10]=e):e=r[10],i=p.map(e),r[4]=x,r[5]=d,r[6]=p,r[7]=i}else i=r[7];return r[11]!==n||r[12]!==i?(c=(0,t.jsx)("div",{className:n,children:i}),r[11]=n,r[12]=i,r[13]=c):c=r[13],c}function H(e,t){return"local"===e.id?-1:+("local"===t.id)}function M(e){let l,a,n=(0,s.c)(8),{provider:i}=e;if("local"===i.id){let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(T.ComputerDesktopIcon,{className:"size-full text-slate-11"}),n[0]=e):e=n[0],e}if(i.icon){let e;return n[1]!==i.icon||n[2]!==i.name?(e=(0,t.jsx)("img",{src:i.icon,alt:i.name,className:"size-full overflow-hidden rounded-md object-contain"}),n[1]=i.icon,n[2]=i.name,n[3]=e):e=n[3],e}return n[4]!==i.name?(l=i.name.charAt(0),n[4]=i.name,n[5]=l):l=n[5],n[6]!==l?(a=(0,t.jsx)("span",{className:"text-xs font-bold text-slate-11",children:l}),n[6]=l,n[7]=a):a=n[7],a}function $(e){let l,a,n=(0,s.c)(8),{cloud:i}=e;if("local"===i.id){let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(T.ComputerDesktopIcon,{className:"size-full text-slate-11"}),n[0]=e):e=n[0],e}if(i.icon){let e;return n[1]!==i.icon||n[2]!==i.name?(e=(0,t.jsx)("img",{src:i.icon,alt:i.name,className:"size-full overflow-hidden rounded-lg object-contain"}),n[1]=i.icon,n[2]=i.name,n[3]=e):e=n[3],e}return n[4]!==i.name?(l=i.name.charAt(0),n[4]=i.name,n[5]=l):l=n[5],n[6]!==l?(a=(0,t.jsx)("span",{className:"text-lg font-bold text-slate-11",children:l}),n[6]=l,n[7]=a):a=n[7],a}function q(e){let a,n,i,c,r,o,d,x,m=(0,s.c)(15),{agent:p,onClick:u}=e;return m[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.cn)("spawn-fusion-card spawn-fusion-card-left group relative flex w-40 flex-col items-center gap-3 overflow-hidden rounded-2xl border border-slate-6 bg-slate-2 p-5 transition-transform hover:scale-105 focus:outline-hidden"),n=(0,t.jsx)("div",{className:"spawn-pick-shine pointer-events-none absolute inset-0 z-0 rounded-2xl"}),m[0]=a,m[1]=n):(a=m[0],n=m[1]),m[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{className:"absolute right-2 top-2 z-20 opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(v.ArrowsRightLeftIcon,{className:"size-3 text-slate-10"})}),m[2]=i):i=m[2],m[3]!==p.icon||m[4]!==p.name?(c=(0,t.jsx)("div",{className:"relative z-10 flex size-14 items-center justify-center rounded-xl bg-white p-2",children:p.icon?(0,t.jsx)("img",{src:p.icon,alt:p.name,className:"size-full overflow-hidden rounded-lg object-contain"}):(0,t.jsx)("span",{className:"text-lg font-bold text-slate-11",children:p.name.charAt(0)})}),m[3]=p.icon,m[4]=p.name,m[5]=c):c=m[5],m[6]!==p.name?(r=(0,t.jsx)("span",{className:"w-full truncate text-center text-sm font-bold text-slate-12",children:p.name}),m[6]=p.name,m[7]=r):r=m[7],m[8]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("span",{className:"text-xs text-slate-10",children:"Agent"}),m[8]=o):o=m[8],m[9]!==r?(d=(0,t.jsxs)("div",{className:"relative z-10 flex w-full flex-col items-center gap-1",children:[r,o]}),m[9]=r,m[10]=d):d=m[10],m[11]!==u||m[12]!==c||m[13]!==d?(x=(0,t.jsxs)("button",{type:"button",onClick:u,className:a,children:[n,i,c,d]}),m[11]=u,m[12]=c,m[13]=d,m[14]=x):x=m[14],x}function F(e){let a,n,i,c,r,o,d,x,m=(0,s.c)(14),{cloud:p,onClick:u}=e;return m[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.cn)("spawn-fusion-card spawn-fusion-card-right group relative flex w-40 flex-col items-center gap-3 overflow-hidden rounded-2xl border border-slate-6 bg-slate-2 p-5 transition-transform hover:scale-105 focus:outline-hidden"),n=(0,t.jsx)("div",{className:"spawn-pick-shine pointer-events-none absolute inset-0 z-0 rounded-2xl"}),m[0]=a,m[1]=n):(a=m[0],n=m[1]),m[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("div",{className:"absolute right-2 top-2 z-20 opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(v.ArrowsRightLeftIcon,{className:"size-3 text-slate-10"})}),m[2]=i):i=m[2],m[3]!==p?(c=(0,t.jsx)("div",{className:"relative z-10 flex size-14 items-center justify-center rounded-xl bg-white p-2",children:(0,t.jsx)($,{cloud:p})}),m[3]=p,m[4]=c):c=m[4],m[5]!==p.name?(r=(0,t.jsx)("span",{className:"w-full truncate text-center text-sm font-bold text-slate-12",children:p.name}),m[5]=p.name,m[6]=r):r=m[6],m[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("span",{className:"text-xs text-slate-10",children:"Cloud"}),m[7]=o):o=m[7],m[8]!==r?(d=(0,t.jsxs)("div",{className:"relative z-10 flex w-full flex-col items-center gap-1",children:[r,o]}),m[8]=r,m[9]=d):d=m[9],m[10]!==u||m[11]!==c||m[12]!==d?(x=(0,t.jsxs)("button",{type:"button",onClick:u,className:a,children:[n,i,c,d]}),m[10]=u,m[11]=c,m[12]=d,m[13]=x):x=m[13],x}function D(e){let l,a,n,i,c=(0,s.c)(10),{agent:r,cloud:o,onChangeAgent:d,onChangeCloud:x}=e;return c[0]!==r||c[1]!==d?(l=(0,t.jsx)(q,{agent:r,onClick:d}),c[0]=r,c[1]=d,c[2]=l):l=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("div",{className:"z-10 -mx-3",children:(0,t.jsx)("div",{className:"flex size-8 items-center justify-center rounded-full border-2 border-slate-6 bg-slate-1 text-xs font-bold text-slate-11",children:"on"})}),c[3]=a):a=c[3],c[4]!==o||c[5]!==x?(n=(0,t.jsx)(F,{cloud:o,onClick:x}),c[4]=o,c[5]=x,c[6]=n):n=c[6],c[7]!==l||c[8]!==n?(i=(0,t.jsx)("div",{className:"flex flex-col items-center gap-4 py-6",children:(0,t.jsxs)("div",{className:"flex items-center",children:[l,a,n]})}),c[7]=l,c[8]=n,c[9]=i):i=c[9],i}function K(){let e,l=(0,s.c)(1);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"relative flex flex-col items-center",role:"heading","aria-level":1,"aria-label":"Spawn",children:[k.map(U),(0,t.jsx)("span",{className:"absolute -right-8 -top-1 text-2xs font-medium uppercase tracking-wider text-slate-9 sm:-right-10",children:"beta"})]}),l[0]=e):e=l[0],e}function U(e){return(0,t.jsx)("pre",{className:"font-mono text-[8px] leading-[1.15] tracking-tight text-primary sm:text-xs md:text-base","aria-hidden":"true",children:e},e)}function Y(e){let a,n,i=(0,s.c)(3),{step:c}=e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.cn)("flex size-7 shrink-0 items-center justify-center rounded-full","bg-slate-12 text-sm font-bold text-slate-1"),i[0]=a):a=i[0],i[1]!==c?(n=(0,t.jsx)("span",{className:a,children:c}),i[1]=c,i[2]=n):n=i[2],n}function Q(e){let a,n,i,c,r=(0,s.c)(8),{value:o,onChange:d,placeholder:x}=e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(w.MagnifyingGlassIcon,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-slate-10"}),r[0]=a):a=r[0],r[1]!==d?(n=e=>{d(e.target.value)},r[1]=d,r[2]=n):n=r[2],r[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,l.cn)("w-full rounded-lg border border-slate-6 bg-slate-2","py-2 pl-9 pr-3 text-sm text-slate-12","placeholder:text-slate-9 focus:border-slate-8 focus:outline-hidden"),r[3]=i):i=r[3],r[4]!==x||r[5]!==n||r[6]!==o?(c=(0,t.jsxs)("div",{className:"relative",children:[a,(0,t.jsx)("input",{type:"text",value:o,onChange:n,placeholder:x,className:i})]}),r[4]=x,r[5]=n,r[6]=o,r[7]=c):c=r[7],c}function W(e){let a,n,c,r,o,d,x,m,p,f=(0,s.c)(24),{cliSnippet:h,copySnippet:g,spawnCommand:j,agentId:b,cloudId:v,posthog:w}=e,{isCopied:z,copyToClipboard:C}=(0,_.useCopyToClipboard)(),k=(0,i.useRef)(null);f[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{k.current?.scrollIntoView({behavior:"smooth",block:"center"})},n=[],f[0]=a,f[1]=n):(a=f[0],n=f[1]),(0,i.useEffect)(a,n),f[2]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4",children:[(0,t.jsx)(Y,{step:3}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-slate-12",children:"Spawn"})]}),f[2]=c):c=f[2],f[3]!==h?(r=(0,t.jsx)(u.CodeBlock,{value:h,language:"shell",hideCopy:!0,className:"text-sm"}),f[3]=h,f[4]=r):r=f[4],f[5]!==b||f[6]!==v||f[7]!==g||f[8]!==C||f[9]!==w||f[10]!==j?(o=async()=>{w.capture(S.PostHogEvent.SpawnCopyCommand,{agent_id:b,cloud_id:v,command:j}),await C(g)},f[5]=b,f[6]=v,f[7]=g,f[8]=C,f[9]=w,f[10]=j,f[11]=o):o=f[11];let I=z?"Copied!":"Copy spawn command",A=z?"bg-green-9 text-white":"bg-slate-12 text-slate-1 hover:bg-slate-11 active:scale-[0.98]";return f[12]!==A?(d=(0,l.cn)("flex w-full items-center justify-center gap-2.5","rounded-xl px-6 py-3.5 text-base font-semibold","transition-all duration-150",A),f[12]=A,f[13]=d):d=f[13],f[14]!==z?(x=z?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.CheckIcon,{className:"size-5"}),"Copied!"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Square2StackIcon,{className:"size-5"}),"Copy"]}),f[14]=z,f[15]=x):x=f[15],f[16]!==o||f[17]!==I||f[18]!==d||f[19]!==x?(m=(0,t.jsx)("button",{ref:k,type:"button",onClick:o,"aria-label":I,className:d,children:x}),f[16]=o,f[17]=I,f[18]=d,f[19]=x,f[20]=m):m=f[20],f[21]!==m||f[22]!==r?(p=(0,t.jsxs)("section",{className:"flex flex-col gap-4 py-6",children:[c,(0,t.jsxs)("div",{className:"flex flex-col gap-4 px-6",children:[r,m]})]}),f[21]=m,f[22]=r,f[23]=p):p=f[23],p}function V(e){let a,n,c,r,o,d,x,m,p,u,f,h,g,j,b,N,w,y,_,C,k,I,A=(0,s.c)(81),{agents:L,providers:P,initialAgentId:E,initialCloudId:R}=e,T=(0,z.usePosthogClient)(),[H,M]=(0,i.useState)(E),[$,q]=(0,i.useState)(R),[F,U]=(0,i.useState)(""),[V,G]=(0,i.useState)("");if(A[0]!==L||A[1]!==H){let e;A[3]!==H?(e=e=>e.id===H,A[3]=H,A[4]=e):e=A[4],a=L.find(e),A[0]=L,A[1]=H,A[2]=a}else a=A[2];let Z=a;if(A[5]!==P||A[6]!==$){let e;A[8]!==$?(e=e=>e.id===$,A[8]=$,A[9]=e):e=A[9],n=P.find(e),A[5]=P,A[6]=$,A[7]=n}else n=A[7];let J=n,[X,ee]=(0,i.useState)(!E||void 0===Z),[et,es]=(0,i.useState)(!R||void 0===J);if(A[10]!==F||A[11]!==L){let e;c=(e=F.toLowerCase().trim())?L.filter(t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)):L,A[10]=F,A[11]=L,A[12]=c}else c=A[12];let el=c;if(A[13]!==V||A[14]!==P){let e;r=(e=V.toLowerCase().trim())?P.filter(t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)):P,A[13]=V,A[14]=P,A[15]=r}else r=A[15];let ea=r;A[16]!==Z?.featuredClouds?(o=Z?.featuredClouds??[],A[16]=Z?.featuredClouds,A[17]=o):o=A[17],A[18]!==o?(d=new Set(o),A[18]=o,A[19]=d):d=A[19];let en=d;if(A[20]!==en||A[21]!==ea){let e;A[23]!==en?(e=e=>en.has(e.id),A[23]=en,A[24]=e):e=A[24],x=ea.filter(e),A[20]=en,A[21]=ea,A[22]=x}else x=A[22];if(A[25]!==en||A[26]!==ea){let e;A[28]!==en?(e=e=>!en.has(e.id),A[28]=en,A[29]=e):e=A[29],m=ea.filter(e),A[25]=en,A[26]=ea,A[27]=m}else m=A[27];A[30]!==x||A[31]!==m?(p={featuredProviders:x,otherProviders:m},A[30]=x,A[31]=m,A[32]=p):p=A[32];let{featuredProviders:ei,otherProviders:ec}=p;A[33]===Symbol.for("react.memo_cache_sentinel")?(u=(e,t)=>{let s=function(e,t){let s=["/spawn"];return e&&(s.push(e),t&&s.push(t)),s.join("/")}(e,t);window.history.pushState(null,"",s)},A[33]=u):u=A[33];let er=u;A[34]!==L||A[35]!==P?(f=()=>{let e=window.location.pathname.split("/").filter(Boolean),t=e[1],s=e[2];M(t),q(s);let l=!!t&&L.some(e=>e.id===t),a=!!s&&P.some(e=>e.id===s);t&&l?s&&a?(ee(!1),es(!1)):(ee(!1),es(!0)):(ee(!0),es(!1))},A[34]=L,A[35]=P,A[36]=f):f=A[36];let eo=f;A[37]!==eo?(h=()=>{let e=()=>{eo()};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},g=[eo],A[37]=eo,A[38]=h,A[39]=g):(h=A[38],g=A[39]),(0,i.useEffect)(h,g),A[40]!==T?(j=e=>{T.capture(S.PostHogEvent.SpawnSelectAgent,{agent_id:e}),M(e),q(void 0),ee(!1),es(!0),er(e),window.scrollTo({top:0})},A[40]=T,A[41]=j):j=A[41];let ed=j;A[42]!==T||A[43]!==H?(b=e=>{T.capture(S.PostHogEvent.SpawnSelectCloud,{cloud_id:e,agent_id:H}),q(e),es(!1),er(H,e),window.scrollTo({top:0})},A[42]=T,A[43]=H,A[44]=b):b=A[44];let ex=b;e:{if(!Z||!J){N="";break e}N=`spawn ${Z.id} ${J.id}`}let em=N,ep=`# Install Spawn curl -fsSL https://openrouter.ai/labs/spawn/cli/install.sh | bash # Launch ${em}`,eu=`curl -fsSL https://openrouter.ai/labs/spawn/cli/install.sh | bash ${em}`,ef=X&&!Z&&"min-h-[70vh] justify-center";return A[45]!==ef?(w=(0,l.cn)("flex w-full flex-col items-center px-4 py-16 md:px-8",ef),A[45]=ef,A[46]=w):w=A[46],A[47]!==F||A[48]!==el||A[49]!==ed||A[50]!==X||A[51]!==H?(y=X&&(0,t.jsxs)("section",{className:"flex flex-col gap-4 py-2",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-6 pb-12 text-center",children:[(0,t.jsx)(K,{}),(0,t.jsxs)("p",{className:"max-w-lg text-2xl md:text-3xl",children:[(0,t.jsx)("span",{className:"text-slate-10",children:"any "}),(0,t.jsx)("span",{className:"text-slate-12",children:"agent,"}),(0,t.jsx)("span",{className:"text-slate-10",children:" on any "}),(0,t.jsx)("span",{className:"text-slate-12",children:"cloud"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4",children:[(0,t.jsx)(Y,{step:1}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-slate-12",children:"Pick an Agent"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 px-6",children:[(0,t.jsx)(Q,{value:F,onChange:U,placeholder:"Search agents..."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[el.map(e=>(0,t.jsx)(O,{agent:e,isSelected:e.id===H,onSelect:()=>{ed(e.id)}},e.id)),0===el.length&&(0,t.jsx)("p",{className:"col-span-full py-4 text-center text-sm text-slate-10",children:"No agents match your search."})]}),(0,t.jsxs)("p",{className:"py-2 text-center text-sm text-slate-10",children:["Missing an agent?"," ",(0,t.jsx)("button",{type:"button",className:"spawn-model-feedback cursor-pointer text-slate-11 underline hover:text-slate-12",children:"Request it here"})]})]})]},"step-1"),A[47]=F,A[48]=el,A[49]=ed,A[50]=X,A[51]=H,A[52]=y):y=A[52],A[53]!==V||A[54]!==ei||A[55]!==ea.length||A[56]!==ex||A[57]!==X||A[58]!==et||A[59]!==ec||A[60]!==T||A[61]!==Z||A[62]!==$?(_=Z&&!X&&et&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"flex flex-col items-center gap-6 py-2 pb-12 text-center",children:(0,t.jsx)(K,{})}),(0,t.jsx)("div",{className:"flex flex-col items-center py-4",children:(0,t.jsxs)("button",{type:"button",onClick:()=>{T.capture(S.PostHogEvent.SpawnSwapAgent,{agent_id:Z.id}),ee(!0),er(),window.scrollTo({top:0})},className:(0,l.cn)("spawn-pick-card group relative","flex w-56 cursor-pointer flex-col items-center overflow-hidden","rounded-2xl border border-slate-6 bg-slate-2","transition-border-color hover:border-slate-8"),children:[(0,t.jsx)("div",{className:"spawn-pick-shine pointer-events-none absolute inset-0 z-0 rounded-2xl"}),(0,t.jsx)("div",{className:(0,l.cn)("absolute right-2 top-2 z-20","flex size-7 items-center justify-center rounded-lg","bg-slate-1/80 text-slate-10 opacity-0 transition-opacity group-hover:opacity-100"),children:(0,t.jsx)(v.ArrowsRightLeftIcon,{className:"size-3.5"})}),(0,t.jsxs)("div",{className:"relative z-10 flex flex-col items-center gap-4 px-6 pb-8 pt-6",children:[(0,t.jsx)("div",{className:"flex size-20 items-center justify-center rounded-2xl bg-white p-2",children:Z.icon?(0,t.jsx)("img",{src:Z.icon,alt:Z.name,className:"size-full overflow-hidden rounded-lg object-contain"}):(0,t.jsx)("span",{className:"text-2xl font-bold text-slate-11",children:Z.name.charAt(0)})}),(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-1",children:[(0,t.jsx)("span",{className:"w-full truncate text-center text-xl font-bold text-slate-12",children:Z.name}),(0,t.jsx)("span",{className:"line-clamp-2 text-center text-xs text-slate-11",children:Z.description})]})]})]})}),(0,t.jsxs)("section",{className:"flex flex-col gap-4 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4",children:[(0,t.jsx)(Y,{step:2}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-slate-12",children:"Pick a Cloud"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 px-6",children:[(0,t.jsx)(Q,{value:V,onChange:G,placeholder:"Search clouds..."}),0===ea.length?(0,t.jsx)("p",{className:"py-4 text-center text-sm text-slate-10",children:"No clouds match your search."}):(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[ei.length>0&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-slate-10",children:"Recommended"}),(0,t.jsx)(B,{providers:ei,selectedId:$??null,onSelect:ex,className:"grid-cols-2"})]}),ec.length>0&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[ei.length>0&&(0,t.jsx)("p",{className:"text-xs font-medium text-slate-10",children:"More"}),(0,t.jsx)(B,{providers:ec,selectedId:$??null,onSelect:ex,className:"grid-cols-2"})]})]}),(0,t.jsxs)("p",{className:"py-2 text-center text-sm text-slate-10",children:["Missing a cloud provider?"," ",(0,t.jsx)("button",{type:"button",className:"spawn-cloud-feedback cursor-pointer text-slate-11 underline hover:text-slate-12",children:"Request it here"})]})]})]})]},"step-2"),A[53]=V,A[54]=ei,A[55]=ea.length,A[56]=ex,A[57]=X,A[58]=et,A[59]=ec,A[60]=T,A[61]=Z,A[62]=$,A[63]=_):_=A[63],A[64]!==ep||A[65]!==eu||A[66]!==X||A[67]!==et||A[68]!==T||A[69]!==Z||A[70]!==H||A[71]!==J||A[72]!==em?(C=Z&&J&&!X&&!et&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"flex flex-col items-center gap-6 py-2 pb-12 text-center",children:(0,t.jsx)(K,{})}),(0,t.jsx)(D,{agent:Z,cloud:J,onChangeAgent:()=>{T.capture(S.PostHogEvent.SpawnChangeAgent,{agent_id:Z.id}),ee(!0),er(),window.scrollTo({top:0})},onChangeCloud:()=>{T.capture(S.PostHogEvent.SpawnChangeCloud,{cloud_id:J.id}),es(!0),ee(!1),er(H),window.scrollTo({top:0,behavior:"smooth"})}}),(0,t.jsx)(W,{cliSnippet:ep,copySnippet:eu,spawnCommand:em,agentId:Z.id,cloudId:J.id,posthog:T})]},"step-3"),A[64]=ep,A[65]=eu,A[66]=X,A[67]=et,A[68]=T,A[69]=Z,A[70]=H,A[71]=J,A[72]=em,A[73]=C):C=A[73],A[74]!==y||A[75]!==_||A[76]!==C?(k=(0,t.jsxs)("div",{className:"flex w-full max-w-3xl flex-col gap-2",children:[y,_,C]}),A[74]=y,A[75]=_,A[76]=C,A[77]=k):k=A[77],A[78]!==w||A[79]!==k?(I=(0,t.jsx)("div",{className:w,children:k}),A[78]=w,A[79]=k,A[80]=I):I=A[80],I}function G(){let e,l=(0,s.c)(1);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-slate-12",children:"Install Spawn"}),(0,t.jsx)(u.CodeBlock,{value:"curl -fsSL https://openrouter.ai/labs/spawn/cli/install.sh | bash",language:"shell",className:"w-full text-sm"}),(0,t.jsx)("a",{href:"https://github.com/OpenRouterTeam/spawn",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-slate-10 hover:text-slate-12",children:"Made by agents, for agents"})]}),l[0]=e):e=l[0],e}var Z=e.i(151960),J=e.i(626824),X=e.i(8842);let ee=(0,J.createQueryKeys)("spawn-manifest",{manifest:e=>[{responseVersion:e}]});function et(e,s){return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2.5 rounded-2xl border-2 border-slate-6 bg-slate-2 px-3 pb-3 pt-4",children:[(0,t.jsx)("div",{className:"size-14 animate-pulse rounded-xl bg-slate-4"}),(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-1",children:[(0,t.jsx)("div",{className:"h-4 w-20 animate-pulse rounded-sm bg-slate-4"}),(0,t.jsx)("div",{className:"h-3 w-full animate-pulse rounded-sm bg-slate-3"}),(0,t.jsx)("div",{className:"h-3 w-4/5 animate-pulse rounded-sm bg-slate-3"})]})]},s)}e.s(["SpawnContent",0,function(e){let n,i,c,r,o,d,x=(0,s.c)(18),{initialAgentId:p,initialCloudId:u}=e;x[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,X.queryOptions)({queryKey:ee.manifest("2"),queryFn:({signal:e})=>(0,Z.fetchAPIQuery)("/api/frontend/v1/spawn-manifest",{searchParams:{response_version:"2"},signal:e,schema:L})}),x[0]=n):n=x[0];let{data:f,error:h,isPending:g}=(0,a.useQuery)(n);if(g){let e,s,l,a;return x[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 pb-6",children:[(0,t.jsx)("div",{className:"h-16 w-48 animate-pulse rounded-lg bg-slate-4 sm:h-20 sm:w-72 md:h-24 md:w-96"}),(0,t.jsx)("div",{className:"h-6 w-48 animate-pulse rounded-lg bg-slate-3"})]}),x[1]=e):e=x[1],x[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4",children:[(0,t.jsx)("div",{className:"size-7 animate-pulse rounded-full bg-slate-4"}),(0,t.jsx)("div",{className:"h-7 w-36 animate-pulse rounded-lg bg-slate-4"})]}),x[2]=s):s=x[2],x[3]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("div",{className:"px-6",children:(0,t.jsx)("div",{className:"h-10 w-full animate-pulse rounded-lg bg-slate-3"})}),x[3]=l):l=x[3],x[4]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("div",{className:"flex min-h-[70vh] w-full flex-col items-center justify-center px-4 py-16 md:px-8",children:(0,t.jsx)("div",{className:"flex w-full max-w-3xl flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[e,s,l,(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 px-6 sm:grid-cols-3",children:Array.from({length:6},et)})]})})}),x[4]=a):a=x[4],a}if(h||!f){let e;return x[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex min-h-screen w-full items-center justify-center",children:(0,t.jsx)("div",{className:"text-lg text-red-11",children:"Failed to load agents. Please refresh the page."})}),x[5]=e):e=x[5],e}x[6]!==f?(i=Object.entries(f.agents).map(([e,t])=>({id:e,name:t.name,description:t.description,githubUrl:t.url,tagline:t.tagline,creator:t.creator,githubStars:t.github_stars,language:t.language,icon:t.icon,featuredClouds:t.featured_cloud})),x[6]=f,x[7]=i):i=x[7];let b=i;x[8]!==f?(c=Object.entries(f.clouds).map(([e,t])=>({id:e,name:t.name,url:t.url,icon:t.icon,description:t.description})),x[8]=f,x[9]=c):c=x[9];let v=c;return x[10]!==b||x[11]!==p||x[12]!==u||x[13]!==v?(r=(0,t.jsx)(V,{agents:b,providers:v,initialAgentId:p,initialCloudId:u}),x[10]=b,x[11]=p,x[12]=u,x[13]=v,x[14]=r):r=x[14],x[15]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsxs)("div",{className:(0,l.cn)("flex flex-col items-center gap-12 px-4 py-12 md:gap-16 md:px-8 md:py-16"),children:[(0,t.jsx)(j,{}),(0,t.jsx)(m,{}),(0,t.jsx)(G,{})]}),x[15]=o):o=x[15],x[16]!==r?(d=(0,t.jsxs)("div",{className:"flex w-full flex-col",children:[r,o]}),x[16]=r,x[17]=d):d=x[17],d}],364374)}]); //# sourceMappingURL=1jp67hbhjacuu.js.map //# chunkId=01a0879f-7bbf-76a1-90c6-45360dffdca5