Loading
function(e,i,n){n.r(i),n.d(i,{default:()=>eX});var s=n(627968),l=n(64700),r=n(503698),t=n.n(r),a=n(873174),d=n(17928),o=n(868285),u=n(717421),c=n(477782),p=n(305866),A=n(871682),x=n(140735),h=n(707554),f=n(80682),j=n(793574),I=n(688810),m=n(480335),P=n(31956),g=n(361628),y=n(744808),O=n(282389),T=n(915089),v=n(713517),C=n(645507),E=n(267102),N=n(71393),k=n(562153),S=n(183555),U=n(47675),b=n(570287),F=n(999291);let R=(0,n(945810).mj)({kind:"user",name:"2026-03-friend-request-wave",defaultConfig:{enabled:!1},variations:{1:{enabled:!0}}});var _=n(679492),w=n(975732),G=n(718019),L=n(915614),M=n(439053),V=n(312381),q=n(946356),H=n(587168),W=n(193738),z=n(713608),D=n(901472),B=n(985925),X=n(468689),$=n(474397),K=n(378570),Q=n(495544),Y=n(309010),J=n(993401),Z=n(652215),ee=n(746080),ei=n(486974),en=n(375708);function es(e){let{user:i,guildId:n,channelId:l,onClose:r,appContext:t}=e,{newestAnalyticsLocation:a}=(0,I.Ay)(),o=(0,E.aL)(),u=(0,d.bG)([Q.default],()=>Q.default.getId()===i?.id),c=(0,B.q)(n??null),p=(0,d.bG)([Y.A],()=>l??Y.A.getChannelId(n,!0),[l,n]);return null==n||!c||u?null:(0,s.jsx)(J.br,{action:"PRESS_MOD_VIEW",icon:z.q,tooltipText:en.intl.string(en.t.kj3tz2),onClick:()=>{X.A.close(),null!=p&&(0,K.iN)(p),(0,$.A)(t),o.dispatch(Z.jej.POPOUT_CLOSE),(0,D.z)(n,i.id,p??ee.VV.MEMBER_SAFETY,{modViewPanel:ei.g.INFO,sourceLocation:a}),r?.()}})}var el=n(700174),er=n(983495),et=n(789645),ea=n(661531),ed=n(834730),eo=n(821609),eu=n(308528),ec=n(720149),ep=n(56562),eA=n(330001),ex=n(432222),eh=n(976860),ef=n(734057),ej=n(232835),eI=n(381941),em=n(901123),eP=n(656884);function eg(e){var i;let n,{userId:r,onSendWave:t}=e,{enabled:a}=R.useConfig({location:"Friend Request Toast"}),[d,o]=l.useState(null),[u,c]=l.useState(!1),p=(i="User Profile Friend Request Toast",n=l.useRef(!1),l.useCallback(async(e,s)=>{try{if(n.current)return;n.current=!0;let s=await eu.A.openPrivateChannel({recipientIds:r,location:i,navigateToChannel:!1}),l=ef.A.getChannel(s);if(null==l)throw Error("Failed to open private channel");(0,eA.W)({channelId:l.id,source:i}),await ec.A.sendStickers(l.id,[ex.w],"",{location:eI.Hx.SEND_WAVE}),e?.(),(0,eh.pX)(Z.BVt.CHANNEL(em.ME,l.id)),ec.A.jumpToMessage({channelId:l.id,messageId:ej.A.getLastMessage(l.id)?.id??"",jumpType:ep.US.INSTANT})}catch(e){s(en.intl.string(en.t.Q97Gke))}finally{n.current=!1}},[i,r])),A=l.useCallback(async()=>{c(!0),await p(t,o),c(!1)},[t,p]);return a?(0,s.jsx)("div",{className:eP.$J,children:null!=d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:eP.i3,children:(0,s.jsx)(et.P,{color:ea.A.colors.STATUS_DANGER})}),(0,s.jsx)(ed.E,{variant:"text-sm/normal",color:"text-muted",children:d})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ed.E,{variant:"text-sm/normal",color:"text-default",children:en.intl.string(en.t.XcTHmQ)}),(0,s.jsx)(eo.$,{disabled:u,variant:"secondary",text:en.intl.string(en.t.pVlP58),size:"sm",onClick:A})]})}):null}var ey=n(364522),eO=n(695366),eT=n(922590),ev=n(93246),eC=n(994500),eE=n(351906),eN=n(428262),ek=n(328296),eS=n(744753),eU=n(559506),eb=n(931481),eF=n(501193),eR=n(383448),e_=n(900179),ew=n(646986),eG=n(349419),eL=n(878555),eM=n(243166),eV=n(442228),eq=n(192867),eH=n(403369),eW=n(360563),ez=n(996988);function eD(e){let{user:i,currentUser:n,displayProfile:l,guild:r,isHoveringOrFocusing:t,onOpenProfile:a,channelId:o,onClose:u}=e,c=k.Ay.useName(r?.id,o,i),{relationshipType:p,originApplicationId:A}=(0,d.cf)([eC.A],()=>({relationshipType:eC.A.getRelationshipType(i.id),originApplicationId:eC.A.getOriginApplicationId(i.id)})),x=(0,eT.fi)(i.id),h=(0,d.bG)([eE.A],()=>eE.A.hidePersonalInformation),f=i.id===n.id,j=l?.widgets!=null&&l.widgets.length>0,I=(0,eN.TW)(n);return(0,s.jsxs)(ey.Ip,{fade:!0,className:eP.rf,children:[(0,s.jsx)(eU.A,{userId:i.id}),(0,s.jsx)(eL.Ay,{user:i,guildId:r?.id,displayName:c,onClickName:a,displayNameTrailing:h?null:(0,s.jsx)(eM.A,{userId:i.id,isVisible:t,onOpenProfile:a}),pronouns:l?.pronouns,onClose:u,usernameIcon:i.hasAvatarForGuild(r?.id)&&(0,s.jsx)(eq.A,{user:i,nickname:c}),trailing:(0,s.jsx)(ek.A,{displayProfile:l,themeType:ez.d.POPOUT,onClose:u})}),p===Z.eA$.PENDING_INCOMING&&(0,s.jsx)(q.A.Overlay,{children:(0,s.jsx)(eb.A,{user:i,guildId:r?.id,channelId:o,applicationId:A})}),x.map(e=>(0,s.jsx)(q.A.Overlay,{children:(0,s.jsx)(eb.A,{user:i,isGameRelationship:!0,applicationId:e.applicationId,channelId:o})},e.applicationId)),(0,s.jsx)(eR.A,{user:i}),!f&&(0,s.jsx)(eW.A,{user:i,onOpenProfile:e=>a?.({tabSection:e})}),l?.private&&(0,s.jsx)(q.A.Overlay,{children:(0,s.jsx)(eF.A,{username:c})}),f&&(0,s.jsx)(eS.A,{isPremiumUser:I,onInteraction:u}),i.isProvisional?(0,s.jsx)(q.A.Overlay,{className:eP.Nr,children:(0,s.jsx)(e_.A,{heading:en.intl.string(en.t.Iyka0U),headingIcon:(0,s.jsx)(eO.E,{size:"xxs",color:ea.A.colors.TEXT_STRONG}),headingColor:"text-strong",children:(0,s.jsx)(ev.T,{userId:i.id})})}):(0,s.jsx)(eV.A,{user:i,bio:l?.bio,hidePersonalInformation:h,onClose:u}),j&&(0,s.jsx)(eG.A,{user:i,widgets:l?.widgets,onOpenUserProfileModal:a}),(0,s.jsx)(ew.A,{user:i,currentUser:n,guildId:r?.id,onOpenUserProfileModal:a,onClose:u}),null!=r&&(0,s.jsx)(eH.A,{userId:i.id,guild:r})]})}var eB=n(920947);function eX(e){let{user:i,currentUser:n,guildId:r,channelId:z,messageId:D,roleId:B,openedAt:X,closePopout:$,setPopoutRef:K,disableUserProfileLink:Q=__OVERLAY__,newAnalyticsLocations:Y=[],appContext:J,disableAutoFocus:ee=!1,onClickContainer:ei}=e,{analyticsLocations:et}=(0,I.Ay)([...Y,j.A.USER_PROFILE_POPOUT]),ea=(0,E.aL)(),ed=(0,S.pb)({layout:"POPOUT",userId:i.id,guildId:r,channelId:z,messageId:D,roleId:B}),eo=(0,d.bG)([N.A],()=>null!=r?N.A.getGuild(r):null),eu=l.useMemo(()=>null!=r?{[r]:[i.id]}:{},[r,i.id]);(0,f.Eq)(eu,"UserProfilePopout");let ec=l.useRef(null),ep=(0,F.Ay)(i.id,r),[eA,ex]=l.useState(!1),eh=(0,b.A)(i.id,r),{enabled:ef}=R.useConfig({location:"UserProfilePopout"}),{isHoveringOrFocusing:ej,isHovering:eI}=(0,v.A)(ec),em=(0,_.fC)(),ey=(0,g.A)(ep?.profileFrame?.skuId,"UserProfilePopout"),eO=(0,O.A)(ep?.profileFrame?.skuId);(0,P.A)({skuId:ep?.profileFrame?.skuId,openedAt:X,context:ed,analyticsLocations:et});let eT=(0,u.z)({opacity:+(null!=em.interactionType),config:{duration:150}});l.useEffect(()=>{K?.(ec?.current)},[ec,K,ey?.skuId]);let ev=l.useRef(null),eC=i.id===n.id,eE=l.useMemo(()=>(0,C.A)(),[]),eN=e=>{$?.(),ea.dispatch(Z.jej.POPOUT_CLOSE),(0,w.openUserProfileModal)({sourceAnalyticsLocations:et,hideRestrictedProfile:!0,customStatusPrompt:eE,...ed,...e,appContext:J})},ek=ee?"div":p.l,eS=(0,T.GV)(),eU=k.Ay.useName(eo?.id,z,i);return(0,s.jsx)(I.f5,{value:et,children:(0,s.jsx)(S.of,{value:ed,openedAt:X,fetchStartedAt:ep?.fetchStartedAt,fetchEndedAt:ep?.fetchEndedAt,isLoaded:ep?.isLoaded,children:(0,s.jsx)(_.Hl,{value:em,children:(0,s.jsxs)(ek,{ref:ec,"aria-labelledby":eS,onClick:ei,children:[eh&&eA&&(0,s.jsx)(o.F,{component:"div",className:eP.g$,children:(0,s.jsx)(A.F,{children:(0,s.jsx)(eg,{userId:i.id,onSendWave:$})})}),(0,s.jsx)(x.A,{children:(0,s.jsx)(h.H,{id:eS,children:en.intl.format(en.t.KRe1Fk,{name:eU})})}),(0,s.jsx)(h.F,{children:(0,s.jsxs)(q.A,{user:i,displayProfile:ep,themeType:ez.d.POPOUT,className:t()(eP.BK,eO),isPrivate:ep?.private===!0,children:[ep?.private===!0&&(0,s.jsx)(V.A,{}),null!=em.interactionType&&(0,s.jsx)(a.animated.div,{style:eT,className:eP.tB}),(0,s.jsxs)(H.A,{children:[(0,s.jsx)(es,{shouldShowTooltip:null===em.interactionType,user:i,guildId:r,channelId:z,onClose:$,appContext:J}),(0,s.jsx)(W.A,{themeType:ez.d.POPOUT,user:i,setFriendRequestSent:ex,toastShowing:eh&&eA&&ef}),!eC&&(0,s.jsx)(el.yo,{user:i,guildId:r,viewProfileItem:Q?null:(0,s.jsx)(c.Dr,{id:"view-profile",label:en.intl.string(en.t["+Xp3hq"]),action:()=>{eN(),(0,U.Wn)({action:"PRESS_VIEW_PROFILE",analyticsLocations:et,...ed})}}),appContext:J})]}),(0,s.jsxs)("div",{className:eP.wx,children:[(0,s.jsx)(L.A,{user:i,displayProfile:ep,guildId:r,themeType:ez.d.POPOUT}),(0,s.jsx)(M.A,{userId:i.id,className:eP.oR,onClose:$}),(0,s.jsx)(G.A,{user:i,displayProfile:ep,guildId:r,channelId:z,themeType:ez.d.POPOUT,onOpenProfile:Q?void 0:eN}),(0,s.jsx)(er.A,{ref:ev,user:i,guildId:r,channelId:z,themeType:ez.d.POPOUT,onCloseProfile:$,prompt:eE})]}),(0,s.jsx)(eD,{user:i,currentUser:n,displayProfile:ep,guild:eo,isHoveringOrFocusing:null==em.interactionType&&ej,onOpenProfile:Q?void 0:eN,channelId:z,onClose:$}),(0,s.jsx)(eB.A,{user:i,guildId:r,channelId:z,onClose:$,appContext:J,disableAutoFocus:ee}),ep?.profileEffect!=null&&(0,s.jsx)(m.A,{skuId:ep?.profileEffect?.skuId,isHovering:eI}),null!=ey&&(0,s.jsx)(y.A,{frame:ey})]})})]})})})})}}