1 2!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._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4801adb9-bd95-52bd-949b-8a99367c555e")}catch(e){}}(); 3import{j as e}from"./vendor-radix-D60p-_ms.js";import{r as m}from"./vendor-react-DRd396Ms.js";import{L as x,az as g,_ as c,W as L,D as f,l as B,o as N,m as h,a0 as M,S as F,bM as U,a1 as $}from"./index-vRxdZvmj.js";import{a as D}from"./pro-subscription-terms-BifWp1GK.js";import{a as G,u as H,P as W,d as Y,s as V,M as z,S as J}from"./use-billing-BNeFAuL_.js";import{u as K}from"./useGeoContext-Crosu7cK.js";import{u as Q,S as X}from"./seo-DTdWGe1o.js";import{A as y}from"./animated-section-_hJITepa.js";import{l as k,k as q,C as Z}from"./product-state-DnysQ2lu.js";import{c as ee}from"./vendor-query-CQDkrmBu.js";import{r as A,f as te}from"./clone-plans-rp8CHNyr.js";import{k as R,F as se,R as ae,B as re,l as ie,m as ne,j as le,n as ce,A as oe,P as de,o as me}from"./clone-plan-copy-DbaCE_J8.js";import{u as xe}from"./use-plan-purchasability-DXjh4e-4.js";import{u as he}from"./user-facing-error-DLM6u6dy.js";import{M as ue}from"./minus-B2IwugtT.js";import"./vendor-classnames-B2rm_Apj.js";import"./vendor-motion-DZC2ImUw.js";import"./vendor-i18n-D-E_aly0.js";import"./utils-puaEeEiv.js";function _(n){return typeof n=="object"&&n!==null}async function pe(n){const a=await fetch("/api/plans/checkout",{method:"POST",headers:{"content-type":"application/json"},credentials:"include",body:JSON.stringify({planId:n})}),i=await a.json().catch(()=>null);if(!a.ok){const s=_(i)&&typeof i.error=="string"?i.error:"We could not start checkout. Please try again.";throw new Error(s)}if(!_(i)||typeof i.url!="string")throw new Error("We could not start checkout. Please try again.");return i.url}function ge({planId:n,isAuthenticated:a,isLoading:i,onCtaClicked:s}){const t=R().find(l=>l.id===n),r=ee({mutationFn:pe,onSuccess:l=>{window.location.assign(l)}}),o=xe(n);if(!t)return null;const u=`/signup?next=${encodeURIComponent(`/pricing?plan=${t.id}`)}`;return e.jsxs("article",{className:"rounded-[8px] p-7 flex flex-col",style:{backgroundColor:"rgb(var(--surface-1))",border:"1px solid rgb(var(--hairline))"},"aria-labelledby":`clone-plan-${t.id}`,children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("p",{id:`clone-plan-${t.id}`,className:"text-xs font-semibold uppercase tracking-[0.15em] text-blue-400 mb-3",children:t.label}),e.jsx("p",{className:"text-3xl sm:text-4xl font-bold text-white tracking-tight mb-1","data-testid":t.id==="creator"?"clone-upgrade-credits":`clone-plan-${t.id}-credits`,children:ne(t.id)}),e.jsxs("p",{className:"text-sm text-white/50",children:[le,"."]}),e.jsxs("p",{className:"mt-3 text-lg text-white/80","data-testid":t.id==="creator"?"clone-upgrade-price":`clone-plan-${t.id}-price`,children:[te(t.monthlyMicro)," a month"]})]}),e.jsx("ul",{className:"space-y-3 mb-8 flex-1",children:ce(t).map(l=>e.jsxs("li",{className:"flex items-start gap-3 text-sm text-white/80",children:[e.jsx(g,{className:"h-4 w-4 mt-0.5 flex-shrink-0 text-blue-400","aria-hidden":"true"}),e.jsx("span",{children:l})]},l))}),t.api?e.jsxs("div",{className:"mb-8","data-testid":`clone-plan-${t.id}-api-rates`,children:[e.jsx("h4",{className:"text-xs font-semibold uppercase tracking-[0.15em] text-white/50 mb-2",children:oe}),e.jsx("dl",{className:"grid gap-1.5",children:A().map(l=>e.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-sm",children:[e.jsx("dt",{className:"text-white/60",children:l.label}),e.jsxs("dd",{className:"text-white/85 tabular-nums",children:[l.apiRate," ",l.unit]})]},l.meter))})]}):null,o==="not_for_sale"?e.jsx("p",{className:"w-full min-h-[44px] flex items-center justify-center text-sm text-white/50","data-testid":`clone-plan-${t.id}-not-for-sale`,children:de}):o==="unknown"?e.jsx("div",{className:"w-full min-h-[44px]","aria-hidden":"true"}):a?e.jsxs(c,{type:"button",className:"w-full min-h-[44px] brand-gradient text-white",disabled:i||r.isPending,onClick:()=>{s(t.id),r.mutate(t.id)},children:[r.isPending?e.jsx(L,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):null,r.isPending?"Opening checkout":`Start ${t.label}`]}):e.jsx(c,{asChild:!0,className:"w-full min-h-[44px] brand-gradient text-white",children:e.jsxs(x,{href:u,onClick:()=>s(t.id),children:["Sign up to start ",t.label,e.jsx(f,{className:"h-4 w-4","aria-hidden":"true"})]})}),r.isError?e.jsx("p",{role:"alert",className:"mt-3 text-sm text-red-300",children:he(r.error,"Checkout could not start. Try again in a moment.")}):null,e.jsx("p",{className:"mt-4 text-xs text-white/40",children:me(t.id)})]})}function fe(n){const a=R(),i=A();
3return e.jsxs("section",{"aria-labelledby":"clone-plans-heading",className:"mt-16 sm:mt-20",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.15em] text-blue-400 mb-3",children:"Your AI clone"}),e.jsx("h2",{id:"clone-plans-heading",className:"text-2xl sm:text-3xl font-semibold text-white tracking-[-0.02em] mb-3",children:"Plans for your clone"}),e.jsx("p",{className:"text-sm sm:text-base text-white/60 max-w-2xl mx-auto",children:"A clone is an AI version of you, built from your own material, that talks to people for you. Credits are spent on replies, voice minutes, contacts captured, and follow ups sent. Reads are never metered."})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5 max-w-3xl mx-auto",children:a.map(s=>e.jsx(ge,{planId:s.id,...n},s.id))}),e.jsx("p",{className:"text-center text-sm text-white/60 mt-6","data-testid":"clone-plan-free-line",children:se}),e.jsxs("div",{className:"mt-8 max-w-3xl mx-auto rounded-[8px] p-6",style:{backgroundColor:"rgb(var(--surface-1))",border:"1px solid rgb(var(--hairline))"},children:[e.jsx("h3",{className:"text-sm font-semibold text-white mb-3",children:"Past your credits"}),e.jsx("dl",{className:"grid gap-2 sm:grid-cols-2",children:i.map(s=>e.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-sm",children:[e.jsx("dt",{className:"text-white/60",children:s.label}),e.jsxs("dd",{className:"text-white/85 tabular-nums",children:[s.overage," ",s.unit]})]},s.meter))}),e.jsx("p",{className:"mt-4 text-xs leading-relaxed text-white/45",children:ae})]}),e.jsx("p",{className:"text-center text-xs text-white/40 mt-6",children:e.jsx(x,{href:ie,className:"underline-offset-4 hover:underline",children:re})})]})}const E=Math.round(q/60),C=Math.round(Z/60),S=!1;function P({included:n,children:a}){return e.jsxs("li",{className:"flex items-start gap-3 text-sm leading-relaxed",children:[n?e.jsx(g,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-blue-400",strokeWidth:2.5,"aria-hidden":"true"}):e.jsx(ue,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-white/25",strokeWidth:2,"aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:n?"Included:":"Not included:"}),e.jsx("span",{className:n?"text-white/85":"text-white/60",children:a})]})}function be({isLoading:n,isAuthenticated:a,tier:i,onFreeCta:s}){return n?e.jsx(c,{variant:"outline",disabled:!0,className:"w-full h-11 border-white/10 bg-transparent text-white/50",children:"Loading..."}):a&&i==="free"?e.jsxs(c,{variant:"outline",disabled:!0,className:"w-full h-11 border-white/10 bg-transparent text-white/60",children:[e.jsx(g,{className:"mr-2 h-4 w-4"})," You're on Free"]}):a?e.jsx(c,{variant:"outline",disabled:!0,className:"w-full h-11 border-white/10 bg-transparent text-white/60",children:"Included with Pro"}):e.jsx(c,{asChild:!0,variant:"outline",className:"w-full h-11 border-white/15 bg-transparent text-white hover:bg-white/5 hover:border-white/25",children:e.jsx(x,{href:"/auth?mode=signup",onClick:()=>{h.ctaClicked("get_started_free","pricing_page"),s==null||s()},children:"Get started"})})}function Ne({isLoading:n,isAuthenticated:a,tier:i,billing:s="monthly",onProCta:t}){if(n)return e.jsx(c,{disabled:!0,className:"w-full h-11 bg-blue-600/40 text-white/70",children:"Loading..."});if(a&&(i==="pro"||i==="elite"))return e.jsx(je,{billing:s,onProCta:t});const r=I(s),o=a?"Upgrade to Pro":"Go Pro";return e.jsx(c,{asChild:!0,className:"aia-cta group w-full h-11 text-white font-medium",children:e.jsxs(x,{href:r,onClick:()=>{h.ctaClicked(a?"upgrade_pro":"go_pro","pricing_page"),t==null||t()},children:[o,e.jsx(f,{className:"ml-2 h-4 w-4 transition-colors"})]})})}function I(n){return`/subscribe?plan=pro${n==="annual"?"&billing=annual":""}`}function je({billing:n,onProCta:a}){const i=G(),s=H();if(i.isLoading)return e.jsx(c,{disabled:!0,className:"w-full h-11 bg-blue-600/40 text-white/70",children:"Loading..."});if(i.isError||!i.data)return e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{type:"button",variant:"outline",onClick:()=>void i.refetch(),className:"w-full h-11 border-white/15 bg-transparent text-white hover:bg-white/5 hover:border-white/25",children:"Try again"}),e.jsx("p",{role:"alert",className:"text-center text-xs text-white/60",children:W})]});const t=Y(i.data);
3if((t.kind==="paid"||t.kind==="payment_failed")&&V(t,s.noBillingAccount))return e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{type:"button",onClick:s.open,disabled:s.isPending,"aria-busy":s.isPending,className:"aia-cta w-full h-11 text-white font-medium",children:[s.isPending?e.jsx(L,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):null,z]}),e.jsx("p",{className:"text-center text-xs text-white/60",children:t.detail??"You're on Pro."}),s.errorMessage?e.jsx("p",{role:"alert",className:"text-center text-xs text-red-300",children:s.errorMessage}):null]});if(t.kind==="grant"||t.kind==="free"||s.noBillingAccount){const o=t.kind==="grant";return e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{asChild:!0,className:"aia-cta group w-full h-11 text-white font-medium",children:e.jsxs(x,{href:I(n),onClick:()=>{h.ctaClicked(o?"subscribe_keep_pro":"upgrade_pro","pricing_page"),a==null||a()},children:[o?J:"Upgrade to Pro",e.jsx(f,{className:"ml-2 h-4 w-4 transition-colors"})]})}),o&&t.detail?e.jsx("p",{className:"text-center text-xs text-white/60",children:t.detail}):null]})}return e.jsxs(c,{disabled:!0,className:"w-full h-11 brand-gradient text-white",children:[e.jsx(g,{className:"mr-2 h-4 w-4"})," You're on Pro"]})}function $e(){const{user:n,isAuthenticated:a,isLoading:i}=B(),s=n==null?void 0:n.subscriptionTier,t=m.useRef(null),[r,o]=m.useState("monthly"),u=N("pricing_page_viewed"),l=N("pricing_billing_toggled"),p=N("pricing_cta_clicked"),j=m.useRef(!1);m.useEffect(()=>{j.current||i||(j.current=!0,u({billing:r,is_authenticated:a,current_tier:s??"free"}))},[i,r,a,s,u]);const{pricing:w}=K(),O=w.pro.monthly,v=w.pro.annual,T=Math.round(v/12);return m.useEffect(()=>{const d=localStorage.getItem("theme");return t.current=d,localStorage.setItem("theme","dark"),document.documentElement.classList.add("dark"),()=>{const b=t.current;b&&b!=="dark"&&(localStorage.setItem("theme",b),document.documentElement.classList.remove("dark"))}},[]),m.useEffect(()=>{Q(X.pricing),h.pricingViewed()},[]),e.jsxs("div",{className:"min-h-screen relative overflow-hidden antialiased flex flex-col",style:{backgroundColor:"rgb(var(--surface-0))",fontFamily:"-apple-system, 'Inter', system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},children:[e.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-[600px]",style:{background:"radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59,130,246,0.13), transparent 70%)"}}),e.jsx(M,{}),e.jsxs("main",{className:"flex-1 relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 chrome-pad-top pb-20",children:[e.jsxs(y,{as:"header",className:"text-center mb-12 sm:mb-16",children:[e.jsx("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-semibold text-white tracking-[-0.02em] mb-4",children:"Simple pricing"}),e.jsxs("p",{className:"text-base sm:text-lg text-white/60 max-w-xl mx-auto",children:["Free forever: unlimited free messages and unlimited characters, plus ",E," minutes of voice calls every 30 days. Pro adds ",C," minutes of calls every 30 days and 50 courses a month."]})]}),e.jsx("div",{className:"flex justify-center mb-8 sm:mb-10",children:e.jsxs("div",{role:"group","aria-label":"Billing cycle",className:"inline-flex items-center gap-1 rounded-[8px] p-1",style:{backgroundColor:"rgb(var(--surface-1))",border:"1px solid rgb(var(--hairline))"},children:[e.jsx("button",{type:"button","aria-pressed":r==="monthly",onClick:()=>{r!=="monthly"&&l({from:r,to:"monthly",is_authenticated:a}),o("monthly")},className:`min-h-[44px] px-5 rounded-[6px] text-sm font-medium transition-colors ${r==="monthly"?"text-white":"text-white/55 hover:text-white/80"}`,style:r==="monthly"?{background:"linear-gradient(135deg, var(--brand-violet) 0%, var(--brand-blue) 100%)"}:void 0,children:"Monthly"}),e.jsxs("button",{type:"button","aria-pressed":r==="annual",onClick:()=>{r!=="annual"&&l({from:r,to:"annual",is_authenticated:a}),o("annual")},className:`min-h-[44px] px-5 rounded-[6px] text-sm font-medium transition-colors inline-flex items-center gap-2 ${r==="annual"?"text-white":"text-white/55 hover:text-white/80"}`,style:r==="annual"?{background:"linear-gradient(135deg, var(--brand-violet) 0%, var(--brand-blue) 100%)"}:void 0,children:["Annual",e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide px-1.5 py-0.5 rounded-[6px]",style:{backgroundColor:r==="annual"?"rgba(255,255,255,0.22)":"rgba(59,130,246,0.15)",color:r==="annual"?"#fff":"#93c5fd"},children:"2 mo free"})]})]})}),e.jsxs("section",{className:"grid grid-cols-1 md:grid-cols-2 gap-5 max-w-3xl mx-auto",children:[e.jsxs("article",{className:"rounded-[8px] p-7 flex flex-col",style:{backgroundColor:"rgb(var(--surface-1))",border:"1px solid rgb(var(--hairline))"},children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.15em] text-white/50 mb-3",children:"Free"}),e.jsxs("div",{className:"flex items-baseline gap-1.5 mb-2",children:[e.jsx("span",{className:"text-5xl font-bold text-white tracking-tight",children:"$0"}),e.jsx("span",{className:"text-sm text-white/60",children:"/forever"})]}),e.jsx("p",{className:"text-sm text-white/50",children:"Everything you need to start chatting and creating."})]}),e.jsx("ul",{className:"space-y-3 mb-8 flex-1",children:k("free",{includePlanned:S}).map(d=>e.jsx(P,{included:d.included,children:d.text},d.feature))}),e.jsx(be,{isLoading:i,isAuthenticated:a,tier:s,onFreeCta:()=>
3p({cta:"get_started_free",billing:r,is_authenticated:a,current_tier:s??"free"})})]}),e.jsxs("article",{className:"relative",children:[e.jsx("div",{className:"absolute -top-3 right-5 z-10",children:e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold uppercase tracking-[0.15em] text-white px-3 py-1 rounded-[6px] shadow-lg",style:{background:"linear-gradient(135deg, var(--brand-violet) 0%, var(--brand-blue) 100%)",boxShadow:"0 4px 16px -4px rgba(59,130,246,0.5)"},children:[e.jsx(F,{className:"h-3 w-3"}),"Recommended"]})}),e.jsx("div",{className:"rounded-[8px] p-[1.5px] h-full",style:{background:"linear-gradient(135deg, var(--brand-violet) 0%, var(--brand-blue) 100%)"},children:e.jsxs("div",{className:"rounded-[8px] p-7 h-full flex flex-col",style:{backgroundColor:"rgb(var(--surface-1))"},children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.15em] text-blue-400 mb-3",children:"Pro"}),e.jsxs("div",{className:"flex items-baseline gap-1.5 mb-2",children:[e.jsxs("span",{className:"text-5xl font-bold text-white tracking-tight",children:["$",r==="annual"?v:O]}),e.jsx("span",{className:"text-sm text-white/60",children:r==="annual"?"/year":"/month"})]}),r==="annual"?e.jsxs("p",{className:"text-sm text-blue-300/80",children:["Just $",T,"/mo, 2 months free."]}):e.jsx("p",{className:"text-sm text-white/50",children:"All the features that matter."}),e.jsx("p",{className:"mt-1 text-xs text-white/45",children:U})]}),e.jsx("ul",{className:"space-y-3 mb-8 flex-1",children:k("pro",{includePlanned:S}).map(d=>e.jsx(P,{included:d.included,children:d.text},d.feature))}),e.jsx(Ne,{isLoading:i,isAuthenticated:a,tier:s,billing:r,onProCta:()=>p({cta:a?"upgrade_pro":"go_pro",billing:r,is_authenticated:a,current_tier:s??"free"})})]})})]})]}),e.jsx(y,{as:"section","aria-labelledby":"voice-pricing-heading",className:"mt-16 sm:mt-20",children:e.jsxs("div",{className:"rounded-[8px] p-7 sm:p-9",style:{backgroundColor:"rgb(var(--surface-1))",border:"1px solid rgb(var(--hairline))"},children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.15em] text-blue-400 mb-3",children:"Voice calls"}),e.jsx("h2",{id:"voice-pricing-heading",className:"text-2xl sm:text-3xl font-semibold text-white tracking-[-0.02em] mb-4",children:"You can call any character and talk out loud"}),e.jsx("p",{className:"text-sm sm:text-base leading-relaxed text-white/60 max-w-2xl",children:"Calling works in your browser on a phone or a laptop, with no app to install. Every character can be called, they answer in their own voice, and the conversation is saved into your chat when you hang up."}),e.jsxs("dl",{className:"mt-7 grid gap-5 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[6px] border border-white/10 p-5",children:[e.jsxs("dt",{className:"text-sm font-semibold text-white mb-1.5",children:["Free: ",E," minutes every 30 days"]}),e.jsx("dd",{className:"text-sm leading-relaxed text-white/55",children:"Enough for a few real conversations, and it refreshes every 30 days rather than running out for good. No card needed."})]}),e.jsxs("div",{className:"rounded-[6px] border border-blue-400/25 p-5",children:[e.jsxs("dt",{className:"text-sm font-semibold text-white mb-1.5",children:["Pro: ",C," minutes every 30 days"]}),e.jsx("dd",{className:"text-sm leading-relaxed text-white/55",children:"The window runs 30 days from your first call, not from the first of the month. Choosing a character's voice is part of Pro too. All three speaking paces are free on any account."})]})]}),e.jsxs(x,{href:"/explore",onClick:()=>{h.ctaClicked("pricing_voice_section","pricing"),p({cta:"voice_section",billing:r,is_authenticated:a,current_tier:s??"free"})},className:"mt-7 inline-flex items-center gap-1.5 text-sm font-medium text-blue-400 transition-colors hover:text-blue-300",children:["Pick someone to call",e.jsx(f,{className:"h-4 w-4","aria-hidden":"true"})]})]})}),e.jsx(fe,{isAuthenticated:a,isLoading:i,onCtaClicked:d=>p({cta:`clone_plan_${d}`,billing:r,is_authenticated:a,current_tier:s??"free"})}),e.jsxs("p",{className:"text-center text-xs text-white/35 mt-10",children:["No credit card for Free. ",D]})]}),e.jsx($,{variant:"compact"})]})}
3export{$e as default}; 4 5//# debugId=4801adb9-bd95-52bd-949b-8a99367c555e
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.