1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487596,e=>{"use strict";var t=e.i(645410),a=e.i(503912),s=e.i(953724),r=e.i(345088),l=e.i(247313);let n="https://assets.gqv.ai/home/ugc-case/case1-product.webp",i=[{id:"case2",video:{webm:"https://assets.gqv.ai/home/ugc-case/case7-video.webm",mp4:"https://assets.gqv.ai/home/ugc-case/case7-video.mp4"},poster:"https://assets.gqv.ai/home/ugc-case/case7-video.webp"},{id:"case1",video:{webm:"https://assets.gqv.ai/home/ugc-case/case1-video.webm",mp4:"https://assets.gqv.ai/home/ugc-case/case1-video.mp4"},poster:"https://assets.gqv.ai/home/ugc-case/case1-video.webp"},{id:"case3",video:{webm:"https://assets.gqv.ai/home/ugc-case/case8-video.webm",mp4:"https://assets.gqv.ai/home/ugc-case/case8-video.mp4"},poster:"https://assets.gqv.ai/home/ugc-case/case8-video.webp"},{id:"case4",video:{webm:"https://assets.gqv.ai/home/ugc-case/case9-video.webm",mp4:"https://assets.gqv.ai/home/ugc-case/case9-video.mp4"},poster:"https://assets.gqv.ai/home/ugc-case/case9-video.webp"},{id:"case5",video:{webm:"https://assets.gqv.ai/home/ugc-hero/hero13.webm",mp4:"https://assets.gqv.ai/home/ugc-hero/hero13.mp4"},poster:"https://assets.gqv.ai/home/ugc-hero/hero13.webp",stat:{value:"1.8% CTR",label:"TikTok"}},{id:"case6",video:{webm:"https://assets.gqv.ai/home/ugc-case/case10-video.webm",mp4:"https://assets.gqv.ai/home/ugc-case/case10-video.mp4"},poster:"https://assets.gqv.ai/home/ugc-case/case10-video.webp"}];function o(){let e=(0,r.useTranslations)("pricing.cases"),[o,c]=(0,l.useState)(null),d=e=>t=>{t&&c(e)};return(0,t.jsx)("section",{className:"bg-muted/30 py-12 sm:py-16 lg:py-24",children:(0,t.jsxs)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"mb-10 text-center",children:[(0,t.jsx)("h2",{className:"font-bold text-3xl tracking-tight text-foreground sm:text-4xl",children:e("title")}),(0,t.jsx)("p",{className:"mx-auto mt-3 max-w-2xl text-foreground/60",children:e("subtitle")})]}),(0,t.jsxs)("div",{className:"space-y-3 sm:hidden",children:[(0,t.jsx)("div",{className:"relative aspect-video w-full overflow-hidden rounded-xl border border-border bg-muted",children:(0,t.jsx)(s.default,{src:n,alt:"Product",fill:!0,className:"object-contain",sizes:"100vw"})}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:i.map(e=>(0,t.jsxs)("div",{className:"relative aspect-[9/16] overflow-hidden rounded-lg bg-black",children:[(0,t.jsx)(a.VideoWithControls,{src:e.video,poster:e.poster,autoPlay:!1,muted:!1,showMuteControl:!0,hideOverlayOnPlay:!0,lazy:!0,lazyRootMargin:"300px",controlSize:"sm",overlayOpacity:"light",className:"h-full w-full object-cover",active:null===o||o===e.id,onPlayStateChange:d(e.id)}),e.stat&&(0,t.jsxs)("div",{className:"absolute top-2 left-2 z-10 flex items-center gap-1 rounded-md bg-black/70 px-2 py-1 backdrop-blur-sm",children:[(0,t.jsx)("span",{className:"font-bold text-emerald-400 text-xs",children:e.stat.value}),(0,t.jsx)("span",{className:"text-[10px] text-white/60",children:e.stat.label})]})]},e.id))})]}),(0,t.jsxs)("div",{className:"hidden h-[320px] overflow-hidden rounded-xl border border-border bg-card sm:flex lg:h-[380px]",children:[(0,t.jsx)("div",{className:"relative w-[140px] shrink-0 overflow-hidden bg-muted lg:w-[180px]",children:(0,t.jsx)(s.default,{src:n,alt:"Product",fill:!0,className:"object-cover",sizes:"(max-width: 1024px) 140px, 180px"})}),(0,t.jsxs)("div",{className:"relative flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex h-full gap-2 overflow-x-auto p-2 touch-pan-x",children:i.map(e=>(0,t.jsxs)("div",{className:"relative h-full w-[140px] shrink-0 overflow-hidden rounded-lg bg-black lg:w-[160px]",children:[(0,t.jsx)(a.VideoWithControls,{src:e.video,poster:e.poster,autoPlay:!1,playOnMouseEnter:!0,pauseOnMouseLeave:!0,hideOverlayOnPlay:!0,lazy:!0,lazyRootMargin:"300px",controlSize:"sm",overlayOpacity:"light",muted:!1,showMuteControl:!0,className:"h-full w-full object-cover",active:null===o||o===e.id,onPlayStateChange:d(e.id)}),e.stat&&(0,t.jsxs)("div",{className:"absolute top-2 left-2 z-10 flex items-center gap-1 rounded-md bg-black/70 px-2 py-1 backdrop-blur-sm",children:[(0,t.jsx)("span",{className:"font-bold text-emerald-400 text-xs",children:e.stat.value}),(0,t.jsx)("span",{className:"text-[10px] text-white/60",children:e.stat.label})]})]},e.id))}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 z-10 w-10 bg-gradient-to-l from-card to-transparent"})]})]})]})})}e.s(["CasesSection",()=>o])},718420,e=>{"use strict";var t=e.i(645410),a=e.i(190683),s=e.i(950617),r=e.i(608809),l=e.i(572188),n=e.i(532040),i=e.i(337725),o=e.i(399865),c=e.i(830616),d=e.i(774931),m=e.i(198869),x=e.i(648996),u=e.i(151306),p=e.i(191734),h=e.i(9598
161),b=e.i(492507),g=e.i(735408),f=e.i(592781),v=e.i(599965),y=e.i(583979),j=e.i(345088),N=e.i(247313),w=e.i(360112);let C=s.DURATION_PRICING.standard.baseCredits;function k(e,t){let a=Math.floor(e.monthlyQuota/C);return 0===a?{count:0,pricePerAd:"0.00"}:{count:"year"===t?12*a:a,pricePerAd:(Math.floor(("year"===t&&"monthlyEquivalent"in e.prices.yearly&&e.prices.yearly.monthlyEquivalent?e.prices.yearly.monthlyEquivalent:e.prices.monthly.amount)/a*100)/100).toFixed(2)}}let T=new Date("2026-03-21T23:59:59");function S(e){let t=e.getTime()-Date.now();return t<=0?{days:0,hours:0,minutes:0,seconds:0}:{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3)}}function A(){let e=(0,j.useTranslations)("pricing.cards"),[a,s]=(0,N.useState)(null),r=Date.now()>T.getTime();if((0,N.useEffect)(()=>{if(r)return;s(S(T));let e=setInterval(()=>s(S(T)),1e3);return()=>clearInterval(e)},[r]),r)return null;let l=[{value:a?.days??0,label:e("countdown.days")},{value:a?.hours??0,label:e("countdown.hours")},{value:a?.minutes??0,label:e("countdown.minutes")},{value:a?.seconds??0,label:e("countdown.seconds")}];return(0,t.jsxs)("div",{className:"mx-auto mb-8 w-full max-w-2xl rounded-2xl border border-amber-500/25 bg-amber-500/5 px-4 py-5 text-center sm:px-6",children:[(0,t.jsx)("p",{className:"mb-1 font-bold text-foreground text-lg sm:text-xl",children:e("countdown.title")}),(0,t.jsx)("p",{className:"mb-4 text-foreground/50 text-xs sm:text-sm",children:e("countdown.subtitle")}),(0,t.jsx)("div",{className:"flex items-center justify-center gap-1 sm:gap-2",children:l.map(({value:e,label:a},s)=>(0,t.jsxs)(N.Fragment,{children:[s>0&&(0,t.jsx)("span",{className:"mb-4 font-bold text-amber-500 text-xl",children:":"}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,t.jsx)("div",{className:"min-w-[2.75rem] rounded-xl bg-foreground
1/8 px-2 py-2.5 ring-1 ring-amber-500/20 sm:min-w-[3.25rem] sm:px-3",children:(0,t.jsx)("span",{className:"block font-bold text-2xl text-foreground tabular-nums sm:text-3xl",children:String(e).padStart(2,"0")})}),(0,t.jsx)("span",{className:"text-[10px] text-foreground/40 uppercase tracking-wider",children:a})]})]},a))})]})}function P({color:e="default"}){return(0,t.jsx)("span",{className:(0,u.cn)("inline-flex shrink-0 items-center rounded-full px-2 py-0.5 font-bold text-[10px] uppercase tracking-wide","amber"===e?"bg-amber-500/10 text-amber-600 dark:text-amber-400":"violet"===e?"bg-violet-500/10 text-violet-600 dark:text-violet-400":"bg-primary/10 text-primary"),children:"UNLIMITED"})}function I({label:e,color:a="default"}){return(0,t.jsxs)("li",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.CheckIcon,{className:(0,u.cn)("size-3.5 shrink-0","amber"===a?"text-amber-500":"violet"===a?"text-violet-500":"text-primary")}),(0,t.jsx)("span",{className:"text-foreground/80 text-sm",children:e})]})}function q({label:e,type:a,color:s="default"}){return(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 py-0.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.CheckIcon,{className:(0,u.cn)("size-3 shrink-0","unlimited"===a?"amber"===s?"text-amber-500":"violet"===s?"text-violet-500":"text-primary":"amber"===s?"text-amber-500/60":"violet"===s?"text-violet-500/60":"text-primary/60")}),(0,t.jsx)("span",{className:"text-foreground/70 text-xs",children:e})]}),"unlimited"===a?(0,t.jsx)(P,{color:s}):null]})}let M=[{name:"Sora 2",starter:"available",pro:"available",agency:"available"},{name:"Sora 2 Pro",starter:"available",pro:"available",agency:"available"},{name:"Veo 3.1",starter:"available",pro:"available",agency:"available"},{name:"Veo 3.1 Fast",starter:"available",pro:"available",agency:"available"},{name:"Nano Banana 2",starter:"available",pro:"unlimited",agency:"unlimited"},{name:"Nano Banana 2 Pro",starter:"available",pro:"available",agency:"unlimited"},{name:"Seedream 5.0",starter:"available",pro:"available",agency:"unlimited"},{name:"ElevenLabs Voice",starter:"available",pro:"available",agency:"available"}];function L({open:e,onOpenChange:a,upgradeType:s,planName:r,currentPlanName:l,currentInterval:n,yearlyPrice:o,remainingValue:c,estimatedCharge:m,balance:x,monthlyCredits:u,annualSavings:h,yearlyMonthlyEquiv:b,planMonthlyPrice:f,upgrading:v,onConfirm:y}){let N=(0,j.useTranslations)("pricing.cards");return(0,t.jsx)(d.AlertDialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(d.AlertDialogContent,{className:"w-[calc(100%-2rem)] max-w-sm gap-0 p-0 overflow-hidden",children:[(0,t.jsxs)(d.AlertDialogHeader,{className:"px-4 pt-5 pb-4 sm:px-5 border-b border-border/50 shrink-0",children:[(0,t.jsx)(d.AlertDialogTitle,{className:"text-base font-semibold leading-snug",children:N("switch"===s?"cta.switchToAnnualConfirmTitle":"cta.upgradeToAnnualConfirmTitle")}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[(0,t.jsxs)("span",{className:"text-xs text-foreground/45",children:[l," · ",N("month"===n?"interval.monthly":"interval.annually")]}),(0,t.jsx)(p.ArrowRight,{className:"size-3 shrink-0 text-foreground/30"}),(0,t.jsxs)("span",{className:"text-xs font-medium text-foreground/70",children:[r," · ",N("interval.annually")]})]})]}),(0,t.jsx)("div",{className:"overflow-y-auto overscroll-contain max-h-[calc(85dvh-9rem)]",children:(0,t.jsxs)("div",{className:"px-4 py-4 sm:px-5 space-y-3",children:[h>0&&(0,t.jsxs)("div",{className:"rounded-xl border border-emerald-500/25 bg-emerald-500/8 px-3 py-3 sm:px-4 text-center",children:[(0,t.jsx)("p",{className:"font-bold text-emerald-600 dark:text-emerald-400 text-lg sm:text-xl leading-tight",children:N("cta.savingsHeadline",{amount:h})}),(0,t.jsx)("p",{className:"mt-0.5 text-emerald-700/65 dark:text-emerald-400/65 text-xs",children:N("cta.savingsSubtitle",{annualEquiv:b,monthly:f})})]}),(0,t.jsx)("div",{className:"rounded-lg border border-border/60 bg-muted/30 overflow-hidden",children:(0,t.jsxs)("div",{className:"px-3 py-2.5 space-y-1.5 text-sm",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center gap-3 min-w-0",children:[(0,t.jsx)("span",{className:"text-foreground
1/55 truncate",children:N("cta.annualPlanCost",{plan:r})}),(0,t.jsxs)("span",{className:"tabular-nums shrink-0",children:["$",o.toFixed(2)]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center gap-3 min-w-0",children:[(0,t.jsx)("span",{className:"text-foreground/55 truncate",children:N("cta.remainingCredit")}),(0,t.jsxs)("span",{className:"tabular-nums shrink-0 text-emerald-600 dark:text-emerald-400",children:["â$",c.toFixed(2)]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center gap-3 min-w-0 pt-1.5 border-t border-border/40 font-semibold",children:[(0,t.jsx)("span",{className:"truncate",children:N("cta.todaysCharge")}),(0,t.jsxs)("span",{className:"tabular-nums shrink-0",children:["~$",m]})]})]})}),(0,t.jsxs)("div",{className:"rounded-lg border border-border/60 bg-muted/30 overflow-hidden",children:[(0,t.jsx)("div",{className:"px-3 py-2 border-b border-border/40 bg-muted/50",children:(0,t.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-foreground/40",children:N("cta.creditsBreakdown")})}),(0,t.jsxs)("div",{className:"px-3 py-2.5 space-y-1.5 text-sm",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center gap-3 min-w-0",children:[(0,t.jsx)("span",{className:"text-foreground/55 truncate",children:N("cta.currentBalance")}),(0,t.jsx)("span",{className:"tabular-nums shrink-0",children:(0,i.formatCredits)(x)})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center gap-3 min-w-0",children:[(0,t.jsx)("span",{className:"text-foreground/55 truncate",children:N("cta.firstMonth",{plan:r})}),(0,t.jsxs)("span",{className:"tabular-nums shrink-0 text-primary font-medium",children:["+",(0,i.formatCredits)(u)]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center gap-3 min-w-0 pt-1.5 border-t border-border/40 font-semibold",children:[(0,t.jsx)("span",{className:"truncate",children:N("cta.afterUpgrade")}),(0,t.jsx)("span",{className:"tabular-nums shrink-0",children:(0,i.formatCredits)(x+u)})]})]})]}),(0,t.jsx)("p",{className:"text-[11px] text-foreground/35 text-center leading-relaxed pb-1",children:N("cta.upgradeConfirmDesc")})]})}),(0,t.jsxs)("div",{className:"flex flex-row gap-2 px-4 pb-5 pt-3 sm:px-5 border-t border-border/40 bg-muted/10 shrink-0",children:[(0,t.jsx)(d.AlertDialogCancel,{className:"flex-1 h-10 sm:h-9",children:N("cta.upgradeCancel")}),(0,t.jsx)(d.AlertDialogAction,{className:"flex-1 h-10 sm:h-9",onClick:y,disabled:v,children:v?(0,t.jsx)(g.Loader2,{className:"size-4 animate-spin"}):N("cta.upgradeConfirmBtn")})]})]})})}function $(){let e=(0,j.useTranslations)("pricing.cards");return(0,t.jsxs)("div",{className:"mt-3 flex items-center justify-center gap-1.5 rounded-lg border border-border/50 bg-muted/40 px-3 py-2",children:[(0,t.jsx)(f.ShieldCheckIcon,{className:"size-3.5 shrink-0 text-foreground/50"}),(0,t.jsx)("span",{className:"font-medium text-foreground/60 text-xs",children:e("guaranteeTitle")})]})}function E({color:e="default"}){let a=(0,j.useTranslations)("pricing.cards"),s=[a("benefits.ugcAvatarAds"),a("benefits.ugcInHandAds"),a("benefits.viralAds"),a("benefits.productShorts"),a("benefits.imageAds"),a("benefits.videoAds"),a("benefits.outfitAds"),a("benefits.languages")];return(0,t.jsxs)("li",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.CheckIcon,{className:(0,u.cn)("size-3.5 shrink-0","amber"===e?"text-amber-500":"violet"===e?"text-violet-500":"text-primary")}),(0,t.jsx)(x.TooltipProvider,{children:(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("span",{className:"flex cursor-default items-center gap-1 text-foreground/80 text-sm",children:[a("adCreativeTools"),(0,t.jsx)(b.InfoIcon,{className:"size-3 text-foreground/35"})]})}),(0,t.jsx)(x.TooltipContent,{className:"max-w-[220px]",children:(0,t.jsx)("ul",{className:"space-y-1 py-1",children:s.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-1.5 text-xs",children:[(0,t.jsx)(h.CheckIcon,{className:"size-3 shrink-0 text-primary/70"}),e]},e))})})]})})]})}function z(e,t){let{data:a}=(0,n.useSubscription)(),s=(0,c.useQueryClient)(),l=(0,j.useTranslations)("subscriptions"),[i,d]=(0,N.useState)(!1),[m,x]=(0,N.useState)(!1),u=r.SUBSCRIPTION_PLANS.find(t=>
1t.id===e),p=a?.subscription,h=a?.creditBalance??0,b=p?.status==="active",g=p?.planId??"free",f=p?.billingInterval??"month",v=p?.currentPeriodEnd?new Date(p.currentPeriodEnd):null,y=p?.currentPeriodStart?new Date(p.currentPeriodStart):null,C=r.SUBSCRIPTION_PLANS.find(e=>e.id===g),k=y&&v?(v.getTime()-y.getTime())/864e5:30,T=v?Math.max(0,(v.getTime()-Date.now())/864e5):0,S=(C?.prices.monthly.amount??0)*(T/k),A="year"===t&&u?u.prices.yearly.amount:0,P=Math.max(0,A-S).toFixed(2),I=u?Math.round(12*u.prices.monthly.amount-A):0,q=u&&"monthlyEquivalent"in u.prices.yearly?u.prices.yearly.monthlyEquivalent??Math.round(A/12):Math.round(A/12),M=b&&p?.planId===e&&p?.billingInterval===t,L=b&&!M&&"year"===t&&(0,r.canUpgradePlan)(g,f,e,"year");async function $(e){x(!0);try{await o.orpcClient.payments.upgradeSubscription({productId:e}),await s.invalidateQueries({queryKey:["subscription"]}),w.toast.success(l("upgrade.success")),setTimeout(()=>{s.invalidateQueries({queryKey:["subscription"]})},6e3)}catch{w.toast.error(l("upgrade.error"))}finally{x(!1),d(!1)}}return{isCurrentPlan:M,isUpgradeToYearly:L,isOtherSubscribed:b&&!M&&!L,upgradeType:e===g?"switch":"upgrade",yearlyPrice:A,remainingValue:Math.round(100*S)/100,estimatedCharge:P,balance:h,monthlyCredits:u?.monthlyQuota??0,planName:u?.name??"",currentPlanName:r.SUBSCRIPTION_PLANS.find(e=>e.id===g)?.name??g,currentInterval:f,annualSavings:I,yearlyMonthlyEquiv:q,planMonthlyPrice:u?.prices.monthly.amount??0,showConfirm:i,setShowConfirm:d,upgrading:m,handleUpgrade:$}}function O({interval:e}){let s=(0,j.useTranslations)("pricing.cards"),n=(0,j.useTranslations)("subscriptions"),{user:c}=(0,l.useSession)(),d=(0,v.useRouter)(),x=(0,y.useLocale)(),[u,p]=(0,N.useState)(!1),{isCurrentPlan:h,isUpgradeToYearly:b,isOtherSubscribed:f,upgradeType:C,yearlyPrice:T,remainingValue:S,estimatedCharge:A,balance:P,monthlyCredits:O,planName:B,currentPlanName:R,currentInterval:U,annualSavings:D,yearlyMonthlyEquiv:Q,planMonthlyPrice:V,showConfirm:F,setShowConfirm:_,upgrading:Y,handleUpgrade:K}=z("starter",e),H=r.SUBSCRIPTION_PLANS.find(e=>"starter"===e.id);if(!H)return null;let W="month"===e?H.prices.monthly:H.prices.yearly,G="year"===e&&"monthlyEquivalent"in W&&W.monthlyEquivalent?W.monthlyEquivalent:W.amount,J=async()=>{if(!c){let e=x===a.config.i18n.defaultLocale?"":`/${x}`;d.push(`/auth/login?redirectTo=${e}/pricing`);return}if(h)return void d.push("/app/settings/billing");if(b)return void _(!0);p(!0);try{let e=x===a.config.i18n.defaultLocale?"":`/${x}`,{checkoutLink:t}=await o.orpcClient.payments.createCheckoutLink({type:"subscription",productId:W.priceId,redirectUrl:`${window.location.origin}${e}/payment-success`});window.location.href=t}catch{w.toast.error(n("errors.subscriptionFailed"))}finally{p(!1)}},X=h?s("cta.manageSubscription"):b?s("switch"===C?"cta.switchToAnnual":"cta.upgradeToAnnual"):s("starter.ctaStart",{price:G});return(0,t.jsxs)("div",{className:"flex flex-col rounded-2xl border border-border/60 bg-card p-6",children:[(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("h3",{className:"font-bold text-xl text-foreground",children:s("starter.name")}),(0,t.jsx)("p",{className:"mt-1 text-foreground/55 text-sm",children:s("starter.description")}),(0,t.jsxs)("div",{className:"mt-4 flex items-baseline gap-1",children:[(0,t.jsxs)("span",{className:"font-bold text-4xl",children:["$",G]}),(0,t.jsx)("span",{className:"text-foreground/50 text-sm",children:s("monthlyLabel")})]}),"year"===e&&(0,t.jsxs)("p",{className:"mt-1 text-foreground/45 text-xs",children:[s("billedAnnually",{amount:W.amount})," · Save $",H.prices.yearly.savings??0]}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)("p",{className:"font-semibold text-foreground/70 text-sm",children:s("year"===e?"videoAdsYearly":"videoAdsMonthly",{count:k(H,e).count})}),(0,t.jsx)("p",{className:"font-medium text-primary/85 text-sm",children:s("perAdCost",{price:k(H,e).pricePerAd})})]})]}),(0,t.jsx)(m.Button,{className:"w-full font-semibold",variant:h||b?"outline":"secondary",disabled:u||f||Y,loading:u,onClick:J,children:Y?(0,t.jsx)(g.Loader2,{className:"size-4 animate-spin"}):X}),(0,t.jsx)(L,{open:F,onOpenChange:_,upgradeType:C,planName:B,currentPlanName:R,currentInterval:U,yearlyPrice:T,remainingValue:S,estimatedCharge:A,balance:P,monthlyCredits:O,annualSavings:D,yearlyMonthlyEquiv:Q,planMonthlyPrice:V,upgrading:Y,onConfirm:()=>K(W.priceId)}),(0,t.jsx)($,{}),(0,t.jsx)("p",{className:"mt-5 mb-2 font-semibold text-[11px] text-foreground
1/40 uppercase tracking-wider",children:s("models.capacityTitle")}),(0,t.jsxs)("ul",{className:"space-y-2",children:[(0,t.jsx)(I,{label:s("year"===e?"creditsYearly":"creditsMonthly",{credits:(0,i.formatCredits)("year"===e?12*H.monthlyQuota:H.monthlyQuota)})}),(0,t.jsx)(I,{label:s("benefits.aiActors")}),(0,t.jsx)(E,{}),(0,t.jsx)(I,{label:s("benefits.commercialLicense")})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-xl border border-border/40 bg-muted/40 p-4",children:[(0,t.jsx)("p",{className:"mb-3 font-semibold text-[11px] text-foreground/40 uppercase tracking-wider",children:s("models.title")}),(0,t.jsx)("ul",{className:"space-y-1",children:M.map(e=>(0,t.jsx)(q,{label:e.name,type:e.starter},e.name))})]}),(0,t.jsx)("p",{className:"mt-4 text-center text-foreground/35 text-xs",children:s("starter.ctaSubtext")})]})}function B({interval:e}){let s=(0,j.useTranslations)("pricing.cards"),n=(0,j.useTranslations)("subscriptions"),{user:c}=(0,l.useSession)(),d=(0,v.useRouter)(),x=(0,y.useLocale)(),[p,h]=(0,N.useState)(!1),{isCurrentPlan:b,isUpgradeToYearly:f,isOtherSubscribed:C,upgradeType:T,yearlyPrice:S,remainingValue:A,estimatedCharge:P,balance:O,monthlyCredits:B,planName:R,currentPlanName:U,currentInterval:D,annualSavings:Q,yearlyMonthlyEquiv:V,planMonthlyPrice:F,showConfirm:_,setShowConfirm:Y,upgrading:K,handleUpgrade:H}=z("pro",e),W=r.SUBSCRIPTION_PLANS.find(e=>"pro"===e.id);if(!W)return null;let G="month"===e?W.prices.monthly:W.prices.yearly,J="year"===e&&"monthlyEquivalent"in G&&G.monthlyEquivalent?G.monthlyEquivalent:G.amount,X=async()=>{if(!c){let e=x===a.config.i18n.defaultLocale?"":`/${x}`;d.push(`/auth/login?redirectTo=${e}/pricing`);return}if(b)return void d.push("/app/settings/billing");if(f)return void Y(!0);h(!0);try{let e=x===a.config.i18n.defaultLocale?"":`/${x}`,{checkoutLink:t}=await o.orpcClient.payments.createCheckoutLink({type:"subscription",productId:G.priceId,redirectUrl:`${window.location.origin}${e}/payment-success`});window.location.href=t}catch{w.toast.error(n("errors.subscriptionFailed"))}finally{h(!1)}},Z=b?s("cta.manageSubscription"):f?s("switch"===T?"cta.switchToAnnual":"cta.upgradeToAnnual"):s("pro.ctaStart",{price:J});return(0,t.jsxs)("div",{className:(0,u.cn)("relative flex flex-col rounded-2xl border-2 p-6","border-amber-400/60 bg-gradient-to-b from-amber-500/[0.08] to-card","shadow-xl shadow-amber-500/15 lg:scale-[1.03]"),children:["month"===e&&(0,t.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:(0,t.jsx)("span",{className:"rounded-full bg-amber-500 px-3 py-1 font-bold text-[11px] text-white uppercase tracking-wide shadow-sm",children:s("bestValueBadge")})}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("h3",{className:"font-bold text-xl text-foreground",children:s("pro.name")}),(0,t.jsx)("p",{className:"mt-1 text-foreground/55 text-sm",children:s("pro.description")}),(0,t.jsxs)("div",{className:"mt-4 flex items-baseline gap-1",children:[(0,t.jsxs)("span",{className:"font-bold text-4xl text-amber-500",children:["$",J]}),(0,t.jsx)("span",{className:"text-foreground/50 text-sm",children:s("monthlyLabel")})]}),"year"===e&&(0,t.jsxs)("p",{className:"mt-1 text-foreground/45 text-xs",children:[s("billedAnnually",{amount:G.amount})," · Save $",W.prices.yearly.savings??0]}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)("p",{className:"font-semibold text-foreground/70 text-sm",children:s("year"===e?"videoAdsYearly":"videoAdsMonthly",{count:k(W,e).count})}),(0,t.jsx)("p",{className:"font-medium text-amber-500 text-sm",children:s("perAdCost",{price:k(W,e).pricePerAd})})]})]}),(0,t.jsx)(m.Button,{className:(0,u.cn)("w-full font-semibold",!b&&!C&&!f&&"bg-amber-500 text-white shadow-lg shadow-amber-500/25 hover:bg-amber-600 hover:scale-[1.01] active:scale-[0.99]"),variant:b||f?"outline":void 0,disabled:p||C||K,loading:p,onClick:X,children:K?(0,t.jsx)(g.Loader2,{className:"size-4 animate-spin"}):Z}),(0,t.jsx)(L,{open:_,onOpenChange:Y,upgradeType:T,planName:R,currentPlanName:U,currentInterval:D,yearlyPrice:S,remainingValue:A,estimatedCharge:P,balance:O,monthlyCredits:B,annualSavings:Q,yearlyMonthlyEquiv:V,planMonthlyPrice:F,upgrading:K,onConfirm:()=>H(G.priceId)}),(0,t.jsx)($,{}),(0,t.jsx)("p",{className:"mt-5 mb-2 font-semibold text-[11px] text-amber-600/60 uppercase tracking-wider dark:text-amber-400/60",children:s("models.capacityTitle")}),(0,t.jsxs)("ul",{className:"space-y-2",children:[(0,t.jsx)(I,{label:s("year"===e?"creditsYearly":"
1creditsMonthly",{credits:(0,i.formatCredits)("year"===e?12*W.monthlyQuota:W.monthlyQuota)}),color:"amber"}),(0,t.jsx)(I,{label:s("benefits.aiActors"),color:"amber"}),(0,t.jsx)(E,{color:"amber"}),(0,t.jsx)(I,{label:s("benefits.commercialLicense"),color:"amber"})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-xl border border-amber-500/20 bg-amber-500/5 p-4",children:[(0,t.jsx)("p",{className:"mb-3 font-semibold text-[11px] text-amber-600/60 uppercase tracking-wider dark:text-amber-400/60",children:s("models.title")}),(0,t.jsx)("ul",{className:"space-y-1",children:M.map(e=>(0,t.jsx)(q,{label:e.name,type:e.pro,color:"amber"},e.name))})]}),(0,t.jsx)("p",{className:"mt-4 text-center text-foreground/35 text-xs",children:s("pro.ctaSubtext")})]})}function R({interval:e}){let s=(0,j.useTranslations)("pricing.cards"),n=(0,j.useTranslations)("subscriptions"),{user:c}=(0,l.useSession)(),d=(0,v.useRouter)(),x=(0,y.useLocale)(),[p,h]=(0,N.useState)(!1),{isCurrentPlan:b,isUpgradeToYearly:f,isOtherSubscribed:C,upgradeType:T,yearlyPrice:S,remainingValue:A,estimatedCharge:P,balance:O,monthlyCredits:B,planName:R,currentPlanName:U,currentInterval:D,annualSavings:Q,yearlyMonthlyEquiv:V,planMonthlyPrice:F,showConfirm:_,setShowConfirm:Y,upgrading:K,handleUpgrade:H}=z("agency",e),W=r.SUBSCRIPTION_PLANS.find(e=>"agency"===e.id);if(!W)return null;let G="month"===e?W.prices.monthly:W.prices.yearly,J="year"===e&&"monthlyEquivalent"in G&&G.monthlyEquivalent?G.monthlyEquivalent:G.amount,X=W.prices.monthly.amount,Z=async()=>{if(!c){let e=x===a.config.i18n.defaultLocale?"":`/${x}`;d.push(`/auth/login?redirectTo=${e}/pricing`);return}if(b)return void d.push("/app/settings/billing");if(f)return void Y(!0);h(!0);try{let e=x===a.config.i18n.defaultLocale?"":`/${x}`,{checkoutLink:t}=await o.orpcClient.payments.createCheckoutLink({type:"subscription",productId:G.priceId,redirectUrl:`${window.location.origin}${e}/payment-success`});window.location.href=t}catch{w.toast.error(n("errors.subscriptionFailed"))}finally{h(!1)}},ee=b?s("cta.manageSubscription"):f?s("switch"===T?"cta.switchToAnnual":"cta.upgradeToAnnual"):s("agency.ctaStart",{price:J});return(0,t.jsxs)("div",{className:(0,u.cn)("relative flex flex-col rounded-2xl border-2 p-6","border-violet-500/60 bg-gradient-to-b from-violet-500/[0.08] to-card","shadow-xl shadow-violet-500/15"),children:["year"===e&&(0,t.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:(0,t.jsx)("span",{className:"rounded-full bg-violet-600 px-3 py-1 font-bold text-[11px] text-white uppercase tracking-wide shadow-sm",children:s("bestValueBadge")})}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("h3",{className:"font-bold text-xl text-foreground",children:s("agency.name")})}),(0,t.jsx)("p",{className:"mt-1 text-foreground/55 text-sm",children:s("agency.description")}),(0,t.jsx)("div",{className:"mt-4",children:"year"===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,t.jsxs)("span",{className:"text-foreground/30 text-2xl line-through",children:["$",X]}),(0,t.jsxs)("span",{className:"font-bold text-4xl text-violet-500 leading-none dark:text-violet-400",children:["$",J]}),(0,t.jsx)("span",{className:"text-foreground/50 text-sm",children:s("monthlyLabel")})]}),(0,t.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-foreground/45 text-xs",children:s("billedAnnually",{amount:G.amount})}),(0,t.jsx)("span",{className:"rounded-full bg-violet-500/10 px-2 py-0.5 font-bold text-[10px] text-violet-600 uppercase dark:text-violet-400",children:s("saveBadge")})]})]}):(0,t.jsxs)("div",{className:"flex items-baseline gap-1",children:[(0,t.jsxs)("span",{className:"font-bold text-4xl",children:["$",J]}),(0,t.jsx)("span",{className:"text-foreground/50 text-sm",children:s("monthlyLabel")})]})}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)("p",{className:"font-semibold text-foreground/70 text-sm",children:s("year"===e?"videoAdsYearly":"videoAdsMonthly",{count:k(W,e).count})}),(0,t.jsx)("p",{className:"font-medium text-violet-500 text-sm",children:s("perAdCost",{price:k(W,e).pricePerAd})})]})]}),(0,t.jsx)(m.Button,{className:(0,u.cn)("w-full font-semibold",!b&&!C&&!f&&"bg-violet-600 text-white shadow-lg shadow-violet-500/25 hover:bg-violet-700 hover:scale-[1.01] active:scale-[0.99]"),variant:b||f?"outline":void 0,disabled:p||C||K,loading:p,onClick:Z,children:K?(0,t.jsx)(g.Loader2,{className:"size-4 animate-spin"}):ee}),(0,t.jsx)(L,{open:_,onOpenChange:Y,upgradeType:T,planName:R,currentPlanName:U,currentInterval:D,yearlyPrice:S,remainingValue:A,estimatedCharge:P,balance:O,monthlyCredits:B,annualSavings:Q,yearlyMonthlyEquiv:V,planMonthlyPrice:F,upgrading:K,onConfirm:()=>H(G.priceId)}),(0,t.jsx)($,{}),(0,t.jsx)("p",{className:"mt-5 mb-2 font-semibold text-[11px] text-violet-600/60 uppercase tracking-wider dark:text-violet-400/60",children:s("models.capacityTitle")}),(0,t.jsxs)("ul",{className:"space-y-2",children:[(0,t.jsx)(I,{label:s("year"===e?"creditsYearly":"
1creditsMonthly",{credits:(0,i.formatCredits)("year"===e?12*W.monthlyQuota:W.monthlyQuota)}),color:"violet"}),(0,t.jsx)(I,{label:s("agency.processing"),color:"violet"}),(0,t.jsx)(I,{label:s("agency.support"),color:"violet"}),(0,t.jsx)(I,{label:s("benefits.aiActors"),color:"violet"}),(0,t.jsx)(E,{color:"violet"}),(0,t.jsx)(I,{label:s("benefits.commercialLicense"),color:"violet"})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-xl border border-violet-500/20 bg-violet-500/5 p-4",children:[(0,t.jsx)("p",{className:"mb-3 font-semibold text-[11px] text-violet-600/60 uppercase tracking-wider dark:text-violet-400/60",children:s("models.title")}),(0,t.jsx)("ul",{className:"space-y-1",children:M.map(e=>(0,t.jsx)(q,{label:e.name,type:e.agency,color:"violet"},e.name))})]}),(0,t.jsx)("p",{className:"mt-4 text-center font-medium text-violet-600/70 text-xs dark:text-violet-400/70",children:s("agency.ctaSubtext")})]})}function U({interval:e,onChange:a}){let s=(0,j.useTranslations)("pricing.cards");return(0,t.jsx)("div",{className:"mx-auto mb-8 flex w-fit items-center justify-center gap-1 rounded-full border border-border bg-muted/50 p-1",children:["month","year"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>a(r),className:(0,u.cn)("rounded-full px-4 py-1.5 font-medium text-sm transition-all sm:px-5",e===r?"bg-background text-foreground shadow-sm":"text-foreground/50 hover:text-foreground/70"),children:"month"===r?s("interval.monthly"):(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[s("interval.annually"),(0,t.jsx)("span",{className:"rounded-full bg-amber-500/15 px-1.5 py-0.5 font-bold text-[10px] text-amber-600 dark:text-amber-400",children:s("interval.discount")})]})},r))})}function D(){let e=(0,j.useTranslations)("pricing.cards"),[a,s]=(0,N.useState)("year");return(0,t.jsx)("section",{id:"subscription-plans",className:"py-10 sm:py-12 lg:py-16",children:(0,t.jsxs)("div",{className:"container max-w-6xl",children:[(0,t.jsx)(A,{}),(0,t.jsx)(U,{interval:a,onChange:s}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3 lg:items-start",children:[(0,t.jsx)(O,{interval:a}),(0,t.jsx)(B,{interval:a}),(0,t.jsx)(R,{interval:a})]}),(0,t.jsx)("p",{className:"mt-6 text-center text-foreground/35 text-xs",children:e("fairUseNote")})]})})}e.s(["PricingCards",()=>D])}]);
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.