Build 555975stable
Module 7764
2,536 characters · in ee4f0746cd073fc7.jsDependencies
Source Raw
function(e,t,n){n.d(t,{zX:()=>w,kJ:()=>k,hh:()=>b});var l=n(627968),i=n(64700);n(295405);var r=n(166532);n(735305);var s=n(343834),a=n(926795),o=n(284009),u=n.n(o),c=n(821609),d=n(534514),C=n(834730),p=n(31823),_=n(427675),m=n(571878),E=n(937008),T=n(921925),I=n(482132),O=n(375708),A=n(989553);function S(e){let{handleClose:t}=e,n=(0,m.t4)(e=>e.selectedSkuId),{application:i}=(0,p.V)(),r=(0,_.gU)(),{isGift:s,giftRecipient:a}=(0,E.Pv)();u()(null!=n,"Expected selectedSkuId"),u()(null!=i,"Expected application");let o=r[n];u()(null!=o,"Expected sku");let S=s?O.intl.formatToPlainString(O.t["2VjPTw"],{itemName:o.name,giftRecipient:a?.username??"your recipient"}):O.intl.formatToPlainString(O.t.wK0IbP,{applicationName:i.name,itemName:o.name});return(0,l.jsxs)(I.dZ,{children:[(0,l.jsx)(T.A,{}),(0,l.jsxs)("div",{className:A.EL,children:[(0,l.jsx)(d.D,{variant:"heading-xxl/bold",className:A.RS,children:"Success!"}),(0,l.jsx)(C.E,{variant:"text-md/normal",children:S}),(0,l.jsx)("div",{className:A.yF}),(0,l.jsx)(c.$,{onClick:t,text:O.intl.string(O.t.cpT0Cq),fullWidth:!0})]})]})}n(862241);var h=n(702841),P=n(86379),g=n(545075),x=n(426398),f=n(590180),N=n(20742),R=n(430993),U=n(579151),v=n(599062);function L(){let{refreshCategories:e}=(0,U.A)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(N.rQ,{title:O.intl.string(O.t["p8+qtU"])}),(0,l.jsx)(R.c,{children:(0,l.jsx)(v.h,{onRetry:e,errorOrigin:v.A.GIFT_MODAL})})]})}var y=n(534479),M=n(652215);function j(e){let{handleStepChange:t}=e,n=(0,m.t4)(e=>e.selectedSkuId),{paymentSources:s,hasFetchedPaymentSources:a}=(0,x.jm)(),{application:o}=(0,p.V)(),u=(0,P.Hp)(),c=(0,_.gU)(),d=(0,_.Hu)(),{isGift:C}=(0,E.Pv)(),[T,I]=i.useState(!0),[O,A]=(0,h.yK)([f.A],()=>[f.A.isFetchingCategories,f.A.error]);return(i.useEffect(()=>{let e=null!=o;d&&a&&e&&I(O)},[d,a,o,O]),i.useEffect(()=>{if(T||u||null==n)return;let e=c[n];C&&(e?.productLine===M.EZt.COLLECTIBLES||e?.productLine===M.EZt.APPLICATION||e?.productLine===M.EZt.SOCIAL_LAYER_GAME_ITEM)?t(r.pn.GIFT_CUSTOMIZATION):0===Object.keys(s).length?t(r.pn.ADD_PAYMENT_STEPS):t(r.pn.REVIEW)},[T,u,t,s,C,c,n]),T)?(0,l.jsx)(y.A,{}):u?(0,l.jsx)(g.oO,{}):null!=A?(0,l.jsx)(L,{}):null}let k={key:null,renderStep:e=>(0,l.jsx)(j,{...e}),options:{modalSizeGetter:()=>"md"}};r.pn.ADD_PAYMENT_STEPS;let F={key:r.pn.AWAITING_PURCHASE_TOKEN_AUTH,renderStep:()=>(0,l.jsx)(a.A,{})},D={key:r.pn.AWAITING_AUTHENTICATION,renderStep:()=>(0,l.jsx)(s.A,{}),options:{renderHeader:!0}};r.pn.REVIEW;let w={key:r.pn.CONFIRM,renderStep:e=>(0,l.jsx)(S,{...e})},b=[F,D]}