(function(g){var window=this;'use strict';var Gib=function(a,b){if(!Number.isFinite(a))return String(a);a=String(a);var c=a.indexOf(".");c===-1&&(c=a.length);var d=a[0]==="-"?"-":"";d&&(a=a.substring(1));return d+(0,g.O8a)("0",Math.max(0,b-c))+a},Hib=function(){return{I:"svg", X:{fill:"#fff",height:"24px",viewBox:"0 0 24 24",width:"24px"},V:[{I:"path",X:{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"}}]}},Iib=function(){return{I:"svg", X:{fill:"#fff",height:"24px",viewBox:"0 0 24 24",width:"24px"},V:[{I:"path",X:{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"}}]}},Kib=function(a){typeof a==="number"?(this.date=Jib(a,0,1),x5(this,1)):g.Ra(a)?(this.date=Jib(a.getFullYear(),a.getMonth(),a.getDate()),x5(this,a.getDate())):(this.date=new Date(g.Xa()),a=this.date.getDate(), this.date.setHours(0),this.date.setMinutes(0),this.date.setSeconds(0),this.date.setMilliseconds(0),x5(this,a))},Jib=function(a,b,c){b=new Date(a,b,c); a>=0&&a<100&&b.setFullYear(b.getFullYear()-1900);return b},x5=function(a,b){a.getDate()!=b&&a.date.setUTCHours(a.date.getUTCHours()+(a.getDate()=3?d.return({error:"ATTESTATION_ERROR_VM_INTERNAL_ERROR"}):d.return(void 0);b=a.getVideoData();c={};return d.return(g.fua((c.cpn=b.clientPlaybackNonce,c.encryptedVideoId=b.videoId||"",c),1500))})},Wib=function(a){var b=a.getVideoData(); if(b.Zl)if(b.L("use_rta_for_player_hb"))a.attestationResponse=ajb(a);else if(b=new g.IBa(b),g.EK.isInitialized()||a.sequenceNumber>=3){var c=Promise,d=c.resolve,e=null;if(b.videoData.xr){var f=g.JBa(b);if(f){e={};var h={};f=f.split("&");f=g.w(f);for(var l=f.next();!l.done;l=f.next())l=l.value.split("="),l.length===2&&(h[l[0]]=l[1]);h.r1a&&(e.webResponse=h.r1a);h.r1c&&(e.error=bjb[Number(h.r1c)]);e.challenge=b.videoData.xr}}a.attestationResponse=d.call(c,e||void 0)}},cjb=function(a){var b=a.getVideoData(); if(!g.jQ(a.getVideoData())||b.GU)return!1;if(b.useInnertubeDrmService()&&b.G){a=b.G.flavor==="playready"&&b.L("html5_innertube_heartbeats_for_playready");var c=b.G.flavor==="widevine"&&b.L("html5_innertube_heartbeats_for_widevine");b=g.FN(b.G)&&b.L("html5_innertube_heartbeats_for_fairplay");return!(a||c||b)}return!0},djb=function(a){if(cjb(a))return!!a.heartbeatParams; var b=a.getVideoData();return g.jQ(a.getVideoData())&&b.useInnertubeDrmService()&&!b.Zj&&!b.XD?!1:!!b.heartbeatToken},C5=function(a,b){if(!a.B.isActive()&&a.N){var c=a.getVideoData(); if(djb(a)||c.isLivePlayback){if(b===void 0)if(a.G)if(a.D)b=7500;else{var d;b=((d=a.heartbeatParams)==null?0:d.interval)?a.heartbeatParams.interval*1E3:a.getVideoData().V3||6E4}else b=1E3;a.B.start(b)}}},hjb=function(a,b,c){b.Fn&&(c=g.Hi(c,{internalipoverride:b.Fn})); var d={cpn:b.clientPlaybackNonce};b.contextParams&&(d.context_params=b.contextParams);b.Jb&&(d.kpt=b.Jb);c=g.Hi(c,d);g.mr(c,{format:"RAW",method:"GET",timeout:3E4,onSuccess:function(e){if(!a.B.isActive()&&D5(a)){a.K.reset();a.sequenceNumber++;e=e.responseText;var f=ejb(e);if(f){a.player.ib("onHeartbeat",f);var h=f.status==="ok"?f.stop_heartbeat?2:0:f.status==="stop"?1:f.status==="live_stream_offline"?0:-1}else h=(h=e.match(fjb))?h[1]==="0"?0:1:-1;gjb(a,void 0,f,e,h)}}, onError:function(e){D5(a)&&E5(a,!0,"net-"+e.status)}, onTimeout:function(){D5(a)&&E5(a,!0,"timeout")}, withCredentials:!0})},Vib=function(a){var b,c; g.J(function(d){b=a.player.U();c=a.getVideoData();if(!D5(a))return d.return();if(cjb(a))return ijb(a,b,c),d.Ha(0);Wib(a);return g.G(d,jjb(a,b,c),0)})},ijb=function(a,b,c){var d; if((d=a.heartbeatParams)!=null&&d.url){var e=g.Hi(a.heartbeatParams.url,{request_id:g.nqa()});c.ra&&(e=g.Hi(e,{vvt:c.ra}),c.mdxEnvironment&&(e=g.Hi(e,{mdx_environment:c.mdxEnvironment})));g.TO(b,c.oauthToken).then(function(f){f&&(e=g.Hi(e,{access_token:f}));hjb(a,c,e)})}},D5=function(a){var b=a.getVideoData(); return a.player.getPresentingPlayerType()===3||g.Z(a.player.getPlayerStateObject(a.getPlayerType()),4)?!1:djb(a)||b.isLivePlayback?!0:(F5(a),!1)},jjb=function(a,b,c){var d,e,f,h,l,m,n,p,q,r,t,u,y,A,D,F,H,M,N,S; return g.J(function(ba){if(ba.j==1)return d="player/heartbeat",f={videoId:c.videoId,sequenceNumber:a.sequenceNumber,heartbeatServerData:(e=a.ra)!=null?e:c.heartbeatServerData},a.Y=a.attestationResponse,c.Zl?g.G(ba,a.Y,3):ba.Ha(2);ba.j!=2&&(f.attestationResponse=ba.B);h=g.MQ(c);m=(l=h.client)!=null?l:{};m.utcOffsetMinutes=a.utcOffsetMinutes;f.context=h;f.cpn=c.clientPlaybackNonce;if(n=typeof Intl!=="undefined"?(new Intl.DateTimeFormat).resolvedOptions().timeZone:null)m.timeZone=n;p={heartbeatChecks:[]}; if(q=c.getPlayerResponse())c.heartbeatToken&&(f.heartbeatToken=c.heartbeatToken),(r=q.playabilityStatus)&&(t=r.liveStreamability)&&t.liveStreamabilityRenderer&&p.heartbeatChecks.push("HEARTBEAT_CHECK_TYPE_LIVE_STREAM_STATUS");c.heartbeatToken&&p.heartbeatChecks.push("HEARTBEAT_CHECK_TYPE_YPC");g.gC(b)&&(p.heartbeatChecks.push("HEARTBEAT_CHECK_TYPE_UNPLUGGED"),u=kjb(a),y={},u!==null&&(y.clientPlayerPositionUtcMillis=u),D=(A=a.player.Bb())==null?void 0:g.yU(A),H=((F=D)==null?void 0:F.freePreviewWatchedDuration)|| 0,H>0&&(y.freePreviewWatchedDuration={seconds:""+H}),p.unpluggedParams=y);f.heartbeatRequestParams=p;c.isLivePlayback?(M=kjb(a),M!==null&&(f.playbackState||(f.playbackState={}),f.playbackState.playbackPosition={utcTimeMillis:M})):b.L("enable_heartbeat_vod_playback_position")&&(N=ljb(a),N!==null&&(f.playbackState||(f.playbackState={}),f.playbackState.playbackPosition={streamTimeMillis:N}));a.player.publish("heartbeatRequest",f);S={timeout:3E4,onSuccess:function(ha){if(!a.B.isActive()&&D5(a)){var na= a.getVideoData(),Y=na.Zl&&a.Y==null,R;na.Zl=!((R=ha.heartbeatAttestationConfig)==null||!R.requiresAttestation)||Y;Y=ha.playabilityStatus;R=JSON.stringify(Y)||"{}";ha.authenticationMismatch&&a.player.oa("authshear",{});var W=-1;var v=ha.playabilityStatus;v&&(a.player.ib("onHeartbeat",v),v.status==="OK"?W=ha.stopHeartbeat?2:0:v.status==="UNPLAYABLE"?W=1:v.status==="LIVE_STREAM_OFFLINE"&&(W=0));a.sequenceNumber&&W===-1||a.K.reset();a.sequenceNumber++;ha.heartbeatServerData&&(a.ra=ha.heartbeatServerData); na.aE=ha;(v=ha.playerCueRangeSet)&&g.JP(na,v);ha.playerCueRanges&&ha.playerCueRanges.length>0&&(na.cueRanges=ha.playerCueRanges);var V,cb;((V=ha.progressBarConfig)==null?0:V.progressBarStartPosition)&&((cb=ha.progressBarConfig)==null?0:cb.progressBarEndPosition)&&(na.progressBarStartPosition=ha.progressBarConfig.progressBarStartPosition,na.progressBarEndPosition=ha.progressBarConfig.progressBarEndPosition);na.compositeLiveIngestionOffsetToken=ha.compositeLiveIngestionOffsetToken;ha.compositeLiveStatusToken!== na.compositeLiveStatusToken&&(na.compositeLiveStatusToken=ha.compositeLiveStatusToken);na.publish("dataupdated");gjb(a,ha,Y,R,W)}}, onError:function(ha){D5(a)&&E5(a,!0,"net-"+ha.status)}, onTimeout:function(){D5(a)&&E5(a,!0,"timeout")}}; g.TO(b,g.DQ(c)).then(function(ha){ha&&(S.WW="Bearer "+ha);g.Uu(a.qa,d,f,S)}); g.va(ba)})},gjb=function(a,b,c,d,e){e===-1?(c="decode "+g.Qe(d,3),E5(a,!1,c)):e===2?(F5(a),a.G=!0):(a.Z=0,a.B.stop(),e===1?(a.G=!1,c&&c.errorCode==="PLAYABILITY_ERROR_CODE_EMBARGOED"&&a.player.Vo(!0),e="pe."+(c==null?void 0:c.errorCode)+";ps."+(c==null?void 0:c.status),a.player.Mf("heartbeat.stop",2,a.Yf(d),e),g.Xs("heartbeatActionPlayerHalted",mjb(c)),(b==null?0:b.videoTransitionEndpoint)&&c&&(b=b.videoTransitionEndpoint,(d=g.Q(b,g.VP))&&njb(a,d,c,{itct:b==null?void 0:b.clickTrackingParams}))):(a.G= !0,d=0,a.D&&c&&(d=Yib(a,b,c),a.player.publish("livestatedata",c)),d?C5(a,d):C5(a)))},Yib=function(a,b,c){var d=c.liveStreamability&&c.liveStreamability.liveStreamabilityRenderer,e=!(!d||!(d.switchStreamsImmediately||d.transitionTiming&&d.transitionTiming==="STREAM_TRANSITION_TIMING_IMMEDIATELY")); b=ojb(a,b,d);var f=a.getVideoData(),h=a.player.getPlayerStateObject(a.getPlayerType()),l=h.isPlaying()&&!g.qQ(f)&&!a.player.isAtLiveHead(a.getPlayerType());if(f.U().zc()){var m,n=((m=a.player.Le())==null?void 0:m.uc())||{};n.status=c.status||"";n.dvr=""+ +l;n["switch"]=""+ +e;n.ended=""+ +!(!d||!d.displayEndscreen);a.player.oa("heartbeat",n)}if(l&&!e)return b;e=d&&d.streamTransitionEndpoint&&g.Q(d.streamTransitionEndpoint,g.VP);if((d&&d.transitionTiming)==="STREAM_TRANSITION_TIMING_AT_STREAM_END")a.getVideoData().transitionEndpointAtEndOfStream= e;else if(e&&njb(a,e,c))return b;if(c.status.toUpperCase()==="OK"){e=d&&d.broadcastId;m=a.j&&a.j.liveStreamability&&a.j.liveStreamability.liveStreamabilityRenderer&&a.j.liveStreamability.liveStreamabilityRenderer.broadcastId;l=e!==m&&e!=null;if(!g.nQ(f)||l){var p={video_id:f.videoId};f.VF&&(p.is_live_destination="1");a.player.L("web_player_heartbeat_request_watch_next")||(p.disable_watch_next=!0,p.raw_watch_next_response=f.getWatchNextResponse());p.autonav_state=f.autonavState;p.oauth_token=f.oauthToken; p.force_gvi=f.En;p.Vm=f.Vm;f.K&&(p.vss_credentials_token=f.K,p.vss_credentials_token_type=f.yn);f.ra&&(p.vvt=f.ra);d=void 0;g.nQ(f)?l&&(d=new B5("broadcastIdChanged",m+","+e),a.VK("HEARTBEAT_ACTION_TRIGGER_IMMEDIATE","HEARTBEAT_ACTION_TRANSITION_REASON_BROADCAST_ID_CHANGED",c)):(e&&(d=new B5("formatsReceived",""+e)),a.VK("HEARTBEAT_ACTION_TRIGGER_IMMEDIATE","HEARTBEAT_ACTION_TRANSITION_REASON_LIVE_STREAM_WENT_ONLINE",c));a.player.loadVideoByPlayerVars(p,void 0,void 0,void 0,d);return b}a.player.Eg("heartbeat", a.getPlayerType())}d&&d.displayEndscreen&&(a.offlineSlate?(a=a.offlineSlate,a.K=!0,a.Gb&&a.api.sC()):h.isBuffering()&&(f=((p=a.player.Le())==null?void 0:p.uc())||{},a.player.oa("hbse",f,!0),a.player.sC(),a.player.ib("onLiveMediaEnded",c)));return b},ojb=function(a,b,c){return a.player.L("web_player_use_heartbeat_poll_delay_ms")&&(a=Number(b==null?void 0:b.pollDelayMs))?a:(c=Number(c==null?void 0:c.pollDelayMs))?c:0},E5=function(a,b,c){var d=a.player.U(); if(!a.B.isActive()){a.B.stop();a.Z++;var e=b?"heartbeat.net":"heartbeat.servererror";var f=a.getVideoData();if(f.EU||b&&!g.jQ(a.getVideoData())&&!djb(a)&&f.isLivePlayback)f=!1;else{var h,l;((l=a.heartbeatParams)==null?0:l.retries)?h=a.heartbeatParams.retries:h=f.X3||5;f=a.Z>=h}f?(g.Xs("heartbeatActionPlayerHalted",b?{enforcedPolicyToHaltOnNetworkFailure:!0}:mjb()),(b=a.getVideoData())&&b.isLivePlayback?a.player.Mf(e,1,"Video playback interrupted. Please try again.",c):a.player.Mf(e,1,"Sorry, there was an error licensing this video.", c)):(d.L("html5_report_non_fatal_heartbeat_error")&&a.player.Os(e,{msg:c}),C5(a,a.K.getValue()),g.Yh(a.K))}},mjb=function(a){var b={enforcedPolicyToHaltOnNetworkFailure:!1}; a&&(b.serializedServerContext=a.additionalLoggingData);return b},F5=function(a){a.Z=0; a.B.stop();a.G=!1;a.sequenceNumber=0},Xib=function(a){var b=a.getVideoData(),c=a.player.U(); if(b.isLivePlayback)if(g.WN(c.G)){a.D=!0;a.N=!0;if(!g.iC(c)||g.gC(c))a.offlineSlate=new Tib(a.player),g.P(a,a.offlineSlate),g.oR(a.player,a.offlineSlate.element,4);(b=b.getPlayerResponse())&&b.playabilityStatus&&(a.j=b.playabilityStatus);var d;((d=a.j)==null?void 0:d.status)!=="UNPLAYABLE"&&(a.j?(d=ojb(a,void 0,a.j.liveStreamability&&a.j.liveStreamability.liveStreamabilityRenderer))?C5(a,d):C5(a,7500):C5(a,1E3))}else a.player.Mf("html5.unsupportedlive",2,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","nolive.1"); else g.Nb(b.Ga,"heartbeat")&&a.player.Eg("heartbeat",a.getPlayerType())},njb=function(a,b,c,d){var e=b&&b.videoId; return e?(a.player.tp(e,Object.assign({},{autonav:"1"},d||{}),void 0,!0,!0,b,g.DQ(a.getVideoData())),a.VK("HEARTBEAT_ACTION_TRIGGER_IMMEDIATE","HEARTBEAT_ACTION_TRANSITION_REASON_HAS_NEW_STREAM_TRANSITION_ENDPOINT",c),!0):!1},kjb=function(a){return(a=a.player.getProgressState(a.getPlayerType()).ingestionTime)&&isFinite(a)?""+Math.floor(a*1E3):null},ljb=function(a){return(a=a.player.getCurrentTime(a.getPlayerType()))&&isFinite(a)?""+Math.floor(a*1E3):null},ejb=function(a){try{var b=JSON.parse(a); return b!=null?b:void 0}catch(c){}},pjb={ERAS:["BC", "AD"],ERANAMES:["Before Christ","Anno Domini"],NARROWMONTHS:"JFMAMJJASOND".split(""),STANDALONENARROWMONTHS:"JFMAMJJASOND".split(""),MONTHS:"January February March April May June July August September October November December".split(" "),STANDALONEMONTHS:"January February March April May June July August September October November December".split(" "),SHORTMONTHS:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONESHORTMONTHS:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), WEEKDAYS:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),STANDALONEWEEKDAYS:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTWEEKDAYS:"Sun Mon Tue Wed Thu Fri Sat".split(" "),STANDALONESHORTWEEKDAYS:"Sun Mon Tue Wed Thu Fri Sat".split(" "),NARROWWEEKDAYS:"SMTWTFS".split(""),STANDALONENARROWWEEKDAYS:"SMTWTFS".split(""),SHORTQUARTERS:["Q1","Q2","Q3","Q4"],QUARTERS:["1st quarter","2nd quarter","3rd quarter","4th quarter"],AMPMS:["AM","PM"],DATEFORMATS:["EEEE, MMMM d, y", "MMMM d, y","MMM d, y","M/d/yy"],TIMEFORMATS:["h:mm:ss\u202fa zzzz","h:mm:ss\u202fa z","h:mm:ss\u202fa","h:mm\u202fa"],DATETIMEFORMATS:["{1} 'at' {0}","{1} 'at' {0}","{1}, {0}","{1}, {0}"],FIRSTDAYOFWEEK:6,WEEKENDRANGE:[5,6],FIRSTWEEKCUTOFFDAY:5},qjb=pjb;qjb=pjb;var bjb=["ATTESTATION_ERROR_UNKNOWN","ATTESTATION_ERROR_VM_NOT_INITIALIZED","ATTESTATION_ERROR_VM_NO_RESPONSE","ATTESTATION_ERROR_VM_TIMEOUT","ATTESTATION_ERROR_VM_INTERNAL_ERROR"];g.k=Kib.prototype;g.k.bY=qjb.FIRSTDAYOFWEEK;g.k.cY=qjb.FIRSTWEEKCUTOFFDAY; g.k.clone=function(){var a=new Kib(this.date);a.bY=this.bY;a.cY=this.cY;return a}; g.k.getFullYear=function(){return this.date.getFullYear()}; g.k.getYear=function(){return this.getFullYear()}; g.k.getMonth=function(){return this.date.getMonth()}; g.k.getDate=function(){return this.date.getDate()}; g.k.getTime=function(){return this.date.getTime()}; g.k.getDay=function(){return this.date.getDay()}; g.k.getUTCFullYear=function(){return this.date.getUTCFullYear()}; g.k.getUTCMonth=function(){return this.date.getUTCMonth()}; g.k.getUTCDate=function(){return this.date.getUTCDate()}; g.k.getUTCDay=function(){return this.date.getDay()}; g.k.getUTCHours=function(){return this.date.getUTCHours()}; g.k.getUTCMinutes=function(){return this.date.getUTCMinutes()}; g.k.getTimezoneOffset=function(){return this.date.getTimezoneOffset()}; g.k.set=function(a){this.date=new Date(a.getFullYear(),a.getMonth(),a.getDate())}; g.k.setFullYear=function(a){this.date.setFullYear(a)}; g.k.setYear=function(a){this.setFullYear(a)}; g.k.setMonth=function(a){this.date.setMonth(a)}; g.k.setDate=function(a){this.date.setDate(a)}; g.k.setTime=function(a){this.date.setTime(a)}; g.k.setUTCFullYear=function(a){this.date.setUTCFullYear(a)}; g.k.setUTCMonth=function(a){this.date.setUTCMonth(a)}; g.k.setUTCDate=function(a){this.date.setUTCDate(a)}; g.k.add=function(a){if(a.years||a.months){var b=this.getMonth()+a.months+a.years*12,c=this.getYear()+Math.floor(b/12);b%=12;b<0&&(b+=12);a:{switch(b){case 1:var d=c%4!=0||c%100==0&&c%400!=0?28:29;break a;case 5:case 8:case 10:case 3:d=30;break a}d=31}d=Math.min(d,this.getDate());this.setDate(1);this.setFullYear(c);this.setMonth(b);this.setDate(d)}a.days&&(c=this.getYear(),b=c>=0&&c<=99?-1900:0,a=new Date((new Date(c,this.getMonth(),this.getDate(),12)).getTime()+a.days*864E5),this.setDate(1),this.setFullYear(a.getFullYear()+ b),this.setMonth(a.getMonth()),this.setDate(a.getDate()),x5(this,a.getDate()))}; g.k.toString=function(){var a=this.getFullYear(),b=a<0?"-":a>=1E4?"+":"";return[b+Gib(Math.abs(a),b?6:4),Gib(this.getMonth()+1,2),Gib(this.getDate(),2)].join("")+""}; g.k.valueOf=function(){return this.date.valueOf()};var rjb=new g.lq("addUpcomingEventReminderEndpoint");var sjb=new g.lq("removeUpcomingEventReminderEndpoint");var tjb=new g.lq("updateUpcomingEventReminderButtonStateCommand");var Mib=new g.lq("upcomingEventReminderButtonRenderer"),Sib=new g.lq("upcomingEventReminderButtonStateRenderer");g.z(y5,g.uR); y5.prototype.updateMenuItems=function(){var a=this,b=Lib(this),c=0;c=0;for(var d={};c e&&(e=h[l].width||0,f=h[l].url);f&&(this.background.style.backgroundImage="url("+f+")")}else this.background.style.backgroundImage="";b.actionButtons||b.reminderButton?(this.j||(this.j=new z5(this.api),this.j.Ja(this.Ea("ytp-offline-slate-buttons")),g.P(this,this.j)),Nib(this.j,b.actionButtons&&b.actionButtons[0],b.reminderButton)):this.j&&Nib(this.j,null,null);this.B=a}else this.B=null;this.B3()}; g.k.B3=function(a){if(this.api.getPresentingPlayerType()===8)var b=!0;else{var c=this.api.getPlayerStateObject(),d=this.getVideoData();b=d.isLivePlayback&&(c.isBuffering()||g.Z(c,2)||g.Z(c,64));var e=d.autonavState===2&&g.Z(c,2);c=c.isPlaying()&&!g.qQ(d)&&!this.api.isAtLiveHead(void 0,!0);b=b&&!c&&!e}b&&this.B?this.Gb?(a==null?0:g.fy(a,2))&&!this.getVideoData().tm&&(g.Vo(this.element,"ytp-offline-slate-collapsed"),this.D.stop(),g.Vo(this.C,"ytp-offline-slate-bar-fade"),this.G.start()):(this.show(), this.D.start(),this.api.publish("offlineslatestatechange"),this.K&&this.api.sC()):this.Gb&&(this.hide(),this.api.publish("offlineslatestatechange"))}; g.k.x3=function(){var a,b,c,d,e=(a=this.B)==null?void 0:(b=a.liveStreamability)==null?void 0:(c=b.liveStreamabilityRenderer)==null?void 0:(d=c.offlineSlate)==null?void 0:d.liveStreamOfflineSlateRenderer;e&&(a=Math.floor(g.Xa()/1E3),b=e.canShowCountdown&&Number(e.scheduledStartTime),!b||b<=a?(Uib(this,e),this.countdownTimer.stop()):(Uib(this,e,g.oy(b-a)),g.Mo(this.countdownTimer)))}; g.k.xa=function(){this.countdownTimer.dispose();this.countdownTimer=null;g.U.prototype.xa.call(this)};B5.prototype.B=function(a){return this.trigger&&a.trigger?this.module===a.module&&this.trigger===a.trigger&&this.j===a.j:!1}; B5.prototype.isExpired=function(){return(0,g.T)()-this.C>6E4}; B5.prototype.toString=function(){return this.module+":"+this.trigger+":"+this.j};g.z($ib,g.ST);g.k=$ib.prototype;g.k.xa=function(){F5(this);this.player.sf("heartbeat");g.ST.prototype.xa.call(this)}; g.k.onCueRangeEnter=function(){this.N=!0;C5(this,2E3)}; g.k.BG=function(a){this.heartbeatParams=a;C5(this,2E3)}; g.k.Q4=function(a){var b;this.player.getPresentingPlayerType()!==8&&((b=this.j)==null?void 0:b.status)!=="UNPLAYABLE"&&(g.Z(a.state,2)||g.Z(a.state,64)?(F5(this),this.D&&(this.N=!0,C5(this,1E3))):(g.Z(a.state,1)||g.Z(a.state,8))&&C5(this,2E3))}; g.k.R4=function(){this.player.getPresentingPlayerType()!==3&&C5(this,2E3)}; g.k.getPlayerType=function(){if(this.player.getPresentingPlayerType()===8)return 1}; g.k.getVideoData=function(){return this.player.getVideoData(this.getPlayerType())}; g.k.pn=function(a){switch(a){case 4:case 3:return!1}return!0}; g.k.VK=function(a,b,c){a={trigger:a,reason:b};c&&(a.serializedServerContext=c.additionalLoggingData);g.Xs("heartbeatActionPlayerTransitioned",a)}; g.k.Yf=function(a){var b="LICENSE",c=ejb(a);if(c)return c.reason||g.HU[b]||"";(a=a.match(fjb))&&(a=Number(a[1]))&&(b=g.pwa(a));return g.HU[b]||""}; g.k.NF=function(){return!!this.offlineSlate&&this.offlineSlate.Gb}; var fjb=/^GLS\/1.0 (\d+) (\w+).*?\r\n\r\n([\S\s]*)$/;g.RT("heartbeat",$ib);})(_yt_player);