1import{j as e}from"./ui-vendor-DeaCpvuz.js";import{r as m,u as y,h as N}from"./react-vendor-BwON9l4R.js";import{s as r,u as n,B as k}from"./index-Kz-5MvZ9.js";import{C as P,b as S,c as E,a as I}from"./card-B7gy2v7u.js";import{B as b}from"./badge-Dht8Lt2r.js";import{u as C}from"./usePagePreload-CINHSMaq.js";import{H as L}from"./Helmet-BJfcPi6K.js";import{p as A}from"./structuredData-BbxH5Lt6.js";import{C as x}from"./check-CIuB_zKM.js";import"./supabase-vendor-eEOYocAC.js";import"./query-vendor-DsJQQYkK.js";import"./style-cartoon-3d-BPyJ4vVt.js";const q=()=>{const[h,g]=m.useState(null),[f,v]=m.useState(!1),i=y(),[l]=N();C("pricing"),m.useEffect(()=>{const t=l.get("session_id");t&&!f&&w(t)},[l]),m.useEffect(()=>{const t=async()=>{const{data:{user:a}}=await r.auth.getUser();if(!a)return;const{data:s}=await r.from("subscriptions").select("*").eq("user_id",a.id).eq("status","active").maybeSingle();s&&i("/dashboard/analytics",{replace:!0})};l.get("session_id")||t()},[i,l]);const c=["AI video generation","Multi-platform publishing","Autopilot","Voiceovers, music, SFX","No watermarks"],u=[{id:"spark",name:"Spark",price:"$29",videos:20,features:c,priceId:"price_1STvZeELDwLnm13LyHRau9hx",description:"Perfect for getting started",savings:null},{id:"rising",name:"Rising",price:"$39",videos:40,popular:!0,features:c,priceId:"price_1STvZkELDwLnm13LtGZZb9Qo",description:"Most popular for creators",savings:null},{id:"creator",name:"Creator",price:"$69",originalPrice:"$129",videos:80,features:c,priceId:"price_1STvZlELDwLnm13LbdQw49SF",description:"Serious content creators",savings:"Save 42%",earlyBird:!0},{id:"viral",name:"Viral",price:"$99",originalPrice:"$199",videos:180,features:c,priceId:"price_1STvZoELDwLnm13LcUbavVBq",description:"Maximum content output",savings:"Save 59%",earlyBird:!0}],w=async t=>{v(!0);try{const{data:{session:a}}=await r.auth.getSession();if(!a)throw new Error("Not authenticated");const{error:s}=await r.functions.invoke("verify-checkout",{body:{sessionId:t}});if(s)throw s;n.success("Payment verified! Welcome to SnapPilot.ai ð"),window.dispatchEvent(new Event("subscription:refetch"));const{data:{user:o}}=await r.auth.getUser();if(o){const{data:d}=await r.from("user_settings").select("autopilot_enabled").eq("user_id",o.id).single();if(d?.autopilot_enabled){window.dispatchEvent(new CustomEvent("autopilot:toggled",{detail:{enabled:!0,planning:!0}})),n.loading("Creating your autopilot schedule...",{id:"autopilot-planning"});const{error:p}=await r.functions.invoke("autopilot-plan");p?(console.error("Failed to create autopilot plan:",p),n.error("Failed to create schedule, but you can try again in settings",{id:"autopilot-planning"}),window.dispatchEvent(new CustomEvent("autopilot:planning-complete")),i("/dashboard/calendar",{replace:!0})):(n.success("Autopilot schedule created!",{id:"autopilot-planning"}),window.dispatchEvent(new CustomEvent("autopilot:planning-complete")),i("/dashboard/calendar",{replace:!0}))}else i("/dashboard/analytics",{replace:!0})}else i("/dashboard/analytics",{replace:!0})}catch(a){n.error(a.message||"Failed to verify payment"),i("/pricing",{replace:!0})}finally{v(!1)}},j=async t=>{g(t);try{const{data:{user:a}}=await r.auth.getUser();if(!a){i("/auth");return}const s=u.find(p=>p.id===t);if(!s)throw new Error("Invalid plan");const{data:o,error:d}=await r.functions.invoke("create-checkout",{body:{priceId:s.priceId,planId:s.id}});if(d)throw d;if(o?.url)window.location.href=o.url;else throw new Error("No checkout URL received")}catch(a){n.error(a.message||"Failed to start checkout"),g(null)}};return f?e.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-black",children:e.jsxs("div",{className:"text-center space-y-4",children:[e.jsx("div",{className:"h-12 w-12 border-4 border-cta/30 border-t-cta rounded-full animate-spin mx-auto"}),e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Verifying your payment..."}),e.jsx("p",{className:"text-gray-400",children:"Please wait while we confirm your subscription"})]})}):e.jsxs(e.Fragment,{children:[e.jsxs(L,{children:[e.jsx("title",{children:"Pricing - SnapPilot.ai | AI Video Generation Plans"}),e.jsx("meta",{name:"description",content:"Choose the perfect AI video creation plan for your content needs. Generate 20-180 viral videos per month with autopilot scheduling, voiceovers, and multi-platform publishing. Plans start at $29/month."}),e.jsx("meta",{name:"keywords",content:"AI video pricing, content creator plans, TikTok automation pricing, YouTube Shorts pricing, AI video generation cost"}),e.jsx("link",{rel:"canonical",href:"https://snappilot.ai/pricing"}),e.jsx("meta",{property:"og:title",content:"Pricing - SnapPilot.ai | AI Video Generation Plans"}),e.jsx("meta",{property:"og:description",content:"Choose the perfect AI video creation plan. Generate 20-180 viral videos per month with autopilot scheduling."}),e.jsx("meta",{property:"og:url",content:"https://snappilot.ai/pricing"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(A(u.map(t=>({name:t.name,price:t.price,videos:t.videos,description:t.description}))))})]}),e.jsxs("div",{className:"min-h-screen bg-black relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-cta/5 via-trans
1parent to-transparent pointer-events-none"}),e.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-cta/10 rounded-full blur-[120px] pointer-events-none"}),e.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-cta/10 rounded-full blur-[120px] pointer-events-none"}),e.jsx("div",{className:"relative z-10 p-6 sm:p-8 lg:p-12 min-h-screen",children:e.jsxs("div",{className:"w-full max-w-7xl mx-auto space-y-16 pt-12 sm:pt-16 lg:pt-20",children:[e.jsx("header",{className:"text-center space-y-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("h1",{className:"text-5xl sm:text-6xl font-bold text-white leading-tight lg:text-5xl",children:["Let AI Build Your Audience With ",e.jsx("span",{className:"text-cta",children:"Daily Viral Videos"})]}),e.jsx("p",{className:"text-xl text-gray-400 max-w-3xl mx-auto leading-relaxed sm:text-xl",children:"Set it once, and everything runs on autopilot. AI creates & publishes videos to TikTok & YouTube automatically. Instagram coming soon."})]})}),e.jsx("section",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6 lg:gap-8","aria-label":"Pricing plans",children:u.map(t=>e.jsxs(P,{className:`relative bg-black transition-all duration-300 hover:scale-[1.02] ${t.popular?"border-2 border-cta shadow-2xl shadow-cta/20":"border border-white/10 hover:border-cta/50"}`,children:[t.popular&&e.jsx("div",{className:"absolute -top-4 left-1/2 -translate-x-1/2 z-10",children:e.jsxs(b,{className:"relative bg-cta hover:bg-cta text-black font-bold px-3 py-0.5 text-xs shadow-lg overflow-hidden group",children:[e.jsx("span",{className:"relative z-10",children:"MOST POPULAR"}),e.jsx("span",{className:"absolute inset-0 translate-x-[-100%] group-hover:translate-x-[100%] bg-gradient-to-r from-transparent via-white/30 to-transparent transition-transform duration-700 ease-in-out"})]})}),t.savings&&e.jsx("div",{className:"absolute -top-4 right-4 z-10",children:e.jsxs(b,{className:"relative bg-black text-green-400 border-green-500 font-semibold px-3 py-1 text-xs shadow-lg overflow-hidden group",children:[e.jsx("span",{className:"relative z-10",children:t.savings}),e.jsx("span",{className:"absolute inset-0 translate-x-[-100%] group-hover:translate-x-[100%] bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-700 ease-in-out"})]})}),e.jsxs(S,{className:"pb-8 pt-10",children:[e.jsxs("div",{className:"space-y-2 mb-4",children:[e.jsx(E,{className:"text-2xl font-bold text-white",children:t.name}),e.jsx("p",{className:"text-sm text-gray-400",children:t.description})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-baseline gap-3",children:[t.originalPrice&&e.jsx("span",{className:"text-2xl text-gray-500 line-through",children:t.originalPrice}),e.jsx("span",{className:"text-5xl font-bold text-white",children:t.price}),e.jsx("span",{className:"text-gray-400 text-lg",children:"/mo"})]}),e.jsxs("p",{className:"text-sm text-gray-400",children:[e.jsxs("span",{className:"font-semibold text-cta",children:[t.videos," videos"]})," per month"]})]})]}),e.jsxs(I,{className:"space-y-4",children:[e.jsx("ul",{className:"space-y-3 mb-6",children:t.features.map((a,s)=>e.jsxs("li",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-cta/20 flex items-center justify-center flex-shrink-0",children:e.jsx(x,{className:"w-3 h-3 text-cta"})}),e.jsx("span",{className:"text-sm text-gray-300",children:a})]},s))}),e.jsx(k,{className:`w-full h-12 font-semibold text-base transition-all duration-300 ${t.popular?"bg-cta hover:bg-cta/90 text-black shadow-lg shadow-cta/30":"bg-white hover:bg-cta text-black"}`,size:"lg",onClick:()=>j(t.id),disabled:h===t.id,children:h===t.id?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-4 w-4 border-2 border-current/30 border-t-current rounded-full animate-spin"}),"Processing..."]}):"Get Started Now"})]})]},t.id))}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 pt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 bg-cta rounded-full animate-pulse"}),e.jsx("span",{className:"text-sm text-gray-400",children:"Powered by Next-Gen AI"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{className:"w-4 h-4 text-cta"}),e.jsx("span",{className:"text-sm text-gray-400",children:"No watermarks"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{className:"w-4 h-4 text-cta"}),e.jsx("span",{className:"text-sm text-gray-400",children:"Try risk-free - cancel anytime"})]})]})]})})]})]})};export{q as default};
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.