Loading
function(e,t,n){var i=n(477900),l=n(582128),a=n(503698),s=n.n(a),r=n(554146),o=n(646514),d=n(866665),c=n(939249),u=n(323384),h=n(43990),p=n(285796),m=n(192308),A=n(231723),f=n(825484),g=n(821609),x=n(283973),C=n(834730),y=n(789645),j=n(964486),I=n(994428),N=n(855446),v=n(793574),E=n(688810),b=n(975412),S=n(392054),_=n(826673),T=n(757293),R=n(129230),O=n(272812),P=n(652215),L=n(792996),M=n(253802),w=n(867010);function U(e){let{channel:t,inPopout:n,handleClose:l}=e,{analyticsLocations:a,newestAnalyticsLocation:r}=(0,E.Ay)(v.A.VC_TILE_ACTIVITY_SHELF_BUTTON);return(0,i.jsx)(E.f5,{value:a,children:(0,i.jsxs)(O.A,{className:M.zr,children:[(0,i.jsx)(d.m,{asContainer:!0,text:L.intl.string(L.t.qJvTKQ),children:(0,i.jsx)(c.D,{onClick:()=>{(0,b.A)({context:null!=t?{type:"channel",channel:t}:{type:"contextless"},openInPopout:n,analyticsLocation:r})},className:M.F1,children:(0,i.jsx)("div",{className:M.zc,children:(0,i.jsx)(u.k,{size:"custom",color:"currentColor",width:40,height:40})})})}),(0,i.jsx)(h.N,{theme:P.NJ8.DARK,children:e=>(0,i.jsx)(c.D,{onClick:l,className:s()(e,M.lg),children:(0,i.jsx)(p.a,{size:"md",color:"currentColor",className:M.yP,secondaryColor:o.A.colors.INTERACTIVE_TEXT_DEFAULT.css})})})]})})}function D(e){let{channel:t,guild:a,inPopout:r,activitiesEnabled:o=!0}=e;l.useEffect(()=>{R.default.track(P.HAw.VC_TILE_ACTIVITIES_ENTRY_POINT_VIEWED,{tile_type:"activity invite",n_participants:1})},[]);let{analyticsLocations:d,newestAnalyticsLocation:c}=(0,E.Ay)(v.A.VC_TILE_ACTIVITY_INVITE);function p(){(0,m.mM)(async()=>{let{default:e}=await Promise.all([n.e(683621),n.e(711162),n.e(919170),n.e(159957),n.e(728136),n.e(680029),n.e(966623)]).then(n.bind(n,660194));return n=>(0,i.jsx)(e,{...n,guild:a,channel:t,source:P.PE1.ACTIVITY_ENTRY_POINT_TILE})},{contextKey:r?"popout":A.SY})}function C(){(0,b.A)({context:null!=t?{type:"channel",channel:t}:{type:"contextless"},openInPopout:r,analyticsLocation:c})}return(0,i.jsx)(E.f5,{value:d,children:(0,i.jsx)(h.N,{disableAdaptiveTheme:!0,theme:P.NJ8.ONYX,children:e=>(0,i.jsxs)(O.A,{className:s()(M.zr,M.co,e),children:[(0,i.jsx)("img",{src:w,className:M.Qw,alt:""}),(0,i.jsxs)(f.e,{justify:"center",align:"center",children:[(0,i.jsx)(g.$,{variant:"secondary",icon:x.R,text:L.intl.string(L.t["EE+P0H"]),onClick:p}),o&&(0,i.jsx)(g.$,{variant:"secondary",icon:u.k,text:L.intl.string(L.t.qnFavR),onClick:C})]})]})})})}function V(e){let{channel:t,guild:n,handleClose:a,width:o,userParticipantCount:d}=e;(0,j.Ay)(()=>{R.default.track(P.HAw.VC_TILE_ACTIVITIES_ENTRY_POINT_VIEWED,{tile_type:"activity suggestion",n_participants:d})});let u=(0,I.A)({guildId:n.id}).slice(0,3),{analyticsLocations:h}=(0,E.Ay)(v.A.VC_TILE_ACTIVITY_SUGGESTION),p=l.useMemo(()=>({channel:t,type:"channel"}),[t]);return(0,i.jsx)(E.f5,{value:h,children:(0,i.jsxs)(O.A,{className:M.zr,children:[o>300?(0,i.jsx)(C.E,{className:M.R_,variant:o>550?"body-md/semibold":"body-sm/semibold",children:L.intl.string(L.t["7BKMcG"])}):null,(0,i.jsx)("div",{className:s()(M.Di,{[M.qy]:o<=300}),children:u.map(e=>(0,i.jsx)(N.C,{context:p,activityItem:e,aspectRatio:N.C.AspectRatio.SIXTEEN_BY_NINE,animatedDivClass:M.KU,commandOrigin:S.iw.VOICE_TILE_ACTIVITY_SUGGESTIONS},e.application.id))}),(0,i.jsxs)(c.D,{className:M.HI,onClick:function(){R.default.track(P.HAw.VC_TILE_ACTIVITIES_ENTRY_POINT_CLOSED,{tile_type:"activity suggestion",close_type:"permanent",n_participants:d}),(0,_.Dr)(r.M.VC_TILE_ACTIVITIES_ENTRY_POINT)},children:[(0,i.jsx)(T.A,{}),(0,i.jsx)(C.E,{variant:"body-sm/medium",children:L.intl.string(L.t["5E9SB9"])})]}),(0,i.jsx)(c.D,{className:M.cG,onClick:function(){R.default.track(P.HAw.VC_TILE_ACTIVITIES_ENTRY_POINT_CLOSED,{tile_type:"activity suggestion",close_type:"temporary",n_participants:d}),a()},children:(0,i.jsx)(y.P,{size:"md",color:"currentColor",className:M.b})})]})})}n.d(t,{},{y:function(e){let{channel:t,guild:n,width:l,inPopout:a,handleClose:s,userParticipantCount:r,activitiesEnabled:o=!0}=e;return l<250?(0,i.jsx)(U,{channel:t,guild:n,width:l,inPopout:a,handleClose:s,userParticipantCount:r}):r>1?(0,i.jsx)(V,{channel:t,guild:n,width:l,inPopout:a,handleClose:s,userParticipantCount:r}):(0,i.jsx)(D,{channel:t,guild:n,width:l,inPopout:a,activitiesEnabled:o})}})}