text: (window.webpackJsonp=window.webpackJsonp||[]).push([[25],{1157:function(e,r,t){var a=t(1199);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,t(2).default)("25f97dd1",a,!0,{sourceMap:!1})},1198:function(e,r,t){"use strict";t(1157)},1199:function(e,r,t){var a=t(1)(!1);a.push([e.i,".extra-premium input[data-v-4e209f5a]{font-size:26px;margin:0 10px;text-align:center;padding:10px 0;width:100px;border:none;background:transparent;color:var(--primary-color);border-bottom:.5px solid var(--secondary-color)}.extra-premium input[data-v-4e209f5a]::focus{border:none}.extra-premium .explain[data-v-4e209f5a]{text-align:left}.extra-premium .explain ul li[data-v-4e209f5a]{color:var(--secondary-color)}@media (max-width:768px){.extra-premium h2[data-v-4e209f5a]{font-size:20px!important}.extra-premium input[data-v-4e209f5a]{font-szie:20px!important}}.purchase-input[data-v-4e209f5a]{display:flex;align-items:center;justify-content:center}.purchase-input input[data-v-4e209f5a]{display:flex}.hint-for-basic[data-v-4e209f5a]{margin-bottom:2rem}.hint-for-basic h5[data-v-4e209f5a]{font-weight:400;color:var(--secondary-color)}b[data-v-4e209f5a]{color:var(--primary-color)}",""]),e.exports=a},1298:function(e,r,t){"use strict";t.r(r);t(62),t(39),t(27),t(23),t(40),t(205);var a=t(18),n=(t(24),t(25),t(9),t(74),t(6)),i=t(52);function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach((function(r){Object(a.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u={name:"PricingPagePremiumData",props:{currentService:{type:Object,default:function(){return{}}},value:{type:Object,default:function(){return{}}}},data:function(){return{model:{alreadyBought:0,extraPremium:10,allPre:!1,maxPreForCurrentMonth:100,currentAllPre:0}}},fetch:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var t,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(null===(t=e.user)||void 0===t||!t.id){r.next=14;break}return r.prev=1,r.next=4,e.$store.dispatch("getAlreadyBoughtPremiumData",{userId:e.user.id});case 4:a=r.sent,console.log("alreadyBought: "+a.toString()),e.model.alreadyBought=a,console.log(e.model.alreadyBought),r.next=14;break;case 10:r.prev=10,r.t0=r.catch(1),console.log("fetch alreadyBought failed: "+r.t0),e.$sentry.captureException(r.t0);case 14:case"end":return r.stop()}}),r,null,[[1,10]])})))()},computed:l({currentAllPre:function(){var e,r;return(null===(e=this.currentService)||void 0===e||null===(r=e.extra)||void 0===r?void 0:r.all_pre)||0},canBuyExtraPremiumForOtherMonth:function(){var e,r,t,a;return(null===(e=this.currentService)||void 0===e||null===(r=e.extra)||void 0===r?void 0:r.buy_length)>((null===(t=this.currentService)||void 0===t||null===(a=t.extra)||void 0===a?void 0:a.all_pre)||0)},canBuyExtraForThisMonth:function(){var e,r;return(null===(e=this.currentService)||void 0===e||null===(r=e.extra)||void 0===r||!r.all_pre)&&this.maxPreForCurrentMonth>0},maxPreForCurrentMonth:function(){var e;return 2===this.currentService.plan_id?999999999999:100-((null===(e=this.model.alreadyBought)||void 0===e?void 0:e.allplatform)||0)}},Object(i.b)({user:function(e){return e.user}})),watch:{maxPreForCurrentMonth:function(e){this.model.maxPreForCurrentMonth=e},currentAllPre:function(e){this.model.currentAllPre=e},model:function(e){console.log("new premiumOptions:",e),this.$emit("input",l(l({},e),{},{extraPremium:Number(e.extraPremium)}))},"model.extraPremium":function(e){e>this.maxPreForCurrentMonth&&(this.model.extraPremium=this.maxPreForCurrentMonth)}},mounted:function(){console.log("premium module loaded."),this.$emit("input",this.model)}},c=(t(1198),t(51)),s=Object(c.a)(u,(function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"extra-premium"},[e.canBuyExtraPremiumForOtherMonth?t("div",[e.canBuyExtraForThisMonth&&!e.model.allPre?t("h2",{staticClass:"purchase-input"},[e._v(e._s(e.$t("pricing.to_buy"))),t("input",{directives:[{name:"model",rawName:"v-model",value:e.model.extraPremium,expression:"model.extraPremium"}],attrs:{type:"range",disabled:e.model.allPre,min:"1",step:"1",max:e.maxPreForCurrentMonth},domProps:{value:e.model.extraPremium},on:{__r:function(r){return e.$set(e.model,"extraPremium",r.target.value)}}}),t("input",{directives:[{name:"model",rawName:"v-model",value:e.model.extraPremium,expression:"model.extraPremium"}],attrs:{type:"number",disabled:e.model.allPre,min:"1",step:"1",max:e.maxPreForCurrentMonth},domProps:{value:e.model.extraPremium},on:{input:function(r){r.target.composing||e.$set(e.model,"extraPremium",r.target.value)}}}),e._v("GB "+e._s(e.$t("service.pre")))]):e._e(),t("el-row",{staticClass:"hint-for-basic",attrs:{type:"flex",align:"middle",justify:"center"}},[t("el-col",{attrs:{md:9,xs:24}},[2===e.currentService.plan_id?t("h5",[e._v(e._s(e.$tc("pricing.premium_data.basic_price",e.$config.feeList.pre2))),t("br"),t("span",[e._v(e._s(e.$tc("pricing.premium_data.basic_hint",e.$config.feeList.pre4)))]),t("br"),t("el-link",{attrs:{type:"success"},on:{click:e.upgradePlan}},[e._v(e._s(e.$t("service_details.upgrade")))])],1):t("h5",[e._v(e._s(e.$tc("pricing.premium_data.pre_hint",e.$config.feeList.pre4)))])])],1),2!==e.currentService.plan_id&&e.canBuyExtraForThisMonth&&!e.model.allPre?t("h4",{staticClass:"subheader"},[Number(e.model.extraPremium)===e.maxPreForCurrentMonth?t("span",[e._v(e._s(e.$tc("pricing.max_premium_hint",e.maxPreForCurrentMonth)))]):t("span",[e._v(e._s(e.$tc("pricing.max_premium_hint2",e.maxPreForCurrentMonth-(e.model.extraPremium||0))))])]):e._e(),2!==e.currentService.plan_id&&e.currentService.extra.buy_length-e.currentAllPre?t("div",[e.currentAllPre>1?t("p",[e._v(e._s(e.$tc("pricing.already_unlimited_for",e.currentAllPre)))]):e._e(),t("el-checkbox",{staticClass:"all-pre-check",model:{value:e.model.allPre,callback:function(r){e.$set(e.model,"allPre",r)},expression:"model.allPre"}},[t("b",[e._v(e._s(e.$tc("pricing.get_extra_for",e.currentService.extra.buy_length-e.currentAllPre)))])])],1):e._e()],1):t("div",[t("h2",{staticClass:"subheader"},[e._v(e._s(e.$t("pricing.already_unlimited")))]),e.currentAllPre>1?t("p",[e._v(e._s(e.$tc("pricing.already_unlimited_for",e.currentAllPre)))]):e._e()]),t("el-divider"),t("div",{staticClass:"explain"},[t("ul",[4===e.currentService.plan_id?t("li",[e._v(e._s(e.$t("pricing.extra_premium_explain.c")))]):e._e(),t("li",[e._v(e._s(e.$t("pricing.extra_premium_explain.d")))])])])],1)}),[],!1,null,"4e209f5a",null);r.default=s.exports}}]);