(function(g){var window=this;'use strict';var Ln$=function(E){if(E instanceof g.Gv)return E;if(typeof E.vu=="function")return E.vu(!1);if(g.Ht(E)){var e=0,l=new g.Gv;l.next=function(){for(;;){if(e>=E.length)return g.oA;if(e in E)return g.Tv(E[e++]);e++}}; return l}throw Error("Not implemented");},hU$=function(E,e,l){if(g.Ht(E))g.nW(E,e,l); else for(E=Ln$(E);;){var k=E.next();if(k.done)break;e.call(l,k.value,void 0,E)}},e9=function(E){g.X4(E,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.QH()).toString(36)); return E},lb=function(E,e,l){Array.isArray(l)||(l=[String(l)]); g.Zyl(E.S,e,l)},Mm1=function(E,e){var l=[]; hU$(e,function(k){try{var H=g.Uz.prototype.G.call(this,k,!0)}catch(O){if(O=="Storage: Invalid value was encountered")return;throw O;}H===void 0?l.push(k):g.t3Z(H)&&l.push(k)},E); return l},NSs=function(E,e){Mm1(E,e).forEach(function(l){g.Uz.prototype.remove.call(this,l)},E)},ZFW=function(E){if(E.Fy){if(E.Fy.locationOverrideToken)return{locationOverrideToken:E.Fy.locationOverrideToken}; if(E.Fy.latitudeE7!=null&&E.Fy.longitudeE7!=null)return{latitudeE7:E.Fy.latitudeE7,longitudeE7:E.Fy.longitudeE7}}return null},Yck=function(E,e){g.i_(E,e)||E.push(e)},mf2=function(E){var e=0,l; for(l in E)e++;return e},gu1=function(E,e){return g.pe(E,e)},KnW=function(E){try{return g.t7.JSON.parse(E)}catch(e){}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(e){}throw Error("Invalid JSON string: "+E);},kM=function(E){if(g.t7.JSON)try{return g.t7.JSON.parse(E)}catch(e){}return KnW(E)},nuk=function(){var E=H7(); this.T=E;E.Vx("/client_streamz/youtube/living_room/mdx/channel/opened",g.EM("channel_type"))},RU0=function(){var E=H7(); this.T=E;E.Vx("/client_streamz/youtube/living_room/mdx/channel/closed",g.EM("channel_type"))},s0r=function(){var E=H7(); this.T=E;E.Vx("/client_streamz/youtube/living_room/mdx/channel/message_received",g.EM("channel_type"))},tms=function(){var E=H7(); this.T=E;E.Vx("/client_streamz/youtube/living_room/mdx/channel/success")},qcS=function(){var E=H7(); this.T=E;E.Vx("/client_streamz/youtube/living_room/mdx/channel/error",g.EM("channel_type"),g.EM("error_type"))},EqO=function(){var E=H7(); this.T=E;E.Vx("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},eFS=function(){var E=H7(); this.T=E;E.Vx("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},lD_=function(E,e,l,k){var H=new g.tZ(null); E&&g.qh(H,E);e&&g.Eg(H,e);l&&g.eX(H,l);k&&(H.G=k);return H},kTd=function(E,e){return new g.nc(E,e)},OF=function(E,e){return Object.prototype.hasOwnProperty.call(E,e)},HEH=function(E,e){return E===e},Xn=function(E,e){this.G={}; this.T=[];this.Kl=this.size=0;var l=arguments.length;if(l>1){if(l%2)throw Error("Uneven number of arguments");for(var k=0;k5&&(E=E.slice(E.length-5)); var e=g.o7(MQ6(),function(k){return k.loungeToken}),l=g.o7(E,function(k){return k.loungeToken}); g.wP(l,function(k){return!g.i_(e,k)})&&Nvk(); g.Jw("yt-remote-local-screens",E,31536E3)},od=function(E){E||(g.yC("yt-remote-session-screen-id"),g.yC("yt-remote-session-video-id")); LVO();E=W7();g.U6(E,B7());PMH(E)},YNt=function(){if(!wz){var E=g.Fy(); E&&(wz=new g.TE(E))}},mbs=function(){YNt(); return wz?!!wz.get("yt-remote-use-staging-server"):!1},zm=function(E,e){g.ZA[E]=!0; var l=g.MG();l&&l.publish.apply(l,arguments);g.ZA[E]=!1},gqt=function(){},H7=function(){if(!dz){dz=new g.bW(new gqt); var E=g.Wg("client_streamz_web_flush_count",-1);E!==-1&&(dz.Z=E)}return dz},KVH=function(){var E=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return E?parseInt(E[1],10):0},nqs=function(E){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+E)!=-1||document.currentScript.src.indexOf("&"+E)!=-1)},RFs=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},Gm=function(E){E.length?sLd(E.shift(),function(){Gm(E)}):tQ0()},qNt=function(E){return"chrome-extension://"+E+"/cast_sender.js"},sLd=function(E,e,l){var k=document.createElement("script"); k.onerror=e;l&&(k.onload=l);g.GJ(k,g.zn(E));(document.head||document.documentElement).appendChild(k)},Eps=function(){var E=KVH(),e=[]; if(E>1){var l=E-1;e.push("//www.gstatic.com/eureka/clank/"+E+"/cast_sender.js");e.push("//www.gstatic.com/eureka/clank/"+l+"/cast_sender.js")}return e},tQ0=function(){var E=RFs(); E&&E(!1,"No cast extension found")},lZ0=function(){if(elH){var E=2,e=RFs(),l=function(){E--; E==0&&e&&e(!0)}; window.__onGCastApiAvailable=l;sLd("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",tQ0,l)}},kC_=function(){lZ0(); var E=Eps();E.push("//www.gstatic.com/eureka/clank/cast_sender.js");Gm(E)},OZH=function(){lZ0(); var E=Eps();E.push.apply(E,g.Be(HZO.map(qNt)));E.push("//www.gstatic.com/eureka/clank/cast_sender.js");Gm(E)},Tm=function(E,e,l){g.a.call(this); this.J=l!=null?(0,g.CW)(E,l):E;this.zf=e;this.W=(0,g.CW)(this.J$,this);this.T=!1;this.G=0;this.Z=this.tN=null;this.S=[]},ib=function(){},XKG=function(){g.MT.call(this,"p")},ugs=function(){g.MT.call(this,"o")},CGd=function(){return AwS=AwS||new g.CU},pKr=function(E){g.MT.call(this,"serverreachability",E)},$M=function(E){var e=CGd(); e.dispatchEvent(new pKr(e,E))},xzr=function(E){g.MT.call(this,"statevent",E)},UF=function(E){var e=CGd(); e.dispatchEvent(new xzr(e,E))},QC$=function(E,e,l,k){g.MT.call(this,"timingevent",E); this.size=e;this.rtt=l;this.retries=k},Jh=function(E,e){if(typeof E!=="function")throw Error("Fn must not be null and must be a function"); return g.t7.setTimeout(function(){E()},e)},c7=function(){},yA=function(E,e,l,k){this.Z=E; this.S=e;this.Wh=l;this.jE=k||1;this.rH=new g.xN(this);this.ND=45E3;this.c5=null;this.J=!1;this.V=this.gH=this.N=this.J0=this.SR=this.Yt=this.pg=null;this.kt=[];this.T=null;this.j=0;this.W=this.Qd=null;this.dC=-1;this.fg=!1;this.b3=0;this.R4=null;this.GX=this.jR=this.In=this.h0=!1;this.G=new WWr},WWr=function(){this.G=null; this.T="";this.Z=!1},opS=function(E,e,l){E.J0=1; E.N=e9(e.clone());E.V=l;E.h0=!0;BOr(E,null)},BOr=function(E,e){E.SR=Date.now(); j9(E);E.gH=E.N.clone();lb(E.gH,"t",E.jE);E.j=0;var l=E.Z.J0;E.G=new WWr;E.T=wKH(E.Z,l?e:null,!E.V);E.b3>0&&(E.R4=new g.gN((0,g.CW)(E.B6,E,E.T),E.b3));E.rH.listen(E.T,"readystatechange",E.LH);e=E.c5?g.o$(E.c5):{};E.V?(E.Qd||(E.Qd="POST"),e["Content-Type"]="application/x-www-form-urlencoded",E.T.send(E.gH,E.Qd,E.V,e)):(E.Qd="GET",E.T.send(E.gH,E.Qd,null,e));$M(1)},dz0=function(E){if(!zlr(E))return g.mv(E.T); var e=g.gm(E.T);if(e==="")return"";var l="",k=e.length,H=g.ZQ(E.T)==4;if(!E.G.G){if(typeof TextDecoder==="undefined")return Id(E),Fn(E),"";E.G.G=new g.t7.TextDecoder}for(var O=0;Oe.length)return GCG;e=e.slice(k,k+l);E.j=k+l;return e},j9=function(E){E.Yt=Date.now()+E.ND; $zG(E,E.ND)},$zG=function(E,e){if(E.pg!=null)throw Error("WatchDog timer not null"); E.pg=Jh((0,g.CW)(E.Wk,E),e)},Uz_=function(E){E.pg&&(g.t7.clearTimeout(E.pg),E.pg=null)},Fn=function(E){E.Z.Du()||E.fg||Jw$(E.Z,E)},Id=function(E){Uz_(E); g.qE(E.R4);E.R4=null;E.rH.removeAll();if(E.T){var e=E.T;E.T=null;e.abort();e.dispose()}},S7H=function(E,e){try{var l=E.Z; if(l.Pf!=0&&(l.T==E||cwt(l.G,E)))if(!E.jR&&cwt(l.G,E)&&l.Pf==3){try{var k=l.Fr.T.parse(e)}catch(U){k=null}if(Array.isArray(k)&&k.length==3){var H=k;if(H[0]==0)a:{if(!l.N){if(l.T)if(l.T.SR+3E30&&(l.b3=1.5*A);k=l;var C=E.iX();if(C){var p=g.KU(C,"X-Client-Wire-Protocol");if(p){var x=k.G;!x.T&&(g.fe(p,"spdy")||g.fe(p,"quic")||g.fe(p,"h2"))&&(x.S=x.W,x.T=new Set,x.G&&(IZd(x,x.G),x.G=null))}if(k.h0){var Q=g.KU(C,"X-HTTP-Session-Id");Q&&(k.je=Q,g.X4(k.c5,k.h0,Q))}}l.Pf=3;l.W&&l.W.ML();l.C7&&(l.iN=Date.now()-E.SR);k=l;var W=E;k.yf=FWt(k,k.J0?k.jE:null,k.Wh);if(W.jR){fZd(k.G, W);var B=W,w=k.b3;w&&B.setTimeout(w);B.pg&&(Uz_(B),j9(B));k.T=W}else Vt$(k);l.Z.length>0&&rz(l)}else O[0]!="stop"&&O[0]!="close"||S9(l,7);else l.Pf==3&&(O[0]=="stop"||O[0]=="close"?O[0]=="stop"?S9(l,7):l.disconnect():O[0]!="noop"&&l.W&&l.W.gk(O),l.kt=0)}$M(4)}catch(U){}},rw1=function(E,e){this.T=E; this.map=e;this.context=null},Dzk=function(E){this.W=E||10; g.t7.PerformanceNavigationTiming?(E=g.t7.performance.getEntriesByType("navigation"),E=E.length>0&&(E[0].nextHopProtocol=="hq"||E[0].nextHopProtocol=="h2")):E=!!(g.t7.chrome&&g.t7.chrome.loadTimes&&g.t7.chrome.loadTimes()&&g.t7.chrome.loadTimes().wasFetchedViaSpdy);this.S=E?this.W:1;this.T=null;this.S>1&&(this.T=new Set);this.G=null;this.Z=[]},bZ6=function(E){return E.G?!0:E.T?E.T.size>=E.S:!1},jCO=function(E){return E.G?1:E.T?E.T.size:0},cwt=function(E,e){return E.G?E.G==e:E.T?E.T.has(e):!1},IZd= function(E,e){E.T?E.T.add(e):E.G=e},fZd=function(E,e){E.G&&E.G==e?E.G=null:E.T&&E.T.has(e)&&E.T.delete(e)},vpH=function(E){if(E.G!=null)return E.Z.concat(E.G.kt); if(E.T!=null&&E.T.size!==0){var e=E.Z;E=g.T(E.T.values());for(var l=E.next();!l.done;l=E.next())e=e.concat(l.value.kt);return e}return g.fW(E.Z)},PG_=function(E,e){var l=new c7; if(g.t7.Image){var k=new Image;k.onload=g.pW(DV,l,"TestLoadImage: loaded",!0,e,k);k.onerror=g.pW(DV,l,"TestLoadImage: error",!1,e,k);k.onabort=g.pW(DV,l,"TestLoadImage: abort",!1,e,k);k.ontimeout=g.pW(DV,l,"TestLoadImage: timeout",!1,e,k);g.t7.setTimeout(function(){if(k.ontimeout)k.ontimeout()},1E4); k.src=E}else e(!1)},aZ_=function(E,e){var l=new c7,k=new AbortController,H=setTimeout(function(){k.abort(); DV(l,"TestPingServer: timeout",!1,e)},1E4); fetch(E,{signal:k.signal}).then(function(O){clearTimeout(H);O.ok?DV(l,"TestPingServer: ok",!0,e):DV(l,"TestPingServer: server error",!1,e)}).catch(function(){clearTimeout(H); DV(l,"TestPingServer: error",!1,e)})},DV=function(E,e,l,k,H){try{H&&(H.onload=null,H.onerror=null,H.onabort=null,H.ontimeout=null),k(l)}catch(O){}},LWG=function(){this.T=new ib},bb=function(E,e,l){return l&&l.SD?l.SD[E]||e:e},hl0=function(E){this.Z=[]; this.jE=this.yf=this.c5=this.Wh=this.T=this.je=this.h0=this.fg=this.j=this.dC=this.V=null;this.CD=this.gH=0;this.lk=bb("failFast",!1,E);this.jR=this.pg=this.N=this.J=this.W=null;this.bY=!0;this.dO=this.R4=-1;this.GX=this.kt=this.SR=0;this.AS=bb("baseRetryDelayMs",5E3,E);this.UJ=bb("retryDelaySeedMs",1E4,E);this.f0=bb("forwardChannelMaxRetries",2,E);this.MM=bb("forwardChannelRequestTimeoutMs",2E4,E);this.Fy=E&&E.J9z||void 0;this.W7=E&&E.xy4||void 0;this.YU=E&&E.st3||!1;this.b3=void 0;this.J0=E&&E.iDn|| !1;this.S="";this.G=new Dzk(E&&E.PRz);this.Fr=new LWG;this.rH=E&&E.QU5||!1;this.Yt=E&&E.ku3||!1;this.rH&&this.Yt&&(this.Yt=!1);this.JS=E&&E.OF4||!1;E&&E.cLD&&(this.bY=!1);this.C7=!this.rH&&this.bY&&E&&E.YM3||!1;this.qM=void 0;E&&E.T3&&E.T3>0&&(this.qM=E.T3);this.hN=void 0;this.iN=0;this.ND=!1;this.In=this.Qd=null},VA=function(E){E.T&&(Mtk(E),E.T.cancel(),E.T=null)},NOG=function(E){VA(E); E.N&&(g.t7.clearTimeout(E.N),E.N=null);fu(E);E.G.cancel();E.J&&(typeof E.J==="number"&&g.t7.clearTimeout(E.J),E.J=null)},rz=function(E){bZ6(E.G)||E.J||(E.J=!0,g.Gy(E.bf,E),E.SR=0)},Y7$=function(E,e){if(jCO(E.G)>=E.G.S-(E.J?1:0))return!1; if(E.J)return E.Z=e.kt.concat(E.Z),!0;if(E.Pf==1||E.Pf==2||E.SR>=(E.lk?0:E.f0))return!1;E.J=Jh((0,g.CW)(E.bf,E,e),ZZr(E,E.SR));E.SR++;return!0},gp6=function(E,e){var l; e?l=e.Wh:l=E.gH++;var k=E.c5.clone();g.X4(k,"SID",E.S);g.X4(k,"RID",l);g.X4(k,"AID",E.R4);v7(E,k);E.j&&E.V&&g.pc(k,E.j,E.V);l=new yA(E,E.S,l,E.SR+1);E.j===null&&(l.c5=E.V);e&&(E.Z=e.kt.concat(E.Z));e=mzd(E,l,1E3);l.setTimeout(Math.round(E.MM*.5)+Math.round(E.MM*.5*Math.random()));IZd(E.G,l);opS(l,k,e)},v7=function(E,e){E.fg&&g.t0(E.fg,function(l,k){g.X4(e,k,l)}); E.W&&g.t0({},function(l,k){g.X4(e,k,l)})},mzd=function(E,e,l){l=Math.min(E.Z.length,l); var k=E.W?(0,g.CW)(E.W.q6,E.W,E):null;a:{for(var H=E.Z,O=-1;;){var X=["count="+l];O==-1?l>0?(O=H[0].T,X.push("ofs="+O)):O=0:X.push("ofs="+O);for(var A=!0,C=0;C=3)return!1; E.GX++;E.N=Jh((0,g.CW)(E.OO,E),ZZr(E,E.kt));E.kt++;return!0},Mtk=function(E){E.Qd!=null&&(g.t7.clearTimeout(E.Qd),E.Qd=null)},KWS=function(E){E.T=new yA(E,E.S,"rpc",E.GX); E.j===null&&(E.T.c5=E.V);E.T.b3=0;var e=E.yf.clone();g.X4(e,"RID","rpc");g.X4(e,"SID",E.S);g.X4(e,"AID",E.R4);g.X4(e,"CI",E.jR?"0":"1");!E.jR&&E.qM&&g.X4(e,"TO",E.qM);g.X4(e,"TYPE","xmlhttp");v7(E,e);E.j&&E.V&&g.pc(e,E.j,E.V);E.b3&&E.T.setTimeout(E.b3);var l=E.T;E=E.jE;l.J0=1;l.N=e9(e.clone());l.V=null;l.h0=!0;BOr(l,E)},fu=function(E){E.pg!=null&&(g.t7.clearTimeout(E.pg),E.pg=null)},Jw$=function(E,e){var l=null; if(E.T==e){fu(E);Mtk(E);E.T=null;var k=2}else if(cwt(E.G,e))l=e.kt,fZd(E.G,e),k=1;else return;if(E.Pf!=0)if(e.J)if(k==1){l=e.V?e.V.length:0;e=Date.now()-e.SR;var H=E.SR;k=CGd();k.dispatchEvent(new QC$(k,l,e,H));rz(E)}else Vt$(E);else{var O=e.dC;H=e.getLastError();if(H==3||H==0&&O>0||!(k==1&&Y7$(E,e)||k==2&&yw2(E)))switch(l&&l.length>0&&(e=E.G,e.Z=e.Z.concat(l)),H){case 1:S9(E,5);break;case 4:S9(E,10);break;case 3:S9(E,6);break;default:S9(E,2)}}},ZZr=function(E,e){var l=E.AS+Math.floor(Math.random()* E.UJ); E.isActive()||(l*=2);return l*e},S9=function(E,e){if(e==2){var l=(0,g.CW)(E.luM,E),k=E.W7,H=!k; k=new g.tZ(k||"//www.google.com/images/cleardot.gif");g.t7.location&&g.t7.location.protocol=="http"||g.qh(k,"https");e9(k);H?PG_(k.toString(),l):aZ_(k.toString(),l)}else UF(2);E.Pf=0;E.W&&E.W.Rd(e);npG(E);NOG(E)},npG=function(E){E.Pf=0; E.In=[];if(E.W){var e=vpH(E.G);if(e.length!=0||E.Z.length!=0)g.VH(E.In,e),g.VH(E.In,E.Z),E.G.Z.length=0,g.fW(E.Z),E.Z.length=0;E.W.CE()}},Rl0=function(E){if(E.Pf==0)return E.In; var e=[];g.VH(e,vpH(E.G));g.VH(e,E.Z);return e},FWt=function(E,e,l){var k=g.uF(l); k.T!=""?(e&&g.Eg(k,e+"."+k.T),g.eX(k,k.Z)):(k=g.t7.location,k=lD_(k.protocol,e?e+"."+k.hostname:k.hostname,+k.port,l));e=E.h0;l=E.je;e&&l&&g.X4(k,e,l);g.X4(k,"VER",E.t7);v7(E,k);return k},wKH=function(E,e,l){if(e&&!E.J0)throw Error("Can't create secondary domain capable XhrIo object."); e=E.YU&&!E.Fy?new g.ho(new g.Kz({wq:l})):new g.ho(E.Fy);e.j=E.J0;return e},sCO=function(){},tt6=function(){},ad=function(E,e){g.CU.call(this); this.T=new hl0(e);this.W=E;this.G=e&&e.Gz6||null;E=e&&e.THM||null;e&&e.MCz&&(E?E["X-Client-Protocol"]="webchannel":E={"X-Client-Protocol":"webchannel"});this.T.V=E;E=e&&e.bhM||null;e&&e.uh&&(E?E["X-WebChannel-Content-Type"]=e.uh:E={"X-WebChannel-Content-Type":e.uh});e&&e.QG&&(E?E["X-WebChannel-Client-Profile"]=e.QG:E={"X-WebChannel-Client-Profile":e.QG});this.T.dC=E;(E=e&&e.aN5)&&!g.FF(E)&&(this.T.j=E);this.J=e&&e.iDn||!1;this.S=e&&e.P6n||!1;(e=e&&e.mx)&&!g.FF(e)&&(this.T.h0=e,g.Ce(this.G,e)&&(E= this.G,e in E&&delete E[e]));this.Z=new P7(this)},q7d=function(E){XKG.call(this); E.__headers__&&(this.headers=E.__headers__,this.statusCode=E.__status__,delete E.__headers__,delete E.__status__);var e=E.__sm__;e?this.data=(this.T=g.lK(e))?g.Wj(e,this.T):e:this.data=E},EI6=function(E){ugs.call(this); this.status=1;this.errorCode=E},P7=function(E){this.T=E},ej6=function(E,e){this.G=E; this.T=e},lBr=function(E){return Rl0(E.T).map(function(e){var l=E.G; e=e.map;"__data__"in e?(e=e.__data__,l=l.S?KnW(e):e):l=e;return l})},Lu=function(E,e){if(typeof E!=="function")throw Error("Fn must not be null and must be a function"); return g.t7.setTimeout(function(){E()},e)},MB=function(E){hh.dispatchEvent(new k0H(hh,E))},k0H=function(E){g.MT.call(this,"statevent",E)},NB=function(E,e,l,k){this.T=E; this.S=e;this.j=l;this.J=k||1;this.G=45E3;this.Z=new g.xN(this);this.W=new g.S2;this.W.setInterval(250)},OAH=function(E,e,l){E.v2=1; E.J4=e9(e.clone());E.wV=l;E.h0=!0;HAW(E,null)},XZ_=function(E,e,l,k,H){E.v2=1; E.J4=e9(e.clone());E.wV=null;E.h0=l;H&&(E.UQ=!1);HAW(E,k)},HAW=function(E,e){E.jz=Date.now(); upG(E);E.KZ=E.J4.clone();lb(E.KZ,"t",E.J);E.VC=0;E.Xz=E.T.Ta(E.T.ez()?e:null);E.kG>0&&(E.Yy=new g.gN((0,g.CW)(E.P6,E,E.Xz),E.kG));E.Z.listen(E.Xz,"readystatechange",E.t$);e=E.nS?g.o$(E.nS):{};E.wV?(E.rE="POST",e["Content-Type"]="application/x-www-form-urlencoded",E.Xz.send(E.KZ,E.rE,E.wV,e)):(E.rE="GET",E.UQ&&!g.AV&&(e.Connection="close"),E.Xz.send(E.KZ,E.rE,null,e));E.T.Bg(1)},pZ6=function(E,e){var l=E.VC,k=e.indexOf("\n",l); if(k==-1)return Aks;l=Number(e.substring(l,k));if(isNaN(l))return CEs;k+=1;if(k+l>e.length)return Aks;e=e.slice(k,k+l);E.VC=k+l;return e},upG=function(E){E.wA=Date.now()+E.G; x1S(E,E.G)},x1S=function(E,e){if(E.lL!=null)throw Error("WatchDog timer not null"); E.lL=Lu((0,g.CW)(E.Bk,E),e)},Qa_=function(E){E.lL&&(g.t7.clearTimeout(E.lL),E.lL=null)},Wzd=function(E){E.T.Du()||E.WF||E.T.Zi(E)},ZV=function(E){Qa_(E); g.qE(E.Yy);E.Yy=null;E.W.stop();E.Z.removeAll();if(E.Xz){var e=E.Xz;E.Xz=null;e.abort();e.dispose()}E.jj&&(E.jj=null)},BEd=function(E,e){try{E.T.NL(E,e),E.T.Bg(4)}catch(l){}},wZ1=function(E,e,l,k,H){if(k==0)l(!1); else{var O=H||0;k--;oI_(E,e,function(X){X?l(!0):g.t7.setTimeout(function(){wZ1(E,e,l,k,O)},O)})}},oI_=function(E,e,l){var k=new Image; k.onload=function(){try{YM(k),l(!0)}catch(H){}}; k.onerror=function(){try{YM(k),l(!1)}catch(H){}}; k.onabort=function(){try{YM(k),l(!1)}catch(H){}}; k.ontimeout=function(){try{YM(k),l(!1)}catch(H){}}; g.t7.setTimeout(function(){if(k.ontimeout)k.ontimeout()},e); k.src=E},YM=function(E){E.onload=null; E.onerror=null;E.onabort=null;E.ontimeout=null},zjk=function(E){this.T=E; this.G=new ib},d1G=function(E){var e=mL(E.T,E.o8,"/mail/images/cleardot.gif"); e9(e);wZ1(e.toString(),5E3,(0,g.CW)(E.Fk,E),3,2E3);E.Bg(1)},G0H=function(E){var e=E.T.J; e!=null?(MB(5),e?(MB(11),gz(E.T,E,!1)):(MB(12),gz(E.T,E,!0))):(E.df=new NB(E),E.df.nS=E.Ga,e=E.T,e=mL(e,e.ez()?E.E$:null,E.Sh),MB(5),lb(e,"TYPE","xmlhttp"),XZ_(E.df,e,!1,E.E$,!1))},TEG=function(E,e,l){this.T=1; this.G=[];this.Z=[];this.W=new ib;this.V=E||null;this.J=e!=null?e:null;this.N=l||!1},iA6=function(E,e){this.T=E; this.map=e;this.context=null},$11=function(E,e,l,k){g.MT.call(this,"timingevent",E); this.size=e;this.rtt=l;this.retries=k},U1$=function(E){g.MT.call(this,"serverreachability",E)},ckH=function(E){E.Oi(1,0); E.di=mL(E,null,E.Fo);Jk1(E)},ykr=function(E){E.Ny&&(E.Ny.abort(),E.Ny=null); E.dB&&(E.dB.cancel(),E.dB=null);E.N2&&(g.t7.clearTimeout(E.N2),E.N2=null);Ku(E);E.TT&&(E.TT.cancel(),E.TT=null);E.Jt&&(g.t7.clearTimeout(E.Jt),E.Jt=null)},jak=function(E,e){if(E.T==0)throw Error("Invalid operation: sending map when state is closed"); E.G.push(new iA6(E.aN++,e));E.T!=2&&E.T!=3||Jk1(E)},IB$=function(E){var e=0; E.dB&&e++;E.TT&&e++;return e},Jk1=function(E){E.TT||E.Jt||(E.Jt=Lu((0,g.CW)(E.KE,E),0),E.UW=0)},Vid=function(E,e){if(E.T==1){if(!e){E.BF=Math.floor(Math.random()*1E5); e=E.BF++;var l=new NB(E,"",e);l.nS=E.Hu;var k=Fzr(E),H=E.di.clone();g.X4(H,"RID",e);g.X4(H,"CVER","1");nu(E,H);OAH(l,H,k);E.TT=l;E.T=2}}else E.T==3&&(e?fBS(E,e):E.G.length==0||E.TT||fBS(E))},fBS=function(E,e){if(e)if(E.TE>6){E.G=E.Z.concat(E.G); E.Z.length=0;var l=E.BF-1;e=Fzr(E)}else l=e.j,e=e.wV;else l=E.BF++,e=Fzr(E);var k=E.di.clone();g.X4(k,"SID",E.S);g.X4(k,"RID",l);g.X4(k,"AID",E.J5);nu(E,k);l=new NB(E,E.S,l,E.UW+1);l.nS=E.Hu;l.setTimeout(1E4+Math.round(1E4*Math.random()));E.TT=l;OAH(l,k,e)},nu=function(E,e){E.NR&&(E=E.NR.dZ())&&g.t0(E,function(l,k){g.X4(e,k,l)})},Fzr=function(E){var e=Math.min(E.G.length,1E3),l=["count="+e]; if(E.TE>6&&e>0){var k=E.G[0].T;l.push("ofs="+k)}else k=0;for(var H={},O=0;O=3)return!1; E.j++;E.N2=Lu((0,g.CW)(E.Dn,E),rkH(E,E.fB));E.fB++;return!0},gz=function(E,e,l){E.gN=E.J==null?l:!E.J; E.kZ=e.Pd;E.N||ckH(E)},Ku=function(E){E.GE!=null&&(g.t7.clearTimeout(E.GE),E.GE=null)},rkH=function(E,e){var l=5E3+Math.floor(Math.random()*1E4); E.isActive()||(l*=2);return l*e},Rd=function(E,e){if(e==2||e==9){var l=null; E.NR&&(l=null);var k=(0,g.CW)(E.A2H,E);l||(l=new g.tZ("//www.google.com/images/cleardot.gif"),e9(l));oI_(l.toString(),1E4,k)}else MB(2);bA1(E,e)},bA1=function(E,e){E.T=0; E.NR&&E.NR.v6(e);vId(E);ykr(E)},vId=function(E){E.T=0; E.kZ=-1;if(E.NR)if(E.Z.length==0&&E.G.length==0)E.NR.xG();else{var e=g.fW(E.Z),l=g.fW(E.G);E.Z.length=0;E.G.length=0;E.NR.xG(e,l)}},mL=function(E,e,l){var k=g.uF(l); if(k.T!="")e&&g.Eg(k,e+"."+k.T),g.eX(k,k.Z);else{var H=window.location;k=lD_(H.protocol,e?e+"."+H.hostname:H.hostname,+H.port,l)}E.qh&&g.t0(E.qh,function(O,X){g.X4(k,X,O)}); g.X4(k,"VER",E.TE);nu(E,k);return k},PEW=function(){},aB2=function(){this.T=[]; this.G=[]},Lz$=function(E){g.MT.call(this,"channelMessage"); this.message=E},hjW=function(E){g.MT.call(this,"channelError"); this.error=E},Mi$=function(E,e){this.action=E; this.params=e||{}},sF=function(E,e){g.a.call(this); this.T=new g.Nx(this.TO7,0,this);g.L(this,this.T);this.zf=5E3;this.G=0;if(typeof E==="function")e&&(E=(0,g.CW)(E,e));else if(E&&typeof E.handleEvent==="function")E=(0,g.CW)(E.handleEvent,E);else throw Error("Invalid listener argument");this.Z=E},NEr=function(E,e,l,k,H,O,X,A,C,p,x,Q,W,B){l=l===void 0?!1:l; k=k===void 0?function(){return""}:k; H=H===void 0?!1:H;O=O===void 0?!1:O;X=X===void 0?!1:X;A=A===void 0?function(){return g.j2({})}:A; C=C===void 0?!1:C;x=x===void 0?!1:x;Q=Q===void 0?!1:Q;W=W===void 0?!1:W;B=B===void 0?!1:B;this.J0=E;this.pg=e;this.J=new g.GE;this.G=new sF(this.JSH,this);this.T=null;this.j=!1;this.V=null;this.SR="";this.kt=this.N=0;this.Z=[];this.GX=l;this.h0=k;this.W=O;this.c5=A;this.fg=p;this.jE=X;this.Qd=null;this.S=g.j2();this.Wh=H;this.In=C;this.rH=x;this.Yt=Q;this.bY=W;this.dC=B;this.b3=new nuk;this.jR=new RU0;this.ND=new tms;this.gH=new s0r;this.R4=new qcS;this.C7=new EqO;this.hN=new eFS},m1S=function(E, e,l,k,H){ZAO(E); if(E.T){var O=g.LF("ID_TOKEN"),X=E.T.Hu||{};O?X["x-youtube-identity-token"]=O:delete X["x-youtube-identity-token"];E.T.Hu=X}Y0S(E);k?(k.getState()!=3&&IB$(k)==0||k.getState(),E.T.connect(e,l,E.pg,k.S,k.J5)):H?E.T.connect(e,l,E.pg,H.sessionId,H.arrayId):E.T.connect(e,l,E.pg)},RjS=function(E,e){return E.bY?!0:E.Yt?Object.values(gIG).includes(e):E.rH?!Object.values(Kz1).includes(e):E.dC?Object.values(nIS).includes(e):!1},q0d=function(E){var e,l; g.D(function(k){if(k.G==1)return g.J7(k,2),g.S(k,sa0(E),2);g.r8(k);e=E.Z;E.Z=[];l=e.length;ti2(E,e,l);th(E);return g.bX(k,0)})},ti2=function(E,e,l){for(var k=0;k0?l=Object.assign({},l,e):delete l.Authorization;E.T.Hu=l}},Y0S=function(E){E.fg&&!E.W&&eJO(E,E.fg())},qB=function(E){this.scheme="https"; this.port=this.domain="";this.T="/api/lounge";this.G=!0;E=E||document.location.href;var e=Number(g.Xw(E)[4]||null)||"";e&&(this.port=":"+e);this.domain=g.uy(E)||"";E=g.vj();E.search("MSIE")>=0&&(E=E.match(/MSIE ([\d.]+)/)[1],g.bK(E,"10.0")<0&&(this.G=!1))},E8=function(E,e){var l=E.T; E.G&&(l=E.scheme+"://"+E.domain+E.port+E.T);return g.BJ(l+e,{})},lAW=function(E,e){g.CU.call(this); var l=this;this.K5=E();this.K5.subscribe("handlerOpened",this.yj,this);this.K5.subscribe("handlerClosed",this.onClosed,this);this.K5.subscribe("handlerError",function(k,H){l.onError(H)}); this.K5.subscribe("handlerMessage",this.onMessage,this);this.T=e},k10=function(E,e,l){var k=this; l=l===void 0?function(){return""}:l; var H=H===void 0?new tt6:H;var O=O===void 0?new g.GE:O;this.pathPrefix=E;this.T=e;this.SR=l;this.W=O;this.N=null;this.V=this.j=0;this.channel=null;this.J=0;this.Z=new sF(function(){k.Z.isActive();var X;((X=k.channel)==null?void 0:jCO((new ej6(X,X.T)).T.G))===0&&k.connect(k.N,k.j)}); this.S={};this.G={};this.pg=!1;this.logger=null;this.kt=[];this.Uc=void 0;this.c5=new nuk;this.Qd=new RU0;this.fg=new s0r;this.h0=new qcS},Ha_=function(E){g.Rt(E.channel,"m",function(){E.J=3; E.Z.reset();E.N=null;E.j=0;for(var e=g.T(E.kt),l=e.next();!l.done;l=e.next())l=l.value,E.channel&&E.channel.send(l);E.kt=[];E.publish("webChannelOpened");E.c5.eH("WEB_CHANNEL")}); g.Rt(E.channel,"n",function(){E.J=0;E.Z.isActive()||E.publish("webChannelClosed");var e,l=(e=E.channel)==null?void 0:lBr(new ej6(e,e.T));l&&(E.kt=[].concat(g.Be(l)));E.Qd.eH("WEB_CHANNEL")}); g.Rt(E.channel,"p",function(e){var l=e.data;l[0]==="gracefulReconnect"?(E.Z.start(),E.channel&&E.channel.close()):E.publish("webChannelMessage",new Mi$(l[0],l[1]));E.Uc=e.statusCode;E.fg.eH("WEB_CHANNEL")}); g.Rt(E.channel,"o",function(){E.Uc===401||E.Z.start();E.publish("webChannelError");E.h0.eH("WEB_CHANNEL","")})},OaW=function(E){var e=E.SR(); e?E.S["x-youtube-lounge-xsrf-token"]=e:delete E.S["x-youtube-lounge-xsrf-token"]},XN0=function(E){g.CU.call(this); this.T=E();this.T.subscribe("webChannelOpened",this.CH,this);this.T.subscribe("webChannelClosed",this.onClosed,this);this.T.subscribe("webChannelError",this.onError,this);this.T.subscribe("webChannelMessage",this.onMessage,this)},uPr=function(E,e,l,k,H){function O(){return new NEr(E8(E,"/bc"),e,!1,l,k)} l=l===void 0?function(){return""}:l; return g.QT("enable_mdx_web_channel_desktop")?new XN0(function(){return new k10(E8(E,"/wc"),e,l)}):new lAW(O,H)},xGH=function(){var E=AxS; Crd();eU.push(E);pNW()},lh=function(E,e){Crd(); var l=QrO(E,String(e));eU.length==0?WQk(l):(pNW(),g.nW(eU,function(k){k(l)}))},kB=function(E){lh("CP",E)},Crd=function(){eU||(eU=g.eS("yt.mdx.remote.debug.handlers_")||[],g.qW("yt.mdx.remote.debug.handlers_",eU))},WQk=function(E){var e=(HX+1)%50; HX=e;O8[e]=E;X3||(X3=e==49)},pNW=function(){var E=eU; if(O8[0]){var e=X3?HX:-1,l={};do l={rU:void 0},e=(e+1)%50,l.rU=O8[e],g.nW(E,function(k){return function(H){H(k.rU)}}(l)); while(e!=HX);O8=Array(50);HX=-1;X3=!1}},QrO=function(E,e){var l=(Date.now()-BdW)/1E3; l.toFixed&&(l=l.toFixed(3));var k=[];k.push("[",l+"s","] ");k.push("[","yt.mdx.remote","] ");k.push(E+": "+e,"\n");return k.join("")},uh=function(E){g.sJ.call(this); this.J=E;this.screens=[]},oPH=function(E,e){var l=E.get(e.uuid)||E.get(e.id); if(l)return E=l.name,l.id=e.id||l.id,l.name=e.name,l.token=e.token,l.uuid=e.uuid||l.uuid,l.name!=E;E.screens.push(e);return!0},wNG=function(E,e){var l=E.screens.length!=e.length; E.screens=g.JE(E.screens,function(O){return!!DbH(e,O)}); for(var k=e.length,H=0;H0&&E.S0&&TK(E,l)},function(e){E.W=function(){}; E.qd(e)})},mGt=function(E){var e={}; e.pairingCode=E.Qd;e.theme=E.J0;mbs()&&(e.env_useStageMdx=1);return g.WJ(e)},gP_=function(E){return new Promise(function(e){E.Qd=SN_(); if(E.c5){var l=new chrome.cast.DialLaunchResponse(!0,mGt(E));e(l);YQH(E)}else E.pg=function(){g.CE(E.V);E.pg=function(){}; E.V=NaN;var k=new chrome.cast.DialLaunchResponse(!0,mGt(E));e(k);YQH(E)},E.V=g.uM(function(){E.pg()},100)})},nPS=function(E,e,l){E.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(e)); var k=new Cu(e);return(new Promise(function(H){KQG(E,k,function(O){O?(E.kt=!0,WX(E.S,k),oT(E,k),TK(E,l)):g.Nf(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(e)+" is not online."));H(O)},5)})).then(function(H){return H?new chrome.cast.DialLaunchResponse(!1):gP_(E)})},RJ1=function(E,e){var l=E.N.receiver.label,k=E.G.friendlyName; return(new Promise(function(H){IAO(E.S,l,e,k,function(O){O&&O.token&&oT(E,O);H(O)},function(O){wy(E,"Failed to get DIAL screen: "+O); H(null)})})).then(function(H){return H&&H.token?new chrome.cast.DialLaunchResponse(!1):gP_(E)})},KQG=function(E,e,l,k){g.CE(E.J); E.J=0;fAW(E.S,e,function(H){H||k<0?l(H):E.J=g.uM(function(){KQG(E,e,l,k-1)},300)})},TK=function(E,e){E.info("getDialAppInfoWithTimeout_ "+e); GK(E)&&(g.CE(E.j),E.j=0,e==0?srG(E):E.j=g.uM(function(){srG(E)},e))},srG=function(E){GK(E)&&E.Z.getDialAppInfo(function(e){E.info("getDialAppInfo dialLaunchData: "+JSON.stringify(e)); e=e.extraData||{};var l=null;if(e.loungeToken){var k;((k=E.T)==null?void 0:k.token)==e.loungeToken&&(l="staleLoungeToken")}else l="missingLoungeToken";l?(E.SR=l,TK(E,3E4)):(E.kt=!1,E.SR="unknown",DG2(E,e.loungeToken),TK(E,e.loungeTokenRefreshIntervalMs))},function(e){E.info("getDialAppInfo error: "+e); E.SR="noLoungeTokenResponse";TK(E,3E4)})},tA1=function(E){g.CE(E.J); E.J=0;g.CE(E.j);E.j=0;E.W();E.W=function(){}; g.CE(E.V)},ih=function(E,e){BX.call(this,E,e,"ManualSession"); this.Z=g.uM((0,g.CW)(this.Ap,this,null),150)},$B=function(E,e){g.sJ.call(this); this.config_=e;this.G=E;this.N=e.appId||"233637DE";this.S=e.theme||"cl";this.V=e.disableCastApi||!1;this.J=e.forceMirroring||!1;this.T=null;this.j=!1;this.Z=[];this.W=(0,g.CW)(this.fx6,this)},qQH=function(E,e){return e?g.Gd(E.Z,function(l){return pu(e,l.label)},E):null},U8=function(E){lh("Controller",E)},AxS=function(E){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(E)},J6=function(E){return E.j||!!E.Z.length||!!E.T},cX=function(E,e,l){e!=E.T&&(g.qE(E.T),(E.T=e)?(l?E.publish("yt-remote-cast2-receiver-resumed", e.G):E.publish("yt-remote-cast2-receiver-selected",e.G),e.subscribe("sessionScreen",(0,g.CW)(E.uv,E,e)),e.subscribe("sessionFailed",function(){return ETH(E,e)}),e.T?E.publish("yt-remote-cast2-session-change",e.T):l&&E.T.Ap(null)):E.publish("yt-remote-cast2-session-change",null))},ETH=function(E,e){E.T==e&&E.publish("yt-remote-cast2-session-failed")},eqk=function(E){var e=E.G.IP(),l=E.T&&E.T.G; E=g.o7(e,function(k){l&&pu(k,l.label)&&(l=null);var H=k.uuid?k.uuid:k.id,O=qQH(this,k);O?(O.label=H,O.friendlyName=k.name):(O=new chrome.cast.Receiver(H,k.name),O.receiverType=chrome.cast.ReceiverType.CUSTOM);return O},E); l&&(l.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(l=new chrome.cast.Receiver(l.label,l.friendlyName),l.receiverType=chrome.cast.ReceiverType.CUSTOM),E.push(l));return E},A$$=function(E,e,l,k){k.disableCastApi?ys("Cannot initialize because disabled by Mdx config."):lEd()?ki6(e,k)&&(H2r(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?O2W(E,l):(window.__onGCastApiAvailable=function(H,O){H?O2W(E,l):(jU("Failed to load cast API: "+O),XAs(!1),H2r(!1),g.yC("yt-remote-cast-available"),g.yC("yt-remote-cast-receiver"), uE6(),l(!1))},k.loadCastApiSetupScript?g.qG("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?KVH()>=60&&kC_():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?tQ0():KVH()>=89?OZH():(lZ0(),Gm(HZO.map(qNt))))):ys("Cannot initialize because not running Chrome")},uE6=function(){ys("dispose"); var E=IT();E&&E.dispose();g.qW("yt.mdx.remote.cloudview.instance_",null);CP6(!1);g.gd(pAW);pAW.length=0},F3=function(){return!!g.cK("yt-remote-cast-installed")},xvS=function(){var E=g.cK("yt-remote-cast-receiver"); return E?E.friendlyName:null},Qfk=function(){ys("clearCurrentReceiver"); g.yC("yt-remote-cast-receiver")},WMt=function(){return F3()?IT()?IT().getCastSession():(jU("getCastSelector: Cast is not initialized."),null):(jU("getCastSelector: Cast API is not installed!"),null)},Bgr=function(){F3()?IT()?fO()?(ys("Requesting cast selector."),IT().requestSession()):(ys("Wait for cast API to be ready to request the session."),pAW.push(g.mQ("yt-remote-cast2-api-ready",Bgr))):jU("requestCastSelector: Cast is not initialized."):jU("requestCastSelector: Cast API is not installed!")}, Vs=function(E,e){fO()?IT().setConnectedScreenStatus(E,e):jU("setConnectedScreenStatus called before ready.")},lEd=function(){var E=g.vj().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.oW||E},oTH=function(E,e){IT().init(E,e)},ki6=function(E,e){var l=!1; IT()||(E=new $B(E,e),E.subscribe("yt-remote-cast2-availability-change",function(k){g.Jw("yt-remote-cast-available",k);zm("yt-remote-cast2-availability-change",k)}),E.subscribe("yt-remote-cast2-receiver-selected",function(k){ys("onReceiverSelected: "+k.friendlyName); g.Jw("yt-remote-cast-receiver",k);zm("yt-remote-cast2-receiver-selected",k)}),E.subscribe("yt-remote-cast2-receiver-resumed",function(k){ys("onReceiverResumed: "+k.friendlyName); g.Jw("yt-remote-cast-receiver",k);zm("yt-remote-cast2-receiver-resumed",k)}),E.subscribe("yt-remote-cast2-session-change",function(k){ys("onSessionChange: "+xM(k)); k||g.yC("yt-remote-cast-receiver");zm("yt-remote-cast2-session-change",k)}),g.qW("yt.mdx.remote.cloudview.instance_",E),l=!0); ys("cloudview.createSingleton_: "+l);return l},IT=function(){return g.eS("yt.mdx.remote.cloudview.instance_")},O2W=function(E,e){XAs(!0); H2r(!1);oTH(E,function(l){l?(CP6(!0),g.tx("yt-remote-cast2-api-ready")):(jU("Failed to initialize cast API."),XAs(!1),g.yC("yt-remote-cast-available"),g.yC("yt-remote-cast-receiver"),uE6());e(l)})},ys=function(E){lh("cloudview",E)},jU=function(E){lh("cloudview",E)},XAs=function(E){ys("setCastInstalled_ "+E); g.Jw("yt-remote-cast-installed",E)},fO=function(){return!!g.eS("yt.mdx.remote.cloudview.apiReady_")},CP6=function(E){ys("setApiReady_ "+E); g.qW("yt.mdx.remote.cloudview.apiReady_",E)},H2r=function(E){g.qW("yt.mdx.remote.cloudview.initializing_",E)},SU=function(E){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.W=this.J=0;this.trackData=null;this.sP=this.bR=!1;this.N=this.Z=this.j=this.G=0;this.T=NaN;this.S=!1;this.reset(E)},wA$=function(E){E.audioTrackId=null; E.trackData=null;E.playerState=-1;E.bR=!1;E.sP=!1;E.J=0;E.W=g.QH();E.G=0;E.j=0;E.Z=0;E.N=0;E.T=NaN;E.S=!1},ry=function(E){return E.isPlaying()?(g.QH()-E.W)/1E3:0},DH=function(E,e){E.J=e; E.W=g.QH()},bh=function(E){switch(E.playerState){case 1:case 1081:return(g.QH()-E.W)/1E3+E.J; case -1E3:return 0}return E.J},zq6=function(E){return E.S?E.j+ry(E):E.j},vX=function(E,e,l){var k=E.videoId; E.videoId=e;E.index=l;e!=k&&wA$(E)},dv$=function(E){var e={}; e.index=E.index;e.listId=E.listId;e.videoId=E.videoId;e.playerState=E.playerState;e.volume=E.volume;e.muted=E.muted;e.audioTrackId=E.audioTrackId;e.trackData=g.wb(E.trackData);e.hasPrevious=E.bR;e.hasNext=E.sP;e.playerTime=E.J;e.playerTimeAt=E.W;e.seekableStart=E.G;e.seekableEnd=E.j;e.duration=E.Z;e.loadedTime=E.N;e.liveIngestionTime=E.T;return e},aT=function(E,e){g.sJ.call(this); var l=this;this.Z=0;this.S=E;this.J=[];this.W=new aB2;this.G=this.T=null;this.V=(0,g.CW)(this.RMz,this);this.j=(0,g.CW)(this.aL,this);this.N=(0,g.CW)(this.C3H,this);this.pg=(0,g.CW)(this.MRg,this);var k=0;E?(k=E.getProxyState(),k!=3&&(E.subscribe("proxyStateChange",this.N8,this),Gis(this))):k=3;k!=0&&(e?this.N8(k):g.uM(function(){l.N8(k)},0)); (E=WMt())&&PX(this,E);this.subscribe("yt-remote-cast2-session-change",this.pg)},LO=function(E){return new SU(E.S.getPlayerContextData())},Gis=function(E){g.nW("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(e){this.J.push(this.S.subscribe(e,g.pW(this.cNz,e),this))},E)},Tg0=function(E){g.nW(E.J,function(e){this.S.unsubscribeByKey(e)},E); E.J.length=0},h6=function(E){return E.getState()==1},Ma=function(E,e){var l=E.W; l.T.length+l.G.length<50&&E.W.enqueue(e)},i2O=function(E,e,l){var k=LO(E); DH(k,l);k.playerState!=-1E3&&(k.playerState=e);Na(E,k)},ZH=function(E,e,l){E.S.sendMessage(e,l)},Na=function(E,e){Tg0(E); E.S.setPlayerContextData(dv$(e));Gis(E)},PX=function(E,e){E.G&&(E.G.removeUpdateListener(E.V),E.G.removeMediaListener(E.j),E.aL(null)); E.G=e;E.G&&(kB("Setting cast session: "+E.G.sessionId),E.G.addUpdateListener(E.V),E.G.addMediaListener(E.j),E.G.media.length&&E.aL(E.G.media[0]))},$vk=function(E){var e=E.T.media,l=E.T.customData; if(e&&l){var k=LO(E);e.contentId!=k.videoId&&kB("Cast changing video to: "+e.contentId);k.videoId=e.contentId;k.playerState=l.playerState;DH(k,E.T.getEstimatedTime());Na(E,k)}else kB("No cast media video. Ignoring state update.")},YB=function(E,e,l){return(0,g.CW)(function(k){this.nD("Failed to "+e+" with cast v2 channel. Error code: "+k.code); k.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.nD("Retrying "+e+" using MDx browser channel."),ZH(this,e,l))},E)},KO=function(E,e,l,k){k=k===void 0?!1:k; g.sJ.call(this);var H=this;this.J=NaN;this.Qd=!1;this.V=this.N=this.kt=this.SR=NaN;this.pg=[];this.W=this.j=this.S=this.T=this.G=null;this.c5=E;this.fg=k;this.pg.push(g.BK(window,"beforeunload",function(){H.wx(2)})); this.Z=[];this.T=new SU;this.J0=e.id;this.h0=e.idType;this.G=uPr(this.c5,l,this.So,this.h0=="shortLived",this.J0);this.G.listen("channelOpened",function(){UvG(H)}); this.G.listen("channelClosed",function(){mm("Channel closed");isNaN(H.J)?od(!0):od();H.dispose()}); this.G.listen("channelError",function(O){od();isNaN(H.UT())?(O==1&&H.h0=="shortLived"&&H.publish("browserChannelAuthError",O),mm("Channel error: "+O+" without reconnection"),H.dispose()):(H.Qd=!0,mm("Channel error: "+O+" with reconnection in "+H.UT()+" ms"),gy(H,2))}); this.G.listen("channelMessage",function(O){J$S(H,O)}); this.G.Tr(e.token);this.subscribe("remoteQueueChange",function(){var O=H.T.videoId;g.jt()&&g.Jw("yt-remote-session-video-id",O)})},c$W=function(E){return g.Gd(E.Z,function(e){return e.type=="LOUNGE_SCREEN"})},mm=function(E){lh("conn",E)},gy=function(E,e){E.publish("proxyStateChange",e)},y$H=function(E){E.J=g.uM(function(){mm("Connecting timeout"); E.wx(1)},2E4)},jf6=function(E){g.CE(E.J); E.J=NaN},IEs=function(E){g.CE(E.SR); E.SR=NaN},fE2=function(E){FM6(E); E.kt=g.uM(function(){nO(E,"getNowPlaying")},2E4)},FM6=function(E){g.CE(E.kt); E.kt=NaN},UvG=function(E){mm("Channel opened"); E.Qd&&(E.Qd=!1,IEs(E),E.SR=g.uM(function(){mm("Timing out waiting for a screen.");E.wx(1)},15E3))},Sx$=function(E,e){var l=null; if(e){var k=c$W(E);k&&(l={clientName:k.clientName,deviceMake:k.brand,deviceModel:k.model,osVersion:k.osVersion})}g.qW("yt.mdx.remote.remoteClient_",l);e&&(jf6(E),IEs(E));l=E.G.eB()&&isNaN(E.J);e==l?e&&(gy(E,1),nO(E,"getSubtitlesTrack")):e?(E.W4()&&E.T.reset(),gy(E,1),nO(E,"getNowPlaying"),VNt(E)):E.wx(1)},r$_=function(E,e){var l=e.params.videoId; delete e.params.videoId;l==E.T.videoId&&(g.QI(e.params)?E.T.trackData=null:E.T.trackData=e.params,E.publish("remotePlayerChange"))},Dv0=function(E,e,l){var k=e.params.videoId||e.params.video_id,H=parseInt(e.params.currentIndex,10); E.T.listId=e.params.listId||E.T.listId;vX(E.T,k,H);E.publish("remoteQueueChange",l)},vTt=function(E,e){e.params=e.params||{}; Dv0(E,e,"NOW_PLAYING_MAY_CHANGE");b20(E,e);E.publish("autoplayDismissed")},b20=function(E,e){var l=parseInt(e.params.currentTime||e.params.current_time,10); DH(E.T,isNaN(l)?0:l);l=parseInt(e.params.state,10);l=isNaN(l)?-1:l;l==-1&&E.T.playerState==-1E3&&(l=-1E3);E.T.playerState=l;l=Number(e.params.loadedTime);E.T.N=isNaN(l)?0:l;E.T.qO(Number(e.params.duration));l=E.T;var k=Number(e.params.liveIngestionTime);l.T=k;l.S=isNaN(k)?!1:!0;l=E.T;k=Number(e.params.seekableStartTime);e=Number(e.params.seekableEndTime);l.G=isNaN(k)?0:k;l.j=isNaN(e)?0:e;E.T.playerState==1?fE2(E):FM6(E);E.publish("remotePlayerChange")},PPk=function(E,e){if(E.T.playerState!=-1E3){var l= 1085; switch(parseInt(e.params.adState,10)){case 1:l=1081;break;case 2:l=1084;break;case 0:l=1083}E.T.playerState=l;e=parseInt(e.params.currentTime,10);DH(E.T,isNaN(e)?0:e);E.publish("remotePlayerChange")}},aE6=function(E,e){var l=e.params.muted=="true"; E.T.volume=parseInt(e.params.volume,10);E.T.muted=l;E.publish("remotePlayerChange")},LM6=function(E,e){E.j=e.params.videoId; E.publish("nowAutoplaying",parseInt(e.params.timeout,10))},hqO=function(E,e){E.j=e.params.videoId||null; E.publish("autoplayUpNext",E.j)},MN$=function(E,e){E.W=e.params.autoplayMode; E.publish("autoplayModeChange",E.W);E.W=="DISABLED"&&E.publish("autoplayDismissed")},Ng6=function(E,e){var l=e.params.hasNext=="true"; E.T.bR=e.params.hasPrevious=="true";E.T.sP=l;E.publish("previousNextChange")},J$S=function(E,e){e=e.message; e.params?mm("Received: action="+e.action+", params="+g.Pq(e.params)):mm("Received: action="+e.action+" {}");switch(e.action){case "loungeStatus":e=kM(e.params.devices);E.Z=g.o7(e,function(k){return new Ah(k)}); e=!!g.Gd(E.Z,function(k){return k.type=="LOUNGE_SCREEN"}); Sx$(E,e);e=E.Jw("mlm");E.publish("multiStateLoopEnabled",e);break;case "loungeScreenDisconnected":g.I1(E.Z,function(k){return k.type=="LOUNGE_SCREEN"}); Sx$(E,!1);break;case "remoteConnected":var l=new Ah(kM(e.params.device));g.Gd(E.Z,function(k){return k.equals(l)})||Yck(E.Z,l); break;case "remoteDisconnected":l=new Ah(kM(e.params.device));g.I1(E.Z,function(k){return k.equals(l)}); break;case "gracefulDisconnect":break;case "playlistModified":Dv0(E,e,"QUEUE_MODIFIED");break;case "nowPlaying":vTt(E,e);break;case "onStateChange":b20(E,e);break;case "onAdStateChange":PPk(E,e);break;case "onVolumeChanged":aE6(E,e);break;case "onSubtitlesTrackChanged":r$_(E,e);break;case "nowAutoplaying":LM6(E,e);break;case "autoplayDismissed":E.publish("autoplayDismissed");break;case "autoplayUpNext":hqO(E,e);break;case "onAutoplayModeChanged":MN$(E,e);break;case "onHasPreviousNextChanged":Ng6(E, e);break;case "requestAssistedSignIn":E.publish("assistedSignInRequested",e.params.authCode);break;case "onLoopModeChanged":E.publish("loopModeChange",e.params.loopMode);break;default:mm("Unrecognized action: "+e.action)}},VNt=function(E){g.CE(E.V); E.V=g.uM(function(){E.wx(1)},864E5)},nO=function(E,e,l){l?mm("Sending: action="+e+", params="+g.Pq(l)):mm("Sending: action="+e); E.G.sendMessage(e,l)},Z26=function(E){uh.call(this,"ScreenServiceProxy"); this.XJ=E;this.T=[];this.T.push(this.XJ.$_s("screenChange",(0,g.CW)(this.KH,this)));this.T.push(this.XJ.$_s("onlineScreenChange",(0,g.CW)(this.jnH,this)))},nT6=function(E,e){YNt(); if(!wz||!wz.get("yt-remote-disable-remote-module-for-dev")){e=g.LF("MDX_CONFIG")||e;bEk();LVO();RT||(RT=new qB(e?e.loungeApiHost:void 0),mbs()&&(RT.T="/api/loungedev"));s8||(s8=g.eS("yt.mdx.remote.deferredProxies_")||[],g.qW("yt.mdx.remote.deferredProxies_",s8));Yxr();var l=t6();if(!l){var k=new Qs(RT,e?e.disableAutomaticScreenCache||!1:!1);g.qW("yt.mdx.remote.screenService_",k);l=t6();var H={};e&&(H={appId:e.appId,disableDial:e.disableDial,theme:e.theme,loadCastApiSetupScript:e.loadCastApiSetupScript, disableCastApi:e.disableCastApi,enableDialLoungeToken:e.enableDialLoungeToken,enableCastLoungeToken:e.enableCastLoungeToken,forceMirroring:e.forceMirroring});g.qW("yt.mdx.remote.enableConnectWithInitialState_",e?e.enableConnectWithInitialState||!1:!1);A$$(E,k,function(O){O?qa()&&Vs(qa(),"YouTube TV"):k.subscribe("onlineScreenChange",function(){zm("yt-remote-receiver-availability-change")})},H)}e&&!g.eS("yt.mdx.remote.initialized_")&&(g.qW("yt.mdx.remote.initialized_",!0),Ej("Initializing: "+g.Pq(e)), ee.push(g.mQ("yt-remote-cast2-api-ready",function(){zm("yt-remote-api-ready")})),ee.push(g.mQ("yt-remote-cast2-availability-change",function(){zm("yt-remote-receiver-availability-change")})),ee.push(g.mQ("yt-remote-cast2-receiver-selected",function(){ll(null); zm("yt-remote-auto-connect","cast-selector-receiver")})),ee.push(g.mQ("yt-remote-cast2-receiver-resumed",function(){zm("yt-remote-receiver-resumed","cast-selector-receiver")})),ee.push(g.mQ("yt-remote-cast2-session-change",mvH)),ee.push(g.mQ("yt-remote-connection-change",function(O){O?Vs(qa(),"YouTube TV"):kH()||(Vs(null,null),Qfk())})),ee.push(g.mQ("yt-remote-cast2-session-failed",function(){zm("yt-remote-connection-failed")})),E=gT1(),e.isAuto&&(E.id+="#dial"),H=e.capabilities||[],H.length>0&&(E.capabilities= H),E.name=e.device,E.app=e.app,(e=e.theme)&&(E.theme=e),Ej(" -- with channel params: "+g.Pq(E)),E?(g.Jw("yt-remote-session-app",E.app),g.Jw("yt-remote-session-name",E.name)):(g.yC("yt-remote-session-app"),g.yC("yt-remote-session-name")),g.qW("yt.mdx.remote.channelParams_",E),l.start(),qa()||KM6())}},RqG=function(){var E=t6().XJ.$_gos(); var e=H3();e&&Oj()&&(DbH(E,e)||E.push(e));return r2_(E)},tNH=function(){var E=sfG(); !E&&F3()&&xvS()&&(E={key:"cast-selector-receiver",name:xvS()});return E},sfG=function(){var E=RqG(),e=H3(); e||(e=kH());return g.Gd(E,function(l){return e&&pu(e,l.key)?!0:!1})},H3=function(){var E=qa(); if(!E)return null;var e=t6().Qx();return QA(e,E)},mvH=function(E){Ej("remote.onCastSessionChange_: "+xM(E)); if(E){var e=H3();if(e&&e.id==E.id){if(Vs(e.id,"YouTube TV"),E.idType=="shortLived"&&(E=E.token))XA&&(XA.token=E),(e=Oj())&&e.Tr(E)}else e&&ul(),Ay(E,1)}else Oj()&&ul()},ul=function(){fO()?IT().stopSession():jU("stopSession called before API ready."); var E=Oj();E&&(E.disconnect(1),qxO(null))},EFd=function(){var E=Oj(); return!!E&&E.getProxyState()!=3},Ej=function(E){lh("remote",E)},t6=function(){if(!ez6){var E=g.eS("yt.mdx.remote.screenService_"); ez6=E?new Z26(E):null}return ez6},qa=function(){return g.eS("yt.mdx.remote.currentScreenId_")},l_t=function(E){g.qW("yt.mdx.remote.currentScreenId_",E)},kw6=function(){return g.eS("yt.mdx.remote.connectData_")},ll=function(E){g.qW("yt.mdx.remote.connectData_",E)},Oj=function(){return g.eS("yt.mdx.remote.connection_")},qxO=function(E){var e=Oj(); ll(null);E||l_t("");g.qW("yt.mdx.remote.connection_",E);s8&&(g.nW(s8,function(l){l(E)}),s8.length=0); e&&!E?zm("yt-remote-connection-change",!1):!e&&E&&zm("yt-remote-connection-change",!0)},kH=function(){var E=g.jt(); if(!E)return null;var e=t6();if(!e)return null;e=e.Qx();return QA(e,E)},Ay=function(E,e){qa(); H3()&&H3();if(CP)XA=E;else{l_t(E.id);var l=g.eS("yt.mdx.remote.enableConnectWithInitialState_")||!1;E=new KO(RT,E,gT1(),l);E.connect(e,kw6());E.subscribe("beforeDisconnect",function(k){zm("yt-remote-before-disconnect",k)}); E.subscribe("beforeDispose",function(){Oj()&&(Oj(),qxO(null))}); E.subscribe("browserChannelAuthError",function(){var k=H3();k&&k.idType=="shortLived"&&(fO()?IT().handleBrowserChannelAuthError():jU("refreshLoungeToken called before API ready."))}); qxO(E)}},KM6=function(){var E=kH(); E?(Ej("Resume connection to: "+xM(E)),Ay(E,0)):(od(),Qfk(),Ej("Skipping connecting because no session screen found."))},Yxr=function(){var E=gT1(); if(g.QI(E)){E=B7();var e=g.cK("yt-remote-session-name")||"",l=g.cK("yt-remote-session-app")||"";E={device:"REMOTE_CONTROL",id:E,name:e,app:l,mdxVersion:3};E.authuser=String(g.LF("SESSION_INDEX","0"));(e=g.LF("DELEGATED_SESSION_ID"))&&(E.pageId=String(e));g.qW("yt.mdx.remote.channelParams_",E)}},gT1=function(){return g.eS("yt.mdx.remote.channelParams_")||{}},XQ_=function(E,e,l){g.a.call(this); var k=this;this.T=E;this.U=e;this.Db=l;this.events=new g.G_(this);this.W=!1;this.J=new g.zU(64);this.G=new g.Nx(this.r5,500,this);this.Z=new g.Nx(this.V2,1E3,this);this.N=new Tm(this.DVD,0,this);this.S={};this.V=new g.Nx(this.Vr,1E3,this);this.j=new g.gN(this.seekTo,1E3,this);this.pg=this.events.C(this.U,"onVolumeChange",function(H){Hgt(k,H)}); g.L(this,this.events);this.events.C(e,"onCaptionsTrackListChanged",this.i74);this.events.C(e,"captionschanged",this.bgD);this.events.C(e,"captionssettingschanged",this.X8);this.events.C(e,"videoplayerreset",this.VO);this.events.C(e,"mdxautoplaycancel",function(){k.Db.Ma()}); e.L("enable_mdx_video_play_directly")&&this.events.C(e,"videodatachange",function(){OgG(k.T)||pP(k)||xH(k,0)}); E=this.Db;E.U7();E.subscribe("proxyStateChange",this.Fb,this);E.subscribe("remotePlayerChange",this.gw,this);E.subscribe("remoteQueueChange",this.VO,this);E.subscribe("previousNextChange",this.GM,this);E.subscribe("nowAutoplaying",this.mD,this);E.subscribe("autoplayDismissed",this.Rp,this);g.L(this,this.G);g.L(this,this.Z);g.L(this,this.N);g.L(this,this.V);g.L(this,this.j);this.X8();this.VO();this.gw()},Hgt=function(E,e){if(pP(E)){E.Db.unsubscribe("remotePlayerChange",E.gw,E); var l=Math.round(e.volume);e=!!e.muted;var k=LO(E.Db);if(l!==k.volume||e!==k.muted)E.Db.setVolume(l,e),E.V.start();E.Db.subscribe("remotePlayerChange",E.gw,E)}},uT0=function(E){E.oz(0); E.G.stop();E.EK(new g.zU(64))},A8S=function(E,e){if(pP(E)&&!E.W){var l=null; e&&(l={style:E.U.getSubtitlesUserSettings()},Object.assign(l,e));E.Db.ZV(E.U.getVideoData(1).videoId,l);E.S=LO(E.Db).trackData}},xH=function(E,e){var l=E.U.getPlaylist(); if(l==null?0:l.listId){var k=l.index;var H=l.listId.toString()}l=E.U.getVideoData(1);E.Db.playVideo(l.videoId,e,k,H,l.playerParams,l.c5,ZFW(l));E.EK(new g.zU(1))},Co0=function(E,e){if(e){var l=E.U.getOption("captions","tracklist",{hw:1}); l&&l.length?(E.U.setOption("captions","track",e),E.W=!1):(E.U.loadModule("captions"),E.W=!0)}else E.U.setOption("captions","track",{})},pP=function(E){return LO(E.Db).videoId===E.U.getVideoData(1).videoId},pQH=function(E,e){g.qe.call(this,E); this.T=e},Q3=function(){g.Z.call(this,{X:"div", B:"ytp-mdx-popup-dialog",D:{role:"dialog"},K:[{X:"div",B:"ytp-mdx-popup-dialog-inner-content",K:[{X:"div",B:"ytp-mdx-popup-title",Tz:"Voc\u00ea n\u00e3o fez login"},{X:"div",B:"ytp-mdx-popup-description",Tz:"Os v\u00eddeos que voc\u00ea assistir poder\u00e3o ser adicionados ao hist\u00f3rico de visualiza\u00e7\u00e3o da TV e influenciar\u00e3o as recomenda\u00e7\u00f5es dela. Para evitar isso, cancele e fa\u00e7a login no YouTube em um computador."},{X:"div",B:"ytp-mdx-privacy-popup-buttons",K:[{X:"button", s7:["ytp-button","ytp-mdx-privacy-popup-cancel"],Tz:"Cancelar"},{X:"button",s7:["ytp-button","ytp-mdx-privacy-popup-confirm"],Tz:"Confirmar"}]}]}]});this.fade=new g.mO(this,250);this.cancelButton=this.X6("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.X6("ytp-mdx-privacy-popup-confirm");g.L(this,this.fade);this.C(this.cancelButton,"click",this.T);this.C(this.confirmButton,"click",this.G)},W3=function(E){g.Z.call(this,{X:"div", B:"ytp-remote",K:[{X:"div",B:"ytp-remote-display-status",K:[{X:"div",B:"ytp-remote-display-status-icon",K:[g.opp()]},{X:"div",B:"ytp-remote-display-status-text",Tz:"{{statustext}}"}]}]});this.api=E;this.fade=new g.mO(this,250);g.L(this,this.fade);this.C(E,"presentingplayerstatechange",this.onStateChange);this.eJ(E.getPlayerStateObject())},B3=function(E,e){g.M_.call(this,"Reproduzir em",1,E,e); this.U=E;this.Q7={};this.C(E,"onMdxReceiversChange",this.S);this.C(E,"presentingplayerstatechange",this.S);this.S()},xSS=function(E){g.Fq.call(this,E); this.KF={key:SN_(),name:"Este computador"};this.rf=null;this.subscriptions=[];this.KQ=this.Db=null;this.Q7=[this.KF];this.zr=this.KF;this.bq=new g.zU(64);this.y$=0;this.Zl=-1;this.Ty=!1;this.Xx=this.wm=this.mV=null;if(!g.XG(this.player.Y())&&!g.Ik(this.player.Y())){E=this.player;var e=g.Su(E);e&&(e=e.Xm())&&(e=new B3(E,e),g.L(this,e));e=new W3(E);g.L(this,e);g.sT(E,e.element,4);this.mV=new Q3;g.L(this,this.mV);g.sT(E,this.mV.element,4);this.Ty=!!kH()}},o3=function(E){E.wm&&(E.player.removeEventListener("presentingplayerstatechange", E.wm),E.wm=null)},QO_=function(E,e,l){E.bq=l; E.player.publish("presentingplayerstatechange",new g.H2(l,e))},w9=function(E,e){if(e.key!==E.zr.key)if(e.key===E.KF.key)ul(); else if(OgG(E)&&WoO(E),E.zr=e,!E.player.Y().L("disable_mdx_connection_in_mdx_module_for_music_web")||!g.Ik(E.player.Y())){var l=E.player.getPlaylistId();var k=E.player.getVideoData(1);var H=k.videoId;if(!l&&!H||(E.player.getAppState()===2||E.player.getAppState()===1)&&E.player.Y().L("should_clear_video_data_on_player_cued_unstarted"))k=null;else{var O=E.player.getPlaylist();if(O){var X=[];for(var A=0;A2*this.size&&ub(this),!0):!1}; g.z.get=function(E,e){return OF(this.G,E)?this.G[E]:e}; g.z.set=function(E,e){OF(this.G,E)||(this.size+=1,this.T.push(E),this.Kl++);this.G[E]=e}; g.z.forEach=function(E,e){for(var l=this.LF(),k=0;k=k.T.length)return g.oA;var O=k.T[e++];return g.Tv(E?O:k.G[O])}; return H}; var A2r={iIg:"atp",YwD:"ska",F8R:"que",fBR:"mus",zng:"sus",dT3:"dsp",en0:"seq",h63:"mic",FY4:"dpa",AOM:"mlm",SZ7:"dsdtr",Bft:"ntb",Oi3:"vsp",Jdz:"scn",hnR:"rpe",wnt:"dcn",TM4:"dcp",YPM:"pas",Z_4:"drq",yO5:"opf",Ud4:"els",fGn:"isg",ap3:"svq",lBH:"mvp",QV6:"ads",miM:"stcp",Cjt:"sads",Gxg:"dloc",hY5:"dcw",ozM:"asw",uJH:"apw"},CM_={B_4:"u",al3:"cl",zmH:"k",umg:"i",VY3:"cr",Ubn:"m",gE7:"g",tK:"up"},gIG={o1:"adPlaying",AK:"onAdStateChange"},Kz1={Oz0:"nowPlaying",R63:"onStateChange",o1:"adPlaying",AK:"onAdStateChange", uG:"nowPlayingShorts",lG:"onShortsStateChange"},nIS={uG:"nowPlayingShorts",lG:"onShortsStateChange"};Ah.prototype.equals=function(E){return E?this.id==E.id:!1}; var aDS="",wz=null;g.d(gqt,g.fB);var dz,elH=nqs("loadCastFramework")||nqs("loadCastApplicationFramework"),HZO=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Bt(Tm,g.a);g.z=Tm.prototype;g.z.Ui=function(E){this.S=arguments;this.T=!1;this.tN?this.Z=g.QH()+this.zf:this.tN=g.rm(this.W,this.zf)}; g.z.stop=function(){this.tN&&(g.t7.clearTimeout(this.tN),this.tN=null);this.Z=null;this.T=!1;this.S=[]}; g.z.pause=function(){++this.G}; g.z.resume=function(){this.G&&(--this.G,!this.G&&this.T&&(this.T=!1,this.J.apply(null,this.S)))}; g.z.Gz=function(){this.stop();Tm.zg.Gz.call(this)}; g.z.J$=function(){this.tN&&(g.t7.clearTimeout(this.tN),this.tN=null);this.Z?(this.tN=g.rm(this.W,this.Z-g.QH()),this.Z=null):this.G?this.T=!0:(this.T=!1,this.J.apply(null,this.S))};ib.prototype.stringify=function(E){return g.t7.JSON.stringify(E,void 0)}; ib.prototype.parse=function(E){return g.t7.JSON.parse(E,void 0)};g.Bt(XKG,g.MT);g.Bt(ugs,g.MT);var AwS=null;g.Bt(pKr,g.MT);g.Bt(xzr,g.MT);g.Bt(QC$,g.MT);c7.prototype.debug=function(){}; c7.prototype.info=function(){}; c7.prototype.warning=function(){};var TO6={},GCG={};g.z=yA.prototype;g.z.setTimeout=function(E){this.ND=E}; g.z.LH=function(E){E=E.target;var e=this.R4;e&&g.ZQ(E)==3?e.pN():this.B6(E)}; g.z.B6=function(E){try{if(E==this.T)a:{var e=g.ZQ(this.T),l=this.T.G,k=this.T.getStatus();if(!(e<3)&&(e!=3||this.T&&(this.G.Z||g.mv(this.T)||g.gm(this.T)))){this.fg||e!=4||l==7||(l==8||k<=0?$M(3):$M(2));Uz_(this);var H=this.T.getStatus();this.dC=H;var O=dz0(this);if(this.J=H==200){if(this.In&&!this.jR){b:{if(this.T){var X=g.KU(this.T,"X-HTTP-Initial-Response");if(X&&!g.FF(X)){var A=X;break b}}A=null}if(E=A)this.jR=!0,S7H(this,E);else{this.J=!1;this.W=3;UF(12);Id(this);Fn(this);break a}}if(this.h0){E= !0;for(var C;!this.fg&&this.j0&&!this.GX&&(this.GX=!0,this.Z.nQ(this)):(Id(this),Fn(this))}else S7H(this,O);e==4&&Id(this);this.J&&!this.fg&&(e==4?Jw$(this.Z,this):(this.J=!1,j9(this)))}else g.$QX(this.T),H==400&&O.indexOf("Unknown SID")> 0?(this.W=3,UF(12)):(this.W=0,UF(13)),Id(this),Fn(this)}}}catch(p){}finally{}}; g.z.cancel=function(){this.fg=!0;Id(this)}; g.z.Wk=function(){this.pg=null;var E=Date.now();E-this.Yt>=0?(this.J0!=2&&($M(3),UF(17)),Id(this),this.W=2,Fn(this)):$zG(this,this.Yt-E)}; g.z.getLastError=function(){return this.W}; g.z.iX=function(){return this.T};Dzk.prototype.cancel=function(){this.Z=vpH(this);if(this.G)this.G.cancel(),this.G=null;else if(this.T&&this.T.size!==0){for(var E=g.T(this.T.values()),e=E.next();!e.done;e=E.next())e.value.cancel();this.T.clear()}};g.z=hl0.prototype;g.z.t7=8;g.z.Pf=1;g.z.connect=function(E,e,l,k){UF(0);this.Wh=E;this.fg=e||{};l&&k!==void 0&&(this.fg.OSID=l,this.fg.OAID=k);this.jR=this.bY;this.c5=FWt(this,null,this.Wh);rz(this)}; g.z.disconnect=function(){NOG(this);if(this.Pf==3){var E=this.gH++,e=this.c5.clone();g.X4(e,"SID",this.S);g.X4(e,"RID",E);g.X4(e,"TYPE","terminate");v7(this,e);E=new yA(this,this.S,E);E.J0=2;E.N=e9(e.clone());e=!1;if(g.t7.navigator&&g.t7.navigator.sendBeacon)try{e=g.t7.navigator.sendBeacon(E.N.toString(),"")}catch(l){}!e&&g.t7.Image&&((new Image).src=E.N,e=!0);e||(E.T=wKH(E.Z,null),E.T.send(E.N));E.SR=Date.now();j9(E)}npG(this)}; g.z.Du=function(){return this.Pf==0}; g.z.getState=function(){return this.Pf}; g.z.bf=function(E){if(this.J)if(this.J=null,this.Pf==1){if(!E){this.gH=Math.floor(Math.random()*1E5);E=this.gH++;var e=new yA(this,"",E),l=this.V;this.dC&&(l?(l=g.o$(l),g.zf(l,this.dC)):l=this.dC);this.j!==null||this.Yt||(e.c5=l,l=null);var k;if(this.rH)a:{for(var H=k=0;H4096){k=H;break a}if(k===4096||H===this.Z.length-1){k=H+1;break a}}k= 1E3}else k=1E3;k=mzd(this,e,k);H=this.c5.clone();g.X4(H,"RID",E);g.X4(H,"CVER",22);this.h0&&g.X4(H,"X-HTTP-Session-Id",this.h0);v7(this,H);l&&(this.Yt?k="headers="+g.yb(g.Yl9(l))+"&"+k:this.j&&g.pc(H,this.j,l));IZd(this.G,e);this.JS&&g.X4(H,"TYPE","init");this.rH?(g.X4(H,"$req",k),g.X4(H,"SID","null"),e.In=!0,opS(e,H,null)):opS(e,H,k);this.Pf=2}}else this.Pf==3&&(E?gp6(this,E):this.Z.length==0||bZ6(this.G)||gp6(this))}; g.z.OO=function(){this.N=null;KWS(this);if(this.C7&&!(this.ND||this.T==null||this.iN<=0)){var E=4*this.iN;this.Qd=Jh((0,g.CW)(this.aMR,this),E)}}; g.z.aMR=function(){this.Qd&&(this.Qd=null,this.jR=!1,this.ND=!0,UF(10),VA(this),KWS(this))}; g.z.nQ=function(E){this.T==E&&this.C7&&!this.ND&&(Mtk(this),this.ND=!0,UF(11))}; g.z.jx=function(){this.pg!=null&&(this.pg=null,VA(this),yw2(this),UF(19))}; g.z.luM=function(E){E?UF(2):UF(1)}; g.z.isActive=function(){return!!this.W&&this.W.isActive(this)}; g.z=sCO.prototype;g.z.ML=function(){}; g.z.gk=function(){}; g.z.Rd=function(){}; g.z.CE=function(){}; g.z.isActive=function(){return!0}; g.z.q6=function(){};g.Bt(ad,g.CU);ad.prototype.open=function(){this.T.W=this.Z;this.J&&(this.T.J0=!0);this.T.connect(this.W,this.G||void 0)}; ad.prototype.close=function(){this.T.disconnect()}; ad.prototype.send=function(E){var e=this.T;if(typeof E==="string"){var l={};l.__data__=E;E=l}else this.S&&(l={},l.__data__=g.Pq(E),E=l);e.Z.push(new rw1(e.CD++,E));e.Pf==3&&rz(e)}; ad.prototype.Gz=function(){this.T.W=null;delete this.Z;this.T.disconnect();delete this.T;ad.zg.Gz.call(this)}; g.Bt(q7d,XKG);g.Bt(EI6,ugs);g.Bt(P7,sCO);P7.prototype.ML=function(){this.T.dispatchEvent("m")}; P7.prototype.gk=function(E){this.T.dispatchEvent(new q7d(E))}; P7.prototype.Rd=function(E){this.T.dispatchEvent(new EI6(E))}; P7.prototype.CE=function(){this.T.dispatchEvent("n")};var hh=new g.CU;g.d(k0H,g.MT);g.z=NB.prototype;g.z.nS=null;g.z.UV=!1;g.z.lL=null;g.z.wA=null;g.z.jz=null;g.z.v2=null;g.z.J4=null;g.z.KZ=null;g.z.wV=null;g.z.Xz=null;g.z.VC=0;g.z.jj=null;g.z.rE=null;g.z.ke=null;g.z.Lq=-1;g.z.UQ=!0;g.z.WF=!1;g.z.kG=0;g.z.Yy=null;var CEs={},Aks={};g.z=NB.prototype;g.z.setTimeout=function(E){this.G=E}; g.z.t$=function(E){E=E.target;var e=this.Yy;e&&g.ZQ(E)==3?e.pN():this.P6(E)}; g.z.P6=function(E){try{if(E==this.Xz)a:{var e=g.ZQ(this.Xz),l=this.Xz.G,k=this.Xz.getStatus();if(g.AV&&!g.aE("420+")){if(e<4)break a}else if(e<3||e==3&&!g.mv(this.Xz))break a;this.WF||e!=4||l==7||(l==8||k<=0?this.T.Bg(3):this.T.Bg(2));Qa_(this);var H=this.Xz.getStatus();this.Lq=H;var O=g.mv(this.Xz);if(this.UV=H==200){e==4&&ZV(this);if(this.h0){for(E=!0;!this.WF&&this.VC0?(this.ke=3,MB(13)):(this.ke=0,MB(14)),ZV(this),Wzd(this)}}catch(A){}finally{}}; g.z.cancel=function(){this.WF=!0;ZV(this)}; g.z.Bk=function(){this.lL=null;var E=Date.now();E-this.wA>=0?(this.v2!=2&&this.T.Bg(3),ZV(this),this.ke=2,MB(18),Wzd(this)):x1S(this,this.wA-E)}; g.z.getLastError=function(){return this.ke};g.z=zjk.prototype;g.z.Ga=null;g.z.df=null;g.z.qt=!1;g.z.Sh=null;g.z.Nb=null;g.z.Pd=-1;g.z.E$=null;g.z.o8=null;g.z.connect=function(E){this.Sh=E;E=mL(this.T,null,this.Sh);MB(3);Date.now();var e=this.T.V;e!=null?(this.E$=e[0],(this.o8=e[1])?(this.Nb=1,d1G(this)):(this.Nb=2,G0H(this))):(lb(E,"MODE","init"),this.df=new NB(this),this.df.nS=this.Ga,XZ_(this.df,E,!1,null,!0),this.Nb=0)}; g.z.Fk=function(E){if(E)this.Nb=2,G0H(this);else{MB(4);var e=this.T;e.kZ=e.Ny.Pd;Rd(e,9)}E&&this.Bg(2)}; g.z.Ta=function(E){return this.T.Ta(E)}; g.z.abort=function(){this.df&&(this.df.cancel(),this.df=null);this.Pd=-1}; g.z.Du=function(){return!1}; g.z.NL=function(E,e){this.Pd=E.Lq;if(this.Nb==0)if(e){try{var l=this.G.parse(e)}catch(k){E=this.T;E.kZ=this.Pd;Rd(E,2);return}this.E$=l[0];this.o8=l[1]}else E=this.T,E.kZ=this.Pd,Rd(E,2);else this.Nb==2&&(this.qt?(MB(7),Date.now()):e=="11111"?(MB(6),this.qt=!0,Date.now(),this.Pd=200,this.df.cancel(),MB(12),gz(this.T,this,!0)):(MB(8),Date.now(),this.qt=!1))}; g.z.Zi=function(){this.Pd=this.df.Lq;if(this.df.UV)this.Nb==0?this.o8?(this.Nb=1,d1G(this)):(this.Nb=2,G0H(this)):this.Nb==2&&(this.qt?(MB(12),gz(this.T,this,!0)):(MB(11),gz(this.T,this,!1)));else{this.Nb==0?MB(9):this.Nb==2&&MB(10);var E=this.T;this.df.getLastError();E.kZ=this.Pd;Rd(E,2)}}; g.z.ez=function(){return this.T.ez()}; g.z.isActive=function(){return this.T.isActive()}; g.z.Bg=function(E){this.T.Bg(E)};g.z=TEG.prototype;g.z.Hu=null;g.z.qh=null;g.z.TT=null;g.z.dB=null;g.z.Fo=null;g.z.di=null;g.z.H6=null;g.z.Xo=null;g.z.BF=0;g.z.aN=0;g.z.NR=null;g.z.Jt=null;g.z.N2=null;g.z.GE=null;g.z.Ny=null;g.z.gN=null;g.z.J5=-1;g.z.zQ=-1;g.z.kZ=-1;g.z.UW=0;g.z.fB=0;g.z.TE=8;var Bw1={OK:0,s$t:2,Tf4:4,aBn:5,q_t:6,STOP:7,QP:8,srt:9,Qr6:10,o1d:11,sV5:12};g.Bt($11,g.MT);g.Bt(U1$,g.MT);g.z=TEG.prototype; g.z.connect=function(E,e,l,k,H){MB(0);this.Fo=e;this.qh=l||{};k&&H!==void 0&&(this.qh.OSID=k,this.qh.OAID=H);this.N?(Lu((0,g.CW)(this.AJ,this,E),100),ckH(this)):this.AJ(E)}; g.z.disconnect=function(){ykr(this);if(this.T==3){var E=this.BF++,e=this.di.clone();g.X4(e,"SID",this.S);g.X4(e,"RID",E);g.X4(e,"TYPE","terminate");nu(this,e);E=new NB(this,this.S,E);E.v2=2;E.J4=e9(e.clone());(new Image).src=E.J4.toString();E.jz=Date.now();upG(E)}vId(this)}; g.z.AJ=function(E){this.Ny=new zjk(this);this.Ny.Ga=this.Hu;this.Ny.G=this.W;this.Ny.connect(E)}; g.z.Du=function(){return this.T==0}; g.z.getState=function(){return this.T}; g.z.KE=function(E){this.Jt=null;Vid(this,E)}; g.z.Dn=function(){this.N2=null;this.dB=new NB(this,this.S,"rpc",this.j);this.dB.nS=this.Hu;this.dB.kG=0;var E=this.H6.clone();g.X4(E,"RID","rpc");g.X4(E,"SID",this.S);g.X4(E,"CI",this.gN?"0":"1");g.X4(E,"AID",this.J5);nu(this,E);g.X4(E,"TYPE","xmlhttp");XZ_(this.dB,E,!0,this.Xo,!1)}; g.z.NL=function(E,e){if(this.T!=0&&(this.dB==E||this.TT==E))if(this.kZ=E.Lq,this.TT==E&&this.T==3)if(this.TE>7){try{var l=this.W.parse(e)}catch(k){l=null}if(Array.isArray(l)&&l.length==3)if(E=l,E[0]==0)a:{if(!this.N2){if(this.dB)if(this.dB.jz+3E30)){if(k=e==1)this.TT||this.Jt||this.T==1||this.UW>=2?k=!1:(this.Jt=Lu((0,g.CW)(this.KE,this,E),rkH(this,this.UW)),this.UW++, k=!0);k=!(k||e==2&&D1W(this))}if(k)switch(l){case 1:Rd(this,5);break;case 4:Rd(this,10);break;case 3:Rd(this,6);break;case 7:Rd(this,12);break;default:Rd(this,2)}}}; g.z.Oi=function(E){if(!g.i_(arguments,this.T))throw Error("Unexpected channel state: "+this.T);}; g.z.A2H=function(E){E?MB(2):(MB(1),bA1(this,8))}; g.z.Ta=function(E){if(E)throw Error("Can't create secondary domain capable XhrIo object.");E=new g.ho;E.j=!1;return E}; g.z.isActive=function(){return!!this.NR&&this.NR.isActive(this)}; g.z.Bg=function(E){var e=hh;e.dispatchEvent(new U1$(e,E))}; g.z.ez=function(){return!1}; g.z=PEW.prototype;g.z.Vo=function(){}; g.z.rk=function(){}; g.z.EO=function(){}; g.z.v6=function(){}; g.z.xG=function(){}; g.z.dZ=function(){return{}}; g.z.isActive=function(){return!0};g.z=aB2.prototype;g.z.enqueue=function(E){this.G.push(E)}; g.z.isEmpty=function(){return this.T.length===0&&this.G.length===0}; g.z.clear=function(){this.T=[];this.G=[]}; g.z.contains=function(E){return g.i_(this.T,E)||g.i_(this.G,E)}; g.z.remove=function(E){var e=this.T;var l=(0,g.wtd)(e,E);l>=0?(g.$G(e,l),e=!0):e=!1;return e||g.U6(this.G,E)}; g.z.SG=function(){for(var E=[],e=this.T.length-1;e>=0;--e)E.push(this.T[e]);e=this.G.length;for(var l=0;l=oFt.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(E=oFt[this.G],this.tN=g.uM((0,g.CW)(this.MU,this),E),this.G++):this.publish("pairingFailed",Error("Server error "+E.status))}; g.z.M6=function(){this.T=null;this.publish("pairingFailed",Error("Server not responding"))}; var oFt=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Bt(CO,uh);g.z=CO.prototype;g.z.start=function(){A6(this)&&this.publish("screenChange");!g.cK("yt-remote-lounge-token-expiration")&&G12(this);g.CE(this.T);this.T=g.uM((0,g.CW)(this.start,this),1E4)}; g.z.add=function(E,e){A6(this);oPH(this,E);pO(this,!1);this.publish("screenChange");e(E);E.token||G12(this)}; g.z.remove=function(E,e){var l=A6(this);zJd(this,E)&&(pO(this,!1),l=!0);e(E);l&&this.publish("screenChange")}; g.z.C6=function(E,e,l,k){var H=A6(this),O=this.get(E.id);O?(O.name!=e&&(O.name=e,pO(this,!1),H=!0),l(E)):k(Error("no such local screen."));H&&this.publish("screenChange")}; g.z.Gz=function(){g.CE(this.T);CO.zg.Gz.call(this)}; g.z.jU=function(E){A6(this);var e=this.screens.length;E=E&&E.screens||[];for(var l=E.length,k=0;k20)break a;A=e(O,X)}O=A}H.name=O}l(WX(this,H))},this), onError:(0,g.CW)(function(H){k(Error("pairing request failed: "+H.status))},this), onTimeout:(0,g.CW)(function(){k(Error("pairing request timed out."))},this)})}; g.z.Gz=function(){g.qE(this.G);g.qE(this.T);Qs.zg.Gz.call(this)}; g.z.RM=function(){VA2(this);this.publish("screenChange");this.T.update()}; Qs.prototype.dispose=Qs.prototype.dispose;g.Bt(BX,g.sJ);g.z=BX.prototype;g.z.qd=function(E){this.U7()||(E&&(wy(this,""+E),this.publish("sessionFailed")),this.T=null,this.publish("sessionScreen",null))}; g.z.info=function(E){lh(this.h0,E)}; g.z.TP=function(){return null}; g.z.R0=function(E){var e=this.G;E?(e.displayStatus=new chrome.cast.ReceiverDisplayStatus(E,[]),e.displayStatus.showStop=!0):e.displayStatus=null;chrome.cast.setReceiverDisplayStatus(e,(0,g.CW)(function(){this.info("Updated receiver status for "+e.friendlyName+": "+E)},this),(0,g.CW)(function(){wy(this,"Failed to update receiver status for: "+e.friendlyName)},this))}; g.z.Gz=function(){this.R0("");BX.zg.Gz.call(this)};g.d(zK,BX);g.z=zK.prototype;g.z.yY=function(E){if(this.Z){if(this.Z==E)return;wy(this,"Overriding cast session with new session object");Zar(this);this.SR=!1;this.V="unknown";this.Z.removeUpdateListener(this.kt);this.Z.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Qd)}this.Z=E;this.Z.addUpdateListener(this.kt);this.Z.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.Qd);aA6(this,"getMdxSessionStatus")}; g.z.Ap=function(E){this.info("launchWithParams no-op for Cast: "+g.Pq(E))}; g.z.stop=function(){this.Z?this.Z.stop((0,g.CW)(function(){this.qd()},this),(0,g.CW)(function(){this.qd(Error("Failed to stop receiver app."))},this)):this.qd(Error("Stopping cast device without session."))}; g.z.R0=function(){}; g.z.Gz=function(){this.info("disposeInternal");Zar(this);this.Z&&(this.Z.removeUpdateListener(this.kt),this.Z.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Qd));this.Z=null;BX.prototype.Gz.call(this)}; g.z.cf4=function(E,e){if(!this.U7())if(e)if(e=kM(e),g.O6(e))switch(E=""+e.type,e=e.data||{},this.info("onYoutubeMessage_: "+E+" "+g.Pq(e)),E){case "mdxSessionStatus":ba2(this,e);break;case "loungeToken":LQG(this,e);break;default:wy(this,"Unknown youtube message: "+E)}else wy(this,"Unable to parse message.");else wy(this,"No data in message.")}; g.z.bl=function(E,e,l,k){g.CE(this.N);this.N=0;IAO(this.S,this.G.label,E,this.G.friendlyName,(0,g.CW)(function(H){H?e(H):k>=0?(wy(this,"Screen "+E+" appears to be offline. "+k+" retries left."),this.N=g.uM((0,g.CW)(this.bl,this,E,e,l,k-1),300)):l(Error("Unable to fetch screen."))},this),l)}; g.z.TP=function(){return this.Z}; g.z.N6=function(E){this.U7()||E||(wy(this,"Cast session died."),this.qd())};g.d(dy,BX);g.z=dy.prototype;g.z.yY=function(E){this.Z=E;this.Z.addUpdateListener(this.fg)}; g.z.Ap=function(E){this.c5=E;this.pg()}; g.z.stop=function(){tA1(this);this.Z?this.Z.stop((0,g.CW)(this.qd,this,null),(0,g.CW)(this.qd,this,"Failed to stop DIAL device.")):this.qd()}; g.z.Gz=function(){tA1(this);this.Z&&this.Z.removeUpdateListener(this.fg);this.Z=null;BX.prototype.Gz.call(this)}; g.z.Hk=function(E){this.U7()||E||(wy(this,"DIAL session died."),this.W(),this.W=function(){},this.qd())};g.d(ih,BX);ih.prototype.stop=function(){this.qd()}; ih.prototype.yY=function(){}; ih.prototype.Ap=function(){g.CE(this.Z);this.Z=NaN;var E=QA(this.S.Qx(),this.G.label);E?oT(this,E):this.qd(Error("No such screen"))}; ih.prototype.Gz=function(){g.CE(this.Z);this.Z=NaN;BX.prototype.Gz.call(this)};g.d($B,g.sJ);g.z=$B.prototype; g.z.init=function(E,e){chrome.cast.timeout.requestSession=3E4;var l=new chrome.cast.SessionRequest(this.N,[chrome.cast.Capability.AUDIO_OUT]);g.QT("desktop_enable_cast_connect")&&(l.androidReceiverCompatible=!0);this.V||(l.dialRequest=new chrome.cast.DialRequest("YouTube"));var k=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;E=E||this.J?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var H=(0,g.CW)(this.W6g,this);l=new chrome.cast.ApiConfig(l,(0,g.CW)(this.h6, this),H,k,E);l.customDialLaunchCallback=(0,g.CW)(this.vt4,this);chrome.cast.initialize(l,(0,g.CW)(function(){this.U7()||(chrome.cast.addReceiverActionListener(this.W),xGH(),this.G.subscribe("onlineScreenChange",(0,g.CW)(this.GP,this)),this.Z=eqk(this),chrome.cast.setCustomReceivers(this.Z,function(){},(0,g.CW)(function(O){this.nD("Failed to set initial custom receivers: "+g.Pq(O))},this)),this.publish("yt-remote-cast2-availability-change",J6(this)),e(!0))},this),(0,g.CW)(function(O){this.nD("Failed to initialize API: "+ g.Pq(O)); e(!1)},this))}; g.z.Ck3=function(E,e){U8("Setting connected screen ID: "+E+" -> "+e);if(this.T){var l=this.T.T;if(!E||l&&l.id!=E)U8("Unsetting old screen status: "+this.T.G.friendlyName),cX(this,null)}if(E&&e){if(!this.T){E=QA(this.G.Qx(),E);if(!E){U8("setConnectedScreenStatus: Unknown screen.");return}if(E.idType=="shortLived"){U8("setConnectedScreenStatus: Screen with id type to be short lived.");return}l=qQH(this,E);l||(U8("setConnectedScreenStatus: Connected receiver not custom..."),l=new chrome.cast.Receiver(E.uuid? E.uuid:E.id,E.name),l.receiverType=chrome.cast.ReceiverType.CUSTOM,this.Z.push(l),chrome.cast.setCustomReceivers(this.Z,function(){},(0,g.CW)(function(k){this.nD("Failed to set initial custom receivers: "+g.Pq(k))},this))); U8("setConnectedScreenStatus: new active receiver: "+l.friendlyName);cX(this,new ih(this.G,l),!0)}this.T.R0(e)}else U8("setConnectedScreenStatus: no screen.")}; g.z.Pk4=function(E){this.U7()?this.nD("Setting connection data on disposed cast v2"):this.T?this.T.Ap(E):this.nD("Setting connection data without a session")}; g.z.D_=function(){this.U7()?this.nD("Stopping session on disposed cast v2"):this.T?(this.T.stop(),cX(this,null)):U8("Stopping non-existing session")}; g.z.requestSession=function(){chrome.cast.requestSession((0,g.CW)(this.h6,this),(0,g.CW)(this.K66,this))}; g.z.Gz=function(){this.G.unsubscribe("onlineScreenChange",(0,g.CW)(this.GP,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.W);var E=AxS,e=g.eS("yt.mdx.remote.debug.handlers_");g.U6(e||[],E);g.qE(this.T);g.sJ.prototype.Gz.call(this)}; g.z.nD=function(E){lh("Controller",E)}; g.z.uv=function(E,e){this.T==E&&(e||cX(this,null),this.publish("yt-remote-cast2-session-change",e))}; g.z.fx6=function(E,e){if(!this.U7())if(E)switch(E.friendlyName=chrome.cast.unescape(E.friendlyName),U8("onReceiverAction_ "+E.label+" / "+E.friendlyName+"-- "+e),e){case chrome.cast.ReceiverAction.CAST:if(this.T)if(this.T.G.label!=E.label)U8("onReceiverAction_: Stopping active receiver: "+this.T.G.friendlyName),this.T.stop();else{U8("onReceiverAction_: Casting to active receiver.");this.T.T&&this.publish("yt-remote-cast2-session-change",this.T.T);break}switch(E.receiverType){case chrome.cast.ReceiverType.CUSTOM:cX(this, new ih(this.G,E));break;case chrome.cast.ReceiverType.DIAL:cX(this,new dy(this.G,E,this.S,this.config_));break;case chrome.cast.ReceiverType.CAST:cX(this,new zK(this.G,E,this.config_));break;default:this.nD("Unknown receiver type: "+E.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.T&&this.T.G.label==E.label?this.T.stop():this.nD("Stopping receiver w/o session: "+E.friendlyName)}else this.nD("onReceiverAction_ called without receiver.")}; g.z.vt4=function(E){if(this.U7())return Promise.reject(Error("disposed"));var e=E.receiver;e.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.nD("Not DIAL receiver: "+e.friendlyName),e.receiverType=chrome.cast.ReceiverType.DIAL);var l=this.T?this.T.G:null;if(!l||l.label!=e.label)return this.nD("Receiving DIAL launch request for non-clicked DIAL receiver: "+e.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(l&&l.label==e.label&&l.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.T.T)return U8("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.T.T),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.nD('Changing CAST intent from "'+l.receiverType+'" to "dial" for '+e.friendlyName);cX(this,new dy(this.G,e,this.S,this.config_))}e=this.T;e.N=E;e.N.appState==chrome.cast.DialAppState.RUNNING?(E=e.N.extraData||{},l=E.screenId||null,GK(e)&&E.loungeToken?E.loungeTokenRefreshIntervalMs?E=nPS(e,{name:e.G.friendlyName,screenId:E.screenId,loungeToken:E.loungeToken,dialId:e.N.receiver.label, screenIdType:"shortLived"},E.loungeTokenRefreshIntervalMs):(g.Nf(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(E)+".")),E=RJ1(e,l)):E=RJ1(e,l)):E=gP_(e);return E}; g.z.h6=function(E){var e=this;if(!this.U7()&&!this.J){U8("New cast session ID: "+E.sessionId);var l=E.receiver;if(l.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.T)if(l.receiverType==chrome.cast.ReceiverType.CAST)U8("Got resumed cast session before resumed mdx connection."),l.friendlyName=chrome.cast.unescape(l.friendlyName),cX(this,new zK(this.G,l,this.config_),!0);else{this.nD("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var k=this.T.G,H=QA(this.G.Qx(), k.label);H&&pu(H,l.label)&&k.receiverType!=chrome.cast.ReceiverType.CAST&&l.receiverType==chrome.cast.ReceiverType.CAST&&(U8("onSessionEstablished_: manual to cast session change "+l.friendlyName),g.qE(this.T),this.T=new zK(this.G,l,this.config_),this.T.subscribe("sessionScreen",(0,g.CW)(this.uv,this,this.T)),this.T.subscribe("sessionFailed",function(){return ETH(e,e.T)}),this.T.Ap(null)); this.T.yY(E)}}}; g.z.zJ=function(){return this.T?this.T.TP():null}; g.z.K66=function(E){this.U7()||(this.nD("Failed to estabilish a session: "+g.Pq(E)),E.code!=chrome.cast.ErrorCode.CANCEL&&cX(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.z.W6g=function(E){U8("Receiver availability updated: "+E);if(!this.U7()){var e=J6(this);this.j=E==chrome.cast.ReceiverAvailability.AVAILABLE;J6(this)!=e&&this.publish("yt-remote-cast2-availability-change",J6(this))}}; g.z.GP=function(){this.U7()||(this.Z=eqk(this),U8("Updating custom receivers: "+g.Pq(this.Z)),chrome.cast.setCustomReceivers(this.Z,function(){},(0,g.CW)(function(){this.nD("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",J6(this)))}; $B.prototype.setLaunchParams=$B.prototype.Pk4;$B.prototype.setConnectedScreenStatus=$B.prototype.Ck3;$B.prototype.stopSession=$B.prototype.D_;$B.prototype.getCastSession=$B.prototype.zJ;$B.prototype.requestSession=$B.prototype.requestSession;$B.prototype.init=$B.prototype.init;$B.prototype.dispose=$B.prototype.dispose;var pAW=[];g.z=SU.prototype; g.z.reset=function(E){this.listId="";this.index=-1;this.videoId="";wA$(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.bR=E.hasPrevious,this.sP=E.hasNext,this.J=E.playerTime,this.W=E.playerTimeAt,this.G=E.seekableStart,this.j=E.seekableEnd,this.Z=E.duration,this.N=E.loadedTime,this.T=E.liveIngestionTime,this.S= !isNaN(this.T))}; g.z.isPlaying=function(){return this.playerState==1}; g.z.isBuffering=function(){return this.playerState==3}; g.z.qO=function(E){this.Z=isNaN(E)?0:E}; g.z.getDuration=function(){return this.S?this.Z+ry(this):this.Z}; g.z.clone=function(){return new SU(dv$(this))};g.d(aT,g.sJ);g.z=aT.prototype;g.z.getState=function(){return this.Z}; g.z.ZT=function(){return this.S.getReconnectTimeout()}; g.z.bE=function(){this.S.reconnect()}; g.z.play=function(){h6(this)?(this.T?this.T.play(null,g.fl,YB(this,"play")):ZH(this,"play"),i2O(this,1,bh(LO(this))),this.publish("remotePlayerChange")):Ma(this,this.play)}; g.z.pause=function(){h6(this)?(this.T?this.T.pause(null,g.fl,YB(this,"pause")):ZH(this,"pause"),i2O(this,2,bh(LO(this))),this.publish("remotePlayerChange")):Ma(this,this.pause)}; g.z.seekTo=function(E){if(h6(this)){if(this.T){var e=LO(this),l=new chrome.cast.media.SeekRequest;l.currentTime=E;e.isPlaying()||e.isBuffering()?l.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:l.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.T.seek(l,g.fl,YB(this,"seekTo",{newTime:E}))}else ZH(this,"seekTo",{newTime:E});i2O(this,3,E);this.publish("remotePlayerChange")}else Ma(this,g.pW(this.seekTo,E))}; g.z.stop=function(){if(h6(this)){this.T?this.T.stop(null,g.fl,YB(this,"stopVideo")):ZH(this,"stopVideo");var E=LO(this);E.index=-1;E.videoId="";wA$(E);Na(this,E);this.publish("remotePlayerChange")}else Ma(this,this.stop)}; g.z.setVolume=function(E,e){if(h6(this)){var l=LO(this);if(this.G){if(l.volume!=E){var k=Math.round(E)/100;this.G.setReceiverVolumeLevel(k,(0,g.CW)(function(){kB("set receiver volume: "+k)},this),(0,g.CW)(function(){this.nD("failed to set receiver volume.")},this))}l.muted!=e&&this.G.setReceiverMuted(e,(0,g.CW)(function(){kB("set receiver muted: "+e)},this),(0,g.CW)(function(){this.nD("failed to set receiver muted.")},this))}else{var H={volume:E, muted:e};l.volume!=-1&&(H.delta=E-l.volume);ZH(this,"setVolume",H)}l.muted=e;l.volume=E;Na(this,l)}else Ma(this,g.pW(this.setVolume,E,e))}; g.z.ZV=function(E,e){if(h6(this)){var l=LO(this);E={videoId:E};e&&(l.trackData={trackName:e.name,languageCode:e.languageCode,sourceLanguageCode:e.translationLanguage?e.translationLanguage.languageCode:"",languageName:e.languageName,kind:e.kind},E.style=g.Pq(e.style),g.zf(E,l.trackData));ZH(this,"setSubtitlesTrack",E);Na(this,l)}else Ma(this,g.pW(this.ZV,E,e))}; g.z.setAudioTrack=function(E,e){h6(this)?(e=e.getLanguageInfo().getId(),ZH(this,"setAudioTrack",{videoId:E,audioTrackId:e}),E=LO(this),E.audioTrackId=e,Na(this,E)):Ma(this,g.pW(this.setAudioTrack,E,e))}; g.z.playVideo=function(E,e,l,k,H,O,X){k=k===void 0?null:k;H=H===void 0?null:H;O=O===void 0?null:O;X=X===void 0?null:X;var A=LO(this),C={videoId:E};l!==void 0&&(C.currentIndex=l);vX(A,E,l||0);e!==void 0&&(DH(A,e),C.currentTime=e);k&&(C.listId=k);H&&(C.playerParams=H);O&&(C.clickTrackingParams=O);X&&(C.locationInfo=g.Pq(X));ZH(this,"setPlaylist",C);k||Na(this,A)}; g.z.Ai=function(E,e){if(h6(this)){if(E&&e){var l=LO(this);vX(l,E,e);Na(this,l)}ZH(this,"previous")}else Ma(this,g.pW(this.Ai,E,e))}; g.z.nextVideo=function(E,e){if(h6(this)){if(E&&e){var l=LO(this);vX(l,E,e);Na(this,l)}ZH(this,"next")}else Ma(this,g.pW(this.nextVideo,E,e))}; g.z.Jv=function(){if(h6(this)){ZH(this,"clearPlaylist");var E=LO(this);E.reset();Na(this,E);this.publish("remotePlayerChange")}else Ma(this,this.Jv)}; g.z.Ma=function(){h6(this)?ZH(this,"dismissAutoplay"):Ma(this,this.Ma)}; g.z.dispose=function(){if(this.Z!=3){var E=this.Z;this.Z=3;this.publish("proxyStateChange",E,this.Z)}g.sJ.prototype.dispose.call(this)}; g.z.Gz=function(){Tg0(this);this.S=null;this.W.clear();PX(this,null);g.sJ.prototype.Gz.call(this)}; g.z.N8=function(E){if((E!=this.Z||E==2)&&this.Z!=3&&E!=0){var e=this.Z;this.Z=E;this.publish("proxyStateChange",e,E);if(E==1)for(;!this.W.isEmpty();)e=E=this.W,e.T.length===0&&(e.T=e.G,e.T.reverse(),e.G=[]),E.T.pop().apply(this);else E==3&&this.dispose()}}; g.z.cNz=function(E,e){this.publish(E,e)}; g.z.RMz=function(E){if(!E)this.aL(null),PX(this,null);else if(this.G.receiver.volume){E=this.G.receiver.volume;var e=LO(this),l=Math.round(100*E.level||0);if(e.volume!=l||e.muted!=E.muted)kB("Cast volume update: "+E.level+(E.muted?" muted":"")),e.volume=l,e.muted=!!E.muted,Na(this,e)}}; g.z.aL=function(E){kB("Cast media: "+!!E);this.T&&this.T.removeUpdateListener(this.N);if(this.T=E)this.T.addUpdateListener(this.N),$vk(this),this.publish("remotePlayerChange")}; g.z.C3H=function(E){E?($vk(this),this.publish("remotePlayerChange")):this.aL(null)}; g.z.Aq=function(){ZH(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.z.MRg=function(){var E=WMt();E&&PX(this,E)}; g.z.nD=function(E){lh("CP",E)};g.d(KO,g.sJ);g.z=KO.prototype; g.z.connect=function(E,e){if(e){var l=e.listId,k=e.videoId,H=e.videoIds,O=e.playerParams,X=e.clickTrackingParams,A=e.index,C={videoId:k},p=e.currentTime,x=e.locationInfo;e=e.loopMode;p!==void 0&&(C.currentTime=p<=5?0:p);O&&(C.playerParams=O);x&&(C.locationInfo=x);X&&(C.clickTrackingParams=X);l&&(C.listId=l);H&&H.length>0&&(C.videoIds=H.join(","));A!==void 0&&(C.currentIndex=A);this.fg&&(C.loopMode=e||"LOOP_MODE_OFF");l&&(this.T.listId=l);this.T.videoId=k;this.T.index=A||0;this.T.state=3;DH(this.T, p);this.W="UNSUPPORTED";l=this.fg?"setInitialState":"setPlaylist";mm("Connecting with "+l+" and params: "+g.Pq(C));this.G.connect({method:l,params:g.Pq(C)},E,hFH())}else mm("Connecting without params"),this.G.connect({},E,hFH());y$H(this)}; g.z.Tr=function(E){this.G.Tr(E)}; g.z.dispose=function(){this.U7()||(g.qW("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),gy(this,3));g.sJ.prototype.dispose.call(this)}; g.z.Gz=function(){jf6(this);FM6(this);IEs(this);g.CE(this.N);this.N=NaN;g.CE(this.V);this.V=NaN;this.S=null;g.oC(this.pg);this.pg.length=0;this.G.dispose();g.sJ.prototype.Gz.call(this);this.W=this.j=this.Z=this.T=this.G=null}; g.z.Jw=function(E){if(!this.Z||this.Z.length===0)return!1;for(var e=g.T(this.Z),l=e.next();!l.done;l=e.next())if(!l.value.capabilities.has(E))return!1;return!0}; g.z.GZ=function(){var E=3;this.U7()||(E=0,isNaN(this.UT())?this.G.eB()&&isNaN(this.J)&&(E=1):E=2);return E}; g.z.wx=function(E){mm("Disconnecting with "+E);g.qW("yt.mdx.remote.remoteClient_",null);jf6(this);this.publish("beforeDisconnect",E);E==1&&od();this.G.disconnect(E);this.dispose()}; g.z.m2=function(){var E=this.T;this.S&&(E=this.T.clone(),vX(E,this.S,E.index));return dv$(E)}; g.z.zh0=function(E){var e=this,l=new SU(E);l.videoId&&l.videoId!=this.T.videoId&&(this.S=l.videoId,g.CE(this.N),this.N=g.uM(function(){if(e.S){var H=e.S;e.S=null;e.T.videoId!=H&&nO(e,"getNowPlaying")}},5E3)); var k=[];this.T.listId==l.listId&&this.T.videoId==l.videoId&&this.T.index==l.index||k.push("remoteQueueChange");this.T.playerState==l.playerState&&this.T.volume==l.volume&&this.T.muted==l.muted&&bh(this.T)==bh(l)&&g.Pq(this.T.trackData)==g.Pq(l.trackData)||k.push("remotePlayerChange");this.T.reset(E);g.nW(k,function(H){this.publish(H)},this)}; g.z.W4=function(){var E=this.G.getDeviceId(),e=g.Gd(this.Z,function(l){return l.type=="REMOTE_CONTROL"&&l.id!=E}); return e?e.id:""}; g.z.UT=function(){return this.G.ZT()}; g.z.g6=function(){return this.W||"UNSUPPORTED"}; g.z.M_=function(){return this.j||""}; g.z.Y9=function(){!isNaN(this.UT())&&this.G.bE()}; g.z.O00=function(E,e){nO(this,E,e);VNt(this)}; g.z.So=function(){var E=g.IL("SAPISID","")||g.IL("__Secure-1PAPISID")||"",e=g.IL("__Secure-3PAPISID","")||"";if(!E&&!e)return"";E=g.Jz(g.Uf(E),2);e=g.Jz(g.Uf(e),2);return g.Jz(g.Uf(","+E+","+e),2)}; KO.prototype.subscribe=KO.prototype.subscribe;KO.prototype.unsubscribeByKey=KO.prototype.MR;KO.prototype.getProxyState=KO.prototype.GZ;KO.prototype.disconnect=KO.prototype.wx;KO.prototype.getPlayerContextData=KO.prototype.m2;KO.prototype.setPlayerContextData=KO.prototype.zh0;KO.prototype.getOtherConnectedRemoteId=KO.prototype.W4;KO.prototype.getReconnectTimeout=KO.prototype.UT;KO.prototype.getAutoplayMode=KO.prototype.g6;KO.prototype.getAutoplayVideoId=KO.prototype.M_;KO.prototype.reconnect=KO.prototype.Y9; KO.prototype.sendMessage=KO.prototype.O00;KO.prototype.getXsrfToken=KO.prototype.So;KO.prototype.isCapabilitySupportedOnConnectedDevices=KO.prototype.Jw;g.d(Z26,uh);g.z=Z26.prototype;g.z.Qx=function(E){return this.XJ.$_gs(E)}; g.z.contains=function(E){return!!this.XJ.$_c(E)}; g.z.get=function(E){return this.XJ.$_g(E)}; g.z.start=function(){this.XJ.$_st()}; g.z.add=function(E,e,l){this.XJ.$_a(E,e,l)}; g.z.remove=function(E,e,l){this.XJ.$_r(E,e,l)}; g.z.C6=function(E,e,l,k){this.XJ.$_un(E,e,l,k)}; g.z.Gz=function(){for(var E=this.T.length,e=0;e1&&!this.U.getOption("remote","quickCast")?(this.Q7=g.R1(E,this.T,this),this.nz(g.o7(E,this.T)),E=this.U.getOption("remote","currentReceiver"),E=this.T(E),this.options[E]&&this.zS(E),this.enable(!0)):this.enable(!1)}; B3.prototype.T=function(E){return E.key}; B3.prototype.pz=function(E){return E==="cast-selector-receiver"?"Elenco...":this.Q7[E].name}; B3.prototype.IV=function(E){g.M_.prototype.IV.call(this,E);this.U.setOption("remote","currentReceiver",this.Q7[E]);this.wC.uY()};g.d(xSS,g.Fq);g.z=xSS.prototype; g.z.create=function(){var E=this.player.Y(),e=g.OV(E);E={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:E.L("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:E.L("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:E.L("enable_cast_short_lived_lounge_token")};nT6(e,E);this.subscriptions.push(g.mQ("yt-remote-before-disconnect",this.Ogt,this));this.subscriptions.push(g.mQ("yt-remote-connection-change",this.L6M,this));this.subscriptions.push(g.mQ("yt-remote-receiver-availability-change",this.Xb, this));this.subscriptions.push(g.mQ("yt-remote-auto-connect",this.JN3,this));this.subscriptions.push(g.mQ("yt-remote-receiver-resumed",this.UM7,this));this.subscriptions.push(g.mQ("mdx-privacy-popup-confirm",this.vUM,this));this.subscriptions.push(g.mQ("mdx-privacy-popup-cancel",this.KU4,this));this.Xb()}; g.z.load=function(){this.player.cancelPlayback();g.Fq.prototype.load.call(this);this.Xx=new pQH(this.player.Y(),this);this.player.Y0(this.Xx);this.rf=new XQ_(this,this.player,this.Db);var E=(E=kw6())?E.currentTime:0;var e=EFd()?new aT(Oj(),void 0):null;E==0&&e&&(E=bh(LO(e)));E!==0&&this.oz(E);QO_(this,this.bq,this.bq);this.player.uI(6)}; g.z.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.U2();this.zr=this.KF;g.Eo(this.rf,this.Db);this.Db=this.Xx=this.rf=null;g.Fq.prototype.unload.call(this);this.player.uI(5);o3(this)}; g.z.Gz=function(){g.gd(this.subscriptions);g.Fq.prototype.Gz.call(this)}; g.z.aA=function(E){var e=g.LS.apply(1,arguments);this.loaded&&this.rf.xu.apply(this.rf,[E].concat(g.Be(e)))}; g.z.getAdState=function(){return this.Zl}; g.z.bR=function(){return this.Db?LO(this.Db).bR:!1}; g.z.sP=function(){return this.Db?LO(this.Db).sP:!1}; g.z.oz=function(E,e){this.y$=E||0;this.player.publish("progresssync",E,e);this.player.kU("onVideoProgress",E||0)}; g.z.getCurrentTime=function(){return this.y$}; g.z.getDuration=function(){return LO(this.Db).getDuration()||0}; g.z.pY=function(){var E=LO(this.Db);return E.S?E.T+ry(E):E.T}; g.z.Zy=function(){return LO(this.Db).N}; g.z.cn=function(){return zq6(LO(this.Db))}; g.z.TF=function(){var E=LO(this.Db);return E.G>0?E.G+ry(E):E.G}; g.z.getProgressState=function(){var E=LO(this.Db),e=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:E.playerState!=1081&&this.player.Yg(),clipEnd:e.clipEnd,clipStart:e.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.pY(),isAtLiveHead:this.isAtLiveHead(),loaded:this.Zy(),seekableEnd:this.cn(),seekableStart:this.TF(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.z.isAtLiveHead=function(){return zq6(LO(this.Db))-this.getCurrentTime()<=1}; g.z.nextVideo=function(){this.Db&&this.Db.nextVideo()}; g.z.Ai=function(){this.Db&&this.Db.Ai()}; g.z.Ogt=function(E){E===1&&(this.KQ=this.Db?LO(this.Db):null)}; g.z.L6M=function(){var E=EFd()?new aT(Oj(),void 0):null;if(E){var e=this.zr;this.loaded&&this.unload();this.Db=E;this.KQ=null;e.key!==this.KF.key&&(this.zr=e,this.load())}else g.qE(this.Db),this.Db=null,this.loaded&&(this.unload(),(E=this.KQ)&&E.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(E.videoId,bh(E)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.z.Xb=function(){var E=[this.KF],e=E.concat,l=RqG();F3()&&g.cK("yt-remote-cast-available")&&l.push({key:"cast-selector-receiver",name:"Cast..."});this.Q7=e.call(E,l);E=tNH()||this.KF;w9(this,E);this.player.kU("onMdxReceiversChange")}; g.z.JN3=function(){var E=tNH();w9(this,E)}; g.z.UM7=function(){this.zr=tNH()}; g.z.vUM=function(){this.Ty=!0;o3(this);CP=!1;XA&&Ay(XA,1);XA=null}; g.z.KU4=function(){this.Ty=!1;o3(this);w9(this,this.KF);this.zr=this.KF;CP=!1;XA=null;this.player.playVideo()}; g.z.Da=function(E,e){switch(E){case "casting":return this.loaded;case "receivers":return this.Q7;case "currentReceiver":return e&&(e.key==="cast-selector-receiver"?Bgr():w9(this,e)),this.loaded?this.zr:this.KF;case "quickCast":return this.Q7.length===2&&this.Q7[1].key==="cast-selector-receiver"?(e&&Bgr(),!0):!1}}; g.z.Aq=function(){this.Db.Aq()}; g.z.BJ=function(){return!1}; g.z.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.z.isLoggedIn=function(){var E,e;return((E=g.LF("PLAYER_CONFIG"))==null?void 0:(e=E.args)==null?void 0:e.authuser)!==void 0?!0:!(!g.LF("SESSION_INDEX")&&!g.LF("LOGGED_IN"))};g.Iu("remote",xSS);})(_yt_player);