1import{w as me,o as Ie,a as r,c,b as o,t as n,d as p,e as b,F as w,r as J,f as ne,g as xe,h as pe,T as Ee,i as f,j as Pe,k as We,n as O,l as Z,m as q,p as _e}from"./main-DV43plvL.js";function Ue({isYear:s,isSaleLive:x,yearFlashPromo:T,tariffPromo:t,blockPromo:_,sendBlockPromo:E}){const u=t||_;return s?x&&T?T:E?u:"":u}function $e({isYear:s,isSaleLive:x,yearFlashDiscount:T,blockDiscount:t,sendBlockPromo:_}){return s?x&&T?T:_?t:0:t}function je(s,x){const T=parseFloat(s)||0,t=x>0?1-x*.01:1;return(Math.round(T*t/12*100)/100).toFixed(2)}const Xe={class:"storefront__tariffs-customizer-block"},He={class:"storefront__tariffs-customizer-block__header"},Qe={class:"storefront__tariffs-customizer-block__value"},Ze={class:"storefront__tariffs-customizer-block__header-block"},Je={class:"storefront__tariffs-customizer-block__title"},Ke={key:0,class:"storefront__tariffs-customizer-block__title-caption"},et=["src"],tt={class:"storefront__tariffs-customizer-block__caption"},st=["src"],at={class:"range_slider"},ot=["src"],lt=["data-value","onClick"],nt={class:"range_slider__option-caption"},it={key:0,class:"range_slider__option-discount"},rt={class:"storefront__tariffs-customizer-block__mobile"},ct={class:"storefront__tariffs-customizer-block__mobile-block"},ut={class:"storefront__tariffs-customizer-block__mobile-block__header"},dt=["src"],ft={class:"storefront__tariffs-customizer-block__mobile-block__caption"},_t=["data-value","onClick"],mt=["src"],vt=["src"],ge={__name:"TariffCustomizerBlock",props:{title:{type:String,required:!0},type:{type:String,default:"default"},isPremium:{type:String,required:!0},titleCaption:{type:String,default:null},caption:{type:String,default:""},options:{type:Array,default:()=>[]},assets:{type:Object,default:()=>({})},translations:{type:Object,default:()=>({})}},emits:["update"],setup(s,{expose:x,emit:T}){const t=s,_=T,E=f(!1),u=f(null),Y=f(null),k=f(0),R=f(!1);function D(v){v.preventDefault(),R.value=!0}function C(v){k.value=v,_("update",k.value),L(v)}function P(v){R.value&&(v.preventDefault(),R.value=!1)}function K(v){if(R.value){const S=u.value,y=S.parentNode,g=Y.value.querySelectorAll(".range_slider__option"),$=y.getBoundingClientRect(),I=S.offsetWidth;let X=v.clientX;v.touches&&v.touches.length>0&&(X=v.touches[0].clientX);let N=X-$.left-14;N<4&&(N=4),N>$.width-(I+4)&&(N=$.width-(I+4));let A=g[0],ae=Math.abs(N-A.offsetLeft);g.forEach(F=>{const W=Math.abs(N-F.offsetLeft);W<ae&&(ae=W,A=F)});const H=$.width-(I+4),G=g[g.length-1];N>=H&&A!==G&&(A=G),k.value=A.dataset.value,_("update",k.value),S.style.left=`${A.offsetLeft-2}px`}}me(E,v=>{v?document.querySelector("body").style.overflow="hidden":document.querySelector("body").style.overflow="auto"});function L(v){if(!u.value||!Y.value)return;const S=u.value,y=Y.value.querySelectorAll(".range_slider__option");for(const g of y)if(parseFloat(g.dataset?.value)===parseFloat(v)){S.style.left=`${g.offsetLeft-2}px`,k.value=v;break}}return Ie(()=>{k.value=t.options?.[0]?.value||0,t.type==="days"?(L(3),_("update",k.value)):L(k.value),window.addEventListener("mousemove",K),window.addEventListener("mouseup",P),window.addEventListener("touchmove",K),window.addEventListener("touchend",P)}),x({reRender:L}),(v,S)=>(r(),c("div",Xe,[o("div",He,[o("span",Qe,n(k.value),1),o("div",Ze,[o("span",Je,[p(n(s.title)+" ",1),s.titleCaption?(r(),c("span",Ke,[o("img",{src:s.assets.infoWhite,alt:"",decoding:"async"},null,8,et),p(" "+n(s.translations.choose_more_runtime),1)])):b("",!0)]),o("span",tt,n(s.caption),1)]),o("div",{class:"storefront__tariffs-customizer-block__mobile-value",onClick:S[0]||(S[0]=y=>E.value=!E.value)},[p(n(k.value)+" ",1),o("img",{src:s.assets.mobileSelector,alt:"",decoding:"async"},null,8,st)])]),o("div",at,[o("img",{class:"range_slider__selector",src:s.assets.slider,alt:"",ref_key:"sliderSelector",ref:u,onMousedown:D,onTouchstart:D,decoding:"async"},null,40,ot),o("div",{class:"range_slider__options",ref_key:"slideOptions",ref:Y}
1,[(r(!0),c(w,null,J(s.options,(y,g)=>(r(),c("div",{key:`option_${g}`,class:"range_slider__option","data-value":y.value,onClick:$=>C(parseInt(y.value))},[S[3]||(S[3]=o("div",{class:"range_slider__option-inner"},null,-1)),o("div",nt,n(y.value),1),y.discount>0?(r(),c("div",it,n(y.discount)+"% "+n(s.isPremium==="true"?" + "+s.translations.free_premium:""),1)):b("",!0)],8,lt))),128))],512)]),ne(Ee,{name:"modal-fade"},{default:xe(()=>[E.value?(r(),c("div",{key:0,class:"storefront__tariffs-customizer-block__mobile-wrapper",onClick:S[2]||(S[2]=pe(y=>E.value=!E.value,["self"]))},[o("div",rt,[o("div",ct,[o("div",ut,[p(n(s.title)+" ",1),o("img",{onClick:S[1]||(S[1]=pe(y=>E.value=!E.value,["self"])),src:s.assets.close,alt:"",decoding:"async"},null,8,dt)]),o("div",ft,n(s.caption),1),o("ul",null,[(r(!0),c(w,null,J(s.options,(y,g)=>(r(),c("li",{key:`mobile_option_${g}`,class:"","data-value":y.value,onClick:$=>C(parseInt(y.value))},[parseInt(k.value)===parseInt(y.value)?(r(),c("img",{key:0,src:s.assets.selectorActive,alt:""},null,8,mt)):(r(),c("img",{key:1,src:s.assets.selectorInactive,alt:""},null,8,vt)),p(" "+n(y.value),1)],8,_t))),128))])])])])):b("",!0)]),_:1})]))}},yt={class:"storefront__tariffs-discount__caption"},ht={class:"storefront__tariffs-discount__percentage"},gt={class:"storefront__tariffs-discount__percentage"},pt={class:"storefront__tariffs-discount__caption"},bt={key:1,class:"storefront__tariffs-caption"},kt={class:"storefront__tariff-header"},Ct=["src","alt"],St={class:"storefront__tariff-title"},wt={class:"storefront__tariff-description"},Pt=["id"],$t={class:"storefront__tariff-footer"},It={class:"storefront__tariff-pricing"},xt={key:0,class:"storefront__tariff-pricing__caption"},Et={key:1,class:"storefront__tariff-pricing__caption"},Bt={key:2,class:"storefront__tariff-pricing__price"},Ft={key:0,class:"storefront__tariff-pricing__price-discount"},zt={key:3,class:"storefront__tariff-pricing__price"},Tt={key:0,class:"storefront__tariff-pricing__price-discount"},Dt={class:"storefront__tariff-pricing__caption-disabled"},Lt={key:0,class:"storefront__tariff-year"},Nt=["onClick"],Mt=["src"],Ot=["onClick"],At=["src"],qt={key:0,class:"storefront__tariff-choice__label"},Rt={key:1,class:"storefront__tariff-close"},Vt=["src"],Yt={class:"storefront__tariff-header"},Gt=["src","alt"],Wt=["src","alt"],Ut={key:2,class:"storefront__tariff-title"},jt={key:3,class:"storefront__tariff-title"},Xt={key:2,class:"storefront__tariff-description storefront__tariff-descriptio__custom"},Ht=["id"],Qt={key:3,class:"storefront__tariff-description storefront__tariff-description__custom"},Zt={class:"storefront__tariff-footer"},Jt={class:"storefront__tariff-pricing"},Kt={class:"storefront__tariff-pricing__caption"},es={class:"storefront__tariff-pricing__price"},ts={key:0,class:"storefront__tariff-pricing__price-discount"},ss={class:"storefront__tariff-action"},as=["src"],os=["src"],ls=["src"],ns={class:"storefront__tariffs-footer__caption"},is=["src"],rs={class:"storefront__modal"},cs={class:"storefront__modal-block"},us={class:"storefront__modal-title"},ds={class:"storefront__modal-subtitle"},fs={class:"storefront__modal-grid"},_s={class:"storefront__modal-grid__block-header storefront__modal-budget__header"},ms=["src"],vs={class:"storefront__modal-title"},ys=["src"],hs={class:"storefront__modal-grid__block-content storefront__modal-budget__content"},gs=["src"],ps=["src"],bs={class:"storefront__modal-budget__content-help"},ks={class:"storefront__modal-budget__price"},Cs={class:"storefront__modal-better"},Ss={class:"storefront__modal-premium__header-wrapper"},ws={class:"storefront__modal-grid__block-header storefront__modal-premium__header"},Ps=["src"],$s={class:"storefront__modal-title"},Is=["src"],xs={class:"storefront__modal-grid__block-content storefront__modal-premium__content"},Es=["src"],Bs=["src"],Fs={class:"storefront__modal-premium__content-help"},zs={class:"storefront__modal-premium__price"},Ts={class:"storefront__modal-footer"},Ds=["id"],Ls=["id"],Ns=["src"],Ms={key:0,class:"storefront__tariffs-includes"},Os={class:"storefront__tariffs-footer__caption"},As=["src"],Rs={__name:"GameTariffsNewGroup",props:{id:{type:[String,Number],required:!0},uniqueId:{type:String,default:""},isTwo:{type:Boolean,default:!1},isNew:{type:Boolean,default:!1},isIncludesBottom:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""},backgroundImage:{type:String,default:""},firstPurchaseCaption:{type:String,default:""},firstPaymentColor:{type:String,default:"007CEE"},discountPercentage:{type:Number,default:0},flashSaleDiscount:{type:Number,default:0},flashSalePromo:{type:String,default:""},isSaleEnabled:{type:Boolean,default:!1},flashSalePeriod:{type:String,default:""},discountCaption:{type:String,default:""},discount90:{type:Number,default:0},discount180:{type:Number,default:0},discount360:{type:Number,default:0},discountDefault:{type:Number,default:0},tariffs:{type:Array,default:()=>[]},slotsOptions:{type:Array,default:()=>[]},ramsOptions:{type:Array,default:()=>[]},budgetItems:{type:Array,default:()=>[]},premiumItems:{type:Array,default:()=>[]},promocode:{type:String,default:""},promocodeDefault:{type:String,default:""},currencyPrefix:{type:String,default:""},currencyId:{type:[String,Number],default:1},cartPrefix:{type:String,default:"cart"},isGameFunnel:{type:Boolean,default:!1},lang:{type:String,default:"en"},langBilling:{type:String,default:"en"},isCartSection:{type:Boolean,default:!1},isCartOneStepSection:{type:Boolean,default:!1},translations:{type:Object,default:()=>({})},assets:{type:Object,default:()=>({})},includes:{type:Array,default:()=>[]},includesTwo:{type:Array,default:()=>[]},includesTitle:{type:String,default:""},includesTitleTwo:{type:String,default:""},isYear:{type:Boolean,default:!1}
1,yearFlashDiscount:{type:Number,default:0},yearFlashPromo:{type:String,default:""},sendBlockPromo:{type:Boolean,default:!1}},setup(s){window.__godlikeSharedState||(window.__godlikeSharedState=Pe({allTariffs:[]}));const x=window.__godlikeSharedState;if(!window.__godlikeFlashState){const e=Pe({ended:!!window.__flashSaleEnded});document.addEventListener("flashsale:ended",()=>{e.ended=!0}),window.__godlikeFlashState=e}const T=window.__godlikeFlashState,t=s,_=q(()=>t.isSaleEnabled&&!T.ended),E=q(()=>$e({isYear:!0,isSaleLive:_.value,sendBlockPromo:t.sendBlockPromo,yearFlashDiscount:t.yearFlashDiscount,blockDiscount:t.discountPercentage})),u=f(!1),Y=f(!1),k=f(!1),R=f(!1),D=f(t.slotsOptions?.[0]||0),C=f(t.ramsOptions?.[0]||0),P=f(30),K=f(t.translations.monthly||"Monthly"),L=f(null),v=f(0),S=f(0),y=f("false"),g=f(0),$=f(0),I=f("monthly"),X=f(""),N=f(""),A=f(""),ae=f(""),H=f(null),G=f(null),F=f(null),W=f(null),M=f(null),U=e=>{const a=String(e||"").replace(/[^\d]/g," ").trim().match(/\d+/);return a?parseInt(a[0]):0},ee=e=>_.value?{promo:t.flashSalePromo,discount:t.flashSaleDiscount}:null,oe=(e,l,a="monthly")=>{const i=ee();if(i){const d=e.includes("?")?"&":"?";return`${e}${d}sale-promo=${i.promo}&sale-discount=${i.discount}`}return e},be=q(()=>x.allTariffs);function ie(){t.tariffs&&t.tariffs.forEach(l=>{if(l&&l.id&&!l.is_customize&&!x.allTariffs.some(a=>String(a.id)===String(l.id))){const a={...l};(!a.promocode||a.promocode==="")&&(a.promocode=t.promocode),x.allTariffs.push(a)}}),document.querySelectorAll('[data-vue-component="GameTariffsNewGroup"]').forEach((l,a)=>{try{const i=l.getAttribute("data-props");if(i){const d=JSON.parse(i);d.tariffs&&d.tariffs.forEach(m=>{if(m&&m.id&&!m.is_customize&&!x.allTariffs.some(h=>String(h.id)===String(m.id))){const h={...m};(!h.promocode||h.promocode==="")&&(h.promocode=d.promocode),x.allTariffs.push(h)}})}}catch{}})}const re=q(()=>(t.slotsOptions||[]).map(e=>({value:e,discount:0}))),ce=q(()=>(t.ramsOptions||[]).map(e=>({value:e,discount:0}))),Be=q(()=>[{value:3,discount:0,billingCycle:t.translations.days_3||"3 days"},{value:30,discount:0,billingCycle:t.translations.monthly||"Monthly"},{value:90,discount:t.discount90||0,billingCycle:t.translations.quarterly||"Quarterly"},{value:180,discount:t.discount180||0,billingCycle:t.translations.semiannually||"Semiannually"},{value:360,discount:t.discount360||0,billingCycle:t.translations.annually||"Annually"}]),ke=q(()=>[{value:30,discount:0,billingCycle:t.translations.monthly||"Monthly"},{value:90,discount:t.discount90||0,billingCycle:t.translations.quarterly||"Quarterly"},{value:180,discount:t.discount180||0,billingCycle:t.translations.semiannually||"Semiannually"},{value:360,discount:t.discount360||0,billingCycle:t.translations.annually||"Annually"}]),le=f([]);me(Y,e=>{document.body.style.overflow=e?"hidden":"auto"}),me(u,e=>{!e&&M.value&&(M.value.style.top="0px"),ie(),Q()}),me(be,()=>{u.value&&Q()},{deep:!0});function B(e){return isNaN(e)?0:Math.round(e*100)/100}function ue(e,l=!0){const a=e.price_annually||e.prices?.price_annually||0;return je(a,l?E.value:0)}function te(e,l=null){if(t.isYear)return E.value;if(_.value){const a=ee(l||C.value);return a?a.discount:t.flashSaleDiscount}return parseInt(e)===30&&t.flashSalePeriod==="monthly"&&_.value?t.flashSaleDiscount:t.discountPercentage}const ve=q(()=>u.value?K.value:_.value&&t.flashSalePeriod&&t.translations[t.flashSalePeriod]||t.translations.monthly),de=e=>{let l=e.price||e.prices.price,a=1;switch(t.flashSalePeriod){case"monthly":l=e.price||e.prices.price,a=1;break;case"quarterly":l=e.quarterly||e.prices.price_quarterly,a=3;break;case"semiannually":l=e.semmiannualy||e.prices.price_semiannually,a=6;break;case"annually":l=e.price_annually||e.prices.price_annually,a=12;break}return{basePrice:l,divisor:a}},Fe=e=>{if(t.isYear)return ue(e,!0);const{basePrice:l,divisor:a}=de(e),i=ee(e.ram),m=1-(i?i.discount:t.flashSaleDiscount)*.01;return(Math.round(l*m/a*100)/100).toFixed(2)},ze=e=>{if(t.isYear)return ue(e,!1);const{basePrice:l,divisor:a}=de(e);return(Math.round(l/a*100)/100).toFixed(2)};function Te(e){D.value=e;const l=re.value.findIndex(a=>U(a.value)===U(D.value));l!==-1&&ce.value[l]&&(C.value=ce.value[l].value,G.value&&G.value.reRender(C.value)),Q()}function De(e){C.value=e;const l=ce.value.findIndex(a=>U(a.value)===U(C.value));l!==-1&&re.value[l]&&(D.value=re.value[l].value,H.value&&H.value.reRender(D.value)),Q()}function Le(e){P.value=e;const l=le.value.find(a=>parseInt(a.value)===parseInt(e));switch(K.value=l?l.billingCycle:t.translations.monthly||"Monthly",parseInt(P.value)){case 3:I.value="triennially";break;case 30:I.value="monthly";break;case 90:I.value="quarterly";break;case 180:I.value="semiannually";break;case 360:I.value="annually";break;default:I.value="quarterly";break}Q()}function Q(){const e=u.value?be.value:t.tariffs,l=U(D.value),a=U(C.value),i=(e||[]).find(d=>{if(!d)return!1;const m=U(d.slots),h=U(d.ram);return!(d.is_customize===!0||d.is_customize===1||d.is_customize==="1"||d.is_customize==="true")&&m===l&&h===a});if(i){switch(L.value=i,X.value=i.title,N.value=i.image,!i.three_day_id||i.three_day_id===""||t.isCartSection?(le.value=ke.value,parseInt(P.value)===3?(P.value=30,_e(()=>{F.value&&F.value.reRender(30)})):_e(()=>{F.value&&F.value.reRender(parseInt(P.value))})):(le.value=Be.value,_e(()=>{F.value&&F.value.reRender(parseInt(P.value))})),parseInt(P.value)){case 3:const d=1-t.discountPercentage*.01;g.value=B(parseFloat(i.triennialy)*d),$.value=B(parseFloat(i.premium_triennialy)*d);break;case 30:let m=t.discountPercentage;t.flashSalePeriod==="monthly"&&_.value&&(m=t.flashSaleDiscount);const h=1-m*.01;g.value=B(parseFloat(i.monthly)*h),$.value=B(parseFloat(i.premium_monthly)*h);break;case 90:const z=1-t.discountPercentage*.01;g.value=B(parseFloat(i.quarterly)*z),$.value=B(parseFloat(i.premium_quarterly)*z);break;case 180:const j=1-t.discountPercentage*.01;g.value=B(parseFloat(i.semmiannualy)*j),$.value=B(parseFloat(i.premium_semmiannualy)*j);break;case 360:const V=1-t.discountPercentage*.01;g.value=B(parseFloat(i.annualy)*V),$.value=B(parseFloat(i.premium_annualy)*V);break;default:let se=t.discountPercentage;t.flashSalePeriod==="monthly"&&_.value&&(se=t.flashSaleDiscount);const we=1-se*.01;g.value=B(parseFloat(i.monthly)*we),$.value=B(parseFloat(i.premium_monthly)*we);break}v.value=parseInt(P.value)===3?i.three_day_id:i.budget_id,S.value=i.premium_id,y.value=i.premium}}function Ne(){if(!L.value)return null;let e;switch(parseInt(P.value)){case 3:e="triennialy";break;case 30:e="monthly";break;case 90:e="quarterly";break;case 180:e="semmiannualy";break;case 360:e="annualy";break;default:e="monthly";break}return`${t.currencyPrefix} ${L.value[e]}`}function Me(e,l="calc"){if(!e.prices)return"0.00";if(t.isYear&&l==="basic"&&!u.value)return ue(e,!0);const a=l==="basic"&&!u.value?t.isYear?360:30:parseInt(P.value);let i=t.discountPercentage;if(_.value){const z=ee(e.ram||C.value);i=z?z.discount:t.flashSaleDiscount}else a===30&&t.flashSalePeriod==="monthly"&&_.value&&(i=t.flashSaleDiscount);const d=1-i*.01;if(_.value&&!u.value){const{basePrice:z,divisor:j}=de(e);return(Math.round(z*d/j*100)/100).toFixed(2)}if(t.isCartSection){const j=(e.price_annually||e.prices.price_annually)*d;return(Math.round(j/12*100)/100).toFixed(2)}let m,h=1;switch(a){case 3:m=e.prices.price_triennially;break;case 30:m=e.price||e.prices.price;break;case 90:m=e.prices.price_quarterly,h=3;break;case 180:m=e.prices.price_semiannually,h=6;break;case 360:m=e.price_annually||e.prices.price_annually,h=12;break;default:m=e.price||e.prices.price;break}return(Math.round(m*d/h*100)/100).toFixed(2)}function Oe(e,l="calc"){if(!e.prices)return"0.00";if(t.isYear&&l==="basic"&&!u.value)return ue(e,!1);const a=l==="basic"&&!u.value?t.isYear?360:30:parseInt(P.value);if(_.value&&!u.value){const{basePrice:m,divisor:h}=de(e);return(Math.round(m/h*100)/100).toFixed(2)}let i,d=1;switch(a){case 3:i=e.prices.price_triennially;break;case 30:i=e.price||e.prices.price;break;case 90:i=e.prices.price_quarterly,d=3;break;case 180:i=e.prices.price_semiannually,d=6;break;case 360:i=e.price_annually||e.prices.price_annually,d=12;break;default:i=e.price||e.prices.price;break}return(Math.round(i/d*100)/100).toFixed(2)}function Ce(){const e=L.value?.promocode||t.promocode;let l=u.value?I.value:"monthly";if(t.isYear?l="annually":_.value&&(l=t.flashSalePeriod||"annually"),t.isCartSection){let i=`?productId=${v.value}&billingCycle=${l}&promo=${e}`;i=oe(i,C.value,l),window.location.href=i;return}let a=`/${t.cartPrefix}?productId=${v.value}&billingCycle=${l}¤cy=${t.currencyId}&language=${t.langBilling}&promo=${e}`;a=oe(a,C.value,l),window.location.href=a}function Ae(){const e=L.value?.promocode||t.promocode;let l=u.value?I.value:"annually";t.isCartOneStepSection&&(l="monthly"),_.value&&(l=t.flashSalePeriod||"annually"),sessionStorage.setItem("productId",v.value),sessionStorage.setItem("billingCycle",l),sessionStorage.setItem("promo",e),sessionStorage.setItem("discount",t.discountPercentage.toString());const a=ee(C.value);a?(sessionStorage.setItem("sale-promo",a.promo),sessionStorage.setItem("sale-discount",a.discount.toString())):(sessionStorage.removeItem("sale-promo"),sessionStorage.removeItem("sale-discount")),document.querySelectorAll(".storefront__cart").forEach(d=>{d.style.display="none"});const i=document.querySelector(".cart-app-wrapper");i&&(i.style.display="block",i.scrollIntoView({behavior:"smooth",block:"center"}))}function qe(e){const l=e.budget_id;let a=u.value?I.value:"monthly";
1t.isYear?a="annually":_.value&&(a=t.flashSalePeriod||"annually");const i={isYear:t.isYear,isSaleLive:_.value,sendBlockPromo:t.sendBlockPromo,yearFlashPromo:t.yearFlashPromo,yearFlashDiscount:t.yearFlashDiscount,tariffPromo:e.promocode,blockPromo:t.promocode,blockDiscount:t.discountPercentage},d=Ue(i);if(R.value&&!t.isYear&&!t.isGameFunnel){const z=document.querySelector(".storefront__mobile-cart");if(z){const j=z.dataset.group||57,V=new URL("/mobile-cart",window.location.origin);V.searchParams.set("is_cart_opened","true"),V.searchParams.set("productId",l),V.searchParams.set("gameId",j);const se=ee(e.ram);se&&(V.searchParams.set("sale-promo",se.promo),V.searchParams.set("sale-discount",se.discount.toString())),window.location.href=V.toString();return}}const m=$e(i);let h=`/${t.cartPrefix}?productId=${l}&billingCycle=${a}¤cy=${t.currencyId}&language=${t.langBilling}&promo=${d}&discount=${m}&default_promo=${t.promocodeDefault}&default_discount=${t.discountDefault}`;t.isYear||(h=oe(h,e.ram,a)),window.location.href=h}function Re(e){const l=e.budget_id,a=e.promocode||t.promocode;let i=u.value?I.value:"monthly";t.isYear?i="annually":_.value&&(i=t.flashSalePeriod||"annually");let d=`/${t.cartPrefix}?productId=${l}&billingCycle=${i}¤cy=${t.currencyId}&language=${t.langBilling}&promo=${a}&discount=${t.discountPercentage}`;d=oe(d,e.ram,i),window.location.href=d}function Ve(){const e=L.value?.promocode||t.promocode;let l=u.value?I.value:"monthly";t.isYear?l="annually":_.value&&(l=t.flashSalePeriod||"annually");let a=`/${t.cartPrefix}?productId=${S.value}&billingCycle=${l}¤cy=${t.currencyId}&language=${t.langBilling}&promo=${e}`;a=oe(a,C.value,l),window.location.href=a}function Ye(){u.value=!u.value,u.value&&ie(),_e(()=>{u.value&&(ie(),Q(),H.value&&H.value.reRender(parseInt(D.value)),G.value&&G.value.reRender(parseInt(C.value)),F.value&&F.value.reRender(parseInt(P.value)),W.value&&W.value.scrollIntoView({behavior:"smooth"}))})}function Se(e){const l=document.getElementById(e);l&&l.scrollIntoView({behavior:"smooth"})}function fe(){if(!(!u.value||!W.value||!M.value))if(window.innerWidth>=601){const e=W.value.getBoundingClientRect(),l=M.value.offsetHeight,a=20;M.value.style.position="relative",e.top>=a?M.value.style.top=`${a}px`:e.bottom<=l+a?M.value.style.top=`${e.height-l}px`:M.value.style.top=`${Math.abs(e.top)+a+20}px`}else M.value.style.position="",M.value.style.top=""}const ye=()=>{R.value=window.innerWidth<=600},Ge=q(()=>{const e=t.firstPaymentColor,l=`data:image/svg+xml,%3Csvg width='240' height='94' viewBox='0 0 240 94' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg filter='url(%23filter0_i_415_15927)'%3E%3Cpath d='M45.072 47L36.1578 24.5476C30.2742 9.72876 15.9441 1.90132e-07 1.12094e-06 0L240 2.86197e-06C223.771 2.66844e-06 209.185 9.90251 203.197 24.986L194.456 47C183.192 75.3729 155.755 94 125.227 94L114.301 94C83.7739 94 56.3369 75.3729 45.072 47Z' fill='%23${e}'/%3E%3C/g%3E%3Cdefs%3E%3Cfilter id='filter0_i_415_15927' x='0' y='0' width='244' height='94' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'%3E%3CfeFlood flood-opacity='0' result='BackgroundImageFix'/%3E%3CfeBlend mode='normal' in='SourceGraphic' in2='BackgroundImageFix' result='shape'/%3E%3CfeColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/%3E%3CfeOffset dx='4'/%3E%3CfeGaussianBlur stdDeviation='10'/%3E%3CfeComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.57 0'/%3E%3CfeBlend mode='normal' in2='shape' result='effect1_innerShadow_415_15927'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E%0A`,a=`data:image/svg+xml,%3Csvg width='219' height='32' viewBox='0 0 219 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg filter='url(%23filter0_i_884_37293)'%3E%3Cpath d='M28.4188 15.9999L26.9428 13.9195C20.7479 5.18802 10.7059 -6.09075e-05 3.81597e-07 -6.10352e-05L195 -5.87098e-05C208.255 -5.85517e-05 219 10.7451 219 23.9999L219 32L59.3884 31.9999C47.0825 31.9999 35.5395 26.0365 28.4188 15.9999Z' fill='%23${e}'/%3E%3C/g%3E%3Cdefs%3E%3Cfilter id='filter0_i_884_37293' x='0' y='0' width='223' height='32' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'%3E%3CfeFlood flood-opacity='0' result='Backgroun
1dImageFix'/%3E%3CfeBlend mode='normal' in='SourceGraphic' in2='BackgroundImageFix' result='shape'/%3E%3CfeColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/%3E%3CfeOffset dx='4'/%3E%3CfeGaussianBlur stdDeviation='10'/%3E%3CfeComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.57 0'/%3E%3CfeBlend mode='normal' in2='shape' result='effect1_innerShadow_884_37293'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E%0A`;return R.value?{backgroundImage:`url("${a}")`,backgroundSize:"cover"}:t.isNew?{backgroundImage:`url("${a}")`,backgroundSize:"cover"}:{backgroundImage:`url("${l}")`}}),he=q(()=>R.value?{paddingRight:"4px",borderRight:`2px solid #${t.firstPaymentColor}`}:{});return Ie(()=>{ie(),k.value=!0,le.value=ke.value;const e=(t.tariffs||[]).find(l=>l.is_customize);if(e){A.value=e.title,ae.value=e.image,X.value=e.title,N.value=e.image;const a=1-te(30)*.01;g.value=B(e.monthly*a),$.value=e.premium_monthly,D.value=e.slots_custom||t.slotsOptions?.[0]||0,C.value=e.ram_custom||t.ramsOptions?.[0]||0}window.addEventListener("scroll",fe),window.addEventListener("resize",fe),window.addEventListener("resize",ye),ye(),Q()}),We(()=>{window.removeEventListener("scroll",fe),window.removeEventListener("resize",fe),window.removeEventListener("resize",ye)}),(e,l)=>(r(),c(w,null,[o("div",{class:"storefront__tariffs",style:O({backgroundImage:`linear-gradient(113.1deg, rgba(27, 27, 44, 0.7) 0%, rgba(27, 27, 44, 0.7) 100%), url(${s.backgroundImage})`})},[o("div",{class:Z(["storefront__tariffs-first-purchase",[s.isNew?"storefront__tariffs-first-purchase-new storefront__tariffs-first-purchase-new_"+s.id:"","storefront__tariffs-first-purchase_"+s.id]]),style:O(Ge.value)},[o("span",null,n(s.firstPurchaseCaption),1)],6),te(30)>0?(r(),c("div",{key:0,class:Z(["storefront__tariffs-discount",{"storefront__tariffs-discount-new":s.isNew}])},[s.isNew?(r(),c(w,{key:0},[o("span",yt,n(s.discountCaption),1),o("span",ht,n(te(30))+"%",1)],64)):(r(),c(w,{key:1},[o("span",gt,n(te(30))+"%",1),o("span",pt,n(s.discountCaption),1)],64))],2)):b("",!0),o("h3",{class:Z(["storefront__tariffs-title",{"text-center":s.isNew}])},n(s.title),3),s.isNew?b("",!0):(r(),c("p",bt,n(s.subtitle),1)),o("div",{class:Z(["storefront__tariffs-block",{"storefront__tariffs-block_two":s.isTwo}])},[(r(!0),c(w,null,J(s.tariffs,(a,i)=>(r(),c(w,{key:i},[a.is_customize?(r(),c("div",{key:1,class:Z(["storefront__tariff storefront__tariff-custom",{"storefront__tariff-choice":u.value}]),ref_for:!0,ref_key:"customTariff",ref:M,style:O({borderColor:"#"+s.firstPaymentColor,backgroundImage:`linear-gradient(113.1deg, rgba(27, 27, 44, 0.7) 0%, rgba(27, 27, 44, 0.7) 100%), url(${s.assets.customBg})`})},[u.value?(r(),c("div",qt,n(s.translations.your_choice),1)):b("",!0),u.value?(r(),c("div",Rt,[o("button",{class:"storefront__tariff-action__white",onClick:l[0]||(l[0]=d=>u.value=!u.value)},[p(n(s.translations.close_customization)+" ",1),o("img",{src:s.assets.customize,alt:""},null,8,Vt)])])):b("",!0),o("div",Yt,[k.value?(r(),c("img",{key:1,decoding:"async",src:u.value?N.value:ae.value,alt:u.value?X.value:A.value},null,8,Wt)):(r(),c("img",{key:0,decoding:"async",src:a.image,alt:a.title},null,8,Gt)),k.value?(r(),c("h3",jt,n(u.value?X.value:A.value),1)):(r(),c("h3",Ut,n(a.title),1))]),k.value?(r(),c("div",Qt,[o("div",{class:"storefront__tariff-description__top",style:O(he.value)},[o("span",null,n(u.value?D.value:a.slots_custom)+" "+n(s.translations.slots),1),l[8]||(l[8]=o("div",{class:"storefront__tariff-description__top-separator",style:{background:"#007CEE"}},null,-1)),o("span",null,n(u.value?C.value:a.ram_custom)+" "+n(s.translations.gb_ram),1)],4)])):(r(),c("div",Xt,[o("div",{class:"storefront__tariff-description__top",id:`storefront__tariff-description__top_custom_${s.id}`,style:O(he.value)},[o("span",null,n(a.slots_custom)+" "+n(s.translations.slots),1),o("div",{class:"storefront__tariff-description__top-separator",style:O({background:"#"+s.firstPaymentColor})},null,4),o("span",null,n(a.ram_custom)+" "+n(s.translations.gb_ram),1)],12,Ht)])),o("div",Zt,[o("div",Jt,[o("span",Kt,n(u.value?K.value:s.translations.configure_own),1),o("span",es,[u.value?(r(),c("span",ts,n(Ne()),1)):b("",!0),u.value?(r(),c(w,{key:1},[p(n(s.currencyPrefix)+n(g.value),1)],64)):(r(),c(w,{key:2},[p(n(s.translations.custom),1)],64))])]),o("div",ss,[u.value?(r(),c(w,{key:1},[s.isCartSection?(r(),c("a",{key:0,class:"button storefront__tariff-action__cart",onClick:l[1]||(l[1]=d=>Ae())}
1,[p(n(s.translations.order_now)+" ",1),o("img",{src:s.assets.cart,alt:""},null,8,os)])):(r(),c("a",{key:1,class:"button storefront__tariff-action__cart",onClick:l[2]||(l[2]=d=>Ce())},[p(n(s.translations.add_to_cart)+" ",1),o("img",{src:s.assets.cart,alt:""},null,8,ls)]))],64)):(r(),c("button",{key:0,class:"button storefront__tariff-action__cart",onClick:Ye},[p(n(s.translations.customize_server)+" ",1),o("img",{src:s.assets.customize,alt:""},null,8,as)]))])])],6)):(r(),c("div",{key:0,class:Z(["storefront__tariff",{"storefront__tariff-popular":a.is_popular,"storefront__tariff-disabled":u.value}]),style:O(a.is_popular?{borderColor:"#"+s.firstPaymentColor}:{})},[a.is_popular?(r(),c("div",{key:0,class:"storefront__tariff-popular__label",style:O({background:"#"+s.firstPaymentColor})},n(a.popular_title),5)):b("",!0),o("div",kt,[o("img",{decoding:"async",src:a.image,alt:a.title},null,8,Ct),o("h3",St,n(a.title),1)]),o("div",wt,[o("div",{class:"storefront__tariff-description__top",id:`storefront__tariff-description__top_${s.id}`,style:O(he.value)},[o("span",null,n(a.slots)+" "+n(s.translations.slots),1),o("div",{class:"storefront__tariff-description__top-separator",style:O({background:"#"+s.firstPaymentColor})},null,4),o("span",null,n(a.ram)+" "+n(s.translations.gb_ram),1)],12,Pt)]),o("div",$t,[o("div",It,[k.value?(r(),c("span",Et,n(ve.value),1)):(r(),c("span",xt,n(ve.value),1)),k.value?(r(),c("span",zt,[te(30,a.ram)>0?(r(),c("span",Tt,n(a.prices.prefix)+n(Oe(a,"basic")),1)):b("",!0),p(" "+n(a.prices.prefix)+n(Me(a,"basic")),1)])):(r(),c("span",Bt,[te(30,a.ram)>0?(r(),c("span",Ft,n(a.prices.prefix)+n(ze(a)),1)):b("",!0),p(" "+n(a.prices.prefix)+n(Fe(a)),1)])),o("span",Dt,"/ "+n(ve.value),1)]),s.isCartSection?(r(),c("div",Lt,n(s.translations.price_1_year),1)):b("",!0),o("div",{class:"storefront__tariff-action",style:O(s.isCartSection?{marginTop:"5px"}:{})},[s.isCartSection||s.isCartOneStepSection?(r(),c("a",{key:0,class:"button storefront__tariff-action__cart",onClick:d=>Re(a)},[p(n(s.translations.order_now)+" ",1),o("img",{src:s.assets.cart,alt:""},null,8,Mt)],8,Nt)):(r(),c("a",{key:1,class:"button storefront__tariff-action__cart",onClick:d=>qe(a)},[p(n(s.translations.add_to_cart)+" ",1),o("img",{src:s.assets.cart,alt:""},null,8,At)],8,Ot))],4)])],6))],64))),128)),u.value?(r(),c("div",{key:0,class:"storefront__tariffs-customizer",ref_key:"customizerBlock",ref:W},[ne(ge,{title:s.translations.slots,caption:s.translations.slots_caption,options:re.value,"is-premium":y.value,onUpdate:Te,ref_key:"slotsCustomizer",ref:H,assets:s.assets,translations:s.translations},null,8,["title","caption","options","is-premium","assets","translations"]),ne(ge,{title:s.translations.gb_ram,caption:s.translations.ram_caption,options:ce.value,"is-premium":y.value,onUpdate:De,ref_key:"ramsCustomizer",ref:G,assets:s.assets,translations:s.translations},null,8,["title","caption","options","is-premium","assets","translations"]),ne(ge,{title:s.translations.days_runtime,"title-caption":s.translations.choose_more_runtime,caption:s.translations.days_caption,options:le.value,"is-premium":y.value,type:"days",onUpdate:Le,ref_key:"daysCustomizer",ref:F,assets:s.assets,translations:s.translations},null,8,["title","title-caption","caption","options","is-premium","assets","translations"])],512)):b("",!0)],2),o("div",{class:Z(["storefront__tariffs-footer",{"storefront__tariffs-footer_two":s.isTwo}])},[o("span",ns,n(s.includesTitle),1),(r(!0),c(w,null,J(s.includes,(a,i)=>(r(),c("span",{key:i,class:"storefront__tariffs-footer__service"},[a.image?(r(),c("img",{key:0,src:a.image,alt:""},null,8,is)):b("",!0),p(" "+n(a.title),1)]))),128))],2)],4),ne(Ee,{name:"modal-fade"},{default:xe(()=>[Y.value?(r(),c("div",{key:0,onClick:l[7]||(l[7]=pe(a=>Y.value=!1,["self"])),class:"storefront__modal-wrapper",style:{display:"flex"}},[o("div",rs,[o("div",cs,[o("p",us,n(s.translations.modal_title),1),o("p",ds,n(s.translations.modal_subtitle),1),o("div",fs,[o("div",{class:"storefront__modal-grid__block storefront__modal-budget",onClick:l[3]||(l[3]=a=>Se(`default${s.id}`))},[o("div",_s,[o("img",{src:s.assets.pickLeft,alt:""},null,8,ms),o("p",vs,n(s.translations.budget),1),o("img",{src:s.assets.pickRight,alt:""},null,8,ys)]),o("div",hs,[o("ul",null,[(r(!0),c(w,null,J(s.budgetItems,(a,i)=>(r(),c("li",{key:i},[o("img",{src:a.image,alt:""},null,8,gs),p(" "+n(a.title)+" ",1),a.info?(r(),c(w,{key:0},[o("img",{class:"storefront__modal-budget__content-image",src:s.assets.infoGray,alt:""},null,8,ps),o("div",bs,n(a.info),1)],64)):b("",!0)]))),128))]),o("div",ks,n(s.currencyPrefix)+n(g.value),1)])]),o("div",Cs,[o("span",null,n(s.translations.your_server_will_be),1),l[9]||(l[9]=o("div",{class:"storefront__modal-better__progress"},[o("span",null,"40%")],-1)),o("span",null,n(s.translations.better_with_premium),1)]),o("div",{class:"storefront__modal-grid__block storefront__modal-premium",onClick:l[4]||(l[4]=a=>Se(`upgrade${s.id}`))},[o("div",Ss,[o("div",ws,[o("img",{src:s.assets.swordLeft,alt:""},null,8,Ps),o("p",$s,n(s.translations.premium),1),o("img",{src:s.assets.swordRight,alt:""},null,8,Is)])]),o("div",xs,[o("ul",null,[(r(!0),c(w,null,J(s.premiumItems,(a,i)=>(r(),c("li",{key:i},[o("img",{src:a.image,alt:""},null,8,Es),p(" "+n(a.title)+" ",1),a.info?(r(),c(w,{key:0},[o("img",{class:"storefront__modal-premium__content-image",src:s.assets.infoGray,alt:""},null,8,Bs),o("div",Fs,n(a.info),1)],64)):b("",!0)]))),128))]),o("div",zs,n(s.currencyPrefix)+n($.value),1)])])]),o("div",Ts,[o("a",{class:"storefront__modal-footer__default",id:`default${s.id}`,onClick:l[5]||(l[5]=a=>Ce())},n(s.translations.proceed_without_upgrade),9,Ds),o("a",{class:"button storefront__modal-footer__upgrade",id:`upgrade${s.id}`,onClick:l[6]||(l[6]=a=>Ve())},[o("img",{src:s.assets.swordWhite,alt:""},null,8,Ns),p(" "+n(s.translations.add_upgrade),1)],8,Ls)])])])])):b("",!0)]),_:1}),s.isTwo&&s.isIncludesBottom&&s.includesTwo&&s.includesTwo.length>0?(r(),c("div",Ms,[o("span",Os,n(s.includesTitleTwo),1),(r(!0),c(w,null,J(s.includesTwo,(a,i)=>(r(),c("span",{key:i,class:"storefront__tariffs-footer__service"},[a.image?(r(),c("img",{key:0,src:a.image,alt:""},null,8,As)):b("",!0),p(" "+n(a.title),1)]))),128))])):b("",!0)],64))}};export{Rs as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.