Build 620073canary
Module 981360
30,752 characters · in b854403491a37905.jsDependencies
Required by (1)
Lazily required by (1)
Requires (139)
42271470217928208513592944120480625092057020587036046561750756788080197808101058132198139136139146139286140735156248158008158045165416174459177366202541206835212407219103219882224016224640231723245604252125252732262295268959278416282968284009287809288106297264298072306396318254320095321073329986331322331884334279344346346055347722365491375708395744402860403581408278422460426919440938442759450481460905462887465794466459477900478016495900503089503698508770518865529756536572543080549848561769562708572595575593580630582128604913623373634656650228652165652215661531661847668953685073688810690901702841736653740076757036758836761705763754773669778712780898793574807562818296818348821609825484826706834730836602839534843625846957866665878112881636885574903209929283935094939249963852972213975571976860986687993077993408
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{default:()=>nn});var i,s=n(477900),r=n(582128),l=n(284009),a=n.n(l),c=n(562708),o=n(334279),d=n(702841),u=n(778712),m=n(231723),p=n(224640),x=n(793574),g=n(688810),f=n(139286),E=n(252732),h=n(101058),v=n(836602),N=n(903209),I=n(652165),j=n(287809),A=n(174459),R=n(839534),C=n(440938),y=n(298072),T=n(993408),_=n(503089),k=n(331884),O=n(652215),L=n(623373),P=n(536572),S=n(177366),D=n(575593);function b(e,t){return e.type===D.R.VARIANTS_GROUP?null!=t?e.variants?.[t]:void 0:e}var w=n(212407),M=n(935094),B=n(503698),F=n.n(B),G=n(939249),U=n(834730),H=n(297264),z=n(14702),V=n(818296),W=n(288106),X=n(604913),Z=n(773669);n(321073);var K=n(375708);function Y(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return K.intl.formatToPlainString(K.t["/0Yndu"],{num:e.bundledProducts?.length});let n=e.bundledProducts??[],i=[],s=!1;for(let e of n)switch(e.type){case D.R.AVATAR_DECORATION:i.push(K.intl.formatToPlainString(K.t.Ntv9Jt,{itemName:e.name}));break;case D.R.PROFILE_EFFECT:i.push(K.intl.formatToPlainString(K.t["3Y8q7a"],{itemName:e.name}));break;case D.R.NAMEPLATE:i.push(K.intl.formatToPlainString(K.t["2keXky"],{itemName:e.name})),s=!0}if(s){let e=i.join(", ").replace(/, ([^,]*)$/," & $1");return K.intl.formatToPlainString(K.t.Ofrqj6,{joinedItems:e})}let r=i.join(" & ");return K.intl.formatToPlainString(K.t.Ofrqj6,{joinedItems:r})}var $=n(306396);function q(e,t){return e.endsAt?.toLocaleDateString(t,{month:"numeric",day:"numeric"})??null}function J(e){return(0,T.aw)(e)?K.intl.formatToPlainString(K.t["1tUCAO"],{count:e.items.length}):function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e&&null!=e.summary&&""!==e.summary){if(e.type===D.R.BUNDLE&&e.summary.includes("{joinedItems}")){let n=Y(e,t);return e.summary.replace("{joinedItems}",n)}return e.summary}switch(e?.type){case D.R.AVATAR_DECORATION:return K.intl.string(K.t["3lv7q2"]);case D.R.PROFILE_EFFECT:return K.intl.string(K.t.VhJL72);case D.R.NAMEPLATE:return K.intl.string(K.t.ik37EZ);case D.R.PROFILE_FRAME:return K.intl.string(K.t.fWzWPp);case D.R.BUNDLE:return Y(e,t);default:return""}}(e)}function Q(e){let t=(0,V.g)(e);return null!=t?function(e,t){let n=J(e);switch(t.tenantMetadata?.collectibles?.type){case X.hE.COLLECT_AND_CLAIM:{let i,s;if(t.rewardStatus!==W.GM.IN_PROGRESS)return n;let r=Z.default.locale,l=(0,$.oO)(e,t.tenantMetadata.collectibles.collectionId);return((0,T.aw)(e)?null!=(i=q(t,r))?K.intl.formatToPlainString(K.t["vI+3Ok"],{itemCount:l,endDate:i}):null:null!=(s=q(t,r))?K.intl.formatToPlainString(K.t.wBhFsO,{itemDescription:n.replace(/\.$/,""),endDate:s}):null)??n}case X.hE.TARGETED_OFFER:default:return n}}(e,t):J(e)}var ee=n(758836),et=n(690901);function en(e){let{name:t,typeLabel:n}=e;return(0,s.jsxs)(U.E,{variant:"text-sm/medium",className:et.mC,"aria-live":"polite",children:[(0,s.jsx)("span",{className:et.kx,children:t}),null!=n&&(0,s.jsx)("span",{className:et.FP,children:n})]})}let ei={[D.R.AVATAR_DECORATION]:!0,[D.R.PROFILE_FRAME]:!0};function es(e){let{item:t,index:n,isSelected:i,setSelected:l,label:a,trackedSkuId:c,onTrackClick:o}=e,d=r.useMemo(()=>({skuId:t.skuId,type:t.type,items:[t]}),[t]),u=r.useCallback(()=>{o(ee.sH.BUNDLE_VIEW_PRODUCT,c),l(n)},[o,c,l,n]),m=!0===ei[t.type];return(0,s.jsx)(G.D,{tag:"div",role:"radio","aria-checked":i,tabIndex:i?0:-1,className:F()(et.xn,{[et.Y4]:i,[et.u8]:m}),onClick:u,"aria-label":a,children:(0,s.jsx)("div",{className:et.Yf,children:(0,s.jsx)(z.O,{product:d})})})}var er=n(442759),el=n(344346),ea=n(139136),ec=n(395744),eo=n(929283),ed=n(650228);function eu(e){let{item:t,user:n,bundleFirstAvatarDecoration:i,isBundle:r,pendingAvatarSrc:l,pendingAvatarDecoration:a,pendingDisplayNameStyles:c,pendingGlobalName:o}=e;switch(t.type){case D.R.AVATAR_DECORATION:return(0,s.jsx)("div",{className:ed.h1,children:(0,s.jsx)(eo.i,{user:n,item:t,avatarSrcOverride:l,isHighlighted:!0})});case D.R.PROFILE_EFFECT:return(0,s.jsx)("div",{className:r?ed.sm:ed.VY,children:(0,s.jsx)(ea.A,{skuId:t.skuId,removeSetHeight:!0,isHighlighted:!0,delayProfileEffectIntro:!0})});case D.R.PROFILE_FRAME:return(0,s.jsx)("div",{className:r?ed.ob:ed.fE,children:(0,s.jsx)(ec.A,{frame:t})});case D.R.NAMEPLATE:return(0,s.jsx)("div",{className:ed.Dz,children:(0,s.jsx)(el.A,{className:ed.M4,nameplate:t,user:n,nameplatePreviewSize:"large",pendingAvatarDecoration:i??a,pendingDisplayNameStyles:c,pendingGlobalName:o,isHighlighted:!0,hideDecorators:!0})});default:return null}}function em(e){let{user:t,selectedProduct:n,previewingProduct:i,selectedBundleSlide:r,pendingProfile:l}=e,a=i??n,{firstAvatarDecoration:c}=(0,er.f5)(a),{pendingChanges:o,pendingAvatarSrc:d}=l,u=a.items[r]??a.items[0];return null==u?null:(0,s.jsx)(eu,{item:u,user:t,bundleFirstAvatarDecoration:c,isBundle:(0,T.aw)(a),pendingAvatarSrc:d,pendingAvatarDecoration:o.pendingAvatarDecoration,pendingDisplayNameStyles:o.pendingDisplayNameStyles,pendingGlobalName:o.pendingGlobalName})}var ep=n(846957);function ex(e){let{selectedProduct:t,previewingProduct:n}=e;return(0,s.jsx)(ep.B,{product:n??t})}var eg=n(975571),ef=n(740076),eE=n(661847),eh=n(422460);function ev(e){let{skuId:t}=e;return(0,ee.EZ)(t)?(0,s.jsx)(U.E,{variant:"text-sm/normal",className:eh.CU,children:K.intl.format(K.t.Q1scdE,{helpdeskArticle:eg.A.getArticleURL(O.MVz.FRACTIONAL_PREMIUM_ABOUT)})}):null}function eN(e){let{productRecord:t,productName:n,selectedProduct:i,previewingVariantIndexProps:l}=e,{previewingVariantIndex:a,handleEntering:c,handleLeaving:o}=l,d=b(t,a)??i,u=Q(d),{disabledReason:m}=(0,ef.I)(i.skuId),p=(0,y.Q)(t),x=(0,L.B1)(t),g=x?t.variants[a??p]:null,f=r.useRef(null);return r.useLayoutEffect(()=>{null!=f.current&&(f.current.tabIndex=-1,f.current.focus())},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:eh.sn,children:[(0,s.jsx)(H.D,{ref:f,variant:"heading-xl/bold",className:eh.R_,children:n}),(0,s.jsx)(U.E,{variant:"text-sm/normal",children:u}),(0,s.jsx)(ev,{skuId:d.skuId}),null!==m&&(0,s.jsx)(U.E,{variant:"text-xs/normal",className:eh.H$,children:m})]}),x&&(0,s.jsxs)(s.Fragment,{children:[null!=g&&(0,s.jsx)(U.E,{variant:"text-xs/medium",color:"text-subtle",className:eh.a9,lineClamp:1,children:K.intl.format(K.t.EcaRWt,{value:(0,s.jsx)("span",{className:eh.I8,children:g.variantLabel})})}),(0,s.jsx)("div",{className:eh._x,children:(0,s.jsx)(eE.A,{skuId:t.skuId,onVariantEnter:c,onVariantExit:o,wrap:!0})})]})]})}var eI=((i={}).COLLECTIBLE="COLLECTIBLE",i.BUNDLE="BUNDLE",i.EXTERNAL_ORB_BADGE="EXTERNAL_ORB_BADGE",i.EXTERNAL_FRACTIONAL_NITRO="EXTERNAL_FRACTIONAL_NITRO",i.EXTERNAL_GENERIC="EXTERNAL_GENERIC",i),ej=n(97808),eA=n(346055),eR=n(993077),eC=n(245604),ey=n(460905),eT=n(262295),e_=n(685073),ek=n(320095),eO=n(963852),eL=n(763754),eP=n(20851),eS=n(986687),eD=n(158045),eb=n(780898),ew=n(158008);function eM(e){let{user:t,innerClassName:n}=e;return(0,s.jsx)("div",{className:ew.mV,children:(0,s.jsx)(eT.A,{avatar:(0,s.jsx)(ej.eu,{src:t.avatarSrc,size:u._3.SIZE_32,"aria-label":t.name,status:O.clD.ONLINE}),name:t.name,innerClassName:F()(ew.$L,n)})})}function eB(e){let{user:t,nameplate:n,avatarDecoration:i,pendingDisplayNameStyles:r,pendingGlobalName:l}=e,a=(0,eb.Ov)();return(0,s.jsx)("div",{className:ew.nJ,role:"img","aria-label":K.intl.formatToPlainString(K.t["95pCSf"],{a11y_text:n.label}),children:(0,s.jsxs)(eA.M,{children:[(0,s.jsx)(eM,{user:a.mallow,innerClassName:ew.ab}),(0,s.jsxs)(U.E,{variant:"text-sm/semibold",className:ew.OS,children:[K.intl.string(K.t["yzW/fZ"])," - 3"]}),(0,s.jsx)(eM,{user:a.phibi,innerClassName:ew.e9}),(0,s.jsx)("div",{className:ew.mV,children:(0,s.jsx)(el.A,{className:ew.M4,innerClassName:ew.e9,user:t,nameplate:n,showStatus:!0,isHighlighted:!0,skipEffectDisplayName:!0,pendingAvatarDecoration:i,pendingDisplayNameStyles:r,pendingGlobalName:l,hideDecorators:!0})}),(0,s.jsx)(eM,{user:a.locke,innerClassName:ew.e9}),(0,s.jsxs)(U.E,{variant:"text-sm/semibold",className:ew.OS,children:[K.intl.string(K.t["NG43/6"])," - 12"]}),(0,s.jsx)(eM,{user:a.boom,innerClassName:ew.bD}),(0,s.jsx)(eM,{user:a.cherry,innerClassName:ew.bD})]})})}function eF(e){let{user:t,avatarDecoration:n,pendingAvatarSrc:i,pendingPrimaryGuildId:r,pendingDisplayNameStyles:l,pendingGlobalName:a}=e,c=function(e){let{author:t}=e;return(0,ek.rh)({...(0,eO.Ay)({author:t,channelId:"1337",content:K.intl.string(K.t.d5YwK5)}),state:O.cmJ.SENT,id:"0"})}({author:t}),o=(0,e_.gS)(r),d=(0,eL.p_)(c),u={...d,nick:void 0!==a?(0,E.eh)({pendingNickname:void 0,pendingGlobalName:a,user:t,guildMember:null}):d.nick,primaryGuild:void 0!==r?o:d.primaryGuild,displayNameStyles:void 0!==l?l:d.displayNameStyles};return(0,s.jsx)("div",{role:"img","aria-label":K.intl.string(K.t["TN+ZvB"]),children:(0,s.jsx)(eA.M,{children:(0,s.jsxs)(eR.Z,{className:ew.f7,outline:!0,"aria-hidden":!0,children:[(0,s.jsx)(eP.A,{className:ew.G5,author:u,message:c,avatarDecorationOverride:n??null,avatarOverride:i},c.id),(0,s.jsxs)("div",{className:ew.lG,children:[(0,s.jsx)(eC.U,{size:"md",color:"currentColor",className:ew.hq}),(0,s.jsx)(ey.n,{size:"md",color:"currentColor",className:ew.hq})]})]})})})}function eG(e){let{product:t,user:n,pendingProfile:i,activeBundleSlide:r}=e,l=eD.Ay.canUsePremiumProfileCustomization(n),{pendingAvatar:a,...c}=i.pendingChanges,o=i.pendingAvatarSrc,d=t.type===D.R.BUNDLE?t.items[r??0]:void 0,u=d?.type??t.type,m=u===D.R.AVATAR_DECORATION,p=u===D.R.PROFILE_EFFECT,{firstAvatarDecoration:x,firstProfileEffect:g,firstNameplate:f,firstProfileFrame:E}=(0,er.f5)(t),h=d?.type===D.R.AVATAR_DECORATION?d:x,v=d?.type===D.R.PROFILE_EFFECT?d:g,N=d?.type===D.R.PROFILE_FRAME?d:E,I=d?.type===D.R.NAMEPLATE?d:f;if(u===D.R.NAMEPLATE&&null!=I)return(0,s.jsx)("div",{className:ew.Zj,children:(0,s.jsx)(eB,{user:n,nameplate:I,avatarDecoration:h??c.pendingAvatarDecoration,pendingDisplayNameStyles:c.pendingDisplayNameStyles,pendingGlobalName:c.pendingGlobalName})});return(0,s.jsx)("div",{className:m?ew.RA:ew.hZ,children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eS.A,{...c,pendingAvatar:o,user:n,canUsePremiumCustomization:l,pendingAvatarDecoration:h??c.pendingAvatarDecoration,pendingProfileEffect:v??c.pendingProfileEffect,profileEffectRestartKey:r,pendingProfileFrame:N??c.pendingProfileFrame,disabledInputs:!0,hideMessageInput:!p,hideCustomStatus:!0,hideBioSection:m,hideExampleButton:!0,interactive:!1,className:m?ew.oB:void 0}),m&&(0,s.jsx)(eF,{user:n,avatarDecoration:h,pendingAvatarSrc:o,pendingPrimaryGuildId:c.pendingPrimaryGuildId,pendingDisplayNameStyles:c.pendingDisplayNameStyles,pendingGlobalName:c.pendingGlobalName})]})})}function eU(e){let{user:t,pendingProfile:n,selectedProduct:i,previewingProduct:r,selectedBundleSlide:l}=e;return(0,s.jsx)(eG,{user:t,pendingProfile:n,product:r??i,activeBundleSlide:l})}var eH=n(478016),ez=n(661531),eV=n(219882),eW=n(224016),eX=n(202541),eZ=n(549848);function eK(){let e=[K.intl.string(K.t.E1NP2x),K.intl.string(K.t.kpMomJ),(0,eV.M6)({legacyCopy:K.intl.string(K.t.xT1Vfn),rolloutCopy:K.intl.formatToPlainString(K.t.IDAfOy,{maxFileSize:(0,eD.EJ)(eX.PremiumTypes.TIER_2,{useSpace:!1})})}),K.intl.string(K.t.myyAEr),K.intl.string(K.t.zTk8Ul)];return(0,s.jsxs)("div",{className:eZ.kL,children:[(0,s.jsx)("img",{src:"https://cdn.discordapp.com/assets/content/81644099db353c3ea7cefa334f8d298d06b768a68a349de663d2151fd01eddc7.png",alt:"",className:eZ.ym}),(0,s.jsx)(eW.A,{color:"white"}),(0,s.jsx)("div",{className:eZ.PX,children:e.map((e,t)=>(0,s.jsxs)("div",{className:eZ.UJ,children:[(0,s.jsx)(eH.U,{color:ez.A.colors.WHITE}),(0,s.jsx)(U.E,{variant:"text-sm/medium",color:"text-overlay-light",children:e})]},t))})]})}var eY=n(17928),e$=n(132198),eq=n(35929);function eJ(e){let{user:t}=e,n=eD.Ay.canUsePremiumProfileCustomization(t),{pendingAvatar:i,...r}=(0,eY.cf)([v.A],()=>v.A.getPendingChanges()),l=(0,h.V7)({userId:t.id,image:i});return(0,s.jsx)("div",{className:eq.k,children:(0,s.jsx)(eS.A,{...r,pendingAvatar:l,user:t,pendingBadges:[(0,e$._)()],canUsePremiumCustomization:n,disabledInputs:!0,hideExampleButton:!0})})}var eQ=n(165416);function e0(e){let{user:t,productRecord:n,isClosing:i,isOrbCheckoutModalOpen:r}=e;return n.skuId===ee.Dp.ORB_PROFILE_BADGE?i||r?null:(0,s.jsx)(eJ,{user:t}):(0,ee.EZ)(n.skuId)?(0,s.jsx)(eK,{}):(0,s.jsx)(ep.B,{product:n,className:eQ.M})}let e1={[eI.COLLECTIBLE]:{LeftPreview:em,Info:eN,RightPreview:eU},[eI.BUNDLE]:{LeftPreview:em,Info:function(e){let{productRecord:t,productName:n,selectedBundleSlide:i,setSelectedBundleSlide:l,onTrackClick:a}=e,c=t.items,o=t.bundledProducts,d=o?.[i]?.name,u=c[i]?.type,m=null!=u?(0,T.Dm)(u):null,p=K.intl.string(K.t.cTbdgu),x=Q(t),g=r.useRef(null),f=r.useCallback(e=>{c.length<=1||("ArrowLeft"===e.key||"ArrowUp"===e.key?(e.preventDefault(),l(e=>(e-1+c.length)%c.length)):"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),l(e=>(e+1)%c.length)):"Home"===e.key?(e.preventDefault(),l(0)):"End"===e.key&&(e.preventDefault(),l(c.length-1)))},[c.length,l]);r.useEffect(()=>{let e=g.current;if(null==e||!e.contains(document.activeElement))return;let t=e.querySelectorAll('[role="radio"]');t[i]?.focus()},[i]);let E=r.useRef(null);return r.useLayoutEffect(()=>{null!=E.current&&(E.current.tabIndex=-1,E.current.focus())},[]),(0,s.jsxs)("div",{className:et.Qf,children:[(0,s.jsx)(H.D,{ref:E,variant:"heading-xl/bold",className:et.R_,title:n,children:n}),(0,s.jsx)(U.E,{variant:"text-sm/medium",color:"text-default",children:x}),(0,s.jsxs)("div",{className:et.hZ,children:[(0,s.jsx)("div",{className:et.vg,children:(0,s.jsx)("div",{ref:g,className:et.hK,role:"radiogroup","aria-label":p,tabIndex:-1,onKeyDown:f,children:c.map((e,t)=>{let n=o?.[t]?.name??e.skuId,r=o?.[t]?.skuId??e.skuId;return(0,s.jsx)(es,{item:e,index:t,isSelected:t===i,setSelected:l,label:n,trackedSkuId:r,onTrackClick:a},e.skuId)})})}),null!=d&&(0,s.jsx)(en,{name:d,typeLabel:m})]})]})},RightPreview:eU},[eI.EXTERNAL_ORB_BADGE]:{LeftPreview:ex,Info:eN,RightPreview:e0},[eI.EXTERNAL_FRACTIONAL_NITRO]:{LeftPreview:ex,Info:eN,RightPreview:e0},[eI.EXTERNAL_GENERIC]:{LeftPreview:ex,Info:eN,RightPreview:e0}};function e2(e){var t;return e1[t=e,(0,ee.pQ)(t.skuId)?t.skuId===ee.Dp.ORB_PROFILE_BADGE?"EXTERNAL_ORB_BADGE":(0,ee.EZ)(t.skuId)?"EXTERNAL_FRACTIONAL_NITRO":"EXTERNAL_GENERIC":(0,T.aw)(t)?"BUNDLE":"COLLECTIBLE"]}var e8=n(268959),e6=n(866665),e5=n(508770),e3=n(278416);let e9=e=>{let{promotion:t}=e;return(0,s.jsx)(e6.m,{position:"top",asContainer:!0,text:K.intl.formatToPlainString(K.t.cNtuKF,{offerName:t.displayName}),children:(0,s.jsx)(e5.E,{type:{text:K.intl.string(K.t["nb5PC/"])},variant:"expressive",icon:e3.TagIcon})})};var e7=n(252125);function e4(e){let t,{productRecord:n,selectedProduct:i,selectedBundleSlide:r}=e,l=(0,V.g)(i),a=function(e){switch(e?.tenantMetadata?.collectibles?.type){case X.hE.COLLECT_AND_CLAIM:return e.rewardStatus===W.GM.IN_PROGRESS;case X.hE.TARGETED_OFFER:return!0;default:return!1}}(l),c=n.type===D.R.BUNDLE?n.items[r]??n.items[0]:void 0;return t=null!=c&&!n.hideBadge&&null==n.badgeOverride&&(0,L.JQ)({skuId:c.skuId,type:c.type,items:[c]})?(0,s.jsx)(e8.s,{}):(0,s.jsx)(e8.A,{skuId:n.skuId}),(0,s.jsxs)("div",{className:e7.N,children:[t,null!=l&&a&&(0,s.jsx)(e9,{promotion:l})]})}var te=n(462887),tt=n(821609),tn=n(318254),ti=n(825484),ts=n(331322),tr=n(736653),tl=n(44120),ta=n(465794),tc=n(757036),to=n(761705),td=n(580630),tu=n(4227),tm=n(466459),tp=n(518865),tx=n(885574),tg=n(495900);function tf(e){let{className:t,isPartiallyPurchased:n}=e;return n?(0,s.jsx)(e6.m,{position:"top",align:"left",text:K.intl.string(K.t.y1VWkZ),children:(0,s.jsxs)("div",{className:F()(tg.GX,t),children:[(0,s.jsx)("span",{className:tg.P0,children:(0,s.jsx)(tx.CircleInformationIcon,{size:"md",color:"currentColor",className:tg.G})}),(0,s.jsx)(U.E,{variant:"text-md/semibold",children:K.intl.string(K.t.BEjTij)})]})}):(0,s.jsx)(U.E,{variant:"text-md/semibold",className:t,children:K.intl.string(K.t["6cfuDj"])})}var tE=n(878112),th=n(572595),tv=n(206835),tN=n(450481);let tI=function(e){let{product:t,onSuccess:n,onTrackClick:i}=e,{handleUseNow:r,isApplying:l,canUseNow:a}=(0,tN.p)({product:t,onSuccess:n}),c=(0,tv.A)();return a?(0,s.jsx)(tt.$,{variant:"primary",onClick:()=>{i?.(ee.sH.USE_NOW),r()},loading:l,text:K.intl.string(K.t.MAS7uK),fullWidth:!0}):(0,s.jsx)(tt.$,{variant:"primary",onClick:()=>{i?.(ee.sH.EDIT_PROFILE),c(),n?.()},text:K.intl.string(K.t["2p2aYz"]),fullWidth:!0})};var tj=n(561769),tA=n(140735),tR=n(826706);function tC(e){let{price:{amount:t,currency:n},className:i,variant:r="heading-md/semibold"}=e,l=(0,td.RS)(t,n);return(0,s.jsxs)(U.E,{variant:r,className:F()(tR.v,i),children:[(0,s.jsx)(tA.A,{children:K.intl.format(K.t["2CEGln"],{price:l})}),(0,s.jsx)("span",{"aria-hidden":!0,children:l})]})}var ty=n(219103),tT=n(282968);function t_(e){let{product:t,hasShopDiscount:n,discountSource:i,discount:r,className:l,hideStrikethroughPrice:a=!1,discountIconDisplayMode:c,discountIconSize:o="md"}=e,d=(0,T.WD)(t,{hasShopDiscount:n,discount:r});if(null==d)return null;let{defaultPrice:u,showDefaultPriceOnly:m}=d;if(m)return(0,s.jsx)("div",{className:F()(tT.kG,l),children:(0,s.jsx)(ty.x,{priceAmount:u.amount,priceCurrency:u.currency})});let{showDiscountPrice:p,originalPrice:x,finalPrice:g}=d;return(0,s.jsxs)("div",{className:F()(tT.kG,l),children:[a?null:(0,s.jsx)(tC,{price:x,className:tT.q9}),(0,s.jsx)(ty.x,{priceAmount:g.amount,priceCurrency:g.currency,discount:r,className:tT.q9,discountIconConfig:p&&null!=c?{displayMode:c,source:i??T.D0.NITRO,size:o}:void 0})]})}var tk=n(403581),tO=n(75678),tL=n(843625);function tP(e){let{text:t,onTrackClick:n}=e,{analyticsLocations:i}=(0,g.Ay)(),l=r.useRef(null);return(0,s.jsx)(G.D,{className:tL.F,innerRef:l,onClick:()=>{n?.(ee.sH.SUBSCRIBE_NOW),(0,tO.A)({subscriptionTier:eX.pe.TIER_2,analyticsLocations:i,returnRef:l})},children:t})}var tS=n(329986);function tD(e){let{product:t,onTrackClick:n}=e,i=(0,T.yt)(t,O.lid.PREMIUM_TIER_2);if(null==i)return null;let r=(0,td.RS)(i.amount,i.currency);return(0,s.jsxs)("div",{className:tS.k,children:[(0,s.jsx)(e6.m,{text:K.intl.string(K.t.MPFyJ5),"aria-label":K.intl.string(K.t.X3Ekj8),children:(0,s.jsx)(tk.t,{size:"md",color:"currentColor",className:tS.o})}),(0,s.jsx)(U.E,{variant:"text-xs/medium",children:K.intl.format(K.t.Sv8iic,{price:r,subscribeNowHook:e=>(0,s.jsx)(tP,{text:e,onTrackClick:n})})})]})}var tb=n(818348),tw=n(426919);function tM(e){let{orbPrice:t,isProductDisabled:n,hasSufficientOrbs:i,discount:r}=e,l=n?K.intl.string(K.t.wu4gyV):K.intl.string(K.t.eFNRzU),a=n||!i;return(0,s.jsxs)("div",{className:tw.eg,children:[(0,s.jsx)("div",{className:tw.zR,children:(0,s.jsx)(U.E,{variant:"text-xs/normal",className:a?tw.r9:void 0,children:l})}),(0,s.jsx)(ty.x,{priceAmount:t.amount,priceCurrency:t.currency,discount:r,className:a?tw.r9:void 0})]})}function tB(e){let{prices:t,hasShopDiscount:n,discountSource:i,discount:r,product:l,hasSufficientOrbs:a,onTrackClick:c,isProductDisabled:o}=e;return 0===t.length?null:t[0].currency===tb.Yr.DISCORD_ORB?(0,s.jsx)(tM,{orbPrice:t[0],isProductDisabled:o,hasSufficientOrbs:a,discount:r}):(0,s.jsxs)("div",{className:tw.eg,children:[(0,s.jsxs)("div",{className:tw.pw,children:[(0,s.jsx)(t_,{product:l,discount:r,hasShopDiscount:n,discountSource:i,hideStrikethroughPrice:!n,discountIconDisplayMode:"tooltip",discountIconSize:"xs"}),n?null:(0,s.jsx)(tD,{product:l,onTrackClick:c})]}),t.length>1&&t[1].currency===tb.Yr.DISCORD_ORB&&(0,s.jsx)(ty.x,{priceAmount:t[1].amount,priceCurrency:t[1].currency,className:o||!a?tw.r9:void 0})]})}var tF=n(347722),tG=n(57020),tU=n(61750),tH=n(58703),tz=n(543080);function tV(e){let{label:t,countdown:n}=e;return(0,s.jsxs)("div",{className:tz.lo,children:[(0,s.jsxs)("div",{className:tz.fZ,children:[(0,s.jsx)(e3.TagIcon,{size:"xs",color:"currentColor",className:tz.CE}),(0,s.jsx)(U.E,{variant:"text-xs/medium",color:"none",children:t})]}),null!=n&&(0,s.jsx)(U.E,{variant:"text-xs/medium",color:"none",children:n})]})}function tW(e){let{user:t,productRecord:n,selectedProduct:i,category:l,shouldCheckoutWithOrbs:a,tab:c,giftRecipient:o,giftingOrigin:u,analyticsLocations:m,returnRef:p,onClose:x,onTrackClick:g}=e,{cardId:f,sessionId:E,tilePosition:h}=(0,C.uM)()??{},v=(0,tc.L)(eX.PremiumTypes.TIER_2),N=(0,T.xM)(t),j=eD.Ay.canUseShopDiscounts(t),A=(0,V.g)(i),y=(0,tp.MX)(A),_=(0,tp.Jl)(A),k=r.useMemo(()=>null!=A?function(e){switch(e.tenantMetadata?.collectibles?.type){case X.hE.COLLECT_AND_CLAIM:if(e.rewardStatus!==W.GM.IN_PROGRESS)return null;let t=e.progress;if(null==t)return null;let n=null!=e.endsAt?Math.ceil((0,tH.c_)(e.endsAt,new Date)):null,i=null!=n&&n>0?K.intl.formatToPlainString(K.t.w4GEvw,{days:n}):null;return{label:K.intl.formatToPlainString(K.t.d9KbHK,{current:t.current,target:t.target}),countdown:i};case X.hE.TARGETED_OFFER:default:return null}}(A):null,[A]),L=(0,tm.h)(n),{isPurchased:P,isPartiallyOwnedBundle:S}=(0,tm.h)(i),{isDisabled:D}=(0,ef.I)(i.skuId),b=(0,T.Zu)({product:i,isPartiallyOwnedBundle:S,isPurchased:P}),w=(0,d.bG)([tu.A],()=>tu.A.isClaiming===i?.skuId),M=(0,tr.Ay)(),B=(0,te.M)(M),G=(0,T.G0)(i),H=(0,T.yt)(i,O.lid.DEFAULT),z=H?.amount===0,Z=(0,tF.X)(i),Y=_?tj.Hi.FIAT:c===ee.G2.ORBS&&a?tj.Hi.ORBS:void 0,{checkoutEligiblePrices:$,hasSufficientOrbs:q}=(0,tG.F)({product:i,hasShopDiscount:j,prioritizedCurrency:Y}),J=r.useMemo(()=>(0,T.fT)(i,j,$[0]?.currency),[i,j,$]),Q=r.useMemo(()=>$.some(e=>e.currency===tb.Yr.DISCORD_ORB),[$]);(0,to.W)({disableFetch:!Q});let et=r.useCallback(()=>{g(ee.sH.BUY_WITH_FIAT),(0,tl.A)({skuId:i.skuId,analyticsLocations:m,discoverySessionId:E,onClose:e=>e?x():(0,tb.tE)()})},[m,x,i.skuId,g,E]);return(0,s.jsxs)("div",{className:tz.iw,children:[L.isPurchased||L.isPartiallyOwnedBundle?(0,s.jsx)(tf,{className:tz.On,isPartiallyPurchased:S}):G?(0,s.jsxs)("div",{className:tz.pq,children:[(0,s.jsx)(U.E,{variant:"text-md/semibold",children:K.intl.string(K.t.rt69oo)}),!P&&(0,s.jsx)(U.E,{className:F()(tz.ed,!B&&tz.un),variant:"text-xxs/normal",children:K.intl.string(K.t.nKdAlO)})]}):(0,s.jsx)(tB,{prices:$,product:i,hasShopDiscount:j,discountSource:N,discount:J,hasSufficientOrbs:q,isProductDisabled:D,onTrackClick:g}),null!=k&&(0,s.jsx)(tV,{...k}),(0,s.jsx)(ts.B,{direction:"vertical",gap:8,children:function(){if(G&&!v&&!z){var e;return e=K.intl.string(K.t.sEAnVH),(0,s.jsx)(ta.A,{subscriptionTier:eX.pe.TIER_2,fullWidth:!0,buttonTextOverride:e,onClick:()=>{g(ee.sH.UNLOCK_WITH_NITRO),(0,th.M)()},onSubscribeModalClose:()=>{(0,th.t)({product:n,category:l,shouldCheckoutWithOrbs:a,returnRef:p,analyticsLocations:m,tab:c,giftRecipient:o,giftingOrigin:u,cardId:f,sessionId:E,tilePosition:h})}})}return b?P?Z?(0,s.jsxs)(ti.e,{wrap:!1,fullWidth:!0,children:[(0,s.jsx)(tI,{product:i,onSuccess:x,onTrackClick:g}),(0,s.jsx)(tE.A,{primary:!0,product:i,onSuccess:x,giftRecipient:o,giftingOrigin:u,onTrackClick:g})]}):(0,s.jsx)(tI,{product:i,onSuccess:x,onTrackClick:g}):G?(0,s.jsx)(tt.$,{loading:w,loadingStartedLabel:K.intl.string(K.t["TYw+9s"]),loadingFinishedLabel:K.intl.string(K.t.Pg1UP5),onClick:async()=>{g(ee.sH.ADD_TO_COLLECTION),await (0,R.iJ)(i.skuId),x(),(0,tU.A)({product:i,analyticsLocations:m,purchaseType:ee.gs.PREMIUM_PURCHASE})},text:K.intl.string(K.t.zp6caO),fullWidth:!0}):(0,s.jsx)(s.Fragment,{children:$.map((e,t)=>{let n,l,a,c,d,p=0===t,f=e.currency===tb.Yr.DISCORD_ORB?(n=D?K.intl.string(K.t.cTdr3x):K.intl.string(K.t.zqh7ZM),l=!q||D,a=K.intl.formatToPlainString(K.t.yi41qQ,{orbPrice:e.amount}),c=l?`${a}, ${n}`:a,(0,s.jsx)(e6.m,{position:"top",text:n,shouldShow:l,"aria-label":!1,children:(0,s.jsx)(tt.$,{variant:p?"primary":"secondary",onClick:function(){g(ee.sH.BUY_WITH_ORBS),(0,I.B4)({skuId:i.skuId,onComplete:e=>{(0,R.gB)(),x(),(0,tU.A)({product:i,analyticsLocations:m,itemConsumed:e?.entitlements?.[0]?.consumed,purchaseType:ee.gs.ORB})},analyticsLocations:m,discoverySessionId:E})},disabled:l,"aria-label":c,text:K.intl.format(K.t.JC15qj,{orbPrice:e.amount,orbIconHook:()=>(0,s.jsx)(tn.C,{className:tz.fN,size:"sm",color:"currentColor"})}),fullWidth:!0})})):(d=y??K.intl.formatToPlainString(K.t["cNSL/j"],{price:(0,td.$g)(e.amount,e.currency)}),(0,s.jsxs)(ti.e,{wrap:!1,fullWidth:!0,children:[(0,s.jsx)(tt.$,{variant:p?"primary":"secondary",onClick:et,text:d,fullWidth:!0}),Z&&(0,s.jsx)(tE.A,{primary:p,product:i,onSuccess:x,giftRecipient:o,giftingOrigin:u,onTrackClick:g})]}));return(0,s.jsx)(r.Fragment,{children:f},e.currency)})}):Z?(0,s.jsx)(tE.A,{primary:!0,product:i,onSuccess:x,fullWidth:!0,giftRecipient:o,giftingOrigin:u,onTrackClick:g}):null}()})]})}var tX=n(634656);function tZ(e){let{productRecord:t,selectedProduct:n,previewingProduct:i,user:r,selectedBundleSlide:l,pendingProfile:a}=e,c=e2(t);return(0,s.jsxs)("div",{className:F()(tX.wd,{[tX.E7]:null!=c.LeftPreview}),children:[(0,s.jsx)("div",{className:tX.dL,children:(0,s.jsx)(e4,{productRecord:t,selectedProduct:n,selectedBundleSlide:l})}),null!=c.LeftPreview&&(0,s.jsx)("div",{className:tX._E,children:(0,s.jsx)(c.LeftPreview,{user:r,selectedProduct:n,previewingProduct:i,productRecord:t,selectedBundleSlide:l,pendingProfile:a})}),(0,s.jsx)("div",{className:tX.F_,children:(0,s.jsx)(c.Info,{...e})}),(0,s.jsx)(tW,{...e})]})}var tK=n(529756),tY=n(408278),t$=n(972213),tq=n(156248),tJ=n(139146),tQ=n(60465),t0=n(976860),t1=n(402860),t2=n(50920),t8=n(365491),t6=n(668953),t5=n(881636),t3=n(807562);function t9(e){let{goPrev:t,goNext:n}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:t3.Y,children:(0,s.jsx)(tY.K,{"aria-label":K.intl.string(K.t["3NdvMK"]),onClick:t,icon:t6.f,variant:"overlay-secondary",size:"sm"})}),(0,s.jsx)("div",{className:t3.K,children:(0,s.jsx)(tY.K,{"aria-label":K.intl.string(K.t.RYIeOX),onClick:n,icon:t5.u,variant:"overlay-secondary",size:"sm"})})]})}var t7=n(48062);function t4(e){let{user:t,pendingProfile:n,productRecord:i,previewingProduct:l,selectedProduct:a,selectedVariantIndex:c,selectedBundleSlide:o,setSelectedBundleSlide:d,isClosing:u,isOrbCheckoutModalOpen:m,pdpBackground:p,category:x,tab:g,onClose:f,onTrackClick:E}=e,h=e2(i),v=(0,T.aw)(a),N=v?a.items.length:0,I=function(){let e=(0,t2.a)("CollectiblesPdpNavigateToCollection"),{sessionId:t}=(0,C.uM)()??{},n=(0,t8.v)(e=>e.reset);return r.useCallback((i,s)=>{if(A.default.track(O.HAw.COLLECTIBLES_SHOP_ELEMENT_CLICKED,{collectibles_shop_session_id:t,sku_id:i.skuId,cta_name:s}),(0,t1.closeUserProfileModal)(),(0,tQ.p)(),e&&!0!==i.isOrbsExclusive)return void(0,t0.pX)(O.BVt.COLLECTIBLES_SHOP_COLLECTION_DETAIL(i.skuId));n();let r=!0===i.isOrbsExclusive?ee.G2.ORBS:ee.G2.CATALOG;(0,t0.pX)(`${O.BVt.COLLECTIBLES_SHOP_WITH_TAB(r)}&${ee.P1}=${i.skuId}`)},[e,t,n])}(),j=r.useCallback(()=>{E(ee.sH.GO_TO_COLLECTION),f(),I(x,"go_to_collection_button")},[x,f,E,I]),R=r.useCallback(()=>{N<=1||d(e=>(e-1+N)%N)},[N,d]),y=r.useCallback(()=>{N<=1||d(e=>(e+1)%N)},[N,d]),_=r.useCallback(e=>{if(N<=1)return;let t=e.target;"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||("ArrowLeft"===e.key?(e.preventDefault(),R()):"ArrowRight"===e.key&&(e.preventDefault(),y()))},[N,R,y]),k=r.useCallback(()=>{E(ee.sH.CLOSE_DETAIL),f()},[E,f]),L=r.useRef(null),S=r.useRef(!0);return r.useLayoutEffect(()=>{if(S.current){S.current=!1;return}let e=L.current;null!=e&&(e.style.animation="none",e.offsetHeight,e.style.animation="")},[o]),(0,s.jsxs)("div",{className:F()(t7.i1,(0,ee.EZ)(a.skuId)?t7.bF:a.type===D.R.AVATAR_DECORATION?t7.Jq:t7.eF),style:null!=p?{backgroundImage:`url(${p})`}:void 0,onKeyDown:_,children:[(0,s.jsx)("div",{className:t7.GV,children:(0,s.jsx)(e6.m,{text:K.intl.string(K.t["Hr/q/6"]),children:(0,s.jsx)(tt.$,{variant:"overlay-secondary",size:"sm",icon:tK.c,text:x.name,onClick:j})})}),(0,s.jsx)("div",{className:t7.KR,ref:L,children:(0,s.jsx)(h.RightPreview,{user:t,pendingProfile:n,productRecord:i,selectedProduct:a,previewingProduct:l,selectedBundleSlide:o,isClosing:u,isOrbCheckoutModalOpen:m})}),v&&N>1&&(0,s.jsx)(t9,{goPrev:R,goNext:y}),(0,s.jsxs)("div",{className:t7.VG,children:[(0,s.jsx)(tJ.R,{product:i,selectedVariantIndex:c,variant:"overlay-secondary",size:"sm",onTrackClick:E}),(0,s.jsx)(tq.H,{skuId:a.skuId,product:a,productName:(0,P.VG)(a),tab:g,onTrackClick:E}),(0,s.jsx)(tY.K,{"aria-label":K.intl.string(K.t.cpT0Cq),onClick:k,icon:t$.XLargeIcon,variant:"overlay-secondary",size:"sm"})]})]})}var ne=n(80801);let nt=(0,u.FT)(u._3.SIZE_152),nn=function(e){let{transitionState:t,onClose:n,product:i,category:l,returnRef:u,analyticsSource:D,analyticsLocations:B,shouldCheckoutWithOrbs:F,tab:G,giftRecipient:U,giftingOrigin:H}=e,z=(0,d.bG)([j.default],()=>j.default.getCurrentUser()),V=(0,d.cf)([v.A],()=>v.A.getPendingChanges()),W=(0,M.f)(i),{previewingVariantIndex:X}=W,Z=(0,y.Q)(i),K=b(i,X),Y=(0,L.rb)(i,Z);a()(null!=Y,"Selected product should not be null");let{analyticsLocations:$}=(0,g.Ay)([...B,x.A.COLLECTIBLES_SHOP_DETAILS_MODAL]);(0,S.Yr)(Y.skuId);let q=(0,w.U1)(l),[J,Q]=r.useState(0);r.useEffect(()=>{null!=z&&(0,N.A)(z.id,z.getAvatarURL(void 0,80))},[z]);let ee=r.useMemo(()=>(0,T.V6)(i.type,i.skuId),[i.type,i.skuId]);r.useEffect(()=>{A.default.track(O.HAw.OPEN_MODAL,{type:O.JJy.COLLECTIBLES_SHOP_DETAILS_MODAL,source:D,location_stack:$,sku_id:Y.skuId,product_type:ee}),(0,R.RD)(Y.skuId)},[D,$,Y.skuId,ee]);let{cardId:et,sessionId:en,tilePosition:ei}=(0,C.uM)()??{},es=r.useMemo(()=>(0,L.v8)(i),[i]),er=function(e){let{skuId:t,productSkuIds:n,analyticsLocations:i}=e,{cardId:s,sessionId:l}=(0,C.uM)()??{},a=(0,k.o)(),c=(0,T.xM)(a);return r.useCallback((e,r)=>{A.default.track(O.HAw.SHOP_PRODUCT_DETAIL_PAGE_CLICKED,{sku_id:r??t,cta:e,shop_session_id:l,card_id:s,product_sku_ids:n,location_stack:i,discount_source:(0,T.b_)(c)})},[t,i,s,n,l,c])}({skuId:Y.skuId,productSkuIds:es,analyticsLocations:$});(0,f.A)({type:c.ImpressionTypes.MODAL,name:c.ImpressionNames.SHOP_PRODUCT_DETAIL,properties:{sku_id:Y.skuId,card_id:et,shop_session_id:en,position_in_section:ei,product_sku_ids:es,location_stack:$}});let el=(0,I.o6)(),ea=t===m.ip.EXITING,ec=(0,_.c)("product_details_modal");if(null==z||i.skuId===o.j.PREMIUM_TIER_2_1_DAY&&!ec)return null;let eo={pendingChanges:V,pendingAvatarSrc:void 0!==V.pendingAvatar?(0,E.sv)((0,h.V7)({userId:z.id,image:V.pendingAvatar,size:nt}),null,z,{size:nt}):void 0},ed=(0,P.VG)(i),eu={user:z,pendingProfile:eo,productRecord:i,productName:ed,selectedProduct:Y,previewingProduct:K??null,category:l,selectedVariantIndex:Z,previewingVariantIndexProps:W,selectedBundleSlide:J,setSelectedBundleSlide:Q,tab:G,shouldCheckoutWithOrbs:F,giftRecipient:U?.id!==z.id?U:void 0,giftingOrigin:U?.id!==z.id?H:void 0,analyticsLocations:$,returnRef:u,onClose:n,onTrackClick:er};return(0,s.jsx)(g.f5,{value:$,children:(0,s.jsx)(p.d,{returnRef:u,transitionState:t,onClose:n,size:"xl",paddingSize:"sm","aria-label":ed,children:(0,s.jsx)("div",{className:ne.C,children:(0,s.jsxs)("div",{className:ne.j,children:[(0,s.jsx)(tZ,{...eu}),(0,s.jsx)(t4,{...eu,isClosing:ea,isOrbCheckoutModalOpen:el,pdpBackground:q})]})})})})}}