티스토리 수익 글 보기

티스토리 수익 글 보기

!function(){try{var e=”undefined”!=typeof window?window:”undefined”!=typeof global?global:”undefined”!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=”1468bceb-e473-442d-97bb-f2c756e8c477″,e._sentryDebugIdIdentifier=”sentry-dbid-1468bceb-e473-442d-97bb-f2c756e8c477″)}catch(e){}}(),(self.webpackChunktwitch_twilight=self.webpackChunktwitch_twilight||[]).push([[3943,4531,11450,17364,26468,28119,33252,33283,34726,44567,58253,65242,79114],{398217:function(){},648634:function(){},704636:function(e,n,i){“use strict”;i.d(n,{Q:function(){return o}});var t=i(474848),a=(i(296540),i(859406)),r=i(413647),o=(0,i(203340).z)(“LoginRequiredPage”,{autoReportInteractive:!0,destination:”loginRequired”,location:”loginRequired”})((function(){return(0,t.jsx)(r.A,{message:(0,a.hw)(“You must be logged in to view this page”,”LoginRequiredPage”)})}))},282008:function(e,n,i){“use strict”;i.d(n,{e:function(){return h}});var t=i(331635),a=i(474848),r=i(959340),o=i(914421),s=i(312663),l=i(588702),d=i(79004),u=i(902418),c=i(636367),m=i(296540),v=i(859406),p=i(684990),h=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.renderHeader=function(){var e=n.props.subtitle?(0,a.jsxs)(r.P,{display:o.nl.Flex,flexDirection:o.bo.Column,justifyContent:o.A9.Center,alignItems:o.k2.Center,children:[(0,a.jsx)(r.P,{children:(0,a.jsx)(s.N,{type:l.M2.H6,color:o.Q1.Alt,bold:!0,children:n.props.title})}),(0,a.jsx)(r.P,{children:(0,a.jsx)(s.N,{type:l.M2.P,color:o.Q1.Alt2,children:n.props.subtitle})})]}):(0,a.jsx)(s.N,{type:l.M2.H6,color:o.Q1.Alt,bold:!0,children:n.props.title});return(0,a.jsxs)(r.P,{className:”dropdown-menu-header”,background:o.VS.Alt,display:o.nl.Flex,alignItems:o.k2.Center,borderBottom:!0,children:[(0,a.jsx)(r.P,{display:o.nl.Flex,alignItems:o.k2.Center,flexGrow:1,flexShrink:1,fullWidth:!0,justifyContent:o.A9.Start,children:n.props.onBackClick&&(0,a.jsx)(r.P,{className:”back-button”,children:(0,a.jsx)(d.a2,{“aria-label”:(0,v.hw)(“Back button”,”DropDownMenuHeader”),size:u.f.Small,icon:p.fj,onClick:n.props.onBackClick})})}),(0,a.jsx)(r.P,{display:o.nl.Flex,alignItems:o.k2.Center,flexGrow:1,flexShrink:0,justifyContent:o.A9.Center,children:e}),(0,a.jsx)(r.P,{display:o.nl.Flex,alignItems:o.k2.Center,flexGrow:1,flexShrink:1,fullWidth:!0,justifyContent:o.A9.End})]})},n}return(0,t.__extends)(n,e),n.prototype.render=function(){return this.props.onClick?(0,a.jsx)(c.tD,{onClick:this.props.onClick,children:this.renderHeader()}):this.renderHeader()},n}(m.Component)},844023:function(e,n,i){“use strict”;i.d(n,{Es:function(){return t},Vq:function(){return h},MD:function(){return m},T4:function(){return p},UJ:function(){return v}});var t,a=i(331635),r=i(474848),o=i(246942),s=i.n(o),l=i(296540),d=i(192941),u=i(265827);!function(e){e[e.Resize=0]=”Resize”,e[e.Scroll=1]=”Scroll”,e[e.Wheel=2]=”Wheel”}(t||(t={}));var c=(0,u.q)(“ScrollableProvider”,{registerReceiver:function(){return function(){return null}},requestVisibilityCheck:function(){},getScrollContent:function(){return null},scrollToTop:function(){},yScrollTo:function(){}}),m=c.context,v=c.withContext,p=function(){return(0,l.useContext)(m)};var h=l.forwardRef((function(e,n){var i=e.contentClassName,o=p(),u=l.useRef(null),c=(0,l.useCallback)((function(){return u.current}),[]),v=function(e){var n=e.ignoreParentScrollEvents,i=e.parent,t=e.scrollContent,r=l.useRef([]),o=l.useRef(new WeakSet),s=(0,l.useCallback)((function(e,n){r.current.length<1||requestAnimationFrame((function(){if(t.current){var i=r.current;if(n&&(i=i.filter((function(e){return!o.current.has(e)}))),i.length){var a=t.current.getBoundingClientRect();e&&(e.offset=t.current.scrollTop),i.forEach((function(i){i.checkVisible(a,e),n&&o.current.add(i)}))}}}))}),[t]),d=l.useRef(!1);l.useEffect((function(){t.current&&!d.current&&(d.current=!0,s(void 0,!0))}));var u=(0,l.useCallback)((function(e){t.current&&s((0,a.__assign)((0,a.__assign)({},e),{offset:t.current.scrollTop}))}),[s,t]),c=(0,l.useCallback)((function(e,n){requestAnimationFrame((function(){var i=t.current;if(i){if(n&&o.current.has(e))return;var a=i.getBoundingClientRect();e.checkVisible(a),o.current.add(e)}}))}),[t]);return{registerReceiver:(0,l.useCallback)((function(e){n||i.registerReceiver(e);var t=r.current;return t.push(e),c(e,!0),function(){var n=t.indexOf(e);t.splice(n,1)}}),[n,i,c]),requestVisibilityCheck:c,handleEvent:u}}({parent:o,scrollContent:u,ignoreParentScrollEvents:e.ignoreParentScrollEvents}),h=v.handleEvent,f=v.registerReceiver,g=v.requestVisibilityCheck,k=(0,l.useCallback)((function(e){h({type:t.Wheel,wheelEvent:e})}),[h]),y=(0,l.useCallback)((function(){h({type:t.Scroll})}),[h]);l.useEffect((function(){var e=function(){h({type:t.Resize})};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}));var S=(0,l.useCallback)((function(e){var n;null===(n=u.current)||void 0===n||n.scrollTo({top:e})}),[]),b=(0,l.useCallback)((function(){S(0)}),[S]),_=(0,l.useCallback)((function(){u.current&&u.current.scrollTo({top:u.current.scrollHeight})}),[]);l.useEffect((function(){var e=u.current;if(e&&i)return e.classList.add(i),function(){null==e||e.classList.remove(i)}}),[i]);var x=(0,l.useMemo)((function(){return{registerReceiver:f,requestVisibilityCheck:g,getScrollContent:c,scrollToTop:b,yScrollTo:S}}),[f,g,c,b,S]),C=l.useMemo((function(){return{get scrollContent(){return u.current},scrollToBottom:_,scrollToTop:b}}),[_,b]);return l.useImperativeHandle(n,(function(){return C}),[C]),(0,r.jsx)("div",(0,a.__assign)({className:s()("scrollable-area",e.className),style:{overflowX:e.suppressScrollX?"hidden":void 0,overflowY:e.suppressScrollY?"hidden":void 0,scrollbarWidth:e.scrollbarWidth},ref:u,onScroll:y,onWheel:k},(0,d.F)(e),{children:(0,r.jsx)(m.Provider,{value:x,children:e.children})}))}))},469101:function(e,n,i){"use strict";i.d(n,{g:function(){return a}});var t=i(296540);function a(e,n){var i=(0,t.useState)(!1),a=i[0],r=i[1];return(0,t.useEffect)((function(){if(e&&!n){r(!1);var i=document.createElement("img");return i.onload=function(){return r(!0)},i.src=e,function(){i.onload=null}}}),[e,n]),a}},480807:function(e,n,i){"use strict";i.d(n,{X:function(){return l}});var t=i(296540),a=i(859406),r=i(844023),o=i(635906);function s(e){var n,i=e.percentage/100,a=function(e){var n=e.threshold,i=(0,t.useState)(null),a=i[0],r=i[1],o=(0,t.useState)(null),s=o[0],l=o[1],d=(0,t.useState)((function(){return new window.IntersectionObserver((function(e){var n=e[0];return r(n)}),{threshold:n})}))[0];return(0,t.useEffect)((function(){if(s)return d.disconnect(),d.observe(s),function(){return d.disconnect()}}),[s,d]),[l,a]}({threshold:i}),r=a[0],o=a[1],s=(0,t.useRef)(!1),l=(0,t.useRef)(e.impressionKey);(0,t.useEffect)((function(){l.current!==e.impressionKey&&(l.current=e.impressionKey,s.current=!1)}));var d=(null!==(n=null==o?void 0:o.intersectionRatio)&&void 0!==n?n:0)>i,u=e.onFirstImpression;return(0,t.useEffect)((function(){!s.current&&d&&(s.current=!0,u())}),[u,d,e.impressionKey]),{elementRef:r}}function l(e){var n=(o.gE&&a.Zn.get(“use_intersection”,!1)?s(e):function(e){var n=(0,t.useRef)(null),i=(0,t.useRef)(!1),a=(0,t.useRef)(e.impressionKey),s=(0,t.useRef)(null),l=(0,t.useContext)(r.MD),d=e.percentage,u=e.onFirstImpression,c=(0,t.useCallback)((function(e){!i.current&&n.current&&(s.current=(0,o.DW)(n.current,e),(0,o.Gv)(s.current,d)&&(i.current=!0,u()))}),[u,d]);return(0,t.useEffect)((function(){a.current!==e.impressionKey&&(i.current=!1,a.current=e.impressionKey,l.requestVisibilityCheck({checkVisible:c}))}),[e.impressionKey,c,l]),(0,t.useEffect)((function(){return l.registerReceiver({checkVisible:c})}),[c,l]),{elementRef:n}}(e)).elementRef;return(0,t.useMemo)((function(){return{elementRef:n}}),[n])}},118021:function(e,n,i){“use strict”;i.d(n,{$:function(){return a}});var t=i(296540);function a(e,n){var i=t.useRef((function(){}));t.useEffect((function(){i.current=e}),[e]),t.useEffect((function(){if(null!==n){var e=setInterval((function(){i.current&&i.current()}),n);return function(){return clearInterval(e)}}}),[n])}},423052:function(e,n,i){“use strict”;i.d(n,{H:function(){return r}});var t=i(296540),a=i(859406);function r(e){(0,t.useEffect)((function(){“string”==typeof e&&a.x2.setPageTitle(e)}),[e])}},806677:function(e,n,i){“use strict”;i.d(n,{Z:function(){return a}});var t=i(296540);function a(e){var n=(0,t.useRef)();return(0,t.useEffect)((function(){n.current=e}),[e]),n.current}},898718:function(e,n,i){“use strict”;var t;i.d(n,{P:function(){return t}}),function(e){e.Live=”live”,e.WatchParty=”watch_party”,e.Premiere=”premiere”,e.Rerun=”rerun”}(t||(t={}))},465263:function(e,n,i){“use strict”;i.d(n,{RR:function(){return r},dF:function(){return a}});var t=i(859406),a=function(){for(var e=[],n=0;n<12;n++){var i=new Date(2e3,n);e.push((0,t.Yq)(i,{month:"long"}))}return e},r=function(e){for(var n=[],i=0;i<7;i++){var a=new Date(2e3,0,2+i);n.push((0,t.Yq)(a,{weekday:e}))}return n}},192941:function(e,n,i){"use strict";function t(e){for(var n={},i=0,t=Object.keys(e).filter((function(e){return e.startsWith("data-")}));i“],”\\&gt\\;\\(“:[“>(“],”\\&lt\\;\\]”:[“<]"],"\\&lt\\;3":["<3"],":-?(?:7|L)":[":-7",":-L",":7",":L"],"[oO](_|\\.)[oO]":["o_o","O_O","o_O","O_o","o.o","O.O","o.O","O.o"],"\\;-?(p|P)":[";-p",";-P",";p",";P"],"\\;-?\\)":[";-)",";)"],"\\:-?(o|O)":[":-o",":-O",":o",":O"],"\\:-?(p|P)":[":-p",":-P",":p",":P"],"\\:-?(S|s)":[":-S",":-s",":s",":S"],"\\:-?[\\\\/]":[":-/",":-\\",":/",":\\"],"\\:-?[z|Z|\\|]":[":-|",":-Z",":-z",":|",":Z",":z"],"\\:-?\\(":[":-(",":("],"\\:-?\\)":[":-)",":)"],"\\:-?D":[":-D",":D"],"#-?[\\\\/]":["#-/","#-\\","#/","#\\"],"B-?\\)":["B-)","B)"],"R-?\\)":["R-)","R)"]};function d(e,n){for(var i,t={},a=0,r=e;a0){if(“@”===e[u-1])return null;i.push({type:t.X.Text,content:e.slice(0,u)})}var c=l[1],m=l[2];(function(e){var n,i=e[e.length-1];if(“)”!==i)return!1;n=”(“;for(var t=0,a=0,r=e.length-1;a0&&void 0!==n.index)return n[1];var i=e.match(r);return i&&i.length>0&&void 0!==i.index?i[2]:””}(v);if(“create”!==p)return i.push({type:t.X.ClipLink,content:{slug:p,url:v,displayText:d}}),i}if(n.parseVods&&function(e){return void 0===e&&(e=””),o.test(e)}(v)){var h=function(e){void 0===e&&(e=””);var n=e.match(o);return null===n?””:n&&n.length>0&&void 0!==n.index?n[1]:””}(v);return i.push({type:t.X.VideoLink,content:{id:h,url:v,displayText:d}}),i}return i.push({type:t.X.Link,content:{displayText:d,url:v}}),u+d.lengthLatency Tracking documentation to resolve this”,{“x:link”:function(e){return(0,l.jsx)(X.Cb,{className:”red-banner__link”,linkTo:”https://git.xarth.tv/pages/twilight/twilight-docs/docs/guides/latency-tracking.html”,targetBlank:!0,children:e})}},”Namespace”);return(0,l.jsxs)(d.P,{className:”red-banner”,display:u.nl.Flex,justifyContent:u.A9.Center,alignItems:u.k2.Center,elevation:1,padding:1,children:[(0,l.jsx)(d.P,{display:u.nl.Flex,alignItems:u.k2.Center,margin:{right:1},padding:{right:.5},color:u.Q1.Overlay,children:(0,l.jsx)($.l,{fillColor:”inherit”})}),(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,color:u.Q1.Overlay,children:e}),(0,l.jsx)(d.P,{className:”red-banner__dismiss”,position:u.yX.Absolute,attachRight:!0,margin:{right:2},padding:{x:1,y:.5},color:u.Q1.Overlay,children:(0,l.jsx)(X.Cb,{variant:X.KD.Inherit,onClick:this.dismissBarClickHandler,hoverColorInherit:!0,hoverUnderlineNone:!0,underline:!1,children:(0,l.jsx)(ee.g,{fillColor:”inherit”})})})]})},n}(c.Component),ie=”session_storage_vx_disco_mm”,te=function(){var e=c.useRef(Date.now());return c.useEffect((function(){var n=h.VS.get(ie,!1);if(!n){var i=function(){n||(h.E5.track(“mouse_move”,{time_since_tab_open:Date.now()-e.current}),h.VS.set(ie,!0))};return document.addEventListener(“mousemove”,i,{once:!0}),function(){document.removeEventListener(“mousemove”,i)}}}),[]),null},ae=i(929843);var re=i(786268),oe=i(5370),se=i(675078),le=i(439521),de=i(399384),ue=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(76584),i.e(13046),i.e(31073),i.e(54953),i.e(71257),i.e(28769),i.e(8582),i.e(54978),i.e(64732),i.e(46934),i.e(1466)]).then(i.bind(i,17229))}),”ChannelSingleStoryPageComponent”),ce=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(76584),i.e(13046),i.e(31073),i.e(54953),i.e(71257),i.e(36719),i.e(37875)]).then(i.bind(i,830264))}),”StoriesCarouselPageComponent”),me=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(76584),i.e(13046),i.e(31073),i.e(54953),i.e(71257),i.e(36719),i.e(28769),i.e(8582),i.e(54978),i.e(64732),i.e(46934),i.e(82171)]).then(i.bind(i,873632))}),”ChannelStoriesPageComponent”),ve=function(e){var n,i,t,a,r=(0,m.g)(),o=(0,m.zy)();return(null===(n=o.state)||void 0===n?void 0:n.viewMode)===de.IV.Carousel?(0,l.jsx)(ce,{}):r.storyID&&(null===(i=o.state)||void 0===i?void 0:i.viewMode)!==de.IV.ChannelView?r.storyID?(0,l.jsx)(ue,{children:e.children}):null:(null===(t=o.state)||void 0===t?void 0:t.viewMode)!==de.IV.ChannelView?(0,l.jsx)(m.C5,{to:o,state:{viewMode:de.IV.ChannelView},replace:!0}):(0,l.jsx)(me,{trackingMedium:null===(a=o.state)||void 0===a?void 0:a.trackingMedium})},pe=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,s.__extends)(n,e),n.prototype.render=function(){var e=this.props.location.pathname,n=”https://dashboard.twitch.tv”;if(this.props.isLoggedIn&&(n=””.concat(n,”/u/”).concat(this.props.userLogin)),e.includes(“achievements”))n=””.concat(n,”/analytics/achievements”);else if(e.includes(“channel-analytics”))n=””.concat(n,”/analytics”);else if(e.includes(“stream-summary”)){var i=e.replace(“/dashboard”,”/analytics”);n=”https://dashboard.twitch.tv/u”.concat(i)}else if(e.includes(“streamkey”))n=””.concat(n,”/settings/stream”);else if(e.includes(“broadcast”))n=””.concat(n,”/broadcast”);else if(e.includes(“/dashboard/settings/moderation”))n=””.concat(n,”/settings/moderation”);else if(e.includes(“/dashboard/settings”))n=””.concat(n,”/settings/channel”);else if(e.includes(“dashboard/extensions”)){var t=e.substring(e.indexOf(“/extensions”));n=””.concat(n).concat(t)}else e.includes(“dashboard”)&&(n=””.concat(n,”/stream-manager”));return e.includes(“manager/clips”)?n=””.concat(n,”/content/clips”):e.includes(“manager/collections”)?n=””.concat(n,”/content/collections”):e.includes(“manager”)&&(n=””.concat(n,”/content/video-producer”)),window.location.assign(n),null},n}(c.Component);var he=(0,p.Zz)((0,r.Ng)((function(e){var n=(0,o.wz)(e);return{isLoggedIn:(0,o.M3)(e),userLogin:n&&n.login}})),w.y)(pe),fe=i(348298),ge=i(120719),ke=i(540219),ye=i(97867),Se=[“mousemove”,”keydown”,”wheel”,”DOMMouseScroll”,”mouseWheel”,”mousedown”,”touchstart”,”touchmove”,”MSPointerDown”,”MSPointerMove”];var be=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.isIdle=!1,n.pageIsHidden=!1,n.lastActiveTimestamp=+new Date,n.activityTimeoutID=null,n.lastPageX=null,n.lastPageY=null,n.onActiveEvent=function(e){var i=null,t=null;if(function(e){return”mousemove”===e.type}(e)){if(i=e.pageX,t=e.pageY,i===n.lastPageX&&t===n.lastPageY)return;if(+new Date-n.lastActiveTimestamp<200)return}n.activityTimeoutID&&clearTimeout(n.activityTimeoutID),n.pageIsHidden||(n.isIdle&&(0,ye.Jk)(),n.setOnActive(i,t))},n.onWindowVisibilityChange=function(){var e=n.windowIsHidden();n.pageIsHidden=e,e?n.setIdle():n.isIdle&&((0,ye.Jk)(),n.setOnActive(null,null))},n.windowIsHidden=function(){return"visible"!==document.visibilityState},n.setOnActive=function(e,i){n.isIdle=!1,n.lastActiveTimestamp=+new Date,n.activityTimeoutID=setTimeout(n.setIdle,6e5),n.lastPageX=e,n.lastPageY=i},n.setIdle=function(){n.isIdle=!0,(0,ye.$R)()},n}return(0,s.__extends)(n,e),n.prototype.componentDidMount=function(){var e=this;Se.forEach((function(n){document.addEventListener(n,e.onActiveEvent)})),document.addEventListener("visibilitychange",this.onWindowVisibilityChange),(0,ye.Jk)(),this.setOnActive(null,null)},n.prototype.componentWillUnmount=function(){var e=this;this.activityTimeoutID&&clearTimeout(this.activityTimeoutID),Se.forEach((function(n){document.removeEventListener(n,e.onActiveEvent)})),document.removeEventListener("visibilitychange",this.onWindowVisibilityChange)},n.prototype.render=function(){return null},n}(c.Component),_e=be,xe=i(216042),Ce=i(148030),we=i(830137),Ne=i(623970),Pe=i(414620),De=i(131869),Te=i(789910),Ie=i(214604),Fe=i(633283),Ee=i(258701),je=i(117505),Le=i(79004),Ae=function(e){return(0,l.jsxs)(d.P,{display:"flex",alignItems:"center",justifyContent:"space-between",elevation:1,padding:{left:2,right:2,top:1,bottom:1},background:"accent-alt",children:[(0,l.jsx)(d.P,{children:(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,color:"overlay",children:(0,h.hw)("Reminder: The Twitch business will shut down in Korea on February 27, 2024 KST. Please visit our help page for information and assistance.”,{“x:link”:function(e){return(0,l.jsx)(X.Cb,{linkTo:”https://help.twitch.tv/s/article/korea-update-kr”,targetBlank:!0,variant:”overlay”,children:e})}},”MagpieInProductBanner”)})}),(0,l.jsx)(d.P,{margin:{left:1},children:(0,l.jsx)(Le.a2,{icon:(0,l.jsx)(ee.g,{}),onClick:e.onDismiss,”aria-label”:(0,h.hw)(“Close”,”MagpieInProductBanner”),overlay:!0})})]})},Re=”k_banner_dismissed_2″,He=function(){var e=c.useState(h.IG.get(Re,!1)),n=e[0],i=e[1];return(0,l.jsx)(d.P,{width:”100%”,position:”relative”,children:!n&&(0,l.jsx)(Ae,{onDismiss:function(){h.IG.set(Re,!0),i(!0)}})})},Oe=i(306730);var Me=i(841502),Be=i(213912),Ue=i(666201);var Ve=(0,r.Ng)((function(e){return{isLoggedIn:(0,o.M3)(e)}}),(function(e){return(0,p.zH)({beginPersistingPlayer:Be.jK,stopPersistingPlayer:Be.EZ},e)}))(Ue.s),ze=i(265827),We=i(779304),Ge=i(410493),qe=function(){var e,n,i,t,a,r,o=h.E5.getLastPageview(),l=(0,c.useState)({pageviewContent:null!==(e=null==o?void 0:o.content)&&void 0!==e?e:null,pageviewContentType:null!==(n=null==o?void 0:o.content_type)&&void 0!==n?n:null,pageviewLocation:null!==(i=null==o?void 0:o.location)&&void 0!==i?i:null,pageviewMedium:null!==(t=null==o?void 0:o.medium)&&void 0!==t?t:null}),d=l[0],u=l[1],m=(0,c.useState)({pageviewContent:null,pageviewContentType:null,pageviewLocation:null,pageviewMedium:null}),v=m[0],p=m[1],f=(0,c.useCallback)((function(){var e,n,i,t,a=h.E5.getLastPageview();p(d),u({pageviewContent:null!==(e=null==a?void 0:a.content)&&void 0!==e?e:null,pageviewContentType:null!==(n=null==a?void 0:a.content_type)&&void 0!==n?n:null,pageviewLocation:null!==(i=null==a?void 0:a.location)&&void 0!==i?i:null,pageviewMedium:null!==(t=null==a?void 0:a.medium)&&void 0!==t?t:null})}),[d]);return a=”pageview”,r=f,(0,c.useEffect)((function(){return h.E5.eventEmitter.addListener(a,r),function(){h.E5.eventEmitter.removeListener(a,r)}}),[r,a]),(0,s.__assign)((0,s.__assign)({},d),{previousPageviewContent:v.pageviewContent,previousPageviewContentType:v.pageviewContentType,previousPageviewLocation:v.pageviewLocation,previousPageviewMedium:v.pageviewMedium})};function Ze(e){var n,i=(0,c.useRef)(e);return(0,c.useEffect)((function(){e&&(i.current=e)}),[e]),null!==(n=null!=e?e:i.current)&&void 0!==n?n:null}var Qe=(0,ze.q)(“RecommendationContext”,{channelName:null,categorySlug:null,lastChannelName:null,lastCategorySlug:null,pageviewContent:null,pageviewContentType:null,pageviewLocation:null,pageviewMedium:null,previousPageviewContent:null,previousPageviewContentType:null,previousPageviewLocation:null,previousPageviewMedium:null}),Ke=Qe.context,Ye=(Qe.withContext,function(){return(0,c.useContext)(Ke)}),Xe=function(e){var n,i=e.children,t=(0,Ge.N)().channelLogin,a=(n=(0,m.RQ)({path:”/directory/category/:categorySlug”,end:!1}),{categorySlug:(null==n?void 0:n.params.categorySlug)?(0,We.R)(n.params.categorySlug).toLowerCase():null}).categorySlug,r=qe(),o=r.pageviewContent,s=r.pageviewContentType,d=r.pageviewLocation,u=r.pageviewMedium,v=r.previousPageviewContent,p=r.previousPageviewContentType,h=r.previousPageviewLocation,f=r.previousPageviewMedium,g=Ze(t),k=Ze(a),y=(0,c.useMemo)((function(){return{channelName:t,categorySlug:a,lastChannelName:g,lastCategorySlug:k,pageviewContent:o,pageviewContentType:s,pageviewLocation:d,pageviewMedium:u,previousPageviewContent:v,previousPageviewContentType:p,previousPageviewLocation:h,previousPageviewMedium:f}}),[t,a,g,k,o,s,d,u,v,p,h,f]);return(0,l.jsx)(Ke.Provider,{value:y,children:i})},$e=i(148223),Je=(c.createRef(),0),en=(0,$e.k3)(),nn=function(){var e=(0,c.useRef)(h.vF.withCategory(“RightColumn”));return(0,c.useEffect)((function(){return Je>=1&&e.current.warn(“RightColumn should only ever be used in the Root.”,”Use instead to wrap components that should display in the right column.”),Je++,function(){Je–}}),[]),(0,l.jsx)(“div”,{style:{width:”fit-content”},id:en})},tn=i(713096);var an,rn,on=(0,p.Zz)(w.y,(0,r.Ng)((function(e){return{playerIsPersisting:e.ui.persistentPlayerEnabled&&e.ui.persistentPlayerIsPersisting}})))(tn.dr),sn=i(102331),ln=i(36935),dn=i(588702),un=i(843004),cn=i(844023),mn=i(552400);!function(e){e.Chat=”chat”,e.SocialColumn=”socialcolumn”}(an||(an={})),function(e){e.Close=”close”,e.Open=”open”}(rn||(rn={}));var vn=function(e){var n=(0,s.__assign)({action_type:”click”},e);h.E5.track(“site_layout_mod”,n)},pn=i(769957),hn=i(845165),fn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.getExpandedStyle=function(){return{position:u.yX.Absolute,attachTop:!0,attachRight:!0,flexGrow:0,flexShrink:0,zIndex:u.Py.Above}},n.handleToggleVisibility=function(){var e=n.props.collapsed,i=n.getLayoutCache();e?(n.props.expandSideNavFromUser(),i.resource.isSocialColumnClosedByUserAction=!1):(n.props.collapseSideNavFromUser(),i.resource.isSocialColumnClosedByUserAction=!0),h.IG.set(h.x2.config.layoutCacheKey,i),vn({element:an.SocialColumn,action:e?rn.Open:rn.Close})},n}return(0,s.__extends)(n,e),n.prototype.render=function(){var e=this.props,n=e.collapsedByBreakpoint,i=e.collapsed;if(n)return null;var t=this.props.collapsed?(0,h.hw)(“Expand”,”CollapsableToggle”):(0,h.hw)(“Collapse”,”CollapsableToggle”);return(0,l.jsx)(d.P,(0,s.__assign)({className:”collapse-toggle”,display:u.nl.Flex,justifyContent:u.A9.Center,margin:{top:.5},padding:{y:.5}},i?{}:this.getExpandedStyle(),{children:(0,l.jsx)(mn.m,{label:t,children:(0,l.jsx)(Le.a2,{icon:i?hn.M:hn.p,”aria-label”:i?(0,h.hw)(“Expand Side Nav”,”CollapsableToggle”):(0,h.hw)(“Collapse Side Nav”,”CollapsableToggle”),onClick:this.handleToggleVisibility,”data-a-target”:”side-nav-arrow”})})}))},n.prototype.getLayoutCache=function(){return h.IG.get(h.x2.config.layoutCacheKey,pn.I)},n}(c.Component),gn=0,kn=(0,$e.k3)(),yn=function(e){function n(n){var i=e.call(this,n)||this;return i.logger=h.vF.withCategory(“SideNavPageInfoSection”),i.render=function(){return(0,l.jsx)(“div”,{id:kn})},i.componentDidMount=function(){return gn++},i.componentWillUnmount=function(){return gn–},gn>=1&&i.logger.warn(“SideNavPageInfoSection should only ever be used in the Root.”,”Use instead to wrap components that should display in the right column.”),i}return(0,s.__extends)(n,e),n}(c.Component),Sn=i(246942),bn=i.n(Sn),_n=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.resizeAnimationFrame=null,n.collapseOnBreakpoint=function(){var e=window.innerWidth;e<1200&&!n.props.collapsedByBreakpoint?n.props.collapseSideNavFromBreakpoint():e>=1200&&n.props.collapsedByBreakpoint&&n.props.expandSideNavFromBreakpoint(),n.resetAnimationState()},n.handleWindowResize=function(){n.resizeAnimationFrame||(n.resizeAnimationFrame=requestAnimationFrame(n.collapseOnBreakpoint))},n.resetAnimationState=function(){n.resizeAnimationFrame=null},n}return(0,s.__extends)(n,e),n.prototype.componentDidMount=function(){window.addEventListener(“resize”,this.handleWindowResize),this.collapseOnBreakpoint()},n.prototype.componentWillUnmount=function(){this.resizeAnimationFrame&&cancelAnimationFrame(this.resizeAnimationFrame),window.removeEventListener(“resize”,this.handleWindowResize)},n.prototype.render=function(){var e=this.props.collapsed,n=this.props.children;return(0,l.jsx)(d.P,{className:bn()(“side-nav”,{“side-nav–collapsed”:e,”side-nav–expanded”:!e}),background:u.VS.Alt,fullHeight:!0,flexShrink:0,”data-test-selector”:”side-nav”,”data-a-target”:e?”side-nav-bar-collapsed”:”side-nav-bar”,role:”complementary”,children:n})},n}(c.Component);var xn,Cn=(0,r.Ng)((function(e){return{collapsed:!e.ui.sideNavExpanded,collapsedByBreakpoint:!e.ui.sideNavExpandedByBreakpoint,expandedByUser:e.ui.sideNavExpandedByUser}}),(function(e){return(0,p.zH)({collapseSideNavFromBreakpoint:Be.J,expandSideNavFromBreakpoint:Be.IF},e)}))(_n),wn=i(939471),Nn=i(980859),Pn=i(22925);!function(e){e.RECOMMENDED=”recommended”,e.VIEWERS_DESCENDING=”viewers_desc”,e.ALPHABETICAL=”alphabetical”,e.UNKNOWN=”unknown”}(xn||(xn={}));var Dn,Tn,In=i(727234),Fn=i(494693),En=i(19067),jn=i(876531),Ln=i(434338),An=function(){return”variant”===h.x2.experiments.__hardcodedStaleExperiment(“creator_anniversaries_left_nav”,”control”)},Rn=function(e){return”provider-side-nav-followed-channels-1″===e},Hn=function(e){return”provider-suggested-collaborators-sidenav-1″===e},On=i(285607),Mn=function(e){var n,i,t,a=h.x2.tracking.getLastPageview();return{channel_id:Number(e.channelID),content_type:e.contentType,component:”twitch_socialcolumn”,ghost_mode:e.ghostMode,is_live:e.isLive,impression_id:e.impressionID,item_id:e.itemID,item_page:e.itemPage,item_position:e.contentIndex,item_tracking_id:e.itemTrackingID,location:null!==(n=null==a?void 0:a.location)&&void 0!==n?n:null,section:e.section,stream_ccu:null!==(i=e.viewersCount)&&void 0!==i?i:null,user_id:e.userID,vod_id:null!==(t=e.vodID)&&void 0!==t?t:null}},Bn=function(e){var n,i,t,a,r,o,s,l=h.x2.tracking.getLastPageview();return{channel_id:Number(e.channelID),game_id:null!==e.gameID?Number(e.gameID):null,vod_id:null!==e.vodID?Number(e.vodID):null,content_type:e.contentType,game:e.game,is_live:e.isLive,is_promotion:e.isPromotion,item_page:”twitch_socialcolumn”,item_position:e.contentIndex,item_tracking_id:e.itemTrackingID,location:null!==(n=null==l?void 0:l.location)&&void 0!==n?n:null,login:e.login,model_tracking_id:e.modelTrackingID,page_session_id:h.x2.session.pageviewID,promotions_campaign_id:e.promotionsCampaignID,section:e.section,stream_ccu:null!==(i=e.viewersCount)&&void 0!==i?i:null,sort_method:null!==(t=e.sortMethod)&&void 0!==t?t:null,is_following:e.isFollowing,guest_channel_id:null!==e.guestChannelID?Number(e.guestChannelID):null,guest_star_session_id:null!==(a=e.guestStarSessionID)&&void 0!==a?a:null,is_drop_in:e.isDropIn||!1,collaboration_eligibility:e.collaborationEligibility||jn.jSm.UNDEFINED,collapse_left:e.collapseLeft,costream_ccu:null!==(r=e.costreamCCU)&&void 0!==r?r:null,costream_organizer_channel_id:null!==(o=e.costreamOrganizerChannelID)&&void 0!==o?o:null,costream_organizer_broadcast_id:null!==(s=e.costreamOrganizerBroadcastID)&&void 0!==s?s:null}},Un=function(e){h.x2.tracking.track(“item_display”,Bn(e))},Vn=function(e){h.x2.tracking.__track_SSRMigrationFixme(“guest_star_client_item_update”,function(e){var n,i,t,a,r=h.x2.tracking.getLastPageview();return{channel_id:Number(e.channelID),content_type:e.contentType,game:e.game,game_id:e.gameID,is_promotion:e.isPromotion,item_page:”twitch_socialcolumn”,item_position:e.contentIndex,item_tracking_id:e.itemTrackingID,location:null!==(n=null==r?void 0:r.location)&&void 0!==n?n:null,login:e.login,model_tracking_id:e.modelTrackingID,page_session_id:h.x2.session.pageviewID,promotions_campaign_id:e.promotionsCampaignID,section:e.section,stream_ccu:null!==(i=e.viewersCount)&&void 0!==i?i:null,sort_method:null!==(t=e.sortMethod)&&void 0!==t?t:null,is_following:e.isFollowing,guest_channel_id:null!==(a=Number(e.guestChannelID))&&void 0!==a?a:null}}(e))},zn=function(e){h.x2.tracking.track(“item_click”,Bn(e))},Wn=(0,On.S)(h.Zn.get(“left_nav_polling_interval_ms”,10*En.kg)),Gn=function(e){var n,i,t={};return(null===(i=null===(n=null==e?void 0:e.sideNav)||void 0===n?void 0:n.sections)||void 0===i?void 0:i.edges)?(e.sideNav.sections.edges.forEach((function(e){e&&(t[e.node.id]=qn(e))})),t):t},qn=function(e,n){var i,t={title:e.node.title,sectionId:e.node.id,streams:[],offlineChannels:[],sort:null==n?void 0:n.input.followSortOrder,categories:[]};return null===(i=e.node.content.edges)||void 0===i||i.forEach((function(i){var a,r,o;if(null===(a=null==i?void 0:i.node)||void 0===a?void 0:a.id)if(“Stream”===i.node.__typename){if(!i.node.broadcaster)return;t.streams.push({modelTrackingID:i.trackingID,promotionsCampaignID:i.promotionsCampaignID,socialCue:i.socialCue,user:i.node.broadcaster,content:i.node,channelLabel:i.label,sectionId:e.node.id,sort:null==n?void 0:n.input.followSortOrder,costreamDetails:i.node.costreamDetails&&{costreamersCount:i.node.costreamDetails.costreamersCount,role:i.node.costreamDetails.role,organizer:i.node.costreamDetails.organizer,totalViewersCount:null!==(r=i.node.costreamDetails.totalViewersCount)&&void 0!==r?r:0,topCostreamers:i.node.costreamDetails.topCostreamers.filter((function(e){return null!==e}))}})}else”User”===i.node.__typename?t.offlineChannels.push({modelTrackingID:i.trackingID,user:i.node,sectionId:e.node.id,sort:null==n?void 0:n.input.followSortOrder}):”Game”===i.node.__typename&&(null===(o=t.categories)||void 0===o||o.push({modelTrackingID:i.trackingID,category:i.node}))})),t},Zn=function(e){return e.streams.length+e.offlineChannels.length+e.categories.length},Qn=function(e,n){return Rn(e)?function(e){return”CCV”===e?xn.VIEWERS_DESCENDING:xn.RECOMMENDED}(n):null},Kn=function(e){var n,i,t,a,r,o,s,l;return{sortMethod:Qn(e.stream.sectionId,e.stream.sort),channelID:e.stream.user.id,contentIndex:e.contentIndex,game:null!==(i=null===(n=e.stream.content.game)||void 0===n?void 0:n.displayName)&&void 0!==i?i:null,gameID:null!==(a=null===(t=e.stream.content.game)||void 0===t?void 0:t.id)&&void 0!==a?a:null,isLive:!0,isPromotion:e.stream.channelLabel===jn.hbb.PROMOTED||e.stream.channelLabel===jn.hbb.SPONSORED,contentType:”live”,itemTrackingID:e.stream.modelTrackingID,modelTrackingID:e.stream.modelTrackingID,promotionsCampaignID:null!==(o=null===(r=e.sponsorship)||void 0===r?void 0:r.sponsorshipCampaignID)&&void 0!==o?o:””,login:null!==(s=e.stream.user.login)&&void 0!==s?s:””,section:e.stream.sectionId,viewersCount:null!==(l=e.stream.content.viewersCount)&&void 0!==l?l:0,vodID:null,isFollowing:Rn(e.stream.sectionId),guestChannelID:e.guestStarSessionID?e.stream.user.id:null,guestStarSessionID:e.guestStarSessionID,isDropIn:e.isDropIn,collaborationEligibility:e.collaborationEligibility,collapseLeft:e.collapsed,costreamCCU:(0,Ln.yJ)(e.stream.costreamDetails),costreamOrganizerChannelID:(0,Ln.CC)(e.stream.costreamDetails),costreamOrganizerBroadcastID:(0,Ln.SW)(e.stream.costreamDetails)}},Yn=function(e,n,i){var t;return{impressionID:e.modelTrackingID,itemID:e.user.id,channelID:e.user.id,contentIndex:n,isLive:!0,contentType:”live”,itemTrackingID:e.modelTrackingID,itemPage:”twitch_socialcolumn”,ghostMode:i,section:e.sectionId,userID:””,viewersCount:null!==(t=e.content.viewersCount)&&void 0!==t?t:0,vodID:null}},Xn=function(e){Un(Kn({stream:e.stream,contentIndex:e.contentIndex,sponsorship:e.sponsorship,isDropIn:e.isDropIn,guestStarSessionID:e.guestStarSessionID,collapsed:e.collapsed,collaborationEligibility:e.collaborationEligibility}))},$n=function(e,n,i){Vn(function(e,n,i){var t,a,r,o,s;return{sortMethod:Qn(e.sectionId,e.sort),channelID:e.user.id,contentIndex:n,game:null!==(a=null===(t=e.content.game)||void 0===t?void 0:t.displayName)&&void 0!==a?a:null,gameID:null!==(o=null===(r=e.content.game)||void 0===r?void 0:r.id)&&void 0!==o?o:null,isPromotion:e.channelLabel===jn.hbb.PROMOTED,contentType:”live”,itemTrackingID:e.modelTrackingID,modelTrackingID:e.modelTrackingID,promotionsCampaignID:e.promotionsCampaignID,login:e.user.login,section:e.sectionId,viewersCount:null!==(s=e.content.viewersCount)&&void 0!==s?s:0,isFollowing:Rn(e.sectionId),guestChannelID:e.user.id,guestStarSessionID:i}}(e,n,i))},Jn=function(e){var n,i;Un(Kn({stream:e.stream,contentIndex:e.contentIndex,sponsorship:null,collapsed:e.collapsed})),n=Yn(e.stream,e.contentIndex,!An()),i=”creator_anniversaries_impression”,h.x2.tracking.__track_SSRMigrationFixme(i,Mn(n))},ei=function(e){zn(Kn({stream:e.stream,contentIndex:e.contentIndex,sponsorship:e.sponsorship,guestStarSessionID:e.guestStarSessionID,isDropIn:e.isDropIn,collaborationEligibility:e.collaborationEligibility||jn.jSm.UNDEFINED,collapsed:e.collapsed}))},ni=function(e){var n;n=function(e){var n,i;return{channelID:e.stream.user.id,contentIndex:e.contentIndex,isPromotion:e.stream.channelLabel===jn.hbb.PROMOTED||e.stream.channelLabel===jn.hbb.SPONSORED,promotionsCampaignID:null!==(i=null===(n=e.sponsorship)||void 0===n?void 0:n.sponsorshipCampaignID)&&void 0!==i?i:””,sectionName:e.stream.sectionId,isDropIn:e.isDropIn,guestStarSessionID:e.guestStarSessionID,collapseLeft:e.collapsed}}({stream:e.stream,contentIndex:e.contentIndex,sponsorship:e.sponsorship,isDropIn:e.isDropIn,guestStarSessionID:e.guestStarSessionID,collapsed:e.collapsed}),(Rn(n.sectionName)||Hn(n.sectionName))&&h.x2.tracking.track(“leftnav_item_hover”,function(e){var n;return{channel_id:e.channelID||””,is_promotion:e.isPromotion,item_position:e.contentIndex,promotions_campaign_id:e.promotionsCampaignID,section_name:e.sectionName,is_drop_in:e.isDropIn||!1,guest_star_session_id:null!==(n=e.guestStarSessionID)&&void 0!==n?n:null,collapse_left:e.collapseLeft}}(n))},ii=function(e){var n,i;zn(Kn({stream:e.stream,contentIndex:e.contentIndex,sponsorship:e.sponsorship,guestStarSessionID:e.guestStarSessionID,collapsed:e.collapsed})),n=Yn(e.stream,e.contentIndex,!An()),i=”creator_anniversaries_click”,h.x2.tracking.__track_SSRMigrationFixme(i,Mn(n))},ti=function(e){var n;return{sortMethod:Qn(e.videoConnection.sectionId,e.videoConnection.sort),channelID:e.videoConnection.user.id,contentIndex:e.contentIndex,game:null,gameID:null,isLive:!1,isPromotion:!1,contentType:null,itemTrackingID:e.videoConnection.modelTrackingID,modelTrackingID:e.videoConnection.modelTrackingID,promotionsCampaignID:null,login:null!==(n=e.videoConnection.user.login)&&void 0!==n?n:””,viewersCount:null,section:e.videoConnection.sectionId,vodID:null,collapseLeft:e.collapsed}},ai=function(e){Un(ti(e))},ri=function(e){zn(ti(e))},oi=function(e){var n;Un({channelID:null,contentIndex:e.index,contentType:”game”,game:e.category.displayName,gameID:e.category.id,isLive:!1,isPromotion:!1,login:e.userLogin,section:”recommended_categories”,itemTrackingID:e.trackingId,modelTrackingID:e.trackingId,promotionsCampaignID:null,viewersCount:e.category.viewersCount,vodID:null,sortMethod:null,collapseLeft:e.collapsed,isFollowing:!!(null===(n=e.category.self)||void 0===n?void 0:n.follow)})},si=function(e){var n;zn({channelID:null,contentIndex:e.index,contentType:”game”,game:e.category.displayName,gameID:e.category.id,isLive:!1,isPromotion:!1,login:e.userLogin,section:”recommended_categories”,itemTrackingID:e.trackingId,modelTrackingID:e.trackingId,promotionsCampaignID:null,viewersCount:e.category.viewersCount,vodID:null,sortMethod:null,collapseLeft:e.collapsed,isFollowing:!!(null===(n=e.category.self)||void 0===n?void 0:n.follow)})},li=function(e){var n=e.data,i=e.refetchSections,t=function(e){var n=(0,c.useState)(e),i=n[0],t=n[1];return{mergeSectionsState:(0,c.useCallback)((function(e,n){t((function(i){var t={};return n.forEach((function(n){e[n]?t[n]=e[n]:t[n]=i[n]})),t}))}),[]),sectionsState:i}}(Gn(n)),a=t.mergeSectionsState,r=t.sectionsState,o=(0,In.Z)(n);return(0,c.useEffect)((function(){n!==o&&a(Gn(n),function(e){var n,i,t,a=[];return null===(t=null===(i=null===(n=null==e?void 0:e.sideNav)||void 0===n?void 0:n.sections)||void 0===i?void 0:i.edges)||void 0===t||t.forEach((function(e){a.push(e.node.id)})),a}(n))}),[n,o,a]),(0,c.useMemo)((function(){return{sections:(0,Fn.jP)(Object.values(r)),refetchSections:i}}),[r,i])},di=(Dn=(0,ze.q)(“SideNavContext”,{sections:[],refetchSections:function(){}})).context,ui=(Dn.withContext,function(){return(0,c.useContext)(di)}),ci=function(e){var n=e.data,i=e.refetchSections,t=e.children,a=li({data:n,refetchSections:i});return(0,l.jsx)(di.Provider,{value:a,children:t})},mi=i(739604),vi=i(472571),pi=i(937742),hi=i(324602),fi=function(){},gi=(0,ze.q)(“SideNavTooltipContext”,{isOpen:!1,anchorRef:null,show:fi,hide:fi}).context,ki=function(e){var n=e.children,i=(0,c.useState)(null),t=i[0],a=i[1],r=(0,c.useRef)(null),o=(0,c.useRef)(!1),u=(0,vi.p)(),m=u.setAnchorRef,v=u.dialogProps,p=u.setIsOpen,h=u.isOpen,f=u.anchorRef,g=(0,c.useRef)(0),k=(0,c.useRef)(0),y=(0,c.useCallback)((function(e){var n=e.delay,i=void 0===n?0:n,t=e.target,o=e.tooltipContent;t.current&&(null===r.current&&(r.current=document.activeElement),m(t.current),a(o),clearTimeout(g.current),clearTimeout(k.current),g.current=setTimeout((function(){p(!0),g.current=0}),h?0:i))}),[h,m,p]),S=(0,c.useCallback)((function(e){return clearTimeout(g.current),k.current=setTimeout((function(){if(k.current=0,r.current&&(r.current.focus({preventScroll:!0}),r.current=null),e)return m(null),void p(!1);o.current||(m(null),p(!1))}),e?0:400),function(){clearTimeout(k.current),k.current=0}}),[m,p]),b={isOpen:h,anchorRef:f,show:y,hide:S};return(0,l.jsxs)(gi.Provider,{value:b,children:[n,(0,l.jsx)(pi.Y,(0,s.__assign)({},v,{show:!!h,options:{placement:”right-start”},focusableCloseAtEnd:!0,children:(0,l.jsx)(d.P,{onMouseEnter:function(){o.current=!0,k.current&&(clearTimeout(k.current),k.current=0)},onMouseLeave:function(){o.current=!1,g.current||S()},padding:{left:1},children:(0,l.jsx)(hi.fK,{children:(0,l.jsx)(d.P,{tabIndex:0,onKeyDown:function(e){“ArrowLeft”===e.key&&S(!0)},padding:{x:.5,y:.5},children:t})})})}))]})},yi=i(132902),Si=i(178297),bi=function(e){var n=(0,c.useState)([]),i=n[0],t=n[1];(0,c.useEffect)((function(){var n=e.filter((function(e){return!i.includes(e)}));n.length>0&&(n.forEach((function(e){h.E5.track(“hype_train_left_nav_impression”,{channel_id:e,indicator_shown:!0})})),t((function(e){return(0,s.__spreadArray)((0,s.__spreadArray)([],e,!0),n,!0)})))}),[e,i])};!function(e){e.ShowMore=”ShowMore”,e.ShowLess=”ShowLess”,e.GoToFollowing=”GoToFollowing”}(Tn||(Tn={}));var _i=function(e){return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(d.P,{className:”side-nav-show-more-toggle__button”,padding:{x:1,y:.5},display:u.nl.Flex,fullWidth:!0,overflow:u.nE.Hidden,textAlign:u.nO.Left,justifyContent:u.A9.Between,children:[!e.moreDisabled&&(0,l.jsx)(X.Cb,{onClick:e.onClickMore,”data-a-target”:”side-nav-show-more-button”,”data-test-selector”:Tn.ShowMore,underline:!1,children:(0,l.jsx)(J.N,{type:dn.M2.Span,fontSize:u.Z4.Size4,children:(0,h.hw)(“Show More”,”SideNavShowMoreToggleButton”)})}),!e.lessDisabled&&(0,l.jsx)(d.P,{textAlign:e.moreDisabled?u.nO.Left:u.nO.Right,children:(0,l.jsx)(X.Cb,{onClick:e.onClickLess,”data-a-target”:”side-nav-show-less-button”,”data-test-selector”:Tn.ShowLess,underline:!1,children:(0,l.jsx)(J.N,{type:dn.M2.Span,fontSize:u.Z4.Size4,children:(0,h.hw)(“Show Less”,”SideNavShowMoreToggleButton”)})})})]})})},xi=i(316015);function Ci(){return”allowed”===h.x2.experiments.getAndTrackAssignment(“guest_star_left_nav_online_channel_augmentation”)}var wi=i(336620),Ni=i.n(wi),Pi=function(e){var n,i,t=(0,D.IT)(Ni(),{skip:!Ci()||!(0,xi.gU)(),variables:{options:{channelIDs:e},canDropInFlagEnabled:!1,openCallingFlagEnabled:(0,xi.gU)()}}),a=t.data,r=t.startPolling,o=t.stopPolling;return c.useEffect((function(){var e;(0,xi.gU)()&&((null===(e=null==a?void 0:a.guestStarCollaborationStatuses)||void 0===e?void 0:e.shouldRefetch)?r(6e4):o())}),[null===(n=null==a?void 0:a.guestStarCollaborationStatuses)||void 0===n?void 0:n.shouldRefetch,r,o]),(0,xi.Ge)()&&(null===(i=null==a?void 0:a.guestStarCollaborationStatuses)||void 0===i?void 0:i.channelCollabs)||[]},Di=i(96773),Ti=i(477794),Ii=i(62713),Fi=i(636367),Ei=i(76248),ji=i(424131),Li=i(903689),Ai=i(368972),Ri=function(e){return(0,l.jsxs)(ji.n,(0,s.__assign)({},e.dialogProps,{options:{placement:”bottom”,modifiers:[{name:”offset”,options:{offset:[-10,-5]}}]},children:[(0,l.jsx)(Li.x,{children:(0,h.hw)(“Sort By”,”FollowedSideNavSortDropdown”)}),e.options.map((function(n){return(0,l.jsx)(Ai.i,{figure:{icon:n.icon},selected:n.type===e.selectedOption,onClick:function(){return e.onOptionSelected(n.type)},children:n.title},n.title)}))]}))},Hi=(0,Y.W)(“Followed Side Nav Header”,{autoReportInteractive:!0})((function(e){var n,i=bn()({“followed-side-nav-header”:!0,”followed-side-nav-header–expanded”:!e.collapsed}),t=(0,c.useContext)(gi).isOpen,a=(0,vi.p)(),r=a.dialogProps,o=a.anchorProps,m=a.close,v=[{icon:Di.x,title:(0,h.hw)(“Recommended For You”,”FollowedSideNavHeaderComponent”),type:xn.RECOMMENDED},{icon:Ti.a,title:(0,h.hw)(“Viewers (High to Low)”,”FollowedSideNavHeaderComponent”),type:xn.VIEWERS_DESCENDING}],p=null,f=v[0],g=v.find((function(n){return n.type===e.sort.type}));g&&g.type!==(null==f?void 0:f.type)&&(p=g.title);var k=null!==(n=e.collapsedIcon)&&void 0!==n?n:Ii.J;if(e.collapsed)return(0,l.jsx)(mn.m,{enterDelay:t?0:1e3,options:{placement:”right-end”},label:e.title,children:(0,l.jsx)(d.P,{className:i,color:”alt-2″,display:”flex”,flexWrap:”wrap”,justifyContent:”center”,alignItems:”center”,”data-a-target”:”side-nav-header-collapsed”,flexGrow:1,padding:{y:1},role:”heading”,”aria-level”:3,children:(0,l.jsx)(k,{title:e.title})})});var y=e.sort.type!==xn.UNKNOWN&&v.length>0&&e.channelCount>=5;return(0,l.jsxs)(d.P,{className:i,display:”flex”,margin:{y:.5},children:[(0,l.jsx)(Fi.tD,(0,s.__assign)({disabled:!y},o,{onClick:function(){h.E5.track(“leftnav_sorting_client_expand_click”,{}),o.onClick()},children:(0,l.jsxs)(d.P,{display:”flex”,justifyContent:”space-between”,alignItems:”center”,className:”followed-side-nav-header__dropdown-trigger”,children:[(0,l.jsxs)(d.P,{margin:1,”data-a-target”:”side-nav-header-expanded”,display:”flex”,flexDirection:”column”,children:[(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,fontWeight:u.IT.SemiBold,type:dn.M2.H3,children:e.title}),(0,l.jsxs)(J.N,{color:”alt-2″,children:[” “,p,” “]})]}),(0,l.jsx)(d.P,{display:”flex”,margin:{right:1},padding:{right:.5},children:(0,l.jsx)(Ei.s,{title:(0,h.hw)(“Sort options”,”FollowedSideNavHeaderSortOptionsAccessibility”)})})]})})),y&&(0,l.jsx)(Ri,{dialogProps:r,options:v,selectedOption:(null==g?void 0:g.type)||xn.RECOMMENDED,onOptionSelected:function(n){var i;e.sort.setSortType(n),i=n,h.E5.track(“leftnav_sorting_client_sort_by_click”,{sort_method:i}),m()}})]})})),Oi=i(463201),Mi=i(637765),Bi=function(e){var n=e.canCall,i=e.collapsed,t=e.hasRecommendedCollabSection,a=(0,Mi.r)(“open_calling_seen_left_nav_onboarding”,!1),r=a[0],o=a[1];return!(0,xi.Ge)()||!n||r||i||t?null:(0,l.jsx)(d.P,{margin:{top:.5},children:(0,l.jsx)(Oi.P,{closeButton:{“aria-label”:(0,h.hw)(“Close”,”FollowedSideNavList”),onClick:function(){o(!0)}},message:(0,l.jsxs)(d.P,{children:[(0,l.jsx)(d.P,{margin:{bottom:1},children:(0,l.jsx)(J.N,{bold:!0,type:dn.M2.H5,children:(0,h.hw)(“Find streamers you can collaborate with here”,”FollowedSideNavList”)})}),(0,l.jsxs)(“video”,{height:”auto”,width:”100%”,muted:!0,loop:!0,autoPlay:!0,”aria-label”:(0,h.hw)(“Example video of a callable channel”,”FollowedSideNavList”),children:[(0,l.jsx)(“source”,{src:”https://static-cdn.jtvnw.net/stream-together-assets/collaboration-left-nav-onboarding.mp4″,type:’video/mp4; codecs=”hvc1″‘}),(0,l.jsx)(“source”,{src:”https://static-cdn.jtvnw.net/stream-together-assets/collaboration-left-nav-onboarding.webm”,type:”video/webm”})]}),(0,l.jsx)(d.P,{margin:{top:1},children:(0,l.jsx)(J.N,{children:(0,h.hw)(‘The collab icon means you can click “Knock” to ask to collaborate. You can knock from their channel page or your Following list.’,”FollowedSideNavList”)})})]})})})},Ui=(0,Y.W)(“FollowedSideNavList”,{autoReportInteractive:!0})((function(e){var n=(0,c.useState)(e.initialDisplayAmount),i=n[0],t=n[1],a=(0,c.useState)(e.initialDisplayAmount),r=a[0],o=a[1];(0,c.useEffect)((function(){t(e.initialDisplayAmount),o(e.initialDisplayAmount)}),[e.initialDisplayAmount]);var m=e.title,v=e.collapsed,p=e.collapsedIcon,h=e.section,f=e.OnlineChannelRenderer,g=e.OfflineChannelRenderer,k=e.onShowMore,y=h.streams.length+h.offlineChannels.length,S=Math.min(y,e.maxDisplayCount||1/0),b=v||S=S}),_=(0,s.__spreadArray)((0,s.__spreadArray)([],h.streams,!0),h.offlineChannels,!0),x=(0,Fn.jP)(h.streams.map((function(e){return e.user.id}))),C=(0,Si.r)(h.streams),w=C.activeHypeTrains,N=C.onlineChannelsWithHypeTrains;bi(N);var P=Pi(x),D=function(e){var n,i=e.channelList,t=e.guestStarSessions,a=e.activeHypeTrains,r=e.displayAmount,o=e.OnlineChannelRenderer,s=e.collapsed,d=e.OfflineChannelRenderer,u=new Map;Ci()&&t&&t.forEach((function(e){u.set(e.id,e)}));var c=new Map;return(null==a?void 0:a.hypeTrainStatuses)&&a.hypeTrainStatuses.forEach((function(e){c.set(e.channelID,{hypeTrainStatus:e,loading:a.loading})})),(0,Fn.jP)(i.slice(0,r).map((function(e,i){n=e.user.id;var t,a=u.get(n),r=c.get(n);return”content”in(t=e)&&”Stream”===t.content.__typename?(0,l.jsx)(o,{activeGuestStarCollab:a,activeHypeTrain:r,collapsed:s,stream:e,index:i},””.concat(n,”-live”)):d?(0,l.jsx)(d,{collapsed:s,index:i,videoConnection:e},””.concat(n,”-offline”)):void 0})))}({channelList:_,guestStarSessions:P,activeHypeTrains:w,collapsed:v,displayAmount:i,OnlineChannelRenderer:f,OfflineChannelRenderer:g,sort:e.sort.type});return(0,l.jsxs)(d.P,{“aria-label”:m,display:u.nl.Flex,flexDirection:u.bo.Column,className:”side-nav-section”,role:”group”,children:[(0,l.jsx)(Bi,{canCall:P.some((function(e){return e.canJoinStatus===jn.jSm.AVAILABLE})),collapsed:v,hasRecommendedCollabSection:e.hasRecommendedCollabSection}),(0,l.jsx)(Hi,{title:m,collapsed:v,collapsedIcon:p,sort:e.sort,channelCount:y}),(0,l.jsx)(yi.F,{children:D}),b]})})),Vi=(0,Y.W)(“Side Nav Header”,{autoReportInteractive:!0})((function(e){var n=e.collapsed,i=e.collapsedIcon,t=e.title,a={“side-nav-header”:!0},r=(0,c.useContext)(gi).isOpen,o=i||Ii.J;return n?(0,l.jsx)(mn.m,{enterDelay:r?0:1e3,options:{placement:”right-end”},label:t,children:(0,l.jsx)(d.P,{className:bn()(a),color:u.Q1.Alt2,display:u.nl.Flex,flexWrap:u.I4.Wrap,justifyContent:u.A9.Center,alignItems:u.k2.Center,”data-a-target”:”side-nav-header-collapsed”,flexGrow:1,padding:{y:1},role:”heading”,”aria-level”:3,children:(0,l.jsx)(o,{title:t})})}):(0,l.jsx)(d.P,{className:bn()(a),margin:1,padding:{top:.5},”data-a-target”:”side-nav-header-expanded”,children:(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,fontWeight:u.IT.SemiBold,type:dn.M2.H3,children:t})})})),zi=i(533585),Wi=i(973474),Gi=function(e){var n=e.collapsed,i=(0,Mi.r)(“suggested_collab_seen_left_nav_info”,!1),t=i[0],a=i[1];return t||n?null:(0,l.jsx)(d.P,{margin:{top:.5},children:(0,l.jsx)(Oi.P,{closeButton:{“aria-label”:(0,h.hw)(“Close”,”CollabRecsSideNavOnboardingCallout”),onClick:function(){a(!0)}},message:(0,l.jsxs)(d.P,{children:[(0,l.jsx)(d.P,{margin:{bottom:1},children:(0,l.jsx)(J.N,{bold:!0,type:dn.M2.H5,children:(0,h.hw)(“See Suggested Collaborators For You Here!”,”CollabRecsSideNavOnboardingCallout”)})}),(0,l.jsx)(Wi.L,{height:”auto”,width:”100%”,src:”https://static-cdn.jtvnw.net/stream-together-assets/suggested-collab-left-nav-onboarding.png”,alt:(0,h.hw)(“An image showing the new Collaboration Recommendations section in the left navigation.”,”CollabRecsSideNavOnboardingCallout”)}),(0,l.jsx)(d.P,{margin:{top:1},children:(0,l.jsx)(J.N,{children:(0,h.hw)(“Discover streamers we think you’ll love collaborating with —personalized recommendations to raid, knock, or plan your next collab, all while you’re live!”,”CollabRecsSideNavOnboardingCallout”)})})]})})})},qi=(0,Y.W)(“Collab Recs Side Nav Header”,{autoReportInteractive:!0})((function(e){var n,i=(0,c.useContext)(gi).isOpen,t=null!==(n=e.collapsedIcon)&&void 0!==n?n:zi.T;return e.collapsed?(0,l.jsx)(mn.m,{enterDelay:i?0:1e3,options:{placement:”right-end”},label:e.title,children:(0,l.jsx)(d.P,{color:u.Q1.Alt2,display:u.nl.Flex,flexWrap:u.I4.Wrap,justifyContent:u.A9.Center,alignItems:u.k2.Center,”data-a-target”:”side-nav-header-collapsed”,flexGrow:1,padding:{y:1},role:”heading”,”aria-level”:3,children:(0,l.jsx)(t,{title:e.title})})}):(0,l.jsxs)(d.P,{margin:{y:.5},children:[(0,l.jsx)(Gi,{collapsed:!!e.collapsed}),(0,l.jsx)(d.P,{display:u.nl.Flex,justifyContent:u.A9.Between,alignItems:u.k2.Center,children:(0,l.jsxs)(d.P,{margin:1,display:u.nl.Flex,flexDirection:u.bo.Column,children:[(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,fontWeight:u.IT.SemiBold,type:dn.M2.H3,children:e.title}),(0,l.jsx)(J.N,{color:u.Q1.Alt2,fontSize:u.Z4.Size5,children:(0,h.hw)(“For you. While you’re live.”,”CollabRecsSideNavHeader”)})]})})]})})),Zi=i(947322),Qi=i(166012),Ki=i(684990),Yi=function(e){var n=e.hasShowMore,i=e.previewGuests.map((function(e,n){return(0,l.jsx)(d.P,{style:{zIndex:n,marginInlineStart:0===n?0:”-4px”},children:(0,l.jsx)(Zi.e,{src:e.profileImageURL,alt:e.displayName||””,size:20,userLogin:e.displayName},e.displayName)},n)}));return(0,l.jsx)(d.P,{padding:{x:1,y:.5},children:n&&(0,l.jsx)(d.P,{width:”100%”,margin:{top:.5},children:(0,l.jsx)(Fi.tD,{linkTo:(0,Qi.VV)(“/directory/collection/suggested-collaborators”),onClick:function(){var e;e=”show_more”,h.E5.track(“leftnav_suggested_collaborators_client_expand_click”,{suggested_collaborators_leftnav_action:e})},children:(0,l.jsxs)(d.P,{display:u.nl.Flex,justifyContent:u.A9.Between,children:[(0,l.jsxs)(d.P,{display:u.nl.Flex,gap:.5,children:[(0,l.jsx)(d.P,{display:u.nl.Flex,children:i}),(0,l.jsx)(J.N,{color:u.Q1.Alt2,children:(0,h.hw)(“See All Suggested”,”ShowMoreCollabRecsLink”)})]}),(0,l.jsx)(Ki.W1,{})]})})})})},Xi=(0,Y.W)(“SideNavList”,{autoReportInteractive:!0})((function(e){var n=(0,c.useState)(e.initialDisplayAmount),i=n[0],t=n[1],a=(0,c.useState)(e.initialDisplayAmount),r=a[0],o=a[1];(0,c.useEffect)((function(){t(e.initialDisplayAmount),o(e.initialDisplayAmount)}),[e.initialDisplayAmount]);var m=e.title,v=e.collapsed,p=e.collapsedIcon,h=e.section,f=e.OnlineChannelRenderer,g=e.OfflineChannelRenderer,k=e.CategoryRenderer,y=e.onShowMore,S=Math.min(Zn(h),e.maxDisplayCount||1/0),_=v||S<=r?null:(0,l.jsx)(_i,{onClickMore:function(){var e=Math.min(i+10,S);t(e),null==y||y(e,h.sectionId)},onClickLess:function(){var e=Math.max(i-10,r);t(e)},lessDisabled:i<=r,moreDisabled:i>=S}),x=!(0,b.fX)(“mini_aussie_shepherd”)||v||S<=r?null:(0,l.jsx)(Yi,{hasShowMore:i=6?3:0,h.streams.length>=6?6:3).map((function(e){return{displayName:e.user.displayName,profileImageURL:e.user.profileImageURL||””}}))}),C=(0,Fn.jP)(h.streams.map((function(e){return e.user.id}))),w=(0,Si.r)(h.streams),N=w.activeHypeTrains,P=w.onlineChannelsWithHypeTrains;bi(P);var D,T=Pi(C),I=new Map;Ci()&&T&&T.forEach((function(e){I.set(e.id,e)}));var F=new Map;(null==N?void 0:N.hypeTrainStatuses)&&N.hypeTrainStatuses.forEach((function(e){F.set(e.channelID,{hypeTrainStatus:e,loading:N.loading})}));var E=(0,Fn.jP)(h.streams.slice(0,i).map((function(e,n){I.size>0&&(D=I.get(e.user.id));var i=F.get(e.user.id);return(0,l.jsx)(f,{activeGuestStarCollab:D,activeHypeTrain:i,collapsed:v,stream:e,index:n},””.concat(e.user.id,”-online”))}))),j=[];g&&(j=(0,Fn.jP)(h.offlineChannels.slice(0,Math.max(0,i-E.length)).map((function(e,n){return(0,l.jsx)(g,{collapsed:v,index:n+E.length,videoConnection:e},””.concat(e.user.id,”-offline”))}))));var L=(0,s.__spreadArray)((0,s.__spreadArray)([],E,!0),j,!0),A=[];if(k&&h.categories.length>0)for(var R=(0,Fn.jP)(h.categories).slice(0,Math.max(0,i-A.length)),H=0;H0?A:L}),”provider-suggested-collaborators-sidenav-1″===h.sectionId?x:_]})})),$i=i(918533),Ji=function(e){var n=e.subscription,i=ui().refetchSections,t=n.topic,a=n.skip,r=n.skipMessage,o=n.handler,s=(0,$i.D)(t,{skip:a,skipMessage:r})[0],l=(0,In.Z)(s);return(0,c.useEffect)((function(){“function”==typeof o&&s&&s!==l&&o(s,{refetchSections:i})}),[s,l,o,i]),null},et={type:xn.UNKNOWN,setSortType:function(){}},nt=function(e){var n,i=e.section,t=e.config,a=e.collapsed,r=e.isLoggedIn,o=e.hasRecommendedCollabSection,s=ui().sections,d=null!==(n=t.pubsub)&&void 0!==n?n:[],u=(0,wn.G)(),c=o&&Rn(i.sectionId);return(0,l.jsxs)(l.Fragment,{children:[d.map((function(e){return(0,l.jsx)(Ji,{subscription:e},e.topic)})),function(){var e,n,d,m,v;if(u&&Rn(i.sectionId)){var p=t;return(0,l.jsx)(Ui,{section:i,collapsed:a,collapsedIcon:p.collapsedIcon,title:p.title(i),OnlineChannelRenderer:p.OnlineChannelRenderer,OfflineChannelRenderer:p.OfflineChannelRenderer,maxDisplayCount:null===(e=p.getMaxDisplayCount)||void 0===e?void 0:e.call(p,r,s),initialDisplayAmount:c?5:null===(n=p.getInitialDisplayAmount)||void 0===n?void 0:n.call(p,r,s),sort:null!==(d=p.sort)&&void 0!==d?d:et,hasRecommendedCollabSection:o})}return!Hn(i.sectionId)||(0,b.fX)(“mini_aussie_shepherd”)&&r?(0,l.jsx)(Xi,{collapsed:a,collapsedIcon:t.collapsedIcon,title:t.title(i),section:i,OnlineChannelRenderer:t.OnlineChannelRenderer,OfflineChannelRenderer:t.OfflineChannelRenderer,CategoryRenderer:t.CategoryRenderer,maxDisplayCount:null===(m=t.getMaxDisplayCount)||void 0===m?void 0:m.call(t,r,s),initialDisplayAmount:c?5:null===(v=t.getInitialDisplayAmount)||void 0===v?void 0:v.call(t,r,s,i.sectionId)}):null}()]})},it=i(593398),tt=i(677138),at=i(198437),rt=i(35047),ot=i(274092),st=function(e){var n,i;return e?”User”===(null===(n=e.node)||void 0===n?void 0:n.__typename)?(0,ot.d)(e.node.login,e.node.displayName,!0):”TextToken”===(null===(i=e.node)||void 0===i?void 0:i.__typename)?e.node.text:null:null},lt={collapsedIcon:rt.t,title:function(e){var n=e.title;return n.localizedTitleTokens&&n.localizedTitleTokens.length>0?n.localizedTitleTokens.map(st).join(“”):n.fallbackLocalizedTitle}},dt=function(e){return(0,s.__assign)((0,s.__assign)({},lt),e)};function ut(e,n,i){var t,a=n.find((function(e){return e.sectionId===i})),r=null!==(t=null==a?void 0:a.streams.length)&&void 0!==t?t:10;return Math.min(r,10)}var ct;function mt(e,n){var i,t=n.find((function(e){return”provider-side-nav-recommended-streams-1″===e.sectionId||”provider-side-nav-popular-streams-1″===e.sectionId})),a=null!==(i=null==t?void 0:t.streams.length)&&void 0!==i?i:ct.LargeMax;return e?Math.min(a,ct.LargeInitial):Math.min(a,ct.LargeMax)}function vt(e,n){var i,t=n.find((function(e){return”provider-side-nav-recommended-streams-1″===e.sectionId||”provider-side-nav-popular-streams-1″===e.sectionId})),a=null!==(i=null==t?void 0:t.streams.length)&&void 0!==i?i:ct.LargeMax;return e||a>=ct.LargeInitial?ct.SmallInitial:ct.SmallMax}!function(e){e[e.SmallInitial=3]=”SmallInitial”,e[e.SmallMax=5]=”SmallMax”,e[e.LargeInitial=6]=”LargeInitial”,e[e.LargeMax=10]=”LargeMax”}(ct||(ct={}));var pt=i(93086),ht=i(337761),ft=i(680121),gt=i(55927),kt=i(36230),yt=i(97774),St=function(){return(0,l.jsxs)(d.P,{className:”follow-channels-onboarding”,background:u.VS.Base,borderRadius:yt.Z.Large,margin:1,padding:2,textAlign:u.nO.Left,children:[(0,l.jsxs)(d.P,{className:”follow-channels-onboarding__heart-wrapper”,position:u.yX.Relative,children:[(0,l.jsx)(d.P,{className:”follow-channels-onboarding__primary-heart”,children:(0,l.jsx)(“svg”,{className:”follow-channels-onboarding__primary-heart__svg”,width:”50″,height:”44″,viewBox:”0 0 50 44″,fill:”none”,xmlns:”http://www.w3.org/2000/svg”,children:(0,l.jsx)(“path”,{fillRule:”evenodd”,clipRule:”evenodd”,d:”M25 44C25 44 11.2906 30.2123 4.175 23.056C1.50312 20.3689 0 16.72 0 12.9171C0 5.78286 5.75 0 12.8438 0H12.95C16.6625 0 20.225 1.48343 22.8531 4.12657C24.0281 5.30829 25 6.28571 25 6.28571C25 6.28571 25.9719 5.30829 27.1469 4.12657C29.775 1.48343 33.3375 0 37.05 0C37.0875 0 37.1219 0 37.1562 0C44.25 0 50 5.78286 50 12.9171C50 16.72 48.4969 20.3689 45.825 23.056C38.7094 30.2123 25 44 25 44Z”,fill:”#9146FF”})})}),(0,l.jsx)(d.P,{position:u.yX.Absolute,className:”follow-channels-onboarding__secondary-heart”,children:(0,l.jsx)(“svg”,{className:”follow-channels-onboarding__secondary-heart__svg”,width:”41″,height:”36″,viewBox:”0 0 41 36″,fill:”none”,xmlns:”http://www.w3.org/2000/svg”,children:(0,l.jsx)(“path”,{d:”M20.5 5.14286L19.7917 5.84873L20.5 6.55954L21.2083 5.84873L20.5 5.14286ZM20.5 5.14286L21.2083 5.84872L21.2084 5.8487L21.2085 5.84859L21.2089 5.84815L21.2107 5.84641L21.2175 5.83952L21.2445 5.81248L21.3479 5.70867L21.7272 5.32802L22.9688 4.08216C24.9366 2.10748 27.6031 1 30.381 1H30.3812H30.3814H30.3815H30.3817H30.3819H30.3821H30.3823H30.3824H30.3826H30.3828H30.383H30.3832H30.3833H30.3835H30.3837H30.3839H30.3841H30.3842H30.3844H30.3846H30.3848H30.385H30.3851H30.3853H30.3855H30.3857H30.3858H30.386H30.3862H30.3864H30.3866H30.3867H30.3869H30.3871H30.3873H30.3874H30.3876H30.3878H30.388H30.3882H30.3883H30.3885H30.3887H30.3889H30.3891H30.3892H30.3894H30.3896H30.3898H30.3899H30.3901H30.3903H30.3905H30.3906H30.3908H30.391H30.3912H30.3914H30.3915H30.3917H30.3919H30.3921H30.3922H30.3924H30.3926H30.3928H30.3929H30.3931H30.3933H30.3935H30.3937H30.3938H30.394H30.3942H30.3944H30.3945H30.3947H30.3949H30.3951H30.3952H30.3954H30.3956H30.3958H30.3959H30.3961H30.3963H30.3965H30.3966H30.3968H30.397H30.3972H30.3973H30.3975H30.3977H30.3979H30.398H30.3982H30.3984H30.3986H30.3987H30.3989H30.3991H30.3993H30.3994H30.3996H30.3998H30.4H30.4001H30.4003H30.4005H30.4007H30.4008H30.401H30.4012H30.4014H30.4015H30.4017H30.4019H30.4021H30.4022H30.4024H30.4026H30.4028H30.4029H30.4031H30.4033H30.4034H30.4036H30.4038H30.404H30.4041H30.4043H30.4045H30.4047H30.4048H30.405H30.4052H30.4054H30.4055H30.4057H30.4059H30.406H30.4062H30.4064H30.4066H30.4067H30.4069H30.4071H30.4073H30.4074H30.4076H30.4078H30.4079H30.4081H30.4083H30.4085H30.4086H30.4088H30.409H30.4092H30.4093H30.4095H30.4097H30.4098H30.41H30.4102H30.4104H30.4105H30.4107H30.4109H30.411H30.4112H30.4114H30.4116H30.4117H30.4119H30.4121H30.4123H30.4124H30.4126H30.4128H30.4129H30.4131H30.4133H30.4135H30.4136H30.4138H30.414H30.4141H30.4143H30.4145H30.4146H30.4148H30.415H30.4152H30.4153H30.4155H30.4157H30.4158H30.416H30.4162H30.4164H30.4165H30.4167H30.4169H30.417H30.4172H30.4174H30.4176H30.4177H30.4179H30.4181H30.4182H30.4184H30.4186H30.4187H30.4189H30.4191H30.4193H30.4194H30.4196H30.4198H30.4199H30.4201H30.4203H30.4204H30.4206H30.4208H30.421H30.4211H30.4213H30.4215H30.4216H30.4218H30.422H30.4221H30.4223H30.4225H30.4226H30.4228H30.423H30.4232H30.4233H30.4235H30.4237H30.4238H30.424H30.4242H30.4243H30.4245H30.4247H30.4248H30.425H30.4252H30.4254H30.4255H30.4257H30.4259H30.426H30.4262H30.4264H30.4265H30.4267H30.4269H30.427H30.4272H30.4274H30.4275H30.4277H30.4279H30.4281H30.4282H30.4284H30.4286H30.4287H30.4289H30.4291H30.4292H30.4294H30.4296H30.4297H30.4299H30.4301H30.4302H30.4304H30.4306H30.4307H30.4309H30.4311H30.4313H30.4314H30.4316H30.4318H30.4319H30.4321H30.4323H30.4324H30.4326H30.4328H30.4329H30.4331H30.4333H30.4334H30.4336H30.4338H30.4339H30.4341H30.4343H30.4344H30.4346H30.4348H30.4349H30.4351H30.4353H30.4354H30.4356H30.4358H30.4359H30.4361H30.4363H30.4364H30.4366H30.4368H30.4369H30.4371H30.4373H30.4375H30.4376H30.4378H30.438H30.4381H30.4383H30.4385H30.4386H30.4388H30.439H30.4391H30.4393H30.4395H30.4396H30.4398H30.44H30.4401H30.4403H30.4405H30.4406H30.4408H30.441H30.4411H30.4413H30.4415H30.4416H30.4418H30.442H30.4421H30.4423H30.4425H30.4426H30.4428H30.443H30.4431H30.4433H30.4435H30.4436H30.4438H30.444H30.4441H30.4443H30.4445H30.4446H30.4448H30.445H30.4451H30.4453H30.4454H30.4456H30.4458H30.4459H30.4461H30.4463H30.4464H30.4466H30.4468H30.4469H30.4471H30.4473H30.4474H30.4476H30.4478H30.4479H30.4481H30.4483H30.4484H30.4486H30.4488H30.4489H30.4491H30.4493H30.4494H30.4496H30.4498H30.4499H30.4501H30.4503H30.4504H30.4506H30.4508H30.4509H30.4511H30.4513H30.4514H30.4516H30.4518H30.4519H30.4521H30.4523H30.4524H30.4526H30.4528H30.4529H30.4531H30.4532H30.4534H30.4536H30.4537H30.4539H30.4541H30.4542H30.4544H30.4546H30.4547H30.4549H30.4551H30.4552H30.4554H30.4556H30.4557H30.4559H30.4561H30.4562H30.4564H30.4566H30.4567H30.4569H30.4571H30.4572H30.4574H30.4576H30.4577H30.4579H30.458H30.4582H30.4584H30.4585H30.4587H30.4589H30.459H30.4592H30.4594H30.4595H30.4597H30.4599H30.46H30.4602H30.4604H30.4605H30.4607H30.4609H30.461H30.4612H30.4614H30.4615H30.4617H30.4618H30.462H30.4622H30.4623H30.4625H30.4627H30.4628H30.463H30.4632H30.4633H30.4635H30.4637H30.4638H30.464H30.4642H30.4643H30.4645H30.4647H30.4648H30.465H30.4652H30.4653H30.4655H30.4656H30.4658H30.466H30.4661H30.4663H30.4665H30.4666H30.4668H30.467H30.4671H30.4673H30.4675H30.4676H30.4678H30.468H30.4681C35.7294 1 40 5.28043 40 10.5686C40 13.4159 38.8719 16.1474 36.8682 18.1581L26.1419 28.9218L21.6393 33.44L20.5 34.5833L19.3607 33.44L14.8581 28.9218L4.13184 18.1581C2.12808 16.1474 1 13.4159 1 10.5686C1 5.28043 5.27056 1 10.5319 1H10.619C13.3969 1 16.0634 2.10748 18.0312 4.08216L19.2728 5.32802L19.6521 5.70867L19.7555 5.81248L19.7825 5.83952L19.7893 5.84641L19.7911 5.84815L19.7915 5.84859L19.7916 5.8487L19.7917 5.84872L20.5 5.14286Z”,strokeWidth:”2″})})})]}),(0,l.jsx)(d.P,{margin:{bottom:1}}),(0,l.jsx)(ln.hE,{children:(0,h.hw)(“Follow your favorites!”,”FollowedChannelOnboarding”)}),(0,l.jsx)(d.P,{margin:{top:1},children:(0,l.jsx)(J.N,{color:u.Q1.Base,children:(0,h.hw)(“They’ll show up here for easy access!”,”FollowedChannelOnboarding”)})})]})},bt=i(445373),_t=i(480807),xt=i(14236),Ct=i(27346),wt=i(26538),Nt=i(305528),Pt=i(829002),Dt=i(908713),Tt=i(720073),It=i(238569),Ft=function(e,n,i){if(!e||!n&&!i)return[];var t=[];return n?t=e.filter((function(e){return e.id!==n})):i&&(t=e.filter((function(e){return e.login!==i}))),null!=t?t:[]},Et=i(129438),jt=i(554264),Lt=i(603707),At=function(e,n){return e&&n?(0,h.hw)(“{viewerCount, plural, one {Live with {viewerCount} viewer. You can call this user. Use the Right Arrow Key to show more information.} other {Live with {viewerCount} viewers. You can call this user. Use the Right Arrow Key to show more information.}}”,{viewerCount:n},”SideNavCard”):e?(0,h.hw)(“You can call this user. Use the Right Arrow Key to show more information.”,”SideNavCard”):(0,h.hw)(“Use the Right Arrow Key to show more information.”,”SideNavCard”)},Rt=function(e){var n=e.collapsed,i=e.isTooltipKeyboardOpener,t=e.canJoinCall,a=e.viewerCount;return(0,l.jsxs)(d.P,{display:i||n?”block”:void 0,className:”side-nav-card__link__tooltip-arrow”,children:[(0,l.jsx)(Ht,{collapsed:n,isTooltipKeyboardOpener:i}),(0,l.jsx)(un.L,{children:At(t,a)})]})},Ht=function(e){var n=e.collapsed,i=e.isTooltipKeyboardOpener;return n?null:i?(0,l.jsx)(jt.K,{}):(0,l.jsx)(Lt.R,{})},Ot=function(){return(0,l.jsxs)(d.P,{display:u.nl.Flex,flexDirection:u.bo.Row,height:”10.5rem”,children:[(0,l.jsx)(d.P,{className:”side-nav-promoted-followed-card__gradient”,minWidth:”5px”,flexShrink:0,alignItems:u.k2.Start}),(0,l.jsxs)(d.P,{width:”235px”,padding:”5px 10px 10px 5px”,children:[(0,l.jsxs)(d.P,{display:u.nl.Flex,position:u.yX.Relative,flexDirection:u.bo.Row,alignItems:u.k2.Center,flexShrink:0,justifyContent:u.A9.Between,children:[(0,l.jsxs)(d.P,{display:u.nl.Flex,flexDirection:u.bo.Row,gap:”5px”,alignItems:u.k2.Center,children:[(0,l.jsx)(d.P,{borderRadius:yt.Z.Rounded,overflow:u.nE.Hidden,minWidth:”30px”,height:”30px”,children:(0,l.jsx)(Nt.Or,{width:30,height:30})}),(0,l.jsx)(Nt.Or,{width:8,height:8}),(0,l.jsx)(d.P,{borderRadius:yt.Z.Rounded,overflow:u.nE.Hidden,minWidth:”30px”,height:”30px”,children:(0,l.jsx)(Nt.Or,{width:30,height:30})})]}),(0,l.jsx)(d.P,{margin:{bottom:1},children:(0,l.jsx)(Nt.Or,{height:20,width:35})})]}),(0,l.jsx)(d.P,{margin:{top:.5,left:.5},children:(0,l.jsx)(Nt.Or,{width:50,height:15})}),(0,l.jsx)(d.P,{margin:{top:.5,left:.5},children:(0,l.jsx)(Nt.Or,{width:100,height:15})}),(0,l.jsx)(d.P,{margin:{top:.5,left:.5},children:(0,l.jsx)(Nt.Or,{width:170,height:15})})]})]})},Mt=i(310981),Bt=function(e){return e===jn.hbb.SPONSORED},Ut=function(e){return e===jn.hbb.PROMOTED},Vt=i(515514),zt=function(e){var n=Date.parse(e);if(isNaN(n))return””;var i=Math.max(0,Math.floor((n-Date.now())/1e3)),t=Math.floor(i/86400),a=Math.floor(i/3600),r=Math.floor(i/60),o={days:t||void 0,hours:a>0&&0===t?a:void 0,minutes:0===a?r:void 0};return(0,Vt.n$)(o)},Wt=function(e){var n=Date.parse(e);return!!isNaN(n)||n0||ee||ne||O?(0,l.jsx)(Tt.F,(0,s.__assign)({},V,{addSTPromoChanges:e.addSTPromoChanges,guestStarParticipants:z,canJoin:O,hypeTrain:e.collapsed?J:null,hasCreatorPromotion:e.collapsed?ne:void 0,isDecorative:!0})):(0,l.jsx)($t,(0,s.__assign)({},e,{avatarAlt:e.collapsed&&null!==(f=e.userLogin)&&void 0!==f?f:””}));return e.collapsed?K||Y?(0,l.jsx)(d.P,(0,s.__assign)({ref:w},B,{height:”4rem”,children:(0,l.jsxs)(X.Cb,(0,s.__assign)({className:”side-nav-card__collapsed”},U,{underline:!1,children:[(0,l.jsxs)(d.P,{display:u.nl.Flex,flexDirection:u.bo.Row,height:”100%”,children:[(0,l.jsx)(d.P,{className:bn()({“side-nav-card–promoted-collapsed”:K,”side-nav-card–drop-ins-collapsed”:Y}),minWidth:”0.3rem”,alignItems:u.k2.Start}),(0,l.jsx)(d.P,{display:u.nl.Flex,justifyContent:u.A9.Center,alignItems:u.k2.Center,padding:{left:”0.3rem”},width:”100%”,children:ae}),(0,l.jsx)(un.L,{children:K?(0,h.hw)(“Sponsored”,”SideNavCard”):(0,h.hw)(“This stream is open to collaborate.”,”SideNavCard”)})]}),e.tooltipContent&&(0,l.jsx)(Rt,{collapsed:!0,displayName:e.title})]}))})):(0,l.jsx)(d.P,(0,s.__assign)({ref:w},B,{children:(0,l.jsx)(xe.S,{padding:{y:.5,x:1},display:u.nl.Flex,alignItems:u.k2.Center,flexWrap:u.I4.NoWrap,justifyContent:u.A9.Center,position:”relative”,children:(0,l.jsxs)(X.Cb,(0,s.__assign)({className:”side-nav-card”},U,{underline:!1,children:[ae,e.tooltipContent&&(0,l.jsx)(Rt,{collapsed:!0,displayName:e.title})]}))})})):K?(null===(g=e.sponsorship)||void 0===g?void 0:g.loading)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ia.Preload,{}),(0,l.jsx)(Ot,{})]}):(0,l.jsx)(d.P,(0,s.__assign)({ref:w},B,{children:(0,l.jsx)(xe.S,{padding:{right:1},display:u.nl.Flex,alignItems:u.k2.Center,flexWrap:u.I4.NoWrap,width:”100%”,children:(0,l.jsxs)(X.Cb,(0,s.__assign)({className:”side-nav-card__link side-nav-card__link–promoted-followed”},U,{underline:!1,children:[(0,l.jsx)(ia,{avatarAlt:e.avatarAlt,avatarSrc:e.avatarSrc,metadataLeft:e.metadataLeft,metadataRight:e.metadataRight,title:e.title,titleElement:e.titleElement,userLogin:e.userLogin,sponsorship:null===(k=e.sponsorship)||void 0===k?void 0:k.sponsoredSideNavChannel}),e.tooltipContent&&(0,l.jsx)(Rt,{isTooltipKeyboardOpener:T,displayName:e.title})]}))})})):(0,l.jsx)(d.P,(0,s.__assign)({ref:w},B,{children:(0,l.jsx)(xe.S,{padding:{y:Q?”0.3rem”:”0.5rem”,left:1,right:1},display:u.nl.Flex,alignItems:u.k2.Center,flexWrap:u.I4.NoWrap,width:”100%”,children:(0,l.jsxs)(X.Cb,(0,s.__assign)({className:bn()(“side-nav-card__link”,{“side-nav-card__link–sponsored”:Q,”side-nav-card__link–drop-ins”:Y,”side-nav-card–promoted-recommended”:e.isPromotedInRecommendedSection,”side-nav-card__link–offline”:e.offline,”side-nav-card__link–empty-category”:!e.metadataLeft})},(0,Ct.Fh)(e),U,{underline:!1,children:[ae,(0,l.jsxs)(d.P,{ellipsis:!0,margin:{left:1},width:”100%”,children:[(0,l.jsxs)(d.P,{display:u.nl.Flex,justifyContent:u.A9.Between,children:[(0,l.jsxs)(d.P,{ellipsis:!0,”data-a-target”:”side-nav-card-metadata”,width:”100%”,children:[(0,l.jsx)(Jt,(0,s.__assign)({},$)),(0,l.jsx)(Kt,{content:e.metadataLeft}),(0,Dt.Q)()&&e.costreamDetails&&(0,l.jsx)(Qt,{costreamDetails:e.costreamDetails}),e.isPromotedInRecommendedSection&&(0,l.jsx)(Xt,{}),Q&&e.sponsorship?(0,l.jsx)(na,(0,s.__assign)({},e.sponsorship)):Y&&(0,l.jsx)(wt.a,{label:(0,h.hw)(“Joinable”,”SideNavCard”),type:wt.y.Info})]}),(0,l.jsx)(d.P,{className:”side-nav-card__live-status”,flexShrink:0,margin:{left:.5},”data-a-target”:”side-nav-live-status”,display:E?”flex”:void 0,alignItems:E?u.k2.Center:void 0,children:E?(0,l.jsx)(ta,{calleeChannelID:e.userID||””,isFavorite:!!(null===(y=e.activeGuestStarCollab)||void 0===y?void 0:y.isFavorite),sessionID:(null===(b=null===(S=e.activeGuestStarCollab)||void 0===S?void 0:S.session)||void 0===b?void 0:b.id)||””,liveGuestsCount:(null===(x=null===(_=e.activeGuestStarCollab)||void 0===_?void 0:_.session)||void 0===x?void 0:x.guests.length)||null,hypeTrain:J}):e.metadataRight})]}),ee?(null===(C=e.activeHypeTrain)||void 0===C?void 0:C.loading)?(0,l.jsx)(Nt.Or,{lineCount:1}):(0,l.jsx)(Et.b,{hypeTrain:J,location:”LeftNav”}):null,ie&&!!e.creatorPromotionActivation&&(0,l.jsx)(qt,{promotionEndsAt:e.creatorPromotionActivation.endsAt})]}),e.tooltipContent&&(0,l.jsx)(d.P,{display:u.nl.Flex,justifyContent:u.A9.Between,children:(0,l.jsx)(Rt,{isTooltipKeyboardOpener:T,displayName:e.title,canJoinCall:E,viewerCount:e.viewerCount})})]}))})}))})),ra=i(43034),oa=i(123795),sa=i(193836),la=function(e){var n,i={trackingId:e.trackingId,userLogin:e.userLogin||””,category:e.category,collapsed:e.collapsed,index:e.index},t=(0,_t.X)({onFirstImpression:function(){var n;return null===(n=e.onImpression)||void 0===n?void 0:n.call(e,i)},percentage:75,impressionKey:e.category.id}).elementRef,a=(0,l.jsx)(ua,{count:e.category.viewersCount||0}),r=(0,l.jsx)(ca,{tags:(null===(n=e.category.tags)||void 0===n?void 0:n.map((function(e){return e.localizedName})))||[]}),o=(0,l.jsx)(da,{text:e.category.displayName});return(0,l.jsx)(“div”,{ref:t,children:(0,l.jsx)(aa,{avatarAlt:(0,h.hw)(“Watch {game} live streams”,{game:e.category.displayName},”SideNavCategory”),avatarSrc:e.category.avatarURL,isRectangularAvatar:!0,linkTo:”/directory/category/”.concat(e.category.slug),collapsed:e.collapsed,userLogin:e.userLogin||””,viewerCount:e.category.viewersCount,title:e.category.displayName,metadataLeft:r,metadataRight:a,tooltipContent:o,onClick:function(){e.onClick&&e.onClick(i)}})})},da=function(e){return(0,l.jsx)(d.P,{display:”flex”,justifyContent:”flex-start”,fontWeight:”semibold”,children:(0,l.jsx)(d.P,{padding:.5,children:(0,l.jsx)(J.N,{children:e.text})})})},ua=function(e){return(0,l.jsxs)(d.P,{display:”flex”,alignItems:”center”,children:[(0,l.jsx)(bt.T,{}),(0,l.jsxs)(d.P,{margin:{left:.5},children:[(0,l.jsx)(J.N,{color:”alt”,type:”span”,fontSize:u.Z4.Size6,”aria-hidden”:”true”,children:(0,h.H2)(e.count,{maximumFractionDigits:(0,xt.M)(e.count)})}),(0,l.jsx)(un.L,{children:(0,h.hw)(“{viewerCount, plural, one {{viewerCountFormatted} live viewer} other {{viewerCountFormatted} live viewers}}”,{viewerCount:e.count,viewerCountFormatted:(0,h.H2)(e.count,{maximumFractionDigits:(0,xt.M)(e.count)})},”SideNavCategory”)})]})]})},ca=function(e){var n=c.useState(null),i=n[0],t=n[1],a=c.useRef(null);c.useLayoutEffect((function(){if(a.current){var e=a.current.getBoundingClientRect().width;t(e)}}),[]);var r=(0,oa.I)(i||0,e.tags);return(0,l.jsx)(d.P,{className:”side-nav-card__metadata”,padding:{right:.5},display:”flex”,ref:a,children:e.tags.slice(0,r).map((function(e,n,i){var t=n===i.length-1;return(0,l.jsx)(ra.b,{tagName:e,cachedWidth:(0,sa.E)(e),isLast:t,children:(0,l.jsx)(J.N,{color:”alt-2″,fontSize:u.Z4.Size6,lineHeight:”heading”,ellipsis:!0,type:”span”,children:t?e:(0,h.hw)(“{tag}, “,{tag:e},”SideNavCategory”)})},e)}))})},ma=i(913140),va=function(e){var n=e.creatorLogin;return(0,l.jsx)(d.P,{children:(0,l.jsx)(pa,{login:n})})},pa=function(e){var n=e.login,i=e.showAsLink,t=(0,h.hw)(“See all recent videos”,”SideNavOfflineChannelTooltipComponent”),a=(0,Qi.VV)(“/”.concat(n,”/videos?filter=all”));return i?(0,l.jsx)(d.P,{display:”flex”,justifyContent:”flex-start”,fontWeight:”semibold”,children:(0,l.jsx)(X.Cb,{linkTo:a,underline:!1,children:(0,l.jsx)(d.P,{textAlign:”center”,padding:.5,children:(0,l.jsx)(J.N,{transform:”uppercase”,children:t})})})}):(0,l.jsx)(Fi.tD,{linkTo:a,variant:Fi.hJ.Alpha,children:(0,l.jsx)(d.P,{textAlign:u.nO.Center,padding:.5,children:(0,l.jsx)(J.N,{color:u.Q1.Base,children:t})})})},ha=function(e){var n=e.collapsed,i=e.contentIndex,t=e.onClick,a=e.onImpression,r=e.videoConnection,o=e.trackingContext,d=(0,s.__rest)(e,[“collapsed”,”contentIndex”,”onClick”,”onImpression”,”videoConnection”,”trackingContext”]),m=(0,c.useMemo)((function(){return(0,ot.d)(r.user.login,r.user.displayName,!0)}),[r.user.displayName,r.user.login]),v=(0,c.useMemo)((function(){return(0,ot.d)(r.user.login,r.user.displayName)}),[r.user.displayName,r.user.login]),p=(0,c.useMemo)((function(){return{pathname:”/”.concat(r.user.login),state:{content:o.content,medium:”twitch_socialcolumn”,channelView:ma.n.Home}}}),[o.content,r.user.login]),f=(0,l.jsx)(J.N,{color:u.Q1.Alt,type:dn.M2.Span,fontSize:u.Z4.Size6,children:(0,h.hw)(“Offline”,”SideNavChannel”)}),g=r.user.login?(0,l.jsx)(va,{trackingContext:o,creatorLogin:r.user.login}):void 0,k=(0,_t.X)({onFirstImpression:function(){return null==a?void 0:a({videoConnection:r,contentIndex:i,collapsed:n})},percentage:75,impressionKey:r.modelTrackingID}).elementRef;return(0,l.jsx)(“div”,{ref:k,children:(0,l.jsx)(aa,(0,s.__assign)({avatarAlt:m,avatarSrc:r.user.profileImageURL,userLogin:r.user.login,userID:r.user.id,collapsed:n,linkTo:p,metadataLeft:null,metadataRight:f,onClick:function(){t({videoConnection:r,contentIndex:i,collapsed:n})},offline:!0,title:m,titleElement:v,tooltipContent:g},(0,Ct.Fh)(d)))})},fa=i(380878),ga=i(211859),ka=i(606840),ya=function(e){var n,i,t,a=e.stream,r=null!==(n=a.viewersCount)&&void 0!==n?n:0;return(0,Dt.Q)()&&(null===(i=a.costreamDetails)||void 0===i?void 0:i.totalViewersCount)&&(null===(t=a.costreamDetails)||void 0===t?void 0:t.role)===jn.Fm$.ORGANIZER?r=a.costreamDetails.totalViewersCount:(0,ka.W)()&&a.collaborationViewersCount&&(r=a.collaborationViewersCount),(0,l.jsxs)(d.P,{display:u.nl.Flex,alignItems:u.k2.Center,children:[Sa(a),(0,l.jsxs)(d.P,{margin:{left:.5},children:[(0,l.jsx)(J.N,{color:u.Q1.Alt,type:dn.M2.Span,fontSize:u.Z4.Size6,”aria-hidden”:”true”,children:(0,h.H2)(r,{maximumFractionDigits:(0,xt.M)(r)})}),(0,l.jsx)(un.L,{children:(0,ga.r6)(r)})]})]})},Sa=function(e){return e.id?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(bt.T,{}),(0,l.jsx)(un.L,{children:(0,h.hw)(“Live”,”SideNavMetadataRight”)})]}):null},ba=function(e,n,i){return n&&!!i||e.canDropIn||e.canJoinStatus===jn.jSm.AVAILABLE},_a=i(100563),xa=function(e){var n,i,t=e.promotionEndsAt;return(0,l.jsxs)(d.P,{display:”flex”,alignItems:”flex-start”,children:[(0,l.jsx)(Zt,{isTooltip:!0}),(0,l.jsx)(J.N,{color:”alt-2″,fontSize:u.Z4.Size6,children:(n=t,i=zt(n),””===i?(0,h.hw)(“35% off 5+ gift subs. Terms apply.”,”SideNavCreatorPromotions”):(0,h.hw)(“35% off 5+ gift subs • Ends in {duration}. Terms apply.”,{duration:i},”SideNavCreatorPromotions”))})]})},Ca=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,s.__extends)(n,e),n.prototype.render=function(){var e=null,n=null;this.props.collapsed&&(e=(0,l.jsx)(bt.T,{}),n=(0,h.hw)(“Live”,”OnlineSideNavChannelTooltip”));var i=this.props.gameName?””.concat(this.props.channelDisplayName,” · “).concat(this.props.gameName):this.props.channelDisplayName;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(d.P,{className:”online-side-nav-channel-tooltip__body”,padding:{x:.5},children:[this.props.collapsed&&(0,l.jsx)(J.N,{color:u.Q1.Link,ellipsis:!0,children:i}),(0,l.jsx)(J.N,{color:u.Q1.Base,lines:2,children:this.props.streamTitle}),e&&(0,l.jsxs)(d.P,{display:u.nl.Flex,alignItems:u.k2.Center,children:[e,(0,l.jsx)(xe.S,{padding:{left:.5},children:(0,l.jsxs)(J.N,{className:”online-side-nav-channel-tooltip__text”,color:u.Q1.Alt2,type:dn.M2.Span,children:[n,this.props.collapsed&&this.props.viewership?” | “.concat((0,h.hw)(“{viewers, plural, one {{formattedViewers} viewer} other {{formattedViewers} viewers}}”,{viewers:this.props.viewership,formattedViewers:(0,h.H2)(this.props.viewership,{maximumFractionDigits:(0,xt.M)(this.props.viewership)})},”OnlineSideNavChannelTooltip”)):null,this.props.isPromoted?” | “.concat((0,Yt.hF)()):null]})})]}),(0,_a.L8)()&&(0,l.jsx)(d.P,{padding:{top:.5},children:(0,l.jsx)(Et.b,{hypeTrain:this.props.hypeTrain,location:”LeftNav”})}),this.props.creatorPromotionActivation&&!Wt(this.props.creatorPromotionActivation.endsAt)&&(0,l.jsx)(d.P,{margin:{top:.5},children:(0,l.jsx)(xa,{promotionEndsAt:this.props.creatorPromotionActivation.endsAt})})]})})},n}(c.Component),wa=g.x.wrap((function(){return i.e(71591).then(i.bind(i,511020))}),”SideNavOnlineChannelSponsoredTooltip”),Na=g.x.wrap((function(){return Promise.all([i.e(10664),i.e(18271),i.e(28951),i.e(18697),i.e(46400),i.e(15533)]).then(i.bind(i,471604))}),”SideNavOnlineChannelGuestStarTooltip”),Pa=g.x.wrap((function(){return Promise.all([i.e(44299),i.e(61653)]).then(i.bind(i,659815))}),”SideNavOnlineChannelCostreamingTooltip”),Da=function(e){var n,i,t,a,r,o=e.collapsed,d=e.sponsorship,u=e.creatorPromotionActivation,c=e.stream,m=e.formattedDisplayName,v=e.isHostingGuestStar,p=e.guestStarChannelCollab,h=e.isPromotedInRecommendedSection,f=e.guests,g=e.guestStarLocalUser,k=e.addSTPromoChanges,y=e.hypeTrain,S=e.costreamDetails,b=(null===(i=null===(n=c.content.broadcaster)||void 0===n?void 0:n.broadcastSettings)||void 0===i?void 0:i.title)||””,_={viewership:c.content.viewersCount||0,channelDisplayName:c.user.displayName||””,gameName:null===(t=c.content.game)||void 0===t?void 0:t.displayName,isPromoted:h};return(null==d?void 0:d.sponsoredSideNavChannel)?(0,l.jsx)(wa,(0,s.__assign)({collapsed:o,sponsorship:null==d?void 0:d.sponsoredSideNavChannel,channelPrimaryColor:c.user.primaryColorHex,avatarAlt:m,avatarSrc:c.user.profileImageURL,userLogin:c.user.login},_)):(0,Dt.Q)()&&S?(0,l.jsx)(Pa,{costreamDetails:S,channelLogin:c.user.login}):p&&ba(p,v,f)?(0,l.jsx)(Na,(0,s.__assign)({guests:f,guestStarLocalUser:g,streamTitle:b,canDropIn:p.canDropIn,canJoinCall:p.canJoinStatus===jn.jSm.AVAILABLE,channelID:c.user.id,collapsed:o,userIsFavorite:p.isFavorite,guestStarSessionID:(null===(a=p.session)||void 0===a?void 0:a.id)||””,liveGuestsCount:(null===(r=p.session)||void 0===r?void 0:r.guests.length)||null,addSTPromoChanges:k,socialCue:c.socialCue,hypeTrain:y},_)):b||u||o?(0,l.jsx)(Ca,(0,s.__assign)({streamTitle:b,collapsed:o,hypeTrain:y,creatorPromotionActivation:u},_)):null},Ta=function(e){var n,i,t=e.collapsed,a=e.sponsorship,r=e.creatorPromotionActivation,o=e.stream,s=e.isHostingGuestStar,l=e.guestStarChannelCollab,d=e.guests;return Boolean((null==a?void 0:a.sponsoredSideNavChannel)||l&&ba(l,s,d)||(null===(i=null===(n=o.content.broadcaster)||void 0===n?void 0:n.broadcastSettings)||void 0===i?void 0:i.title)||r||t||(null==o?void 0:o.costreamDetails))},Ia=function(e){var n,i,t,a=e.activeGuestStarCollab,r=e.activeHypeTrain,o=e.collapsed,d=e.contentIndex,u=e.onClick,m=e.onHover,v=e.onImpression,p=e.stream,h=e.trackingContext,f=e.replacementIcon,g=e.sponsorship,k=e.creatorPromotionActivation,y=(0,s.__rest)(e,[“activeGuestStarCollab”,”activeHypeTrain”,”collapsed”,”contentIndex”,”onClick”,”onHover”,”onImpression”,”stream”,”trackingContext”,”replacementIcon”,”sponsorship”,”creatorPromotionActivation”]),S=(0,c.useMemo)((function(){return(0,ot.d)(p.user.login,p.user.displayName,!0)}),[p.user.displayName,p.user.login]),b=(0,c.useMemo)((function(){return(0,ot.d)(p.user.login,p.user.displayName)}),[p.user.displayName,p.user.login]),_=(0,fa.o)(p.content.freeformTags||[],null===(n=p.content.game)||void 0===n?void 0:n.id),x=Ut(p.channelLabel)&&”provider-side-nav-recommended-streams-1″===p.sectionId,C={pathname:”/”.concat(p.user.login),state:(0,s.__assign)((0,s.__assign)({},h),{medium:”twitch_socialcolumn”,channelView:ma.n.Watch,item_tracking_id:p.modelTrackingID,content_index:d})},w=!!(null==a?void 0:a.session)&&Ci(),N=null;(null==a?void 0:a.session)&&(N=(0,It.t)(null==a?void 0:a.session));var P=c.useMemo((function(){return Ft(null==N?void 0:N.guests,p.user.id)}),[N,p.user.id]),D=null==N?void 0:N.guests.find((function(e){return e.id===p.user.id})),T=null===(i=null==a?void 0:a.session)||void 0===i?void 0:i.id;!function(e,n,i){var t=c.useRef(!1);c.useEffect((function(){t.current?i||(t.current=!1):i&&(t.current=!0,$n(e,n,i))}),[n,i,e])}(p,d,T);var I=(0,_t.X)({onFirstImpression:function(){null==v||v({stream:p,contentIndex:d,sponsorship:null==g?void 0:g.sponsoredSideNavChannel,isDropIn:null==a?void 0:a.canDropIn,guestStarSessionID:T,collapsed:o,collaborationEligibility:null==a?void 0:a.canJoinStatus})},percentage:75,impressionKey:p.modelTrackingID}).elementRef,F=p.content.game?p.content.game.displayName:””,E=f||(0,l.jsx)(ya,{stream:p.content});return(0,l.jsx)(“div”,{ref:I,children:(0,l.jsx)(aa,(0,s.__assign)({activeGuestStarCollab:a,activeHypeTrain:r,addSTPromoChanges:!!_,avatarAlt:S,avatarSrc:p.user.profileImageURL,channelLabel:p.channelLabel,collapsed:o,linkTo:C,metadataLeft:F,metadataRight:E,offline:!1,onClick:function(){u({stream:p,contentIndex:d,sponsorship:null==g?void 0:g.sponsoredSideNavChannel,guestStarSessionID:T,isDropIn:null==a?void 0:a.canDropIn,collapsed:o,collaborationEligibility:null==a?void 0:a.canJoinStatus})},onHover:function(){null==m||m({stream:p,contentIndex:d,sponsorship:null==g?void 0:g.sponsoredSideNavChannel,isDropIn:null==a?void 0:a.canDropIn,guestStarSessionID:T,collapsed:o})},primaryColorHex:p.user.primaryColorHex,title:S,titleElement:b,tooltipContent:Ta({collapsed:o,stream:p,sponsorship:g,creatorPromotionActivation:k,isHostingGuestStar:w,guestStarChannelCollab:a,guests:P})?(0,l.jsx)(Da,{collapsed:o,stream:p,formattedDisplayName:S,isPromotedInRecommendedSection:x,sponsorship:g,creatorPromotionActivation:k,isHostingGuestStar:w,guestStarChannelCollab:a,guests:P,guestStarLocalUser:D,addSTPromoChanges:!!_,hypeTrain:null!==(t=null==r?void 0:r.hypeTrainStatus)&&void 0!==t?t:void 0,costreamDetails:p.costreamDetails}):null,userLogin:p.user.login,userID:p.user.id,viewerCount:p.content.viewersCount,isPromotedInRecommendedSection:x,sponsorship:g,creatorPromotionActivation:k,costreamDetails:p.costreamDetails},(0,Ct.Fh)(y)))})},Fa=function(){return(0,l.jsx)(pt.E,{icon:ht.J,type:pt._.Brand,size:30})},Ea=function(e){var n;return null===(n=e.user.channel)||void 0===n||n.activeStreamEventCelebration,!1},ja=function(e){return Ea(e)&&(0,b.fX)(ft.R,void 0)?(0,l.jsx)(Fa,{}):null},La=function(e){return Ea(e)?ii:ei},Aa=function(e){return Ea(e)?Jn:Xn},Ra=function(e){var n,i,t,a=e.activeGuestStarCollab,r=e.activeHypeTrain,o=e.collapsed,s=e.stream,d=e.index,u=(0,gt.Di)({channelLogin:s.user.login,skipSubSubProgress:!0,skip:!(Rn(s.sectionId)&&(t=s.channelLabel,Bt(t)||Ut(t)))}),c=function(e,n,i){var t=(null==e?void 0:e.subsidizedSubscriptions)||(null==e?void 0:e.channelSkin);if(t){var a=t.activationProgression,r=t.campaignInstance.advertiser,o=t.__typename;return””===r.name||””===r.imageAsset.darkModeURL&&””===r.imageAsset.lightModeURL?{sponsoredSideNavChannel:null,loading:i}:{sponsoredSideNavChannel:{brandHex:t.campaignInstance.advertiser.colorHexCode||”#FFF”,brandLogoDarkMode:r.imageAsset.darkModeURL,brandLogoLightMode:r.imageAsset.lightModeURL,brandName:r.name,isPromoted:Ut(n),sponsorshipCampaignID:a,sponsorshipFacet:”SubsidizedSubscriptions”===o?Mt.Q.SUBSIDIZED_SUBSCRIPTIONS:Mt.Q.CHANNEL_SKINS},loading:i}}return{sponsoredSideNavChannel:null,loading:i}}(null===(i=null===(n=u.data)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.sponsorships,s.channelLabel,u.loading),m=(0,kt.F)({channelID:s.user.id,skip:!(s.user.login&&s.user.displayName&&Rn(s.sectionId)&&(0,b.fX)(“hype_plane_leftnav_ff”))});return s.user.login&&s.user.displayName?(0,l.jsx)(Ia,{activeGuestStarCollab:a,activeHypeTrain:r,collapsed:o,contentIndex:d,”data-a-id”:”followed-channel-“.concat(d),”data-test-selector”:”followed-channel”,onClick:La(s),onHover:ni,onImpression:Aa(s),stream:s,trackingContext:{content:”followed_channels”},replacementIcon:ja(s),sponsorship:c,creatorPromotionActivation:m.creatorPromotionActivation}):null},Ha=function(e){var n=e.collapsed,i=e.videoConnection,t=e.index;return(0,l.jsx)(ha,{collapsed:n,contentIndex:t,”data-a-id”:”followed-channel-“.concat(t),”data-test-selector”:”followed-channel”,onClick:ri,onImpression:ai,trackingContext:{content:”followed_channels”},videoConnection:i})},Oa=function(e){var n,i,t=e.activeGuestStarCollab,a=e.activeHypeTrain,r=e.collapsed,o=e.stream,s=e.index;return(null===(n=o.user)||void 0===n?void 0:n.login)&&(null===(i=o.user)||void 0===i?void 0:i.displayName)?(0,l.jsx)(Ia,{activeGuestStarCollab:t,activeHypeTrain:a,collapsed:r,contentIndex:s,stream:o,trackingContext:{content:”recommended_channels”},”data-a-id”:”recommended-channel-“.concat(s),”data-test-selector”:”recommended-channel”,onClick:ei,onImpression:Xn,replacementIcon:ja(o)}):null},Ma=function(e){var n=e.activeGuestStarCollab,i=e.activeHypeTrain,t=e.collapsed,a=e.stream,r=e.index;return a.user.login&&a.user.displayName?(0,l.jsx)(Ia,{activeGuestStarCollab:n,activeHypeTrain:i,collapsed:t,contentIndex:r,stream:a,trackingContext:{content:”popular_channels”},”data-a-id”:”popular-channel-“.concat(r),”data-test-selector”:”popular-channel”,onClick:La(a),onImpression:Aa(a),replacementIcon:ja(a)}):null},Ba=function(e){var n,i,t=e.activeGuestStarCollab,a=e.activeHypeTrain,r=e.collapsed,o=e.stream,s=e.index;return(null===(n=o.user)||void 0===n?void 0:n.login)&&(null===(i=o.user)||void 0===i?void 0:i.displayName)?(0,l.jsx)(Ia,{activeGuestStarCollab:t,activeHypeTrain:a,collapsed:r,contentIndex:s,stream:o,trackingContext:{content:”recommended_collab_channels”},”data-a-id”:”recommended-collab-channel-“.concat(s),”data-test-selector”:”recommended-collab-channel”,onClick:La(o),onHover:ni,onImpression:Aa(o),replacementIcon:ja(o)}):null},Ua=function(e){var n,i,t,a,r=e.activeGuestStarCollab,o=e.activeHypeTrain,s=e.collapsed,d=e.stream,u=e.index;return(null===(n=d.user)||void 0===n?void 0:n.login)&&(null===(i=d.user)||void 0===i?void 0:i.displayName)&&(null===(a=null===(t=d.content)||void 0===t?void 0:t.broadcaster)||void 0===a?void 0:a.broadcastSettings)?(0,l.jsx)(Ia,{activeGuestStarCollab:r,activeHypeTrain:o,collapsed:s,contentIndex:u,stream:d,trackingContext:{content:”similar_channels”},”data-a-id”:”similarity-channel-“.concat(u),”data-test-selector”:”similarity-channel”,onClick:La(d),onImpression:Aa(d),replacementIcon:ja(d)}):null},Va=function(e){var n=e.collapsed,i=e.isLoggedIn;return n||!i?null:(0,l.jsx)(St,{})},za=function(e){var n=e.activeGuestStarCollab,i=e.activeHypeTrain,t=e.collapsed,a=e.stream,r=e.index;return a.user.login&&a.user.displayName?(0,l.jsx)(Ia,{activeGuestStarCollab:n,activeHypeTrain:i,collapsed:t,contentIndex:r,stream:a,trackingContext:{content:”side_nav”},”data-a-id”:”side-nav-online-channel-“.concat(r),”data-test-selector”:”side-nav-online-channel”,onClick:La(a),onHover:ni,onImpression:Aa(a),replacementIcon:ja(a)}):null},Wa=function(e){var n=e.collapsed,i=e.videoConnection,t=e.index;return(0,l.jsx)(ha,{collapsed:n,contentIndex:t,”data-a-id”:”side-nav-offline-channel-“.concat(t),”data-test-selector”:”side-nav-offline-channel”,onClick:ri,onImpression:ai,trackingContext:{content:”side_nav”},videoConnection:i})},Ga=function(){return null},qa=function(e){var n;return(null===(n=e.category)||void 0===n?void 0:n.displayName)?(0,l.jsx)(la,(0,s.__assign)({“data-a-id”:”category-“.concat(e.index),”data-test-selector”:”category”,onClick:si,onImpression:oi},e)):null},Za=function(e){return function(e){return e.streams.length+e.offlineChannels.length===0&&e.categories.length>0}(e)?dt({OnlineChannelRenderer:Ga,CategoryRenderer:qa,getInitialDisplayAmount:function(){return ct.LargeInitial},getMaxDisplayCount:function(){return ct.LargeMax},collapsedIcon:it.K}):dt({OnlineChannelRenderer:za,OfflineChannelRenderer:Wa,getMaxDisplayCount:function(){return ct.LargeMax},getInitialDisplayAmount:ut})},Qa=function(e){var n,i=e.currentUser,t=e.followedSectionSortConfig;return(n={})[“provider-side-nav-followed-channels-1”]=dt({sort:t,pubsub:Ka(i),OnlineChannelRenderer:Ra,OfflineChannelRenderer:Ha,EmptySectionRenderer:Va,collapsedIcon:tt.s,getInitialDisplayAmount:function(e,n){return function(e){var n=e.find((function(e){return Rn(e.sectionId)}));if(!n)return 0;for(var i=Math.min(n.streams.length+n.offlineChannels.length,12),t=0,a=0;a=5)||n.streams[a]);a++);return t}(n)}}),n[“provider-suggested-collaborators-sidenav-1”]=dt({OnlineChannelRenderer:Ba,getMaxDisplayCount:function(){return ct.SmallMax},collapsedIcon:zi.T,getInitialDisplayAmount:vt}),n[“provider-side-nav-recommended-streams-1”]=dt({OnlineChannelRenderer:Oa,getMaxDisplayCount:function(){return ct.LargeMax},getInitialDisplayAmount:mt}),n[“provider-side-nav-popular-streams-1”]=dt({OnlineChannelRenderer:Ma,getMaxDisplayCount:function(){return ct.LargeMax},getInitialDisplayAmount:mt}),n[“provider-side-nav-similar-streamer-currently-watching-1″]=dt({OnlineChannelRenderer:Ua,getMaxDisplayCount:function(){return ct.LargeMax},getInitialDisplayAmount:vt}),n},Ka=function(e){return e?[{topic:(0,at.dl)((null==e?void 0:e.id)||””),skip:!e,handler:function(e,n){(0,n.refetchSections)()}},{topic:(0,at.CH)((null==e?void 0:e.id)||””),skip:!e,handler:function(e,n){return(0,n.refetchSections)()}}]:[]},Ya=(0,mi.U)({name:”SideNavPersonalSectionsComponent”,category:”discover”}).Available,Xa=function(e){var n=e.collapsed,i=e.isLoggedIn,t=e.sectionsConfig,a=ui().sections,r=[],o=[],s=!1;return a.forEach((function(e){!function(e){return 0===Zn(e)}(e)?(o.push(e),Hn(e.sectionId)&&(s=!0)):r.push(e)})),(0,l.jsxs)(ki,{children:[o.map((function(e){var a,r=null!==(a=t[e.sectionId])&&void 0!==a?a:Za(e);return(0,l.jsx)(Ya,{children:(0,l.jsx)(nt,{section:e,collapsed:n,isLoggedIn:i,config:r,hasRecommendedCollabSection:s})},e.sectionId)})),r.map((function(e){var a,r=(null!==(a=t[e.sectionId])&&void 0!==a?a:Za(e)).EmptySectionRenderer;if(r)return(0,l.jsx)(Ya,{children:(0,l.jsx)(r,{collapsed:n,isLoggedIn:i})},e.sectionId)}))]})},$a=i(384391),Ja=i.n($a),er=(0,Y.W)(“SideNavPersonalSections”)((function(e){var n=(0,r.d4)((function(e){return{isLoggedIn:(0,o.M3)(e),currentUser:(0,o.wz)(e)}}),r.bN),i=n.isLoggedIn,t=n.currentUser,a=xn.VIEWERS_DESCENDING,d=(0,wn.G)();d&&(a=xn.RECOMMENDED);var u=c.useState(d?h.x2.storage.get(“squirtle_brainy_beyonce_option”,a):a),m=u[0],v=u[1],p=c.useCallback((function(e){v(e),h.x2.storage.set(“squirtle_brainy_beyonce_option”,e)}),[]),f=(0,Ge.N)(),g=(0,we.h5)(),k=(null==f?void 0:f.channelLogin)||(null==g?void 0:g.channelLogin)||null,y=c.useMemo((function(){return Qa({currentUser:t,followedSectionSortConfig:{type:m,setSortType:p}})}),[t,m,p]),S=function(e,n,i){var t,a,r,o,l=Ye(),d={recommendationContext:(0,s.__assign)({platform:”web”,clientApp:h.x2.session.clientApp,location:null===(t=h.E5.getLastPageview())||void 0===t?void 0:t.location,referrerDomain:null===(a=h.E5.getLastPageview())||void 0===a?void 0:a.referrer_domain,viewportHeight:null===(r=h.E5.getLastPageview())||void 0===r?void 0:r.viewport_height,viewportWidth:null===(o=h.E5.getLastPageview())||void 0===o?void 0:o.viewport_width},l)};return e&&(i===xn.VIEWERS_DESCENDING?d.followSortOrder=”CCV”:d.followSortOrder=”RECS”),n&&(d.contextChannelName=n),{input:d,creatorAnniversariesFeature:!1,withFreeformTags:(0,Nn.N)(),isLoggedIn:e}}(i,k,m===xn.ALPHABETICAL?a:m),b=function(e){var n=e.variables,i=(0,D.IT)(Ja(),{pollInterval:Wn,errorPolicy:”no-cache-write”,fetchPolicy:”network-only”,variables:n}),t=i.data,a=i.loading,r=i.refetch;return{data:t,loading:a,error:!a&&!t,refetchSections:(0,c.useCallback)((function(){r()}),[r])}}({variables:S}),_=b.data,x=b.loading,C=b.error,w=b.refetchSections;return(0,c.useEffect)((function(){x&&!C||e.latencyTracking.reportInteractive()}),[C,x,e.latencyTracking]),_?(0,l.jsx)(Pn.Y,{isNonCritical:!0,children:(0,l.jsx)(ci,{data:_,refetchSections:w,children:(0,l.jsx)(Xa,{collapsed:e.collapsed,isLoggedIn:i,sectionsConfig:y})})}):null})),nr=i(564139),ir=i(792486),tr=i(937471),ar=i(952332),rr=i(693523),or=.7,sr=rr.I4.div(vr||(vr=(0,s.__makeTemplateObject)([“\n position: absolute;\n width: “,”rem;\n height: “,”rem;\n margin-left: “,”rem;\n margin-top: “,”rem;\n border-radius: “,”rem;\n background: var(–color-background-alt);\n”],[“\n position: absolute;\n width: “,”rem;\n height: “,”rem;\n margin-left: “,”rem;\n margin-top: “,”rem;\n border-radius: “,”rem;\n background: var(–color-background-alt);\n”])),(function(e){return 3+or*(e.avatars-1)+.4}),3.4,-.2,-.2,1.7),lr=rr.I4.div(pr||(pr=(0,s.__makeTemplateObject)([“\n background: “,”;\n position: absolute;\n width: “,”rem;\n height: “,”rem;\n border-radius: “,”rem;\n margin-top: “,”rem;\n margin-left: “,”rem;\n”],[“\n background: “,”;\n position: absolute;\n width: “,”rem;\n height: “,”rem;\n border-radius: “,”rem;\n margin-top: “,”rem;\n margin-left: “,”rem;\n”])),(function(e){return e.unseen?”linear-gradient(212.77deg,var(–color-twitch-purple) 35.22%,var(–color-deprecated-brand-accent-blueberry) 57.72%,var(–color-deprecated-brand-accent-arctic) 83.48%,var(–color-deprecated-brand-accent-fiji) 89.61%)”:”var(–color-hinted-grey-6);”}),(function(e){return 3+or*(e.avatars-1)+.8}),3.8,1.9,-.4,-.4),dr=rr.I4.div(hr||(hr=(0,s.__makeTemplateObject)([“\n position: absolute;\n margin-left: “,”rem;\n margin-top: “,”rem;\n width: “,”rem;\n height: “,”rem;\n border-radius: 100%;\n background: var(–color-background-alt);\n”],[“\n position: absolute;\n margin-left: “,”rem;\n margin-top: “,”rem;\n width: “,”rem;\n height: “,”rem;\n border-radius: 100%;\n background: var(–color-background-alt);\n”])),-.2,-.2,3.4,3.4),ur=function(e){var n=cr(e.previews);return(0,c.useEffect)((function(){!function(e,n){var i,t=h.E5.getLastPageview();1===n.length?fr({channel_id:null===(i=n[0].story)||void 0===i?void 0:i.creator.id,location:null==t?void 0:t.location,item_subsection:e?”unseen_stories”:”seen_stories”}):fr({location:null==t?void 0:t.location,item_subsection:e?”unseen_stories”:”seen_stories”})}(n,e.previews)}),[n,e.previews]),e.previews.length<=0?(0,l.jsx)(d.P,{}):(0,l.jsx)(d.P,{children:mr(n,e.previews.slice(0,Math.min(e.previews.length,4)))})};function cr(e){for(var n=0,i=e;nTwitch Privacy Notice and the Amazon Privacy Notice. You can revoke this authorization at any time from your Connections page.”,{“x:twitchPrivacy”:function(e){return(0,l.jsx)(X.Cb,{linkTo:”https://legal.twitch.com/legal/privacy-policy”,targetBlank:!0,children:e})},”x:amazonPrivacy”:function(e){return(0,l.jsx)(X.Cb,{linkTo:”https://www.amazon.com/gp/help/customer/display.html?nodeId=GX7NJQ4ZB8MHFRNJ”,targetBlank:!0,children:e})},”x:connections”:function(e){return(0,l.jsx)(X.Cb,{linkTo:(0,Qi.VV)(“settings/connections”),targetBlank:!0,children:e})}},”PrimeLinkConfirm”)})]})})):null},ro=i(418460),oo=i(705371),so=i(303621),lo=function(){var e=[{icon:(0,l.jsx)(ro.C,{}),text:(0,h.hw)(“Channel-specific subscriber perks”,”PrimeLink”)},{icon:(0,l.jsx)(oo.t,{}),text:(0,h.hw)(“Exclusive chat colors and emotes”,”PrimeLink”)},{icon:(0,l.jsx)(so.$,{}),text:(0,h.hw)(“Prime chat badge”,”PrimeLink”)}];return(0,l.jsxs)(d.P,{children:[(0,l.jsx)(J.N,{as:”h3″,margin:{bottom:2},children:(0,h.hw)(“Support your favorite Twitch streamers each month”,”PrimeLink”)}),(0,l.jsx)(d.P,{background:u.VS.Alt,borderRadius:yt.Z.Large,padding:{top:2,left:2,right:2},children:(0,l.jsxs)(d.P,{display:”flex”,flexDirection:”row”,children:[(0,l.jsx)(d.P,{style:{width:”262px”,height:”142px”},children:(0,l.jsxs)(qr.B,{children:[(0,l.jsx)(“source”,{srcSet:(0,qr.n)(“prime-link-support.avif”),type:”image/avif”}),(0,l.jsx)(“img”,{src:(0,qr.n)(“prime-link-support.jpg”),alt:(0,h.hw)(“Twitch logo with gaming headset and controller”,”PrimeLink”)})]})}),(0,l.jsxs)(d.P,{display:”flex”,flexDirection:”column”,padding:{left:3},children:[(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,children:(0,h.hw)(“With your Prime membership, you get a free monthly Twitch channel sub, giving you access to subscriber perks while supporting your favorite streamer!”,”PrimeLink”)}),e.map((function(e,n){return(0,l.jsxs)(d.P,{display:”flex”,alignItems:”center”,margin:{top:.5},children:[(0,l.jsx)(d.P,{margin:{right:2,left:2},children:e.icon}),(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,children:e.text})]},n)}))]})]})})]})},uo=i(734594),co=i(466377),mo=i(186396),vo=i(505074),po=i(973421),ho=i.n(po),fo=i(664865),go=i(599634),ko=i.n(go),yo=i(451241),So=i.n(yo),bo=function(){var e=(0,c.useState)(!1),n=e[0],i=e[1],t=(0,D.n_)(So())[0];return n?(0,l.jsx)(Mr.k,{}):(0,l.jsx)(mo.M2,{onClick:function(){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var e,n,a;return(0,s.__generator)(this,(function(r){switch(r.label){case 0:i(!0),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,t({variables:{input:{isNewConnection:!1}}})];case 2:return e=r.sent(),(null===(a=null===(n=e.data)||void 0===n?void 0:n.unlinkAmazonConnection)||void 0===a?void 0:a.isSuccess)&&(o=!1,(0,fo.oR)(ko(),{},(function(e){return e.currentUser&&(e=ho()(e,(function(e){return e.currentUser.accountConnections.hasConnectedAmazon}),(function(){return o})),o||(e=ho()(e,(function(e){return e.currentUser.hasPrime}),(function(){return!1})))),e}))),[3,4];case 3:return i(!1),[7];case 4:return[2]}var o}))}))},variant:”secondary”,size:”small”,children:(0,l.jsx)(vo._,{children:(0,h.hw)(“Disconnect”,”PrimeDisconnectButton”)})})},_o=”errorIcon–notlA”,xo=”successIcon–Pco5r”,Co=function(e){var n,i,t=(0,D.IT)(ko()),a=t.data,s=t.loading,c=null===(n=null==a?void 0:a.currentUser)||void 0===n?void 0:n.hasPrime,v=null===(i=null==a?void 0:a.currentUser)||void 0===i?void 0:i.accountConnections.hasConnectedAmazon,p=(0,r.wA)(),f=(0,m.Zp)(),g=(0,r.d4)(o.M3);return(0,l.jsxs)(d.P,{children:[(0,l.jsx)(J.N,{as:”h3″,margin:{bottom:2},children:(0,h.hw)(“Connect Accounts”,”PrimeLink”)}),(0,l.jsxs)(d.P,{background:u.VS.Alt,borderRadius:yt.Z.Large,overflow:”hidden”,display:”flex”,padding:{right:2},children:[(0,l.jsx)(d.P,{display:”flex”,alignItems:”center”,justifyContent:”center”,style:{minWidth:”80px”,background:”#0578ff”,borderStartStartRadius:”var(–border-radius-large)”,borderEndStartRadius:”var(–border-radius-large)”},padding:2,children:(0,l.jsx)(d.P,{display:”flex”,style:{width:”100%”,maxWidth:”60px”},children:(0,l.jsxs)(qr.B,{children:[(0,l.jsx)(“source”,{srcSet:(0,qr.n)(“prime-logo.avif”),type:”image/avif”}),(0,l.jsx)(“img”,{src:(0,qr.n)(“prime-logo.png”),color:”#0578FF”,alt:(0,h.hw)(“Prime logo”,”PrimeLink”)})]})})}),(0,l.jsxs)(d.P,{padding:2,display:”flex”,flexDirection:”column”,style:{flex:1},children:[(0,l.jsx)(J.N,{fontSize:u.Z4.Size3,children:(0,h.hw)(“Prime”,”PrimeLink”)}),v?c?(0,l.jsxs)(d.P,{display:u.nl.Flex,flexDirection:u.bo.Row,alignItems:u.k2.Center,children:[(0,l.jsx)(d.P,{margin:{right:.5},display:u.nl.InlineFlex,alignItems:u.k2.Center,borderRadius:yt.Z.Rounded,className:xo,children:(0,l.jsx)(uo.i,{size:”1.5rem”})}),(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,color:u.Q1.Success,children:(0,h.hw)(“Your Prime membership is connected.”,”PrimeAccountLink”)})]}):(0,l.jsxs)(d.P,{display:u.nl.Flex,flexDirection:u.bo.Row,alignItems:u.k2.Center,children:[(0,l.jsx)(d.P,{margin:{right:.5},display:u.nl.InlineFlex,alignItems:u.k2.Center,borderRadius:yt.Z.Rounded,className:_o,children:(0,l.jsx)(co.P,{size:”1.5rem”})}),(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,color:u.Q1.Error,children:(0,h.hw)(“This Amazon account does not have Prime membership. Sign up to access Prime Sub benefits.”,”PrimeAccountLink”)})]}):(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,children:(0,h.hw)(“Link your Amazon Prime membership with your Twitch account.”,”PrimeLink”)})]}),s?(0,l.jsx)(Mr.k,{}):(0,l.jsxs)(d.P,{display:”flex”,alignItems:”flex-end”,padding:{bottom:2},gap:1,children:[v?(0,l.jsx)(bo,{}):(0,l.jsx)(mo.M2,{variant:”primary”,size:”small”,onClick:function(){g?f(“/prime/confirm”):p((0,Lr.iD)(jr.W.PrimeLinkingPage,{postLoginAction:function(){return f(“/prime/confirm”),Promise.resolve()}}))},children:(0,l.jsx)(vo._,{children:(0,h.hw)(“Connect”,”PrimeLink”)})}),v&&c&&(0,l.jsx)(mo.M2,{size:”small”,variant:”primary”,linkTo:(0,Qi.VV)(“/directory”),children:(0,l.jsx)(vo._,{children:(0,h.hw)(“Explore Channels”,”PrimeAccountLink”)})})]})]})]})},wo=function(e){var n=[{icon:(0,l.jsx)(d.P,{style:{height:”97px”,width:”147px”},children:(0,l.jsx)(qr.B,{children:(0,l.jsx)(“img”,{src:(0,qr.n)(“prime-link-connect.png”),alt:(0,h.hw)(“Image showing arrows between the Amazon Prime logo and Twitch logo “,”PrimeLink”)})})}),title:(0,h.hw)(“1. Connect your Prime membership”,”PrimeLink”),description:(0,h.hw)(“If you haven’t already, click the “Connect” above to link your Prime membership.”,”PrimeLink”)},{icon:(0,l.jsx)(d.P,{style:{height:”97px”,width:”147px”},children:(0,l.jsxs)(qr.B,{children:[(0,l.jsx)(“source”,{srcSet:(0,qr.n)(“prime-link-subscribe-1.avif”),type:”image/avif”}),(0,l.jsx)(“img”,{src:(0,qr.n)(“prime-link-subscribe-1.png”),alt:(0,h.hw)(“Image of a user activating a Prime sub”,”PrimeLink”)})]})}),title:(0,h.hw)(“2. Subscribe to a participating Twitch channel”,”PrimeLink”),description:(0,h.hw)(‘While watching a streamer’s channel in a web browser, click the “Subscribe” button. For participating streamers, scroll to the bottom of the subscription screen and check “Use Prime Sub”. Then click “Subscribe with Prime” to use your free channel sub of the month.’,”PrimeLink”),cta:(0,l.jsx)(mo.M2,{variant:”secondary”,linkTo:(0,Qi.VV)(“/directory”),children:(0,l.jsx)(vo._,{children:(0,h.hw)(“Explore Channels”,”PrimeLink”)})})},{icon:(0,l.jsx)(d.P,{style:{height:”97px”,width:”147px”},children:(0,l.jsx)(qr.B,{children:(0,l.jsx)(“img”,{src:(0,qr.n)(“prime-link-claim-each-month-1.png”),alt:(0,h.hw)(“Image of a calendar with subscribe and resubscribe buttons”,”PrimeLink”)})})}),title:(0,h.hw)(“3. Be sure to claim each month”,”PrimeLink”),description:(0,h.hw)(“Every 30 days Prime members can subscribe to a new streamer or resubscribe to the same streamer’s channel.”,”PrimeLink”),cta:(0,l.jsx)(mo.M2,{variant:”secondary”,linkTo:(0,Qi.VV)(“/subscriptions”),children:(0,l.jsx)(vo._,{children:(0,h.hw)(“Manage Subscriptions”,”PrimeLink”)})})}];return(0,l.jsxs)(d.P,{children:[(0,l.jsx)(J.N,{as:”h3″,margin:{bottom:2},children:(0,h.hw)(“How to use your Prime perk”,”PrimeLink”)}),(0,l.jsx)(d.P,{background:u.VS.Alt,borderRadius:yt.Z.Large,padding:3,children:n.map((function(e,n){return(0,l.jsxs)(d.P,{children:[0!==n&&(0,l.jsx)(d.P,{border:!0}),(0,l.jsx)(d.P,{margin:{bottom:1,top:1},display:”flex”,flexDirection:”row”,children:(0,l.jsxs)(d.P,{display:”flex”,alignItems:”center”,margin:{bottom:2},children:[(0,l.jsx)(d.P,{margin:{left:3,right:3},children:e.icon}),(0,l.jsxs)(d.P,{display:”flex”,flexDirection:”column”,padding:{left:2},children:[(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,bold:!0,children:e.title}),(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,margin:{top:1,bottom:2},color:”alt-2″,children:e.description}),e.cta&&(0,l.jsx)(d.P,{alignSelf:u.gB.Start,children:e.cta})]})]})})]},n)}))})]})},No=function(){return(0,l.jsx)(d.P,{display:u.nl.Flex,justifyContent:u.A9.Center,maxWidth:”1200px”,margin:”auto”,padding:{left:5,right:10,top:2,bottom:5},children:(0,l.jsxs)(d.P,{margin:{bottom:6},children:[(0,l.jsx)(J.N,{as:”h2″,margin:{bottom:6},children:(0,h.hw)(“Prime Member Perks on Twitch”,”PrimeLink”)}),(0,l.jsx)(d.P,{margin:{bottom:5},children:(0,l.jsx)(Co,{})}),(0,l.jsx)(d.P,{margin:{bottom:5},children:(0,l.jsx)(lo,{})}),(0,l.jsx)(d.P,{margin:{bottom:5},children:(0,l.jsx)(wo,{})})]})})},Po=function(){return(0,Gr._)(“prime-gaming-migration”,”boolean”,!1).value?(0,l.jsx)(No,{}):(window.location.assign(h.$W.tryPrimeURI),null)},Do=i(688641);var To=(0,r.Ng)((function(e){var n=(0,o.wz)(e);return{isLoggedIn:(0,o.M3)(e),userLogin:n&&n.login}}))((function(e){var n,i=(0,m.g)();return e.isLoggedIn&&e.userLogin===(null===(n=i.channelLogin)||void 0===n?void 0:n.toLowerCase())?(0,l.jsx)(m.C5,{to:”/settings/profile”,replace:!0}):(0,l.jsx)(m.C5,{to:”/”,replace:!0})})),Io=i(1671),Fo=i(215954),Eo=i(621790),jo=i(433989),Lo=i(652646),Ao=i(917364),Ro=i(494280),Ho=i(278544),Oo=i(284225),Mo=i(267071),Bo=i(230026),Uo=function(e){var n=e.children,i=(0,s.__rest)(e,[“children”]);return(0,l.jsx)(Bo.oN.Provider,{value:i,children:n})},Vo=i(147134),zo=i(320458),Wo=i.n(zo),Go=i(107800),qo=i.n(Go),Zo=function(e){var n,i,t=e.channelLogin,a=e.isLive,r=!t||!a||!(0,Dt.Q)(),o=(0,D.IT)(qo(),{skip:r}),s=o.data,l=o.loading,d=(0,D.IT)(Wo(),{variables:{channelLogin:null!=t?t:””},skip:r||!(null===(i=null===(n=null==s?void 0:s.currentUser)||void 0===n?void 0:n.stream)||void 0===i?void 0:i.id)}),u=d.data,m=d.loading,v=(0,c.useState)(!1),p=v[0],h=v[1];return(0,c.useMemo)((function(){var e,n,i,t,a,o,d,c,v,f,g,k,y,S,b,_;return r||m||l?{channelId:void 0,channelDisplayName:void 0,channelLogin:void 0,organizerId:void 0,organizerDisplayName:void 0,organizerLogin:void 0,costreamerStatus:void 0,isCurrentUserLive:void 0,showOverlay:!1,setShowOverlay:h}:{costreamerStatus:null===(n=null===(e=null==u?void 0:u.user)||void 0===e?void 0:e.self)||void 0===n?void 0:n.costreamerStatus,channelId:null===(i=null==u?void 0:u.user)||void 0===i?void 0:i.id,channelLogin:null===(t=null==u?void 0:u.user)||void 0===t?void 0:t.login,channelDisplayName:null===(a=null==u?void 0:u.user)||void 0===a?void 0:a.displayName,organizerId:null===(c=null===(d=null===(o=null==s?void 0:s.currentUser)||void 0===o?void 0:o.stream)||void 0===d?void 0:d.costreamDetails)||void 0===c?void 0:c.organizer.id,organizerLogin:null===(g=null===(f=null===(v=null==s?void 0:s.currentUser)||void 0===v?void 0:v.stream)||void 0===f?void 0:f.costreamDetails)||void 0===g?void 0:g.organizer.login,organizerDisplayName:null===(S=null===(y=null===(k=null==s?void 0:s.currentUser)||void 0===k?void 0:k.stream)||void 0===y?void 0:y.costreamDetails)||void 0===S?void 0:S.organizer.displayName,isCurrentUserLive:!!(null===(_=null===(b=null==s?void 0:s.currentUser)||void 0===b?void 0:b.stream)||void 0===_?void 0:_.id),showOverlay:p,setShowOverlay:h}}),[m,r,u,l,p,s])},Qo=i(360485),Ko=i(465096),Yo=i.n(Ko),Xo=i(308692),$o=i.n(Xo),Jo=function(e){var n,i,t,a,r,s,l,d,u,c,m,v,p=(0,_.QN)((function(e){return e.session.firstPageLoaded})),h=(0,_.QN)(o.Xl),f=(0,D.IT)(Yo(),{variables:{channelLogin:e.channelLogin},skip:!(e.channelLogin&&e.isLive&&p&&(0,Qo.TV)())}).data,g=(0,Qo.fh)({hasTurbo:!!(null===(i=null===(n=null==f?void 0:f.currentUser)||void 0===n?void 0:n.turboStatus)||void 0===i?void 0:i.hasActiveTurbo),isStaff:h,subscription:(null===(a=null===(t=null==f?void 0:f.user)||void 0===t?void 0:t.self)||void 0===a?void 0:a.subscriptionBenefit)||null},{isAffiliate:!!(null===(s=null===(r=null==f?void 0:f.user)||void 0===r?void 0:r.roles)||void 0===s?void 0:s.isAffiliate),isPartner:!!(null===(d=null===(l=null==f?void 0:f.user)||void 0===l?void 0:l.roles)||void 0===d?void 0:d.isPartner)}),k=(0,D.IT)($o(),{variables:{channelLogin:e.channelLogin},skip:!g}).data;return(null===(v=null===(m=null===(c=null===(u=null==k?void 0:k.user)||void 0===u?void 0:u.channel)||void 0===c?void 0:c.self)||void 0===m?void 0:m.dvr)||void 0===v?void 0:v.vodID)||null},es=i(508474),ns=i(169311),is=i(499692),ts=function(e){var n=e.title,i=e.subtitle,t=e.onClose,a=e.show,r=void 0===a||a;return(0,l.jsxs)(es.a,{show:r,onRequestClose:t,children:[(0,l.jsx)(ns.c,{children:(0,l.jsxs)(d.P,{display:”flex”,flexDirection:”column”,alignItems:”center”,padding:2,gap:2,children:[(0,l.jsxs)(qr.B,{children:[(0,l.jsx)(“source”,{srcSet:(0,qr.n)(“ca4bf77f59dc5d7821da2ae551b0f3e7a87aab78.avif”),type:”image/avif”}),(0,l.jsx)(“img”,{src:(0,qr.n)(“ca4bf77f59dc5d7821da2ae551b0f3e7a87aab78.png”),alt:(0,h.hw)(“Consequence Issued”,”ConsequenceIssuedModal”),width:180,height:180})]}),(0,l.jsx)(d.P,{textAlign:”center”,children:(0,l.jsx)(J.N,{bold:!0,fontSize:u.Z4.Size2,textAlign:”center”,color:”base”,children:n})}),(0,l.jsx)(J.N,{textAlign:”center”,color:”base”,fontSize:u.Z4.Size4,children:i})]})}),(0,l.jsx)(d.P,{padding:1,children:(0,l.jsx)(is.j,{primaryButtonProps:{variant:”secondary”,children:(0,h.So)(“Close”,”ConsequenceIssuedModal”),onClick:t}})})]})},as=i(696670),rs=i(367957),os=function(e){var n=e.channelID,i=e.channelLogin,t=(0,c.useState)(!1),a=t[0],s=t[1],d=(0,m.Zp)(),u=(0,r.d4)(o.wz);if((0,as.B)({channelID:n,onFLCIssued:function(e){“STREAM”===e.consequence_type&&s(!0)}}),(null==u?void 0:u.id)===n)return null;var v=i?(0,rs.o4)(i):””,p=i?(0,h.So)(“During their restriction {username} won’t be streaming and may not be able to respond to whispers or other messages”,{username:i},”ConsequenceIssuedModal”):””;return a?(0,l.jsx)(ts,{title:v,subtitle:p,onClose:function(){s(!1),i&&d(“/”.concat(i))}}):null},ss=i(530386),ls=i(952346),ds=g.x.wrap((function(){return i.e(81301).then(i.bind(i,939625))}),”LiveShoppingModal”),us=i(735793),cs=i(601858),ms=i(108837),vs=i.n(ms),ps=i(665749),hs=i.n(ps),fs=i(827145),gs=i.n(fs),ks=i(449683),ys=i.n(ks);var Ss=i(165028),bs=function(e){var n=e.children,i=function(e){var n,i,t,a,r,o,l,d=e.campaignSettings,u=e.channelId,m=e.isOpen,v=e.liveShoppingConfig,p=e.onClose,f=(0,c.useState)(“product_details”),g=f[0],k=f[1],y=(0,c.useState)(v.asins&&v.asins.length>0?v.asins[0]:v.asin),S=y[0],b=y[1],_=(0,c.useMemo)((function(){return v.asins}),[v.asins]),x=null!==(n=(0,Oe.If)())&&void 0!==n?n:””;(0,c.useEffect)((function(){b(v.asins&&v.asins.length>0?v.asins[0]:v.asin)}),[v.asin,v.asins]),(0,c.useEffect)((function(){k(“product_details”)}),[u]);var C=(0,c.useRef)((0,cs.L$)());(0,c.useEffect)((function(){m||(C.current=(0,cs.L$)())}),[m]);var w=(0,D.IT)(gs(),{variables:{asin:S,liveShoppingSessionID:C.current},fetchPolicy:”cache-and-network”}),N=(0,D._l)(ys()),P=N[0],T=N[1],I=(0,D.n_)(hs()),F=I[0],E=I[1],j=(0,D.n_)(vs()),L=j[0],A=j[1],R=(0,c.useMemo)((function(){var e,n,i,t,a,r,o,s;return(null===(n=null===(e=w.data)||void 0===e?void 0:e.liveShoppingProductDetails)||void 0===n?void 0:n.error)||(null===(t=null===(i=T.data)||void 0===i?void 0:i.liveShoppingProductSummaries)||void 0===t?void 0:t.error)||(null===(r=null===(a=E.data)||void 0===a?void 0:a.previewLiveShoppingOrders)||void 0===r?void 0:r.error)||(null===(s=null===(o=A.data)||void 0===o?void 0:o.confirmLiveShoppingOrders)||void 0===s?void 0:s.error)||void 0}),[w,T,E,A]),H=(0,c.useMemo)((function(){var e,n,i,t,a,r,o,s;return{activation_id:null!==(e=null==d?void 0:d.activation.id)&&void 0!==e?e:””,activation_progression_id:null!==(n=null==d?void 0:d.activationProgression)&&void 0!==n?n:””,campaign_id:null!==(i=null==d?void 0:d.campaign)&&void 0!==i?i:””,campaign_instance_id:null!==(t=null==d?void 0:d.campaignInstance.id)&&void 0!==t?t:””,channel_id:null!=u?u:””,creative_id:null!==(r=null===(a=null==d?void 0:d.campaignInstance.transparencyInfo)||void 0===a?void 0:a.creativeIDValue)&&void 0!==r?r:””,format_name:null!==(s=null===(o=null==d?void 0:d.campaignInstance.transparencyInfo)||void 0===o?void 0:o.slotName)&&void 0!==s?s:””,marketplace:x}}),[d,u,x]),O=(0,c.useCallback)((function(){return(0,s.__assign)((0,s.__assign)({},H),{live_shopping_step:g,live_shopping_session_id:C.current,product_asin:”multi_product”===g?””:S})}),[H,g,S]),M=null===(t=null===(i=null==w?void 0:w.data)||void 0===i?void 0:i.liveShoppingProductDetails)||void 0===t?void 0:t.productDetails,B=(null===(r=null===(a=null==w?void 0:w.data)||void 0===a?void 0:a.liveShoppingProductDetails)||void 0===r?void 0:r.sessionToken)||(null===(l=null===(o=null==T?void 0:T.data)||void 0===o?void 0:o.liveShoppingProductSummaries)||void 0===l?void 0:l.sessionToken),U=w.loading||T.loading||E.loading||A.loading,V=w.loading&&!!w.data||T.loading&&!!T.data,z=(0,c.useState)(!1),W=z[0],G=z[1];(0,c.useEffect)((function(){if(V){var e=setTimeout((function(){return G(!0)}),1e3);return function(){return clearTimeout(e)}}G(!1)}),[V]);var q=(0,c.useRef)({isLoading:U,currentError:R,currentStep:g});(0,c.useEffect)((function(){!m||U||q.current.isLoading===U&&q.current.currentError===R&&q.current.currentStep===g||h.E5.track(“live_shopping_display”,(0,s.__assign)({error_name:null!=R?R:””},O())),q.current={isLoading:U,currentError:R,currentStep:g}}),[R,g,O,U,m]);var Z=(0,c.useCallback)((function(e){h.E5.track(“live_shopping_click”,(0,s.__assign)({component_name:e},O()))}),[O]),Q=(0,c.useCallback)((function(){k((function(e){return function(e){switch(e){case”product_details”:return”multi_product”;case”order_preview”:return”product_details”;case”order_confirmation”:return”order_preview”;default:return null}}(e)||e}))}),[]),K=(0,c.useCallback)((function(){k((function(e){return function(e){switch(e){case”multi_product”:return”product_details”;case”product_details”:return”order_preview”;case”order_preview”:return”order_confirmation”;default:return null}}(e)||e}))}),[]),Y=(0,c.useCallback)((function(){null==p||p(),k(“product_details”)}),[p]),X=(0,c.useCallback)((function(){S&&(null==M?void 0:M.offerID)&&(null==M?void 0:M.merchantID)&&B&&F({variables:{input:{productOffer:{offerID:M.offerID,merchantID:M.merchantID,asin:S},session:{liveShoppingSessionID:C.current,sessionToken:B},trackingID:(0,us.V)(v.tracking_id,u)}}})}),[S,v.tracking_id,u,F,M,B]),$=(0,c.useCallback)((function(){_&&B&&P({variables:{asins:_,liveShoppingSessionID:C.current},fetchPolicy:”network-only”})}),[_,P,B]),J=(0,c.useCallback)((function(){var e,n,i,t,a,r,o,l,d,u,c,m=null===(i=null===(n=null===(e=E.data)||void 0===e?void 0:e.previewLiveShoppingOrders)||void 0===n?void 0:n.result)||void 0===i?void 0:i.charges,v=null===(l=null===(o=null===(r=null===(a=null===(t=E.data)||void 0===t?void 0:t.previewLiveShoppingOrders)||void 0===a?void 0:a.result)||void 0===r?void 0:r.orders[0])||void 0===o?void 0:o.items[0])||void 0===l?void 0:l.title,p=null==m?void 0:m.find((function(e){return”ITEMS_SUBTOTAL”===(null==e?void 0:e.type)})),h=null==m?void 0:m.find((function(e){return”PURCHASE_TOTAL”===(null==e?void 0:e.type)}));return(0,s.__assign)((0,s.__assign)({},H),{currency_code:null!==(d=null==h?void 0:h.currencyCode)&&void 0!==d?d:””,item_gross_amount_local:null!==(u=null==h?void 0:h.amount)&&void 0!==u?u:0,item_name:null!=v?v:””,item_unit_price_local:null!==(c=null==p?void 0:p.amount)&&void 0!==c?c:0,live_shopping_session_id:C.current,product_asin:S,quantity:1})}),[H,E,S]),ee=(0,c.useCallback)((function(){var e,n,i,t=null===(i=null===(n=null===(e=null==E?void 0:E.data)||void 0===e?void 0:e.previewLiveShoppingOrders)||void 0===n?void 0:n.result)||void 0===i?void 0:i.purchaseID;B&&t&&L({onCompleted:function(e){var n,i,t=null===(i=null===(n=null==e?void 0:e.confirmLiveShoppingOrders)||void 0===n?void 0:n.result)||void 0===i?void 0:i.orderIDs[0];h.E5.track(“live_shopping_confirmed_orders”,(0,s.__assign)((0,s.__assign)({},J()),{order_id:null!=t?t:””}))},variables:{input:{purchaseID:t,session:{liveShoppingSessionID:C.current,sessionToken:B}}}})}),[L,J,E,B]),ne=(0,c.useMemo)((function(){var e,n,i,t,a,r;return{asin:S,asins:_,campaignSettings:d,channelId:u,close:Y,confirmOrder:ee,confirmOrderData:null===(e=null==A?void 0:A.data)||void 0===e?void 0:e.confirmLiveShoppingOrders,currentStep:g,error:R,isAuthenticated:(null===(i=null===(n=null==w?void 0:w.data)||void 0===n?void 0:n.liveShoppingProductDetails)||void 0===i?void 0:i.isAuthenticated)||!1,isOpen:m,isLoading:U,isRefetching:V,isLongRefetch:W,liveShoppingSessionId:C.current,marketplace:x,next:K,previewOrder:X,previewOrderData:null===(t=null==E?void 0:E.data)||void 0===t?void 0:t.previewLiveShoppingOrders,previous:Q,productDetailsData:null===(a=null==w?void 0:w.data)||void 0===a?void 0:a.liveShoppingProductDetails,getProductSummaries:$,productSummariesData:null===(r=null==T?void 0:T.data)||void 0===r?void 0:r.liveShoppingProductSummaries,refetchProductDetails:w.refetch,setAsin:b,trackClick:Z,trackingId:(0,us.V)(v.tracking_id,u)}}),[d,_,u,Y,A,ee,S,R,g,$,U,m,V,W,v,x,K,E,X,Q,w,T,b,Z]);return ne}((0,s.__rest)(e,[“children”]));return(0,l.jsx)(Ss.M2.Provider,{value:i,children:n})};function _s(e){var n=e.channelId,i=(0,ls.p)(),t=i.campaignSettings,a=i.closeModal,r=i.isOpen,o=i.liveShoppingConfig;return n&&o?(0,l.jsx)(bs,{campaignSettings:t,channelId:n,isOpen:r,onClose:a,liveShoppingConfig:o,children:(0,l.jsx)(ds,{})}):null}var xs,Cs=i(453595),ws=i(5024),Ns=i(882197),Ps=i(706411),Ds=i.n(Ps),Ts=i(440961),Is=i(178676),Fs=i(71062),Es=i(183198),js=i(224300),Ls=i(2600);!function(e){e.RightColumnToggle=”right-column-content__toggle”}(xs||(xs={}));var As=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={isFullscreen:!1,isError:!1,hideToggleButton:!1},n.logger=h.vF.withCategory(“RightColumn”),n.onActionDuringFullscreen=(0,Fs.n)((function(){n.props.globalIsExpanded||(n.setState((function(e){return e.hideToggleButton?{hideToggleButton:!1}:null})),n.startHideButtonTimer())}),1e3),n.handleToggleVisibility=function(){var e=(0,Es.P9)(),i=n.props.globalIsExpanded;e.resource.isRightColumnClosedByUserAction=i,h.IG.set(h.x2.config.layoutCacheKey,e),i?(n.props.collapseRightColumn(),n.state.isFullscreen&&n.startHideButtonTimer()):(n.props.expandRightColumn(),n.state.isFullscreen&&(h.IG.set(js.yj,!0,{expireInMS:js.zQ}),clearTimeout(n.hideToggleTimer),(0,Ls.Oi)({channelID:n.props.channelID,type:Ls.zK.Expand}))),vn({element:an.Chat,action:i?rn.Close:rn.Open})},n.moveOnBreakpoint=function(){if(n.containerRef){var e=n.props.globalIsExpanded,i=(0,Es.P9)().resource.isRightColumnClosedByUserAction,t=window.innerWidth,a=window.innerHeight,r=.562*t+250;t<920&&n.props.theatreModeEnabled?(n.props.moveRightColumnBelowFromBreakpoint(),!i&&a>=r&&e?n.props.expandRightColumn():e&&a=920&&(n.props.moveRightColumnBesideFromBreakpoint(),!i&&e&&n.props.expandRightColumn()),t<920&&!n.state.isFullscreen&&!n.props.theatreModeEnabled&&n.props.moveRightColumnBesideFromBreakpoint()}},n.onFullscreenChange=function(){var e=!!n.props.fullscreen.element();n.setState({isFullscreen:e}),e?(window.addEventListener("mousemove",n.onActionDuringFullscreen),window.addEventListener("keydown",n.onActionDuringFullscreen,!0),n.startHideButtonTimer()):(window.removeEventListener("mousemove",n.onActionDuringFullscreen),window.removeEventListener("keydown",n.onActionDuringFullscreen,!0),n.setState((function(e){return e.hideToggleButton?{hideToggleButton:!1}:null})),clearTimeout(n.hideToggleTimer),n.onActionDuringFullscreen.cancel())},n.getToggleProps=function(e){if(!e){var i=(0,h.hw)("Expand Chat","RightColumnToggle");return!h.IG.get(js.yj,!1)&&n.state.isFullscreen?{"aria-label":i,icon:(0,l.jsx)(hn.p,{}),label:(0,h.hw)("Chat can be opened in full screen mode","RightColumnToggle"),placement:"bottom-start"}:{"aria-label":i,icon:(0,l.jsx)(hn.p,{}),label:(0,h.hw)("Expand","RightColumnToggle"),placement:"right"}}return{"aria-label":(0,h.hw)("Collapse Chat","RightColumnToggle"),icon:(0,l.jsx)(hn.M,{}),label:(0,h.hw)("Collapse","RightColumnToggle"),placement:"right"}},n.setContainerRef=function(e){return n.containerRef=e},n}return(0,s.__extends)(n,e),n.prototype.componentDidCatch=function(e,n){var i=this;this.setState({isError:!0},(function(){h.x2.stats.recordComponentError("RightColumn"),i.logger.errorAndReport(e,"A unhandled exception occurred in the component hierarchy",{info:n})}))},n.prototype.componentDidMount=function(){window.addEventListener("resize",this.moveOnBreakpoint),this.props.fullscreen.addChangeListener(this.onFullscreenChange),this.moveOnBreakpoint(),this.reportInteractive(),Ds().bind("alt+r",this.handleToggleVisibility)},n.prototype.componentDidUpdate=function(){this.moveOnBreakpoint(),this.props.children&&this.reportInteractive()},n.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.moveOnBreakpoint),window.removeEventListener("mousemove",this.onActionDuringFullscreen),this.onActionDuringFullscreen.cancel(),clearTimeout(this.hideToggleTimer),this.props.fullscreen.removeChangeListener(this.onFullscreenChange),Ds().unbind("alt+r")},n.prototype.render=function(){var e=document.getElementById(en);return e?Ts.createPortal(this.renderContent(),e):null},n.prototype.renderContent=function(){if(!this.props.children||this.state.isError)return null;var e=this.props.globalIsExpanded,n=this.props.theatreModeEnabled&&!this.props.rightColumnPositionedBeside&&!e,i=bn()("right-column",{"right-column--collapsed":!e,"right-column--theatre":this.props.theatreModeEnabled,"right-column--fullscreen":this.state.isFullscreen,"right-column--beside":this.props.rightColumnPositionedBeside,"right-column--below":!this.props.rightColumnPositionedBeside,"right-column--host-player-above-chat":this.props.isShowingWatchPartyInMain&&e}),t=bn()("right-column__toggle-visibility ".concat(this.props.toggleClasses),{"right-column__toggle-visibility--with-chat-video-player-and-turbo-ads-upsell":(this.props.isShowingPictureByPicture||this.props.isShowingWatchPartyHypeOutInRightColumn||this.props.isShowingMirrorPbyPAdPod)&&this.props.isShowingTurboAdsUpsell},{"right-column__toggle-visibility--with-chat-video-player":(this.props.isShowingPictureByPicture||this.props.isShowingWatchPartyHypeOutInRightColumn||this.props.isShowingMirrorPbyPAdPod)&&!this.props.isShowingTurboAdsUpsell},{"right-column__toggle-visibility--with-turbo-ads-upsell":!(this.props.isShowingPictureByPicture||this.props.isShowingWatchPartyHypeOutInRightColumn||this.props.isShowingMirrorPbyPAdPod)&&this.props.isShowingTurboAdsUpsell},{"right-column__toggle-visibility--collapsed-in-small-theater":n}),a=e?"right-column-chat-bar":"right-column-chat-bar-collapsed",r=this.props.isShowingWatchPartyInMain&&this.props.theatreModeEnabled,o=this.getToggleProps(e),s=(0,l.jsx)(mn.m,{label:o.label,options:{placement:o.placement},children:(0,l.jsx)(Le.a2,{onClick:this.handleToggleVisibility,"data-a-target":"right-column__toggle-collapse-btn","aria-label":o["aria-label"],icon:o.icon})});h.IG.get(js.yj,!1)||!this.state.isFullscreen||e||(s=(0,l.jsx)(ws.j,{children:s}));var c=(0,l.jsx)(Ns.e,{theme:Rs({currentTheme:this.props.theme,isExpanded:e,isTheaterMode:this.props.theatreModeEnabled,isFullscreen:this.state.isFullscreen}),children:(0,l.jsx)(d.P,{className:t,position:n?u.yX.Fixed:u.yX.Absolute,flexGrow:0,flexShrink:0,display:this.state.hideToggleButton?u.nl.Hide:u.nl.Flex,children:s})});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(d.P,{className:i,role:"complementary","aria-label":(0,h.hw)("Right Column","RightColumnContent"),ref:this.setContainerRef,flexShrink:0,fullHeight:this.props.rightColumnPositionedBeside&&e&&!r,position:this.props.theatreModeEnabled?u.yX.Fixed:u.yX.Relative,attachTop:this.props.theatreModeEnabled&&this.props.rightColumnPositionedBeside&&!this.props.isShowingWatchPartyInMain,attachBottom:this.props.theatreModeEnabled&&!this.props.rightColumnPositionedBeside,attachRight:this.props.theatreModeEnabled,display:e&&this.props.theatreModeEnabled||this.props.rightColumnPositionedBeside?u.nl.Block:u.nl.Hide,"data-a-target":a,children:[!n&&c,(0,l.jsx)(d.P,{position:u.yX.Relative,flexGrow:0,flexShrink:0,fullHeight:!0,display:e?u.nl.Block:u.nl.Hide,children:this.props.children})]}),n&&c]})},n.prototype.reportInteractive=function(){this.props.latencyTracking.reportInteractive()},n.prototype.startHideButtonTimer=function(){var e=this;clearTimeout(this.hideToggleTimer),this.hideToggleTimer=setTimeout((function(){e.setState({hideToggleButton:!0})}),4e3)},n}(c.Component);function Rs(e){var n=e.currentTheme,i=e.isExpanded,t=e.isTheaterMode,a=e.isFullscreen;return!i||t||a?"overlay":n===Is.S.Dark?"dark":"light"}function Hs(){return function(e,n){n().ui.rightColumnExpanded&&e((0,Be.o_)())}}function Os(){return function(e,n){n().ui.rightColumnExpanded||e((0,Be.DI)())}}function Ms(){return function(e,n){n().ui.rightColumnPositionedBeside&&e((0,Be.GH)())}}function Bs(){return function(e,n){n().ui.rightColumnPositionedBeside||e((0,Be.Jg)())}}var Us=(0,p.Zz)((0,Y.W)("RightColumn"),(0,ae.dC)((function(e){return{isShowingPictureByPicture:e.isShowing,isShowingTurboAdsUpsell:e.isShowingTurboAdsUpsell,isShowingMirrorPbyPAdPod:e.isShowingMirrorPbyPAdPod}})),(0,r.Ng)((function(e){return{globalIsExpanded:e.ui.rightColumnExpanded,theatreModeEnabled:e.ui.theatreModeEnabled,sideNavExpanded:e.ui.sideNavExpanded,rightColumnPositionedBeside:e.ui.rightColumnPositionedBeside,theme:e.ui.theme}}),(function(e){return(0,p.zH)({collapseRightColumn:Hs,expandRightColumn:Os,moveRightColumnBelowFromBreakpoint:Ms,moveRightColumnBesideFromBreakpoint:Bs},e)})),(0,Cs.W)())(As),Vs=i(219272),zs=i(447992),Ws=i(875235),Gs=i(545052),qs=i(464232),Zs=i(656192),Qs=i(403772),Ks=i(212276),Ys=i(672498),Xs=i(432647),$s=i(209186),Js=i(224261),el=i(408120),nl=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(85459),i.e(47967),i.e(52386),i.e(94941),i.e(31264),i.e(76584),i.e(73397),i.e(39644),i.e(13046),i.e(75853),i.e(18271),i.e(37073),i.e(30326),i.e(33081),i.e(95749),i.e(81775),i.e(17718),i.e(28157),i.e(70215),i.e(21334),i.e(49444),i.e(26360),i.e(77973),i.e(41913),i.e(32687),i.e(3974),i.e(213),i.e(35220),i.e(41748),i.e(90374)]).then(i.bind(i,160944))}),"ChatLive",{placeholder:null}),il=g.x.wrap((function(){return Promise.all([i.e(76584),i.e(73397),i.e(39644),i.e(75853),i.e(37073),i.e(44304),i.e(8633)]).then(i.bind(i,700800))}),"ChatVideo",{placeholder:null}),tl=g.x.wrap((function(){return Promise.all([i.e(76584),i.e(73397),i.e(39644),i.e(75853),i.e(37073),i.e(44304),i.e(43922)]).then(i.bind(i,785057))}),"ChatClip",{placeholder:null});function al(e){var n=(0,r.d4)((function(e){return e.ui.rightColumnExpanded}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ne.l,{ref:el.i,height:"40%"}),(0,l.jsx)(d.P,{className:bn()("chat-shell",{"chat-shell__expanded":n}),fullHeight:!0,children:(0,l.jsx)(rl,(0,s.__assign)({},e))})]})}function rl(e){var n=e.channelLogin,i=e.channelID,t=e.videoID,a=e.clipSlug,r=e.setVideoOffset;return a?(0,l.jsx)(tl,{clipSlug:a,setVideoOffset:r}):t?(0,l.jsx)(il,{videoID:t,setVideoOffset:r}):n?(0,l.jsx)(nl,{channelLogin:n,channelID:i}):null}var ol,sl=i(646021),ll=i(827876),dl=i(211450);!function(e){e.LowerHomeHeader="lower-home-header"}(ol||(ol={}));var ul=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(76584),i.e(13046),i.e(31073),i.e(24690),i.e(44299),i.e(54953),i.e(97378),i.e(18592),i.e(71257),i.e(32388),i.e(28282)]).then(i.bind(i,728256))}),"ChannelHomePage",{placeholder:(0,l.jsx)(kl,{})}),cl=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(30182),i.e(76584),i.e(13046),i.e(31073),i.e(54953),i.e(71257),i.e(92340),i.e(9895),i.e(27373),i.e(48551)]).then(i.bind(i,96624))}),"ChannelVideosPage",{placeholder:(0,l.jsx)(kl,{})}),ml=g.x.wrap((function(){return Promise.all([i.e(85459),i.e(38673),i.e(58911),i.e(8817),i.e(85069),i.e(32986),i.e(21680),i.e(74466),i.e(28947),i.e(80554)]).then(i.bind(i,559483))}),"ChannelAboutPage",{placeholder:(0,l.jsx)(kl,{})}),vl=g.x.wrap((function(){return Promise.all([i.e(7595),i.e(70536),i.e(71348)]).then(i.bind(i,863056))}),"ChannelSchedulePage",{placeholder:(0,l.jsx)(kl,{})}),pl=g.x.wrap((function(){return Promise.all([i.e(8817),i.e(24690),i.e(44299),i.e(97378),i.e(18592),i.e(59492),i.e(90892),i.e(32388),i.e(53711),i.e(51825)]).then(i.bind(i,706630))}),"HomeVideosEdit",{placeholder:(0,l.jsx)(kl,{})}),hl=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(76584),i.e(13046),i.e(98526),i.e(31073),i.e(54953),i.e(71257),i.e(36719),i.e(97790),i.e(62763)]).then(i.bind(i,730476))}),"LowerHomeHeader",{placeholder:null}),fl=["/:channelLogin","/:channelLogin/about/*","/:channelLogin/schedule/*","/:channelLogin/videos/edit","/:channelLogin/videos/*","/:channelLogin/clips/*","/:channelLogin/collections/*","/save-streak/:channelLogin"];function gl(e){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hl,{displayName:e.displayName,channelLogin:e.channelLogin,channelID:e.channelID,profileImageURL:e.profileImageURL,isLive:e.isLive,"data-test-selector":ol.LowerHomeHeader,broadcastID:e.broadcastID}),(0,l.jsx)(d.P,{padding:{x:4,bottom:1},children:(0,l.jsx)(d.P,{className:"home__lower-content",margin:{x:"auto"},width:"100%",children:(0,l.jsx)(yl,(0,s.__assign)({},e))})})]})}function kl(){return(0,l.jsx)(d.P,{className:"lower-home__loading-space",padding:{top:5},display:u.nl.Flex,justifyContent:u.A9.Center,width:"100%",children:(0,l.jsx)(Mr.k,{delay:2e3})})}function yl(e){var n=(0,m.zy)(),i=(0,v.ue)(fl.map((function(e){return{path:e}})),n);if(!i||!i.length)return null;switch(i[0].route.path){case fl[0]:return(0,l.jsx)(ul,{channelLogin:e.channelLogin,displayName:e.displayName,channelID:e.channelID});case fl[1]:return(0,l.jsx)(ml,{displayName:e.displayName,channelLogin:e.channelLogin,channelID:e.channelID});case fl[2]:return(0,l.jsx)(Sl,(0,s.__assign)({},e));case fl[3]:return(0,l.jsx)(pl,{channelLogin:e.channelLogin});case fl[4]:case fl[5]:case fl[6]:return(0,l.jsx)(cl,{channelID:e.channelID,displayName:e.displayName,channelLogin:e.channelLogin});default:return null}}function Sl(e){var n=(0,m.zy)(),i=(0,Or.ov)(n.search,"vodID"),t=(0,Or.ov)(n.search,"seriesID"),a=(0,Or.ov)(n.search,"segmentID"),r=null;return i?r={type:dl.LM.Video,id:i}:t?r={type:dl.LM.Series,id:t}:a&&(r={type:dl.LM.Single,id:a}),(0,l.jsx)(vl,{displayName:e.displayName,channelLogin:e.channelLogin,idToFind:r})}var bl=i(1166),_l=i(392395),xl=i(423052),Cl=i(427894),wl=i(282199),Nl=i(840118),Pl=(0,l.jsx)(Nl.O,{height:110}),Dl=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(38673),i.e(20764),i.e(48046),i.e(80501),i.e(76584),i.e(13046),i.e(98526),i.e(31073),i.e(54953),i.e(71257),i.e(70536),i.e(36719),i.e(78878),i.e(52860),i.e(48584),i.e(11450),i.e(45859),i.e(28769),i.e(984),i.e(68142),i.e(8582),i.e(40270),i.e(97790),i.e(10494),i.e(54978),i.e(55813),i.e(49131),i.e(11544),i.e(42495)]).then(i.bind(i,401517))}),"ClipMetadata",{placeholder:(0,l.jsx)(Nl.O,{height:200})}),Tl=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(85459),i.e(80501),i.e(76584),i.e(13046),i.e(98526),i.e(31073),i.e(54953),i.e(71257),i.e(70536),i.e(36719),i.e(68142),i.e(40270),i.e(97790),i.e(55813),i.e(48058),i.e(52572)]).then(i.bind(i,529754))}),"VideoMetadata",{placeholder:(0,l.jsx)(Nl.O,{height:240})}),Il=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(80501),i.e(76584),i.e(13046),i.e(98526),i.e(31073),i.e(44299),i.e(54953),i.e(71257),i.e(70536),i.e(36719),i.e(68142),i.e(40270),i.e(97790),i.e(55813),i.e(60050),i.e(27773)]).then(i.bind(i,668324))}),"StreamMetadata",{placeholder:Pl});function Fl(e){return e.channelLogin&&e.firstPageLoaded?e.clipSlug?(0,l.jsx)(Dl,{clipSlug:e.clipSlug,pageType:"clips_watch"}):e.videoID?(0,l.jsx)(Tl,{channelLogin:e.channelLogin,displayName:e.displayName,videoID:e.videoID,getVideoOffset:e.getVideoOffset,collectionID:e.collectionID,isLive:e.isLive}):(0,l.jsx)(Il,{channelLogin:e.channelLogin,channelID:e.channelID,displayName:e.displayName,profileImageURL:e.profileImageURL,isLive:e.isLive,liveSince:e.liveSince,isShowingWatchPartyInMain:e.isShowingWatchPartyInMain,onToggleWatchPartyMode:e.onToggleWatchPartyMode,broadcastID:e.broadcastID,getVideoOffset:e.getVideoOffset}):Pl}var El=i(288922);function jl(){var e=(0,m.RQ)("/:channelLogin/clip/:contentID"),n=(0,m.RQ)("/:channelLogin/video/:videoID"),i=(0,m.RQ)("/videos/:videoID"),t=(0,m.RQ)("/collections/:contentID"),a=(0,m.RQ)("/:channelLogin/collection/:contentID");return!!(e||i||n||t||a)}var Ll,Al=g.x.wrap((function(){return Promise.all([i.e(85459),i.e(38673),i.e(58911),i.e(8817),i.e(85069),i.e(32986),i.e(21680),i.e(74466),i.e(28947),i.e(60045)]).then(i.bind(i,450114))}),"ChannelPanels",{placeholder:(0,l.jsx)(Cl.w,{})}),Rl=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(30182),i.e(76584),i.e(13046),i.e(31073),i.e(54953),i.e(71257),i.e(92340),i.e(9895),i.e(27373),i.e(23512)]).then(i.bind(i,415419))}),"ChannelVideosContent",{placeholder:null}),Hl=g.x.wrap((function(){return i.e(35815).then(i.bind(i,510512))}),"WatchPageTrack",{placeholder:null,failSilently:!0}),Ol=g.x.wrap((function(){return i.e(78013).then(i.bind(i,774281))}),"WatchPartyInfoboxWithQuery",{placeholder:null,failSilently:!0});!function(e){e.ChannelVideosContentElement="ChannelVideosContent",e.WatchPartyInfobox="WatchPartyInfobox"}(Ll||(Ll={}));var Ml=c.memo((function(e){(0,xl.H)(e.displayName||e.channelLogin||"");var n=jl(),i=c.useState(!1),t=i[0],a=i[1],s=(0,_t.X)({onFirstImpression:function(){return a(!0)},percentage:75}).elementRef,u=(0,r.d4)((function(e){return e.session.firstPageLoaded})),m=(0,r.d4)((function(e){var n;return null===(n=(0,o.wz)(e))||void 0===n?void 0:n.login})),v=e.watchPartyProps.isShowingWatchPartyInMain&&e.watchPartyProps.isPlayingWatchParty,p=null;return e.channelLogin&&e.channelID&&u&&(p=n?(0,l.jsx)(d.P,{margin:{x:2,top:2},children:(0,l.jsx)(Rl,{channelLogin:e.channelLogin,channelID:e.channelID,"data-test-selector":Ll.ChannelVideosContentElement})}):(0,l.jsxs)(d.P,{margin:{x:2,top:2},children:[(v||e.watchPartyProps.isWatchPartyDismissed)&&(0,l.jsx)(Ol,{isHostingWatchParty:!0,channelLogin:e.channelLogin,disableChannelInfo:!0,"data-test-selector":Ll.WatchPartyInfobox}),(0,l.jsx)("div",{ref:s,children:(0,l.jsx)(nr.u,{section:"page",id:"live-channel-about-panel",icon:bl.a,label:(0,h.hw)("About Panel","SkipToTargetChannelPage"),children:(0,l.jsx)(wl.E,{channelID:e.channelID,channelLogin:e.channelLogin,isLive:e.isLive})})}),t&&(0,l.jsx)(Al,{channelID:e.channelID,channelLogin:e.channelLogin,isShowingWatchPartyInMain:e.watchPartyProps.isShowingWatchPartyInMain})]})),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nr.u,{section:"page",id:"live-channel-stream-information",icon:_l.h,label:(0,h.hw)("Stream Information","SkipToTargetChannelPage"),children:(0,l.jsx)(d.P,{flexGrow:0,flexShrink:1,children:(0,l.jsx)(Fl,{firstPageLoaded:u,isLive:e.isLive,liveSince:e.liveSince,channelLogin:e.channelLogin,channelID:e.channelID,profileImageURL:e.profileImageURL,displayName:e.displayName,clipSlug:e.clipSlug,videoID:e.videoID,collectionID:e.collectionID,getVideoOffset:e.getVideoOffset,isShowingWatchPartyInMain:e.watchPartyProps.isShowingWatchPartyInMain,onToggleWatchPartyMode:e.watchPartyProps.onToggleWatchPartyMode,broadcastID:e.broadcastID})})}),(0,l.jsx)(Hl,{channelLogin:e.channelLogin,clipSlug:e.clipSlug,videoID:e.videoID,isLiveKnown:e.isLiveKnown,isShowingWatchPartyInMain:e.watchPartyProps.isShowingWatchPartyInMain}),(0,l.jsxs)("div",{children:[u&&!!e.channelLogin&&(0,l.jsx)(d.P,{margin:{right:1},children:(0,l.jsx)(El.Yw,{channelID:e.channelID||"",channelLogin:e.channelLogin||"",userLogin:m||"",channelDisplayName:e.displayName||e.channelLogin,isLowerWatch:!0})}),p]})]})})),Bl=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(70927)]).then(i.bind(i,932473))}),"HomeLivePlayerOverlay",{placeholder:null});function Ul(e){var n=e.channelLogin,i=e.displayName,t=e.homeLiveMute,a=e.subtitle,o=e.setHomeLiveMute,s=e.children,m=(0,r.wA)();return(0,c.useEffect)((function(){return m((0,Be.PW)()),function(){m((0,Be.ae)())}}),[m]),(0,l.jsxs)(d.P,{fullHeight:!0,fullWidth:!0,position:u.yX.Relative,children:[(0,l.jsx)(d.P,{className:"home-live-hero__overlay",position:u.yX.Absolute,children:(0,l.jsx)(Bl,{channelLogin:n,displayName:i,homeLiveMute:t,subtitle:a,setHomeLiveMute:o})}),s]})}var Vl=g.x.wrap((function(){return Promise.all([i.e(93846),i.e(4618)]).then(i.bind(i,721915))}),"HomeOfflineHero",{placeholder:null});function zl(e){var n=null;return n=e.isLive?(0,l.jsx)(Ul,{channelLogin:e.channelLogin,displayName:e.displayName,homeLiveMute:e.homeLiveMute,setHomeLiveMute:e.setHomeLiveMute,subtitle:e.watchPartyTitle,children:e.children}):(0,l.jsx)(Vl,{channelLogin:e.channelLogin}),(0,l.jsx)("div",{className:"home",children:n})}var Wl=i(989096);function Gl(e){var n=(0,r.d4)((function(e){return e.ui.theatreModeEnabled})),i=(0,r.wA)();(0,N.S)((function(){return i((0,Be.JQ)()),function(){i((0,Be.U1)())}})),(0,Wl.R)({className:bn()({"channel-root__scroll-area--theatre-mode":n}),suppressScrollToTop:!0,suppressScrollX:!0});var t=c.useContext(cn.MD);return(0,c.useEffect)((function(){t.scrollToTop()}),[t]),(0,l.jsx)(d.P,{fullWidth:!0,position:u.yX.Relative,children:(0,l.jsx)(ql,{children:e.children})})}function ql(e){var n=e.children;return(0,l.jsx)(qs.d,{transformValues:{scale:2},style:{backgroundColor:"#000"},preserveChildDimensions:!0,children:n})}var Zl=i(235233),Ql=function(e){return(0,l.jsx)(d.P,{fullWidth:!0,className:"watch-party-loading-overlay-layout__base",children:(0,l.jsx)(Zl.j$,{ratio:Zl.gl.Aspect16x9,children:(0,l.jsx)(d.P,{className:"watch-party-loading-overlay-layout__background",children:e.children})})})},Kl=i(232276),Yl=i(573585),Xl=i(985358);function $l(){return(0,l.jsx)(Zl.j$,{ratio:Zl.gl.Aspect16x9,children:(0,l.jsx)(Yl.h,{children:(0,l.jsx)(Xl.p,{})})})}var Jl=g.x.wrap((function(){return i.e(17061).then(i.bind(i,820226))}),"WatchPartyPlayer",{placeholder:(0,l.jsx)(Ql,{children:(0,l.jsx)(Mr.k,{fillContent:!0})})});function ed(e){var n,i,t,a,o,s,m,v=null===(n=e.watchParty)||void 0===n?void 0:n.data,p=!!(null===(i=e.watchParty)||void 0===i?void 0:i.loading),h=(0,r.d4)((function(e){return e.ui.theatreModeEnabled})),f=c.useState(e.isWatch),g=f[0],k=f[1];if(c.useEffect((function(){!g&&e.isWatch&&k(!0)}),[g,e.isWatch]),!g)return null;m=(null===(a=null===(t=null==v?void 0:v.user)||void 0===t?void 0:t.watchParty)||void 0===a?void 0:a.session)?(0,l.jsx)(Jl,{channelDisplayName:null!==(s=null===(o=v.user)||void 0===o?void 0:o.displayName)&&void 0!==s?s:"",channelLogin:e.channelLogin||"",channelID:v.user.id,currentUser:v.currentUser,watchParty:v.user.watchParty,watchPartyDataLoading:p,watchPartyPubsubState:e.watchPartyStateFromPubsub,viewerToBroadcasterLatency:e.broadcasterLatencyDuringWatchParty,shouldPausePlayback:!e.isWatch||e.isWatchPartyDismissed,onWatchPartyEnd:e.onWatchPartyEnd,onPlaybackBegin:e.onPlaybackBegin,onDismissWatchParty:e.onDismissWatchParty}):p?(0,l.jsx)(Ql,{children:(0,l.jsx)(Mr.k,{fillContent:!0})}):(0,l.jsx)($l,{});var y=!e.isWatch||e.isWatchPartyDismissed,S=bn()("channel-root__watch-party-player",{"channel-root__watch-party-player--theatre-mode":h});return(0,l.jsx)(d.P,{fullWidth:!0,position:u.yX.Relative,display:y?u.nl.Hide:void 0,children:(0,l.jsx)(Kl.n,{children:(0,l.jsx)(d.P,{className:"channel-root__watch-party-player-background",fullHeight:!0,zIndex:u.Py.Default,children:(0,l.jsx)(d.P,{className:S,display:u.nl.Flex,justifyContent:u.A9.Center,fullHeight:!0,fullWidth:!0,children:m})})})})}var nd,id=i(327167),td=function(e){var n=(0,jo.H)(),i=n.element,t=n.addChangeListener,a=n.removeChangeListener,r=c.useState(!1),o=r[0],s=r[1],d=c.useCallback((function(){s(!!i())}),[i,s]);c.useEffect((function(){return t(d),function(){a(d)}}),[t,d,a]);var u=document.getElementById("root"),m=null!==u&&o?function(){return u}:void 0;return(0,l.jsx)(id.dw,{parentSelector:m,disableAriaHideApp:o,children:e.children})},ad=i(920962),rd=i(705520),od=i(754955);!function(e){e.DismissButton="dismiss-button",e.PrimeButton="prime-button",e.Countdown="countdown"}(nd||(nd={}));var sd=function(e){var n=c.useState(10),i=n[0],t=n[1];return c.useEffect((function(){var e=setInterval((function(){t((function(e){return e<=0?0:e-1}))}),1e3);return function(){return clearInterval(e)}}),[]),c.useEffect((function(){i<=0&&e.onDismiss()}),[i,e]),(0,l.jsx)(Ql,{children:(0,l.jsx)(d.P,{padding:2,justifyContent:u.A9.Center,fullHeight:!0,fullWidth:!0,display:u.nl.Flex,flexDirection:u.bo.Column,children:(0,l.jsxs)(ad.h,{children:[(0,l.jsxs)(d.P,{children:[(0,l.jsx)(J.N,{fontSize:u.Z4.Size4,children:(0,h.hw)("Until next time...","WatchPartyHypeOutOverlayComponent")}),(0,l.jsx)(ln.hE,{type:dn.M2.H4,children:(0,h.hw)("Watch Party has ended","WatchPartyHypeOutOverlayComponent")})]}),(0,l.jsxs)(d.P,{display:u.nl.Flex,padding:{y:1},children:[(0,l.jsx)(d.P,{margin:{right:2},children:(0,l.jsx)(mo.M2,{"data-test-selector":nd.DismissButton,overlay:!1,onClick:function(){e.onDismiss()},variant:mo.sK.Secondary,children:(0,l.jsx)(d.P,{padding:1,children:(0,l.jsx)(J.N,{"data-test-selector":nd.Countdown,type:dn.M2.Span,tabularNums:!0,color:u.Q1.Overlay,children:(0,h.hw)("Dismiss ({countdown})",{countdown:(0,Vt.a3)(i,Vt.wg.HumanizedShort)},"WatchPartyHypeOutOverlayComponent")})})})}),(0,l.jsx)(Wr.$n,{"data-test-selector":nd.PrimeButton,overlay:!1,variant:Wr.VQ.Primary,targetBlank:!0,icon:rd.I,linkTo:e.primeVideoLink||od.T,children:(0,h.hw)("Continue on Prime","WatchPartyHypeOutOverlayComponent")})]})]})})})},ld=i(465177),dd=i(190653),ud=i(255655),cd=i(172340),md=i(628346),vd=i(239796),pd=i(588579),hd=i(39059),fd=i(129583);function gd(e,n,i){var t,a,r,o,s,l,d=(0,fd.P)(n,e,i);d&&n&&(l=function(e){var n,i,t,a,r,o,s,l=null===(r=null===(a=null===(t=null===(i=null===(n=e.data)||void 0===n?void 0:n.user)||void 0===i?void 0:i.watchParty)||void 0===t?void 0:t.session)||void 0===a?void 0:a.decoration)||void 0===r?void 0:r.item;l&&(s="EpisodeDetails"===(null===(o=l.details)||void 0===o?void 0:o.__typename)?(0,hd.k3)(l.details):null==l?void 0:l.title);return s}(d));var u=null===(s=null===(o=null===(r=null===(a=null===(t=null==d?void 0:d.data)||void 0===t?void 0:t.user)||void 0===a?void 0:a.watchParty)||void 0===r?void 0:r.session)||void 0===o?void 0:o.decoration)||void 0===s?void 0:s.item.primeVideoLink,m=(0,c.useRef)(u);(0,c.useEffect)((function(){n&&u&&m.current!==u&&(m.current=u)}),[u,n]);var v=(0,T.Z)(e);return(0,c.useEffect)((function(){v&&v!==e&&(m.current=null)}),[e,v]),{watchParty:d,watchPartyTitle:l,primeVideoLinkRef:m}}var kd=i(302790),yd=i(535502);var Sd=g.x.wrap((function(){return Promise.all([i.e(27561),i.e(85459),i.e(65300),i.e(10286),i.e(13993),i.e(20559),i.e(31264),i.e(44567),i.e(75853),i.e(98526),i.e(30326),i.e(24576),i.e(48750),i.e(82391),i.e(27926),i.e(34726),i.e(66982),i.e(44196),i.e(985),i.e(53745),i.e(1394),i.e(16447),i.e(26190),i.e(5392),i.e(59895),i.e(8069),i.e(69188),i.e(45342),i.e(87674),i.e(19906)]).then(i.bind(i,931965))}),"SupportPanelContainer",{placeholder:null}),bd=g.x.wrap((function(){return i.e(79116).then(i.bind(i,511327))}),"NoEligibleWatchStreakRecoveryContentModal",{placeholder:null}),_d=g.x.wrap((function(){return Promise.all([i.e(10204),i.e(76584),i.e(13046),i.e(31073),i.e(54953),i.e(71257),i.e(93919)]).then(i.bind(i,720530))}),"WatchStreakContextManager"),xd=500,Cd=500,wd=768,Nd="https://vod-secure.twitch.tv/_404/404_processing_320x180.png",Pd=(0,mi.U)({name:"ChannelShell",category:"broadcast"}),Dd=Pd.Available,Td=Pd.Unavailable;function Id(){var e,n,i,t,a,v,p,f,g,k,y,S,b,x,C,w,P,D,I,F,E=(0,m.zy)(),j=(0,m.Zp)(),L=(0,ls.p)().closeModal,A=(0,m.g)(),R=null!==(n=null===(e=A.channelLogin)||void 0===e?void 0:e.toLowerCase())&&void 0!==n?n:null,H=null!==(i=A.contentID)&&void 0!==i?i:null,O=(0,r.d4)((function(e){return e.ui.rightColumnPositionedBeside})),M=!!jl(),B=!!(0,m.RQ)({path:"/:channelLogin"}),U=A.contentType===Js.zd.Clip?H:null,V=A.collectionID||(0,Or.ov)(E.search,"collection")||(A.contentType===Js.zd.Collection?H:null),z=(0,dd.rk)({channelLogin:R,videoID:null!==(t=A.videoID)&&void 0!==t?t:A.contentType===Js.zd.Video?H:null,collectionID:V,clipSlug:U}),W=z.channelData,G=z.videoID,q=z.clipOffset,Z=z.clipIsFeatured,Q=z.guestStarSessionID,K=z.guestStarGuestCount,Y=z.vodLoaded,X=z.userMissingReason,$=z.contentMissing,J=z.loading,ee=function(e){var n=e.search,i=(0,c.useRef)(0),t=(0,Or.ov)(n,"t"),a=t?(0,Lo.$)(t):void 0,r=(0,c.useState)(a),o=r[0],s=r[1];return(0,c.useEffect)((function(){s(a)}),[a]),{requestedVideoOffset:o,setRequestedVideoOffset:s,getVideoOffset:c.useCallback((function(){return i.current}),[]),onVideoTimeChange:c.useCallback((function(e){i.current=e}),[])}}({search:E.search}),ne=ee.getVideoOffset,ie=ee.onVideoTimeChange,te=ee.requestedVideoOffset,ae=ee.setRequestedVideoOffset,re=null!==(a=null==W?void 0:W.id)&&void 0!==a?a:null,oe=null!==(v=null!=R?R:null==W?void 0:W.login)&&void 0!==v?v:null,se=(0,we.h5)().setChannelLogin;(0,c.useEffect)((function(){return se(oe),function(){se(null)}}),[oe,se]);var le=(0,zs.T)(null!=re?re:""),de=(0,r.d4)((function(e){return e.ui.persistentPlayerIsPersisting})),ue=(0,r.d4)((function(e){return e.ui.rightColumnExpanded})),ce=(0,r.d4)((function(e){return e.ui.sideNavExpanded})),me=(0,r.d4)((function(e){return e.ui.theatreModeEnabled})),ve=(0,Gs.uV)(),pe=(0,c.useState)(!1),he=pe[0],fe=pe[1],ge=(0,c.useCallback)((function(e){return fe((0,Qs.cJ)(e))}),[fe]),ke=null!==(p=null==W?void 0:W.displayName)&&void 0!==p?p:null,ye=null===(f=null==W?void 0:W.stream)||void 0===f?void 0:f.id,Se=(0,c.useState)(!1),be=Se[0],_e=Se[1],xe=function(e){var n=e.channelLogin,i=e.routeChannelLogin,t=e.isVodPlaybackRoute,a=e.channelViewFromRoute,r=e.isChannelRoute,o=e.vodLoaded,l=e.hasContentClassificationGate,d=(0,m.zy)(),u=(0,m.Zp)(),v=(0,Ro.M)(n),p=v.isLive,h=v.liveSince,f=null!=a?a:ma.n.None,g=(0,c.useRef)(f),k=p,y=null!==p;null===k&&(k=(f=g.current)!==ma.n.Home);var S=Boolean(!i||f===ma.n.Watch||r&&k&&f!==ma.n.Home||t);return g.current=S?ma.n.Watch:ma.n.Home,(0,c.useEffect)((function(){null!==p&&null===a&&u({search:d.search},{replace:!0,state:(0,Vs.eh)((0,s.__assign)((0,s.__assign)({},d.state),{channelView:S?ma.n.Watch:ma.n.Home}))})}),[p,a,S,u,d.search,d.state]),{isWatch:S,isLive:k,liveSince:h,isLiveKnown:y,persistPlayer:!l&&(t&&o||p&&r&&f!==ma.n.Home)}}({channelLogin:oe,routeChannelLogin:R,isChannelRoute:B,isVodPlaybackRoute:M,channelViewFromRoute:null!==(k=null===(g=E.state)||void 0===g?void 0:g.channelView)&&void 0!==k?k:null,vodLoaded:Y,hasContentClassificationGate:he}),Ce=xe.persistPlayer,Ne=xe.isWatch,Pe=xe.isLive,De=xe.liveSince,Te=xe.isLiveKnown,Ie=Jo({channelLogin:oe,isLive:Pe}),Fe=(0,r.d4)(o.wz),Ee=!!Fe,je=(0,_.QN)((function(e){return e.session.firstPageLoaded})),Le=null==Fe?void 0:Fe.id;!Pe&&Ee&&re!==Le&&(0,Ws.Rg)("visited_offline_channel",je);var Ae=function(e,n,i){var t=(0,c.useState)(!1),a=t[0],r=t[1],o=(0,c.useState)(),s=o[0],l=o[1],d=(0,c.useState)(!1),u=d[0],m=d[1],v=(0,c.useState)(!1),p=v[0],h=v[1],f=(0,c.useState)(!1),g=f[0],k=f[1],y=(0,yd.E)(e),S=y.isHostingWatchParty,b=y.watchPartyStateFromPubsub,_=(0,T.Z)(S),x=(0,T.Z)(b),C=S&&n&&!i&&!u,w=(0,c.useCallback)((function(){m((function(e){return!e}))}),[]);(0,c.useEffect)((function(){!_||S||a||(r(!0),m(!1),h(!1)),!_&&S&&a&&(k(!1),r(!1))}),[a,_,S]),(0,c.useEffect)((function(){k(!1),r(!1),h(!1),m(!1)}),[e]),(0,c.useEffect)((function(){a&&!C&&n&&!i&&k(!0)}),[C,a,n,i]);var N=!(0,kd.Op)(x)&&(0,kd.Op)(b);return{isHosting:S,pubsubState:b,justEnded:a,setJustEnded:r,broadcasterLatency:s,setBroadcasterLatency:l,isDismissed:u,setIsDismissed:m,onToggleWatchPartyMode:w,isShowingInMain:C,isPlaying:p,setIsPlaying:h,isShowingHypeOut:g,setIsShowingHypeOut:k,shouldTriggerJitter:N}}(oe||void 0,Ne,M),Re=gd(oe||"",Ae.isHosting,Ae.shouldTriggerJitter),He=Re.watchParty,Oe=Re.watchPartyTitle,Me=Re.primeVideoLinkRef,Be=(0,dd.eJ)({channelID:re}).canJoinStatus,Ue=Zo({channelLogin:oe,isLive:Pe}),Ve=Ue.organizerId,ze=Ue.organizerLogin,We=Ue.organizerDisplayName,Ge=Ue.channelDisplayName,qe=Ue.costreamerStatus,Ze=Ue.isCurrentUserLive,Qe=Ue.setShowOverlay,Ke=Ue.showOverlay,Ye=(0,jo.H)(),Xe=Ye.disable,$e=Ye.element;(0,c.useEffect)((function(){var e=$e();Ae.isHosting&&e&&Xe()}),[Ae.isHosting,$e,Xe]);var Je=Boolean(!A.contentType&&A.contentID),en=function(e){var n=(0,c.useRef)(null),i=(0,c.useRef)(null),t=(0,c.useState)(null),a=t[0],r=t[1],o=(0,c.useState)(),s=o[0],l=o[1],d=(0,c.useState)(),u=d[0],m=d[1],v=(0,c.useCallback)((function(){var i;if(!e.isInvalidRoute){var t=null===(i=null==n?void 0:n.current)||void 0===i?void 0:i.offsetHeight;if(e.isWatch){t&&u!==t&&m(t);var o=u&&s?u-s:null;o&&o!==a&&r(o)}else{r(0);var d=window.innerWidth-1?o()(n,(function(e){return e.channel.cheer.cheerGroups[r].nodes}),(function(e){return(0,t.__spreadArray)([a],e,!0)})):o()(n,(function(e){return e.channel.cheer.cheerGroups}),(function(e){return(0,t.__spreadArray)((0,t.__spreadArray)([],e,!0),[{__typename:”CheermoteGroup”,templateURL:i.template,nodes:[a]}],!1)}))}if(e.type===p.PD.BitsCampaignRemoveCheermoteEvent){var s=e;return o()(n,(function(e){return e.channel.cheer.cheerGroups}),(function(e){return e.map((function(e){return(0,t.__assign)((0,t.__assign)({},e),{nodes:e.nodes.filter((function(e){return!e||!e.campaign||e.campaign.id!==s.campaign_id}))})}))}))}}return n},skipMessage:function(){return!e.state.bitsCardOpen||!e.props.channelLogin}})},n.prototype.unsubscribe=function(){this.updatesUnsubscriber&&(this.updatesUnsubscriber(),this.updatesUnsubscriber=null),this.actionsUnsubscriber&&(this.actionsUnsubscriber(),this.actionsUnsubscriber=null)},n}(d.Component),H=(0,c.Zz)((0,u.Ng)((function(e){return{firstPageLoaded:e.session.firstPageLoaded}})),A((function(e){return{ancestorContextValue:e}})),(0,v._v)(N(),{skip:function(e){return!e.channelLogin||!e.firstPageLoaded},options:function(e){var n;return{variables:{login:null!==(n=e.channelLogin)&&void 0!==n?n:””},fetchPolicy:”cache-and-network”}}}),(0,v._v)(D(),{name:”sharedChatData”,skip:function(e){return!e.participantIDs||!e.firstPageLoaded},options:function(e){return{variables:{ids:e.participantIDs},fetchPolicy:”cache-first”}}}),(0,v._v)(I(),{name:”globalData”,options:{fetchPolicy:”cache-and-network”}}))(R)},989320:function(e,n,i){“use strict”;i.d(n,{y:function(){return D},Z:function(){return x}});var t=i(474848),a=i(959340),r=i(132902),o=i(723319),s=i(914421),l=i(296540),d=i(844023),u=i(876531),c=i(331635),m=i(312663),v=i(588702),p=i(564368),h=i(415044),f=i(868238),g=i(859406),k=i(899286),y=i(352443),S=i(507044),b=i(792386),_=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.onBuyClick=function(){n.props.activateOneClickPurchase?n.props.activateOneClickPurchase(n.props.offer,1):n.openBitsCheckout({forcePopup:!1})},n.onBuyClickExtraSmall=function(){n.props.activateOneClickPurchase?n.props.activateOneClickPurchase(n.props.offer,1):n.openBitsCheckout({forcePopup:!0})},n.openBitsCheckout=function(e){var i,t=e.forcePopup,a=n.props.channelID||””,r=n.props.offer,o=(0,S.tf)({trackBitsCardInteraction:n.props.trackBitsCardInteraction,channelID:a,onCloseModal:n.props.onClose,trackingID:n.props.trackingID,checkoutID:n.props.checkoutID,purchaseUrl:r.url,bitsAmount:r.bits,closeAllBits:n.props.closeAllBits,location:n.props.location,offerID:n.props.offer.id,promotionID:null===(i=null==r?void 0:r.promotion)||void 0===i?void 0:i.id,checkoutFormDispatch:n.props.showCheckoutFormModal,forcePopup:t,bitsBalance:n.props.bitsBalance});n.props.onOpenPurchaseScreen&&n.props.onOpenPurchaseScreen(),o&&(n.props.onBuyPopupClose(o),n.props.onClose())},n}return(0,c.__extends)(n,e),n.prototype.render=function(){if(this.props.offer.type===u.l0Y.BUNDLE){var e=this.props.offer,n=null;(0,S.xb)(e)&&(n=(0,t.jsx)(a.P,{className:”bits-buy-card-offer-row__bonus-text bits-buy-card-offer-row__bonus-text-headline”,”data-test-selector”:”first-time-promo-form”,padding:{bottom:1},children:(0,t.jsx)(m.N,{type:v.M2.Strong,fontSize:s.Z4.Size6,children:(0,g.hw)(“Special Offer: 1st Time Buyers”,”Bits–BuyCard”)})}));var i=null;e.discount&&(i=(0,t.jsx)(a.P,{className:”bits-buy-card-offer-row__sub-text”,”data-test-selector”:”discount-subtext-form”,children:(0,g.hw)(“{percentOff,number,percent} discount”,{percentOff:e.discount},”Bits–BuyCard”)}));var r=null;return((0,S.xb)(e)||(0,S.dw)(e))&&(r=(0,t.jsx)(a.P,{“data-test-selector”:”one-per-account-form”,children:(0,t.jsx)(m.N,{color:s.Q1.Alt2,children:(0,g.hw)(“one per account”,”Bits–BuyCard”)})})),(0,t.jsxs)(a.P,{className:”bits-buy-card-offer-row”,flexShrink:0,display:s.nl.Flex,justifyContent:s.A9.Center,flexDirection:s.bo.Column,padding:{x:2,y:1},children:[n,(0,t.jsxs)(a.P,{display:s.nl.Flex,justifyContent:s.A9.Between,alignItems:s.k2.Center,children:[(0,t.jsxs)(a.P,{flexGrow:1,children:[(0,t.jsx)(m.N,{type:v.M2.H5,color:s.Q1.Base,bold:!0,children:(0,g.hw)(“{bits} Bits”,{bits:(0,g.ZV)(e.bits)},”Bits–BuyCard”)}),(0,t.jsx)(k.d,{bitsConfig:this.props.bitsConfig,amount:e.bits,size:y.wF.ExtraSmall})]}),(0,t.jsxs)(a.P,{flexShrink:0,display:s.nl.Flex,flexDirection:s.bo.Column,alignItems:s.k2.End,children:[(0,t.jsx)(a.P,{display:s.nl.Hide,breakpointExtraSmall:{display:s.nl.Block},children:(0,t.jsx)(p.$n,{onClick:this.onBuyClick,”data-a-target”:”bits-purchase-button-“.concat(e.bits),children:(0,g.ZV)(e.amount,{style:”currency”,currency:e.currencyCode})})}),(0,t.jsx)(a.P,{display:s.nl.Block,breakpointExtraSmall:{display:s.nl.Hide},children:(0,t.jsx)(p.$n,{onClick:this.onBuyClickExtraSmall,”data-a-target”:”bits-purchase-button-xs-“.concat(e.bits),children:(0,g.ZV)(e.amount,{style:”currency”,currency:e.currencyCode})})}),(i||r)&&(0,t.jsxs)(a.P,{alignSelf:s.gB.Stretch,textAlign:s.nO.Right,margin:{top:.5},children:[i,r]})]})]})]})}return null},n}(l.Component);var x,C=(0,h.Ng)(null,(function(e){return(0,f.zH)({showCheckoutFormModal:b.X},e)}))(_),w=i(865168),N=i(467957),P=i(37854);!function(e){e.Fullsize=”full-size”,e.Smallnoscroll=”no-scroll–small”,e.Scrollview=”scroll-view”}(x||(x={}));var D=function(e){var n=(0,l.useRef)(null),i=[],c=[];e.offers.forEach((function(n){if(n.type!==u.l0Y.AD){var r=(0,t.jsx)(a.P,{borderTop:!0,children:(0,t.jsx)(C,{offer:n,bitsConfig:e.bitsConfig,channelID:e.channelID,trackingID:e.trackingID,checkoutID:e.checkoutID,channelLogin:e.channelLogin,currentUserSHA:e.currentUserSHA,location:e.location,onClose:e.onClose,onBuyPopupClose:e.onBuyPopupClose,closeAllBits:e.closeAllBits,trackBitsCardInteraction:e.trackBitsCardInteraction,showBitsTiers:e.location===P.Yl.GetBitsButtonTopNav,activateOneClickPurchase:e.activateOneClickPurchase,bitsBalance:e.bitsBalance,onOpenPurchaseScreen:e.onOpenPurchaseScreen})},n.id),o=(0,S.UB)(n),s=(0,S.xb)(n);s&&!e.hidePromos||o&&!s?i.push(r):o||c.push({bitsOffer:n,bitsOfferRow:r})}}));var m=(0,t.jsx)(r.F,{transitionType:o.ES.Fade,duration:o.Cf.Long,children:c.map((function(e){return e.bitsOfferRow}))});switch(e.size){case x.Scrollview:return(0,t.jsx)(d.Vq,{ref:n,children:(0,t.jsxs)(a.P,{flexGrow:1,flexWrap:s.I4.NoWrap,display:s.nl.Flex,flexDirection:s.bo.Column,children:[(0,N.OZ)()&&(0,t.jsx)(a.P,{margin:1,children:(0,t.jsx)(w.M,{})}),i,m]})});case x.Smallnoscroll:return(0,t.jsxs)(a.P,{className:”bits-buy-card-offers__no-scroll–small”,flexGrow:1,flexWrap:s.I4.NoWrap,display:s.nl.Flex,flexDirection:s.bo.Column,children:[i,m]});default:return(0,t.jsxs)(a.P,{className:”bits-buy-card-offers__full-size”,flexGrow:1,flexWrap:s.I4.NoWrap,display:s.nl.Flex,flexDirection:s.bo.Column,fullWidth:!0,children:[i,m]})}}},865168:function(e,n,i){“use strict”;i.d(n,{M:function(){return v}});var t=i(474848),a=i(312663),r=i(588702),o=i(70931),s=i(959340),l=i(914421),d=i(97774),u=(i(296540),i(859406)),c=”background–NmEfb”,m=”text–hdK59″,v=function(){var e=(0,u.hw)(“Right now, we’ll Cheer 10% on top of every Cheer over 300 and all Power-Ups. Don’t miss out! Terms apply. Learn More.“,{“x:strong”:function(e){return(0,t.jsx)(a.N,{type:r.M2.Span,bold:!0,children:e})},”x:termsLink”:function(e){return(0,t.jsx)(o.Cb,{underline:!0,targetBlank:!0,linkTo:”https://www.twitch.tv/p/en/legal/subtember/”,children:e})},”x:learnLink”:function(e){return(0,t.jsx)(o.Cb,{underline:!0,className:m,targetBlank:!0,linkTo:”http://bits.twitch.tv/”,children:e})}},”WebviewSubtemberBanner”);return(0,t.jsx)(s.P,{position:l.yX.Relative,className:c,borderRadius:d.Z.Large,style:{color:”#000000″},children:(0,t.jsxs)(s.P,{padding:1,children:[(0,t.jsx)(s.P,{children:(0,t.jsx)(a.N,{style:{fontFamily:”Roobert”,fontSize:”24px”},children:(0,u.hw)(“SUBtember Bonus Bits”,”WebviewSubtemberBanner”)})}),(0,t.jsx)(s.P,{children:(0,t.jsx)(a.N,{className:m,children:e})})]})})}},365242:function(e,n,i){“use strict”;i.d(n,{b:function(){return Y}});var t=i(415044),a=i(368770),r=i(331635),o=i(474848),s=i(959340),l=i(914421),d=i(312663),u=i(97774),c=i(588702),m=i(246942),v=i.n(m),p=i(296540),h=i(868238),f=i(859406),g=i(739604),k=i(844023),y=i(276337),S=i(516238),b=i(876531),_=i(684990),x=i(853904),C=i(917364),w=i(120589),N=i(467957),P=i(37854),D=i(750735),T=i(38811),I=i.n(T),F=i(989320),E=i(217413),j=i(754994),L=function(e){var n=(0,o.jsx)(d.N,{type:c.M2.P,color:l.Q1.Alt,children:(0,f.hw)(“Prices are shown in {currencyCode}“,{“x:bold”:function(e){return(0,o.jsx)(d.N,{type:c.M2.Span,bold:!0,children:e})},currencyCode:e.currencyCode},”Bits–BuyCard”)});e.pricesIncludeVAT&&(n=(0,o.jsx)(d.N,{“data-test-selector”:”prices-include-vat-selector”,type:c.M2.P,color:l.Q1.Alt,children:(0,f.hw)(“Prices are shown in {currencyCode} and include VAT“,{“x:bold”:function(e){return(0,o.jsx)(d.N,{type:c.M2.Span,bold:!0,children:e})},currencyCode:e.currencyCode},”Bits–BuyCard”)}));var i=(0,o.jsx)(d.N,{“data-test-selector”:”bits-legal-description-selector”,type:c.M2.P,color:l.Q1.Alt,children:(0,f.hw)(“When you use Bits in a channel, Twitch rewards the streamer and you create an exciting moment.”,”Bits–BuyCard”)}),t=null;e.minBitsToCheer&&e.minBitsToCheer>1&&(t=(0,o.jsx)(d.N,{“data-test-selector”:”min-bits-to-cheer-selector”,color:l.Q1.Alt,children:(0,f.hw)(“{displayName} requires {minBits} Bits to Cheer in this channel.”,{displayName:e.displayName,minBits:e.minBitsToCheer},”Bits–BuyCard”)}));var a=null;return void 0!==e.bitsBalance&&null!==e.bitsBalance&&(a=(0,o.jsx)(d.N,{“data-test-selector”:”bits-balance-header-selector”,color:l.Q1.Alt,children:(0,f.hw)(“You have {totalBits} Bits”,{totalBits:(0,o.jsx)(“strong”,{“data-a-target”:”buy-card-bits-count”,children:e.bitsBalance})},”Bits–BuyCard”)})),(0,o.jsxs)(s.P,{className:”bits-buy-card-header”,padding:e.hidePadding?void 0:1,flexShrink:0,fullWidth:!0,children:[(0,o.jsxs)(s.P,{children:[e.location===P.Yl.ChatTooltip&&(0,o.jsx)(d.N,{type:c.M2.H4,color:l.Q1.Alt,children:(0,f.hw)(“Purchase Bits”,”Bits–BuyCard”)}),(0,o.jsx)(s.P,{margin:{left:e.location===P.Yl.GetBitsButtonTopNav?1:0},children:n}),(0,E.D)(j.nk.BitsBundle)&&(0,o.jsx)(s.P,{margin:{left:e.location===P.Yl.GetBitsButtonTopNav?1:0,top:1},children:i})]}),e.location===P.Yl.ChatTooltip&&(0,o.jsxs)(s.P,{margin:{top:1},children:[a,t]})]})},A=i(564368),R=i(899286),H=i(352443),O=i(507044),M=i(792386),B=”min-bits-to-cheer-selector”,U=”prices-include-vat-selector”,V=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.handleBuyClick=function(){n.openBitsCheckout({forcePopup:!1})},n.handleBuyClickExtraSmall=function(){n.openBitsCheckout({forcePopup:!0})},n.openBitsCheckout=function(e){var i;if(n.props.specialOffer){var t=e.forcePopup,a=n.props.displayName||””,r=(0,O.tf)({trackBitsCardInteraction:n.props.trackBitsCardInteraction,channelID:a,trackingID:n.props.trackingID,checkoutID:n.props.checkoutID,purchaseUrl:n.props.specialOffer.url,bitsAmount:n.props.specialOffer.bits,closeAllBits:n.props.closeAllBits,location:n.props.location,offerID:n.props.specialOffer.id,promotionID:null===(i=n.props.specialOffer.promotion)||void 0===i?void 0:i.id,checkoutFormDispatch:n.props.showCheckoutFormModal,forcePopup:t,bitsBalance:n.props.bitsBalance});n.props.onOpenPurchaseScreen&&n.props.onOpenPurchaseScreen(),r&&(n.props.onBuyPopupClose(r),n.props.onClose())}},n}return(0,r.__extends)(n,e),n.prototype.render=function(){var e=this.renderCurrencyDisclaimer(this.props.pricesIncludeVAT,this.props.currencyCode),n=this.renderMinBitsToCheerInChannel(this.props.displayName,this.props.minBitsToCheer),i=null,t=null,a=null;return void 0!==this.props.specialOffer&&null!==this.props.specialOffer&&(i=(0,o.jsx)(d.N,{type:c.M2.H4,color:l.Q1.Base,bold:!0,children:(0,f.hw)(“{percent} off for first-time Bits buyers!”,{percent:(0,f.ZV)(this.props.specialOffer.discount,”percent”)},”Bits–NewUserCheerHeader”)}),t=(0,o.jsx)(s.P,{display:l.nl.Flex,children:(0,o.jsx)(R.d,{amount:this.props.specialOffer.bits,bitsConfig:this.props.bitsConfig,size:H.wF.Small})}),a=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.P,{display:l.nl.Hide,breakpointExtraSmall:{display:l.nl.Block},children:(0,o.jsx)(A.$n,{onClick:this.handleBuyClick,”data-a-target”:”bits-purchase-button-“.concat(this.props.specialOffer.bits),children:this.buyBitsButtonText})}),(0,o.jsx)(s.P,{display:l.nl.Block,breakpointExtraSmall:{display:l.nl.Hide},children:(0,o.jsx)(A.$n,{onClick:this.handleBuyClickExtraSmall,”data-a-target”:”bits-purchase-button-xs-“.concat(this.props.specialOffer.bits),children:this.buyBitsButtonText})})]})),(0,o.jsxs)(s.P,{className:”bits-buy-card-header”,padding:1,flexShrink:0,fullWidth:!0,textAlign:l.nO.Center,children:[(0,o.jsxs)(s.P,{margin:{x:1},children:[i,n]}),(0,o.jsx)(s.P,{justifyContent:l.A9.Center,display:l.nl.Flex,margin:{y:1},fullWidth:!0,children:t}),a,(0,o.jsx)(s.P,{margin:{top:1},children:e})]})},Object.defineProperty(n.prototype,”buyBitsButtonText”,{get:function(){return this.props.specialOffer?(0,f.hw)(“Buy {amount} Bits for {price}”,{amount:(0,f.ZV)(this.props.specialOffer.bits),price:(0,f.ZV)(this.props.specialOffer.amount,{style:”currency”,currency:this.props.specialOffer.currencyCode})},”Bits–NewUserCheerHeader”):””},enumerable:!1,configurable:!0}),n.prototype.renderCurrencyDisclaimer=function(e,n){return e?(0,o.jsx)(d.N,{“data-test-selector”:U,type:c.M2.P,color:l.Q1.Alt,children:(0,f.hw)(“Prices are shown in {currencyCode} and include VAT“,{“x:bold”:function(e){return(0,o.jsx)(d.N,{type:c.M2.Span,bold:!0,children:e})},currencyCode:n},”Bits–NewUserCheerHeader”)}):(0,o.jsx)(d.N,{type:c.M2.P,color:l.Q1.Alt,children:(0,f.hw)(“Prices are shown in {currencyCode}“,{“x:bold”:function(e){return(0,o.jsx)(d.N,{type:c.M2.Span,bold:!0,children:e})},currencyCode:n},”Bits–NewUserCheerHeader”)})},n.prototype.renderMinBitsToCheerInChannel=function(e,n){return n&&n>1?(0,o.jsx)(d.N,{“data-test-selector”:B,color:l.Q1.Alt,italic:!0,children:(0,f.hw)(“{displayName} requires {minBits} Bits to Cheer in this channel.”,{displayName:e,minBits:n},”BBits–NewUserCheerHeader”)}):null},n}(p.Component);var z=(0,t.Ng)(null,(function(e){return(0,h.zH)({showCheckoutFormModal:M.X},e)}))(V),W=i(865168),G=(0,g.U)({name:”BuyBitsCard”,category:”monetization”}),q=G.Available,Z=G.Unavailable,Q=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.onBuyPopupClose=function(e){(0,S.qh)(e,(function(){n.props.data&&n.props.data.refetch()}))},n}return(0,r.__extends)(n,e),n.prototype.render=function(){var e=this.props.location===P.Yl.ChatTooltip,n=v()(“bits-buy-card”,{“bits-buy-card__chat-tooltip”:e});if(!this.props.data||this.props.data.loading)return(0,o.jsx)(x.d,{});if(this.props.data.error)return(0,o.jsx)(Z,{children:(0,o.jsx)(s.P,{className:v()(n,”bits-buy-card–shorter”),textAlign:l.nO.Center,”data-a-target”:”bits-buy-card-error”,alignItems:l.k2.Center,justifyContent:l.A9.Center,display:l.nl.Flex,padding:this.props.hidePadding?void 0:1,fullWidth:!0,children:(0,o.jsx)(d.N,{italic:!0,children:(0,f.hw)(“Bits prices are unavailable right now. Check back again later.”,”Bits–BuyCard”)})})});var i=[];return this.props.data.currentUser&&this.props.data.currentUser.bitsOffers?i=this.props.data.currentUser.bitsOffers.reduce((function(e,n){return n&&e.push(n),e}),[]):this.props.data.bitsOffers&&(i=this.props.data.bitsOffers),this.props.shouldShowNewUserCheerUX?(0,o.jsx)(q,{children:this.renderNewUserCheerBuyCard(n,i)}):(0,o.jsx)(q,{children:this.renderDefaultBuyCard(n,i)})},n.prototype.renderDefaultBuyCard=function(e,n){var i=this.doPricesIncludeVAT(n),t=this.getCurrencyCode(n),a=this.props.data&&this.props.data.currentUser,r=this.props.data&&this.props.data.user,d=(0,o.jsx)(L,{bitsBalance:a&&a.bitsBalance||void 0,displayName:r&&r.displayName||this.props.channelLogin||””,minBitsToCheer:r&&r.cheer&&r.cheer.settings&&r.cheer.settings.cheerMinimumBits||void 0,pricesIncludeVAT:i,currencyCode:t,location:this.props.location,hidePadding:this.props.hidePadding}),c=this.renderBitsOffers(n,{hidePromos:this.props.hidePromos,size:this.props.size});return(0,o.jsxs)(s.P,{className:e,”data-a-target”:”bits-buy-card”,fullWidth:!0,display:l.nl.Flex,flexDirection:l.bo.Column,children:[this.props.oneClickPurchase&&(0,o.jsx)(s.P,{attachTop:!0,attachLeft:!0,attachRight:!0,attachBottom:!0,background:l.VS.Overlay,position:l.yX.Absolute,zIndex:l.Py.Above,borderRadius:u.Z.Large}),this.props.location===P.Yl.GetBitsButtonTopNav&&(0,N.OZ)()&&(0,o.jsx)(s.P,{margin:1,children:(0,o.jsx)(W.M,{})}),d,c]})},n.prototype.renderNewUserCheerBuyCard=function(e,n){var i=this.getSpecialOffer(n),t=this.doPricesIncludeVAT(n),a=this.getCurrencyCode(n),r=null;this.props.onBack&&(r=(0,o.jsx)(s.P,{position:l.yX.Absolute,padding:{top:.5,left:.5},attachLeft:!0,attachTop:!0,children:(0,o.jsx)(“div”,{“data-a-target”:”bits-buy-card–back”,style:{cursor:”pointer”},onClick:this.props.onBack,children:(0,o.jsxs)(d.N,{color:l.Q1.Link,type:c.M2.Span,children:[(0,o.jsx)(_.lv,{size:10}),(0,f.hw)(“Back”,”Bits–Buy-Card”)]})},”Bits–back-edit”)}));var u=(0,o.jsx)(z,{bitsConfig:this.props.bitsConfig,bitsBalance:this.props.data&&this.props.data.currentUser&&this.props.data.currentUser.bitsBalance||void 0,displayName:this.props.data&&this.props.data.user&&this.props.data.user.displayName||this.props.channelLogin||””,minBitsToCheer:this.props.data&&this.props.data.user&&this.props.data.user.cheer&&this.props.data.user.cheer.settings.cheerMinimumBits||void 0,pricesIncludeVAT:t,currencyCode:a,closeAllBits:this.props.closeAllBits,trackingID:this.props.trackingID,checkoutID:this.props.checkoutID,location:this.props.location,specialOffer:i,isLoggedIn:this.props.isLoggedIn,onBuyPopupClose:this.onBuyPopupClose,onClose:this.props.onClose,trackBitsCardInteraction:this.props.trackBitsCardInteraction,onOpenPurchaseScreen:this.props.onOpenPurchaseScreen}),m=this.renderBitsOffers(n,{hidePromos:!0,size:F.Z.Smallnoscroll});return(0,o.jsx)(k.Vq,{“data-a-target”:”bits-buy-card”,className:e,suppressScrollX:this.props.suppressScroll,suppressScrollY:this.props.suppressScroll,children:(0,o.jsxs)(o.Fragment,{children:[r,u,m]})})},n.prototype.renderBitsOffers=function(e,n){var i,t,a=n.hidePromos,r=n.size;if(!this.props||!this.props.data)return null;var s=this.props.data.user?this.props.data.user.id:””;return(0,o.jsx)(F.y,{offers:e,size:r,hidePromos:a,bitsConfig:this.props.bitsConfig,channelID:s||void 0,trackingID:this.props.trackingID,checkoutID:this.props.checkoutID,channelLogin:this.props.channelLogin,closeAllBits:this.props.closeAllBits,currentUserSHA:this.props.data&&this.props.data.currentUser&&this.props.data.currentUser.idSHA1||void 0,location:this.props.location,onBuyPopupClose:this.onBuyPopupClose,onClose:this.props.onClose,trackBitsCardInteraction:this.props.trackBitsCardInteraction,activateOneClickPurchase:this.props.activateOneClickPurchase,bitsBalance:(null===(t=null===(i=this.props.data)||void 0===i?void 0:i.currentUser)||void 0===t?void 0:t.bitsBalance)||void 0,onOpenPurchaseScreen:this.props.onOpenPurchaseScreen})},n.prototype.doPricesIncludeVAT=function(e){return e.filter((function(e){return e.type===b.l0Y.BUNDLE})).some((function(e){return e.includesVAT}))},n.prototype.getCurrencyCode=function(e){var n=””,i=e.filter((function(e){return e.type===b.l0Y.BUNDLE})).pop();return i&&i.type===b.l0Y.BUNDLE&&(n=i.currencyCode),n},n.prototype.getSpecialOffer=function(e){return e.filter((function(e){return e.type===b.l0Y.BUNDLE})).find((function(e){return e.isPromo&&null!==e.promotion&&e.promotion.id===w.F}))},n.defaultProps={hidePromos:!1},n}(p.Component);var K=(0,h.Zz)((0,y._v)(I(),{name:”data”,options:function(e){var n;return{variables:{channelLogin:null!==(n=e.channelLogin)&&void 0!==n?n:””,withChannel:!!e.channelLogin,isLoggedIn:e.isLoggedIn}}}}),(0,D.W)(“BitsBuyCard”,{autoReportInteractive:!0}),(0,C.a3)((function(e){return{bitsConfig:e.bitsConfig}})))(Q);var Y=(0,t.Ng)((function(e){return{isLoggedIn:(0,a.M3)(e)}}))(K)},899286:function(e,n,i){“use strict”;i.d(n,{d:function(){return d}});var t=i(474848),a=i(959340),r=i(914421),o=i(352443),s=i(477477),l=i(139022);function d(e){var n=(e.bitsConfig&&e.bitsConfig.indexedActions[s.J_]||(0,l.Vt)(“Cheer”)).orderedTiers.filter((function(n){return n.bits<=e.amount})).reverse().map((function(n){return(0,t.jsx)(a.P,{display:r.nl.Block,className:"bits-available-tiers__tier-bits-image",children:(0,t.jsx)(o.Kg,{size:e.size,amount:n.bits,prefix:s.J_,showImage:!0,showAmount:!1,animated:!1})},n.id)}));return(0,t.jsx)(a.P,{display:r.nl.Flex,padding:{y:.5},className:"bits-available-tiers__tier-bits-images",children:n})}},352443:function(e,n,i){"use strict";i.d(n,{Kg:function(){return k},wF:function(){return t}});var t,a=i(474848),r=i(914421),o=i(216042),s=i(246942),l=i.n(s),d=i(296540),u=i(868238),c=i(859406),m=i(917364),v=i(477477),p=i(949166),h=i(139022),f=i(67149),g=i(93159);!function(e){e[e.Large=4]="Large",e[e.Medium=3]="Medium",e[e.Small=2]="Small",e[e.ExtraSmall=1.5]="ExtraSmall",e[e.ExtremelySmall=1]="ExtremelySmall"}(t||(t={}));var k=(0,u.Zz)((0,m.a3)((function(e){return{bitsConfig:e.bitsConfig}})))((function(e){var n,i=(0,d.useContext)(f.nK).value,s=e.bitsConfig&&e.bitsConfig.indexedActions[e.prefix.toLowerCase()];s||(s=(0,h.Vt)("Cheer"));var u=e.amount||v.fB,m=s.orderedTiers.find((function(e){return e.bits<=u}));m||(m=s.orderedTiers[0]);var k=null===(n=e.bitsConfig)||void 0===n?void 0:n.tiers.find((function(e){return e.bits<=u}));k||(k=e.bitsConfig.tiers[0]);var y=e.display===r.nl.Inline||e.display===r.nl.InlineFlex||e.display===r.nl.InlineBlock,S=null,b=l()("cheermote-for-amount__cheer-amount",{"cheermote-for-amount__display--table-cell":!y},{"cheermote-for-amount__cheer-amount--medium":e.size===t.Medium},{"cheermote-for-amount__cheer-amount--small":e.size===t.Small||e.size===t.ExtraSmall},{"cheermote-for-amount__cheer-amount--extremely-small":e.size===t.ExtremelySmall});if(void 0!==e.amount&&e.showAmount){var _=e.formattedNumber?(0,c.ZV)(e.amount):e.amount;S=(0,a.jsx)(o.S,{padding:e.size===t.Small?0:void 0,textAlign:e.size===t.Small?r.nO.Center:void 0,children:(0,a.jsx)("strong",{className:b,style:{color:k.color},children:_})})}var x=l()("cheermote-for-amount__cheer-image",{"cheermote-for-amount__display--table-cell":!y},{"cheermote-for-amount__cheer--inline":y},{"cheermote-for-amount__cheer-image--small":e.size===t.Small},{"cheermote-for-amount__cheer-image--extra-small":e.size===t.ExtraSmall},{"cheermote-for-amount__cheer-image--extremely-small":e.size===t.ExtremelySmall}),C=(0,a.jsx)(g.F,{className:x,sources:(0,p.Yj)(s,m.bits,e.size||t.Large,i&&e.animated)});return e.showImage||(C=null),(0,a.jsx)(o.S,{className:"cheermote-for-amount",alignItems:e.alignItems,display:e.display,children:(0,a.jsxs)("span",{children:[C,S]})})}))},990135:function(e,n,i){"use strict";i.d(n,{u:function(){return y}});var t=i(331635),a=i(859406),r=i(664865),o=i(368770);var s=i(67050),l=null;function d(){if(l)return l;var e=navigator.serviceWorker.register("/service-worker.js",{scope:"/"});return l=e||Promise.reject(new Error("service worker runtime not available"))}var u,c=i(323260),m=i(458199),v=i.n(m);!function(e){e.NewSession="new-session",e.ClearSession="clear-session"}(u||(u={}));var p=a.x2.logger.withCategory("host-service-worker-messenger"),h=function(){function e(){}return e.syncSession=function(){var e=(0,o.wz)(a.x2.store.getState());if(e){var n=e.id;this.sendMessage({type:u.NewSession,userId:n})}else this.sendMessage({type:u.ClearSession})},e.sendMessage=function(e){var n=this;if(navigator.serviceWorker.controller)this.postMessage(e);else{p.debug("cannot postMessage immediately. waiting for a service worker to take control");var i=function(){p.debug("controller changed",{controllerExists:!!navigator.serviceWorker.controller}),navigator.serviceWorker.removeEventListener("controllerchange",i),n.postMessage(e)};navigator.serviceWorker.addEventListener("controllerchange",i)}},e.postMessage=function(e){navigator.serviceWorker.controller?(p.debug("postMessage",e),navigator.serviceWorker.controller.postMessage(JSON.stringify(e))):p.errorAndReport(new Error("navigator.serviceWorker.controller is null"),"postMessage called with no controlling service worker")},e}(),f="browserPushNotificationsEnabled",g=function(){function e(){}return e.exists=function(){return null!==a.x2.storage.getOptional(f)},e.isEnabled=function(){return a.x2.storage.get(f,!1)},e.setEnabled=function(){a.x2.storage.set(f,!0)},e.setDisabled=function(){a.x2.storage.set(f,!1)},e}(),k=a.x2.logger.withCategory("browser-push-notifications-manager"),y=function(){function e(){}return e.initialize=function(){return this.initPromise||(this.initPromise=this.initializationLogic()),this.initPromise},e.initializationLogic=function(){return(0,t.__awaiter)(this,void 0,Promise,(function(){var e,n,i,r;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:return(0,s.T1)()?(k.debug("permissions have been denied. nothing to do here."),[2]):[4,d()];case 1:return t.sent(),e=(0,o.M3)(a.x2.store.getState()),[4,this.hasPushSubscription()];case 2:return n=t.sent(),h.syncSession(),n?(i=g.exists()&&!g.isEnabled(),r=!e,i||r?[4,this.unsubscribe()]:[3,4]):[3,5];case 3:t.sent(),t.label=4;case 4:return[3,7];case 5:return e?!(0,s.XR)()||g.exists()&&!g.isEnabled()?[3,7]:[4,this.subscribe()]:[3,7];case 6:t.sent(),t.label=7;case 7:return[2]}}))}))},e.userSubscribe=function(e){return(0,t.__awaiter)(this,void 0,void 0,(function(){var n;return(0,t.__generator)(this,(function(i){switch(i.label){case 0:g.setEnabled(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.subscribe()];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),(0,s.T1)()||k.debug("user subscribe failed",{err:n,context:e}),[3,4];case 4:return(0,c.L)({allowed:(0,s.XR)(),context:e}),[2]}}))}))},e.userUnsubscribe=function(){return(0,t.__awaiter)(this,void 0,void 0,(function(){return(0,t.__generator)(this,(function(e){switch(e.label){case 0:return g.setDisabled(),[4,this.unsubscribe()];case 1:return e.sent(),[2]}}))}))},e.hasPushSubscription=function(){return(0,t.__awaiter)(this,void 0,Promise,(function(){return(0,t.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.getPushSubscription()];case 1:return[2,null!==e.sent()]}}))}))},e.subscribe=function(){return(0,t.__awaiter)(this,void 0,void 0,(function(){var e,n,i,l,u,c;return(0,t.__generator)(this,(function(m){switch(m.label){case 0:if((0,s.T1)())return k.debug("notification permission is denied"),[2];if(!(0,o.M3)(a.x2.store.getState()))return k.debug("cannot be enabled logged out"),[2];if(!(e=a.Zn.get("notification_app_server_public_key","")))throw new Error("application server public key is blank");return[4,d()];case 1:return n=m.sent(),[4,this.getPushSubscription()];case 2:return(i=m.sent())?[3,4]:(l=function(e){for(var n=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),i=atob(n),t=new Uint8Array(i.length),a=0;a=_(e)})).map((function(e){return(0,r.__assign)({type:t.Schedule},e)})),y=(0,l.bK)(null!==(m=null===(u=null===(d=null==n?void 0:n.user)||void 0===d?void 0:d.videos)||void 0===u?void 0:u.edges)&&void 0!==m?m:[]).filter((function(e){return(null==e?void 0:e.lengthSeconds)&&e.lengthSeconds>=c})).map((function(e){return(0,r.__assign)({type:t.Video},e)})),S=null;(null===(v=null==n?void 0:n.user)||void 0===v?void 0:v.stream)&&(S=P((0,r.__assign)({type:t.Live,title:null!==(h=null===(p=n.user.broadcastSettings)||void 0===p?void 0:p.title)&&void 0!==h?h:null},n.user.stream)));for(var b=[],x=0,C=y;x=F){for(var E=0;EF?(j.start>=g||0===I)&&f.push(j):(S.end=j.end>S.end?j.end:null==S?void 0:S.end,T=j.isSingleSegment))}!S||e>F||(0!==k.length&&void 0!==T||(T=!0),S.isSingleSegment=T,f.push(S))}return{segments:f,vods:b,scheduled:k}}(e,i),s=o.segments,d=o.vods,u=o.scheduled,p=function(e){var n=v,i=0,t=v,a=0;if(0===e.length)return{start:9,end:15};for(var r=0,o=e;r2)return{start:0,end:24};s.end.getDay()!==s.start.getDay()?(t=Math.min(t,s.start.getHours()*m+s.start.getMinutes()),a=Math.max(a,s.end.getHours()*m+s.end.getMinutes()+v)):(n=Math.min(n,s.start.getHours()*m+s.start.getMinutes()),i=Math.max(i,s.end.getHours()*m+s.end.getMinutes()))}var l=E(t,a),d=l[0],u=l[1],c=E(n,i),p=c[0],h=c[1];if(d=Math.max(0,d),p=Math.max(0,p),u=Math.min(48,u),h=Math.min(24,h),p>h)return u-d>=24?{start:0,end:24}:{start:d,end:u};if(d>u)return{start:p,end:h};var g=Math.min(p,d);if(u-g>=24)return{start:0,end:24};return{start:g,end:u}}(s),h=p.start,g=p.end,k=s;if(g-h==24){for(var y=[],x=0,D=s;x=_(e))&&y.push(F)}k=y}var j=function(e,n,i,t,a,r){for(var o=[[],[],[],[],[],[],[]],s=[[],[],[],[],[],[],[]],l=[[],[],[],[],[],[],[]],d=!1,u=0,c=e;ut?1:0)].push(m)}if(0===e.length||0===n.length)return{days:o,errFindingLinkedSegment:null!==a&&!d};for(var v=0,p=i;vt?1:0)]&&l[k].push(h)}for(var f=0,g=n;ft?1:0)].push(y)}for(var b=0;be.end&&(a=new Date(a)).setDate(a.getDate()-7)),t&&(t.nextSplit=s),t=s,n.push(s)}return n}function w(e,n){if(!n)return!1;var i=e.start,t=n.start,a=t=n.start}function P(e,n){var i=function(e){return e.type===t.Schedule?new Date(e.startAt):e.createdAt?new Date(e.createdAt):null}(e),a=function(e,n){if(e.type===t.Schedule){if(e.endAt)return new Date(e.endAt);if((a=new Date(e.startAt)).setHours(a.getHours()+d),n&&n.type===t.Schedule){var i=new Date(n.startAt);a=i30&&t++,[i,t]}var j=function(e,n){return n&&new Intl.DateTimeFormat(n,{hour:”numeric”}).resolvedOptions().hour12?L((0,o.fU)(e)):(0,o.fU)(e)},L=function(e){return e.replace(/[\:|\.]00/,””)};function A(e){var n=(0,s.RR)(“short”),i=n.shift();n.push(i);var t=[];return n.forEach((function(n,i){var a=new Date(e);a.setDate(e.getDate()+i),t.push({name:n,date:a})})),t}function R(e,n,i){return e<=i&&i<=n}function H(e){switch(e){case"Sunday":return(0,o.hw)("Streams every Sunday","StreamScheduleUtils");case"Monday":return(0,o.hw)("Streams every Monday","StreamScheduleUtils");case"Tuesday":return(0,o.hw)("Streams every Tuesday","StreamScheduleUtils");case"Wednesday":return(0,o.hw)("Streams every Wednesday","StreamScheduleUtils");case"Thursday":return(0,o.hw)("Streams every Thursday","StreamScheduleUtils");case"Friday":return(0,o.hw)("Streams every Friday","StreamScheduleUtils");case"Saturday":return(0,o.hw)("Streams every Saturday","StreamScheduleUtils");default:return""}}var O=function(e,n,i,t,a){var r=a?"https://www.twitch.tv/":"/";return n&&i?"".concat(r).concat(e,"/schedule?segmentID=").concat(i):!n&&i?"".concat(r).concat(e,"/schedule?seriesID=").concat(i):t?"".concat(r).concat(e,"/schedule?vodID=").concat(t):"".concat(r).concat(e,"/schedule")}},124082:function(e,n,i){"use strict";i.d(n,{B:function(){return o},m:function(){return s}});var t=i(859406),a=i(397837),r=i(850908);function o(e){var n,i={user_id:e.userID||"",channel_id:e.channelID||"",user_type:l(e.userType),chat_command:e.chatCommand,args:(n=e.args,n.trim().split(/\s+/))};t.E5.__track_SSRMigrationFixme("chat_command_client_success",i)}function s(e){var n={user_id:e.userID||"",channel_id:e.channelID||"",user_type:l(e.userType),body:e.body,error_type:d(e.errorType)};t.E5.track("chat_command_client_fail",n)}function l(e){var n;return((n={})[a.D.Viewer]="viewer",n[a.D.Vip]="vip",n[a.D.Moderator]="moderator",n[a.D.Broadcaster]="broadcaster",n)[e]}function d(e){return"unrecognized_cmd"===e?a.x.UnrecognizedCommand:r.ON.has(e)?a.x.InvalidParameters:e}},2600:function(e,n,i){"use strict";i.d(n,{Oi:function(){return u},Qd:function(){return d},U1:function(){return s},ni:function(){return t},tI:function(){return r},ts:function(){return o},zK:function(){return l}});var t,a=i(859406);!function(e){e.Default="default",e.TheaterMode="theater_mode",e.FullScreen="full_screen"}(t||(t={}));var r,o=function(e){var n={channel_id:e.channelID,prompt_instance_id:e.promptID,prompt_type:e.promptType,public_callout:!0,player_size_mode:e.playerSize};a.E5.track("client_happening_now_prompt_impression",n)},s=function(e){var n={channel_id:e.channelID,prompt_instance_id:e.promptID,prompt_type:e.promptType,public_callout:!0,player_size_mode:e.playerSize};a.E5.track("client_happening_now_prompt_impression_queued",n)};!function(e){e.DisableAll="disable_all",e.Dismiss="dismiss",e.OpenChat="open_chat"}(r||(r={}));var l,d=function(e){var n={channel_id:e.channelID,prompt_instance_id:e.promptID,prompt_type:e.promptType,action:e.action,player_size_mode:e.playerSize};a.E5.track("client_happening_now_prompt_interaction",n)};!function(e){e.ChatIcon="chat_icon",e.Expand="expand"}(l||(l={}));var u=function(e){var n={channel_id:e.channelID,type:e.type};a.E5.track("client_happening_now_chat_open",n)}},397837:function(e,n,i){"use strict";var t,a;i.d(n,{D:function(){return t},x:function(){return a}}),function(e){e[e.Viewer=0]="Viewer",e[e.Vip=1]="Vip",e[e.Moderator=2]="Moderator",e[e.Broadcaster=3]="Broadcaster"}(t||(t={})),function(e){e.InvalidParameters="invalid_parameters",e.MissingParameters="missing_parameters",e.Unauthorized="unauthorized",e.Unavailable="unavailable",e.UnrecognizedCommand="unrecognized_command",e.PinFailure="pin_failure",e.MomentsShutdown="moments_shutdown"}(a||(a={}))},850908:function(e,n,i){"use strict";var t,a,r,o;i.d(n,{IF:function(){return a},ON:function(){return s},RB:function(){return r},ZW:function(){return t},sq:function(){return o}}),function(e){e[e.Message=0]="Message",e[e.ExtensionMessage=1]="ExtensionMessage",e[e.Moderation=2]="Moderation",e[e.ModerationAction=3]="ModerationAction",e[e.TargetedModerationAction=4]="TargetedModerationAction",e[e.AutoMod=5]="AutoMod",e[e.SubscriberOnlyMode=6]="SubscriberOnlyMode",e[e.FollowerOnlyMode=7]="FollowerOnlyMode",e[e.SlowMode=8]="SlowMode",e[e.EmoteOnlyMode=9]="EmoteOnlyMode",e[e.R9KMode=10]="R9KMode",e[e.Connected=11]="Connected",e[e.Disconnected=12]="Disconnected",e[e.Reconnect=13]="Reconnect",e[e.Subscription=14]="Subscription",e[e.Resubscription=15]="Resubscription",e[e.GiftPaidUpgrade=16]="GiftPaidUpgrade",e[e.AnonGiftPaidUpgrade=17]="AnonGiftPaidUpgrade",e[e.PrimePaidUpgrade=18]="PrimePaidUpgrade",e[e.PrimeCommunityGiftReceivedEvent=19]="PrimeCommunityGiftReceivedEvent",e[e.ExtendSubscription=20]="ExtendSubscription",e[e.SubGift=21]="SubGift",e[e.AnonSubGift=22]="AnonSubGift",e[e.Clear=23]="Clear",e[e.RoomMods=24]="RoomMods",e[e.RoomState=25]="RoomState",e[e.Raid=26]="Raid",e[e.Unraid=27]="Unraid",e[e.Notice=28]="Notice",e[e.Info=29]="Info",e[e.BadgesUpdated=30]="BadgesUpdated",e[e.Purchase=31]="Purchase",e[e.BitsCharity=32]="BitsCharity",e[e.CrateGift=33]="CrateGift",e[e.RewardGift=34]="RewardGift",e[e.SubMysteryGift=35]="SubMysteryGift",e[e.AnonSubMysteryGift=36]="AnonSubMysteryGift",e[e.StandardPayForward=37]="StandardPayForward",e[e.CommunityPayForward=38]="CommunityPayForward",e[e.FirstCheerMessage=39]="FirstCheerMessage",e[e.FirstMessageHighlight=40]="FirstMessageHighlight",e[e.BitsBadgeTierMessage=41]="BitsBadgeTierMessage",e[e.InlinePrivateCallout=42]="InlinePrivateCallout",e[e.ChannelPointsReward=43]="ChannelPointsReward",e[e.CommunityChallengeContribution=44]="CommunityChallengeContribution",e[e.LiveMessageSeparator=45]="LiveMessageSeparator",e[e.RestrictedLowTrustUserMessage=46]="RestrictedLowTrustUserMessage",e[e.Shoutout=47]="Shoutout",e[e.AnnouncementMessage=48]="AnnouncementMessage",e[e.CharityDonation=49]="CharityDonation",e[e.MessageIdUpdate=50]="MessageIdUpdate",e[e.ViewerMilestone=51]="ViewerMilestone",e[e.GigantifiedEmote=52]="GigantifiedEmote",e[e.OneTapBreakpointAchieved=53]="OneTapBreakpointAchieved",e[e.OneTapStreakExpired=54]="OneTapStreakExpired",e[e.OneTapStreakStarted=55]="OneTapStreakStarted",e[e.OneTapGiftRedeemed=56]="OneTapGiftRedeemed",e[e.SubsidizedSub=57]="SubsidizedSub",e[e.SubsidizedSubMysteryGift=58]="SubsidizedSubMysteryGift",e[e.SocialSharingBadge=59]="SocialSharingBadge",e[e.GiftSubBaseMatch=60]="GiftSubBaseMatch",e[e.GiftSubBonusMatchSummary=61]="GiftSubBonusMatchSummary",e[e.GiftSubBonusMatchIndividual=62]="GiftSubBonusMatchIndividual"}(t||(t={})),function(e){e[e.Post=0]="Post",e[e.Action=1]="Action"}(a||(a={})),function(e){e[e.Ban=0]="Ban",e[e.Timeout=1]="Timeout",e[e.Delete=2]="Delete"}(r||(r={})),function(e){e[e.MessageRejectedPrompt=0]="MessageRejectedPrompt",e[e.CheerMessageRejectedPrompt=1]="CheerMessageRejectedPrompt",e[e.MessageRejected=2]="MessageRejected",e[e.MessageAllowed=3]="MessageAllowed",e[e.MessageDenied=4]="MessageDenied",e[e.CheerMessageDenied=5]="CheerMessageDenied",e[e.CheerMessageTimeout=6]="CheerMessageTimeout",e[e.MessageModApproved=7]="MessageModApproved",e[e.MessageModDenied=8]="MessageModDenied"}(o||(o={}));var s=new Set(["usage_clear","usage_commercial","usage_raid","usage_unraid","usage_slow_on","usage_slow_off","usage_followers_on","usage_followers_off","usage_emote_only_on","usage_emote_only_off","usage_subs_on","usage_subs_off","usage_r9k_on","usage_r9k_off","unrecognized_cmd"])},121783:function(e,n,i){"use strict";i.d(n,{gb:function(){return c},Zp:function(){return k},RT:function(){return p},os:function(){return f},qV:function(){return g},W6:function(){return h},al:function(){return v}});var t=i(331635),a=i(859406),r=i(178676),o=i(349593),s=i(133252),l=i(368770);var d=["#FF0000","#0000FF","#008000","#B22222","#FF7F50","#9ACD32","#FF4500","#2E8B57","#DAA520","#D2691E","#5F9EA0","#1E90FF","#FF69B4","#8A2BE2","#00FF7F"],u={};function c(e,n,i,a,r,o,s,l,d,u){var c,m,f;void 0===a&&(a=null),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===l&&(l=!1),void 0===d&&(d=Date.now()),void 0===u&&(u={});var g,k,y,S,b=(g=n.displayName,k=n.username,S=!1,(y=g)?y.split("").map((function(e){return e.charCodeAt(0)>127})).reduce((function(e,n){return e||n}))&&(S=!0):y=k,{userDisplayName:y,isIntl:S});if(null===(c=u.reply)||void 0===c?void 0:c.parentDisplayName){var _=v(e,u.reply.parentDisplayName,n.emotes);e=_.message,n.emotes=_.emotes}var x=u.sharedChat;return{badges:(x?x.sourceBadges:n.badges)||{},badgeDynamicData:(x?x.sourceBadgeDynamicData:n.badgeDynamicData)||{},bits:n.bits,user:(0,t.__assign)((0,t.__assign)({},b),{userLogin:n.username,userID:n.userID,userType:n.userType,color:n.color||p(n.userID),isSubscriber:l}),messageParts:h(e,n.emotes||{},n.bits,i,n.username,a||void 0),messageBody:e,deleted:r,banned:s,hidden:o,timestamp:d,reply:u.reply,sourceRoomID:null===(m=u.sharedChat)||void 0===m?void 0:m.sourceRoomID,sourceOnly:null===(f=u.sharedChat)||void 0===f?void 0:f.sourceOnly}}function m(e,n){var i=e.length+2,t={};return Object.keys(n).forEach((function(e){t[parseInt(e,10)-i]={startIndex:n[e].startIndex-i,endIndex:n[e].endIndex-i,id:n[e].id}})),t}function v(e,n,i){return void 0===i&&(i={}),0===e.indexOf(“@”.concat(n,” “))?{message:e.replace(“@”.concat(n,” “),””),emotes:m(n,i)}:{message:e,emotes:i}}function p(e,n){return void 0===n&&(n=15),”number”!=typeof u[e]&&(u[e]=Math.floor(Math.random()*n)),d[u[e]]}function h(e,n,i,t,r,d){var u=(0,l.wz)(a.x2.store.getState()),c={cheers:i?t:void 0,emotes:{type:s.fr.Position,map:n},links:{parseClips:!0,parseVods:!0},mentions:{senderLogin:r,sessionUser:u},flags:d};return(0,o.bY)(e,c)}function f(e){return e.match(/[^\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g)}function g(e,n,i,t){void 0===i&&(i=!0),void 0===t&&(t=r.S.Light);var a=i?”default”:”static”,o=t===r.S.Light?”light”:”dark”;return”https://static-cdn.jtvnw.net/emoticons/v2/”.concat(e,”/”).concat(a,”/”).concat(o,”/”).concat(Math.min(Math.ceil(n),3),”.0″)}function k(e,n){return void 0===n&&(n=!0),{dark:{“1x”:g(e,1,n,r.S.Dark),”2x”:g(e,2,n,r.S.Dark),”4x”:g(e,4,n,r.S.Dark)},light:{“1x”:g(e,1,n,r.S.Light),”2x”:g(e,2,n,r.S.Light),”4x”:g(e,4,n,r.S.Light)},themed:!0}}},792386:function(e,n,i){“use strict”;i.d(n,{X:function(){return o}});var t=i(508952),a=i(469655),r=t.x.wrap((function(){return Promise.all([i.e(7595),i.e(55935),i.e(65300),i.e(98437),i.e(55927),i.e(44567),i.e(98526),i.e(24576),i.e(48750),i.e(66982),i.e(44196),i.e(985),i.e(2253),i.e(1394),i.e(63028),i.e(76642),i.e(99351)]).then(i.bind(i,240815))}),”CheckoutFormModal”);function o(e){return function(n){n((0,a.to)(r,e))}}},579074:function(e,n,i){“use strict”;var t;i.d(n,{n:function(){return t}}),function(e){e.BitsBundle=”bits_bundle”,e.ChannelSub=”channel_sub”,e.ChannelSubCustom=”channel_sub_custom”,e.ChannelSubCommunityGift=”channel_sub_community_gift”,e.ChannelSubStandardGift=”channel_sub_standard_gift”,e.Turbo=”turbo”,e.TurboStandardGift=”turbo_standard_gift”,e.PaidBoost=”paid_boost”,e.Charity=”charity”}(t||(t={}))},386094:function(e,n,i){“use strict”;i.d(n,{N:function(){return t}});var t={AddEmailClickAttempt:”add_email_click_attempt”,AddEmailClickFailure:”add_email_click_failure”,AddEmailClickSuccess:”add_email_click_success”,AddEmailPrompt:”add_email_prompt”,AddPaymentMethodClick:”add_payment_method_click”,Add2FaPromptClick:”add_2fa_click”,ChangePaymentMethodClick:”change_payment_method_click”,CheckoutActionCheck:”checkout_action_check”,Close:”close”,CompletePurchaseClickAttempt:”complete_purchase_click_attempt”,CompletePurchaseClickFailure:”complete_purchase_click_failure”,CompletePurchaseClickSuccess:”complete_purchase_click_success”,CompletePurchaseShown:”complete_purchase_shown”,CountryOfResidenceAttempt:”country_of_residence_attempt”,CountryOfResidenceFailure:”country_of_residence_failure”,CountryOfResidencePrompt:”country_of_residence_prompt”,CountryOfResidenceSuccess:”country_of_residence_success”,EmailRequiredMessageLinkClick:”email_required_message_link_click”,EmailRequiredMessageShown:”email_required_message_shown”,Error:”error”,EUEEAUKRightOfWithdrawalClick:”eu_eea_uk_right_of_withdrawal_click”,GiftCardRedeemNowClick:”gift_card_redeem_now_click”,GQLError:”gql_error”,IneligibleScreenShown:”ineligible_screen_shown”,LoadSuccess:”load_success”,MessageCouldNotBeSent:”message_could_not_be_sent_error”,MultimonthDropdownClick:”multimonth_dropdown_click”,OneClickCriticalDataFailure:”one_click_critical_data_failure”,PaymentMethodUpdateAPIAttempt:”payment_method_update_api_attempt”,PaymentMethodUpdateAPIFailure:”payment_method_update_api_failure”,PaymentMethodUpdateAPISuccess:”payment_method_update_api_success”,PaymentMethodUpdateAPITimeout:”payment_method_update_api_timeout”,PaymentMethodUpdateFailure:”payment_method_update_failure”,PaymentMethodUpdateInit:”payment_method_update_init”,PriceChangeWarningDismiss:”price_change_warning_dismiss”,PriceChangeWarningShown:”price_change_warning_shown”,PrivacyPolicyClick:”privacy_policy_click”,PurchaseSuccessScreenShown:”purchase_success_screen_shown”,PurchaseSupportFAQClick:”purchase_support_faq_click”,QuantityUpdated:”quantity_updated”,RecurlyBraintreeSPMError:”recurly_braintree_spm_error”,ReenterPaymentMethodShown:”reenter_payment_method_shown”,RecurringCheckboxClick:”recurring_checkbox_click”,RecurringCheckboxErrorShown:”recurring_checkbox_error_shown”,RecurringCheckboxErrorDismiss:”recurring_checkbox_error_dismiss”,RecurringConsentModalShown:”recurring_consent_modal_shown”,RecurringConsentModalConfirm:”recurring_consent_modal_confirm”,RecurringConsentModalDismiss:”recurring_consent_modal_dismiss”,RecurlyCCFormLoadFailure:”recurly_cc_form_load_failure”,ShownIneligibleMessage:”shown_ineligible_message”,SkipAddPaymentMethodClick:”skip_add_payment_method_click”,Start:”start”,SubscriptionManagementClick:”subscriptions_management_click”,TermsOfSaleClick:”terms_of_sale_click”,ThreeDS2Failure:”3ds2_failure”,ThreeDS2Prompt:”3ds2_prompt”,ThreeDS2Success:”3ds2_success”,TVUserMismatch:”tv_user_mismatch”,UpdateMonthQuantityClick:”update_month_quantity_click”,UseExistingPaymentMethodClick:”use_existing_payment_method_click”,VendorScriptFailure:”vendor_script_failure”,Venmo:”venmo”,XsollaBackButtonClick:”xsolla_back_button_click”,XsollaIframeErrorEvent:”xsolla_iframe_error_event”,ZeroBits:”zero_bits”,CreditCardExpiryMessagePrompted:”cc_expiry_msg_prompted”,CreditCardExpiryMessageDismissed:”cc_expiry_msg_dismissed”,CreditCardExpiryMessagePrimaryButtonClick:”cc_expiry_msg_primary_button_click”,HelpPaymentFailedLinkClick:”help_payment_failed_link_click”,PurchaseErrorPrimaryButtonClick:”purchase_error_primary_button_click”,PurchaseErrorSecondaryButtonClick:”purchase_error_secondary_button_click”,CheckoutSimplificationExperimentEligibility:”checkout_simplification_experiment_eligibility”,PayWithSpendableBalanceXsolla:”pay_with_spendable_balance_xsolla”}},34726:function(e,n,i){“use strict”;i.d(n,{_O:function(){return M},eQ:function(){return B},EV:function(){return z}});var t=i(331635),a=i(474848),r=i(296540),o=i(415044),s=i(508952),l=i(29896),d=i(664865),u=i(469655),c=i(876531),m=i(265827),v=i(386094),p=i(868238),h=i(859406),f=i(792386),g=i(571062),k=i(875235),y=”purchase-order-failure-snackbar”;var S=(0,p.Zz)((0,o.Ng)(null,(function(e){return(0,p.zH)({showCheckoutModal:f.X},e)})))((function(e){var n=e.checkoutFormProps,t=e.charityCheckoutFormProps,r=e.showCheckoutModal,l=(0,o.wA)(),d=s.x.wrap((function(){return Promise.all([i.e(31264),i.e(98526),i.e(66982),i.e(44196),i.e(26190),i.e(35498)]).then(i.bind(i,926190))}),”CharityCheckoutModal”),c=t?(0,h.hw)(“Donation could not be completed.”,”PurchaseOrderErrorSnackbar”):(0,h.hw)(“Purchase could not be completed.”,”PurchaseOrderErrorSnackbar”),m=(0,h.hw)(“{purchaseTypeMessage} There was an error during the order.”,{purchaseTypeMessage:c},”PurchaseOrderErrorSnackbar”);return n&&(0,k.d$)(“complete_purchase_checkout_failure”),(0,a.jsx)(g.D,{id:y,type:”warning”,message:m,buttonProps:{children:(0,h.hw)(“Open Checkout”,”PurchaseOrderErrorSnackbar”),onClick:function(){return n?r(n):t?l((0,u.to)(d,t)):void 0}},margin:0})})),b=i(528267),_=i(906719),x=i(959340),C=i(914421),w=i(958007),N=i(754994),P=function(e){var n=e.tplr,i=””;return n&&(N.mO.includes(n)?i=(0,h.hw)(“Subscription”,”PurchaseOrderProcessingSnackbar”):N._z.includes(n)?i=(0,h.hw)(“Gift”,”PurchaseOrderProcessingSnackbar”):n===N.nk.BitsBundle?i=(0,h.hw)(“Bits”,”PurchaseOrderProcessingSnackbar”):n===N.nk.Charity&&(i=(0,h.hw)(“donation”,”PurchaseOrderProcessingSnackbar”))),(0,a.jsx)(b.q,{type:_.v.InfoLoading,message:(0,a.jsx)(x.P,{display:C.nl.Flex,alignItems:C.k2.Center,children:(0,a.jsx)(x.P,{flexGrow:1,textAlign:C.nO.Left,children:(0,a.jsx)(w.z,{title:(0,h.hw)(“Payment Processing. Your {description} order will be completed soon.”,{description:i},”PurchaseOrderProcessingSnackbar”)})})})})},D=i(528841),T=i(312868),I=i.n(T),F=”purchase-order-success-snackbar”;var E,j=function(e){var n,i,t=e.channelID,r=e.offerID,o=e.tplr,s=e.additionalSnackbarContent,d=e.checkoutSessionTracker,u=(0,l.IT)(I(),{variables:{channelID:t}}),c=u.data,m=u.loading,p=(null===(n=null==c?void 0:c.channel)||void 0===n?void 0:n.name)||””,f=(0,h.ZV)((null===(i=null==c?void 0:c.currentUser)||void 0===i?void 0:i.bitsBalance)||0),k=function(e,n){var i,t;return(null===(i=null==e?void 0:e.currentUser)||void 0===i?void 0:i.bitsOffers)?null===(t=null==e?void 0:e.currentUser)||void 0===t?void 0:t.bitsOffers.find((function(e){return!(!e||e.id!==n)})):null}(c,r),y=(0,h.ZV)(k?k.bits:0),S=””;if(o)if(o===N.nk.BitsBundle){if(d&&y===(0,h.ZV)(0)){var b=””;c?c.currentUser?c.currentUser.bitsOffers?void 0===k&&(b=”Current user does not have offer that matches with offerId “.concat(r)):b=”Current user does not have any bits offers”:b=”Current user data is missing”:b=”Data is undefined”,d.track({subEvent:v.N.ZeroBits,subEventDetail:JSON.stringify({error:b})})}var _=(0,h.hw)(“{balance, plural, one {Your total is {balance} bit.} other {Your total is {balance} bits.}}”,{balance:f},”PurchaseOrderSuccessSnackbar”);S=(0,h.hw)(“{quantity, plural, one {{quantity} bit has been added to your balance! {balanceString}} other {{quantity} bits have been added to your balance! {balanceString}}}”,{quantity:y,balanceString:_},”PurchaseOrderSuccessSnackbar”)}else N.mO.includes(o)?S=(0,h.hw)(“Thank you for subscribing to {channel}!”,{channel:p},”PurchaseOrderSuccessSnackbar”):N._z.includes(o)?S=(0,h.hw)(“Thank you for gifting to {channel}!”,{channel:p},”PurchaseOrderSuccessSnackbar”):o===N.nk.Charity&&(S=(0,h.hw)(“Thank you for your {amount} donation to support {charityName}!”,{charityName:(null==s?void 0:s.charityName)||””,amount:(null==s?void 0:s.amountSpent)||””},”PurchaseOrderSuccessSnackbar”));var x=o===N.nk.Charity?(0,h.hw)(“{actionMessage} Your donation confirmation will be sent to {userEmail}.”,{actionMessage:S,userEmail:(null==s?void 0:s.userEmail)||””},”PurchaseOrderSuccessSnackbar”):(0,h.hw)(“{actionMessage} Your receipt will be sent to your email.”,{actionMessage:S},”PurchaseOrderSuccessSnackbar”),C=(0,D.Px)({path:””,content:”return_to_app”}),P=(null==d?void 0:d.mobileCommerceSessionID)?{children:(0,h.hw)(“Return to app”,”PurchaseOrderSuccessSnackbar”),linkTo:C}:void 0;return!m&&(0,a.jsx)(g.D,{id:F,type:”success”,dismissable:!0,message:(0,a.jsx)(w.z,{title:x}),margin:0,duration:P?6e3:void 0,buttonProps:P})||null},L=i(5370),A=i(861458),R=i.n(A),H=i(409065),O=i.n(H),M=(E=(0,m.q)(“PurchaseOrderContext”,{purchaseOffer:function(){return(0,t.__awaiter)(void 0,void 0,void 0,(function(){return(0,t.__generator)(this,(function(e){return[2,Promise.resolve({data:{purchaseOffer:null}})]}))}))}})).context,B=E.withContext,U={API_BASE_URL:void 0,CDN_URL:”https://assets.twitch.tv/”,GQL_BASE_URL:void 0,PASSPORT_BASE_URL:void 0,INTERPOL_BASE_URL:void 0,PUBSUB_ENV:void 0,TMI_BASE_URL:void 0,MANIFEST_URL:”https://assets.twitch.tv/config/manifest.json?v=1″,NODE_ENV:”production”,PLAYER_BASE_URL:”https://player.twitch.tv”,SITE_NAME:void 0,IS_DEV_BUILD:!1,IS_STAGING_BUILD:!1,IS_LOCAL_DEVSERVER:!1}.IS_MOBILE_PORTAL?function(){throw Error(“NotSupported”)}:s.x.wrap((function(){return Promise.all([i.e(7595),i.e(55935),i.e(65300),i.e(98437),i.e(55927),i.e(44567),i.e(98526),i.e(24576),i.e(48750),i.e(66982),i.e(44196),i.e(985),i.e(2253),i.e(1394),i.e(63028),i.e(76642),i.e(99351)]).then(i.bind(i,240815))}),”CheckoutFormModal”),V=function(e){var n,i,s,m,p,h,f,g,k,b,_,x=e.children,C=(0,o.wA)(),w=(0,r.useState)(null),D=w[0],T=w[1],I=(0,r.useState)(null),E=I[0],A=I[1],H=(0,r.useState)(null),B=H[0],V=H[1],z=(0,r.useState)(null),W=z[0],G=z[1],q=(0,r.useState)(null),Z=q[0],Q=q[1],K=null===(i=null===(n=null==Z?void 0:Z.purchaseOffer)||void 0===n?void 0:n.purchaseOrder)||void 0===i?void 0:i.id,Y=null===(s=null==Z?void 0:Z.purchaseOffer)||void 0===s?void 0:s.error,X=(0,r.useRef)(null),$=(0,r.useContext)(L.xG),J=$.addSnackbarToQueue,ee=$.removeSnackbarFromQueue,ne=(0,l.n_)(O())[0],ie=(0,l.IT)(R(),{variables:{purchaseOrderID:K},skip:!K}),te=ie.data,ae=ie.startPolling,re=ie.stopPolling,oe=null===(m=null==te?void 0:te.currentUser)||void 0===m?void 0:m.purchaseOrder,se=null===(h=null===(p=null==te?void 0:te.currentUser)||void 0===p?void 0:p.purchaseOrder)||void 0===h?void 0:h.state,le=null===(g=null===(f=null==te?void 0:te.currentUser)||void 0===f?void 0:f.purchaseOrder)||void 0===g?void 0:g.actionTokenID,de=null===(b=null===(k=null==te?void 0:te.currentUser)||void 0===k?void 0:k.purchaseOrder)||void 0===b?void 0:b.failureReason,ue=(0,r.useState)(null),ce=ue[0],me=ue[1],ve=(0,r.useState)(“”),pe=ve[0],he=ve[1],fe=(0,r.useState)(“”),ge=fe[0],ke=fe[1],ye=(0,r.useState)(),Se=ye[0],be=ye[1],_e=(0,r.useState)(!1),xe=_e[0],Ce=_e[1],we=(0,r.useState)(void 0),Ne=we[0],Pe=we[1],De=(0,r.useCallback)((function(e,n,i,r,o,s,l,u){return(0,t.__awaiter)(void 0,void 0,void 0,(function(){var c,m,v,p,h,f,g,k;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:if(se&&!N.QA.includes(se)&&!ge)return[2,Promise.reject(new Error(“There is already a processing order”))];t.label=1;case 1:return t.trys.push([1,3,,4]),null==u||u({isProcessing:!0,orderState:void 0,purchaseOfferErrorCode:void 0,orderFailureReason:void 0}),Ce(!!l),T(e),A(r||null),V(o||null),G(s||null),Q(null),ee(F),ee(y),[4,ne((0,d.AR)(e))];case 2:return c=t.sent(),Q(null!==(p=c.data)&&void 0!==p?p:{purchaseOffer:null}),(null===(f=null===(h=c.data)||void 0===h?void 0:h.purchaseOffer)||void 0===f?void 0:f.error)&&Pe(c.data.purchaseOffer.error),(null===(k=null===(g=c.data)||void 0===g?void 0:g.purchaseOffer)||void 0===k?void 0:k.purchaseOrder)&&(m=c.data.purchaseOffer.purchaseOrder.id,me(n),he(i),ae(1e3),be((function(){return u})),J((0,a.jsx)(P,{tplr:n}),{itemID:m,throttleMS:0}),X.current=setTimeout((function(){re(),null==u||u({isProcessing:!1,orderState:c.data.purchaseOffer.purchaseOrder.state,purchaseOfferErrorCode:void 0,orderFailureReason:void 0})}),6e4)),[2,Promise.resolve(c)];case 3:return v=t.sent(),null==u||u({isProcessing:!1,orderState:void 0,purchaseOfferErrorCode:void 0,orderFailureReason:void 0}),[2,Promise.reject(v)];case 4:return[2]}}))}))}),[ge,J,ne,se,ee,ae,re]),Te=r.useCallback((function(e){C((0,u.to)(U,e))}),[C]);(0,r.useEffect)((function(){if(Ne&&xe&&E){var e=(0,t.__assign)((0,t.__assign)({},E),{purchaseOfferErrorCode:null!=Ne?Ne:void 0});Te(e)}}),[E,xe,Te,Ne]),(0,r.useEffect)((function(){K&&oe&&oe.id===K&&se===c.dFc.THREE_D_SECURE_CHALLENGE_REQUIRED&&le&&ge!==le&&(E||B)&&(re(),ee(K),null==Se||Se({isProcessing:!1,orderState:se,purchaseOfferErrorCode:void 0,orderFailureReason:void 0}),X.current&&clearInterval(X.current),ke(le),xe&&E?Te((0,t.__assign)((0,t.__assign)({},E),{threeDSActionTokenID:le})):J((0,a.jsx)(S,{checkoutFormProps:E?(0,t.__assign)((0,t.__assign)({},E),{threeDSActionTokenID:le}):void 0,charityCheckoutFormProps:B||void 0}),{itemID:y,throttleMS:0}))}),[le,ge,J,B,E,xe,Te,oe,K,se,ee,Se,re]),(0,r.useEffect)((function(){var e,n,i,r;if((null==D?void 0:D.offerID)&&oe&&K&&oe.id===K&&se&&N.QA.includes(se))if(re(),null==Se||Se({isProcessing:!1,orderState:se}),ee(K),ke(“”),X.current&&clearInterval(X.current),N._s.includes(se)){if(null===(e=null==E?void 0:E.checkoutSessionTracker)||void 0===e||e.track({subEvent:v.N.CompletePurchaseClickSuccess,originID:K}),B){var o=(null===(n=D.paymentInstrument)||void 0===n?void 0:n.method)===c.Q30.PAYPAL?”payment_succeed_paypal”:”donate_now_attempt_success”;B.donationSession.track(o,””,K)}J((0,a.jsx)(j,{channelID:pe,offerID:D.offerID,tplr:ce,additionalSnackbarContent:W||void 0,checkoutSessionTracker:null==E?void 0:E.checkoutSessionTracker}),{itemID:F,throttleMS:0}),window.dispatchEvent(new Event(“successful-purchase-event”))}else if(E){null===(i=null==E?void 0:E.checkoutSessionTracker)||void 0===i||i.track({subEvent:v.N.CompletePurchaseClickFailure,subEventDetail:JSON.stringify({purchase_order_error:de||(Y||”NO_ERROR_PO_POLLER”)})}),null==Se||Se({isProcessing:!1,orderState:se,purchaseOfferErrorCode:null!=Y?Y:void 0,orderFailureReason:null!=de?de:void 0});var s=(0,t.__assign)((0,t.__assign)({},E),{purchaseOrderFailureReason:null!=de?de:void 0,purchaseOfferErrorCode:null!=Y?Y:void 0});xe&&s?Te(s):J((0,a.jsx)(S,{checkoutFormProps:s}),{itemID:y,throttleMS:0})}else if(B){o=(null===(r=D.paymentInstrument)||void 0===r?void 0:r.method)===c.Q30.PAYPAL?”payment_failure_paypal”:”donate_now_attempt_failure”;B.donationSession.track(o,JSON.stringify({purchase_order_error:de}),””),J((0,a.jsx)(S,{charityCheckoutFormProps:B}),{itemID:y,throttleMS:0})}return function(){X.current&&clearInterval(X.current)}}),[J,pe,B,E,xe,Te,Y,null==D?void 0:D.offerID,null===(_=null==D?void 0:D.paymentInstrument)||void 0===_?void 0:_.method,oe,de,K,se,ee,Se,W,re,ce]);var Ie={order:oe,purchaseOffer:De,offerTPLR:ce};return(0,a.jsx)(M.Provider,{value:Ie,children:x})};function z(e){return function(n){return(0,a.jsx)(V,{children:(0,a.jsx)(e,(0,t.__assign)({},n))})}}},754994:function(e,n,i){“use strict”;i.d(n,{QA:function(){return l},_s:function(){return o},_z:function(){return d},mO:function(){return u},nk:function(){return t},tl:function(){return s},vt:function(){return c}});var t,a=i(331635),r=i(876531),o=[r.dFc.PAYMENT_PENDING,r.dFc.SUCCESS],s=[r.dFc.BENEFITS_CANCELLED,r.dFc.CANCEL_BENEFITS_INITIATED,r.dFc.FAILED,r.dFc.REFUND_APPLIED,r.dFc.REFUND_FAILED,r.dFc.REFUND_INITIATED],l=(0,a.__spreadArray)((0,a.__spreadArray)([],o,!0),s,!0);!function(e){e.BitsBundle=”bits_bundle”,e.ChannelSub=”channel_sub”,e.ChannelSubCustom=”channel_sub_custom”,e.ChannelSubCommunityGift=”channel_sub_community_gift”,e.ChannelSubStandardGift=”channel_sub_standard_gift”,e.Turbo=”turbo”,e.TurboStandardGift=”turbo_standard_gift”,e.PaidBoost=”paid_boost”,e.Charity=”charity”}(t||(t={}));var d=[t.ChannelSubCommunityGift,t.ChannelSubStandardGift],u=[t.ChannelSub,t.ChannelSubCustom],c=(0,a.__spreadArray)((0,a.__spreadArray)([],u,!0),d,!0);(0,a.__spreadArray)((0,a.__spreadArray)([],c,!0),[t.BitsBundle],!1)},115821:function(e,n,i){“use strict”;i.d(n,{H:function(){return a},w:function(){return t}});var t=function(e,n,i){return n&&n.billingCountry?n.billingCountry:i?i.countryCode:e||void 0},a=function(e){return null==e?0:e.units+e.nanos/1e9}},214604:function(e,n,i){“use strict”;i.d(n,{O:function(){return t}});var t=i(296540).createRef()},242282:function(e,n,i){“use strict”;i.d(n,{F:function(){return d},M:function(){return u}});var t=i(296540),a=i(415044),r=i(503988),o=i(12109),s=i(368770),l=i(903943),d=function(){return(0,o.fX)(“lychee-durian-cherry”)},u=function(e){var n,i,o,u,c=(0,a.d4)(s.wz)||null,m=(0,l.O)(null!==(n=null==c?void 0:c.login)&&void 0!==n?n:””),v=m.data,p=m.loading,h=e.channelLogin&&(0,r.B6)(“/”.concat(e.channelLogin),location.pathname),f=(0,r.B6)(“/videos/”.concat(e.vodID),location.pathname),g=(0,t.useCallback)((function(){var e,n,i;return!(p||!d()||!h&&!f||(null===(i=null===(n=null===(e=null==v?void 0:v.user)||void 0===e?void 0:e.channel)||void 0===n?void 0:n.clipsSettings)||void 0===i?void 0:i.isClipCreationDefaultNewTabEnabled))}),[p,null===(u=null===(o=null===(i=null==v?void 0:v.user)||void 0===i?void 0:i.channel)||void 0===o?void 0:o.clipsSettings)||void 0===u?void 0:u.isClipCreationDefaultNewTabEnabled,h,f]);return{canShowClipEditorPopup:g}}},284225:function(e,n,i){“use strict”;i.r(n),i.d(n,{ClipsViewerExportsUpsell:function(){return f},VIEWER_EXPORTS_MODAL_TIMEOUT_DURATION_MS:function(){return h},VIEWER_EXPORTS_MODAL_TIMEOUT_KEY:function(){return p}});var t=i(296540),a=i(415044),r=i(834455),o=i(29896),s=i(469655),l=i(368770),d=i(859406),u=i(704856),c=i(5370),m=i(353302),v=i.n(m),p=”ve_modal_timeout”,h=864e5,f=function(e){var n=e.skipQuery,i=e.surface,m=(0,r.g)().channelLogin,h=void 0===m?””:m,f=(0,a.d4)(l.wz),g=h===(null==f?void 0:f.login),k=t.useContext(c.xG).addSnackbarToQueue,y=(0,a.wA)(),S=d.IG.get(p,!1);return(0,o.IT)(v(),{variables:{channelLogin:h},skip:n||!h||!g||S,onCompleted:function(e){var n,t,a,r,o,l=null===(n=null==e?void 0:e.user)||void 0===n?void 0:n.stream,d=null!=l&&void 0!==l,c=null===(a=null===(t=e.user)||void 0===t?void 0:t.roles)||void 0===a?void 0:a.isParticipatingDJ,m=null===(o=null===(r=null==e?void 0:e.user)||void 0===r?void 0:r.channel)||void 0===o?void 0:o.clipsSettings,v=void 0!==(null==m?void 0:m.isViewerExportingEnabled)&&null!==(null==m?void 0:m.isViewerExportingEnabled),p=!!(null==m?void 0:m.isClipsCreationEnabled);g&&!S&&!d&&p&&!v&&!c&&y((0,s.to)(u.Q,{channelLogin:h,surface:i,addSnackbarToQueue:k}))}}),null}},704856:function(e,n,i){“use strict”;i.d(n,{Q:function(){return j}});var t,a=i(331635),r=i(474848),o=i(296540),s=i(415044),l=i(469655),d=i(859406),u=i(571062),c=i(875235),m=i(903943),v=i(284225),p=i(959340),h=i(50596),f=i(216042),g=i(97774),k=i(973474),y=i(169311),S=i(26538),b=i(312663),_=i(914421),x=i(70931),C=i(499692),w=i(554043),N=i(466377),P=function(){return(0,r.jsxs)(p.P,{display:”flex”,flexDirection:”row”,children:[(0,r.jsx)(p.P,{margin:{right:1},children:(0,r.jsx)(N.P,{fillColor:”alert”})}),(0,r.jsxs)(p.P,{flexDirection:”column”,children:[(0,r.jsx)(b.N,{type:”strong”,fontSize:_.Z4.Size6,color:”error”,children:(0,d.hw)(“Oops, something went wrong!”,”ViewerExportsModalErrorMessage”)}),(0,r.jsx)(b.N,{type:”p”,fontSize:_.Z4.Size6,color:”error”,children:(0,d.hw)(“We were unable to save your selection.”,”ViewerExportsModalErrorMessage”)})]})]})},D=i(375808),T=function(e){var n=e.onOptOut,i=e.onOptIn,t=e.showViewerExportsProps,a=e.error,u=(0,w.d)(null),c=(0,s.wA)();o.useEffect((function(){a&&(0,D.l)(t.surface,{page_session_id:d.x2.session.pageviewID,item_name:”clips_viewer_exports_error”})}),[a,t.surface]);var m=(0,d.hw)(“Close”,”ViewerExportsOptInModal”);return(0,r.jsx)(p.P,{display:”flex”,justifyContent:”center”,maxWidth:”600px”,children:(0,r.jsxs)(h.F,{elevation:3,children:[(0,r.jsx)(f.S,{borderRadius:{topLeft:g.Z.Large,topRight:g.Z.Large},children:(0,r.jsx)(k.L,{src:”https://static-cdn.jtvnw.net/twitch-creator-home-prod/clips/viewer-exports-header.png”,alt:(0,d.hw)(“Viewer Export Modal Header Image”,”ViewerExportsOptInModal”)})}),(0,r.jsxs)(y.c,{children:[(0,r.jsxs)(p.P,{display:”flex”,flexDirection:I(u)?”column”:”row”,margin:{bottom:2},children:[(0,r.jsx)(p.P,{display:”flex”,alignItems:”center”,margin:{right:1},children:(0,r.jsx)(S.a,{type:”new”,label:(0,d.hw)(“New”,”ViewerExportsOptInModal”)})}),(0,r.jsx)(b.N,{type:”h3″,children:(0,d.hw)(“Empower Viewers to Share Your Clips”,”ViewerExportsOptInModal”)})]}),(0,r.jsxs)(p.P,{padding:{bottom:2},margin:{bottom:2},borderBottom:!0,children:[(0,r.jsx)(p.P,{margin:{bottom:1},children:(0,r.jsx)(b.N,{type:”p”,fontSize:_.Z4.Size6,color:_.Q1.Base,children:(0,d.hw)(“Turn on this setting to let viewers directly post clips of your channel from Twitch to their TikTok and YouTube, so you can reach new viewers with less effort!”,”ViewerExportsOptInModal”)})}),(0,r.jsx)(p.P,{margin:{bottom:1},children:(0,r.jsx)(b.N,{type:”p”,fontSize:_.Z4.Size6,color:_.Q1.Base,children:(0,d.hw)(“To help viewers find you, we’ll add your Twitch channel name as a hashtag on all viewers’ posts and tag your TikTok handle on TikTok posts.”,”ViewerExportsOptInModal”)})}),(0,r.jsx)(p.P,{margin:{bottom:1},children:(0,r.jsx)(b.N,{type:”p”,fontSize:_.Z4.Size6,color:_.Q1.Base,children:(0,d.hw)(“This setting can be managed at any time in your Stream Settings.”,”ViewerExportsOptInModal”)})}),(0,r.jsx)(p.P,{children:(0,r.jsx)(b.N,{type:”p”,fontSize:_.Z4.Size6,color:_.Q1.Base,children:(0,d.hw)(“Learn More“,{“x:link”:function(e){return(0,r.jsx)(x.Cb,{linkTo:”https://help.twitch.tv/s/article/clips-settings#social”,targetBlank:!0,children:e})}},”ViewerExportsOptInModal”)})})]}),(0,r.jsx)(p.P,{children:(0,r.jsx)(b.N,{type:”p”,fontSize:_.Z4.Size7,color:”alt-2″,children:(0,d.hw)(‘By clicking “Enable This Setting” you are agreeing to give other Twitch users a worldwide, nonexclusive, and royalty-free license to do the following when sharing clips created from your channel to other online services: (a) use, reproduce, modify, create derivative works from, distribute, perform, and display that content, and (b) use any name, identity, likeness, voice, and similar information in them. You can turn off this setting at any time in Stream Settings.’,”ViewerExportsOptInModal”)})}),a&&(0,r.jsx)(p.P,{margin:{top:2},children:(0,r.jsx)(P,{})})]}),(0,r.jsx)(C.j,{primaryButtonProps:{children:a?m:(0,d.hw)(“Enable This Setting”,”ViewerExportsOptInModal”),onClick:a?function(){c((0,l.Oo)())}:function(){(0,D.o)(t.surface,{page_session_id:d.x2.session.pageviewID,item_name:”clips_viewer_exports_enable_cta”,item_subsection:”enable”}),i()}},secondaryButtonProps:a?void 0:{children:(0,d.hw)(“No Thanks”,”ViewerExportsOptInModal”),onClick:n}})]})})},I=function(e){switch(e){case w.E.SM:case w.E.XS:case w.E.Default:return!0;default:return!1}},F=i(818578),E=function(e){var n=e.onConfirmOptOut,i=e.onCancel,t=e.showViewerExportsProps,a=e.error,u=(0,s.wA)();o.useEffect((function(){a&&(0,D.l)(t.surface,{page_session_id:d.x2.session.pageviewID,item_name:”clips_viewer_exports_error”})}),[a,t.surface]);var c=(0,d.hw)(“Close”,”ViewerExportsOptOutModal”);return(0,r.jsx)(p.P,{display:”flex”,justifyContent:”center”,maxWidth:”600px”,children:(0,r.jsxs)(h.F,{size:”md”,elevation:3,children:[(0,r.jsx)(F.r,{title:(0,d.hw)(“Are you sure you want to opt out?”,”ViewerExportsOptOutModal”)}),(0,r.jsxs)(y.c,{children:[(0,r.jsx)(p.P,{children:(0,d.hw)(“Allowing viewers to post your clips to social media can help you get discovered by new viewers. Are you sure you want to disable this?”,”ViewerExportsOptOutModal”)}),a&&(0,r.jsx)(p.P,{margin:{top:2},children:(0,r.jsx)(P,{})})]}),(0,r.jsx)(C.j,{primaryButtonProps:{children:a?c:(0,d.hw)(“Yes, Disable This Setting”,”ViewerExportsOptOutModal”),onClick:a?function(){u((0,l.Oo)())}:function(){(0,D.o)(t.surface,{page_session_id:d.x2.session.pageviewID,item_name:”clips_viewer_exports_confirm_opt_out_cta”,item_subsection:”confirm_opt_out”}),n()}},secondaryButtonProps:a?void 0:{children:(0,d.hw)(“Go Back”,”ViewerExportsOptOutModal”),onClick:i}})]})})};!function(e){e.DEFAULT=”default”,e.OPT_OUT=”opt-out”}(t||(t={}));var j=function(e){var n=(0,s.wA)(),i=o.useState(t.DEFAULT),p=i[0],h=i[1],f=o.useState(!1),g=f[0],k=f[1],y=function(){d.IG.set(v.VIEWER_EXPORTS_MODAL_TIMEOUT_KEY,!0,{expireInMS:v.VIEWER_EXPORTS_MODAL_TIMEOUT_DURATION_MS}),k(!0)},S=(0,m.O)(e.channelLogin),b=S.setChannelClipsSettings,_=S.data,x=S.loading,C=S.isFirstPageload;o.useEffect((function(){p===t.DEFAULT?(0,D.l)(e.surface,{page_session_id:d.x2.session.pageviewID,item_name:”clips_viewer_exports_enable_cta”}):(0,D.l)(e.surface,{page_session_id:d.x2.session.pageviewID,item_name:”clips_viewer_exports_confirm_opt_out_cta”})}),[p,e.surface]);return C.current&&x?(C.current=!1,null):(0,r.jsx)(r.Fragment,{children:p===t.DEFAULT?(0,r.jsx)(T,{onOptIn:function(){return(0,a.__awaiter)(void 0,void 0,void 0,(function(){return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return _&&_.user&&_.user.channel?[4,b({isViewerExportingEnabled:!0,hasAcknowledgedViewerExportsLegalDisclosure:!0})]:[3,2];case 1:i.sent().error?y():(n((0,l.Oo)()),e.addSnackbarToQueue((0,r.jsx)(u.D,{type:”success”,message:(0,d.hw)(“Viewer Exports has been enabled.”,”ViewerExportsSnackbar”),dismissable:!0}))),i.label=2;case 2:return[2]}}))}))},onOptOut:function(){(0,D.o)(e.surface,{page_session_id:d.x2.session.pageviewID,item_name:”clips_viewer_exports_enable_cta”,item_subsection:”disable”}),h(t.OPT_OUT)},showViewerExportsProps:e,error:g}):(0,r.jsx)(E,{onConfirmOptOut:function(){return(0,a.__awaiter)(void 0,void 0,void 0,(function(){return(0,a.__generator)(this,(function(i){switch(i.label){case 0:return _&&_.user&&_.user.channel?[4,b({isViewerExportingEnabled:!1})]:[3,2];case 1:i.sent().error?y():((0,c.d$)(“viewer exports declined”),n((0,l.Oo)()),e.addSnackbarToQueue((0,r.jsx)(u.D,{type:”warning”,message:(0,d.hw)(“Viewer Exports has been disabled.”,”ViewerExportsSnackbar”),dismissable:!0,duration:4e3}))),i.label=2;case 2:return[2]}}))}))},onCancel:function(){(0,D.o)(e.surface,{page_session_id:d.x2.session.pageviewID,item_name:”clips_viewer_exports_confirm_opt_out_cta”,item_subsection:”go_back”}),h(t.DEFAULT)},showViewerExportsProps:e,error:g})})}},375808:function(e,n,i){“use strict”;i.d(n,{l:function(){return a},o:function(){return r}});var t=i(859406),a=function(e,n){var i=””.concat(e,”_impression”);t.E5.track(i,n)},r=function(e,n){var i=””.concat(e,”_click”);t.E5.track(i,n)}},267071:function(e,n,i){“use strict”;i.d(n,{C:function(){return a}});var t=i(638230),a=function(){return(0,t._)(“water-sea-ramen”,”boolean”,!1).value}},633283:function(e,n,i){“use strict”;i.d(n,{dB:function(){return H}});var t=i(331635),a=i(474848),r=i(914421),o=i(564368),s=i(959340),l=i(70931),d=i(312663),u=i(552400),c=i(79004),m=i(953838),v=i(973474),p=i(36935),h=i(246942),f=i.n(h),g=i(296540),k=i(415044),y=i(868238),S=i(859406),b=i(446552),_=i(739604),x=i(733016),C=i(664865),w=i(469655),N=i(876531),P=i(368770),D=i(166012),T=i(2441),I=i(590745),F=i(10530),E=i(775742),j=i(673850),L=i(779090),A=(0,_.U)({name:”ConsentBanner”,category:”identity”}).Available,R=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.logger=S.vF.withCategory(“consent-banner”),n.renderBannerButtons=function(){var e,i,t,l,d,u,c,m,v,p=r.bo.Column,h=null===(t=null===(i=null===(e=n.props)||void 0===e?void 0:e.consent)||void 0===i?void 0:i.consent)||void 0===t?void 0:t.isDeniedUnderage,f=null===(u=null===(d=null===(l=n.props)||void 0===l?void 0:l.consent)||void 0===d?void 0:d.consent)||void 0===u?void 0:u.privacyLawName,g=null!==(v=null===(m=null===(c=n.props.consent)||void 0===c?void 0:c.consent)||void 0===m?void 0:m.shouldSkipDmaBanner)&&void 0!==v&&v,k=(0,S.hw)(“Accept”,”ConsentBanner”),y=function(){n.onClickAcceptOrClose(!0,L.dE.Accept,void 0,g)},b=(0,S.hw)(“Reject”,”ConsentBanner”),_=function(){n.onClickAcceptOrClose(!1,L.dE.Reject,void 0,g)},x=[];h?x=[{key:”close-banner”,onClick:function(){n.onClickAcceptOrClose(!1,L.dE.Close,void 0,g)},target:”consent-banner-manage-preferences”,content:(0,S.hw)(“Close”,”ConsentBanner”)}]:f===N.QKh.GDPR?x=[{key:”gdpr-accept”,onClick:y,target:”consent-banner-accept”,content:k,fullWidth:!0},{key:”gdpr-manage”,onClick:n.onClickManage,target:”consent-banner-manage-preferences”,content:(0,S.hw)(“Customize”,”ConsentBanner”),fullWidth:!0},{key:”gdpr-reject”,onClick:_,content:b,fullWidth:!0}]:f===N.QKh.CCPA?(p=r.bo.Row,x=[{key:”ccpa-manage”,onClick:n.onClickManage,target:”consent-banner-manage-preferences”,content:(0,S.hw)(“Opt-out Preferences”,”ConsentBanner”)},{key:”ccpa-accept”,onClick:y,content:(0,S.hw)(“Proceed”,”ConsentBanner”),variant:o.VQ.Primary}]):f===N.QKh.QPL&&(x=[{key:”qpl-accept”,onClick:y,target:”consent-banner-accept”,content:k,variant:o.VQ.Primary},{key:”qpl-reject”,onClick:_,content:b}]);var C=x.map((function(e,n){var i;return(0,a.jsx)(s.P,{margin:{bottom:1,left:1},width:e.fullWidth?”100%”:void 0,children:(0,a.jsx)(o.$n,{onClick:e.onClick,variant:null!==(i=e.variant)&&void 0!==i?i:o.VQ.Secondary,”data-a-target”:e.target,fullWidth:e.fullWidth,overlay:!0,children:(0,a.jsx)(s.P,{padding:{x:1},children:e.content})})},e.key)}));return(0,a.jsx)(s.P,{display:r.nl.Flex,flexDirection:r.bo.Column,alignItems:r.k2.Center,justifyContent:r.A9.Center,margin:{top:1},breakpointSmall:{flexDirection:p,margin:{top:0,right:1,left:1},padding:{left:1}},children:C})},n.renderBannerText=function(){for(var e,i,t,r,o,s,u,c,m,v,p,h=null===(t=null===(i=null===(e=n.props)||void 0===e?void 0:e.consent)||void 0===i?void 0:i.consent)||void 0===t?void 0:t.isDeniedUnderage,f=null!==(s=null===(o=null===(r=n.props.consent)||void 0===r?void 0:r.consent)||void 0===o?void 0:o.shouldSkipDmaBanner)&&void 0!==s&&s,g=null===(c=null===(u=n.props.consent)||void 0===u?void 0:u.consent)||void 0===c?void 0:c.vendorConsentStatus,k=”GDPRVendorConsent”===(null==g?void 0:g.__typename)?g.status.filter((function(e){return e.isVisible})):[],y=0,b=0,_=k;b<_.length;b++){var x=_[b];x.name!==N.eo7.AMAZON&&x.name!==N.eo7.GOOGLE_ANALYTICS_DEVELOPER_EXTENSIONS&&y++}var C=f?(0,S.hw)('Twitch uses personal data collected on our services, such as page visits through cookies and other device identifiers, to generate personalized content, remember your preferences, analyze usage to improve our products, and measure the effectiveness of our campaigns to acquire new users. If you agree, we will also permit up to {vendorCounts} trusted third party partners to obtain data from our services or store and access cookies on your device to deliver personalised ads, measure effectiveness, and create audience insights. Please see our Cookie Notice to learn more. By clicking “Accept”, you consent to these activities. Click “Reject” to decline, or “Customize” to make more detailed choices or to learn more. You can change your choices at any time.’,{“x:cookies”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/cookie-policy/”,targetBlank:!0,children:e})},”x:cookie-notice”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/cookie-policy/”,targetBlank:!0,children:e})},vendorCounts:y},”ConsentBannerText”):(0,S.hw)(‘Twitch uses personal data collected on our services, such as page visits, through cookies and other device identifiers to generate personalized content, remember preferences, analyze usage to improve products, and measure the effectiveness of campaigns to acquire new users. If you agree, we will also permit other Amazon services and up to {vendorCounts} trusted third party partners to obtain data from our services or store and access cookies on your device to deliver personalized ads, measure effectiveness, and create audience insights. We will also personalize the ads we show you on Twitch using cookies and personal information we may receive from third parties. The ads you see on other sites may also be personalized based on your use of Twitch. See our Cookie Notice and Privacy Notice to learn more. By clicking “Accept”, you consent to these activities. Click “Reject” to decline, or “Customize” to make more detailed choices or to learn more. You can change your choices at any time.’,{“x:cookies”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/cookie-policy/”,targetBlank:!0,children:e})},”x:cookie-notice”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/cookie-policy/”,targetBlank:!0,children:e})},”x:privacy-notice”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/privacy-notice/”,targetBlank:!0,children:e})},vendorCounts:y},”ConsentBannerText”),w=n.props.isLoggedIn?(0,S.hw)(‘Twitch uses personal data collected on our services, such as page visits through cookies and other device identifiers, to show you interest-based ads. By clicking “Accept”, you consent to these activities. Click “Reject” to decline, or see our Cookie Notice and Privacy Notice to learn more. You can change your choices at any time in your user settings.’,{“x:cookie-notice”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/cookie-policy/”,targetBlank:!0,children:e})},”x:privacy-notice”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/privacy-notice/”,targetBlank:!0,children:e})},”x:user-settings”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:(0,D.VV)(“/settings/security”,”www”,{absolutePath:!0}),targetBlank:!0,children:e})}},”ConsentBannerText”):(0,S.hw)(‘Twitch uses personal data collected on our services, such as page visits through cookies and other device identifiers, to show you interest-based ads. By clicking “Accept”, you consent to these activities. Click “Reject” to decline, or see our Cookie Notice and Privacy Notice to learn more. You can update your choice at any time via the navigation menu to the right, and click “Cookies & Ads Choices”.’,{“x:cookie-notice”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/cookie-policy/”,targetBlank:!0,children:e})},”x:privacy-notice”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/privacy-notice/”,targetBlank:!0,children:e})}},”ConsentBannerText”);if(h)return(0,a.jsx)(d.N,{children:(0,S.hw)(‘Twitch uses data collected on our services, including through technologies such as “cookies”, to support important services. These services help Twitch remember who you are, remember your preferences and improve our products. As a user under the age of consent, your personal data will not be used to customize the Ads you see, or be shared with 3rd party advertiser / marketing vendors. Please visit Twitch’s Cookie Notice for additional information’,{“x:cookie-notice”:function(e){return(0,a.jsx)(l.Cb,{variant:l.KD.Overlay,linkTo:”https://www.twitch.tv/p/legal/cookie-policy/”,targetBlank:!0,children:e})}},”ConsentBannerText”)});switch(null===(p=null===(v=null===(m=n.props)||void 0===m?void 0:m.consent)||void 0===v?void 0:v.consent)||void 0===p?void 0:p.privacyLawName){case N.QKh.CCPA:return(0,a.jsx)(d.N,{children:(0,S.hw)(‘We work with trusted partners to provide relevant advertising based on information about your use of Twitch and third-party websites and applications. If you want to learn more about our advertising practices and your rights to opt-out, click the “Opt-Out Preferences” button to the right or use the navigation menu at the top of the page.’,”ConsentBannerText”)});case N.QKh.GDPR:return(0,a.jsx)(d.N,{children:C});case N.QKh.QPL:return(0,a.jsx)(d.N,{children:w});default:return null}},n.onClickManage=function(){var e,i,t,a,r=null!==(t=null===(i=null===(e=n.props.consent)||void 0===e?void 0:e.consent)||void 0===i?void 0:i.shouldSkipDmaBanner)&&void 0!==t&&t;n.props.showConsentTool(r),(0,L.b0)(L.dE.Manage,null===(a=n.props)||void 0===a?void 0:a.consent)},n.onClickAcceptOrClose=function(e,i,a,r){return(0,t.__awaiter)(n,void 0,void 0,(function(){var n,o,s,l,d,u,c,m,v,p,h,f,g,k,y,b,_,x,w,P,D,F,E;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:if(t.trys.push([0,2,,3]),n=null===(h=null===(p=null===(v=this.props)||void 0===v?void 0:v.consent)||void 0===p?void 0:p.consent)||void 0===h?void 0:h.isDeniedUnderage,o=null===(k=null===(g=null===(f=this.props)||void 0===f?void 0:f.consent)||void 0===g?void 0:g.consent)||void 0===k?void 0:k.privacyLawName,s=this.getVendorPreferencesWithAllVendorsToUpdate(e),l=this.getPurposeOrFeaturePreferencesWithAllPurposesToUpdate(null===(_=null===(b=null===(y=this.props.consent)||void 0===y?void 0:y.consent)||void 0===b?void 0:b.gdprUserPreferences)||void 0===_?void 0:_.purpose,e),d=this.getPurposeOrFeaturePreferencesWithAllPurposesToUpdate(null===(P=null===(w=null===(x=this.props.consent)||void 0===x?void 0:x.consent)||void 0===w?void 0:w.gdprUserPreferences)||void 0===P?void 0:P.specialFeatureOptIns,e),n?(0,L.b0)(L.dE.Close,null===(D=this.props)||void 0===D?void 0:D.consent):(0,L.b0)(i,null===(F=this.props)||void 0===F?void 0:F.consent),!o)throw S.E5.trackAvailability({is_available:!1,name:”ConsentBanner”,category:”identity”,reason:”Invalid privacy law name”}),new Error(“Invalid privacy law name!”);return u=(0,T.UC)(s,l,d,o,I.RI,N.jtc.CONSENT_BANNER,this.props.languageCode),(0,j.U4)()&&o===N.QKh.GDPR&&!r&&(u.dmaUserPreferences={hasDmaOptIn:e}),[4,this.props.updateConsentMutation((0,C.AR)(u))];case 1:if(!(c=t.sent().data))throw S.E5.trackAvailability({is_available:!1,name:”ConsentBanner”,category:”identity”,reason:”GQL mutation data missing”}),new Error(“GQL mutation data missing”);if(!(m=c.updateConsent)||!m.consent)throw S.E5.trackAvailability({is_available:!1,name:”ConsentBanner”,category:”identity”,reason:”GQL update consent object error”}),new Error(“GQL update consent object error, please revoke all consent!”);return(0,L.G$)(null===(E=this.props)||void 0===E?void 0:E.consent,a),[3,3];case 2:return t.sent(),S.E5.trackAvailability({is_available:!1,name:”ConsentBanner”,category:”identity”,reason:”GQL mutation errors”}),this.logger.debug(“mutation errors!”),[3,3];case 3:return[2]}}))}))},n.getDisplayValue=function(e){var n,i;return!e.uiTheatre&&(null===(i=null===(n=null==e?void 0:e.consent)||void 0===n?void 0:n.consent)||void 0===i?void 0:i.shouldShowNotification)},n.shouldShowConsentBannerDismissButton=function(){var e,i,t,a,r,o,s,l,d,u=null===(t=null===(i=null===(e=n.props)||void 0===e?void 0:e.consent)||void 0===i?void 0:i.consent)||void 0===t?void 0:t.isDeniedUnderage,c=(null===(o=null===(r=null===(a=n.props)||void 0===a?void 0:a.consent)||void 0===r?void 0:r.consent)||void 0===o?void 0:o.privacyLawName)===N.QKh.GDPR;return(null===(d=null===(l=null===(s=n.props)||void 0===s?void 0:s.consent)||void 0===l?void 0:l.consent)||void 0===d?void 0:d.shouldShowDismissButton)&&!u&&!c},n}return(0,t.__extends)(n,e),n.prototype.componentDidMount=function(){var e;this.getDisplayValue(this.props)&&(0,L.Z8)(null===(e=this.props)||void 0===e?void 0:e.consent)},n.prototype.componentDidUpdate=function(e){var n;!this.getDisplayValue(e)&&this.getDisplayValue(this.props)&&(0,L.Z8)(null===(n=this.props)||void 0===n?void 0:n.consent)},n.prototype.render=function(){var e,n,i,l,d,h,g,k,y,_=this,C=null===(i=null===(n=null===(e=this.props)||void 0===e?void 0:e.consent)||void 0===n?void 0:n.consent)||void 0===i?void 0:i.privacyLawName,w=null===(h=null===(d=null===(l=this.props)||void 0===l?void 0:l.consent)||void 0===d?void 0:d.consent)||void 0===h?void 0:h.isDeniedUnderage,P=null!==(y=null===(k=null===(g=this.props.consent)||void 0===g?void 0:g.consent)||void 0===k?void 0:k.shouldSkipDmaBanner)&&void 0!==y&&y,D=(0,S.hw)(“Cookies and Advertising Choices”,”ConsentBanner”);if(!this.getDisplayValue(this.props)||!C)return null;if(![N.QKh.CCPA,N.QKh.GDPR,N.QKh.QPL].includes(C))return null;var T=f()({“consent-banner__content–underage”:w,”consent-banner__content–ccpa”:C===N.QKh.CCPA,”consent-banner__content–gdpr-v2″:C===N.QKh.GDPR,”consent-banner__content–qpl”:C===N.QKh.QPL}),I=this.props.attachBottom?{elevation:3}:{};return(0,a.jsx)(x.t,{name:”ConsentBanner”,children:(0,a.jsx)(A,{children:(0,a.jsx)(s.P,(0,t.__assign)({flexShrink:0},I,{children:(0,a.jsxs)(s.P,{className:”consent-banner”,padding:{x:2,y:2},background:r.VS.AccentAlt,color:r.Q1.Overlay,position:r.yX.Relative,attachTop:!0,attachLeft:!0,attachRight:!0,”data-a-target”:”consent-banner”,children:[this.shouldShowConsentBannerDismissButton()&&(0,a.jsx)(s.P,{justifyContent:r.A9.End,display:r.nl.Flex,flexDirection:r.bo.Column,alignItems:r.k2.End,children:(0,a.jsx)(u.m,{label:(0,S.hw)(“Continue without accepting”,”ConsentBanner”),options:{placement:”left”},children:(0,a.jsx)(c.a2,{“aria-label”:(0,S.hw)(“Dismiss consent banner”,”ConsentBanner”),icon:m.g,overlay:!0,onClick:function(){return _.onClickAcceptOrClose(!1,L.dE.Close,!0,P)},variant:o.VQ.Primary})})}),(0,a.jsx)(s.P,{justifyContent:r.A9.Center,alignItems:r.k2.Center,display:r.nl.Flex,flexDirection:r.bo.Row,children:(0,a.jsxs)(s.P,{className:T,justifyContent:r.A9.Center,display:r.nl.Flex,flexDirection:r.bo.Column,overflow:r.nE.Hidden,breakpointSmall:{flexDirection:r.bo.Row,alignItems:r.k2.Center},children:[(0,a.jsx)(s.P,{margin:{right:2},flexShrink:0,display:r.nl.Hide,breakpointSmall:{display:r.nl.Block},children:(0,a.jsx)(v.L,{src:b,alt:(0,S.hw)(“Cookies”,”ConsentBanner”)})}),(0,a.jsxs)(s.P,{padding:{x:1},children:[(0,a.jsxs)(p.hE,{size:p.uM.Title,children:[D,(0,a.jsx)(“br”,{})]}),(0,a.jsx)(s.P,{margin:{top:.5},maxHeight:”30rem”,style:{overflow:”auto”},children:this.renderBannerText()})]}),this.renderBannerButtons()]})})]})}))})})},n.prototype.getVendorPreferencesWithAllVendorsToUpdate=function(e){var n,i,t,a,r,o,s,l,d,u,c=null===(t=null===(i=null===(n=this.props)||void 0===n?void 0:n.consent)||void 0===i?void 0:i.consent)||void 0===t?void 0:t.isDeniedUnderage;if(“GDPRVendorConsent”===(null===(o=null===(r=null===(a=this.props.consent)||void 0===a?void 0:a.consent)||void 0===r?void 0:r.vendorConsentStatus)||void 0===o?void 0:o.__typename)&&(0,j.s7)()){var m=(0,T.uH)(this.props.consent.consent.vendorConsentStatus);return c?(0,T.kT)(m,!1):(0,T.kT)(m,e)}var v=(0,T.wY)(null===(l=null===(s=this.props.consent)||void 0===s?void 0:s.consent)||void 0===l?void 0:l.vendorStatus,null===(u=null===(d=this.props.consent)||void 0===d?void 0:d.consent)||void 0===u?void 0:u.privacyLawName);return c?(0,T.kT)(v,!1):(0,T.kT)(v,e)},n.prototype.getPurposeOrFeaturePreferencesWithAllPurposesToUpdate=function(e,n){var i,t,a,r=null===(a=null===(t=null===(i=this.props)||void 0===i?void 0:i.consent)||void 0===t?void 0:t.consent)||void 0===a?void 0:a.isDeniedUnderage,o=(0,T.zh)(e);return r?(0,T.kT)(o,!1):(0,T.HA)(o,n)},n}(g.Component),H=(0,y.Zz)((0,k.Ng)((function(e){return{uiTheatre:e.ui.theatreModeEnabled,languageCode:e.session.languageCode,isLoggedIn:(0,P.M3)(e)}}),(function(e){return(0,y.zH)({showConsentTool:function(e){return(0,w.to)(F.wk,{hideDmaBanner:e})}},e)})),(0,E.D)(),I.z3)(R)},230026:function(e,n,i){“use strict”;i.d(n,{oN:function(){return a}});var t=(0,i(265827).q)(“CostreamingContext”,{channelId:null,channelDisplayName:null,channelLogin:null,organizerId:null,organizerDisplayName:null,organizerLogin:null,costreamerStatus:null,isCurrentUserLive:null,showOverlay:!1,setShowOverlay:function(){}}),a=(t.withContext,t.context)},147134:function(e,n,i){“use strict”;i.d(n,{Ff:function(){return m},pP:function(){return c}});var t=i(474848),a=i(296540),r=i(29896),o=i(265827),s=i(389628),l=i.n(s),d=i(626753),u=(0,o.q)(“CostreamingDiscoveryContext”,{userLoginCostreamingDetails:new Map}).context,c=function(e){var n=a.useContext(u);if(!e)return null;var i=n.userLoginCostreamingDetails.get(e);return i||null},m=function(e){var n,i=a.useMemo((function(){return new Map}),[]),o=(0,r.IT)(l(),{skip:void 0===e.channelIDs||0===e.channelIDs.length,fetchPolicy:”cache-first”,variables:{channelIDs:e.channelIDs}}).data;return null===(n=null==o?void 0:o.users)||void 0===n||n.forEach((function(e){if(e&&e.stream){var n=(0,d.m)(e.stream.costreamDetails);n&&i.set(e.login,n)}})),(0,t.jsx)(u.Provider,{value:{userLoginCostreamingDetails:i},children:e.children})}},626753:function(e,n,i){“use strict”;i.d(n,{m:function(){return a}});var t=i(876531);function a(e){var n,i,a,r;return e&&e.organizer&&e.role?{totalViewersCount:null!==(n=e.totalViewersCount)&&void 0!==n?n:0,organizer:e.organizer,costreamersCount:null!==(i=e.costreamersCount)&&void 0!==i?i:0,role:null!==(a=e.role)&&void 0!==a?a:t.Fm$.NONE,topCostreamers:null===(r=null==e?void 0:e.topCostreamers)||void 0===r?void 0:r.filter((function(e){return null!==e}))}:null}},36230:function(e,n,i){“use strict”;i.d(n,{F:function(){return o}});var t=i(29896),a=i(786289),r=i.n(a),o=function(e){var n,i,a=e.channelID,o=e.skip,s=(0,t.IT)(r(),{variables:{channelID:a},skip:o}),l=s.data,d=s.loading;return{creatorPromotionActivation:null===(i=null===(n=null==l?void 0:l.channel)||void 0===n?void 0:n.creatorPromotion)||void 0===i?void 0:i.currentActivation,loading:d}}},980859:function(e,n,i){“use strict”;i.d(n,{N:function(){return a}});var t=i(444025),a=function(){var e=(0,t.z)();return!!(null==e?void 0:e.tagString)&&””!==e.tagString.trim()}},203970:function(e,n,i){“use strict”;var t;i.d(n,{I4:function(){return a},iQ:function(){return t},nO:function(){return r}}),function(e){e.Chat=”stream_chat”,e.Feeds=”feeds”,e.Room=”chatroom”,e.Whisper=”whisper”,e.VodChat=”vod-chat”,e.BitsRewards=”bits-rewards”}(t||(t={}));var a={TriHard:{count:196568036},Kappa:{count:192158118},”4Head”:{count:155758710},PogChamp:{count:151485090},cmonBruh:{count:146352878},WutFace:{count:45069031},Kreygasm:{count:41387580},DansGame:{count:38097659},hi5F:{count:34986404},SMOrc:{count:34734484},KappaPride:{count:34262839},VoHiYo:{count:27886434},SwiftRage:{count:24561900},ResidentSleeper:{count:24438298},EleGiggle:{count:19891526},FailFish:{count:19118343},NotLikeThis:{count:18802905},Keepo:{count:18351415},BabyRage:{count:18220906},MingLee:{count:18026207},pbfSSH:{count:16911241},forsenE:{count:14960299},HeyGuys:{count:14851569},ANELE:{count:14648986},PJSalt:{count:14438861}},r=[“354″,”49106″,”4339″,”25″,”55338″,”70433″,”1902″,”68856″,”81103″,”76171″,”27509”]},970608:function(e,n,i){“use strict”;i.d(n,{$G:function(){return g},F6:function(){return h},Sn:function(){return c},W1:function(){return f},YW:function(){return u},am:function(){return m},eG:function(){return p},i1:function(){return k}});var t=i(331635),a=i(178676),r=i(765663),o=i(203970),s={“B-?\\)”:”B)”,”\\:-?[z|Z|\\|]”:”:|”,”\\:-?\\)”:”:)”,”\\:-?\\(“:”:(“,”\\:-?(p|P)”:”:P”,”\\;-?(p|P)”:”;P”,”\\:-?[\\\\/]”:”:/”,”\\;-?\\)”:”;)”,”R-?\\)”:”R)”,”:>”:”:>”,”\\:\\&gt\\;”:”:>”,”[oO](_|\\.)[oO]”:”O_o”,”\\:-?D”:”:D”,”\\:-?(o|O)”:”:O”,”>\\\\(“:”>(“,”:-?(?:7|L)”:”:7″,”\\:-?(S|s)”:”:S”,”#-?[\\\\/]”:”#/”,”<\\]":"<]","<3":"<3","\\&lt\\;3":"<3","\\&lt\\;\\]":"<]","\\&gt\\;\\(":">(“},l=[“1.0″,”2.0″,”3.0”],d=new Set([457,33,42,0]);function u(e,n,i){void 0===n&&(n=!0),void 0===i&&(i=a.S.Light);for(var t=[],r=0,o=e;r15,H=w?k:0;return(0,r.jsx)(o.P,{overflow:s.nE.Hidden,background:e.background,borderRadius:l.Z.Rounded,display:E?s.nl.Flex:s.nl.InlineFlex,fullWidth:E,width:E?”100%”:void 0,children:(0,r.jsx)(d.$n,(0,a.__assign)({ref:function(e){return n.current=null!=e?e:void 0},fullWidth:E,overlay:e.overlayButton,onClick:P,variant:j,tabIndex:e.tabIndex,”aria-label”:e.ariaLabel,disabledInteraction:e.disabled,size:e.size||d.Mp.Default,onMouseEnter:function(){return D(“mouse”)},onMouseLeave:T,onFocus:function(){return D(“other”)},onBlur:T},(0,u.Fh)(e),{children:(0,r.jsxs)(o.P,{display:s.nl.Flex,justifyContent:s.A9.Center,alignItems:s.k2.Center,children:[(0,r.jsx)(c.S,{display:s.nl.Flex,justifyContent:s.A9.Center,alignItems:s.k2.Center,margin:{right:A},fullHeight:!0,children:(0,r.jsx)(g.d,{“data-test-selector”:t.IconTransform,transformIf:b||R,transformValues:{scale:b?1.2:void 0,translateX:R?x/2:void 0},transition:{durationMs:H,easing:”ease”},children:(0,r.jsx)(m.X5,{enabled:_,onAnimationEnd:I,duration:m.J6.Long,type:m.as.BounceIn,children:(0,r.jsx)(o.P,{display:s.nl.Flex,justifyContent:s.A9.Center,alignItems:s.k2.Center,children:(0,r.jsx)(v.m,{label:e.tooltipText,enterDelay:0,disabled:L,show:e.isBlocked&&!e.isFollowing||b&&!L,options:{placement:”top”},children:(0,r.jsx)(p.t,{type:p.H.Inherit,asset:b&&y?y:h})})})})})}),C&&E&&(0,r.jsx)(“span”,{ref:F,children:(0,r.jsx)(g.d,{“data-test-selector”:t.TextTransform,transformIf:N,fade:g.z.Out,transformValues:{},transition:{durationMs:e.disableTextAnimation?0:H,easing:”ease”},children:C})})]})}))})},S=function(e,n){var i=(0,f.useState)(e.text),t=i[0],a=i[1],r=(0,f.useState)(e.text),o=r[0],s=r[1],l=(0,f.useState)(!1),d=l[0],u=l[1],c=(0,f.useState)(!e.preventTransition),m=c[0],v=c[1],p=(0,f.useState)(0),g=p[0],k=p[1],y=(0,f.useState)(e.icon),S=y[0],b=y[1],_=(0,f.useState)(e.iconOnHover),x=_[0],C=_[1],w=(0,f.useState)(!1),N=w[0],P=w[1],D=(0,f.useState)(!(!g&&!e.isFollowing)),T=D[0],I=D[1],F=(0,f.useRef)(“other”),E=(0,f.useRef)(null),j=(0,f.useRef)(),L=e.onAnimationEnd,A=function(){a(e.text||””),u(!1)};!function(e,n,i,t){var a=e&&”mouse”===n.current;(0,h.$)((function(){var e;(null===(e=null==t?void 0:t.current)||void 0===e?void 0:e.matches(“:hover”))||i()}),a?200:0)}(d,F,A,n);return(0,f.useEffect)((function(){b(e.icon),P(!0)}),[e.icon]),(0,f.useEffect)((function(){C(e.iconOnHover),P(!0)}),[e.iconOnHover]),(0,f.useEffect)((function(){var n,i,t;s(e.text),E.current&&(j.current=(null===(t=null===(i=(n=E.current).getBoundingClientRect)||void 0===i?void 0:i.call(n))||void 0===t?void 0:t.width)||E.current.offsetWidth)}),[e.text]),(0,f.useEffect)((function(){e.text&&setTimeout((function(){I(!!e.isFollowing)}),150)}),[e.isFollowing,e.text]),(0,f.useEffect)((function(){if(t){var n=e.delayText||0;if(!(n<=0)){var i=setTimeout((function(){s(t),a("")}),n);return function(){return clearTimeout(i)}}s(t),a("")}}),[e.delayText,d,t]),(0,f.useEffect)((function(){var e=setTimeout((function(){null==L||L(),u(!1)}),0);return function(){return clearTimeout(e)}}),[N,L]),(0,f.useEffect)((function(){var e,n,i;if(E.current){var t=null!==(i=null===(n=(e=E.current).getBoundingClientRect)||void 0===n?void 0:n.call(e).width)&&void 0!==i?i:E.current.offsetWidth;j.current&&k(t-j.current),j.current=t,requestAnimationFrame((function(){requestAnimationFrame((function(){k(0)}))}))}}),[j,k,E]),{icon:S,iconOnHover:x,isFocused:d,isIconAnimationEnabled:N,offsetPixels:g,text:o,textBuffer:t,transitionOn:m,fadeText:T,onClick:function(n){var i;N||(u(!0),null===(i=e.onClick)||void 0===i||i.call(e,n))},onFocus:function(n){var i;F.current=n;var t=e.text||"";a(null!==(i=e.textOnHover)&&void 0!==i?i:t),u(!0),v(!0)},onBlur:A,onIconAnimationComplete:function(){return P(!1)},textRef:E}}},106448:function(e,n,i){"use strict";i.d(n,{YB:function(){return s},fw:function(){return t},s6:function(){return a},xu:function(){return r},yI:function(){return o}});var t={rain:14,rainOptout:10,fireworks:25,fireworksOptout:16},a=7e3,r=5e3,o={simmer:58,simmerRain:276,simmerRainShort:216,rainOptout:40,fireworks:276,fireworksShort:216,fireworksOptout:149},s=[{src:"https://d3aqoihi2n8ty8.cloudfront.net/celebi/diamond.png",token:"diamond"},{src:"https://d3aqoihi2n8ty8.cloudfront.net/celebi/star.png",token:"star"},{src:"https://static-cdn.jtvnw.net/emoticons/v1/9/1.0",token:"heart"}]},288872:function(e,n,i){"use strict";var t,a,r;i.d(n,{K6:function(){return t},nn:function(){return a},rw:function(){return r}}),function(e){e.Control="Control",e.VariantA="VariantA",e.VariantB="VariantB",e.VariantC="VariantC"}(t||(t={})),function(e){e[e.Unknown=0]="Unknown",e.Complete="Complete",e.NearComplete="NearComplete"}(a||(a={})),function(e){e.NoAnimations="no_animation",e.Simmer="simmer",e.SimmerRain="simmer_rain",e.Fireworks="fireworks",e.RainOptOut="rain_optout",e.FireworksOptOut="fireworks_optout"}(r||(r={}))},501909:function(e,n,i){"use strict";i.d(n,{$e:function(){return m},Q7:function(){return u},RM:function(){return s},RQ:function(){return l},W5:function(){return d},km:function(){return c}});var t=i(621241),a=i(384131),r=i(106448),o=i(288872),s=function(e,n,i){if(e===a.SI.Inactive||(0,a.M4)(e)||e===a.SI.Ending||e===a.SI.RewardsDistributing||!n)return{level:0,status:o.nn.Unknown,noCelebration:!0};if(e===a.SI.PreLevelUp||e===a.SI.LevelUp)return{level:n.progress.level.value,status:o.nn.Complete,noCelebration:!1};var r=Math.min(100,n.progress.progression/n.progress.goal*100);return r>=95&&r<=100||e!==a.SI.ATHReached&&(0,t.wb)(n,i)?{level:n.progress.level.value,status:o.nn.NearComplete,noCelebration:!1}:{level:n.progress.level.value,status:o.nn.Unknown,noCelebration:!0}},l=function(e,n){return e.noCelebration?o.rw.NoAnimations:e.status===o.nn.NearComplete?o.rw.Simmer:e.status===o.nn.Complete?e.level===n?o.rw.Fireworks:o.rw.SimmerRain:o.rw.NoAnimations},d=function(e,n){var i=new Image;return i.src=e.src,i.alt=e.token,i.width=n,i.height=n,i},u=function(e){switch(e){case o.rw.Simmer:case o.rw.SimmerRain:return r.fw.rain;case o.rw.Fireworks:return r.fw.fireworks;case o.rw.RainOptOut:return r.fw.rainOptout;case o.rw.FireworksOptOut:return r.fw.fireworksOptout;default:return 0}},c=function(e){return e.noCelebration||e.status===o.nn.Unknown?"0":"level_".concat(e.level,"_").concat(e.status===o.nn.Complete?"complete":"95")},m=function(e,n){return e.level!==n.level||e.noCelebration!==n.noCelebration||e.status!==n.status}},892517:function(e,n,i){"use strict";i.d(n,{Z_:function(){return t},UD:function(){return k}});var t,a=i(331635),r=i(727234),o=i(10982),s=i(891975),l=i(296540),d=i(876531),u=i(621241),c=i(384131),m=i(726561),v=i(912771);!function(e){e.Default="DEFAULT",e.LevelUpCTA="LEVEL_UP_CTA",e.GiftCTA="GIFT_CTA",e.UnlockRewardCTA="UNLOCK_REWARD_CTA",e.RewardRouletteCTA="REWARD_ROULETTE_CTA",e.ATHApproachingCTA="ATH_APPROACHING_CTA",e.ATHReachedCTA="ATH_REACHED_CTA",e.TreasureTrainDiscountApproachingCTA="TREASURE_TRAIN_DISCOUNT_APPROACHING_CTA"}(t||(t={}));var p,h=[t.LevelUpCTA,t.GiftCTA,t.UnlockRewardCTA,t.RewardRouletteCTA,t.ATHApproachingCTA,t.ATHReachedCTA,t.TreasureTrainDiscountApproachingCTA],f={baselineState:t.Default,currentNonDefaultIndex:h.length-1,stateLoopIntervalDuration:0,stopPending:!1};!function(e){e.NextPanel="NEXT_PANEL",e.StartInterval="START_INTERVAL",e.StopInterval="STOP_INTERVAL",e.Reset="RESET"}(p||(p={}));var g=function(e,n){switch(n.type){case p.NextPanel:if(null===n.availableNonDefaultStates)return e;if(!e.stopPending&&0!==e.stateLoopIntervalDuration&&e.baselineState===t.Default){var i=(e.currentNonDefaultIndex+1)%n.availableNonDefaultStates.length;return(0,a.__assign)((0,a.__assign)({},e),{baselineState:n.availableNonDefaultStates[i],currentNonDefaultIndex:i})}return(0,a.__assign)((0,a.__assign)({},e),{baselineState:t.Default,stateLoopIntervalDuration:e.stopPending?0:e.stateLoopIntervalDuration,stopPending:!1});case p.StartInterval:return null===n.availableNonDefaultStates?e:(0,a.__assign)((0,a.__assign)({},e),{baselineState:t.Default,stateLoopIntervalDuration:6e3,currentNonDefaultIndex:n.availableNonDefaultStates.length-1,stopPending:!1});case p.StopInterval:return e.baselineState!==t.Default?(0,a.__assign)((0,a.__assign)({},e),{stopPending:!0}):(0,a.__assign)((0,a.__assign)({},e),{stateLoopIntervalDuration:0});case p.Reset:return f;default:return e}},k=function(e){var n,i,a,d,u,h,k,S,b,_=e.bannerState,x=e.data,C=e.earnableEmoteRewardsLength,w=e.lockedEmoteRewardsLength,N=(0,r.Z)(_),P=l.useReducer(g,f),D=P[0],T=P[1],I=l.useRef(null);null===I.current&&(I.current=y({activeHypeTrain:null===(i=null===(n=null==x?void 0:x.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution,channelID:null===(a=null==x?void 0:x.user)||void 0===a?void 0:a.id,earnableEmoteRewardsLength:C,lockedEmoteRewardsLength:w})),l.useEffect((function(){var e,n,i;I.current=y({activeHypeTrain:null===(n=null===(e=null==x?void 0:x.user)||void 0===e?void 0:e.channel)||void 0===n?void 0:n.hypeTrain.execution,channelID:null===(i=null==x?void 0:x.user)||void 0===i?void 0:i.id,earnableEmoteRewardsLength:C,lockedEmoteRewardsLength:w})}),[null===(u=null===(d=null==x?void 0:x.user)||void 0===d?void 0:d.channel)||void 0===u?void 0:u.hypeTrain.execution,null===(h=null==x?void 0:x.user)||void 0===h?void 0:h.id,C,w]),(0,o.$)((function(){T({type:p.NextPanel,availableNonDefaultStates:I.current})}),D.baselineState!==t.Default||0===D.stateLoopIntervalDuration?D.stateLoopIntervalDuration:1e4),l.useEffect((function(){N!==_&&(_===c.SI.Baseline?T({type:p.StartInterval,availableNonDefaultStates:I.current}):T({type:p.StopInterval}))}),[_,N]),(0,s.S)((function(){_===c.SI.Baseline&&N===_&&T({type:p.StartInterval,availableNonDefaultStates:I.current})}));var F=l.useState(null),E=F[0],j=F[1];return function(e,n){void 0===n&&(n=0);var i=(0,m.F)(e);l.useEffect((function(){if(null!==n){var e=setTimeout((function(){i.current()}),n);return function(){return clearTimeout(e)}}}),[n,i])}((function(){T({type:p.StopInterval})}),E),l.useEffect((function(){var e,n,i;if(null===(i=null===(n=null===(e=null==x?void 0:x.user)||void 0===e?void 0:e.channel)||void 0===n?void 0:n.hypeTrain.execution)||void 0===i?void 0:i.expiresAt){var t=Math.max(0,(0,v.Zc)(new Date(x.user.channel.hypeTrain.execution.expiresAt))-30);j(1e3*t)}else j(0)}),[null===(b=null===(S=null===(k=null==x?void 0:x.user)||void 0===k?void 0:k.channel)||void 0===S?void 0:S.hypeTrain.execution)||void 0===b?void 0:b.expiresAt]),l.useEffect((function(){_===c.SI.Inactive&&(T({type:p.Reset}),j(null))}),[_]),{baselinePanelState:D.baselineState,pauseBaselinePanelCycle:function(){return T({type:p.StopInterval})},resumeBaselinePanelCycle:function(){var e,n,i;!(null===(i=null===(n=null===(e=null==x?void 0:x.user)||void 0===e?void 0:e.channel)||void 0===n?void 0:n.hypeTrain.execution)||void 0===i?void 0:i.expiresAt)||(0,v.Zc)(new Date(x.user.channel.hypeTrain.execution.expiresAt))<=30||T({type:p.StartInterval,availableNonDefaultStates:I.current})}}},y=function(e){var n=e.activeHypeTrain,i=e.channelID,a=e.earnableEmoteRewardsLength,r=e.lockedEmoteRewardsLength,o=!!(null==n?void 0:n.progress.level)&&n.progress.level.value>1;return(0,u.Qd)(n,i)===d.Q8_.APPROACHING?[t.ATHApproachingCTA]:(0,u.Qd)(n,i)===d.Q8_.REACHED?[t.ATHReachedCTA]:h.filter((function(e){var i,s;switch(e){case t.LevelUpCTA:return!0;case t.GiftCTA:return o&&!(null===(i=n.self)||void 0===i?void 0:i.isEligibleForRewards)&&(a>0||r>0||n.isGoldenKappaTrain);case t.UnlockRewardCTA:return o&&(a>0||r>0||n.isGoldenKappaTrain);case t.RewardRouletteCTA:return o&&a>0;case t.TreasureTrainDiscountApproachingCTA:return(null==n?void 0:n.isTreasureTrain)&&(null===(s=null==n?void 0:n.treasureTrainDetails)||void 0===s?void 0:s.status)===d.lHC.APPROACHING;default:return!1}}))}},530386:function(e,n,i){“use strict”;i.d(n,{iu:function(){return I},Xj:function(){return T}});var t=i(331635),a=i(474848),r=i(296540),o=i(148223),s=i(265827),l=i(586650),d=i(806677),u=i(910889),c=i(308966),m=i(198437),v=function(e){var n,i,a,s=e.channelID,l=e.data,v=r.useState([]),p=v[0],h=v[1],f=null===(a=null===(i=null===(n=null==l?void 0:l.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution)||void 0===a?void 0:a.id,g=(0,d.Z)(f);return r.useEffect((function(){f!==g&&h((function(e){return e.filter((function(e){return e.hypeTrainID===f}))}))}),[f,g,l]),(0,u.s)({topic:(0,m.tf)(s||””),skip:!s,onMessage:function(e){if(e.type===c.PD.HypeTrainMergeTrains){var n=function(e){return{uuid:(0,o.k3)(),hypeTrainID:e.data.hypeTrain.id,previousLevel:e.data.prevProgress.level.value,newLevel:e.data.hypeTrain.progress.level.value,previousUsers:e.data.prevUsers,joiningUsers:e.data.joiningUsers}}(e);h((function(e){return(0,t.__spreadArray)((0,t.__spreadArray)([],e,!0),[n],!1)}))}}}),{nextMergeEvent:r.useMemo((function(){return p.find((function(e){return e.hypeTrainID===f}))||null}),[p,f]),removeMergeEvent:r.useCallback((function(e){h((function(n){return n.filter((function(n){return n.uuid!==e}))}))}),[h])}};var p=i(876531),h=function(e){var n,i,t,a;return null!==(a=null===(t=null===(i=null===(n=null==e?void 0:e.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution)||void 0===t?void 0:t.progress.total)&&void 0!==a?a:null},f=function(e){var n,i,t,a;return(null===(a=null===(t=null===(i=null===(n=null==e?void 0:e.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution)||void 0===t?void 0:t.sharedHypeTrainDetails)||void 0===a?void 0:a.sharedProgress)||null};function g(e,n){return e.filter((function(e){return e.user.id!==n})).filter((function(e){return”REACHED”===e.channelProgress.allTimeHighState})).map((function(e){return e.user}))}var k,y=i(384131),S=i(27512),b=i(321501),_=(k=(0,i(739604).U)({name:”HypeTrainRoot”,category:”monetization”})).Available,x=k.Unavailable,C=i(500722),w=i(892517),N={instanceID:null,channelID:null,bannerState:y.SI.Inactive,bannerStateMetadata:null,data:void 0,isShared:!1,earnableEmoteRewards:[],lockedEmoteRewards:[],channelLogin:””,baselinePanelState:w.Z_.Default,pauseBaselinePanelCycle:function(){},resumeBaselinePanelCycle:function(){}},P=(0,s.q)(“HypeTrainContext”,N),D=P.context,T=(P.withContext,function(){return r.useContext(D)}),I=function(e){var n=e.channelID,i=e.channelLogin,r=(0,t.__rest)(e,[“channelID”,”channelLogin”]);return(0,a.jsx)(F,(0,t.__assign)({channelID:n,channelLogin:i},r))},F=function(e){var n,i,r,o,s,l,d=e.children,u=(0,t.__rest)(e,[“children”]),c=E(u),m=null;return c.loading||(m=u.channelID?u.channelLogin?c.data?(null===(n=c.data)||void 0===n?void 0:n.user)?(null===(r=null===(i=c.data)||void 0===i?void 0:i.user)||void 0===r?void 0:r.channel)?(null===(l=null===(s=null===(o=c.data)||void 0===o?void 0:o.user)||void 0===s?void 0:s.channel)||void 0===l?void 0:l.hypeTrain)?(0,a.jsx)(_,{}):(0,a.jsx)(x,{reason:”Failed to retrieve HypeTrain data”}):(0,a.jsx)(x,{reason:”Failed to retrieve Channel data”}):(0,a.jsx)(x,{reason:”Failed to retrieve User data”}):(0,a.jsx)(x,{reason:”Data is undefined”}):(0,a.jsx)(x,{reason:”ChannelLogin is undefined”}):null),(0,a.jsxs)(a.Fragment,{children:[m,(0,a.jsx)(D.Provider,{value:c,children:d})]})},E=function(e){var n,i,t=e.channelID,a=e.channelLogin,s=r.useRef((0,o.k3)()),k=(0,l.E_)({channelLogin:a,channelID:t}),_=k.data,x=k.loading,N=function(e){var n,i,t,a=e.channelID,o=e.data,s=r.useState(!1),l=s[0],v=s[1],p=r.useCallback((function(){v(!1)}),[]),h=null===(t=null===(i=null===(n=null==o?void 0:o.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution)||void 0===t?void 0:t.id,f=(0,d.Z)(h);return r.useEffect((function(){h!==f&&v(!1)}),[h,f,o]),(0,u.s)({topic:(0,m.tf)(a||””),skip:!a,onMessage:function(e){var n,i,t,r,s,l,d;if(e.type===c.PD.HypeTrainSharedChannelLeft){var u=e;if((null===(t=null===(i=null===(n=null==o?void 0:o.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution)||void 0===t?void 0:t.id)===u.data.id){var m=null===(d=null===(l=null===(s=null===(r=null==o?void 0:o.user)||void 0===r?void 0:r.channel)||void 0===s?void 0:s.hypeTrain.execution)||void 0===l?void 0:l.sharedHypeTrainDetails)||void 0===d?void 0:d.id,p=u.data.user.id;m===p&&p===a&&v(!0)}}}}),{currentChannelInitiatorLeft:l,clearInitiatorLeavingState:p}}({channelID:t,data:_}),P=N.currentChannelInitiatorLeft,D=N.clearInitiatorLeavingState,T=v({channelID:t,data:_}),I=T.nextMergeEvent,F=T.removeMergeEvent,E=function(e){var n,i,t,a,o,s,l,u,c,m,v=e.data,g=r.useRef(null),k=r.useRef(null),y=r.useRef(null),S=r.useRef(null),b=null===(t=null===(i=null===(n=null==v?void 0:v.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution)||void 0===t?void 0:t.progress.level.value,_=(0,d.Z)(b);r.useEffect((function(){b&&_&&b>_&&(g.current=k.current,k.current=f(v),y.current=S.current,S.current=h(v))}),[b,_,v]);var x=null===(l=null===(s=null===(o=null===(a=null==v?void 0:v.user)||void 0===a?void 0:a.channel)||void 0===o?void 0:o.hypeTrain)||void 0===s?void 0:s.execution)||void 0===l?void 0:l.endReason,C=(0,d.Z)(x);r.useEffect((function(){C!==x&&x===p.Yip.COMPLETED&&(g.current=k.current,k.current=f(v),y.current=S.current,S.current=h(v))}),[x,C,v]);var w=null===(m=null===(c=null===(u=null==v?void 0:v.user)||void 0===u?void 0:u.channel)||void 0===c?void 0:c.hypeTrain.execution)||void 0===m?void 0:m.id,N=(0,d.Z)(w);return r.useEffect((function(){w!==N&&(g.current=null,k.current=f(v),y.current=null,S.current=h(v))}),[w,N,v]),{previousLevelProgress:g,currentLevelProgress:k,previousLevelTotal:y,currentLevelTotal:S}}({data:_}),j=E.previousLevelProgress,L=E.currentLevelProgress,A=E.previousLevelTotal,R=E.currentLevelTotal,H=function(e){var n,i,t,a,o,s=e.data,l=r.useState(new Set),u=l[0],c=l[1],m=(0,d.Z)(s);r.useEffect((function(){var e,n,i,t,a,r,o,l,d,u,v,p=null===(i=null===(n=null===(e=null==s?void 0:s.user)||void 0===e?void 0:e.channel)||void 0===n?void 0:n.hypeTrain.execution)||void 0===i?void 0:i.id,h=null===(r=null===(a=null===(t=null==m?void 0:m.user)||void 0===t?void 0:t.channel)||void 0===a?void 0:a.hypeTrain.execution)||void 0===r?void 0:r.id;if(!m&&p){var f=g((null===(u=null===(d=null===(l=null===(o=s.user)||void 0===o?void 0:o.channel)||void 0===l?void 0:l.hypeTrain.execution)||void 0===d?void 0:d.sharedHypeTrainDetails)||void 0===u?void 0:u.sharedProgress)||[],null===(v=s.user)||void 0===v?void 0:v.id);c(new Set(f.map((function(e){return e.id}))))}else p!==h&&c(new Set)}),[s,m]);var v=null===(a=null===(t=null===(i=null===(n=null==s?void 0:s.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution)||void 0===t?void 0:t.sharedHypeTrainDetails)||void 0===a?void 0:a.sharedProgress;return{channelsWithNewRecords:(v?g(v,null===(o=s.user)||void 0===o?void 0:o.id):[]).filter((function(e){return!u.has(e.id)})),expireRecord:r.useCallback((function(e){c(new Set(u.add(e.id)))}),[u,c])}}({data:_}),O=H.channelsWithNewRecords,M=H.expireRecord,B=(0,y.z8)({data:_,currentChannelInitiatorLeft:P,clearInitiatorLeavingState:D,nextMergeEvent:I,removeMergeEvent:F,previousLevelProgress:j,currentLevelProgress:L,previousLevelTotal:A,currentLevelTotal:R,channelsWithNewRecords:O,expireRecord:M}),U=B.bannerState,V=B.bannerStateMetadata,z=function(e){var n,i,t,a,o=e.data,s=e.bannerState,l=(0,S.Z)(null!==(i=null===(n=null==o?void 0:o.user)||void 0===n?void 0:n.id)&&void 0!==i?i:null,!0).emoteMap,d=r.useMemo((function(){var e,n,i,t;return null!==(t=null===(i=null===(n=null===(e=null==o?void 0:o.user)||void 0===e?void 0:e.channel)||void 0===n?void 0:n.hypeTrain.execution)||void 0===i?void 0:i.progress.level.value)&&void 0!==t?t:0}),[o]),u=r.useMemo((function(){var e,n,i,t,a,r,l,d,u=void 0;if((0,y.M4)(s)?u=null===(t=null===(i=null===(n=null===(e=null==o?void 0:o.user)||void 0===e?void 0:e.channel)||void 0===n?void 0:n.hypeTrain)||void 0===i?void 0:i.approaching)||void 0===t?void 0:t.potentialRewards:(0,y.o4)(s)&&(u=null===(d=null===(l=null===(r=null===(a=null==o?void 0:o.user)||void 0===a?void 0:a.channel)||void 0===r?void 0:r.hypeTrain)||void 0===l?void 0:l.execution)||void 0===d?void 0:d.config.potentialRewards),u)return u.filter((function(e){var n;return e.value.type===p.Asq.EMOTE&&”HypeTrainEmoteReward”===e.value.__typename&&!!(null===(n=e.value.emote)||void 0===n?void 0:n.id)&&!!e.value.emote.token&&e.value.emote.id!==b.DJ})).sort((function(e,n){return n.level-e.level}))}),[null===(a=null===(t=null==o?void 0:o.user)||void 0===t?void 0:t.channel)||void 0===a?void 0:a.hypeTrain,s]),c=r.useMemo((function(){var e,n,i=[],t=[];if(!u)return{lockedEmoteRewards:i,earnableEmoteRewards:t};for(var a=0,r=0,o=u;r=d?i.unshift(s):s.level>=a&&(a=s.level,t.unshift(s))))}return{lockedEmoteRewards:i,earnableEmoteRewards:t}}),[d,l,u]);return c}({data:_,bannerState:U}),W=z.lockedEmoteRewards,G=z.earnableEmoteRewards,q=(0,w.UD)({bannerState:U,data:_,earnableEmoteRewardsLength:G.length,lockedEmoteRewardsLength:W.length}),Z=q.baselinePanelState,Q=q.pauseBaselinePanelCycle,K=q.resumeBaselinePanelCycle;return{instanceID:s.current,channelID:(null===(i=null===(n=null==_?void 0:_.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.id)||null,bannerState:U,bannerStateMetadata:V,data:_,isShared:(0,C.yM)(_),loading:x,lockedEmoteRewards:W,earnableEmoteRewards:G,channelLogin:a,baselinePanelState:Z,pauseBaselinePanelCycle:Q,resumeBaselinePanelCycle:K}}},941465:function(e,n,i){“use strict”;i.d(n,{W:function(){return l}});var t=i(474848),a=i(959340),r=i(246942),o=i.n(r),s=i(876531),l=function(e){var n=e.hypeTrain,i=e.location,r=e.hypeTrainTypeOverride,l={};”LeftNav”===i&&(l={marginTop:(null==n?void 0:n.isAllTimeHighTrain)?”0″:”0.25rem”});var d=”Regular”;return r?d=r:(null==n?void 0:n.isGoldenKappaTrain)?d=”GoldenKappa”:(null==n?void 0:n.isAllTimeHighTrain)?d=”AllTimeHigh”:(null==n?void 0:n.isTreasureTrain)?d=”Treasure”:(null==n?void 0:n.hypeTrainType)===s.Z6D.COMMUNITY?d=”Community”:(null==n?void 0:n.isSharedTrain)&&(d=”Shared”),(0,t.jsx)(a.P,{role:”img”,style:l,className:o()({“hype-train-icon”:!0,”hype-train-icon__train”:”AllTimeHigh”!==d,”hype-train-icon__trophy”:”AllTimeHigh”===d,”hype-train-icon__train–default”:”Regular”===d,”hype-train-icon__train–activity-feed”:”ActivityFeed”===d,”hype-train-icon__train–golden-kappa”:”GoldenKappa”===d,”hype-train-icon__train–treasure”:”Treasure”===d,”hype-train-icon__train–shared”:”Shared”===d,”hype-train-icon__train–community”:”Community”===d})})}},129438:function(e,n,i){“use strict”;i.d(n,{P:function(){return c},b:function(){return m}});var t=i(474848),a=i(959340),r=i(312663),o=i(914421),s=i(876531),l=i(859406),d=i(100563),u=i(941465),c=function(e){return e?(0,l.hw)(“Shared Hype Train ongoing, join now!”,”SharedHypeTrain_HypeTrainStreamInfo”):(0,l.hw)(“Invite to join a Shared Hype Train!”,”SharedHypeTrain_HypeTrainStreamInfo”)},m=function(e){var n=e.hypeTrain,i=e.location;if(!n)return null;var c=””;”LeftNav”===i&&(c=”1.9rem”);var m,v=(null==n?void 0:n.isSharedTrain)&&(0,d.L8)(),p=null==n?void 0:n.isGoldenKappaTrain,h=null==n?void 0:n.isTreasureTrain,f=null==n?void 0:n.hypeTrainType;return m=v&&p?(0,l.hw)(“Shared Golden Kappa Train”,”SharedHypeTrain_HypeTrainStreamInfo”):v&&f===s.Z6D.COMMUNITY?(0,l.hw)(“Shared Community Train • Level {hypeTrainLevel}”,{hypeTrainLevel:null==n?void 0:n.level},”SharedHypeTrain_HypeTrainStreamInfo”):v?(0,l.hw)(“Shared Hype Train • Level {hypeTrainLevel}”,{hypeTrainLevel:null==n?void 0:n.level},”SharedHypeTrain_HypeTrainStreamInfo”):p?(0,l.hw)(“Golden Kappa Train”,”SharedHypeTrain_HypeTrainStreamInfo”):h?(0,l.hw)(“Treasure Train • Level {hypeTrainLevel}”,{hypeTrainLevel:null==n?void 0:n.level},”SideNavCard”):f===s.Z6D.COMMUNITY?(0,l.hw)(“Community Train • Level {hypeTrainLevel}”,{hypeTrainLevel:null==n?void 0:n.level},”HypeTrainStreamInfo”):(0,l.hw)(“Hype Train • Level {hypeTrainLevel}”,{hypeTrainLevel:null==n?void 0:n.level},”SharedHypeTrain_HypeTrainStreamInfo”),(0,t.jsxs)(a.P,{display:”flex”,alignItems:”center”,height:c,gap:.5,overflow:”hidden”,ellipsis:!0,children:[(0,t.jsx)(u.W,{hypeTrain:n,location:i}),(0,t.jsx)(r.N,{fontSize:o.Z4.Size6,color:”alt-2″,lineHeight:”heading”,ellipsis:!0,children:m})]})}},621241:function(e,n,i){“use strict”;i.d(n,{Qd:function(){return r},wb:function(){return o},wy:function(){return s}});var t=i(876531),a=i(37434),r=function(e,n){var i=(null==e?void 0:e.sharedHypeTrainDetails)?(0,a.vP)(e,n):null==e?void 0:e.progress.allTimeHighState;return null!=i?i:t.Q8_.NONE},o=function(e,n){return r(e,n)===t.Q8_.REACHED},s=function(e,n){var i=(null==e?void 0:e.sharedHypeTrainDetails)?(0,a.Jq)(e,n):null==e?void 0:e.allTimeHigh;return null!=i?i:void 0}},37434:function(e,n,i){“use strict”;i.d(n,{Jq:function(){return l},MP:function(){return r},q:function(){return s},vP:function(){return a},xt:function(){return o}});var t=i(876531),a=function(e,n){var i,t;return null===(t=null===(i=null==e?void 0:e.sharedHypeTrainDetails)||void 0===i?void 0:i.sharedProgress.find((function(e){return e.user.id===n})))||void 0===t?void 0:t.channelProgress.allTimeHighState},r=function(e,n){return a(e,n)===t.Q8_.REACHED},o=function(e,n){var i,t;return!!(null===(t=null===(i=null==e?void 0:e.sharedHypeTrainDetails)||void 0===i?void 0:i.sharedProgress.find((function(e){return e.user.id===n})))||void 0===t?void 0:t.channelProgress.total)},s=function(e,n){var i,t;return null===(t=null===(i=null==e?void 0:e.sharedHypeTrainDetails)||void 0===i?void 0:i.sharedConductors.find((function(e){return e.user.id===n})))||void 0===t?void 0:t.conductors},l=function(e,n){var i,t,a;return null!==(a=null===(t=null===(i=null==e?void 0:e.sharedHypeTrainDetails)||void 0===i?void 0:i.sharedAllTimeHighRecords.find((function(e){return e.user.id===n})))||void 0===t?void 0:t.channelAllTimeHigh)&&void 0!==a?a:void 0}},384131:function(e,n,i){“use strict”;i.d(n,{EQ:function(){return g},M4:function(){return p},SI:function(){return t},o4:function(){return f},z8:function(){return k}});var t,a=i(727234),r=i(726561),o=i(225745),s=i(917705),l=i(296540),d=i(876531),u=i(621241),c=i(500722),m=i(214171);!function(e){e.Inactive=”INACTIVE”,e.Approaching=”APPROACHING”,e.Kickoff=”KICKOFF”,e.Starting=”STARTING”,e.Baseline=”BASELINE”,e.FastMode=”FASTMODE”,e.PreLevelUp=”PRELEVELUP”,e.LevelUp=”LEVELUP”,e.ATHReached=”ATHREACHED”,e.Merging=”MERGING”,e.Leaving=”LEAVING”,e.OtherChannelATHReached=”OTHER_CHANNEL_ATH”,e.Contributions=”CONTRIBUTIONS”,e.Ending=”ENDING”,e.RewardsDistributing=”REWARDS_DISTRIBUTING”,e.TreasureTrainDiscountReached=”TT_DISCOUNT_REACHED”,e.CommunityTrainRewardReached=”CM_EMOTES_UNLOCKED”}(t||(t={}));var v=new Set([t.Approaching,t.Kickoff]),p=function(e){return v.has(e)},h=new Set([t.Starting,t.Baseline,t.FastMode,t.PreLevelUp,t.LevelUp,t.ATHReached,t.TreasureTrainDiscountReached,t.Ending,t.RewardsDistributing,t.Leaving,t.Merging,t.Contributions,t.OtherChannelATHReached,t.CommunityTrainRewardReached]),f=function(e){return h.has(e)},g=function(e){return e===t.Leaving},k=function(e){var n,i,v,p,h,f,g,k,S,b=e.data,_=e.currentChannelInitiatorLeft,x=e.clearInitiatorLeavingState,C=e.nextMergeEvent,w=e.removeMergeEvent,N=e.previousLevelProgress,P=e.currentLevelProgress,D=e.previousLevelTotal,T=e.currentLevelTotal,I=e.channelsWithNewRecords,F=e.expireRecord,E=(0,a.Z)(b),j=l.useState((function(){return y(b)})),L=j[0],A=j[1],R=l.useState(null),H=R[0],O=R[1],M=(0,a.Z)(L),B=(0,a.Z)(H),U=function(e){“string”==typeof e?(A(e),O(null)):(A(e.type),O(e))},V=l.useRef(null),z=l.useRef(null),W=l.useState(!1),G=W[0],q=W[1],Z=l.useState(!1),Q=Z[0],K=Z[1],Y=l.useState(!1),X=Y[0],$=Y[1],J=l.useCallback((function(){if(!b)return t.Inactive;var e=function(e){var n,i,a,r,o,s,l,v,p,h,f,g=null===(i=null===(n=null==E?void 0:E.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution,k=null===(r=null===(a=null==b?void 0:b.user)||void 0===a?void 0:a.channel)||void 0===r?void 0:r.hypeTrain.execution,y=(0,m.l)(k);return g&&!g.sharedHypeTrainDetails&&(null==k?void 0:k.sharedHypeTrainDetails)&&k.sharedHypeTrainDetails.sharedProgress.length<2?t.Starting:k?(0,c.$m)(b)?_?(x(),{type:t.Leaving,progress:k.progress}):C?(w(C.uuid),{type:t.Merging,mergeEvent:C}):!Q&&k.isTreasureTrain&&(null===(p=k.treasureTrainDetails)||void 0===p?void 0:p.status)===d.lHC.REACHED&&(K(!0),g&&e!==t.Starting)?t.TreasureTrainDiscountReached:!X&&y===d.Z6D.COMMUNITY&&(null===(h=k.variantTrainDetails)||void 0===h?void 0:h.status)===d.EMM.REACHED&&($(!0),g&&e!==t.Starting)?t.CommunityTrainRewardReached:g&&g.progress.level.value-1&&(V.current=setTimeout((function(){return ee.current()}),p))}}),[L,M,H,B,ee,null===(i=null===(n=null==b?void 0:b.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution,null===(v=null==b?void 0:b.user)||void 0===v?void 0:v.id]),l.useEffect((function(){var e,n,i,a,r,o,l,d,u;L===t.Approaching?z.current&&(null===(i=null===(n=null===(e=null==E?void 0:E.user)||void 0===e?void 0:e.channel)||void 0===n?void 0:n.hypeTrain.approaching)||void 0===i?void 0:i.expiresAt)===(null===(o=null===(r=null===(a=null==b?void 0:b.user)||void 0===a?void 0:a.channel)||void 0===r?void 0:r.hypeTrain.approaching)||void 0===o?void 0:o.expiresAt)||(z.current&&(clearTimeout(z.current),z.current=null),!(null===(u=null===(d=null===(l=null==b?void 0:b.user)||void 0===l?void 0:l.channel)||void 0===d?void 0:d.hypeTrain.approaching)||void 0===u?void 0:u.expiresAt)||(0,s.isPast)(b.user.channel.hypeTrain.approaching.expiresAt)?ee.current():z.current=setTimeout((function(){return ee.current()}),(0,s.differenceInMilliseconds)(b.user.channel.hypeTrain.approaching.expiresAt,new Date))):z.current&&(clearTimeout(z.current),z.current=null)}),[L,null===(f=null===(h=null===(p=null==b?void 0:b.user)||void 0===p?void 0:p.channel)||void 0===h?void 0:h.hypeTrain.approaching)||void 0===f?void 0:f.expiresAt,ee,null===(S=null===(k=null===(g=null==E?void 0:E.user)||void 0===g?void 0:g.channel)||void 0===k?void 0:k.hypeTrain.approaching)||void 0===S?void 0:S.expiresAt]),(0,o.i)((function(){var e,n;clearTimeout(null!==(e=V.current)&&void 0!==e?e:-1),clearTimeout(null!==(n=z.current)&&void 0!==n?n:-1)})),{bannerState:L,bannerStateMetadata:H}},y=function(e){var n,i,a;if(e){if((0,c.B$)(e))return t.Approaching;if((0,c.$m)(e))return(null===(a=null===(i=null===(n=e.user)||void 0===n?void 0:n.channel)||void 0===i?void 0:i.hypeTrain.execution)||void 0===a?void 0:a.isFastMode)?t.FastMode:t.Baseline}return t.Inactive}},178297:function(e,n,i){“use strict”;i.d(n,{r:function(){return m}});var t=i(494693),a=i(859406),r=i(29896),o=i(444382),s=i.n(o),l=i(887009),d=i.n(l),u=i(285607),c=function(e,n){var i,t=(null==e?void 0:e.activeHypeTrainStatuses)||(null==e?void 0:e.allActiveHypeTrainStatuses);if((null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0)>0){var a=(null==t?void 0:t.map((function(e){var n;return{channelID:(null===(n=e.channel)||void 0===n?void 0:n.id)||””,level:e.level,isGoldenKappaTrain:e.isGoldenKappaTrain,isAllTimeHighTrain:e.isAllTimeHighTrain,isTreasureTrain:e.isTreasureTrain,isSharedTrain:e.isSharedTrain,hypeTrainType:e.hypeTrainType}})))||[];return{hypeTrainStatuses:a,loading:n}}return{hypeTrainStatuses:null,loading:n}},m=function(e,n){var i;void 0===n&&(n={});var o=n.additionalCondition,l=void 0===o||o,m=Array.isArray(e)&&e.length>0?”string”==typeof e[0]?e:(0,t.jP)(e.map((function(e){return e.user.id}))):[],v=l&&a.Mv.getAssignment(“left-nav-hype-train-freshness-rollout”,”boolean”,!1),p=function(e,n){void 0===n&&(n=!0);var i,t=(0,r.IT)(s(),{variables:{channelIDs:e},pollInterval:(i=a.Mv.getAssignment(“railroad-interval-milliseconds”,”integer”,21e4),(0,u.S)(i)),skip:!e||0===e.length||!n}),o=t.data,l=t.loading;return c(o,l)}(m,v),h=v?(null===(i=null==p?void 0:p.hypeTrainStatuses)||void 0===i?void 0:i.map((function(e){return e.channelID})))||[]:”string”==typeof e[0]?e:(0,t.jP)(e.map((function(e){if(e.content.hasHypeTrain)return e.user.id}))),f=function(e,n){void 0===n&&(n=!0);var i=(0,r.IT)(d(),{variables:{channelIDs:e},skip:!e||0===e.length||!n}),t=i.data,a=i.loading;return c(t,a)}(h,l&&!v);return{activeHypeTrains:v?p:f,onlineChannelsWithHypeTrains:h}}},158253:function(e,n,i){“use strict”;i.d(n,{Cs:function(){return s},LE:function(){return c},TK:function(){return p},Up:function(){return r},X7:function(){return o},h7:function(){return v},t9:function(){return m}});var t,a,r,o,s,l,d=i(859406),u=i(501909),c=”hype-train”;function m(e){var n={channel_id:e.channel_id,hype_train_level:(0,u.km)(e.hype_train_level),animation_type:e.animation_type,train_id:e.train_id,channel_treatment:e.channel_treatment};d.E5.track(“hype_train_celebration_impression”,n)}function v(e){e.channel_id&&d.E5.track(“hype_train_approaching_impression”,e)}function p(e){var n=d.Zn.get(“hype_train_availability_sample_rate”,0);Math.random()5:(e.goal||0)>5)}},214171:function(e,n,i){“use strict”;i.d(n,{l:function(){return a}});var t=i(876531),a=function(e){var n;return”CommunityTrainDetails”===(null===(n=null==e?void 0:e.variantTrainDetails)||void 0===n?void 0:n.__typename)?t.Z6D.COMMUNITY:t.Z6D.REGULAR}},912771:function(e,n,i){“use strict”;i.d(n,{Zc:function(){return r}});var t=i(917705),a=.5;function r(e){var n=(0,t.differenceInMilliseconds)(e,new Date)-1e3*a;return Math.max(0,n/1e3)}},22925:function(e,n,i){“use strict”;i.d(n,{Y:function(){return d}});var t=i(331635),a=i(474848),r=i(296540),o=i(859406),s=i(844322),l=function(e){function n(n){var i=e.call(this,n)||this;return i.contextForChildren=function(){return(0,t.__assign)((0,t.__assign)({},i.config),{latencyTracking:i.props.latencyTracking})},o.vF.debug(“New latency config”,i.props),i.config={latencyTrackingConfig:{isNonCritical:!!n.isNonCritical}},i}return(0,t.__extends)(n,e),n.prototype.render=function(){return(0,a.jsx)(s.RH.Provider,{value:this.contextForChildren(),children:this.props.children||null})},n.displayName=”LatencyTrackingConfig”,n.defaultProps={isNonCritical:!0},n}(r.Component),d=(0,s.Le)((function(e){return e}))(l)},841502:function(e,n,i){“use strict”;i.d(n,{Y:function(){return t}});var t=(0,i(296540).createRef)()},165028:function(e,n,i){“use strict”;i.d(n,{JQ:function(){return o},M2:function(){return r}});var t=i(296540),a={asin:””,asins:[“”],campaignSettings:void 0,channelId:null,close:function(){},confirmOrder:function(){},confirmOrderData:void 0,currentStep:”product_details”,error:void 0,getProductSummaries:function(){},isLoading:!1,isOpen:!1,isRefetching:!1,isLongRefetch:!1,liveShoppingSessionId:””,marketplace:null,next:function(){},previewOrder:function(){},previewOrderData:void 0,previous:function(){},productDetailsData:void 0,productSummariesData:void 0,refetchProductDetails:void 0,setAsin:function(e){},trackClick:function(e){},trackingId:null},r=(0,t.createContext)(a);function o(){return(0,t.useContext)(r)}r.displayName=”LiveShoppingContext”},809129:function(e,n,i){“use strict”;i.d(n,{$7:function(){return o},Fb:function(){return t},Q0:function(){return s},oH:function(){return r},pA:function(){return l},tA:function(){return a}});var t={AE:”ae”,AU:”com.au”,BE:”com.be”,BR:”com.br”,CA:”ca”,CL:”cl”,CN:”cn”,CO:”com.co”,DE:”de”,ES:”es”,EG:”eg”,FR:”fr”,ID:”co.id”,IE:”ie”,IN:”in”,IT:”it”,JP:”co.jp”,MX:”com.mx”,NG:”com.ng”,NL:”nl”,PL:”pl”,RU:”ru”,SA:”sa”,SE:”se”,SG:”sg”,TH:”co.th”,TR:”tr”,UK:”co.uk”,US:”com”,ZA:”co.za”},a=700,r=560,o=424,s=.6,l={ABOUT_THIS_ITEM:”about_this_item”,BACK:”back”,BACK_TO_ITEM:”back_to_item”,BUY_WITH_AMAZON:”buy_with_amazon”,CONDITIONS_OF_USE:”conditions_of_use”,CLOSE:”close”,LOGIN_WITH_AMAZON:”login_with_amazon”,MULTI_PRODUCT:”multi_product”,PLACE_ORDER:”place_order”,PRIVACY_NOTICE:”privacy_notice”,RETURN_POLICY:”return_policy”,UPDATE_ADDRESS:”update_address”,UPDATE_PAYMENT:”update_payment”,VIEW_ALL_PRODUCTS:”view_all_products”,VIEW_FULL_DETAILS:”view_full_details”,VIEW_FULL_ORDER:”view_full_order”}},601858:function(e,n,i){“use strict”;i.d(n,{HR:function(){return o},L$:function(){return s},Tm:function(){return l}});var t=i(859406),a=i(809129),r=function(e){return{addresses:”a/addresses”,payments:”cpe/yourpayments/wallet”,help:”gp/help/customer/display.html”,orders:”your-orders”}[e||””]||””};function o(e,n){var i=(0,t.hw)(“Date unavailable”,”LiveShoppingOrderPreview”);try{var a=parseInt(e,10);if(isNaN(a))return i;var r=new Date(1e3*a);return isNaN(r.getTime())?i:r.toLocaleDateString(n,{weekday:”long”,month:”long”,day:”numeric”})}catch(e){return i}}var s=function(){return Math.random().toString(36).substring(2,15)};function l(e,n){var i=r(n);if(!e)return”https://www.amazon.com/”.concat(i);var t=a.Fb[e];return”https://www.amazon.”.concat(t,”/”).concat(i)}},10453:function(e,n,i){“use strict”;i.d(n,{X:function(){return o}});var t=i(29896),a=i(764620),r=i.n(a),o=function(e){var n,i,a,o,s,l,d,u,c,m=(0,t.IT)(r(),{variables:{channelLogin:e}}),v=m.data,p=m.loading;return{isEligible:!(p||!(null===(i=null===(n=null==v?void 0:v.user)||void 0===n?void 0:n.self)||void 0===i?void 0:i.subscriptionBenefit)||(null===(s=null===(o=null===(a=null==v?void 0:v.user)||void 0===a?void 0:a.self)||void 0===o?void 0:o.banStatus)||void 0===s?void 0:s.isPermanent)||null!==(c=null===(u=null===(d=null===(l=null==v?void 0:v.user)||void 0===l?void 0:l.self)||void 0===d?void 0:d.banStatus)||void 0===u?void 0:u.expiresInMs)&&void 0!==c&&c),loading:p}}},93344:function(e,n,i){“use strict”;i.d(n,{CC:function(){return g},YL:function(){return f}});var t=i(474848),a=i(959340),r=i(463201),o=i(941084),s=i(26538),l=i(564368),d=i(296540),u=i(859406),c=i(148223),m=i(166012),v=i(747036),p=i(449139),h=i(942136),f=4,g=function(e){var n=e.channelLogin,i=e.channelID,g=e.isLowerWatch,y=e.displayName,S=e.dismissBanner,b=e.currentMonth;d.useEffect((function(){(0,h.U5)({source:v.kL.ChannelPage,recapSessionId:(0,c.k3)()}),(0,p.xA)(i)}),[i]);var _=(new Date).getDate()<=f+7;return(0,t.jsx)(a.P,{margin:g?{bottom:2,left:2,right:1,top:1}:{bottom:2},children:(0,t.jsx)(r.P,{orientation:r.F.Row,message:(0,t.jsx)(o.k,{title:k(y,b),description:(0,u.hw)("Let's see what you made happen this month as a subscriber of {channelLogin}",{channelLogin:y},"RecapCallout"),inline:!0,pill:_?{label:"NEW",type:s.y.Brand}:void 0}),actions:(0,t.jsx)(l.$n,{targetBlank:!0,linkTo:(0,m.VV)("/recaps/".concat(n)),children:(0,u.hw)("Show Me","RecapCallout")}),closeButton:{"aria-label":"Close",onClick:S}})})},k=function(e,n){switch(n){case 0:return(0,u.hw)("{displayName} December Recap",{displayName:e},"RecapCallout");case 1:return(0,u.hw)("{displayName} January Recap",{displayName:e},"RecapCallout");case 2:return(0,u.hw)("{displayName} February Recap",{displayName:e},"RecapCallout");case 3:return(0,u.hw)("{displayName} March Recap",{displayName:e},"RecapCallout");case 4:return(0,u.hw)("{displayName} April Recap",{displayName:e},"RecapCallout");case 5:return(0,u.hw)("{displayName} May Recap",{displayName:e},"RecapCallout");case 6:return(0,u.hw)("{displayName} June Recap",{displayName:e},"RecapCallout");case 7:return(0,u.hw)("{displayName} July Recap",{displayName:e},"RecapCallout");case 8:return(0,u.hw)("{displayName} August Recap",{displayName:e},"RecapCallout");case 9:return(0,u.hw)("{displayName} September Recap",{displayName:e},"RecapCallout");case 10:return(0,u.hw)("{displayName} October Recap",{displayName:e},"RecapCallout");case 11:return(0,u.hw)("{displayName} November Recap",{displayName:e},"RecapCallout");default:return(0,u.hw)("{displayName} Recap",{displayName:e},"RecapCallout")}}},942136:function(e,n,i){"use strict";i.d(n,{Kk:function(){return o},U5:function(){return r}});var t=i(859406),a="recap_tracking_data",r=function(e){t.IG.set(a,e)},o=function(){return t.IG.getOptional(a)}},449139:function(e,n,i){"use strict";i.d(n,{T7:function(){return s},YZ:function(){return o},pt:function(){return l},xA:function(){return d}});var t=i(859406),a=i(942136),r=i(747036),o=function(e,n,i){if((n===r.Nz.Open||n===r.Nz.SharePageShown)&&e||i&&"[]"!==i){var o=(0,a.Kk)()||{},s=o.recapSessionId,l=o.source;t.x2.tracking.__track_SSRMigrationFixme("monthly_recap_modal_session",(0,r.SY)(e||"",s||"",l||"",n,i))}},s=function(e,n){var i;if(n&&n.length>0)for(var r=(0,a.Kk)()||{},o=r.recapSessionId,s=r.source,l=1,d=0,u=n;d0&&(t.x2.tracking.__track_SSRMigrationFixme(“monthly_recap_modal_emote”,{channel_id:e||””,recapSessionId:o||””,source:s||””,emote_id:(null===(i=c.emote)||void 0===i?void 0:i.id)||””,emote_usage:parseInt(c.totalUsage,10),emote_rank:l}),l+=1)}},l=function(e,n){if(n&&n.length>0)for(var i=(0,a.Kk)()||{},r=i.recapSessionId,o=i.source,s=0,l=n;s_,s=o?r*_:i.width;return{hasBlackFill:o,scaleVideo:window.innerWidth<768?b.F/r:Math.max(C/s,C/n.width,n.width/s)||1,videoWidth:s,chatCollapsed:a}}function P(e){var n=e.mainRef.getBoundingClientRect(),i=e.contentRef.getBoundingClientRect(),t=i.top-n.top,a=i.left-n.left,r=N(e.rightColumnExpanded,n,i,e.options.channelWatchReservedHeight),o=r.hasBlackFill,s=r.chatCollapsed;return{top:t,left:a,position:"absolute",width:null!==e.contentRef.querySelector(".channel-page__video-player--with-border")?i.width-20:i.width,maxHeight:e.options.videoPlayerMaxHeightStyleValue,overflow:"hidden",zIndex:1,height:"auto",transition:"0.5s transform",transformOrigin:s||o?"center top":"left top",transform:"scale(1)"}}function D(e){var n="0";return!e.options.isShowingWatchPartyInMain||e.rightColumnPositionedBeside&&e.rightColumnExpanded||(n="-34rem"),(0,t.__assign)((0,t.__assign)({},P(e)),{position:"fixed",top:g.k3,insetInlineStart:void 0,insetInlineEnd:n,width:"34rem",maxWidth:void 0,maxHeight:void 0,zIndex:1e3})}function T(){var e=(0,o.d4)((function(e){return e.ui.theatreModeEnabled})),n=(0,p.H)().element,i=(0,o.wA)(),t=r.useRef(e);r.useEffect((function(){t.current=e}),[e]);var a=r.useCallback((function(){e&&!n()&&i((0,f.lq)())}),[i,n,e]);return(0,h.I)(a),r.useEffect((function(){return function(){t.current&&i((0,f.lq)())}}),[i]),null}var I,F=(0,o.Ng)((function(e){return{firstPageLoaded:e.session.firstPageLoaded,sideNavCollapsed:!e.ui.sideNavExpanded,rightNavCollapsed:!e.ui.rightColumnExpanded,theatreModeEnabled:e.ui.theatreModeEnabled,channelHomeLive:e.ui.channelHomeLive,channelHomeCarousel:e.ui.channelHomeCarousel,currentUser:e.session.user,rightColumnPositionedBeside:e.ui.rightColumnPositionedBeside,rightColumnExpanded:e.ui.rightColumnExpanded,stickyFooterExpanded:e.ui.stickyFooterExpanded}}))((function(e){var n=w(e),i=v()("persistent-player",{"persistent-player__border--mini":e.mini,"persistent-player--theatre":n}),o=n?"theatre":"";e.mini&&(o="mini");var s=r.useMemo((function(){if(e.mini)return{onClickDismiss:e.onClickDismiss,onClickExpand:e.onClickExpand,title:e.options.miniPlayerTitle}}),[e.mini,e.onClickDismiss,e.onClickExpand,e.options.miniPlayerTitle]),l=r.useMemo((function(){return(0,t.__assign)((0,t.__assign)({},e.options.playerProps),{type:e.mini?y.C.SiteMini:e.options.playerProps.type,behaviors:(0,t.__assign)((0,t.__assign)({},e.options.playerProps.behaviors),{disableKeyboardShortcuts:e.mini,enablePlaySessionTagTracking:!0,enableSoundtrackByTwitch:!e.mini,exclusivePlayback:!0,sharedViewershipTracking:!0,mini:s,playerContainerMaxHeightStyleValue:e.options.videoPlayerMaxHeightStyleValue,showMiniToggleSettings:!0,showOfflineChannelNotificationPrompt:!0,offlineChannelNotificationPromptLoginAction:k.vS.Modal})})}),[s,e.mini,e.options.playerProps,e.options.videoPlayerMaxHeightStyleValue]),m=function(e){var n;if(w(e)){var i={position:"fixed",insetInlineStart:0,top:0,zIndex:3e3,transform:"scale(1)"};return!e.mini&&e.options.isShowingWatchPartyInMain?(0,t.__assign)((0,t.__assign)({},D(e)),{top:0,zIndex:3e3}):e.rightNavCollapsed?(0,t.__assign)((0,t.__assign)({},i),{height:"100%",width:"100vw"}):e.rightColumnPositionedBeside?(0,t.__assign)((0,t.__assign)({},i),{maxHeight:"100vh",height:"100%",width:"calc(100% - ".concat("34rem",")")}):(0,t.__assign)((0,t.__assign)({},i),{height:"56.2vw",width:"100vw"})}if(e.channelHomeLive){var a=e.mainRef.getBoundingClientRect(),r=(m=e.contentRef.getBoundingClientRect()).left-a.left,o=N(e.rightColumnExpanded,a,m,e.options.channelWatchReservedHeight),s=o.hasBlackFill,l=o.scaleVideo,d=o.videoWidth,u=o.chatCollapsed,c=!u&&s?"".concat("rtl"===document.dir?"-":"","17rem"):0;return{top:m.top-a.top,insetInlineStart:r,position:"absolute",maxHeight:s?d/_:"90vh",overflow:"hidden",zIndex:1,transition:"0.5s transform",transformOrigin:u||s?"center top":"left top",transform:"translateX(".concat(c,") scale(").concat(l,")")}}if(e.channelHomeCarousel){var m;return a=e.mainRef.getBoundingClientRect(),r=(m=e.contentRef.getBoundingClientRect()).left-a.left,{top:m.top-a.top,width:m.width,height:m.height,left:r,position:"absolute",overflow:"hidden",zIndex:1}}if(e.mini){var v="rtl"===document.dir?"right":"left",p=(a=e.mainRef.getBoundingClientRect(),"left"===v?a.left:window.innerWidth-a.right);return(n={position:"fixed",width:"28rem",height:"15.75rem"})[v]=p,n.bottom=0,n.margin=e.stickyFooterExpanded?"1rem 1rem 7rem":"1rem",n.zIndex=1e3,n}return e.options.isShowingWatchPartyInMain?D(e):P(e)}(e);return(0,a.jsx)(d.S,{elevation:e.mini?5:0,className:v()({"persistent-player__border--mini":e.mini}),overflow:e.mini?u.nE.Hidden:void 0,children:(0,a.jsxs)("div",{className:i,style:m,"data-a-player-state":o,children:[(0,a.jsx)(c.j$,{children:(0,a.jsx)(S.VideoPlayerDesktopWeb,(0,t.__assign)({},l))}),(0,a.jsx)(T,{})]})})})),E=function(e){function n(n){var i=e.call(this,n)||this;return i.logger=s.vF.withCategory("PersistentPlayerRoot"),i.onClickExpand=function(){i.state.options&&(i.state.overrides&&i.state.overrides.onMiniPlayerExpand?i.state.overrides.onMiniPlayerExpand():i.props.navigate(i.state.options.miniPlayerContentRoute))},i.onClickDismiss=function(){i.state.options&&(i.state.overrides&&i.state.overrides.onMiniPlayerDismiss?i.state.overrides.onMiniPlayerDismiss():i.destroyPlayer())},i.state={isError:!1,mini:!1},I&&i.logger.warn("attempting to create a second instance of the Persistent Player Root. There should only be one in , use instead.”),I=i,i}return(0,t.__extends)(n,e),n.prototype.componentDidCatch=function(e,n){var i=this;this.setState({isError:!0},(function(){s.x2.stats.recordComponentError(“PersistentPlayerRoot”),i.logger.errorAndReport(e,”A unhandled exception occurred in the component hierarchy”,{info:n})}))},n.prototype.render=function(){return!this.state.isError&&this.state.options&&this.state.contentRef&&this.props.mainRef?(0,a.jsx)(F,{options:this.state.options,contentRef:this.state.contentRef,mainRef:this.props.mainRef,mini:this.state.mini,forceRender:this.state.forcePresentationRender,onClickExpand:this.onClickExpand,onClickDismiss:this.onClickDismiss}):null},n.prototype.destroyPlayer=function(e){var n=this;this.setState({mini:!1,options:void 0,overrides:void 0,contentRef:void 0},(function(){n.props.stopPersistingPlayer(),e&&e()}))},n.prototype.requestVideoContent=function(e){this.setState((function(n){var i=!(0,o.bN)(n.contentRef,e.ref),t=!(0,o.bN)(n.options,e.options),a=!(0,o.bN)(n.overrides,e.overrides);return i||t||a?{contentRef:e.ref,options:e.options,overrides:e.overrides}:null}),e.onCompletion)},n.prototype.transitionToMiniPlayer=function(){this.setState({mini:!0}),this.props.beginPersistingPlayer()},n.prototype.transitionToAnchoredPlayer=function(){this.setState({mini:!1}),this.props.stopPersistingPlayer()},n.prototype.reposition=function(){var e=this.state.forcePresentationRender;this.setState({forcePresentationRender:e?e+1:1})},n}(r.Component),j=(0,l.y)(E)},786268:function(e,n,i){“use strict”;i.d(n,{Y:function(){return d}});var t=i(331635),a=i(296540),r=i(415044),o=i(859406),s=i(152386);var l=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.playerLoaded=!1,n}return(0,t.__extends)(n,e),n.prototype.componentDidMount=function(){this.maybeLoadPlayer(this.props)},n.prototype.componentDidUpdate=function(){this.maybeLoadPlayer(this.props)},n.prototype.render=function(){return null},n.prototype.maybeLoadPlayer=function(e){this.playerLoaded||(this.shouldPreload()||e.firstPageLoaded)&&(this.playerLoaded=!0,(0,s.F)())},n.prototype.shouldPreload=function(){var e=window.location.pathname.substr(1),n=o.x2.dynamicSettings.get(“player_routes_startswith”,[“bits-checkout/”,”checkout/”,”collections/”,”communities/”,”dashboard/”,”directory/”,”event/”,”prime/”,”products/”,”settings/”,”store/”,”subs/”]),i=o.x2.dynamicSettings.get(“player_routes_exact”,[“activate”,”bits”,”bits-checkout”,”directory”,”following”,”popout”,”prime”,”store”,”subs”]);return!n.some((function(n){return e.startsWith(n)}))&&!i.includes(e)},n}(a.Component),d=(0,r.Ng)((function(e){return{firstPageLoaded:e.session.firstPageLoaded}}))(l)},989096:function(e,n,i){“use strict”;i.d(n,{R:function(){return o},e:function(){return s}});var t=i(891975),a=i(296540),r=i(713096);function o(e){var n=(0,a.useContext)(r.h9),i=(0,a.useRef)({});(0,a.useEffect)((function(){(function(e,n){if(!e||!n)return!1;var i=Object.keys(e);if(i.length!==Object.keys(n).length)return!0;return i.some((function(i){return e[i]!==n[i]}))})(i.current,e)&&(n.setRootScrollableProps(e),i.current=e)}),[n,e]),(0,t.S)((function(){return n.resetRootScrollableProps}))}function s(e){return o(e),null}},713096:function(e,n,i){“use strict”;i.d(n,{dr:function(){return h},h9:function(){return p}});var t=i(331635),a=i(474848),r=i(959340),o=i(914421),s=i(246942),l=i.n(s),d=i(296540),u=i(503988),c=i(844023),m=i(859406),v=(0,i(265827).q)(“RootScrollable”,{setRootScrollableProps:function(){m.vF.warn(“Can’t set root scrollable props from outside a root scrollable context.”)},resetRootScrollableProps:function(){m.vF.warn(“Can’t reset root scrollable props from outside a root scrollable context.”)}}),p=v.context,h=(v.withContext,function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={scrollableProps:{}},n.currentPath=n.props.location.pathname,n.contextForChildren={setRootScrollableProps:function(e){n.setState({scrollableProps:e})},resetRootScrollableProps:function(){n.setState({scrollableProps:{}})}},n.onHistoryChange=function(e){!n.scrollableAreaRef||e.action===u.rc.Pop||e.location.pathname===n.currentPath||n.state.scrollableProps&&n.state.scrollableProps.suppressScrollToTop||n.scrollableAreaRef.scrollToTop(),n.currentPath=e.location.pathname},n.setScrollableAreaRef=function(e){return n.scrollableAreaRef=e},n}return(0,t.__extends)(n,e),n.prototype.componentDidMount=function(){this.props.subscribe(this.onHistoryChange)},n.prototype.render=function(){var e=this.props.playerIsPersisting&&this.state.scrollableProps&&this.state.scrollableProps.addPaddingWhenPlayerIsPersisting,n=l()({“root-scrollable”:!this.state.scrollableProps.className,”root-scrollable–persisting-player”:e},this.state.scrollableProps.className||””),i=(0,t.__assign)((0,t.__assign)({contentClassName:”root-scrollable__content”},this.state.scrollableProps),{className:n});return(0,a.jsx)(p.Provider,{value:this.contextForChildren,children:(0,a.jsx)(c.Vq,(0,t.__assign)({},i,{“data-a-target”:”root-scroller”,ref:this.setScrollableAreaRef,children:(0,a.jsx)(r.P,{position:o.yX.Relative,fullWidth:!0,className:”root-scrollable__wrapper”,ref:this.props.contentRefDelegate,children:this.props.children})}))})},n}(d.Component))},570604:function(e,n,i){“use strict”;i.d(n,{Ey:function(){return h},Fz:function(){return E},Ke:function(){return L},Ko:function(){return R},Ly:function(){return _},PX:function(){return g},Uc:function(){return I},XX:function(){return u},Xi:function(){return d},Xj:function(){return N},Y:function(){return M},aO:function(){return P},bt:function(){return A},dZ:function(){return D},fK:function(){return q},gZ:function(){return m},ix:function(){return G},kB:function(){return w},kq:function(){return H},lb:function(){return V},lu:function(){return j},lw:function(){return T},ms:function(){return k},n9:function(){return p},n_:function(){return c},oj:function(){return F},qL:function(){return v},sH:function(){return Z},sy:function(){return b},tv:function(){return W},tx:function(){return y},uO:function(){return x},zO:function(){return S},zP:function(){return f},zb:function(){return l}});var t=i(859406),a=i(876531),r=i(397837),o=i(124082),s=i(971209),l=”open_invite”,d=”enable_shared_chat”,u=”disable_av”,c=”track_chat_command”,m=”shared_chat_already_active_host”,v=”shared_chat_already_active_guest”,p=”shared_chat_not_enabled”,h=”host_not_live”,f=”host_shield_mode_on”,g=”unexpected_error”,k=function(e,n){(0,o.m)({channelID:n,userID:n,userType:r.D.Broadcaster,body:”/sharedchat”,errorType:e})},y=function(e){(0,o.B)({channelID:e,userID:e,userType:r.D.Broadcaster,chatCommand:”sharedchat”,args:””})},S=function(e,n,i){t.E5.track(“shared_chat_client_start_session_success”,{channel_id:e,shared_chat_session_id:n,location:i}),”chat_command”===i&&y(e)},b=function(e,n,i){t.E5.track(“shared_chat_client_start_session_error”,{channel_id:e,location:n,error_type:i}),”chat_command”===n&&k(i,e)},_=function(e,n,i){return e?n:i};function x(e){return{sharedChatSession:{__typename:”SharedChatSession”,id:e.session_id,host:{__typename:”Channel”,id:e.host_channel_id},status:e.status,autoStartsAt:e.auto_starts_at,createdAt:e.created_at,updatedAt:e.updated_at,participants:C(e.participants)}}}function C(e){var n=[];return e.forEach((function(e){var i;e&&n.push({__typename:”SharedChatParticipant”,id:e.participant_id,channel:{__typename:”Channel”,id:e.channel_id},autoAcceptsAt:null!==(i=e.auto_accepts_at)&&void 0!==i?i:null,status:e.status})})),n}function w(e){return e?e.filter((function(e){return e.id!==s.BU})).map((function(e){return e.user.id})):[]}var N=”shared-chat.acknowledged_mod_prompt”,P=”shared-chat.acknowledged_guest_nudge”,D=”shared-chat.guest-star-call-page-onboarding-sessions”,T=”shared-chat.used-before”,I=”shared-chat.seen_mod_message_delete”;function F(e){switch(e){case a.HHZ.HOST_NOT_LIVE:return M();case a.HHZ.RATE_LIMITED:return B();case a.HHZ.HOST_ALREADY_ACTIVE:return U();case a.HHZ.HOST_CHANNEL_SHIELD_MODE_ACTIVE:return V();case a.HHZ.MAX_INVITES_REACHED:return z();default:return j()}}var E=function(){return(0,t.hw)(“Close”,”SharedChat”)},j=function(){return(0,t.hw)(“Something went wrong. Please try again later.”,”SharedChatSnackbar”)};function L(e){return e?(0,t.hw)(“Sent from {sourceDisplayName}’s channel”,{sourceDisplayName:e},”ChatLine”):(0,t.hw)(“Sent from a Shared Chat channel”,”ChatLine”)}function A(e){switch(e){case a.qDT.TARGET_CHANNEL_NOT_LIVE:return M();case a.qDT.RATE_LIMITED:return B();case a.qDT.TARGET_CHANNEL_ALREADY_IN_SESSION:case a.qDT.TARGET_CHANNEL_ALREADY_ACTIVE:return U();case a.qDT.TARGET_CHANNEL_SHIELD_MODE_ACTIVE:return V();case a.qDT.MAX_CHANNELS_REACHED:case a.qDT.MAX_INVITES_REACHED:return z();case a.qDT.SESSION_ENDED:case a.qDT.SESSION_ID_NOT_FOUND:return O();default:return j()}}function R(e){switch(e){case a.GPu.SESSION_ENDED:case a.GPu.SESSION_ID_NOT_FOUND:return O();default:return j()}}function H(e){switch(e){case a.ysn.SESSION_ENDED:case a.ysn.SESSION_ID_NOT_FOUND:return O();default:return j()}}var O=function(){return(0,t.hw)(“This session has ended, please try again later.”,”SharedChatSnackbar”)},M=function(){return(0,t.hw)(“You must be live in order to enable Shared Chat.”,”SharedChatSnackbar”)},B=function(){return(0,t.hw)(“You’ve tried to join too many Shared Chat sessions too quickly. Please try again in a little while.”,”SharedChatSnackbar”)},U=function(){return(0,t.hw)(“Your Shared Chat is already active, please refresh this page.”,”SharedChatSnackbar”)},V=function(){return(0,t.hw)(“Shield mode must be off to start Shared Chat.”,”SharedChatSnackbar”)},z=function(){return(0,t.hw)(“You have reached the maximum number of participants in this session.”,”SharedChatSnackbar”)},W=function(){return(0,t.hw)(“Undo”,”SharedChatSnackbar”)},G=function(){return(0,t.hw)(“Shared Chat, with”,”StreamManager”)},q=function(){return(0,t.hw)(“Join Shared Chat”,”JoinSharedChatButton”)},Z=function(){return(0,t.hw)(“Shared Chat is enabled. You can manage your collaboration in your Stream Together window.”,”SharedChatSnackbar”)}},153152:function(e,n,i){“use strict”;i.d(n,{K:function(){return x},I:function(){return _}});var t=i(331635),a=i(474848),r=i(259051),o=i(471417),s=i(305507),l=i(959340),d=i(914421),u=i(947322),c=i(973474),m=i(97774),v=i(312663),p=i(588702),h=(i(296540),i(415044)),f=i.p+”assets/x-black-03b4cb63719881c0ae63.svg”,g=i.p+”assets/x-white-2a4683fbd60b78260cc6.svg”,k=i(178676),y=i(183198),S=i(859406),b=i(310981),_=function(e){return(null==e?void 0:e.sponsorshipFacet)===b.Q.SUBSIDIZED_SUBSCRIPTIONS?(null==e?void 0:e.isPromoted)?(0,a.jsx)(r.t,{fillColor:o.jo.Brand,title:(0,S.hw)(“{ brandName } is offering rewards”,{brandName:null==e?void 0:e.brandName},”PromotedFollowedBottomLayout”)}):(0,a.jsx)(s.H,{fillColor:o.jo.Brand,title:(0,S.hw)(“{ brandName } is offering rewards”,{brandName:null==e?void 0:e.brandName},”SponsoredFollowedBottomLayout”)}):null},x=function(e){var n=(0,h.d4)((function(e){return(0,y.iR)(e)===k.S.Dark}));return(0,a.jsxs)(l.P,{display:d.nl.Flex,flexDirection:d.bo.Row,width:”100%”,height:”100%”,children:[(0,a.jsx)(l.P,{className:”side-nav-promoted-followed-card__gradient”,minWidth:”0.5rem”,flexShrink:0,alignItems:d.k2.Start}),(0,a.jsxs)(l.P,{width:”100%”,padding:{top:”0.5rem”,bottom:”0.7rem”},children:[(0,a.jsxs)(l.P,{display:d.nl.Flex,position:d.yX.Relative,flexDirection:d.bo.Row,alignItems:d.k2.Center,flexShrink:0,padding:{left:.5},justifyContent:d.A9.Between,children:[(0,a.jsxs)(l.P,{display:d.nl.Flex,flexDirection:d.bo.Row,gap:”0.5rem”,alignItems:d.k2.Center,children:[(0,a.jsx)(u.e,{src:e.avatarSrc,alt:e.avatarAlt,size:30,userLogin:e.userLogin}),!!e.sponsorship&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.L,{alt:(0,S.hw)(“in collaboration with”,”SideNavPromotedFollowedCard”),src:n?g:f,width:8,height:8}),(0,a.jsx)(l.P,{height:”3rem”,width:”3rem”,borderRadius:m.Z.Rounded,style:{backgroundColor:e.sponsorship.brandHex},display:d.nl.Flex,alignItems:d.k2.Center,justifyContent:d.A9.Center,overflow:d.nE.Hidden,children:(0,a.jsx)(c.L,{alt:(0,S.hw)(“{brandName} Logo”,{brandName:e.sponsorship.brandName},”SideNavPromotedFollowedCard”),src:n?e.sponsorship.brandLogoDarkMode:e.sponsorship.brandLogoLightMode})})]})]}),(0,a.jsx)(l.P,{className:”side-nav-card__live-status”,flexShrink:0,margin:{bottom:”1rem”},children:e.metadataRight})]}),(0,a.jsx)(l.P,{className:”side-nav-promoted-followed-card__title”,display:d.nl.Flex,alignItems:d.k2.End,margin:{left:”1rem”,top:”0.5rem”},children:(0,a.jsx)(v.N,{fontWeight:d.IT.SemiBold,color:d.Q1.Alt,ellipsis:!0,fontSize:d.Z4.Size4,lineHeight:p.aK.Heading,title:e.title,children:e.titleElement||e.title})}),!!e.metadataLeft&&(0,a.jsx)(l.P,{className:”side-nav-promoted-followed-card__content”,display:d.nl.Flex,ellipsis:!0,alignItems:d.k2.Center,margin:{left:”1rem”,top:”0.2rem”},children:(0,a.jsx)(v.N,{color:d.Q1.Alt2,fontSize:d.Z4.Size6,lineHeight:p.aK.Heading,ellipsis:!0,children:e.metadataLeft})}),(0,a.jsx)(l.P,{className:”side-nav-promoted-followed-card__sponsorship”,ellipsis:!0,margin:{left:”1rem”},children:(0,a.jsx)(C,(0,t.__assign)({},e))})]})]})},C=function(e){return(0,a.jsxs)(l.P,{className:”side-nav-card-promoted-bottom”,display:d.nl.Flex,alignItems:d.k2.Center,gap:”0.5rem”,ellipsis:!0,children:[(0,a.jsx)(v.N,{color:d.Q1.Alt2,fontSize:d.Z4.Size6,lineHeight:p.aK.Heading,children:(0,S.hw)(“Sponsored”,”SponsoredFollowedLeftNavCard”)}),!!e.sponsorship&&(0,a.jsx)(v.N,{color:d.Q1.Alt2,fontSize:d.Z4.Size6,lineHeight:p.aK.Heading,ellipsis:!0,children:”•”}),!!e.sponsorship&&(0,a.jsx)(“p”,{children:(0,a.jsx)(l.P,{margin:{bottom:”-0.4rem”},children:(0,a.jsx)(_,(0,t.__assign)({},e.sponsorship))})}),!!e.sponsorship&&(0,a.jsx)(v.N,{color:d.Q1.Alt2,fontSize:d.Z4.Size6,lineHeight:p.aK.Heading,ellipsis:!0,children:” “.concat(e.sponsorship.brandName)})]})}},310981:function(e,n,i){“use strict”;var t;i.d(n,{Q:function(){return t}}),function(e){e.SUBSIDIZED_SUBSCRIPTIONS=”SUBSIDIZED_SUBSCRIPTIONS”,e.CHANNEL_SKINS=”CHANNEL_SKINS”}(t||(t={}))},285607:function(e,n,i){“use strict”;i.d(n,{S:function(){return a}});var t=.1;function a(e){return n=(1-t)*e,i=(1+t)*e,Math.random()*(i-n)+n;var n,i}},564139:function(e,n,i){“use strict”;i.d(n,{u:function(){return l}});var t=i(331635),a=i(474848),r=i(959340),o=i(296540),s=i(285047),l=function(e){var n=e.enabled,i=void 0===n||n,l=e.as,d=void 0===l?”section”:l,u=e.section,c=e.id,m=e.icon,v=e.label,p=(0,t.__rest)(e,[“enabled”,”as”,”section”,”id”,”icon”,”label”]),h=(0,s.bB)().actions;return(0,o.useEffect)((function(){return i&&h.addTarget(u,{id:c,icon:m,label:v}),function(){h.removeTarget(u,c)}}),[h,i,m,c,v,u]),(0,a.jsx)(r.P,(0,t.__assign)({className:”skip-to-target”,id:c,as:d,”aria-label”:v,”aria-hidden”:!i},p))}},571062:function(e,n,i){“use strict”;i.d(n,{D:function(){return h}});var t=i(331635),a=i(474848),r=i(906719),o=i(959340),s=i(914421),l=i(528267),d=i(958007),u=i(267319),c=i(891975),m=i(296540),v=i(859406),p=i(411670);var h=(0,i(5370).nT)((function(e){return{removeSnackbarFromQueue:e.removeSnackbarFromQueue}}))((function(e){var n,i=e.removeSnackbarFromQueue,h=e.id,f=e.type,g=e.buttonProps,k=e.duration,y=e.dismissable,S=e.onDismiss,b=e.margin,_=e.message,x=e.type,C=e.showProgressBar,w=e.shouldDismissOnClick,N=”success”===x,P=N&&!g,D=void 0!==k?k:p.w[f],T=m.useRef(),I=function(){T.current=setTimeout((function(){i(h)}),void 0!==k?k:p.w[f])};(0,c.S)((function(){return I(),function(){clearTimeout(T.current)}}));var F=((n={}).info=r._.Info,n.success=r._.Success,n.warning=r._.Warning,n.error=r._.Error,n);return(0,a.jsx)(o.P,{className:”snackbar-item__container”,display:s.nl.Flex,margin:void 0!==b?b:{bottom:1},style:{pointerEvents:”auto”},justifyContent:P?s.A9.Center:s.A9.Between,children:(0,a.jsx)(“div”,{onMouseEnter:function(){clearTimeout(T.current)},onMouseLeave:function(){void 0!==T.current&&I()},children:(0,a.jsx)(l.q,{message:(0,a.jsx)(d.z,{title:_}),actions:g&&(0,a.jsx)(u.h,{type:F[f],primaryButton:(0,t.__assign)((0,t.__assign)({},g),{onClick:function(e){(null==g?void 0:g.onClick)&&(g.onClick(e),w&&(clearTimeout(T.current),i(h)))}})}),closeButton:!N||y?{“aria-label”:(0,v.hw)(“Dismiss: {message}”,{message:_.toString()},”SnackbarItem”),onClick:function(){clearTimeout(T.current),null==S||S(),i(h)}}:void 0,type:F[f],showProgressBar:C,timeoutDuration:D})})})}))},411670:function(e,n,i){“use strict”;i.d(n,{m:function(){return t},w:function(){return a}});var t={info:”info”,success:”success”,warning:”warning”,error:”error”},a={info:1e4,success:4e3,warning:6e4,error:6e4}},875235:function(e,n,i){“use strict”;i.d(n,{$0:function(){return o},Rg:function(){return d},d$:function(){return s},ix:function(){return l}});var t=i(296540),a=i(415044),r=i(118021),o=function(e){return l(e.eventName),null};function s(e,n){return void 0===n&&(n=void 0),!!window.Sprig&&(n?window.Sprig(“track”,e,n):window.Sprig(“track”,e),!0)}function l(e){var n=(0,a.d4)((function(e){return e.session.firstPageLoaded}));!function(e){var n=e.callback,i=e.startAttempting,a=e.maxAttempts,o=e.attemptIntervalMS,s=(0,t.useState)(!1),l=s[0],d=s[1],u=(0,t.useRef)(0);function c(){u.current++,(u.current>a||n())&&d(!0)}(0,r.$)(c,i&&!l?o:null)}({callback:(0,t.useCallback)((function(){return s(e)}),[e]),startAttempting:n,maxAttempts:5,attemptIntervalMS:1e3})}function d(e,n){!function(e){var n=e.callback,i=e.startAttempting,t=e.maxAttempts,a=e.attemptIntervalMS,r=0,o=!1,s=null;i&&!o&&(s=setInterval((function(){if(++r>t)return o=!0,void(s&&clearInterval(s));n()&&(o=!0,s&&clearInterval(s))}),a))}({callback:function(){return s(e)},startAttempting:n,maxAttempts:5,attemptIntervalMS:1e3})}},922183:function(e,n,i){“use strict”;i.d(n,{N:function(){return d},e:function(){return u}});var t=i(474848),a=i(891975),r=i(296540),o=i(440961),s=i(859406),l=”twilight-sticky-footer-root”;function d(){return(0,t.jsx)(“footer”,{id:l})}function u(e){var n=r.useState(),i=n[0],t=n[1];return(0,a.S)((function(){if(!i){var e=document.getElementById(l);e?t(e):s.vF.warn(“StickyFooter couldn’t find a StickyFooterRoot to portal into.”)}})),i?(0,o.createPortal)(e.children,i):null}},985925:function(e,n,i){“use strict”;i.d(n,{P:function(){return d},V:function(){return u}});var t=i(474848),a=i(891975),r=i(296540),o=i(440961),s=i(859406),l=”twilight-sticky-header-root”;function d(){return(0,t.jsx)(“header”,{id:l})}function u(e){var n=r.useState(),i=n[0],t=n[1];return(0,a.S)((function(){if(!i){var e=document.getElementById(l);e?t(e):s.vF.warn(“StickyHeader couldn’t find a StickyHeaderRoot to portal into.”)}})),i?(0,o.createPortal)(e.children,i):null}},952332:function(e,n,i){“use strict”;i.d(n,{G:function(){return v},c:function(){return c}});var t=i(859406),a=i(29896),r=i(12109),o=i(285607),s=i(728578),l=i.n(s),d=i(399384),u=i(445865),c=10,m=(0,o.S)(1e3*t.Zn.get(“stories_polling_seconds”,0)),v=function(e,n,i,t){var o=(0,u.f)(),s=(0,r.fX)(“stories_web”),v=e?m:0,p=(0,a.IT)(l(),{fetchPolicy:null!=n?n:”cache-and-network”,pollInterval:v,variables:{input:{capabilities:d.NV,limit:null!=i?i:c,offset:null!=t?t:0}},skip:!o||!s});return{data:p.data,loading:p.loading,fetchMore:p.fetchMore}}},399384:function(e,n,i){“use strict”;i.d(n,{ES:function(){return p},IV:function(){return c},NV:function(){return m},Q_:function(){return s},Sr:function(){return v},UZ:function(){return u},_f:function(){return d},bH:function(){return l},fw:function(){return r},qH:function(){return o}});var t=i(859406),a=i(876531);function r(e){var n=[];if(!e)return n;for(var i=0,t=e;iTerms Apply.“,{“x:termsLink”:function(e){return(0,t.jsx)(a.Cb,{underline:!0,targetBlank:!0,linkTo:(0,l.h7)(),children:e})}},”BonusRoundMessage”),i=(0,s.hw)(“Now until 1/2/25 at 12am PT save on subs and get Bonus gift subs from Valorant. Don’t miss out! Terms Apply.“,{“x:termsLink”:function(e){return(0,t.jsx)(a.Cb,{underline:!0,targetBlank:!0,linkTo:(0,l.h7)(),children:e})}},”BonusRoundMessage”),d=(0,s.hw)(“Save up to 30% on new subs until 1/2/25 at 12am PT. Terms Apply.“,{“x:termsLink”:function(e){return(0,t.jsx)(a.Cb,{underline:!0,targetBlank:!0,linkTo:(0,l.h7)(),children:e})}},”BonusRoundMessage”),u=(0,s.hw)(“Valorant will add one gift sub for every 5 gift subs! Terms Apply.“,{“x:termsLink”:function(e){return(0,t.jsx)(a.Cb,{underline:!0,targetBlank:!0,linkTo:(0,l.h7)(),children:e})}},”BonusRoundMessage”),c=n;return(0,l.Sl)()&&(c=i),”sub”===e.bonusRoundType?c=d:”gifting”===e.bonusRoundType&&(c=u),(0,t.jsx)(r.P,{className:”bonus-round-message”,children:(0,t.jsx)(o.N,{children:c})})})},106078:function(e,n,i){“use strict”;i.d(n,{Am:function(){return S},BD:function(){return u},RS:function(){return h},Sl:function(){return m},Uf:function(){return y},WS:function(){return p},gN:function(){return c},h7:function(){return x},i4:function(){return b},ls:function(){return v},oO:function(){return g},pj:function(){return k},pn:function(){return d},rB:function(){return _},vQ:function(){return f}});var t=i(917705),a=i(859406),r=i(534878),o=i(387917),s=”project_pixie_br_end_date”,l=”2025-01-02T00:00:00.000-08:00″,d=function(){var e=a.Zn.get(“project_pixie_br_start_date”,”2024-12-23T10:00:00.000-08:00″),n=a.Zn.get(s,l),i=Date.now();return(0,t.isAfter)(i,(0,r._U)(e))&&!(0,t.isAfter)(i,(0,r._U)(n))},u=function(){return a.Zn.get(s,l)},c=function(){var e=a.Zn.get(“project_pixie_br_start_date”,”2024-12-23T10:00:00.000-08:00″),n=a.Zn.get(“project_pixie_br_end_date”,”2025-01-02T00:00:00.000-08:00″),i=Date.now();return(0,t.isAfter)(i,(0,r._U)(e))&&!(0,t.isAfter)(i,(0,r._U)(n))},m=function(){var e=a.Zn.get(s,l),n=(0,r._U)(e),i=new Date(n.getTime()-1728e5),o=Date.now();return(0,t.isAfter)(o,i)&&!(0,t.isAfter)(o,n)},v=function(){return m()?(0,a.hw)(“Less than 48 Hours of Savings Left”,”BonusRoundCallout”):(0,a.hw)(“The End-of-Year Bonus Round is here!”,”BonusRoundCallout”)},p=function(e){return m()?”gifting”===e?(0,a.hw)(“Less than 48 Hours of Bonus Gift Subs left”,”BonusRoundCallout”):(0,a.hw)(“Last Call for discounted subs”,”BonusRoundCallout”):(0,a.hw)(“End-of-Year Bonus Round”,”BonusRoundCallout”)},h=””.concat(o.Y,”/bonus-round/left-aligned-valorant.png”),f=””.concat(o.Y,”/subtember2024-v-sponsor.png”),g=””.concat(o.Y,”/bonus-round/bonus-round-left-stars-small.png”),k=””.concat(o.Y,”/bonus-round/bonus-round-right-stars-small.png”),y=function(){return(0,a.hw)(“Bonus Round Promo Image”,”BonusRoundCallout”)},S=function(e){var n=(0,a.hw)(“Save up to {offerPercentage}% on new subs this Bonus Round.”,{offerPercentage:30},”BonusRound”);return n},b=function(){return(0,a.hw)(“Valorant Sponsor Image”,”BonusRoundCallout”)},_=function(){return(0,a.hw)(“Presented by”,”BonusRound”)},x=function(){return”https://www.twitch.tv/p/legal/bonus-round/”}},477204:function(e,n,i){“use strict”;i.d(n,{f:function(){return d}});var t=i(474848),a=i(312663),r=i(588702),o=i(70931),s=(i(296540),i(859406)),l=i(733265),d=function(e){var n=function(e){switch(e){case l.KH.CHAMBER_FPSO:return”https://www.twitch.tv/p/en/legal/exclusive-offer-sub/”;case l.KH.CREATOR_LED:return”https://legal.twitch.com/legal/subscription-discounts”;case l.KH.EXPIRING_GIFT:default:return”https://www.twitch.tv/p/legal/gift-discount1″}}(e.filter);return(0,t.jsx)(a.N,{type:r.M2.Span,children:(0,t.jsx)(o.Cb,{linkTo:n,underline:!0,variant:o.KD.Inherit,targetBlank:!0,children:(0,s.hw)(“Terms apply.”,”ExpiringGiftTerms”)})})}},812444:function(e,n,i){“use strict”;i.d(n,{b:function(){return a},x:function(){return r}});var t=i(733265),a={GIFT_MODAL:”gift_modal”,SUB_MODAL:”sub_modal”,CHANNEL_PAGE:”channel_page”,GIFT_BUTTON:”gift_button”},r=function(e,n,i){var a,r,o,s=(null===(o=null===(r=null===(a=null==n?void 0:n.promotion)||void 0===a?void 0:a.eligibilityFilters)||void 0===r?void 0:r.find((function(e){return!!e.value})))||void 0===o?void 0:o.value)||””,l=””;switch(s){case t.KH.CHAMBER_FPSO:l=”channel_sub_discount”;break;case t.KH.CREATOR_LED:case t.KH.EXPIRING_GIFT:case t.KH.TREASURE_TRAIN:case t.KH.BIG_SKU:l=”5_plus_gift_sub_discount”;break;default:l=s}return{channel_id:i||””,commerce_promotion_event:s,commerce_promotion_offer:l,commerce_promotion_placement:e}}},160173:function(e,n,i){“use strict”;i.d(n,{FZ:function(){return S},Fl:function(){return _},JD:function(){return B},KG:function(){return L},KN:function(){return E},L3:function(){return x},LZ:function(){return N},O0:function(){return A},OX:function(){return b},PY:function(){return U},RG:function(){return O},Su:function(){return M},XR:function(){return H},_8:function(){return f},bs:function(){return C},dz:function(){return p},gw:function(){return y},iH:function(){return P},kB:function(){return k},lV:function(){return z},m9:function(){return t},nz:function(){return I},oh:function(){return w},qw:function(){return D},rB:function(){return F},rb:function(){return V},t6:function(){return R},tl:function(){return g},uY:function(){return h},ut:function(){return j},wV:function(){return T}});var t,a=i(917705),r=i(859406),o=i(29896),s=i(534878),l=i(467957),d=i(387917),u=i(778746),c=i.n(u),m=”project_pixie_gifts_end_date”,v=”2024-10-01T00:00:00.000-07:00″;!function(e){e.Sub=”sub”,e.Gifting=”gifting”,e.Bits=”bits”}(t||(t={}));var p=function(){var e=r.Zn.get(“project_pixie_sub_start_date”,”2024-08-29T10:00:00.000-07:00″),n=r.Zn.get(“project_pixie_sub_end_date”,”2024-10-01T00:00:00.000-07:00″),i=Date.now();return(0,a.isAfter)(i,(0,s._U)(e))&&!(0,a.isAfter)(i,(0,s._U)(n))},h=function(){var e=r.Zn.get(“project_pixie_one_enddate”,”2024-09-16T00:00:00.000-08:00″),n=Date.now();return(0,l.OZ)()&&(0,a.isAfter)(n,(0,s._U)(e))},f=function(){var e=r.Zn.get(“project_pixie_gifts_start_date”,”2024-09-26T10:00:00.000-07:00″),n=r.Zn.get(m,v),i=Date.now();return(0,a.isAfter)(i,(0,s._U)(e))&&!(0,a.isAfter)(i,(0,s._U)(n))},g=function(){var e=r.Zn.get(m,v),n=(0,s._U)(e),i=new Date(n.getTime()-1728e5),t=Date.now();return(0,a.isAfter)(t,i)&&!(0,a.isAfter)(t,n)},k=function(e){return e===t.Gifting?y():(0,r.hw)(“Celebrate SUBtember!”,”SubtemberCallout”)},y=function(){return(0,r.hw)(“SUBtember Bonus Gift Subs”,”SubtemberCallout”)},S=function(){return(0,r.hw)(“SUBtember Bonus Bits”,”SubtemberCallout”)},b=function(){return(0,r.hw)(“Only 48 Hours of Bonus Bits left”,”SubtemberCallout”)},_=function(){return(0,r.hw)(“Only 48 Hours of Bonus Gift Subs left”,”SubtemberCallout”)},x=””.concat(d.Y,”/subbiecropped2024.png”),C=””.concat(d.Y,”/subtember2024-v-sponsor.png”),w=(“”.concat(d.Y,”/subtember-2024-happy-subbie.png”),””.concat(d.Y,”/subtember-2024-left-sprites-full.png”)),N=””.concat(d.Y,”/subtember-2024-right-sprites-half.png”),P=function(){return(0,r.hw)(“SUBtember Promo Image”,”SubtemberCallout”)},D=function(){return(0,r.hw)(“Learn more.”,”SubtemberCallout”)},T=function(e){var n=(0,r.hw)(“Save up to {offerPercentage}% on new subs this SUBtember.”,{offerPercentage:30},”Subtember2022″);return t.Sub,n},I=function(){return(0,r.hw)(“Valorant Sponsor Image”,”SubtemberCallout”)},F=function(){return(0,r.hw)(“Presented by”,”Subtember”)},E=function(){return”http://subs.twitch.tv”},j=function(){return”http://bits.twitch.tv”},L=function(){return”https://www.twitch.tv/subs/?utm_source=product&utm_medium=channelbanner&utm_campaign=subtember24&utm_content=recsublearn”},A=function(){return”https://www.twitch.tv/p/legal/subtember/?utm_source=product&utm_medium=channelbanner&utm_campaign=subtember24&utm_content=recsubterms”},R=function(){return”https://www.twitch.tv/subs/?utm_source=product&utm_medium=submodal&utm_campaign=subtember24&utm_content=recsublearn”},H=function(){return”https://www.twitch.tv/p/legal/subtember/?utm_source=product&utm_medium=submodal&utm_campaign=subtember24&utm_content=recsubterms”},O=function(){return”https://www.twitch.tv/subs/?utm_source=product&utm_medium=emotecard&utm_campaign=subtember24&utm_content=recsublearn”},M=function(){return”https://www.twitch.tv/subs/?utm_source=product&utm_medium=usercard&utm_campaign=subtember24&utm_content=recsublearn”},B=function(e){return e?”https://www.twitch.tv/subs/?utm_source=product&utm_medium=followingpg&utm_campaign=subtember24&utm_content=recsublearn”:”https://www.twitch.tv/subs/?utm_source=product&utm_medium=submgmtpg&utm_campaign=subtember24&utm_content=recsublearn”},U=function(e){return e?”https://www.twitch.tv/p/legal/subtember/?utm_source=product&utm_medium=followingpg&utm_campaign=subtember24&utm_content=recsubterms”:”https://www.twitch.tv/p/legal/subtember/?utm_source=product&utm_medium=submgmtpg&utm_campaign=subtember24&utm_content=recsubterms”},V=function(){return”https://www.twitch.tv/p/legal/subtember/?utm_source=product&utm_medium=sublandingpg&utm_campaign=subtember24&utm_content=recsubterms”},z=function(e,n){var i,t;void 0===n&&(n=!1);var a=(0,o.IT)(c(),{variables:{id:e},skip:!n}),r=a.data,s=a.loading;return{hasSubscriptionProducts:!!(null===(i=null==r?void 0:r.user)||void 0===i?void 0:i.subscriptionProducts)&&(null===(t=null==r?void 0:r.user)||void 0===t?void 0:t.subscriptionProducts.length)>0,loading:s}}},706166:function(e,n,i){“use strict”;i.d(n,{t:function(){return h}});var t=i(474848),a=i(959340),r=i(914421),o=i(922580),s=i(312663),l=i(588702),d=i(97774),u=i(296540),c=i(515514),m=i(214507),v=i(479544),p=i(732750),h=function(e){var n=function(e){var n=e.expirationDate,i=e.styleSelector,t=u.useState((0,v.Gp)(n)),a=t[0],r=t[1];return u.useEffect((function(){var e=new m.v({intervalMillis:6e4,onInterval:function(){r((0,v.Gp)(n))}});return e.start(),function(){e.stop()}}),[n]),void 0===(0,c.Ds)(a,”day”).minutes?{endsIn:null,style:null}:{endsIn:(0,p.p3)(a),style:(0,p.yR)(i)}}({expirationDate:e.expirationDate,styleSelector:e.styleSelector}),i=n.endsIn,h=n.style;return i&&h?(0,t.jsxs)(a.P,{display:r.nl.Flex,className:h,padding:{x:1,y:.5},alignItems:r.k2.Center,borderRadius:d.Z.XXLarge,width:”fit-content”,children:[(0,t.jsx)(a.P,{width:”20px”,height:”20px”,margin:{right:.5},children:(0,t.jsx)(o.M,{})}),(0,t.jsx)(s.N,{fontSize:r.Z4.Size4,type:”span”,whiteSpace:l.M$.NoWrap,children:i})]}):null}},732750:function(e,n,i){“use strict”;i.d(n,{zK:function(){return m},p3:function(){return p},yR:function(){return v}});var t=i(331635),a=i(288063),r=i(515514),o=i(859406),s=i(733265),l=”promotionTimerLightest–pFCoH”,d=”promotionTimerLight–w5ar2″,u=”promotionTimerDark–JaJEN”,c=(0,t.__spreadArray)((0,t.__spreadArray)([],Object.keys(a.b),!0),[“system”],!1),m=function(e){return e?c.includes(e)||Object.values(s.KH).includes(e)?e:”BONUS_ROUND”===e?”BONUS_ROUND”:”system”:”system”},v=function(e){if(n=e,c.includes(n))return”light”===e?d:u;if(function(e){return Object.values(s.KH).includes(e)}(e))switch(e){case s.KH.CHAMBER_FPSO:return d;case s.KH.CREATOR_LED:return l;case s.KH.EXPIRING_GIFT:default:return u}else if(“BONUS_ROUND”===e)return d;var n;return u},p=function(e){var n=(0,r.Ds)(e,”day”),i=n.days,a=n.hours,s=n.minutes;if(!i&&!a&&!s)return””;if(!i&&!a)return(0,o.hw)(“{duration} left”,{duration:(0,r.VC)({minutes:s||1})},”ExpiringGiftPromotionTimer”);var l=(0,t.__assign)((0,t.__assign)((0,t.__assign)({},i&&{days:i}),a&&{hours:a}),!i&&s&&{minutes:s});return(0,o.hw)(“Ends in {duration}”,{duration:(0,r.n$)(l)},”ExpiringGiftPromotionTimer”)}},529446:function(e,n,i){“use strict”;i.d(n,{L6:function(){return u},YN:function(){return l},ex:function(){return c},lO:function(){return a},nD:function(){return s},p4:function(){return t},pP:function(){return d}});var t,a,r=i(876531),o=i(425959);!function(e){e.HighQuantityCommunityGiftOffer=”high_quantity_community_gift_offer”,e.Subtember=”Subtember”,e.BonusRound=”BonusRound”}(t||(t={})),function(e){e.FirstPaidSubOffer=”first_paid_sub_offer_20_perc_off”,e.FirstPaidPrimeSubOffer=”first_paid_sub_offer_prime_50_perc_off”,e.FirstPaidGiftOffer=”first_paid_gift_offer_20_perc_off”,e.FirstPaidSingleGiftOffer=”single_paid_gift_offer_20_perc_off”,e.FirstPaidMultiMonthOffer=”single_paid_multi_month_gift_offer_20_perc_off”,e.MultiMonthIntroOffer=”multimonth_intro”,e.MultiMonthTierOneThreeMonthOffer=”multimonth_t1_3m_10_perc_off”,e.MultimonthTierOneSixMonthOffer=”multimonth_t1_6m_15_perc_off”,e.MultimonthTierTwoThreeMonthOffer=”multimonth_t2_3m_10_perc_off”,e.MultimonthTierTwoSixMonthOffer=”multimonth_t2_6m_15_perc_off”,e.MultimonthTierThreeThreeMonthOffer=”multimonth_t3_3m_10_perc_off”,e.MultimonthTierThreeSixMonthOffer=”multimonth_t3_6m_15_perc_off”,e.SubtemberTier1StandardGiftOffer=”subtember-2023-t1-single-gift”,e.SubtemberTier2StandardGiftOffer=”subtember-2023-t2-single-gift”,e.SubtemberTier3StandardGiftOffer=”subtember-2023-t3-single-gift”,e.SubtemberTier1CommunityGiftOffer=”subtember-2023-t1-community-gift”,e.SubtemberTier2CommunityGiftOffer=”subtember-2023-t2-community-gift”,e.SubtemberTier3CommunityGiftOffer=”subtember-2023-t3-community-gift”,e.Subtember=”Subtember”,e.SubtemberTier1_Personal_OneMonthOffer=”Campaign-Subtember_2024-t1-1m-sub”,e.SubtemberTier1_Personal_ThreeMonthOffer=”Campaign-Subtember_2024-t1-3m-sub”,e.SubtemberTier1_Personal_SixMonthOffer=”Campaign-Subtember_2024-t1-6m-sub”,e.SubtemberTier2_Personal_OneMonthOffer=”Campaign-Subtember_2024-t2-1m-sub”,e.SubtemberTier2_Personal_ThreeMonthOffer=”Campaign-Subtember_2024-t2-3m-sub”,e.SubtemberTier2_Personal_SixMonthOffer=”Campaign-Subtember_2024-t2-6m-sub”,e.SubtemberTier3_Personal_OneMonthOffer=”Campaign-Subtember_2024-t3-1m-sub”,e.SubtemberTier3_Personal_ThreeMonthOffer=”Campaign-Subtember_2024-t3-3m-sub”,e.SubtemberTier3_Personal_SixMonthOffer=”Campaign-Subtember_2024-t3-6m-sub”,e.Subtember2025Tier1_OneMonthOffer=”t1_subtember_2025_web_1m”,e.Subtember2025Tier1_ThreeMonthOffer=”t1_subtember_2025_web_3m”,e.Subtember2025Tier1_SixMonthOffer=”t1_subtember_2025_web_6m”,e.Subtember2025Tier2_OneMonthOffer=”t2_subtember_2025_web_1m”,e.Subtember2025Tier2_ThreeMonthOffer=”t2_subtember_2025_web_3m”,e.Subtember2025Tier2_SixMonthOffer=”t2_subtember_2025_web_6m”,e.Subtember2025Tier3_OneMonthOffer=”t3_subtember_2025_web_1m”,e.Subtember2025Tier3_ThreeMonthOffer=”t3_subtember_2025_web_3m”,e.Subtember2025Tier3_SixMonthOffer=”t3_subtember_2025_web_6m”,e.BonusRound=”BonusRound”,e.BonusRoundTier1_Personal_OneMonthOffer=”Campaign-BonusRound2024-t1-1m-sub”,e.BonusRoundTier1_Personal_ThreeMonthOffer=”Campaign-BonusRound2024-t1-3m-sub”,e.BonusRoundTier1_Personal_SixMonthOffer=”Campaign-BonusRound2024-t1-6m-sub”,e.BonusRoundTier2_Personal_OneMonthOffer=”Campaign-BonusRound2024-t2-1m-sub”,e.BonusRoundTier2_Personal_ThreeMonthOffer=”Campaign-BonusRound2024-t2-3m-sub”,e.BonusRoundTier2_Personal_SixMonthOffer=”Campaign-BonusRound2024-t2-6m-sub”,e.BonusRoundTier3_Personal_OneMonthOffer=”Campaign-BonusRound2024-t3-1m-sub”,e.BonusRoundTier3_Personal_ThreeMonthOffer=”Campaign-BonusRound2024-t3-3m-sub”,e.BonusRoundTier3_Personal_SixMonthOffer=”Campaign-BonusRound2024-t3-6m-sub”,e.HolidayTier1StandardGiftOffer=”holiday-2023-promo-t1-single-gift”,e.HolidayTier2StandardGiftOffer=”holiday-2023-promo-t2-single-gift”,e.HolidayTier3StandardGiftOffer=”holiday-2023-promo-t3-single-gift”,e.HolidayTier1CommunityGiftOffer=”holiday-2023-promo-t1-community-gift”,e.HolidayTier2CommunityGiftOffer=”holiday-2023-promo-t2-community-gift”,e.HolidayTier3CommunityGiftOffer=”holiday-2023-promo-t3-community-gift”,e.HolidayTier1_Personal_OneMonthOffer=”holiday-2023-promo-t1-1m-recurring-sub”,e.HolidayTier1_Personal_ThreeMonthOffer=”holiday-2023-promo-t1-3m-recurring-sub”,e.HolidayTier1_Personal_SixMonthOffer=”holiday-2023-promo-t1-6m-recurring-sub”,e.HolidayTier2_Personal_OneMonthOffer=”holiday-2023-promo-t2-1m-recurring-sub”,e.HolidayTier2_Personal_ThreeMonthOffer=”holiday-2023-promo-t2-3m-recurring-sub”,e.HolidayTier2_Personal_SixMonthOffer=”holiday-2023-promo-t2-6m-recurring-sub”,e.HolidayTier3_Personal_OneMonthOffer=”holiday-2023-promo-t3-1m-recurring-sub”,e.HolidayTier3_Personal_ThreeMonthOffer=”holiday-2023-promo-t3-3m-recurring-sub”,e.HolidayTier3_Personal_SixMonthOffer=”holiday-2023-promo-t3-6m-recurring-sub”,e.SubsidizedSubscriptionsTier1PersonalOffer=”subsidized-subs-web-t1-50-perc-off”,e.SubsidizedSubscriptionsT1GiftOffer=”subsidized-gift-subs-web-t1-50-perc-off”,e.FPSO20Promotion=”t1_chamber_fpso_20_pct_web”,e.FPSO30Promotion=”t1_chamber_fpso_30_pct_web”,e.FPSOTargetedPromotion=”TARGETED_PROMOTION_FPSO”,e.LapsedSpenderPromotion=”LAPSED_SPENDER_PROMO”}(a||(a={}));var s=[a.MultiMonthTierOneThreeMonthOffer,a.MultimonthTierOneSixMonthOffer,a.MultimonthTierTwoThreeMonthOffer,a.MultimonthTierTwoSixMonthOffer,a.MultimonthTierThreeThreeMonthOffer,a.MultimonthTierThreeSixMonthOffer];function l(e,n){for(var i=function(e){var i=null==n?void 0:n.find((function(n){var i;return(null===(i=n.promotion)||void 0===i?void 0:i.name)===e}));if(null==i?void 0:i.eligibility.isEligible)return{value:i}},t=0,a=e;t=e.quantity.min&&n<=e.quantity.max}));(null===(c=null==p?void 0:p.promoDisplay)||void 0===c?void 0:c.discountPercent)&&(v=Math.round(v*(1-p.promoDisplay.discountPercent/100)))}return r(a(v*n,m.exponent),m.currency)}}function s(e,n){var i,t,o,s,l,d,u,c;void 0===n&&(n=1);var m=null===(o=null===(t=null===(i=null==e?void 0:e.listing)||void 0===i?void 0:i.chargeModel)||void 0===t?void 0:t.internal)||void 0===o?void 0:o.previewPrice,v=null===(d=null===(l=null===(s=null==e?void 0:e.listing)||void 0===s?void 0:s.chargeModel.internal)||void 0===l?void 0:l.previewPrice)||void 0===d?void 0:d.discount;if(m&&(null===(u=null==e?void 0:e.promotions)||void 0===u?void 0:u.length)){var p=m.total;v&&(p=m.total-v.total);var h=e.promotions.find((function(e){return e.quantity&&n>=e.quantity.min&&n<=e.quantity.max}));if((null===(c=null==h?void 0:h.promoDisplay)||void 0===c?void 0:c.discountPercent)&&(p=Math.round(m.total*(h.promoDisplay.discountPercent/100))),p===m.total)return;return r(a(p*n,m.exponent),m.currency)}if(m&&v)return r(a((m.total-v.total)*n,m.exponent),m.currency)}function l(e,n,i,t){var o,s,l,d,u,c,m,v,p,h,f,g;void 0===i&&(i=1),void 0===t&&(t=!1);var k=null===(l=null===(s=null===(o=null==e?void 0:e.listing)||void 0===o?void 0:o.chargeModel)||void 0===s?void 0:s.internal)||void 0===l?void 0:l.previewPrice,y=null===(c=null===(u=null===(d=null==n?void 0:n.listing)||void 0===d?void 0:d.chargeModel)||void 0===u?void 0:u.internal)||void 0===c?void 0:c.previewPrice;if(k&&y){var S,b=t?k.total:(null===(m=k.discount)||void 0===m?void 0:m.total)||k.total,_=t?y.total:(null===(v=y.discount)||void 0===v?void 0:v.total)||y.total;if(null===(p=null==e?void 0:e.promotions)||void 0===p?void 0:p.length)(null===(h=null==(S=e.promotions.find((function(e){return e.quantity&&i>=e.quantity.min&&i<=e.quantity.max})))?void 0:S.promoDisplay)||void 0===h?void 0:h.discountPercent)&&(b*=1-S.promoDisplay.discountPercent/100);if(null===(f=null==n?void 0:n.promotions)||void 0===f?void 0:f.length)(null===(g=null==(S=n.promotions.find((function(e){return e.quantity&&i>=e.quantity.min&&i<=e.quantity.max})))?void 0:S.promoDisplay)||void 0===g?void 0:g.discountPercent)&&(_*=1-S.promoDisplay.discountPercent/100);return r(a(b*i,k.exponent)-a(_*i,y.exponent),y.currency)}return""}function d(e){var n,i,t,o,s,l,d,u,c,m=null===(t=null===(i=null===(n=null==e?void 0:e.listing)||void 0===n?void 0:n.chargeModel)||void 0===i?void 0:i.internal)||void 0===t?void 0:t.previewPrice,v=(null===(u=null===(d=null===(l=null===(s=null===(o=null==e?void 0:e.listing)||void 0===o?void 0:o.chargeModel)||void 0===s?void 0:s.internal)||void 0===l?void 0:l.plan)||void 0===d?void 0:d.interval)||void 0===u?void 0:u.duration)||1;if(m)return r(a(((null===(c=m.discount)||void 0===c?void 0:c.total)||m.total)/v,m.exponent),m.currency)}function u(e){var n,i,t,o,s,l,d,u,c=null===(t=null===(i=null===(n=null==e?void 0:e.listing)||void 0===n?void 0:n.chargeModel)||void 0===i?void 0:i.internal)||void 0===t?void 0:t.previewPrice,m=(null===(u=null===(d=null===(l=null===(s=null===(o=null==e?void 0:e.listing)||void 0===o?void 0:o.chargeModel)||void 0===s?void 0:s.internal)||void 0===l?void 0:l.plan)||void 0===d?void 0:d.interval)||void 0===u?void 0:u.duration)||1;if(c)return r(a(c.total/m,c.exponent),c.currency)}},473591:function(e,n,i){"use strict";i.d(n,{HK:function(){return p},Qg:function(){return o},U2:function(){return r},hu:function(){return t}});var t,a,r,o,s,l=i(331635),d=i(826094),u=i(859406),c=i(906994),m=i(857916),v=i.n(m);function p(e){return(0,l.__awaiter)(this,void 0,void 0,(function(){var n,i,t;return(0,l.__generator)(this,(function(a){switch(a.label){case 0:return i=[{}],[4,h(e)];case 1:return n=l.__assign.apply(void 0,[l.__assign.apply(void 0,i.concat([a.sent()])),{action:e.action,selected_option:e.selectedOption||(null===(t=e.multiMonthGiftAmount)||void 0===t?void 0:t.toString())}]),u.E5.__track_SSRMigrationFixme("subscribe_button",n),[2]}}))}))}function h(e){return(0,l.__awaiter)(this,void 0,void 0,(function(){var n,i,t,a,r,o;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:n=null,l.label=1;case 1:return l.trys.push([1,3,,4]),[4,u.x2.apollo.client.query({query:v(),variables:{channelID:e.channelID}})];case 2:return n=l.sent(),[3,4];case 3:return i=l.sent(),u.vF.warn((0,d.d)(i),"Failed to query for sub info in Subs reporting.",{channelID:e.channelID}),[3,4];case 4:return[2,{attribution_token:e.attributionToken||null,button_cta:e.buttonCTA,can_subscribe:e.canSubscribe||null,channel:e.channelLogin,channel_id:e.channelID,charge_interval:e.chargeInterval,checkout_button_tier:e.checkoutButtonTier,creator_goal_id:(null===(t=e.creatorGoal)||void 0===t?void 0:t.id)||null,creator_goal_state:(m=e.creatorGoal,p=(null==m?void 0:m.currentContributions)||0,h=(null==m?void 0:m.targetContributions)||0,(p>=h&&h>0?s.Achieved:(null==m?void 0:m.state)?s.Active:null)||null),cumulative_tenure_months:e.cumulativeTenureMonths,days_to_next_tenure_anniversary:e.daysToNextTenureAnniversary||null,founder_badge_upsell_shown:e.founderBadgeUpsellShown||null,has_custom_sub_benefits:e.hasCustomSubBenefits||null,has_sub_credit:e.hasSubCredit||null,impression_type:e.impressionType,is_anonymous:e.isAnonymous,is_live:e.isLive||!1,is_menu_open:e.isMenuOpen||null,is_single_month:e.isSingleMonth,is_subscribed_current_tier:e.isSubscribedCurrentTier||null,is_subscribed:e.isSubscribed||!!(null===(o=null===(r=null===(a=null==n?void 0:n.data)||void 0===a?void 0:a.user)||void 0===r?void 0:r.self)||void 0===o?void 0:o.subscriptionBenefit),is_subscribed_with_prime:e.isSubscribedWithPrime,is_subscribed_with_gift:e.isSubscribedWithGift,is_subscription_dnrd:e.isSubscriptionDNRd,menu_type:e.menuType||null,modal_session_id:e.modalSessionId||””,multimonth_gift_amount:e.multiMonthGiftAmount,mystery_gift_count:e.mysteryGiftCount||null,payment_referrer:e.paymentReferrer||null,primary_color_hex:e.primaryColorHex,show_prime_content:e.showPrimeContent||!1,streak_number:e.streakNumber||null,sub_location:e.subLocation,sub_recipient:e.giftRecipient||null,subscription_remaining_days:e.subscriptionRemainingDays,upsell_session_id:e.upsellSessionId||””,viewport_height:window.innerHeight,viewport_width:window.innerWidth,is_free_trial:e.isFreeTrial,mobile_commerce_session_id:(0,c.m)()}]}var m,p,h}))}))}!function(e){e.BuyContinueSub=”buy_continue_sub”,e.BuyCustomMysteryGift=”buy_custom_mystery_gift”,e.BuyCustomMysteryGiftOneClick=”buy_custom_mystery_gift_one_click”,e.BuyGiftSub=”buy_gift_sub”,e.BuyGiftSubGoToCheckout=”buy_gift_sub_go_to_checkout”,e.BuyGiftSubOneClick=”buy_gift_sub_one_click”,e.BuyGiftToPaidUpgrade=”buy_gift_to_paid_upgrade”,e.BuyMysteryGift=”buy_mystery_gift”,e.BuyMysteryGiftGoToCheckout=”buy_mystery_gift_go_to_checkout”,e.BuyMysteryGiftOneClick=”buy_mystery_gift_one_click”,e.BuyPaidUpgrade=”buy_paid_upgrade”,e.BuyPrimeToPaid=”buy_prime_to_paid”,e.BuyQuickSub=”buy_quick_sub”,e.BuyRecurringSubGoToCheckout=”buy_recurring_sub_go_to_checkout”,e.BuyRecurringSubOneClick=”buy_recurring_sub_one_click”,e.BuyUpgradeSubscription=”buy_upgrade_subscription”,e.ChangeTier=”change_tier”,e.ChangeSingleGiftRecipient=”change_single_gift_recipient”,e.ExpandShowMoreGiftOptions=”expand_show_more_gift_options”,e.ClickAnonymousGiftCheckbox=”anonymous_gift_click”,e.ClickBack=”back_top_level”,e.ClickBackCommunityGift=”click_back_community_gift”,e.ClickBackManage=”click_back_manage”,e.ClickBackSubscribe=”click_back_subscribe”,e.ClickCancelPaidUpgrade=”click_cancel_paid_upgrade”,e.ClickChangePaymentMethod=”click_change_payment_method”,e.ClickChangeSubTier=”click_change_sub_tier”,e.ClickCheckout=”click_checkout_button”,e.ClickCommunityGift=”click_community_gift”,e.ClickDonate=”click_donate”,e.ClickDisableGift=”click_disable_gift_button”,e.ClickDNRSub=”click_dnr_sub_button”,e.ClickGiftASubscriptionTab=”click_gift_a_subscription_tab”,e.ClickGiftSubOptions=”gift_options_click”,e.ClickManage=”click_manage”,e.ClickMoreSubOptions=”more_options_click”,e.ClickQuestsLink=”click_quests_link”,e.ClickShowMoreEmotes=”click_show_more_emotes”,e.ClickSignupForPrime=”click_signup_for_prime”,e.ClickSingleGift=”click_single_gift”,e.ClickSubscribe=”click_subscribe”,e.ClickSubTierDropdown=”click_sub_tier_dropdown”,e.ClickYourSubscriptionTab=”click_your_subscription_tab”,e.CloseSubMenu=”close_subscribe_menu”,e.ClickElevateSubscription=”click_elevate_subscription”,e.ClickBackToBenefits=”click_back_to_benefits”,e.GiftASub=”gift_a_sub”,e.MultimonthDropdownClick=”multimonth_dropdown_click”,e.MultimonthValueSelect=”multimonth_value_select”,e.OpenSubMenu=”open_subscribe_menu”,e.OpenSubscribeMenu=”open_subscribe_menu”,e.PreviewTier2=”preview_tier2_modifiers”,e.PreviewTier3=”preview_tier3_modifiers”,e.SelectedGiftMonths=”select_gift_months”,e.SelectRenewalMonths=”select_renewal_months”,e.ShowOneClickButtonCommunityGift=”show_one_click_button_community_gift”,e.ShowOneClickButtonSingleGift=”show_one_click_button_single_gift”,e.ShowOneClickButtonRecurringSubs=”show_one_click_button_recurring_subs”,e.SingleUserRecipientSelect=”single_user_recipient_select”,e.SubButtonReady=”sub_button_ready”,e.SubMenuReady=”sub_menu_ready”,e.SubWithPrime=”samus_spend_credit”,e.SubWithToken=”sub_with_token”,e.CloseOneClick=”close_one_click”,e.OpenSPMModal=”open_saved_payment_method_modal”,e.UpdatePaymentMethod=”update_payment_method”,e.CLosePaymentUpdate=”close_payment_update”}(t||(t={})),function(e){e.ShowMoreGiftOptionsImpression=”show_more_gift_options_impression”}(a||(a={})),function(e){e.ChannelHome=”channel_home”,e.ChannelPage=”channel_page”,e.ChannelPageModal=”channel_page_modal”,e.CharityPanelPage=”charity_panel_page”,e.ChatTray=”chat_tray”,e.CommunityGiftHighlight=”community_gift_highlight”,e.DropsCommunityHighlight=”drops_community_highlight”,e.EmoteCard=”emote_card”,e.EmotePicker=”emote_picker”,e.GuestStarHighlight=”guest_star_highlight”,e.GiftBadgeProgressionLeaderBoard=”gift_badge_progression_leaderboard”,e.GifterLeaderboard=”gifter_leaderboard”,e.HypeTrain=”hype_train”,e.MegaGifterCallout=”mega_gifter_callout”,e.ModsDetailsPage=”mods_detail_page”,e.ModerationView=”moderation_view”,e.MonthlyRecapPage=”monthly_recap_page”,e.OfflineBenefitsPage=”offline_benefits_page”,e.PersistentGoalsPanel=”persistent_goals_panel”,e.PremiumContentOverlay=”premium_content_overlay”,e.ScarceEmotesPrompt=”scarce_emotes_prompt”,e.SquadPage=”squad_page”,e.SubscriberVODOverlay=”subscriber_vod_overlay”,e.SubsBroadcasterPage=”subs_broadcaster_page”,e.SubsManagementPage=”subscriptions_management_page”,e.SubBadgeCarouselDescription=”sub_badge_carousel_description”,e.SubGoalUserNotice=”sub_goal_user_notice”,e.GifterBadgeCarouselDescription=”gifter_badge_carousel_description”,e.GiftLeaderBadgeCarouselDescription=”gift_leader_badge_carousel_description”,e.TeamsPage=”teams_page”,e.ThankSubGifterCallout=”thank_sub_gifter_callout”,e.TheatreMode=”theatre_mode”,e.VideoCardPreviewRestriction=”video_preview_card_restriction”,e.ViewerCard=”viewer_card”,e.Unknown=”unknown”,e.WatchPartyPage=”watch_party_page”,e.GiftUpSellChatPrivateCallout=”gift_upsell_chat_private_callout”,e.WalletDropChatPrivateCallout=”wallet_drop_chat_private_callout”,e.ChannelSubSDAUpsell=”channel_sub_SDA_upsell”,e.MultimonthUpsellCallout=”multimonth_upsell_callout”}(r||(r={})),function(e){e.Modal=”modal”,e.Panel=”panel”}(o||(o={})),function(e){e.Achieved=”achieved”,e.Active=”active”}(s||(s={}))},18847:function(e,n,i){“use strict”;i.d(n,{G:function(){return a}});var t=i(733265),a=function(e){return null==e?void 0:e.find((function(e){var n,i;return null===(i=null===(n=null==e?void 0:e.promotion)||void 0===n?void 0:n.eligibilityFilters)||void 0===i?void 0:i.some((function(e){return e.value===t.KH.CHAMBER_FPSO}))}))}},348298:function(e,n,i){“use strict”;i.d(n,{t:function(){return u}});var t=i(331635),a=i(474848),r=i(959340),o=i(914421),s=i(296540),l=i(859406),d=[],u=function(e){function n(n){var i=e.call(this,n)||this;return i.logger=l.x2.logger.withCategory(“toast-manager”),i.state={isError:!1,toastsToShow:d.map((function(e,n){return{Component:e,props:{remove:function(){return i.removeToastAtIndex(n)}}}}))},i}return(0,t.__extends)(n,e),n.prototype.componentDidCatch=function(e,n){var i=this;this.setState({isError:!0},(function(){l.x2.stats.recordComponentError(“ToastManager”),i.logger.errorAndReport(e,”A unhandled exception occurred in the component hierarchy”,{info:n})}))},n.prototype.render=function(){if(this.state.isError)return null;var e=this.state.toastsToShow.map((function(e,n){var i=e.Component,o=e.props;return(0,a.jsx)(r.P,{margin:{bottom:2},children:(0,a.jsx)(i,(0,t.__assign)({},o))},””.concat(i.name).concat(n))}));return 0===e.length?null:(0,a.jsx)(r.P,{className:”toast-manager__container”,position:o.yX.Fixed,flexDirection:o.bo.Column,alignItems:o.k2.Center,justifyContent:o.A9.Center,zIndex:o.Py.Above,children:e})},n.prototype.removeToastAtIndex=function(e){var n=this.state.toastsToShow.slice();n.splice(e,1),this.setState({toastsToShow:n})},n}(s.Component)},59285:function(e,n,i){“use strict”;i.d(n,{v:function(){return s}});var t=i(331635),a=i(980926),r=i(597195),o=i(820257);function s(e,n){var i=this;return function(){return(0,t.__awaiter)(i,void 0,void 0,(function(){var i;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:if((0,o.W)(o.y.LanguageSelection+e)(),!(i=(0,r.eM)(e)))return[3,5];if(!n)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,(0,r.PE)({userID:n,preferredLanguageTag:(0,r.UB)(i)})];case 2:return t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:(0,a.wh)(e),t.label=5;case 5:return window.location.reload(!0),[2]}}))}))}}},820257:function(e,n,i){“use strict”;i.d(n,{W:function(){return o},y:function(){return t}});var t,a=i(331635),r=i(859406);!function(e){e.HomeIcon=”home_icon”,e.Discover=”discover”,e.Following=”following”,e.Browse=”browse”,e.AppDownloads=”app_downloads”,e.TryPrime=”try_prime”,e.GoTurbo=”go_turbo”,e.ThreeDot=”three_dot”,e.PrimeCrown=”prime_crown”,e.NotificationsBell=”notifications_bell”,e.GetBits=”get_bits”,e.AvatarDropdown=”avatar_dropdow”,e.LogIn=”login”,e.SignUp=”signup”,e.Esports=”esports”,e.MusicDirectory=”music_directory”,e.PlayLuna=”play_luna”,e.About=”about”,e.AccessibilityStatement=”accessibility_statement”,e.AdChoices=”ad_choices”,e.Advertisers=”advertisers”,e.Blog=”blog”,e.CommunityGuidelines=”community_guidelines”,e.CookiePolicy=”cookie_policy”,e.Creative=”creative”,e.Developers=”developers”,e.EntityInformation=”entity_information”,e.GermanDisclosure=”german_disclosure”,e.GetDesktop2=”get_desktop2″,e.GiftCard=”giftcard”,e.Help=”help”,e.IGDB=”igdb”,e.Jobs=”jobs”,e.Language=”language”,e.Legal=”legal”,e.Music=”music”,e.Store2=”store2″,e.Luna=”luna”,e.Partners=”partners”,e.Press=”press”,e.PrivacyPolicy=”privacy_policy”,e.PrivacyCenter=”privacy_center”,e.SafetyCenter=”safety_center”,e.Security=”security”,e.Terms=”terms”,e.Turbo=”turbo”,e.TwitchConEU=”twitchcon_eu”,e.TwitchMusic=”twitch_music”,e.LanguageSelection=”language_”,e.Profile=”user_profile”,e.Settings=”user_settings”,e.SocialSharingBadge=”social_sharing_badge”}(t||(t={}));var o=function(e,n){return function(){var i=r.E5.getLastPageview();r.E5.track(“top_nav_click”,(0,a.__assign)({location:null==i?void 0:i.location,button_name:e},n))}}},506673:function(e,n,i){“use strict”;i.r(n),i.d(n,{TOSBottomBanner:function(){return j}});var t=i(331635),a=i(474848),r=i(959340),o=i(914421),s=i(463201),l=i(941084),d=i(973474),u=i(312663),c=i(186396),m=i(505074),v=i(917705),p=i(296540),h=i(415044),f=i(859406),g=i.p+”assets/megaphone-combined-de00824df303ff94d156.svg”,k=i(739604),y=i(733016),S=i(29896),b=i(554043),_=i(876531),x=i(637765),C=i(372880),w=i.n(C),N=i(239483),P=i.n(N),D=i(836677),T=i(760501),I=(0,k.U)({name:”TOSBottomBanner”,category:”identity”}),F=I.Available,E=I.Unavailable,j=function(){var e,n,i=(0,b.d)([b.E.XS,b.E.SM,b.E.MD]),c=i===b.E.XS||i===b.E.SM,m=(0,h.d4)((function(e){var n;return null===(n=e.session.user)||void 0===n?void 0:n.id})),k=(0,x.r)(T.nE,{lastCalledTime:(0,v.subDays)(Date.now(),1).getTime(),itemsToShow:[],isNewUser:!1}),C=k[0],N=k[1],I=C.itemsToShow,j=C.lastCalledTime,A=C.isNewUser,R=(0,S.IT)(P(),{skip:!(0,T.uF)(j)}),H=R.data,O=R.loading,M=(0,S.n_)(w()),B=M[0],U=M[1],V=null===(e=null==H?void 0:H.currentUser)||void 0===e?void 0:e.productConsent,z=”UserConsent”===(null==V?void 0:V.__typename),W=”ProductConsentError”===(null==V?void 0:V.__typename),G=null===(n=null==H?void 0:H.currentUser)||void 0===n?void 0:n.createdAt,q=G&&new Date(G).getTime(),Z=p.useCallback((function(){N({lastCalledTime:j||Date.now(),itemsToShow:[],isNewUser:A})}),[N,j,A]);p.useEffect((function(){if(z){for(var e=[],n=0,i=V.productConsent;n0))return[3,6];t.label=3;case 3:return t.trys.push([3,5,,6]),[4,g()];case 4:return t.sent(),[2,f(e,n,i-1)];case 5:return t.sent(),[2,null];case 6:return[2,null];case 7:return[2]}var s,d,u}))}))}function g(e){return void 0===e&&(e=o.kM),new Promise((function(n){setTimeout((function(){n()}),e)}))}function k(e){return{grant:e,grantType:l.$x4.REFRESH_TOKEN}}function y(e){var n=(0,t.__assign)((0,t.__assign)({mutation:c()},(0,s.AR)(e)),{fetchPolicy:”no-cache”});return a.x2.apollo.client.mutate(n)}var S=null;function b(){return!!(0,r.Ri)(o.RO,”string”)}function _(e){return a.x2.logger.withCategory(e).withCategory(“amazon-auth”)}function x(e,n){return(0,t.__awaiter)(this,void 0,Promise,(function(){var i;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,5,,6]),[4,(r=n,s={scope:[“aiv:playback”,”profile”],scope_data:{“aiv:playback”:{essential:!0}},response_type:”code”},new Promise((function(e){r.Login.authorize(s,(function(n){e(n)}))})))];case 1:return(i=t.sent()).code?[4,f((a=i.code,{grant:a,grantType:l.$x4.AUTHORIZATION_CODE}),e,o.ht)]:[3,3];case 2:return[2,!!t.sent()];case 3:i.error&&e.warn(“Failed to login with Amazon.”,{loginResponse:i}),t.label=4;case 4:return[2,!1];case 5:return t.sent(),e.warn(“Failed to login with Amazon.”),[2,!1];case 6:return[2]}var a,r,s}))}))}function C(e,n){return(0,t.__awaiter)(this,void 0,Promise,(function(){var i,a;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,4,,5]),[4,I(e)];case 1:return(i=t.sent())?[4,v(i,n)]:[3,3];case 2:return(a=t.sent()).profile&&a.profile.PrimaryEmail?[2,N(a.profile.PrimaryEmail)]:(e.warn(“Failed to retrieve profile or no email for Amazon account.”),[2,null]);case 3:return e.warn(“Failed to get access token to make retrieve profile request.”),[2,null];case 4:return t.sent(),e.warn(“Failed to retrieve profile.”),[2,null];case 5:return[2]}}))}))}function w(e){e.Login.logout(),h()}function N(e){if(“”===e)return””;var n=e.split(“@”);if(2!==n.length||0===n[0].length)return””;var i=n[1].split(“.”);return i.length<2||0===i[0].length?"":"".concat(e[0],"****@").concat(i[0][0],"***.").concat(i[i.length-1])}function P(){return new Promise((function(e,n){if(window.amazon)e(window.amazon);else if(window.onAmazonLoginReady=function(){var i=window.amazon;i?(i.Login.setClientId(o.lu),e(i)):n(new Error("could not init lwa sdk library"))},!document.getElementById(o.oP)){var i=document.createElement("script");i.async=!0,i.id=o.oP,i.src=o.Eg,document.body.prepend(i)}}))}function D(e,n){null===S&&(p(e,n),S=setInterval((function(){return p(e,n)}),o.Hu))}function T(){null!==S&&(clearInterval(S),S=null)}function I(e,n){return(0,t.__awaiter)(this,void 0,Promise,(function(){var i,a;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:if(!(i={accessToken:(0,r.Ri)(o.or,"string"),refreshToken:(0,r.Ri)(o.RO,"string")}).refreshToken)return h(),[2,null];if(!n||i.accessToken)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,f(k(i.refreshToken),e,o.ht)];case 2:return(a=t.sent())?[2,a.accessToken]:[2,null];case 3:return t.sent(),[2,null];case 4:return i.accessToken?[2,i.accessToken]:[2,null]}}))}))}function F(){(0,r.zs)(o.or,{domain:(0,d.R2)()})}},21272:function(e,n,i){"use strict";i.d(n,{Lj:function(){return t},Mn:function(){return u},SM:function(){return d},cy:function(){return a}});var t,a,r,o=i(331635),s=i(859406);function l(e){var n=e.watchPartyState?e.watchPartyState.toLowerCase():null,i=e.watchPartyItem?e.watchPartyItem.sessionID:null,t=e.watchPartyItem?e.watchPartyItem.gti:null,a=null;null!==e.doesUserHavePrime&&(a=e.doesUserHavePrime?r.Authed:r.Unauthed);var o=null;return null!==e.didUserAuthorizeAmazon&&(o=e.didUserAuthorizeAmazon?r.Authed:r.Unauthed),{channel_id:Number(e.channelID),prime_user_auth_state:a,pv_device_auth_state:o,watch_party_state:n,watch_party_session_id:i,content_id:t,component_name:e.componentName}}function d(e){s.E5.__track_SSRMigrationFixme("watch_party_component_load",l(e))}function u(e){var n=e.destinationItem?e.destinationItem.gti:null,i=e.destinationItem&&e.destinationItem.type?e.destinationItem.type.toLowerCase():null;s.E5.__track_SSRMigrationFixme("watch_party_component_interaction",(0,o.__assign)((0,o.__assign)({},l(e)),{interaction_type:e.interactionType,destination_item_id:n,destination_item_type:i}))}!function(e){e.BrowseTitlesWidget="browse_titles_widget",e.CatalogDive="catalog_dive",e.CatalogStart="catalog_start",e.ChannelPageBanner="channel_page_banner",e.CreatorAuthorizeDevice="creator_authorize_device",e.CreatorAuthorizeDeviceEnhanced="creator_authorize_device_enhanced",e.NowPlayingWidget="now_playing_widget",e.OverlayAmazonAuth="overlay_amazon_auth",e.OverlayPlayerError="overlay_player_error",e.OverlayPlayerHypeIn="overlay_player_hype_in",e.OverlayPlayerHypeOut="overlay_player_hype_out",e.OverlayPlayerMaturity="overlay_player_maturity",e.OverlayPlayerNoBrowserSupport="overlay_player_no_browser_support",e.OverlayPlayerNoSafariSupport="overlay_player_no_safari_support",e.OverlayPlayerOffline="overlay_player_offline",e.OverlayPlayerRegionBlocked="overlay_player_region_blocked",e.OverlayTwitchLoginOrSignUp="overlay_twitch_login_or_sign_up",e.OverlayTwitchPrimeSignUp="overlay_twitch_prime_sign_up",e.SearchResults="search_results",e.SearchDive="search_results_dive",e.SunlightHUD="sunlight_hud",e.SunlightQuickAction="sunlight_quick_action",e.SunlightStoreCard="sunlight_store_card",e.TitleConfirmation="title_confirmation",e.TitleSelection="title_selection",e.WatchPartyInfoBox="watch_party_info_box",e.WatchPartyPlayer="watch_party_player",e.WatchPartyModal="watch_party_modal"}(t||(t={})),function(e){e.AmazonAuthButton="amazon_auth_button",e.AmazonAuthLogoutButton="amazon_auth_log_out_button",e.BrowseTitlesButton="browse_titles_button",e.CancelButton="cancel_button",e.CatalogBackButton="catalog_back_button",e.CatalogSelectContent="catalog_select_content",e.DismissOverlayButton="dismiss_overlay_button",e.EndWatchPartyButton="end_watch_party_button",e.GoToChannelPageButton="go_to_channel_page_button",e.GoToWatchPartyPageButton="go_to_watch_party_page_button",e.JoinWatchPartyButton="join_watch_party_button",e.OpenInAmazonLink="open_in_amazon_link",e.RefreshPageButton="refresh_page_button",e.SearchBackButton="search_back_button",e.SearchClearButton="search_clear_button",e.SearchQueried="search_queried",e.SelectTitleButton="select_title_button",e.StartWatchPartyButton="start_watch_party_button",e.SunlightCollapseHud="sunlight_collapse_hud_button",e.SunlightOpenCatalogButton="sunlight_open_catalog_button",e.TheaterModeButton="theater_mode_button",e.TwitchLoginOrSignUpButton="twitch_login_or_sign_up_button",e.TwitchPrimeSignUpButton="twitch_prime_sign_up_button",e.OnboardingClickHere="host_onboarding_click_here",e.ModalCloser="watch_party_modal_closer"}(a||(a={})),function(e){e.Authed="authenticated",e.Unauthed="not_authenticated"}(r||(r={}))},803964:function(e,n,i){"use strict";var t;i.d(n,{Ck:function(){return a},hn:function(){return r}}),function(e){e.NarrowMiddle="NarrowMiddle",e.WithOneSideColumn="WithOneSideColumn",e.FullWidth="FullWidth"}(t||(t={}));var a=function(e){return e===t.FullWidth},r=function(e,n){var i=t.FullWidth;return n&&e?i=t.NarrowMiddle:(n||e)&&(i=t.WithOneSideColumn),i}},39059:function(e,n,i){"use strict";i.d(n,{GJ:function(){return m},PR:function(){return h},Sf:function(){return p},W0:function(){return d},d3:function(){return c},hA:function(){return v},hK:function(){return f},k3:function(){return l},v_:function(){return o},zF:function(){return u},zO:function(){return s}});var t=i(474848),a=i(70931),r=(i(296540),i(859406)),o=function(e){return(0,r.hw)("Watch Party content will automatically stream on your channel. Do not use your streaming app to capture the video or audio of Prime Video content. If you do, your channel may be subject to takedown in accordance with Twitch's Community Guidelines and DMCA Guidelines.”,{“x:link-cg”:function(n){return(0,t.jsx)(a.Cb,{linkTo:”https://www.twitch.tv/p/legal/community-guidelines/”,targetBlank:!0,variant:e?a.KD.Overlay:a.KD.Default,children:n})},”x:link-dmca”:function(n){return(0,t.jsx)(a.Cb,{linkTo:”https://www.twitch.tv/p/legal/dmca-guidelines/”,targetBlank:!0,variant:e?a.KD.Overlay:a.KD.Default,children:n})}},”WatchPartyStreamerWarning”)},s=function(e,n){return(0,r.hw)(“Learn more about Prime Video here. Restrictions apply.”,{“x:link”:function(i){return(0,t.jsx)(a.Cb,{linkTo:e,onClick:n,targetBlank:!0,children:i})}},”TwitchPrimeCtaViewerOverlayComponent”)},l=function(e){if(e.series&&e.season&&e.episode)return(0,r.hw)(“{series} S{seasonCount} E{episodeCount}”,{series:e.series,seasonCount:e.season,episodeCount:e.episode},”WatchPartyCatalogTitleSelection”)},d=function(e){return(0,r.hw)(“({numReviews, number})”,{numReviews:e.count},”WatchPartyInfobox”)},u=function(){return(0,r.hw)(“Genres”,”WatchPartyInfobox”)},c=function(){return(0,r.hw)(“Starring”,”WatchPartyInfobox”)},m=function(e){return(0,r.hw)(“This video is included with Prime. By ordering or viewing, you agree to our Terms. Sold by Amazon.com Services LLC”,{“x:link”:function(n){return(0,t.jsx)(a.Cb,{targetBlank:!0,linkTo:e,children:n})}},”WatchPartyInfobox”)},v=function(){return(0,r.hw)(“View more”,”WatchPartyInfobox”)},p=function(e){return(0,r.hw)(“{series} S{season} E{episode}:”,{series:e.series,season:e.season,episode:e.episode},”WatchPartyInfobox”)},h=function(){return(0,r.hw)(“To change category, end your watch party first.”,”WatchPartyStrings”)},f=function(){return(0,r.hw)(“Use the Quick Action to enable”,”WatchPartyStrings”)}},427894:function(e,n,i){“use strict”;i.d(n,{w:function(){return s}});var t=i(474848),a=i(959340),r=i(305528),o=i(833592),s=(i(296540),function(){for(var e=[],n=0;n<9;n++){var i=(0,t.jsx)(a.P,{padding:{bottom:2},children:(0,t.jsx)(r.Or,{height:320,width:320})},n);e.push(i)}return(0,t.jsx)(o.o8,{center:!0,noGrow:!0,childWidth:o.k7.Large,gutterSize:o.J0.ExtraSmall,placeholderItems:9,children:e})})},232276:function(e,n,i){"use strict";i.d(n,{n:function(){return k}});var t=i(331635),a=i(474848),r=i(672972),o=i(959340),s=i(914421),l=i(235233),d=i(246942),u=i.n(d),c=i(296540),m=i(415044),v=i(876531),p=i(131869),h=i(345771),f=i(628346),g=i(239796),k=function(e){var n,i,d=c.useContext(f.dj).videoPlayerMaxHeightStyleValue,k=c.useContext(p.DV),y=c.useContext(g.vC).isAdShowing,S=(0,m.d4)((function(e){return e.ui.theatreModeEnabled})),b=(0,m.d4)((function(e){return e.ui.rightColumnExpanded})),_=(0,m.d4)((function(e){return e.ui.channelHomeLive})),x=(0,m.d4)((function(e){return e.ui.channelHomeCarousel})),C=null===(n=null==k?void 0:k.placements)||void 0===n?void 0:n.ribbon,w=!!C&&(0,h.ii)(C.isActivationV2);k&&k.campaignSettings&&C&&k.canShowChannelSkins&&w&&C.fragment.backgroundType!==v.dR0.UNSPECIFIED&&C.fragment.backgroundType!==v.dR0.ASSET&&!y&&(i=(0,r.m9)(C.fragment.colorHexCode).inputColor||void 0);var N=u()("channel-page__video-player",{"channel-page__video-player--host-player-above-chat":e.showHostPlayerAboveChat,"channel-page__video-player--home-live":_,"channel-page__video-player--home-carousel":x,"channel-page__video-player--theatre-mode":S||!1,"channel-page__video-player--theatre-mode-right-column-collapsed":S&&!b,"channel-page__video-player--with-border":!!i}),P=(0,t.__assign)((0,t.__assign)({},d?{maxHeight:d}:{}),i?{background:"\n radial-gradient(ellipse 200px 300px at bottom left, var(--color-background-base) 0%, var(--color-background-base) 30%, transparent 60%),\n linear-gradient(180deg, var(--color-background-base) 0%, transparent 50%),\n linear-gradient(135deg, ".concat(i," 0%, transparent 70.71%),\n linear-gradient(90deg, var(--color-background-base) 0%, ").concat(i," 100%),\n ").concat(i,"\n "),padding:"10px 10px 0 10px"}:{});return(0,a.jsx)(o.P,{className:N,flexWrap:s.I4.NoWrap,fullHeight:S,fullWidth:!0,position:S?s.yX.Fixed:s.yX.Relative,style:P,children:(0,a.jsx)(l.j$,{children:e.children})})}},209186:function(e,n,i){"use strict";i.d(n,{I:function(){return s}});var t=i(474848),a=(i(296540),i(859406)),r=i(310006),o=i(876531),s=(0,i(203340).z)("ChannelPage",{autoReportInteractive:!0,destination:"channel.index.index",location:"channel"})((function(e){var n,i=e.reason,s=(0,a.hw)("This channel has been closed by the user.","ChannelPageNotFound"),l=(0,a.hw)("This channel is temporarily unavailable due to a violation of Twitch's Community Guidelines or Terms of Service.","ChannelPageNotFound"),d=(0,a.hw)("This channel is currently unavailable due to a violation of Twitch's Community Guidelines or Terms of Service.","ChannelPageNotFound"),u=(0,a.hw)("Content from this channel has been removed at the request of the copyright holder.","ChannelPageNotFound");switch(i){case o.nCz.DEACTIVATED:n=s;break;case o.nCz.DMCA:n=u;break;case o.nCz.TOS_INDEFINITE:n=d;break;case o.nCz.TOS_TEMPORARY:n=l}return(0,t.jsx)(r.PageNotFound,{overrideMessage:n})}))},224261:function(e,n,i){"use strict";var t;i.d(n,{dk:function(){return r},tU:function(){return a},zd:function(){return t}}),function(e){e.Video="video",e.Clip="clip",e.Collection="collection"}(t||(t={}));var a,r=new Set([t.Video,t.Clip,t.Collection]);Array.from(r).join("|");!function(e){e.About="about",e.Clips="clips",e.Videos="videos",e.Collections="collections",e.Followers="followers",e.Following="following",e.Schedule="schedule",e.Benefits="benefits"}(a||(a={}));new Set([a.About,a.Clips,a.Videos,a.Collections,a.Followers,a.Following,a.Benefits])},827876:function(e,n,i){"use strict";i.d(n,{BQ:function(){return u},oY:function(){return d}});var t=i(331635),a=i(474848),r=i(296540),o=i(265827),s={corePlayerBehavior:{pauseWhenModalShowing:!1},setCorePlayerBehavior:function(){return null},playerAPI:void 0,setPlayerAPI:function(){return null}},l=(0,o.q)("CorePlayerContext",s),d=(l.withContext,l.context),u=function(e){var n=s.corePlayerBehavior,i=r.useState(n),o=i[0],l=i[1],u=function(e){l((function(n){return(0,t.__assign)((0,t.__assign)({},n),e)}))},c=r.useState(),m=c[0],v=c[1],p=r.useMemo((function(){return{corePlayerBehavior:o,setCorePlayerBehavior:u,playerAPI:m,setPlayerAPI:v}}),[m,o]);return(0,a.jsx)(d.Provider,{value:p,children:e.children})}},646021:function(e,n,i){"use strict";i.d(n,{d7:function(){return J}});var t=i(331635),a=i(474848),r=i(296540),o=i(415044),s=i(859406),l=i(621790),d=i(118021),u=i(12109),c=i(345771),m=i(806677),v=i(147134),p=i(908713),h=i(654195),f=i(360485),g=i(959340),k=i(914421),y=i(868238),S=i(844023),b=i(666201);var _=null,x=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={userHasDismissedContent:!1},n.logger=s.vF.withCategory("PersistentPlayer"),n.setDomRef=function(e){return n.domRef=e},n.onMiniPlayerDismiss=function(){n.transitionToAnchoredPlayer(),n.setState({userHasDismissedContent:!0})},n.onMiniPlayerExpand=function(){n.props.scrollToTop()},n.getPersistentPlayerOverrides=function(){return{onMiniPlayerDismiss:n.onMiniPlayerDismiss,onMiniPlayerExpand:n.onMiniPlayerExpand}},n}return(0,t.__extends)(n,e),n.prototype.componentDidMount=function(){var e=this;_&&this.logger.errorAndReport(new Error,"there should only ever be one rendered at a time. Verify that no other component above or below this in the tree has rendered one as well.”),_=this,b.l||this.logger.errorAndReport(new Error,”No found. Make sure it is mounted in the Root component”),this.unregister=this.props.registerReceiver(this),b.l.requestVideoContent({ref:this.domRef,options:this.props,overrides:this.getPersistentPlayerOverrides(),onCompletion:function(){return e.transitionToAnchoredPlayer()}}),this.props.repositionPlayerRef&&this.props.repositionPlayerRef(this.reposition)},n.prototype.componentDidUpdate=function(e){b.l.requestVideoContent({ref:this.domRef,options:this.props,overrides:this.getPersistentPlayerOverrides()}),this.props.repositionPlayerRef&&this.props.repositionPlayerRef!==e.repositionPlayerRef&&this.props.repositionPlayerRef(this.reposition)},n.prototype.componentWillUnmount=function(){var e,n=this;if(null===(e=this.unregister)||void 0===e||e.call(this),this.props.repositionPlayerRef&&this.props.repositionPlayerRef(null),this.props.disablePersistenceOnUnmount||this.state.userHasDismissedContent||!this.props.persistentPlayerEnabled)return b.l.destroyPlayer(),void(_=null);var i=this.props,t={playerProps:i.playerProps,miniPlayerTitle:i.miniPlayerTitle,miniPlayerContentRoute:i.miniPlayerContentRoute,isShowingWatchPartyInMain:i.isShowingWatchPartyInMain,isRightColumnHidden:i.isRightColumnHidden,videoPlayerMaxHeightStyleValue:i.videoPlayerMaxHeightStyleValue,channelWatchReservedHeight:i.channelWatchReservedHeight};b.l.requestVideoContent({ref:this.domRef,options:t,onCompletion:function(){return n.transitionToMiniPlayer()}}),_=null},n.prototype.render=function(){return(0,a.jsx)(g.P,{position:k.yX.Absolute,attachBottom:!0,attachLeft:!0,attachRight:!0,attachTop:!0,ref:this.setDomRef,”data-target”:”persistent-player-content”})},n.prototype.transitionToMiniPlayer=function(){b.l.transitionToMiniPlayer()},n.prototype.transitionToAnchoredPlayer=function(){b.l.transitionToAnchoredPlayer()},n.prototype.isMini=function(){return b.l.state.mini},n.prototype.checkVisible=function(e,n){var i=this.props.getScrollContent();if(n&&i){var t=this.domRef.getBoundingClientRect(),a=i.getBoundingClientRect(),r=t.top+t.height-a.top;r<=100&&this.props.persistentPlayerEnabled&&!this.isMini()&&!this.props.disablePersistenceOnScroll&&!this.state.userHasDismissedContent&&this.transitionToMiniPlayer(),r>100&&(this.isMini()&&this.transitionToAnchoredPlayer(),this.state.userHasDismissedContent&&this.setState({userHasDismissedContent:!1}))}},n.prototype.reposition=function(){b.l.reposition()},n}(r.PureComponent),C=(0,y.Zz)((0,S.UJ)((function(e){return{registerReceiver:e.registerReceiver,getScrollContent:e.getScrollContent,scrollToTop:e.scrollToTop}})),(0,o.Ng)((function(e){return{theme:e.ui.theme,persistentPlayerEnabled:e.ui.persistentPlayerEnabled}})))(x),w=i(929843),N=i(326984),P=i(614183),D=i(263586),T=i(62026),I=i(339563),F=i(212276),E=i(331337),j=i(249448),L=i(272285),A=i(213912),R=i(706411),H=i.n(R),O=i(232276),M=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.mouseTrapInstance=null,n.toggleTheatreMode=function(){n.props.theatreModeEnabled?n.props.onTheatreModeDisabled():n.props.onTheatreModeEnabled()},n.disableTheatreMode=function(){n.props.theatreModeEnabled&&n.props.onTheatreModeDisabled()},n}return(0,t.__extends)(n,e),n.prototype.componentDidMount=function(){this.mouseTrapInstance=new(H()),this.mouseTrapInstance.bind(“alt+t”,this.toggleTheatreMode),this.mouseTrapInstance.bind(“esc”,this.disableTheatreMode)},n.prototype.componentWillUnmount=function(){this.mouseTrapInstance&&(this.mouseTrapInstance.unbind(“alt+t”),this.mouseTrapInstance.unbind(“esc”))},n.prototype.render=function(){return(0,a.jsx)(O.n,(0,t.__assign)({},this.props))},n}(r.Component);var B=(0,o.Ng)((function(e){return{theatreModeEnabled:e.ui.theatreModeEnabled}}),(function(e){return(0,y.zH)({onTheatreModeDisabled:A.lq,onTheatreModeEnabled:A._H},e)}))(M),U=i(628346),V=i(29896),z=i(148223),W=i(876531),G=i(441663),q=i.n(G),Z=i(802116),Q=i.n(Z),K=i(672498),Y=i(880428);function X(e){var n,i=e.clipSlug,t=r.useState(0),a=t[0],o=t[1],l=r.useState(!1),d=l[0],u=l[1],c=r.useState(0),m=c[0],v=c[1],p=r.useState(Date.now()),h=p[0],f=p[1],g=r.useState(!1),k=g[0],y=g[1],S=r.useState(0),b=S[0],_=S[1],x=(0,V.n_)(Q())[0],C=(0,V.IT)(q(),{variables:{slug:i||””},skip:!i}).data;(0,r.useEffect)((function(){o(0),v(0),y(!1),f(Date.now()),_(0)}),[i]);var w=(0,K.PS)(null!==(n=null==C?void 0:C.clip)&&void 0!==n?n:null);var N=r.useCallback((function(e){var n,i,t=1e3*e,r=Date.now()-h,s=a>t?0:t-a;d&&v((function(e){return e+s})),r>=(n=a,(i=Math.floor(n/1e3))<=10?2e3:i<=30?5e3:1e4)&&t>=2e3&&(Y.Z.emit(“watchInterval”,{muteDurationSeconds:Math.floor(m/1e3),secondsSinceLastWatch:k?Math.floor(r/1e3):0,totalSecondsWatched:Math.floor(b/1e3),clipOffset:Math.floor(t/1e3)}),y(!0),f(Date.now())),_((function(e){return e+s})),o(t)}),[a,k,d,h,m,b]),P=r.useCallback((function(){Y.Z.emit(“feedCompletion”,{}),o(0),y(!1),f(Date.now())}),[]),D=r.useCallback((function(){var e,n=Math.floor(a/1e3),i=Date.now()-h;w&&x({variables:{input:{context:(0,Y.s)({item:w,pageview:null!==(e=s.E5.getLastPageview())&&void 0!==e?e:null}),feedLocation:W._fN.CLIPS,sessionID:s.x2.session.appSessionID,interactions:[{feedWatchInput:{impressionID:w.itemID,totalSecondsWatched:Math.floor(b/1e3),interactionReason:W.g1o.EXIT,itemID:w.itemID,itemType:W.Auz.CLIP,clipOffset:n,muteDurationSeconds:Math.floor(m/1e3),secondsSinceLastWatch:k?Math.floor(i/1e3):0},feedInteractionType:W.TIs.FEED_WATCH,interactionID:(0,z.k3)()}]}}}),o(0),v(0),y(!1),f(Date.now()),_(0)}),[a,k,h,m,w,x,b]),T=r.useCallback((function(e){0!==a&&(Y.Z.emit(e?”pause”:”unpause”,{totalSecondsWatched:Math.floor(a/1e3)}),y(!0),f(Date.now()))}),[a]),I=r.useCallback((function(e){u(e)}),[u]),F=r.useCallback((function(){Y.Z.emit(“watchImpression”,{})}),[]);return{currentVideoTimeMs:a,setCurrentVideoTimeMs:o,mutedWatchTimeMs:m,setMutedWatchTimeMs:v,lastWatchTimeReported:h,setLastWatchTimeReported:f,hasWatchReportBeenSent:k,setHasWatchReportBeenSent:y,handleVideoTimeChange:N,handlePlaybackEnded:P,handleDestroy:D,handlePauseToggled:T,handleReady:F,handleMuteToggled:I}}var $=i(827876),J=(0,w.dC)((function(e){return{isShowing:e.isShowing,onMainPlayerAdPodEnd:e.onMainPlayerAdPodEnd,onMainPlayerAdPodStart:e.onMainPlayerAdPodStart,onMainPlayerContentRestricted:e.onMainPlayerContentRestricted,onMainPlayerContentClassificationChange:e.onMainPlayerContentClassificationChange,onMainPlayerPlay:e.onMainPlayerPlay,onMainPlayerPause:e.onMainPlayerPause,onMainPlayerInit:e.onMainPlayerInit}}))((function(e){var n=(0,o.wA)(),i=(0,o.d4)((function(e){return e.ui.channelHomeLive})),g=(0,o.d4)((function(e){return e.ui.channelHomeCarousel})),k=r.useContext($.oY),y=k.playerAPI,S=k.corePlayerBehavior,b=k.setPlayerAPI,_=(0,h.sL)(),x=_.content,w=_.setPlayerContent,A=_.setPlaybackID;(0,d.$)((function(){var n=null==y?void 0:y.getPlayerMetadata().latencyToBroadcaster;n&&e.updateLatency&&e.updateLatency(n)}),e.isShowingWatchPartyInMain?1e3:null);var R=(0,N.U0)(),H=R.displaySDAUpsell,O=R.closeSDAUpsell,M=r.useContext(U.dj),V=M.channelWatchReservedHeight,z=M.videoPlayerMaxHeightStyleValue,W=(0,r.useState)(window.location.pathname),G=W[0],q=W[1];(0,r.useEffect)((function(){q(window.location.pathname),A()}),[e.channelLogin,e.videoID,e.clipSlug,A]);var Z=(0,r.useState)(void 0),Q=Z[0],K=Z[1],Y=(0,r.useRef)(null),J=e.onVideoTimeChange,ne=e.clipOffset,ie=e.clipSlug,te=X({clipSlug:ie}),ae=e.channelLogin,re=e.channelId,oe=e.videoID,se=e.archiveVideoID,le=e.collectionID,de=e.clipLocation,ue=e.videoOffset,ce=e.trailerType,me=e.autohost,ve=r.useCallback((function(e){var i=Math.floor(e);i!==Y.current&&(Y.current=i,J&&J(i),ie&&te.handleVideoTimeChange(e),ne&&(i=i+ne-1),n((0,D.SC)(i)))}),[ne,n,J,ie,te]),pe=(0,r.useCallback)((function(){return oe&&le?{type:F.FC.Collection,collectionID:le,vodID:oe,videoOffset:ue}:oe?{type:F.FC.VOD,vodID:oe,vodType:ce,videoOffset:ue}:ie?{type:F.FC.Clip,clipSlug:ie,videoOffset:ue,clipLocation:de}:ae&&me?{type:F.FC.Live,channelLogin:ae,autohost:me}:ae?{type:F.FC.Live,channelLogin:ae,dvrVideoID:(0,f.Sw)()&&se||void 0}:{type:F.FC.Invalid}}),[ae,oe,se,le,ie,de,ue,ce,me]),he=e.onMainPlayerPause,fe=e.onMainPlayerPlay,ge=r.useCallback((function(e){e&&he?he():!e&&fe&&fe(),ie&&te.handlePauseToggled(e)}),[he,fe,ie,te]),ke=E.C.Site;e.type?ke=e.type:g?ke=E.C.ChannelHomeCarousel:i?ke=E.C.ChannelHomeLive:e.isShowingWatchPartyInMain&&(ke=E.C.WatchPartyHost);var ye=function(e){var n=e.clipSlug;return r.useMemo((function(){if(n)return{medium:”clips_watch_page”}}),[n])}(e),Se=function(e){var n=e.trailerType,i=e.clipIsFeatured;return r.useMemo((function(){return n?{content:”channel_home_carousel”,medium:”channel_home”}:void 0!==i?{is_clip_featured:i}:void 0}),[n,i])}(e);(0,r.useEffect)((function(){var e=pe();w(e)}),[pe,w]);var be=(null==x?void 0:x.type)!==F.FC.Live?ve:void 0,_e=r.useMemo((function(){var n=(0,t.__assign)((0,t.__assign)({is_pbyp:e.isShowing},Se),{guest_star_session_id:e.guestStarSessionID,guests_pushed_to_obs:e.guestStarGuestCount,collaboration_eligibility:e.collaborationEligibility});return e.itemTrackingID&&(n.item_tracking_id=e.itemTrackingID),n}),[e.collaborationEligibility,e.guestStarGuestCount,e.guestStarSessionID,e.isShowing,e.itemTrackingID,Se]),xe=r.useMemo((function(){var n;return(0,t.__assign)((0,t.__assign)({},S),{applyChannelWatchOptimizations:e.isWatch,disableAudio:e.disableAudio,disableAutoplay:e.disableAutoplay,disableStreamInfoTags:!0,disableLastActionOverlay:i,disableMultiviewButton:i,disableKeyboardShortcuts:i,disableStatusOverlay:i,disableDoubleClickFullscreen:g,disableRecommendations:g,disableTheatreMode:g,disableStatusIndicator:(0,j.lp)(null!=x?x:pe()),forceControlVisibility:i?I.Ie.Hidden:void 0,shouldFullscreenRoot:e.isWatch,enableExtensions:!g&&!i,enableStreamDisplayAds:!g&&!i,trackingProperties:_e,linkTrackingContext:ye,enableCelebrations:!0,enableOneTap:e.isWatch,enableChannelSkinsVideoOverlay:(0,u.fX)(c.jI),costreamerOverlay:e.costreamerStatus?{channelId:re,channelLogin:e.channelLogin,channelDisplayName:e.channelDisplayName,organizerId:e.organizerId,organizerLogin:e.organizerLogin,organizerDisplayName:e.organizerDisplayName,status:e.costreamerStatus,isCurrentUserLive:e.isCurrentUserLive,showOverlay:!!e.showCostreamOverlay,setShowOverlay:null!==(n=e.setShowCostreamOverlay)&&void 0!==n?n:function(){}}:void 0})}),[S,e.isWatch,e.disableAudio,e.disableAutoplay,e.costreamerStatus,re,e.channelLogin,e.channelDisplayName,e.organizerId,e.organizerLogin,e.organizerDisplayName,e.isCurrentUserLive,e.showCostreamOverlay,e.setShowCostreamOverlay,i,g,x,pe,_e,ye]),Ce=e.isShowingWatchPartyInMain,we=e.onMainPlayerContentRestricted,Ne=e.onMainPlayerContentClassificationChange,Pe=e.onMainPlayerAdPodStart,De=e.onMainPlayerAdPodEnd,Te=e.setAdContext,Ie=e.onMainPlayerInit,Fe=e.setVideoFetchFailed,Ee=r.useCallback((function(e){b(e),Ie(e)}),[Ie,b]),je=r.useCallback((function(e){Pe(e),null==Te||Te({adID:e.adID,isAdShowing:!0,sessionID:e.sessionID}),O(),K(e.adFormat)}),[Pe,Te,O]),Le=r.useCallback((function(e){De(e),null==Te||Te({adID:void 0,isAdShowing:!1,sessionID:void 0}),Q!==T.Z$.STANDARD_AUDIO&&(0,P.Mj)()&&H()}),[De,Te,Q,H]),Ae=e.onContentClassificationChange,Re=(0,r.useCallback)((function(e){null==Ae||Ae(e),Ne(e)}),[Ae,Ne]),He=function(e){var n=e.channelLogin,i=e.channelId,t=(0,v.pP)(n),a=(0,m.Z)(t),o=(0,r.useState)(null),l=o[0],d=o[1],u=(0,r.useCallback)((function(e){var n,a,r;return s.E5.track(“costreaming_video_play”,{broadcast_id:e.properties.broadcast_id,channel_id:null!=i?i:””,costream_organizer_broadcast_id:null!==(a=null===(n=null==t?void 0:t.organizer.stream)||void 0===n?void 0:n.id)&&void 0!==a?a:””,costream_organizer_channel_id:null!==(r=null==t?void 0:t.organizer.id)&&void 0!==r?r:””})}),[i,t]),c=(0,r.useCallback)((function(e){(0,p.Q)()&&n?t?u(e):d({channelLogin:n,videoPlayEvent:e}):d(null)}),[n,t,u]);return(0,r.useEffect)((function(){!a&&t&&l&&(l.channelLogin===n&&u(l.videoPlayEvent),d(null))}),[n,t,a,l,u]),c}({channelLogin:ae,channelId:re}),Oe=(0,r.useCallback)((function(e){“video-play”===e.name&&He(e)}),[He]),Me=r.useMemo((function(){return{onSeek:be,onVideoTimeChange:be,onPauseToggled:ge,onInit:Ee,onContentRestricted:we,onContentClassificationChange:Re,onAdStart:je,onAdEnd:Le,onAnalyticsEvent:Oe,onFetchVideoSourceFailure:function(){return null==Fe?void 0:Fe(!0)},onMuteToggled:ie?te.handleMuteToggled:void 0,onPlaybackEnded:ie?te.handlePlaybackEnded:void 0,onDestroy:ie?te.handleDestroy:void 0}}),[Le,je,Oe,Re,Ee,we,ge,be,Fe,ie,te]),Be=r.useMemo((function(){return{content:null!=x?x:pe(),behaviors:Ce?L.zd:xe,callbacks:Me,type:ke}}),[x,pe,Ce,xe,Me,ke]);return(0,a.jsxs)(B,{showHostPlayerAboveChat:e.isShowingWatchPartyInMain,children:[(0,a.jsx)(C,{repositionPlayerRef:e.setRepositionPlayer,disablePersistenceOnUnmount:e.disablePersistenceOnUnmount,disablePersistenceOnScroll:!0,playerProps:Be,miniPlayerTitle:ee(e),miniPlayerContentRoute:G,isShowingWatchPartyInMain:!!e.isShowingWatchPartyInMain,isRightColumnHidden:!!e.isRightColumnHidden,videoPlayerMaxHeightStyleValue:z,channelWatchReservedHeight:V}),(0,a.jsx)(l.$,{onResize:e.triggerPlayerReposition,debounceMs:50})]})}));function ee(e){var n=e.channelLogin,i=e.displayName||n;return i?(0,s.hw)(“Watching {channelName}”,{channelName:i},”ChannelShell”):””}},288922:function(e,n,i){“use strict”;i.d(n,{Yw:function(){return oe}});var t=i(474848),a=i(296540),r=i(415044),o=i(859406),s=i(508952),l=i(638230),d=i(910889),u=i(198437),c=i(368770),m=i(637765),v=i(644021),p=i(131869),h=i(10453),f=i(93344),g=(i(648634),i(293485)),k=i(106078),y=i(733265),S=i(160173),b=i(912701),_=i(529446),x=i(344567),C=i(18847),w=i(968008),N=i(29896),P=i(629166),D=i.n(P),T=i(953702),I=i.n(T),F=i(115821),E=function(e){if(0===e)return!0;var n=!1;if(0!==e)try{var i=new Date(e);if(!isNaN(i.getTime())){var t=new Date,a=Math.abs(t.getTime()-i.getTime());n=a<=432e6}}catch(e){return!1}return n},j=i(914421),L=i(959340),A=i(882197),R=i(732574),H=i(36935),O=i(312663),M=i(97774),B=i(949530),U=i(477204),V=i(812444),z=i(479544),W=i(706166),G=i(732750),q="giftExpirationCallout--Y94PX",Z="giftExpirationCalloutFinale--TZ3uy",Q="giftExpirationCalloutCreatorLed--MnvcU",K="giftExpirationCalloutYellow--zLJ1q",Y="giftExpirationSparklesRight--ARizV",X="giftExpirationSparklesTopRight--ZgDxp",$="giftExpirationSparklesMiddle--ZjT_7",J="giftExpirationSparklesLeft--Z5Leg",ee=function(e,n){switch(e){case y.KH.CHAMBER_FPSO:return K;case y.KH.CREATOR_LED:return Q;default:return n?Z:q}},ne=function(e){var n,i,r,s,l,d=e.offer,u=e.channelDisplayName,c=e.isLowerWatch,m=e.channelID,v=d.promotion.endAt,p=v?new Date(v):void 0,h=(0,z.b1)(p),f=null===(r=null===(i=null===(n=d.promotion)||void 0===n?void 0:n.eligibilityFilters)||void 0===i?void 0:i.find((function(e){return!!e.value})))||void 0===r?void 0:r.value,g=null===(l=null===(s=d.promotion)||void 0===s?void 0:s.promoDisplay)||void 0===l?void 0:l.discountPercent;if(a.useEffect((function(){f&&g&&o.E5.track("commerce_promotion_banner_impression",(0,V.x)(V.b.CHANNEL_PAGE,d,m))}),[d,m,g,f]),!f||!g)return null;var k,S=function(e){switch(e){case y.KH.CHAMBER_FPSO:return[{className:J,imageSrc:(0,B.n)("sprites-commerce-star-1-17.png"),containerQueries:[{minWidth:"500px",props:{display:j.nl.Block}}]},{className:Y,imageSrc:(0,B.n)("sprites-commerce-star-1-17.png")}];case y.KH.CREATOR_LED:return[{className:$,imageSrc:(0,B.n)("star-unoptimized.png"),containerQueries:[{minWidth:"600px",props:{display:j.nl.Block}}]},{className:X,imageSrc:(0,B.n)("Sprites - Stars 01-17.png"),containerQueries:[{minWidth:"780px",props:{display:j.nl.Block}}]}];case y.KH.EXPIRING_GIFT:return[{className:J,imageSrc:(0,B.n)("sprites-commerce-star-1-17.png"),containerQueries:[{minWidth:"500px",props:{display:j.nl.Block}}]},{className:Y,imageSrc:(0,B.n)("sprites-commerce-star-1-17.png")}];default:return[]}}(f),b=function(e,n,i,t){return e===y.KH.CHAMBER_FPSO&&n?(0,o.hw)("Just for You: Get {percent, number}% Off Your First Sub",{percent:n},"ExpiringGiftCallout"):e===y.KH.EXPIRING_GIFT&&n?t?(0,o.hw)("Less than 48 Hours of Savings Left","PromotionCallout"):(0,o.hw)("Gift subs for them, {percent, number}% off for you.",{percent:n},"PromotionCallout"):e===y.KH.CREATOR_LED?i?(0,o.hw)("{channelDisplayName}'s Limited Time Discount!",{channelDisplayName:i},"ExpiringGiftCallout"):(0,o.hw)("Limited Time Discount!","ExpiringGiftCallout"):void 0}(f,g,u,h),_=function(e,n,i,a){if(e===y.KH.CHAMBER_FPSO&&n)return(0,o.hw)("Get {percent, number}% off your first channel subscription. Limited time offer. {terms}",{percent:n,terms:(0,t.jsx)(U.f,{filter:e})},"ExpiringGiftCallout");if(e===y.KH.EXPIRING_GIFT&&n){if(i)return(0,o.hw)("Don't miss the final days to save {percent, number}% on gift sub bundles. {terms}",{percent:n,terms:(0,t.jsx)(U.f,{filter:e})},"PromotionCallout");if(a)return(0,o.hw)("Get {percent,number}% off 5+ gift subs until {endDate}. {terms}",{percent:n,endDate:(0,o.Yq)(a,{month:"numeric",day:"numeric",hour:"numeric",timeZone:"America/Los_Angeles",timeZoneName:"short"}),terms:(0,t.jsx)(U.f,{filter:e})},"PromotionCallout")}return e===y.KH.CREATOR_LED&&n?(0,o.hw)("Get {percent, number}% off 5 or more Gift Subs. {terms}",{percent:n,terms:(0,t.jsx)(U.f,{filter:e})},"ExpiringGiftCallout"):void 0}(f,g,h,p);return(0,t.jsx)(L.P,{display:j.nl.Flex,justifyContent:j.A9.Center,children:(0,t.jsx)(A.e,{theme:(k=f,k===y.KH.CHAMBER_FPSO?"light":"dark"),margin:c?{bottom:2,left:2,right:2,top:1}:{bottom:2},borderRadius:M.Z.XLarge,overflow:j.nE.Hidden,display:j.nl.Flex,width:"100%",maxWidth:"120rem",children:(0,t.jsx)(L.P,{width:"100%",containerType:"inline-size",children:(0,t.jsxs)(L.P,{className:ee(f,h),display:j.nl.Flex,borderRadius:{topLeft:M.Z.XLarge,topRight:M.Z.XLarge,bottomRight:M.Z.XLarge},width:"100%",padding:{x:2,y:1},position:j.yX.Relative,flexDirection:j.bo.ColumnReverse,justifyContent:j.A9.Between,gap:1,alignItems:j.k2.Start,containerQueries:[{minWidth:"500px",props:{flexDirection:j.bo.Row,alignItems:j.k2.Center}}],children:[(0,t.jsxs)(L.P,{display:j.nl.Flex,flexShrink:1,gap:2,alignItems:j.k2.Center,flexDirection:j.bo.ColumnReverse,justifyContent:j.A9.Start,width:"100%",containerQueries:[{minWidth:"500px",props:{flexDirection:j.bo.Row}}],children:[f===y.KH.EXPIRING_GIFT&&(0,t.jsx)(L.P,{display:j.nl.Flex,justifyContent:j.A9.End,flexShrink:0,width:"100%",containerQueries:[{minWidth:"500px",props:{width:"100px"}}],children:(0,t.jsx)(L.P,{width:"87px",display:j.nl.Flex,containerQueries:[{minWidth:"500px",props:{alignSelf:j.gB.End}}],children:(0,t.jsx)(R.g,{width:"100%"})})}),(0,t.jsx)(L.P,{display:j.nl.Flex,flexDirection:j.bo.Row,width:"100%",alignItems:j.k2.Start,position:j.yX.Relative,style:{zIndex:1},flexShrink:1,borderRadius:M.Z.Large,children:(0,t.jsxs)(L.P,{display:j.nl.Flex,flexDirection:j.bo.Column,alignItems:j.k2.Start,children:[(0,t.jsx)(H.hE,{size:H.uM.Title,children:b}),(0,t.jsx)(O.N,{fontSize:j.Z4.Size4,margin:{top:.5},children:_})]})})]}),(0,t.jsx)(L.P,{position:j.yX.Relative,display:j.nl.Flex,style:{zIndex:1},"min-width":"100px",height:"30px",flexShrink:0,justifyContent:j.A9.Start,containerQueries:[{minWidth:"500px"}],children:p&&(0,t.jsx)(W.t,{expirationDate:p,styleSelector:(0,G.zK)(f)})}),S.map((function(e,n){return(0,t.jsx)(L.P,{className:e.className,containerQueries:e.containerQueries,children:(0,t.jsx)(B.B,{children:(0,t.jsx)("img",{src:e.imageSrc,alt:(0,z.wq)()})})},"sprite-".concat(n))}))]})})})})},ie=i(616461),te=i.n(ie),ae=s.x.wrap((function(){return i.e(23333).then(i.bind(i,784633))}),"TargetedPromotionBanner",{placeholder:null,failSilently:!0}),re=s.x.wrap((function(){return Promise.all([i.e(50025),i.e(50457)]).then(i.bind(i,708486))}),"CreatorWalletPromoCallout",{placeholder:null,failSilently:!0}),oe=function(e){var n,i,s,P,T,j,L,A=e.channelLogin,R=e.channelID,H=e.userLogin,O=e.channelDisplayName,M=e.isLowerWatch,B=(0,r.d4)((function(e){var n;return null===(n=(0,c.wz)(e))||void 0===n?void 0:n.id})),U=a.useState(void 0),V=U[0],z=U[1],W=function(e){var n=(0,N.IT)(te(),{variables:{login:e,includeExpiredDunning:!0}});return{data:n.data,loading:n.loading}}(A),G=W.data,q=W.loading;(0,d.s)({topic:(0,u.eG)(B||""),skip:!B,onMessage:function(e){e.channel_id===R&&z({channelID:e.channel_id,promotionID:e.promotion_id,offerIDs:e.offer_ids_by_platform.WEB,discountPercent:e.discount_percent,endsAt:e.expired_at})}}),(0,d.s)({topic:(0,u.CH)(B||""),skip:!B,onMessage:function(e){e.channel_id===R&&e.user_id===B&&z(void 0)}});var Z=(0,v.L)({id:"creator-wallet-callout-banner-promotion",startDate:new Date(2025,4,1),endDate:new Date(2099,11,31)}),Q=Z.markAsSeen,K=Z.seen,Y=function(e,n){var i,t=(0,l._)("creator-wallet-video-banner-promo","boolean",!1),r=o.IG.get("creator_wallet_banner_promo_first_seen",0),s=(0,a.useMemo)((function(){return E(r)}),[r]),d=(0,N.IT)(D(),{skip:!t.value||!s||e,variables:{channelID:n},defaultOptions:{fetchPolicy:"cache-first"}}).data,u=null===(i=null==d?void 0:d.hasSpendableBalanceVideoBannerPromoEligibility)||void 0===i?void 0:i.isEligible,c=(0,N.IT)(I(),{skip:!t.value||!u||!s||e,variables:{channelID:n},defaultOptions:{fetchPolicy:"cache-and-network"}});return{data:c.data,refetch:c.refetch,isEligible:u,withinFiveDaysOfLaunch:s,isActive:t.value}}(K,null!=B?B:""),X=Y.data,$=Y.refetch,J=function(e,n,i,t,a){var r,o,s;if(!i)return!1;if(!n)return!1;if(!E(t))return!1;var l=!1;if(null===(o=null===(r=null==e?void 0:e.payoutThresholdEarningsResolver)||void 0===r?void 0:r.previousMonthAccrual)||void 0===o?void 0:o.earnedAmount){var d=(0,F.H)(null===(s=e.payoutThresholdEarningsResolver)||void 0===s?void 0:s.previousMonthAccrual.earnedAmount);l=d>0&&d<50}return!!l&&!a}(X,!!X,(0,l._)("creator-wallet-video-banner-promo","boolean",!1).value,o.IG.get("creator_wallet_banner_promo_first_seen",0),K),ee=a.useContext(p.DV).subsidizedSubscriptions,ie=se(),oe=ie[0],de=ie[1],ue=(0,m.r)("recapcallout_dismissal",{channelLogins:[],userLogin:H,currentYear:de,currentMonth:oe}),ce=ue[0],me=ue[1],ve=Array.isArray(ce.channelLogins)?ce.channelLogins:new Array,pe=(0,m.r)("bonusRound2024CalloutDismissalData",[]),he=pe[0],fe=pe[1],ge=function(e){var n;if(e&&(null===(n=null==e?void 0:e.user)||void 0===n?void 0:n.subscriptionProducts)&&0!==(null==e?void 0:e.user.subscriptionProducts.length))return e.user.subscriptionProducts.find((function(e){return e&&"1000"===e.tier}))},ke=function(e){var n,i,t=ge(e);if(t){var a=(0,x.vo)(t.gifting,5,void 0,[_.lO.SubsidizedSubscriptionsT1GiftOffer],[y.KH.EXPIRING_GIFT,y.KH.CREATOR_LED]);if(a){var r=a.baseOffer;if(!a.highQuantityOffer)return(null===(i=null===(n=null==r?void 0:r.promotion)||void 0===n?void 0:n.eligibilityFilters)||void 0===i?void 0:i.some((function(e){return e.value===y.KH.EXPIRING_GIFT||e.value===y.KH.CREATOR_LED})))?r:void 0}}}(G),ye=function(e){var n=ge(e);if(n&&n.offers)return(0,w.$)(n.offers)}(G),Se=function(e){var n=ge(e);if(n&&n.offers)return(0,C.G)(n.offers)}(G),be=(0,S.dz)()||(0,k.pn)()||!!ke||!!Se||!!ye||!!V||J,_e=(0,h.X)(A);if(!(null===(n=null==G?void 0:G.user)||void 0===n?void 0:n.subscriptionProducts)||0===(null===(i=null==G?void 0:G.user)||void 0===i?void 0:i.subscriptionProducts.length)||ee||!be||he.includes(A)){var xe=ve.includes(A)&&ce.userLogin===H&&ce.currentMonth===oe&&ce.currentYear===de,Ce=(new Date).getDate();return!_e.isEligible||xe||Ce12*i+t?[n]:(e.includes(n)||e.push(n),e)}},840118:function(e,n,i){“use strict”;i.d(n,{O:function(){return r}});var t=i(474848),a=i(959340);function r(e){return(0,t.jsx)(a.P,{width:”100%”,height:””.concat(e.height,”px”)})}},465177:function(e,n,i){“use strict”;i.d(n,{F:function(){return t},Y:function(){return a}});var t=468,a=700},190653:function(e,n,i){“use strict”;i.d(n,{eJ:function(){return N},rk:function(){return _},tA:function(){return w}});var t=i(29896),a=i(859406),r=i(316015),o=i(423032),s=i.n(o),l=i(808153),d=i.n(l),u=i(159106),c=i.n(u),m=i(722187),v=i.n(m),p=i(735660),h=i.n(p),f=”ignore_mismatch”;function g(e,n){var i,t;return e||(null!==(t=null===(i=function(e){var n,i,t;return null===(t=null===(i=null===(n=null==e?void 0:e.collection)||void 0===n?void 0:n.items)||void 0===i?void 0:i.edges[0])||void 0===t?void 0:t.node}(n))||void 0===i?void 0:i.id)&&void 0!==t?t:null)}function k(e){var n,i;return null!==(i=null===(n=null==e?void 0:e.clip)||void 0===n?void 0:n.videoOffsetSeconds)&&void 0!==i?i:void 0}function y(e){var n,i;return null!==(i=null===(n=null==e?void 0:e.clip)||void 0===n?void 0:n.isFeatured)&&void 0!==i?i:void 0}function S(e){var n,i,t;return null!==(t=null===(i=null===(n=null==e?void 0:e.clip)||void 0===n?void 0:n.guestStarParticipants)||void 0===i?void 0:i.sessionIdentifier)&&void 0!==t?t:null}function b(e){var n,i,t,a;return null!==(a=null===(t=null===(i=null===(n=null==e?void 0:e.clip)||void 0===n?void 0:n.guestStarParticipants)||void 0===i?void 0:i.guests)||void 0===t?void 0:t.length)&&void 0!==a?a:null}function _(e){var n,i,r,o,l,u=e.channelLogin,c=e.videoID,m=e.collectionID,p=e.clipSlug,_=(0,t.IT)(s(),{variables:{login:u},skip:!u}),w=_.data,N=_.loading,P=_.error,D=(0,t.IT)(h(),{variables:{videoID:c},skip:!c}),T=D.data,I=D.error,F=(0,t.IT)(v(),{variables:{collectionID:m},skip:!m}),E=F.data,j=F.error,L=(0,t.IT)(d(),{variables:{clipSlug:p},skip:!p}),A=L.data,R=L.error,H=function(e,n,i,t){var a,r,o;return(null===(a=null==n?void 0:n.video)||void 0===a?void 0:a.owner)||(null===(r=null==i?void 0:i.collection)||void 0===r?void 0:r.owner)||(null===(o=null==t?void 0:t.clip)||void 0===o?void 0:o.broadcaster)||x(e)||null}(w,T,E,A),O=[P,I,j,R].filter((function(e){return!!e})),M=x(w);return{errors:O,staleViewerCount:null!==(i=null===(n=null==M?void 0:M.stream)||void 0===n?void 0:n.viewersCount)&&void 0!==i?i:null,vodLoaded:!!(T||E||A),channelData:H,videoID:g(c,E),clipOffset:k(A),clipIsFeatured:y(A),guestStarSessionID:S(A),guestStarGuestCount:b(A),userMissingReason:C(w),contentMissing:!(!C(w)&&(r=u,o=(null==M?void 0:M.login)||null,l=(null==H?void 0:H.login)||null,a.Zn.get(f,!1)||!l||!o||!r||r!==o||l===o)),loading:N}}function x(e){var n;return”User”===(null===(n=null==e?void 0:e.userOrError)||void 0===n?void 0:n.__typename)?null==e?void 0:e.userOrError:null}function C(e){var n,i,t;return”UserDoesNotExist”===(null===(n=null==e?void 0:e.userOrError)||void 0===n?void 0:n.__typename)&&(!!(null===(i=null==e?void 0:e.userOrError)||void 0===i?void 0:i.userDoesNotExist)&&(null===(t=null==e?void 0:e.userOrError)||void 0===t?void 0:t.reason))}function w(e){var n;return!!(null===(n=null==e?void 0:e.channel)||void 0===n?void 0:n.home)}var N=function(e){var n,i,a=e.channelID,o=(0,t.IT)(c(),{variables:{options:{channelIDs:a?[a]:[]}},skip:!(0,r.gU)()||!a}).data;return{canJoinStatus:null===(i=null===(n=null==o?void 0:o.guestStarCollaborationStatuses)||void 0===n?void 0:n.channelCollabs[0])||void 0===i?void 0:i.canJoinStatus}}},255655:function(e,n,i){“use strict”;function t(e){var n=null===e?”var(–color-fill-brand)”:”#”.concat(e);return void 0===e?void 0:n}i.d(n,{g:function(){return t}})},172340:function(e,n,i){“use strict”;i.d(n,{Q:function(){return a}});var t=function(e,n,i,t){var a=r(t),o=”FFFFFF”===t?”lightgrey”:”white”;return”“).concat(i,”“)},a=function(e,n){if(e){var i=””.concat(e,” “),a=Math.floor(i.length/3),r=t(15,”27%”,l(),n),o=t(5,”60%”,l(2*a),n),s=t(0,”93%”,l(a),n);return”url(\”data:image/svg+xml;utf8,“.concat(r).concat(o).concat(s,’“)’)}function l(e){var n=i;for(e&&(n=””.concat(n.slice(e,n.length)).concat(n.slice(0,e)));n.length<100;)n+=n;return n}},r=function(e){if(!e)return.1;if("FFFFFF"===e)return.3;var n=parseInt(e.slice(0,2),16)+parseInt(e.slice(2,4),16)+parseInt(e.slice(4,6),16);return n>714?.9:n>610?.4:n>500?.2:.1}},628346:function(e,n,i){“use strict”;i.d(n,{dj:function(){return s},wy:function(){return l}});var t=i(474848),a=i(296540),r={videoPlayerMaxHeightStyleValue:void 0,channelWatchReservedHeight:0},o=(0,i(265827).q)(“ChannelPageReservedContentContext”,r),s=(o.withContext,o.context),l=function(e){var n;e.isWatch&&(n=”calc(100vh – “.concat(16,”rem)”));var i=(0,a.useMemo)((function(){return{videoPlayerMaxHeightStyleValue:n,channelWatchReservedHeight:16}}),[n,16]);return(0,t.jsx)(s.Provider,{value:i,children:e.children})}},239796:function(e,n,i){“use strict”;i.d(n,{PC:function(){return r},vC:function(){return a}});var t=(0,i(265827).q)(“LiveChannelAdVisibility”,{isAdShowing:!1}),a=(t.withContext,t.context);function r(e,n,i){return{adID:n,isAdShowing:e,sessionID:i}}},588579:function(e,n,i){“use strict”;i.d(n,{R:function(){return a}});var t=i(296540);function a(){var e=(0,t.useRef)(null);return{setRepositionPlayer:(0,t.useCallback)((function(n){e.current=n}),[]),triggerPlayerReposition:(0,t.useCallback)((function(){var n;null===(n=e.current)||void 0===n||n.call(e)}),[])}}},802407:function(e,n,i){“use strict”;i.d(n,{I:function(){return p}});var t=i(331635),a=i(973421),r=i.n(a),o=i(296540),s=i(918533),l=i(29896),d=i(308966),u=i(664865),c=i(198437),m=i(387974),v=i.n(m);function p(e){var n,i,a,m,p,h,f,g,k,y,S,b,_,x,C,w=(0,l.IT)(v(),{variables:{channelLogin:e}}).data,N=(0,o.useRef)(null),P=(0,o.useState)(null),D=P[0],T=P[1],I=(0,o.useRef)(null),F=(0,o.useState)(null),E=F[0],j=F[1],L=(0,o.useRef)(null),A=(0,o.useState)(null),R=A[0],H=A[1],O=null!==(i=null===(n=null==w?void 0:w.user)||void 0===n?void 0:n.id)&&void 0!==i?i:null,M=null!==(p=null===(m=null===(a=null==w?void 0:w.user)||void 0===a?void 0:a.stream)||void 0===m?void 0:m.id)&&void 0!==p?p:null,B=(0,s.D)(O?(0,c.RW)(O):””,{skip:!O})[0];return(0,o.useEffect)((function(){T(null),j(null),H(null)}),[e]),(0,o.useEffect)((function(){B&&function(e){return e.type===d.PD.ViewCount}(B)&&(N.current!==B.viewers||I.current!==B.collaboration_viewers||L.current!==B.costream_viewers)&&(N.current=B.viewers,I.current=B.collaboration_viewers,L.current=B.costream_viewers,M?(T(null),j(null),H(null),(0,u.oR)(v(),{channelLogin:e},(function(e){var n;if(null===(n=null==e?void 0:e.user)||void 0===n?void 0:n.stream){var i=”in_collaboration”===B.collaboration_status,a=”ORGANIZER”===B.costream_status||”COSTREAMER”===B.costream_status;return r()(e,(function(e){return e.user.stream}),(function(e){var n=e.costreamDetails;return(0,t.__assign)((0,t.__assign)({},e),{viewersCount:B.viewers,collaborationViewersCount:i?B.collaboration_viewers:null,costreamDetails:a?n?(0,t.__assign)((0,t.__assign)({},n),{totalViewersCount:B.costream_viewers}):{__typename:”CostreamDetails”,totalViewersCount:B.costream_viewers}:null})}))}return e}))):(T(B.viewers),”in_collaboration”===B.collaboration_status?j(B.collaboration_viewers):j(null),”ORGANIZER”===B.costream_status?H(B.costream_viewers):H(null)))}),[B,e,M]),{viewCount:null!==(g=null!=D?D:null===(f=null===(h=null==w?void 0:w.user)||void 0===h?void 0:h.stream)||void 0===f?void 0:f.viewersCount)&&void 0!==g?g:null,collaborativeViewCount:null!==(S=null!=E?E:null===(y=null===(k=null==w?void 0:w.user)||void 0===k?void 0:k.stream)||void 0===y?void 0:y.collaborationViewersCount)&&void 0!==S?S:null,costreamViewCount:null!==(C=null!=R?R:null===(x=null===(_=null===(b=null==w?void 0:w.user)||void 0===b?void 0:b.stream)||void 0===_?void 0:_.costreamDetails)||void 0===x?void 0:x.totalViewersCount)&&void 0!==C?C:null}}},129583:function(e,n,i){“use strict”;i.d(n,{P:function(){return v}});var t=i(331635),a=i(296540),r=i(29896),o=i(466670),s=i(535807);var l=i(302790),d=i(320903),u=i.n(d),c=i(802407),m=null;function v(e,n,i){var d=(0,a.useState)(!1),v=d[0],p=d[1],h=(0,c.I)(n||””).viewCount;(0,a.useEffect)((function(){i&&p(!0)}),[i]),(0,a.useEffect)((function(){if(v&&!m){var e=(0,l.y2)(h);m=setTimeout((function(){p(!1),m=null}),e)}return function(){m&&(clearTimeout(m),m=null)}}),[v,h]);var f,g=v||i,k=a.useRef((0,o.Rf)()).current,y=!e||!n||g,S=function(e,n){var i=this,l=a.useState(null),d=l[0],u=l[1],c=a.useState(),m=c[0],v=c[1],p=a.useState(!1),h=p[0],f=p[1],g=null==n?void 0:n.skip;a.useEffect((function(){var e=new s.K4({networkError:new Error(“Error retrieving Access Token”)});g||(0,t.__awaiter)(i,void 0,void 0,(function(){var n;return(0,t.__generator)(this,(function(i){switch(i.label){case 0:f(!0),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,o.G2)((0,o.rb)(“with-lwa-access-token”),!0)];case 2:return n=i.sent(),f(!1),n?u(n):v(e),[3,4];case 3:return i.sent(),f(!1),v(e),[3,4];case 4:return[2]}}))}))}),[g]);var k=(0,r.IT)(e,(0,t.__assign)((0,t.__assign)({},n),{nextFetchPolicy:null==n?void 0:n.nextFetchPolicy,variables:(0,t.__assign)((0,t.__assign)({},null==n?void 0:n.variables),{accessToken:d}),skip:(null==n?void 0:n.skip)||!d}));return(0,t.__assign)((0,t.__assign)({},k),{error:m||k.error,loading:h||k.loading})}(u(),{variables:{channelLogin:n,withLWAAccessToken:!0},fetchPolicy:”network-only”,skip:!k||y}),b=(0,r.IT)(u(),{variables:{channelLogin:n,withLWAAccessToken:!1},fetchPolicy:”network-only”,skip:k||y});if(e)return f=k?S:b,g&&(f=(0,t.__assign)((0,t.__assign)({},f),{loading:!0})),f}},113561:function(e,n,i){“use strict”;i.d(n,{d:function(){return a}});var t=i(859406),a=function(){return(0,t.hw)(“Category does not exist”,”DirectoryGamePage”)}},985358:function(e,n,i){“use strict”;i.d(n,{p:function(){return o}});var t=i(474848),a=i(859406),r=i(413647);function o(){return(0,t.jsx)(r.A,{message:(0,a.hw)(“Error joining Watch Party. Please refresh the page and try again.”,”PageNotFound”)})}},754955:function(e,n,i){“use strict”;i.d(n,{$:function(){return f},T:function(){return h}});var t=i(331635),a=i(474848),r=i(959340),o=i(914421),s=i(36935),l=i(588702),d=i(97774),u=i(564368),c=i(296540),m=i(859406),v=i(876531),p=i(21272),h=”https://www.amazon.com/prime”,f=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,t.__extends)(n,e),n.prototype.componentDidMount=function(){(0,p.SM)((0,t.__assign)((0,t.__assign)({},this.props.trackingProperties),{watchPartyState:v.DbI.OFFLINE,componentName:p.Lj.OverlayPlayerHypeOut}))},n.prototype.render=function(){return(0,a.jsxs)(r.P,{display:o.nl.Flex,flexDirection:o.bo.Column,children:[(0,a.jsxs)(r.P,{children:[(0,a.jsx)(s.hE,{type:l.M2.H3,children:(0,m.hw)(“Until next time…”,”HypeOutOverlay”)}),(0,a.jsx)(s.hE,{type:l.M2.H2,size:s.uM.Headline,children:(0,m.hw)(“Watch Party has ended”,”HypeOutOverlay”)})]}),(0,a.jsxs)(r.P,{display:o.nl.Flex,padding:{y:1},children:[(0,a.jsx)(r.P,{margin:{right:2},background:o.VS.Overlay,borderRadius:d.Z.Large,children:(0,a.jsx)(u.$n,{overlay:!0,linkTo:”/”.concat(this.props.channelLogin),variant:u.VQ.Secondary,size:u.Mp.Large,children:(0,m.hw)(“Back to Channel Page”,”HypeOutOverlay”)})}),(0,a.jsx)(u.$n,{targetBlank:!0,linkTo:this.props.primeVideoLink||h,size:u.Mp.Large,children:(0,m.hw)(“Continue watching solo”,”HypeOutOverlay”)})]})]})},n}(c.Component)},573585:function(e,n,i){“use strict”;i.d(n,{h:function(){return T}});var t,a=i(474848),r=i(959340),o=i(914421),s=i(296540),l=i(415044),d=i(834455),u=i(868238),c=i(803964),m=i(331635),v=i(235233),p=i(973474),h=i(312663),f=i(289209),g=i(17856),k=i(347142),y=i(70931),S=i(588702),b=i(876531),_=i(750735),x=i(106391),C=i(272285),w=i(39059),N=i(302790);!function(e){e.Summary=”summary”,e.EpisodeDetails=”episode_details”,e.LinkOut=”link_out”,e.PublishYear=”publish_year”,e.Rating=”rating”,e.Title=”title”,e.Thumbnail=”thumbnail”,e.FullStar=”full_star”,e.HalfStar=”half_star”,e.EmptyStar=”empty_star”}(t||(t={}));var P=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.renderThumbnail=function(e){var n=e.thumbnailURL,i=e.title,o=e.type===b.VJV.EPISODE?v.gl.Aspect4x3:v.gl.Aspect16x9;return(0,a.jsx)(r.P,{className:”overlay-info-box__box-art”,margin:1,flexGrow:0,flexShrink:0,”data-test-selector”:t.Thumbnail,children:(0,a.jsx)(v.j$,{ratio:o,children:(0,a.jsx)(p.L,{alt:i,src:n})})})},n.renderTitle=function(e,n){var i=e.details,r=e.title,s=null;return i&&”EpisodeDetails”===i.__typename&&null!==i.series&&null!==i.season&&null!==i.episode&&(s=(0,w.Sf)({series:i.series,season:i.season,episode:i.episode})),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(h.N,{bold:!0,color:o.Q1.Overlay,”data-test-selector”:t.Title,breakpointExtraSmall:{fontSize:o.Z4.Size6},breakpointMedium:n?void 0:{fontSize:o.Z4.Size4},breakpointExtraLarge:{fontSize:o.Z4.Size4},children:[s,r]})})},n.renderStarRating=function(e){for(var n=[],i=Math.round(2*e)/2,r=Math.floor(i),o=0;o