Loading
function(e,t,n){"use strict";n.d(t,{A:()=>O});var i=n(627968);n(64700);var r=n(296489),s=n.n(r),a=n(835245),o=n(192308),l=n(228366),u=n(391048),c=n(158032),d=n(636099),_=n(120700),h=n(742810),f=n(859040),p=n(590180),E=n(61750),m=n(573359),g=n(374200),A=n(287809),I=n(174459),T=n(625494),S=n(428262),y=n(925847),N=n(811656),v=n(652215),C=n(758836),R=n(788868);function O(e){let{initialPlanId:t,followupSKUInfo:r,onClose:O,onComplete:b,onSubscriptionConfirmation:D,analyticsLocations:L,analyticsObject:w,analyticsLocation:M,analyticsSourceLocation:P,confirmationFooter:x,isGift:k=!1,giftMessage:U,giftStyle:G,giftingOrigin:F,subscriptionTier:V,trialId:B,postSuccessGuild:H,openInvoiceId:j,applicationId:Y,referralTrialOfferId:W,giftRecipient:K,returnRef:$,subscription:z,skipConfirm:q}=e??{},X=!1,Z=(0,y.A)()??(0,a.A)(),Q=A.default.getCurrentUser(),J=(0,S.YE)(Q,R.PremiumTypes.TIER_2),ee=s()("payment-modal"),et=(0,S.mH)(V),en=k||et!==(0,S.mH)(R.pe.TIER_2)?null:g.A.getMarketingMomentPromotion(),ei=en?.rewardSkuIds[0]??null,er=!1;return(0,o.openModalLazy)(async()=>{let{default:e}=await Promise.all([n.e("56377"),n.e("77083"),n.e("17214"),n.e("86003"),n.e("64509"),n.e("96330"),n.e("56159"),n.e("77049"),n.e("55801"),n.e("21838"),n.e("81113"),n.e("34533"),n.e("90665"),n.e("51515"),n.e("55642"),n.e("80889"),n.e("22513"),n.e("98600"),n.e("19401"),n.e("31591"),n.e("24798"),n.e("10310"),n.e("87550"),n.e("32697"),n.e("58435"),n.e("69484"),n.e("78925"),n.e("7053"),n.e("99512"),n.e("39995"),n.e("25568"),n.e("394"),n.e("76927"),n.e("68953"),n.e("4222"),n.e("18090"),n.e("46009"),n.e("4495"),n.e("23129"),n.e("68277"),n.e("23924"),n.e("42205"),n.e("71091"),n.e("24199"),n.e("207"),n.e("89281"),n.e("57036"),n.e("57174"),n.e("98839"),n.e("28367"),n.e("10471"),n.e("35429"),n.e("11301"),n.e("60235"),n.e("30938"),n.e("96643"),n.e("94493"),n.e("92789"),n.e("47834"),n.e("74016"),n.e("19551"),n.e("6338"),n.e("3178"),n.e("45959"),n.e("60658"),n.e("8304"),n.e("54048"),n.e("39667"),n.e("5812"),n.e("26073"),n.e("28866"),n.e("2419"),n.e("58038"),n.e("31716"),n.e("34530"),n.e("88941"),n.e("699"),n.e("91146"),n.e("62680"),n.e("87306"),n.e("99666"),n.e("41043"),n.e("18441"),n.e("98125"),n.e("21825"),n.e("61379"),n.e("76640"),n.e("88077"),n.e("33902"),n.e("25693"),n.e("32606"),n.e("18401"),n.e("14879"),n.e("43039"),n.e("28154"),n.e("53729"),n.e("48804"),n.e("10004"),n.e("55314"),n.e("89094"),n.e("29177"),n.e("99999"),n.e("32551"),n.e("57840"),n.e("4369"),n.e("46270"),n.e("86949"),n.e("23353"),n.e("50015"),n.e("11523"),n.e("1555"),n.e("44695"),n.e("13681"),n.e("21690"),n.e("44376"),n.e("31644"),n.e("45723"),n.e("70697"),n.e("18546"),n.e("53930"),n.e("38835"),n.e("90244"),n.e("18943"),n.e("54975"),n.e("70653"),n.e("53614"),n.e("31825"),n.e("36320"),n.e("20320"),n.e("99657"),n.e("47017"),n.e("31145"),n.e("90889"),n.e("37622"),n.e("51243"),n.e("44265"),n.e("84103"),n.e("17225"),n.e("30920"),n.e("9915"),n.e("20287"),n.e("11527"),n.e("84551"),n.e("68647"),n.e("35344"),n.e("63070"),n.e("64615"),n.e("45099"),n.e("87225"),n.e("75134"),n.e("93158"),n.e("84967"),n.e("55184"),n.e("31390"),n.e("23216"),n.e("87079"),n.e("91849"),n.e("46248"),n.e("78707"),n.e("51130"),n.e("73547"),n.e("26780"),n.e("84456"),n.e("47555"),n.e("99593"),n.e("61935"),n.e("92731"),n.e("25990"),n.e("77084"),n.e("28152"),n.e("62168"),n.e("63095"),n.e("54364"),n.e("58157"),n.e("5131"),n.e("91381"),n.e("54625"),n.e("81684"),n.e("49697"),n.e("80230"),n.e("37687"),n.e("95093"),n.e("63645"),n.e("71234"),n.e("27773"),n.e("5636"),n.e("87196"),n.e("834"),n.e("60177"),n.e("69933"),n.e("26728"),n.e("1354"),n.e("23276"),n.e("78412"),n.e("63213"),n.e("95444"),n.e("48720"),n.e("33134"),n.e("80112"),n.e("59880"),n.e("6723"),n.e("54791"),n.e("25279"),n.e("54819"),n.e("77473"),n.e("35996"),n.e("44057"),n.e("63618"),n.e("21856"),n.e("8694"),n.e("9045"),n.e("39053"),n.e("62175"),n.e("77333"),n.e("93213"),n.e("13600"),n.e("8739"),n.e("61402")]).then(n.bind(n,864353));return n=>{let{onClose:s,...a}=n;return(0,i.jsx)(e,{...a,loadId:Z,subscriptionTier:V,skuId:et,isGift:k,giftMessage:U,giftStyle:G,giftingOrigin:F,giftRecipient:K,initialPlanId:t,followupSKUInfo:r,onClose:e=>{if(er)return;er=!0,T._.dispatch(v.jej.WOW_MOMENT_CONFIRMATION_MODAL_CLOSED);let t=async()=>{if(s(),O?.(e),e&&D?.(),l.h.dispatch({type:"PREMIUM_PAYMENT_MODAL_CLOSE",didSucceed:e}),e&&null!=ei&&en.endDate>=new Date){await (0,f.RE)(ei);let e=p.A.getProduct(ei);null!=e&&(0,E.A)({product:e,analyticsLocations:L??[],purchaseType:C.gs.PROMOTIONAL,overrideGradientColor:"nitro-pink"})}};m.A.isDisplayingWowMomentConfirmation&&m.A.isAnimated?setTimeout(()=>{t()},N.K):t()},onComplete:()=>{X=!0,b?.()},onSubscriptionConfirmation:D,analyticsLocations:L,analyticsObject:w,analyticsLocation:M,analyticsSourceLocation:P,confirmationFooter:x,trialId:B,postSuccessGuild:H,planGroup:R.LE,openInvoiceId:j,applicationId:Y,referralTrialOfferId:W,returnRef:$,subscription:z,skipConfirm:!!q,wasTier2PremiumBeforePurchase:J})}},{onCloseRequest:()=>{er||(er=!0,T._.dispatch(v.jej.WOW_MOMENT_CONFIRMATION_MODAL_CLOSED),m.A.isDisplayingWowMomentConfirmation&&m.A.isAnimated?setTimeout(()=>{(0,o.closeModal)(ee)},N.K):(0,o.closeModal)(ee))},modalKey:ee,onCloseCallback:()=>{if(!X){let e=(0,h.q1)({location:"PremiumPaymentModal",unifiedCheckoutFlow:_.C.PREMIUM_CHECKOUT});I.default.track(v.HAw.PAYMENT_FLOW_CANCELED,{load_id:Z,payment_type:v.frM[v.VVm.SUBSCRIPTION],location:M??w,source:P,subscription_type:v.rzx.PREMIUM,is_gift:k,sku_id:et,eligible_for_trial:null!=B,application_id:Y,location_stack:L,checkout_design:e?h.rS.UNIFIED:h.rS.LEGACY,checkout_flow:_.C.PREMIUM_CHECKOUT})}(0,c.ET)(),(0,u.ET)(),(0,d.z)(),O?.(X),X&&D?.()}})}}