PageSourceSearch

https://www.dcuniverseinfinite.com/_nuxt/BUPY1z4t.js

js dcuniverseinfinite.com collected 2026-09-24 09:12:47 UTC 22,635 bytes, 1 lines download raw bytes

1import{_ as ie,bk as Gr,k as ae,r as R,o as b,c as w,a as C,d as x,p as se,q as V,w as m,t as P,f as T,b as Pe,g as U,M as Qe,e as oe,F as ne,bX as re,bP as Lr,aH as q,m as Ye,j as Ce,I as We,h as Dr}from"./CJVn3ZQ4.js";import{M as kr}from"./DUuZxIT0.js";import{S as $e}from"./BOm2BJu1.js";import{P as ve}from"./CyoOy95w.js";import{C as Te}from"./P-1AyYe9.js";import{B as Hr}from"./C7TRuyjM.js";import{p as Kr}from"./qWBELLz2.js";import{w as qr}from"./e3kFbcxx.js";import"./Cov8HS8S.js";import"./DohhGFmI.js";import"./BamNFeS5.js";import"./BiR0Q1En.js";import"./CdhFNpuy.js";import"./DTZt3mMf.js";const Jr={components:{Success:$e},mixins:[ve,Te],emits:["success"],setup(){const{t:n,tm:o}=ae({useScope:"local"});return{t:n,tm:o}},data(){return{cancelInProgress:!1,isSuccess:!1}},computed:{errors(){return{subscriptionsCancel:this.$store.state.errors["subscriptions-cancel"]}}},mounted(){this.$store.dispatch("errors/clearError","subscriptions-cancel")},methods:{async cancelSubscription(){const n=this.currentSubscription.guid;this.cancelInProgress=!0;try{await this.$store.dispatch("subscriptions/cancel",{subscriptionGuid:n}),await this.$store.dispatch("account/getClaims"),(await Gr()).identify(),this.isSuccess=!0,this.$emit("success")}catch{}this.cancelInProgress=!1}}},Vr={key:0,class:"cancel-subscription"},Xr={class:"checkout-flow__general-message cancel-subscription__message"},Yr=["href","target"],Wr=["disabled","aria-label"],Zr={key:0,class:"checkout-flow__general-message cancel-subscription__error"},Qr=["href","target"];function $r(n,o,h,_,p,a){const S=R("i18n-t"),O=Qe,A=R("success");return b(),w(ne,null,[p.isSuccess?T("",!0):(b(),w("div",Vr,[C("div",Xr,[x(S,{tag:"p",keypath:"cancelSubscription.areYouSure"},se({_:2},[V(_.tm("translationLinks.items"),(g,y)=>({name:y,fn:m(()=>[g.href?(b(),w("a",{key:g.href,href:g.href,target:g.target,rel:"nofollow noindex"},P(g.text),9,Yr)):T("",!0)])}))]),1024),C("button",{class:Pe(["cancel-subscription__button dcc-button dcc-button--auto-centered",{"animated-ellipsis canceling":p.cancelInProgress}]),disabled:p.cancelInProgress,"aria-label":p.cancelInProgress?_.t("cancelSubscription.cancelling"):_.t("cancelSubscription.cancelNow"),onClick:o[0]||(o[0]=(...g)=>a.cancelSubscription&&a.cancelSubscription(...g))},P(p.cancelInProgress?_.t("cancelSubscription.cancelling"):_.t("cancelSubscription.cancelNow")),11,Wr)]),a.errors.subscriptionsCancel?(b(),w("div",Zr,[x(S,{tag:"p",keypath:"cancelSubscription.cancelError"},se({_:2},[V(_.tm("translationLinks.items"),(g,y)=>({name:y,fn:m(()=>[g.href?(b(),w("a",{key:g.href,href:g.href,target:g.target,rel:"nofollow noindex"},P(g.text),9,Qr)):T("",!0)])}))]),1024)])):T("",!0)])),p.isSuccess?(b(),U(A,{key:1},{title:m(()=>[oe(P(_.t("cancelSubscription.successTitle")),1)]),subtitle:m(()=>[x(S,{keypath:"cancelSubscription.successBody"},{nextPayDate:m(()=>[C("span",null,P(n.nextPayDate),1)]),_:1})]),actions:m(()=>[x(O,{class:"dcc-button dcc-button--blue",to:"/settings"},{default:m(()=>[oe(P(_.t("cancelSubscription.successButton")),1)]),_:1})]),_:1})):T("",!0)],64)}const en=ie(Jr,[["render",$r],["__scopeId","data-v-58b311bb"]]);var J={exports:{}};J.exports;var Ze;function tn(){return Ze||(Ze=1,(function(n,o){var h=200,_="__lodash_hash_undefined__",p=800,a=16,S=9007199254740991,O="[object Arguments]",A="[object Array]",g="[object AsyncFunction]",y="[object Boolean]",G="[object Date]",et="[object Error]",Se="[object Function]",tt="[object GeneratorFunction]",rt="[object Map]",nt="[object Number]",st="[object Null]",Oe="[object Object]",ot="[object Proxy]",it="[object RegExp]",at="[object Set]",ct="[object String]",ut="[object Undefined]",lt="[object WeakMap]",ft="[object ArrayBuffer]",dt="[object DataView]",ht="[object Float32Array]",pt="[object Float64Array]",gt="[object Int8Array]",_t="[object Int16Array]",mt="[object Int32Array]",bt="[object Uint8Array]",yt="[object Uint8ClampedArray]",Ct="[object Uint16Array]",Pt="[object Uint32Array]",vt=/[\\^$.*+?()[\]{}|]/g,Tt=/^\[object .+?Constructor\]$/,St=/^(?:0|[1-9]\d*)$/,l={};l[ht]=l[pt]=l[gt]=l[_t]=l[mt]=l[bt]=l[yt]=l[Ct]=l[Pt]=!0,l[O]=l[A]=l[ft]=l[y]=l[dt]=l[G]=l[et]=l[Se]=l[rt]=l[nt]=l[Oe]=l[it]=l[at]=l[ct]=l[lt]=!1;var we=typeof re=="object"&&re&&re.Object===Object&&re,Ot=typeof self=="object"&&self&&self.Object===Object&&self,L=we||Ot||Function("return this")(),Ie=o&&!o.nodeType&&o,D=Ie&&!0&&n&&!n.nodeType&&n,xe=D&&D.exports===Ie,ce=xe&&we.process,Re=(function(){try{var e=D&&D.require&&D.require("util").t
vendor: 5,131 bytes, line 1
1ypes;return e||ce&&ce.binding&&ce.binding("util")}catch{}})(),Ae=Re&&Re.isTypedArray;function wt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function It(e,t){for(var r=-1,s=Array(e);++r<e;)s[r]=t(r);return s}function xt(e){return function(t){return e(t)}}function Rt(e,t){return e?.[t]}function At(e,t){return function(r){return e(t(r))}}var jt=Array.prototype,Nt=Function.prototype,X=Object.prototype,ue=L["__core-js_shared__"],Y=Nt.toString,N=X.hasOwnProperty,je=(function(){var e=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),Ne=X.toString,Mt=Y.call(Object),Et=RegExp("^"+Y.call(N).replace(vt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),W=xe?L.Buffer:void 0,Me=L.Symbol,Ee=L.Uint8Array;W&&W.allocUnsafe;var Be=At(Object.getPrototypeOf,Object),Fe=Object.create,Bt=X.propertyIsEnumerable,Ft=jt.splice,M=Me?Me.toStringTag:void 0,Z=(function(){try{var e=de(Object,"defineProperty");return e({},"",{}),e}catch{}})(),zt=W?W.isBuffer:void 0,ze=Math.max,Ut=Date.now,Ue=de(L,"Map"),k=de(Object,"create"),Gt=(function(){function e(){}return function(t){if(!B(t))return{};if(Fe)return Fe(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function E(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}function Lt(){this.__data__=k?k(null):{},this.size=0}function Dt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function kt(e){var t=this.__data__;if(k){var r=t[e];return r===_?void 0:r}return N.call(t,e)?t[e]:void 0}function Ht(e){var t=this.__data__;return k?t[e]!==void 0:N.call(t,e)}function Kt(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=k&&t===void 0?_:t,this}E.prototype.clear=Lt,E.prototype.delete=Dt,E.prototype.get=kt,E.prototype.has=Ht,E.prototype.set=Kt;function j(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}function qt(){this.__data__=[],this.size=0}function Jt(e){var t=this.__data__,r=Q(t,e);if(r<0)return!1;var s=t.length-1;return r==s?t.pop():Ft.call(t,r,1),--this.size,!0}function Vt(e){var t=this.__data__,r=Q(t,e);return r<0?void 0:t[r][1]}function Xt(e){return Q(this.__data__,e)>-1}function Yt(e,t){var r=this.__data__,s=Q(r,e);return s<0?(++this.size,r.push([e,t])):r[s][1]=t,this}j.prototype.clear=qt,j.prototype.delete=Jt,j.prototype.get=Vt,j.prototype.has=Xt,j.prototype.set=Yt;function F(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}function Wt(){this.size=0,this.__data__={hash:new E,map:new(Ue||j),string:new E}}function Zt(e){var t=ee(this,e).delete(e);return this.size-=t?1:0,t}function Qt(e){return ee(this,e).get(e)}function $t(e){return ee(this,e).has(e)}function er(e,t){var r=ee(this,e),s=r.size;return r.set(e,t),this.size+=r.size==s?0:1,this}F.prototype.clear=Wt,F.prototype.delete=Zt,F.prototype.get=Qt,F.prototype.has=$t,F.prototype.set=er;function z(e){var t=this.__data__=new j(e);this.size=t.size}function tr(){this.__data__=new j,this.size=0}function rr(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function nr(e){return this.__data__.get(e)}function sr(e){return this.__data__.has(e)}function or(e,t){var r=this.__data__;if(r instanceof j){var s=r.__data__;if(!Ue||s.length<h-1)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new F(s)}return r.set(e,t),this.size=r.size,this}z.prototype.clear=tr,z.prototype.delete=rr,z.prototype.get=nr,z.prototype.has=sr,z.prototype.set=or;function ir(e,t){var r=ge(e),s=!r&&pe(e),i=!r&&!s&&He(e),u=!r&&!s&&!i&&qe(e),f=r||s||i||u,c=f?It(e.length,String):[],d=c.length;for(var I in e)f&&(I=="length"||i&&(I=="offset"||I=="parent")||u&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||De(I,d))||c.push(I);return c}function le(e,t,r){(r!==void 0&&!te(e[t],r)||r===void 0&&!(t in e))&&fe(e,t,r)}function ar(e,t,r){var s=e[t];(!(N.call(e,t)&&te(s,r))||r===void 0&&!(t in e))&&fe(e,t,r)}function Q(e,t){for(var r=e.length;r--;)if(te(e[r][0],t))return r;return-1}function fe(e,t,r){t=="__proto__"&&Z?Z(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var cr=Pr();function $(e){return e==null?e===void 0?ut:st:M&&M in Object(e)?vr(e):xr(e)}function Ge(e){return H(e)&&$(e)==O}function ur(e){if(!B(e)||wr(e))return!1;var t=me(e)?Et:Tt;return t.test(Nr(e))}function lr(e){return H(e)&&Ke(e.length)&&!!l[$(e)]}function fr(e){if(!B(e))return Ir(e);var t=ke(e),r=[];for(var s in e)s=="constructor"&&(t||!N.call(e,s))||r.push(s);return r}function Le(e,t,r,s,i){e!==t&&cr(t,function(u,f){if(i||(i=new z),B(u))dr(e,t,f,r,Le,s,i);else{var c=s?s(he(e,f),u,f+"",e,t,i):void 0;c===void 0&&(c=u),le(e,f,c)}},Je)}function dr(e,t,r,s,i,u,f){var c=he(e,r),d=he(t,r),I=f.get(d);if(I){le(e,r,I);return}var v=u?u(c,d,r+"",e,t,f):void 0,K=v===void 0;if(K){var be=ge(d),ye=!be&&He(d),Xe=!be&&!ye&&qe(d);v=d,be||ye||Xe?ge(c)?v=c:Mr(c)?v=br(c):ye?(K=!1,v=gr(d)):Xe?(K=!1,v=mr(d)):v=[]:Er(d)||pe(d)?(v=c,pe(c)?v=Br(c):(!B(c)||me(c))&&(v=Tr(d))):K=!1}
1K&&(f.set(d,v),i(v,d,s,u,f),f.delete(d)),le(e,r,v)}function hr(e,t){return Ar(Rr(e,t,Ve),e+"")}var pr=Z?function(e,t){return Z(e,"toString",{configurable:!0,enumerable:!1,value:zr(t),writable:!0})}:Ve;function gr(e,t){return e.slice()}function _r(e){var t=new e.constructor(e.byteLength);return new Ee(t).set(new Ee(e)),t}function mr(e,t){var r=_r(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function br(e,t){var r=-1,s=e.length;for(t||(t=Array(s));++r<s;)t[r]=e[r];return t}function yr(e,t,r,s){var i=!r;r||(r={});for(var u=-1,f=t.length;++u<f;){var c=t[u],d=void 0;d===void 0&&(d=e[c]),i?fe(r,c,d):ar(r,c,d)}return r}function Cr(e){return hr(function(t,r){var s=-1,i=r.length,u=i>1?r[i-1]:void 0,f=i>2?r[2]:void 0;for(u=e.length>3&&typeof u=="function"?(i--,u):void 0,f&&Sr(r[0],r[1],f)&&(u=i<3?void 0:u,i=1),t=Object(t);++s<i;){var c=r[s];c&&e(t,c,s,u)}return t})}function Pr(e){return function(t,r,s){for(var i=-1,u=Object(t),f=s(t),c=f.length;c--;){var d=f[++i];if(r(u[d],d,u)===!1)break}return t}}function ee(e,t){var r=e.__data__;return Or(t)?r[typeof t=="string"?"string":"hash"]:r.map}function de(e,t){var r=Rt(e,t);return ur(r)?r:void 0}function vr(e){var t=N.call(e,M),r=e[M];try{e[M]=void 0;var s=!0}catch{}var i=Ne.call(e);return s&&(t?e[M]=r:delete e[M]),i}function Tr(e){return typeof e.constructor=="function"&&!ke(e)?Gt(Be(e)):{}}function De(e,t){var r=typeof e;return t=t??S,!!t&&(r=="number"||r!="symbol"&&St.test(e))&&e>-1&&e%1==0&&e<t}function Sr(e,t,r){if(!B(r))return!1;var s=typeof t;return(s=="number"?_e(r)&&De(t,r.length):s=="string"&&t in r)?te(r[t],e):!1}function Or(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function wr(e){return!!je&&je in e}function ke(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||X;return e===r}function Ir(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}function xr(e){return Ne.call(e)}function Rr(e,t,r){return t=ze(t===void 0?e.length-1:t,0),function(){for(var s=arguments,i=-1,u=ze(s.length-t,0),f=Array(u);++i<u;)f[i]=s[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=s[i];return c[t]=r(f),wt(e,this,c)}}function he(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Ar=jr(pr);function jr(e){var t=0,r=0;return function(){var s=Ut(),i=a-(s-r);if(r=s,i>0){if(++t>=p)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Nr(e){if(e!=null){try{return Y.call(e)}catch{}try{return e+""}catch{}}return""}function te(e,t){return e===t||e!==e&&t!==t}var pe=Ge((function(){return arguments})())?Ge:function(e){return H(e)&&N.call(e,"callee")&&!Bt.call(e,"callee")},ge=Array.isArray;function _e(e){return e!=null&&Ke(e.length)&&!me(e)}function Mr(e){return H(e)&&_e(e)}var He=zt||Ur;function me(e){if(!B(e))return!1;var t=$(e);return t==Se||t==tt||t==g||t==ot}function Ke(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=S}function B(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function H(e){return e!=null&&typeof e=="object"}function Er(e){if(!H(e)||$(e)!=Oe)return!1;var t=Be(e);if(t===null)return!0;var r=N.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Y.call(r)==Mt}var qe=Ae?xt(Ae):lr;function Br(e){return yr(e,Je(e))}function Je(e){return _e(e)?ir(e):fr(e)}var Fr=Cr(function(e,t,r){Le(e,t,r)});function zr(e){return function(){return e}}function Ve(e){return e}function Ur(){return!1}n.exports=Fr})(J,J.exports)),J.exports}var rn=tn();const nn=Lr(rn),sn={components:{BuildSvgSprite:Hr},mixins:[Te],props:{promoProduct:{type:Object,required:!0},redeemInProgress:{type:Boolean,default:!1},disableActions:{type:Boolean,default:!1},errorMessage:{type:String,default:null}},emits:["redeemPromo"],setup(){const{mergeLocaleMessage:n,tm:o}=ae({useScope:"local"});return{mergeLocaleMessage:n,tm:o}},computed:{highlightPromoCard(){return this.promoProduct.offer.highlight},promoCardButtonText(){return this.promoProduct.isApplicable?this.redeemInProgress?"Processing":"Redeem Offer":"Redeemed"},offerTitleTranslationKey(){return`offerTitle-${this.promoProduct.offer.offerTier}`}},watch:{promoProduct:{immediate:!0,handler(){const n={};n[this.offerTitleTranslationKey]=this.promoProduct.offer.title,this.mergeLocaleMessage("en",n)}}},methods:{redeemPromo(){this.disableActions||this.$emit("redeemPromo",{promoProduct:this.promoProduct})}}},on={class:"retention-promo-card__offer"},an={class:"highlighted-tier"},cn={class:"retention-promo-card__description"},un={class:"retention-promo-card__legal"},ln=["disabled","aria-label"];function fn(n,o,h,_,p,a){const S=R("build-svg-sprite"),O=R("i18n-t");return h.promoProduct.offer?(b(),w("div",{key:0,class:Pe(["retention-promo-card",{highlighted:a.highlightPromoCard}])},[a.highlightPromoCard?(b(),U(S,{key:0,class:"star",item:"retention-offer-corner-star"})):T("",!0),C("div",on,[x(O,{tag:"span",class:"h5 retention-promo-card__title",keypath:a.offerTitleTranslationKey},{offerTier:m(()=>[C("span",an,P(h.promoProduct.offer.offerTier),1)]),_:1},8,["keypath"]),C("div",cn,P(h.promoProduct.offer.description),1),C("div",un,P(h.promoProduct.offer.legal),1)]),C("button",{class:Pe(["retention-promo-card__button dcc-button dcc-button--blue",{"animated-ellipsis":h.redeemInProgress}]),disabled:h.redeemInProgress||!h.promoProduct.isApplicable,"aria-label":a.promoCardButtonText,onClick:o[0]||(o[0]=(...A)=>a.redeemPromo&&a.redeemPromo(...A))},P(a.promoCardButtonText),11,ln)],2)):T("",!0)}const dn=ie(sn,[["render",fn],["__scopeId","data-v-3523e683"]]),hn={components:{RetentionPromoCard:dn,Success:$e},mixins:[ve,Kr],emits:["success"],setup(){const{t:n,mergeLocaleMessage:o}=ae({useScope:"local"});return{t:n,mergeLocaleMessage:o}},data(){return{loadedCatalogs:[],currentlyProcessingProduct:null,showError:!1,success:!1,successProduct:null,loadingRetentionOffers:!1}},computed:{...Ce("catalog",{catalogByIdentifier:"byIdentifier"}),...Ce("subscriptions",["isAnnualUser","isMonthlyUser"]),...We("account",["claims"]),...We("catalog",["catalogs"]),...Ce("jsonbag",{jsonbagBySlug:"bySlug"}),retentionOfferConfig(){return this.jsonbagBySlug(this.$config.public.CONFIG_JSONBAG_SLUGS.RETENTION_CONFIG)||{}},retentionCatalogName(){return this.userTypeRetentionOfferConfig["catalog-name"]},isUltraUser(){return this.claims?.premium?.plan==="ultra"},userType(){return`${this.userTier}-user`},userTier(){return`${this.isUltraUser?"ultra":"standard"}-${this.isMonthlyUser?"monthly":"annual"}`},userTypeOfferConfig(){return this.retentionOfferConfig[this.userType]||null},userTypeRetentionOfferConfig(){return nn({},q(this.retentionOfferConfig.default),this.userTypeOfferConfig)},retentionCatalog(){return this.catalogByIdentifier(this.retentionCatalogName)},retentionPromoCatalogProducts(){return this.retentionCatalog?.plans?.filter(n=>n.promoProducts?.length).flatMap(n=>n.promoProducts)},retentionPromoProducts(){return this.retentionPromoCatalogProducts.map(n=>({...q(n),offer:q(this.getOfferForProduct(n))}))},sortedRetentionPromoProducts(){return[...this.retentionPromoProducts].sort((n,o)=>{const h=this.retentionPromoProducts.length;return(n.offer?.order||h)-(o.offer?.order||h)})},hasRetentionPromoProducts(){return this.userTypeRetentionOfferConfig&&this.retentionCatalog&&this.retentionPromoProducts.length},currentlyProcessingProductId(){return this.currentlyProcessingProduct?.productId}},watch:{retentionCatalogName:{async handler(n,o){n&&n!==o&&!this.loadedCatalogs.includes(n)&&(await this.getNamedCatalog({params:{promotion:n},identifier:n}),this.loadedCatalogs.push(n))},immediate:!0},userTypeRetentionOfferConfig:{handler(){this.mergeLocaleMessage("en",{legalText:this.userTypeRetentionOfferConfig["retention-legal"].text,successMessage:this.userTypeRetentionOfferConfig["success-message"],successTitle:this.userTypeRetentionOfferConfig["success-title"],successButton:this.userTypeRetentionOfferConfig["success-button"],errorMessage:this.userTypeRetentionOfferConfig["error-message"]})},immediate:!0}},async beforeMount(){this.loadingRetentionOffers=!0,await this.initKountAllowingFailure(),await this.getNamedCatalog({params:{promotion:this.retentionCatalogName},identifier:this.retentionCatalogName}),this.loadedCatalogs.push(this.retentionCatalogName),this.loadingRetentionOffers=!1},methods:{...Ye("catalog",{getNamedCatalog:"list"}),...Ye("subscriptions",["applyPromo","resubscribe"]),async useApplyPromo(n){try{await this.applyPromo({promoCode:n.code,subscriptionGuid:this.currentSubscription.guid}),await this.onRetentionSuccess(n)}catch{this.showError=!0}},async useResubscribe(n){const o={subscriptionGuid:this.currentSubscription.guid,productId:n.productId,promoCode:n.code,promotion:this.retentionCatalogName};if(this.passesKountCheck(o))try{await this.resubscribe(o),await this.onRetentionSuccess(n)}catch{this.showError=!0}},async redeemPromo({promoProduct:n}){this.showError=!1,this.currentlyProcessingProduct=n,this.activeSubscriptionProductId===n.productId?await this.useApplyPromo(n):await this.useResubscribe(n),this.redeemInProgress=!1,this.currentlyProcessingProduct=null},getOfferForProduct(n){const o=`${n.product.plan==="ultra"?"ultra":"standard"}-${n.product.period}`,h=this.userTypeRetentionOfferConfig.offers[o];
1return(h||null)&&!!h&&this.applyCrossgradeConfigIfNeeded(h,n.productId,o)},applyCrossgradeConfigIfNeeded(n,o,h){return this.userTier!==h||this.activeSubscriptionProductId===o?n:{...q(n),...q(this.userTypeRetentionOfferConfig.offers.crossgrade)}},async onRetentionSuccess(n){this.success=!0,this.successProduct=n,await this.$store.dispatch("account/getClaims"),this.$emit("success")}}},pn={class:"cancel-retention-offer"},gn={key:0,class:"cancel-retention-offer__loading"},_n={class:"cancel-retention-offer__description"},mn={class:"cancel-retention-offer__list"},bn=["href"],yn={class:"checkout-flow__legal cancel-retention-offer__legal"},Cn=["href"];function Pn(n,o,h,_,p,a){const S=R("retention-promo-card"),O=R("i18n-t"),A=Qe,g=R("success");return b(),w("div",pn,[p.loadingRetentionOffers&&!a.hasRetentionPromoProducts?(b(),w("div",gn,[...o[0]||(o[0]=[C("span",{class:"animated-ellipsis"},null,-1)])])):T("",!0),a.hasRetentionPromoProducts&&!p.success?(b(),w(ne,{key:1},[C("div",_n,P(a.userTypeRetentionOfferConfig["retention-description"]),1),C("div",mn,[(b(!0),w(ne,null,V(a.sortedRetentionPromoProducts,y=>(b(),w(ne,{key:y.productId},[x(S,{"promo-product":y,"redeem-in-progress":a.currentlyProcessingProductId===y.productId&&!p.showError,"disable-actions":a.currentlyProcessingProductId&&!p.showError,onRedeemPromo:a.redeemPromo},null,8,["promo-product","redeem-in-progress","disable-actions","onRedeemPromo"]),a.currentlyProcessingProductId===y.productId&&p.showError?(b(),U(O,{key:0,tag:"div",class:"cancel-retention-offer__error",keypath:"errorMessage"},se({_:2},[V(Object.keys(a.userTypeRetentionOfferConfig["retention-legal"].links),G=>({name:G,fn:m(()=>[C("a",{href:a.userTypeRetentionOfferConfig["retention-legal"].links[G].href,target:"_new"},P(a.userTypeRetentionOfferConfig["retention-legal"].links[G].text),9,bn)])}))]),1024)):T("",!0)],64))),128))]),C("div",yn,[x(O,{tag:"p",keypath:"legalText"},se({break:m(()=>[o[1]||(o[1]=C("br",null,null,-1))]),_:2},[V(Object.keys(a.userTypeRetentionOfferConfig["retention-legal"].links),y=>({name:y,fn:m(()=>[C("a",{href:a.userTypeRetentionOfferConfig["retention-legal"].links[y].href,target:"_new"},P(a.userTypeRetentionOfferConfig["retention-legal"].links[y].text),9,Cn)])}))]),1024)])],64)):T("",!0),p.success?(b(),U(g,{key:2},{title:m(()=>[oe(P(_.t("successTitle")),1)]),subtitle:m(()=>[x(O,{keypath:"successMessage"},{default:m(()=>[C("span",null,P(p.successProduct.offer.offerTier),1)]),_:1})]),actions:m(()=>[x(A,{class:"dcc-button dcc-button--blue",to:"/settings"},{default:m(()=>[oe(P(_.t("successButton")),1)]),_:1})]),_:1})):T("",!0)])}const vn=ie(hn,[["render",Pn],["__scopeId","data-v-8eb4d199"]]),Tn={components:{Modal:kr,CancelSubscription:en,RetentionOffer:vn},mixins:[qr,ve,Te],setup(){const{t:n}=ae({useScope:"local"});return{t:n}},data(){return{showRetention:!0,showCancel:!0}},beforeMount(){(this.isPausedOrOnHold||this.wasCanceled)&&this.$router.replace("/settings/account/change-subscription")},methods:{success({hide:n}){this[n]=!1}}};function Sn(n,o,h,_,p,a){const S=R("cancel-subscription"),O=R("retention-offer"),A=R("modal"),g=Dr;return b(),w("div",null,[x(g,null,{default:m(()=>[x(A,{title:_.t("cancelSubscription.modalTitle"),"is-takeover":"(max-width: 767px)","is-autosize":!0,"is-active":!0,"close-route":n.withEmbedParam("/settings"),"show-back-btn":!0,"back-route":"/settings/account/change-subscription","back-text":_.t("cancelSubscription.modalBackButton")},{body:m(()=>[p.showCancel?(b(),U(S,{key:0,onSuccess:o[0]||(o[0]=y=>a.success({hide:"showRetention"}))})):T("",!0),p.showRetention?(b(),U(O,{key:1,onSuccess:o[1]||(o[1]=y=>a.success({hide:"showCancel"}))})):T("",!0)]),_:1},8,["title","close-route","back-text"])]),_:1})])}const Gn=ie(Tn,[["render",Sn]]);export{Gn 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.