(function(g){var window=this;'use strict';var Kyd=function(a){if(a instanceof g.Pf)return a;if(typeof a.NU=="function")return a.NU(!1);if(g.af(a)){var I=0,U=new g.Pf;U.next=function(){for(;;){if(I>=a.length)return g.Ty;if(I in a)return g.pf(a[I++]);I++}}; return U}throw Error("Not implemented");},bjd=function(a,I,U){if(g.af(a))g.Gm(a,I,U); else for(a=Kyd(a);;){var e=a.next();if(e.done)break;I.call(U,e.value,void 0,a)}},DA=function(a){g.bv(a,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.rd()).toString(36)); return a},vv=function(a,I,U){Array.isArray(U)||(U=[String(U)]); g.OWc(a.J,I,U)},JbI=function(a,I){var U=[]; bjd(I,function(e){try{var T=g.fC.prototype.L.call(this,e,!0)}catch(C){if(C=="Storage: Invalid value was encountered")return;throw C;}T===void 0?U.push(e):g.QIg(T)&&U.push(e)},a); return U},ua8=function(a,I){JbI(a,I).forEach(function(U){g.fC.prototype.remove.call(this,U)},a)},kv4=function(a){if(a.Va){if(a.Va.locationOverrideToken)return{locationOverrideToken:a.Va.locationOverrideToken}; if(a.Va.latitudeE7!=null&&a.Va.longitudeE7!=null)return{latitudeE7:a.Va.latitudeE7,longitudeE7:a.Va.longitudeE7}}return null},V18=function(a,I){g.kJ(a,I)||a.push(I)},Abz=function(a){var I=0,U; for(U in a)I++;return I},M1m=function(a,I){return g.of(a,I)},j0I=function(a){try{return g.zs.JSON.parse(a)}catch(I){}a=String(a); if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.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("("+a+")")}catch(I){}throw Error("Invalid JSON string: "+a);},aZ=function(a){if(g.zs.JSON)try{return g.zs.JSON.parse(a)}catch(I){}return j0I(a)},$6Q=function(){var a=IZ(); this.V=a;a.MU("/client_streamz/youtube/living_room/mdx/channel/opened",g.bP("channel_type"))},ijf=function(){var a=IZ(); this.V=a;a.MU("/client_streamz/youtube/living_room/mdx/channel/closed",g.bP("channel_type"))},Lyz=function(){var a=IZ(); this.V=a;a.MU("/client_streamz/youtube/living_room/mdx/channel/message_received",g.bP("channel_type"))},gk4=function(){var a=IZ(); this.V=a;a.MU("/client_streamz/youtube/living_room/mdx/channel/success")},cbo=function(){var a=IZ(); this.V=a;a.MU("/client_streamz/youtube/living_room/mdx/channel/error",g.bP("channel_type"))},WyG=function(){var a=IZ(); this.V=a;a.MU("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},lld=function(){var a=IZ(); this.V=a;a.MU("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},B9m=function(a){if(a.ZK&&typeof a.ZK=="function")return a.ZK(); if(typeof Map!=="undefined"&&a instanceof Map||typeof Set!=="undefined"&&a instanceof Set)return Array.from(a.values());if(typeof a==="string")return a.split("");if(g.af(a)){for(var I=[],U=a.length,e=0;e1){if(U%2)throw Error("Uneven number of arguments");for(var e=0;e5&&(a=a.slice(a.length-5)); var I=g.FX(VRG(),function(e){return e.loungeToken}),U=g.FX(a,function(e){return e.loungeToken}); g.mm(U,function(e){return!g.kJ(I,e)})&&ATo(); g.yy("yt-remote-local-screens",a,31536E3)},ti=function(a){a||(g.da("yt-remote-session-screen-id"),g.da("yt-remote-session-video-id")); uUd();a=xZ();g.Az(a,Zv());bdG(a)},j$I=function(){if(!nw){var a=g.Eb(); a&&(nw=new g.Xz(a))}},$t4=function(){j$I(); return nw?!!nw.get("yt-remote-use-staging-server"):!1},Kw=function(a,I){g.qN[a]=!0; var U=g.rq();U&&U.publish.apply(U,arguments);g.qN[a]=!1},ido=function(){},IZ=function(){if(!bb){bb=new g.wJ(new ido); var a=g.Lj("client_streamz_web_flush_count",-1);a!==-1&&(bb.B=a)}return bb},L0z=function(){var a=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return a?parseInt(a[1],10):0},g38=function(a){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+a)!=-1||document.currentScript.src.indexOf("&"+a)!=-1)},cTJ=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},Ji=function(a){a.length?W0D(a.shift(),function(){Ji(a)}):l9d()},Bad=function(a){return"chrome-extension://"+a+"/cast_sender.js"},W0D=function(a,I,U){var e=document.createElement("script"); e.onerror=I;U&&(e.onload=U);g.q9(e,g.WB(a));(document.head||document.documentElement).appendChild(e)},Xkm=function(){var a=L0z(),I=[]; if(a>1){var U=a-1;I.push("//www.gstatic.com/eureka/clank/"+a+"/cast_sender.js");I.push("//www.gstatic.com/eureka/clank/"+U+"/cast_sender.js")}return I},l9d=function(){var a=cTJ(); a&&a(!1,"No cast extension found")},pkQ=function(){if(PRm){var a=2,I=cTJ(),U=function(){a--; a==0&&I&&I(!0)}; window.__onGCastApiAvailable=U;W0D("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",l9d,U)}},f9z=function(){pkQ(); var a=Xkm();a.push("//www.gstatic.com/eureka/clank/cast_sender.js");Ji(a)},OdD=function(){pkQ(); var a=Xkm();a.push.apply(a,g.A(YVz.map(Bad)));a.push("//www.gstatic.com/eureka/clank/cast_sender.js");Ji(a)},ub=function(a,I,U){g.S.call(this); this.Y=U!=null?(0,g.e8)(a,U):a;this.g6=I;this.U=(0,g.e8)(this.tp,this);this.V=!1;this.L=0;this.B=this.ZN=null;this.J=[]},kZ=function(){},SVD=function(){g.aI.call(this,"p")},G8Q=function(){g.aI.call(this,"o")},E3o=function(){return yTJ=yTJ||new g.u7},dtD=function(a){g.aI.call(this,"serverreachability",a)},Vg=function(a){var I=E3o(); I.dispatchEvent(new dtD(I,a))},R78=function(a){g.aI.call(this,"statevent",a)},Ai=function(a){var I=E3o(); I.dispatchEvent(new R78(I,a))},wko=function(a,I,U,e){g.aI.call(this,"timingevent",a); this.size=I;this.rtt=U;this.retries=e},MV=function(a,I){if(typeof a!=="function")throw Error("Fn must not be null and must be a function"); return g.zs.setTimeout(function(){a()},I)},jt=function(){},$Z=function(a,I,U,e){this.B=a; this.J=I;this.rF=U;this.EB=e||1;this.E7=new g.A7(this);this.xa=45E3;this.zt=null;this.Y=!1;this.j=this.Z6=this.D=this.CO=this.e8=this.i5=this.Va=null;this.gw=[];this.V=null;this.C=0;this.U=this.tU=null;this.Vo=-1;this.Ux=!1;this.XX=0;this.fO=null;this.hN=this.a$=this.B8=this.dw=!1;this.L=new F04},F04=function(){this.B=null; this.V="";this.L=!1},Q$J=function(a,I,U){a.CO=1; a.D=DA(I.clone());a.j=U;a.dw=!0;mtI(a,null)},mtI=function(a,I){a.e8=Date.now(); ib(a);a.Z6=a.D.clone();vv(a.Z6,"t",a.EB);a.C=0;var U=a.B.CO;a.L=new F04;a.V=z78(a.B,U?I:null,!a.j);a.XX>0&&(a.fO=new g.e_((0,g.e8)(a.Q9,a,a.V),a.XX));a.E7.listen(a.V,"readystatechange",a.o2);I=a.zt?g.sG(a.zt):{};a.j?(a.tU||(a.tU="POST"),I["Content-Type"]="application/x-www-form-urlencoded",a.V.send(a.Z6,a.tU,a.j,I)):(a.tU="GET",a.V.send(a.Z6,a.tU,null,I));Vg(1)},Nam=function(a){if(!h7J(a))return g.aM(a.V); var I=g.IM(a.V);if(I==="")return"";var U="",e=I.length,T=g.Dj(a.V)==4;if(!a.L.B){if(typeof TextDecoder==="undefined")return Lw(a),go(a),"";a.L.B=new g.zs.TextDecoder}for(var C=0;CI.length)return o3m;I=I.slice(e,e+U);a.C=e+U;return I},ib=function(a){a.i5=Date.now()+a.xa; and(a,a.xa)},and=function(a,I){if(a.Va!=null)throw Error("WatchDog timer not null"); a.Va=MV((0,g.e8)(a.KV,a),I)},Inf=function(a){a.Va&&(g.zs.clearTimeout(a.Va),a.Va=null)},go=function(a){a.B.AS()||a.Ux||sBI(a.B,a)},Lw=function(a){Inf(a); g.Kf(a.fO);a.fO=null;a.E7.removeAll();if(a.V){var I=a.V;a.V=null;I.abort();I.dispose()}},xko=function(a,I){try{var U=a.B; if(U.R9!=0&&(U.V==a||Ukd(U.L,a)))if(!a.a$&&Ukd(U.L,a)&&U.R9==3){try{var e=U.vZ.V.parse(I)}catch(V){e=null}if(Array.isArray(e)&&e.length==3){var T=e;if(T[0]==0)a:{if(!U.D){if(U.V)if(U.V.e8+3E30&&(U.XX=1.5*q);e=U;var x=a.CB();if(x){var Z=g.sy(x,"X-Client-Wire-Protocol");if(Z){var t=e.L;!t.V&&(g.VK(Z,"spdy")||g.VK(Z,"quic")||g.VK(Z,"h2"))&&(t.J=t.U,t.V=new Set,t.L&&(C_D(t,t.L),t.L=null))}if(e.dw){var n=g.sy(x,"X-HTTP-Session-Id");n&&(e.BE=n,g.bv(e.zt,e.dw,n))}}U.R9=3;U.U&&U.U.Pf();U.IF&&(U.wL=Date.now()-a.e8);e=U;var K=a;e.yx=rLj(e,e.CO?e.EB:null,e.rF);if(K.a$){HGo(e.L, K);var b=K,J=e.XX;J&&b.setTimeout(J);b.Va&&(Inf(b),ib(b));e.V=K}else qvf(e);U.B.length>0&&BH(U)}else C[0]!="stop"&&C[0]!="close"||lb(U,7);else U.R9==3&&(C[0]=="stop"||C[0]=="close"?C[0]=="stop"?lb(U,7):U.disconnect():C[0]!="noop"&&U.U&&U.U.XA(C),U.gw=0)}Vg(4)}catch(V){}},ZGo=function(a,I){this.V=a; this.map=I;this.context=null},tNG=function(a){this.U=a||10; g.zs.PerformanceNavigationTiming?(a=g.zs.performance.getEntriesByType("navigation"),a=a.length>0&&(a[0].nextHopProtocol=="hq"||a[0].nextHopProtocol=="h2")):a=!!(g.zs.chrome&&g.zs.chrome.loadTimes&&g.zs.chrome.loadTimes()&&g.zs.chrome.loadTimes().wasFetchedViaSpdy);this.J=a?this.U:1;this.V=null;this.J>1&&(this.V=new Set);this.L=null;this.B=[]},nGz=function(a){return a.L?!0:a.V?a.V.size>=a.J:!1},Tzd=function(a){return a.L?1:a.V?a.V.size:0},Ukd=function(a,I){return a.L?a.L==I:a.V?a.V.has(I):!1},C_D= function(a,I){a.V?a.V.add(I):a.L=I},HGo=function(a,I){a.L&&a.L==I?a.L=null:a.V&&a.V.has(I)&&a.V.delete(I)},Kf4=function(a){if(a.L!=null)return a.B.concat(a.L.gw); if(a.V!=null&&a.V.size!==0){var I=a.B;a=g.k(a.V.values());for(var U=a.next();!U.done;U=a.next())I=I.concat(U.value.gw);return I}return g.iI(a.B)},bGf=function(a,I){var U=new jt; if(g.zs.Image){var e=new Image;e.onload=g.Co(Xx,U,"TestLoadImage: loaded",!0,I,e);e.onerror=g.Co(Xx,U,"TestLoadImage: error",!1,I,e);e.onabort=g.Co(Xx,U,"TestLoadImage: abort",!1,I,e);e.ontimeout=g.Co(Xx,U,"TestLoadImage: timeout",!1,I,e);g.zs.setTimeout(function(){if(e.ontimeout)e.ontimeout()},1E4); e.src=a}else I(!1)},JLj=function(a,I){var U=new jt,e=new AbortController,T=setTimeout(function(){e.abort(); Xx(U,"TestPingServer: timeout",!1,I)},1E4); fetch(a,{signal:e.signal}).then(function(C){clearTimeout(T);C.ok?Xx(U,"TestPingServer: ok",!0,I):Xx(U,"TestPingServer: server error",!1,I)}).catch(function(){clearTimeout(T); Xx(U,"TestPingServer: error",!1,I)})},Xx=function(a,I,U,e,T){try{T&&(T.onload=null,T.onerror=null,T.onabort=null,T.ontimeout=null),e(U)}catch(C){}},u1d=function(){this.V=new kZ},kM4=function(a,I,U){var e=U||""; try{Pkf(a,function(T,C){var r=T;g.If(T)&&(r=g.m4(T));I.push(e+C+"="+encodeURIComponent(r))})}catch(T){throw I.push(e+"type="+encodeURIComponent("_badmap")),T; }},PH=function(a,I,U){return U&&U.mnX?U.mnX[a]||I:I},VNo=function(a){this.B=[]; this.EB=this.yx=this.zt=this.rF=this.V=this.BE=this.dw=this.Ux=this.C=this.Vo=this.j=null;this.q2=this.Z6=0;this.N2=PH("failFast",!1,a);this.a$=this.Va=this.D=this.Y=this.U=null;this.F1=!0;this.uj=this.fO=-1;this.hN=this.gw=this.e8=0;this.vL=PH("baseRetryDelayMs",5E3,a);this.DU=PH("retryDelaySeedMs",1E4,a);this.yd=PH("forwardChannelMaxRetries",2,a);this.bl=PH("forwardChannelRequestTimeoutMs",2E4,a);this.L4=a&&a.HRw||void 0;this.PL=a&&a.OjU||void 0;this.dA=a&&a.Max||!1;this.XX=void 0;this.CO=a&&a.ltt|| !1;this.J="";this.L=new tNG(a&&a.Lpa);this.vZ=new u1d;this.E7=a&&a.TP8||!1;this.i5=a&&a.wug||!1;this.E7&&this.i5&&(this.i5=!1);this.XY=a&&a.nGK||!1;a&&a.H7a&&(this.F1=!1);this.IF=!this.E7&&this.F1&&a&&a.esa||!1;this.TC=void 0;a&&a.bx&&a.bx>0&&(this.TC=a.bx);this.ij=void 0;this.wL=0;this.xa=!1;this.B8=this.tU=null},WH=function(a){a.V&&(ALf(a),a.V.cancel(),a.V=null)},MNd=function(a){WH(a); a.D&&(g.zs.clearTimeout(a.D),a.D=null);cH(a);a.L.cancel();a.Y&&(typeof a.Y==="number"&&g.zs.clearTimeout(a.Y),a.Y=null)},BH=function(a){nGz(a.L)||a.Y||(a.Y=!0,g.ch(a.y9,a),a.e8=0)},$km=function(a,I){if(Tzd(a.L)>=a.L.J-(a.Y?1:0))return!1; if(a.Y)return a.B=I.gw.concat(a.B),!0;if(a.R9==1||a.R9==2||a.e8>=(a.N2?0:a.yd))return!1;a.Y=MV((0,g.e8)(a.y9,a,I),jBz(a,a.e8));a.e8++;return!0},LfI=function(a,I){var U; I?U=I.rF:U=a.Z6++;var e=a.zt.clone();g.bv(e,"SID",a.J);g.bv(e,"RID",U);g.bv(e,"AID",a.fO);pw(a,e);a.C&&a.j&&g.VT(e,a.C,a.j);U=new $Z(a,a.J,U,a.e8+1);a.C===null&&(U.zt=a.j);I&&(a.B=I.gw.concat(a.B));I=iGG(a,U,1E3);U.setTimeout(Math.round(a.bl*.5)+Math.round(a.bl*.5*Math.random()));C_D(a.L,U);Q$J(U,e,I)},pw=function(a,I){a.Ux&&g.dd(a.Ux,function(U,e){g.bv(I,e,U)}); a.U&&Pkf({},function(U,e){g.bv(I,e,U)})},iGG=function(a,I,U){U=Math.min(a.B.length,U); var e=a.U?(0,g.e8)(a.U.b1,a.U,a):null;a:{for(var T=a.B,C=-1;;){var r=["count="+U];C==-1?U>0?(C=T[0].V,r.push("ofs="+C)):C=0:r.push("ofs="+C);for(var q=!0,x=0;x=3)return!1; a.hN++;a.D=MV((0,g.e8)(a.rj,a),jBz(a,a.gw));a.gw++;return!0},ALf=function(a){a.tU!=null&&(g.zs.clearTimeout(a.tU),a.tU=null)},gGd=function(a){a.V=new $Z(a,a.J,"rpc",a.hN); a.C===null&&(a.V.zt=a.j);a.V.XX=0;var I=a.yx.clone();g.bv(I,"RID","rpc");g.bv(I,"SID",a.J);g.bv(I,"AID",a.fO);g.bv(I,"CI",a.a$?"0":"1");!a.a$&&a.TC&&g.bv(I,"TO",a.TC);g.bv(I,"TYPE","xmlhttp");pw(a,I);a.C&&a.j&&g.VT(I,a.C,a.j);a.XX&&a.V.setTimeout(a.XX);var U=a.V;a=a.EB;U.CO=1;U.D=DA(I.clone());U.j=null;U.dw=!0;mtI(U,a)},cH=function(a){a.Va!=null&&(g.zs.clearTimeout(a.Va),a.Va=null)},sBI=function(a,I){var U=null; if(a.V==I){cH(a);ALf(a);a.V=null;var e=2}else if(Ukd(a.L,I))U=I.gw,HGo(a.L,I),e=1;else return;if(a.R9!=0)if(I.Y)if(e==1){U=I.j?I.j.length:0;I=Date.now()-I.e8;var T=a.e8;e=E3o();e.dispatchEvent(new wko(e,U,I,T));BH(a)}else qvf(a);else{var C=I.Vo;T=I.getLastError();if(T==3||T==0&&C>0||!(e==1&&$km(a,I)||e==2&&eSG(a)))switch(U&&U.length>0&&(I=a.L,I.B=I.B.concat(U)),T){case 1:lb(a,5);break;case 4:lb(a,10);break;case 3:lb(a,6);break;default:lb(a,2)}}},jBz=function(a,I){var U=a.vL+Math.floor(Math.random()* a.DU); a.isActive()||(U*=2);return U*I},lb=function(a,I){if(I==2){var U=(0,g.e8)(a.s9$,a),e=a.PL,T=!e; e=new g.rv(e||"//www.google.com/images/cleardot.gif");g.zs.location&&g.zs.location.protocol=="http"||g.H7(e,"https");DA(e);T?bGf(e.toString(),U):JLj(e.toString(),U)}else Ai(2);a.R9=0;a.U&&a.U.De(I);cLd(a);MNd(a)},cLd=function(a){a.R9=0; a.B8=[];if(a.U){var I=Kf4(a.L);if(I.length!=0||a.B.length!=0)g.gd(a.B8,I),g.gd(a.B8,a.B),a.L.B.length=0,g.iI(a.B),a.B.length=0;a.U.qd()}},Wfz=function(a){if(a.R9==0)return a.B8; var I=[];g.gd(I,Kf4(a.L));g.gd(I,a.B);return I},rLj=function(a,I,U){var e=g.J7(U); e.V!=""?(I&&g.q8(e,I+"."+e.V),g.xu(e,e.B)):(e=g.zs.location,e=pIJ(e.protocol,I?I+"."+e.hostname:e.hostname,+e.port,U));I=a.dw;U=a.BE;I&&U&&g.bv(e,I,U);g.bv(e,"VER",a.fA);pw(a,e);return e},z78=function(a,I,U){if(I&&!a.CO)throw Error("Can't create secondary domain capable XhrIo object."); I=a.dA&&!a.L4?new g.hM(new g.Uz({MB:U})):new g.hM(a.L4);I.C=a.CO;return I},lno=function(){},Bzz=function(){},YZ=function(a,I){g.u7.call(this); this.V=new VNo(I);this.U=a;this.L=I&&I.yN8||null;a=I&&I.rNg||null;I&&I.VBa&&(a?a["X-Client-Protocol"]="webchannel":a={"X-Client-Protocol":"webchannel"});this.V.j=a;a=I&&I.c28||null;I&&I.Tf&&(a?a["X-WebChannel-Content-Type"]=I.Tf:a={"X-WebChannel-Content-Type":I.Tf});I&&I.JV&&(a?a["X-WebChannel-Client-Profile"]=I.JV:a={"X-WebChannel-Client-Profile":I.JV});this.V.Vo=a;(a=I&&I.jRs)&&!g.ur(a)&&(this.V.C=a);this.Y=I&&I.ltt||!1;this.J=I&&I.xy$||!1;(I=I&&I.Pgg)&&!g.ur(I)&&(this.V.dw=I,g.Nd(this.L,I)&&(a= this.L,I in a&&delete a[I]));this.B=new fw(this)},XzQ=function(a){SVD.call(this); a.__headers__&&(this.headers=a.__headers__,this.statusCode=a.__status__,delete a.__headers__,delete a.__status__);var I=a.__sm__;I?this.data=(this.V=g.mz(I))?g.ax(I,this.V):I:this.data=a},P_z=function(a){G8Q.call(this); this.status=1;this.errorCode=a},fw=function(a){this.V=a},pzQ=function(a,I){this.L=a; this.V=I},fnG=function(a){return Wfz(a.V).map(function(I){var U=a.L; I=I.map;"__data__"in I?(I=I.__data__,U=U.J?j0I(I):I):U=I;return U})},OQ=function(a,I){if(typeof a!=="function")throw Error("Fn must not be null and must be a function"); return g.zs.setTimeout(function(){a()},I)},GZ=function(a){St.dispatchEvent(new Yvo(St,a))},Yvo=function(a){g.aI.call(this,"statevent",a)},yg=function(a,I,U,e){this.V=a; this.J=I;this.C=U;this.Y=e||1;this.L=45E3;this.B=new g.A7(this);this.U=new g.Em;this.U.setInterval(250)},Svo=function(a,I,U){a.Ek=1; a.ph=DA(I.clone());a.c6=U;a.dw=!0;OGI(a,null)},GMo=function(a,I,U,e,T){a.Ek=1; a.ph=DA(I.clone());a.c6=null;a.dw=U;T&&(a.n8=!1);OGI(a,e)},OGI=function(a,I){a.vR=Date.now(); yLD(a);a.jk=a.ph.clone();vv(a.jk,"t",a.Y);a.Rb=0;a.UM=a.V.GU(a.V.Np()?I:null);a.Mf>0&&(a.nK=new g.e_((0,g.e8)(a.Ze,a,a.UM),a.Mf));a.B.listen(a.UM,"readystatechange",a.pV);I=a.nG?g.sG(a.nG):{};a.c6?(a.iT="POST",I["Content-Type"]="application/x-www-form-urlencoded",a.UM.send(a.jk,a.iT,a.c6,I)):(a.iT="GET",a.n8&&!g.hl&&(I.Connection="close"),a.UM.send(a.jk,a.iT,null,I));a.V.QT(1)},RSf=function(a,I){var U=a.Rb,e=I.indexOf("\n",U); if(e==-1)return EGf;U=Number(I.substring(U,e));if(isNaN(U))return dko;e+=1;if(e+U>I.length)return EGf;I=I.slice(e,e+U);a.Rb=e+U;return I},yLD=function(a){a.TU=Date.now()+a.L; wzd(a,a.L)},wzd=function(a,I){if(a.Km!=null)throw Error("WatchDog timer not null"); a.Km=OQ((0,g.e8)(a.z$,a),I)},Fff=function(a){a.Km&&(g.zs.clearTimeout(a.Km),a.Km=null)},mkQ=function(a){a.V.AS()||a.U2||a.V.Qu(a)},EQ=function(a){Fff(a); g.Kf(a.nK);a.nK=null;a.U.stop();a.B.removeAll();if(a.UM){var I=a.UM;a.UM=null;I.abort();I.dispose()}a.xp&&(a.xp=null)},QBd=function(a,I){try{a.V.Sy(a,I),a.V.QT(4)}catch(U){}},hSD=function(a,I,U,e,T){if(e==0)U(!1); else{var C=T||0;e--;zSJ(a,I,function(r){r?U(!0):g.zs.setTimeout(function(){hSD(a,I,U,e,C)},C)})}},zSJ=function(a,I,U){var e=new Image; e.onload=function(){try{RZ(e),U(!0)}catch(T){}}; e.onerror=function(){try{RZ(e),U(!1)}catch(T){}}; e.onabort=function(){try{RZ(e),U(!1)}catch(T){}}; e.ontimeout=function(){try{RZ(e),U(!1)}catch(T){}}; g.zs.setTimeout(function(){if(e.ontimeout)e.ontimeout()},I); e.src=a},RZ=function(a){a.onload=null; a.onerror=null;a.onabort=null;a.ontimeout=null},Nzd=function(a){this.V=a; this.L=new kZ},oGj=function(a){var I=wo(a.V,a.QI,"/mail/images/cleardot.gif"); DA(I);hSD(I.toString(),5E3,(0,g.e8)(a.c_,a),3,2E3);a.QT(1)},Dko=function(a){var I=a.V.Y; I!=null?(GZ(5),I?(GZ(11),Fx(a.V,a,!1)):(GZ(12),Fx(a.V,a,!0))):(a.vG=new yg(a),a.vG.nG=a.H9,I=a.V,I=wo(I,I.Np()?a.VJ:null,a.f9),GZ(5),vv(I,"TYPE","xmlhttp"),GMo(a.vG,I,!1,a.VJ,!1))},vG8=function(a,I,U){this.V=1; this.L=[];this.B=[];this.U=new kZ;this.j=a||null;this.Y=I!=null?I:null;this.D=U||!1},aeQ=function(a,I){this.V=a; this.map=I;this.context=null},Iej=function(a,I,U,e){g.aI.call(this,"timingevent",a); this.size=I;this.rtt=U;this.retries=e},s7d=function(a){g.aI.call(this,"serverreachability",a)},emz=function(a){a.U5(1,0); a.gG=wo(a,null,a.yu);UOz(a)},TGQ=function(a){a.yO&&(a.yO.abort(),a.yO=null); a.dV&&(a.dV.cancel(),a.dV=null);a.SB&&(g.zs.clearTimeout(a.SB),a.SB=null);mr(a);a.H1&&(a.H1.cancel(),a.H1=null);a.z0&&(g.zs.clearTimeout(a.z0),a.z0=null)},Czo=function(a,I){if(a.V==0)throw Error("Invalid operation: sending map when state is closed"); a.L.push(new aeQ(a.O5++,I));a.V!=2&&a.V!=3||UOz(a)},rPQ=function(a){var I=0; a.dV&&I++;a.H1&&I++;return I},UOz=function(a){a.H1||a.z0||(a.z0=OQ((0,g.e8)(a.uq,a),0),a.ol=0)},xOz=function(a,I){if(a.V==1){if(!I){a.Mp=Math.floor(Math.random()*1E5); I=a.Mp++;var U=new yg(a,"",I);U.nG=a.bQ;var e=HOd(a),T=a.gG.clone();g.bv(T,"RID",I);g.bv(T,"CVER","1");Qg(a,T);Svo(U,T,e);a.H1=U;a.V=2}}else a.V==3&&(I?qXz(a,I):a.L.length==0||a.H1||qXz(a))},qXz=function(a,I){if(I)if(a.Es>6){a.L=a.B.concat(a.L); a.B.length=0;var U=a.Mp-1;I=HOd(a)}else U=I.C,I=I.c6;else U=a.Mp++,I=HOd(a);var e=a.gG.clone();g.bv(e,"SID",a.J);g.bv(e,"RID",U);g.bv(e,"AID",a.Yx);Qg(a,e);U=new yg(a,a.J,U,a.ol+1);U.nG=a.bQ;U.setTimeout(1E4+Math.round(1E4*Math.random()));a.H1=U;Svo(U,e,I)},Qg=function(a,I){a.Vt&&(a=a.Vt.E8())&&g.dd(a,function(U,e){g.bv(I,e,U)})},HOd=function(a){var I=Math.min(a.L.length,1E3),U=["count="+I]; if(a.Es>6&&I>0){var e=a.L[0].V;U.push("ofs="+e)}else e=0;for(var T={},C=0;C=3)return!1; a.C++;a.SB=OQ((0,g.e8)(a.mx,a),tX8(a,a.dn));a.dn++;return!0},Fx=function(a,I,U){a.L9=a.Y==null?U:!a.Y; a.EU=I.Zq;a.D||emz(a)},mr=function(a){a.ib!=null&&(g.zs.clearTimeout(a.ib),a.ib=null)},tX8=function(a,I){var U=5E3+Math.floor(Math.random()*1E4); a.isActive()||(U*=2);return U*I},zZ=function(a,I){if(I==2||I==9){var U=null; a.Vt&&(U=null);var e=(0,g.e8)(a.inx,a);U||(U=new g.rv("//www.google.com/images/cleardot.gif"),DA(U));zSJ(U.toString(),1E4,e)}else GZ(2);KhJ(a,I)},KhJ=function(a,I){a.V=0; a.Vt&&a.Vt.lq(I);bOf(a);TGQ(a)},bOf=function(a){a.V=0; a.EU=-1;if(a.Vt)if(a.B.length==0&&a.L.length==0)a.Vt.qf();else{var I=g.iI(a.B),U=g.iI(a.L);a.B.length=0;a.L.length=0;a.Vt.qf(I,U)}},wo=function(a,I,U){var e=g.J7(U); if(e.V!="")I&&g.q8(e,I+"."+e.V),g.xu(e,e.B);else{var T=window.location;e=pIJ(T.protocol,I?I+"."+T.hostname:T.hostname,+T.port,U)}a.Ch&&g.dd(a.Ch,function(C,r){g.bv(e,r,C)}); g.bv(e,"VER",a.Es);Qg(a,e);return e},JP4=function(){},udo=function(){this.V=[]; this.L=[]},k1z=function(a){g.aI.call(this,"channelMessage"); this.message=a},VXJ=function(a){g.aI.call(this,"channelError"); this.error=a},APJ=function(a,I){this.action=a; this.params=I||{}},hi=function(a,I){g.S.call(this); this.V=new g.Dy(this.fUt,0,this);g.E(this,this.V);this.g6=5E3;this.L=0;if(typeof a==="function")I&&(a=(0,g.e8)(a,I));else if(a&&typeof a.handleEvent==="function")a=(0,g.e8)(a.handleEvent,a);else throw Error("Invalid listener argument");this.B=a},MXz=function(a,I,U,e,T,C,r,q,x,Z,t,n,K,b){U=U===void 0?!1:U; e=e===void 0?function(){return""}:e; T=T===void 0?!1:T;C=C===void 0?!1:C;r=r===void 0?!1:r;q=q===void 0?function(){return g.XG({})}:q; x=x===void 0?!1:x;t=t===void 0?!1:t;n=n===void 0?!1:n;K=K===void 0?!1:K;b=b===void 0?!1:b;this.CO=a;this.Va=I;this.Y=new g.B1;this.L=new hi(this.icw,this);this.V=null;this.C=!1;this.j=null;this.e8="";this.gw=this.D=0;this.B=[];this.hN=U;this.dw=e;this.U=C;this.zt=q;this.Ux=Z;this.EB=r;this.tU=null;this.J=g.XG();this.rF=T;this.B8=x;this.E7=t;this.i5=n;this.F1=K;this.Vo=b;this.XX=new $6Q;this.a$=new ijf;this.xa=new gk4;this.Z6=new Lyz;this.fO=new cbo;this.IF=new WyG;this.ij=new lld},iOD=function(a, I,U,e,T){j7G(a); if(a.V){var C=g.D5("ID_TOKEN"),r=a.V.bQ||{};C?r["x-youtube-identity-token"]=C:delete r["x-youtube-identity-token"];a.V.bQ=r}$Oo(a);e?(e.getState()!=3&&rPQ(e)==0||e.getState(),a.V.connect(I,U,a.Va,e.J,e.Yx)):T?a.V.connect(I,U,a.Va,T.sessionId,T.arrayId):a.V.connect(I,U,a.Va)},Who=function(a,I){return a.F1?!0:a.i5?Object.values(Lho).includes(I):a.E7?!Object.values(gdo).includes(I):a.Vo?Object.values(cPm).includes(I):!1},X2d=function(a){var I,U; g.f(function(e){if(e.L==1)return g.iF(e,2),g.l(e,lez(a),2);g.XY(e);I=a.B;a.B=[];U=I.length;BG4(a,I,U);NV(a);return g.Pw(e,0)})},BG4=function(a,I,U){for(var e=0;e0?U=Object.assign({},U,I):delete U.Authorization;a.V.bQ=U}},$Oo=function(a){a.Ux&&!a.U&&p2G(a,a.Ux())},oZ=function(a){this.scheme="https"; this.port=this.domain="";this.V="/api/lounge";this.L=!0;a=a||document.location.href;var I=Number(g.LM(a)[4]||null)||"";I&&(this.port=":"+I);this.domain=g.gs(a)||"";a=g.gO();a.search("MSIE")>=0&&(a=a.match(/MSIE ([\d.]+)/)[1],g.Lk(a,"10.0")<0&&(this.L=!1))},Dv=function(a,I){var U=a.V; a.L&&(U=a.scheme+"://"+a.domain+a.port+a.V);return g.pM(U+I,{})},fem=function(a,I){g.u7.call(this); var U=this;this.A4=a();this.A4.subscribe("handlerOpened",this.NN,this);this.A4.subscribe("handlerClosed",this.onClosed,this);this.A4.subscribe("handlerError",function(e,T){U.onError(T)}); this.A4.subscribe("handlerMessage",this.onMessage,this);this.V=I},YX4=function(a,I,U){var e=this; U=U===void 0?function(){return""}:U; var T=T===void 0?new Bzz:T;var C=C===void 0?new g.B1:C;this.pathPrefix=a;this.V=I;this.e8=U;this.U=C;this.D=null;this.j=this.C=0;this.channel=null;this.Y=0;this.B=new hi(function(){e.B.isActive();var r;((r=e.channel)==null?void 0:Tzd((new pzQ(r,r.V)).V.L))===0&&e.connect(e.D,e.C)}); this.J={};this.L={};this.Va=!1;this.logger=null;this.gw=[];this.ZC=void 0;this.zt=new $6Q;this.tU=new ijf;this.Ux=new Lyz;this.dw=new cbo},OOo=function(a){g.Hh(a.channel,"m",function(){a.Y=3; a.B.reset();a.D=null;a.C=0;for(var I=g.k(a.gw),U=I.next();!U.done;U=I.next())U=U.value,a.channel&&a.channel.send(U);a.gw=[];a.publish("webChannelOpened");a.zt.Id("WEB_CHANNEL")}); g.Hh(a.channel,"n",function(){a.Y=0;a.B.isActive()||a.publish("webChannelClosed");var I,U=(I=a.channel)==null?void 0:fnG(new pzQ(I,I.V));U&&(a.gw=[].concat(g.A(U)));a.tU.Id("WEB_CHANNEL")}); g.Hh(a.channel,"p",function(I){var U=I.data;U[0]==="gracefulReconnect"?(a.B.start(),a.channel&&a.channel.close()):a.publish("webChannelMessage",new APJ(U[0],U[1]));a.ZC=I.statusCode;a.Ux.Id("WEB_CHANNEL")}); g.Hh(a.channel,"o",function(){a.ZC===401||a.B.start();a.publish("webChannelError");a.dw.Id("WEB_CHANNEL")})},SXj=function(a){var I=a.e8(); I?a.J["x-youtube-lounge-xsrf-token"]=I:delete a.J["x-youtube-lounge-xsrf-token"]},G1z=function(a){g.u7.call(this); this.V=a();this.V.subscribe("webChannelOpened",this.CV,this);this.V.subscribe("webChannelClosed",this.onClosed,this);this.V.subscribe("webChannelError",this.onError,this);this.V.subscribe("webChannelMessage",this.onMessage,this)},yPG=function(a,I,U,e,T){function C(){return new MXz(Dv(a,"/bc"),I,!1,U,e)} U=U===void 0?function(){return""}:U; return g.ik("enable_mdx_web_channel_desktop")?new G1z(function(){return new YX4(Dv(a,"/wc"),I,U)}):new fem(C,T)},w2J=function(){var a=Edz; dOG();vH.push(a);RmG()},ap=function(a,I){dOG(); var U=Fhd(a,String(I));vH.length==0?mOo(U):(RmG(),g.Gm(vH,function(e){e(U)}))},Ip=function(a){ap("CP",a)},dOG=function(){vH||(vH=g.NL("yt.mdx.remote.debug.handlers_")||[],g.hj("yt.mdx.remote.debug.handlers_",vH))},mOo=function(a){var I=(s1+1)%50; s1=I;U1[I]=a;es||(es=I==49)},RmG=function(){var a=vH; if(U1[0]){var I=es?s1:-1,U={};do U={NI:void 0},I=(I+1)%50,U.NI=U1[I],g.Gm(a,function(e){return function(T){T(e.NI)}}(U)); while(I!=s1);U1=Array(50);s1=-1;es=!1}},Fhd=function(a,I){var U=(Date.now()-Q7J)/1E3; U.toFixed&&(U=U.toFixed(3));var e=[];e.push("[",U+"s","] ");e.push("[","yt.mdx.remote","] ");e.push(a+": "+I,"\n");return e.join("")},TO=function(a){g.J_.call(this); this.Y=a;this.screens=[]},zmd=function(a,I){var U=a.get(I.uuid)||a.get(I.id); if(U)return a=U.name,U.id=I.id||U.id,U.name=I.name,U.token=I.token,U.uuid=I.uuid||U.uuid,U.name!=a;a.screens.push(I);return!0},hmz=function(a,I){var U=a.screens.length!=I.length; a.screens=g.Sa(a.screens,function(C){return!!tRm(I,C)}); for(var e=I.length,T=0;T0&&a.J0&&Vm(a,U)},function(I){a.U=function(){}; a.Im(I)})},i5Q=function(a){var I={}; I.pairingCode=a.tU;I.theme=a.CO;$t4()&&(I.env_useStageMdx=1);return g.PY(I)},LYJ=function(a){return new Promise(function(I){a.tU=xt4(); if(a.zt){var U=new chrome.cast.DialLaunchResponse(!0,i5Q(a));I(U);$NG(a)}else a.Va=function(){g.M6(a.j);a.Va=function(){}; a.j=NaN;var e=new chrome.cast.DialLaunchResponse(!0,i5Q(a));I(e);$NG(a)},a.j=g.Vz(function(){a.Va()},100)})},ckG=function(a,I,U){a.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(I)); var e=new Cw(I);return(new Promise(function(T){gLo(a,e,function(C){C?(a.gw=!0,tZ(a.J,e),Kv(a,e),Vm(a,U)):g.I0(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(I)+" is not online."));T(C)},5)})).then(function(T){return T?new chrome.cast.DialLaunchResponse(!1):LYJ(a)})},WYQ=function(a,I){var U=a.D.receiver.label,e=a.L.friendlyName; return(new Promise(function(T){rkG(a.J,U,I,e,function(C){C&&C.token&&Kv(a,C);T(C)},function(C){bn(a,"Failed to get DIAL screen: "+C); T(null)})})).then(function(T){return T&&T.token?new chrome.cast.DialLaunchResponse(!1):LYJ(a)})},gLo=function(a,I,U,e){g.M6(a.Y); a.Y=0;qPd(a.J,I,function(T){T||e<0?U(T):a.Y=g.Vz(function(){gLo(a,I,U,e-1)},300)})},Vm=function(a,I){a.info("getDialAppInfoWithTimeout_ "+I); ky(a)&&(g.M6(a.C),a.C=0,I==0?lM8(a):a.C=g.Vz(function(){lM8(a)},I))},lM8=function(a){ky(a)&&a.B.getDialAppInfo(function(I){a.info("getDialAppInfo dialLaunchData: "+JSON.stringify(I)); I=I.extraData||{};var U=null;if(I.loungeToken){var e;((e=a.V)==null?void 0:e.token)==I.loungeToken&&(U="staleLoungeToken")}else U="missingLoungeToken";U?(a.e8=U,Vm(a,3E4)):(a.gw=!1,a.e8="unknown",nLz(a,I.loungeToken),Vm(a,I.loungeTokenRefreshIntervalMs))},function(I){a.info("getDialAppInfo error: "+I); a.e8="noLoungeTokenResponse";Vm(a,3E4)})},Bqd=function(a){g.M6(a.Y); a.Y=0;g.M6(a.C);a.C=0;a.U();a.U=function(){}; g.M6(a.j)},AZ=function(a,I){nv.call(this,a,I,"ManualSession"); this.B=g.Vz((0,g.e8)(this.hJ,this,null),150)},Mi=function(a,I){g.J_.call(this); this.config_=I;this.L=a;this.D=I.appId||"233637DE";this.J=I.theme||"cl";this.j=I.disableCastApi||!1;this.Y=I.forceMirroring||!1;this.V=null;this.C=!1;this.B=[];this.U=(0,g.e8)(this.jss,this)},XG8=function(a,I){return I?g.Jz(a.B,function(U){return ro(I,U.label)},a):null},js=function(a){ap("Controller",a)},Edz=function(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)},$y=function(a){return a.C||!!a.B.length||!!a.V},Lv=function(a,I,U){I!=a.V&&(g.Kf(a.V),(a.V=I)?(U?a.publish("yt-remote-cast2-receiver-resumed", I.L):a.publish("yt-remote-cast2-receiver-selected",I.L),I.subscribe("sessionScreen",(0,g.e8)(a.rW,a,I)),I.subscribe("sessionFailed",function(){return PiD(a,I)}),I.V?a.publish("yt-remote-cast2-session-change",I.V):U&&a.V.hJ(null)):a.publish("yt-remote-cast2-session-change",null))},PiD=function(a,I){a.V==I&&a.publish("yt-remote-cast2-session-failed")},pGD=function(a){var I=a.L.iX(),U=a.V&&a.V.L; a=g.FX(I,function(e){U&&ro(e,U.label)&&(U=null);var T=e.uuid?e.uuid:e.id,C=XG8(this,e);C?(C.label=T,C.friendlyName=e.name):(C=new chrome.cast.Receiver(T,e.name),C.receiverType=chrome.cast.ReceiverType.CUSTOM);return C},a); U&&(U.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(U=new chrome.cast.Receiver(U.label,U.friendlyName),U.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(U));return a},ELQ=function(a,I,U,e){e.disableCastApi?gi("Cannot initialize because disabled by Mdx config."):fMD()?YP4(I,e)&&(O5o(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?SP4(a,U):(window.__onGCastApiAvailable=function(T,C){T?SP4(a,U):(cu("Failed to load cast API: "+C),Gtd(!1),O5o(!1),g.da("yt-remote-cast-available"),g.da("yt-remote-cast-receiver"), ykd(),U(!1))},e.loadCastApiSetupScript?g.K5("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?L0z()>=60&&f9z():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?l9d():L0z()>=89?OdD():(pkQ(),Ji(YVz.map(Bad))))):gi("Cannot initialize because not running Chrome")},ykd=function(){gi("dispose"); var a=Wu();a&&a.dispose();g.hj("yt.mdx.remote.cloudview.instance_",null);dNQ(!1);g.tk(RTQ);RTQ.length=0},ln=function(){return!!g.EV("yt-remote-cast-installed")},wGD=function(){var a=g.EV("yt-remote-cast-receiver"); return a?a.friendlyName:null},FYf=function(){gi("clearCurrentReceiver"); g.da("yt-remote-cast-receiver")},mNd=function(){return ln()?Wu()?Wu().getCastSession():(cu("getCastSelector: Cast is not initialized."),null):(cu("getCastSelector: Cast API is not installed!"),null)},Qbj=function(){ln()?Wu()?Bu()?(gi("Requesting cast selector."),Wu().requestSession()):(gi("Wait for cast API to be ready to request the session."),RTQ.push(g.ZM("yt-remote-cast2-api-ready",Qbj))):cu("requestCastSelector: Cast is not initialized."):cu("requestCastSelector: Cast API is not installed!")}, XC=function(a,I){Bu()?Wu().setConnectedScreenStatus(a,I):cu("setConnectedScreenStatus called before ready.")},fMD=function(){var a=g.gO().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.GK||a},zTG=function(a,I){Wu().init(a,I)},YP4=function(a,I){var U=!1; Wu()||(a=new Mi(a,I),a.subscribe("yt-remote-cast2-availability-change",function(e){g.yy("yt-remote-cast-available",e);Kw("yt-remote-cast2-availability-change",e)}),a.subscribe("yt-remote-cast2-receiver-selected",function(e){gi("onReceiverSelected: "+e.friendlyName); g.yy("yt-remote-cast-receiver",e);Kw("yt-remote-cast2-receiver-selected",e)}),a.subscribe("yt-remote-cast2-receiver-resumed",function(e){gi("onReceiverResumed: "+e.friendlyName); g.yy("yt-remote-cast-receiver",e);Kw("yt-remote-cast2-receiver-resumed",e)}),a.subscribe("yt-remote-cast2-session-change",function(e){gi("onSessionChange: "+HH(e)); e||g.da("yt-remote-cast-receiver");Kw("yt-remote-cast2-session-change",e)}),g.hj("yt.mdx.remote.cloudview.instance_",a),U=!0); gi("cloudview.createSingleton_: "+U);return U},Wu=function(){return g.NL("yt.mdx.remote.cloudview.instance_")},SP4=function(a,I){Gtd(!0); O5o(!1);zTG(a,function(U){U?(dNQ(!0),g.n5("yt-remote-cast2-api-ready")):(cu("Failed to initialize cast API."),Gtd(!1),g.da("yt-remote-cast-available"),g.da("yt-remote-cast-receiver"),ykd());I(U)})},gi=function(a){ap("cloudview",a)},cu=function(a){ap("cloudview",a)},Gtd=function(a){gi("setCastInstalled_ "+a); g.yy("yt-remote-cast-installed",a)},Bu=function(){return!!g.NL("yt.mdx.remote.cloudview.apiReady_")},dNQ=function(a){gi("setApiReady_ "+a); g.hj("yt.mdx.remote.cloudview.apiReady_",a)},O5o=function(a){g.hj("yt.mdx.remote.cloudview.initializing_",a)},Pu=function(a){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.Y=this.C=0;this.trackData=null;this.n1=this.Mk=!1;this.D=this.U=this.V=this.J=0;this.B=NaN;this.L=!1;this.reset(a)},hTz=function(a){a.audioTrackId=null; a.trackData=null;a.playerState=-1;a.Mk=!1;a.n1=!1;a.C=0;a.Y=g.rd();a.J=0;a.V=0;a.U=0;a.D=0;a.B=NaN;a.L=!1},pv=function(a){return a.isPlaying()?(g.rd()-a.Y)/1E3:0},fv=function(a,I){a.C=I; a.Y=g.rd()},Yy=function(a){switch(a.playerState){case 1:case 1081:return(g.rd()-a.Y)/1E3+a.C; case -1E3:return 0}return a.C},O1=function(a,I,U){var e=a.videoId; a.videoId=I;a.index=U;I!=e&&hTz(a)},Nqf=function(a){var I={}; I.index=a.index;I.listId=a.listId;I.videoId=a.videoId;I.playerState=a.playerState;I.volume=a.volume;I.muted=a.muted;I.audioTrackId=a.audioTrackId;I.trackData=g.UG(a.trackData);I.hasPrevious=a.Mk;I.hasNext=a.n1;I.playerTime=a.C;I.playerTimeAt=a.Y;I.seekableStart=a.J;I.seekableEnd=a.V;I.duration=a.U;I.loadedTime=a.D;I.liveIngestionTime=a.B;return I},GO=function(a,I){g.J_.call(this); var U=this;this.B=0;this.J=a;this.Y=[];this.U=new udo;this.L=this.V=null;this.j=(0,g.e8)(this.KnO,this);this.C=(0,g.e8)(this.lO,this);this.D=(0,g.e8)(this.tMX,this);this.Va=(0,g.e8)(this.oYm,this);var e=0;a?(e=a.getProxyState(),e!=3&&(a.subscribe("proxyStateChange",this.iM,this),oLf(this))):e=3;e!=0&&(I?this.iM(e):g.Vz(function(){U.iM(e)},0)); (a=mNd())&&Ss(this,a);this.subscribe("yt-remote-cast2-session-change",this.Va)},ym=function(a){return new Pu(a.J.getPlayerContextData())},oLf=function(a){g.Gm("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(I){this.Y.push(this.J.subscribe(I,g.Co(this.lcw,I),this))},a)},DND=function(a){g.Gm(a.Y,function(I){this.J.unsubscribeByKey(I)},a); a.Y.length=0},E1=function(a){return a.getState()==1},di=function(a,I){var U=a.U; U.V.length+U.L.length<50&&a.U.enqueue(I)},vLz=function(a,I,U){var e=ym(a); fv(e,U);e.playerState!=-1E3&&(e.playerState=I);Rp(a,e)},wi=function(a,I,U){a.J.sendMessage(I,U)},Rp=function(a,I){DND(a); a.J.setPlayerContextData(Nqf(I));oLf(a)},Ss=function(a,I){a.L&&(a.L.removeUpdateListener(a.j),a.L.removeMediaListener(a.C),a.lO(null)); a.L=I;a.L&&(Ip("Setting cast session: "+a.L.sessionId),a.L.addUpdateListener(a.j),a.L.addMediaListener(a.C),a.L.media.length&&a.lO(a.L.media[0]))},awz=function(a){var I=a.V.media,U=a.V.customData; if(I&&U){var e=ym(a);I.contentId!=e.videoId&&Ip("Cast changing video to: "+I.contentId);e.videoId=I.contentId;e.playerState=U.playerState;fv(e,a.V.getEstimatedTime());Rp(a,e)}else Ip("No cast media video. Ignoring state update.")},FC=function(a,I,U){return(0,g.e8)(function(e){this.O1("Failed to "+I+" with cast v2 channel. Error code: "+e.code); e.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.O1("Retrying "+I+" using MDx browser channel."),wi(this,I,U))},a)},zO=function(a,I,U,e){e=e===void 0?!1:e; g.J_.call(this);var T=this;this.Y=NaN;this.tU=!1;this.j=this.D=this.gw=this.e8=NaN;this.Va=[];this.U=this.C=this.J=this.V=this.L=null;this.zt=a;this.Ux=e;this.Va.push(g.Wk(window,"beforeunload",function(){T.VZ(2)})); this.B=[];this.V=new Pu;this.CO=I.id;this.dw=I.idType;this.L=yPG(this.zt,U,this.Bd,this.dw=="shortLived",this.CO);this.L.listen("channelOpened",function(){IwI(T)}); this.L.listen("channelClosed",function(){mE("Channel closed");isNaN(T.Y)?ti(!0):ti();T.dispose()}); this.L.listen("channelError",function(C){ti();isNaN(T.P7())?(C==1&&T.dw=="shortLived"&&T.publish("browserChannelAuthError",C),mE("Channel error: "+C+" without reconnection"),T.dispose()):(T.tU=!0,mE("Channel error: "+C+" with reconnection in "+T.P7()+" ms"),Qm(T,2))}); this.L.listen("channelMessage",function(C){sSj(T,C)}); this.L.VO(I.token);this.subscribe("remoteQueueChange",function(){var C=T.V.videoId;g.R$()&&g.yy("yt-remote-session-video-id",C)})},UJd=function(a){return g.Jz(a.B,function(I){return I.type=="LOUNGE_SCREEN"})},mE=function(a){ap("conn",a)},Qm=function(a,I){a.publish("proxyStateChange",I)},enz=function(a){a.Y=g.Vz(function(){mE("Connecting timeout"); a.VZ(1)},2E4)},T1o=function(a){g.M6(a.Y); a.Y=NaN},CfD=function(a){g.M6(a.e8); a.e8=NaN},HFo=function(a){rEz(a); a.gw=g.Vz(function(){hZ(a,"getNowPlaying")},2E4)},rEz=function(a){g.M6(a.gw); a.gw=NaN},IwI=function(a){mE("Channel opened"); a.tU&&(a.tU=!1,CfD(a),a.e8=g.Vz(function(){mE("Timing out waiting for a screen.");a.VZ(1)},15E3))},xJm=function(a,I){var U=null; if(I){var e=UJd(a);e&&(U={clientName:e.clientName,deviceMake:e.brand,deviceModel:e.model,osVersion:e.osVersion})}g.hj("yt.mdx.remote.remoteClient_",U);I&&(T1o(a),CfD(a));U=a.L.oP()&&isNaN(a.Y);I==U?I&&(Qm(a,1),hZ(a,"getSubtitlesTrack")):I?(a.Mq()&&a.V.reset(),Qm(a,1),hZ(a,"getNowPlaying"),q0m(a)):a.VZ(1)},ZFo=function(a,I){var U=I.params.videoId; delete I.params.videoId;U==a.V.videoId&&(g.vo(I.params)?a.V.trackData=null:a.V.trackData=I.params,a.publish("remotePlayerChange"))},tdG=function(a,I,U){var e=I.params.videoId||I.params.video_id,T=parseInt(I.params.currentIndex,10); a.V.listId=I.params.listId||a.V.listId;O1(a.V,e,T);a.publish("remoteQueueChange",U)},Kx8=function(a,I){I.params=I.params||{}; tdG(a,I,"NOW_PLAYING_MAY_CHANGE");nbI(a,I);a.publish("autoplayDismissed")},nbI=function(a,I){var U=parseInt(I.params.currentTime||I.params.current_time,10); fv(a.V,isNaN(U)?0:U);U=parseInt(I.params.state,10);U=isNaN(U)?-1:U;U==-1&&a.V.playerState==-1E3&&(U=-1E3);a.V.playerState=U;U=Number(I.params.loadedTime);a.V.D=isNaN(U)?0:U;a.V.oE(Number(I.params.duration));U=a.V;var e=Number(I.params.liveIngestionTime);U.B=e;U.L=isNaN(e)?!1:!0;U=a.V;e=Number(I.params.seekableStartTime);I=Number(I.params.seekableEndTime);U.J=isNaN(e)?0:e;U.V=isNaN(I)?0:I;a.V.playerState==1?HFo(a):rEz(a);a.publish("remotePlayerChange")},bFG=function(a,I){if(a.V.playerState!=-1E3){var U= 1085; switch(parseInt(I.params.adState,10)){case 1:U=1081;break;case 2:U=1084;break;case 0:U=1083}a.V.playerState=U;I=parseInt(I.params.currentTime,10);fv(a.V,isNaN(I)?0:I);a.publish("remotePlayerChange")}},JEm=function(a,I){var U=I.params.muted=="true"; a.V.volume=parseInt(I.params.volume,10);a.V.muted=U;a.publish("remotePlayerChange")},uf4=function(a,I){a.C=I.params.videoId; a.publish("nowAutoplaying",parseInt(I.params.timeout,10))},k9z=function(a,I){a.C=I.params.videoId||null; a.publish("autoplayUpNext",a.C)},Vdo=function(a,I){a.U=I.params.autoplayMode; a.publish("autoplayModeChange",a.U);a.U=="DISABLED"&&a.publish("autoplayDismissed")},AEd=function(a,I){var U=I.params.hasNext=="true"; a.V.Mk=I.params.hasPrevious=="true";a.V.n1=U;a.publish("previousNextChange")},sSj=function(a,I){I=I.message; I.params?mE("Received: action="+I.action+", params="+g.m4(I.params)):mE("Received: action="+I.action+" {}");switch(I.action){case "loungeStatus":I=aZ(I.params.devices);a.B=g.FX(I,function(e){return new TZ(e)}); I=!!g.Jz(a.B,function(e){return e.type=="LOUNGE_SCREEN"}); xJm(a,I);I=a.qZ("mlm");a.publish("multiStateLoopEnabled",I);break;case "loungeScreenDisconnected":g.Md(a.B,function(e){return e.type=="LOUNGE_SCREEN"}); xJm(a,!1);break;case "remoteConnected":var U=new TZ(aZ(I.params.device));g.Jz(a.B,function(e){return e.NF(U)})||V18(a.B,U); break;case "remoteDisconnected":U=new TZ(aZ(I.params.device));g.Md(a.B,function(e){return e.NF(U)}); break;case "gracefulDisconnect":break;case "playlistModified":tdG(a,I,"QUEUE_MODIFIED");break;case "nowPlaying":Kx8(a,I);break;case "onStateChange":nbI(a,I);break;case "onAdStateChange":bFG(a,I);break;case "onVolumeChanged":JEm(a,I);break;case "onSubtitlesTrackChanged":ZFo(a,I);break;case "nowAutoplaying":uf4(a,I);break;case "autoplayDismissed":a.publish("autoplayDismissed");break;case "autoplayUpNext":k9z(a,I);break;case "onAutoplayModeChanged":Vdo(a,I);break;case "onHasPreviousNextChanged":AEd(a, I);break;case "requestAssistedSignIn":a.publish("assistedSignInRequested",I.params.authCode);break;case "onLoopModeChanged":a.publish("loopModeChange",I.params.loopMode);break;default:mE("Unrecognized action: "+I.action)}},q0m=function(a){g.M6(a.j); a.j=g.Vz(function(){a.VZ(1)},864E5)},hZ=function(a,I,U){U?mE("Sending: action="+I+", params="+g.m4(U)):mE("Sending: action="+I); a.L.sendMessage(I,U)},MdG=function(a){TO.call(this,"ScreenServiceProxy"); this.vX=a;this.V=[];this.V.push(this.vX.$_s("screenChange",(0,g.e8)(this.Dp,this)));this.V.push(this.vX.$_s("onlineScreenChange",(0,g.e8)(this.gw8,this)))},gb8=function(a,I){j$I(); if(!nw||!nw.get("yt-remote-disable-remote-module-for-dev")){I=g.D5("MDX_CONFIG")||I;n3J();uUd();Ni||(Ni=new oZ(I?I.loungeApiHost:void 0),$t4()&&(Ni.V="/api/loungedev"));op||(op=g.NL("yt.mdx.remote.deferredProxies_")||[],g.hj("yt.mdx.remote.deferredProxies_",op));jSo();var U=Dh();if(!U){var e=new Zh(Ni,I?I.disableAutomaticScreenCache||!1:!1);g.hj("yt.mdx.remote.screenService_",e);U=Dh();var T={};I&&(T={appId:I.appId,disableDial:I.disableDial,theme:I.theme,loadCastApiSetupScript:I.loadCastApiSetupScript, disableCastApi:I.disableCastApi,enableDialLoungeToken:I.enableDialLoungeToken,enableCastLoungeToken:I.enableCastLoungeToken,forceMirroring:I.forceMirroring});g.hj("yt.mdx.remote.enableConnectWithInitialState_",I?I.enableConnectWithInitialState||!1:!1);ELQ(a,e,function(C){C?vu()&&XC(vu(),"YouTube TV"):e.subscribe("onlineScreenChange",function(){Kw("yt-remote-receiver-availability-change")})},T)}I&&!g.NL("yt.mdx.remote.initialized_")&&(g.hj("yt.mdx.remote.initialized_",!0),aG("Initializing: "+g.m4(I)), IG.push(g.ZM("yt-remote-cast2-api-ready",function(){Kw("yt-remote-api-ready")})),IG.push(g.ZM("yt-remote-cast2-availability-change",function(){Kw("yt-remote-receiver-availability-change")})),IG.push(g.ZM("yt-remote-cast2-receiver-selected",function(){sI(null); Kw("yt-remote-auto-connect","cast-selector-receiver")})),IG.push(g.ZM("yt-remote-cast2-receiver-resumed",function(){Kw("yt-remote-receiver-resumed","cast-selector-receiver")})),IG.push(g.ZM("yt-remote-cast2-session-change",$Jz)),IG.push(g.ZM("yt-remote-connection-change",function(C){C?XC(vu(),"YouTube TV"):UI()||(XC(null,null),FYf())})),IG.push(g.ZM("yt-remote-cast2-session-failed",function(){Kw("yt-remote-connection-failed")})),a=iF8(),I.isAuto&&(a.id+="#dial"),T=I.capabilities||[],g.ik("desktop_enable_autoplay")&& T.push("atp"),T.length>0&&(a.capabilities=T),a.name=I.device,a.app=I.app,(I=I.theme)&&(a.theme=I),aG(" -- with channel params: "+g.m4(a)),a?(g.yy("yt-remote-session-app",a.app),g.yy("yt-remote-session-name",a.name)):(g.da("yt-remote-session-app"),g.da("yt-remote-session-name")),g.hj("yt.mdx.remote.channelParams_",a),U.start(),vu()||Lxd())}},cEd=function(){var a=Dh().vX.$_gos(); var I=eE();I&&T2()&&(tRm(a,I)||a.push(I));return Zdd(a)},lwo=function(){var a=WxQ(); !a&&ln()&&wGD()&&(a={key:"cast-selector-receiver",name:wGD()});return a},WxQ=function(){var a=cEd(),I=eE(); I||(I=UI());return g.Jz(a,function(U){return I&&ro(I,U.key)?!0:!1})},eE=function(){var a=vu(); if(!a)return null;var I=Dh().m$();return qV(I,a)},$Jz=function(a){aG("remote.onCastSessionChange_: "+HH(a)); if(a){var I=eE();if(I&&I.id==a.id){if(XC(I.id,"YouTube TV"),a.idType=="shortLived"&&(a=a.token))Cy&&(Cy.token=a),(I=T2())&&I.VO(a)}else I&&r7(),H9(a,1)}else T2()&&r7()},r7=function(){Bu()?Wu().stopSession():cu("stopSession called before API ready."); var a=T2();a&&(a.disconnect(1),B1J(null))},X$J=function(){var a=T2(); return!!a&&a.getProxyState()!=3},aG=function(a){ap("remote",a)},Dh=function(){if(!PfJ){var a=g.NL("yt.mdx.remote.screenService_"); PfJ=a?new MdG(a):null}return PfJ},vu=function(){return g.NL("yt.mdx.remote.currentScreenId_")},p$8=function(a){g.hj("yt.mdx.remote.currentScreenId_",a)},fwG=function(){return g.NL("yt.mdx.remote.connectData_")},sI=function(a){g.hj("yt.mdx.remote.connectData_",a)},T2=function(){return g.NL("yt.mdx.remote.connection_")},B1J=function(a){var I=T2(); sI(null);a||p$8("");g.hj("yt.mdx.remote.connection_",a);op&&(g.Gm(op,function(U){U(a)}),op.length=0); I&&!a?Kw("yt-remote-connection-change",!1):!I&&a&&Kw("yt-remote-connection-change",!0)},UI=function(){var a=g.R$(); if(!a)return null;var I=Dh();if(!I)return null;I=I.m$();return qV(I,a)},H9=function(a,I){vu(); eE()&&eE();if(q2)Cy=a;else{p$8(a.id);var U=g.NL("yt.mdx.remote.enableConnectWithInitialState_")||!1;a=new zO(Ni,a,iF8(),U);a.connect(I,fwG());a.subscribe("beforeDisconnect",function(e){Kw("yt-remote-before-disconnect",e)}); a.subscribe("beforeDispose",function(){T2()&&(T2(),B1J(null))}); a.subscribe("browserChannelAuthError",function(){var e=eE();e&&e.idType=="shortLived"&&(Bu()?Wu().handleBrowserChannelAuthError():cu("refreshLoungeToken called before API ready."))}); B1J(a)}},Lxd=function(){var a=UI(); a?(aG("Resume connection to: "+HH(a)),H9(a,0)):(ti(),FYf(),aG("Skipping connecting because no session screen found."))},jSo=function(){var a=iF8(); if(g.vo(a)){a=Zv();var I=g.EV("yt-remote-session-name")||"",U=g.EV("yt-remote-session-app")||"";a={device:"REMOTE_CONTROL",id:a,name:I,app:U,mdxVersion:3};a.authuser=String(g.D5("SESSION_INDEX","0"));(I=g.D5("DELEGATED_SESSION_ID"))&&(a.pageId=String(I));g.hj("yt.mdx.remote.channelParams_",a)}},iF8=function(){return g.NL("yt.mdx.remote.channelParams_")||{}},S0j=function(a,I,U){g.S.call(this); var e=this;this.V=a;this.K=I;this.dL=U;this.events=new g.Ru(this);this.U=!1;this.Y=new g.xP(64);this.L=new g.Dy(this.z_,500,this);this.B=new g.Dy(this.Uz,1E3,this);this.D=new ub(this.ULa,0,this);this.J={};this.j=new g.Dy(this.zV,1E3,this);this.C=new g.e_(this.seekTo,1E3,this);this.Va=this.events.G(this.K,"onVolumeChange",function(T){Y08(e,T)}); g.E(this,this.events);this.events.G(I,"onCaptionsTrackListChanged",this.Fns);this.events.G(I,"captionschanged",this.hIg);this.events.G(I,"captionssettingschanged",this.Ho);this.events.G(I,"videoplayerreset",this.g0);this.events.G(I,"mdxautoplaycancel",function(){e.dL.Hn()}); I.N("enable_mdx_video_play_directly")&&this.events.G(I,"videodatachange",function(){OFf(e.V)||x0(e)||Zr(e,0)}); a=this.dL;a.Ox();a.subscribe("proxyStateChange",this.GY,this);a.subscribe("remotePlayerChange",this.sj,this);a.subscribe("remoteQueueChange",this.g0,this);a.subscribe("previousNextChange",this.NG,this);a.subscribe("nowAutoplaying",this.wW,this);a.subscribe("autoplayDismissed",this.RH,this);g.E(this,this.L);g.E(this,this.B);g.E(this,this.D);g.E(this,this.j);g.E(this,this.C);this.Ho();this.g0();this.sj()},Y08=function(a,I){if(x0(a)){a.dL.unsubscribe("remotePlayerChange",a.sj,a); var U=Math.round(I.volume);I=!!I.muted;var e=ym(a.dL);if(U!==e.volume||I!==e.muted)a.dL.setVolume(U,I),a.j.start();a.dL.subscribe("remotePlayerChange",a.sj,a)}},G9j=function(a){a.Cv(0); a.L.stop();a.eM(new g.xP(64))},yEJ=function(a,I){if(x0(a)&&!a.U){var U=null; I&&(U={style:a.K.getSubtitlesUserSettings()},Object.assign(U,I));a.dL.gY(a.K.getVideoData(1).videoId,U);a.J=g.O(ym(a.dL).trackData)}},Zr=function(a,I){var U=a.K.getPlaylist(); if(U==null?0:U.listId){var e=U.index;var T=U.listId.toString()}U=a.K.getVideoData(1);a.dL.playVideo(U.videoId,I,e,T,U.playerParams,U.Ux,kv4(U));a.eM(new g.xP(1))},EbJ=function(a,I){if(I){var U=a.K.getOption("captions","tracklist",{U0:1}); U&&U.length?(a.K.setOption("captions","track",I),a.U=!1):(a.K.loadModule("captions"),a.U=!0)}else a.K.setOption("captions","track",{})},x0=function(a){return ym(a.dL).videoId===a.K.getVideoData(1).videoId},dJ8=function(a){this.V=a},tx=function(){g.F.call(this,{W:"div", T:"ytp-mdx-popup-dialog",S:{role:"dialog"},Z:[{W:"div",T:"ytp-mdx-popup-dialog-inner-content",Z:[{W:"div",T:"ytp-mdx-popup-title",AU:"Vous \u00eates d\u00e9connect\u00e9"},{W:"div",T:"ytp-mdx-popup-description",AU:"Les vid\u00e9os que vous visionnez peuvent \u00eatre ajout\u00e9es \u00e0 l'historique des vid\u00e9os regard\u00e9es sur votre t\u00e9l\u00e9viseur et avoir une influence sur les recommandations qui vous sont faites. Pour \u00e9viter ce probl\u00e8me, annulez et connectez-vous \u00e0 YouTube sur un ordinateur."}, {W:"div",T:"ytp-mdx-privacy-popup-buttons",Z:[{W:"button",ww:["ytp-button","ytp-mdx-privacy-popup-cancel"],AU:"Annuler"},{W:"button",ww:["ytp-button","ytp-mdx-privacy-popup-confirm"],AU:"Confirmer"}]}]}]});this.fade=new g.qq(this,250);this.cancelButton=this.Ws("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.Ws("ytp-mdx-privacy-popup-confirm");g.E(this,this.fade);this.G(this.cancelButton,"click",this.V);this.G(this.confirmButton,"click",this.L)},ny=function(a){g.F.call(this,{W:"div", T:"ytp-remote",Z:[{W:"div",T:"ytp-remote-display-status",Z:[{W:"div",T:"ytp-remote-display-status-icon",Z:[g.ZGw()]},{W:"div",T:"ytp-remote-display-status-text",AU:"{{statustext}}"}]}]});this.api=a;this.fade=new g.qq(this,250);g.E(this,this.fade);this.G(a,"presentingplayerstatechange",this.onStateChange);this.FQ(a.getPlayerStateObject())},Ky=function(a,I){g.p4.call(this,"Lire sur",1,a,I); this.K=a;this.sF={};this.G(a,"onMdxReceiversChange",this.J);this.G(a,"presentingplayerstatechange",this.J);this.J()},Rnz=function(a){g.nu.call(this,a); this.Sr={key:xt4(),name:"Cet ordinateur"};this.C3=null;this.subscriptions=[];this.AP=this.dL=null;this.sF=[this.Sr];this.DT=this.Sr;this.Gn=new g.xP(64);this.xK=0;this.b7=-1;this.wZ=!1;this.m9=this.Y7=this.jT=null;if(!g.Rd(this.player.X())&&!g.FT(this.player.X())){a=this.player;var I=g.Lh(a);I&&(I=I.uZ())&&(I=new Ky(a,I),g.E(this,I));I=new ny(a);g.E(this,I);g.w4(a,I.element,4);this.jT=new tx;g.E(this,this.jT);g.w4(a,this.jT.element,4);this.wZ=!!UI()}},b0=function(a){a.Y7&&(a.player.removeEventListener("presentingplayerstatechange", a.Y7),a.Y7=null)},w$m=function(a,I,U){a.Gn=U; a.player.publish("presentingplayerstatechange",new g.AV(U,I))},Jx=function(a,I){if(I.key!==a.DT.key)if(I.key===a.Sr.key)r7(); else if(OFf(a)&&FxD(a),a.DT=I,!a.player.X().N("disable_mdx_connection_in_mdx_module_for_music_web")||!g.FT(a.player.X())){var U=a.player.getPlaylistId();var e=a.player.getVideoData(1);var T=e.videoId;if(!U&&!T||(a.player.getAppState()===2||a.player.getAppState()===1)&&a.player.X().N("should_clear_video_data_on_player_cued_unstarted"))e=null;else{var C=a.player.getPlaylist();if(C){var r=[];for(var q=0;q2*this.size&&et(this),!0):!1}; g.H.get=function(a,I){return sQ(this.L,a)?this.L[a]:I}; g.H.set=function(a,I){sQ(this.L,a)||(this.size+=1,this.V.push(a),this.XZ++);this.L[a]=I}; g.H.forEach=function(a,I){for(var U=this.Vq(),e=0;e=e.V.length)return g.Ty;var C=e.V[I++];return g.pf(a?C:e.L[C])}; return T}; var e7m={yaa:"atp",eQa:"ska",GR$:"que",SV6:"mus",Ana:"sus",wG6:"dsp",uta:"seq",QVX:"mic",H$X:"dpa",FtX:"cds",PQw:"mlm",TKx:"dsdtr",n2x:"ntb",n0g:"vsp",IHU:"scn",QM8:"rpe",NKg:"dcn",CWU:"dcp",WrX:"pas",aH8:"drq",RLO:"opf",F98:"els",Smm:"isg",cjg:"svq",Z3U:"mvp",SK$:"ads",wFs:"stcp",saU:"sads",MlX:"dloc"},TaI={l4a:"u",i$K:"cl",e5$:"k",yiO:"i",oka:"cr",F6X:"m",L$a:"g",o3:"up"},Lho={I8:"adPlaying",gt:"onAdStateChange"},gdo={Eba:"nowPlaying",gb8:"onStateChange",I8:"adPlaying",gt:"onAdStateChange",R3:"nowPlayingShorts", L6:"onShortsStateChange"},cPm={R3:"nowPlayingShorts",L6:"onShortsStateChange"};TZ.prototype.NF=function(a){return a?this.id==a.id:!1}; var JTI="",nw=null;ido.prototype.flush=function(a,I){a=a===void 0?[]:a;I=I===void 0?!1:I;if(g.ik("enable_client_streamz_web")){a=g.k(a);for(var U=a.next();!U.done;U=a.next())U=g.NUb(U.value),U={serializedIncrementBatch:g.Iq(U.L())},g.JL("streamzIncremented",U,{sendIsolatedPayload:I})}}; var bb,PRm=g38("loadCastFramework")||g38("loadCastApplicationFramework"),YVz=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.qd(ub,g.S);g.H=ub.prototype;g.H.Wy=function(a){this.J=arguments;this.V=!1;this.ZN?this.B=g.rd()+this.g6:this.ZN=g.dJ(this.U,this.g6)}; g.H.stop=function(){this.ZN&&(g.zs.clearTimeout(this.ZN),this.ZN=null);this.B=null;this.V=!1;this.J=[]}; g.H.pause=function(){++this.L}; g.H.resume=function(){this.L&&(--this.L,!this.L&&this.V&&(this.V=!1,this.Y.apply(null,this.J)))}; g.H.Bs=function(){this.stop();ub.tT.Bs.call(this)}; g.H.tp=function(){this.ZN&&(g.zs.clearTimeout(this.ZN),this.ZN=null);this.B?(this.ZN=g.dJ(this.U,this.B-g.rd()),this.B=null):this.L?this.V=!0:(this.V=!1,this.Y.apply(null,this.J))};kZ.prototype.stringify=function(a){return g.zs.JSON.stringify(a,void 0)}; kZ.prototype.parse=function(a){return g.zs.JSON.parse(a,void 0)};g.qd(SVD,g.aI);g.qd(G8Q,g.aI);var yTJ=null;g.qd(dtD,g.aI);g.qd(R78,g.aI);g.qd(wko,g.aI);jt.prototype.debug=function(){}; jt.prototype.info=function(){}; jt.prototype.warning=function(){};var Dtf={},o3m={};g.H=$Z.prototype;g.H.setTimeout=function(a){this.xa=a}; g.H.o2=function(a){a=a.target;var I=this.fO;I&&g.Dj(a)==3?I.A5():this.Q9(a)}; g.H.Q9=function(a){try{if(a==this.V)a:{var I=g.Dj(this.V),U=this.V.L,e=this.V.getStatus();if(!(I<3)&&(I!=3||this.V&&(this.L.L||g.aM(this.V)||g.IM(this.V)))){this.Ux||I!=4||U==7||(U==8||e<=0?Vg(3):Vg(2));Inf(this);var T=this.V.getStatus();this.Vo=T;var C=Nam(this);if(this.Y=T==200){if(this.B8&&!this.a$){b:{if(this.V){var r=g.sy(this.V,"X-HTTP-Initial-Response");if(r&&!g.ur(r)){var q=r;break b}}q=null}if(a=q)this.a$=!0,xko(this,a);else{this.Y=!1;this.U=3;Ai(12);Lw(this);go(this);break a}}if(this.dw){a= !0;for(var x;!this.Ux&&this.C0&&!this.hN&&(this.hN=!0,this.B.dI(this)):(Lw(this),go(this))}else xko(this,C);I==4&&Lw(this);this.Y&&!this.Ux&&(I==4?sBI(this.B,this):(this.Y=!1,ib(this)))}else g.A3q(this.V),T==400&&C.indexOf("Unknown SID")> 0?(this.U=3,Ai(12)):(this.U=0,Ai(13)),Lw(this),go(this)}}}catch(Z){}finally{}}; g.H.cancel=function(){this.Ux=!0;Lw(this)}; g.H.KV=function(){this.Va=null;var a=Date.now();a-this.i5>=0?(this.CO!=2&&(Vg(3),Ai(17)),Lw(this),this.U=2,go(this)):and(this,this.i5-a)}; g.H.getLastError=function(){return this.U}; g.H.CB=function(){return this.V};tNG.prototype.cancel=function(){this.B=Kf4(this);if(this.L)this.L.cancel(),this.L=null;else if(this.V&&this.V.size!==0){for(var a=g.k(this.V.values()),I=a.next();!I.done;I=a.next())I.value.cancel();this.V.clear()}};g.H=VNo.prototype;g.H.fA=8;g.H.R9=1;g.H.connect=function(a,I,U,e){Ai(0);this.rF=a;this.Ux=I||{};U&&e!==void 0&&(this.Ux.OSID=U,this.Ux.OAID=e);this.a$=this.F1;this.zt=rLj(this,null,this.rF);BH(this)}; g.H.disconnect=function(){MNd(this);if(this.R9==3){var a=this.Z6++,I=this.zt.clone();g.bv(I,"SID",this.J);g.bv(I,"RID",a);g.bv(I,"TYPE","terminate");pw(this,I);a=new $Z(this,this.J,a);a.CO=2;a.D=DA(I.clone());I=!1;if(g.zs.navigator&&g.zs.navigator.sendBeacon)try{I=g.zs.navigator.sendBeacon(a.D.toString(),"")}catch(U){}!I&&g.zs.Image&&((new Image).src=a.D,I=!0);I||(a.V=z78(a.B,null),a.V.send(a.D));a.e8=Date.now();ib(a)}cLd(this)}; g.H.AS=function(){return this.R9==0}; g.H.getState=function(){return this.R9}; g.H.y9=function(a){if(this.Y)if(this.Y=null,this.R9==1){if(!a){this.Z6=Math.floor(Math.random()*1E5);a=this.Z6++;var I=new $Z(this,"",a),U=this.j;this.Vo&&(U?(U=g.sG(U),g.ep(U,this.Vo)):U=this.Vo);this.C!==null||this.i5||(I.zt=U,U=null);var e;if(this.E7)a:{for(var T=e=0;T4096){e=T;break a}if(e===4096||T===this.B.length-1){e=T+1;break a}}e= 1E3}else e=1E3;e=iGG(this,I,e);T=this.zt.clone();g.bv(T,"RID",a);g.bv(T,"CVER",22);this.dw&&g.bv(T,"X-HTTP-Session-Id",this.dw);pw(this,T);U&&(this.i5?e="headers="+g.b9(g.S2s(U))+"&"+e:this.C&&g.VT(T,this.C,U));C_D(this.L,I);this.XY&&g.bv(T,"TYPE","init");this.E7?(g.bv(T,"$req",e),g.bv(T,"SID","null"),I.B8=!0,Q$J(I,T,null)):Q$J(I,T,e);this.R9=2}}else this.R9==3&&(a?LfI(this,a):this.B.length==0||nGz(this.L)||LfI(this))}; g.H.rj=function(){this.D=null;gGd(this);if(this.IF&&!(this.xa||this.V==null||this.wL<=0)){var a=2*this.wL;this.tU=MV((0,g.e8)(this.eIO,this),a)}}; g.H.eIO=function(){this.tU&&(this.tU=null,this.a$=!1,this.xa=!0,Ai(10),WH(this),gGd(this))}; g.H.dI=function(a){this.V==a&&this.IF&&!this.xa&&(ALf(this),this.xa=!0,Ai(11))}; g.H.Ym=function(){this.Va!=null&&(this.Va=null,WH(this),eSG(this),Ai(19))}; g.H.s9$=function(a){a?Ai(2):Ai(1)}; g.H.isActive=function(){return!!this.U&&this.U.isActive(this)}; g.H=lno.prototype;g.H.Pf=function(){}; g.H.XA=function(){}; g.H.De=function(){}; g.H.qd=function(){}; g.H.isActive=function(){return!0}; g.H.b1=function(){};g.qd(YZ,g.u7);YZ.prototype.open=function(){this.V.U=this.B;this.Y&&(this.V.CO=!0);this.V.connect(this.U,this.L||void 0)}; YZ.prototype.close=function(){this.V.disconnect()}; YZ.prototype.send=function(a){var I=this.V;if(typeof a==="string"){var U={};U.__data__=a;a=U}else this.J&&(U={},U.__data__=g.m4(a),a=U);I.B.push(new ZGo(I.q2++,a));I.R9==3&&BH(I)}; YZ.prototype.Bs=function(){this.V.U=null;delete this.B;this.V.disconnect();delete this.V;YZ.tT.Bs.call(this)}; g.qd(XzQ,SVD);g.qd(P_z,G8Q);g.qd(fw,lno);fw.prototype.Pf=function(){this.V.dispatchEvent("m")}; fw.prototype.XA=function(a){this.V.dispatchEvent(new XzQ(a))}; fw.prototype.De=function(a){this.V.dispatchEvent(new P_z(a))}; fw.prototype.qd=function(){this.V.dispatchEvent("n")};var St=new g.u7;g.u(Yvo,g.aI);g.H=yg.prototype;g.H.nG=null;g.H.bG=!1;g.H.Km=null;g.H.TU=null;g.H.vR=null;g.H.Ek=null;g.H.ph=null;g.H.jk=null;g.H.c6=null;g.H.UM=null;g.H.Rb=0;g.H.xp=null;g.H.iT=null;g.H.jE=null;g.H.O2=-1;g.H.n8=!0;g.H.U2=!1;g.H.Mf=0;g.H.nK=null;var dko={},EGf={};g.H=yg.prototype;g.H.setTimeout=function(a){this.L=a}; g.H.pV=function(a){a=a.target;var I=this.nK;I&&g.Dj(a)==3?I.A5():this.Ze(a)}; g.H.Ze=function(a){try{if(a==this.UM)a:{var I=g.Dj(this.UM),U=this.UM.L,e=this.UM.getStatus();if(g.hl&&!g.cA("420+")){if(I<4)break a}else if(I<3||I==3&&!g.aM(this.UM))break a;this.U2||I!=4||U==7||(U==8||e<=0?this.V.QT(3):this.V.QT(2));Fff(this);var T=this.UM.getStatus();this.O2=T;var C=g.aM(this.UM);if(this.bG=T==200){I==4&&EQ(this);if(this.dw){for(a=!0;!this.U2&&this.Rb0?(this.jE=3,GZ(13)):(this.jE=0,GZ(14)),EQ(this),mkQ(this)}}catch(q){}finally{}}; g.H.cancel=function(){this.U2=!0;EQ(this)}; g.H.z$=function(){this.Km=null;var a=Date.now();a-this.TU>=0?(this.Ek!=2&&this.V.QT(3),EQ(this),this.jE=2,GZ(18),mkQ(this)):wzd(this,this.TU-a)}; g.H.getLastError=function(){return this.jE};g.H=Nzd.prototype;g.H.H9=null;g.H.vG=null;g.H.r0=!1;g.H.f9=null;g.H.wU=null;g.H.Zq=-1;g.H.VJ=null;g.H.QI=null;g.H.connect=function(a){this.f9=a;a=wo(this.V,null,this.f9);GZ(3);Date.now();var I=this.V.j;I!=null?(this.VJ=I[0],(this.QI=I[1])?(this.wU=1,oGj(this)):(this.wU=2,Dko(this))):(vv(a,"MODE","init"),this.vG=new yg(this),this.vG.nG=this.H9,GMo(this.vG,a,!1,null,!0),this.wU=0)}; g.H.c_=function(a){if(a)this.wU=2,Dko(this);else{GZ(4);var I=this.V;I.EU=I.yO.Zq;zZ(I,9)}a&&this.QT(2)}; g.H.GU=function(a){return this.V.GU(a)}; g.H.abort=function(){this.vG&&(this.vG.cancel(),this.vG=null);this.Zq=-1}; g.H.AS=function(){return!1}; g.H.Sy=function(a,I){this.Zq=a.O2;if(this.wU==0)if(I){try{var U=this.L.parse(I)}catch(e){a=this.V;a.EU=this.Zq;zZ(a,2);return}this.VJ=U[0];this.QI=U[1]}else a=this.V,a.EU=this.Zq,zZ(a,2);else this.wU==2&&(this.r0?(GZ(7),Date.now()):I=="11111"?(GZ(6),this.r0=!0,Date.now(),this.Zq=200,this.vG.cancel(),GZ(12),Fx(this.V,this,!0)):(GZ(8),Date.now(),this.r0=!1))}; g.H.Qu=function(){this.Zq=this.vG.O2;if(this.vG.bG)this.wU==0?this.QI?(this.wU=1,oGj(this)):(this.wU=2,Dko(this)):this.wU==2&&(this.r0?(GZ(12),Fx(this.V,this,!0)):(GZ(11),Fx(this.V,this,!1)));else{this.wU==0?GZ(9):this.wU==2&&GZ(10);var a=this.V;this.vG.getLastError();a.EU=this.Zq;zZ(a,2)}}; g.H.Np=function(){return this.V.Np()}; g.H.isActive=function(){return this.V.isActive()}; g.H.QT=function(a){this.V.QT(a)};g.H=vG8.prototype;g.H.bQ=null;g.H.Ch=null;g.H.H1=null;g.H.dV=null;g.H.yu=null;g.H.gG=null;g.H.FA=null;g.H.rN=null;g.H.Mp=0;g.H.O5=0;g.H.Vt=null;g.H.z0=null;g.H.SB=null;g.H.ib=null;g.H.yO=null;g.H.L9=null;g.H.Yx=-1;g.H.Io=-1;g.H.EU=-1;g.H.ol=0;g.H.dn=0;g.H.Es=8;g.qd(Iej,g.aI);g.qd(s7d,g.aI);g.H=vG8.prototype;g.H.connect=function(a,I,U,e,T){GZ(0);this.yu=I;this.Ch=U||{};e&&T!==void 0&&(this.Ch.OSID=e,this.Ch.OAID=T);this.D?(OQ((0,g.e8)(this.hV,this,a),100),emz(this)):this.hV(a)}; g.H.disconnect=function(){TGQ(this);if(this.V==3){var a=this.Mp++,I=this.gG.clone();g.bv(I,"SID",this.J);g.bv(I,"RID",a);g.bv(I,"TYPE","terminate");Qg(this,I);a=new yg(this,this.J,a);a.Ek=2;a.ph=DA(I.clone());(new Image).src=a.ph.toString();a.vR=Date.now();yLD(a)}bOf(this)}; g.H.hV=function(a){this.yO=new Nzd(this);this.yO.H9=this.bQ;this.yO.L=this.U;this.yO.connect(a)}; g.H.AS=function(){return this.V==0}; g.H.getState=function(){return this.V}; g.H.uq=function(a){this.z0=null;xOz(this,a)}; g.H.mx=function(){this.SB=null;this.dV=new yg(this,this.J,"rpc",this.C);this.dV.nG=this.bQ;this.dV.Mf=0;var a=this.FA.clone();g.bv(a,"RID","rpc");g.bv(a,"SID",this.J);g.bv(a,"CI",this.L9?"0":"1");g.bv(a,"AID",this.Yx);Qg(this,a);g.bv(a,"TYPE","xmlhttp");GMo(this.dV,a,!0,this.rN,!1)}; g.H.Sy=function(a,I){if(this.V!=0&&(this.dV==a||this.H1==a))if(this.EU=a.O2,this.H1==a&&this.V==3)if(this.Es>7){try{var U=this.U.parse(I)}catch(e){U=null}if(Array.isArray(U)&&U.length==3)if(a=U,a[0]==0)a:{if(!this.SB){if(this.dV)if(this.dV.vR+3E30)){if(e=I==1)this.H1||this.z0||this.V==1||this.ol>=2?e=!1:(this.z0=OQ((0,g.e8)(this.uq,this,a),tX8(this,this.ol)),this.ol++, e=!0);e=!(e||I==2&&nd4(this))}if(e)switch(U){case 1:zZ(this,5);break;case 4:zZ(this,10);break;case 3:zZ(this,6);break;case 7:zZ(this,12);break;default:zZ(this,2)}}}; g.H.U5=function(a){if(!g.kJ(arguments,this.V))throw Error("Unexpected channel state: "+this.V);}; g.H.inx=function(a){a?GZ(2):(GZ(1),KhJ(this,8))}; g.H.GU=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new g.hM;a.C=!1;return a}; g.H.isActive=function(){return!!this.Vt&&this.Vt.isActive(this)}; g.H.QT=function(a){var I=St;I.dispatchEvent(new s7d(I,a))}; g.H.Np=function(){return!1}; g.H=JP4.prototype;g.H.nA=function(){}; g.H.xF=function(){}; g.H.jy=function(){}; g.H.lq=function(){}; g.H.qf=function(){}; g.H.E8=function(){return{}}; g.H.isActive=function(){return!0};g.H=udo.prototype;g.H.enqueue=function(a){this.L.push(a)}; g.H.isEmpty=function(){return this.V.length===0&&this.L.length===0}; g.H.clear=function(){this.V=[];this.L=[]}; g.H.contains=function(a){return g.kJ(this.V,a)||g.kJ(this.L,a)}; g.H.remove=function(a){var I=this.V;var U=(0,g.TdG)(I,a);U>=0?(g.VG(I,U),I=!0):I=!1;return I||g.Az(this.L,a)}; g.H.ZK=function(){for(var a=[],I=this.V.length-1;I>=0;--I)a.push(this.V[I]);I=this.L.length;for(var U=0;U=mJm.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(a=mJm[this.L],this.ZN=g.Vz((0,g.e8)(this.K8,this),a),this.L++):this.publish("pairingFailed",Error("Server error "+a.status))}; g.H.G$=function(){this.V=null;this.publish("pairingFailed",Error("Server not responding"))}; var mJm=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.qd(ri,TO);g.H=ri.prototype;g.H.start=function(){Cv(this)&&this.publish("screenChange");!g.EV("yt-remote-lounge-token-expiration")&&DOd(this);g.M6(this.V);this.V=g.Vz((0,g.e8)(this.start,this),1E4)}; g.H.add=function(a,I){Cv(this);zmd(this,a);Hu(this,!1);this.publish("screenChange");I(a);a.token||DOd(this)}; g.H.remove=function(a,I){var U=Cv(this);NGj(this,a)&&(Hu(this,!1),U=!0);I(a);U&&this.publish("screenChange")}; g.H.Vu=function(a,I,U,e){var T=Cv(this),C=this.get(a.id);C?(C.name!=I&&(C.name=I,Hu(this,!1),T=!0),U(a)):e(Error("no such local screen."));T&&this.publish("screenChange")}; g.H.Bs=function(){g.M6(this.V);ri.tT.Bs.call(this)}; g.H.KKO=function(a){Cv(this);var I=this.screens.length;a=a&&a.screens||[];for(var U=a.length,e=0;e20)break a;q=I(C,r)}C=q}T.name=C}U(tZ(this,T))},this), onError:(0,g.e8)(function(T){e(Error("pairing request failed: "+T.status))},this), onTimeout:(0,g.e8)(function(){e(Error("pairing request timed out."))},this)})}; g.H.Bs=function(){g.Kf(this.L);g.Kf(this.V);Zh.tT.Bs.call(this)}; g.H.vaa=function(){xNo(this);this.publish("screenChange");this.V.update()}; Zh.prototype.dispose=Zh.prototype.dispose;g.qd(nv,g.J_);g.H=nv.prototype;g.H.Im=function(a){this.Ox()||(a&&(bn(this,""+a),this.publish("sessionFailed")),this.V=null,this.publish("sessionScreen",null))}; g.H.info=function(a){ap(this.dw,a)}; g.H.RY=function(){return null}; g.H.nf=function(a){var I=this.L;a?(I.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),I.displayStatus.showStop=!0):I.displayStatus=null;chrome.cast.setReceiverDisplayStatus(I,(0,g.e8)(function(){this.info("Updated receiver status for "+I.friendlyName+": "+a)},this),(0,g.e8)(function(){bn(this,"Failed to update receiver status for: "+I.friendlyName)},this))}; g.H.Bs=function(){this.nf("");nv.tT.Bs.call(this)};g.u(JZ,nv);g.H=JZ.prototype;g.H.l9=function(a){if(this.B){if(this.B==a)return;bn(this,"Overriding cast session with new session object");jbJ(this);this.e8=!1;this.j="unknown";this.B.removeUpdateListener(this.gw);this.B.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.tU)}this.B=a;this.B.addUpdateListener(this.gw);this.B.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.tU);uMo(this,"getMdxSessionStatus")}; g.H.hJ=function(a){this.info("launchWithParams no-op for Cast: "+g.m4(a))}; g.H.stop=function(){this.B?this.B.stop((0,g.e8)(function(){this.Im()},this),(0,g.e8)(function(){this.Im(Error("Failed to stop receiver app."))},this)):this.Im(Error("Stopping cast device without session."))}; g.H.nf=function(){}; g.H.Bs=function(){this.info("disposeInternal");jbJ(this);this.B&&(this.B.removeUpdateListener(this.gw),this.B.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.tU));this.B=null;nv.prototype.Bs.call(this)}; g.H.x2x=function(a,I){if(!this.Ox())if(I)if(I=aZ(I),g.If(I))switch(a=""+I.type,I=I.data||{},this.info("onYoutubeMessage_: "+a+" "+g.m4(I)),a){case "mdxSessionStatus":KYI(this,I);break;case "loungeToken":kt8(this,I);break;default:bn(this,"Unknown youtube message: "+a)}else bn(this,"Unable to parse message.");else bn(this,"No data in message.")}; g.H.fZ=function(a,I,U,e){g.M6(this.D);this.D=0;rkG(this.J,this.L.label,a,this.L.friendlyName,(0,g.e8)(function(T){T?I(T):e>=0?(bn(this,"Screen "+a+" appears to be offline. "+e+" retries left."),this.D=g.Vz((0,g.e8)(this.fZ,this,a,I,U,e-1),300)):U(Error("Unable to fetch screen."))},this),U)}; g.H.RY=function(){return this.B}; g.H.Qc=function(a){this.Ox()||a||(bn(this,"Cast session died."),this.Im())};g.u(un,nv);g.H=un.prototype;g.H.l9=function(a){this.B=a;this.B.addUpdateListener(this.Ux)}; g.H.hJ=function(a){this.zt=a;this.Va()}; g.H.stop=function(){Bqd(this);this.B?this.B.stop((0,g.e8)(this.Im,this,null),(0,g.e8)(this.Im,this,"Failed to stop DIAL device.")):this.Im()}; g.H.Bs=function(){Bqd(this);this.B&&this.B.removeUpdateListener(this.Ux);this.B=null;nv.prototype.Bs.call(this)}; g.H.fV=function(a){this.Ox()||a||(bn(this,"DIAL session died."),this.U(),this.U=function(){},this.Im())};g.u(AZ,nv);AZ.prototype.stop=function(){this.Im()}; AZ.prototype.l9=function(){}; AZ.prototype.hJ=function(){g.M6(this.B);this.B=NaN;var a=qV(this.J.m$(),this.L.label);a?Kv(this,a):this.Im(Error("No such screen"))}; AZ.prototype.Bs=function(){g.M6(this.B);this.B=NaN;nv.prototype.Bs.call(this)};g.u(Mi,g.J_);g.H=Mi.prototype; g.H.init=function(a,I){chrome.cast.timeout.requestSession=3E4;var U=new chrome.cast.SessionRequest(this.D,[chrome.cast.Capability.AUDIO_OUT]);g.ik("desktop_enable_cast_connect")&&(U.androidReceiverCompatible=!0);this.j||(U.dialRequest=new chrome.cast.DialRequest("YouTube"));var e=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;a=a||this.Y?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var T=(0,g.e8)(this.iF8,this);U=new chrome.cast.ApiConfig(U,(0,g.e8)(this.Q2, this),T,e,a);U.customDialLaunchCallback=(0,g.e8)(this.vYa,this);chrome.cast.initialize(U,(0,g.e8)(function(){this.Ox()||(chrome.cast.addReceiverActionListener(this.U),w2J(),this.L.subscribe("onlineScreenChange",(0,g.e8)(this.V6,this)),this.B=pGD(this),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.e8)(function(C){this.O1("Failed to set initial custom receivers: "+g.m4(C))},this)),this.publish("yt-remote-cast2-availability-change",$y(this)),I(!0))},this),(0,g.e8)(function(C){this.O1("Failed to initialize API: "+ g.m4(C)); I(!1)},this))}; g.H.WZm=function(a,I){js("Setting connected screen ID: "+a+" -> "+I);if(this.V){var U=this.V.V;if(!a||U&&U.id!=a)js("Unsetting old screen status: "+this.V.L.friendlyName),Lv(this,null)}if(a&&I){if(!this.V){a=qV(this.L.m$(),a);if(!a){js("setConnectedScreenStatus: Unknown screen.");return}if(a.idType=="shortLived"){js("setConnectedScreenStatus: Screen with id type to be short lived.");return}U=XG8(this,a);U||(js("setConnectedScreenStatus: Connected receiver not custom..."),U=new chrome.cast.Receiver(a.uuid? a.uuid:a.id,a.name),U.receiverType=chrome.cast.ReceiverType.CUSTOM,this.B.push(U),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.e8)(function(e){this.O1("Failed to set initial custom receivers: "+g.m4(e))},this))); js("setConnectedScreenStatus: new active receiver: "+U.friendlyName);Lv(this,new AZ(this.L,U),!0)}this.V.nf(I)}else js("setConnectedScreenStatus: no screen.")}; g.H.oL$=function(a){this.Ox()?this.O1("Setting connection data on disposed cast v2"):this.V?this.V.hJ(a):this.O1("Setting connection data without a session")}; g.H.yc=function(){this.Ox()?this.O1("Stopping session on disposed cast v2"):this.V?(this.V.stop(),Lv(this,null)):js("Stopping non-existing session")}; g.H.requestSession=function(){chrome.cast.requestSession((0,g.e8)(this.Q2,this),(0,g.e8)(this.z3O,this))}; g.H.Bs=function(){this.L.unsubscribe("onlineScreenChange",(0,g.e8)(this.V6,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.U);var a=Edz,I=g.NL("yt.mdx.remote.debug.handlers_");g.Az(I||[],a);g.Kf(this.V);g.J_.prototype.Bs.call(this)}; g.H.O1=function(a){ap("Controller",a)}; g.H.rW=function(a,I){this.V==a&&(I||Lv(this,null),this.publish("yt-remote-cast2-session-change",I))}; g.H.jss=function(a,I){if(!this.Ox())if(a)switch(a.friendlyName=chrome.cast.unescape(a.friendlyName),js("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+I),I){case chrome.cast.ReceiverAction.CAST:if(this.V)if(this.V.L.label!=a.label)js("onReceiverAction_: Stopping active receiver: "+this.V.L.friendlyName),this.V.stop();else{js("onReceiverAction_: Casting to active receiver.");this.V.V&&this.publish("yt-remote-cast2-session-change",this.V.V);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:Lv(this, new AZ(this.L,a));break;case chrome.cast.ReceiverType.DIAL:Lv(this,new un(this.L,a,this.J,this.config_));break;case chrome.cast.ReceiverType.CAST:Lv(this,new JZ(this.L,a,this.config_));break;default:this.O1("Unknown receiver type: "+a.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.V&&this.V.L.label==a.label?this.V.stop():this.O1("Stopping receiver w/o session: "+a.friendlyName)}else this.O1("onReceiverAction_ called without receiver.")}; g.H.vYa=function(a){if(this.Ox())return Promise.reject(Error("disposed"));var I=a.receiver;I.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.O1("Not DIAL receiver: "+I.friendlyName),I.receiverType=chrome.cast.ReceiverType.DIAL);var U=this.V?this.V.L:null;if(!U||U.label!=I.label)return this.O1("Receiving DIAL launch request for non-clicked DIAL receiver: "+I.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(U&&U.label==I.label&&U.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.V.V)return js("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.V.V),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.O1('Changing CAST intent from "'+U.receiverType+'" to "dial" for '+I.friendlyName);Lv(this,new un(this.L,I,this.J,this.config_))}I=this.V;I.D=a;I.D.appState==chrome.cast.DialAppState.RUNNING?(a=I.D.extraData||{},U=a.screenId||null,ky(I)&&a.loungeToken?a.loungeTokenRefreshIntervalMs?a=ckG(I,{name:I.L.friendlyName,screenId:a.screenId,loungeToken:a.loungeToken,dialId:I.D.receiver.label, screenIdType:"shortLived"},a.loungeTokenRefreshIntervalMs):(g.I0(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(a)+".")),a=WYQ(I,U)):a=WYQ(I,U)):a=LYJ(I);return a}; g.H.Q2=function(a){var I=this;if(!this.Ox()&&!this.Y){js("New cast session ID: "+a.sessionId);var U=a.receiver;if(U.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.V)if(U.receiverType==chrome.cast.ReceiverType.CAST)js("Got resumed cast session before resumed mdx connection."),U.friendlyName=chrome.cast.unescape(U.friendlyName),Lv(this,new JZ(this.L,U,this.config_),!0);else{this.O1("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var e=this.V.L,T=qV(this.L.m$(), e.label);T&&ro(T,U.label)&&e.receiverType!=chrome.cast.ReceiverType.CAST&&U.receiverType==chrome.cast.ReceiverType.CAST&&(js("onSessionEstablished_: manual to cast session change "+U.friendlyName),g.Kf(this.V),this.V=new JZ(this.L,U,this.config_),this.V.subscribe("sessionScreen",(0,g.e8)(this.rW,this,this.V)),this.V.subscribe("sessionFailed",function(){return PiD(I,I.V)}),this.V.hJ(null)); this.V.l9(a)}}}; g.H.ra=function(){return this.V?this.V.RY():null}; g.H.z3O=function(a){this.Ox()||(this.O1("Failed to estabilish a session: "+g.m4(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&Lv(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.H.iF8=function(a){js("Receiver availability updated: "+a);if(!this.Ox()){var I=$y(this);this.C=a==chrome.cast.ReceiverAvailability.AVAILABLE;$y(this)!=I&&this.publish("yt-remote-cast2-availability-change",$y(this))}}; g.H.V6=function(){this.Ox()||(this.B=pGD(this),js("Updating custom receivers: "+g.m4(this.B)),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.e8)(function(){this.O1("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",$y(this)))}; Mi.prototype.setLaunchParams=Mi.prototype.oL$;Mi.prototype.setConnectedScreenStatus=Mi.prototype.WZm;Mi.prototype.stopSession=Mi.prototype.yc;Mi.prototype.getCastSession=Mi.prototype.ra;Mi.prototype.requestSession=Mi.prototype.requestSession;Mi.prototype.init=Mi.prototype.init;Mi.prototype.dispose=Mi.prototype.dispose;var RTQ=[];g.H=Pu.prototype; g.H.reset=function(a){this.listId="";this.index=-1;this.videoId="";hTz(this);this.volume=-1;this.muted=!1;a&&(this.index=a.index,this.listId=a.listId,this.videoId=a.videoId,this.playerState=a.playerState,this.volume=a.volume,this.muted=a.muted,this.audioTrackId=a.audioTrackId,this.trackData=a.trackData,this.Mk=a.hasPrevious,this.n1=a.hasNext,this.C=a.playerTime,this.Y=a.playerTimeAt,this.J=a.seekableStart,this.V=a.seekableEnd,this.U=a.duration,this.D=a.loadedTime,this.B=a.liveIngestionTime,this.L= !isNaN(this.B))}; g.H.isPlaying=function(){return this.playerState==1}; g.H.isBuffering=function(){return this.playerState==3}; g.H.jp=function(){return this.playerState==1081}; g.H.oE=function(a){this.U=isNaN(a)?0:a}; g.H.getDuration=function(){return this.L?this.U+pv(this):this.U}; g.H.clone=function(){return new Pu(Nqf(this))};g.u(GO,g.J_);g.H=GO.prototype;g.H.getState=function(){return this.B}; g.H.gy=function(){return this.J.getReconnectTimeout()}; g.H.pk=function(){this.J.reconnect()}; g.H.play=function(){E1(this)?(this.V?this.V.play(null,g.KM,FC(this,"play")):wi(this,"play"),vLz(this,1,Yy(ym(this))),this.publish("remotePlayerChange")):di(this,this.play)}; g.H.pause=function(){E1(this)?(this.V?this.V.pause(null,g.KM,FC(this,"pause")):wi(this,"pause"),vLz(this,2,Yy(ym(this))),this.publish("remotePlayerChange")):di(this,this.pause)}; g.H.seekTo=function(a){if(E1(this)){if(this.V){var I=ym(this),U=new chrome.cast.media.SeekRequest;U.currentTime=a;I.isPlaying()||I.isBuffering()?U.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:U.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.V.seek(U,g.KM,FC(this,"seekTo",{newTime:a}))}else wi(this,"seekTo",{newTime:a});vLz(this,3,a);this.publish("remotePlayerChange")}else di(this,g.Co(this.seekTo,a))}; g.H.stop=function(){if(E1(this)){this.V?this.V.stop(null,g.KM,FC(this,"stopVideo")):wi(this,"stopVideo");var a=ym(this);a.index=-1;a.videoId="";hTz(a);Rp(this,a);this.publish("remotePlayerChange")}else di(this,this.stop)}; g.H.setVolume=function(a,I){if(E1(this)){var U=ym(this);if(this.L){if(U.volume!=a){var e=Math.round(a)/100;this.L.setReceiverVolumeLevel(e,(0,g.e8)(function(){Ip("set receiver volume: "+e)},this),(0,g.e8)(function(){this.O1("failed to set receiver volume.")},this))}U.muted!=I&&this.L.setReceiverMuted(I,(0,g.e8)(function(){Ip("set receiver muted: "+I)},this),(0,g.e8)(function(){this.O1("failed to set receiver muted.")},this))}else{var T={volume:a, muted:I};U.volume!=-1&&(T.delta=a-U.volume);wi(this,"setVolume",T)}U.muted=I;U.volume=a;Rp(this,U)}else di(this,g.Co(this.setVolume,a,I))}; g.H.gY=function(a,I){if(E1(this)){var U=ym(this);a={videoId:a};I&&(U.trackData={trackName:I.name,languageCode:I.languageCode,sourceLanguageCode:I.translationLanguage?I.translationLanguage.languageCode:"",languageName:I.languageName,kind:I.kind},a.style=g.m4(I.style),g.ep(a,U.trackData));wi(this,"setSubtitlesTrack",a);Rp(this,U)}else di(this,g.Co(this.gY,a,I))}; g.H.setAudioTrack=function(a,I){E1(this)?(I=I.getLanguageInfo().getId(),wi(this,"setAudioTrack",{videoId:a,audioTrackId:I}),a=ym(this),a.audioTrackId=I,Rp(this,a)):di(this,g.Co(this.setAudioTrack,a,I))}; g.H.playVideo=function(a,I,U,e,T,C,r){e=e===void 0?null:e;T=T===void 0?null:T;C=C===void 0?null:C;r=r===void 0?null:r;var q=ym(this),x={videoId:a};U!==void 0&&(x.currentIndex=U);O1(q,a,U||0);I!==void 0&&(fv(q,I),x.currentTime=I);e&&(x.listId=e);T&&(x.playerParams=T);C&&(x.clickTrackingParams=C);r&&(x.locationInfo=g.m4(r));wi(this,"setPlaylist",x);e||Rp(this,q)}; g.H.M_=function(a,I){if(E1(this)){if(a&&I){var U=ym(this);O1(U,a,I);Rp(this,U)}wi(this,"previous")}else di(this,g.Co(this.M_,a,I))}; g.H.nextVideo=function(a,I){if(E1(this)){if(a&&I){var U=ym(this);O1(U,a,I);Rp(this,U)}wi(this,"next")}else di(this,g.Co(this.nextVideo,a,I))}; g.H.mw=function(){if(E1(this)){wi(this,"clearPlaylist");var a=ym(this);a.reset();Rp(this,a);this.publish("remotePlayerChange")}else di(this,this.mw)}; g.H.Hn=function(){E1(this)?wi(this,"dismissAutoplay"):di(this,this.Hn)}; g.H.dispose=function(){if(this.B!=3){var a=this.B;this.B=3;this.publish("proxyStateChange",a,this.B)}g.J_.prototype.dispose.call(this)}; g.H.Bs=function(){DND(this);this.J=null;this.U.clear();Ss(this,null);g.J_.prototype.Bs.call(this)}; g.H.iM=function(a){if((a!=this.B||a==2)&&this.B!=3&&a!=0){var I=this.B;this.B=a;this.publish("proxyStateChange",I,a);if(a==1)for(;!this.U.isEmpty();)I=a=this.U,I.V.length===0&&(I.V=I.L,I.V.reverse(),I.L=[]),a.V.pop().apply(this);else a==3&&this.dispose()}}; g.H.lcw=function(a,I){this.publish(a,I)}; g.H.KnO=function(a){if(!a)this.lO(null),Ss(this,null);else if(this.L.receiver.volume){a=this.L.receiver.volume;var I=ym(this),U=Math.round(100*a.level||0);if(I.volume!=U||I.muted!=a.muted)Ip("Cast volume update: "+a.level+(a.muted?" muted":"")),I.volume=U,I.muted=!!a.muted,Rp(this,I)}}; g.H.lO=function(a){Ip("Cast media: "+!!a);this.V&&this.V.removeUpdateListener(this.D);if(this.V=a)this.V.addUpdateListener(this.D),awz(this),this.publish("remotePlayerChange")}; g.H.tMX=function(a){a?(awz(this),this.publish("remotePlayerChange")):this.lO(null)}; g.H.GJ=function(){wi(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.H.oYm=function(){var a=mNd();a&&Ss(this,a)}; g.H.O1=function(a){ap("CP",a)};g.u(zO,g.J_);g.H=zO.prototype; g.H.connect=function(a,I){if(I){var U=I.listId,e=I.videoId,T=I.videoIds,C=I.playerParams,r=I.clickTrackingParams,q=I.index,x={videoId:e},Z=I.currentTime,t=I.locationInfo;I=I.loopMode;Z!==void 0&&(x.currentTime=Z<=5?0:Z);C&&(x.playerParams=C);t&&(x.locationInfo=t);r&&(x.clickTrackingParams=r);U&&(x.listId=U);T&&T.length>0&&(x.videoIds=T.join(","));q!==void 0&&(x.currentIndex=q);this.Ux&&(x.loopMode=I||"LOOP_MODE_OFF");U&&(this.V.listId=U);this.V.videoId=e;this.V.index=q||0;this.V.state=3;fv(this.V, Z);this.U="UNSUPPORTED";U=this.Ux?"setInitialState":"setPlaylist";mE("Connecting with "+U+" and params: "+g.m4(x));this.L.connect({method:U,params:g.m4(x)},a,k8d())}else mE("Connecting without params"),this.L.connect({},a,k8d());enz(this)}; g.H.VO=function(a){this.L.VO(a)}; g.H.dispose=function(){this.Ox()||(g.hj("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),Qm(this,3));g.J_.prototype.dispose.call(this)}; g.H.Bs=function(){T1o(this);rEz(this);CfD(this);g.M6(this.D);this.D=NaN;g.M6(this.j);this.j=NaN;this.J=null;g.lR(this.Va);this.Va.length=0;this.L.dispose();g.J_.prototype.Bs.call(this);this.U=this.C=this.B=this.V=this.L=null}; g.H.qZ=function(a){if(!this.B||this.B.length===0)return!1;for(var I=g.k(this.B),U=I.next();!U.done;U=I.next())if(!U.value.capabilities.has(a))return!1;return!0}; g.H.l8=function(){var a=3;this.Ox()||(a=0,isNaN(this.P7())?this.L.oP()&&isNaN(this.Y)&&(a=1):a=2);return a}; g.H.VZ=function(a){mE("Disconnecting with "+a);g.hj("yt.mdx.remote.remoteClient_",null);T1o(this);this.publish("beforeDisconnect",a);a==1&&ti();this.L.disconnect(a);this.dispose()}; g.H.Z3=function(){var a=this.V;this.J&&(a=this.V.clone(),O1(a,this.J,a.index));return Nqf(a)}; g.H.bcK=function(a){var I=this,U=new Pu(a);U.videoId&&U.videoId!=this.V.videoId&&(this.J=U.videoId,g.M6(this.D),this.D=g.Vz(function(){if(I.J){var T=I.J;I.J=null;I.V.videoId!=T&&hZ(I,"getNowPlaying")}},5E3)); var e=[];this.V.listId==U.listId&&this.V.videoId==U.videoId&&this.V.index==U.index||e.push("remoteQueueChange");this.V.playerState==U.playerState&&this.V.volume==U.volume&&this.V.muted==U.muted&&Yy(this.V)==Yy(U)&&g.m4(this.V.trackData)==g.m4(U.trackData)||e.push("remotePlayerChange");this.V.reset(a);g.Gm(e,function(T){this.publish(T)},this)}; g.H.Mq=function(){var a=this.L.getDeviceId(),I=g.Jz(this.B,function(U){return U.type=="REMOTE_CONTROL"&&U.id!=a}); return I?I.id:""}; g.H.P7=function(){return this.L.gy()}; g.H.OI=function(){return this.U||"UNSUPPORTED"}; g.H.vQ=function(){return this.C||""}; g.H.qN=function(){!isNaN(this.P7())&&this.L.pk()}; g.H.JSw=function(a,I){hZ(this,a,I);q0m(this)}; g.H.Bd=function(){var a=g.ET("SAPISID","")||g.ET("__Secure-1PAPISID")||"",I=g.ET("__Secure-3PAPISID","")||"";if(!a&&!I)return"";a=g.Iq(g.aq(a),2);I=g.Iq(g.aq(I),2);return g.Iq(g.aq(","+a+","+I),2)}; zO.prototype.subscribe=zO.prototype.subscribe;zO.prototype.unsubscribeByKey=zO.prototype.sK;zO.prototype.getProxyState=zO.prototype.l8;zO.prototype.disconnect=zO.prototype.VZ;zO.prototype.getPlayerContextData=zO.prototype.Z3;zO.prototype.setPlayerContextData=zO.prototype.bcK;zO.prototype.getOtherConnectedRemoteId=zO.prototype.Mq;zO.prototype.getReconnectTimeout=zO.prototype.P7;zO.prototype.getAutoplayMode=zO.prototype.OI;zO.prototype.getAutoplayVideoId=zO.prototype.vQ;zO.prototype.reconnect=zO.prototype.qN; zO.prototype.sendMessage=zO.prototype.JSw;zO.prototype.getXsrfToken=zO.prototype.Bd;zO.prototype.isCapabilitySupportedOnConnectedDevices=zO.prototype.qZ;g.u(MdG,TO);g.H=MdG.prototype;g.H.m$=function(a){return this.vX.$_gs(a)}; g.H.contains=function(a){return!!this.vX.$_c(a)}; g.H.get=function(a){return this.vX.$_g(a)}; g.H.start=function(){this.vX.$_st()}; g.H.add=function(a,I,U){this.vX.$_a(a,I,U)}; g.H.remove=function(a,I,U){this.vX.$_r(a,I,U)}; g.H.Vu=function(a,I,U,e){this.vX.$_un(a,I,U,e)}; g.H.Bs=function(){for(var a=this.V.length,I=0;I1&&!this.K.getOption("remote","quickCast")?(this.sF=g.yG(a,this.V,this),this.Mx(g.FX(a,this.V)),a=g.O(this.K.getOption("remote","currentReceiver")),a=this.V(a),this.options[a]&&this.Ln(a),this.enable(!0)):this.enable(!1)}; Ky.prototype.V=function(a){return a.key}; Ky.prototype.C1=function(a){return a==="cast-selector-receiver"?"Caster sur\u2026":this.sF[a].name}; Ky.prototype.o1=function(a){g.p4.prototype.o1.call(this,a);this.K.setOption("remote","currentReceiver",this.sF[a]);this.tN.v8()};g.u(Rnz,g.nu);g.H=Rnz.prototype; g.H.create=function(){var a=this.player.X(),I=g.dV(a);a={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:a.N("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:a.N("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:a.N("enable_cast_short_lived_lounge_token")};gb8(I,a);this.subscriptions.push(g.ZM("yt-remote-before-disconnect",this.Jhw,this));this.subscriptions.push(g.ZM("yt-remote-connection-change",this.sdU,this));this.subscriptions.push(g.ZM("yt-remote-receiver-availability-change",this.TY, this));this.subscriptions.push(g.ZM("yt-remote-auto-connect",this.ElU,this));this.subscriptions.push(g.ZM("yt-remote-receiver-resumed",this.c48,this));this.subscriptions.push(g.ZM("mdx-privacy-popup-confirm",this.pZx,this));this.subscriptions.push(g.ZM("mdx-privacy-popup-cancel",this.z1O,this));this.TY()}; g.H.load=function(){this.player.cancelPlayback();g.nu.prototype.load.call(this);this.m9=new dJ8(this);this.player.iD(this.m9);this.C3=new S0j(this,this.player,this.dL);var a=(a=fwG())?a.currentTime:0;var I=X$J()?new GO(g.O(T2()),void 0):null;a==0&&I&&(a=Yy(ym(I)));a!==0&&this.Cv(a);w$m(this,this.Gn,this.Gn);this.player.dP(6)}; g.H.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.fq();this.DT=this.Sr;g.bH(this.C3,this.dL);this.dL=this.m9=this.C3=null;g.nu.prototype.unload.call(this);this.player.dP(5);b0(this)}; g.H.Bs=function(){g.tk(this.subscriptions);g.nu.prototype.Bs.call(this)}; g.H.DD=function(a){var I=g.OS.apply(1,arguments);this.loaded&&this.C3.rK.apply(this.C3,[a].concat(g.A(I)))}; g.H.getAdState=function(){return this.b7}; g.H.Mk=function(){return this.dL?ym(this.dL).Mk:!1}; g.H.n1=function(){return this.dL?ym(this.dL).n1:!1}; g.H.Cv=function(a,I){this.xK=a||0;this.player.publish("progresssync",a,I);this.player.s9("onVideoProgress",a||0)}; g.H.getCurrentTime=function(){return this.xK}; g.H.getProgressState=function(){var a=ym(this.dL),I=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!a.jp()&&this.player.MV(),clipEnd:I.clipEnd,clipStart:I.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:a.getDuration(),ingestionTime:a.L?a.B+pv(a):a.B,isAtLiveHead:(a.L?a.V+pv(a):a.V)-this.getCurrentTime()<=1,loaded:a.D,seekableEnd:a.L?a.V+pv(a):a.V,seekableStart:a.J>0?a.J+pv(a):a.J,offset:0,viewerLivestreamJoinMediaTime:0}}; g.H.nextVideo=function(){this.dL&&this.dL.nextVideo()}; g.H.M_=function(){this.dL&&this.dL.M_()}; g.H.Jhw=function(a){a===1&&(this.AP=this.dL?ym(this.dL):null)}; g.H.sdU=function(){var a=X$J()?new GO(g.O(T2()),void 0):null;if(a){var I=this.DT;this.loaded&&this.unload();this.dL=a;this.AP=null;I.key!==this.Sr.key&&(this.DT=I,this.load())}else g.Kf(this.dL),this.dL=null,this.loaded&&(this.unload(),(a=this.AP)&&a.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(a.videoId,Yy(a)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.H.TY=function(){var a=[this.Sr],I=a.concat,U=cEd();ln()&&g.EV("yt-remote-cast-available")&&U.push({key:"cast-selector-receiver",name:"Cast..."});this.sF=I.call(a,U);a=lwo()||this.Sr;Jx(this,a);this.player.s9("onMdxReceiversChange")}; g.H.ElU=function(){var a=g.O(lwo());Jx(this,a)}; g.H.c48=function(){this.DT=g.O(lwo())}; g.H.pZx=function(){this.wZ=!0;b0(this);q2=!1;Cy&&H9(Cy,1);Cy=null}; g.H.z1O=function(){this.wZ=!1;b0(this);Jx(this,this.Sr);this.DT=this.Sr;q2=!1;Cy=null;this.player.playVideo()}; g.H.BB=function(a,I){switch(a){case "casting":return this.loaded;case "receivers":return this.sF;case "currentReceiver":return I&&(I.key==="cast-selector-receiver"?Qbj():Jx(this,I)),this.loaded?this.DT:this.Sr;case "quickCast":return this.sF.length===2&&this.sF[1].key==="cast-selector-receiver"?(I&&Qbj(),!0):!1}}; g.H.GJ=function(){this.dL.GJ()}; g.H.hj=function(){return!1}; g.H.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.H.isLoggedIn=function(){var a,I;return((a=g.D5("PLAYER_CONFIG"))==null?void 0:(I=a.args)==null?void 0:I.authuser)!==void 0?!0:!(!g.D5("SESSION_INDEX")&&!g.D5("LOGGED_IN"))};g.th("remote",Rnz);})(_yt_player);