Build 574548stable
Module 506326
6,613 characters · in no known chunkDependencies
Lazily required by (0)none
Requires (34)
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{$X:()=>es,K7:()=>et,MK:()=>J,N5:()=>j,R_:()=>X,Rq:()=>eo,Xr:()=>en,Xy:()=>z,Y8:()=>ei,Zc:()=>Z,er:()=>K,fM:()=>$,fg:()=>er,iT:()=>eu,iq:()=>q,mG:()=>el,sp:()=>ee,tR:()=>Q,zi:()=>ea});var i,r=n(627968),s=n(64700),a=n(503698),o=n.n(a),l=n(989349),u=n.n(l),c=n(681154),d=n(974690),_=n(379834),h=n(990078),f=n(834730),E=n(983851),p=n(661531),m=n(183623),g=n(323384),A=n(687966),I=n(177953),T=n(432017),S=n(246913),N=n(291747),C=n(417270),y=n(768622),O=n(369606),R=n(825860),v=n(605323),b=n(748562),L=n(306788),D=n(47167),w=n(927813),P=n(403362),M=n(935208),x=n(20805),U=n(202195),k=n(583846),G=n(299846),V=n(693879);n(424994);var F=n(375708),B=n(164123);let H={[c.ContentInventoryEntryType.TOP_ARTIST]:[ei],[c.ContentInventoryEntryType.PLAYED_GAME]:[q,Z,z,es,Q,et,er,ee,J],[c.ContentInventoryEntryType.TOP_GAME]:[en],[c.ContentInventoryEntryType.WATCHED_MEDIA]:[ea,eo],[c.ContentInventoryEntryType.LAUNCHED_ACTIVITY]:[q,Z,z,es,er,J]};var j=((i={})[i.CARD=0]="CARD",i[i.POPOUT=1]="POPOUT",i[i.STREAMING_POPOUT=2]="STREAMING_POPOUT",i[i.GAME_PROFILE=3]="GAME_PROFILE",i[i.USER_PROFILE=4]="USER_PROFILE",i[i.EMBED=5]="EMBED",i[i.LEADERBOARD_POPOUT=6]="LEADERBOARD_POPOUT",i[i.OVERLAY=7]="OVERLAY",i[i.FRIENDS_POPOUT=8]="FRIENDS_POPOUT",i[i.APP_LAUNCHER=9]="APP_LAUNCHER",i[i.VOICE_USER_POPOUT=10]="VOICE_USER_POPOUT",i);let W=s.createContext({});function Y(){return s.useContext(W)}function K(e){let{children:t,...n}=e;return(0,r.jsx)("div",{className:B.fC,...n,children:t})}function $(e){let{Icon:t,text:n,iconColor:i,tooltipText:s,showTooltip:a}=e,{defaultTextColor:o,defaultIconColor:l,location:u}=Y();return(0,r.jsx)(h.m,{text:s,shouldShow:a,children:(0,r.jsxs)(K,{children:[(0,r.jsx)(t,{size:"xxs",color:i??l}),(0,r.jsx)(f.E,{variant:"text-xs/normal",color:o,className:B.KT,scaleFontToUserSetting:5===u,children:n})]})})}function z(e){let{entry:t}=e,{channel:n}=(0,U.A)(t),{location:i}=Y(),s=(0,D.Ay)(n);return null==n||(0,P.S1)(i,[1,2,3,4])?null:(0,r.jsx)($,{Icon:E.H,text:s})}function q(e){let{entry:t,hovered:n}=e,{defaultTextColor:i,defaultIconColor:s,location:a}=Y(),o=(0,k.Hd)(t)&&(0,P.S1)(a,[0,4,7,9]),l=o?p.A.colors.TEXT_FEEDBACK_POSITIVE:s,{streamPreviewUrl:u}=(0,U.A)(t),c=null!=u?m.F:(0,x.yl)(t)?g.k:A._;return(0,r.jsxs)(K,{children:[(0,r.jsx)(c,{size:"xxs",color:l}),(0,r.jsx)(V.A,{entry:t,textColor:o?"text-feedback-positive":i,hovered:n,scaleFontToUserSetting:5===a})]})}function Z(e){let{entry:t}=e,{defaultTextColor:n,defaultIconColor:i}=Y(),{state:s,party:a}=(0,G.u)(t),o=(0,k.gF)(s,a);return null==o?null:(0,r.jsxs)(K,{children:[(0,r.jsx)(I.n,{size:"xxs",color:i}),(0,r.jsx)(f.E,{variant:"text-xs/normal",color:n,lineClamp:1,children:o})]})}function X(e){let{entry:t,hovered:n}=e,{defaultTextColor:i,defaultIconColor:s,location:a}=Y(),o=(0,k.Hd)(t)&&(0,P.S1)(a,[0,4]),l=o?p.A.colors.TEXT_FEEDBACK_POSITIVE:s;return(0,r.jsxs)("div",{className:B.fC,children:[(0,r.jsx)(T.T,{size:"xxs",color:l}),(0,r.jsx)(V.A,{entry:t,textColor:o?"text-feedback-positive":i,hovered:n})]})}function Q(e){let{entry:t}=e,{location:n}=Y(),i=(0,P.S1)(n,[0,3])?p.A.colors.STATUS_POSITIVE:void 0;return(0,k.Rf)(t)?(0,r.jsx)($,{Icon:S.P,text:F.intl.string(F.t.keY6mW),iconColor:i}):null}function J(e){let{entry:t}=e,{location:n}=Y();if(!(0,k.L7)(t))return null;let i=(0,k.JM)(t),{text:s,tooltipText:a}=(0,k.Pj)(t);return null==s?null:(0,r.jsx)($,{Icon:N.x,text:s,tooltipText:a,showTooltip:0===n&&!i})}function ee(e){let{entry:t}=e,{location:n}=Y(),i=0!==n,s=(0,k.KH)(t);if(null==s)return null;let a=(0,k.us)(s);return(0,r.jsx)($,{Icon:C.m,showTooltip:!i,tooltipText:a,text:i?a:F.intl.string(F.t.adnLsB)})}function et(e){let{entry:t}=e,{location:n}=Y(),i=(0,k.iy)(t);return(0,k.BZ)(t)?(0,r.jsx)($,{Icon:y.g,showTooltip:0===n,text:F.intl.formatToPlainString(F.t["Klie/P"],{days:i}),tooltipText:F.intl.formatToPlainString(F.t.PwMe0s,{days:i})}):null}function en(e){let{entry:t}=e,{location:n}=Y(),i=0!==n,s=(0,k.ty)(t);if(null==s)return null;let a=i?F.t.C0AxoR:F.t.SDRHgr;return(0,r.jsx)($,{Icon:O.O,text:(0,r.jsxs)(r.Fragment,{children:[F.intl.string(F.t["/50eHi"]),i?" \u2014 ":": ",F.intl.format(a,{hours:Math.round(s/w.A.Seconds.HOUR)})]})})}function ei(e){let{entry:t}=e,{location:n}=Y(),i=(0,k.Pv)(t,d.K.AGGREGATE_COUNT)?.count;if(null==i)return null;let s=(0,P.S1)(n,[1,2,5])?F.intl.formatToPlainString(F.t.HtifnG,{count:i}):F.intl.formatToPlainString(F.t["jq/Bmu"],{count:i});return(0,r.jsx)($,{Icon:O.O,text:s})}function er(e){let{entry:t}=e,{location:n}=Y();if(3===n)return null;let i=(0,k.CZ)(t);return null==i||i===_.m.TRENDING_TYPE_UNSPECIFIED?null:(0,r.jsx)($,{Icon:R.Y,text:F.intl.string(F.t.kAlUsy)})}function es(e){let{entry:t}=e,{location:n}=Y();if(3===n)return null;let i=M.default.extractTimestamp(t.extra.application_id);return u()().diff(u()(i),"days")>7?null:(0,r.jsx)($,{Icon:v.f,text:F.intl.string(F.t.vYuyWf)})}function ea(e){let{entry:t,hovered:n}=e,{defaultTextColor:i,defaultIconColor:s,location:a}=Y(),o=(0,k.Hd)(t)&&4===a,l=o?p.A.colors.TEXT_FEEDBACK_POSITIVE:s;return(0,r.jsxs)("div",{className:B.fC,children:[(0,r.jsx)(b.U,{size:"xxs",color:l}),(0,r.jsx)(V.A,{entry:t,textColor:o?"text-feedback-positive":i,hovered:n})]})}function eo(e){let{entry:t}=e,n=(0,k.kR)(t.extra.media_assets_large_text);return null==n?null:(0,r.jsx)($,{Icon:L.K,text:n})}function el(e){let t,{location:n,children:i,className:s}=e;return t=(0,P.S1)(n,[1,5,6])?{defaultTextColor:"content-inventory-overlay-text-secondary",defaultIconColor:p.A.colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY}:2===n?{defaultTextColor:"interactive-text-default"}:3===n?{defaultTextColor:"text-muted"}:4===n?{defaultTextColor:"text-subtle",defaultIconColor:p.A.colors.TEXT_SUBTLE}:{defaultTextColor:"text-subtle"},(0,r.jsx)(W.Provider,{value:{location:n,...t},children:(0,r.jsx)("div",{className:o()(B.cV,{[B.u3]:0===n,[B.BQ]:(0,P.S1)(n,[1,2,10]),[B.DY]:3===n},s),children:i})})}function eu(e){let{entry:t,location:n,className:i}=e,s=function(e){switch(e.content_type){case c.ContentInventoryEntryType.TOP_ARTIST:return H[e.content_type].map((t,n)=>(0,r.jsx)(t,{entry:e},n));case c.ContentInventoryEntryType.PLAYED_GAME:return H[e.content_type].map((t,n)=>(0,r.jsx)(t,{entry:e},n));case c.ContentInventoryEntryType.TOP_GAME:return H[e.content_type].map((t,n)=>(0,r.jsx)(t,{entry:e},n));case c.ContentInventoryEntryType.WATCHED_MEDIA:return H[e.content_type].map((t,n)=>(0,r.jsx)(t,{entry:e},n));case c.ContentInventoryEntryType.LAUNCHED_ACTIVITY:return H[e.content_type].map((t,n)=>(0,r.jsx)(t,{entry:e},n));default:return null}}(t);return null==s?null:(0,r.jsx)(el,{location:n,className:i,children:s})}}