PageSourceSearch

https://proxy-solutions.net/_nuxt/BDzLRW3S.js

js proxy-solutions.net collected 2026-10-01 15:23:27 UTC 13,380 bytes, 1 lines download raw bytes

1import{d as M,B as C,_ as q,b as s,c as r,j as t,t as i,n as d,e as l,F as c,f as Q,h as g,p as j,M as U,a7 as z,N as W,a8 as G,aa as L,E as _,bj as V,aT as B,a2 as H,r as S,w as I,z as f,i as p,ab as v,U as b}from"./BEf7-8Bi.js";import{_ as O}from"./c_CCQ-sB.js";import{C as $}from"./Bb0ol36V.js";import{_ as A}from"./Bwa35FPs.js";import{_ as T}from"./A4GzcguU.js";import{S as J}from"./DXx3I43y.js";import{v as K}from"./xPGEof6T.js";import{d as R}from"./CMMw5z2x.js";const X=M({name:"ProxyProlongIpList",components:{CheckBox:$,ButtonBox:C},props:{order_id:{type:Number,required:!0},order_title:{type:String,required:!0}},emits:["close","submit"],data(){return{isLoading:!1,isLoadingErrored:!1,submit_error:"",proxies:[]}},computed:{isAllChosen(){return this.proxies.every(e=>e.chosen)},chosenLength(){return this.proxies.filter(e=>e.chosen).length},gridMode(){return this.proxies.length>10?"large":"normal"}},watch:{order_id:{handler:function(){this.resetData(),this.getData()}}},mounted(){this.getData()},methods:{resetData(){this.isLoading=!1,this.isLoadingErrored=!1,this.submit_error="",this.proxies=[]},async getData(){this.isLoading=!0;try{const e=await this.$api.usersOrders.get(this.order_id);if(!e.order.proxies){this.isLoadingErrored=!0;return}this.proxies=e.order.proxies.map(o=>({label:o.ip,chosen:!0}))}catch(e){console.error("get order, proxy prolong",e),this.isLoadingErrored=!0}this.isLoading=!1},close(){this.$emit("close")},chooseAll(){const e=!this.isAllChosen;this.proxies.map((o,h)=>{this.proxies[h].chosen=e})},submit(){const e=this.proxies.filter(o=>!o.chosen);this.$emit("submit",{remove_proxy:e.map(o=>o.label)})}}}),Y="_footer_3itm7_1",Z="_footer_chosen_3itm7_15",x="_footer_chosen_value_3itm7_22",ee="_footer_buttons_3itm7_27",oe="_ipList_head_3itm7_34",te="_ipList_inner_3itm7_38",se="__large_3itm7_44",ie="_container_3itm7_53",re={footer:Y,footer_chosen:Z,footer_chosen_value:x,footer_buttons:ee,ipList_head:oe,ipList_inner:te,_large:se,container:ie},ne={key:0,class:"ui-modal__loader"},le={key:1},de={key:2},ae={class:"ui-modal__head"},pe=["textContent"],ue=["textContent"];function he(e,o,h,k,y,w){const u=$,m=C;return s(),r("div",null,[e.isLoading?(s(),r("div",ne,[...o[1]||(o[1]=[t("div",{class:"loader"},null,-1)])])):e.isLoadingErrored?(s(),r("div",le)):(s(),r("div",de,[t("div",ae,[t("div",{class:"ui-modal__head_title",textContent:i(e.order_title)},null,8,pe),t("div",{class:"ui-modal__head_text",textContent:i(e.$t("lk.proxy.prolong.edit_ip_title"))},null,8,ue)]),t("div",{class:d([e.$style.ipList,{[e.$style._large]:e.gridMode==="large"}])},[t("div",{class:d(e.$style.ipList_head)},[l(u,{label:"labels.choose_all","model-value":e.isAllChosen,"onUpdate:modelValue":e.chooseAll},null,8,["model-value","onUpdate:modelValue"])],2),t("div",{class:d(e.$style.ipList_inner)},[(s(!0),r(c,null,Q(e.proxies,(a,E)=>(s(),g(u,{key:a.label,label:a.label,"model-value":a.chosen,"onUpdate:modelValue":P=>a.chosen=!a.chosen},null,8,["label","model-value","onUpdate:modelValue"]))),128))],2)],2),t("div",{class:d([e.$style.footer,"ui-modal__full-size"])},[t("div",{class:d(e.$style.footer_chosen)},[j(i(e.$t("labels.chosen"))+": ",1),t("span",{class:d(e.$style.footer_chosen_value)},i(e.chosenLength)+" "+i(e.$t("uom.pcs")),3)],2),t("div",{class:d(e.$style.footer_buttons)},[l(m,{title:"buttons.submit",color:"blue",onClick:e.submit},null,8,["onClick"]),t("button",{type:"button",class:"ui-button-text _grey",onClick:o[0]||(o[0]=(...a)=>e.close&&e.close(...a))},i(e.$t("buttons.cancel")),1)],2)],2)]))])}const me={$style:re},_e=q(X,[["render",he],["__cssModules",me]]),ce=M({name:"ProxyProlong",components:{ProxyProlongIpList:_e,Counter:O,PromoCodeInput:T,InputBox:z,SelectBox:A,SelectBoxLine:J,CheckBox:$,ButtonBox:C,Modal:U},props:{show:{type:Boolean,required:!0},order:{type:Object,required:!0}},emits:["close"],data(){return{isPerforming:!1,isErrored:!1,isErroredText:"",add_ip_enabled:!1,entity:{...V},entity_errors:{},promoCode:{showed:!1,applied:!1,value:"",promoCode:null},price_result:{loading:!1,res:null},choose_ip:{show:!1,render:!1}}},computed:{...H(_,["services_loading","services_errored"]),model(){return{period:{label:"buy_proxy.fields.period",validate:{required:!0}},payment_method:{label:"labels.merchant",validate:{required:!0}},add_ip:{label:"lk.proxy.prolong.add_ip"},quantity:{label:"lk.proxy.prolong.channels_quantity_label",validate:{required:B(this.order.service.id)}}}},promoCodeShowState(){return{field:this.promoCode.showed&&!this.promoCode.applied,applied_promo:this.promoCode.applied&&!!this.promoCode.promoCode,invite:!this.promoCode.showed&&!this.promoCode.applied}},isOrderExpired(){return!this.order.status.startsWith("active")},isMobileProxy(){return B(this.order.service.id)},isBatchProxy(){return this.order.service.id===5},orderTitle(){const e=this.order.location,o=e?e.type==="city"?e.name:(e.code||"").toUpperCase():"";return`${this.$t("lk.proxy.prolong.order_label",{id:this.order.id})} (${this.totalQuantity} ${this.$t("uom.pcs")}${o?" "+o:""})`},totalQuantity(){let e=this.entity.quantity;return Array.isArray(this.entity.remove_proxy)&&(e-=this.entity.remove_proxy.length),typeof this.entity.add_ip=="number"&&(e+=this.entity.add_ip),e},getterPeriods(){const e=L().periods(this.order.service.id,"prolong");return this.isMobileProxy&&!this.isOrderExpired?e.filter(o=>o.value===this.order.period):e},getterMerchants(){return _().merchants("all")}},mounted(){this.resetData(),_().getServices()},methods:{getMerchants(){_().getMerchants()},resetData(){this.isPerforming=!1,this.isErrored=!1,this.isErroredText="",this.add_ip_enabled=!1,this.entity={...V,period:this.order.period,quantity:this.order.quantity},this.entity_errors={},this.promoCode.showed=!1,this.promoCode.applied=!1,this.promoCode.value="",this.promoCode.promoCode=null,this.price_result.loading=!1,this.price_result.res=null,this.choose_ip.show=!1},close(){this.$emit("close")},async calculate(){if(this.entity.period===null)return;this.price_result.loading=!0;const e={service_id:this.order.service.id,city_id:null,country_id:null,quantity:this.totalQuantity,period:this.entity.period,promocode:this.promoCode.applied?this.promoCode.value:null};this.order.location?.type==="city"?e.city_id=this.order.location.id:this.order.location?.type==="country"&&(e.country_id=this.order.location.id),L().additionalFields(e.service_id).indexOf("multiport")>-1&&(e.multiport=!!this.order.multiport),this.price_result.res=await _().getPrice(e),this.price_result.loading=!1},applyPromoCode(e){this.promoCode.promoCode=e,e===null&&(this.promoCode.value=""),this.promoCode.applied=e!==null,this.calculate()}
1,async submitForm(){if(!this.isPerforming){this.isErrored=!1;try{const{status:e,errors:o}=await K(this.model,this.entity);if(this.entity_errors=o,!e)return;if(this.totalQuantity===0){this.isErrored=!0,this.isMobileProxy?this.isErroredText="lk.proxy.prolong.quantity_error_channels":this.isErroredText="lk.proxy.prolong.quantity_error";return}this.isPerforming=!0;const h={entity:this.entity,order:this.order,promo_code:this.promoCode.value};if(this.entity.payment_method==="balance"){await this.calculate();const k=this.price_result.res?this.price_result.res.payer_amount_base:0,y=W().user,w=y?y.balance:0;if(k>w){this.isPerforming=!1,this.isErrored=!0,this.isErroredText="lk.balance.not_enough_money";return}}await G().prolongOrder(h),(this.entity.payment_method==="balance"||this.entity.payment_method==="test")&&(this.$notify("lk.proxy.prolong.success"),this.close())}catch(e){console.error("proxy prolong",e),this.isErrored=!0,this.isErroredText=""}console.log("1"),this.isPerforming=!1}},handleAddIpEnabling(e){const o=!!e;!o&&this.entity.add_ip&&this.entity.add_ip>0&&(this.entity.add_ip=0),this.add_ip_enabled=o},handleEditIpOpening(){this.choose_ip.render=!0,this.choose_ip.show=!0},handleEditIpSubmit({remove_proxy:e}){this.entity.remove_proxy=e,this.choose_ip.show=!1}},watch:{show:{handler:function(e){e&&this.resetData()}},entity:{handler:R(function(){this.calculate()},400),deep:!0}}}),ye="_head_title_1p647_1",fe="_head_editIp_1p647_10",ve="_addIp_1p647_30",be={head_title:ye,head_editIp:fe,addIp:ve},ge={key:0,class:"ui-modal__fields"},Ce={class:"ui-modal__head"},$e={class:"ui-modal__h1"},ke={class:"ui-modal__head_text"},we={class:"ui-modal__buttons"},Pe={class:"ui-modal__head"},Ee={class:"ui-modal__head_title"},Le={class:"ui-modal__fields"},Ve=["textContent"],Be=["textContent"],Se={key:2,class:"ui-notice"},Ie={class:"ui-notice__text"},Me=["textContent"],qe={class:"buy-form"},Ue={class:"buy-form__total"},Oe=["textContent"],Ae={key:0,class:"loader"},Te={key:1,class:"buy-form__total_sum"},De={class:"buy-form__total_sum"},Ne={key:0,class:"buy-form__total_old"},Fe={key:0,class:"ui-promo-applied"},Qe=["textContent"],je={class:"ui-promo-applied__value"},ze={class:"ui-modal__buttons"};function We(e,o,h,k,y,w){const u=C,m=S("Icon"),a=O,E=$,P=A,D=T,N=S("ProxyProlongIpList"),F=U;return s(),g(F,{show:e.show,width:e.choose_ip.show?"large":"middle",onClose:e.close},{default:I(()=>[e.services_loading?(s(),r("div",ge,[...o[10]||(o[10]=[t("div",{class:"l-skeleton__field"},[t("span"),t("span")],-1),t("div",{class:"l-skeleton__field"},[t("span"),t("span")],-1),t("div",{class:"l-skeleton__field"},[t("span"),t("span")],-1)])])):e.services_errored?(s(),r(c,{key:1},[t("div",Ce,[t("div",$e,i(e.$t("errors.internal_short")),1),t("div",ke,i(e.$t("errors.internal")),1)]),t("div",we,[l(u,{color:"blue_secondary",title:"buttons.close",onClick:e.close},null,8,["onClick"])])],64)):(s(),r(c,{key:2},[f(t("div",null,[t("div",Pe,[t("div",Ee,i(e.$t("lk.proxy.prolong.title")),1)]),t("div",Le,[e.order?(s(),r("div",{key:0,class:d(e.$style.head)},[t("div",{class:d(e.$style.head_title),textContent:i(e.orderTitle)},null,10,Ve),e.isOrderExpired&&!e.isMobileProxy&&!e.isBatchProxy?(s(),r("button",{key:0,class:d(e.$style.head_editIp),type:"button",onClick:o[0]||(o[0]=(...n)=>e.handleEditIpOpening&&e.handleEditIpOpening(...n))},[t("span",{textContent:i(e.$t("lk.proxy.prolong.edit_ip"))},null,8,Be),l(m,{name:"arrow_right"})],2)):p("",!0)],2)):p("",!0),e.isOrderExpired?(s(),r(c,{key:1},[e.isMobileProxy?(s(),g(a,v({key:0,modelValue:e.entity.quantity,"onUpdate:modelValue":o[1]||(o[1]=n=>e.entity.quantity=n)},e.model.quantity,{error:e.entity_errors.quantity}),null,16,["modelValue","error"])):e.isBatchProxy?p("",!0):(s(),r("div",{key:1,class:d(e.$style.addIp)},[l(E,v(e.model.add_ip,{"model-value":e.add_ip_enabled,"onUpdate:modelValue":e.handleAddIpEnabling}),null,16,["model-value","onUpdate:modelValue"]),f(l(a,{modelValue:e.entity.add_ip,"onUpdate:modelValue":o[2]||(o[2]=n=>e.entity.add_ip=n),modelModifiers:{number:!0},min:0},null,8,["modelValue"]),[[b,e.add_ip_enabled||(e.entity.add_ip??0)>0]])],2))],64)):(s(),r("div",Se,[l(m,{name:"warn"}),t("div",Ie,i(e.$t(e.isMobileProxy?"lk.proxy.prolong.change_notice_channels":"lk.proxy.prolong.change_notice")),1)])),l(P,v(e.model.period,{modelValue:e.entity.period,"onUpdate:modelValue":o[3]||(o[3]=n=>e.entity.period=n),values:e.getterPeriods,error:e.entity_errors.period}),null,16,["modelValue","values","error"]),l(P,v(e.model.payment_method,{modelValue:e.entity.payment_method,"onUpdate:modelValue":o[5]||(o[5]=n=>e.entity.payment_method=n),values:e.getterMerchants,error:e.entity_errors.payment_method,onOpen:e.getMerchants}),{subActions:I(()=>[t("button",{type:"button",class:d(["ui-field-sub-action",[{_show:e.promoCodeShowState.invite}]]),onClick:o[4]||(o[4]=n=>
1e.promoCode.showed=!0),textContent:i(e.$t("promoCode.invite"))},null,10,Me)]),_:1},16,["modelValue","values","error","onOpen"]),f(l(D,{modelValue:e.promoCode.value,"onUpdate:modelValue":o[6]||(o[6]=n=>e.promoCode.value=n),"service-id":e.order.service.id,"first-payment":!1,onClose:o[7]||(o[7]=n=>e.promoCode.showed=!1),onApply:e.applyPromoCode},null,8,["modelValue","service-id","onApply"]),[[b,e.promoCodeShowState.field]]),t("div",qe,[t("div",Ue,[t("span",{textContent:i(e.$t("buy_proxy.total"))},null,8,Oe),e.price_result.loading?(s(),r("div",Ae)):e.price_result.res?(s(),r(c,{key:2},[t("span",De,i(e.$money(e.price_result.res.payer_amount)),1),e.price_result.res.payer_amount<e.price_result.res.converted_amount?(s(),r("span",Ne,i(e.$money(e.price_result.res.converted_amount)),1)):p("",!0)],64)):(s(),r("span",Te,"-"))]),e.promoCodeShowState.applied_promo?(s(),r("div",Fe,[t("div",{textContent:i(e.$t("promoCode.applied"))},null,8,Qe),t("div",je,i(e.$t("promoCode.discount"))+" "+i(e.promoCode.promoCode?.discount)+"% ",1),t("button",{type:"button",class:"ui-promo-applied__rm",onClick:o[8]||(o[8]=n=>e.applyPromoCode(null))},[l(m,{name:"close_bold"})])])):p("",!0)])]),t("div",ze,[l(u,{title:"buttons.prolong",color:"blue",loading:e.isPerforming,onClick:e.submitForm},null,8,["loading","onClick"]),l(u,{title:"buttons.cancel",color:"blue_secondary",onClick:e.close},null,8,["onClick"])]),e.isErrored?(s(),r("div",{key:0,class:d(["ui-field-error",{_show:e.isErrored}])},i(e.$t(e.isErroredText||"errors.internal")),3)):p("",!0)],512),[[b,!e.choose_ip.show]]),e.choose_ip.render?f((s(),g(N,{key:0,order_title:e.orderTitle,order_id:e.order.id,onClose:o[9]||(o[9]=n=>e.choose_ip.show=!1),onSubmit:e.handleEditIpSubmit},null,8,["order_title","order_id","onSubmit"])),[[b,e.choose_ip.show]]):p("",!0)],64))]),_:1},8,["show","width","onClose"])}const Ge={$style:be},eo=q(ce,[["render",We],["__cssModules",Ge]]);export{eo 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.