1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="2c1958f8-953d-13d0-a901-e23176435f23")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,820411,e=>{"use strict";var t=e.i(382344);e.s(["subscriptionPurchaseSummary",0,e=>{if(!e||null==e.price||""===String(e.price).trim())return;let a=Number(e.price);if(!Number.isFinite(a)||a<0)return;let s=(0,t.toMinorUnits)(a);if(!Number.isSafeInteger(s))return;let i=null==e.old_price?void 0:(0,t.toMinorUnits)(Number(e.old_price)),r=e.first_purchase_tokens_amount??e.tokens_amount;return{amountMinor:s,currency:t.SHIFT4_CURRENCY,period:e.period,...void 0!==i&&Number.isSafeInteger(i)&&i>s?{oldPriceMinor:i}:{},...null!=r&&Number.isSafeInteger(r)&&r>0?{bonusTokens:r}:{}}}])},950959,e=>{"use strict";var t=e.i(382344);let a=e=>{if(null==e||"string"==typeof e&&""===e.trim())return;let a=Number(e);if(!Number.isFinite(a)||a<0)return;let s=(0,t.toMinorUnits)(a);return Number.isSafeInteger(s)?s:void 0};e.s(["preferredPaymentMethod",0,e=>e.includes("card")?"card":e[0]??"card","tokenPurchaseSummary",0,e=>{if(!e||!Number.isSafeInteger(e.amount)||e.amount<=0)return;let s=a(e.price);if(void 0===s)return;let i=a(e.old_price);return{tokenAmount:e.amount,amountMinor:s,currency:t.SHIFT4_CURRENCY,...void 0!==i&&i>s?{oldPriceMinor:i}:{},...null!=e.swipes&&Number.isSafeInteger(e.swipes)&&e.swipes>0?{bonusSwipes:e.swipes}:{}}}])},211936,e=>{"use strict";var t=e.i(483947),a=e.i(242417),s=e.i(209707),i=e.i(129983),r=e.i(587572);e.i(532641);var n=e.i(331008),l=e.i(5603),o=e.i(722614);e.s(["useEmbeddedCheckoutSubmit",0,()=>{let e=(0,l.useAppDispatch)(),[c]=(0,o.useChargeTokenMutation)(),[d]=(0,o.useSubscribeTokenMutation)(),[u,p]=(0,t.useState)("form"),[m,h]=(0,t.useState)(!1),x=(0,t.useCallback)(t=>{(0,i.flushMetaPixelPurchase)(),(0,s.flushGtagPurchase)(),(0,r.flushPendingPurchase)()&&(0,a.fireAffiliatePixel)(),e(n.baseApi.util.invalidateTags(["Profile","Subscriptions","Payments",...t?["LiveIntros","MeetStreams","StripClub"]:[]])),p("processing")},[e]);return{submit:(0,t.useCallback)(async(e,t)=>{h(!0);try{let a="tokens"===t.kind?await c({token_id:e,token_package_id:t.tokenPackageId}).unwrap():await d({token_id:e,subscription_plan_id:t.subscriptionPlanId,promocode:t.promocode}).unwrap();if("success"!==a.status)return!1;let s=a.subscription_id??a.charge_id??null;if(null==s)return!1;return x(null!=a.subscription_id),!0}catch{return!1}finally{h(!1)}},[c,d,x]),settle:x,phase:u,submitting:m}}])},516569,e=>{"use strict";var t=e.i(363130),a=e.i(390132),s=e.i(517891),i=e.i(410345);e.i(613937);var r=e.i(865238),n=e.i(640678);let l=e=>`$${(e/100).toFixed(2)}`;e.s(["CheckoutSavingsPlate",0,({kind:e,priceMinor:o,oldPriceMinor:c,period:d,tokenAmount:u,includedTokens:p,bonusTokens:m,className:h})=>{let x=(0,s.useTranslations)(),f="subscription"===e,b=o/100,g=null!=c?c/100:null,k=null!=g&&g>b?Math.round((1-b/g)*100):0,[y,v]=((f&&null!=d?(0,i.getSubscriptionPerDay)(b.toFixed(2),d):null)??b).toFixed(2).split("."),N=null!=c&&c>o?c-o:0,j=(p??0)+(m??0),w=(0,n.useTokenPriceList)(),C=j>0?j:f?0:u??0,S=w.chat.image>0?Math.floor(C/w.chat.image):0,M=w.chat.video>0?Math.floor(C/w.chat.video):0,T=[S>0?x("dialogs.checkoutBuyTokens.valuePhotos",{count:S.toLocaleString()}):null,M>0?x("dialogs.checkoutBuyTokens.valueVideos",{count:M.toLocaleString()}):null].filter(Boolean).join(" · "),_=f?x("YEAR"===d?"dialogs.embeddedCheckout.termYear":"WEEK"===d?"dialogs.embeddedCheckout.termWeek":"dialogs.embeddedCheckout.termMonth"):null!=u?`${u.toLocaleString()} ${x("common.units.tokens")}`:x("common.units.tokens"),P=x("YEAR"===d?"widgets.planSelector.billedYear":"WEEK"===d?"widgets.planSelector.billedWeek":"widgets.planSelector.billedMonth",{total:l(o)});return(0,t.jsxs)("div",{className:`rounded-2xl border border-[#C51918]/30 bg-[linear-gradient(120deg,rgba(197,25,24,0.14),rgba(255,196,84,0.06))] p-4 ${h??""}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[12px] font-bold uppercase tracking-[0.1em] text-white/70",children:_}),k>0&&(0,t.jsx)("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-[linear-gradient(100deg,#F3DEA6,#D8AC5E)] px-2.5 py-1 text-[11px] font-black uppercase tracking-wide text-[#2a1a05]",children:x("dialogs.embeddedCheckout.offToday",{percent:k})})]}),(0,t.jsxs)("div",{className:"mt-1.5 flex items-end justify-between gap-3",children:[(0,t.jsxs)("span",{className:"flex items-baseline leading-none text-white",children:[(0,t.jsx)("span",{className:"text-[19px] font-black text-white/75",children:"$"}),(0,t.jsx)("span",{className:"text-[38px] font-black tracking-tight",children:y}),(0,t.jsxs)("span",{className:"text-[19px] font-black",children:[".",v]}),f&&(0,t.jsxs)("span",{className:"ml-1 text-[11px] font-normal text-white/50",children:["/ ",x("widgets.planSelector.perDay")]})]}),(0,t.jsxs)("span",{className:"flex flex-col items-end gap-0.5 text-right text-[11.5px] font-semibold leading-relaxed text-white/70",children:[(k>0||N>0)&&(0,t.jsxs)("span",{className:"flex flex-wrap items-baseline justify-end gap-x-2",children:[k>0&&null!=g&&(0,t.jsx)("span",{className:"text-white/40 line-through",children:(0,i.formatPerDayUsd)(g)}),N>0&&(0,t.jsx)("span",{className:"text-[13px] font-extrabold text-emerald-300",children:x("dialogs.embeddedCheckout.youSave",{amount:l(N)})})]}),f&&(0,t.jsxs)("span",{children:[(0,t.jsx)("b",{className:"text-[#EAD4A0]",children:P}),(0,t.jsx)("br",{}),(0,t.jsx)("span",{children:x("pages.tariffs.cancelAnytime")})]})]})]}),j>0&&(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2.5 border-t border-white/10 pt-2.5",children:[(0,t.jsx)(a.default,{src:r.tokenImage,alt:"",width:30,height:30,className:"size-[30px] shrink-0 drop-shadow-[0_4px_10px_rgba(216,172,94,0.5)]","aria-hidden":!0}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-0.5 leading-none",children:[(0,t.jsx)("b",{className:"text-[16px] font-black tracking-tight text-white",children:j.toLocaleStr
2ing()}),(0,t.jsx)("span",{className:"text-[11.5px] font-bold text-[#EAD4A0]",children:x("dialogs.embeddedCheckout.tokensIncludedShort")}),(m??0)>0&&(0,t.jsx)("span",{className:"rounded-full bg-[linear-gradient(100deg,#F3DEA6,#D8AC5E)] px-2 py-0.5 text-[10px] font-black text-[#2a1a05]",children:x("dialogs.embeddedCheckout.firstPurchaseBonus",{count:(m??0).toLocaleString()})})]}),""!==T&&(0,t.jsx)("span",{className:"text-[11px] font-semibold text-white/55",children:T})]})]}),0===j&&!f&&""!==T&&(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2 border-t border-white/10 pt-2.5",children:[(0,t.jsx)(a.default,{src:r.tokenImage,alt:"",width:22,height:22,className:"size-[22px] shrink-0 drop-shadow-[0_4px_10px_rgba(216,172,94,0.5)]","aria-hidden":!0}),(0,t.jsx)("span",{className:"text-[12.5px] font-bold text-white/75",children:T})]})]})}])},849391,e=>{"use strict";var t=e.i(363130),a=e.i(112086),s=e.i(517891),i=e.i(877130);e.i(221823);var r=e.i(327983),n=e.i(342701),l=e.i(797631);e.i(635743);var o=e.i(499601);e.s(["PurchaseCelebration",0,({kind:e,tokenAmount:c,onDone:d,className:u})=>{let p=(0,s.useTranslations)(),m=(0,l.useAudienceGenderIcu)(),h="tokens"===e,x=p(h?"dialogs.embeddedCheckout.processingTitleTokens":"dialogs.embeddedCheckout.processingTitle"),f=h?null!=c?p("dialogs.embeddedCheckout.processingSubtitleTokens",{count:c}):p("dialogs.embeddedCheckout.processingSubtitleTokensGeneric"):p("dialogs.embeddedCheckout.processingSubtitle",{gender:m}),b=h?r.CheckIcon:n.CrownIcon,g=h?{glow:"rgba(16,185,129,0.5)",core:"from-emerald-300/30 to-emerald-600/10",icon:"text-emerald-200",ring:"bg-emerald-400/30",spark:"#6ee7b7"}:{glow:"rgba(199,154,76,0.6)",core:"from-[#E7C778]/35 to-[#8A6420]/10",icon:"text-[#EAD4A0]",ring:"bg-[#C79A4C]/30",spark:"#EAD4A0"},k=Array.from({length:10},(e,t)=>{let a=t/10*Math.PI*2+.32*(t%2!=0),s=48+t%3*15;return{x:Math.cos(a)*s,y:Math.sin(a)*s,s:t%3==0?7:4,delay:.18+t%5*.04}});return(0,t.jsxs)("div",{className:(0,i.twMerge)("relative flex flex-col items-center gap-3 px-4 py-12 text-center",u),children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute left-1/2 top-8 -translate-x-1/2",children:(0,t.jsx)(a.motion.div,{className:"size-44 rounded-full blur-3xl",style:{background:`radial-gradient(circle, ${g.glow}, transparent 70%)`},initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:.7,ease:"easeOut"}})}),(0,t.jsxs)("div",{className:"relative flex size-20 items-center justify-center",children:[k.map((e,s)=>(0,t.jsx)(a.motion.span,{"aria-hidden":!0,className:"absolute left-1/2 top-1/2 rounded-full",style:{width:e.s,height:e.s,backgroundColor:g.spark},initial:{x:0,y:0,scale:0,opacity:0},animate:{x:e.x,y:e.y,scale:[0,1,0],opacity:[0,1,0]},transition:{duration:1,ease:"easeOut",delay:e.delay}},s)),[0,.4].map(e=>(0,t.jsx)(a.motion.span,{"aria-hidden":!0,className:(0,i.twMerge)("absolute inset-0 rounded-full",g.ring),initial:{scale:.6,opacity:.6},animate:{scale:2.2,opacity:0},transition:{duration:1.8,repeat:1/0,ease:"easeOut",delay:e}},e)),(0,t.jsx)(a.motion.span,{className:(0,i.twMerge)("relative flex size-16 items-center justify-center rounded-full bg-gradient-to-b",g.core),style:{boxShadow:`0 10px 34px -8px ${g.glow}`},initial:{scale:0,rotate:-28},animate:{scale:1,rotate:0},transition:{type:"spring",stiffness:230,damping:13,delay:.08},children:(0,t.jsx)(b,{className:(0,i.twMerge)("size-8",g.icon),"aria-hidden":!0})})]}),(0,t.jsx)(a.motion.h2,{className:"text-xl font-bold text-white",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.28,duration:.45,ease:[.16,1,.3,1]},children:x}),(0,t.jsx)(a.motion.p,{className:"max-w-xs text-sm text-white/65",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.4,duration:.45,ease:[.16,1,.3,1]},children:f}),(0,t.jsxs)(a.motion.p,{className:"max-w-xs rounded-full border border-white/10 bg-white/[0.06] px-3.5 py-1.5 text-[11.5px] font-semibold text-white/55",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.5,duration:.45,ease:[.16,1,.3,1]},children:["â± ",p("dialogs.embeddedCheckout.processingDelayNote")]}),null!=d&&(0,t.jsx)(a.motion.div,{className:"w-full",initial:{opacity:0,y:10}
2,animate:{opacity:1,y:0},transition:{delay:.55,duration:.45,ease:[.16,1,.3,1]},children:(0,t.jsx)(o.Button,{color:"default",className:"mt-3 w-full rounded-full",onClick:d,children:p("common.actions.confirm")})})]})}])},242417,129983,e=>{"use strict";var t=e.i(913211);let a=()=>{if(!t.affiliatePixelUrl||!t.isProductionEnv)return null;try{let e=new URL(t.affiliatePixelUrl);return e.searchParams.set("cb",Date.now().toString(36)),e.toString()}catch{return null}};e.s(["buildAffiliatePixelSrc",0,a,"fireAffiliatePixel",0,()=>{let e=a();null!==e&&(new window.Image().src=e)}],242417),e.s(["flushMetaPixelPurchase",0,e=>{if("function"!=typeof window.fbq)return;let t=e;if(void 0===t)try{t=window.localStorage.getItem("pendingEcommercePurchase")}catch{return}if(t)try{let e=JSON.parse(t);if(!("number"==typeof e.stashedAt&&Date.now()-e.stashedAt<36e5))return;let a="number"==typeof e.revenue&&e.revenue>0?e.revenue:void 0;if(void 0===a)return;window.fbq("track","Purchase",{value:a,currency:"USD"})}catch{}}],129983)},51937,e=>{e.v({className:"outfit_1d1d0a25-module__WRwG-G__className"})},450413,e=>{e.v({className:"rubik_c87af767-module__rUyQfW__className",variable:"rubik_c87af767-module__rUyQfW__variable"})},638182,352247,e=>{"use strict";var t=e.i(51937);let a={className:t.default.className,style:{fontFamily:"'outfit', 'outfit Fallback'"}};null!=t.default.variable&&(a.variable=t.default.variable);var s=e.i(450413);let i={className:s.default.className,style:{fontFamily:"'rubik', 'rubik Fallback'"}};null!=s.default.variable&&(i.variable=s.default.variable),e.s([],638182),e.s(["outfit",0,a],352247)},419112,290,e=>{"use strict";e.s([],419112),e.s(["CheckoutBuyTokensDialog",()=>Y],290),e.i(864210),e.i(694120);var t=e.i(363130),a=e.i(483947),s=e.i(386601),i=e.i(517891),r=e.i(675876),n=e.i(587572),l=e.i(5603);e.i(345061);var o=e.i(585875),c=e.i(524794),d=e.i(38808);e.i(635743);var u=e.i(532336),p=e.i(271021),m=e.i(137373),h=e.i(825090),x=e.i(752368),f=e.i(388196),b=e.i(181064),g=e.i(360112),k=e.i(722614),y=e.i(382344),v=e.i(410345),N=e.i(820411),j=e.i(658335),w=e.i(105534);e.i(638182);var C=e.i(352247),S=e.i(100215),M=e.i(341474);e.i(901622);var T=e.i(24514);e.i(252839);var _=e.i(966129);e.i(429818);var P=e.i(509370);e.i(112762);var E=e.i(38221),D=e.i(223187),F=e.i(748555),O=e.i(931066);let $={daily:"1 day",weekly:"1 week",monthly:"1 month",quarterly:"3 month",biannual:"6 month",yearly:"1 year",custom:"Subscription"},A=e=>String(e).padStart(2,"0"),I=/(\d+(?:[.,]\d+)?)/,R=/^(\$\d+)(\.\d{2})(\/[a-z]+)?$/i,U=e=>(0,t.jsx)("strong",{children:e});function L(e){let t=I.exec(e);return t?Number.parseFloat(t[1].replace(",",".")):NaN}function z(e){if(!e)return{wasDisplay:null,discountPercent:null};let t=L(e.price);if(!Number.isFinite(t)||t<=0)return{wasDisplay:null,discountPercent:null};if(e.old_price){let a=L(e.old_price);if(Number.isFinite(a)&&a>t&&a>0){let s=Math.round((1-t/a)*100);return{wasDisplay:e.old_price.trim(),discountPercent:s>0?s:null}}}let a=(e=>{let t=I.exec(e);if(!t)return null;let a=t[1],s=Number.parseFloat(a.replace(",","."));if(!Number.isFinite(s))return null;let i=2*s,r=a.includes(",")?",":".",n=a.includes(",")?a.split(",")[1]:a.includes(".")?a.split(".")[1]:void 0,l=void 0===n?0:n.length,o=l>0?i.toFixed(l):String(Math.round(i)),c=","===r?o.replace(".",","):o;return e.replace(I,c)})(e.price);return a?{wasDisplay:a,discountPercent:50}:{wasDisplay:null,discountPercent:null}}let B=()=>(0,t.jsx)("svg",{viewBox:"0 0 12 12","aria-hidden":!0,children:(0,t.jsx)("polyline",{points:"2.5 6 5 8.5 9.5 3.5"})}),H=({secondsLeft:e})=>{let s,r,o=(0,i.useTranslations)(),c=(0,i.useTranslations)("dialogs.checkoutBuyTokens"),d=(0,l.useAppDispatch)(),u=(0,b.useRouter)(),[p,{isLoading:h}]=(0,k.useCreateSubscriptionUrlMutation)(),{data:x,isLoading:I}=(0,m.useGetHiddenSubscriptionPlansQuery)({surface:"checkout_modal"}),{isAuthorized:H}=(0,j.useIsAuthorized)(),{isEmbeddedEnabled:q,openCheckout:K}=(0,P.useCheckout)(),{launch:Y,dialog:G}=(0,E.useCheckoutLauncher)(),W=(0,a.useRef)(null),V=(0,a.useRef)(null),Q=(0,a.useRef)(null),[J,X]=(0,a.useState)(1247),Z=(0,a.useMemo)(()=>[...(x??[]).filter(e=>e.id!==S.FREE_PLAN_ID)].sort((e,t)=>
2(0,v.periodSortRank)(e.period)-(0,v.periodSortRank)(t.period)),[x]),[ee,et]=(0,a.useState)(null),ea=(0,a.useRef)(!1),es=e=>{ea.current=!0,et(e)};(0,a.useEffect)(()=>{if(0===Z.length)return;let e=Z.find(e=>"yearly"===(0,v.periodFrequencyKey)(e.period))??Z[0];et(t=>{let a=null!=t&&Z.some(e=>e.id===t);return ea.current&&a?t:e.id})},[Z]);let ei=(0,a.useMemo)(()=>Z.find(e=>e.id===ee)??Z[0],[Z,ee]),er=(0,a.useMemo)(()=>z(ei),[ei]),en=I&&0===Z.length,el=h||en,eo=(0,a.useCallback)(()=>{let t=V.current,a=Q.current;if(!t||!a||e<=0)return;let s=a.offsetWidth;for(let e=0;e<3;e++){let e=document.createElement("div");e.className="co-spark";let a=2+3*Math.random(),i=(Math.random()-.5)*24,r=-(4+14*Math.random()),n=Math.random()>.3?"#E7C778":"#C79A4C";e.style.cssText=`left:${s}px;top:50%;width:${a}px;height:${a}px;background:${n};box-shadow:0 0 4px ${n};--sx:${i}px;--sy:${r}px;`,t.appendChild(e),globalThis.setTimeout(()=>e.remove(),600)}},[e]);(0,a.useEffect)(()=>{let e=W.current;if(!e)return;let t=()=>{let t=document.createElement("div");t.className="co-particle";let a=2+2.5*Math.random();t.style.cssText=`left:${100*Math.random()}%;bottom:-4px;width:${a}px;height:${a}px;opacity:${.2+.4*Math.random()};animation-duration:${3+4*Math.random()}s;animation-delay:${1.2*Math.random()}s;`;let s=Math.random()>.4?`hsla(${30*Math.random()},85%,62%,.5)`:`hsla(${350+20*Math.random()},80%,65%,.4)`;t.style.background=s,t.style.boxShadow=`0 0 4px ${s}`,e.appendChild(t),globalThis.setTimeout(()=>t.remove(),8e3)},a=globalThis.setInterval(t,400);for(let e=0;e<8;e++)t();return()=>{globalThis.clearInterval(a),e.replaceChildren()}},[]),(0,a.useEffect)(()=>{e<=0||eo()},[e,eo]),(0,a.useEffect)(()=>{if(e<=0)return;let t=globalThis.setInterval(eo,300);return()=>globalThis.clearInterval(t)},[e,eo]),(0,a.useEffect)(()=>{var e;let t,a,s;return e=()=>{X(e=>e+Math.floor(3*Math.random()))},a=!1,(s=()=>{t=globalThis.setTimeout(()=>{a||(e(),s())},4e3+3e3*Math.random())})(),()=>{a=!0,void 0!==t&&globalThis.clearTimeout(t)}},[]);let ec=(0,a.useCallback)(()=>{d((0,O.closeCheckoutBuyTokensDialog)())},[d]),ed=async()=>{let e=ei?.id;if(q&&ei){(0,n.beginSubscriptionCheckout)(ei,n.ECOMMERCE_PURCHASE_SOURCE.specialOfferSubscription),K({kind:"subscription",subscriptionPlanId:e,amountMinor:(0,y.toMinorUnits)(ei.price),oldPriceMinor:null!=ei.old_price?(0,y.toMinorUnits)(ei.old_price):void 0,period:ei.period,tokensAmount:ei.tokens_amount,bonusTokensAmount:ei.first_purchase_tokens_amount??void 0,currency:y.SHIFT4_CURRENCY});return}let t=void 0===e?void 0:{subscriptionPlanId:e};ei?(0,n.beginSubscriptionCheckout)(ei,n.ECOMMERCE_PURCHASE_SOURCE.specialOfferSubscription):(0,n.clearPendingPurchase)();let{data:a}=await p(t);if((0,M.isDefined)(a?.redirect_url))return d((0,O.closeCheckoutBuyTokensDialog)()),u.push(a.redirect_url);g.toast.error(o("pages.profileSettingsBalance.subscription.error"))},eu=(0,v.periodFrequencyKey)(ei?.period),ep=async()=>{if((0,w.reachYandexGoal)("special_offer"),!H)return d((0,_.openSignUpDialog)());await Y({kind:"subscription",subscriptionPlanId:ei?.id,methods:ei?.payment_methods,summary:(0,N.subscriptionPurchaseSummary)(ei)},{onCard:ed})},em=ei?function(e){let t=Number.parseFloat(e.price.replace(",","."));if(!Number.isFinite(t)||t<=0)return"â";if(e.period===T.Period.year){let e=t/12;return`$${e.toFixed(2)}/mo`}if(e.period===T.Period.week)return`$${t.toFixed(2)}/wk`;let a=(0,v.parsePeriod)(e.period);return a&&"MONTH"===a.unit&&a.count>1?`$${(t/a.count).toFixed(2)}/mo`:`$${t.toFixed(2)}/mo`}(ei):"",eh=ei?(0,v.getSubscriptionPerDay)(ei.price,ei.period):null,ex=ei?.period===T.Period.year?L(ei.price):NaN,ef=ei?.period===T.Period.year&&Number.isFinite(ex)&&ex>0,eb=(s=em.replace(/\s/g,""),(r=R.exec(s))?{dollars:r[1],cents:r[2],per:r[3]??""}:null),eg=[c("subscriptionFeatureDialogs"),c("subscriptionFeatureLevels"),c("subscriptionFeatureMemory"),c("subscriptionFeatureImages")],ek=e=>$[(0,v.periodFrequencyKey)(e)]??"Subscription",ey=Z.find(e=>"monthly"===(0,v.periodFrequencyKey)(e.period)),ev=Z.find(e=>"yearly"===(0,v.periodFrequencyKey)(e.period)),eN=2===Z.length&&(0,M.isDefined)(ey
2)&&(0,M.isDefined)(ev),ej=(0,M.isDefined)(ev)&&ei?.id===ev.id,ew=(0,M.isDefined)(ev)?z(ev).discountPercent:null,eC=(0,a.useMemo)(()=>{let e=Z.map(e=>z(e).discountPercent).filter(e=>null!==e&&e>0);return e.length>0?Math.max(...e):null},[Z]),eS=new Set(Z.map(e=>(0,v.periodFrequencyKey)(e.period))).size<Z.length,eM=Math.floor(Math.max(0,e)/60),eT=Math.max(0,e)%60,e_=e<=0,eP=f.CHECKOUT_OFFER_TOTAL_SECONDS>0?Math.max(0,Math.min(100,e/f.CHECKOUT_OFFER_TOTAL_SECONDS*100)):0;return(0,t.jsxs)("div",{className:`checkout-special-offer-modal ${C.outfit.className}`,children:[(0,t.jsx)("div",{className:"co-modal-wrap",children:(0,t.jsxs)("div",{className:"co-modal",children:[(0,t.jsxs)("div",{className:"co-ambient","aria-hidden":!0,children:[(0,t.jsx)("div",{className:"co-blob co-blob-1"}),(0,t.jsx)("div",{className:"co-blob co-blob-2"}),(0,t.jsx)("div",{className:"co-blob co-blob-3"})]}),(0,t.jsx)("div",{ref:W,className:"co-particles"}),(0,t.jsxs)("div",{className:"co-modal-inner",children:[(0,t.jsx)("button",{type:"button",className:"co-close-btn",onClick:ec,"aria-label":"Close",children:"â"}),(0,t.jsxs)("div",{className:"co-col co-col-sell",children:[(0,t.jsxs)("div",{className:"co-heading",children:[null!=eC&&(0,t.jsxs)("div",{className:"co-hero-off","aria-hidden":!0,children:[(0,t.jsx)("span",{className:"co-hero-minus",children:"â"}),(0,t.jsx)("span",{className:"co-hero-num",children:eC}),(0,t.jsx)("span",{className:"co-hero-pct",children:"%"})]}),(0,t.jsxs)("h2",{className:null!=eC?"co-head-sm":void 0,children:[(0,t.jsx)("span",{children:c("subscriptionHeadline")}),(0,t.jsx)("br",{}),c("subscriptionOnlyForYou")]}),(0,t.jsx)("p",{children:c.rich("subscriptionUnlockLine",{tokens:c("subscriptionBonusTokens"),strong:U})})]}),(0,t.jsxs)("div",{className:"co-timer-section",children:[(0,t.jsxs)("div",{className:"co-timer-row",children:[(0,t.jsx)("span",{className:"co-timer-label",children:c(e_?"timerExpired":"subscriptionTimerRowLabel")}),(0,t.jsxs)("div",{className:"co-timer-pill",role:"timer","aria-live":"polite",children:[(0,t.jsxs)("div",{className:"co-t-block",children:[(0,t.jsx)("span",{className:"co-t-digit",children:A(eM)}),(0,t.jsx)("span",{className:"co-t-unit",children:c("timerMinutesShort")})]}),(0,t.jsx)("span",{className:"co-t-sep","aria-hidden":!0,children:":"}),(0,t.jsxs)("div",{className:"co-t-block",children:[(0,t.jsx)("span",{className:"co-t-digit",children:A(eT)}),(0,t.jsx)("span",{className:"co-t-unit",children:c("timerSecondsShort")})]}),(0,t.jsx)(D.OfferTimerCentiseconds,{expired:e_,prefix:"co"})]})]}),(0,t.jsx)("div",{ref:V,className:"co-urgency-bar",children:(0,t.jsx)("div",{ref:Q,className:"co-urgency-fill",style:{width:`${eP}%`}})})]}),(0,t.jsx)("ul",{className:"co-features",children:eg.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"co-ck",children:(0,t.jsx)(B,{})}),e]},e))})]}),(0,t.jsx)("div",{className:"co-col-divider","aria-hidden":!0}),(0,t.jsxs)("div",{className:"co-col co-col-buy",children:[eN&&(0,t.jsxs)("div",{className:"co-period-toggle",role:"group","aria-label":o("dialogs.premiumChat.billingPeriodAria"),children:[(0,t.jsx)("button",{type:"button",className:"co-ptg-label","data-active":!ej,onClick:()=>es(ey.id),children:"Monthly"}),(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":ej,"aria-label":o("dialogs.premiumChat.billingPeriodAria"),className:"co-ptg-switch","data-on":ej,onClick:()=>es(ej?ey.id:ev.id),children:(0,t.jsx)("span",{className:"co-ptg-knob"})}),(0,t.jsxs)("button",{type:"button",className:"co-ptg-label","data-active":ej,onClick:()=>es(ev.id),children:["Annually",null!=ew&&ew>0&&(0,t.jsxs)("span",{className:"co-ptg-save",children:["-",ew,"%"]})]})]}),!eN&&Z.length>1&&(0,t.jsx)("div",{className:"co-period-tabs",role:"tablist","aria-label":o("dialogs.premiumChat.billingPeriodAria"),children:Z.map(e=>(0,t.jsx)("button",{type:"button",role:"tab","data-active":e.id===ei?.id,"aria-selected":e.id===ei?.id,className:"co-period-tab",onClick:()=>es(e.id),children:eS?`${e.name} \xb7 ${ek(e.period)}`:ek(e.period)},e.id))}),(0,t.jsxs)("div",{className:"co-pricing-glass",children:[(0,t.jsxs)("div",{className:"co-pricing-head",children:[(0,t.jsx)("span",{className:"co-pricing-plan",children:ei?function(e,t){switch(e){case T.Period.week:return t("subscriptionPlanWeekly");case T.Period.month:return t("subscriptionPlanMonthly");case T.Period.year:return t("subscriptionPlanYearly")}return $[(0,v.periodFrequencyKey)(e)]??"Subscription"}(ei.period,c):"â"}),null!=er.discountPercent&&er.discountPercent>0&&(0,t.jsx)("span",{className:"co-save-tag",children:c("subscriptionSaveRibbon",{percent:er.discountPercent})})]}),(0,t.jsx)("div",{className:"co-pricing-main",children:null!=eh?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"co-price-now",children:[(0,t.jsx)("span",{children:`$${Math.floor(eh)}`}),(0,t.jsx)("span",{className:"co-cents",children:`.${eh.toFixed(2).split(".")[1]}`}),(0,t.jsx)("span",{className:"co-per",children:` ${o("widgets.planSelector.perDay")}`})]}),(0,t.jsxs)("span",{className:"co-pricing-evidence",children:[null!=er.wasDisplay&&(0,t.jsx)("span",{className:"co-price-was",children:(0,F.asMoney)(er.wasDisplay)}),(0,t.jsx)("span",{className:"co-price-equiv",children:em||"â"})]})]}):(0,t.jsxs)(t.Fragment,{children:[eb?(0,t.jsxs)("span",{className:"co-price-now",children:[eb.dollars,(0,t.jsx)("span",{className:"co-cents",children:eb.cents}),eb.per?(0,t.jsx)("span",{className:"co-per",children:eb.per}):null]}):(0,t.jsx)("span",{className:"co-price-now",children:em||"â"}),null!=er.wasDisplay&&(0,t.jsx)("span",{className:"co-pricing-evidence",children:(0,t.jsx)("span",{className:"co-price-was",children:(0,F.asMoney)(er.wasDisplay)})})]})}),(0,t.jsxs)("div",{className:"co-pricing-foot",children:[ef&&(0,t.jsx)("span",{children:o("dialogs.premiumChat.billedYearly",{amount:`$${ex.toFixed(2)}`})}),(0,t.jsx)("span",{children:c("subscriptionCancelAnytime")})]})]}),(0,t.jsxs)("div",{className:"co-cta-wrap",children:[(0,t.jsx)("div",{className:"co-cta-glow","aria-hidden":!0}),(0,t.jsx)("button",{type:"button",className:"co-cta",disabled:!ei||el,onClick:ep,children:(0,t.jsx)("span",{className:"relative z-[1]",children:el?c("subscriptionClaimPending"):c("subscriptionClaimDeal",{price:null!=eh?`${(0,v.formatPerDayUsd)(eh)} ${o("widgets.planSelector.perDay")}`:em||"â"})})})]}),"custom"!==eu&&(0,t.jsx)("p",{className:"mt-2 px-1 text-center text-[10px] font-normal leading-snug text-white/45",children:o("widgets.planSelector.recurringConsent",{period:o(`pages.tariffs.billing.${eu}`)})}),(0,t.jsxs)("div",{className:"co-social-proof",children:[(0,t.jsxs)("div",{className:"co-avatars","aria-hidden":!0,
2children:[(0,t.jsx)("div",{className:"co-av co-av-1"}),(0,t.jsx)("div",{className:"co-av co-av-2"}),(0,t.jsx)("div",{className:"co-av co-av-3"})]}),(0,t.jsxs)("span",{className:"co-proof-text",children:[(0,t.jsx)("strong",{children:J.toLocaleString()})," ",c("subscriptionSocialProofSuffix")]})]}),(0,t.jsxs)("div",{className:"co-foot",children:[(0,t.jsx)("span",{children:c("subscriptionTrustInstant")}),(0,t.jsx)("span",{className:"co-d"}),(0,t.jsx)("span",{children:c("subscriptionTrustSecure")}),(0,t.jsx)("span",{className:"co-d"}),(0,t.jsx)("span",{children:c("subscriptionTrustNoCommitment")})]})]})]})]})}),G]})};var q=e.i(162923);let K=f.CHECKOUT_OFFER_TOTAL_SECONDS,Y=()=>{let e=(0,i.useTranslations)("dialogs.checkoutBuyTokens"),f=(0,q.useCheckoutBuyTokensDialogOpen)(),b=(0,q.useCheckoutOfferKind)(),[g,k]=(0,a.useState)(K),[y,v]=(0,a.useState)(0),N=(0,l.useAppDispatch)(),{data:j,isSuccess:w}=(0,r.useGetProfileQuery)(),C=j?.is_premium===!0,S="subscription"===b&&(w&&C||(0,c.wasPremiumJustPurchased)()),M=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(M.current||(M.current=!0,f||window.location.pathname.includes("/payment/")||null!==(0,h.readPersistedCheckoutRequest)()))return;let e=(0,o.safeStorageGet)("special-offer");if("token_package"===e||"subscription"===e||"post_purchase"===e){let t=window.setTimeout(()=>N((0,O.openCheckoutBuyTokensDialog)(e)),400);return()=>window.clearTimeout(t)}},[]);let{isModalOfferUnavailable:T,isModalOfferFetching:_,refetch:P}=(0,m.useGetHiddenSubscriptionPlansQuery)({surface:"checkout_modal"},{skip:!f||"subscription"!==b,selectFromResult:({data:e,isSuccess:t,isError:a,isFetching:s})=>({isModalOfferUnavailable:a||t&&(e?.length??0)===0,isModalOfferFetching:s})});(0,a.useEffect)(()=>{w&&f&&"subscription"===b&&P()},[w,f,b,P]),(0,a.useEffect)(()=>{!w||!_&&f&&(S||T)&&N((0,O.closeCheckoutBuyTokensDialog)())},[f,w,_,S,T,N]),(0,a.useEffect)(()=>{f&&v(e=>e+1)},[f,b]);let E="subscription"===b?n.ECOMMERCE_PROMO.specialOfferSubscription:n.ECOMMERCE_PROMO.specialOfferTokens;(0,n.useTrackEcommercePromoView)([E],{enabled:f,sessionKey:y}),(0,a.useEffect)(()=>{f&&k(K)},[f,b]),(0,a.useEffect)(()=>{if(!f)return;let e=globalThis.setInterval(()=>{k(e=>e<=0?0:e-1)},1e3);return()=>globalThis.clearInterval(e)},[f,b]);let D=(0,a.useCallback)(()=>{N((0,O.closeCheckoutBuyTokensDialog)())},[N]),F=(0,a.useCallback)(e=>{e?N((0,O.openCheckoutBuyTokensDialog)(b)):D()},[N,D,b]),$=(0,a.useCallback)(e=>e.preventDefault(),[]),A="post_purchase"===b?"post_purchase":"default";if("subscription"===b){let a=f&&!S&&!T;return d.isMobile?(0,t.jsx)(p.Drawer,{open:a,onOpenChange:F,dismissible:!1,children:(0,t.jsxs)(p.DrawerContent,{className:"z-[60] w-full border-0 bg-transparent px-0 pb-6 pt-2 !pointer-events-auto",overlayClassName:"z-[60] !pointer-events-auto",children:[(0,t.jsx)(s.VisuallyHidden,{translate:"no",className:"notranslate",children:(0,t.jsxs)(p.DrawerTitle,{children:[e("subscriptionHeadline")," â ",e("subscriptionOnlyForYou")]})}),(0,t.jsx)("div",{className:"mx-auto box-border w-full max-w-[420px] px-3",children:!T&&(0,t.jsx)(H,{secondsLeft:g})})]})}):(0,t.jsx)(u.Dialog,{open:a,onOpenChange:F,children:(0,t.jsxs)(u.DialogContent,{showCloseButton:!1,onInteractOutside:$,className:"z-[60] max-w-[min(100vw-32px,880px)] gap-0 overflow-visible border-0 bg-transparent p-0 shadow-none !pointer-events-auto",overlayClassName:"z-[60] !pointer-events-auto",children:[(0,t.jsx)(s.VisuallyHidden,{translate:"no",className:"notranslate",children:(0,t.jsxs)(u.DialogTitle,{children:[e("subscriptionHeadline")," â ",e("subscriptionOnlyForYou")]})}),!T&&(0,t.jsx)(H,{secondsLeft:g})]})})}return d.isMobile?(0,t.jsx)(p.Drawer,{open:f,onOpenChange:F,dismissible:!1,children:(0,t.jsxs)(p.DrawerContent,{className:"data-[vaul-drawer-direction=bottom]:max-h-[96svh] w-full border-0 bg-transparent px-0 pb-3 pt-2 !pointer-events-auto",overlayClassName:"!pointer-events-auto",children:[(0,t.jsx)(s.VisuallyHidden,{translate:"no",className:"notranslate",children:(0,t.jsx)(p.DrawerTitle,{children:e("title")})}),(0,t.jsx)("div",{className:"mx-auto box-border w-full max-w-[420px] px-3",children:(0,t.jsx)(x.CheckoutBuyTokensSpecialOffer,{secondsLeft:g,variant:A})})]})}):(0,t.jsx)(u.Dialog,{open:f,onOpenChange:F,children:(0,t.jsxs)(u.DialogContent,{showCloseButton:!1,onInteractOutside:$,className:"max-w-[min(100vw-32px,880px)] gap-0 overflow-visible border-0 bg-transparent p-0 shadow-none !pointer-events-auto",overlayClassName:"!pointer-events-auto",children:[(0,t.jsx)(s.VisuallyHidden,{translate:"no",className:"notranslate",children:(0,t.jsx)(u.DialogTitle,{children:e("title")})}),(0,t.jsx)(x.CheckoutBuyTokensSpecialOffer,{secondsLeft:g,variant:A})]})})}},931066,e=>{"use strict";var t=e.i(282893);e.i(345061);var a=e.i(585875);let s=(0,t.createSlice)({name:"checkoutBuyTokensDialog",initialState:{open:!1,offerKind:"token_package"},reducers:{openCheckoutBuyTokensDialog(e,t){let s=t.payload??"token_package";(0,a.safeStorageSet)("special-offer",s),e.open=!0,e.offerKind=s},closeCheckoutBuyTokensDialog(e){(0,a.safeStorageRemove)("special-offer"),e.open=!1,e.offerKind="token_package"}}}),{actions:{openCheckoutBuyTokensDialog:i,closeCheckoutBuyTokensDialog:r}}=s;e.s(["checkoutBuyTokensDialogSlice",0,s,"clearPersistedSpecialOffer",0,()=>(0,a.safeStorageRemove)("special-offer"),"closeCheckoutBuyTokensDialog",0,r,"openCheckoutBuyTokensDialog",0,i])},864210,694120,e=>{"use strict";e.i(931066),e.s([],864210),e.i(345061);var t=e.i(585875);let a="post_purchase_token_offer_shown",s="post_purchase_token_offer_pending";e.s(["clearPostPurchaseOfferPending",0,()=>(0,t.safeStorageRemove)(s),"isPostPurchaseOfferPending",0,()=>"1"===(0,t.safeStorageGet)(s),"markPostPurchaseOfferShown",0,()=>(0,t.safeStorageSet)(a,"1"),"setPostPurchaseOfferPending",0,()=>(0,t.safeStorageSet)(s,"1"),"wasPostPurchaseOfferShown",0,()=>"1"===(0,t.safeStorageGet)(a)],694120)},752368,287474,105269,38221,112762,388196,223187,748555,e=>{"use strict";e.s(["CheckoutBuyTokensSpecialOffer",()=>ek],752368);var t=e.i(363130),a=e.i(483947),s=e.i(390132),i=e.i(181064),r=e.i(51
27891),n=e.i(360112),l=e.i(382344),o=e.i(950959),c=e.i(658335),d=e.i(587572);e.i(638182);var u=e.i(352247),p=e.i(5603);e.i(345061);var m=e.i(395102),h=e.i(341474),x=e.i(225519),f=e.i(87252),b=e.i(382785),g=e.i(275374),k=e.i(689976),y=e.i(137373);e.i(252839);var v=e.i(966129);e.i(429818);var N=e.i(509370),j=e.i(877130),w=e.i(722614);e.i(842299);let C=["card","crypto"],S=e=>{let t=(e??[]).filter(e=>C.includes(e));return t.length>0?t:["card"]},M=()=>!!window.Telegram?.WebApp,T=()=>{let e=(0,r.useTranslations)(),t=(0,i.useRouter)(),[s,l]=(0,w.useCreateSubscriptionUrlMutation)(),[o,c]=(0,y.useCreateOrderUrlMutation)(),[d,u]=(0,w.useCreateCryptoSubscriptionMutation)(),[p,x]=(0,w.useCreateCryptoOrderMutation)(),[f,b]=(0,w.useCreateTelegramSubscriptionMutation)(),[g,k]=(0,w.useCreateTelegramOrderMutation)(),v=[l,c,u,x,b,k].some(e=>e.isLoading),N=(0,a.useCallback)(async(a,i)=>{let r=async()=>{if("subscription"===a.kind){let e={subscriptionPlanId:a.subscriptionPlanId};if("crypto"===i){let{data:t,error:a}=await d(e);return{url:t?.redirect_url,error:a}}if("telegram"===i){let{data:t,error:a}=await f(e);return{url:M()?t?.webapp_redirect_url??t?.redirect_url:t?.redirect_url,error:a}}let{data:t,error:r}=await s((0,h.isDefined)(a.subscriptionPlanId)?{subscriptionPlanId:a.subscriptionPlanId}:void 0);return{url:t?.redirect_url,error:r}}let e={token_package_id:a.tokenPackageId};if("crypto"===i){let{data:t,error:a}=await p(e);return{url:t?.redirect_url,error:a}}if("telegram"===i){let{data:t,error:a}=await g(e);return{url:M()?t?.webapp_redirect_url??t?.redirect_url:t?.redirect_url,error:a}}let{data:t,error:r}=await o(e);return{url:t?.redirect_url,error:r}},{url:l,error:c}=await r();if((0,h.isDefined)(c)||!(0,h.isDefined)(l))return n.toast.error(((0,m.isErrorResponse)(c)&&(0,m.isApiError)(c.data)?(0,m.getErrorMessage)(c):null)??e("dialogs.paymentMethod.unavailable")),!1;return t.push(l),!0},[o,s,p,d,t,e,g,f]);return(0,a.useMemo)(()=>({start:N,isStarting:v}),[N,v])};var _=e.i(105534),P=e.i(38808);e.i(635743);var E=e.i(532336),D=e.i(271021),F=e.i(578923);e.i(451338);var O=e.i(653629),$=e.i(79847),A=e.i(467378);let I="text-[#E7C778] hover:underline",R=({values:e,onChange:s,errors:i,isTaken:n,onSignIn:l,isRegistered:o,disabled:c,onSubmit:d})=>{let u=(0,r.useTranslations)(),p=(0,a.useId)(),m=(0,a.useId)(),h=e=>void 0!==e&&u.has(e)?u(e):e,x=h(i.email);return(0,t.jsxs)("section",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:p,className:"text-[11px] font-semibold uppercase tracking-wider text-white/55",children:u("dialogs.signUp.tabs.email.labels.email")}),(0,t.jsx)(A.Input,{id:p,type:"email",inputMode:"email",autoComplete:"email",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,enterKeyHint:"go",autoFocus:!P.isMobile,value:e.email,onChange:t=>s({...e,email:t.target.value}),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d())},placeholder:u("dialogs.signUp.tabs.email.placeholders.email"),disabled:c||o,"aria-invalid":void 0!==x,"aria-describedby":void 0!==x?m:void 0,className:"rounded-2xl border border-white/10 bg-white/[0.06] px-4 py-3 text-base text-white shadow-none transition-colors placeholder:text-white/40 hover:border-white/15 hover:bg-white/[0.08] focus:border-[#E7C778]/60 focus:bg-white/[0.08] focus:shadow-none disabled:opacity-60 aria-[invalid=true]:border-error/70"}),void 0!==x&&(0,t.jsxs)("p",{id:m,role:"alert",className:"text-xs leading-relaxed text-error",children:[x,n&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("button",{type:"button",onClick:l,className:"font-semibold text-[#E7C778] underline-offset-2 hover:underline",children:u("dialogs.signUp.login")})]})]}),!o&&(0,t.jsxs)("div",{className:"mt-1 flex flex-col gap-2",children:[(0,t.jsxs)("label",{className:"flex items-center gap-1.5",children:[(0,t.jsx)($.Checkbox,{checked:e.ageConfirmation,onCheckedChange:t=>s({...e,ageConfirmation:!0===t}),disabled:c,"aria-invalid":void 0!==i.ageConfirmation,className:"size-2.5"}),(0,t.jsx)("span",{className:"text-[11px] leading-snug text-white/70",children:u("dialogs.signUp.labels.ageConfirmation")})]}),void 0!==i.ageConfirmation&&(0,t.jsx)("p",{role:"alert",className:"text-xs text-error",children:h(i.ageConfirmation)}),(0,t.jsxs)("label",{className:"flex items-center gap-1.5",children:[(0,t.jsx)($.Checkbox,{checked:e.termsAgreement,onCheckedChange:t=>s({...e,termsAgreement:!0===t}),disabled:c,"aria-invalid":void 0!==i.termsAgreement,className:"size-2.5"}),(0,t.jsx)("span",{className:"text-[11px] leading-snug text-white/70",children:u.rich("dialogs.signUp.labels.termsAgreement",{termsLink:e=>(0,t.jsx)("a",{className:I,href:O.AppRoutes.TermsOfService,target:"_blank",rel:"noreferrer",children:e}),privacyLink:e=>(0,t.jsx)("a",{className:I,href:O.AppRoutes.PrivacyPolicy,target:"_blank",rel:"noreferrer",children:e})})})]}),void 0!==i.termsAgreement&&(0,t.jsx)("p",{role:"alert",className:"text-xs text-error",children:h(i.termsAgreement)})]})]})};var U=e.i(503748),U=U,L=e.i(279460);e.s(["Check",()=>L.default],287474);var L=L,z=e.i(114005);
2let B=(0,z.default)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var H=e.i(716632),H=H;let q=(0,z.default)("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);var K=e.i(811658),K=K,Y=e.i(979373),G=e.i(643011),W=e.i(252428),V=e.i(410345);e.i(471337);var Q=e.i(581349),J=e.i(137427),J=J,X=e.i(920468),Z=e.i(367806);e.i(613937);var ee=e.i(865238),et=e.i(617681);let ea=(0,z.default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),es=e=>String(e).padStart(2,"0"),ei=({expiresAt:e,precision:s="centiseconds"})=>{let i=(0,r.useTranslations)(),[n,l]=(0,a.useState)(null);if((0,a.useEffect)(()=>{let t;if(void 0!==e&&!Number.isFinite(e))return;let a=e??Date.now()+3e5,i=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{if(document.hidden)return;let e=Math.max(0,a-Date.now());l({value:e,reducedMotion:i.matches}),e>0&&(t=globalThis.setTimeout(r,i.matches||"seconds"===s?1e3:50))},n=()=>{globalThis.clearTimeout(t),r()};return t=globalThis.setTimeout(r,0),document.addEventListener("visibilitychange",n),i.addEventListener("change",n),()=>{globalThis.clearTimeout(t),document.removeEventListener("visibilitychange",n),i.removeEventListener("change",n)}},[e,s]),void 0!==e&&!Number.isFinite(e))return null;let o=n?.value??0,c=es(Math.floor(o/6e4)),d=es(Math.floor(o/1e3)%60),u=es(n?.reducedMotion?0:Math.floor(o%1e3/10)),p=i(void 0===e?"dialogs.embeddedCheckout.secureCheckout":n?.value===0?"dialogs.checkoutBuyTokens.timerExpired":"dialogs.checkoutBuyTokens.tokenOfferTimerRowLabel");return(0,t.jsxs)("span",{role:"timer","aria-live":"off","aria-label":`${p} ${n?`${c}:${d}`:""}`,className:"inline-flex shrink-0 items-center gap-1.5 rounded-full border border-[#E7C778]/30 bg-[#E7C778]/10 px-2.5 py-1.5 text-xs font-semibold text-[#E7C778]",children:[(0,t.jsx)(ea,{className:"size-3.5","aria-hidden":"true"}),(0,t.jsxs)("span",{"aria-hidden":"true",className:"tabular-nums",children:[(0,t.jsx)("span",{children:n?`${c}:${d}`:"--:--"}),"centiseconds"===s&&(0,t.jsx)("span",{className:"text-[10px] opacity-70",children:n?`:${u}`:":--"})]})]})};e.s(["CheckoutOfferTimer",0,ei],105269);let er=({purchase:e,methods:a,selected:i,onSelect:n,onPay:l,onClose:o,isLoading:c,account:d})=>{let u=(0,r.useTranslations)(),p=(0,r.useFormatter)(),m=e?.summary,h=e?.kind==="tokens"?e.summary:void 0,x=e?.kind==="subscription"?e.summary:void 0,f=e?.kind==="subscription",b=(0,V.periodFrequencyKey)(x?.period),g="yearly"===b?"termYear":"monthly"===b?"termMonth":"weekly"===b?"termWeek":null,k=e=>p.number(e/100,{style:"currency",currency:m?.currency??"USD"}),y=x?(0,V.getSubscriptionPerDay)((x.amountMinor/100).toFixed(2),x.period):null,v="yearly"===b?"billedYear":"monthly"===b?"billedMonth":"weekly"===b?"billedWeek":null,N=x&&null!==y?v?u(`widgets.planSelector.${v}`,{total:k(x.amountMinor)}):"quarterly"===b||"biannual"===b?`${k(x.amountMinor)} ${u("pages.tariffs.v2.tier.perPeriod",{period:u(`pages.tariffs.v2.periodNames.${b}`)})}`:`${k(x.amountMinor)}${(0,V.periodPriceSuffix)(x.period)}`:null,j=m?.oldPriceMinor?Math.round((1-m.amountMinor/m.oldPriceMinor)*100):0,w="number"==typeof e?.offerExpiresAt&&Number.isFinite(e.offerExpiresAt)?e.offerExpiresAt:void 0;return(0,t.jsxs)("div",{className:"flex flex-col gap-5 px-6 pb-6 pt-1 text-[#f7f5f2]",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 text-xs font-medium",children:[(0,t.jsx)(q,{className:"size-4 shrink-0 text-[#E7C778]",strokeWidth:1.6}),u("dialogs.embeddedCheckout.secureCheckout")]}),e&&(0,t.jsx)(ei,{expiresAt:w},`${e.kind}:${"tokens"===e.kind?e.tokenPackageId:e.subscriptionPlanId}:${w??"session"}`),(0,t.jsx)("button",{type:"button","aria-label":u("common.actions.close"),onClick:o,className:"grid size-8 shrink-0 place-items-center rounded-full bg-white/[0.07] text-white/60 hover:bg-white/10 disabled:opacity-40",children:(0,t.jsx)(G.X,{className:"size-4"})})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-white/80",children:f?u(g?`dialogs.embeddedCheckout.${g}`:"pages.tariffs.billing.custom"):u("dialogs.profileBuyTokens.title")}),j>0&&(0,t.jsx)("span",{className:"shrink-0 text-xs font-semibold text-[#E7C778]",children:u("dialogs.postPurchaseOffer.save",{percent:j})})]}),f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-baseline gap-x-2",children:[(0,t.jsx)("strong",{className:"text-[36px] font-semibold leading-tight tracking-[-0.04em] text-[#E7C778]",children:x?k(null!==y?100*y:x.amountMinor):"â"}),null!==y&&(0,t.jsx)("span",{className:"text-sm text-white/60",children:u("widgets.planSelector.perDay")})]}),N&&(0,t.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-white/60",children:N}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-white/60",children:[(0,t.jsx)("span",{children:u("dialogs.checkoutBuyTokens.subscriptionCancelAnytime")}),x?.bonusTokens&&(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-[#E7C778]",children:[(0,t.jsx)(s.default,{src:ee.tokenImage,alt:"",width:18,height:18,className:"size-[18px]"}),u("dialogs.embeddedCheckout.tokensIncluded",{count:p.number(x.bonusTokens)})]})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"my-4 flex items-center gap-3",children:[(0,t.jsx)(s.default,{src:ee.tokenImage,alt:"",width:44,height:44,className:"size-11 shrink-0 object-contain drop-shadow-[0_3px_8px_rgba(199,154,76,0.3)]"}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1",children:[(0,t.jsx)("strong",{className:"min-w-0 break-words text-[32px] font-bold leading-none tracking-[-0.035em] text-[#FFF3D2]",children:h?p.number(h.tokenAmount):u("common.units.tokens")}),(0,t.jsx)("span",{className:"text-sm font-medium text-[#E7C778]",children:u("common.units.tokens")})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-xs text-white/65",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(L.default,{className:"size-3.5 text-[#E7C778]"}),u("dialogs.checkoutBuyTokens.tokenOfferFootNeverExpires")]}),h?.bonusSwipes&&(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-[#E7C778]",children:[(0,t.jsx)(Y.Sparkles,{className:"size-3.5"}),"+",u("common.plurals.swipe",{count:h.bonusSwipes})]})]}),m&&(0,t.jsxs)("div",{className:"mt-4 flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"max-w-[50%] text-xs leading-relaxed text-white/60",children:u("pages.myPremium.oneTimeNoSub")}),(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-end gap-2",children:[m.oldPriceMinor&&(0,t.jsx)("s",{className:"text-xs text-white/35",children:k(m.oldPriceMinor)}),(0,t.jsx)("strong",{className:"text-[28px] font-bold leading-none tracking-[-0.04em] text-[#FFF3D2]",children:k(m.amountMinor)})]})]})]})]}),d,(0,t.jsxs)(et.Tabs,{value:i,onValueChange:e=>{a.includes(e)&&n(e)},className:"gap-0",children:[a.length>1&&(0,t.jsx)(et.TabsList,{"aria-label":u("dialogs.paymentMethod.title"),className:"gap-1 rounded-full bg-black/15 p-1",children:a.map(e=>{let a="card"===e?B:"crypto"===e?W.Zap:K.default;
2return(0,t.jsxs)(et.TabsTrigger,{value:e,disabled:c,className:"gap-2 rounded-full border-0 py-2.5 text-sm text-white/50 transition-colors hover:text-white data-[state=active]:bg-[#C79A4C]/25 data-[state=active]:font-semibold data-[state=active]:text-[#E7C778]",children:[(0,t.jsx)(a,{className:"size-4"}),u(`dialogs.paymentMethod.${e}`)]},e)})}),a.map(e=>(0,t.jsxs)(et.TabsContent,{value:e,className:"flex h-[56px] flex-none flex-col items-center justify-center gap-2 py-3 text-center data-[state=active]:flex-none",children:["card"===e&&(0,t.jsxs)("div",{className:"flex items-center gap-3",role:"img","aria-label":"Visa, Mastercard, JCB, American Express",children:[(0,t.jsx)(Z.VisaIcon,{className:"h-6 w-[35px]","aria-hidden":"true"}),(0,t.jsx)(X.MasterIcon,{className:"h-6 w-[35px]","aria-hidden":"true"}),(0,t.jsx)(J.default,{className:"h-6 w-[35px]","aria-hidden":"true"}),(0,t.jsx)(Q.AmexIcon,{className:"h-6 w-[35px]","aria-hidden":"true"})]}),"card"!==e&&(0,t.jsx)("p",{className:"text-[11px] leading-relaxed text-white/50",children:u(`dialogs.paymentMethod.${e}Hint`)})]},e)),(0,t.jsx)("button",{type:"button",onClick:l,disabled:c,"aria-busy":c,className:"checkout-gold-cta relative flex min-h-[56px] w-full items-center justify-center gap-3 overflow-hidden rounded-full px-4 py-3 text-[15px] font-extrabold disabled:cursor-wait disabled:opacity-70",children:c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.default,{className:"size-4 animate-spin motion-reduce:animate-none"}),u("dialogs.shift4CardForm.processing")]}):(0,t.jsxs)(t.Fragment,{children:[u("dialogs.paymentMethod.continue"),(0,t.jsx)(U.default,{className:"size-4"})]})})]})]})},en={email:"",ageConfirmation:!0,termsAgreement:!0},el=({open:e,onOpenChange:s,purchase:i,onCard:n,signUp:l})=>{let c=(0,r.useTranslations)(),{start:d,isStarting:u}=T(),p=S(i?.methods),h=(0,o.preferredPaymentMethod)(p),[x,f]=(0,a.useState)(h),[b,g]=(0,a.useState)(!1),k=(0,a.useRef)(!1),y=u||b,[v,N]=(0,a.useState)(en),[w,C]=(0,a.useState)({}),[M,O]=(0,a.useState)(!1),[$,A]=(0,a.useState)(!1),I=(0,a.useRef)(!1);(0,a.useEffect)(()=>{e&&(f(h),C({}),O(!1))},[e,i,h]);let U=async()=>{if(!i||k.current||y||!p.includes(x))return;let e=void 0!==l&&!I.current,t="";if(e){let e=F.signUpEmailSchema.safeParse(v);if(!e.success){let t={};for(let a of e.error.issues){let e=a.path[0];t[e]??=a.message}C(t),O(!1);return}t=e.data.email}k.current=!0,g(!0);try{if(e){C({}),O(!1);let e=await l.register(t);if("taken"===e.status){C({email:"dialogs.signUp.errors.emailTaken"}),O(!0);return}if("error"===e.status){let t=(0,m.isErrorResponse)(e.error)&&422===e.error.status;C({email:t?"common.errors.invalidEmail":"dialogs.paymentMethod.signUpFailed"});return}I.current=!0,A(!0)}if(p.length>1&&(0,_.reachYandexGoal)("payment_method_select"),"card"===x&&n){if(!l||l.cardOpensOwnSurface){s(!1),await n();return}let e=await n();!1!==e&&s(!1);return}await d(i,x)&&s(!1)}finally{k.current=!1,g(!1)}},L=(0,t.jsx)(er,{purchase:i,methods:p,selected:x,onSelect:f,onPay:U,onClose:()=>s(!1),isLoading:y,account:l?(0,t.jsx)(R,{values:v,onChange:e=>{N(e),C({}),O(!1)},errors:w,isTaken:M,onSignIn:()=>{if(!l)return;let e=v.email.trim();s(!1),window.setTimeout(()=>l.onSignIn(e),50)},isRegistered:$,disabled:y,onSubmit:U}):void 0}),z="border-0 bg-transparent bg-[linear-gradient(145deg,rgba(88,80,79,0.38),rgba(22,20,26,0.61)_55%,rgba(32,27,25,0.56))] backdrop-blur-2xl backdrop-saturate-150 shadow-[0_20px_80px_-20px_rgba(0,0,0,0.5)]",B="z-[70] !pointer-events-auto bg-black/40 backdrop-blur-none";return P.isMobile?(0,t.jsx)(D.Drawer,{open:e,onOpenChange:s,children:(0,t.jsxs)(D.DrawerContent,{className:(0,j.twMerge)(z,"z-[70] overflow-y-auto px-0","!pointer-events-auto data-[vaul-drawer-direction=bottom]:rounded-t-[28px] pb-[env(safe-area-inset-bottom)]"),overlayClassName:B,children:[(0,t.jsx)(D.DrawerHeader,{className:"sr-only",children:(0,t.jsx)(D.DrawerTitle,{children:c("dialogs.paymentMethod.title")})}),L]})}):(0,t.jsx)(E.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(E.DialogContent,{showCloseButton:!1,className:(0,j.twMerge)(z,"z-[70] max-w-[420px] px-0","!pointer-events-auto max-h-[90dvh] overflow-y-auto rounded-[28px] pb-0 pt-5 data-[state=closed]:zoom-out-100 data-[state=open]:zoom-in-100"),overlayClassName:B,children:[(0,t.jsx)(E.DialogHeader,{className:"sr-only",children:(0,t.jsx)(E.DialogTitle,{children:c("dialogs.paymentMethod.title")})}),L]})})},eo=()=>{let{start:e,isStarting:s}=T(),[i,r]=(0,a.useState)(null);return{launch:(0,a.useCallback)(async(t,a)=>{let s=S(t.methods);1!==s.length||a?.signUp?r({purchase:t,onCard:a?.onCard,signUp:a?.signUp}):"card"===s[0]&&a?.onCard?await a.onCard():await e(t,s[0])},[e]),isStarting:s,dialog:(0,t.jsx)(el,{open:null!==i,onOpenChange:e=>{e||r(e=>e===i?null:e)},purchase:i?.purchase??null,onCard:i?.onCard,signUp:i?.signUp})}};e.s(["useCheckoutLauncher",0,eo],38221),e.s([],112762),e.s(["CHECKOUT_OFFER_TOTAL_SECONDS",0,300],388196);let ec=({expired:e,prefix:s})=>{let[i,r]=(0,a.useState)(99);(0,a.useEffect)(()=>
2{if(e)return;let t=globalThis.setInterval(()=>{r(Math.floor((1e3-performance.now()%1e3)/10)%100)},50);return()=>globalThis.clearInterval(t)},[e]);let n=e?0:i;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:`${s}-t-sep`,"aria-hidden":!0,children:":"}),(0,t.jsxs)("div",{className:`${s}-t-block`,"aria-hidden":!0,children:[(0,t.jsx)("span",{className:`${s}-t-digit`,children:String(n).padStart(2,"0")}),(0,t.jsx)("span",{className:`${s}-t-unit`,children:"ms"})]})]})};e.s(["OfferTimerCentiseconds",0,ec],223187);var ed=e.i(640678);let eu=e=>/[^\d.,\s]/.test(e)?e:`$${e}`,ep=/(\d+(?:[.,]\d+)?)/,em=({packages:e,selectedId:a,onSelect:i,bestValueId:n,className:l})=>{let o=(0,r.useTranslations)("dialogs.checkoutBuyTokens"),c=(0,r.useTranslations)(),d=(0,ed.useTokenPriceList)(),u=e.length,p=e.findIndex(e=>e.id===a),m=p>=0?e[p]:void 0,h=m?.old_price!=null?Number.parseFloat(m.old_price):NaN,x=null!=m?Number.parseFloat(m.price):NaN,f=Number.isFinite(h)&&Number.isFinite(x)&&h>x?Math.round((1-x/h)*100):0,b=null==m?null:f>0?m.old_price:(e=>{let t=ep.exec(e);if(!t)return null;let a=t[1],s=Number.parseFloat(a.replace(",","."));if(!Number.isFinite(s))return null;let i=2*s,r=a.includes(",")?",":".",n=a.includes(",")?a.split(",")[1]:a.includes(".")?a.split(".")[1]:void 0,l=void 0===n?0:n.length,o=l>0?i.toFixed(l):String(Math.round(i)),c=","===r?o.replace(".",","):o;return e.replace(ep,c)})(m.price),g=f>0,k=d.chat.image,y=d.chat.video,v=null!=m&&k>0?Math.floor(m.amount/k):0,N=null!=m&&y>0?Math.floor(m.amount/y):0,j=null!=m&&Number.isFinite(x)&&m.amount>0?(100*x/m.amount).toFixed(2):null;return(0,t.jsxs)("div",{className:`tp-slider-block ${l??""}`,children:[(0,t.jsxs)("div",{className:"tp-slider-readout",children:[(0,t.jsxs)("div",{className:"tp-slider-tokens",children:[(0,t.jsx)(s.default,{src:ee.tokenImage,alt:"",width:30,height:30,className:"tp-slider-coin"}),(0,t.jsx)("span",{className:"tp-slider-amount",children:m?m.amount.toLocaleString():"â"}),(0,t.jsx)("span",{className:"tp-slider-tokens-label",children:o("tokenOfferTokensLabel")})]}),(0,t.jsxs)("div",{className:"tp-slider-price",children:[null!=b&&(0,t.jsx)("span",{className:"tp-slider-was",children:eu(b)}),(0,t.jsx)("span",{className:"tp-slider-now",children:m?eu(m.price):""}),null!=b&&(0,t.jsx)("span",{className:"tp-slider-off",children:g?c("pages.tariffs.tokens.percentOff",{percent:f}):o("saveHalf")})]})]}),(v>0||N>0||null!=j)&&(0,t.jsxs)("div",{className:"tp-value",children:[v>0&&(0,t.jsx)("span",{className:"tp-value-item",children:o("valuePhotos",{count:v.toLocaleString()})}),N>0&&(0,t.jsx)("span",{className:"tp-value-item",children:o("valueVideos",{count:N.toLocaleString()})}),null!=j&&(0,t.jsx)("span",{className:"tp-value-rate",children:o("valuePerToken",{cents:j})})]}),u>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{type:"range",className:"tp-slider",min:0,max:u-1,step:1,value:p>=0?p:0,onChange:t=>{let a=e[Number(t.target.value)];a&&i(a.id)},"aria-label":o("tokenOfferTokensLabel"),style:{"--tp-slider-pct":`${Math.max(0,p)/(u-1)*100}%`}}),(0,t.jsx)("div",{className:"tp-slider-ticks",children:e.map((e,a)=>(0,t.jsxs)("button",{type:"button",className:`tp-tick${a===p?" tp-tick-on":""}`,onClick:()=>i(e.id),style:{"--tp-tick-k":`${a/(u-1)}`},children:[(0,t.jsx)("span",{className:"tp-tick-amount",children:e.amount.toLocaleString()}
2),e.id===n&&(0,t.jsx)("span",{className:"tp-tick-best",children:o("tokenPopularBadge")})]},e.id))})]})]})};e.s(["TokenPackSlider",0,em,"asMoney",0,eu],748555),e.i(864210);var eh=e.i(931066);let ex=e=>String(e).padStart(2,"0"),ef=e=>(0,t.jsx)("strong",{children:e}),eb=[{key:"strip",image:k.bannerStripMobileImage},{key:"meets",image:g.bannerMeetsMobileImage},{key:"city",image:x.bannerCrushiCityMobileImage},{key:"media",image:b.bannerImgVideoMobileImage},{key:"photos",image:f.bannerEpisodesMobileImage}],eg=e=>{e.classList.remove("tp-flip"),e.getBoundingClientRect(),e.classList.add("tp-flip")},ek=({secondsLeft:e,variant:x="default"})=>{let f=(0,r.useTranslations)("dialogs.checkoutBuyTokens"),b=(0,r.useTranslations)("dialogs.postPurchaseOffer"),g="post_purchase"===x,k=(0,i.useRouter)(),j=(0,p.useAppDispatch)(),{data:w}=(0,y.useGetHiddenTokenPackagesQuery)(),[C,S]=(0,a.useState)(null),[M,{isLoading:T}]=(0,y.useCreateOrderUrlMutation)(),{isAuthorized:_}=(0,c.useIsAuthorized)(),{isEmbeddedEnabled:P,openCheckout:E}=(0,N.useCheckout)(),{launch:D,dialog:F}=eo(),O=(0,a.useRef)(null),$=(0,a.useRef)(null),A=(0,a.useRef)(null),I=(0,a.useRef)(null),R=(0,a.useRef)(null),U=(0,a.useRef)(null),L=(0,a.useRef)(null),[z,B]=(0,a.useState)(3482),H=(0,a.useMemo)(()=>[...w??[]].sort((e,t)=>e.amount-t.amount),[w]),q=(0,a.useMemo)(()=>H.length?H.reduce((e,t)=>t.amount>e.amount?t:e,H[0]).id:null,[H]);(0,a.useEffect)(()=>{if(0===H.length||null!==C)return;let e=H.find(e=>e.id===q)??H.at(-1);e&&S(e.id)},[H,C,q]);let K=(0,a.useCallback)(()=>{let t=A.current,a=I.current;if(!t||!a||e<=0)return;let s=a.offsetWidth;for(let e=0;e<3;e++){let e=document.createElement("div");e.className="tp-spark";let a=2+3*Math.random(),i=(Math.random()-.5)*28,r=-(5+16*Math.random()),n=Math.random()>.4?"#E7C778":"#C79A4C";e.style.cssText=`left:${s}px;top:50%;width:${a}px;height:${a}px;background:${n};box-shadow:0 0 5px ${n};--sx:${i}px;--sy:${r}px;`,t.appendChild(e),globalThis.setTimeout(()=>e.remove(),600)}},[e]);(0,a.useEffect)(()=>{let e=O.current;if(!e)return;let t=()=>{let t=document.createElement("div");t.className="tp-particle";let a=2+2.5*Math.random(),s=Math.random()>.4?`hsla(${40+8*Math.random()},78%,60%,.5)`:`hsla(${36+6*Math.random()},60%,52%,.4)`;t.style.cssText=`left:${100*Math.random()}%;bottom:-4px;width:${a}px;height:${a}px;opacity:${.2+.4*Math.random()};animation-duration:${3+4*Math.random()}s;animation-delay:${1.2*Math.random()}s;background:${s};box-shadow:0 0 4px ${s}`,e.appendChild(t),globalThis.setTimeout(()=>t.remove(),8e3)},a=globalThis.setInterval(t,400);for(let e=0;e<8;e++)t();return()=>{globalThis.clearInterval(a),e.replaceChildren()}},[]),(0,a.useEffect)(()=>{let e=$.current;if(!e)return;let t=!1,a=[],s=()=>{if(t||!e.isConnected)return;let i=document.createElement("div");i.className="tp-sparkle";let r=3+5*Math.random(),n=2+3*Math.random(),l=Math.random()>.5?"rgba(231,199,120,.5)":"rgba(199,154,76,.4)";i.style.cssText=`left:${100*Math.random()}%;top:${100*Math.random()}%;width:${r}px;height:${r}px;background:${l};border-radius:50%;box-shadow:0 0 ${2*r}px ${l};--tp-dur:${n}s;animation-delay:${Math.random()*n}s`,e.appendChild(i);let o=globalThis.setTimeout(()=>{i.remove(),t||s()},3*n*1e3);a.push(o)};for(let e=0;e<12;e++)a.push(globalThis.setTimeout(()=>s(),200*e));return()=>{t=!0,a.forEach(e=>globalThis.clearTimeout(e)),e.replaceChildren()}},[]),(0,a.useEffect)(()=>{e<=0||K()},[e,K]),(0,a.useEffect)(()=>{if(e<=0)return;let t=globalThis.setInterval(K,300);return()=>globalThis.clearInterval(t)},[e,K]),(0,a.useEffect)(()=>{let t=Math.floor(Math.max(0,e)/60);null!==L.current&&L.current!==t&&R.current&&eg(R.current),L.current=t},[e]),(0,a.useEffect)(()=>{!(e<=0)&&U.current&&eg(U.current)},[e]),(0,a.useEffect)(()=>{var e;let t,a,s;return e=()=>{B(e=>e+Math.floor(3*Math.random()))},a=!1,(s=()=>{t=globalThis.setTimeout(()=>{a||(e(),s())},4e3+3e3*Math.random())})(),()=>{a=!0,void 0!==t&&globalThis.clearTimeout(t)}},[]);let Y=(0,a.useCallback)(()=>{j((0,eh.closeCheckoutBuyTokensDialog)())},[j]),G=async e=>{let t=H.find(t=>t.id===e);if(P&&t){(0,d.beginTokenPackageCheckout)(t,d.ECOMMERCE_PURCHASE_SOURCE.specialOfferTokens);let a=(0,l.toMinorUnits)(t.price),s=null!=t.old_price?Number.parseFloat(t.old_price):NaN,i=Number.isFinite(s)&&s>Number.parseFloat(t.price)?(0,l.toMinorUnits)(t.old_price):2*a;E({kind:"tokens",tokenPackageId:e,tokenAmount:t.amount,amountMinor:a,oldPriceMinor:i,currency:l.SHIFT4_CURRENCY});return}t?(0,d.beginTokenPackageCheckout)(t,d.ECOMMERCE_PURCHASE_SOURCE.specialOfferTokens):(0,d.clearPendingPurchase)();let{data:a,error:s}=await M({token_package_id:e});if((0,h.isDefined)(a?.redirect_url)){j((0,eh.closeCheckoutBuyTokensDialog)()),k.push(a.redirect_url);return}n.toast.error((0,m.getErrorMessage)(s))},W=async()=>
2{if(!C)return;if(!_)return j((0,v.openSignUpDialog)());let e=H.find(e=>e.id===C);await D({kind:"tokens",tokenPackageId:C,methods:e?.payment_methods,summary:(0,o.tokenPurchaseSummary)(e)},{onCard:()=>G(C)})},V=Math.floor(Math.max(0,e)/60),Q=Math.max(0,e)%60,J=e<=0,X=Math.max(0,Math.min(100,e/300*100)),Z=H.findIndex(e=>e.id===C),ee=Z>=0?H[Z]:void 0,et=H.length,ea=(0,a.useMemo)(()=>{let e=H.map(e=>{let t=null!=e.old_price?Number.parseFloat(e.old_price):NaN,a=Number.parseFloat(e.price);return Number.isFinite(t)&&Number.isFinite(a)&&t>a?Math.round((1-a/t)*100):0}).filter(e=>e>0);return e.length>0?Math.max(...e):50*(H.length>0)},[H]),es=(0,a.useMemo)(()=>{if(void 0===ee)return f("tokenOfferCtaPlaceholder");let e=2===et&&0===Z?"tokenPackNameStarter":2===et&&1===Z?"tokenPackNameMega":"tokenOfferTokensPack",t="tokenOfferTokensPack"===e?f("tokenOfferTokensPack",{count:ee.amount.toLocaleString()}):f(e);return f("tokenOfferCta",{packName:t,price:eu(ee.price)})},[ee,Z,f,et]);return(0,t.jsxs)("div",{className:`checkout-token-packs-modal ${u.outfit.className}`,children:[(0,t.jsx)("div",{className:"tp-modal-wrap",children:(0,t.jsxs)("div",{className:"tp-modal",children:[(0,t.jsxs)("div",{className:"tp-ambient","aria-hidden":!0,children:[(0,t.jsx)("div",{className:"tp-blob tp-blob-1"}),(0,t.jsx)("div",{className:"tp-blob tp-blob-2"}),(0,t.jsx)("div",{className:"tp-blob tp-blob-3"})]}),ea>0&&(0,t.jsx)("div",{className:"tp-backdrop","aria-hidden":!0,children:(0,t.jsx)(s.default,{src:eb[0].image,alt:"",fill:!0,sizes:"440px",className:"tp-backdrop-art"})}),(0,t.jsx)("div",{ref:$,className:"tp-sparkles"}),(0,t.jsx)("div",{ref:O,className:"tp-particles"}),(0,t.jsxs)("div",{className:"tp-modal-inner",children:[(0,t.jsx)("button",{type:"button",className:"tp-close-btn",onClick:Y,"aria-label":"Close",children:"â"}),(0,t.jsxs)("div",{className:"tp-col tp-col-sell",children:[(0,t.jsxs)("div",{className:"tp-heading",children:[ea>0&&(0,t.jsxs)("div",{className:"tp-hero-off","aria-hidden":!1,children:[(0,t.jsx)("span",{className:"tp-hero-minus",children:"â"}),(0,t.jsx)("span",{className:"tp-hero-num",children:ea}),(0,t.jsx)("span",{className:"tp-hero-pct",children:"%"})]}),g?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h2",{className:"tp-head-sm",children:[(0,t.jsx)("span",{className:"tp-word",style:{animationDelay:"0.15s"},children:b("headOne")})," ",(0,t.jsx)("span",{className:"tp-word tp-gradient",style:{animationDelay:"0.25s"},children:b("headSpecial")}),(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"tp-word",style:{animationDelay:"0.35s"},children:b("headFor")})," ",(0,t.jsx)("span",{className:"tp-word tp-gradient",style:{animationDelay:"0.45s"},children:b("headTokens")})]}),(0,t.jsx)("p",{children:b("subtitle")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h2",{children:[(0,t.jsx)("span",{className:"tp-word tp-gradient",style:{animationDelay:"0.15s"},children:f("tokenOfferWordSpecial")})," ",(0,t.jsx)("span",{className:"tp-word tp-gradient",style:{animationDelay:"0.25s"},children:f("tokenOfferWordOffer")}),(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"tp-word",style:{animationDelay:"0.35s"},children:f("tokenOfferWordOnly")})," ",(0,t.jsx)("span",{className:"tp-word",style:{animationDelay:"0.45s"},children:f("tokenOfferWordFor")})," ",(0,t.jsx)("span",{className:"tp-word",style:{animationDelay:"0.55s"},children:f("tokenOfferWordYou")})]}),(0,t.jsx)("p",{children:ea>0?f.rich("tokenOfferSubtitleUpTo",{percent:ea,strong:ef}):f.rich("tokenOfferSubtitle",{strong:ef})})]}),(0,t.jsx)("div",{className:g?"tp-posters":"tp-posters tp-posters-wide-only","aria-hidden":!0,children:(0,t.jsx)("div",{className:"tp-posters-canvas",children:(0,t.jsx)("div",{className:"tp-posters-track",children:[...eb,...eb].map((e,a)=>(0,t.jsxs)("span",{className:"tp-poster",children:[(0,t.jsx)(s.default,{src:e.image,alt:"",fill:!0,sizes:"150px",className:"tp-poster-art"}),(0,t.jsx)("span",{className:"tp-poster-label",children:b(`uses.${e.key}`)})]},`${e.key}-${a}`))})})})]}),(0,t.jsxs)("div",{className:"tp-timer-section",children:[(0,t.jsxs)("div",{className:"tp-timer-row",children:[(0,t.jsx)("span",{className:"tp-timer-label",children:J?f("timerExpired"):f("tokenOfferTimerRowLabel")}),(0,t.jsxs)("div",{className:"tp-timer-pill",role:"timer","aria-live":"polite",children:[(0,t.jsxs)("div",{className:"tp-t-block",children:[(0,t.jsx)("span",{ref:R,className:"tp-t-digit",children:ex(V)}),(0,t.jsx)("span",{className:"tp-t-unit",children:f("timerMinutesShort")})]}
2),(0,t.jsx)("span",{className:"tp-t-sep","aria-hidden":!0,children:":"}),(0,t.jsxs)("div",{className:"tp-t-block",children:[(0,t.jsx)("span",{ref:U,className:"tp-t-digit",children:ex(Q)}),(0,t.jsx)("span",{className:"tp-t-unit",children:f("timerSecondsShort")})]}),(0,t.jsx)(ec,{expired:J,prefix:"tp"})]})]}),(0,t.jsx)("div",{ref:A,className:"tp-urgency-bar",children:(0,t.jsx)("div",{ref:I,className:"tp-urgency-fill",style:{width:`${X}%`}})})]})]}),(0,t.jsx)("div",{className:"tp-col-divider","aria-hidden":!0}),(0,t.jsxs)("div",{className:"tp-col tp-col-buy",children:[(0,t.jsx)(em,{packages:H,selectedId:C,onSelect:S,bestValueId:q}),(0,t.jsxs)("div",{className:"tp-cta-wrap",children:[(0,t.jsx)("div",{className:"tp-cta-glow","aria-hidden":!0}),(0,t.jsx)("button",{type:"button",className:"tp-cta tp-cta-attention",disabled:!C||T,onClick:W,children:(0,t.jsx)("span",{className:"relative z-[1]",children:T?f("tokenOfferCtaPending"):es})})]}),(0,t.jsxs)("div",{className:"tp-social-proof",children:[(0,t.jsxs)("div",{className:"tp-avatars","aria-hidden":!0,children:[(0,t.jsx)("div",{className:"tp-av tp-av-1",style:{animationDelay:"1.25s"}}),(0,t.jsx)("div",{className:"tp-av tp-av-2",style:{animationDelay:"1.35s"}}),(0,t.jsx)("div",{className:"tp-av tp-av-3",style:{animationDelay:"1.45s"}}
2)]}),(0,t.jsxs)("span",{className:"tp-proof-text",children:[(0,t.jsx)("strong",{children:z.toLocaleString()})," ",f("tokenOfferSocialProofSuffix")]})]}),(0,t.jsxs)("div",{className:"tp-foot",children:[(0,t.jsx)("span",{children:f("tokenOfferFootDelivery")}),(0,t.jsx)("span",{className:"tp-d"}),(0,t.jsx)("span",{children:f("tokenOfferFootSecure")}),(0,t.jsx)("span",{className:"tp-d"}),(0,t.jsx)("span",{children:f("tokenOfferFootNeverExpires")})]})]})]})]})}),F]})}},429818,627924,880746,e=>{"use strict";e.s([],429818),e.s(["EmbeddedCheckoutDialog",()=>$],880746),e.s(["EmbeddedCheckoutPanel",()=>_],627924);var t=e.i(363130),a=e.i(483947),s=e.i(944578),i=e.i(611537),r=e.i(643011),n=e.i(517891),l=e.i(722614),o=e.i(410345),c=e.i(842299),d=e.i(516569),u=e.i(913211),p=e.i(797631),m=e.i(5603);e.i(345061);var h=e.i(585875),x=e.i(38808);e.i(635743);var f=e.i(532336),b=e.i(271021);e.i(419112);var g=e.i(694120),k=e.i(931066),y=e.i(877130),v=e.i(211936),N=e.i(887184),j=e.i(158928),w=e.i(849391),C=e.i(262633);e.i(906393);var S=e.i(899721),M=e.i(105534),T=e.i(524794);let _=({amount:e,currency:s,requires3ds:i=!0,target:r,header:l,submitLabel:o,submitClassName:c,onDone:d,className:p})=>{let h=(0,n.useTranslations)(),x=(0,m.useAppDispatch)(),{submit:f,settle:b,phase:_,submitting:P}=(0,v.useEmbeddedCheckoutSubmit)(),[E,D]=(0,a.useState)(null),F=(0,N.usePayComSession)({target:r,enabled:u.isPayComEnabled}),O=(0,a.useCallback)(()=>{x((0,k.closeCheckoutBuyTokensDialog)()),"subscription"===r.kind&&((0,T.markPremiumPurchased)(),x((0,S.buyPremium)()),(0,g.wasPostPurchaseOfferShown)()||((0,g.markPostPurchaseOfferShown)(),(0,g.setPostPurchaseOfferPending)()))},[x,r.kind]);return"processing"===_?(0,t.jsx)(w.PurchaseCelebration,{kind:r.kind,tokenAmount:"tokens"===r.kind?r.tokenAmount:void 0,onDone:d,className:p}):(0,t.jsxs)("div",{className:(0,y.twMerge)("flex flex-col gap-4",p),children:[l,u.isPayComEnabled?(0,t.jsx)(j.PayComCardForm,{clientSecret:F.clientSecret,isSubmitting:F.creating,externalError:F.failed?h("dialogs.shift4CardForm.errors.sdkFailedToLoad"):E,submitLabel:o,submitClassName:c,onSubmit:()=>(0,M.reachYandexGoal)("payment_submit"),onSuccess:()=>{b("subscription"===r.kind),O()},onFailure:()=>(0,M.reachYandexGoal)("payment_error")}):(0,t.jsx)(C.Shift4CardForm,{amount:e,currency:s,requires3ds:i,forceChallenge:"subscription"===r.kind,isSubmitting:P,externalError:E,submitLabel:o,submitClassName:c,onFailure:()=>(0,M.reachYandexGoal)("payment_error"),onToken:async e=>{if(D(null),(0,M.reachYandexGoal)("payment_submit"),!await f(e,r)){(0,M.reachYandexGoal)("payment_error"),D(h("dialogs.shift4CardForm.errors.paymentFailed"));return}O()}})]})};var P=e.i(825090);let E="bg-transparent border-0 bg-[linear-gradient(180deg,rgba(46,52,64,0.34),rgba(10,12,16,0.50))] backdrop-blur-2xl backdrop-saturate-150 shadow-[0_40px_120px_-30px_rgba(0,0,0,0.92),inset_0_1px_0_0_rgba(255,255,255,0.08)] before:pointer-events-none before:absolute before:inset-x-8 before:top-0 before:h-px before:bg-[linear-gradient(90deg,transparent,rgba(255,255,255,0.5),transparent)]",D="z-[70] bg-black/55 backdrop-blur-none !pointer-events-auto",F=e=>e.toString().padStart(2,"0"),O=()=>{let e=(0,n.useTranslations)(),i=(0,a.useRef)(null),[r,l]=(0,a.useState)(3e5);(0,a.useEffect)(()=>{i.current=performance.now();let e=window.setInterval(()=>{let t=Math.max(0,3e5-(performance.now()-(i.current??0)));l(t),t<=0&&window.clearInterval(e)},50);return()=>window.clearInterval(e)},[]);let o=Math.floor(r/6e4),c=Math.floor(r%6e4/1e3),d=Math.floor(r%1e3/10);return(0,t.jsxs)("span",{className:"mt-1 inline-flex items-center gap-2 rounded-full border border-[#C79A4C]/35 bg-[#C79A4C]/10 px-3.5 py-1.5 text-[11px] font-bold uppercase tracking-wider text-[#EAD4A0]",children:[(0,t.jsx)(s.Flame,{"aria-hidden":!0,className:"size-3.5 animate-pulse text-[#C79A4C]"}),e("dialogs.embeddedCheckout.offerExpiresIn"),(0,t.jsxs)("b",{className:"text-[13px] font-black tabular-nums text-white",children:[F(o),":",F(c),":",F(d)]})]})},$=()=>{let e=(0,n.useTranslations)(),s=(0,p.useAudienceGenderIcu)(),y=(0,m.useAppDispatch)(),v=(0,m.useAppSelector)(e=>e.embeddedCheckout.isOpen),N=(0,m.useAppSelector)(e=>e.embeddedCheckout.request),j=(0,a.useRef)(!1);(0,a.useEffect)(()=>
2{if(j.current||(j.current=!0,v||!u.isEmbeddedCheckoutEnabled))return;let e=(0,P.readPersistedCheckoutRequest)();if(null===e)return;let t=window.setTimeout(()=>y((0,P.openEmbeddedCheckout)(e)),400);return()=>window.clearTimeout(t)},[]);let{data:w}=(0,l.useGetCheckoutSubscriptionPlansQuery)(void 0,{skip:!v||N?.kind!=="subscription"});(0,a.useEffect)(()=>{let e=window.visualViewport;if(!x.isMobile||!v||!e)return;let t=e.height,a=()=>{let a=e.height>t+80;if(t=e.height,a){let e=document.getElementById("embedded-checkout-drawer");e&&0!==e.scrollTop&&(e.scrollTop=0)}};return e.addEventListener("resize",a),()=>e.removeEventListener("resize",a)},[v]);let C=e=>{if(e)return;if(y((0,P.closeEmbeddedCheckout)()),(0,g.isPostPurchaseOfferPending)()){(0,g.clearPostPurchaseOfferPending)(),y((0,k.openCheckoutBuyTokensDialog)("post_purchase"));return}let t=(0,h.safeStorageGet)("special-offer");("token_package"===t||"subscription"===t||"post_purchase"===t)&&window.setTimeout(()=>y((0,k.openCheckoutBuyTokensDialog)(t)),400)};if(!v||null==N)return null;let S="tokens"===N.kind?{kind:"tokens",tokenPackageId:N.tokenPackageId,tokenAmount:N.tokenAmount}:{kind:"subscription",subscriptionPlanId:N.subscriptionPlanId,promocode:N.promocode},M="subscription"===N.kind,T="tokens"===N.kind?N.tokenAmount:void 0,F=M?w?.find(e=>e.id===(N.subscriptionPlanId??c.DEFAULT_PREMIUM_PLAN_ID)):void 0,$=M?N.period??F?.period:void 0,A=N.amountMinor/100,I=null!=N.oldPriceMinor?N.oldPriceMinor:M&&F?.old_price!=null?Math.round(100*Number.parseFloat(F.old_price)):void 0,R=null!=I?I/100:null,U=null!=R&&R>A?Math.round((1-A/R)*100):0,L=M?N.tokensAmount??F?.tokens_amount:void 0,z=M?N.bonusTokensAmount??F?.first_purchase_tokens_amount??void 0:void 0,B=M&&null!=$?(0,o.getSubscriptionPerDay)(A.toFixed(2),$):null,H=null!=B?(0,o.formatPerDayUsd)(B):"",q=M&&null!=B,K=q||!M&&U>0,Y=a=>{let r;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)(f.DialogHeader,{className:"sr-only",children:[(0,t.jsx)(f.DialogTitle,{children:e("dialogs.embeddedCheckout.title",{gender:s})}),(0,t.jsx)(f.DialogDescription,{children:e("dialogs.embeddedCheckout.subtitle")})]}),(0,t.jsxs)("div",{className:"left"===a?"relative z-10 flex flex-col items-start gap-1 pt-1 text-left":"relative z-10 flex flex-col items-center gap-1 px-2 pt-4 text-center",children:[(0,t.jsxs)("span",{className:"mb-1 flex items-center gap-1.5 rounded-full border border-emerald-400/30 bg-emerald-400/10 px-3 py-1 text-[11px] font-semibold text-emerald-300",children:[(0,t.jsx)(i.LockIcon,{className:"size-3"}),e("dialogs.embeddedCheckout.secureCheckout")]}),(0,t.jsx)("h2",{className:"text-balance text-xl font-bold text-white",children:e("dialogs.embeddedCheckout.title",{gender:s})}),(0,t.jsx)("p",{className:"max-w-xs text-sm text-white/70",children:e("dialogs.embeddedCheckout.subtitle")}),K&&(0,t.jsx)(O,{})]}),K?(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(d.CheckoutSavingsPlate,{kind:M?"subscription":"tokens",priceMinor:N.amountMinor,oldPriceMinor:I,period:$,tokenAmount:T,includedTokens:L,bonusTokens:z??void 0})}):(0,t.jsx)("div",{className:"mt-1 text-center text-3xl font-black text-[#EAD4A0]",children:(r=N.amountMinor,`$${(r/100).toFixed(2)}`)})]})},G=Y("center"),W=(0,t.jsx)(_,{amount:N.amountMinor,currency:N.currency,target:S,header:G,submitLabel:q?e("dialogs.embeddedCheckout.ctaMain",{perDay:H,gender:s}):void 0,submitClassName:K?"h-14 rounded-full bg-[linear-gradient(100deg,#F3DEA6,#D8AC5E_45%,#9A7128)] text-base font-black text-[#2a1a05] shadow-[0_18px_44px_-14px_rgba(199,154,76,0.9),inset_0_1px_0_0_rgba(255,255,255,0.55)] transition-transform duration-150 ease-out active:translate-y-px motion-reduce:transition-none disabled:opacity-70 disabled:shadow-none":void 0,onDone:()=>C(!1),className:"px-5 pb-6"}),V=(0,t.jsx)("button",{type:"button","aria-label":"Close",onClick:()=>C(!1),className:"absolute right-3.5 top-3.5 z-20 flex size-9 items-center justify-center rounded-full border border-white/10 bg-white/[0.07] text-white/70 backdrop-blur-md transition-colors hover:bg-white/[0.14] hover:text-white",children:(0,t.jsx)(r.X,{className:"size-5","aria-hidden":!0})});return x.isMobile?(0,t.jsx)(b.Drawer,{open:v,onOpenChange:C,children:(0,t.jsxs)(b.DrawerContent,{id:"embedded-checkout-drawer",className:`${E} embedded-checkout-sheet z-[70] flex max-h-[90dvh] w-full max-w-[560px] flex-col rounded-t-3xl p-0 !pointer-events-auto data-[vaul-drawer-direction=bottom]:rounded-t-3xl`,overlayClassName:D,children:[V,(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W})]})}):(0,t.jsx)(f.Dialog,{open:v,onOpenChange:C,children:(0,t.jsxs)(f.DialogContent,{showCloseButton:!1,className:`${E} embedded-checkout-sheet relative z-[70] w-full max-w-[880px] gap-0 rounded-3xl p-0 !pointer-events-auto data-[state=closed]:zoom-out-100 data-[state=open]:zoom-in-100`,overlayClassName:D,children:[V,(0,t.jsxs)("div",{className:"grid grid-cols-[1fr_1px_1fr]",children:[(0,t.jsx)("div",{className:"flex flex-col justify-center p-8 pr-7",children:Y("left")}),(0,t.jsx)("div",{className:"my-8 bg-white/10","aria-hidden":!0}),(0,t.jsx)(_,{amount:N.amountMinor,currency:N.currency,target:S,submitLabel:q?e("dialogs.embeddedCheckout.ctaMain",{perDay:H,gender:s}
2):void 0,submitClassName:K?"h-14 rounded-full bg-[linear-gradient(100deg,#F3DEA6,#D8AC5E_45%,#9A7128)] text-base font-black text-[#2a1a05] shadow-[0_18px_44px_-14px_rgba(199,154,76,0.9),inset_0_1px_0_0_rgba(255,255,255,0.55)] transition-transform duration-150 ease-out active:translate-y-px motion-reduce:transition-none disabled:opacity-70 disabled:shadow-none":void 0,onDone:()=>C(!1),className:"p-8 pl-7"})]})]})})};e.i(509370)},825090,509370,e=>{"use strict";var t=e.i(282893);let a="embeddedCheckoutRequest",s=e=>{try{null===e?globalThis.sessionStorage?.removeItem(a):globalThis.sessionStorage?.setItem(a,JSON.stringify(e))}catch{}},i=(0,t.createSlice)({name:"embeddedCheckout",initialState:{isOpen:!1,request:null},reducers:{openEmbeddedCheckout(e,t){s(t.payload),e.isOpen=!0,e.request=t.payload},closeEmbeddedCheckout(e){s(null),e.isOpen=!1,e.request=null}}}),{actions:{openEmbeddedCheckout:r,closeEmbeddedCheckout:n}}=i;e.s(["closeEmbeddedCheckout",0,n,"embeddedCheckoutSlice",0,i,"openEmbeddedCheckout",0,r,"readPersistedCheckoutRequest",0,()=>{try{let e=globalThis.sessionStorage?.getItem(a);if(null==e)return null;let t=JSON.parse(e);if("tokens"!==t.kind&&"subscription"!==t.kind||"number"!=typeof t.amountMinor||!Number.isFinite(t.amountMinor)||t.amountMinor<=0||"string"!=typeof t.currency||""===t.currency)return null;return t}catch{return null}}],825090);var l=e.i(483947),o=e.i(913211),c=e.i(5603);e.s(["useCheckout",0,()=>{let e=(0,c.useAppDispatch)(),t=(0,l.useCallback)(t=>{e(r(t))},[e]);return{isEmbeddedEnabled:o.isEmbeddedCheckoutEnabled,openCheckout:t}}],509370)}]); 3 4//# debugId=2c1958f8-953d-13d0-a901-e23176435f23
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.