!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]="90a4cb79-80cb-44bc-ab5d-05f8881c6027",e._sentryDebugIdIdentifier="sentry-dbid-90a4cb79-80cb-44bc-ab5d-05f8881c6027")}catch(e){}}(),(self.webpackChunktwitch_twilight=self.webpackChunktwitch_twilight||[]).push([[35999],{601592:function(e,n,t){"use strict";function i(e){var n,t,i,a=null!==(n=null==e?void 0:e.game)&&void 0!==n?n:null,o=null!==(i=null===(t=null==e?void 0:e.game_id)||void 0===t?void 0:t.toString())&&void 0!==i?i:null;return{gameID:o,gameName:a,missingGameInfo:null===a||null===o||""===o,updatingToNullGame:""===a||0==+(null!=o?o:"")}}t.d(n,{v:function(){return i}})},440595:function(e,n,t){"use strict";t.d(n,{A:function(){return o},h:function(){return a}});var i=t(883474),a={Black:"black",White:"white",Red:"red",Green:"green",Blue:"blue",Yellow:"yellow",Magenta:"magenta",Cyan:"cyan",LightGray:"lightgray",Gray:"gray",DarkGray:"darkgray",Transparent:"transparent"};function o(e){switch(e){case a.Black:return(0,i.hw)("Black","FormatColorName");case a.White:return(0,i.hw)("White","FormatColorName");case a.Red:return(0,i.hw)("Red","FormatColorName");case a.Green:return(0,i.hw)("Green","FormatColorName");case a.Blue:return(0,i.hw)("Blue","FormatColorName");case a.Yellow:return(0,i.hw)("Yellow","FormatColorName");case a.Magenta:return(0,i.hw)("Magenta","FormatColorName");case a.Cyan:return(0,i.hw)("Cyan","FormatColorName");case a.LightGray:return(0,i.hw)("Light Gray","FormatColorName");case a.Gray:return(0,i.hw)("Gray","FormatColorName");case a.DarkGray:return(0,i.hw)("Dark Gray","FormatColorName");case a.Transparent:return(0,i.hw)("Transparent","FormatColorName");default:return""}}},196190:function(e,n,t){"use strict";t.d(n,{IU:function(){return f},hW:function(){return y},m9:function(){return _}});var i,a=t(474848),o=t(727234),r=t(296540),l=t(883474),s=t(621790),u=t(638230),d=t(239293),c=t(233936),p=t(854622),m={isTooSmall:!0,isSurveyOpportunity:!1,isSurveyShowing:!1,isMouseHovering:!1,refetchEnabled:!1,retriggerTimer:{current:0},startVideoSession:function(){},triggerOpportunity:function(){},acceptOpportunity:function(){},declineOpportunity:function(){},onClose:function(){},setMouseHovering:function(){},setRefetchEnabled:function(){}},v=(0,p.e)("BrandLiftContext",m,(function(e){return{brandLiftContext:e}})),f=v.withMemoContext,_=v.context;!function(e){e.VideoPlaySessionStarted="VideoPlaySessionStarted",e.FirstSDABreakStarted="FirstSDABreakStarted",e.SecondSDABreakStarted="SecondSDABreakStarted",e.SurveyOpportunity="SurveyOpportunity",e.SurveyShowing="SurveyShowing",e.Done="Done"}(i||(i={}));var g=l.x2.logger.withCategory("brandlift").withCategory("context"),k=function(e){var n=e.children,t=r.useState(!1),l=t[0],u=t[1],p=r.useState(!0),m=p[0],v=p[1],f=r.useState(!1),k=f[0],y=f[1],h=r.useState(i.VideoPlaySessionStarted),S=h[0],b=h[1],C=r.useContext(c.jK).adFormatRequest,w=(0,o.Z)(C),P=r.useRef(0);r.useEffect((function(){if(!w&&!!C)switch(S){case i.VideoPlaySessionStarted:b(i.FirstSDABreakStarted);break;case i.FirstSDABreakStarted:b(i.SecondSDABreakStarted),setTimeout((function(){b(i.SurveyOpportunity)}),3e5+(0,d.yT)(6e4))}}),[C,w,S]),r.useEffect((function(){g.debug(S)}),[S]),r.useEffect((function(){g.debug("isTooSmall=".concat(m))}),[m]);var N=r.useMemo((function(){return{isTooSmall:m,isMouseHovering:l,isSurveyOpportunity:S===i.SurveyOpportunity,isSurveyShowing:S===i.SurveyShowing,refetchEnabled:k,retriggerTimer:P,startVideoSession:function(){return b(i.VideoPlaySessionStarted)},triggerOpportunity:function(){return b(i.SurveyOpportunity)},acceptOpportunity:function(){return b(i.SurveyShowing)},declineOpportunity:function(){return b(i.Done)},onClose:function(){return b(i.Done)},setMouseHovering:u,setRefetchEnabled:y}}),[m,l,S,k]),D=r.useCallback((function(e){return v(!e||e<948)}),[]);return(0,a.jsxs)(_.Provider,{value:N,children:[(S===i.SurveyOpportunity||S===i.SurveyShowing)&&(0,a.jsx)(s.$,{onResize:D}),n||null]})},y=function(e){var n=e.children;return(0,u._)("brand_lift_v0","boolean",!1).value?(0,a.jsx)(k,{children:n||null}):(0,a.jsx)(_.Provider,{value:m,children:n||null})}},58082:function(e,n,t){"use strict";t.d(n,{$c:function(){return d},PY:function(){return c}});var i=t(331635),a=t(474848),o=t(296540),r=t(508952),l=t(265827),s=r.x.wrap((function(){return Promise.all([t.e(27561),t.e(38673),t.e(82191),t.e(83808),t.e(23278),t.e(74485),t.e(30177),t.e(76179),t.e(78878),t.e(48584),t.e(45859),t.e(39551),t.e(47965),t.e(7205),t.e(8967),t.e(49131),t.e(65414),t.e(93407),t.e(20362)]).then(t.bind(t,551939))}),"ClipEditorPopupPortal"),u=(0,l.q)("ClipEditorPopupContext",{openPopup:null,isOpened:!1}),d=(u.withContext,u.context),c=function(e){var n=e.children,t=function(){var e=o.useState(null),n=e[0],t=e[1];return{openClipEditorPopup:o.useCallback((function(e){t(e)}),[t]),clipEditorPopupProps:n}}(),r=t.openClipEditorPopup,l=t.clipEditorPopupProps,u=o.useMemo((function(){return{openPopup:r,isOpened:Boolean(l)}}),[r,l]);return(0,a.jsxs)(d.Provider,{value:u,children:[n,l&&(0,a.jsx)(s,(0,i.__assign)({},l))]})}},778673:function(e,n,t){"use strict";t.d(n,{y:function(){return a}});var i=t(936536),a=function(e){return e.assets.filter(i.eP).sort((function(e,n){return new Date(n.createdAt).getTime()-new Date(e.createdAt).getTime()}))[0]||null}},397897:function(e,n,t){"use strict";t.d(n,{u:function(){return a}});var i=t(936536),a=function(e){return e.assets.filter(i.q7).sort((function(e,n){return new Date(n.createdAt).getTime()-new Date(e.createdAt).getTime()}))[0]||null}},952792:function(e,n,t){"use strict";t.d(n,{Q:function(){return u}});var i=t(331635),a=t(296540),o=t(883474),r=t(778673),l=t(397897),s=t(238372),u=function(){var e=(0,s.C)();return{track:(0,a.useCallback)((function(n){var t=d(n,e),a=(0,i.__assign)((0,i.__assign)({},e),t);o.E5.track("clip_workflow_click",a)}),[e])}},d=function(e,n){var t,a,o,s,u,d,c,p,m,v,f,_,g,k,y,h,S,b,C,w,P,N="clip"in e?function(e){var n,t,i,a,o=(0,l.u)(e),s=(0,r.y)(e);return{clip_slug:e.slug,channel_id:(null===(n=e.broadcaster)||void 0===n?void 0:n.id)||"",broadcast_id:(null===(t=e.broadcast)||void 0===t?void 0:t.id)||null,vod_id:(null===(i=e.video)||void 0===i?void 0:i.id)||null,clip_asset_id:null!==(a=(null==s?void 0:s.id)||(null==o?void 0:o.id))&&void 0!==a?a:null}}(e.clip):{clip_slug:null,channel_id:e.channelID||"",broadcast_id:null!==(t=e.broadcastID)&&void 0!==t?t:null,vod_id:null!==(a=e.vodID)&&void 0!==a?a:null,clip_asset_id:e.clipAssetID||null},D={clip_editor_step:null!==(o=e.clipEditorStep)&&void 0!==o?o:null,clip_editor_ingress:null!==(s=e.clipEditorIngress)&&void 0!==s?s:null,clip_editor_session_id:null!==(u=e.clipEditorSessionID)&&void 0!==u?u:null,raw_media_id:null!==(d=e.rawMediaID)&&void 0!==d?d:null,clip_workflow:null!==(p=null!==(c=e.clipWorkflow)&&void 0!==c?c:n.clip_workflow)&&void 0!==p?p:null,location:null!==(v=null!==(m=e.location)&&void 0!==m?m:n.location)&&void 0!==v?v:null,user_id_selected:null!==(f=e.userIDSelected)&&void 0!==f?f:null,target_user_id:null!==(_=e.targetUserID)&&void 0!==_?_:null,clip_slug:null!==(k=null!==(g=N.clip_slug)&&void 0!==g?g:e.clipSlug)&&void 0!==k?k:null,pip:null!==(h=null!==(y=e.pip)&&void 0!==y?y:n.pip)&&void 0!==h&&h,auto_clip:null!==(b=null===(S=e.clip)||void 0===S?void 0:S.isAutoCurated)&&void 0!==b?b:null,clip_media_source:null!==(C=e.clipMediaSource)&&void 0!==C?C:null,is_extended_lookback:null!==(w=e.isExtendedLookback)&&void 0!==w?w:null};return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},N),D),{action:e.action,action_details:null!==(P=e.actionDetails)&&void 0!==P?P:null})}},662438:function(e,n,t){"use strict";var i;t.d(n,{U:function(){return i}}),function(e){e.CreateClip="clip",e.ShrinkToFit="shrink_to_fit",e.ExpandToFit="expand_to_fit",e.TitleClip="title",e.CancelClip="cancel",e.CancelClipEdits="cancel_clip_edits",e.SaveClip="save",e.FeatureClip="feature",e.UnfeatureClip="unfeature",e.AutoAddToStories="auto_add_to_stories",e.EnableAutoAddToStories="enable_auto_add_to_stories",e.DisableAutoAddToStories="disable_auto_add_to_stories",e.VideoTrim="video_trim",e.VideoPause="video_pause",e.VideoMute="video_mute",e.VideoAdjustVolume="video_adjust_volume",e.VideoPlay="video_play",e.VideoSeekLeft="video_seek_left",e.VideoSeekRight="video_seek_right",e.CancelClipConfirm="cancel_confirm",e.CancelClipContinueEditing="cancel_continue_editing",e.CancelClipEditsConfirm="cancel_clip_edits_confirm",e.CancelClipEditsContinueEditing="cancel_clip_edits_continue_editing",e.EditPortraitLayout="edit_portrait_layout",e.ExitClipCreationFtue="exit_clip_creation_ftue",e.AlertOverwriteClipYes="alert_overwrite_clip_yes",e.AlertOverwriteClipNo="alert_overwrite_clip_no",e.ErrorUnableToRenderClipOkay="error_unable_to_render_clip_okay",e.ErrorUnableToSaveEditsCancelEditing="error_unable_to_save_edits_cancel_editing",e.EditPortraitLayoutNagEditPortraitLayout="edit_portrait_layout_nag_edit_portrait_layout",e.EditPortraitLayoutNagDismiss="edit_portrait_layout_nag_dismiss",e.LeaveCreationFlowModalKeepEditing="leave_creation_flow_modal_keep_editing",e.LeaveCreationFlowModalDiscardClip="leave_creation_flow_modal_discard_clip",e.SaveQuickCreate="save_quick_create",e.InitiateExportYoutube="initiate_export_youtube",e.InitiateExportTiktok="initiate_export_tiktok",e.InitiateExportInstagram="initiate_export_instagram",e.DownloadSourceClip="download_source_clip",e.DownloadPortraitClip="download_portrait_clip",e.DownloadAcknowledgeError="download_acknowledge_error",e.Edit="edit",e.CopyLink="copy_link",e.ShareX="share_x",e.ShareFacebook="share_facebook",e.ShareReddit="share_reddit",e.CopyEmbedLink="copy_embed_link",e.Delete="delete",e.ConfirmDelete="confirm_delete",e.CancelDelete="cancel_delete",e.ExitClipPublishedFtue="exit_clip_published_ftue",e.StackedTemplateSelect="stacked_template_select",e.FullTemplateSelect="full_template_select",e.StackedTemplateResizeGameplay="stacked_template_resize_gameplay",e.StackedTemplateAspectRatioSlider="stacked_template_aspect_ratio_slider",e.StackedTemplateResizeFace="stacked_template_resize_face",e.StackedTemplateMoveGameplay="stacked_template_move_gameplay",e.StackedTemplateMoveFace="stacked_template_move_face",e.FullTemplateResize="full_template_resize",e.FullTemplateMove="full_template_move",e.Apply="apply",e.Cancel="cancel",e.YoutubeTitle="youtube_title",e.YoutubeDescription="youtube_description",e.YoutubePrivacy="youtube_privacy",e.YoutubeConnect="youtube_connect",e.YoutubeExport="youtube_export",e.UpNextYoutubeExport="up_next_youtube_export",e.YoutubeEditorConnect="youtube_editor_connect",e.YoutubeExportClipReshare="youtube_export_clip_reshare",e.YoutubeExportClipUrl="youtube_export_clip_url",e.TiktokTitle="tiktok_title",e.TiktokPrivacy="tiktok_privacy",e.TiktokAllowCommentsCheck="tiktok_allow_comments_check",e.TiktokAllowCommentsUncheck="tiktok_allow_comments_uncheck",e.TiktokAllowDuetCheck="tiktok_allow_duet_check",e.TiktokAllowDuetUncheck="tiktok_allow_duet_uncheck",e.TiktokAllowStitchCheck="tiktok_allow_stitch_check",e.TiktokAllowStitchUncheck="tiktok_allow_stitch_uncheck",e.TiktokConnect="tiktok_connect",e.TiktokSaveDraft="tiktok_save_draft",e.TiktokExport="tiktok_export",e.UpNextTiktokExport="up_next_tiktok_export",e.TiktokExportClipReshare="tiktok_export_clip_reshare",e.TiktokExportClipUrl="tiktok_export_clip_url",e.TiktokConnectRetry="tiktok_connect_retry",e.TiktokEditorConnect="tiktok_editor_connect",e.InstagramCaption="instagram_caption",e.InstagramShowReelOnFeedCheck="instagram_show_reel_on_feed_check",e.InstagramShowReelOnFeedUncheck="instagram_show_reel_on_feed_uncheck",e.InstagramConnect="instagram_connect",e.InstagramCloseConnectionWarning="instagram_close_connection_warning",e.InstagramExport="instagram_export",e.UpNextInstagramExport="up_next_instagram_export",e.InstagramEditorConnect="instagram_editor_connect",e.InstagramEditorConnectDismiss="instagram_editor_connect_dismiss",e.InstagramExportClipReshare="instagram_export_clip_reshare",e.InstagramExportClipUrl="instagram_export_clip_url",e.Download="download",e.ShareMenu="share_menu",e.CollabWithClick="collab_with_click",e.ModerationMenu="moderation_menu",e.WatchOnClipsPageIcon="watch_on_clips_page_icon",e.SelectIndividualClip="select_individual_clip",e.SelectAllClips="select_all_clips",e.SortByTime="sort_by_time",e.SortByViews="sort_by_views",e.FilterByCategory="filter_by_category",e.FilterByType="filter_by_type",e.FilterByTime="filter_by_time",e.ExpandRow="expand_row",e.CollapseRow="collapse_row",e.ExportViaPortraitClipPreview="export_via_portrait_clip_preview",e.ShareToStories="share_to_stories",e.ModerationTimeoutUser="moderation_timeout_user",e.ModerationBanUser="moderation_ban_user",e.ModerationDeleteAllClipsFromVideo="moderation_delete_all_clips_from_video",e.KebabMenu="kebab_menu",e.ErrorCancelEditingDueToChannelOwnerUsage="error_cancel_editing_due_to_channel_owner_usage",e.ErrorEditUnauthorized="error_edit_unauthorized",e.FilterDropdown="filter_dropdown",e.FilterByCategorySelect="filter_by_category_select",e.FilterByCategoryDeselect="filter_by_category_deselect",e.FilterByChannelSelect="filter_by_channel_select",e.FilterByChannelDeselect="filter_by_channel_deselect",e.FilterClipCreatorSelect="filter_clip_creator_select",e.FilterClipCreatorDeselect="filter_clip_creator_deselect",e.FilterOnlyFeaturedClipsOn="filter_only_featured_clips_on",e.FilterOnlyFeaturedClipsOff="filter_only_featured_clips_off",e.SearchBarFocusCategory="search_bar_focus_category",e.SearchBarFocusChannel="search_bar_focus_channel",e.PlayClip="play_clip",e.Feature="feature",e.Unfeature="unfeature",e.ChannelName="channel_name",e.CategoryName="category_name",e.ResetFilters="reset_filters",e.CarouselRight="carousel_right",e.CarouselLeft="carousel_left",e.ViewOnClipPage="view_on_clip_page",e.DeletePrompt="delete_prompt",e.Report="report",e.ViewAllClips="view_all_clips",e.YoutubeSelect="youtube_select",e.TiktokSelect="tiktok_select",e.InstagramSelect="instagram_select",e.OpenInNewTab="open_in_new_tab",e.CloseClipEditorPopup="close_clip_editor_popup",e.SocialSharingBadgeFtueGoToSocialBadgePage="social_sharing_badge_ftue_go_to_social_badge_page",e.SocialSharingBadgeFtueDismiss="social_sharing_badge_ftue_dismiss"}(i||(i={}))},238372:function(e,n,t){"use strict";t.d(n,{C:function(){return l}});var i=t(296540),a=t(883474),o=t(957773),r=t(368770),l=function(){var e,n=(0,o.QN)(r.wz),t=(0,o.QN)(r.Ul),l=null==n?void 0:n.id,s=a.x2.session.pageviewID,u=(null===(e=a.E5.getLastPageview())||void 0===e?void 0:e.location)||"",d=["sunlight/content/clips/channel","sunlight/content/clips/created"].includes(u);return(0,i.useMemo)((function(){return{language:t,user_id:l||"",page_session_id:s,location:u,clip_workflow:d?"clips_manager":void 0}}),[d,t,s,u,l])}},952346:function(e,n,t){"use strict";t.d(n,{p:function(){return p}});var i=t(331635),a=t(296540),o=t(415044),r=t(883474),l=t(306730),s=t(735793),u={isOpen:!1,campaignSettings:void 0,liveShoppingConfig:void 0},d=new Set;function c(){d.forEach((function(e){return e(u)}))}function p(){var e=(0,a.useState)(u),n=e[0],t=e[1],p=(0,o.d4)((function(e){return!!e.session.user})),m=(0,a.useCallback)((function(e){t(e)}),[]);(0,a.useEffect)((function(){return d.add(m),function(){d.delete(m)}}),[m]);var v=(0,a.useCallback)((function(){u={isOpen:!1,campaignSettings:void 0,liveShoppingConfig:void 0},c()}),[]),f=(0,a.useCallback)((function(e){var n;if(e){var t=r.Mv.getJSONAssignment("sponsored_shopping_release",{asin:"",tracking_id:{},asins:[]},s.n,{campaign_id:null==e?void 0:e.campaign,marketplace:null!==(n=(0,l.If)())&&void 0!==n?n:""}),i=t.asin,a=t.asins,o=window.innerHeight<500||window.innerWidth<700;(i&&""!==i||a&&a.length>0)&&p&&!o?(u={isOpen:!0,campaignSettings:e,liveShoppingConfig:t},c()):window.open(null==e?void 0:e.advertiser.ctaURL,"_blank","noopener,noreferrer")}}),[p]);return(0,i.__assign)((0,i.__assign)({},n),{closeModal:v,handleIngressClick:f})}},735793:function(e,n,t){"use strict";t.d(n,{V:function(){return o},n:function(){return a}});var i=t(115633),a=i.Ik({asin:i.Yj(),tracking_id:i.g1(i.Yj(),i.Yj()),asins:i.YO(i.Yj())});function o(e,n){return n&&e[n]||""}},326984:function(e,n,t){"use strict";t.d(n,{U0:function(){return r},zX:function(){return l}});var i=t(331635),a=t(474848),o=(0,t(25006).vt)()((function(e){return{isSDAUpsellShowing:!1,displaySDAUpsell:function(){return e((function(){return{isSDAUpsellShowing:!0}}))},closeSDAUpsell:function(){return e((function(){return{isSDAUpsellShowing:!1}}))},upsellSubType:"unset",setUpsellSubType:function(n){return e((function(){return{upsellSubType:n}}))},isMobilePlayerActive:!0,setMobilePlayerActive:function(n){return e((function(){return{isMobilePlayerActive:n}}))},isMobileWelcomeBannerShowing:!1,displayMobileWelcomeBanner:function(){return e((function(){return{isMobileWelcomeBannerShowing:!0}}))},closeMobileWelcomeBanner:function(){return e((function(){return{isMobileWelcomeBannerShowing:!1}}))}}})),r=function(){var e=o();return(0,i.__assign)({},e)};function l(e){var n=function(n){var t=r();return(0,a.jsx)(e,(0,i.__assign)({},n,t))};return n.displayName="withUpsellState(".concat(e.displayName||e.name||"Component",")"),n}},514105:function(e,n,t){"use strict";t.d(n,{X:function(){return s}});var i=t(331635),a=t(474848),o=t(296540),r=t(151702),l=t(641896);function s(){return function(e){var n=function(n){function t(e){var t=n.call(this,e)||this;t.bufferedEventListeners=[],t.attachedEventListeners=[],t.addEventListener=function(e,n){var i=t.props.mediaPlayerInstance,a={event:e,listener:n};i?(t.attachedEventListeners.push(a),t.bufferedEventListeners=t.filterEventListeners(t.bufferedEventListeners,e,n),i.addEventListener(e,n)):t.bufferedEventListeners.push(a)},t.removeEventListener=function(e,n){var i=t.props.mediaPlayerInstance;i&&(t.attachedEventListeners=t.filterEventListeners(t.attachedEventListeners,e,n),i.removeEventListener(e,n))},t.attachEventListeners=function(){var e=t.props.mediaPlayerInstance;0!==t.bufferedEventListeners.length&&e&&t.bufferedEventListeners.forEach((function(e){var n=e.event,i=e.listener;return t.addEventListener(n,i)}))},t.filterEventListeners=function(e,n,t){return e.filter((function(e){var i=e.event,a=e.listener;return n!==i&&t!==a}))};var i=t,a=i.addEventListener,o=i.removeEventListener;return t.state={playerEvents:{addEventListener:a,removeEventListener:o}},t}return(0,i.__extends)(t,n),t.prototype.componentDidMount=function(){this.attachEventListeners()},t.prototype.componentDidUpdate=function(){this.attachEventListeners()},t.prototype.componentWillUnmount=function(){var e=this;this.attachedEventListeners.forEach((function(n){var t=n.event,i=n.listener;return e.removeEventListener(t,i)}))},t.prototype.render=function(){return(0,a.jsx)(e,(0,i.__assign)({},this.props,this.state))},t.displayName=(0,r.K)(t.name,e),t}(o.Component);return(0,l.dd)(u)(n)}}function u(e){return{mediaPlayerInstance:e.mediaPlayerInstance}}},284162:function(e,n,t){"use strict";t.d(n,{JC:function(){return s},ZM:function(){return u},kx:function(){return d}});var i=t(296540),a=t(854622),o=t(222192),r={channelName:null,contentLabels:null,overlayTiming:o.HX.PageLoad,overlayType:o.P8.None,streamChannelID:null,storeAcknowledgement:function(){},trackClick:function(){}},l=(0,a.e)("contentClassificationContext",r,(function(e){return{contentClassificationContext:e}})),s=l.context,u=l.withMemoContext;function d(){return(0,i.useContext)(s)}},345942:function(e,n,t){"use strict";t.d(n,{In:function(){return h},MP:function(){return S},RX:function(){return C}});var i=t(331635),a=t(474848),o=t(296540),r=t(415044),l=t(868238),s=t(196190),u=t(326984),d=t(514105),c=t(233936),p=t(854622),m=t(641896),v=t(911906),f=t(731820),_=t(459487),g=t(947153),k=t(573527),y=(0,p.e)("PlayerActivityContext",{disablePlayerActiveTimeout:function(){return null},enablePlayerActiveTimeout:function(){return null},handleFocusIn:function(){return null},handleFocusOut:function(){return null},__doNotUse_SetPlayerActivity:function(){return null}},(function(e){return{playerActivityContext:e}})),h=y.withMemoContext,S=y.context,b=function(e){function n(n){var t=e.call(this,n)||this;return t.listenersAttached=!1,t.playerActiveTimeoutEnabled=!0,t.mouseIsInsidePlayer=!1,t.onFocusIn=function(){t.setPlayerActive()},t.onFocusOut=function(e){var n;(null===(n=t.playerRef)||void 0===n?void 0:n.contains(e.relatedTarget))||t.setPlayerInactive()},t.handleMouseEnter=function(e){var n=e.relatedTarget;(null==n?void 0:n.closest("#player-controls-button-tooltip"))||"BODY"===(null==n?void 0:n.nodeName)||(t.mouseIsInsidePlayer=!0,t.setPlayerActive())},t.handleMouseLeave=function(e){var n=e.relatedTarget;(null==n?void 0:n.closest("#player-controls-button-tooltip"))||(t.mouseIsInsidePlayer=!1,t.setPlayerInactive())},t.onMouseMove=function(){t.mouseIsInsidePlayer&&(t.mouseMoveRAF||(t.mouseMoveRAF=requestAnimationFrame(t.setPlayerActive)))},t.onQualityChange=function(){var e=t.props.mediaPlayerInstance;e&&!e.isAutoQualityMode()&&t.setPlayerActive()},t.setPlayerActivity=function(e){e?t.setPlayerActive():t.setPlayerInactive()},t.setPlayerActive=function(){var e,n;t.clearPlayerActiveTimeout(),null===(n=(e=t.props).onPlayerActive)||void 0===n||n.call(e),t.setState((function(e){return e.active?null:{active:!0}}),t.setPlayerActiveTimeout)},t.setPlayerInactive=function(){var e,n;t.clearPlayerActiveTimeout(),null===(n=(e=t.props).onPlayerInactive)||void 0===n||n.call(e),t.clearMouseMoveRAF(),t.props.isMenuShowing||t.setState((function(e){return e.active?{active:!1}:null}))},t.setPlayerActiveTimeout=function(){t.clearPlayerActiveTimeout(),t.playerActiveTimeoutEnabled&&(t.playerActiveTimeout=setTimeout(t.setPlayerInactive,5e3))},t.clearPlayerActiveTimeout=function(){t.playerActiveTimeout&&(clearTimeout(t.playerActiveTimeout),delete t.playerActiveTimeout)},t.clearMouseMoveRAF=function(){t.mouseMoveRAF&&(cancelAnimationFrame(t.mouseMoveRAF),delete t.mouseMoveRAF)},t.disablePlayerActiveTimeout=function(){t.playerActiveTimeoutEnabled=!1,t.setPlayerActive()},t.enablePlayerActiveTimeout=function(){t.playerActiveTimeoutEnabled=!0,t.setPlayerActive()},t.state={disablePlayerActiveTimeout:t.disablePlayerActiveTimeout,enablePlayerActiveTimeout:t.enablePlayerActiveTimeout,handleFocusIn:t.setPlayerActive,handleFocusOut:t.setPlayerInactive,__doNotUse_SetPlayerActivity:t.setPlayerActivity},t}return(0,i.__extends)(n,e),n.prototype.componentDidMount=function(){var e=this.props,n=e.disablePlayerActivityPlayerListeners,t=e.playerEvents.addEventListener;this.updatePlayerRef(),this.maybeAttachDomEventListeners(),n||(t(_.p.PLAYING,this.setPlayerActive),t(g.a.QUALITY_CHANGED,this.onQualityChange),t(g.a.SEEK_COMPLETED,this.setPlayerActive))},n.prototype.componentDidUpdate=function(e){var n,t;e.isSDAPlaying===this.props.isSDAPlaying&&e.isSDAUpsellShowing===this.props.isSDAUpsellShowing&&(null===(n=e.brandLiftContext)||void 0===n?void 0:n.isSurveyShowing)===(null===(t=this.props.brandLiftContext)||void 0===t?void 0:t.isSurveyShowing)||this.removeDomEventListeners(),this.updatePlayerRef(),this.maybeAttachDomEventListeners();var i=e.theatreModeEnabled!==this.props.theatreModeEnabled,a=e.playerIsPersisting!==this.props.playerIsPersisting,o=e.isMenuShowing!==this.props.isMenuShowing;(i||a||o)&&this.setPlayerActive()},n.prototype.componentWillUnmount=function(){this.removeDomEventListeners(),this.clearPlayerActiveTimeout()},n.prototype.render=function(){return(0,a.jsx)(S.Provider,{value:this.state,children:this.props.children||null})},n.prototype.updatePlayerRef=function(){var e=this.props,n=e.containerRef,t=e.videoRef;this.playerRef=this.getOutstreamDisplayAdShowing()?n:t},n.prototype.getOutstreamDisplayAdShowing=function(){var e=this.props,n=e.isSDAPlaying,t=e.isSDAUpsellShowing,i=e.brandLiftContext.isSurveyShowing;return n||t||i},n.prototype.removeDomEventListeners=function(){this.playerRef&&this.listenersAttached&&(this.playerRef.removeEventListener("mouseleave",this.handleMouseLeave),this.playerRef.removeEventListener("mouseenter",this.handleMouseEnter),this.playerRef.removeEventListener("mousemove",this.onMouseMove),this.playerRef.removeEventListener("focusin",this.onFocusIn),this.playerRef.removeEventListener("focusout",this.onFocusOut),this.listenersAttached=!1)},n.prototype.maybeAttachDomEventListeners=function(){!this.playerRef||this.listenersAttached||this.props.disablePlayerActivityDOMListeners||(this.listenersAttached=!0,this.playerRef.addEventListener("mouseleave",this.handleMouseLeave),this.playerRef.addEventListener("mouseenter",this.handleMouseEnter),this.playerRef.addEventListener("mousemove",this.onMouseMove),this.playerRef.addEventListener("focusin",this.onFocusIn),this.playerRef.addEventListener("focusout",this.onFocusOut))},n}(o.Component),C=(0,l.Zz)((0,d.X)(),(0,m.dd)((function(e){var n=e.mediaPlayerInstance;return{mediaPlayerInstance:n}})),(0,f.c0)((function(e){var n=e.isMenuShowing;return{isMenuShowing:n}})),(0,c.VX)((function(e){var n=e.adFormatMetadata;return{isSDAPlaying:(0,k.Eg)(n)}})),(0,v.cj)((function(e){var n=e.behaviors,t=e.callbacks;return{disablePlayerActivityDOMListeners:null==n?void 0:n.disablePlayerActivityDOMListeners,disablePlayerActivityPlayerListeners:null==n?void 0:n.disablePlayerActivityPlayerListeners,onPlayerActive:null==t?void 0:t.onPlayerActive,onPlayerInactive:null==t?void 0:t.onPlayerInactive}})),u.zX,(0,s.IU)(),(0,r.Ng)((function(e){var n=e.ui;return{theatreModeEnabled:n.theatreModeEnabled,playerIsPersisting:n.persistentPlayerEnabled&&n.persistentPlayerIsPersisting}})))(b)},129721:function(e,n,t){"use strict";t.d(n,{_u:function(){return K},N1:function(){return ne},g7:function(){return $},o1:function(){return Z}});var i=t(331635),a=t(474848),o=t(296540),r=t(415044),l=t(868238),s=t(883474),u=t(276337),d=t(726561),c=t(198437);var p=t(308966),m=t(601592),v=t(73849),f=t(876531),_=t(368770),g=t(511329),k=t(2441),y=t(590745),h=t(514105),S=t(233936),b=t(284162),C=t(403772),w=t(854622),P=t(641896),N=t(911906),D=t(731820),F=t(334963),T=t(212276),I=t(947153),A=t(331337),E=t(573527),x=t(249448),M=t(920953),V=t(894320),L=t(358020),B=t(269247),R=t.n(B),O=t(909974),U=t.n(O),q=t(664865);function G(e){var n=Y(e),t=function(e){var n=Y(e),t=j(e.collection);if(n&&t&&t.length>0){var i=t.findIndex((function(e){return e.id&&n.id&&e.id===n.id}));return i>=0?i:void 0}return}(e);return{video:n,positionInCollection:t}}function W(e){var n;if(e.user)return null===(n=e.user.broadcastSettings)||void 0===n?void 0:n.game;var t=Y(e);return t?t.game:e.clip?e.clip.game:void 0}function Y(e){var n=e.video,t=e.collection;if(n)return n;var i=j(t);return i&&i.length>0?i[0]:null}function j(e){var n=e&&e.items&&e.items.edges;return n&&(0,q.bK)(n)}function z(e){var n=e.user;return n?n.broadcastSettings:null}function H(e){var n=e.user;return n?n.id:null}var Q=t(285272),K={track:function(){return null}},X=(0,w.e)("PlayerTrackingContext",K,(function(e){return e})),Z=X.withMemoContext,$=X.context,J=function(e){function n(n){var t=e.call(this,n)||this;return t.timeSpentHidden=0,t.timeLastVisible=performance.now(),t.isFirstVideoPlay=!0,t.autoPlaySucceeded=!0,t.handleVisibilityChange=function(){document.hidden?t.timeLastVisible=performance.now():t.timeSpentHidden=Math.round(t.timeSpentHidden+performance.now()-t.timeLastVisible)},t.track=function(e,n){var a,o,r,l,u,d,c=t.props,p=c.playerType,m=c.muted,v=c.location,f=c.mediaPlayerInstance,_=c.data,g=c.channelLogin,k=c.volume,y=f&&f.getSessionData(),h=G(_),S=h.video,b=h.positionInCollection,C=function(e){var n=e.user,t=e.clip,i=e.collection,a=e.video;return n||t&&t.broadcaster||i&&i.owner||a&&a.owner}(_),w=_.user&&_.user.stream?_.user.stream:null,P=w?w.broadcasterSoftware:null,N=_.user&&_.user.self?!!_.user.self.subscriptionBenefit:null,D=t.getRestrictionInfo(t.props),F=C&&C.login||g,T=C&&C.id,I=t.getAutoHost(),E=null!==(a=null==I?void 0:I.sourceChannelLogin)&&void 0!==a?a:null,x=null!==(o=null==I?void 0:I.sourceChannelID)&&void 0!==o?o:null,M=f&&f.getVersion()||"",V=null==f?void 0:f.getQuality(),L=(0,Q.R)(V),B=t.props.rightColumnExpanded&&!(p===A.C.ClipsViewing),R=!!(null===(l=null===(r=_.user)||void 0===r?void 0:r.self)||void 0===l?void 0:l.follower),O=(0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)({},function(e){var n=e&&e.state||{};return{freeform_tag_display:n.freeform_tag_display,freeform_tag_filter:n.freeform_tag_filter,item_tracking_id:n.item_tracking_id,item_position:n.item_position,row_position:n.row_position,row_name:n.row_name,section_id:n.section_id,search_query_id:n.search_query_id,search_session_id:n.search_session_id,search_item_tracking_id:n.search_item_tracking_id,tag_filter_set:n.tag_filter_set,tag_set:n.tag_set,raid_id:n.raid_id}}(v)),t.getPlayerTrackingDataFromProps()),t.uniquePayloadValuesVideoPlay(e)),t.uniquePayloadValuesMinutesWatched(e)),t.uniquePayloadValuesVideoPause(e)),t.uniquePayloadValuesVideoAdImpression(e)),t.uniquePayloadValuesVideoError(e)),t.uniquePayloadValuesClips({event:e,trackingData:n})),t.uniquePayloadValuesNSecondPlayed(e)),{app_fullscreen:t.props.isFullscreen,aspect_ratio:L,autoplayed:t.props.autoplay,backend_version:M,broadcast_id:y&&y["BROADCAST-ID"]||void 0,broadcaster_software:P,channel:F,channel_id:T,channel_restriction_type:D.restrictionType,chat_visible:B,chat_visibility_status:B?"visible":void 0,collection_id:t.props.collectionID,collection_item_position:b,collection_session_id:t.props.collectionSessionId,content_mode:t.getContentMode(t.props),core_version:M,game:null===(u=W(_))||void 0===u?void 0:u.name,game_id:null===(d=W(_))||void 0===d?void 0:d.id,host_channel:E,host_channel_id:x,is_ad_playing:t.props.isAdShowing,is_following:R,is_skyline_player:t.props.isSkylinePlayer,language:t.props.language,logged_in:!!_.currentUser,login:_.currentUser&&_.currentUser.login,live:t.props.isLive,mse_support:"undefined"!=typeof MediaSource,muted:!!m,partner:!(!C||!C.isPartner),play_session_id:t.props.playSessionId,playback_gated:!!t.props.hasPlaybackRestriction,player:p,player_size_mode:t.getPlayerDisplayMode(),staff:!!t.props.data.currentUser&&t.props.data.currentUser.isStaff,subscriber:N,turbo:!!t.props.data.currentUser&&t.props.data.currentUser.hasTurbo,user_id:t.props.data.currentUser?Number(t.props.data.currentUser.id):null,viewer_exemption_reason:D.exemption,vod:S&&S.id||void 0,vod_format:t.props.isClip?"mp4":void 0,vod_id:_.clip&&Number(_.clip.id)||S&&S.id||void 0,vod_type:t.getVodType(),volume:k}),U=t.preferDecoratedProperties(O,n);s.E5.trackPlayerEvent(e,U)},t.uniquePayloadValuesVideoPlay=function(e){if("video-play"===e){var n=(0,k.wm)(t.props.consent),i={autoplay_succeeded:t.autoPlaySucceeded,is_first_video_play:t.isFirstVideoPlay,time_for_player_core_load:t.playerCoreLoadTime,time_for_token_load:t.props.accessTokenLoadTime,time_spent_hidden:t.timeSpentHidden,consent_comscore_ok:n,content_classification_label_set:t.props.contentLabelsForTracking,client_time_millis:Date.now()};return t.isFirstVideoPlay=!1,t.autoPlaySucceeded=!0,i}},t.uniquePayloadValuesMinutesWatched=function(e){var n,i;if("minute-watched"===e||"clips_minute_watched"===e){var a=(null===(i=null===(n=t.props.data.user)||void 0===n?void 0:n.self)||void 0===i?void 0:i.isModerator)||!1,o=(0,k.wm)(t.props.consent);return{is_mod:a,time_spent_hidden:t.timeSpentHidden,consent_comscore_ok:o,content_classification_label_set:t.props.contentLabelsForTracking}}},t.uniquePayloadValuesVideoPause=function(e){if("video_pause"===e)return{consent_comscore_ok:(0,k.wm)(t.props.consent)}},t.uniquePayloadValuesVideoAdImpression=function(e){if("video_ad_impression"===e||"video_ad_impression_complete"===e)return{consent_comscore_ok:(0,k.wm)(t.props.consent)}},t.uniquePayloadValuesVideoError=function(e){if("video_error"===e)return{in_background:!!document.hidden}},t.uniquePayloadValuesClips=function(e){var n,i=e.event,a=e.trackingData,o="video-play"===i||"video_init"===i||"video_end"===i||"n_second_play"===i||"clips_minute_watched"===i;if(!1!==t.props.isClip&&!1!==o){var r=(null==a?void 0:a.stream_format)?Number(a.stream_format):void 0,l="number"==typeof r?null===(n=t.props.availableQualities[r])||void 0===n?void 0:n.name:void 0;return{clip_slug:t.props.clipSlug,stream_format:l,video_codec:(null==a?void 0:a.video_codec)||"AVC"}}},t.uniquePayloadValuesNSecondPlayed=function(e){if("n_second_play"===e&&t.props.isClip){var n=t.props.clipLocation;return!n&&t.props.embed&&(n=T.yI.Embed),{location:n}}},t.getPlayerTrackingDataFromProps=function(){return(0,i.__assign)((0,i.__assign)({},t.props.additionalTrackingProps),{squad_stream_id:t.props.squad&&t.props.squad.streamID?t.props.squad.streamID:null,squad_stream_session_id:t.props.squad&&t.props.squad.sessionID?t.props.squad.sessionID:null,squad_stream_presentation_id:t.props.squad&&t.props.squad.presentationID?t.props.squad.presentationID:null})},t.getPlayerDisplayMode=function(){return(0,L.y)({isFullscreen:t.props.isFullscreen,playerType:t.props.playerType,theatreModeEnabled:t.props.theatreModeEnabled,mini:t.props.mini})},t.getRestrictionInfo=function(e){var n,t=e.data,i=e.accessExpiration,a=t.user&&t.user.stream?t.user.stream:null,o=a&&a.restriction,r=null!==(n=null==o?void 0:o.type)&&void 0!==n?n:null;return o&&o.options&&o.type===f.B2H.SUB_ONLY_LIVE&&(o.options.includes(f.y6l.ALLOW_ALL_TIERS)?r="".concat(r,"_1000"):o.options.includes(f.y6l.ALLOW_TIER_2_AND_3_ONLY)?r="".concat(r,"_2000"):o.options.includes(f.y6l.ALLOW_TIER_3_ONLY)&&(r="".concat(r,"_3000"))),{exemption:i?"free_preview":o&&o.exemptions&&o.exemptions.length?"exempt":null,restrictionType:r&&r.toLowerCase()||void 0}},t.getVodType=function(){if(t.props.isClip)return"clip";if(t.props.vodType)return t.props.vodType;var e=G(t.props.data).video;return e&&e.broadcastType?(0,g.EE)(e.broadcastType):void 0},t.getAutoHost=function(){return t.props.autohost},t.onPlaybackBlocked=function(){t.autoPlaySucceeded=!1},t.state={track:t.track},t}return(0,i.__extends)(n,e),n.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(I.a.PLAYBACK_BLOCKED,this.onPlaybackBlocked),document.addEventListener("visibilitychange",this.handleVisibilityChange)},n.prototype.componentDidUpdate=function(e){var n=this,t=this.props.playerLoadTimePromise;e.playerLoadTimePromise!==t&&t&&t.then((function(e){n.props.playerLoadTimePromise===t&&(n.playerCoreLoadTime=e)}))},n.prototype.componentWillUnmount=function(){document.removeEventListener("visibilitychange",this.handleVisibilityChange)},n.prototype.render=function(){return(0,a.jsx)($.Provider,{value:this.state,children:this.props.children})},n.prototype.preferDecoratedProperties=function(e,n){var t=(0,i.__assign)({},n);return Object.keys(e).forEach((function(n){var i;t[n]=t[n]?null!==(i=e[n])&&void 0!==i?i:t[n]:e[n]})),t},n.prototype.getContentMode=function(e){var n=e.isClip,t=e.data,i=e.vodID,a=e.collectionID;if(n)return"clip";if(i||a)return"vod";var o=t.user&&t.user.stream?t.user.stream:null,r=o?o.broadcasterSoftware:null,l="live";return"watch_party"===r||"watch_party_premiere"===r||"watch_party_rerun"===r?l="vodcast":"rebroadcast"===r&&(l="vod"),l},n}(o.Component);var ee,ne=(0,l.Zz)(y.z3,v.y,(0,r.Ng)((function(e){return{isLoggedIn:(0,_.M3)(e),language:(0,_.Ul)(e),rightColumnExpanded:e.ui.rightColumnExpanded,theatreModeEnabled:e.ui.theatreModeEnabled}})),(0,h.X)(),(0,P.dd)(te),(0,D.c0)((function(e){var n=e.isFullscreen;return{isFullscreen:n}})),(0,N.cj)((function(e){var n=e.content,t=e.type,i=(0,V.wk)({playerPublicPropsContext:e}),a=(0,x.DG)(n);return{playerType:t,mini:!!i.mini,additionalTrackingProps:i.trackingProperties,isClip:(0,x.Jn)(n),isLive:a,vodType:(0,x.wy)(n)?n.vodType:null,squad:(0,x.DG)(n)?n.squad:null,autohost:(0,x.DG)(n)?n.autohost:null,collectionID:(0,x.Eq)(n),channelLogin:(0,x.hd)(n),vodID:(0,x.hq)(n),isCollectionWithVideo:(0,x.P3)(n)&&!!n.vodID,clipSlug:(0,x.Qc)(n),clipLocation:(0,x.gm)(n),embed:!!i.embed,isSkylinePlayer:!!i.reportSkylinePlayer}})),(0,F.AP)((function(e){var n=e.muted,t=e.volume;return{muted:n,volume:t}})),(0,P.dd)(te),(0,S.VX)((function(e){return{isAdShowing:(0,E.cz)(e.videoAdMetadata)}})),(0,b.ZM)((function(e){var n=e.contentLabels;return{contentLabelsForTracking:(0,C.aH)(n)}})),(0,u._v)(U(),{options:function(e){var n;return{returnPartialData:!0,variables:{channel:e.channelLogin,isLive:!!e.channelLogin,hasCollection:e.isCollectionWithVideo&&null!==e.collectionID,collectionID:e.collectionID||"",videoID:null!==(n=e.vodID)&&void 0!==n?n:"",hasVideo:!!e.vodID,slug:e.clipSlug||"",hasClip:e.isClip}}}}),(ee=function(e){var n,t,i;return{fragment:R(),id:(i=null===(n=z(e.data))||void 0===n?void 0:n.id,i?"BroadcastSettings:".concat(i):""),topic:(0,c.Fz)(H(e.data)||""),type:p.PD.BroadcastSettingsUpdate,skip:!(null===(t=z(e.data))||void 0===t?void 0:t.id)||!H(e.data),mutator:ie}},function(e){return function(n){var t,r,l;return t=ee(n),r=(0,d.F)(t.mutator),l=(0,o.useCallback)((function(e,n){return r.current(e,n)}),[r]),(0,o.useEffect)((function(){if(!t.skip){var e=(0,c.BN)({fragment:t.fragment,id:t.id,topic:t.topic,type:t.type,mutator:l});return function(){e()}}}),[l,t.fragment,t.id,t.skip,t.topic,t.type]),(0,a.jsx)(e,(0,i.__assign)({},n))}}))(J);function te(e){var n=e.accessExpiration,t=e.autoplay,i=e.collectionSessionId,a=e.hasPlayed,o=e.mediaPlayerInstance,r=e.playSessionId,l=e.accessTokenLoadTime,s=e.playerLoadTimePromise,u=e.availableQualities;return{accessExpiration:n,autoplay:t,collectionSessionId:i,hasPlaybackRestriction:(0,M.k1)(e),hasPlayed:a,mediaPlayerInstance:o,playSessionId:r,accessTokenLoadTime:l,playerLoadTimePromise:s,availableQualities:u}}function ie(e,n){var t,a,o,r=(0,m.v)(e),l=r.gameID,s=r.gameName,u=r.missingGameInfo,d=r.updatingToNullGame;return n&&e&&!u?d?(0,i.__assign)((0,i.__assign)({},n),{game:null}):(0,i.__assign)((0,i.__assign)({},n),{game:{__typename:"Game",id:null!==(t=null==l?void 0:l.toString())&&void 0!==t?t:"",name:null!=s?s:"",displayName:null!=s?s:"",boxArtURL:(a=null!=s?s:"",o={width:83,height:113},"https://static-cdn.jtvnw.net/ttv-boxart/".concat(encodeURIComponent(a),"-").concat(o.width,"x").concat(o.height,".jpg"))}}):n}},285272:function(e,n,t){"use strict";function i(e){return(null==e?void 0:e.height)?e.width/e.height:e?null:16/9}t.d(n,{R:function(){return i}})},731820:function(e,n,t){"use strict";t.d(n,{Uz:function(){return i},_t:function(){return w},_u:function(){return S},c0:function(){return C},nD:function(){return N}});var i,a=t(331635),o=t(474848),r=t(296540),l=t(415044),s=t(868238),u=t(883474),d=t(453595),c=t(213912),p=t(514105),m=t(947153),v=t(894320),f=t(854622),_=t(911906),g=t(526341),k="captionsEnabled",y="captionsPreset",h="captionsStyle";!function(e){e[e.None=0]="None",e[e.Video=1]="Video",e[e.Ad=2]="Ad"}(i||(i={}));var S={isClipSharing:!1,isFullscreen:!1,isMenuShowing:!1,requestedQuality:!1,showControls:!0,isCollectionSidebarShowing:!1,recommendationsShowing:!1,soundtrackShowing:!1,showClosedCaptionsSettings:!1,streamInfoShowing:!1,videoContainer:void 0,videoRef:void 0,isDVRSeekbarVisible:!0,toggleDVRSeekbarVisibility:function(){return null},enterFullscreen:function(){return null},exitFullscreen:function(){return null},setClosedCaptionsAvailable:function(){return null},setClosedCaptionsEnabled:function(){return null},setClosedCaptionsSettingsShowing:function(){return null},setClosedCaptionsStyles:function(){return null},setClosedCaptionsStylesPreset:function(){return null},setIsMenuShowing:function(){return null},setRequestedQuality:function(){return null},toggleClipSharing:function(){return null},toggleCollectionSidebar:function(){return null},setShowControls:function(){return null},showCollectionSidebar:function(){return null},hideCollectionSidebar:function(){return null},soundtrackShow:function(){return null},soundtrackHide:function(){return null},setRecommendationsShowing:function(){return null},setStreamInfoShowing:function(){return null},statsOverlay:i.None,setStatsOverlay:function(){return null},captions:{available:!1,enabled:!1,preset:g.Pf.WhiteOnBlack,style:g.qS[g.Pf.WhiteOnBlack]},isKeyboardShortcutsVisible:!1,showKeyboardShortcuts:function(){return null},hideKeyboardShortcuts:function(){return null}},b=(0,f.e)("UIContext",S,(function(e){return{uiContext:e}})),C=b.withMemoContext,w=b.context,P=function(e){function n(n){var t=e.call(this,n)||this;t.enterFullscreen=function(){var e=t.props,n=e.videoContainer,i=e.disableFullscreen,a=e.fullscreenForwardingRef,o=e.shouldFullscreenRoot;if(!i)if(o){var r=document.getElementById("root");r&&t.handleFullscreenRoot(r)}else a?t.props.fullscreen.enable(a):n&&t.props.fullscreen.enable(n)},t.exitFullscreen=function(){t.props.fullscreen.disable()},t.setClosedCaptionsSettingsShowing=function(e){t.setState({showClosedCaptionsSettings:e},(function(){if(!e){var n=document.querySelector("[data-a-target=player-settings-button]");null==n||n.focus()}}))},t.toggleCollectionSidebar=function(){t.setState((function(e){return{isCollectionSidebarShowing:!e.isCollectionSidebarShowing}}))},t.showCollectionSidebar=function(){t.setState({isCollectionSidebarShowing:!0})},t.hideCollectionSidebar=function(){t.setState({isCollectionSidebarShowing:!1})},t.soundtrackShow=function(){t.setState((function(e){return e.soundtrackShowing?null:{soundtrackShowing:!0}}))},t.soundtrackHide=function(){t.setState((function(e){return e.soundtrackShowing?{soundtrackShowing:!1}:null}))},t.toggleClipSharing=function(){t.setState((function(e){return{isClipSharing:!e.isClipSharing}}))},t.toggleDVRSeekbarVisibility=function(){t.setState((function(e){return{isDVRSeekbarVisible:!e.isDVRSeekbarVisible}}))},t.onFullscreenChange=function(){var e=t.props,n=e.videoContainer,i=e.fullscreen,a=e.fullscreenForwardingRef,o=e.shouldFullscreenRoot,r=i.element();if(!r)return t.setState({isFullscreen:!1}),void(o&&t.revertToPreFullscreenSnapshot());var l=!!n&&r.contains(n),s=!!a&&r.contains(a);t.setState({isFullscreen:l||s})},t.setRequestedQuality=function(e){t.setState({requestedQuality:e})},t.setRecommendationsShowing=function(e){t.setState((function(n){return n.recommendationsShowing===e?null:{recommendationsShowing:e}}))},t.setShowControls=function(e){t.setState({showControls:e})},t.setStatsOverlay=function(e){t.setState({statsOverlay:e})},t.updateVideoContainerRef=function(e){e.videoContainer!==t.props.videoContainer&&t.setState({videoContainer:t.props.videoContainer})},t.updateVideoRef=function(e){e.videoRef!==t.props.videoRef&&t.setState({videoRef:t.props.videoRef})},t.setClosedCaptionsAvailable=function(e){t.setState((function(n){return{captions:(0,a.__assign)((0,a.__assign)({},n.captions),{available:e})}}))},t.setClosedCaptionsEnabled=function(e){u.IG.set(k,e),t.setState((function(n){return{captions:(0,a.__assign)((0,a.__assign)({},n.captions),{enabled:e})}}))},t.setClosedCaptionsStyles=function(e){t.setState((function(n){return{captions:(0,a.__assign)((0,a.__assign)({},n.captions),{preset:g.ly,style:(0,a.__assign)((0,a.__assign)({},n.captions.style),e)})}}),(function(){u.IG.set(y,g.ly),u.IG.set(h,t.state.captions.style)}))},t.setClosedCaptionsStylePreset=function(e){g.qS[e]&&(u.IG.set(y,e),u.IG.set(h,g.qS[e]),t.setState((function(n){return{captions:(0,a.__assign)((0,a.__assign)({},n.captions),{preset:e,style:g.qS[e]})}})))},t.showClipKeyboardShortcuts=function(){t.setState((function(e){return!0===e.isKeyboardShortcutsVisible?null:{isKeyboardShortcutsVisible:!0}}))},t.hideClipKeyboardShortcuts=function(){t.setState((function(e){return!1===e.isKeyboardShortcutsVisible?null:{isKeyboardShortcutsVisible:!1}}))},t.handleQualityChanged=function(){t.setRequestedQuality(!1)},t.setStreamInfoShowing=function(e){t.setState((function(n){return n.streamInfoShowing===e?null:{streamInfoShowing:e}}))},t.setIsMenuShowing=function(e){t.setState((function(n){return n.isMenuShowing===e?null:{isMenuShowing:e}}))},t.handleFullscreenRoot=function(e){t.preFullscreenSnapshot={rightColumnExpanded:t.props.rightColumnExpanded,theaterModeEnabled:t.props.theatreModeEnabled},t.props.enableTheatreMode(),t.props.collapseRightColumn(),t.props.fullscreen.enable(e)},t.revertToPreFullscreenSnapshot=function(){t.preFullscreenSnapshot.theaterModeEnabled||t.props.disableTheatreMode(),t.preFullscreenSnapshot.rightColumnExpanded&&t.props.expandRightColumn()};var o=u.IG.get(h,g.qS[g.Pf.WhiteOnBlack]);return"flashing"===o.fontOpacity&&(o.fontOpacity=g.Y4.Solid),t.state={isFullscreen:!1,isClipSharing:!1,isMenuShowing:!1,requestedQuality:!1,showControls:!0,isCollectionSidebarShowing:!1,recommendationsShowing:!1,soundtrackShowing:!!n.enableSoundtrackByTwitch,showClosedCaptionsSettings:!1,streamInfoShowing:!1,isDVRSeekbarVisible:!0,toggleDVRSeekbarVisibility:t.toggleDVRSeekbarVisibility,enterFullscreen:t.enterFullscreen,exitFullscreen:t.exitFullscreen,toggleClipSharing:t.toggleClipSharing,setRequestedQuality:t.setRequestedQuality,setClosedCaptionsAvailable:t.setClosedCaptionsAvailable,setClosedCaptionsEnabled:t.setClosedCaptionsEnabled,setClosedCaptionsSettingsShowing:t.setClosedCaptionsSettingsShowing,setClosedCaptionsStyles:t.setClosedCaptionsStyles,setClosedCaptionsStylesPreset:t.setClosedCaptionsStylePreset,setIsMenuShowing:t.setIsMenuShowing,toggleCollectionSidebar:t.toggleCollectionSidebar,showCollectionSidebar:t.showCollectionSidebar,hideCollectionSidebar:t.hideCollectionSidebar,soundtrackShow:t.soundtrackShow,soundtrackHide:t.soundtrackHide,setShowControls:t.setShowControls,setRecommendationsShowing:t.setRecommendationsShowing,setStreamInfoShowing:t.setStreamInfoShowing,statsOverlay:i.None,setStatsOverlay:t.setStatsOverlay,videoContainer:n.videoContainer,videoRef:n.videoRef,captions:{available:!1,enabled:u.IG.get(k,!1),preset:u.IG.get(y,g.Pf.WhiteOnBlack),style:o},isKeyboardShortcutsVisible:!1,showKeyboardShortcuts:t.showClipKeyboardShortcuts,hideKeyboardShortcuts:t.hideClipKeyboardShortcuts},t.preFullscreenSnapshot={rightColumnExpanded:!1,theaterModeEnabled:!1},t}return(0,a.__extends)(n,e),n.prototype.componentDidMount=function(){this.props.fullscreen.addChangeListener(this.onFullscreenChange),this.props.playerEvents.addEventListener(m.a.QUALITY_CHANGED,this.handleQualityChanged)},n.prototype.componentDidUpdate=function(e){this.updateVideoContainerRef(e),this.updateVideoRef(e)},n.prototype.componentWillUnmount=function(){this.props.fullscreen.removeChangeListener(this.onFullscreenChange)},n.prototype.render=function(){return(0,o.jsx)(w.Provider,{value:this.state,children:this.props.children})},n}(r.Component),N=(0,s.Zz)((0,l.Ng)((function(e){return{rightColumnExpanded:e.ui.rightColumnExpanded,theatreModeEnabled:e.ui.theatreModeEnabled}}),(function(e){return(0,a.__assign)({},(0,s.zH)({enableTheatreMode:c._H,disableTheatreMode:c.lq,collapseRightColumn:c.o_,expandRightColumn:c.DI},e))})),(0,_.cj)((function(e){var n=(0,v.wk)({playerPublicPropsContext:e}),t=n.disableFullscreen,i=n.fullscreenForwardingRef,a=n.enableSoundtrackByTwitch,o=n.shouldFullscreenRoot;return{disableFullscreen:t,fullscreenForwardingRef:i,enableSoundtrackByTwitch:a,shouldFullscreenRoot:o}})),(0,p.X)(),(0,d.W)())(P)},526341:function(e,n,t){"use strict";t.d(n,{$3:function(){return l},Bn:function(){return F},DA:function(){return _},G0:function(){return s},K7:function(){return w},OU:function(){return f},Pf:function(){return h},Rw:function(){return I},Y4:function(){return u},Yf:function(){return c},Yi:function(){return E},ay:function(){return a},dP:function(){return p},iB:function(){return T},kf:function(){return P},ly:function(){return y},mK:function(){return d},o8:function(){return N},qS:function(){return S},sT:function(){return C},sy:function(){return D},tZ:function(){return A},wX:function(){return v},yF:function(){return b},z9:function(){return x},zz:function(){return m}});var i,a,o=t(331635),r=t(440595);!function(e){e.MonoSerif="mono-serif",e.Serif="prop-serif",e.MonoSansSerif="mono-sans-serif",e.SansSerif="prop-sans-serif",e.Casual="casual",e.Cursive="cursive",e.SmallCapitals="small-capitals"}(a||(a={}));var l,s,u,d,c,p,m,v,f={Black:r.h.Black,White:r.h.White,Red:r.h.Red,Green:r.h.Green,Blue:r.h.Blue,Yellow:r.h.Yellow,Magenta:r.h.Magenta,Cyan:r.h.Cyan},_={Black:r.h.Black,White:r.h.White,Red:r.h.Red,Green:r.h.Green,Blue:r.h.Blue,Yellow:r.h.Yellow,Magenta:r.h.Magenta,Cyan:r.h.Cyan,LightGray:r.h.LightGray,Gray:r.h.Gray,DarkGray:r.h.DarkGray,Transparent:r.h.Transparent};!function(e){e.Left="left",e.Center="center",e.Right="right"}(l||(l={})),function(e){e.Top="top",e.Bottom="bottom"}(s||(s={})),function(e){e.SemiTransparent="semiTransparent",e.Transparent="transparent",e.Translucent="translucent",e.Solid="solid"}(u||(u={})),function(e){e.None="none",e.Underline="underline"}(d||(d={})),function(e){e.Normal="normal",e.Italic="italic"}(c||(c={})),function(e){e.Normal="normal",e.Bold="bold"}(p||(p={})),function(e){e.Bold="fontBold",e.Italic="fontItalic",e.Underline="fontUnderline"}(m||(m={})),function(e){e.Depressed="depressed",e.Uniform="uniform",e.Drop="drop",e.Raised="raised",e.None="none"}(v||(v={}));var g={fontSize:20,fontFamily:a.SansSerif,fontOpacity:u.Solid,alignment:l.Left,edge:v.None,verticalPosition:s.Bottom,backgroundColorName:_.Black,backgroundOpacity:u.Solid,windowColorName:_.Transparent,windowOpacity:u.Solid,fontUnderline:d.None,fontBold:p.Normal,fontItalic:c.Normal,fontColorName:f.White},k=(0,o.__assign)((0,o.__assign)({},g),{backgroundOpacity:u.Translucent}),y="custom",h={WhiteOnBlack:"white-on-black",BlackOnWhite:"black-on-white",CyanOnBlack:"cyan-on-black",YellowOnBlack:"yellow-on-black",LimeOnBlack:"lime-on-black",MagentaOnBlack:"magenta-on-black",WhiteOnTransBlack:"white-on-trans-black",CyanOnTransBlack:"cyan-on-trans-black",YellowOnTransBlack:"yellow-on-trans-black",LimeOnTransBlack:"lime-on-trans-black",MagentaOnTransBlack:"magenta-on-trans-black"},S=((i={})[h.WhiteOnBlack]=g,i[h.CyanOnBlack]=(0,o.__assign)((0,o.__assign)({},g),{fontColorName:f.Cyan}),i[h.YellowOnBlack]=(0,o.__assign)((0,o.__assign)({},g),{fontColorName:f.Yellow}),i[h.LimeOnBlack]=(0,o.__assign)((0,o.__assign)({},g),{fontColorName:f.Green}),i[h.MagentaOnBlack]=(0,o.__assign)((0,o.__assign)({},g),{fontColorName:f.Magenta}),i[h.WhiteOnTransBlack]=(0,o.__assign)((0,o.__assign)({},k),{fontColorName:f.White}),i[h.CyanOnTransBlack]=(0,o.__assign)((0,o.__assign)({},k),{fontColorName:f.Cyan}),i[h.YellowOnTransBlack]=(0,o.__assign)((0,o.__assign)({},k),{fontColorName:f.Yellow}),i[h.LimeOnTransBlack]=(0,o.__assign)((0,o.__assign)({},k),{fontColorName:f.Green}),i[h.MagentaOnTransBlack]=(0,o.__assign)((0,o.__assign)({},k),{fontColorName:f.Magenta}),i[h.BlackOnWhite]=(0,o.__assign)((0,o.__assign)({},g),{backgroundColorName:_.White,fontColorName:f.Black}),i),b={"mono-serif":{fontFamily:'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace',fontVariant:"normal"},"prop-serif":{fontFamily:'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif',fontVariant:"normal"},"mono-sans-serif":{fontFamily:'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace',fontVariant:"normal"},"prop-sans-serif":{fontFamily:'Verdana, Arial, Helvetica, "PT Sans Caption", sans-serif',fontVariant:"normal"},casual:{fontFamily:'"Comic Sans MS", Impact, Handlee, fantasy',fontVariant:"normal"},cursive:{fontFamily:'"Monotype Corsiva", "URW Chancery L", "Apple Chancery", "Dancing Script", cursive',fontVariant:"normal"},"small-capitals":{fontFamily:'"Arial Unicode Ms", Arial, Helvetica, Verdana, "Marcellus SC", sans-serif',fontVariant:"small-caps"}},C={semiTransparent:{opacityValue:.3,animation:"none"},transparent:{opacityValue:0,animation:"none"},translucent:{opacityValue:.6,animation:"none"},solid:{opacityValue:1,animation:"none"}},w={depressed:{textShadow:"-1px -1px 2px #000"},uniform:{textShadow:"-2px -2px 0 #000, -2px 2px 0 #000, -2px 0 0 #000, 2px -2px 0 #000, 2px 2px 0 #000, 2px 0 0 #000, 0 -2px 0 #000, 0 2px 0 #000"},drop:{textShadow:"0 2px 5px #000"},raised:{textShadow:"1px 1px 2px #000"},none:{textShadow:"none"}},P={left:{alignItems:"flex-start"},center:{alignItems:"center"},right:{alignItems:"flex-end"}},N={underline:{textDecoration:"underline"},none:{textDecoration:"none"}},D={italic:{fontStyle:"italic"},normal:{fontStyle:"normal"}},F={bold:{fontWeight:"bold"},normal:{fontWeight:"normal"}},T={top:{top:"18%",bottom:"auto"},bottom:{top:"auto",bottom:"10%"}};function I(e,n){return"transparent"===e?"transparent":"rgba(".concat(e,",").concat(n,")")}var A={black:"0,0,0",white:"255,255,255",red:"255,0,0",green:"0,255,0",blue:"0,0,255",yellow:"255,255,0",magenta:"255,0,255",cyan:"0,255,255"},E={black:"0,0,0",white:"255,255,255",red:"255,0,0",green:"0,255,0",blue:"0,0,255",yellow:"255,255,0",magenta:"255,0,255",cyan:"0,255,255",lightgray:"199,199,199",gray:"145,145,145",darkgray:"91,91,91",transparent:"transparent"},x={increment:5,decrement:-5,max:40,min:10}},339563:function(e,n,t){"use strict";var i,a,o,r,l;t.d(n,{Fc:function(){return o},Ie:function(){return l},_w:function(){return i},vM:function(){return a},vS:function(){return r}}),function(e){e[e.FollowAndSub=0]="FollowAndSub",e[e.FollowAndSubVerbose=1]="FollowAndSubVerbose",e[e.WatchAndSub=2]="WatchAndSub"}(i||(i={})),function(e){e[e.AboveStreamInfo=0]="AboveStreamInfo",e[e.BelowStreamInfo=1]="BelowStreamInfo"}(a||(a={})),function(e){e.Once="Once",e.Always="Always"}(o||(o={})),function(e){e[e.Navigate=0]="Navigate",e[e.Modal=1]="Modal"}(r||(r={})),function(e){e.Hidden="hidden",e.Showing="showing"}(l||(l={}))},568552:function(e,n,t){"use strict";var i;t.d(n,{m:function(){return i}}),function(e){e.Fullscreen="fullscreen",e.Popout="popout",e.Theatre="theatre mode",e.Mini="mini",e.Default="default",e.Vertical="vertical",e.Unknown="unknown"}(i||(i={}))},358020:function(e,n,t){"use strict";t.d(n,{y:function(){return o}});var i=t(568552),a=t(331337);function o(e){return e.isFullscreen?i.m.Fullscreen:e.playerType&&e.playerType===a.C.Popout?i.m.Popout:e.theatreModeEnabled?i.m.Theatre:e.mini?i.m.Mini:e.playerType&&e.playerType===a.C.Site?i.m.Default:(null==e?void 0:e.playerType)===a.C.Vertical?i.m.Vertical:i.m.Unknown}},112246:function(e,n,t){"use strict";t.d(n,{A$:function(){return c},SU:function(){return v},Tm:function(){return m},bz:function(){return _},oZ:function(){return p},vg:function(){return f}});var i=t(975928),a=t(697621),o=t(339563),r=t(459487),l=t(573527),s=t(249448),u=t(920953),d=t(894320),c=function(e){var n=e.adContext,t=e.playerContext,r=e.brandLiftContext,l=e.isSDAUpsellShowing,s=(0,d.wk)(e),c=s.forceControlVisibility;return!(s.mini||t.isPlayerCoreLoading||(0,u.k1)({restrictions:t.restrictions})||c===o.Ie.Hidden||n.adFormatMetadata&&(0,a.rW)(n.adFormatMetadata.adFormat)||r.isSurveyShowing||l&&!(0,i.JK)())},p=function(e){var n=e.playerContext,t=(0,d.wk)(e),a=t.forceControlVisibility,r=t.mini,l=(0,i.JK)()||(0,i.FP)();return!(r||n.isPlayerCoreLoading||(0,u.k1)({restrictions:n.restrictions})||a===o.Ie.Hidden||l)},m=function(e){var n=e.playerPublicPropsContext,t=e.playerContext,i=t.playerState===r.p.ENDED,a=!t.hasPlayed;return!((0,l.cz)(e.adContext.videoAdMetadata)||!_(n.content,t.isOffline)||!a&&!i)},v=function(e){var n=e.active,t=e.videoPlaybackContext,i=e.uiContext,a=(0,d.wk)(e).forceControlVisibility;return!(!i.showControls||!n&&t.isPlaying&&a!==o.Ie.Showing)},f=function(e){return!e.uiContext.isCollectionSidebarShowing&&v(e)};function _(e,n){return(0,s.DG)(e)&&n}},635999:function(e,n,t){"use strict";t.d(n,{No:function(){return Y},Vu:function(){return z},Ym:function(){return W},fo:function(){return j},j$:function(){return U},l1:function(){return G},oz:function(){return q},sM:function(){return O}});var i=t(474848),a=t(959340),o=t(65538),r=t(706411),l=t.n(r),s=t(296540),u=t(415044),d=t(868238),c=t(276337),p=t(554043),m=t(12109),v=t(368770),f=t(883474),_=t(58082),g=t(242282),k=t(959391),y=t(952792),h=t(662438),S=t(952346),b=t(233936),C=t(641896),w=t(911906),P=t(129721),N=t(334963),D=t(947153),F=t(573527),T=t(249448),I=t(894320),A=t(521022),E=t(184877),x=t.n(E),M=t(907520),V=t.n(M),L=t(874219),B=t(475960),R="alt+x";var O=(0,c._v)(V(),{options:function(e){return{variables:{input:{login:(0,B.c)(e),ownsVideoID:(0,T.hq)(e.content)}}}},skip:function(e){return!e.isLoggedIn||!(0,B.c)(e)&&!(0,T.hq)(e.content)},name:"channel_data"}),U=function(e){return void 0===e&&(e={}),(0,c._v)(x(),{options:function(e){var n,t;return{variables:{broadcasterID:(0,T.hq)(e.content)?null:null===(t=null===(n=e.channel_data)||void 0===n?void 0:n.userByAttribute)||void 0===t?void 0:t.id,vodID:(0,T.hq)(e.content)}}},skip:function(n){var t,i;return!n.isLoggedIn||!(null===(i=null===(t=n.channel_data)||void 0===t?void 0:t.userByAttribute)||void 0===i?void 0:i.id)&&!(0,T.hq)(n.content)||!(0,m.fX)("can_create_clip_darklaunch")||!(0,B.Y)(n,{skipPlaybackStateCheck:e.skipPlaybackStateCheck})},name:"clip_creation_perms"})},q=(0,d.Zz)((0,u.Ng)((function(e){return{isLoggedIn:(0,v.M3)(e)}})),(0,C.dd)(G),(0,w.cj)(Y),(0,N.AP)(W),(0,b.VX)(j),O,U(),(0,P.o1)())((function(e){var n,t,r,d,c,m,b,C,w,P,N,F,I,E,x=null===(n=e.clip_creation_perms)||void 0===n?void 0:n.canCreateClip,M=s.useState(0),V=M[0],O=M[1],U=(0,y.Q)().track,q=(0,u.d4)(v.wz),G=(0,S.p)().closeModal,W=s.useContext(_.$c),Y=W.openPopup,j=W.isOpened,H=s.useRef(e.muted),Q=(null==q?void 0:q.id)===(null===(r=null===(t=e.channel_data)||void 0===t?void 0:t.userByAttribute)||void 0===r?void 0:r.id),K=function(e){var n=e.streamOffset;O(n)},X=z(x,Q),Z=(0,p.d)(null)===p.E.XS,$=!(null==x?void 0:x.isAllowed)||j,J=(0,k.Cv)(null==x?void 0:x.errorCode,null==x?void 0:x.requiredFollowingLengthMinutes);(0,L.W)(null==q?void 0:q.id,null===(c=null===(d=e.channel_data)||void 0===d?void 0:d.userByAttribute)||void 0===c?void 0:c.id,(function(){var n;null===(n=e.clip_creation_perms)||void 0===n||n.refetch()}));var ee=(null===(C=null===(b=null===(m=e.channel_data)||void 0===m?void 0:m.userByAttribute)||void 0===b?void 0:b.stream)||void 0===C?void 0:C.id)||null,ne=(null===(P=null===(w=e.channel_data)||void 0===w?void 0:w.userByAttribute)||void 0===P?void 0:P.id)||null,te=null!==(I=null===(F=null===(N=e.channel_data)||void 0===N?void 0:N.userByAttribute)||void 0===F?void 0:F.login)&&void 0!==I?I:"",ie=(0,T.hq)(e.content)||void 0,ae=e.mediaPlayerInstance,oe=(0,T.DG)(e.content)?V:null!==(E=null==ae?void 0:ae.getPosition())&&void 0!==E?E:0,re=(0,g.M)({location:window.location,channelLogin:te,vodID:ie||""}).canShowClipEditorPopup,le=function(){if(G(),H.current=e.muted,re()&&Y)return U({action:h.U.CreateClip,broadcastID:ee,channelID:ne,vodID:ie,rawMediaID:"",pip:!0}),void Y({broadcastID:ee,broadcasterID:ne,broadcasterLogin:te,offsetSeconds:Math.floor(oe),vodID:null!=ie?ie:null,initialVolume:H.current?0:e.volume,onMediaLoad:function(){return e.setMuted(!0)},onClose:function(){var n;Y(null),e.setMuted(null!==(n=H.current)&&void 0!==n&&n)}});void 0!==ae&&ne&&((0,k.NC)({broadcastID:null!=ee?ee:void 0,broadcasterLogin:te,offsetSeconds:Math.floor(oe),vodID:ie}),U({action:h.U.CreateClip,broadcastID:ee,channelID:ne,vodID:ie,rawMediaID:""}),e.track("player_click_clip"))};return s.useEffect((function(){var n;if(!x||x.isAllowed)return l().bind(R,le),null===(n=e.mediaPlayerInstance)||void 0===n||n.addEventListener(D.a.SEGMENT_METADATA,K),function(){var n;l().unbind(R),null===(n=e.mediaPlayerInstance)||void 0===n||n.removeEventListener(D.a.SEGMENT_METADATA,K)}})),(0,i.jsx)(i.Fragment,{children:(0,B.Y)(e)&&X&&(0,i.jsx)(a.P,{margin:{x:.5},style:{opacity:$?.5:1},children:(0,i.jsx)(A.g,{tooltipPlacement:"top",label:J,buttonIcon:o.y,onClick:le,disabledInteraction:$,children:!Z&&(0,f.hw)("Clip","ClipsButtonComponent")})})})}));function G(e){return{mediaPlayerInstance:e.mediaPlayerInstance,hasPlayed:e.hasPlayed,isOffline:e.isOffline}}function W(e){return{isPlaying:e.isPlaying,muted:e.muted,volume:e.volume,setMuted:e.setMuted}}function Y(e){return{content:e.content,disableClipping:(0,I.wk)({playerPublicPropsContext:e}).disableClipping}}function j(e){return{isVideoAdShowing:(0,F.cz)(e.videoAdMetadata)}}function z(e,n){return!(e&&!e.isAllowed)||(n?(0,k.L$)(e.errorCode):(0,k.p6)(e.errorCode))}},475960:function(e,n,t){"use strict";t.d(n,{Y:function(){return l},c:function(){return o}});var i=t(883474),a=t(249448);function o(e){var n=e.content;return(0,a.DG)(n)?n.channelLogin:null}function r(e){return!e||!i.Zn.get("highwind_no_clips_channels",[]).includes(e)}function l(e,n){void 0===n&&(n={});var t=n.skipPlaybackStateCheck,i=void 0!==t&&t;return e.isLoggedIn&&!e.disableClipping&&(function(e){var n=e.channel_data;if(void 0===n||n.loading||!n.userByAttribute||!n.userByAttribute.stream)return!1;var t=n.userByAttribute.stream,i=t.id,a=t.isEncrypted,l=Boolean(i),s=o(e);return l&&r(s)&&!a}(e)||function(e){return!(!(0,a.hq)(e.content)&&!(0,a.dB)(e.content))&&r(o(e))}(e))&&(i||function(e){var n=e.content,t=e.isPlaying,i=e.hasPlayed,o=(0,a.DG)(n)&&!t;return i&&!o}(e))&&function(e){var n=e.isOffline,t=e.content,i=o(e),r=(0,a.hq)(t)||(0,a.dB)(e.content),l=!!i;return!(l&&n||!r&&!l)}(e)&&function(e){return!e.isVideoAdShowing}(e)}},521022:function(e,n,t){"use strict";t.d(n,{d:function(){return f},g:function(){return _}});var i=t(331635),a=t(474848),o=t(564368),r=t(79004),l=t(552400),s=t(296540),u=t(192941),d=t(345942),c=t(911906),p=t(731820),m=t(334963),v=t(112246),f=function(e){var n,t=e.children?(0,a.jsx)(o.$n,(0,i.__assign)({variant:o.VQ.Secondary,icon:e.buttonIcon,linkTo:e.linkTo,onClick:e.onClick,"aria-disabled":e.disabled||e.disabledInteraction,disabledInteraction:e.disabledInteraction,disabled:e.disabled,"aria-label":e.label,"aria-haspopup":"menu",overlay:!0,ref:e.anchorRef},(0,u.F)(e),{children:e.children})):(0,a.jsx)(r.a2,(0,i.__assign)({icon:e.buttonIcon,linkTo:e.linkTo,onClick:e.onClick,disabled:e.disabled,"aria-label":e.label,"aria-haspopup":"menu",overlay:!0,ref:e.anchorRef},(0,u.F)(e)));return e.suppressTooltip||e.disabled?t:(0,a.jsx)(l.m,{id:"player-controls-button-tooltip",label:e.label,options:{placement:null!==(n=e.tooltipPlacement)&&void 0!==n?n:"top",modifiers:e.tooltipModifiers},disabled:!e.arePlayerControlsShowing,show:e.showTooltip,children:t})},_=function(e){var n=(0,s.useContext)(d.MP).active,t=(0,s.useContext)(p._t),o=(0,s.useContext)(m.wL),r=(0,s.useContext)(c.kl),l=(0,v.SU)({active:n,uiContext:t,videoPlaybackContext:o,playerPublicPropsContext:r});return(0,s.useMemo)((function(){return(0,a.jsx)(f,(0,i.__assign)({arePlayerControlsShowing:l},e))}),[l,e])}},269247:function(e){e.exports={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VideoPlayerBroadcastSettingsUpdate"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BroadcastSettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"boxArtURL"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"85"}},{kind:"Argument",name:{kind:"Name",value:"height"},value:{kind:"IntValue",value:"113"}}],directives:[]}]}}]}}]}},909974:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PlayerTrackingContextQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"channel"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isLive"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"hasCollection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"videoID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"hasVideo"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"hasClip"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isStaff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasTurbo"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"channel"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isLive"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingBroadcaster"},directives:[]},{kind:"Field",name:{kind:"Name",value:"subscriptionProducts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasAdFree"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcasterSoftware"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingGame"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"restriction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"options"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exemptions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"self"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"follower"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"followedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"subscriptionBenefit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"isModerator"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"broadcastSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingGame"},directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"collectionID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"hasCollection"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"200"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingVOD"},directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingBroadcaster"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"videoID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"hasVideo"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingVOD"},directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingBroadcaster"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"clip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"hasClip"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcaster"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingBroadcaster"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PlayerTrackingGame"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PlayerTrackingVOD"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Video"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PlayerTrackingBroadcaster"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPartner"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PlayerTrackingGame"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Game"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){t(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){t(e,n)})),e.definitions&&e.definitions.forEach((function(e){t(e,n)}))}var i={};n.definitions.forEach((function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}})),e.exports=n},184877:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CanCreateClip"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"broadcasterID"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"canCreateClip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"broadcasterID"},value:{kind:"Variable",name:{kind:"Name",value:"broadcasterID"}}},{kind:"Argument",name:{kind:"Name",value:"vodID"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isAllowed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requiredFollowingLengthMinutes"},arguments:[],directives:[]}]}}]}}]};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){t(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){t(e,n)})),e.definitions&&e.definitions.forEach((function(e){t(e,n)}))}var i={};n.definitions.forEach((function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}})),e.exports=n},907520:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayerClipsButtonBroadcaster"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UserByAttribute"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userByAttribute"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEncrypted"},arguments:[],directives:[]}]}}]}}]}}]};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){t(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){t(e,n)})),e.definitions&&e.definitions.forEach((function(e){t(e,n)}))}var i={};n.definitions.forEach((function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}})),e.exports=n}}]);