(("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__=("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__||[]).push([[90312,56209,67846,66642,47895,39105],{31957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},55639:(e,t,n)=>{var r=n(31957),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},23279:(e,t,n)=>{var r=n(13218),i=n(7771),a=n(14841),o=Math.max,l=Math.min;e.exports=function(e,t,n){var s,c,d,u,p,f,m=0,h=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=c;return s=c=void 0,m=t,u=e.apply(r,n)}function w(e){var n=e-f;return void 0===f||n>=t||n<0||g&&e-m>=d}function b(){var e=i();if(w(e))return I(e);p=setTimeout(b,function(e){var n=t-(e-f);return g?l(n,d-(e-m)):n}(e))}function I(e){return p=void 0,v&&s?y(e):(s=c=void 0,u)}function Z(){var e=i(),n=w(e);if(s=arguments,c=this,f=e,n){if(void 0===p)return function(e){return m=e,p=setTimeout(b,t),h?y(e):u}(f);if(g)return clearTimeout(p),p=setTimeout(b,t),y(f)}return void 0===p&&(p=setTimeout(b,t)),u}return t=a(t)||0,r(n)&&(h=!!n.leading,d=(g="maxWait"in n)?o(a(n.maxWait)||0,t):d,v="trailing"in n?!!n.trailing:v),Z.cancel=function(){void 0!==p&&clearTimeout(p),m=0,s=f=c=p=void 0},Z.flush=function(){return void 0===p?u:I(i())},Z}},7771:(e,t,n)=>{var r=n(55639);e.exports=function(){return r.Date.now()}},14841:e=>{e.exports=function(e){return e}},71499:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>x});var r=n(15785),i=n(64572),a=n(15861),o=n(23279),l=n.n(o),s=n(94436),c=n(93091),d=n(36239),u=n(13633),p=n(66813),f=n(61247),m=n(90568),h=n(94379);const g=({userIds:e})=>function(){var t=(0,a.Z)((function*(t,n){const i=(0,p.Z)(n(),["debouncedUserIsFollowing"],"userIds")||[],a=(0,r.Z)(new Set([].concat((0,r.Z)(i),(0,r.Z)(e))));return t({type:h.yu,payload:{selectPath:["debouncedUserIsFollowing"],data:{userIds:a}}})}));return function(e,n){return t.apply(this,arguments)}}(),v=()=>function(){var e=(0,a.Z)((function*(e){return e({type:h.Cg,payload:{selectPath:["debouncedUserIsFollowing"],data:{userIds:[]}}})}));return function(t){return e.apply(this,arguments)}}();function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const b={};let I;const Z=()=>function(){var e=(0,a.Z)((function*(e,t){const n=(0,u.default)(t(),"token"),i=((0,p.Z)(t(),["debouncedUserIsFollowing"],"userIds")||[]).filter((e=>{const t=b[e]||0;return Date.now()-t>=6e4}));if(!n||!i.length)return e({type:""});const a={headers:w(w({},(0,c.wU)()),{},{Authorization:`Bearer ${n}`})},o=["batchIsFollowing",i.join(":")],l=(0,d.Z)({endpoint:"/me/following"});i.forEach((e=>{l.searchParams.append("id",e)})),e({type:h.TA,payload:{selectPath:o}});try{let n=yield(0,s.ZP)(l.href,a);n.ok||(n=yield(0,f.Z)({response:n,dispatch:e,getState:t,fetchOptions:a,fetchUrl:l}));const c=(yield n.json())||[];c.forEach(((e={})=>{const{id:t}=e;b[t]=Date.now()}));const d=(0,m.j)({array:[].concat((0,r.Z)(i.map((e=>({id:e,isFollowing:!1})))),(0,r.Z)(c.map((e=>w(w({},e),{},{isFollowing:!0})))))});return e({type:h.JF,payload:{users:d}}),e(v()),e({type:h.Ij,payload:{selectPath:o}})}catch(t){return e({type:h.g$,payload:{selectPath:o,error:t}})}}));return function(t,n){return e.apply(this,arguments)}}(),x=({userId:e}={})=>function(){var t=(0,a.Z)((function*(t){return e?(t(g({userIds:[e]})),I||(I=l()((()=>t(Z())),1200)),I()):t({type:""})}));return function(e){return t.apply(this,arguments)}}()},42331:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(15861),i=n(62158),a=n(91457);const o=({userId:e,shouldRetry:t})=>function(){var n=(0,r.Z)((function*(n){if(!e)return n({type:""});if(void 0===e||"undefined"===e||24!==e.length)return n({type:""});const r={type:i.USER_ONLINE_STATUS,payload:{userId:e,shouldRetry:t}};(0,a.sendMessageToSW)(r)}));return function(e){return n.apply(this,arguments)}}()},45461:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Flip:()=>u,default:()=>g});var r=n(51721),i=n(64572),a=n(67294),o=n(45697),l=n.n(o),s=n(71893);const c="undefined"==typeof window,d=e=>a.isValidElement(e)?d(e.props.children):e;let u=function(e){function t(...t){var n;return n=e.call.apply(e,[this].concat(t))||this,(0,i.Z)(n,"state",{characterHeight:0}),(0,i.Z)(n,"element",null),(0,i.Z)(n,"nextTick",null),(0,i.Z)(n,"setRef",(e=>{n.element=e})),(0,i.Z)(n,"renderCharacterRibbon",(({activeCharacter:e,key:t})=>{const{ribbon:r,isDisabled:i}=n.props,{characterHeight:o}=n.state,l=r.indexOf(e);return l>=0?a.createElement(m,{key:t,characterIndex:l,characterHeight:o,isDisabled:i},r.map(((e,n)=>a.createElement(h,{key:`${t}-${n}`,characterHeight:o},e)))):a.createElement(f,{key:t},a.createElement(h,null,e))})),(0,i.Z)(n,"getCharacterHeight",(()=>{if(n.element&&!c){const e=window.getComputedStyle(n.element)["line-height"].replace("px","");n.setState({characterHeight:Number(e)})}})),(0,i.Z)(n,"handleResize",(()=>{n.getCharacterHeight()})),n}(0,r.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){c||(window.addEventListener("resize",this.handleResize),this.nextTick=setTimeout((()=>{this.getCharacterHeight()})))},n.componentWillUnmount=function(){c||window.removeEventListener("resize",this.handleResize),clearTimeout(this.nextTick)},n.render=function(){const{children:e}=this.props,{characterHeight:t}=this.state,n=a.isValidElement(e),r=n?d(e).split(""):e.split(""),i=a.createElement(p,{ref:this.setRef,characterHeight:t},r.map(((e,t)=>this.renderCharacterRibbon({activeCharacter:e,key:t}))));return n?a.cloneElement(e,{children:i}):i},t}(a.PureComponent);u.propTypes={children:l().node.isRequired,ribbon:l().array,isDisabled:l().bool},u.defaultProps={ribbon:["0","1","2","3","4","5","6","7","8","9"],isDisabled:!1};const p=s.default.div.attrs((({characterHeight:e})=>({style:{height:`${e}px`}}))).withConfig({displayName:"Flip__StyledFlip",componentId:"sc-1yrqnx2-0"})(["overflow-y:hidden;"]),f=s.default.div.withConfig({displayName:"Flip__Separator",componentId:"sc-1yrqnx2-1"})(["display:inline-block;"]),m=s.default.div.attrs((({characterIndex:e=0,characterHeight:t=0,isDisabled:n})=>({style:{transform:`translateY(-${e*t}px)`,transition:n?"initial":"transform 0.7s"}}))).withConfig({displayName:"Flip__Ribbon",componentId:"sc-1yrqnx2-2"})(["display:inline-block;position:relative;vertical-align:top;text-align:center;"]),h=s.default.div.attrs((({characterHeight:e})=>({style:{height:`${e}px`}}))).withConfig({displayName:"Flip__Character",componentId:"sc-1yrqnx2-3"})([""]),g=u},180:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LinkWithLanguage:()=>p,default:()=>f});var r=n(87462),i=n(44925),a=n(67294),o=n(45697),l=n.n(o),s=n(79655),c=n(60712),d=n(53777);const u=["to"],p=(0,a.forwardRef)(((e,t)=>{let{to:n=""}=e,o=(0,i.Z)(e,u);const{i18n:l}=(0,c.$G)(),p=l.language,f=(0,a.useMemo)((()=>(0,d.Z)({to:n,language:p})),[p,n]);return a.createElement(s.rU,(0,r.Z)({ref:t,to:f},o))}));p.displayName="LinkWithLanguage",p.propTypes={to:l().oneOfType([l().string,l().object])};const f=p},35135:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LiveStreamUser:()=>I,default:()=>O});var r=n(51721),i=n(64572),a=n(67294),o=n(45697),l=n.n(o),s=n(71893),c=n(60712),d=n(56973),u=n(66914),p=n(45461),f=n(180),m=n(12001);const h=n.p+"static/img/ic-streaming-view-xs.65a19c2e.svg";var g=n(88024),v=n(93924),y=n(56681);const w=(0,y.rE)(),b=(0,y.lA)();let I=function(e){function t(...t){var n;return n=e.call.apply(e,[this].concat(t))||this,(0,i.Z)(n,"handleToUserProfile",(e=>{const{isPrivateShowUnlocked:t,isPrivateStreamUnlocked:r,leaveLiveStreams:i,addModal:a}=n.props;if(!(w&&e.ctrlKey||b&&e.metaKey))return t||r?(e.preventDefault(),a({id:"LeaveLivestreamToUserProfileConfirmModal"})):i()})),(0,i.Z)(n,"renderOfflineUser",(()=>{const{t:e,userId:t,displayedUsername:r,username:i}=n.props;return a.createElement(k,null,t&&a.createElement(Z,{to:`/user/${t}`,onClick:n.handleToUserProfile,alt:r},a.createElement(d.default,{id:t,size:72})),a.createElement(L,null,a.createElement(Z,{to:`/user/${t}`,onClick:n.handleToUserProfile,alt:r,"data-element_id":g.G1.Detail.ContentDetailName,"data-tracking_payload":{"user.id":t,"user.username":i}},r)),a.createElement(N,{to:`/user/${t}`,"data-element_id":g.G1.LiveStream.ButtonOfflineToProfile,"data-tracking_payload":{"user.id":t}},e("view_profile",{ns:v.TranslationNamespace.LIVESTREAM})))})),(0,i.Z)(n,"renderOnlineUser",(()=>{const{displayedUsername:e,username:t,userId:r,isAuthed:i,login:o,isFollowing:l,viewers:s,followUser:c}=n.props;return a.createElement(x,{isFollowing:l},r&&a.createElement(Z,{to:`/user/${r}`,onClick:n.handleToUserProfile,alt:e},a.createElement(d.default,{id:r,size:32})),e&&a.createElement(U,null,a.createElement(Z,{to:`/user/${r}`,onClick:n.handleToUserProfile,alt:e,"data-element_id":g.G1.Detail.ContentDetailName,"data-tracking_payload":{"user.id":r,"user.username":t}},a.createElement(S,null,e)),a.createElement(_,null,a.createElement(C,{src:h,alt:"Live view"}),a.createElement(P,null,a.createElement(p.default,null,s)))),!i&&a.createElement(E,{onClick:()=>{o()}},a.createElement("img",{src:m,alt:"Follow User"})),i&&!l&&a.createElement(E,{"data-element_id":g.G1.All.ButtonFollow,"data-tracking_payload":{"user.id":r},onClick:()=>{c({userId:r})}},a.createElement("img",{src:m,alt:"Follow User"})))})),n}(0,r.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){const{userId:e,username:t,fetchUser:n,subscribeOnlineStatus:r,fetchUserIsFollowing:i}=this.props;this.nextTick=setTimeout((()=>{e&&!t&&n({userId:e}),r({userId:e,shouldRetry:!0}),i({userId:e})}))},n.componentWillUnmount=function(){clearTimeout(this.nextTick)},n.render=function(){const{offline:e}=this.props;return e?this.renderOfflineUser():this.renderOnlineUser()},t}(a.PureComponent);I.propTypes={t:l().func.isRequired,isAuthed:l().bool,userId:l().string,username:l().string,displayedUsername:l().string,viewers:l().string,isFollowing:l().bool,isPrivateShowUnlocked:l().bool,isPrivateStreamUnlocked:l().bool,login:l().func,fetchUser:l().func,followUser:l().func,offline:l().bool,leaveLiveStreams:l().func,fetchUserIsFollowing:l().func,addModal:l().func,subscribeOnlineStatus:l().func},I.defaultProps={userId:"",username:"",displayedUsername:"",viewers:"-",isFollowing:!1,isPrivateShowUnlocked:!1,isPrivateStreamUnlocked:!1,login:()=>null,fetchUser:()=>null,followUser:()=>null,offline:!1,leaveLiveStreams:()=>null,fetchUserIsFollowing:()=>null,addModal:()=>null,subscribeOnlineStatus:()=>null};const Z=(0,s.default)(f.LinkWithLanguage).withConfig({displayName:"LiveStreamUser__UserProfileLink",componentId:"sc-11wppvl-0"})([""]),x=s.default.div.withConfig({displayName:"LiveStreamUser__StyledLiveStreamUser",componentId:"sc-11wppvl-1"})(["max-width:36.8%;max-width:240px;min-width:",";display:inline-flex;flex-direction:row;align-items:center;height:40px;padding:4px;border-radius:22px;background-color:rgba(35,35,35,0.4);overflow:hidden;"],(({isFollowing:e})=>e?"118px":"138px")),U=s.default.div.withConfig({displayName:"LiveStreamUser__UserInfo",componentId:"sc-11wppvl-2"})(["flex:1;min-width:70px;margin:0 4px;color:#ffffff;text-align:left;overflow:hidden;"]),S=s.default.h2.withConfig({displayName:"LiveStreamUser__Username",componentId:"sc-11wppvl-3"})(["margin:0;font-size:12px;font-weight:normal;color:#ffffff;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),_=s.default.div.withConfig({displayName:"LiveStreamUser__StreamingView",componentId:"sc-11wppvl-4"})(["height:14px;font-size:12px;margin-top:4px;display:flex;align-items:center;"]),C=s.default.img.withConfig({displayName:"LiveStreamUser__StreamingViewIcon",componentId:"sc-11wppvl-5"})([""]),P=s.default.div.withConfig({displayName:"LiveStreamUser__StreamingViewText",componentId:"sc-11wppvl-6"})(["opacity:0.5;margin-left:4px;font-size:12px;line-height:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),E=s.default.button.withConfig({displayName:"LiveStreamUser__FollowButton",componentId:"sc-11wppvl-7"})([""," display:block;width:20px;height:20px;min-width:20px;outline:0;background-color:#00d2be;border-radius:50%;& > img{width:100%;height:100%;}"],u.Z),k=s.default.div.withConfig({displayName:"LiveStreamUser__StyledLiveStreamUserOffline",componentId:"sc-11wppvl-8"})(["display:flex;align-items:center;justify-content:center;flex-direction:column;height:100%;"]),L=s.default.div.withConfig({displayName:"LiveStreamUser__OfflineUsername",componentId:"sc-11wppvl-9"})(["margin-top:12px;margin-bottom:16px;font-size:14px;font-weight:600;color:#ffffff;"]),N=(0,s.default)(f.LinkWithLanguage).withConfig({displayName:"LiveStreamUser__GoToProfileButton",componentId:"sc-11wppvl-10"})(["display:block;width:140px;height:24px;background-color:#00d2be;border-radius:24px;font-size:14px;color:#ffffff;display:flex;align-items:center;justify-content:center;"]),O=(0,c.Zh)()(I)},6095:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>w});var r=n(45007),i=n(81155),a=n(13633),o=n(8348),l=n(5471),s=n(55774),c=n(33862),d=n(66813),u=n(1599),p=n(92890),f=n(13704),m=n(29533),h=n(71499),g=n(8852),v=n(42331),y=n(35135);const w=(0,r.$j)(((e,{streamId:t})=>{const n=(0,l.ZP)(e,[t],"preset"),r=(0,a.default)(e,"id"),u=(0,l.ZP)(e,[t,"privateShow"],"fundingId"),p=(0,c.Z)(e,t,u,r),f=(0,d.Z)(e,["liveStream","paid",t],"isPrivateStreamUnlocked");return{username:(0,o.Z)(e,t,"username"),displayedUsername:(0,i.Z)(e,t,"displayNameFirst"),viewers:(0,s.Z)(e,t,n),isFollowing:(0,o.Z)(e,t,"isFollowing"),isAuthed:!!(0,a.default)(e,"id"),isPrivateShowUnlocked:p,isPrivateStreamUnlocked:f}}),(e=>({login:()=>e((0,u.Z)()),fetchUser:({userId:t})=>e((0,p.Z)({id:t})),followUser:({userId:t})=>e((0,f.Z)({id:t})),fetchUserIsFollowing:({userId:t})=>e((0,h.ZP)({userId:t})),leaveLiveStreams:()=>e((0,m.Z)()),addModal:({id:t})=>e((0,g.default)({id:t})),subscribeOnlineStatus:({userId:t,shouldRetry:n})=>e((0,v.Z)({userId:t,shouldRetry:n}))})))(y.default)},56973:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(45007),i=n(38045),a=n(8348),o=n(13633);const l=(0,r.$j)(((e,{id:t})=>{const n=(0,o.default)(e,"id");return{meId:n,username:t?t===n?(0,o.default)(e,"username"):(0,a.Z)(e,t,"username"):null}}))(i.default)},53826:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=({number:e})=>{if(isNaN(e)||null===e)return null;const t=e.toString();if(t.includes(".")){const[e,n=""]=t.split(".");return[e.replace(/\B(?=(\d{3})+(?!\d))/g,","),n].join(".")}return t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}},55774:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(78392),i=n(5471),a=n(53826),o=n(42362);const l=(0,r.Z)(((e,t)=>(0,i.ZP)(e,[t,"presets",o.bS],"viewers")),((e,t)=>(0,i.ZP)(e,[t,"presets",o.Gj],"viewers")),((e,t)=>{const n=e+t;return Number.isNaN(n)?"-":(0,a.Z)({number:n})}))(((e,t)=>`${t}`))},81155:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(11650),i=n(78392),a=n(22826),o=n(8348),l=n(13633);const s=(0,i.Z)((e=>1===(0,a.default)(e,r.SKZ)),((e,t)=>c(e,t,"username")),((e,t)=>c(e,t,"displayName")),((e,t,n)=>n),((e,t,n,r)=>{const i=t?`@${t}`:void 0;switch(r){case"displayName":return e?n:void 0;case"displayNameFirst":return e&&n?n:i;default:return i}}))(((e,t,n)=>`${t}:${n}`)),c=(0,i.Z)((e=>(0,l.default)(e,"id")),((e,t)=>t),((e,t,n)=>(0,l.default)(e,n)),((e,t,n)=>(0,o.Z)(e,t,n)),((e,t,n,r)=>null!=e&&e===t?n:r))(((e,t,n)=>`${t}:${n}`)),d=s},12001:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIHN0cm9rZT0iI0ZGRiIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPgogICAgICAgIDxwYXRoIGQ9Ik0xMCAzLjc1djEyLjVNMTYuMjUgMTBIMy43NSIvPgogICAgPC9nPgo8L3N2Zz4K"}}]);
//# sourceMappingURL=container-LiveStreamUser-js.9a841cd9.js.map