1import{r as m,j as e,L as i,s as u,t as d}from"./index-hs4a0mYW.js";import{S as h}from"./SiteHeader-BqOOKgqK.js";import{S as x}from"./SiteFooter-CpQk1rby.js";import{C as p}from"./check-rFTGGwOD.js";import"./useServerFn-DgMZqDJQ.js";import"./newsletter.functions-BPJ19l6O.js";function w(){const[o,n]=m.useState(!1),l=async()=>{n(!0);try{const{data:t}=await u.auth.getSession(),a=t.session?.access_token;if(!a){d.error("Please sign in first so the membership lands on your account."),window.location.href="/auth?redirect=/talkable-books/pricing";return}const r=await fetch("/api/public/stripe-checkout",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({kind:"membership"})});if(!r.ok)throw new Error(await r.text());const s=await r.json();if(!s.url)throw new Error("Checkout could not start.");window.location.href=s.url}catch(t){d.error(t instanceof Error?t.message:"Checkout could not start.")}finally{n(!1)}};return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background text-foreground",children:[e.jsx(h,{}),e.jsxs("main",{className:"flex-1 mx-auto w-full max-w-4xl px-6 py-16",children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:"Access"}),e.jsx("h1",{className:"mt-4 font-serif text-4xl leading-tight",children:"Three ways in to the reading room."}),e.jsx("p",{className:"mt-6 max-w-2xl text-lg text-muted-foreground leading-relaxed",children:"Nothing here is a subscription trap. The free questions are real, the single unlock is permanent, and the membership can be cancelled whenever you like."}),e.jsxs("div",{className:"mt-12 grid gap-6 md:grid-cols-3",children:[e.jsx(c,{name:"Read a little",price:"Free",note:"Five questions per book",points:["No account needed","Every book in the room","Answers cite their chapter"],action:e.jsx(i,{to:"/talkable-books",className:"inline-flex w-full justify-center rounded-md border border-border px-4 py-2.5 text-sm hover:bg-muted",children:"Browse the room"})}),e.jsx(c,{name:"One book, forever",price:"$9",note:"Per book, one time",points:["Unlimited questions on that book","Your conversations are saved","Yours permanently, no renewal"],action:e.jsx(i,{to:"/talkable-books",className:"inline-flex w-full justify-center rounded-md border border-border px-4 py-2.5 text-sm hover:bg-muted",children:"Pick a book to unlock"})}),e.jsx(c,{highlight:!0,name:"Library Membership",price:"$49",note:"Per year, every book",points:["Every book, current and forthcoming","Unlimited questions everywhere","Living Footnotes included","Cancel any time"],action:e.jsx("button",{type:"button",onClick:l,disabled:o,className:"inline-flex w-full justify-center rounded-md bg-primary px-4 py-2.5 text-sm font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:o?"Opening checkout...":"Take the membership"})})]}),e.jsxs("p",{className:"mt-10 text-sm text-muted-foreground",children:["Prefer to simply read? Every title is also for sale as an ebook in the"," ",e.jsx(i,{to:"/shop",className:"underline",children:"shop"}),". Questions about access go to"," ",e.jsx(i,{to:"/support",className:"underline",children:"support"}),"."]})]}),e.jsx(x,{})]})}function c({name:o,price:n,note:l,points:t,action:a,highlight:r}){return e.jsxs("div",{className:`flex flex-col rounded-lg border bg-card p-6 ${r?"border-primary":"border-border"}`,children:[e.jsx("h2",{className:"font-serif text-xl",children:o}),e.jsx("p",{className:"mt-3 text-3xl font-serif",children:n}),e.jsx("p",{className:"mt-1 text-xs uppercase tracking-widest text-muted-foreground",children:l}),e.jsx("ul",{className:"mt-5 space-y-2 text-sm text-muted-foreground flex-1",children:t.map(s=>e.jsxs("li",{className:"flex gap-2",children:[e.jsx(p,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary","aria-hidden":!0}),e.jsx("span",{children:s})]},s))}),e.jsx("div",{className:"mt-6",children:a})]})}export{w as component};
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.