Build 545032stable
Module 532794
5,534 characters · in no known chunkDependencies
Required by (31)
Lazily required by (0)none
Requires (25)
Lazily requires (1)
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>R});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),f=n(742810),h=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),N=n(925847),y=n(811656),C=n(652215),v=n(758836),O=n(788868);function R(e){let{initialPlanId:t,followupSKUInfo:r,onClose:R,onComplete:b,onSubscriptionConfirmation:D,analyticsLocations:L,analyticsObject:w,analyticsLocation:M,analyticsSourceLocation:P,confirmationFooter:x,isGift:U=!1,giftMessage:k,giftStyle:G,giftingOrigin:F,subscriptionTier:V,trialId:B,postSuccessGuild:H,openInvoiceId:j,applicationId:Y,referralTrialOfferId:W,giftRecipient:K,returnRef:z,subscription:$,skipConfirm:q}=e??{},Z=!1,X=(0,N.A)()??(0,a.A)(),Q=A.default.getCurrentUser(),J=(0,S.YE)(Q,O.PremiumTypes.TIER_2),ee=s()("payment-modal"),et=(0,S.mH)(V),en=U||et!==(0,S.mH)(O.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("39552"),n.e("5959"),n.e("86028"),n.e("73233"),n.e("80203"),n.e("96527"),n.e("67100"),n.e("18541"),n.e("45650"),n.e("18556"),n.e("31837"),n.e("25719"),n.e("44463"),n.e("40671"),n.e("9023"),n.e("19360"),n.e("18125"),n.e("43778"),n.e("22513"),n.e("13498"),n.e("32993"),n.e("48157"),n.e("42971"),n.e("71934"),n.e("55771"),n.e("4554"),n.e("7053"),n.e("13233"),n.e("39995"),n.e("25568"),n.e("16254"),n.e("28951"),n.e("27660"),n.e("85484"),n.e("31135"),n.e("69177"),n.e("6162"),n.e("23924"),n.e("42205"),n.e("71091"),n.e("24199"),n.e("207"),n.e("89281"),n.e("57036"),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("50689"),n.e("45959"),n.e("60658"),n.e("8304"),n.e("39667"),n.e("5812"),n.e("26073"),n.e("28866"),n.e("1368"),n.e("58038"),n.e("31716"),n.e("88941"),n.e("34530"),n.e("62680"),n.e("61379"),n.e("21825"),n.e("98125"),n.e("18441"),n.e("76640"),n.e("25693"),n.e("43039"),n.e("28154"),n.e("48804"),n.e("88077"),n.e("91146"),n.e("32606"),n.e("18401"),n.e("14879"),n.e("13681"),n.e("53729"),n.e("10004"),n.e("55314"),n.e("89094"),n.e("29177"),n.e("33902"),n.e("32551"),n.e("31658"),n.e("4369"),n.e("23353"),n.e("53930"),n.e("46270"),n.e("86949"),n.e("50015"),n.e("11523"),n.e("66900"),n.e("1555"),n.e("44695"),n.e("21690"),n.e("44376"),n.e("99999"),n.e("31644"),n.e("70653"),n.e("45723"),n.e("70697"),n.e("18546"),n.e("38835"),n.e("37622"),n.e("90244"),n.e("18943"),n.e("84103"),n.e("9915"),n.e("53614"),n.e("96123"),n.e("31825"),n.e("36320"),n.e("20320"),n.e("95387"),n.e("31390"),n.e("99657"),n.e("47017"),n.e("90889"),n.e("51243"),n.e("46248"),n.e("44265"),n.e("99141"),n.e("98793"),n.e("92731"),n.e("25990"),n.e("11527"),n.e("63095"),n.e("68647"),n.e("66541"),n.e("63070"),n.e("64615"),n.e("96443"),n.e("87225"),n.e("75134"),n.e("93158"),n.e("84967"),n.e("55184"),n.e("23216"),n.e("87079"),n.e("25637"),n.e("31145"),n.e("78707"),n.e("73547"),n.e("84456"),n.e("99593"),n.e("61935"),n.e("54975"),n.e("62168"),n.e("55602"),n.e("28128"),n.e("58157"),n.e("91381"),n.e("10034"),n.e("73500"),n.e("25252"),n.e("77084"),n.e("20287"),n.e("54625"),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("86230"),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("54791"),n.e("25279"),n.e("73234"),n.e("77473"),n.e("28152"),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:X,subscriptionTier:V,skuId:et,isGift:U,giftMessage:k,giftStyle:G,giftingOrigin:F,giftRecipient:K,initialPlanId:t,followupSKUInfo:r,onClose:e=>{if(er)return;er=!0,T._.dispatch(C.jej.WOW_MOMENT_CONFIRMATION_MODAL_CLOSED);let t=async()=>{if(s(),R?.(e),e&&D?.(),l.h.dispatch({type:"PREMIUM_PAYMENT_MODAL_CLOSE",didSucceed:e}),e&&null!=ei&&en.endDate>=new Date){await (0,h.RE)(ei);let e=p.A.getProduct(ei);null!=e&&(0,E.A)({product:e,analyticsLocations:L??[],purchaseType:v.gs.PROMOTIONAL,overrideGradientColor:"nitro-pink"})}};m.A.isDisplayingWowMomentConfirmation&&m.A.isAnimated?setTimeout(()=>{t()},y.K):t()},onComplete:()=>{Z=!0,b?.()},onSubscriptionConfirmation:D,analyticsLocations:L,analyticsObject:w,analyticsLocation:M,analyticsSourceLocation:P,confirmationFooter:x,trialId:B,postSuccessGuild:H,planGroup:O.LE,openInvoiceId:j,applicationId:Y,referralTrialOfferId:W,returnRef:z,subscription:$,skipConfirm:!!q,wasTier2PremiumBeforePurchase:J})}},{onCloseRequest:()=>{er||(er=!0,T._.dispatch(C.jej.WOW_MOMENT_CONFIRMATION_MODAL_CLOSED),m.A.isDisplayingWowMomentConfirmation&&m.A.isAnimated?setTimeout(()=>{(0,o.closeModal)(ee)},y.K):(0,o.closeModal)(ee))},modalKey:ee,onCloseCallback:()=>{if(!Z){let e=(0,f.q1)({location:"PremiumPaymentModal",unifiedCheckoutFlow:_.C.PREMIUM_CHECKOUT});I.default.track(C.HAw.PAYMENT_FLOW_CANCELED,{load_id:X,payment_type:C.frM[C.VVm.SUBSCRIPTION],location:M??w,source:P,subscription_type:C.rzx.PREMIUM,is_gift:U,sku_id:et,eligible_for_trial:null!=B,application_id:Y,location_stack:L,checkout_design:e?f.rS.UNIFIED:f.rS.LEGACY,checkout_flow:_.C.PREMIUM_CHECKOUT})}(0,c.ET)(),(0,u.ET)(),(0,d.z)(),R?.(Z),Z&&D?.()}})}}