(function(g){var window=this;'use strict';var IuL=function(e){if(e instanceof g.vs)return e;if(typeof e.qZ=="function")return e.qZ(!1);if(g.oL(e)){var L=0,c=new g.vs;c.next=function(){for(;;){if(L>=e.length)return g.T8;if(L in e)return g.f0(e[L++]);L++}}; return c}throw Error("Not implemented");},BWM=function(e,L,c){if(g.oL(e))g.KZ(e,L,c); else for(e=IuL(e);;){var I=e.next();if(I.done)break;L.call(c,I.value,void 0,e)}},eU=function(e){g.ob(e,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.O9()).toString(36)); return e},LV=function(e,L,c){Array.isArray(c)||(c=[String(c)]); g.jjn(e.G,L,c)},xNZ=function(e,L){var c=[]; BWM(L,function(I){try{var B=g.AL.prototype.K.call(this,I,!0)}catch(x){if(x=="Storage: Invalid value was encountered")return;throw x;}B===void 0?c.push(I):g.Xkc(B)&&c.push(I)},e); return c},oJe=function(e,L){xNZ(e,L).forEach(function(c){g.AL.prototype.remove.call(this,c)},e)},SeJ=function(e){if(e.IU){if(e.IU.locationOverrideToken)return{locationOverrideToken:e.IU.locationOverrideToken}; if(e.IU.latitudeE7!=null&&e.IU.longitudeE7!=null)return{latitudeE7:e.IU.latitudeE7,longitudeE7:e.IU.longitudeE7}}return null},rGN=function(e,L){g.Fh(e,L)||e.push(L)},ha9=function(e){var L=0,c; for(c in e)L++;return L},RaN=function(e,L){return g.t_(e,L)},u$M=function(e){try{return g.LZ.JSON.parse(e)}catch(L){}e=String(e); if(/^\s*$/.test(e)?0:/^[\],:{}\s\u2028\u2029]*$/.test(e.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+e+")")}catch(L){}throw Error("Invalid JSON string: "+e);},cp=function(e){if(g.LZ.JSON)try{return g.LZ.JSON.parse(e)}catch(L){}return u$M(e)},tMh=function(){var e=It(); this.X=e;e.Io("/client_streamz/youtube/living_room/mdx/channel/opened",g.LM("channel_type"))},OTL=function(){var e=It(); this.X=e;e.Io("/client_streamz/youtube/living_room/mdx/channel/closed",g.LM("channel_type"))},qeg=function(){var e=It(); this.X=e;e.Io("/client_streamz/youtube/living_room/mdx/channel/message_received",g.LM("channel_type"))},TWN=function(){var e=It(); this.X=e;e.Io("/client_streamz/youtube/living_room/mdx/channel/success")},WHN=function(){var e=It(); this.X=e;e.Io("/client_streamz/youtube/living_room/mdx/channel/error",g.LM("channel_type"),g.LM("error_type"))},MMM=function(){var e=It(); this.X=e;e.Io("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},zaw=function(){var e=It(); this.X=e;e.Io("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},s6N=function(e,L,c,I){var B=new g.Yd(null); e&&g.na(B,e);L&&g.e9(B,L);c&&g.Ls(B,c);I&&(B.K=I);return B},vJL=function(e,L){return new g.U1(e,L)},Bp=function(e,L){return Object.prototype.hasOwnProperty.call(e,L)},fuN=function(e,L){return e===L},x3=function(e,L){this.K={}; this.X=[];this.zf=this.size=0;var c=arguments.length;if(c>1){if(c%2)throw Error("Uneven number of arguments");for(var I=0;I5&&(e=e.slice(e.length-5)); var L=g.Mt(xLZ(),function(I){return I.loungeToken}),c=g.Mt(e,function(I){return I.loungeToken}); g.zM(c,function(I){return!g.Fh(L,I)})&&oaZ(); g.bS("yt-remote-local-screens",e,31536E3)},qn=function(e){e||(g.Gx("yt-remote-session-screen-id"),g.Gx("yt-remote-session-video-id")); IMN();e=td();g.i7(e,O8());L2e(e)},rFZ=function(){if(!TS){var e=g.k2(); e&&(TS=new g.sm(e))}},hI7=function(){rFZ(); return TS?!!TS.get("yt-remote-use-staging-server"):!1},Wp=function(e,L){g.lM[e]=!0; var c=g.j4();c&&c.publish.apply(c,arguments);g.lM[e]=!1},RIe=function(){},It=function(){if(!Mn){Mn=new g.Nq(new RIe); var e=g.tF("client_streamz_web_flush_count",-1);e!==-1&&(Mn.Z=e)}return Mn},u1M=function(){var e=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return e?parseInt(e[1],10):0},tGZ=function(e){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+e)!=-1||document.currentScript.src.indexOf("&"+e)!=-1)},OQL=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},zS=function(e){e.length?qNU(e.shift(),function(){zS(e)}):Ta7()},W29=function(e){return"chrome-extension://"+e+"/cast_sender.js"},qNU=function(e,L,c){var I=document.createElement("script"); I.onerror=L;c&&(I.onload=c);g.fo(I,g.Wu(e));(document.head||document.documentElement).appendChild(I)},MGN=function(){var e=u1M(),L=[]; if(e>1){var c=e-1;L.push("//www.gstatic.com/eureka/clank/"+e+"/cast_sender.js");L.push("//www.gstatic.com/eureka/clank/"+c+"/cast_sender.js")}return L},Ta7=function(){var e=OQL(); e&&e(!1,"No cast extension found")},sCh=function(){if(zIg){var e=2,L=OQL(),c=function(){e--; e==0&&L&&L(!0)}; window.__onGCastApiAvailable=c;qNU("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",Ta7,c)}},vaN=function(){sCh(); var e=MGN();e.push("//www.gstatic.com/eureka/clank/cast_sender.js");zS(e)},AFU=function(){sCh(); var e=MGN();e.push.apply(e,g.V(fMJ.map(W29)));e.push("//www.gstatic.com/eureka/clank/cast_sender.js");zS(e)},s8=function(e,L,c){g.p.call(this); this.j=c!=null?(0,g.RL)(e,c):e;this.Lp=L;this.B=(0,g.RL)(this.xJ,this);this.X=!1;this.K=0;this.Z=this.Jw=null;this.G=[]},vp=function(){},F2U=function(){g.Hk.call(this,"p")},bQg=function(){g.Hk.call(this,"o")},GZ7=function(){return iQN=iQN||new g.hi},gaN=function(e){g.Hk.call(this,"serverreachability",e)},fV=function(e){var L=GZ7(); L.dispatchEvent(new gaN(L,e))},kZM=function(e){g.Hk.call(this,"statevent",e)},Ad=function(e){var L=GZ7(); L.dispatchEvent(new kZM(L,e))},DLL=function(e,L,c,I){g.Hk.call(this,"timingevent",e); this.size=L;this.rtt=c;this.retries=I},FX=function(e,L){if(typeof e!=="function")throw Error("Fn must not be null and must be a function"); return g.LZ.setTimeout(function(){e()},L)},bu=function(){},iu=function(e,L,c,I){this.Z=e; this.G=L;this.Cf=c;this.gT=I||1;this.DY=new g.uB(this);this.Sl=45E3;this.Y9=null;this.j=!1;this.D=this.m$=this.J=this.t7=this.Gm=this.x9=this.pS=null;this.h7=[];this.X=null;this.T=0;this.B=this.k9=null;this.sY=-1;this.ye=!1;this.d_=0;this.He=null;this.RT=this.Pe=this.Kf=this.Ve=!1;this.K=new w3g},w3g=function(){this.Z=null; this.X="";this.K=!1},VGh=function(e,L,c){e.t7=1; e.J=eU(L.clone());e.D=c;e.Ve=!0;JFU(e,null)},JFU=function(e,L){e.Gm=Date.now(); GS(e);e.m$=e.J.clone();LV(e.m$,"t",e.gT);e.T=0;var c=e.Z.t7;e.K=new w3g;e.X=CLg(e.Z,c?L:null,!e.D);e.d_>0&&(e.He=new g.Qw((0,g.RL)(e.Kr,e,e.X),e.d_));e.DY.listen(e.X,"readystatechange",e.DA);L=e.Y9?g.MQ(e.Y9):{};e.D?(e.k9||(e.k9="POST"),L["Content-Type"]="application/x-www-form-urlencoded",e.X.send(e.m$,e.k9,e.D,L)):(e.k9="GET",e.X.send(e.m$,e.k9,null,L));fV(1)},NaL=function(e){if(!aMe(e))return g.QH(e.X); var L=g.dT(e.X);if(L==="")return"";var c="",I=L.length,B=g.lq(e.X)==4;if(!e.K.Z){if(typeof TextDecoder==="undefined")return gX(e),k3(e),"";e.K.Z=new g.LZ.TextDecoder}for(var x=0;xL.length)return mLN;L=L.slice(I,I+c);e.T=I+c;return L},GS=function(e){e.x9=Date.now()+e.Sl; p3e(e,e.Sl)},p3e=function(e,L){if(e.pS!=null)throw Error("WatchDog timer not null"); e.pS=FX((0,g.RL)(e.rO,e),L)},$LL=function(e){e.pS&&(g.LZ.clearTimeout(e.pS),e.pS=null)},k3=function(e){e.Z.Dj()||e.ye||jCh(e.Z,e)},gX=function(e){$LL(e); g.L0(e.He);e.He=null;e.DY.removeAll();if(e.X){var L=e.X;e.X=null;L.abort();L.dispose()}},X3N=function(e,L){try{var c=e.Z; if(c.xI!=0&&(c.X==e||HQ9(c.K,e)))if(!e.Pe&&HQ9(c.K,e)&&c.xI==3){try{var I=c.Yf.X.parse(L)}catch(A){I=null}if(Array.isArray(I)&&I.length==3){var B=I;if(B[0]==0)a:{if(!c.J){if(c.X)if(c.X.Gm+3E30&&(c.d_=1.5*h);I=c;var R=e.LQ();if(R){var u=g.Ua(R,"X-Client-Wire-Protocol");if(u){var t=I.K;!t.X&&(g.Vc(u,"spdy")||g.Vc(u,"quic")||g.Vc(u,"h2"))&&(t.G=t.B,t.X=new Set,t.K&&(QCg(t,t.K),t.K=null))}if(I.Ve){var O=g.Ua(R,"X-HTTP-Session-Id");O&&(I.FD=O,g.ob(I.Y9,I.Ve,O))}}c.xI=3;c.B&&c.B.Vb();c.xT&&(c.RI=Date.now()-e.Gm);I=c;var q=e;I.m1=dLw(I,I.t7?I.gT:null,I.Cf);if(q.Pe){ULN(I.K, q);var T=q,W=I.d_;W&&T.setTimeout(W);T.pS&&($LL(T),GS(T));I.X=q}else EaZ(I);c.Z.length>0&&V7(c)}else x[0]!="stop"&&x[0]!="close"||Jd(c,7);else c.xI==3&&(x[0]=="stop"||x[0]=="close"?x[0]=="stop"?Jd(c,7):c.disconnect():x[0]!="noop"&&c.B&&c.B.Ij(x),c.h7=0)}fV(4)}catch(A){}},K2e=function(e,L){this.X=e; this.map=L;this.context=null},YNU=function(e){this.B=e||10; g.LZ.PerformanceNavigationTiming?(e=g.LZ.performance.getEntriesByType("navigation"),e=e.length>0&&(e[0].nextHopProtocol=="hq"||e[0].nextHopProtocol=="h2")):e=!!(g.LZ.chrome&&g.LZ.chrome.loadTimes&&g.LZ.chrome.loadTimes()&&g.LZ.chrome.loadTimes().wasFetchedViaSpdy);this.G=e?this.B:1;this.X=null;this.G>1&&(this.X=new Set);this.K=null;this.Z=[]},naM=function(e){return e.K?!0:e.X?e.X.size>=e.G:!1},PLM=function(e){return e.K?1:e.X?e.X.size:0},HQ9=function(e,L){return e.K?e.K==L:e.X?e.X.has(L):!1},QCg= function(e,L){e.X?e.X.add(L):e.K=L},ULN=function(e,L){e.K&&e.K==L?e.K=null:e.X&&e.X.has(L)&&e.X.delete(L)},evZ=function(e){if(e.K!=null)return e.Z.concat(e.K.h7); if(e.X!=null&&e.X.size!==0){var L=e.Z;e=g.f(e.X.values());for(var c=e.next();!c.done;c=e.next())L=L.concat(c.value.h7);return L}return g.VM(e.Z)},LPU=function(e,L){var c=new bu; if(g.LZ.Image){var I=new Image;I.onload=g.u7(CV,c,"TestLoadImage: loaded",!0,L,I);I.onerror=g.u7(CV,c,"TestLoadImage: error",!1,L,I);I.onabort=g.u7(CV,c,"TestLoadImage: abort",!1,L,I);I.ontimeout=g.u7(CV,c,"TestLoadImage: timeout",!1,L,I);g.LZ.setTimeout(function(){if(I.ontimeout)I.ontimeout()},1E4); I.src=e}else L(!1)},c7M=function(e,L){var c=new bu,I=new AbortController,B=setTimeout(function(){I.abort(); CV(c,"TestPingServer: timeout",!1,L)},1E4); fetch(e,{signal:I.signal}).then(function(x){clearTimeout(B);x.ok?CV(c,"TestPingServer: ok",!0,L):CV(c,"TestPingServer: server error",!1,L)}).catch(function(){clearTimeout(B); CV(c,"TestPingServer: error",!1,L)})},CV=function(e,L,c,I,B){try{B&&(B.onload=null,B.onerror=null,B.onabort=null,B.ontimeout=null),I(c)}catch(x){}},I8M=function(){this.X=new vp},at=function(e,L,c){return c&&c.Ed?c.Ed[e]||L:L},BsZ=function(e){this.Z=[]; this.gT=this.m1=this.Y9=this.Cf=this.X=this.FD=this.Ve=this.ye=this.T=this.sY=this.D=null;this.Nl=this.m$=0;this.PM=at("failFast",!1,e);this.Pe=this.pS=this.J=this.j=this.B=null;this.Q5=!0;this.XD=this.He=-1;this.RT=this.h7=this.Gm=0;this.Mv=at("baseRetryDelayMs",5E3,e);this.OF=at("retryDelaySeedMs",1E4,e);this.Cj=at("forwardChannelMaxRetries",2,e);this.f9=at("forwardChannelRequestTimeoutMs",2E4,e);this.IU=e&&e.ZU_||void 0;this.Ft=e&&e.iGe||void 0;this.pj=e&&e.zBS||!1;this.d_=void 0;this.t7=e&&e.hM0|| !1;this.G="";this.K=new YNU(e&&e.yOe);this.Yf=new I8M;this.DY=e&&e.x4e||!1;this.x9=e&&e.lB_||!1;this.DY&&this.x9&&(this.x9=!1);this.gZ=e&&e.kSe||!1;e&&e.zqW&&(this.Q5=!1);this.xT=!this.DY&&this.Q5&&e&&e.MTd||!1;this.g0=void 0;e&&e.TX&&e.TX>0&&(this.g0=e.TX);this.Bw=void 0;this.RI=0;this.Sl=!1;this.Kf=this.k9=null},wX=function(e){e.X&&(xxM(e),e.X.cancel(),e.X=null)},o59=function(e){wX(e); e.J&&(g.LZ.clearTimeout(e.J),e.J=null);Dr(e);e.K.cancel();e.j&&(typeof e.j==="number"&&g.LZ.clearTimeout(e.j),e.j=null)},V7=function(e){naM(e.K)||e.j||(e.j=!0,g.F2(e.GO,e),e.Gm=0)},r7h=function(e,L){if(PLM(e.K)>=e.K.G-(e.j?1:0))return!1; if(e.j)return e.Z=L.h7.concat(e.Z),!0;if(e.xI==1||e.xI==2||e.Gm>=(e.PM?0:e.Cj))return!1;e.j=FX((0,g.RL)(e.GO,e,L),SRZ(e,e.Gm));e.Gm++;return!0},RvU=function(e,L){var c; L?c=L.Cf:c=e.m$++;var I=e.Y9.clone();g.ob(I,"SID",e.G);g.ob(I,"RID",c);g.ob(I,"AID",e.He);Nn(e,I);e.T&&e.D&&g.Rb(I,e.T,e.D);c=new iu(e,e.G,c,e.Gm+1);e.T===null&&(c.Y9=e.D);L&&(e.Z=L.h7.concat(e.Z));L=hvM(e,c,1E3);c.setTimeout(Math.round(e.f9*.5)+Math.round(e.f9*.5*Math.random()));QCg(e.K,c);VGh(c,I,L)},Nn=function(e,L){e.ye&&g.Le(e.ye,function(c,I){g.ob(L,I,c)}); e.B&&g.Le({},function(c,I){g.ob(L,I,c)})},hvM=function(e,L,c){c=Math.min(e.Z.length,c); var I=e.B?(0,g.RL)(e.B.zv,e.B,e):null;a:{for(var B=e.Z,x=-1;;){var S=["count="+c];x==-1?c>0?(x=B[0].X,S.push("ofs="+x)):x=0:S.push("ofs="+x);for(var h=!0,R=0;R=3)return!1; e.RT++;e.J=FX((0,g.RL)(e.e1,e),SRZ(e,e.h7));e.h7++;return!0},xxM=function(e){e.k9!=null&&(g.LZ.clearTimeout(e.k9),e.k9=null)},uFN=function(e){e.X=new iu(e,e.G,"rpc",e.RT); e.T===null&&(e.X.Y9=e.D);e.X.d_=0;var L=e.m1.clone();g.ob(L,"RID","rpc");g.ob(L,"SID",e.G);g.ob(L,"AID",e.He);g.ob(L,"CI",e.Pe?"0":"1");!e.Pe&&e.g0&&g.ob(L,"TO",e.g0);g.ob(L,"TYPE","xmlhttp");Nn(e,L);e.T&&e.D&&g.Rb(L,e.T,e.D);e.d_&&e.X.setTimeout(e.d_);var c=e.X;e=e.gT;c.t7=1;c.J=eU(L.clone());c.D=null;c.Ve=!0;JFU(c,e)},Dr=function(e){e.pS!=null&&(g.LZ.clearTimeout(e.pS),e.pS=null)},jCh=function(e,L){var c=null; if(e.X==L){Dr(e);xxM(e);e.X=null;var I=2}else if(HQ9(e.K,L))c=L.h7,ULN(e.K,L),I=1;else return;if(e.xI!=0)if(L.j)if(I==1){c=L.D?L.D.length:0;L=Date.now()-L.Gm;var B=e.Gm;I=GZ7();I.dispatchEvent(new DLL(I,c,L,B));V7(e)}else EaZ(e);else{var x=L.sY;B=L.getLastError();if(B==3||B==0&&x>0||!(I==1&&r7h(e,L)||I==2&&lMe(e)))switch(c&&c.length>0&&(L=e.K,L.Z=L.Z.concat(c)),B){case 1:Jd(e,5);break;case 4:Jd(e,10);break;case 3:Jd(e,6);break;default:Jd(e,2)}}},SRZ=function(e,L){var c=e.Mv+Math.floor(Math.random()* e.OF); e.isActive()||(c*=2);return c*L},Jd=function(e,L){if(L==2){var c=(0,g.RL)(e.qKW,e),I=e.Ft,B=!I; I=new g.Yd(I||"//www.google.com/images/cleardot.gif");g.LZ.location&&g.LZ.location.protocol=="http"||g.na(I,"https");eU(I);B?LPU(I.toString(),c):c7M(I.toString(),c)}else Ad(2);e.xI=0;e.B&&e.B.UT(L);tL7(e);o59(e)},tL7=function(e){e.xI=0; e.Kf=[];if(e.B){var L=evZ(e.K);if(L.length!=0||e.Z.length!=0)g.mN(e.Kf,L),g.mN(e.Kf,e.Z),e.K.Z.length=0,g.VM(e.Z),e.Z.length=0;e.B.qC()}},OvM=function(e){if(e.xI==0)return e.Kf; var L=[];g.mN(L,evZ(e.K));g.mN(L,e.Z);return L},dLw=function(e,L,c){var I=g.S9(c); I.X!=""?(L&&g.e9(I,L+"."+I.X),g.Ls(I,I.Z)):(I=g.LZ.location,I=s6N(I.protocol,L?L+"."+I.hostname:I.hostname,+I.port,c));L=e.Ve;c=e.FD;L&&c&&g.ob(I,L,c);g.ob(I,"VER",e.ZP);Nn(e,I);return I},CLg=function(e,L,c){if(L&&!e.t7)throw Error("Can't create secondary domain capable XhrIo object."); L=e.pj&&!e.IU?new g.$A(new g.UA({YU:c})):new g.$A(e.IU);L.T=e.t7;return L},qRM=function(){},TsZ=function(){},y7=function(e,L){g.hi.call(this); this.X=new BsZ(L);this.B=e;this.K=L&&L.iM||null;e=L&&L.bM||null;L&&L.cOW&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"});this.X.D=e;e=L&&L.R00||null;L&&L.OJ&&(e?e["X-WebChannel-Content-Type"]=L.OJ:e={"X-WebChannel-Content-Type":L.OJ});L&&L.OO&&(e?e["X-WebChannel-Client-Profile"]=L.OO:e={"X-WebChannel-Client-Profile":L.OO});this.X.sY=e;(e=L&&L.Bz7)&&!g.J_(e)&&(this.X.T=e);this.j=L&&L.hM0||!1;this.G=L&&L.WDq||!1;(L=L&&L.HC)&&!g.J_(L)&&(this.X.Ve=L,g.uw(this.K,L)&&(e=this.K, L in e&&delete e[L]));this.Z=new mx(this)},WPL=function(e){F2U.call(this); e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var L=e.__sm__;L?this.data=(this.X=g.SR(L))?g.TG(L,this.X):L:this.data=e},MLL=function(e){bQg.call(this); this.status=1;this.errorCode=e},mx=function(e){this.X=e},zvN=function(e,L){this.K=e; this.X=L},sGw=function(e){return OvM(e.X).map(function(L){var c=e.K; L=L.map;"__data__"in L?(L=L.__data__,c=c.G?u$M(L):L):c=L;return c})},Zr=function(e,L){if(typeof e!=="function")throw Error("Fn must not be null and must be a function"); return g.LZ.setTimeout(function(){e()},L)},$3=function(e){pV.dispatchEvent(new v5g(pV,e))},v5g=function(e){g.Hk.call(this,"statevent",e)},jU=function(e,L,c,I){this.X=e; this.G=L;this.T=c;this.j=I||1;this.K=45E3;this.Z=new g.uB(this);this.B=new g.VH;this.B.setInterval(250)},A77=function(e,L,c){e.Qp=1; e.Wk=eU(L.clone());e.Uf=c;e.Ve=!0;f8L(e,null)},FPU=function(e,L,c,I,B){e.Qp=1; e.Wk=eU(L.clone());e.Uf=null;e.Ve=c;B&&(e.dj=!1);f8L(e,I)},f8L=function(e,L){e.M3=Date.now(); bvM(e);e.Ag=e.Wk.clone();LV(e.Ag,"t",e.j);e.d5=0;e.jn=e.X.LZ(e.X.Pk()?L:null);e.Nc>0&&(e.Jg=new g.Qw((0,g.RL)(e.j1,e,e.jn),e.Nc));e.Z.listen(e.jn,"readystatechange",e.hv);L=e.Gf?g.MQ(e.Gf):{};e.Uf?(e.vz="POST",L["Content-Type"]="application/x-www-form-urlencoded",e.jn.send(e.Ag,e.vz,e.Uf,L)):(e.vz="GET",e.dj&&!g.RF&&(L.Connection="close"),e.jn.send(e.Ag,e.vz,null,L));e.X.LG(1)},g5h=function(e,L){var c=e.d5,I=L.indexOf("\n",c); if(I==-1)return ivJ;c=Number(L.substring(c,I));if(isNaN(c))return GxZ;I+=1;if(I+c>L.length)return ivJ;L=L.slice(I,I+c);e.d5=I+c;return L},bvM=function(e){e.SM=Date.now()+e.K; kxh(e,e.K)},kxh=function(e,L){if(e.AX!=null)throw Error("WatchDog timer not null"); e.AX=Zr((0,g.RL)(e.pD,e),L)},DxN=function(e){e.AX&&(g.LZ.clearTimeout(e.AX),e.AX=null)},wIJ=function(e){e.X.Dj()||e.wf||e.X.x6(e)},Hp=function(e){DxN(e); g.L0(e.Jg);e.Jg=null;e.B.stop();e.Z.removeAll();if(e.jn){var L=e.jn;e.jn=null;L.abort();L.dispose()}e.S0&&(e.S0=null)},J7g=function(e,L){try{e.X.BS(e,L),e.X.LG(4)}catch(c){}},CSM=function(e,L,c,I,B){if(I==0)c(!1); else{var x=B||0;I--;VLe(e,L,function(S){S?c(!0):g.LZ.setTimeout(function(){CSM(e,L,c,I,x)},x)})}},VLe=function(e,L,c){var I=new Image; I.onload=function(){try{lu(I),c(!0)}catch(B){}}; I.onerror=function(){try{lu(I),c(!1)}catch(B){}}; I.onabort=function(){try{lu(I),c(!1)}catch(B){}}; I.ontimeout=function(){try{lu(I),c(!1)}catch(B){}}; g.LZ.setTimeout(function(){if(I.ontimeout)I.ontimeout()},L); I.src=e},lu=function(e){e.onload=null; e.onerror=null;e.onabort=null;e.ontimeout=null},a8N=function(e){this.X=e; this.K=new vp},NsL=function(e){var L=Pp(e.X,e.Br,"/mail/images/cleardot.gif"); eU(L);CSM(L.toString(),5E3,(0,g.RL)(e.Qs,e),3,2E3);e.LG(1)},mxM=function(e){var L=e.X.j; L!=null?($3(5),L?($3(11),Q7(e.X,e,!1)):($3(12),Q7(e.X,e,!0))):(e.G6=new jU(e),e.G6.Gf=e.EZ,L=e.X,L=Pp(L,L.Pk()?e.l$:null,e.DX),$3(5),LV(L,"TYPE","xmlhttp"),FPU(e.G6,L,!1,e.l$,!1))},y7w=function(e,L,c){this.X=1; this.K=[];this.Z=[];this.B=new vp;this.D=e||null;this.j=L!=null?L:null;this.J=c||!1},Zvh=function(e,L){this.X=e; this.map=L;this.context=null},pIN=function(e,L,c,I){g.Hk.call(this,"timingevent",e); this.size=L;this.rtt=c;this.retries=I},$xh=function(e){g.Hk.call(this,"serverreachability",e)},HvJ=function(e){e.a7(1,0); e.nL=Pp(e,null,e.zJ);jGU(e)},l8Z=function(e){e.pU&&(e.pU.abort(),e.pU=null); e.e9&&(e.e9.cancel(),e.e9=null);e.ag&&(g.LZ.clearTimeout(e.ag),e.ag=null);dX(e);e.Bq&&(e.Bq.cancel(),e.Bq=null);e.vH&&(g.LZ.clearTimeout(e.vH),e.vH=null)},PSN=function(e,L){if(e.X==0)throw Error("Invalid operation: sending map when state is closed"); e.K.push(new Zvh(e.KD++,L));e.X!=2&&e.X!=3||jGU(e)},QGU=function(e){var L=0; e.e9&&L++;e.Bq&&L++;return L},jGU=function(e){e.Bq||e.vH||(e.vH=Zr((0,g.RL)(e.TO,e),0),e.v4=0)},E5e=function(e,L){if(e.X==1){if(!L){e.Oz=Math.floor(Math.random()*1E5); L=e.Oz++;var c=new jU(e,"",L);c.Gf=e.ao;var I=dxg(e),B=e.nL.clone();g.ob(B,"RID",L);g.ob(B,"CVER","1");U8(e,B);A77(c,B,I);e.Bq=c;e.X=2}}else e.X==3&&(L?UxM(e,L):e.K.length==0||e.Bq||UxM(e))},UxM=function(e,L){if(L)if(e.I0>6){e.K=e.Z.concat(e.K); e.Z.length=0;var c=e.Oz-1;L=dxg(e)}else c=L.T,L=L.Uf;else c=e.Oz++,L=dxg(e);var I=e.nL.clone();g.ob(I,"SID",e.G);g.ob(I,"RID",c);g.ob(I,"AID",e.dS);U8(e,I);c=new jU(e,e.G,c,e.v4+1);c.Gf=e.ao;c.setTimeout(1E4+Math.round(1E4*Math.random()));e.Bq=c;A77(c,I,L)},U8=function(e,L){e.rM&&(e=e.rM.MC())&&g.Le(e,function(c,I){g.ob(L,I,c)})},dxg=function(e){var L=Math.min(e.K.length,1E3),c=["count="+L]; if(e.I0>6&&L>0){var I=e.K[0].X;c.push("ofs="+I)}else I=0;for(var B={},x=0;x=3)return!1; e.T++;e.ag=Zr((0,g.RL)(e.uu,e),KP9(e,e.QF));e.QF++;return!0},Q7=function(e,L,c){e.yV=e.j==null?c:!e.j; e.YY=L.sP;e.J||HvJ(e)},dX=function(e){e.VR!=null&&(g.LZ.clearTimeout(e.VR),e.VR=null)},KP9=function(e,L){var c=5E3+Math.floor(Math.random()*1E4); e.isActive()||(c*=2);return c*L},E8=function(e,L){if(L==2||L==9){var c=null; e.rM&&(c=null);var I=(0,g.RL)(e.GrY,e);c||(c=new g.Yd("//www.google.com/images/cleardot.gif"),eU(c));VLe(c.toString(),1E4,I)}else $3(2);n5M(e,L)},n5M=function(e,L){e.X=0; e.rM&&e.rM.cS(L);edN(e);l8Z(e)},edN=function(e){e.X=0; e.YY=-1;if(e.rM)if(e.Z.length==0&&e.K.length==0)e.rM.hH();else{var L=g.VM(e.Z),c=g.VM(e.K);e.Z.length=0;e.K.length=0;e.rM.hH(L,c)}},Pp=function(e,L,c){var I=g.S9(c); if(I.X!="")L&&g.e9(I,L+"."+I.X),g.Ls(I,I.Z);else{var B=window.location;I=s6N(B.protocol,L?L+"."+B.hostname:B.hostname,+B.port,c)}e.CI&&g.Le(e.CI,function(x,S){g.ob(I,S,x)}); g.ob(I,"VER",e.I0);U8(e,I);return I},Ld7=function(){},cgh=function(){this.X=[]; this.K=[]},IQJ=function(e){g.Hk.call(this,"channelMessage"); this.message=e},BmM=function(e){g.Hk.call(this,"channelError"); this.error=e},xOw=function(e,L){this.action=e; this.params=L||{}},XX=function(e,L){g.p.call(this); this.X=new g.j9(this.Ex7,0,this);g.l(this,this.X);this.Lp=5E3;this.K=0;if(typeof e==="function")L&&(e=(0,g.RL)(e,L));else if(e&&typeof e.handleEvent==="function")e=(0,g.RL)(e.handleEvent,e);else throw Error("Invalid listener argument");this.Z=e},oi7=function(e,L,c,I,B,x,S,h,R,u,t,O,q,T){c=c===void 0?!1:c; I=I===void 0?function(){return""}:I; B=B===void 0?!1:B;x=x===void 0?!1:x;S=S===void 0?!1:S;h=h===void 0?function(){return g.gT({})}:h; R=R===void 0?!1:R;t=t===void 0?!1:t;O=O===void 0?!1:O;q=q===void 0?!1:q;T=T===void 0?!1:T;this.t7=e;this.pS=L;this.j=new g.zl;this.K=new XX(this.Vt0,this);this.X=null;this.T=!1;this.D=null;this.Gm="";this.h7=this.J=0;this.Z=[];this.RT=c;this.Ve=I;this.B=x;this.Y9=h;this.ye=u;this.gT=S;this.k9=null;this.G=g.gT();this.Cf=B;this.Kf=R;this.DY=t;this.x9=O;this.Q5=q;this.sY=T;this.d_=new tMh;this.Pe=new OTL;this.Sl=new TWN;this.m$=new qeg;this.He=new WHN;this.xT=new MMM;this.Bw=new zaw},hdJ=function(e, L,c,I,B){SLM(e); if(e.X){var x=g.Zu("ID_TOKEN"),S=e.X.ao||{};x?S["x-youtube-identity-token"]=x:delete S["x-youtube-identity-token"];e.X.ao=S}rge(e);I?(I.getState()!=3&&QGU(I)==0||I.getState(),e.X.connect(L,c,e.pS,I.G,I.dS)):B?e.X.connect(L,c,e.pS,B.sessionId,B.arrayId):e.X.connect(L,c,e.pS)},O$g=function(e,L){return e.Q5?!0:e.x9?Object.values(RdL).includes(L):e.DY?!Object.values(u9e).includes(L):e.sY?Object.values(tt9).includes(L):!1},Wdw=function(e){var L,c; g.Z(function(I){if(I.K==1)return g.Gc(I,2),g.a(I,qL9(e),2);g.NM(I);L=e.Z;e.Z=[];c=L.length;TmM(e,L,c);KV(e);return g.mf(I,0)})},TmM=function(e,L,c){for(var I=0;I0?c=Object.assign({},c,L):delete c.Authorization;e.X.ao=c}},rge=function(e){e.ye&&!e.B&&zde(e,e.ye())},Y3=function(e){this.scheme="https"; this.port=this.domain="";this.X="/api/lounge";this.K=!0;e=e||document.location.href;var L=Number(g.rj(e)[4]||null)||"";L&&(this.port=":"+L);this.domain=g.hp(e)||"";e=g.yc();e.search("MSIE")>=0&&(e=e.match(/MSIE ([\d.]+)/)[1],g.mO(e,"10.0")<0&&(this.K=!1))},nV=function(e,L){var c=e.X; e.K&&(c=e.scheme+"://"+e.domain+e.port+e.X);return g.WO(c+L,{})},sMN=function(e,L){g.hi.call(this); var c=this;this.Eq=e();this.Eq.subscribe("handlerOpened",this.eh,this);this.Eq.subscribe("handlerClosed",this.onClosed,this);this.Eq.subscribe("handlerError",function(I,B){c.onError(B)}); this.Eq.subscribe("handlerMessage",this.onMessage,this);this.X=L},viM=function(e,L,c){var I=this; c=c===void 0?function(){return""}:c; var B=B===void 0?new TsZ:B;var x=x===void 0?new g.zl:x;this.pathPrefix=e;this.X=L;this.Gm=c;this.B=x;this.J=null;this.D=this.T=0;this.channel=null;this.j=0;this.Z=new XX(function(){I.Z.isActive();var S;((S=I.channel)==null?void 0:PLM((new zvN(S,S.X)).X.K))===0&&I.connect(I.J,I.T)}); this.G={};this.K={};this.pS=!1;this.logger=null;this.h7=[];this.Fc=void 0;this.Y9=new tMh;this.k9=new OTL;this.ye=new qeg;this.Ve=new WHN},fQh=function(e){g.KM(e.channel,"m",function(){e.j=3; e.Z.reset();e.J=null;e.T=0;for(var L=g.f(e.h7),c=L.next();!c.done;c=L.next())c=c.value,e.channel&&e.channel.send(c);e.h7=[];e.publish("webChannelOpened");e.Y9.Qa("WEB_CHANNEL")}); g.KM(e.channel,"n",function(){e.j=0;e.Z.isActive()||e.publish("webChannelClosed");var L,c=(L=e.channel)==null?void 0:sGw(new zvN(L,L.X));c&&(e.h7=[].concat(g.V(c)));e.k9.Qa("WEB_CHANNEL")}); g.KM(e.channel,"p",function(L){var c=L.data;c[0]==="gracefulReconnect"?(e.Z.start(),e.channel&&e.channel.close()):e.publish("webChannelMessage",new xOw(c[0],c[1]));e.Fc=L.statusCode;e.ye.Qa("WEB_CHANNEL")}); g.KM(e.channel,"o",function(){e.Fc===401||e.Z.start();e.publish("webChannelError");e.Ve.Qa("WEB_CHANNEL","")})},AgL=function(e){var L=e.Gm(); L?e.G["x-youtube-lounge-xsrf-token"]=L:delete e.G["x-youtube-lounge-xsrf-token"]},FdU=function(e){g.hi.call(this); this.X=e();this.X.subscribe("webChannelOpened",this.Gv,this);this.X.subscribe("webChannelClosed",this.onClosed,this);this.X.subscribe("webChannelError",this.onError,this);this.X.subscribe("webChannelMessage",this.onMessage,this)},b$L=function(e,L,c,I,B){function x(){return new oi7(nV(e,"/bc"),L,!1,c,I)} c=c===void 0?function(){return""}:c; return g.uL("enable_mdx_web_channel_desktop")?new FdU(function(){return new viM(nV(e,"/wc"),L,c)}):new sMN(x,B)},kIZ=function(){var e=i$N; GIL();eq.push(e);giZ()},LD=function(e,L){GIL(); var c=DOg(e,String(L));eq.length==0?wKM(c):(giZ(),g.KZ(eq,function(I){I(c)}))},cW=function(e){LD("CP",e)},GIL=function(){eq||(eq=g.BU("yt.mdx.remote.debug.handlers_")||[],g.IL("yt.mdx.remote.debug.handlers_",eq))},wKM=function(e){var L=(Ie+1)%50; Ie=L;BW[L]=e;xG||(xG=L==49)},giZ=function(){var e=eq; if(BW[0]){var L=xG?Ie:-1,c={};do c={Id:void 0},L=(L+1)%50,c.Id=BW[L],g.KZ(e,function(I){return function(B){B(I.Id)}}(c)); while(L!=Ie);BW=Array(50);Ie=-1;xG=!1}},DOg=function(e,L){var c=(Date.now()-Jg9)/1E3; c.toFixed&&(c=c.toFixed(3));var I=[];I.push("[",c+"s","] ");I.push("[","yt.mdx.remote","] ");I.push(e+": "+L,"\n");return I.join("")},oe=function(e){g.Yg.call(this); this.j=e;this.screens=[]},Vtg=function(e,L){var c=e.get(L.uuid)||e.get(L.id); if(c)return e=c.name,c.id=L.id||c.id,c.name=L.name,c.token=L.token,c.uuid=L.uuid||c.uuid,c.name!=e;e.screens.push(L);return!0},CEe=function(e,L){var c=e.screens.length!=L.length; e.screens=g.ig(e.screens,function(x){return!!Yew(L,x)}); for(var I=L.length,B=0;B0&&e.G0&&sb(e,c)},function(L){e.B=function(){}; e.vv(L)})},hqh=function(e){var L={}; L.pairingCode=e.k9;L.theme=e.t7;hI7()&&(L.env_useStageMdx=1);return g.TE(L)},RqN=function(e){return new Promise(function(L){e.k9=XuM(); if(e.Y9){var c=new chrome.cast.DialLaunchResponse(!0,hqh(e));L(c);rHw(e)}else e.pS=function(){g.ra(e.D);e.pS=function(){}; e.D=NaN;var I=new chrome.cast.DialLaunchResponse(!0,hqh(e));L(I);rHw(e)},e.D=g.oC(function(){e.pS()},100)})},t4e=function(e,L,c){e.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(L)); var I=new rX(L);return(new Promise(function(B){ukh(e,I,function(x){x?(e.h7=!0,tC(e.G,I),qC(e,I),sb(e,c)):g.jM(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(L)+" is not online."));B(x)},5)})).then(function(B){return B?new chrome.cast.DialLaunchResponse(!1):RqN(e)})},OFL=function(e,L){var c=e.J.receiver.label,I=e.K.friendlyName; return(new Promise(function(B){QMe(e.G,c,L,I,function(x){x&&x.token&&qC(e,x);B(x)},function(x){Tq(e,"Failed to get DIAL screen: "+x); B(null)})})).then(function(B){return B&&B.token?new chrome.cast.DialLaunchResponse(!1):RqN(e)})},ukh=function(e,L,c,I){g.ra(e.j); e.j=0;UOw(e.G,L,function(B){B||I<0?c(B):e.j=g.oC(function(){ukh(e,L,c,I-1)},300)})},sb=function(e,L){e.info("getDialAppInfoWithTimeout_ "+L); zq(e)&&(g.ra(e.T),e.T=0,L==0?qxh(e):e.T=g.oC(function(){qxh(e)},L))},qxh=function(e){zq(e)&&e.Z.getDialAppInfo(function(L){e.info("getDialAppInfo dialLaunchData: "+JSON.stringify(L)); L=L.extraData||{};var c=null;if(L.loungeToken){var I;((I=e.X)==null?void 0:I.token)==L.loungeToken&&(c="staleLoungeToken")}else c="missingLoungeToken";c?(e.Gm=c,sb(e,3E4)):(e.h7=!1,e.Gm="unknown",YLM(e,L.loungeToken),sb(e,L.loungeTokenRefreshIntervalMs))},function(L){e.info("getDialAppInfo error: "+L); e.Gm="noLoungeTokenResponse";sb(e,3E4)})},TO9=function(e){g.ra(e.j); e.j=0;g.ra(e.T);e.T=0;e.B();e.B=function(){}; g.ra(e.D)},vW=function(e,L){Ob.call(this,e,L,"ManualSession"); this.Z=g.oC((0,g.RL)(this.uJ,this,null),150)},fD=function(e,L){g.Yg.call(this); this.config_=L;this.K=e;this.J=L.appId||"233637DE";this.G=L.theme||"cl";this.D=L.disableCastApi||!1;this.j=L.forceMirroring||!1;this.X=null;this.T=!1;this.Z=[];this.B=(0,g.RL)(this.Ipq,this)},W7e=function(e,L){return L?g.vU(e.Z,function(c){return hd(L,c.label)},e):null},AC=function(e){LD("Controller",e)},i$N=function(e){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(e)},Fp=function(e){return e.T||!!e.Z.length||!!e.X},b0=function(e,L,c){L!=e.X&&(g.L0(e.X),(e.X=L)?(c?e.publish("yt-remote-cast2-receiver-resumed", L.K):e.publish("yt-remote-cast2-receiver-selected",L.K),L.subscribe("sessionScreen",(0,g.RL)(e.MB,e,L)),L.subscribe("sessionFailed",function(){return M4N(e,L)}),L.X?e.publish("yt-remote-cast2-session-change",L.X):c&&e.X.uJ(null)):e.publish("yt-remote-cast2-session-change",null))},M4N=function(e,L){e.X==L&&e.publish("yt-remote-cast2-session-failed")},zq9=function(e){var L=e.K.PS(),c=e.X&&e.X.K; e=g.Mt(L,function(I){c&&hd(I,c.label)&&(c=null);var B=I.uuid?I.uuid:I.id,x=W7e(this,I);x?(x.label=B,x.friendlyName=I.name):(x=new chrome.cast.Receiver(B,I.name),x.receiverType=chrome.cast.ReceiverType.CUSTOM);return x},e); c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),e.push(c));return e},iFe=function(e,L,c,I){I.disableCastApi?i0("Cannot initialize because disabled by Mdx config."):sfN()?vR9(L,I)&&(fZL(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?AHN(e,c):(window.__onGCastApiAvailable=function(B,x){B?AHN(e,c):(Gq("Failed to load cast API: "+x),F7g(!1),fZL(!1),g.Gx("yt-remote-cast-available"),g.Gx("yt-remote-cast-receiver"), bFM(),c(!1))},I.loadCastApiSetupScript?g.Ex("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"):window.navigator.userAgent.indexOf("Android")>=0&&window.navigator.userAgent.indexOf("Chrome/")>=0&&window.navigator.presentation?u1M()>=60&&vaN():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?Ta7():u1M()>=89?AFU():(sCh(),zS(fMJ.map(W29))))):i0("Cannot initialize because not running Chrome")},bFM=function(){i0("dispose"); var e=gt();e&&e.dispose();g.IL("yt.mdx.remote.cloudview.instance_",null);GWL(!1);g.dO(gRL);gRL.length=0},kG=function(){return!!g.iS("yt-remote-cast-installed")},kWJ=function(){var e=g.iS("yt-remote-cast-receiver"); return e?e.friendlyName:null},DKM=function(){i0("clearCurrentReceiver"); g.Gx("yt-remote-cast-receiver")},w4M=function(){return kG()?gt()?gt().getCastSession():(Gq("getCastSelector: Cast is not initialized."),null):(Gq("getCastSelector: Cast API is not installed!"),null)},JHM=function(){kG()?gt()?Dv()?(i0("Requesting cast selector."),gt().requestSession()):(i0("Wait for cast API to be ready to request the session."),gRL.push(g.Qo("yt-remote-cast2-api-ready",JHM))):Gq("requestCastSelector: Cast is not initialized."):Gq("requestCastSelector: Cast API is not installed!")}, wt=function(e,L){Dv()?gt().setConnectedScreenStatus(e,L):Gq("setConnectedScreenStatus called before ready.")},sfN=function(){var e=g.yc().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.q8||e},V4g=function(e,L){gt().init(e,L)},vR9=function(e,L){var c=!1; gt()||(e=new fD(e,L),e.subscribe("yt-remote-cast2-availability-change",function(I){g.bS("yt-remote-cast-available",I);Wp("yt-remote-cast2-availability-change",I)}),e.subscribe("yt-remote-cast2-receiver-selected",function(I){i0("onReceiverSelected: "+I.friendlyName); g.bS("yt-remote-cast-receiver",I);Wp("yt-remote-cast2-receiver-selected",I)}),e.subscribe("yt-remote-cast2-receiver-resumed",function(I){i0("onReceiverResumed: "+I.friendlyName); g.bS("yt-remote-cast-receiver",I);Wp("yt-remote-cast2-receiver-resumed",I)}),e.subscribe("yt-remote-cast2-session-change",function(I){i0("onSessionChange: "+Rt(I)); I||g.Gx("yt-remote-cast-receiver");Wp("yt-remote-cast2-session-change",I)}),g.IL("yt.mdx.remote.cloudview.instance_",e),c=!0); i0("cloudview.createSingleton_: "+c);return c},gt=function(){return g.BU("yt.mdx.remote.cloudview.instance_")},AHN=function(e,L){F7g(!0); fZL(!1);V4g(e,function(c){c?(GWL(!0),g.Ux("yt-remote-cast2-api-ready")):(Gq("Failed to initialize cast API."),F7g(!1),g.Gx("yt-remote-cast-available"),g.Gx("yt-remote-cast-receiver"),bFM());L(c)})},i0=function(e){LD("cloudview",e)},Gq=function(e){LD("cloudview",e)},F7g=function(e){i0("setCastInstalled_ "+e); g.bS("yt-remote-cast-installed",e)},Dv=function(){return!!g.BU("yt.mdx.remote.cloudview.apiReady_")},GWL=function(e){i0("setApiReady_ "+e); g.IL("yt.mdx.remote.cloudview.apiReady_",e)},fZL=function(e){g.IL("yt.mdx.remote.cloudview.initializing_",e)},JC=function(e){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.B=this.j=0;this.trackData=null;this.g$=this.r9=!1;this.J=this.Z=this.T=this.K=0;this.X=NaN;this.G=!1;this.reset(e)},CM7=function(e){e.audioTrackId=null; e.trackData=null;e.playerState=-1;e.r9=!1;e.g$=!1;e.j=0;e.B=g.O9();e.K=0;e.T=0;e.Z=0;e.J=0;e.X=NaN;e.G=!1},V$=function(e){return e.isPlaying()?(g.O9()-e.B)/1E3:0},CD=function(e,L){e.j=L; e.B=g.O9()},ae=function(e){switch(e.playerState){case 1:case 1081:return(g.O9()-e.B)/1E3+e.j; case -1E3:return 0}return e.j},aZ7=function(e){return e.G?e.T+V$(e):e.T},NC=function(e,L,c){var I=e.videoId; e.videoId=L;e.index=c;L!=I&&CM7(e)},NON=function(e){var L={}; L.index=e.index;L.listId=e.listId;L.videoId=e.videoId;L.playerState=e.playerState;L.volume=e.volume;L.muted=e.muted;L.audioTrackId=e.audioTrackId;L.trackData=g.zG(e.trackData);L.hasPrevious=e.r9;L.hasNext=e.g$;L.playerTime=e.j;L.playerTimeAt=e.B;L.seekableStart=e.K;L.seekableEnd=e.T;L.duration=e.Z;L.loadedTime=e.J;L.liveIngestionTime=e.X;return L},y$=function(e,L){g.Yg.call(this); var c=this;this.Z=0;this.G=e;this.j=[];this.B=new cgh;this.K=this.X=null;this.D=(0,g.RL)(this.o9e,this);this.T=(0,g.RL)(this.oN,this);this.J=(0,g.RL)(this.wel,this);this.pS=(0,g.RL)(this.Pde,this);var I=0;e?(I=e.getProxyState(),I!=3&&(e.subscribe("proxyStateChange",this.T3,this),mKe(this))):I=3;I!=0&&(L?this.T3(I):g.oC(function(){c.T3(I)},0)); (e=w4M())&&mz(this,e);this.subscribe("yt-remote-cast2-session-change",this.pS)},Zv=function(e){return new JC(e.G.getPlayerContextData())},mKe=function(e){g.KZ("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(L){this.j.push(this.G.subscribe(L,g.u7(this.GyS,L),this))},e)},yHM=function(e){g.KZ(e.j,function(L){this.G.unsubscribeByKey(L)},e); e.j.length=0},pD=function(e){return e.getState()==1},$G=function(e,L){var c=e.B; c.X.length+c.K.length<50&&e.B.enqueue(L)},ZFZ=function(e,L,c){var I=Zv(e); CD(I,c);I.playerState!=-1E3&&(I.playerState=L);jq(e,I)},HW=function(e,L,c){e.G.sendMessage(L,c)},jq=function(e,L){yHM(e); e.G.setPlayerContextData(NON(L));mKe(e)},mz=function(e,L){e.K&&(e.K.removeUpdateListener(e.D),e.K.removeMediaListener(e.T),e.oN(null)); e.K=L;e.K&&(cW("Setting cast session: "+e.K.sessionId),e.K.addUpdateListener(e.D),e.K.addMediaListener(e.T),e.K.media.length&&e.oN(e.K.media[0]))},p4w=function(e){var L=e.X.media,c=e.X.customData; if(L&&c){var I=Zv(e);L.contentId!=I.videoId&&cW("Cast changing video to: "+L.contentId);I.videoId=L.contentId;I.playerState=c.playerState;CD(I,e.X.getEstimatedTime());jq(e,I)}else cW("No cast media video. Ignoring state update.")},l0=function(e,L,c){return(0,g.RL)(function(I){this.VZ("Failed to "+L+" with cast v2 channel. Error code: "+I.code); I.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.VZ("Retrying "+L+" using MDx browser channel."),HW(this,L,c))},e)},dt=function(e,L,c,I){I=I===void 0?!1:I; g.Yg.call(this);var B=this;this.j=NaN;this.k9=!1;this.D=this.J=this.h7=this.Gm=NaN;this.pS=[];this.B=this.T=this.G=this.X=this.K=null;this.Y9=e;this.ye=I;this.pS.push(g.qx(window,"beforeunload",function(){B.Bj(2)})); this.Z=[];this.X=new JC;this.t7=L.id;this.Ve=L.idType;this.K=b$L(this.Y9,c,this.Jx,this.Ve=="shortLived",this.t7);this.K.listen("channelOpened",function(){$KN(B)}); this.K.listen("channelClosed",function(){PW("Channel closed");isNaN(B.j)?qn(!0):qn();B.dispose()}); this.K.listen("channelError",function(x){qn();isNaN(B.cY())?(x==1&&B.Ve=="shortLived"&&B.publish("browserChannelAuthError",x),PW("Channel error: "+x+" without reconnection"),B.dispose()):(B.k9=!0,PW("Channel error: "+x+" with reconnection in "+B.cY()+" ms"),Q$(B,2))}); this.K.listen("channelMessage",function(x){jf9(B,x)}); this.K.BH(L.token);this.subscribe("remoteQueueChange",function(){var x=B.X.videoId;g.gs()&&g.bS("yt-remote-session-video-id",x)})},HFU=function(e){return g.vU(e.Z,function(L){return L.type=="LOUNGE_SCREEN"})},PW=function(e){LD("conn",e)},Q$=function(e,L){e.publish("proxyStateChange",L)},lZw=function(e){e.j=g.oC(function(){PW("Connecting timeout"); e.Bj(1)},2E4)},PMM=function(e){g.ra(e.j); e.j=NaN},QfJ=function(e){g.ra(e.Gm); e.Gm=NaN},UK7=function(e){dKL(e); e.h7=g.oC(function(){Ub(e,"getNowPlaying")},2E4)},dKL=function(e){g.ra(e.h7); e.h7=NaN},$KN=function(e){PW("Channel opened"); e.k9&&(e.k9=!1,QfJ(e),e.Gm=g.oC(function(){PW("Timing out waiting for a screen.");e.Bj(1)},15E3))},X4U=function(e,L){var c=null; if(L){var I=HFU(e);I&&(c={clientName:I.clientName,deviceMake:I.brand,deviceModel:I.model,osVersion:I.osVersion})}g.IL("yt.mdx.remote.remoteClient_",c);L&&(PMM(e),QfJ(e));c=e.K.Hm()&&isNaN(e.j);L==c?L&&(Q$(e,1),Ub(e,"getSubtitlesTrack")):L?(e.lU()&&e.X.reset(),Q$(e,1),Ub(e,"getNowPlaying"),ERN(e)):e.Bj(1)},K7g=function(e,L){var c=L.params.videoId; delete L.params.videoId;c==e.X.videoId&&(g.qQ(L.params)?e.X.trackData=null:e.X.trackData=L.params,e.publish("remotePlayerChange"))},YxM=function(e,L,c){var I=L.params.videoId||L.params.video_id,B=parseInt(L.params.currentIndex,10); e.X.listId=L.params.listId||e.X.listId;NC(e.X,I,B);e.publish("remoteQueueChange",c)},e27=function(e,L){L.params=L.params||{}; YxM(e,L,"NOW_PLAYING_MAY_CHANGE");nRZ(e,L);e.publish("autoplayDismissed")},nRZ=function(e,L){var c=parseInt(L.params.currentTime||L.params.current_time,10); CD(e.X,isNaN(c)?0:c);c=parseInt(L.params.state,10);c=isNaN(c)?-1:c;c==-1&&e.X.playerState==-1E3&&(c=-1E3);e.X.playerState=c;c=Number(L.params.loadedTime);e.X.J=isNaN(c)?0:c;e.X.SF(Number(L.params.duration));c=e.X;var I=Number(L.params.liveIngestionTime);c.X=I;c.G=isNaN(I)?!1:!0;c=e.X;I=Number(L.params.seekableStartTime);L=Number(L.params.seekableEndTime);c.K=isNaN(I)?0:I;c.T=isNaN(L)?0:L;e.X.playerState==1?UK7(e):dKL(e);e.publish("remotePlayerChange")},L97=function(e,L){if(e.X.playerState!=-1E3){var c= 1085; switch(parseInt(L.params.adState,10)){case 1:c=1081;break;case 2:c=1084;break;case 0:c=1083}e.X.playerState=c;L=parseInt(L.params.currentTime,10);CD(e.X,isNaN(L)?0:L);e.publish("remotePlayerChange")}},c$Z=function(e,L){var c=L.params.muted=="true"; e.X.volume=parseInt(L.params.volume,10);e.X.muted=c;e.publish("remotePlayerChange")},I0e=function(e,L){e.T=L.params.videoId; e.publish("nowAutoplaying",parseInt(L.params.timeout,10))},BiM=function(e,L){e.T=L.params.videoId||null; e.publish("autoplayUpNext",e.T)},xcL=function(e,L){e.B=L.params.autoplayMode; e.publish("autoplayModeChange",e.B);e.B=="DISABLED"&&e.publish("autoplayDismissed")},ovZ=function(e,L){var c=L.params.hasNext=="true"; e.X.r9=L.params.hasPrevious=="true";e.X.g$=c;e.publish("previousNextChange")},jf9=function(e,L){L=L.message; L.params?PW("Received: action="+L.action+", params="+g.yH(L.params)):PW("Received: action="+L.action+" {}");switch(L.action){case "loungeStatus":L=cp(L.params.devices);e.Z=g.Mt(L,function(I){return new SU(I)}); L=!!g.vU(e.Z,function(I){return I.type=="LOUNGE_SCREEN"}); X4U(e,L);L=e.lr("mlm");e.publish("multiStateLoopEnabled",L);break;case "loungeScreenDisconnected":g.DJ(e.Z,function(I){return I.type=="LOUNGE_SCREEN"}); X4U(e,!1);break;case "remoteConnected":var c=new SU(cp(L.params.device));g.vU(e.Z,function(I){return I.equals(c)})||rGN(e.Z,c); break;case "remoteDisconnected":c=new SU(cp(L.params.device));g.DJ(e.Z,function(I){return I.equals(c)}); break;case "gracefulDisconnect":break;case "playlistModified":YxM(e,L,"QUEUE_MODIFIED");break;case "nowPlaying":e27(e,L);break;case "onStateChange":nRZ(e,L);break;case "onAdStateChange":L97(e,L);break;case "onVolumeChanged":c$Z(e,L);break;case "onSubtitlesTrackChanged":K7g(e,L);break;case "nowAutoplaying":I0e(e,L);break;case "autoplayDismissed":e.publish("autoplayDismissed");break;case "autoplayUpNext":BiM(e,L);break;case "onAutoplayModeChanged":xcL(e,L);break;case "onHasPreviousNextChanged":ovZ(e, L);break;case "requestAssistedSignIn":e.publish("assistedSignInRequested",L.params.authCode);break;case "onLoopModeChanged":e.publish("loopModeChange",L.params.loopMode);break;default:PW("Unrecognized action: "+L.action)}},ERN=function(e){g.ra(e.D); e.D=g.oC(function(){e.Bj(1)},864E5)},Ub=function(e,L,c){c?PW("Sending: action="+L+", params="+g.yH(c)):PW("Sending: action="+L); e.K.sendMessage(L,c)},Su7=function(e){oe.call(this,"ScreenServiceProxy"); this.R9=e;this.X=[];this.X.push(this.R9.$_s("screenChange",(0,g.RL)(this.uF,this)));this.X.push(this.R9.$_s("onlineScreenChange",(0,g.RL)(this.BTS,this)))},tlJ=function(e,L){rFZ(); if(!TS||!TS.get("yt-remote-disable-remote-module-for-dev")){L=g.Zu("MDX_CONFIG")||L;nJw();IMN();Eb||(Eb=new Y3(L?L.loungeApiHost:void 0),hI7()&&(Eb.X="/api/loungedev"));Xp||(Xp=g.BU("yt.mdx.remote.deferredProxies_")||[],g.IL("yt.mdx.remote.deferredProxies_",Xp));r$7();var c=KD();if(!c){var I=new u0(Eb,L?L.disableAutomaticScreenCache||!1:!1);g.IL("yt.mdx.remote.screenService_",I);c=KD();var B={};L&&(B={appId:L.appId,disableDial:L.disableDial,theme:L.theme,loadCastApiSetupScript:L.loadCastApiSetupScript, disableCastApi:L.disableCastApi,enableDialLoungeToken:L.enableDialLoungeToken,enableCastLoungeToken:L.enableCastLoungeToken,forceMirroring:L.forceMirroring});g.IL("yt.mdx.remote.enableConnectWithInitialState_",L?L.enableConnectWithInitialState||!1:!1);iFe(e,I,function(x){x?YG()&&wt(YG(),"YouTube TV"):I.subscribe("onlineScreenChange",function(){Wp("yt-remote-receiver-availability-change")})},B)}L&&!g.BU("yt.mdx.remote.initialized_")&&(g.IL("yt.mdx.remote.initialized_",!0),nD("Initializing: "+g.yH(L)), e$.push(g.Qo("yt-remote-cast2-api-ready",function(){Wp("yt-remote-api-ready")})),e$.push(g.Qo("yt-remote-cast2-availability-change",function(){Wp("yt-remote-receiver-availability-change")})),e$.push(g.Qo("yt-remote-cast2-receiver-selected",function(){L3(null); Wp("yt-remote-auto-connect","cast-selector-receiver")})),e$.push(g.Qo("yt-remote-cast2-receiver-resumed",function(){Wp("yt-remote-receiver-resumed","cast-selector-receiver")})),e$.push(g.Qo("yt-remote-cast2-session-change",h2N)),e$.push(g.Qo("yt-remote-connection-change",function(x){x?wt(YG(),"YouTube TV"):ch()||(wt(null,null),DKM())})),e$.push(g.Qo("yt-remote-cast2-session-failed",function(){Wp("yt-remote-connection-failed")})),e=R29(),L.isAuto&&(e.id+="#dial"),B=L.capabilities||[],B.length>0&&(e.capabilities= B),e.name=L.device,e.app=L.app,(L=L.theme)&&(e.theme=L),nD(" -- with channel params: "+g.yH(e)),e?(g.bS("yt-remote-session-app",e.app),g.bS("yt-remote-session-name",e.name)):(g.Gx("yt-remote-session-app"),g.Gx("yt-remote-session-name")),g.IL("yt.mdx.remote.channelParams_",e),c.start(),YG()||uge())}},OG7=function(){var e=KD().R9.$_gos(); var L=IO();L&&Bh()&&(Yew(e,L)||e.push(L));return KHN(e)},TiN=function(){var e=quM(); !e&&kG()&&kWJ()&&(e={key:"cast-selector-receiver",name:kWJ()});return e},quM=function(){var e=OG7(),L=IO(); L||(L=ch());return g.vU(e,function(c){return L&&hd(L,c.key)?!0:!1})},IO=function(){var e=YG(); if(!e)return null;var L=KD().Pc();return uu(L,e)},h2N=function(e){nD("remote.onCastSessionChange_: "+Rt(e)); if(e){var L=IO();if(L&&L.id==e.id){if(wt(L.id,"YouTube TV"),e.idType=="shortLived"&&(e=e.token))xt&&(xt.token=e),(L=Bh())&&L.BH(e)}else L&&oO(),S$(e,1)}else Bh()&&oO()},oO=function(){Dv()?gt().stopSession():Gq("stopSession called before API ready."); var e=Bh();e&&(e.disconnect(1),W9U(null))},Mlh=function(){var e=Bh(); return!!e&&e.getProxyState()!=3},nD=function(e){LD("remote",e)},KD=function(){if(!z2e){var e=g.BU("yt.mdx.remote.screenService_"); z2e=e?new Su7(e):null}return z2e},YG=function(){return g.BU("yt.mdx.remote.currentScreenId_")},spe=function(e){g.IL("yt.mdx.remote.currentScreenId_",e)},vvw=function(){return g.BU("yt.mdx.remote.connectData_")},L3=function(e){g.IL("yt.mdx.remote.connectData_",e)},Bh=function(){return g.BU("yt.mdx.remote.connection_")},W9U=function(e){var L=Bh(); L3(null);e||spe("");g.IL("yt.mdx.remote.connection_",e);Xp&&(g.KZ(Xp,function(c){c(e)}),Xp.length=0); L&&!e?Wp("yt-remote-connection-change",!1):!L&&e&&Wp("yt-remote-connection-change",!0)},ch=function(){var e=g.gs(); if(!e)return null;var L=KD();if(!L)return null;L=L.Pc();return uu(L,e)},S$=function(e,L){YG(); IO()&&IO();if(rg)xt=e;else{spe(e.id);var c=g.BU("yt.mdx.remote.enableConnectWithInitialState_")||!1;e=new dt(Eb,e,R29(),c);e.connect(L,vvw());e.subscribe("beforeDisconnect",function(I){Wp("yt-remote-before-disconnect",I)}); e.subscribe("beforeDispose",function(){Bh()&&(Bh(),W9U(null))}); e.subscribe("browserChannelAuthError",function(){var I=IO();I&&I.idType=="shortLived"&&(Dv()?gt().handleBrowserChannelAuthError():Gq("refreshLoungeToken called before API ready."))}); W9U(e)}},uge=function(){var e=ch(); e?(nD("Resume connection to: "+Rt(e)),S$(e,0)):(qn(),DKM(),nD("Skipping connecting because no session screen found."))},r$7=function(){var e=R29(); if(g.qQ(e)){e=O8();var L=g.iS("yt-remote-session-name")||"",c=g.iS("yt-remote-session-app")||"";e={device:"REMOTE_CONTROL",id:e,name:L,app:c,mdxVersion:3};e.authuser=String(g.Zu("SESSION_INDEX","0"));(L=g.Zu("DELEGATED_SESSION_ID"))&&(e.pageId=String(L));g.IL("yt.mdx.remote.channelParams_",e)}},R29=function(){return g.BU("yt.mdx.remote.channelParams_")||{}},F9e=function(e,L,c){g.p.call(this); var I=this;this.X=e;this.V=L;this.Lf=c;this.events=new g.zn(this);this.B=!1;this.j=new g.WX(64);this.K=new g.j9(this.U1,500,this);this.Z=new g.j9(this.IX,1E3,this);this.J=new s8(this.FIY,0,this);this.G={};this.D=new g.j9(this.Yl,1E3,this);this.T=new g.Qw(this.seekTo,1E3,this);this.pS=this.events.C(this.V,"onVolumeChange",function(B){f0e(I,B)}); g.l(this,this.events);this.events.C(L,"onCaptionsTrackListChanged",this.h$$);this.events.C(L,"captionschanged",this.W$e);this.events.C(L,"captionssettingschanged",this.WE);this.events.C(L,"videoplayerreset",this.b8);this.events.C(L,"mdxautoplaycancel",function(){I.Lf.Dk()}); L.Y("enable_mdx_video_play_directly")&&this.events.C(L,"videodatachange",function(){A$g(I.X)||hZ(I)||RO(I,0)}); e=this.Lf;e.We();e.subscribe("proxyStateChange",this.yq,this);e.subscribe("remotePlayerChange",this.Fg,this);e.subscribe("remoteQueueChange",this.b8,this);e.subscribe("previousNextChange",this.Y5,this);e.subscribe("nowAutoplaying",this.IQ,this);e.subscribe("autoplayDismissed",this.ix,this);g.l(this,this.K);g.l(this,this.Z);g.l(this,this.J);g.l(this,this.D);g.l(this,this.T);this.WE();this.b8();this.Fg()},f0e=function(e,L){if(hZ(e)){e.Lf.unsubscribe("remotePlayerChange",e.Fg,e); var c=Math.round(L.volume);L=!!L.muted;var I=Zv(e.Lf);if(c!==I.volume||L!==I.muted)e.Lf.setVolume(c,L),e.D.start();e.Lf.subscribe("remotePlayerChange",e.Fg,e)}},bGL=function(e){e.Ty(0); e.K.stop();e.Xp(new g.WX(64))},iGM=function(e,L){if(hZ(e)&&!e.B){var c=null; L&&(c={style:e.V.getSubtitlesUserSettings()},Object.assign(c,L));e.Lf.FZ(e.V.getVideoData(1).videoId,c);e.G=Zv(e.Lf).trackData}},RO=function(e,L){var c=e.V.getPlaylist(); if(c==null?0:c.listId){var I=c.index;var B=c.listId.toString()}c=e.V.getVideoData(1);e.Lf.playVideo(c.videoId,L,I,B,c.playerParams,c.Y9,SeJ(c));e.Xp(new g.WX(1))},GrJ=function(e,L){if(L){var c=e.V.getOption("captions","tracklist",{P8:1}); c&&c.length?(e.V.setOption("captions","track",L),e.B=!1):(e.V.loadModule("captions"),e.B=!0)}else e.V.setOption("captions","track",{})},hZ=function(e){return Zv(e.Lf).videoId===e.V.getVideoData(1).videoId},gv9=function(e,L){g.n_.call(this,e); this.X=L},ut=function(){g.U.call(this,{U:"div", W:"ytp-mdx-popup-dialog",N:{role:"dialog"},L:[{U:"div",W:"ytp-mdx-popup-dialog-inner-content",L:[{U:"div",W:"ytp-mdx-popup-title",aq:"Saliste de tu cuenta"},{U:"div",W:"ytp-mdx-popup-description",aq:"Es posible que los videos que mires se agreguen al historial de reproducciones de la TV, lo que puede influir en las recomendaciones. Para que esto no suceda, presiona \u201cCancelar\u201d y accede a YouTube desde tu computadora."},{U:"div",W:"ytp-mdx-privacy-popup-buttons",L:[{U:"button",Rq:["ytp-button", "ytp-mdx-privacy-popup-cancel"],aq:"Cancelar"},{U:"button",Rq:["ytp-button","ytp-mdx-privacy-popup-confirm"],aq:"Confirmar"}]}]}]});this.fade=new g.dJ(this,250);this.cancelButton=this.q0("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.q0("ytp-mdx-privacy-popup-confirm");g.l(this,this.fade);this.C(this.cancelButton,"click",this.X);this.C(this.confirmButton,"click",this.K)},tZ=function(e){g.U.call(this,{U:"div", W:"ytp-remote",L:[{U:"div",W:"ytp-remote-display-status",L:[{U:"div",W:"ytp-remote-display-status-icon",L:[g.tLn()]},{U:"div",W:"ytp-remote-display-status-text",aq:"{{statustext}}"}]}]});this.api=e;this.fade=new g.dJ(this,250);g.l(this,this.fade);this.C(e,"presentingplayerstatechange",this.onStateChange);this.Oq(e.getPlayerStateObject())},O2=function(e,L){g.lQ.call(this,"Reproducir en",1,e,L); this.V=e;this.Tx={};this.C(e,"onMdxReceiversChange",this.G);this.C(e,"presentingplayerstatechange",this.G);this.G()},krU=function(e){g.Vk.call(this,e); this.U5={key:XuM(),name:"Esta computadora"};this.UA=null;this.subscriptions=[];this.MN=this.Lf=null;this.Tx=[this.U5];this.sD=this.U5;this.mZ=new g.WX(64);this.Dr=0;this.RF=-1;this.El=!1;this.uE=this.iL=this.DT=null;if(!g.L8(this.player.S())&&!g.DF(this.player.S())){e=this.player;var L=g.Db(e);L&&(L=L.T8())&&(L=new O2(e,L),g.l(this,L));L=new tZ(e);g.l(this,L);g.Uq(e,L.element,4);this.DT=new ut;g.l(this,this.DT);g.Uq(e,this.DT.element,4);this.El=!!ch()}},qW=function(e){e.iL&&(e.player.removeEventListener("presentingplayerstatechange", e.iL),e.iL=null)},DcJ=function(e,L,c){e.mZ=c; e.player.publish("presentingplayerstatechange",new g.BZ(c,L))},T_=function(e,L){if(L.key!==e.sD.key)if(L.key===e.U5.key)oO(); else if(A$g(e)&&wLe(e),e.sD=L,!e.player.S().Y("disable_mdx_connection_in_mdx_module_for_music_web")||!g.DF(e.player.S())){var c=e.player.getPlaylistId();var I=e.player.getVideoData(1);var B=I.videoId;if(!c&&!B||(e.player.getAppState()===2||e.player.getAppState()===1)&&e.player.S().Y("should_clear_video_data_on_player_cued_unstarted"))I=null;else{var x=e.player.getPlaylist();if(x){var S=[];for(var h=0;h2*this.size&&ot(this),!0):!1}; g.M.get=function(e,L){return Bp(this.K,e)?this.K[e]:L}; g.M.set=function(e,L){Bp(this.K,e)||(this.size+=1,this.X.push(e),this.zf++);this.K[e]=L}; g.M.forEach=function(e,L){for(var c=this.N4(),I=0;I=I.X.length)return g.T8;var x=I.X[L++];return g.f0(e?x:I.K[x])}; return B}; var iT7={EIW:"atp",w_w:"ska",SCl:"que",hA0:"mus",Wf$:"sus",J_9:"dsp",eXe:"seq",LAe:"mic",bpw:"dpa",zA9:"mlm",NgW:"dsdtr",UD9:"ntb",I0l:"vsp",KRq:"scn",LVM:"rpe",nN9:"dcn",Hp7:"dcp",ok9:"pas",fVw:"drq",B$d:"opf",aJW:"els",she:"isg",VF$:"svq",pc_:"mvp",XgM:"ads",JRY:"stcp",B7m:"sads",mS0:"dloc",ip_:"dcw",pgq:"asw",zPl:"apw"},Gwe={qh$:"u",jFw:"cl",tXl:"k",xMl:"i",gN_:"cr",spl:"m",TPl:"g",D9:"up"},RdL={n_:"adPlaying",ly:"onAdStateChange"},u9e={VA$:"nowPlaying",YCW:"onStateChange",n_:"adPlaying",ly:"onAdStateChange", Q3:"nowPlayingShorts",nx:"onShortsStateChange"},tt9={Q3:"nowPlayingShorts",nx:"onShortsStateChange"};SU.prototype.equals=function(e){return e?this.id==e.id:!1}; var cFU="",TS=null;g.z(RIe,g.JW);var Mn,zIg=tGZ("loadCastFramework")||tGZ("loadCastApplicationFramework"),fMJ=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.TL(s8,g.p);g.M=s8.prototype;g.M.Ep=function(e){this.G=arguments;this.X=!1;this.Jw?this.Z=g.O9()+this.Lp:this.Jw=g.Cc(this.B,this.Lp)}; g.M.stop=function(){this.Jw&&(g.LZ.clearTimeout(this.Jw),this.Jw=null);this.Z=null;this.X=!1;this.G=[]}; g.M.pause=function(){++this.K}; g.M.resume=function(){this.K&&(--this.K,!this.K&&this.X&&(this.X=!1,this.j.apply(null,this.G)))}; g.M.KS=function(){this.stop();s8.hj.KS.call(this)}; g.M.xJ=function(){this.Jw&&(g.LZ.clearTimeout(this.Jw),this.Jw=null);this.Z?(this.Jw=g.Cc(this.B,this.Z-g.O9()),this.Z=null):this.K?this.X=!0:(this.X=!1,this.j.apply(null,this.G))};vp.prototype.stringify=function(e){return g.LZ.JSON.stringify(e,void 0)}; vp.prototype.parse=function(e){return g.LZ.JSON.parse(e,void 0)};g.TL(F2U,g.Hk);g.TL(bQg,g.Hk);var iQN=null;g.TL(gaN,g.Hk);g.TL(kZM,g.Hk);g.TL(DLL,g.Hk);bu.prototype.debug=function(){}; bu.prototype.info=function(){}; bu.prototype.warning=function(){};var yFU={},mLN={};g.M=iu.prototype;g.M.setTimeout=function(e){this.Sl=e}; g.M.DA=function(e){e=e.target;var L=this.He;L&&g.lq(e)==3?L.SI():this.Kr(e)}; g.M.Kr=function(e){try{if(e==this.X)a:{var L=g.lq(this.X),c=this.X.K,I=this.X.getStatus();if(!(L<3)&&(L!=3||this.X&&(this.K.K||g.QH(this.X)||g.dT(this.X)))){this.ye||L!=4||c==7||(c==8||I<=0?fV(3):fV(2));$LL(this);var B=this.X.getStatus();this.sY=B;var x=NaL(this);if(this.j=B==200){if(this.Kf&&!this.Pe){b:{if(this.X){var S=g.Ua(this.X,"X-HTTP-Initial-Response");if(S&&!g.J_(S)){var h=S;break b}}h=null}if(e=h)this.Pe=!0,X3N(this,e);else{this.j=!1;this.B=3;Ad(12);gX(this);k3(this);break a}}if(this.Ve){e= !0;for(var R;!this.ye&&this.T0&&!this.RT&&(this.RT=!0,this.Z.At(this)):(gX(this),k3(this))}else X3N(this,x);L==4&&gX(this);this.j&&!this.ye&&(L==4?jCh(this.Z,this):(this.j=!1,GS(this)))}else g.flr(this.X),B==400&&x.indexOf("Unknown SID")> 0?(this.B=3,Ad(12)):(this.B=0,Ad(13)),gX(this),k3(this)}}}catch(u){}finally{}}; g.M.cancel=function(){this.ye=!0;gX(this)}; g.M.rO=function(){this.pS=null;var e=Date.now();e-this.x9>=0?(this.t7!=2&&(fV(3),Ad(17)),gX(this),this.B=2,k3(this)):p3e(this,this.x9-e)}; g.M.getLastError=function(){return this.B}; g.M.LQ=function(){return this.X};YNU.prototype.cancel=function(){this.Z=evZ(this);if(this.K)this.K.cancel(),this.K=null;else if(this.X&&this.X.size!==0){for(var e=g.f(this.X.values()),L=e.next();!L.done;L=e.next())L.value.cancel();this.X.clear()}};g.M=BsZ.prototype;g.M.ZP=8;g.M.xI=1;g.M.connect=function(e,L,c,I){Ad(0);this.Cf=e;this.ye=L||{};c&&I!==void 0&&(this.ye.OSID=c,this.ye.OAID=I);this.Pe=this.Q5;this.Y9=dLw(this,null,this.Cf);V7(this)}; g.M.disconnect=function(){o59(this);if(this.xI==3){var e=this.m$++,L=this.Y9.clone();g.ob(L,"SID",this.G);g.ob(L,"RID",e);g.ob(L,"TYPE","terminate");Nn(this,L);e=new iu(this,this.G,e);e.t7=2;e.J=eU(L.clone());L=!1;if(g.LZ.navigator&&g.LZ.navigator.sendBeacon)try{L=g.LZ.navigator.sendBeacon(e.J.toString(),"")}catch(c){}!L&&g.LZ.Image&&((new Image).src=e.J,L=!0);L||(e.X=CLg(e.Z,null),e.X.send(e.J));e.Gm=Date.now();GS(e)}tL7(this)}; g.M.Dj=function(){return this.xI==0}; g.M.getState=function(){return this.xI}; g.M.GO=function(e){if(this.j)if(this.j=null,this.xI==1){if(!e){this.m$=Math.floor(Math.random()*1E5);e=this.m$++;var L=new iu(this,"",e),c=this.D;this.sY&&(c?(c=g.MQ(c),g.so(c,this.sY)):c=this.sY);this.T!==null||this.x9||(L.Y9=c,c=null);var I;if(this.DY)a:{for(var B=I=0;B4096){I=B;break a}if(I===4096||B===this.Z.length-1){I=B+1;break a}}I= 1E3}else I=1E3;I=hvM(this,L,I);B=this.Y9.clone();g.ob(B,"RID",e);g.ob(B,"CVER",22);this.Ve&&g.ob(B,"X-HTTP-Session-Id",this.Ve);Nn(this,B);c&&(this.x9?I="headers="+g.kC(g.HSH(c))+"&"+I:this.T&&g.Rb(B,this.T,c));QCg(this.K,L);this.gZ&&g.ob(B,"TYPE","init");this.DY?(g.ob(B,"$req",I),g.ob(B,"SID","null"),L.Kf=!0,VGh(L,B,null)):VGh(L,B,I);this.xI=2}}else this.xI==3&&(e?RvU(this,e):this.Z.length==0||naM(this.K)||RvU(this))}; g.M.e1=function(){this.J=null;uFN(this);if(this.xT&&!(this.Sl||this.X==null||this.RI<=0)){var e=2*this.RI;this.k9=FX((0,g.RL)(this.y77,this),e)}}; g.M.y77=function(){this.k9&&(this.k9=null,this.Pe=!1,this.Sl=!0,Ad(10),wX(this),uFN(this))}; g.M.At=function(e){this.X==e&&this.xT&&!this.Sl&&(xxM(this),this.Sl=!0,Ad(11))}; g.M.XP=function(){this.pS!=null&&(this.pS=null,wX(this),lMe(this),Ad(19))}; g.M.qKW=function(e){e?Ad(2):Ad(1)}; g.M.isActive=function(){return!!this.B&&this.B.isActive(this)}; g.M=qRM.prototype;g.M.Vb=function(){}; g.M.Ij=function(){}; g.M.UT=function(){}; g.M.qC=function(){}; g.M.isActive=function(){return!0}; g.M.zv=function(){};g.TL(y7,g.hi);y7.prototype.open=function(){this.X.B=this.Z;this.j&&(this.X.t7=!0);this.X.connect(this.B,this.K||void 0)}; y7.prototype.close=function(){this.X.disconnect()}; y7.prototype.send=function(e){var L=this.X;if(typeof e==="string"){var c={};c.__data__=e;e=c}else this.G&&(c={},c.__data__=g.yH(e),e=c);L.Z.push(new K2e(L.Nl++,e));L.xI==3&&V7(L)}; y7.prototype.KS=function(){this.X.B=null;delete this.Z;this.X.disconnect();delete this.X;y7.hj.KS.call(this)}; g.TL(WPL,F2U);g.TL(MLL,bQg);g.TL(mx,qRM);mx.prototype.Vb=function(){this.X.dispatchEvent("m")}; mx.prototype.Ij=function(e){this.X.dispatchEvent(new WPL(e))}; mx.prototype.UT=function(e){this.X.dispatchEvent(new MLL(e))}; mx.prototype.qC=function(){this.X.dispatchEvent("n")};var pV=new g.hi;g.z(v5g,g.Hk);g.M=jU.prototype;g.M.Gf=null;g.M.QX=!1;g.M.AX=null;g.M.SM=null;g.M.M3=null;g.M.Qp=null;g.M.Wk=null;g.M.Ag=null;g.M.Uf=null;g.M.jn=null;g.M.d5=0;g.M.S0=null;g.M.vz=null;g.M.qE=null;g.M.oC=-1;g.M.dj=!0;g.M.wf=!1;g.M.Nc=0;g.M.Jg=null;var GxZ={},ivJ={};g.M=jU.prototype;g.M.setTimeout=function(e){this.K=e}; g.M.hv=function(e){e=e.target;var L=this.Jg;L&&g.lq(e)==3?L.SI():this.j1(e)}; g.M.j1=function(e){try{if(e==this.jn)a:{var L=g.lq(this.jn),c=this.jn.K,I=this.jn.getStatus();if(g.RF&&!g.$C("420+")){if(L<4)break a}else if(L<3||L==3&&!g.QH(this.jn))break a;this.wf||L!=4||c==7||(c==8||I<=0?this.X.LG(3):this.X.LG(2));DxN(this);var B=this.jn.getStatus();this.oC=B;var x=g.QH(this.jn);if(this.QX=B==200){L==4&&Hp(this);if(this.Ve){for(e=!0;!this.wf&&this.d50?(this.qE=3,$3(13)):(this.qE=0,$3(14)),Hp(this),wIJ(this)}}catch(h){}finally{}}; g.M.cancel=function(){this.wf=!0;Hp(this)}; g.M.pD=function(){this.AX=null;var e=Date.now();e-this.SM>=0?(this.Qp!=2&&this.X.LG(3),Hp(this),this.qE=2,$3(18),wIJ(this)):kxh(this,this.SM-e)}; g.M.getLastError=function(){return this.qE};g.M=a8N.prototype;g.M.EZ=null;g.M.G6=null;g.M.uT=!1;g.M.DX=null;g.M.sA=null;g.M.sP=-1;g.M.l$=null;g.M.Br=null;g.M.connect=function(e){this.DX=e;e=Pp(this.X,null,this.DX);$3(3);Date.now();var L=this.X.D;L!=null?(this.l$=L[0],(this.Br=L[1])?(this.sA=1,NsL(this)):(this.sA=2,mxM(this))):(LV(e,"MODE","init"),this.G6=new jU(this),this.G6.Gf=this.EZ,FPU(this.G6,e,!1,null,!0),this.sA=0)}; g.M.Qs=function(e){if(e)this.sA=2,mxM(this);else{$3(4);var L=this.X;L.YY=L.pU.sP;E8(L,9)}e&&this.LG(2)}; g.M.LZ=function(e){return this.X.LZ(e)}; g.M.abort=function(){this.G6&&(this.G6.cancel(),this.G6=null);this.sP=-1}; g.M.Dj=function(){return!1}; g.M.BS=function(e,L){this.sP=e.oC;if(this.sA==0)if(L){try{var c=this.K.parse(L)}catch(I){e=this.X;e.YY=this.sP;E8(e,2);return}this.l$=c[0];this.Br=c[1]}else e=this.X,e.YY=this.sP,E8(e,2);else this.sA==2&&(this.uT?($3(7),Date.now()):L=="11111"?($3(6),this.uT=!0,Date.now(),this.sP=200,this.G6.cancel(),$3(12),Q7(this.X,this,!0)):($3(8),Date.now(),this.uT=!1))}; g.M.x6=function(){this.sP=this.G6.oC;if(this.G6.QX)this.sA==0?this.Br?(this.sA=1,NsL(this)):(this.sA=2,mxM(this)):this.sA==2&&(this.uT?($3(12),Q7(this.X,this,!0)):($3(11),Q7(this.X,this,!1)));else{this.sA==0?$3(9):this.sA==2&&$3(10);var e=this.X;this.G6.getLastError();e.YY=this.sP;E8(e,2)}}; g.M.Pk=function(){return this.X.Pk()}; g.M.isActive=function(){return this.X.isActive()}; g.M.LG=function(e){this.X.LG(e)};g.M=y7w.prototype;g.M.ao=null;g.M.CI=null;g.M.Bq=null;g.M.e9=null;g.M.zJ=null;g.M.nL=null;g.M.Rj=null;g.M.Xr=null;g.M.Oz=0;g.M.KD=0;g.M.rM=null;g.M.vH=null;g.M.ag=null;g.M.VR=null;g.M.pU=null;g.M.yV=null;g.M.dS=-1;g.M.Yb=-1;g.M.YY=-1;g.M.v4=0;g.M.QF=0;g.M.I0=8;var J$e={OK:0,DDe:2,nzm:4,k6W:5,GFq:6,STOP:7,A5:8,XU$:9,xO7:10,DO0:11,hPe:12};g.TL(pIN,g.Hk);g.TL($xh,g.Hk);g.M=y7w.prototype; g.M.connect=function(e,L,c,I,B){$3(0);this.zJ=L;this.CI=c||{};I&&B!==void 0&&(this.CI.OSID=I,this.CI.OAID=B);this.J?(Zr((0,g.RL)(this.Fi,this,e),100),HvJ(this)):this.Fi(e)}; g.M.disconnect=function(){l8Z(this);if(this.X==3){var e=this.Oz++,L=this.nL.clone();g.ob(L,"SID",this.G);g.ob(L,"RID",e);g.ob(L,"TYPE","terminate");U8(this,L);e=new jU(this,this.G,e);e.Qp=2;e.Wk=eU(L.clone());(new Image).src=e.Wk.toString();e.M3=Date.now();bvM(e)}edN(this)}; g.M.Fi=function(e){this.pU=new a8N(this);this.pU.EZ=this.ao;this.pU.K=this.B;this.pU.connect(e)}; g.M.Dj=function(){return this.X==0}; g.M.getState=function(){return this.X}; g.M.TO=function(e){this.vH=null;E5e(this,e)}; g.M.uu=function(){this.ag=null;this.e9=new jU(this,this.G,"rpc",this.T);this.e9.Gf=this.ao;this.e9.Nc=0;var e=this.Rj.clone();g.ob(e,"RID","rpc");g.ob(e,"SID",this.G);g.ob(e,"CI",this.yV?"0":"1");g.ob(e,"AID",this.dS);U8(this,e);g.ob(e,"TYPE","xmlhttp");FPU(this.e9,e,!0,this.Xr,!1)}; g.M.BS=function(e,L){if(this.X!=0&&(this.e9==e||this.Bq==e))if(this.YY=e.oC,this.Bq==e&&this.X==3)if(this.I0>7){try{var c=this.B.parse(L)}catch(I){c=null}if(Array.isArray(c)&&c.length==3)if(e=c,e[0]==0)a:{if(!this.ag){if(this.e9)if(this.e9.M3+3E30)){if(I=L==1)this.Bq||this.vH||this.X==1||this.v4>=2?I=!1:(this.vH=Zr((0,g.RL)(this.TO,this,e),KP9(this,this.v4)),this.v4++, I=!0);I=!(I||L==2&&YR9(this))}if(I)switch(c){case 1:E8(this,5);break;case 4:E8(this,10);break;case 3:E8(this,6);break;case 7:E8(this,12);break;default:E8(this,2)}}}; g.M.a7=function(e){if(!g.Fh(arguments,this.X))throw Error("Unexpected channel state: "+this.X);}; g.M.GrY=function(e){e?$3(2):($3(1),n5M(this,8))}; g.M.LZ=function(e){if(e)throw Error("Can't create secondary domain capable XhrIo object.");e=new g.$A;e.T=!1;return e}; g.M.isActive=function(){return!!this.rM&&this.rM.isActive(this)}; g.M.LG=function(e){var L=pV;L.dispatchEvent(new $xh(L,e))}; g.M.Pk=function(){return!1}; g.M=Ld7.prototype;g.M.WS=function(){}; g.M.yb=function(){}; g.M.wE=function(){}; g.M.cS=function(){}; g.M.hH=function(){}; g.M.MC=function(){return{}}; g.M.isActive=function(){return!0};g.M=cgh.prototype;g.M.enqueue=function(e){this.K.push(e)}; g.M.isEmpty=function(){return this.X.length===0&&this.K.length===0}; g.M.clear=function(){this.X=[];this.K=[]}; g.M.contains=function(e){return g.Fh(this.X,e)||g.Fh(this.K,e)}; g.M.remove=function(e){var L=this.X;var c=(0,g.Z6M)(L,e);c>=0?(g.b7(L,c),L=!0):L=!1;return L||g.i7(this.K,e)}; g.M.w7=function(){for(var e=[],L=this.X.length-1;L>=0;--L)e.push(this.X[L]);L=this.K.length;for(var c=0;c=Vle.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(e=Vle[this.K],this.Jw=g.oC((0,g.RL)(this.DD,this),e),this.K++):this.publish("pairingFailed",Error("Server error "+e.status))}; g.M.I7=function(){this.X=null;this.publish("pairingFailed",Error("Server not responding"))}; var Vle=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.TL(rt,oe);g.M=rt.prototype;g.M.start=function(){Sq(this)&&this.publish("screenChange");!g.iS("yt-remote-lounge-token-expiration")&&mOZ(this);g.ra(this.X);this.X=g.oC((0,g.RL)(this.start,this),1E4)}; g.M.add=function(e,L){Sq(this);Vtg(this,e);hC(this,!1);this.publish("screenChange");L(e);e.token||mOZ(this)}; g.M.remove=function(e,L){var c=Sq(this);aQN(this,e)&&(hC(this,!1),c=!0);L(e);c&&this.publish("screenChange")}; g.M.uc=function(e,L,c,I){var B=Sq(this),x=this.get(e.id);x?(x.name!=L&&(x.name=L,hC(this,!1),B=!0),c(e)):I(Error("no such local screen."));B&&this.publish("screenChange")}; g.M.KS=function(){g.ra(this.X);rt.hj.KS.call(this)}; g.M.qt=function(e){Sq(this);var L=this.screens.length;e=e&&e.screens||[];for(var c=e.length,I=0;I20)break a;h=L(x,S)}x=h}B.name=x}c(tC(this,B))},this), onError:(0,g.RL)(function(B){I(Error("pairing request failed: "+B.status))},this), onTimeout:(0,g.RL)(function(){I(Error("pairing request timed out."))},this)})}; g.M.KS=function(){g.L0(this.K);g.L0(this.X);u0.hj.KS.call(this)}; g.M.yU=function(){EiU(this);this.publish("screenChange");this.X.update()}; u0.prototype.dispose=u0.prototype.dispose;g.TL(Ob,g.Yg);g.M=Ob.prototype;g.M.vv=function(e){this.We()||(e&&(Tq(this,""+e),this.publish("sessionFailed")),this.X=null,this.publish("sessionScreen",null))}; g.M.info=function(e){LD(this.Ve,e)}; g.M.OT=function(){return null}; g.M.BV=function(e){var L=this.K;e?(L.displayStatus=new chrome.cast.ReceiverDisplayStatus(e,[]),L.displayStatus.showStop=!0):L.displayStatus=null;chrome.cast.setReceiverDisplayStatus(L,(0,g.RL)(function(){this.info("Updated receiver status for "+L.friendlyName+": "+e)},this),(0,g.RL)(function(){Tq(this,"Failed to update receiver status for: "+L.friendlyName)},this))}; g.M.KS=function(){this.BV("");Ob.hj.KS.call(this)};g.z(WW,Ob);g.M=WW.prototype;g.M.VN=function(e){if(this.Z){if(this.Z==e)return;Tq(this,"Overriding cast session with new session object");Sxg(this);this.Gm=!1;this.D="unknown";this.Z.removeUpdateListener(this.h7);this.Z.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.k9)}this.Z=e;this.Z.addUpdateListener(this.h7);this.Z.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.k9);cHM(this,"getMdxSessionStatus")}; g.M.uJ=function(e){this.info("launchWithParams no-op for Cast: "+g.yH(e))}; g.M.stop=function(){this.Z?this.Z.stop((0,g.RL)(function(){this.vv()},this),(0,g.RL)(function(){this.vv(Error("Failed to stop receiver app."))},this)):this.vv(Error("Stopping cast device without session."))}; g.M.BV=function(){}; g.M.KS=function(){this.info("disposeInternal");Sxg(this);this.Z&&(this.Z.removeUpdateListener(this.h7),this.Z.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.k9));this.Z=null;Ob.prototype.KS.call(this)}; g.M.GIq=function(e,L){if(!this.We())if(L)if(L=cp(L),g.Se(L))switch(e=""+L.type,L=L.data||{},this.info("onYoutubeMessage_: "+e+" "+g.yH(L)),e){case "mdxSessionStatus":niZ(this,L);break;case "loungeToken":IZL(this,L);break;default:Tq(this,"Unknown youtube message: "+e)}else Tq(this,"Unable to parse message.");else Tq(this,"No data in message.")}; g.M.SC=function(e,L,c,I){g.ra(this.J);this.J=0;QMe(this.G,this.K.label,e,this.K.friendlyName,(0,g.RL)(function(B){B?L(B):I>=0?(Tq(this,"Screen "+e+" appears to be offline. "+I+" retries left."),this.J=g.oC((0,g.RL)(this.SC,this,e,L,c,I-1),300)):c(Error("Unable to fetch screen."))},this),c)}; g.M.OT=function(){return this.Z}; g.M.kS=function(e){this.We()||e||(Tq(this,"Cast session died."),this.vv())};g.z(MC,Ob);g.M=MC.prototype;g.M.VN=function(e){this.Z=e;this.Z.addUpdateListener(this.ye)}; g.M.uJ=function(e){this.Y9=e;this.pS()}; g.M.stop=function(){TO9(this);this.Z?this.Z.stop((0,g.RL)(this.vv,this,null),(0,g.RL)(this.vv,this,"Failed to stop DIAL device.")):this.vv()}; g.M.KS=function(){TO9(this);this.Z&&this.Z.removeUpdateListener(this.ye);this.Z=null;Ob.prototype.KS.call(this)}; g.M.jh=function(e){this.We()||e||(Tq(this,"DIAL session died."),this.B(),this.B=function(){},this.vv())};g.z(vW,Ob);vW.prototype.stop=function(){this.vv()}; vW.prototype.VN=function(){}; vW.prototype.uJ=function(){g.ra(this.Z);this.Z=NaN;var e=uu(this.G.Pc(),this.K.label);e?qC(this,e):this.vv(Error("No such screen"))}; vW.prototype.KS=function(){g.ra(this.Z);this.Z=NaN;Ob.prototype.KS.call(this)};g.z(fD,g.Yg);g.M=fD.prototype; g.M.init=function(e,L){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest(this.J,[chrome.cast.Capability.AUDIO_OUT]);g.uL("desktop_enable_cast_connect")&&(c.androidReceiverCompatible=!0);this.D||(c.dialRequest=new chrome.cast.DialRequest("YouTube"));var I=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;e=e||this.j?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var B=(0,g.RL)(this.jIe,this);c=new chrome.cast.ApiConfig(c,(0,g.RL)(this.tL, this),B,I,e);c.customDialLaunchCallback=(0,g.RL)(this.v99,this);chrome.cast.initialize(c,(0,g.RL)(function(){this.We()||(chrome.cast.addReceiverActionListener(this.B),kIZ(),this.K.subscribe("onlineScreenChange",(0,g.RL)(this.gE,this)),this.Z=zq9(this),chrome.cast.setCustomReceivers(this.Z,function(){},(0,g.RL)(function(x){this.VZ("Failed to set initial custom receivers: "+g.yH(x))},this)),this.publish("yt-remote-cast2-availability-change",Fp(this)),L(!0))},this),(0,g.RL)(function(x){this.VZ("Failed to initialize API: "+ g.yH(x)); L(!1)},this))}; g.M.wM$=function(e,L){AC("Setting connected screen ID: "+e+" -> "+L);if(this.X){var c=this.X.X;if(!e||c&&c.id!=e)AC("Unsetting old screen status: "+this.X.K.friendlyName),b0(this,null)}if(e&&L){if(!this.X){e=uu(this.K.Pc(),e);if(!e){AC("setConnectedScreenStatus: Unknown screen.");return}if(e.idType=="shortLived"){AC("setConnectedScreenStatus: Screen with id type to be short lived.");return}c=W7e(this,e);c||(AC("setConnectedScreenStatus: Connected receiver not custom..."),c=new chrome.cast.Receiver(e.uuid? e.uuid:e.id,e.name),c.receiverType=chrome.cast.ReceiverType.CUSTOM,this.Z.push(c),chrome.cast.setCustomReceivers(this.Z,function(){},(0,g.RL)(function(I){this.VZ("Failed to set initial custom receivers: "+g.yH(I))},this))); AC("setConnectedScreenStatus: new active receiver: "+c.friendlyName);b0(this,new vW(this.K,c),!0)}this.X.BV(L)}else AC("setConnectedScreenStatus: no screen.")}; g.M.C0d=function(e){this.We()?this.VZ("Setting connection data on disposed cast v2"):this.X?this.X.uJ(e):this.VZ("Setting connection data without a session")}; g.M.R7=function(){this.We()?this.VZ("Stopping session on disposed cast v2"):this.X?(this.X.stop(),b0(this,null)):AC("Stopping non-existing session")}; g.M.requestSession=function(){chrome.cast.requestSession((0,g.RL)(this.tL,this),(0,g.RL)(this.vxd,this))}; g.M.KS=function(){this.K.unsubscribe("onlineScreenChange",(0,g.RL)(this.gE,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.B);var e=i$N,L=g.BU("yt.mdx.remote.debug.handlers_");g.i7(L||[],e);g.L0(this.X);g.Yg.prototype.KS.call(this)}; g.M.VZ=function(e){LD("Controller",e)}; g.M.MB=function(e,L){this.X==e&&(L||b0(this,null),this.publish("yt-remote-cast2-session-change",L))}; g.M.Ipq=function(e,L){if(!this.We())if(e)switch(e.friendlyName=chrome.cast.unescape(e.friendlyName),AC("onReceiverAction_ "+e.label+" / "+e.friendlyName+"-- "+L),L){case chrome.cast.ReceiverAction.CAST:if(this.X)if(this.X.K.label!=e.label)AC("onReceiverAction_: Stopping active receiver: "+this.X.K.friendlyName),this.X.stop();else{AC("onReceiverAction_: Casting to active receiver.");this.X.X&&this.publish("yt-remote-cast2-session-change",this.X.X);break}switch(e.receiverType){case chrome.cast.ReceiverType.CUSTOM:b0(this, new vW(this.K,e));break;case chrome.cast.ReceiverType.DIAL:b0(this,new MC(this.K,e,this.G,this.config_));break;case chrome.cast.ReceiverType.CAST:b0(this,new WW(this.K,e,this.config_));break;default:this.VZ("Unknown receiver type: "+e.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.X&&this.X.K.label==e.label?this.X.stop():this.VZ("Stopping receiver w/o session: "+e.friendlyName)}else this.VZ("onReceiverAction_ called without receiver.")}; g.M.v99=function(e){if(this.We())return Promise.reject(Error("disposed"));var L=e.receiver;L.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.VZ("Not DIAL receiver: "+L.friendlyName),L.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.X?this.X.K:null;if(!c||c.label!=L.label)return this.VZ("Receiving DIAL launch request for non-clicked DIAL receiver: "+L.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==L.label&&c.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.X.X)return AC("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.X.X),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.VZ('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+L.friendlyName);b0(this,new MC(this.K,L,this.G,this.config_))}L=this.X;L.J=e;L.J.appState==chrome.cast.DialAppState.RUNNING?(e=L.J.extraData||{},c=e.screenId||null,zq(L)&&e.loungeToken?e.loungeTokenRefreshIntervalMs?e=t4e(L,{name:L.K.friendlyName,screenId:e.screenId,loungeToken:e.loungeToken,dialId:L.J.receiver.label, screenIdType:"shortLived"},e.loungeTokenRefreshIntervalMs):(g.jM(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(e)+".")),e=OFL(L,c)):e=OFL(L,c)):e=RqN(L);return e}; g.M.tL=function(e){var L=this;if(!this.We()&&!this.j){AC("New cast session ID: "+e.sessionId);var c=e.receiver;if(c.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.X)if(c.receiverType==chrome.cast.ReceiverType.CAST)AC("Got resumed cast session before resumed mdx connection."),c.friendlyName=chrome.cast.unescape(c.friendlyName),b0(this,new WW(this.K,c,this.config_),!0);else{this.VZ("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var I=this.X.K,B=uu(this.K.Pc(), I.label);B&&hd(B,c.label)&&I.receiverType!=chrome.cast.ReceiverType.CAST&&c.receiverType==chrome.cast.ReceiverType.CAST&&(AC("onSessionEstablished_: manual to cast session change "+c.friendlyName),g.L0(this.X),this.X=new WW(this.K,c,this.config_),this.X.subscribe("sessionScreen",(0,g.RL)(this.MB,this,this.X)),this.X.subscribe("sessionFailed",function(){return M4N(L,L.X)}),this.X.uJ(null)); this.X.VN(e)}}}; g.M.BI=function(){return this.X?this.X.OT():null}; g.M.vxd=function(e){this.We()||(this.VZ("Failed to estabilish a session: "+g.yH(e)),e.code!=chrome.cast.ErrorCode.CANCEL&&b0(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.M.jIe=function(e){AC("Receiver availability updated: "+e);if(!this.We()){var L=Fp(this);this.T=e==chrome.cast.ReceiverAvailability.AVAILABLE;Fp(this)!=L&&this.publish("yt-remote-cast2-availability-change",Fp(this))}}; g.M.gE=function(){this.We()||(this.Z=zq9(this),AC("Updating custom receivers: "+g.yH(this.Z)),chrome.cast.setCustomReceivers(this.Z,function(){},(0,g.RL)(function(){this.VZ("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",Fp(this)))}; fD.prototype.setLaunchParams=fD.prototype.C0d;fD.prototype.setConnectedScreenStatus=fD.prototype.wM$;fD.prototype.stopSession=fD.prototype.R7;fD.prototype.getCastSession=fD.prototype.BI;fD.prototype.requestSession=fD.prototype.requestSession;fD.prototype.init=fD.prototype.init;fD.prototype.dispose=fD.prototype.dispose;var gRL=[];g.M=JC.prototype; g.M.reset=function(e){this.listId="";this.index=-1;this.videoId="";CM7(this);this.volume=-1;this.muted=!1;e&&(this.index=e.index,this.listId=e.listId,this.videoId=e.videoId,this.playerState=e.playerState,this.volume=e.volume,this.muted=e.muted,this.audioTrackId=e.audioTrackId,this.trackData=e.trackData,this.r9=e.hasPrevious,this.g$=e.hasNext,this.j=e.playerTime,this.B=e.playerTimeAt,this.K=e.seekableStart,this.T=e.seekableEnd,this.Z=e.duration,this.J=e.loadedTime,this.X=e.liveIngestionTime,this.G= !isNaN(this.X))}; g.M.isPlaying=function(){return this.playerState==1}; g.M.isBuffering=function(){return this.playerState==3}; g.M.ZT=function(){return this.playerState==1081}; g.M.SF=function(e){this.Z=isNaN(e)?0:e}; g.M.getDuration=function(){return this.G?this.Z+V$(this):this.Z}; g.M.clone=function(){return new JC(NON(this))};g.z(y$,g.Yg);g.M=y$.prototype;g.M.getState=function(){return this.Z}; g.M.T0=function(){return this.G.getReconnectTimeout()}; g.M.z$=function(){this.G.reconnect()}; g.M.play=function(){pD(this)?(this.X?this.X.play(null,g.VD,l0(this,"play")):HW(this,"play"),ZFZ(this,1,ae(Zv(this))),this.publish("remotePlayerChange")):$G(this,this.play)}; g.M.pause=function(){pD(this)?(this.X?this.X.pause(null,g.VD,l0(this,"pause")):HW(this,"pause"),ZFZ(this,2,ae(Zv(this))),this.publish("remotePlayerChange")):$G(this,this.pause)}; g.M.seekTo=function(e){if(pD(this)){if(this.X){var L=Zv(this),c=new chrome.cast.media.SeekRequest;c.currentTime=e;L.isPlaying()||L.isBuffering()?c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.X.seek(c,g.VD,l0(this,"seekTo",{newTime:e}))}else HW(this,"seekTo",{newTime:e});ZFZ(this,3,e);this.publish("remotePlayerChange")}else $G(this,g.u7(this.seekTo,e))}; g.M.stop=function(){if(pD(this)){this.X?this.X.stop(null,g.VD,l0(this,"stopVideo")):HW(this,"stopVideo");var e=Zv(this);e.index=-1;e.videoId="";CM7(e);jq(this,e);this.publish("remotePlayerChange")}else $G(this,this.stop)}; g.M.setVolume=function(e,L){if(pD(this)){var c=Zv(this);if(this.K){if(c.volume!=e){var I=Math.round(e)/100;this.K.setReceiverVolumeLevel(I,(0,g.RL)(function(){cW("set receiver volume: "+I)},this),(0,g.RL)(function(){this.VZ("failed to set receiver volume.")},this))}c.muted!=L&&this.K.setReceiverMuted(L,(0,g.RL)(function(){cW("set receiver muted: "+L)},this),(0,g.RL)(function(){this.VZ("failed to set receiver muted.")},this))}else{var B={volume:e, muted:L};c.volume!=-1&&(B.delta=e-c.volume);HW(this,"setVolume",B)}c.muted=L;c.volume=e;jq(this,c)}else $G(this,g.u7(this.setVolume,e,L))}; g.M.FZ=function(e,L){if(pD(this)){var c=Zv(this);e={videoId:e};L&&(c.trackData={trackName:L.name,languageCode:L.languageCode,sourceLanguageCode:L.translationLanguage?L.translationLanguage.languageCode:"",languageName:L.languageName,kind:L.kind},e.style=g.yH(L.style),g.so(e,c.trackData));HW(this,"setSubtitlesTrack",e);jq(this,c)}else $G(this,g.u7(this.FZ,e,L))}; g.M.setAudioTrack=function(e,L){pD(this)?(L=L.getLanguageInfo().getId(),HW(this,"setAudioTrack",{videoId:e,audioTrackId:L}),e=Zv(this),e.audioTrackId=L,jq(this,e)):$G(this,g.u7(this.setAudioTrack,e,L))}; g.M.playVideo=function(e,L,c,I,B,x,S){I=I===void 0?null:I;B=B===void 0?null:B;x=x===void 0?null:x;S=S===void 0?null:S;var h=Zv(this),R={videoId:e};c!==void 0&&(R.currentIndex=c);NC(h,e,c||0);L!==void 0&&(CD(h,L),R.currentTime=L);I&&(R.listId=I);B&&(R.playerParams=B);x&&(R.clickTrackingParams=x);S&&(R.locationInfo=g.yH(S));HW(this,"setPlaylist",R);I||jq(this,h)}; g.M.ID=function(e,L){if(pD(this)){if(e&&L){var c=Zv(this);NC(c,e,L);jq(this,c)}HW(this,"previous")}else $G(this,g.u7(this.ID,e,L))}; g.M.nextVideo=function(e,L){if(pD(this)){if(e&&L){var c=Zv(this);NC(c,e,L);jq(this,c)}HW(this,"next")}else $G(this,g.u7(this.nextVideo,e,L))}; g.M.Vn=function(){if(pD(this)){HW(this,"clearPlaylist");var e=Zv(this);e.reset();jq(this,e);this.publish("remotePlayerChange")}else $G(this,this.Vn)}; g.M.Dk=function(){pD(this)?HW(this,"dismissAutoplay"):$G(this,this.Dk)}; g.M.dispose=function(){if(this.Z!=3){var e=this.Z;this.Z=3;this.publish("proxyStateChange",e,this.Z)}g.Yg.prototype.dispose.call(this)}; g.M.KS=function(){yHM(this);this.G=null;this.B.clear();mz(this,null);g.Yg.prototype.KS.call(this)}; g.M.T3=function(e){if((e!=this.Z||e==2)&&this.Z!=3&&e!=0){var L=this.Z;this.Z=e;this.publish("proxyStateChange",L,e);if(e==1)for(;!this.B.isEmpty();)L=e=this.B,L.X.length===0&&(L.X=L.K,L.X.reverse(),L.K=[]),e.X.pop().apply(this);else e==3&&this.dispose()}}; g.M.GyS=function(e,L){this.publish(e,L)}; g.M.o9e=function(e){if(!e)this.oN(null),mz(this,null);else if(this.K.receiver.volume){e=this.K.receiver.volume;var L=Zv(this),c=Math.round(100*e.level||0);if(L.volume!=c||L.muted!=e.muted)cW("Cast volume update: "+e.level+(e.muted?" muted":"")),L.volume=c,L.muted=!!e.muted,jq(this,L)}}; g.M.oN=function(e){cW("Cast media: "+!!e);this.X&&this.X.removeUpdateListener(this.J);if(this.X=e)this.X.addUpdateListener(this.J),p4w(this),this.publish("remotePlayerChange")}; g.M.wel=function(e){e?(p4w(this),this.publish("remotePlayerChange")):this.oN(null)}; g.M.rY=function(){HW(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.M.Pde=function(){var e=w4M();e&&mz(this,e)}; g.M.VZ=function(e){LD("CP",e)};g.z(dt,g.Yg);g.M=dt.prototype; g.M.connect=function(e,L){if(L){var c=L.listId,I=L.videoId,B=L.videoIds,x=L.playerParams,S=L.clickTrackingParams,h=L.index,R={videoId:I},u=L.currentTime,t=L.locationInfo;L=L.loopMode;u!==void 0&&(R.currentTime=u<=5?0:u);x&&(R.playerParams=x);t&&(R.locationInfo=t);S&&(R.clickTrackingParams=S);c&&(R.listId=c);B&&B.length>0&&(R.videoIds=B.join(","));h!==void 0&&(R.currentIndex=h);this.ye&&(R.loopMode=L||"LOOP_MODE_OFF");c&&(this.X.listId=c);this.X.videoId=I;this.X.index=h||0;this.X.state=3;CD(this.X, u);this.B="UNSUPPORTED";c=this.ye?"setInitialState":"setPlaylist";PW("Connecting with "+c+" and params: "+g.yH(R));this.K.connect({method:c,params:g.yH(R)},e,Bag())}else PW("Connecting without params"),this.K.connect({},e,Bag());lZw(this)}; g.M.BH=function(e){this.K.BH(e)}; g.M.dispose=function(){this.We()||(g.IL("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),Q$(this,3));g.Yg.prototype.dispose.call(this)}; g.M.KS=function(){PMM(this);dKL(this);QfJ(this);g.ra(this.J);this.J=NaN;g.ra(this.D);this.D=NaN;this.G=null;g.Tx(this.pS);this.pS.length=0;this.K.dispose();g.Yg.prototype.KS.call(this);this.B=this.T=this.Z=this.X=this.K=null}; g.M.lr=function(e){if(!this.Z||this.Z.length===0)return!1;for(var L=g.f(this.Z),c=L.next();!c.done;c=L.next())if(!c.value.capabilities.has(e))return!1;return!0}; g.M.mu=function(){var e=3;this.We()||(e=0,isNaN(this.cY())?this.K.Hm()&&isNaN(this.j)&&(e=1):e=2);return e}; g.M.Bj=function(e){PW("Disconnecting with "+e);g.IL("yt.mdx.remote.remoteClient_",null);PMM(this);this.publish("beforeDisconnect",e);e==1&&qn();this.K.disconnect(e);this.dispose()}; g.M.QA=function(){var e=this.X;this.G&&(e=this.X.clone(),NC(e,this.G,e.index));return NON(e)}; g.M.FF0=function(e){var L=this,c=new JC(e);c.videoId&&c.videoId!=this.X.videoId&&(this.G=c.videoId,g.ra(this.J),this.J=g.oC(function(){if(L.G){var B=L.G;L.G=null;L.X.videoId!=B&&Ub(L,"getNowPlaying")}},5E3)); var I=[];this.X.listId==c.listId&&this.X.videoId==c.videoId&&this.X.index==c.index||I.push("remoteQueueChange");this.X.playerState==c.playerState&&this.X.volume==c.volume&&this.X.muted==c.muted&&ae(this.X)==ae(c)&&g.yH(this.X.trackData)==g.yH(c.trackData)||I.push("remotePlayerChange");this.X.reset(e);g.KZ(I,function(B){this.publish(B)},this)}; g.M.lU=function(){var e=this.K.getDeviceId(),L=g.vU(this.Z,function(c){return c.type=="REMOTE_CONTROL"&&c.id!=e}); return L?L.id:""}; g.M.cY=function(){return this.K.T0()}; g.M.uQ=function(){return this.B||"UNSUPPORTED"}; g.M.TL=function(){return this.T||""}; g.M.YS=function(){!isNaN(this.cY())&&this.K.z$()}; g.M.cmm=function(e,L){Ub(this,e,L);ERN(this)}; g.M.Jx=function(){var e=g.ka("SAPISID","")||g.ka("__Secure-1PAPISID")||"",L=g.ka("__Secure-3PAPISID","")||"";if(!e&&!L)return"";e=g.GM(g.iD(e),2);L=g.GM(g.iD(L),2);return g.GM(g.iD(","+e+","+L),2)}; dt.prototype.subscribe=dt.prototype.subscribe;dt.prototype.unsubscribeByKey=dt.prototype.EV;dt.prototype.getProxyState=dt.prototype.mu;dt.prototype.disconnect=dt.prototype.Bj;dt.prototype.getPlayerContextData=dt.prototype.QA;dt.prototype.setPlayerContextData=dt.prototype.FF0;dt.prototype.getOtherConnectedRemoteId=dt.prototype.lU;dt.prototype.getReconnectTimeout=dt.prototype.cY;dt.prototype.getAutoplayMode=dt.prototype.uQ;dt.prototype.getAutoplayVideoId=dt.prototype.TL;dt.prototype.reconnect=dt.prototype.YS; dt.prototype.sendMessage=dt.prototype.cmm;dt.prototype.getXsrfToken=dt.prototype.Jx;dt.prototype.isCapabilitySupportedOnConnectedDevices=dt.prototype.lr;g.z(Su7,oe);g.M=Su7.prototype;g.M.Pc=function(e){return this.R9.$_gs(e)}; g.M.contains=function(e){return!!this.R9.$_c(e)}; g.M.get=function(e){return this.R9.$_g(e)}; g.M.start=function(){this.R9.$_st()}; g.M.add=function(e,L,c){this.R9.$_a(e,L,c)}; g.M.remove=function(e,L,c){this.R9.$_r(e,L,c)}; g.M.uc=function(e,L,c,I){this.R9.$_un(e,L,c,I)}; g.M.KS=function(){for(var e=this.X.length,L=0;L1&&!this.V.getOption("remote","quickCast")?(this.Tx=g.YN(e,this.X,this),this.Ip(g.Mt(e,this.X)),e=this.V.getOption("remote","currentReceiver"),e=this.X(e),this.options[e]&&this.XC(e),this.enable(!0)):this.enable(!1)}; O2.prototype.X=function(e){return e.key}; O2.prototype.UC=function(e){return e==="cast-selector-receiver"?"Transmitir\u2026":this.Tx[e].name}; O2.prototype.GV=function(e){g.lQ.prototype.GV.call(this,e);this.V.setOption("remote","currentReceiver",this.Tx[e]);this.G_.y5()};g.z(krU,g.Vk);g.M=krU.prototype; g.M.create=function(){var e=this.player.S(),L=g.eb(e);e={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:e.Y("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:e.Y("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:e.Y("enable_cast_short_lived_lounge_token")};tlJ(L,e);this.subscriptions.push(g.Qo("yt-remote-before-disconnect",this.c7_,this));this.subscriptions.push(g.Qo("yt-remote-connection-change",this.B0e,this));this.subscriptions.push(g.Qo("yt-remote-receiver-availability-change",this.cQ, this));this.subscriptions.push(g.Qo("yt-remote-auto-connect",this.kyl,this));this.subscriptions.push(g.Qo("yt-remote-receiver-resumed",this.V6_,this));this.subscriptions.push(g.Qo("mdx-privacy-popup-confirm",this.v0Y,this));this.subscriptions.push(g.Qo("mdx-privacy-popup-cancel",this.QUe,this));this.cQ()}; g.M.load=function(){this.player.cancelPlayback();g.Vk.prototype.load.call(this);this.uE=new gv9(this.player.S(),this);this.player.lD(this.uE);this.UA=new F9e(this,this.player,this.Lf);var e=(e=vvw())?e.currentTime:0;var L=Mlh()?new y$(Bh(),void 0):null;e==0&&L&&(e=ae(Zv(L)));e!==0&&this.Ty(e);DcJ(this,this.mZ,this.mZ);this.player.gX(6)}; g.M.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.RJ();this.sD=this.U5;g.cs(this.UA,this.Lf);this.Lf=this.uE=this.UA=null;g.Vk.prototype.unload.call(this);this.player.gX(5);qW(this)}; g.M.KS=function(){g.dO(this.subscriptions);g.Vk.prototype.KS.call(this)}; g.M.C5=function(e){var L=g.HM.apply(1,arguments);this.loaded&&this.UA.yB.apply(this.UA,[e].concat(g.V(L)))}; g.M.getAdState=function(){return this.RF}; g.M.r9=function(){return this.Lf?Zv(this.Lf).r9:!1}; g.M.g$=function(){return this.Lf?Zv(this.Lf).g$:!1}; g.M.Ty=function(e,L){this.Dr=e||0;this.player.publish("progresssync",e,L);this.player.Kb("onVideoProgress",e||0)}; g.M.getCurrentTime=function(){return this.Dr}; g.M.getDuration=function(){return Zv(this.Lf).getDuration()||0}; g.M.sR=function(){var e=Zv(this.Lf);return e.G?e.X+V$(e):e.X}; g.M.u2=function(){return Zv(this.Lf).J}; g.M.wP=function(){return aZ7(Zv(this.Lf))}; g.M.Tw=function(){var e=Zv(this.Lf);return e.K>0?e.K+V$(e):e.K}; g.M.getProgressState=function(){var e=Zv(this.Lf),L=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!e.ZT()&&this.player.Xk(),clipEnd:L.clipEnd,clipStart:L.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.sR(),isAtLiveHead:this.isAtLiveHead(),loaded:this.u2(),seekableEnd:this.wP(),seekableStart:this.Tw(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.M.isAtLiveHead=function(){return aZ7(Zv(this.Lf))-this.getCurrentTime()<=1}; g.M.nextVideo=function(){this.Lf&&this.Lf.nextVideo()}; g.M.ID=function(){this.Lf&&this.Lf.ID()}; g.M.c7_=function(e){e===1&&(this.MN=this.Lf?Zv(this.Lf):null)}; g.M.B0e=function(){var e=Mlh()?new y$(Bh(),void 0):null;if(e){var L=this.sD;this.loaded&&this.unload();this.Lf=e;this.MN=null;L.key!==this.U5.key&&(this.sD=L,this.load())}else g.L0(this.Lf),this.Lf=null,this.loaded&&(this.unload(),(e=this.MN)&&e.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(e.videoId,ae(e)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.M.cQ=function(){var e=[this.U5],L=e.concat,c=OG7();kG()&&g.iS("yt-remote-cast-available")&&c.push({key:"cast-selector-receiver",name:"Cast..."});this.Tx=L.call(e,c);e=TiN()||this.U5;T_(this,e);this.player.Kb("onMdxReceiversChange")}; g.M.kyl=function(){var e=TiN();T_(this,e)}; g.M.V6_=function(){this.sD=TiN()}; g.M.v0Y=function(){this.El=!0;qW(this);rg=!1;xt&&S$(xt,1);xt=null}; g.M.QUe=function(){this.El=!1;qW(this);T_(this,this.U5);this.sD=this.U5;rg=!1;xt=null;this.player.playVideo()}; g.M.zY=function(e,L){switch(e){case "casting":return this.loaded;case "receivers":return this.Tx;case "currentReceiver":return L&&(L.key==="cast-selector-receiver"?JHM():T_(this,L)),this.loaded?this.sD:this.U5;case "quickCast":return this.Tx.length===2&&this.Tx[1].key==="cast-selector-receiver"?(L&&JHM(),!0):!1}}; g.M.rY=function(){this.Lf.rY()}; g.M.bC=function(){return!1}; g.M.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.M.isLoggedIn=function(){var e,L;return((e=g.Zu("PLAYER_CONFIG"))==null?void 0:(L=e.args)==null?void 0:L.authuser)!==void 0?!0:!(!g.Zu("SESSION_INDEX")&&!g.Zu("LOGGED_IN"))};g.JK("remote",krU);})(_yt_player);