1import{F as q}from"./jRA7Tl_M.js";import{S as H}from"./CuNIG-dT.js";import{d as N,a7 as V,B as O,E as m,a8 as $,a9 as U,N as y,aa as I,_ as A,r as w,b as n,c as i,j as t,z as R,U as z,e as l,n as o,w as B,t as a,F as P,f as E,ab as L,i as T,q as Y,p as W,O as Q,a6 as j,u as K,C as G,l as J,V as X,D as Z,L as x,Q as ee,K as te,x as se}from"./DOUu-gYp.js";import{_ as F}from"./DYo5I8XZ.js";import{C as D}from"./D5U1fILz.js";import{D as oe,u as re}from"./fTjw_376.js";import{d as ne}from"./CMMw5z2x.js";import{v as ie}from"./xPGEof6T.js";import{u as ae}from"./CF5Wz4OB.js";import{u as le}from"./DcvfPPp0.js";import{d as ue,b as ce,g as de,a as _e}from"./CEmM2HP8.js";import{u as me}from"./DV9vrMQR.js";const pe=N({name:"BuyNetworkTools",components:{ButtonBox:O,CheckBox:D,InputBox:V,SelectBox:F},data(){return{features:re(),service_id:7,isPerforming:!1,isPerformingErrored:!1,entity:{...oe},entity_errors:{},price_result_loading:!1,price_result:{loading:!1,res:null},policy_agree:!0,validate_options:{period:{label:"buy_proxy.fields.period",validate:{required:!0}},payment_method:{label:"labels.merchant",validate:{required:!0}},client_email:{label:"labels.your_email",placeholder:"[email protected]",validate:{required:!0}}}}},computed:{isLoading(){const e=y();return!e.auth_loaded||e.auth_state&&!$().orders_loaded},isErrored(){return y().auth_state&&$().orders_err},webToolsSubscription(){return $().hasNetworkTools},getterPeriods(){return I().periods(this.service_id,"purchase")},getterMerchants(){return m().merchants("without_balance")},clientEmailSubAction(){const e=y();if(e.auth_state&&e.user!==null&&this.entity.client_email!==e.user.email)return this.$t("labels.complete")+e.user.email}},async mounted(){this.getServices(),y().auth_state&&this.getOrders(),this.calculate(),this.$eventBus.$on("updateCurrency",this.calculate),this.$eventBus.$on("authorization",this.getOrders)},beforeUnmount(){this.$eventBus.$off("updateCurrency",this.calculate),this.$eventBus.$off("authorization",this.getOrders)},methods:{getMerchants(){m().getMerchants()},fillUserEmail(){const e=y();e.user&&(this.entity.client_email=e.user.email)},async getServices(){try{const e=m();if(await e.getServices(),e.services_loaded){const s=U().service;s&&this.$captureEcommerceEvent("selectProductType",{service:s})}}catch(e){console.log(e)}},getOrders(){$().getOrders()},async calculate(){this.price_result.loading=!0;const e={service_id:this.service_id,quantity:this.entity.quantity,period:this.entity.period,promocode:null};this.price_result.res=await m().getPrice(e),this.price_result.loading=!1},async submitForm(){try{this.isPerformingErrored=!1;const{status:e,errors:s}=await ie(this.validate_options,this.entity);if(this.entity_errors=s,!e)return;this.isPerforming=!0;const c={entity:{...this.entity,service_id:this.service_id}};await m().createOrder(c)}catch{this.isPerformingErrored=!0}console.log(""),this.isPerforming=!1}},watch:{entity:{handler:ne(function(){this.calculate()},400),deep:!0}}}),fe="_header_1nk9s_1",ye="_container_1nk9s_8",he="_inner_1nk9s_14",ve="_block_1nk9s_31",ge="_formFields_1nk9s_43",be="_formTotals_1nk9s_59",ke="_errorMsg_1nk9s_73",$e="_errorMsg_inner_1nk9s_79",we="_errorMsg_icon_1nk9s_92",Te="_features_1nk9s_98",Se="_featuresHead_1nk9s_106",Ce="_featuresTitle_1nk9s_110",Me="_featuresSubtitle_1nk9s_124",Be="_featuresListTitle_1nk9s_129",Pe="_featuresList_1nk9s_129",Le="__offer_1nk9s_152",Ee="__available_1nk9s_160",qe="_featuresText_1nk9s_173",Ne="_subscription_1nk9s_181",Ve={header:fe,container:ye,inner:he,block:ve,formFields:ge,formTotals:be,errorMsg:ke,errorMsg_inner:$e,errorMsg_icon:we,features:Te,featuresHead:Se,featuresTitle:Ce,featuresSubtitle:Me,featuresListTitle:Be,featuresList:Pe,_offer:Le,_available:Ee,featuresText:qe,subscription:Ne},Oe={key:"loading"},Ae=["textContent"],Fe={class:"buy-form__total"},De=["textContent"],He={key:0,class:"loader"},Ue={key:1,class:"buy-form__total_sum"},Ie={class:"buy-form__total_sum"},Re={key:0,class:"buy-form__total_old"},ze={style:{"white-space":"pre-wrap"}},Ye={class:"buy-form__buttons"},We=["href"],Qe=["textContent"];function je(e,s,c,p,h,v){const u=H,f=w("Icon"),d=O,g=w("icon"),_=F,S=V,C=Y,M=D,b=Q;return n(),i("div",null,[t("div",{class:o(e.$style.header)},[R(l(u,{align:"right"},null,512),[[z,!(e.isLoading||e.isErrored||e.webToolsSubscription.has_subscription)]])],2),t("div",{class:o(e.$style.container)},[l(b,null,{default:B(()=>[e.isLoading?(n(),i("div",Oe,[...s[4]||(s[4]=[t("div",{class:"loader"},null,-1)])])):e.isErrored?(n(),i("div",{key:"errored",class:o([e.$style.errorMsg,e.$style.block])},[t("div",{class:o(e.$style.errorMsg_inner)},[t("div",{class:o(e.$style.errorMsg_icon)},[l(f,{name:"warn"})],2),t("p",null,a(e.$t("errors.internal")),1),l(d,{color:"blue",title:"buttons.try_more",icon:"update",loading:e.isLoading,onClick:e.getOrders},null,8,["loading","onClick"])],2)],2)):e.webToolsSubscription.has_subscription?(n(),i("div",{key:"subscription",class:o(e.$style.subscription)},[t("div",{class:o([e.$style.features,e.$style.block])},[t("div",{class:o(e.$style.featuresHead)},[t("div",{class:o(e.$style.featuresTitle)},a(e.$t("services.network_tools.subscription.active_short"))+"! ",3),t("p",null,a(e.$t("services.network_tools.subscription.date"))+" "+a(e.$date_format(e.webToolsSubscription.ends_at,"DD.MM.YYYY")),1)],2),t("div",{class:o(e.$style.featuresListTitle)},a(e.$t(e.webToolsSubscription.mode==="free"?"services.network_tools.features.title_free":"services.network_tools.features.title_bought")),3),t("ul",{class:o([e.$style.featuresList,e.$style._available])},[(n(!0),i(P,null,E(e.features,r=>(n(),i("li",{key:r.title},[t("a",{href:r.href},[t("span",{textContent:a(e.$t(r.title))},null,8,Qe),l(g,{name:"arrow_right"}
1)],8,We)]))),128))],2)],2)],2)):(n(),i("div",{key:"form",class:o(e.$style.inner)},[t("div",{class:o([e.$style.features,e.$style.block])},[t("div",{class:o(e.$style.featuresTitle)},a(e.$t("services.network_tools.features.title_offer")),3),t("ul",{class:o([e.$style.featuresList,e.$style._offer])},[(n(!0),i(P,null,E(e.features,r=>(n(),i("li",{key:r.title},[l(g,{name:"check_mark"}),t("span",{textContent:a(e.$t(r.title))},null,8,Ae)]))),128))],2),t("div",{class:o(e.$style.featuresText)},a(e.$t("services.network_tools.free_for_clients")),3)],2),t("div",{class:o(e.$style.block)},[t("div",{class:o(e.$style.formFields)},[l(_,L(e.validate_options.period,{modelValue:e.entity.period,"onUpdate:modelValue":s[0]||(s[0]=r=>e.entity.period=r),values:e.getterPeriods,error:e.entity_errors.period}),null,16,["modelValue","values","error"]),l(_,L(e.validate_options.payment_method,{modelValue:e.entity.payment_method,"onUpdate:modelValue":s[1]||(s[1]=r=>e.entity.payment_method=r),error:e.entity_errors.payment_method,values:e.getterMerchants,onOpenOnce:e.getMerchants}),null,16,["modelValue","error","values","onOpenOnce"]),l(S,L(e.validate_options.client_email,{modelValue:e.entity.client_email,"onUpdate:modelValue":s[2]||(s[2]=r=>e.entity.client_email=r),modelModifiers:{trim:!0},error:e.entity_errors.client_email,"sub-action":e.clientEmailSubAction,onSubActionClick:e.fillUserEmail}),null,16,["modelValue","error","sub-action","onSubActionClick"])],2),e.isLoading?T("",!0):(n(),i("div",{key:0,class:o(["buy-form",e.$style.formTotals])},[t("div",Fe,[t("span",{textContent:a(e.$t("buy_proxy.total"))},null,8,De),e.price_result.loading?(n(),i("div",He)):e.price_result.res?(n(),i(P,{key:2},[t("span",Ie,a(e.$money(e.price_result.res.payer_amount)),1),e.price_result.res.payer_amount<e.price_result.res.converted_amount?(n(),i("span",Re,a(e.$money(e.price_result.res.converted_amount)),1)):T("",!0)],64)):(n(),i("span",Ue,"-"))]),l(M,{modelValue:e.policy_agree,"onUpdate:modelValue":s[3]||(s[3]=r=>e.policy_agree=r)},{default:B(()=>[t("span",ze,a(e.$t("buy_proxy.policy")),1),l(C,{target:"_blank",to:e.localePath({name:"Rules"}),class:"link link--blue"},{default:B(()=>[W(a(e.$t("buy_proxy.policy_url")),1)]),_:1},8,["to"])]),_:1},8,["modelValue"]),t("div",Ye,[l(d,{wide_padding:!0,loading:e.isPerforming,disabled:!e.policy_agree,title:"buttons.buy",color:"blue",onClick:e.submitForm},null,8,["loading","disabled","onClick"])]),t("div",{class:o(["ui-field-error",{_show:e.isPerformingErrored}])},a(e.$t("errors.internal_short")),3)],2))],2)],2))]),_:1})],2)])}const Ke={$style:Ve},Ge=A(pe,[["render",je],["__cssModules",Ke]]),Je=N({name:"PageNetworkTools",components:{ServiceSectionHeader:j,BuyNetworkTools:Ge,FaqAccordion:q},async setup(){const e=K(),{t:s,locale:c}=G(),p=J(),h=X(),v=Z(),u=se(),f=me("network_tools",{seoText:()=>""}),d=x("network-tools-getServices",async()=>{try{await m().getServices()}catch{throw ee({statusCode:500})}return!0}),[{seoText:g,faqItems:_},{status:S,error:C}]=await Promise.all([f,d]);e.runWithContext(()=>le(S,C));const M=te(()=>{const b=s("services.network_tools.title")+"",r=s("services.network_tools.subtitle")+"";return{title:b,description:r,addAlternateLinks:!0,script:[ue({title:b,description:r,url:u.public.domainCurrent+p.path,lang:c.value,dateModified:"2020-11-11T05:26:25+0000",datePublished:"2020-03-11T05:26:25+0000"}),ce([{name:s("layout.home"),url:u.public.domainCurrent+h.resolve(v({name:"home"})).href},{name:s("layout.nav.services.title"),url:u.public.domainCurrent+h.resolve(v({name:"services"})).href},{name:s("layout.nav.services.network_tools"),url:u.public.domainCurrent+p.path}]),de(k=>s(k),u.public.domainCurrent,u.public.isProxySolutionsNetDomain),..._.value.length?[_e({url:u.public.domainCurrent+p.path,lang:c.value,questions:_.value.map(k=>({title:k.q,answer:k.a}))})]:[]]}});return e.runWithContext(()=>ae(M)),{seoText:g,faqItems:_}}}),Xe={class:"container"},Ze={key:0,class:"service-page__description"},xe={class:"container"},et=["innerHTML"],tt={key:1,class:"container"},st={class:"service-page__faq"};function ot(e,s,c,p,h,v){const u=w("ServiceSectionHeader"),f=w("BuyNetworkTools"),d=q;return n(),i("div",null,[l(u,{title:"services.network_tools.title",description:"services.network_tools.subtitle"}),t("section",Xe,[l(f)]),e.seoText?(n(),i("section",Ze,[t("div",xe,[t("div",{class:"service-page__description_inner wysiwyg-sm",innerHTML:e.seoText},null,8,et)])])):T("",!0),e.faqItems.length?(n(),i("section",tt,[t("div",st,[l(d,{items:e.faqItems,title:e.$t("services.network_tools.faq_title")},null,8,["items","title"])])])):T("",!0)])}const yt=A(Je,[["render",ot]]);export{yt 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.