(window.webpackJsonp=window.webpackJsonp||[]).push([[23,22],{1063:function(e,t,n){var content=n(1089);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(56).default)("68c54a82",content,!0,{sourceMap:!1})},1088:function(e,t,n){"use strict";n(1063)},1089:function(e,t,n){var r=n(55)((function(i){return i[1]}));r.push([e.i,".serviceCateSelector[data-v-b67b8fee]{z-index:9999}",""]),e.exports=r},1127:function(e,t,n){"use strict";n.r(t);var r={name:"ServiceSelector",props:{modalVisible:{type:Boolean,default:!1},callback:{type:Function,default:function(){return function(){}}}},watch:{modalVisible:function(e,t){console.log(e,t)}},beforeDestroy:function(){this.updateParentSwitchVal()},methods:{updateParentSwitchVal:function(){this.$emit("update:modalVisible",!1)},sendReturn:function(e){this.callback(e),this.updateParentSwitchVal()}}},o=(n(1088),n(42)),component=Object(o.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{staticClass:"serviceCateSelector",attrs:{title:e.$t("select_service.title"),visible:e.modalVisible,center:"",width:"100%","append-to-body":!0,fullscreen:!0,"close-on-press-escape":!1,"show-close":!1},on:{close:e.updateParentSwitchVal}},[n("el-card",{nativeOn:{click:function(t){return e.sendReturn("allplatform")}}},[n("center",[n("h1",[e._v(e._s(e.$t("services.allplatform.name")))]),n("h3",{staticClass:"subheader"},[e._v(e._s(e.$t("services.allplatform.desc")))])])],1),n("el-card",{nativeOn:{click:function(t){return e.sendReturn("home")}}},[n("center",[n("h1",[e._v(e._s(e.$t("services.home.name")))]),n("h3",{staticClass:"subheader"},[e._v(e._s(e.$t("services.home.desc")))])])],1),n("center",[n("p",{staticClass:"subheader"},[e._v(e._s(e.$t("select_service.hint",{place:e.$t("select_service.bottom_left")}))+" ")]),n("br"),n("p",[e._v(e._s(e.$t("login.email"))+" "),n("span",{staticClass:"underline"},[e._v(e._s(e.user.email))]),n("br"),e._v(e._s(e.$t("menu.id"))+" "),n("span",{staticClass:"underline"},[e._v(e._s(e.user.id))])])])],1)}),[],!1,null,"b67b8fee",null);t.default=component.exports},1133:function(e,t,n){var content=n(1178);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(56).default)("5c3b622e",content,!0,{sourceMap:!1})},1172:function(e,t){var n=.1,r="function"==typeof Float32Array;function o(e,t){return 1-3*t+3*e}function c(e,t){return 3*t-6*e}function l(e){return 3*e}function f(e,t,n){return((o(t,n)*e+c(t,n))*e+l(t))*e}function d(e,t,n){return 3*o(t,n)*e*e+2*c(t,n)*e+l(t)}function v(e){return e}e.exports=function(e,t,o,c){if(!(0<=e&&e<=1&&0<=o&&o<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&o===c)return v;for(var l=r?new Float32Array(11):new Array(11),i=0;i<11;++i)l[i]=f(i*n,e,o);function m(t){for(var r=0,c=1;10!==c&&l[c]<=t;++c)r+=n;--c;var v=r+(t-l[c])/(l[c+1]-l[c])*n,m=d(v,e,o);return m>=.001?function(e,t,n,r){for(var i=0;i<4;++i){var o=d(t,n,r);if(0===o)return t;t-=(f(t,n,r)-e)/o}return t}(t,v,e,o):0===m?v:function(e,t,n,r,o){var c,l,i=0;do{(c=f(l=t+(n-t)/2,r,o)-e)>0?n=l:t=l}while(Math.abs(c)>1e-7&&++i<10);return l}(t,r,r+n,e,o)}return function(e){return 0===e?0:1===e?1:f(m(e),t,c)}}},1173:function(e,t,n){e.exports=function(){"use strict";return function(e,i,t){var s=i.prototype;t.utc=function(e){return new i({date:e,utc:!0,args:arguments})},s.utc=function(e){var i=t(this.toDate(),{locale:this.$L,utc:!0});return e?i.add(this.utcOffset(),"minute"):i},s.local=function(){return t(this.toDate(),{locale:this.$L,utc:!1})};var n=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),n.call(this,e)};var r=s.init;s.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else r.call(this)};var u=s.utcOffset;s.utcOffset=function(e,i){var t=this.$utils().u;if(t(e))return this.$u?0:t(this.$offset)?u.call(this):this.$offset;var s=Math.abs(e)<=16?60*e:e,n=this;if(i)return n.$offset=s,n.$u=0===e,n;if(0!==e){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(n=this.local().add(s+r,"minute")).$offset=s,n.$x.$localOffset=r}else n=this.utc();return n};var o=s.format;s.format=function(e){var i=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return o.call(this,i)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var c=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?t(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var a=s.diff;s.diff=function(e,i,s){if(e&&this.$u===e.$u)return a.call(this,e,i,s);var n=this.local(),r=t(e).local();return a.call(n,r,i,s)}}}()},1174:function(e,t,n){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,i,r){var o,u=r().utcOffset(),a=function(e,n,i){void 0===i&&(i={});var r=new Date(e);return function(e,n){void 0===n&&(n={});var i=n.timeZoneName||"short",r=e+"|"+i,o=t[r];return o||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),t[r]=o),o}(n,i).formatToParts(r)},c=function(t,n){for(var i=a(t,n),o=[],u=0;u<i.length;u+=1){var c=i[u],s=c.type,l=c.value,f=e[s];f>=0&&(o[f]=parseInt(l,10))}var d=o[3],v=24===d?0:d,m=o[0]+"-"+o[1]+"-"+o[2]+" "+v+":"+o[4]+":"+o[5]+":000",h=+t;return(r.utc(m).valueOf()-(h-=h%1e3))/6e4},s=i.prototype;s.tz=function(e,t){void 0===e&&(e=o);var n=this.utcOffset(),i=this.toDate().toLocaleString("en-US",{timeZone:e}),a=Math.round((this.toDate()-new Date(i))/1e3/60),c=r(i).$set("millisecond",this.$ms).utcOffset(u-a,!0);if(t){var s=c.utcOffset();c=c.add(n-s,"minute")}return c.$x.$timezone=e,c},s.offsetName=function(e){var t=this.$x.$timezone||r.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var l=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return l.call(n,e,t).tz(this.$x.$timezone,!0)},r.tz=function(e,t,n){var i=n&&t,u=n||t||o,a=c(+r(),u);if("string"!=typeof e)return r(e).tz(u);var s=function(e,t,n){var i=e-60*t*1e3,r=c(i,n);if(t===r)return[i,t];var o=c(i-=60*(r-t)*1e3,n);return r===o?[i,r]:[e-60*Math.min(r,o)*1e3,Math.max(r,o)]}(r.utc(e,i).valueOf(),a,u),l=s[0],f=s[1],d=r(l).utcOffset(f);return d.$x.$timezone=u,d},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(e){o=e}}}()},1177:function(e,t,n){"use strict";n(1133)},1178:function(e,t,n){var r=n(55)((function(i){return i[1]}));r.push([e.i,".buy-service-container{height:100vh;padding:.5rem .5rem 0;position:relative}.buy-service-container .el-form-item,.buy-service-container .el-form-item *,.buy-service-container h1,.buy-service-container h1 *,.buy-service-container h2,.buy-service-container h2 *,.buy-service-container h3,.buy-service-container h3 *,.buy-service-container h4,.buy-service-container h4 *,.buy-service-container h5,.buy-service-container h5 *,.buy-service-container input,.buy-service-container input *,.buy-service-container p,.buy-service-container p *{color:#f4f7fc}.buy-service-container .round-margin{margin:.3rem}.buy-service-container .small-text{font-size:1.2rem}.buy-service-container .small-text .warning{background:#f4f7fc}.buy-service-container .discount{margin-left:.5rem}.buy-service-container .warning-div{border:1px solid #d35400;padding:.5rem;margin-top:0;margin-bottom:1rem;border-radius:5px}.buy-service-container .el-radio-group{padding-top:.4rem}.buy-service-container .dashboard-link,.buy-service-container .switch-service{position:fixed;bottom:.5rem;z-index:999}.buy-service-container .dashboard-link{right:.5rem}.buy-service-container .switch-service{left:.5rem}.buy-service-container .checkout{margin-bottom:1rem}.buy-service-container .cal-fee{margin-bottom:3rem}.buy-service-container hr{margin-top:1rem;margin-bottom:1rem}.buy-service-container hr.short{margin-left:5rem;margin-right:5rem}.buy-service-container .el-radio{margin-left:1rem;display:block;margin-bottom:.5rem}.buy-service-container .price{color:#34495e;padding:.2rem;font-size:1rem}.buy-service-container .downgrade-warning span,.buy-service-container .price span{font-size:1rem}.buy-service-container .service-cate-warning{margin-top:1rem}.buy-service-container .plan-container.selected .select-plan-button{background:#67c23a;border-color:#67c23a}.buy-service-container .plan-container.selected .desc{padding:.2rem 1rem}.buy-service-container .plan-container.selected .select-plan-button{position:absolute;bottom:40px;left:0}.buy-service-container .plan-container.selected .price{color:#f4f7fc;margin:.5rem 0}.buy-service-container .plan-container.selected .feature{margin-top:0}.buy-service-container .plan-container.selected .extra-feature{margin-top:1rem}.buy-service-container .plan-container.selected .extra-feature h4{margin-bottom:1rem}.buy-service-container .plan-container.selected .extra-feature h4 .el-col{margin-bottom:.1rem}.buy-service-container .el-carousel .el-carousel__container{height:50vh}.buy-service-container .el-carousel__item p{color:#f4f7fc}",""]),e.exports=r},1322:function(e,t,n){"use strict";n.r(t);n(38),n(36),n(37),n(26),n(27),n(57),n(21),n(19),n(43),n(8),n(283),n(25),n(68);var r=n(5),o=n(15),c=n(1040),l=n(16),f=n(1172),d=n.n(f),v={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]};let m=!1;try{let e=Object.defineProperty({},"passive",{get:function(){m=!0}});window.addEventListener("test",null,e)}catch(e){}var h={$:e=>"string"!=typeof e?e:document.querySelector(e),on(element,e,t,n={passive:!1}){e instanceof Array||(e=[e]);for(let i=0;i<e.length;i++)element.addEventListener(e[i],t,!!m&&n)},off(element,e,t){e instanceof Array||(e=[e]);for(let i=0;i<e.length;i++)element.removeEventListener(e[i],t)},cumulativeOffset(element){let e=0,t=0;do{e+=element.offsetTop||0,t+=element.offsetLeft||0,element=element.offsetParent}while(element);return{top:e,left:t}}};const _=["mousedown","wheel","DOMMouseScroll","mousewheel","keyup","touchmove"];let y={container:"body",duration:500,lazy:!0,easing:"ease",offset:0,force:!0,cancelable:!0,onStart:!1,onDone:!1,onCancel:!1,x:!1,y:!0};const $=()=>{let element,e,t,n,r,o,c,l,f,m,$,w,S,x,O,C,D,P,T,z,k,M,j,I,V,F,progress,L=e=>{l&&(j=e,z=!0)};function U(){k=h.cumulativeOffset(e),M=h.cumulativeOffset(element),w&&(O=M.left-k.left+o,P=O-x),S&&(D=M.top-k.top+o,T=D-C)}function A(n){if(z)return H();V||(V=n),r||U(),F=n-V,progress=Math.min(F/t,1),progress=I(progress),R(e,C+T*progress,x+P*progress),F<t?window.requestAnimationFrame(A):H()}function H(){z||R(e,D,O),V=!1,h.off(e,_,L),z&&$&&$(j,element),!z&&m&&m(element)}function R(element,e,t){S&&(element.scrollTop=e),w&&(element.scrollLeft=t),"body"===element.tagName.toLowerCase()&&(S&&(document.documentElement.scrollTop=e),w&&(document.documentElement.scrollLeft=t))}return function(O,k,M={}){if("object"==typeof k?M=k:"number"==typeof k&&(M.duration=k),element=h.$(O),!element)return console.warn("[vue-scrollto warn]: Trying to scroll to an element that is not on the page: "+O);if(e=h.$(M.container||y.container),t=M.hasOwnProperty("duration")?M.duration:y.duration,r=M.hasOwnProperty("lazy")?M.lazy:y.lazy,n=M.easing||y.easing,o=M.hasOwnProperty("offset")?M.offset:y.offset,c=M.hasOwnProperty("force")?!1!==M.force:y.force,l=M.hasOwnProperty("cancelable")?!1!==M.cancelable:y.cancelable,f=M.onStart||y.onStart,m=M.onDone||y.onDone,$=M.onCancel||y.onCancel,w=void 0===M.x?y.x:M.x,S=void 0===M.y?y.y:M.y,"function"==typeof o&&(o=o(element,e)),x=function(e){let t=e.scrollLeft;return"body"===e.tagName.toLowerCase()&&(t=t||document.documentElement.scrollLeft),t}(e),C=function(e){let t=e.scrollTop;return"body"===e.tagName.toLowerCase()&&(t=t||document.documentElement.scrollTop),t}(e),U(),z=!1,!c){const t="body"===e.tagName.toLowerCase()?document.documentElement.clientHeight||window.innerHeight:e.offsetHeight,n=C,r=n+t,c=D-o,l=c+element.offsetHeight;if(c>=n&&l<=r)return void(m&&m(element))}if(f&&f(element),T||P)return"string"==typeof n&&(n=v[n]||v.ease),I=d.a.apply(d.a,n),h.on(e,_,L,{passive:!0}),window.requestAnimationFrame(A),()=>{j=null,z=!0};m&&m(element)}};$();var w=n(201),S=n(44),x=n(240),O=n.n(x),C=n(1173),D=n.n(C),P=n(1174),T=n.n(P),z=n(1084),k=n(1127);function M(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function I(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}O.a.extend(D.a),O.a.extend(T.a);var V={components:{Payment:z.default,ServiceSelector:k.default},middleware:["load-rt-data","authenticated"],data:function(){return{extend_info:{buy_length:"12"},confirmed_extend_info:{fee:0},showCurrencyWarning:!1,confirming:!1,currency:"rmb",selectedPlanId:null,selectServiceDialogFormVisible:!1,service_cate_to_buy:"",raw_service_data:null,paymentPoll:null,expireTimeout:null,expired:!1}},computed:function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?I(Object(source),!0).forEach((function(t){Object(o.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):I(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({need_to_pay:function(){return Math.ceil(this.confirmed_extend_info.fee-this.confirmed_extend_info.user_balance)},need_to_pay_usd:function(){return this.confirmed_extend_info.usd_amount},need_to_pay_eur:function(){return this.confirmed_extend_info.eur_amount},selectedPlan:function(){var e,t=M(this.plans[this.service_cate_to_buy]);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.id===this.selectedPlanId)return n}}catch(e){t.e(e)}finally{t.f()}return{}},rebuyHint:function(){if(console.log(1),2!==this.selectedPlanId)return!1;if(console.log(2),!this.rawServiceData)return!1;console.log(3);var e,t=M(this.rawServiceData);try{for(t.s();!(e=t.n()).done;){var s=e.value;if("allplatform"===s.cate)return console.log(4),"on"!==s.status&&(console.log(5),2===s.plan_id&&(console.log(6),1!==s.extra.buy_length&&(console.log(7),!!O()().tz("Asia/Shanghai").isSame(O()(s.extra.buy_time).tz("Asia/Shanghai"),"month")&&(console.log(8),!0))))}}catch(e){t.e(e)}finally{t.f()}return!1}},Object(S.b)(["buyServiceResult","rawServiceData"])),beforeMount:function(){this.$store.dispatch("setConfirmedInfo",{}),this.$store.dispatch("setBuyServiceResult",!1)},mounted:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n,r,o,c,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("buy-service..."),console.log("current service in use is:",e.current_service_cate),e.current_service&&(console.log("set service_cate_to_buy to:",e.current_service_cate),e.service_cate_to_buy=e.current_service_cate),r=w.Loading.service({text:"刷新服务信息..."}),t.next=6,e.reloadUserData(!(null!==(n=e.$store.state.rawServiceData)&&void 0!==n&&n.length));case 6:if(r.close(),console.log(1),e.service_to_buy){console.log(2),o=M(e.plans[e.service_cate_to_buy]);try{for(o.s();!(c=o.n()).done;)(l=c.value).id===e.service_to_buy.plan_id&&e.selectPlan(l)}catch(e){o.e(e)}finally{o.f()}}else console.log(3),e.service_cate_to_buy&&e.selectPlan(e.plans[e.service_cate_to_buy][0]);case 9:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){this.paymentPoll&&Object(c.clearInterval)(this.paymentPoll),this.expireTimeout&&Object(c.clearTimeout)(this.expireTimeout)},methods:{setServiceCateToBuy:function(e){this.service_cate_to_buy=e,this.selectPlan(this.plans[this.service_cate_to_buy][0])},reset:function(){this.paymentPoll&&Object(c.clearInterval)(this.paymentPoll),this.expireTimeout&&Object(c.clearTimeout)(this.expireTimeout),this.$store.dispatch("setBuyServiceResult",!1),this.expired=!1},selectPlan:function(e,t){(this.selectedPlanId=e.id,this.selectedPlan.name&&this.$refs.carousel&&this.$refs.carousel.setActiveItem(this.selectedPlan.name),t)&&$()(".cal-fee")},switchService:function(e){console.log(e),this.service_cate_to_buy=e,this.selectServiceDialogFormVisible=!this.selectServiceDialogFormVisible},reloadUserData:function(e){var t=this;return this.$store.dispatch("getUserAndService").then((function(n){console.log("got data."),console.log(n[1]),t.raw_service_data=n[1],t.$store.dispatch("runTimeState",{selected_line:{}}),l.ipcRenderer.send("user-info-update",2),1===n[1].raw.length?t.service_cate_to_buy=n[1].raw[0].cate:e&&(console.log("please choose which cate of service to buy"),t.selectServiceDialogFormVisible=!0)})).catch((function(e){return console.log("get user&service e-----\x3e",e),"found no valid service"===e?(t.$alert(t.$t("select_service.suspend.time"),t.$t("select_service.suspend.title"),{confirmButtonText:"OK",dangerouslyUseHTMLString:!0}).catch((function(){})),t.selectServiceDialogFormVisible=!0):"service data suspended"===e?(t.$alert(t.$t("select_service.suspend.data"),t.$t("select_service.suspend.title"),{confirmButtonText:"OK",dangerouslyUseHTMLString:!0}).catch((function(){})),t.selectServiceDialogFormVisible=!0):"no service purchased"===e?t.selectServiceDialogFormVisible=!0:t.$message({message:"刷新服务信息失败，请稍后重试...",type:"error"})}))},confirmPrice:function(e){var t=this;this.confirming=!0;var n=this,r={plan_id:this.selectedPlanId,buy_length:Number(n.extend_info.buy_length),promocode:n.extend_info.promo_code,dry_run:e};console.log(r),this.$store.dispatch("confirmPrice",r).then((function(r){if(console.log("confirmPrice:",r),e)return r.selected_plan_id=t.selectedPlanId,r.promo_code=t.extend_info.promo_code,r.rmb_amount=Math.ceil(r.rmb_amount-r.user_balance),r.service_cate_to_buy=t.service_cate_to_buy,t.$store.dispatch("setConfirmedInfo",r),t.$store.dispatch("setBuyServiceResult",!0),n.confirmed_extend_info=r;n.$message({type:"success",message:"操作成功！"}),n.reloadUserData()})).catch((function(e){var t;console.log(e);var r="抱歉，服务器开小差了，请稍后再试..."+((null==e||null===(t=e.data)||void 0===t?void 0:t.message)||e);e.data&&"invalidPromo"===e.data.message&&(r="优惠码无效"),n.$message({type:"error",message:r})})).finally((function(){n.confirming=!1}))}}},F=(n(1177),n(42)),component=Object(F.a)(V,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"buy-service-container"},[e.buyServiceResult?e._e():n("el-row",[n("el-carousel",{ref:"carousel",attrs:{autoplay:!1,trigger:"hover",arrow:"always","indicator-position":"none"}},e._l(e.plans[e.service_cate_to_buy],(function(t,r){return n("el-carousel-item",{key:t.id,staticClass:"plan-container",class:{selected:t.id==e.selectedPlanId},attrs:{name:t.name}},[n("center",[n("h1",{staticClass:"name"},[e._v(e._s(e.$t("plan_names."+t.id)))]),n("h1",{staticClass:"price"},[e._v("€"+e._s(t.full_price)),n("span",[e._v("/"+e._s(e.$t("plan_desc.month")))])]),t.quota?n("el-row",{staticClass:"feature"},[n("el-col",{staticClass:"title",attrs:{span:12}},[n("center",[n("h4",[e._v(e._s(e.$t("plan_desc.quota")))])])],1),n("el-col",{staticClass:"content",attrs:{span:12}},[n("center",[n("h4",[e._v(e._s(e.$t(t.quota))+" "),t.quota>0?n("span",[e._v("GB")]):e._e()])])],1)],1):e._e(),t.pre_quota?n("el-row",{staticClass:"feature"},[n("el-col",{staticClass:"title",attrs:{span:12}},[n("center",[n("h4",[e._v(e._s(e.$t("plan_desc.pre_quota")))])])],1),n("el-col",{staticClass:"content",attrs:{span:12}},[n("center",[n("h4",[e._v(e._s(e.$t(t.pre_quota))+" "),n("span",[e._v("GB")])])])],1)],1):e._e(),t.device_limit?n("el-row",{staticClass:"feature"},[n("el-col",{staticClass:"title",attrs:{span:12}},[n("center",[n("h4",[e._v(e._s(e.$t("plan_desc.device_limit")))])])],1),n("el-col",{staticClass:"content",attrs:{span:12}},[n("center",[n("h4",[e._v(e._s(e.$t(t.device_limit))+" ")])])],1)],1):e._e(),t.extra?n("el-row",{staticClass:"extra-feature"},[n("h4",{staticClass:"underline"},[e._v(e._s(e.$t("plan_desc.extras")))]),e._l(t.extra,(function(t){return n("div",{staticClass:"extra-feature-row"},[n("el-col",{attrs:{span:24}},[n("h5",[n("i",{staticClass:"el-icon-check"}),e._v(" \n"+e._s(e.$t("plan_desc."+t)))])])],1)}))],2):e._e()],1)],1)})),1),n("el-form",{ref:"form",attrs:{"label-width":"80px",size:"mini"},nativeOn:{submit:function(t){return t.preventDefault(),e.confirmPrice(!0)}}},[n("el-form-item",{attrs:{label:e.$t("plan_names.title")}},[n("el-radio-group",{attrs:{size:"medium"},model:{value:e.selectedPlanId,callback:function(t){e.selectedPlanId=t},expression:"selectedPlanId"}},e._l(e.plans[e.service_cate_to_buy],(function(t,r){return n("el-radio",{key:t.id,attrs:{label:t.id},nativeOn:{click:function(n){return e.selectPlan(t,!0)}}},[e._v(e._s(e.$t("plan_names."+t.id))),e.service_to_buy&&t.id==e.service_to_buy.plan_id?n("span",{staticClass:"label success small round round-margin"},[e._v(e._s(e.$t("current_plan")))]):e._e()])})),1)],1),e.rebuyHint?n("div",{staticClass:"warning-div"},[n("center",[n("h2",[n("span",{staticClass:"warning"},[e._v("请注意")])]),n("p",[e._v("您本月的流量已耗尽，"),n("b",{staticClass:"underline"},[e._v("如需立即恢复服务")]),e._v(" 请购买升级至 "),n("b",{staticClass:"underline"},[e._v("超能熊猫")]),e._v("，或者等待至次月1日自动恢复流量"),n("span",{staticClass:"subheader"}),n("br"),e._v("系统会一并升级您本月以及余下月数的服务并计算差价"),n("br")]),n("p",[e._v("购买学术熊猫将会 "),n("b",{staticClass:"underline"},[e._v("作为续费处理")]),n("br"),e._v("延长到期时间但不会立即启用当前服务，您仍需等待至 "),n("b",{staticClass:"underline"},[e._v("次月1日")]),e._v(" 自动恢复流量")])])],1):e._e(),e.service_to_buy&&"off"!=e.service_to_buy.status&&e.selectedPlanId!=e.service_to_buy.plan_id?e._e():n("div",[n("el-form-item",{attrs:{label:e.$t("buy_length.title")}},[n("el-radio-group",{attrs:{size:"medium"},model:{value:e.extend_info.buy_length,callback:function(t){e.$set(e.extend_info,"buy_length",t)},expression:"extend_info.buy_length"}},[n("el-radio",{attrs:{label:"12"}},[e._v(e._s(e.$tc("buy_length.12"))),n("span",{staticClass:"label success round discount"},[e._v(e._s(e.$t("discount",{n:17})))])]),n("el-radio",{attrs:{label:"6"}},[e._v(e._s(e.$tc("buy_length.6"))),n("span",{staticClass:"label success round discount"},[e._v(e._s(e.$t("discount",{n:9})))])]),n("el-radio",{attrs:{label:"1"}},[e._v(e._s(e.$tc("buy_length.1")))])],1)],1)],1),e.buyServiceResult?e._e():n("el-row",[n("el-button",{staticClass:"cal-fee full-width",attrs:{type:"success",loading:e.confirming},on:{click:function(t){return e.confirmPrice(!0)}}},[e._v(e._s(e.$t("check_price")))])],1)],1)],1),e.buyServiceResult?n("div",[n("Payment")],1):e._e(),e.buyServiceResult?e._e():n("a",{staticClass:"switch-service smooth",on:{click:function(t){e.selectServiceDialogFormVisible=!e.selectServiceDialogFormVisible}}},[e._v(e._s(e.$t("switch_service")))]),e.buyServiceResult?e._e():n("nuxt-link",{staticClass:"dashboard-link smooth",attrs:{to:"/dashboard/dashboard/"}},[e._v(e._s(e.$t("back")))]),n("ServiceSelector",{attrs:{callback:e.setServiceCateToBuy,modalVisible:e.selectServiceDialogFormVisible},on:{"update:modalVisible":function(t){e.selectServiceDialogFormVisible=t},"update:modal-visible":function(t){e.selectServiceDialogFormVisible=t}}})],1)}),[],!1,null,null,null);t.default=component.exports;installComponents(component,{Payment:n(1084).default,ServiceSelector:n(1127).default})}}]);