PageSourceSearch

https://www.finalroundai.com/_next/static/chunks/30213-9b5bb7f9e2a83178.js

js finalroundai.com collected 2026-09-24 18:00:31 UTC 21,175 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30213],{745:(e,t,i)=>{i.d(t,{C0:()=>n,e0:()=>r});let r={free:{checkout_btn_text:"No Credit Card",plan_description:"Get started today with basics.",billed_text:null},monthly:{checkout_btn_text:"Subscribe",plan_description:"Get interview ready.",billed_text:null},quarterly:{checkout_btn_text:"Subscribe",plan_description:"All you need for this season.",billed_text:"BILLED QUARTERLY"},"half-yearly":{checkout_btn_text:"Subscribe",plan_description:"Dream offers await.",billed_text:"BILLED HALF-YEARLY"},yearly:{checkout_btn_text:"Subscribe",plan_description:"Dream offers await.",billed_text:"BILLED ANNUALLY"}},l={free:{title:null,permissions:[{icon:"checked",text:"Unlimited mock interviews"},{icon:"checked",text:"Basic AI interview report"},{icon:"checked",text:"Limited question bank access"}]},monthly:{title:"Everything in Free, plus:",permissions:[{icon:"plus",text:"Unlimited Interview Copilot"},{icon:"plus",text:"Stealth mode"},{icon:"plus",text:"Advanced AI interview report"},{icon:"plus",text:"All interview types (Coding, HireVue, Phone & more)"},{icon:"plus",text:"Full question bank (10,000+ questions)"},{icon:"plus",text:"Standard AI models"}]},quarterly:{title:"Everything in Free, plus:",permissions:[{icon:"plus",text:"Unlimited Interview Copilot"},{icon:"plus",text:"Stealth mode"},{icon:"plus",text:"Advanced AI interview report"},{icon:"plus",text:"All interview types (Coding, HireVue, Phone & more)"},{icon:"plus",text:"Full question bank (10,000+ questions)"},{icon:"plus",text:"Standard AI models"}]},"half-yearly":{title:"Everything in Free, plus:",permissions:[{icon:"plus",text:"Unlimited Interview Copilot"},{icon:"plus",text:"Stealth mode"},{icon:"plus",text:"Advanced AI interview report"},{icon:"plus",text:"All interview types (Coding, HireVue, Phone & more)"},{icon:"plus",text:"Full question bank (10,000+ questions)"},{icon:"plus",text:"Standard AI models"}]},"yearly-standard":{title:"Everything in Free, plus:",permissions:[{icon:"plus",text:"Unlimited Interview Copilot"},{icon:"plus",text:"Stealth mode"},{icon:"plus",text:"Advanced AI interview report"},{icon:"plus",text:"All interview types (Coding, HireVue, Phone & more)"},{icon:"plus",text:"Full question bank (10,000+ questions)"},{icon:"plus",text:"Standard AI models — fast & reliable"},{icon:"plus",text:"Priority support",highlight:!0}]},"yearly-recommended":{title:"Everything in Free, plus:",permissions:[{icon:"plus",text:"Unlimited Interview Copilot"},{icon:"plus",text:"Stealth mode"},{icon:"plus",text:"Advanced AI interview report"},{icon:"plus",text:"All interview types (Coding, HireVue, Phone & more)"},{icon:"plus",text:"Full question bank (10,000+ questions)"},{icon:"plus",text:"Premium AI models — top-tier speed & accuracy",highlight:!0},{icon:"plus",text:"Early access to new AI features",highlight:!0},{icon:"plus",text:"Priority+ support (under 1 hr response)",highlight:!0}]}};function n(e){return"yearly"===e.cycle?e.recommend_plan?l["yearly-recommended"]:l["yearly-standard"]:l[e.cycle]}},22002:(e,t,i)=>{i.d(t,{S:()=>d});var r=i(54568),l=i(7620),n=i(27541),s=i(69885),o=i(73710),a=i(745),c=i(23831),u=i(96327);function d(e){var t,i,d;let{plan:p,buttonTextOverride:y,onCheckoutOpened:h,onCheckoutClick:m,buttonClassName:f,containerClassName:g,discountCode:v,forceOutlined:b,wonOfferPct:x}=e,[_,w]=(0,l.useState)(!1),I=(0,n.useSearchParams)(),A=!!p.is_current,P=0===p.cycle_in_months,k=null!=(d=null!=v?v:null==(t=I.get("promo"))?void 0:t.trim())?d:void 0,E=A?"current":y||(null==(i=a.e0[p.cycle])?void 0:i.checkout_btn_text)||"Checkout",S=async()=>{if(!A&&!_&&!P){if(!p.price_id)return void s.o.error("This plan is not available for checkout");if(o.m3.subscriptionPageCtaClick({subscription_plan:p.cycle}),m)return void await m(p.price_id);w(!0);try{var e,t,i;let r=await (0,c.NK)(p.price_id,"".concat(window.location.origin,"/subscription/completed?session_id={CHECKOUT_SESSION_ID}"),"".concat(window.location.origin,"/subscription"),k),l=null==r||null==(e=r.data)?void 0:e.checkout_url;if(l){i=null==r||null==(t=r.data)?void 0:t.applied_discount,x&&!(x<=0)&&(i?i.pct>x?s.o.success("Good news: we applied a bigger discount than your offer, ".concat(i.pct,"% off.")):i.pct<x&&s.o.warning("We couldn't apply your Interview Offer, so we used the best available discount instead, ".concat(i.pct,"% off.")):s.o.error("We couldn't apply your Interview Offer this time. Reopen checkout to try again.")),window.open(l,"_blank","noopener,noreferrer"),null==h||h();return}s.o.error((null==r?void 0:r.message)||"Failed to get payment link",{duration:1e4}),o.m3.subscriptionPageCheckoutFailed({reason:(null==r?void 0:r.message)||"Failed to get payment link"})}catch(e){s.o.error("Failed to get payment link")}finally{w(!1)}}};return(0,r.jsx)("div",{className:(0,u.cn)("rounded-md",g),children:(0,r.jsx)("button",{type:"button",onClick:S,disabled:A||_||P,className:(0,u.cn)("w-full rounded-md border px-4 py-2.5 text-sm font-semibold transition-colors disabled:cursor-not-allowed",A?"border-2 border-slate-300 bg-slate-100 text-slate-400":P?"border-2 border-slate-600 text-slate-600 disabled:opacity-70":p.recommend_plan&&!b?"border-[#FF4800] bg-[#FF4800] text-white hover:bg-[#
1E04000] disabled:opacity-70":"border-2 border-[#FF4800] bg-white text-[#FF4800] hover:bg-[#FF4800] hover:text-white disabled:opacity-70",f),children:_?"Loading...":E})})}},37758:(e,t,i)=>{i.d(t,{q:()=>c});var r=i(54568),l=i(7620),n=i(32064),s=i(60844),o=i(99935),a=i(44406);function c(e){let{onConfirmSubscription:t,onCancel:i,onTrack:c}=e,[u,d]=(0,l.useState)(!1);return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center px-4 py-12",children:[(0,r.jsxs)("div",{className:"relative mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-orange-100",children:[(0,r.jsx)("span",{className:"absolute inset-0 rounded-full bg-orange-200/60 motion-reduce:animate-none motion-safe:animate-[ping_1.8s_cubic-bezier(0,0,0.2,1)_infinite]"}),(0,r.jsx)(n.A,{className:"relative h-8 w-8 text-orange-600 motion-reduce:animate-none motion-safe:animate-pulse"})]}),(0,r.jsx)("h3",{className:"mb-2 text-xl font-semibold text-slate-900",children:"Payment Window Opened"}),(0,r.jsx)("p",{className:"mb-6 text-center text-sm text-slate-600",children:"Please complete your payment in the new tab. Once you're done, click the button below to verify your payment."}),(0,r.jsxs)("div",{className:"flex w-full flex-col gap-3 sm:flex-row sm:justify-center",children:[(0,r.jsxs)(a.$,{onClick:()=>{if(!u){null==c||c("subscription_paywall_confirmation_clicked"),d(!0);try{Promise.resolve(t()).catch(()=>{d(!1)})}catch(e){d(!1)}}},disabled:u,"aria-busy":u,className:"bg-design-orange hover:bg-design-orange-pressed flex items-center justify-center gap-2 transition-all duration-200 ease-[cubic-bezier(0.25,1,0.5,1)] disabled:cursor-not-allowed disabled:opacity-90",children:[u?(0,r.jsx)(s.A,{className:"h-4 w-4 animate-spin"}):(0,r.jsx)(o.A,{className:"h-4 w-4"}),u?"Verifying payment...":"Payment Completed"]}),i&&(0,r.jsx)(a.$,{onClick:()=>{u||i()},disabled:u,variant:"outline",className:"border-slate-300 text-slate-700 hover:bg-slate-50",children:"Cancel"})]}),u&&(0,r.jsx)("p",{className:"mt-3 text-center text-xs text-slate-500","aria-live":"polite",children:"This may take a few seconds while we verify your payment."})]})}},46456:(e,t,i)=>{i.d(t,{cn:()=>n});var r=i(72902),l=i(13714);function n(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return(0,l.QP)((0,r.$)(t))}},54943:(e,t,i)=>{i.d(t,{vv:()=>a,Qn:()=>c});var r=i(27277),l=i(78227),n=i(71620),s=i(23831);let o=e=>{let t=e.replace(/\([^)]*\)/g,"").trim(),i={Basic:"Basic",Plus:"Plus","Plus(SEA)":"Plus",Pro:"Pro","Pro(SEA)":"Pro","God Mode":"God Mode","God Mode(SEA)":"God Mode","GOD MODE":"God Mode",Ready:"Ready"};return i[e]?i[e]:i[t]?i[t]:t};(0,n.v)((e,t)=>({planGroupInfo:null,isLoading:!1,isRetrying:!1,error:null,hasInitialized:!1,apiErrorMessage:null,retryTimeoutId:null,isUpgrading:!1,usePlans:function(){var i,r;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=null==(r=window.__frai__)||null==(i=r.clerk)?void 0:i.token,{data:a,error:c,isLoading:u,mutate:d}=(0,l.default)(o?"payment-plans-".concat(n):null,async()=>{try{var i,r;let l=await (0,s.Cu)(t=>{let i=null==t?void 0:t.toLowerCase().includes("upgrading");e({apiErrorMessage:t,isUpgrading:i})},n);if(l&&"object"==typeof l&&"code"in l&&0!==l.code){let r=l.message||"Failed to load subscription plans",n=r.toLowerCase().includes("upgrading");e({apiErrorMessage:r,isUpgrading:n});let s=t().retryTimeoutId;s&&clearTimeout(s);let o=setTimeout(()=>{e({retryTimeoutId:null,isRetrying:!0}),d()},2e4);e({retryTimeoutId:o});let a=null!=(i=null==l?void 0:l.plan_group_info)?i:null;return e({planGroupInfo:a,isLoading:!1,isRetrying:!1,hasInitialized:!0}),a}let o=null!=(r=null==l?void 0:l.plan_group_info)?r:null,a=t().retryTimeoutId;return a&&clearTimeout(a),e({planGroupInfo:o,isLoading:!1,isRetrying:!1,error:null,apiErrorMessage:null,retryTimeoutId:null,isUpgrading:!1,hasInitialized:!0}),o}catch(t){throw console.error("Error fetching plans:",t),e({error:t,isLoading:!1,isRetrying:!1,hasInitialized:!0}),t}},{revalidateOnFocus:!1,revalidateOnReconnect:!1,dedupingInterval:1e4,errorRetryCount:3,onLoadingSlow:()=>{e({isLoading:!0})}});return{data:a,error:c,isLoading:u,mutate:d,apiErrorMessage:t().apiErrorMessage,isUpgrading:t().isUpgrading}},setPlanGroupInfo:t=>e({planGroupInfo:t}
1),setLoading:t=>e({isLoading:t}),setRetrying:t=>e({isRetrying:t}),setError:t=>e({error:t}),setApiErrorMessage:t=>e({apiErrorMessage:t}),setIsUpgrading:t=>e({isUpgrading:t}),reset:()=>{let i=t().retryTimeoutId;i&&clearTimeout(i),e({planGroupInfo:null,isLoading:!1,isRetrying:!1,error:null,apiErrorMessage:null,retryTimeoutId:null,isUpgrading:!1,hasInitialized:!1})},getPriceIdByPlanName:e=>{var i;let{planGroupInfo:r}=t();if(!(null==r?void 0:r.plans))return;let l=r.plans.find(t=>t.name===e);if(l)return l.price_id;let n=o(e);if(l=r.plans.find(e=>o(e.name)===n))return l.price_id;let s=null==(i=Object.entries({Basic:["Not available"],Plus:["monthly"],Pro:["quarterly"],"God Mode":["half-yearly","yearly"],"GOD MODE":["half-yearly","yearly"],Ready:["weekly"]}).find(t=>{let[i]=t;return i===e||o(i)===n}))?void 0:i[1];if(s&&(l=r.plans.find(e=>s.includes(e.cycle))))return l.price_id;console.log("getPriceIdByPlanName: no match found for",e)},getPlanByPriceId:e=>{let{planGroupInfo:i}=t();if(null==i?void 0:i.plans)return i.plans.find(t=>t.price_id===e)},getSelectedPlan:()=>{let{planGroupInfo:e}=t();if((null==e?void 0:e.plans)&&e.user_selected_plan_id)return e.plans.find(t=>t.id===e.user_selected_plan_id)},getCurrentPriceId:e=>{let{planGroupInfo:i}=t();if(null==i?void 0:i.plans){if("Not available"===e){let e=i.plans.find(e=>"Basic"===e.name||0===e.price||"Not available"===e.cycle);return null==e?void 0:e.price_id}return i.user_selected_price_id}},getStandardPlanName:e=>{let t=o(e.name);if(e.cycle){let t=(e=>({7:"Basic",monthly:"Plus",quarterly:"Pro","half-yearly":"God Mode",yearly:"God Mode",weekly:"Ready"})[e]||e)(e.cycle);if(t!==e.cycle)return t}return t},getPriceInfoByConfig:(e,i)=>{let{planGroupInfo:r}=t();if(!(null==r?void 0:r.plans))return null;let{plans:l}=r;return t=>{let r={1:"monthly",2:"quarterly",3:"half-yearly",4:"weekly"}[t];if(!r)return null;let n=l.find(e=>e.cycle===r);if(!n){let e={1:["Basic","Plus","monthly"],2:["Pro","quarterly"],3:["God Mode","GOD MODE","half-yearly"],4:["Ready","weekly"]}[t]||[];n=l.find(t=>e.some(e=>t.name===e||o(t.name)===o(e)))}if(!n)return null;let s=n.price||0,a=n.special_price||s,c=n.scholarship_price||s;return{id:(e=>({monthly:"tier-1",quarterly:"tier-2","half-yearly":"tier-3",weekly:"tier-4","Not available":"tier-0"})[e]||"tier-".concat(e))(n.cycle||""),name:n.cycle||"",title:n.name||"",priceMonthly:String(i?c:e?a:s),specialPriceMonthly:n.special_price?String(n.special_price):void 0,scholarshipPrice:n.scholarship_price?String(n.scholarship_price):void 0,billInterval:(e=>({monthly:"Billed Monthly",quarterly:"Billed Quarterly","half-yearly":"Billed Semi-Annual",weekly:"Billed Weekly",yearly:"Billed Yearly"})[e]||"Billed ".concat(e))(n.cycle||""),tierNumber:t,cycle:n.cycle,cycle_in_months:n.cycle_in_months,price_id:n.price_id,currency_symbol:n.currency_symbol||"$"}}},getLegacyPriceId:()=>{let{getPriceIdByPlanName:e}=t();return{TIER1:e("Plus")||e("Basic")||e("monthly")||"",TIER2:e("Pro")||e("quarterly")||"",TIER3:e("God Mode")||e("GOD MODE")||e("half-yearly")||"",TIER4:e("Ready")||e("weekly")||""}},plans:()=>{var e;return(null==(e=t().planGroupInfo)?void 0:e.plans)||[]},planGroupName:()=>{var e;return(null==(e=t().planGroupInfo)?void 0:e.name)||""},bindPaymentMethodPriceId:()=>{var e,i;let r=null==(i=t().planGroupInfo)||null==(e=i.plans)?void 0:e.find(e=>{var t;return null==(t=e.name)?void 0:t.toLowerCase().includes("bind")});return null==r?void 0:r.price_id},userSelectedPriceId:()=>{var e;return null==(e=t().planGroupInfo)?void 0:e.user_selected_price_id},priceId:()=>{let{planGroupInfo:e}=t();if(!(null==e?void 0:e.plans)||0===e.plans.length)return{TIER1:"",TIER2:"",TIER3:"",TIER4:""};let i={};return e.plans.forEach(e=>{e.cycle&&e.price_id&&""!==e.price_id&&(i[e.cycle]=e.price_id)}),{TIER1:i.monthly||"",TIER2:i.quarterly||"",TIER3:i["half-yearly"]||"",TIER4:i.weekly||""}},getSubscriptionInfo:e=>{let i,{planGroupInfo:r}=t(),l=t().priceId();if(!(null==r?void 0:r.plans))return{paymentPlan:"Basic",currentPriceId:void 0,formattedPrice:{period:"Free Trial",subText:""},tier:void 0,fixPrice:()=>"0"};let n=e||"Basic",s=n;"Basic"===n?(i=l.TIER1,s="Plus"):"Pro"===n?(i=l.TIER2,s=n):"GOD MODE"===n?(i=l.TIER3,s=n):"Ready"===n&&(i=l.TIER4,s=n);let o=r.plans.find(e=>e.price_id===r.user_selected_price_id);return{paymentPlan:(null==o?void 0:o.name)||s,currentPriceId:i,formattedPrice:(()=>
1{if(!o)return{period:"Free Trial",subText:""};let e="".concat(o.currency_symbol||"$").concat(o.price),t={monthly:"Billed Monthly",quarterly:"Billed Quarterly","half-yearly":"Billed Semi-Annual",weekly:"Billed Weekly",yearly:"Billed Yearly"}[o.cycle||""]||"Billed Monthly";return{period:"".concat(e," / Month"),subText:t,...o}})(),tier:o,fixPrice:e=>String((null==e?void 0:e.priceMonthly)||(null==e?void 0:e.price)||0)}},getTiers:()=>{let{getPriceInfoByConfig:e}=t(),i=!!r.A.get("referrer_id"),l=e(i,!1);if(!l)return{tiers:[],isReferredUser:i};let n=[{id:"tier-0",name:"Free",title:"Basic",priceMonthly:"0",buybtn:null}];return l(1)&&n.push({tierNumber:1,...l(1),highlight:"4 Live and Unlimited Mock Interview Sessions",buybtn:null}),l(2)&&n.push({tierNumber:2,...l(2),highlight:"Unlimited Interview Copilot sessions",buybtn:null}),l(3)&&n.push({tierNumber:3,...l(3),highlight:"Unlimited Interview Copilot sessions with Scholarship Program",buybtn:null}),l(4)&&n.push({tierNumber:4,...l(4),highlight:"Unlimited Interview Copilot sessions",buybtn:null}),{tiers:n.filter(e=>e),isReferredUser:i}},getGodFeaturesForAfterSignup:()=>{var e,i;let{planGroupInfo:r}=t(),l=[];l.push({text:"Everything in Pro"}),l.push({text:"Priority Live Coaching Sessions"}),l.push({text:"Dedicated Support Access"}),l.push({text:"Early Feature Access"});let n=null==r||null==(e=r.plans)?void 0:e.find(e=>"half-yearly"===e.cycle||"yearly"===e.cycle||"God Mode"===o(e.name));if(null==n||null==(i=n.entitlements)?void 0:i["Auto Apply"]){let e=n.entitlements["Auto Apply"].credits;l.push({text:"Access to AutoApply – ".concat(e," chances (US only, 1st month)")})}else l.push({text:"Access to AutoApply – 50 chances (US only, 1st month)"});return l},getProFeaturesForAfterSignup:()=>{var e,i,r,l,n,s;let{planGroupInfo:a}=t(),c=[],u=null==a||null==(e=a.plans)?void 0:e.find(e=>"quarterly"===e.cycle||"Pro"===o(e.name)),d=(null==u||null==(r=u.entitlements)||null==(i=r["Live Interview"])?void 0:i.credits)||0,p=(null==u||null==(n=u.entitlements)||null==(l=n["Mock Interview"])?void 0:l.credits)||0;if(d>=9e5||p>=9e5)c.push({text:"Unlimited Live & Mock Interviews"});else{let e=Math.floor(d/25),t=Math.floor(p/25);c.push({text:"".concat(e," Live & ").concat(t," Mock Interviews")})}if(c.push({text:"AI Resume & Cover Letter Builder"}),c.push({text:"AI Interview Coach"}),c.push({text:"Real-time AI Help During Interviews"}),c.push({text:"Speak with Recruiters"}),null==u||null==(s=u.entitlements)?void 0:s["Auto Apply"]){let e=u.entitlements["Auto Apply"].credits;c.push({text:"Access to AutoApply – ".concat(e," chances (US only, 1st month)")})}else c.push({text:"Access to AutoApply – 15 chances (US only, 1st month)"});return c},getPlusFeaturesForAfterSignup:()=>{var e,i,r,l,n;let{planGroupInfo:s}=t(),a=[],c=null==s||null==(e=s.plans)?void 0:e.find(e=>"monthly"===e.cycle||"Plus"===o(e.name)),u=(null==c||null==(r=c.entitlements)||null==(i=r["Live Interview"])?void 0:i.credits)||0;if(u>=9e5)a.push({text:"Unlimited Live Interview Sessions"});else if(u>0){let e=Math.floor(u/25);a.push({text:"".concat(e," Live Interview Sessions")})}else a.push({text:"4 Live Interview Sessions"});let d=(null==c||null==(n=c.entitlements)||null==(l=n["Mock Interview"])?void 0:l.credits)||0;if(d>=9e5)a.push({text:"Unlimited Mock Interview Sessions"});else if(d>0){let e=Math.floor(d/25);a.push({text:"".concat(e," Mock Interview Sessions")})}else a.push({text:"4 Mock Interview Sessions"});return a.push({text:"Resume Generator"}),a.push({text:"Limited Interview Report Access"}),a.push({text:"Basic AI Guidance"}),a.push({text:"No AutoApply Access",included:!1}),a.push({text:"No priority support",included:!1}),a.push({text:"No real-time AI assistance",included:!1}),a}}));let a=function(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=null==t?void 0:t.trim().toUpperCase();return r?i?"".concat(c(r)," ").concat(e," ").concat(r):"".concat(c(r)," ").concat(null!=e?e:"--"):"--"};function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",i=null==e?void 0:e.trim().toUpperCase();if(!i||!/^[A-Z]{3}$/.test(i))return i||"$";try{let e=new Intl.NumberFormat(t,{style:"currency",currency:i,currencyDisplay:"narrowSymbol",minimumFractionDigits:0,maximumFractionDigits:0}).formatToParts(1).find(e=>"currency"===e.type);return e?e.value:i}catch(e){return i}}},82120:(e,t,i)=>{i.d(t,{Bx:()=>s,IE:()=>l,wo:()=>n});var r=i(54568);function l(e){let{children:t,className:i}=e;return(0,r.jsx)("span",{className:"inline-flex shrink-0 rounded-[100px] bg-[#FFF2ED] px-2 whitespace-nowrap text-slate-900 ".concat(null!=i?i:""),children:t})}function n(e){let{children:t,className:i}=e;return(0,r.jsx)("span",{className:"inline-flex shrink-0 rounded-[100px] bg-[#F8EBBE]/70 px-2 whitespace-nowrap text-slate-700 ".concat(null!=i?i:""),children:t})}function s(e){let{children:t,className:i}=e;return(0,r.jsx)("span",{className:"inline-flex shrink-0 rounded-[100px] bg-[linear-gradient(95deg,rgba(102,102,102,0.80)_-2.94%,rgba(0,0,0,0.80)_23.74%,rgba(11,11,11,0.80)_33.9%,rgba(102,102,102,0.80)_93.83%)] px-2 font-[DotGothic16] whitespace-nowrap text-white ".concat(null!=i?i:""),children:t})}},92175:(e,t,i)=>{i.d(t,{r:()=>o});var r=i(7620),l=i(23831),n=i(33041);let s={status:"idle",isFreeTrial:!0,plans:[],currentSubscription:null,isPaidBefore260401:!1,paidBefore260401Plan:null,error:null};function o(){let[e,t]=(0,r.useState)(s),i=(0,r.useCallback)(e=>{var t;let i=null==e||null==(t=e.data)?void 0:t.plans;return Array.isArray(i)?i:[]},[]),o=(0,r.useCallback)(async()=>{t(e=>({...e,status:"syncing_plans",error:null}));try{var e,r,s,o,a;let c=await (0,l.XC)(),u=i(c),d=null!=(s=u.find(e=>e.is_current))?s:null,p=null!=(o=null==c||null==(e=c.data)?void 0:e.is_paid_before_260401)&&o,y=null!=(a=null==c||null==(r=c.data)?void 0:r.paid_before_260401_plan)?a:null;return n.E.getState().syncCurrentSubscriptionFromPlans(u),t(e=>({...e,plans:u,currentSubscription:d,isPaidBefore260401:p,paidBefore260401Plan:y,status:e.isFreeTrial?"needs_subscription":"ready",error:null})),u}catch(i){let e=i instanceof Error?i.message:"Failed to refresh plans";return t(t=>({...t,status:"error",error:e})),[]}},[i]),a=(0,r.useCallback)(async()=>{t(e=>({...e,status:"checking_permission",error:null}));try{let e=await n.E.getState().fetchPrivileges({force:!0});if(t(t=>({...t,isFreeTrial:e.isFreeTrial,status:e.isFreeTrial?"needs_subscription":"ready",error:null}
1)),e.isFreeTrial)return await o(),{allowed:!1,requiresSubscription:!0};return{allowed:!0,requiresSubscription:!1}}catch(i){let e=i instanceof Error?i.message:"Failed to check permission";return t(t=>({...t,status:"error",error:e})),{allowed:!1,requiresSubscription:!0}}},[o]),c=(0,r.useCallback)(async()=>{t(e=>({...e,status:"confirming_payment",error:null}));try{let e=await n.E.getState().confirmPrivilegesAfterPayment({retries:5,intervalMs:1500});return t(t=>({...t,isFreeTrial:e.isFreeTrial,status:e.isFreeTrial?"needs_subscription":"syncing_plans"})),await o(),!e.isFreeTrial}catch(i){let e=i instanceof Error?i.message:"Failed to confirm payment";return t(t=>({...t,status:"error",error:e})),!1}},[o]),u=(0,r.useCallback)(()=>{t(s)},[]);return(0,r.useMemo)(()=>({...e,checkPermission:a,refreshPlans:o,confirmAfterCheckout:c,reset:u}),[e,a,o,c,u])}}}]);

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.