(function(g){var window=this;'use strict';var tM=function(Q){g.Yl(Q,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.QA()).toString(36));return Q},QN=function(Q,W,x){Array.isArray(x)||(x=[String(x)]); g.Oy5(Q.N,W,x)},bvA=function(Q){if(Q instanceof g.DG)return Q; if(typeof Q.qk=="function")return Q.qk(!1);if(g.Ls(Q)){var W=0,x=new g.DG;x.next=function(){for(;;){if(W>=Q.length)return g.Mi;if(W in Q)return g.KZ(Q[W++]);W++}}; return x}throw Error("Not implemented");},s2s=function(Q,W,x){if(g.Ls(Q))g.o3(Q,W,x); else for(Q=bvA(Q);;){var D=Q.next();if(D.done)break;W.call(x,D.value,void 0,Q)}},z6s=function(Q,W){var x=[]; s2s(W,function(D){try{var K=g.AU.prototype.U.call(this,D,!0)}catch(l){if(l=="Storage: Invalid value was encountered")return;throw l;}K===void 0?x.push(D):g.MOz(K)&&x.push(D)},Q); return x},kKC=function(Q,W){z6s(Q,W).forEach(function(x){g.AU.prototype.remove.call(this,x)},Q)},XvY=function(Q){if(Q.uj){if(Q.uj.locationOverrideToken)return{locationOverrideToken:Q.uj.locationOverrideToken}; if(Q.uj.latitudeE7!=null&&Q.uj.longitudeE7!=null)return{latitudeE7:Q.uj.latitudeE7,longitudeE7:Q.uj.longitudeE7}}return null},oPA=function(Q,W){g.FH(Q,W)||Q.push(W)},uP1=function(Q){var W=0,x; for(x in Q)W++;return W},YbF=function(Q,W){return g.aZ(Q,W)},nPp=function(Q){try{return g.Nz.JSON.parse(Q)}catch(W){}Q=String(Q); if(/^\s*$/.test(Q)?0:/^[\],:{}\s\u2028\u2029]*$/.test(Q.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("("+Q+")")}catch(W){}throw Error("Invalid JSON string: "+Q);},WJ=function(Q){if(g.Nz.JSON)try{return g.Nz.JSON.parse(Q)}catch(W){}return nPp(Q)},VSH=function(Q){if(Q.dY&&typeof Q.dY=="function")return Q.dY(); if(typeof Map!=="undefined"&&Q instanceof Map||typeof Set!=="undefined"&&Q instanceof Set)return Array.from(Q.values());if(typeof Q==="string")return Q.split("");if(g.Ls(Q)){for(var W=[],x=Q.length,D=0;D1){if(x%2)throw Error("Uneven number of arguments");for(var D=0;D5&&(Q=Q.slice(Q.length-5)); var W=g.pm(XbH(),function(D){return D.loungeToken}),x=g.pm(Q,function(D){return D.loungeToken}); g.h8(x,function(D){return!g.FH(W,D)})&&o1A(); g.Ud("yt-remote-local-screens",Q,31536E3)},zg=function(Q){Q||(g.Bk("yt-remote-session-screen-id"),g.Bk("yt-remote-session-video-id")); zIk();Q=bH();g.Qn(Q,si());blu(Q)},YkJ=function(){if(!ko){var Q=g.Ir(); Q&&(ko=new g.ar(Q))}},n1u=function(){YkJ(); return ko?!!ko.get("yt-remote-use-staging-server"):!1},XL=function(Q,W){g.Dn[Q]=!0; var x=g.W$();x&&x.publish.apply(x,arguments);g.Dn[Q]=!1},VLY=function(){},xo=function(){if(!oa){oa=new g.pr(new VLY); var Q=g.vb("client_streamz_web_flush_count",-1);Q!==-1&&(oa.D=Q)}return oa},PYp=function(){var Q=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return Q?parseInt(Q[1],10):0},v1J=function(Q){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+Q)!=-1||document.currentScript.src.indexOf("&"+Q)!=-1)},CYe=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},uH=function(Q){Q.length?JS1(Q.shift(),function(){uH(Q)}):pbY()},hIC=function(Q){return"chrome-extension://"+Q+"/cast_sender.js"},JS1=function(Q,W,x){var D=document.createElement("script"); D.onerror=W;x&&(D.onload=x);g.ex(D,g.pv(Q));(document.head||document.documentElement).appendChild(D)},asu=function(){var Q=PYp(),W=[]; if(Q>1){var x=Q-1;W.push("//www.gstatic.com/eureka/clank/"+Q+"/cast_sender.js");W.push("//www.gstatic.com/eureka/clank/"+x+"/cast_sender.js")}return W},pbY=function(){var Q=CYe(); Q&&Q(!1,"No cast extension found")},dOA=function(){if(GGC){var Q=2,W=CYe(),x=function(){Q--; Q==0&&W&&W(!0)}; window.__onGCastApiAvailable=x;JS1("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",pbY,x)}},ile=function(){dOA(); var Q=asu();Q.push("//www.gstatic.com/eureka/clank/cast_sender.js");uH(Q)},Hlq=function(){dOA(); var Q=asu();Q.push.apply(Q,g.C(ASC.map(hIC)));Q.push("//www.gstatic.com/eureka/clank/cast_sender.js");uH(Q)},Yo=function(Q,W,x){g.N.call(this); this.X=x!=null?(0,g.FD)(Q,x):Q;this.CA=W;this.L=(0,g.FD)(this.Dw,this);this.B=!1;this.U=0;this.D=this.rE=null;this.N=[]},nL=function(){},UOe=function(){g.Ux.call(this,"p")},qk1=function(){g.Ux.call(this,"o")},$Ou=function(){return BmA=BmA||new g.FN},Is1=function(Q){g.Ux.call(this,"serverreachability",Q)},VN=function(Q){var W=$Ou(); W.dispatchEvent(new Is1(W,Q))},mO5=function(Q){g.Ux.call(this,"statevent",Q)},PJ=function(Q){var W=$Ou(); W.dispatchEvent(new mO5(W,Q))},Nm5=function(Q,W,x,D){g.Ux.call(this,"timingevent",Q); this.size=W;this.rtt=x;this.retries=D},vJ=function(Q,W){if(typeof Q!=="function")throw Error("Fn must not be null and must be a function"); return g.Nz.setTimeout(function(){Q()},W)},CL=function(){},Ju=function(Q,W,x,D){this.D=Q; this.N=W;this.Gn=x;this.Y6=D||1;this.tf=new g.C4(this);this.Pt=45E3;this.X3=null;this.X=!1;this.T=this.O3=this.S=this.g7=this.F3=this.SZ=this.uj=null;this.pS=[];this.B=null;this.G=0;this.L=this.KS=null;this.Vj=-1;this.LS=!1;this.I5=0;this.s3=null;this.fn=this.eZ=this.Kn=this.fS=!1;this.U=new cSF},cSF=function(){this.D=null; this.B="";this.U=!1},ySH=function(Q,W,x){Q.g7=1; Q.S=tM(W.clone());Q.T=x;Q.fS=!0;g17(Q,null)},g17=function(Q,W){Q.F3=Date.now(); pL(Q);Q.O3=Q.S.clone();QN(Q.O3,"t",Q.Y6);Q.G=0;var x=Q.D.g7;Q.U=new cSF;Q.B=eI5(Q.D,x?W:null,!Q.T);Q.I5>0&&(Q.s3=new g.Qu((0,g.FD)(Q.NU,Q,Q.B),Q.I5));Q.tf.listen(Q.B,"readystatechange",Q.Kz);W=Q.X3?g.HZ(Q.X3):{};Q.T?(Q.KS||(Q.KS="POST"),W["Content-Type"]="application/x-www-form-urlencoded",Q.B.send(Q.O3,Q.KS,Q.T,W)):(Q.KS="GET",Q.B.send(Q.O3,Q.KS,null,W));VN(1)},Zle=function(Q){if(!fss(Q))return g.Fk(Q.B); var W=g.tr(Q.B);if(W==="")return"";var x="",D=W.length,K=g.O7(Q.B)==4;if(!Q.U.D){if(typeof TextDecoder==="undefined")return hu(Q),aa(Q),"";Q.U.D=new g.Nz.TextDecoder}for(var l=0;lW.length)return L2Y;W=W.slice(D,D+x);Q.G=D+x;return W},pL=function(Q){Q.SZ=Date.now()+Q.Pt; OlY(Q,Q.Pt)},OlY=function(Q,W){if(Q.uj!=null)throw Error("WatchDog timer not null"); Q.uj=vJ((0,g.FD)(Q.Nf,Q),W)},E1A=function(Q){Q.uj&&(g.Nz.clearTimeout(Q.uj),Q.uj=null)},aa=function(Q){Q.D.C2()||Q.LS||F2u(Q.D,Q)},hu=function(Q){E1A(Q); g.w1(Q.s3);Q.s3=null;Q.tf.removeAll();if(Q.B){var W=Q.B;Q.B=null;W.abort();W.dispose()}},jCH=function(Q,W){try{var x=Q.D; if(x.W3!=0&&(x.B==Q||tLC(x.U,Q)))if(!Q.eZ&&tLC(x.U,Q)&&x.W3==3){try{var D=x.IU.B.parse(W)}catch(v){D=null}if(Array.isArray(D)&&D.length==3){var K=D;if(K[0]==0)a:{if(!x.S){if(x.B)if(x.B.F3+3E30&&(x.I5=1.5*w);D=x;var S=Q.s1();if(S){var b=g.QS(S,"X-Client-Wire-Protocol");if(b){var z=D.U;!z.B&&(g.he(b,"spdy")||g.he(b,"quic")||g.he(b,"h2"))&&(z.N=z.L,z.B=new Set,z.U&&(xWk(z,z.U),z.U=null))}if(D.fS){var k=g.QS(S,"X-HTTP-Session-Id");k&&(D.b6=k,g.Yl(D.X3,D.fS,k))}}x.W3=3;x.L&&x.L.Xv();x.Cn&&(x.yA=Date.now()-Q.F3);D=x;var X=Q;D.gE=DWR(D,D.g7?D.Y6:null,D.Gn);if(X.eZ){Keq(D.U, X);var u=X,Y=D.I5;Y&&u.setTimeout(Y);u.uj&&(E1A(u),pL(u));D.B=X}else l0H(D);x.D.length>0&&Au(x)}else l[0]!="stop"&&l[0]!="close"||iH(x,7);else x.W3==3&&(l[0]=="stop"||l[0]=="close"?l[0]=="stop"?iH(x,7):x.disconnect():l[0]!="noop"&&x.L&&x.L.c6(l),x.pS=0)}VN(4)}catch(v){}},MYY=function(Q,W){this.B=Q; this.map=W;this.context=null},Rzs=function(Q){this.L=Q||10; g.Nz.PerformanceNavigationTiming?(Q=g.Nz.performance.getEntriesByType("navigation"),Q=Q.length>0&&(Q[0].nextHopProtocol=="hq"||Q[0].nextHopProtocol=="h2")):Q=!!(g.Nz.chrome&&g.Nz.chrome.loadTimes&&g.Nz.chrome.loadTimes()&&g.Nz.chrome.loadTimes().wasFetchedViaSpdy);this.N=Q?this.L:1;this.B=null;this.N>1&&(this.B=new Set);this.U=null;this.D=[]},wk5=function(Q){return Q.U?!0:Q.B?Q.B.size>=Q.N:!1},We7=function(Q){return Q.U?1:Q.B?Q.B.size:0},tLC=function(Q,W){return Q.U?Q.U==W:Q.B?Q.B.has(W):!1},xWk= function(Q,W){Q.B?Q.B.add(W):Q.U=W},Keq=function(Q,W){Q.U&&Q.U==W?Q.U=null:Q.B&&Q.B.has(W)&&Q.B.delete(W)},Sd1=function(Q){if(Q.U!=null)return Q.D.concat(Q.U.pS); if(Q.B!=null&&Q.B.size!==0){var W=Q.D;Q=g.V(Q.B.values());for(var x=Q.next();!x.done;x=Q.next())W=W.concat(x.value.pS);return W}return g.DX(Q.D)},bwq=function(Q,W){var x=new CL; if(g.Nz.Image){var D=new Image;D.onload=g.tv(HJ,x,"TestLoadImage: loaded",!0,W,D);D.onerror=g.tv(HJ,x,"TestLoadImage: error",!1,W,D);D.onabort=g.tv(HJ,x,"TestLoadImage: abort",!1,W,D);D.ontimeout=g.tv(HJ,x,"TestLoadImage: timeout",!1,W,D);g.Nz.setTimeout(function(){if(D.ontimeout)D.ontimeout()},1E4); D.src=Q}else W(!1)},sCH=function(Q,W){var x=new CL,D=new AbortController,K=setTimeout(function(){D.abort(); HJ(x,"TestPingServer: timeout",!1,W)},1E4); fetch(Q,{signal:D.signal}).then(function(l){clearTimeout(K);l.ok?HJ(x,"TestPingServer: ok",!0,W):HJ(x,"TestPingServer: server error",!1,W)}).catch(function(){clearTimeout(K); HJ(x,"TestPingServer: error",!1,W)})},HJ=function(Q,W,x,D,K){try{K&&(K.onload=null,K.onerror=null,K.onabort=null,K.ontimeout=null),D(x)}catch(l){}},zze=function(){this.B=new nL},kTR=function(Q,W,x){var D=x||""; try{vPA(Q,function(K,l){var M=K;g.r4(K)&&(M=g.aj(K));W.push(D+l+"="+encodeURIComponent(M))})}catch(K){throw W.push(D+"type="+encodeURIComponent("_badmap")),K; }},Ui=function(Q,W,x){return x&&x.iSf?x.iSf[Q]||W:W},XkR=function(Q){this.D=[]; this.Y6=this.gE=this.X3=this.Gn=this.B=this.b6=this.fS=this.LS=this.G=this.Vj=this.T=null;this.QN=this.O3=0;this.Ke=Ui("failFast",!1,Q);this.eZ=this.uj=this.S=this.X=this.L=null;this.WN=!0;this.RQ=this.s3=-1;this.fn=this.pS=this.F3=0;this.uG=Ui("baseRetryDelayMs",5E3,Q);this.J2=Ui("retryDelaySeedMs",1E4,Q);this.kX=Ui("forwardChannelMaxRetries",2,Q);this.UT=Ui("forwardChannelRequestTimeoutMs",2E4,Q);this.hn=Q&&Q.aTf||void 0;this.jE=Q&&Q.WZ9||void 0;this.vZ=Q&&Q.AoS||!1;this.I5=void 0;this.g7=Q&&Q.ENj|| !1;this.N="";this.U=new Rzs(Q&&Q.Yp3);this.IU=new zze;this.tf=Q&&Q.nQ3||!1;this.SZ=Q&&Q.WV7||!1;this.tf&&this.SZ&&(this.SZ=!1);this.gH=Q&&Q.LV3||!1;Q&&Q.xz7&&(this.WN=!1);this.Cn=!this.tf&&this.WN&&Q&&Q.MG3||!1;this.cD=void 0;Q&&Q.iZ&&Q.iZ>0&&(this.cD=Q.iZ);this.Sk=void 0;this.yA=0;this.Pt=!1;this.Kn=this.KS=null},d$=function(Q){Q.B&&(oYY(Q),Q.B.cancel(),Q.B=null)},uwY=function(Q){d$(Q); Q.S&&(g.Nz.clearTimeout(Q.S),Q.S=null);Gg(Q);Q.U.cancel();Q.X&&(typeof Q.X==="number"&&g.Nz.clearTimeout(Q.X),Q.X=null)},Au=function(Q){wk5(Q.U)||Q.X||(Q.X=!0,g.wv(Q.fM,Q),Q.F3=0)},nYq=function(Q,W){if(We7(Q.U)>=Q.U.N-(Q.X?1:0))return!1; if(Q.X)return Q.D=W.pS.concat(Q.D),!0;if(Q.W3==1||Q.W3==2||Q.F3>=(Q.Ke?0:Q.kX))return!1;Q.X=vJ((0,g.FD)(Q.fM,Q,W),Yds(Q,Q.F3));Q.F3++;return!0},Pyq=function(Q,W){var x; W?x=W.Gn:x=Q.O3++;var D=Q.X3.clone();g.Yl(D,"SID",Q.N);g.Yl(D,"RID",x);g.Yl(D,"AID",Q.s3);q0(Q,D);Q.G&&Q.T&&g.v0(D,Q.G,Q.T);x=new Ju(Q,Q.N,x,Q.F3+1);Q.G===null&&(x.X3=Q.T);W&&(Q.D=W.pS.concat(Q.D));W=VYC(Q,x,1E3);x.setTimeout(Math.round(Q.UT*.5)+Math.round(Q.UT*.5*Math.random()));xWk(Q.U,x);ySH(x,D,W)},q0=function(Q,W){Q.LS&&g.nC(Q.LS,function(x,D){g.Yl(W,D,x)}); Q.L&&vPA({},function(x,D){g.Yl(W,D,x)})},VYC=function(Q,W,x){x=Math.min(Q.D.length,x); var D=Q.L?(0,g.FD)(Q.L.fz,Q.L,Q):null;a:{for(var K=Q.D,l=-1;;){var M=["count="+x];l==-1?x>0?(l=K[0].B,M.push("ofs="+l)):l=0:M.push("ofs="+l);for(var w=!0,S=0;S=3)return!1; Q.fn++;Q.S=vJ((0,g.FD)(Q.kq,Q),Yds(Q,Q.pS));Q.pS++;return!0},oYY=function(Q){Q.KS!=null&&(g.Nz.clearTimeout(Q.KS),Q.KS=null)},vYA=function(Q){Q.B=new Ju(Q,Q.N,"rpc",Q.fn); Q.G===null&&(Q.B.X3=Q.T);Q.B.I5=0;var W=Q.gE.clone();g.Yl(W,"RID","rpc");g.Yl(W,"SID",Q.N);g.Yl(W,"AID",Q.s3);g.Yl(W,"CI",Q.eZ?"0":"1");!Q.eZ&&Q.cD&&g.Yl(W,"TO",Q.cD);g.Yl(W,"TYPE","xmlhttp");q0(Q,W);Q.G&&Q.T&&g.v0(W,Q.G,Q.T);Q.I5&&Q.B.setTimeout(Q.I5);var x=Q.B;Q=Q.Y6;x.g7=1;x.S=tM(W.clone());x.T=null;x.fS=!0;g17(x,Q)},Gg=function(Q){Q.uj!=null&&(g.Nz.clearTimeout(Q.uj),Q.uj=null)},F2u=function(Q,W){var x=null; if(Q.B==W){Gg(Q);oYY(Q);Q.B=null;var D=2}else if(tLC(Q.U,W))x=W.pS,Keq(Q.U,W),D=1;else return;if(Q.W3!=0)if(W.X)if(D==1){x=W.T?W.T.length:0;W=Date.now()-W.F3;var K=Q.F3;D=$Ou();D.dispatchEvent(new Nm5(D,x,W,K));Au(Q)}else l0H(Q);else{var l=W.Vj;K=W.getLastError();if(K==3||K==0&&l>0||!(D==1&&nYq(Q,W)||D==2&&QCk(Q)))switch(x&&x.length>0&&(W=Q.U,W.D=W.D.concat(x)),K){case 1:iH(Q,5);break;case 4:iH(Q,10);break;case 3:iH(Q,6);break;default:iH(Q,2)}}},Yds=function(Q,W){var x=Q.uG+Math.floor(Math.random()* Q.J2); Q.isActive()||(x*=2);return x*W},iH=function(Q,W){if(W==2){var x=(0,g.FD)(Q.Yr7,Q),D=Q.jE,K=!D; D=new g.Sr(D||"//www.google.com/images/cleardot.gif");g.Nz.location&&g.Nz.location.protocol=="http"||g.bT(D,"https");tM(D);K?bwq(D.toString(),x):sCH(D.toString(),x)}else PJ(2);Q.W3=0;Q.L&&Q.L.JD(W);Cyu(Q);uwY(Q)},Cyu=function(Q){Q.W3=0; Q.Kn=[];if(Q.L){var W=Sd1(Q.U);if(W.length!=0||Q.D.length!=0)g.lZ(Q.Kn,W),g.lZ(Q.Kn,Q.D),Q.U.D.length=0,g.DX(Q.D),Q.D.length=0;Q.L.Qg()}},Jlq=function(Q){if(Q.W3==0)return Q.Kn; var W=[];g.lZ(W,Sd1(Q.U));g.lZ(W,Q.D);return W},DWR=function(Q,W,x){var D=g.n4(x); D.B!=""?(W&&g.s1(D,W+"."+D.B),g.zY(D,D.D)):(D=g.Nz.location,D=C$s(D.protocol,W?W+"."+D.hostname:D.hostname,+D.port,x));W=Q.fS;x=Q.b6;W&&x&&g.Yl(D,W,x);g.Yl(D,"VER",Q.KM);q0(Q,D);return D},eI5=function(Q,W,x){if(W&&!Q.g7)throw Error("Can't create secondary domain capable XhrIo object."); W=Q.vZ&&!Q.hn?new g.Lr(new g.jr({OP:x})):new g.Lr(Q.hn);W.G=Q.g7;return W},pkH=function(){},hzA=function(){},$o=function(Q,W){g.FN.call(this); this.B=new XkR(W);this.L=Q;this.U=W&&W.YV3||null;Q=W&&W.rO3||null;W&&W.rs3&&(Q?Q["X-Client-Protocol"]="webchannel":Q={"X-Client-Protocol":"webchannel"});this.B.T=Q;Q=W&&W.Jqt||null;W&&W.n1&&(Q?Q["X-WebChannel-Content-Type"]=W.n1:Q={"X-WebChannel-Content-Type":W.n1});W&&W.Ch&&(Q?Q["X-WebChannel-Client-Profile"]=W.Ch:Q={"X-WebChannel-Client-Profile":W.Ch});this.B.Vj=Q;(Q=W&&W.Qej)&&!g.p5(Q)&&(this.B.G=Q);this.X=W&&W.ENj||!1;this.N=W&&W.N8t||!1;(W=W&&W.MZp)&&!g.p5(W)&&(this.B.fS=W,g.hO(this.U,W)&&(Q= this.U,W in Q&&delete Q[W]));this.D=new BJ(this)},a0s=function(Q){UOe.call(this); Q.__headers__&&(this.headers=Q.__headers__,this.statusCode=Q.__status__,delete Q.__headers__,delete Q.__status__);var W=Q.__sm__;W?this.data=(this.B=g.CC(W))?g.i0(W,this.B):W:this.data=Q},GTJ=function(Q){qk1.call(this); this.status=1;this.errorCode=Q},BJ=function(Q){this.B=Q},dWY=function(Q,W){this.U=Q; this.B=W},iwJ=function(Q){return Jlq(Q.B).map(function(W){var x=Q.U; W=W.map;"__data__"in W?(W=W.__data__,x=x.N?nPp(W):W):x=W;return x})},Ia=function(Q,W){if(typeof Q!=="function")throw Error("Fn must not be null and must be a function"); return g.Nz.setTimeout(function(){Q()},W)},N0=function(Q){mk.dispatchEvent(new Alu(mk,Q))},Alu=function(Q){g.Ux.call(this,"statevent",Q)},cJ=function(Q,W,x,D){this.B=Q; this.N=W;this.G=x;this.X=D||1;this.U=45E3;this.D=new g.C4(this);this.L=new g.v_;this.L.setInterval(250)},UWH=function(Q,W,x){Q.QU=1; Q.nC=tM(W.clone());Q.lD=x;Q.fS=!0;HwR(Q,null)},qdq=function(Q,W,x,D,K){Q.QU=1; Q.nC=tM(W.clone());Q.lD=null;Q.fS=x;K&&(Q.UP=!1);HwR(Q,D)},HwR=function(Q,W){Q.pI=Date.now(); B3C(Q);Q.fl=Q.nC.clone();QN(Q.fl,"t",Q.X);Q.cj=0;Q.qn=Q.B.dF(Q.B.By()?W:null);Q.c7>0&&(Q.Kl=new g.Qu((0,g.FD)(Q.lh,Q,Q.qn),Q.c7));Q.D.listen(Q.qn,"readystatechange",Q.J1);W=Q.JM?g.HZ(Q.JM):{};Q.lD?(Q.JN="POST",W["Content-Type"]="application/x-www-form-urlencoded",Q.qn.send(Q.fl,Q.JN,Q.lD,W)):(Q.JN="GET",Q.UP&&!g.O6&&(W.Connection="close"),Q.qn.send(Q.fl,Q.JN,null,W));Q.B.UJ(1)},mWA=function(Q,W){var x=Q.cj,D=W.indexOf("\n",x); if(D==-1)return $W7;x=Number(W.substring(x,D));if(isNaN(x))return I0p;D+=1;if(D+x>W.length)return $W7;W=W.slice(D,D+x);Q.cj=D+x;return W},B3C=function(Q){Q.Xn=Date.now()+Q.U; N3q(Q,Q.U)},N3q=function(Q,W){if(Q.t6!=null)throw Error("WatchDog timer not null"); Q.t6=Ia((0,g.FD)(Q.Q0,Q),W)},clA=function(Q){Q.t6&&(g.Nz.clearTimeout(Q.t6),Q.t6=null)},gYu=function(Q){Q.B.C2()||Q.xw||Q.B.Ew(Q)},g$=function(Q){clA(Q); g.w1(Q.Kl);Q.Kl=null;Q.L.stop();Q.D.removeAll();if(Q.qn){var W=Q.qn;Q.qn=null;W.abort();W.dispose()}Q.F5&&(Q.F5=null)},yle=function(Q,W){try{Q.B.d_(Q,W),Q.B.UJ(4)}catch(x){}},f0Y=function(Q,W,x,D,K){if(D==0)x(!1); else{var l=K||0;D--;ezs(Q,W,function(M){M?x(!0):g.Nz.setTimeout(function(){f0Y(Q,W,x,D,l)},l)})}},ezs=function(Q,W,x){var D=new Image; D.onload=function(){try{yN(D),x(!0)}catch(K){}}; D.onerror=function(){try{yN(D),x(!1)}catch(K){}}; D.onabort=function(){try{yN(D),x(!1)}catch(K){}}; D.ontimeout=function(){try{yN(D),x(!1)}catch(K){}}; g.Nz.setTimeout(function(){if(D.ontimeout)D.ontimeout()},W); D.src=Q},yN=function(Q){Q.onload=null; Q.onerror=null;Q.onabort=null;Q.ontimeout=null},ZwR=function(Q){this.B=Q; this.U=new nL},Lep=function(Q){var W=e1(Q.B,Q.Km,"/mail/images/cleardot.gif"); tM(W);f0Y(W.toString(),5E3,(0,g.FD)(Q.MN,Q),3,2E3);Q.UJ(1)},rlF=function(Q){var W=Q.B.X; W!=null?(N0(5),W?(N0(11),fL(Q.B,Q,!1)):(N0(12),fL(Q.B,Q,!0))):(Q.SH=new cJ(Q),Q.SH.JM=Q.L6,W=Q.B,W=e1(W,W.By()?Q.XF:null,Q.v7),N0(5),QN(W,"TYPE","xmlhttp"),qdq(Q.SH,W,!1,Q.XF,!1))},T3H=function(Q,W,x){this.B=1; this.U=[];this.D=[];this.L=new nL;this.T=Q||null;this.X=W!=null?W:null;this.S=x||!1},Ow1=function(Q,W){this.B=Q; this.map=W;this.context=null},EY7=function(Q,W,x,D){g.Ux.call(this,"timingevent",Q); this.size=W;this.rtt=x;this.retries=D},FeC=function(Q){g.Ux.call(this,"serverreachability",Q)},Q8C=function(Q){Q.cW(1,0); Q.lc=e1(Q,null,Q.jN);tYe(Q)},Wju=function(Q){Q.XD&&(Q.XD.abort(),Q.XD=null); Q.VI&&(Q.VI.cancel(),Q.VI=null);Q.Q7&&(g.Nz.clearTimeout(Q.Q7),Q.Q7=null);ZS(Q);Q.F1&&(Q.F1.cancel(),Q.F1=null);Q.xl&&(g.Nz.clearTimeout(Q.xl),Q.xl=null)},x51=function(Q,W){if(Q.B==0)throw Error("Invalid operation: sending map when state is closed"); Q.U.push(new Ow1(Q.Xx++,W));Q.B!=2&&Q.B!=3||tYe(Q)},D5p=function(Q){var W=0; Q.VI&&W++;Q.F1&&W++;return W},tYe=function(Q){Q.F1||Q.xl||(Q.xl=Ia((0,g.FD)(Q.g_,Q),0),Q.VV=0)},j8F=function(Q,W){if(Q.B==1){if(!W){Q.mB=Math.floor(Math.random()*1E5); W=Q.mB++;var x=new cJ(Q,"",W);x.JM=Q.nu;var D=Kjk(Q),K=Q.lc.clone();g.Yl(K,"RID",W);g.Yl(K,"CVER","1");LL(Q,K);UWH(x,K,D);Q.F1=x;Q.B=2}}else Q.B==3&&(W?lLH(Q,W):Q.U.length==0||Q.F1||lLH(Q))},lLH=function(Q,W){if(W)if(Q.dX>6){Q.U=Q.D.concat(Q.U); Q.D.length=0;var x=Q.mB-1;W=Kjk(Q)}else x=W.G,W=W.lD;else x=Q.mB++,W=Kjk(Q);var D=Q.lc.clone();g.Yl(D,"SID",Q.N);g.Yl(D,"RID",x);g.Yl(D,"AID",Q.Z$);LL(Q,D);x=new cJ(Q,Q.N,x,Q.VV+1);x.JM=Q.nu;x.setTimeout(1E4+Math.round(1E4*Math.random()));Q.F1=x;UWH(x,D,W)},LL=function(Q,W){Q.eL&&(Q=Q.eL.r_())&&g.nC(Q,function(x,D){g.Yl(W,D,x)})},Kjk=function(Q){var W=Math.min(Q.U.length,1E3),x=["count="+W]; if(Q.dX>6&&W>0){var D=Q.U[0].B;x.push("ofs="+D)}else D=0;for(var K={},l=0;l=3)return!1; Q.G++;Q.Q7=Ia((0,g.FD)(Q.v6,Q),Rfq(Q,Q.Ss));Q.Ss++;return!0},fL=function(Q,W,x){Q.tQ=Q.X==null?x:!Q.X; Q.GV=W.fN;Q.S||Q8C(Q)},ZS=function(Q){Q.LU!=null&&(g.Nz.clearTimeout(Q.LU),Q.LU=null)},Rfq=function(Q,W){var x=5E3+Math.floor(Math.random()*1E4); Q.isActive()||(x*=2);return x*W},r$=function(Q,W){if(W==2||W==9){var x=null; Q.eL&&(x=null);var D=(0,g.FD)(Q.rA1,Q);x||(x=new g.Sr("//www.google.com/images/cleardot.gif"),tM(x));ezs(x.toString(),1E4,D)}else N0(2);SUq(Q,W)},SUq=function(Q,W){Q.B=0; Q.eL&&Q.eL.j0(W);bX5(Q);Wju(Q)},bX5=function(Q){Q.B=0; Q.GV=-1;if(Q.eL)if(Q.D.length==0&&Q.U.length==0)Q.eL.oi();else{var W=g.DX(Q.D),x=g.DX(Q.U);Q.D.length=0;Q.U.length=0;Q.eL.oi(W,x)}},e1=function(Q,W,x){var D=g.n4(x); if(D.B!="")W&&g.s1(D,W+"."+D.B),g.zY(D,D.D);else{var K=window.location;D=C$s(K.protocol,W?W+"."+K.hostname:K.hostname,+K.port,x)}Q.UR&&g.nC(Q.UR,function(l,M){g.Yl(D,M,l)}); g.Yl(D,"VER",Q.dX);LL(Q,D);return D},s81=function(){},zfe=function(){this.B=[]; this.U=[]},kjY=function(Q){g.Ux.call(this,"channelMessage"); this.message=Q},Xsk=function(Q){g.Ux.call(this,"channelError"); this.error=Q},oDR=function(Q,W){this.action=Q; this.params=W||{}},Tg=function(Q,W){g.N.call(this); this.B=new g.O3(this.y21,0,this);g.y(this,this.B);this.CA=5E3;this.U=0;if(typeof Q==="function")W&&(Q=(0,g.FD)(Q,W));else if(Q&&typeof Q.handleEvent==="function")Q=(0,g.FD)(Q.handleEvent,Q);else throw Error("Invalid listener argument");this.D=Q},uiA=function(Q,W,x,D,K,l,M,w,S){x=x===void 0?!1:x; D=D===void 0?function(){return""}:D; K=K===void 0?!1:K;l=l===void 0?!1:l;M=M===void 0?!1:M;w=w===void 0?!0:w;S=S===void 0?function(){return g.ui({})}:S; this.g7=Q;this.uj=W;this.L=new g.hU;this.U=new Tg(this.rK7,this);this.B=null;this.G=!1;this.T=null;this.F3="";this.pS=this.S=0;this.D=[];this.Pt=x;this.fS=D;this.X=l;this.X3=S;this.SZ=M;this.LS=w;this.KS=null;this.N=g.ui();this.tf=K;this.I5=new JxR;this.eZ=new pvk;this.O3=new h6C;this.s3=new a91;this.Vj=new GK5;this.Kn=new d1F},nDA=function(Q,W,x,D,K){YUA(Q); if(Q.B){var l=g.TK("ID_TOKEN"),M=Q.B.nu||{};l?M["x-youtube-identity-token"]=l:delete M["x-youtube-identity-token"];Q.B.nu=M}D?(D.getState()!=3&&D5p(D)==0||D.getState(),Q.B.connect(W,x,Q.uj,D.N,D.Z$)):K?Q.B.connect(W,x,Q.uj,K.sessionId,K.arrayId):Q.B.connect(W,x,Q.uj)},PJY=function(Q){var W,x; g.U(function(D){if(D.B==1)return g.v5(D,2),Q.LS?g.A(D,Oi(Q),2):(Oi(Q),D.kf(2));g.ps(D);W=Q.D;Q.D=[];x=W.length;VMC(Q,W,x);Ei(Q);return g.hv(D,0)})},VMC=function(Q,W,x){for(var D=0;D0?x=Object.assign({},x,W):delete x.Authorization;Q.B.nu=x}}).RH(function(){}),function(){Q.KS=null})},FL=function(Q){this.scheme="https"; this.port=this.domain="";this.B="/api/lounge";this.U=!0;Q=Q||document.location.href;var W=Number(g.B_(4,Q))||"";W&&(this.port=":"+W);this.domain=g.$X(Q)||"";Q=g.Ae();Q.search("MSIE")>=0&&(Q=Q.match(/MSIE ([\d.]+)/)[1],g.iC(Q,"10.0")<0&&(this.U=!1))},tu=function(Q,W){var x=Q.B; Q.U&&(x=Q.scheme+"://"+Q.domain+Q.port+Q.B);return g.ya(x+W,{})},CJe=function(Q,W){g.FN.call(this); var x=this;this.St=Q();this.St.subscribe("handlerOpened",this.dw,this);this.St.subscribe("handlerClosed",this.onClosed,this);this.St.subscribe("handlerError",function(D,K){x.onError(K)}); this.St.subscribe("handlerMessage",this.onMessage,this);this.B=W},J41=function(Q,W,x){var D=this; x=x===void 0?function(){return""}:x; var K=K===void 0?new hzA:K;var l=l===void 0?new g.hU:l;this.pathPrefix=Q;this.B=W;this.F3=x;this.L=l;this.S=null;this.T=this.G=0;this.channel=null;this.X=0;this.D=new Tg(function(){D.D.isActive();var M;((M=D.channel)==null?void 0:We7((new dWY(M,M.B)).B.U))===0&&D.connect(D.S,D.G)}); this.N={};this.U={};this.uj=!1;this.logger=null;this.pS=[];this.cI=void 0;this.X3=new JxR;this.KS=new pvk;this.LS=new h6C;this.fS=new a91},ps1=function(Q){g.gp(Q.channel,"m",function(){Q.X=3; Q.D.reset();Q.S=null;Q.G=0;for(var W=g.V(Q.pS),x=W.next();!x.done;x=W.next())x=x.value,Q.channel&&Q.channel.send(x);Q.pS=[];Q.publish("webChannelOpened");Q.X3.B("WEB_CHANNEL")}); g.gp(Q.channel,"n",function(){Q.X=0;Q.D.isActive()||Q.publish("webChannelClosed");var W,x=(W=Q.channel)==null?void 0:iwJ(new dWY(W,W.B));x&&(Q.pS=[].concat(g.C(x)));Q.KS.B("WEB_CHANNEL")}); g.gp(Q.channel,"p",function(W){var x=W.data;x[0]==="gracefulReconnect"?(Q.D.start(),Q.channel&&Q.channel.close()):Q.publish("webChannelMessage",new oDR(x[0],x[1]));Q.cI=W.statusCode;Q.LS.B("WEB_CHANNEL")}); g.gp(Q.channel,"o",function(){Q.cI===401||Q.D.start();Q.publish("webChannelError");Q.fS.B("WEB_CHANNEL")})},hfq=function(Q){var W=Q.F3(); W?Q.N["x-youtube-lounge-xsrf-token"]=W:delete Q.N["x-youtube-lounge-xsrf-token"]},aLJ=function(Q){g.FN.call(this); this.B=Q();this.B.subscribe("webChannelOpened",this.Lz,this);this.B.subscribe("webChannelClosed",this.onClosed,this);this.B.subscribe("webChannelError",this.onError,this);this.B.subscribe("webChannelMessage",this.onMessage,this)},Gj7=function(Q,W,x,D,K){function l(){return new uiA(tu(Q,"/bc"),W,!1,x,D)} x=x===void 0?function(){return""}:x; return g.Pb("enable_mdx_web_channel_desktop")?new aLJ(function(){return new J41(tu(Q,"/wc"),W,x)}):new CJe(l,K)},HXF=function(){var Q=d5s; iXJ();Qx.push(Q);A4C()},WK=function(Q,W){iXJ(); var x=U5u(Q,String(W));Qx.length==0?qUC(x):(A4C(),g.o3(Qx,function(D){D(x)}))},xM=function(Q){WK("CP",Q)},iXJ=function(){Qx||(Qx=g.yF("yt.mdx.remote.debug.handlers_")||[],g.g4("yt.mdx.remote.debug.handlers_",Qx))},qUC=function(Q){var W=(DU+1)%50; DU=W;K6[W]=Q;lB||(lB=W==49)},A4C=function(){var Q=Qx; if(K6[0]){var W=lB?DU:-1,x={};do x={I6:void 0},W=(W+1)%50,x.I6=K6[W],g.o3(Q,function(D){return function(K){K(D.I6)}}(x)); while(W!=DU);K6=Array(50);DU=-1;lB=!1}},U5u=function(Q,W){var x=(Date.now()-BVp)/1E3; x.toFixed&&(x=x.toFixed(3));var D=[];D.push("[",x+"s","] ");D.push("[","yt.mdx.remote","] ");D.push(Q+": "+W,"\n");return D.join("")},j6=function(Q){g.Rd.call(this); this.X=Q;this.screens=[]},$51=function(Q,W){var x=Q.get(W.uuid)||Q.get(W.id); if(x)return Q=x.name,x.id=W.id||x.id,x.name=W.name,x.token=W.token,x.uuid=W.uuid||x.uuid,x.name!=Q;Q.screens.push(W);return!0},ILk=function(Q,W){var x=Q.screens.length!=W.length; Q.screens=g.Rv(Q.screens,function(l){return!!RIY(W,l)}); for(var D=W.length,K=0;K0&&Q.N0&&n6(Q,x)},function(W){Q.L=function(){}; Q.gx(W)})},zy7=function(Q){var W={}; W.pairingCode=Q.KS;W.theme=Q.g7;n1u()&&(W.env_useStageMdx=1);return g.gv(W)},k$R=function(Q){return new Promise(function(W){Q.KS=jce(); if(Q.X3){var x=new chrome.cast.DialLaunchResponse(!0,zy7(Q));W(x);s_F(Q)}else Q.uj=function(){g.Y1(Q.T);Q.uj=function(){}; Q.T=NaN;var D=new chrome.cast.DialLaunchResponse(!0,zy7(Q));W(D);s_F(Q)},Q.T=g.oc(function(){Q.uj()},100)})},oEe=function(Q,W,x){Q.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(W)); var D=new M0(W);return(new Promise(function(K){X3J(Q,D,function(l){l?(Q.pS=!0,sM(Q.N,D),kM(Q,D),n6(Q,x)):g.FP(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(W)+" is not online."));K(l)},5)})).then(function(K){return K?new chrome.cast.DialLaunchResponse(!1):k$R(Q)})},u8R=function(Q,W){var x=Q.S.receiver.label,D=Q.U.friendlyName; return(new Promise(function(K){OXF(Q.N,x,W,D,function(l){l&&l.token&&kM(Q,l);K(l)},function(l){Xp(Q,"Failed to get DIAL screen: "+l); K(null)})})).then(function(K){return K&&K.token?new chrome.cast.DialLaunchResponse(!1):k$R(Q)})},X3J=function(Q,W,x,D){g.Y1(Q.X); Q.X=0;FjA(Q.N,W,function(K){K||D<0?x(K):Q.X=g.oc(function(){X3J(Q,W,x,D-1)},300)})},n6=function(Q,W){Q.info("getDialAppInfoWithTimeout_ "+W); YM(Q)&&(g.Y1(Q.G),Q.G=0,W==0?Yhk(Q):Q.G=g.oc(function(){Yhk(Q)},W))},Yhk=function(Q){YM(Q)&&Q.D.getDialAppInfo(function(W){Q.info("getDialAppInfo dialLaunchData: "+JSON.stringify(W)); W=W.extraData||{};var x=null;if(W.loungeToken){var D;((D=Q.B)==null?void 0:D.token)==W.loungeToken&&(x="staleLoungeToken")}else x="missingLoungeToken";x?(Q.F3=x,n6(Q,3E4)):(Q.pS=!1,Q.F3="unknown",x8A(Q,W.loungeToken),n6(Q,W.loungeTokenRefreshIntervalMs))},function(W){Q.info("getDialAppInfo error: "+W); Q.F3="noLoungeTokenResponse";n6(Q,3E4)})},nEs=function(Q){g.Y1(Q.X); Q.X=0;g.Y1(Q.G);Q.G=0;Q.L();Q.L=function(){}; g.Y1(Q.T)},Vx=function(Q,W){zx.call(this,Q,W,"ManualSession"); this.D=g.oc((0,g.FD)(this.hh,this,null),150)},PK=function(Q,W){g.Rd.call(this); this.config_=W;this.U=Q;this.S=W.appId||"233637DE";this.N=W.theme||"cl";this.T=W.disableCastApi||!1;this.X=W.forceMirroring||!1;this.B=null;this.G=!1;this.D=[];this.L=(0,g.FD)(this.lG3,this)},VGH=function(Q,W){return W?g.Os(Q.D,function(x){return Ra(W,x.label)},Q):null},vK=function(Q){WK("Controller",Q)},d5s=function(Q){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(Q)},C6=function(Q){return Q.G||!!Q.D.length||!!Q.B},J5=function(Q,W,x){W!=Q.B&&(g.w1(Q.B),(Q.B=W)?(x?Q.publish("yt-remote-cast2-receiver-resumed", W.U):Q.publish("yt-remote-cast2-receiver-selected",W.U),W.subscribe("sessionScreen",(0,g.FD)(Q.Tl,Q,W)),W.subscribe("sessionFailed",function(){return PNp(Q,W)}),W.B?Q.publish("yt-remote-cast2-session-change",W.B):x&&Q.B.hh(null)):Q.publish("yt-remote-cast2-session-change",null))},PNp=function(Q,W){Q.B==W&&Q.publish("yt-remote-cast2-session-failed")},vEH=function(Q){var W=Q.U.Yq(),x=Q.B&&Q.B.U; Q=g.pm(W,function(D){x&&Ra(D,x.label)&&(x=null);var K=D.uuid?D.uuid:D.id,l=VGH(this,D);l?(l.label=K,l.friendlyName=D.name):(l=new chrome.cast.Receiver(K,D.name),l.receiverType=chrome.cast.ReceiverType.CUSTOM);return l},Q); x&&(x.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(x=new chrome.cast.Receiver(x.label,x.friendlyName),x.receiverType=chrome.cast.ReceiverType.CUSTOM),Q.push(x));return Q},d8e=function(Q,W,x,D){D.disableCastApi?p6("Cannot initialize because disabled by Mdx config."):CNC()?J0q(W,D)&&(p3Y(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?hye(Q,x):(window.__onGCastApiAvailable=function(K,l){K?hye(Q,x):(h5("Failed to load cast API: "+l),aVY(!1),p3Y(!1),g.Bk("yt-remote-cast-available"),g.Bk("yt-remote-cast-receiver"), G$A(),x(!1))},D.loadCastApiSetupScript?g.RK("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?PYp()>=60&&ile():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?pbY():PYp()>=89?Hlq():(dOA(),uH(ASC.map(hIC))))):p6("Cannot initialize because not running Chrome")},G$A=function(){p6("dispose"); var Q=ah();Q&&Q.dispose();g.g4("yt.mdx.remote.cloudview.instance_",null);iKp(!1);g.jT(A0A);A0A.length=0},Gx=function(){return!!g.qW("yt-remote-cast-installed")},HKe=function(){var Q=g.qW("yt-remote-cast-receiver"); return Q?Q.friendlyName:null},U8u=function(){p6("clearCurrentReceiver"); g.Bk("yt-remote-cast-receiver")},qhJ=function(){return Gx()?ah()?ah().getCastSession():(h5("getCastSelector: Cast is not initialized."),null):(h5("getCastSelector: Cast API is not installed!"),null)},Bq1=function(){Gx()?ah()?dj()?(p6("Requesting cast selector."),ah().requestSession()):(p6("Wait for cast API to be ready to request the session."),A0A.push(g.lu("yt-remote-cast2-api-ready",Bq1))):h5("requestCastSelector: Cast is not initialized."):h5("requestCastSelector: Cast API is not installed!")}, iB=function(Q,W){dj()?ah().setConnectedScreenStatus(Q,W):h5("setConnectedScreenStatus called before ready.")},CNC=function(){var Q=g.Ae().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.UC||Q},$8C=function(Q,W){ah().init(Q,W)},J0q=function(Q,W){var x=!1; ah()||(Q=new PK(Q,W),Q.subscribe("yt-remote-cast2-availability-change",function(D){g.Ud("yt-remote-cast-available",D);XL("yt-remote-cast2-availability-change",D)}),Q.subscribe("yt-remote-cast2-receiver-selected",function(D){p6("onReceiverSelected: "+D.friendlyName); g.Ud("yt-remote-cast-receiver",D);XL("yt-remote-cast2-receiver-selected",D)}),Q.subscribe("yt-remote-cast2-receiver-resumed",function(D){p6("onReceiverResumed: "+D.friendlyName); g.Ud("yt-remote-cast-receiver",D);XL("yt-remote-cast2-receiver-resumed",D)}),Q.subscribe("yt-remote-cast2-session-change",function(D){p6("onSessionChange: "+w$(D)); D||g.Bk("yt-remote-cast-receiver");XL("yt-remote-cast2-session-change",D)}),g.g4("yt.mdx.remote.cloudview.instance_",Q),x=!0); p6("cloudview.createSingleton_: "+x);return x},ah=function(){return g.yF("yt.mdx.remote.cloudview.instance_")},hye=function(Q,W){aVY(!0); p3Y(!1);$8C(Q,function(x){x?(iKp(!0),g.M6("yt-remote-cast2-api-ready")):(h5("Failed to initialize cast API."),aVY(!1),g.Bk("yt-remote-cast-available"),g.Bk("yt-remote-cast-receiver"),G$A());W(x)})},p6=function(Q){WK("cloudview",Q)},h5=function(Q){WK("cloudview",Q)},aVY=function(Q){p6("setCastInstalled_ "+Q); g.Ud("yt-remote-cast-installed",Q)},dj=function(){return!!g.yF("yt.mdx.remote.cloudview.apiReady_")},iKp=function(Q){p6("setApiReady_ "+Q); g.g4("yt.mdx.remote.cloudview.apiReady_",Q)},p3Y=function(Q){g.g4("yt.mdx.remote.cloudview.initializing_",Q)},A5=function(Q){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.X=this.G=0;this.trackData=null;this.EG=this.y_=!1;this.S=this.L=this.B=this.N=0;this.D=NaN;this.U=!1;this.reset(Q)},IVs=function(Q){Q.audioTrackId=null; Q.trackData=null;Q.playerState=-1;Q.y_=!1;Q.EG=!1;Q.G=0;Q.X=g.QA();Q.N=0;Q.B=0;Q.L=0;Q.S=0;Q.D=NaN;Q.U=!1},HK=function(Q){return Q.isPlaying()?(g.QA()-Q.X)/1E3:0},UM=function(Q,W){Q.G=W; Q.X=g.QA()},qe=function(Q){switch(Q.playerState){case 1:case 1081:return(g.QA()-Q.X)/1E3+Q.G; case -1E3:return 0}return Q.G},BK=function(Q,W,x){var D=Q.videoId; Q.videoId=W;Q.index=x;W!=D&&IVs(Q)},m85=function(Q){var W={}; W.index=Q.index;W.listId=Q.listId;W.videoId=Q.videoId;W.playerState=Q.playerState;W.volume=Q.volume;W.muted=Q.muted;W.audioTrackId=Q.audioTrackId;W.trackData=g.U6(Q.trackData);W.hasPrevious=Q.y_;W.hasNext=Q.EG;W.playerTime=Q.G;W.playerTimeAt=Q.X;W.seekableStart=Q.N;W.seekableEnd=Q.B;W.duration=Q.L;W.loadedTime=Q.S;W.liveIngestionTime=Q.D;return W},Ih=function(Q,W){g.Rd.call(this); var x=this;this.D=0;this.N=Q;this.X=[];this.L=new zfe;this.U=this.B=null;this.T=(0,g.FD)(this.m75,this);this.G=(0,g.FD)(this.Mu,this);this.S=(0,g.FD)(this.U73,this);this.uj=(0,g.FD)(this.FJ3,this);var D=0;Q?(D=Q.getProxyState(),D!=3&&(Q.subscribe("proxyStateChange",this.eP,this),Nqq(this))):D=3;D!=0&&(W?this.eP(D):g.oc(function(){x.eP(D)},0)); (Q=qhJ())&&$M(this,Q);this.subscribe("yt-remote-cast2-session-change",this.uj)},mV=function(Q){return new A5(Q.N.getPlayerContextData())},Nqq=function(Q){g.o3("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(W){this.X.push(this.N.subscribe(W,g.tv(this.Jr3,W),this))},Q)},c0R=function(Q){g.o3(Q.X,function(W){this.N.unsubscribeByKey(W)},Q); Q.X.length=0},Ne=function(Q){return Q.getState()==1},cK=function(Q,W){var x=Q.L; x.B.length+x.U.length<50&&Q.L.enqueue(W)},gEs=function(Q,W,x){var D=mV(Q); UM(D,x);D.playerState!=-1E3&&(D.playerState=W);gj(Q,D)},yx=function(Q,W,x){Q.N.sendMessage(W,x)},gj=function(Q,W){c0R(Q); Q.N.setPlayerContextData(m85(W));Nqq(Q)},$M=function(Q,W){Q.U&&(Q.U.removeUpdateListener(Q.T),Q.U.removeMediaListener(Q.G),Q.Mu(null)); Q.U=W;Q.U&&(xM("Setting cast session: "+Q.U.sessionId),Q.U.addUpdateListener(Q.T),Q.U.addMediaListener(Q.G),Q.U.media.length&&Q.Mu(Q.U.media[0]))},y0H=function(Q){var W=Q.B.media,x=Q.B.customData; if(W&&x){var D=mV(Q);W.contentId!=D.videoId&&xM("Cast changing video to: "+W.contentId);D.videoId=W.contentId;D.playerState=x.playerState;UM(D,Q.B.getEstimatedTime());gj(Q,D)}else xM("No cast media video. Ignoring state update.")},e6=function(Q,W,x){return(0,g.FD)(function(D){this.mj("Failed to "+W+" with cast v2 channel. Error code: "+D.code); D.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.mj("Retrying "+W+" using MDx browser channel."),yx(this,W,x))},Q)},L6=function(Q,W,x,D){D=D===void 0?!1:D; g.Rd.call(this);var K=this;this.X=NaN;this.KS=!1;this.T=this.S=this.pS=this.F3=NaN;this.uj=[];this.L=this.G=this.N=this.B=this.U=null;this.X3=Q;this.LS=D;this.uj.push(g.vk(window,"beforeunload",function(){K.I2(2)})); this.D=[];this.B=new A5;this.g7=W.id;this.fS=W.idType;this.U=Gj7(this.X3,x,this.RR,this.fS=="shortLived",this.g7);this.U.listen("channelOpened",function(){eyA(K)}); this.U.listen("channelClosed",function(){f6("Channel closed");isNaN(K.X)?zg(!0):zg();K.dispose()}); this.U.listen("channelError",function(l){zg();isNaN(K.En())?(l==1&&K.fS=="shortLived"&&K.publish("browserChannelAuthError",l),f6("Channel error: "+l+" without reconnection"),K.dispose()):(K.KS=!0,f6("Channel error: "+l+" with reconnection in "+K.En()+" ms"),ZU(K,2))}); this.U.listen("channelMessage",function(l){fVY(K,l)}); this.U.wc(W.token);this.subscribe("remoteQueueChange",function(){var l=K.B.videoId;g.$Y()&&g.Ud("yt-remote-session-video-id",l)})},ZKu=function(Q){return g.Os(Q.D,function(W){return W.type=="LOUNGE_SCREEN"})},f6=function(Q){WK("conn",Q)},ZU=function(Q,W){Q.publish("proxyStateChange",W)},Lxk=function(Q){Q.X=g.oc(function(){f6("Connecting timeout"); Q.I2(1)},2E4)},r0F=function(Q){g.Y1(Q.X); Q.X=NaN},Tqu=function(Q){g.Y1(Q.F3); Q.F3=NaN},EEu=function(Q){OK5(Q); Q.pS=g.oc(function(){rj(Q,"getNowPlaying")},2E4)},OK5=function(Q){g.Y1(Q.pS); Q.pS=NaN},eyA=function(Q){f6("Channel opened"); Q.KS&&(Q.KS=!1,Tqu(Q),Q.F3=g.oc(function(){f6("Timing out waiting for a screen.");Q.I2(1)},15E3))},tG5=function(Q,W){var x=null; if(W){var D=ZKu(Q);D&&(x={clientName:D.clientName,deviceMake:D.brand,deviceModel:D.model,osVersion:D.osVersion})}g.g4("yt.mdx.remote.remoteClient_",x);W&&(r0F(Q),Tqu(Q));x=Q.U.WR()&&isNaN(Q.X);W==x?W&&(ZU(Q,1),rj(Q,"getSubtitlesTrack")):W?(Q.q4()&&Q.B.reset(),ZU(Q,1),rj(Q,"getNowPlaying"),Fx7(Q)):Q.I2(1)},QKC=function(Q,W){var x=W.params.videoId; delete W.params.videoId;x==Q.B.videoId&&(g.dS(W.params)?Q.B.trackData=null:Q.B.trackData=W.params,Q.publish("remotePlayerChange"))},WIY=function(Q,W,x){var D=W.params.videoId||W.params.video_id,K=parseInt(W.params.currentIndex,10); Q.B.listId=W.params.listId||Q.B.listId;BK(Q.B,D,K);Q.publish("remoteQueueChange",x)},D6C=function(Q,W){W.params=W.params||{}; WIY(Q,W,"NOW_PLAYING_MAY_CHANGE");x6s(Q,W);Q.publish("autoplayDismissed")},x6s=function(Q,W){var x=parseInt(W.params.currentTime||W.params.current_time,10); UM(Q.B,isNaN(x)?0:x);x=parseInt(W.params.state,10);x=isNaN(x)?-1:x;x==-1&&Q.B.playerState==-1E3&&(x=-1E3);Q.B.playerState=x;x=Number(W.params.loadedTime);Q.B.S=isNaN(x)?0:x;Q.B.PF(Number(W.params.duration));x=Q.B;var D=Number(W.params.liveIngestionTime);x.D=D;x.U=isNaN(D)?!1:!0;x=Q.B;D=Number(W.params.seekableStartTime);W=Number(W.params.seekableEndTime);x.N=isNaN(D)?0:D;x.B=isNaN(W)?0:W;Q.B.playerState==1?EEu(Q):OK5(Q);Q.publish("remotePlayerChange")},KI7=function(Q,W){if(Q.B.playerState!=-1E3){var x= 1085; switch(parseInt(W.params.adState,10)){case 1:x=1081;break;case 2:x=1084;break;case 0:x=1083}Q.B.playerState=x;W=parseInt(W.params.currentTime,10);UM(Q.B,isNaN(W)?0:W);Q.publish("remotePlayerChange")}},ln5=function(Q,W){var x=W.params.muted=="true"; Q.B.volume=parseInt(W.params.volume,10);Q.B.muted=x;Q.publish("remotePlayerChange")},jK7=function(Q,W){Q.G=W.params.videoId; Q.publish("nowAutoplaying",parseInt(W.params.timeout,10))},MTC=function(Q,W){Q.G=W.params.videoId||null; Q.publish("autoplayUpNext",Q.G)},Rre=function(Q,W){Q.L=W.params.autoplayMode; Q.publish("autoplayModeChange",Q.L);Q.L=="DISABLED"&&Q.publish("autoplayDismissed")},w$R=function(Q,W){var x=W.params.hasNext=="true"; Q.B.y_=W.params.hasPrevious=="true";Q.B.EG=x;Q.publish("previousNextChange")},fVY=function(Q,W){W=W.message; W.params?f6("Received: action="+W.action+", params="+g.aj(W.params)):f6("Received: action="+W.action+" {}");switch(W.action){case "loungeStatus":W=WJ(W.params.devices);Q.D=g.pm(W,function(D){return new j1(D)}); W=!!g.Os(Q.D,function(D){return D.type=="LOUNGE_SCREEN"}); tG5(Q,W);W=Q.D9("mlm");Q.publish("multiStateLoopEnabled",W);break;case "loungeScreenDisconnected":g.W1(Q.D,function(D){return D.type=="LOUNGE_SCREEN"}); tG5(Q,!1);break;case "remoteConnected":var x=new j1(WJ(W.params.device));g.Os(Q.D,function(D){return D.yI(x)})||oPA(Q.D,x); break;case "remoteDisconnected":x=new j1(WJ(W.params.device));g.W1(Q.D,function(D){return D.yI(x)}); break;case "gracefulDisconnect":break;case "playlistModified":WIY(Q,W,"QUEUE_MODIFIED");break;case "nowPlaying":D6C(Q,W);break;case "onStateChange":x6s(Q,W);break;case "onAdStateChange":KI7(Q,W);break;case "onVolumeChanged":ln5(Q,W);break;case "onSubtitlesTrackChanged":QKC(Q,W);break;case "nowAutoplaying":jK7(Q,W);break;case "autoplayDismissed":Q.publish("autoplayDismissed");break;case "autoplayUpNext":MTC(Q,W);break;case "onAutoplayModeChanged":Rre(Q,W);break;case "onHasPreviousNextChanged":w$R(Q, W);break;case "requestAssistedSignIn":Q.publish("assistedSignInRequested",W.params.authCode);break;case "onLoopModeChanged":Q.publish("loopModeChange",W.params.loopMode);break;default:f6("Unrecognized action: "+W.action)}},Fx7=function(Q){g.Y1(Q.T); Q.T=g.oc(function(){Q.I2(1)},864E5)},rj=function(Q,W,x){x?f6("Sending: action="+W+", params="+g.aj(x)):f6("Sending: action="+W); Q.U.sendMessage(W,x)},Sc5=function(Q){j6.call(this,"ScreenServiceProxy"); this.Ur=Q;this.B=[];this.B.push(this.Ur.$_s("screenChange",(0,g.FD)(this.ww,this)));this.B.push(this.Ur.$_s("onlineScreenChange",(0,g.FD)(this.n3f,this)))},X$F=function(Q,W){YkJ(); if(!ko||!ko.get("yt-remote-disable-remote-module-for-dev")){W=g.TK("MDX_CONFIG")||W;wbJ();zIk();Tx||(Tx=new FL(W?W.loungeApiHost:void 0),n1u()&&(Tx.B="/api/loungedev"));OM||(OM=g.yF("yt.mdx.remote.deferredProxies_")||[],g.g4("yt.mdx.remote.deferredProxies_",OM));buA();var x=EM();if(!x){var D=new bB(Tx,W?W.disableAutomaticScreenCache||!1:!1);g.g4("yt.mdx.remote.screenService_",D);x=EM();var K={};W&&(K={appId:W.appId,disableDial:W.disableDial,theme:W.theme,loadCastApiSetupScript:W.loadCastApiSetupScript, disableCastApi:W.disableCastApi,enableDialLoungeToken:W.enableDialLoungeToken,enableCastLoungeToken:W.enableCastLoungeToken,forceMirroring:W.forceMirroring});g.g4("yt.mdx.remote.enableConnectWithInitialState_",W?W.enableConnectWithInitialState||!1:!1);d8e(Q,D,function(l){l?Fp()&&iB(Fp(),"YouTube TV"):D.subscribe("onlineScreenChange",function(){XL("yt-remote-receiver-availability-change")})},K)}W&&!g.yF("yt.mdx.remote.initialized_")&&(g.g4("yt.mdx.remote.initialized_",!0),t5("Initializing: "+g.aj(W)), Qt.push(g.lu("yt-remote-cast2-api-ready",function(){XL("yt-remote-api-ready")})),Qt.push(g.lu("yt-remote-cast2-availability-change",function(){XL("yt-remote-receiver-availability-change")})),Qt.push(g.lu("yt-remote-cast2-receiver-selected",function(){Wm(null); XL("yt-remote-auto-connect","cast-selector-receiver")})),Qt.push(g.lu("yt-remote-cast2-receiver-resumed",function(){XL("yt-remote-receiver-resumed","cast-selector-receiver")})),Qt.push(g.lu("yt-remote-cast2-session-change",sKe)),Qt.push(g.lu("yt-remote-connection-change",function(l){l?iB(Fp(),"YouTube TV"):x$()||(iB(null,null),U8u())})),Qt.push(g.lu("yt-remote-cast2-session-failed",function(){XL("yt-remote-connection-failed")})),Q=zrH(),W.isAuto&&(Q.id+="#dial"),K=W.capabilities||[],g.Pb("desktop_enable_autoplay")&& K.push("atp"),K.length>0&&(Q.capabilities=K),Q.name=W.device,Q.app=W.app,(W=W.theme)&&(Q.theme=W),t5(" -- with channel params: "+g.aj(Q)),Q?(g.Ud("yt-remote-session-app",Q.app),g.Ud("yt-remote-session-name",Q.name)):(g.Bk("yt-remote-session-app"),g.Bk("yt-remote-session-name")),g.g4("yt.mdx.remote.channelParams_",Q),x.start(),Fp()||kb5())}},oiC=function(){var Q=EM().Ur.$_gos(); var W=D6();W&&KH()&&(RIY(Q,W)||Q.push(W));return MLR(Q)},Yc7=function(){var Q=u11(); !Q&&Gx()&&HKe()&&(Q={key:"cast-selector-receiver",name:HKe()});return Q},u11=function(){var Q=oiC(),W=D6(); W||(W=x$());return g.Os(Q,function(x){return W&&Ra(W,x.key)?!0:!1})},D6=function(){var Q=Fp(); if(!Q)return null;var W=EM().cM();return S1(W,Q)},sKe=function(Q){t5("remote.onCastSessionChange_: "+w$(Q)); if(Q){var W=D6();if(W&&W.id==Q.id){if(iB(W.id,"YouTube TV"),Q.idType=="shortLived"&&(Q=Q.token))lI&&(lI.token=Q),(W=KH())&&W.wc(Q)}else W&&jf(),Mx(Q,1)}else KH()&&jf()},jf=function(){dj()?ah().stopSession():h5("stopSession called before API ready."); var Q=KH();Q&&(Q.disconnect(1),ni5(null))},VTq=function(){var Q=KH(); return!!Q&&Q.getProxyState()!=3},t5=function(Q){WK("remote",Q)},EM=function(){if(!Puq){var Q=g.yF("yt.mdx.remote.screenService_"); Puq=Q?new Sc5(Q):null}return Puq},Fp=function(){return g.yF("yt.mdx.remote.currentScreenId_")},vi1=function(Q){g.g4("yt.mdx.remote.currentScreenId_",Q)},Cus=function(){return g.yF("yt.mdx.remote.connectData_")},Wm=function(Q){g.g4("yt.mdx.remote.connectData_",Q)},KH=function(){return g.yF("yt.mdx.remote.connection_")},ni5=function(Q){var W=KH(); Wm(null);Q||vi1("");g.g4("yt.mdx.remote.connection_",Q);OM&&(g.o3(OM,function(x){x(Q)}),OM.length=0); W&&!Q?XL("yt-remote-connection-change",!1):!W&&Q&&XL("yt-remote-connection-change",!0)},x$=function(){var Q=g.$Y(); if(!Q)return null;var W=EM();if(!W)return null;W=W.cM();return S1(W,Q)},Mx=function(Q,W){Fp(); D6()&&D6();if(RD)lI=Q;else{vi1(Q.id);var x=g.yF("yt.mdx.remote.enableConnectWithInitialState_")||!1;Q=new L6(Tx,Q,zrH(),x);Q.connect(W,Cus());Q.subscribe("beforeDisconnect",function(D){XL("yt-remote-before-disconnect",D)}); Q.subscribe("beforeDispose",function(){KH()&&(KH(),ni5(null))}); Q.subscribe("browserChannelAuthError",function(){var D=D6();D&&D.idType=="shortLived"&&(dj()?ah().handleBrowserChannelAuthError():h5("refreshLoungeToken called before API ready."))}); ni5(Q)}},kb5=function(){var Q=x$(); Q?(t5("Resume connection to: "+w$(Q)),Mx(Q,0)):(zg(),U8u(),t5("Skipping connecting because no session screen found."))},buA=function(){var Q=zrH(); if(g.dS(Q)){Q=si();var W=g.qW("yt-remote-session-name")||"",x=g.qW("yt-remote-session-app")||"";Q={device:"REMOTE_CONTROL",id:Q,name:W,app:x,mdxVersion:3};Q.authuser=String(g.TK("SESSION_INDEX","0"));(W=g.TK("DELEGATED_SESSION_ID"))&&(Q.pageId=String(W));g.g4("yt.mdx.remote.channelParams_",Q)}},zrH=function(){return g.yF("yt.mdx.remote.channelParams_")||{}},hrF=function(Q,W,x){g.N.call(this); var D=this;this.module=Q;this.J=W;this.Ux=x;this.events=new g.I0(this);this.N=!1;this.L=new g.lW(64);this.B=new g.O3(this.zp,500,this);this.U=new g.O3(this.wd,1E3,this);this.G=new Yo(this.T1t,0,this);this.D={};this.S=new g.O3(this.zj,1E3,this);this.X=new g.Qu(this.seekTo,1E3,this);this.T=this.events.W(this.J,"onVolumeChange",function(K){JVs(D,K)}); g.y(this,this.events);this.events.W(W,"onCaptionsTrackListChanged",this.IXp);this.events.W(W,"captionschanged",this.pDj);this.events.W(W,"captionssettingschanged",this.Ps);this.events.W(W,"videoplayerreset",this.u4);this.events.W(W,"mdxautoplaycancel",function(){D.Ux.mG()}); W.j("enable_mdx_video_play_directly")&&this.events.W(W,"videodatachange",function(){p$p(D.module)||wD(D)||Sf(D,0)}); Q=this.Ux;Q.d7();Q.subscribe("proxyStateChange",this.tb,this);Q.subscribe("remotePlayerChange",this.S5,this);Q.subscribe("remoteQueueChange",this.u4,this);Q.subscribe("previousNextChange",this.iL,this);Q.subscribe("nowAutoplaying",this.Rk,this);Q.subscribe("autoplayDismissed",this.Jb,this);g.y(this,this.B);g.y(this,this.U);g.y(this,this.G);g.y(this,this.S);g.y(this,this.X);this.Ps();this.u4();this.S5()},JVs=function(Q,W){if(wD(Q)){Q.Ux.unsubscribe("remotePlayerChange",Q.S5,Q); var x=Math.round(W.volume);W=!!W.muted;var D=mV(Q.Ux);if(x!==D.volume||W!==D.muted)Q.Ux.setVolume(x,W),Q.S.start();Q.Ux.subscribe("remotePlayerChange",Q.S5,Q)}},ank=function(Q){Q.QA(0); Q.B.stop();Q.q7(new g.lW(64))},Gbe=function(Q,W){if(wD(Q)&&!Q.N){var x=null; W&&(x={style:Q.J.getSubtitlesUserSettings()},Object.assign(x,W));Q.Ux.MU(Q.J.getVideoData(1).videoId,x);Q.D=mV(Q.Ux).trackData}},Sf=function(Q,W){var x=Q.J.getPlaylist(); if(x==null?0:x.listId){var D=x.index;var K=x.listId.toString()}x=Q.J.getVideoData(1);Q.Ux.playVideo(x.videoId,W,D,K,x.playerParams,x.fS,XvY(x));Q.q7(new g.lW(1))},d61=function(Q,W){if(W){var x=Q.J.getOption("captions","tracklist",{Sg:1}); x&&x.length?(Q.J.setOption("captions","track",W),Q.N=!1):(Q.J.loadModule("captions"),Q.N=!0)}else Q.J.setOption("captions","track",{})},wD=function(Q){return mV(Q.Ux).videoId===Q.J.getVideoData(1).videoId},iuR=function(Q){this.B=Q},bI=function(){g.L.call(this,{K:"div", Y:"ytp-mdx-popup-dialog",Z:{role:"dialog"},V:[{K:"div",Y:"ytp-mdx-popup-dialog-inner-content",V:[{K:"div",Y:"ytp-mdx-popup-title",m3:"Saliste de tu cuenta"},{K:"div",Y:"ytp-mdx-popup-description",m3:"Es posible que los videos que mires se agreguen al historial de reproducciones de la TV, lo que puede influir en las recomendaciones. Para que esto no suceda, presiona \u201cCancelar\u201d y accede a YouTube desde tu computadora."},{K:"div",Y:"ytp-mdx-privacy-popup-buttons",V:[{K:"button",lj:["ytp-button", "ytp-mdx-privacy-popup-cancel"],m3:"Cancelar"},{K:"button",lj:["ytp-button","ytp-mdx-privacy-popup-confirm"],m3:"Confirmar"}]}]}]});this.B=new g.Wi(this,250);this.cancelButton=this.Nj("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.Nj("ytp-mdx-privacy-popup-confirm");g.y(this,this.B);this.W(this.cancelButton,"click",this.U);this.W(this.confirmButton,"click",this.D)},s9=function(Q){g.L.call(this,{K:"div", Y:"ytp-remote",V:[{K:"div",Y:"ytp-remote-display-status",V:[{K:"div",Y:"ytp-remote-display-status-icon",V:[g.J44()]},{K:"div",Y:"ytp-remote-display-status-text",m3:"{{statustext}}"}]}]});this.api=Q;this.B=new g.Wi(this,250);g.y(this,this.B);this.W(Q,"presentingplayerstatechange",this.onStateChange);this.wE(Q.getPlayerStateObject())},zP=function(Q,W){g.yh.call(this,"Reproducir en",1,Q,W); this.J=Q;this.sy={};this.W(Q,"onMdxReceiversChange",this.N);this.W(Q,"presentingplayerstatechange",this.N);this.N()},AVR=function(Q){g.V1.call(this,Q); this.vF={key:jce(),name:"Esta computadora"};this.ud=null;this.subscriptions=[];this.z8=this.Ux=null;this.sy=[this.vF];this.d8=this.vF;this.WV=new g.lW(64);this.EO=0;this.bf=-1;this.fV=!1;this.b_=this.KV=this.Pw=null;if(!g.$h(this.player.C())&&!g.Il(this.player.C())){Q=this.player;var W=g.oN(Q);W&&(W=W.Xy())&&(W=new zP(Q,W),g.y(this,W));W=new s9(Q);g.y(this,W);g.qf(Q,W.element,4);this.Pw=new bI;g.y(this,this.Pw);g.qf(Q,this.Pw.element,4);this.fV=!!x$()}},k$=function(Q){Q.KV&&(Q.player.removeEventListener("presentingplayerstatechange", Q.KV),Q.KV=null)},HuR=function(Q,W,x){Q.WV=x; Q.player.publish("presentingplayerstatechange",new g.zV(x,W))},Xv=function(Q,W){if(W.key!==Q.d8.key)if(W.key===Q.vF.key)jf(); else if(p$p(Q)&&U6q(Q),Q.d8=W,!Q.player.C().j("disable_mdx_connection_in_mdx_module_for_music_web")||!g.Il(Q.player.C())){var x=Q.player.getPlaylistId();var D=Q.player.getVideoData(1);var K=D.videoId;if(!x&&!K||(Q.player.getAppState()===2||Q.player.getAppState()===1)&&Q.player.C().j("should_clear_video_data_on_player_cued_unstarted"))D=null;else{var l=Q.player.getPlaylist();if(l){var M=[];for(var w=0;w2*this.size&&lH(this),!0):!1}; g.R.get=function(Q,W){return DS(this.U,Q)?this.U[Q]:W}; g.R.set=function(Q,W){DS(this.U,Q)||(this.size+=1,this.B.push(Q),this.uD++);this.U[Q]=W}; g.R.forEach=function(Q,W){for(var x=this.v8(),D=0;D=D.B.length)return g.Mi;var l=D.B[W++];return g.KZ(Q?l:D.U[l])}; return K}; var QcR={Nxj:"atp",R31:"ska",p83:"que",JX3:"mus",w85:"sus",tH3:"dsp",l5Z:"seq",mk3:"mic",Uqf:"dpa",X9Z:"cds",ffZ:"mlm",pz3:"dsdtr",vR3:"ntb",dW9:"vsp",Xz3:"scn",Uy1:"rpe",xqf:"dcn",q85:"dcp",Ovj:"pas",u17:"drq",rX5:"opf",c_t:"els",J_f:"isg",gIf:"svq",Ql3:"mvp",cv3:"ads",F13:"iat"},W2s={Xif:"u",r4f:"cl",Hu1:"k",DHS:"i",hH3:"cr",cX5:"m",zzf:"g",m6:"up"};j1.prototype.yI=function(Q){return Q?this.id==Q.id:!1}; var scA="",ko=null;VLY.prototype.flush=function(Q,W){Q=Q===void 0?[]:Q;W=W===void 0?!1:W;if(g.Pb("enable_client_streamz_web")){Q=g.V(Q);for(var x=Q.next();!x.done;x=Q.next())x=g.k34(x.value),x={serializedIncrementBatch:g.Vn(x.B())},g.wV("streamzIncremented",x,{sendIsolatedPayload:W})}}; var oa,GGC=v1J("loadCastFramework")||v1J("loadCastApplicationFramework"),ASC=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.Wu(Yo,g.N);g.R=Yo.prototype;g.R.Fx=function(Q){this.N=arguments;this.B=!1;this.rE?this.D=g.QA()+this.CA:this.rE=g.Cr(this.L,this.CA)}; g.R.stop=function(){this.rE&&(g.Nz.clearTimeout(this.rE),this.rE=null);this.D=null;this.B=!1;this.N=[]}; g.R.pause=function(){++this.U}; g.R.resume=function(){this.U&&(--this.U,!this.U&&this.B&&(this.B=!1,this.X.apply(null,this.N)))}; g.R.U3=function(){this.stop();Yo.t2.U3.call(this)}; g.R.Dw=function(){this.rE&&(g.Nz.clearTimeout(this.rE),this.rE=null);this.D?(this.rE=g.Cr(this.L,this.D-g.QA()),this.D=null):this.U?this.B=!0:(this.B=!1,this.X.apply(null,this.N))};nL.prototype.stringify=function(Q){return g.Nz.JSON.stringify(Q,void 0)}; nL.prototype.parse=function(Q){return g.Nz.JSON.parse(Q,void 0)};g.Wu(UOe,g.Ux);g.Wu(qk1,g.Ux);var BmA=null;g.Wu(Is1,g.Ux);g.Wu(mO5,g.Ux);g.Wu(Nm5,g.Ux);CL.prototype.debug=function(){}; CL.prototype.info=function(){}; CL.prototype.warning=function(){};var rSH={},L2Y={};g.R=Ju.prototype;g.R.setTimeout=function(Q){this.Pt=Q}; g.R.Kz=function(Q){Q=Q.target;var W=this.s3;W&&g.O7(Q)==3?W.Ed():this.NU(Q)}; g.R.NU=function(Q){try{if(Q==this.B)a:{var W=g.O7(this.B),x=this.B.U,D=this.B.getStatus();if(!(W<3)&&(W!=3||this.B&&(this.U.U||g.Fk(this.B)||g.tr(this.B)))){this.LS||W!=4||x==7||(x==8||D<=0?VN(3):VN(2));E1A(this);var K=this.B.getStatus();this.Vj=K;var l=Zle(this);if(this.X=K==200){if(this.Kn&&!this.eZ){b:{if(this.B){var M=g.QS(this.B,"X-HTTP-Initial-Response");if(M&&!g.p5(M)){var w=M;break b}}w=null}if(Q=w)this.eZ=!0,jCH(this,Q);else{this.X=!1;this.L=3;PJ(12);hu(this);aa(this);break a}}if(this.fS){Q= !0;for(var S;!this.LS&&this.G0&&!this.fn&&(this.fn=!0,this.D.MB(this)):(hu(this),aa(this))}else jCH(this,l);W==4&&hu(this);this.X&&!this.LS&&(W==4?F2u(this.D,this):(this.X=!1,pL(this)))}else g.$9F(this.B),K==400&&l.indexOf("Unknown SID")> 0?(this.L=3,PJ(12)):(this.L=0,PJ(13)),hu(this),aa(this)}}}catch(b){}finally{}}; g.R.cancel=function(){this.LS=!0;hu(this)}; g.R.Nf=function(){this.uj=null;var Q=Date.now();Q-this.SZ>=0?(this.g7!=2&&(VN(3),PJ(17)),hu(this),this.L=2,aa(this)):OlY(this,this.SZ-Q)}; g.R.getLastError=function(){return this.L}; g.R.s1=function(){return this.B};Rzs.prototype.cancel=function(){this.D=Sd1(this);if(this.U)this.U.cancel(),this.U=null;else if(this.B&&this.B.size!==0){for(var Q=g.V(this.B.values()),W=Q.next();!W.done;W=Q.next())W.value.cancel();this.B.clear()}};g.R=XkR.prototype;g.R.KM=8;g.R.W3=1;g.R.connect=function(Q,W,x,D){PJ(0);this.Gn=Q;this.LS=W||{};x&&D!==void 0&&(this.LS.OSID=x,this.LS.OAID=D);this.eZ=this.WN;this.X3=DWR(this,null,this.Gn);Au(this)}; g.R.disconnect=function(){uwY(this);if(this.W3==3){var Q=this.O3++,W=this.X3.clone();g.Yl(W,"SID",this.N);g.Yl(W,"RID",Q);g.Yl(W,"TYPE","terminate");q0(this,W);Q=new Ju(this,this.N,Q);Q.g7=2;Q.S=tM(W.clone());W=!1;if(g.Nz.navigator&&g.Nz.navigator.sendBeacon)try{W=g.Nz.navigator.sendBeacon(Q.S.toString(),"")}catch(x){}!W&&g.Nz.Image&&((new Image).src=Q.S,W=!0);W||(Q.B=eI5(Q.D,null),Q.B.send(Q.S));Q.F3=Date.now();pL(Q)}Cyu(this)}; g.R.C2=function(){return this.W3==0}; g.R.getState=function(){return this.W3}; g.R.fM=function(Q){if(this.X)if(this.X=null,this.W3==1){if(!Q){this.O3=Math.floor(Math.random()*1E5);Q=this.O3++;var W=new Ju(this,"",Q),x=this.T;this.Vj&&(x?(x=g.HZ(x),g.q9(x,this.Vj)):x=this.Vj);this.G!==null||this.SZ||(W.X3=x,x=null);var D;if(this.tf)a:{for(var K=D=0;K4096){D=K;break a}if(D===4096||K===this.D.length-1){D=K+1;break a}}D= 1E3}else D=1E3;D=VYC(this,W,D);K=this.X3.clone();g.Yl(K,"RID",Q);g.Yl(K,"CVER",22);this.fS&&g.Yl(K,"X-HTTP-Session-Id",this.fS);q0(this,K);x&&(this.SZ?D="headers="+g.OE(g.EHD(x))+"&"+D:this.G&&g.v0(K,this.G,x));xWk(this.U,W);this.gH&&g.Yl(K,"TYPE","init");this.tf?(g.Yl(K,"$req",D),g.Yl(K,"SID","null"),W.Kn=!0,ySH(W,K,null)):ySH(W,K,D);this.W3=2}}else this.W3==3&&(Q?Pyq(this,Q):this.D.length==0||wk5(this.U)||Pyq(this))}; g.R.kq=function(){this.S=null;vYA(this);if(this.Cn&&!(this.Pt||this.B==null||this.yA<=0)){var Q=2*this.yA;this.KS=vJ((0,g.FD)(this.uE3,this),Q)}}; g.R.uE3=function(){this.KS&&(this.KS=null,this.eZ=!1,this.Pt=!0,PJ(10),d$(this),vYA(this))}; g.R.MB=function(Q){this.B==Q&&this.Cn&&!this.Pt&&(oYY(this),this.Pt=!0,PJ(11))}; g.R.k_=function(){this.uj!=null&&(this.uj=null,d$(this),QCk(this),PJ(19))}; g.R.Yr7=function(Q){Q?PJ(2):PJ(1)}; g.R.isActive=function(){return!!this.L&&this.L.isActive(this)}; g.R=pkH.prototype;g.R.Xv=function(){}; g.R.c6=function(){}; g.R.JD=function(){}; g.R.Qg=function(){}; g.R.isActive=function(){return!0}; g.R.fz=function(){};g.Wu($o,g.FN);$o.prototype.open=function(){this.B.L=this.D;this.X&&(this.B.g7=!0);this.B.connect(this.L,this.U||void 0)}; $o.prototype.close=function(){this.B.disconnect()}; $o.prototype.send=function(Q){var W=this.B;if(typeof Q==="string"){var x={};x.__data__=Q;Q=x}else this.N&&(x={},x.__data__=g.aj(Q),Q=x);W.D.push(new MYY(W.QN++,Q));W.W3==3&&Au(W)}; $o.prototype.U3=function(){this.B.L=null;delete this.D;this.B.disconnect();delete this.B;$o.t2.U3.call(this)}; g.Wu(a0s,UOe);g.Wu(GTJ,qk1);g.Wu(BJ,pkH);BJ.prototype.Xv=function(){this.B.dispatchEvent("m")}; BJ.prototype.c6=function(Q){this.B.dispatchEvent(new a0s(Q))}; BJ.prototype.JD=function(Q){this.B.dispatchEvent(new GTJ(Q))}; BJ.prototype.Qg=function(){this.B.dispatchEvent("n")};var mk=new g.FN;g.n(Alu,g.Ux);g.R=cJ.prototype;g.R.JM=null;g.R.bO=!1;g.R.t6=null;g.R.Xn=null;g.R.pI=null;g.R.QU=null;g.R.nC=null;g.R.fl=null;g.R.lD=null;g.R.qn=null;g.R.cj=0;g.R.F5=null;g.R.JN=null;g.R.XJ=null;g.R.qp=-1;g.R.UP=!0;g.R.xw=!1;g.R.c7=0;g.R.Kl=null;var I0p={},$W7={};g.R=cJ.prototype;g.R.setTimeout=function(Q){this.U=Q}; g.R.J1=function(Q){Q=Q.target;var W=this.Kl;W&&g.O7(Q)==3?W.Ed():this.lh(Q)}; g.R.lh=function(Q){try{if(Q==this.qn)a:{var W=g.O7(this.qn),x=this.qn.U,D=this.qn.getStatus();if(g.O6&&!g.nP("420+")){if(W<4)break a}else if(W<3||W==3&&!g.Fk(this.qn))break a;this.xw||W!=4||x==7||(x==8||D<=0?this.B.UJ(3):this.B.UJ(2));clA(this);var K=this.qn.getStatus();this.qp=K;var l=g.Fk(this.qn);if(this.bO=K==200){W==4&&g$(this);if(this.fS){for(Q=!0;!this.xw&&this.cj0?(this.XJ=3,N0(13)):(this.XJ=0,N0(14)),g$(this),gYu(this)}}catch(w){}finally{}}; g.R.cancel=function(){this.xw=!0;g$(this)}; g.R.Q0=function(){this.t6=null;var Q=Date.now();Q-this.Xn>=0?(this.QU!=2&&this.B.UJ(3),g$(this),this.XJ=2,N0(18),gYu(this)):N3q(this,this.Xn-Q)}; g.R.getLastError=function(){return this.XJ};g.R=ZwR.prototype;g.R.L6=null;g.R.SH=null;g.R.RJ=!1;g.R.v7=null;g.R.TF=null;g.R.fN=-1;g.R.XF=null;g.R.Km=null;g.R.connect=function(Q){this.v7=Q;Q=e1(this.B,null,this.v7);N0(3);Date.now();var W=this.B.T;W!=null?(this.XF=W[0],(this.Km=W[1])?(this.TF=1,Lep(this)):(this.TF=2,rlF(this))):(QN(Q,"MODE","init"),this.SH=new cJ(this),this.SH.JM=this.L6,qdq(this.SH,Q,!1,null,!0),this.TF=0)}; g.R.MN=function(Q){if(Q)this.TF=2,rlF(this);else{N0(4);var W=this.B;W.GV=W.XD.fN;r$(W,9)}Q&&this.UJ(2)}; g.R.dF=function(Q){return this.B.dF(Q)}; g.R.abort=function(){this.SH&&(this.SH.cancel(),this.SH=null);this.fN=-1}; g.R.C2=function(){return!1}; g.R.d_=function(Q,W){this.fN=Q.qp;if(this.TF==0)if(W){try{var x=this.U.parse(W)}catch(D){Q=this.B;Q.GV=this.fN;r$(Q,2);return}this.XF=x[0];this.Km=x[1]}else Q=this.B,Q.GV=this.fN,r$(Q,2);else this.TF==2&&(this.RJ?(N0(7),Date.now()):W=="11111"?(N0(6),this.RJ=!0,Date.now(),this.fN=200,this.SH.cancel(),N0(12),fL(this.B,this,!0)):(N0(8),Date.now(),this.RJ=!1))}; g.R.Ew=function(){this.fN=this.SH.qp;if(this.SH.bO)this.TF==0?this.Km?(this.TF=1,Lep(this)):(this.TF=2,rlF(this)):this.TF==2&&(this.RJ?(N0(12),fL(this.B,this,!0)):(N0(11),fL(this.B,this,!1)));else{this.TF==0?N0(9):this.TF==2&&N0(10);var Q=this.B;this.SH.getLastError();Q.GV=this.fN;r$(Q,2)}}; g.R.By=function(){return this.B.By()}; g.R.isActive=function(){return this.B.isActive()}; g.R.UJ=function(Q){this.B.UJ(Q)};g.R=T3H.prototype;g.R.nu=null;g.R.UR=null;g.R.F1=null;g.R.VI=null;g.R.jN=null;g.R.lc=null;g.R.LM=null;g.R.gF=null;g.R.mB=0;g.R.Xx=0;g.R.eL=null;g.R.xl=null;g.R.Q7=null;g.R.LU=null;g.R.XD=null;g.R.tQ=null;g.R.Z$=-1;g.R.Em=-1;g.R.GV=-1;g.R.VV=0;g.R.Ss=0;g.R.dX=8;g.Wu(EY7,g.Ux);g.Wu(FeC,g.Ux);g.R=T3H.prototype;g.R.connect=function(Q,W,x,D,K){N0(0);this.jN=W;this.UR=x||{};D&&K!==void 0&&(this.UR.OSID=D,this.UR.OAID=K);this.S?(Ia((0,g.FD)(this.AI,this,Q),100),Q8C(this)):this.AI(Q)}; g.R.disconnect=function(){Wju(this);if(this.B==3){var Q=this.mB++,W=this.lc.clone();g.Yl(W,"SID",this.N);g.Yl(W,"RID",Q);g.Yl(W,"TYPE","terminate");LL(this,W);Q=new cJ(this,this.N,Q);Q.QU=2;Q.nC=tM(W.clone());(new Image).src=Q.nC.toString();Q.pI=Date.now();B3C(Q)}bX5(this)}; g.R.AI=function(Q){this.XD=new ZwR(this);this.XD.L6=this.nu;this.XD.U=this.L;this.XD.connect(Q)}; g.R.C2=function(){return this.B==0}; g.R.getState=function(){return this.B}; g.R.g_=function(Q){this.xl=null;j8F(this,Q)}; g.R.v6=function(){this.Q7=null;this.VI=new cJ(this,this.N,"rpc",this.G);this.VI.JM=this.nu;this.VI.c7=0;var Q=this.LM.clone();g.Yl(Q,"RID","rpc");g.Yl(Q,"SID",this.N);g.Yl(Q,"CI",this.tQ?"0":"1");g.Yl(Q,"AID",this.Z$);LL(this,Q);g.Yl(Q,"TYPE","xmlhttp");qdq(this.VI,Q,!0,this.gF,!1)}; g.R.d_=function(Q,W){if(this.B!=0&&(this.VI==Q||this.F1==Q))if(this.GV=Q.qp,this.F1==Q&&this.B==3)if(this.dX>7){try{var x=this.L.parse(W)}catch(D){x=null}if(Array.isArray(x)&&x.length==3)if(Q=x,Q[0]==0)a:{if(!this.Q7){if(this.VI)if(this.VI.pI+3E30)){if(D=W==1)this.F1||this.xl||this.B==1||this.VV>=2?D=!1:(this.xl=Ia((0,g.FD)(this.g_,this,Q),Rfq(this,this.VV)),this.VV++,D=!0);D=!(D||W==2&&wse(this))}if(D)switch(x){case 1:r$(this, 5);break;case 4:r$(this,10);break;case 3:r$(this,6);break;case 7:r$(this,12);break;default:r$(this,2)}}}; g.R.cW=function(Q){if(!g.FH(arguments,this.B))throw Error("Unexpected channel state: "+this.B);}; g.R.rA1=function(Q){Q?N0(2):(N0(1),SUq(this,8))}; g.R.dF=function(Q){if(Q)throw Error("Can't create secondary domain capable XhrIo object.");Q=new g.Lr;Q.G=!1;return Q}; g.R.isActive=function(){return!!this.eL&&this.eL.isActive(this)}; g.R.UJ=function(Q){var W=mk;W.dispatchEvent(new FeC(W,Q))}; g.R.By=function(){return!1}; g.R=s81.prototype;g.R.GY=function(){}; g.R.oR=function(){}; g.R.j0=function(){}; g.R.oi=function(){}; g.R.r_=function(){return{}}; g.R.isActive=function(){return!0};g.R=zfe.prototype;g.R.enqueue=function(Q){this.U.push(Q)}; g.R.isEmpty=function(){return this.B.length===0&&this.U.length===0}; g.R.clear=function(){this.B=[];this.U=[]}; g.R.contains=function(Q){return g.FH(this.B,Q)||g.FH(this.U,Q)}; g.R.remove=function(Q){var W=this.B;var x=(0,g.oQF)(W,Q);x>=0?(g.te(W,x),W=!0):W=!1;return W||g.Qn(this.U,Q)}; g.R.dY=function(){for(var Q=[],W=this.B.length-1;W>=0;--W)Q.push(this.B[W]);W=this.U.length;for(var x=0;x=qcp.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(Q=qcp[this.U],this.rE=g.oc((0,g.FD)(this.o6,this),Q),this.U++):this.publish("pairingFailed",Error("Server error "+Q.status))}; g.R.gw=function(){this.B=null;this.publish("pairingFailed",Error("Server not responding"))}; var qcp=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.Wu(Rh,j6);g.R=Rh.prototype;g.R.start=function(){Me(this)&&this.publish("screenChange");!g.qW("yt-remote-lounge-token-expiration")&&c4p(this);g.Y1(this.B);this.B=g.oc((0,g.FD)(this.start,this),1E4)}; g.R.add=function(Q,W){Me(this);$51(this,Q);wj(this,!1);this.publish("screenChange");W(Q);Q.token||c4p(this)}; g.R.remove=function(Q,W){var x=Me(this);m5A(this,Q)&&(wj(this,!1),x=!0);W(Q);x&&this.publish("screenChange")}; g.R.hQ=function(Q,W,x,D){var K=Me(this),l=this.get(Q.id);l?(l.name!=W&&(l.name=W,wj(this,!1),K=!0),x(Q)):D(Error("no such local screen."));K&&this.publish("screenChange")}; g.R.U3=function(){g.Y1(this.B);Rh.t2.U3.call(this)}; g.R.F31=function(Q){Me(this);var W=this.screens.length;Q=Q&&Q.screens||[];for(var x=Q.length,D=0;D20)break a;w=W(l,M)}l=w}K.name=l}x(sM(this,K))},this), onError:(0,g.FD)(function(K){D(Error("pairing request failed: "+K.status))},this), onTimeout:(0,g.FD)(function(){D(Error("pairing request timed out."))},this)})}; g.R.U3=function(){g.w1(this.U);g.w1(this.B);bB.t2.U3.call(this)}; g.R.lpf=function(){tMH(this);this.publish("screenChange");this.B.update()}; bB.prototype.dispose=bB.prototype.dispose;g.Wu(zx,g.Rd);g.R=zx.prototype;g.R.gx=function(Q){this.d7()||(Q&&(Xp(this,""+Q),this.publish("sessionFailed")),this.B=null,this.publish("sessionScreen",null))}; g.R.info=function(Q){WK(this.fS,Q)}; g.R.zY=function(){return null}; g.R.jP=function(Q){var W=this.U;Q?(W.displayStatus=new chrome.cast.ReceiverDisplayStatus(Q,[]),W.displayStatus.showStop=!0):W.displayStatus=null;chrome.cast.setReceiverDisplayStatus(W,(0,g.FD)(function(){this.info("Updated receiver status for "+W.friendlyName+": "+Q)},this),(0,g.FD)(function(){Xp(this,"Failed to update receiver status for: "+W.friendlyName)},this))}; g.R.U3=function(){this.jP("");zx.t2.U3.call(this)};g.n(oh,zx);g.R=oh.prototype;g.R.vp=function(Q){if(this.D){if(this.D==Q)return;Xp(this,"Overriding cast session with new session object");bKu(this);this.F3=!1;this.T="unknown";this.D.removeUpdateListener(this.pS);this.D.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.KS)}this.D=Q;this.D.addUpdateListener(this.pS);this.D.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.KS);j_p(this,"getMdxSessionStatus")}; g.R.hh=function(Q){this.info("launchWithParams no-op for Cast: "+g.aj(Q))}; g.R.stop=function(){this.D?this.D.stop((0,g.FD)(function(){this.gx()},this),(0,g.FD)(function(){this.gx(Error("Failed to stop receiver app."))},this)):this.gx(Error("Stopping cast device without session."))}; g.R.jP=function(){}; g.R.U3=function(){this.info("disposeInternal");bKu(this);this.D&&(this.D.removeUpdateListener(this.pS),this.D.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.KS));this.D=null;zx.prototype.U3.call(this)}; g.R.EX3=function(Q,W){if(!this.d7())if(W)if(W=WJ(W),g.r4(W))switch(Q=""+W.type,W=W.data||{},this.info("onYoutubeMessage_: "+Q+" "+g.aj(W)),Q){case "mdxSessionStatus":D8F(this,W);break;case "loungeToken":MGJ(this,W);break;default:Xp(this,"Unknown youtube message: "+Q)}else Xp(this,"Unable to parse message.");else Xp(this,"No data in message.")}; g.R.yq=function(Q,W,x,D){g.Y1(this.S);this.S=0;OXF(this.N,this.U.label,Q,this.U.friendlyName,(0,g.FD)(function(K){K?W(K):D>=0?(Xp(this,"Screen "+Q+" appears to be offline. "+D+" retries left."),this.S=g.oc((0,g.FD)(this.yq,this,Q,W,x,D-1),300)):x(Error("Unable to fetch screen."))},this),x)}; g.R.zY=function(){return this.D}; g.R.oY=function(Q){this.d7()||Q||(Xp(this,"Cast session died."),this.gx())};g.n(uB,zx);g.R=uB.prototype;g.R.vp=function(Q){this.D=Q;this.D.addUpdateListener(this.LS)}; g.R.hh=function(Q){this.X3=Q;this.uj()}; g.R.stop=function(){nEs(this);this.D?this.D.stop((0,g.FD)(this.gx,this,null),(0,g.FD)(this.gx,this,"Failed to stop DIAL device.")):this.gx()}; g.R.U3=function(){nEs(this);this.D&&this.D.removeUpdateListener(this.LS);this.D=null;zx.prototype.U3.call(this)}; g.R.Gu=function(Q){this.d7()||Q||(Xp(this,"DIAL session died."),this.L(),this.L=function(){},this.gx())};g.n(Vx,zx);Vx.prototype.stop=function(){this.gx()}; Vx.prototype.vp=function(){}; Vx.prototype.hh=function(){g.Y1(this.D);this.D=NaN;var Q=S1(this.N.cM(),this.U.label);Q?kM(this,Q):this.gx(Error("No such screen"))}; Vx.prototype.U3=function(){g.Y1(this.D);this.D=NaN;zx.prototype.U3.call(this)};g.n(PK,g.Rd);g.R=PK.prototype; g.R.init=function(Q,W){chrome.cast.timeout.requestSession=3E4;var x=new chrome.cast.SessionRequest(this.S,[chrome.cast.Capability.AUDIO_OUT]);g.Pb("desktop_enable_cast_connect")&&(x.androidReceiverCompatible=!0);this.T||(x.dialRequest=new chrome.cast.DialRequest("YouTube"));var D=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;Q=Q||this.X?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var K=(0,g.FD)(this.EDj,this);x=new chrome.cast.ApiConfig(x,(0,g.FD)(this.Vb, this),K,D,Q);x.customDialLaunchCallback=(0,g.FD)(this.cnf,this);chrome.cast.initialize(x,(0,g.FD)(function(){this.d7()||(chrome.cast.addReceiverActionListener(this.L),HXF(),this.U.subscribe("onlineScreenChange",(0,g.FD)(this.w_,this)),this.D=vEH(this),chrome.cast.setCustomReceivers(this.D,function(){},(0,g.FD)(function(l){this.mj("Failed to set initial custom receivers: "+g.aj(l))},this)),this.publish("yt-remote-cast2-availability-change",C6(this)),W(!0))},this),(0,g.FD)(function(l){this.mj("Failed to initialize API: "+ g.aj(l)); W(!1)},this))}; g.R.Wjt=function(Q,W){vK("Setting connected screen ID: "+Q+" -> "+W);if(this.B){var x=this.B.B;if(!Q||x&&x.id!=Q)vK("Unsetting old screen status: "+this.B.U.friendlyName),J5(this,null)}if(Q&&W){if(!this.B){Q=S1(this.U.cM(),Q);if(!Q){vK("setConnectedScreenStatus: Unknown screen.");return}if(Q.idType=="shortLived"){vK("setConnectedScreenStatus: Screen with id type to be short lived.");return}x=VGH(this,Q);x||(vK("setConnectedScreenStatus: Connected receiver not custom..."),x=new chrome.cast.Receiver(Q.uuid? Q.uuid:Q.id,Q.name),x.receiverType=chrome.cast.ReceiverType.CUSTOM,this.D.push(x),chrome.cast.setCustomReceivers(this.D,function(){},(0,g.FD)(function(D){this.mj("Failed to set initial custom receivers: "+g.aj(D))},this))); vK("setConnectedScreenStatus: new active receiver: "+x.friendlyName);J5(this,new Vx(this.U,x),!0)}this.B.jP(W)}else vK("setConnectedScreenStatus: no screen.")}; g.R.h23=function(Q){this.d7()?this.mj("Setting connection data on disposed cast v2"):this.B?this.B.hh(Q):this.mj("Setting connection data without a session")}; g.R.e4=function(){this.d7()?this.mj("Stopping session on disposed cast v2"):this.B?(this.B.stop(),J5(this,null)):vK("Stopping non-existing session")}; g.R.requestSession=function(){chrome.cast.requestSession((0,g.FD)(this.Vb,this),(0,g.FD)(this.tQf,this))}; g.R.U3=function(){this.U.unsubscribe("onlineScreenChange",(0,g.FD)(this.w_,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.L);var Q=d5s,W=g.yF("yt.mdx.remote.debug.handlers_");g.Qn(W||[],Q);g.w1(this.B);g.Rd.prototype.U3.call(this)}; g.R.mj=function(Q){WK("Controller",Q)}; g.R.Tl=function(Q,W){this.B==Q&&(W||J5(this,null),this.publish("yt-remote-cast2-session-change",W))}; g.R.lG3=function(Q,W){if(!this.d7())if(Q)switch(Q.friendlyName=chrome.cast.unescape(Q.friendlyName),vK("onReceiverAction_ "+Q.label+" / "+Q.friendlyName+"-- "+W),W){case chrome.cast.ReceiverAction.CAST:if(this.B)if(this.B.U.label!=Q.label)vK("onReceiverAction_: Stopping active receiver: "+this.B.U.friendlyName),this.B.stop();else{vK("onReceiverAction_: Casting to active receiver.");this.B.B&&this.publish("yt-remote-cast2-session-change",this.B.B);break}switch(Q.receiverType){case chrome.cast.ReceiverType.CUSTOM:J5(this, new Vx(this.U,Q));break;case chrome.cast.ReceiverType.DIAL:J5(this,new uB(this.U,Q,this.N,this.config_));break;case chrome.cast.ReceiverType.CAST:J5(this,new oh(this.U,Q,this.config_));break;default:this.mj("Unknown receiver type: "+Q.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.B&&this.B.U.label==Q.label?this.B.stop():this.mj("Stopping receiver w/o session: "+Q.friendlyName)}else this.mj("onReceiverAction_ called without receiver.")}; g.R.cnf=function(Q){if(this.d7())return Promise.reject(Error("disposed"));var W=Q.receiver;W.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.mj("Not DIAL receiver: "+W.friendlyName),W.receiverType=chrome.cast.ReceiverType.DIAL);var x=this.B?this.B.U:null;if(!x||x.label!=W.label)return this.mj("Receiving DIAL launch request for non-clicked DIAL receiver: "+W.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(x&&x.label==W.label&&x.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.B.B)return vK("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.B.B),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.mj('Changing CAST intent from "'+x.receiverType+'" to "dial" for '+W.friendlyName);J5(this,new uB(this.U,W,this.N,this.config_))}W=this.B;W.S=Q;W.S.appState==chrome.cast.DialAppState.RUNNING?(Q=W.S.extraData||{},x=Q.screenId||null,YM(W)&&Q.loungeToken?Q.loungeTokenRefreshIntervalMs?Q=oEe(W,{name:W.U.friendlyName,screenId:Q.screenId,loungeToken:Q.loungeToken,dialId:W.S.receiver.label, screenIdType:"shortLived"},Q.loungeTokenRefreshIntervalMs):(g.FP(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(Q)+".")),Q=u8R(W,x)):Q=u8R(W,x)):Q=k$R(W);return Q}; g.R.Vb=function(Q){var W=this;if(!this.d7()&&!this.X){vK("New cast session ID: "+Q.sessionId);var x=Q.receiver;if(x.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.B)if(x.receiverType==chrome.cast.ReceiverType.CAST)vK("Got resumed cast session before resumed mdx connection."),x.friendlyName=chrome.cast.unescape(x.friendlyName),J5(this,new oh(this.U,x,this.config_),!0);else{this.mj("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var D=this.B.U,K=S1(this.U.cM(), D.label);K&&Ra(K,x.label)&&D.receiverType!=chrome.cast.ReceiverType.CAST&&x.receiverType==chrome.cast.ReceiverType.CAST&&(vK("onSessionEstablished_: manual to cast session change "+x.friendlyName),g.w1(this.B),this.B=new oh(this.U,x,this.config_),this.B.subscribe("sessionScreen",(0,g.FD)(this.Tl,this,this.B)),this.B.subscribe("sessionFailed",function(){return PNp(W,W.B)}),this.B.hh(null)); this.B.vp(Q)}}}; g.R.Y_=function(){return this.B?this.B.zY():null}; g.R.tQf=function(Q){this.d7()||(this.mj("Failed to estabilish a session: "+g.aj(Q)),Q.code!=chrome.cast.ErrorCode.CANCEL&&J5(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.R.EDj=function(Q){vK("Receiver availability updated: "+Q);if(!this.d7()){var W=C6(this);this.G=Q==chrome.cast.ReceiverAvailability.AVAILABLE;C6(this)!=W&&this.publish("yt-remote-cast2-availability-change",C6(this))}}; g.R.w_=function(){this.d7()||(this.D=vEH(this),vK("Updating custom receivers: "+g.aj(this.D)),chrome.cast.setCustomReceivers(this.D,function(){},(0,g.FD)(function(){this.mj("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",C6(this)))}; PK.prototype.setLaunchParams=PK.prototype.h23;PK.prototype.setConnectedScreenStatus=PK.prototype.Wjt;PK.prototype.stopSession=PK.prototype.e4;PK.prototype.getCastSession=PK.prototype.Y_;PK.prototype.requestSession=PK.prototype.requestSession;PK.prototype.init=PK.prototype.init;PK.prototype.dispose=PK.prototype.dispose;var A0A=[];g.R=A5.prototype; g.R.reset=function(Q){this.listId="";this.index=-1;this.videoId="";IVs(this);this.volume=-1;this.muted=!1;Q&&(this.index=Q.index,this.listId=Q.listId,this.videoId=Q.videoId,this.playerState=Q.playerState,this.volume=Q.volume,this.muted=Q.muted,this.audioTrackId=Q.audioTrackId,this.trackData=Q.trackData,this.y_=Q.hasPrevious,this.EG=Q.hasNext,this.G=Q.playerTime,this.X=Q.playerTimeAt,this.N=Q.seekableStart,this.B=Q.seekableEnd,this.L=Q.duration,this.S=Q.loadedTime,this.D=Q.liveIngestionTime,this.U= !isNaN(this.D))}; g.R.isPlaying=function(){return this.playerState==1}; g.R.isBuffering=function(){return this.playerState==3}; g.R.QD=function(){return this.playerState==1081}; g.R.PF=function(Q){this.L=isNaN(Q)?0:Q}; g.R.getDuration=function(){return this.U?this.L+HK(this):this.L}; g.R.clone=function(){return new A5(m85(this))};g.n(Ih,g.Rd);g.R=Ih.prototype;g.R.getState=function(){return this.D}; g.R.IX=function(){return this.N.getReconnectTimeout()}; g.R.aC=function(){this.N.reconnect()}; g.R.play=function(){Ne(this)?(this.B?this.B.play(null,g.bi,e6(this,"play")):yx(this,"play"),gEs(this,1,qe(mV(this))),this.publish("remotePlayerChange")):cK(this,this.play)}; g.R.pause=function(){Ne(this)?(this.B?this.B.pause(null,g.bi,e6(this,"pause")):yx(this,"pause"),gEs(this,2,qe(mV(this))),this.publish("remotePlayerChange")):cK(this,this.pause)}; g.R.seekTo=function(Q){if(Ne(this)){if(this.B){var W=mV(this),x=new chrome.cast.media.SeekRequest;x.currentTime=Q;W.isPlaying()||W.isBuffering()?x.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:x.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.B.seek(x,g.bi,e6(this,"seekTo",{newTime:Q}))}else yx(this,"seekTo",{newTime:Q});gEs(this,3,Q);this.publish("remotePlayerChange")}else cK(this,g.tv(this.seekTo,Q))}; g.R.stop=function(){if(Ne(this)){this.B?this.B.stop(null,g.bi,e6(this,"stopVideo")):yx(this,"stopVideo");var Q=mV(this);Q.index=-1;Q.videoId="";IVs(Q);gj(this,Q);this.publish("remotePlayerChange")}else cK(this,this.stop)}; g.R.setVolume=function(Q,W){if(Ne(this)){var x=mV(this);if(this.U){if(x.volume!=Q){var D=Math.round(Q)/100;this.U.setReceiverVolumeLevel(D,(0,g.FD)(function(){xM("set receiver volume: "+D)},this),(0,g.FD)(function(){this.mj("failed to set receiver volume.")},this))}x.muted!=W&&this.U.setReceiverMuted(W,(0,g.FD)(function(){xM("set receiver muted: "+W)},this),(0,g.FD)(function(){this.mj("failed to set receiver muted.")},this))}else{var K={volume:Q, muted:W};x.volume!=-1&&(K.delta=Q-x.volume);yx(this,"setVolume",K)}x.muted=W;x.volume=Q;gj(this,x)}else cK(this,g.tv(this.setVolume,Q,W))}; g.R.MU=function(Q,W){if(Ne(this)){var x=mV(this);Q={videoId:Q};W&&(x.trackData={trackName:W.name,languageCode:W.languageCode,sourceLanguageCode:W.translationLanguage?W.translationLanguage.languageCode:"",languageName:W.languageName,kind:W.kind},Q.style=g.aj(W.style),g.q9(Q,x.trackData));yx(this,"setSubtitlesTrack",Q);gj(this,x)}else cK(this,g.tv(this.MU,Q,W))}; g.R.setAudioTrack=function(Q,W){Ne(this)?(W=W.getLanguageInfo().getId(),yx(this,"setAudioTrack",{videoId:Q,audioTrackId:W}),Q=mV(this),Q.audioTrackId=W,gj(this,Q)):cK(this,g.tv(this.setAudioTrack,Q,W))}; g.R.playVideo=function(Q,W,x,D,K,l,M){D=D===void 0?null:D;K=K===void 0?null:K;l=l===void 0?null:l;M=M===void 0?null:M;var w=mV(this),S={videoId:Q};x!==void 0&&(S.currentIndex=x);BK(w,Q,x||0);W!==void 0&&(UM(w,W),S.currentTime=W);D&&(S.listId=D);K&&(S.playerParams=K);l&&(S.clickTrackingParams=l);M&&(S.locationInfo=g.aj(M));yx(this,"setPlaylist",S);D||gj(this,w)}; g.R.j$=function(Q,W){if(Ne(this)){if(Q&&W){var x=mV(this);BK(x,Q,W);gj(this,x)}yx(this,"previous")}else cK(this,g.tv(this.j$,Q,W))}; g.R.nextVideo=function(Q,W){if(Ne(this)){if(Q&&W){var x=mV(this);BK(x,Q,W);gj(this,x)}yx(this,"next")}else cK(this,g.tv(this.nextVideo,Q,W))}; g.R.Rc=function(){if(Ne(this)){yx(this,"clearPlaylist");var Q=mV(this);Q.reset();gj(this,Q);this.publish("remotePlayerChange")}else cK(this,this.Rc)}; g.R.mG=function(){Ne(this)?yx(this,"dismissAutoplay"):cK(this,this.mG)}; g.R.dispose=function(){if(this.D!=3){var Q=this.D;this.D=3;this.publish("proxyStateChange",Q,this.D)}g.Rd.prototype.dispose.call(this)}; g.R.U3=function(){c0R(this);this.N=null;this.L.clear();$M(this,null);g.Rd.prototype.U3.call(this)}; g.R.eP=function(Q){if((Q!=this.D||Q==2)&&this.D!=3&&Q!=0){var W=this.D;this.D=Q;this.publish("proxyStateChange",W,Q);if(Q==1)for(;!this.L.isEmpty();)W=Q=this.L,W.B.length===0&&(W.B=W.U,W.B.reverse(),W.U=[]),Q.B.pop().apply(this);else Q==3&&this.dispose()}}; g.R.Jr3=function(Q,W){this.publish(Q,W)}; g.R.m75=function(Q){if(!Q)this.Mu(null),$M(this,null);else if(this.U.receiver.volume){Q=this.U.receiver.volume;var W=mV(this),x=Math.round(100*Q.level||0);if(W.volume!=x||W.muted!=Q.muted)xM("Cast volume update: "+Q.level+(Q.muted?" muted":"")),W.volume=x,W.muted=!!Q.muted,gj(this,W)}}; g.R.Mu=function(Q){xM("Cast media: "+!!Q);this.B&&this.B.removeUpdateListener(this.S);if(this.B=Q)this.B.addUpdateListener(this.S),y0H(this),this.publish("remotePlayerChange")}; g.R.U73=function(Q){Q?(y0H(this),this.publish("remotePlayerChange")):this.Mu(null)}; g.R.JR=function(){yx(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.R.FJ3=function(){var Q=qhJ();Q&&$M(this,Q)}; g.R.mj=function(Q){WK("CP",Q)};g.n(L6,g.Rd);g.R=L6.prototype; g.R.connect=function(Q,W){if(W){var x=W.listId,D=W.videoId,K=W.videoIds,l=W.playerParams,M=W.clickTrackingParams,w=W.index,S={videoId:D},b=W.currentTime,z=W.locationInfo;W=W.loopMode;b!==void 0&&(S.currentTime=b<=5?0:b);l&&(S.playerParams=l);z&&(S.locationInfo=z);M&&(S.clickTrackingParams=M);x&&(S.listId=x);K&&K.length>0&&(S.videoIds=K.join(","));w!==void 0&&(S.currentIndex=w);this.LS&&(S.loopMode=W||"LOOP_MODE_OFF");x&&(this.B.listId=x);this.B.videoId=D;this.B.index=w||0;this.B.state=3;UM(this.B, b);this.L="UNSUPPORTED";x=this.LS?"setInitialState":"setPlaylist";f6("Connecting with "+x+" and params: "+g.aj(S));this.U.connect({method:x,params:g.aj(S)},Q,kGH())}else f6("Connecting without params"),this.U.connect({},Q,kGH());Lxk(this)}; g.R.wc=function(Q){this.U.wc(Q)}; g.R.dispose=function(){this.d7()||(g.g4("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),ZU(this,3));g.Rd.prototype.dispose.call(this)}; g.R.U3=function(){r0F(this);OK5(this);Tqu(this);g.Y1(this.S);this.S=NaN;g.Y1(this.T);this.T=NaN;this.N=null;g.Cw(this.uj);this.uj.length=0;this.U.dispose();g.Rd.prototype.U3.call(this);this.L=this.G=this.D=this.B=this.U=null}; g.R.D9=function(Q){if(!this.D||this.D.length===0)return!1;for(var W=g.V(this.D),x=W.next();!x.done;x=W.next())if(!x.value.capabilities.has(Q))return!1;return!0}; g.R.WP=function(){var Q=3;this.d7()||(Q=0,isNaN(this.En())?this.U.WR()&&isNaN(this.X)&&(Q=1):Q=2);return Q}; g.R.I2=function(Q){f6("Disconnecting with "+Q);g.g4("yt.mdx.remote.remoteClient_",null);r0F(this);this.publish("beforeDisconnect",Q);Q==1&&zg();this.U.disconnect(Q);this.dispose()}; g.R.wb=function(){var Q=this.B;this.N&&(Q=this.B.clone(),BK(Q,this.N,Q.index));return m85(Q)}; g.R.aA3=function(Q){var W=this,x=new A5(Q);x.videoId&&x.videoId!=this.B.videoId&&(this.N=x.videoId,g.Y1(this.S),this.S=g.oc(function(){if(W.N){var K=W.N;W.N=null;W.B.videoId!=K&&rj(W,"getNowPlaying")}},5E3)); var D=[];this.B.listId==x.listId&&this.B.videoId==x.videoId&&this.B.index==x.index||D.push("remoteQueueChange");this.B.playerState==x.playerState&&this.B.volume==x.volume&&this.B.muted==x.muted&&qe(this.B)==qe(x)&&g.aj(this.B.trackData)==g.aj(x.trackData)||D.push("remotePlayerChange");this.B.reset(Q);g.o3(D,function(K){this.publish(K)},this)}; g.R.q4=function(){var Q=this.U.getDeviceId(),W=g.Os(this.D,function(x){return x.type=="REMOTE_CONTROL"&&x.id!=Q}); return W?W.id:""}; g.R.En=function(){return this.U.IX()}; g.R.Ko=function(){return this.L||"UNSUPPORTED"}; g.R.QK=function(){return this.G||""}; g.R.sY=function(){!isNaN(this.En())&&this.U.aC()}; g.R.H27=function(Q,W){rj(this,Q,W);Fx7(this)}; g.R.RR=function(){var Q=g.Ic("SAPISID","")||g.Ic("__Secure-1PAPISID")||"",W=g.Ic("__Secure-3PAPISID","")||"";if(!Q&&!W)return"";Q=g.Vn(g.C5(Q),2);W=g.Vn(g.C5(W),2);return g.Vn(g.C5(","+Q+","+W),2)}; L6.prototype.subscribe=L6.prototype.subscribe;L6.prototype.unsubscribeByKey=L6.prototype.Or;L6.prototype.getProxyState=L6.prototype.WP;L6.prototype.disconnect=L6.prototype.I2;L6.prototype.getPlayerContextData=L6.prototype.wb;L6.prototype.setPlayerContextData=L6.prototype.aA3;L6.prototype.getOtherConnectedRemoteId=L6.prototype.q4;L6.prototype.getReconnectTimeout=L6.prototype.En;L6.prototype.getAutoplayMode=L6.prototype.Ko;L6.prototype.getAutoplayVideoId=L6.prototype.QK;L6.prototype.reconnect=L6.prototype.sY; L6.prototype.sendMessage=L6.prototype.H27;L6.prototype.getXsrfToken=L6.prototype.RR;L6.prototype.isCapabilitySupportedOnConnectedDevices=L6.prototype.D9;g.n(Sc5,j6);g.R=Sc5.prototype;g.R.cM=function(Q){return this.Ur.$_gs(Q)}; g.R.contains=function(Q){return!!this.Ur.$_c(Q)}; g.R.get=function(Q){return this.Ur.$_g(Q)}; g.R.start=function(){this.Ur.$_st()}; g.R.add=function(Q,W,x){this.Ur.$_a(Q,W,x)}; g.R.remove=function(Q,W,x){this.Ur.$_r(Q,W,x)}; g.R.hQ=function(Q,W,x,D){this.Ur.$_un(Q,W,x,D)}; g.R.U3=function(){for(var Q=this.B.length,W=0;W1&&!this.J.getOption("remote","quickCast")?(this.sy=g.uZ(Q,this.B,this),this.ZV(g.pm(Q,this.B)),Q=this.J.getOption("remote","currentReceiver"),Q=this.B(Q),this.options[Q]&&this.ND(Q),this.enable(!0)):this.enable(!1)}; zP.prototype.B=function(Q){return Q.key}; zP.prototype.VD=function(Q){return Q==="cast-selector-receiver"?"Transmitir\u2026":this.sy[Q].name}; zP.prototype.ZA=function(Q){g.yh.prototype.ZA.call(this,Q);this.J.setOption("remote","currentReceiver",this.sy[Q]);this.F0.X0()};g.n(AVR,g.V1);g.R=AVR.prototype; g.R.create=function(){var Q=this.player.C(),W=g.BL(Q);Q={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:Q.j("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:Q.j("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:Q.j("enable_cast_short_lived_lounge_token")};X$F(W,Q);this.subscriptions.push(g.lu("yt-remote-before-disconnect",this.qx3,this));this.subscriptions.push(g.lu("yt-remote-connection-change",this.gDj,this));this.subscriptions.push(g.lu("yt-remote-receiver-availability-change",this.Ab, this));this.subscriptions.push(g.lu("yt-remote-auto-connect",this.Lm9,this));this.subscriptions.push(g.lu("yt-remote-receiver-resumed",this.dr9,this));this.subscriptions.push(g.lu("mdx-privacy-popup-confirm",this.Ze3,this));this.subscriptions.push(g.lu("mdx-privacy-popup-cancel",this.VEf,this));this.Ab()}; g.R.load=function(){this.player.cancelPlayback();g.V1.prototype.load.call(this);this.b_=new iuR(this);this.player.nV(this.b_);this.ud=new hrF(this,this.player,this.Ux);var Q=(Q=Cus())?Q.currentTime:0;var W=VTq()?new Ih(KH(),void 0):null;Q==0&&W&&(Q=qe(mV(W)));Q!==0&&this.QA(Q);HuR(this,this.WV,this.WV);this.player.CY(6)}; g.R.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.Yv();this.d8=this.vF;g.Sp(this.ud,this.Ux);this.Ux=this.b_=this.ud=null;g.V1.prototype.unload.call(this);this.player.CY(5);k$(this)}; g.R.U3=function(){g.jT(this.subscriptions);g.V1.prototype.U3.call(this)}; g.R.Hk=function(Q){var W=g.i2.apply(1,arguments);this.loaded&&this.ud.Kt.apply(this.ud,[Q].concat(g.C(W)))}; g.R.getAdState=function(){return this.bf}; g.R.y_=function(){return this.Ux?mV(this.Ux).y_:!1}; g.R.EG=function(){return this.Ux?mV(this.Ux).EG:!1}; g.R.QA=function(Q,W){this.EO=Q||0;this.player.publish("progresssync",Q,W);this.player.WD("onVideoProgress",Q||0)}; g.R.getCurrentTime=function(){return this.EO}; g.R.getProgressState=function(){var Q=mV(this.Ux),W=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!Q.QD()&&this.player.Fi(),clipEnd:W.clipEnd,clipStart:W.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:Q.getDuration(),ingestionTime:Q.U?Q.D+HK(Q):Q.D,isAtLiveHead:(Q.U?Q.B+HK(Q):Q.B)-this.getCurrentTime()<=1,loaded:Q.S,seekableEnd:Q.U?Q.B+HK(Q):Q.B,seekableStart:Q.N>0?Q.N+HK(Q):Q.N,offset:0,viewerLivestreamJoinMediaTime:0}}; g.R.nextVideo=function(){this.Ux&&this.Ux.nextVideo()}; g.R.j$=function(){this.Ux&&this.Ux.j$()}; g.R.qx3=function(Q){Q===1&&(this.z8=this.Ux?mV(this.Ux):null)}; g.R.gDj=function(){var Q=VTq()?new Ih(KH(),void 0):null;if(Q){var W=this.d8;this.loaded&&this.unload();this.Ux=Q;this.z8=null;W.key!==this.vF.key&&(this.d8=W,this.load())}else g.w1(this.Ux),this.Ux=null,this.loaded&&(this.unload(),(Q=this.z8)&&Q.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(Q.videoId,qe(Q)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.R.Ab=function(){var Q=[this.vF],W=Q.concat,x=oiC();Gx()&&g.qW("yt-remote-cast-available")&&x.push({key:"cast-selector-receiver",name:"Cast..."});this.sy=W.call(Q,x);Q=Yc7()||this.vF;Xv(this,Q);this.player.WD("onMdxReceiversChange")}; g.R.Lm9=function(){var Q=Yc7();Xv(this,Q)}; g.R.dr9=function(){this.d8=Yc7()}; g.R.Ze3=function(){this.fV=!0;k$(this);RD=!1;lI&&Mx(lI,1);lI=null}; g.R.VEf=function(){this.fV=!1;k$(this);Xv(this,this.vF);this.d8=this.vF;RD=!1;lI=null;this.player.playVideo()}; g.R.AA=function(Q,W){switch(Q){case "casting":return this.loaded;case "receivers":return this.sy;case "currentReceiver":return W&&(W.key==="cast-selector-receiver"?Bq1():Xv(this,W)),this.loaded?this.d8:this.vF;case "quickCast":return this.sy.length===2&&this.sy[1].key==="cast-selector-receiver"?(W&&Bq1(),!0):!1}}; g.R.JR=function(){this.Ux.JR()}; g.R.AX=function(){return!1}; g.R.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.R.isLoggedIn=function(){var Q,W;return((Q=g.TK("PLAYER_CONFIG"))==null?void 0:(W=Q.args)==null?void 0:W.authuser)!==void 0?!0:!(!g.TK("SESSION_INDEX")&&!g.TK("LOGGED_IN"))};g.nM("remote",AVR);})(_yt_player);