(function(g){var window=this;'use strict';var sYl=function(W){if(W instanceof g.x8)return W;if(typeof W.PC=="function")return W.PC(!1);if(g.WR(W)){var J=0,K=new g.x8;K.next=function(){for(;;){if(J>=W.length)return g.lO;if(J in W)return g.Oi(W[J++]);J++}}; return K}throw Error("Not implemented");},cwR=function(W,J,K){if(g.WR(W))g.el(W,J,K); else for(W=sYl(W);;){var I=W.next();if(I.done)break;J.call(K,I.value,void 0,W)}},ik=function(W){g.hh(W,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.px()).toString(36)); return W},Jf=function(W,J,K){Array.isArray(K)||(K=[String(K)]); g.Bdv(W.T,J,K)},Puo=function(W,J){var K=[]; cwR(J,function(I){try{var q=g.O6.prototype.K.call(this,I,!0)}catch(S){if(S=="Storage: Invalid value was encountered")return;throw S;}q===void 0?K.push(I):g.LbH(q)&&K.push(I)},W); return K},XOT=function(W,J){Puo(W,J).forEach(function(K){g.O6.prototype.remove.call(this,K)},W)},WQp=function(W){if(W.lN){if(W.lN.locationOverrideToken)return{locationOverrideToken:W.lN.locationOverrideToken}; if(W.lN.latitudeE7!=null&&W.lN.longitudeE7!=null)return{latitudeE7:W.lN.latitudeE7,longitudeE7:W.lN.longitudeE7}}return null},izo=function(W,J){g.ao(W,J)||W.push(J)},JaW=function(W){var J=0,K; for(K in W)J++;return J},KQr=function(W,J){return g.s$(W,J)},I_$=function(W){try{return g.vH.JSON.parse(W)}catch(J){}W=String(W); if(/^\s*$/.test(W)?0:/^[\],:{}\s\u2028\u2029]*$/.test(W.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("("+W+")")}catch(J){}throw Error("Invalid JSON string: "+W);},KE=function(W){if(g.vH.JSON)try{return g.vH.JSON.parse(W)}catch(J){}return I_$(W)},qDo=function(){var W=Iz(); this.W=W;W.K_("/client_streamz/youtube/living_room/mdx/channel/opened",g.fR("channel_type"))},SDo=function(){var W=Iz(); this.W=W;W.K_("/client_streamz/youtube/living_room/mdx/channel/closed",g.fR("channel_type"))},p7r=function(){var W=Iz(); this.W=W;W.K_("/client_streamz/youtube/living_room/mdx/channel/message_received",g.fR("channel_type"))},l_R=function(){var W=Iz(); this.W=W;W.K_("/client_streamz/youtube/living_room/mdx/channel/success")},nup=function(){var W=Iz(); this.W=W;W.K_("/client_streamz/youtube/living_room/mdx/channel/error",g.fR("channel_type"),g.fR("error_type"))},Aar=function(){var W=Iz(); this.W=W;W.K_("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},DUW=function(){var W=Iz(); this.W=W;W.K_("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},jvL=function(W){if(W.S1&&typeof W.S1=="function")return W.S1(); if(typeof Map!=="undefined"&&W instanceof Map||typeof Set!=="undefined"&&W instanceof Set)return Array.from(W.values());if(typeof W==="string")return W.split("");if(g.WR(W)){for(var J=[],K=W.length,I=0;I1){if(K%2)throw Error("Uneven number of arguments");for(var I=0;I5&&(W=W.slice(W.length-5)); var J=g.zC(in$(),function(I){return I.loungeToken}),K=g.zC(W,function(I){return I.loungeToken}); g.vo(K,function(I){return!g.ao(J,I)})&&JJp(); g.Hd("yt-remote-local-screens",W,31536E3)},tf=function(W){W||(g.EN("yt-remote-session-screen-id"),g.EN("yt-remote-session-video-id")); X7o();W=fE();g.Nj(W,hf());cax(W)},IRp=function(){if(!F3){var W=g.RW(); W&&(F3=new g.G9(W))}},qNR=function(){IRp(); return F3?!!F3.get("yt-remote-use-staging-server"):!1},az=function(W,J){g.Ia[W]=!0; var K=g.Jj();K&&K.publish.apply(K,arguments);g.Ia[W]=!1},SN0=function(){},Iz=function(){if(!uk){uk=new g.rO(new SN0); var W=g.UD("client_streamz_web_flush_count",-1);W!==-1&&(uk.G=W)}return uk},pd$=function(){var W=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return W?parseInt(W[1],10):0},lRo=function(W){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+W)!=-1||document.currentScript.src.indexOf("&"+W)!=-1)},ndL=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},NK=function(W){W.length?AJW(W.shift(),function(){NK(W)}):DkR()},j$0=function(W){return"chrome-extension://"+W+"/cast_sender.js"},AJW=function(W,J,K){var I=document.createElement("script"); I.onerror=J;K&&(I.onload=K);g.nw(I,g.wl(W));(document.head||document.documentElement).appendChild(I)},fRr=function(){var W=pd$(),J=[]; if(W>1){var K=W-1;J.push("//www.gstatic.com/eureka/clank/"+W+"/cast_sender.js");J.push("//www.gstatic.com/eureka/clank/"+K+"/cast_sender.js")}return J},DkR=function(){var W=ndL(); W&&W(!1,"No cast extension found")},t6o=function(){if(hkr){var W=2,J=ndL(),K=function(){W--; W==0&&J&&J(!0)}; window.__onGCastApiAvailable=K;AJW("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",DkR,K)}},FrL=function(){t6o(); var W=fRr();W.push("//www.gstatic.com/eureka/clank/cast_sender.js");NK(W)},uJv=function(){t6o(); var W=fRr();W.push.apply(W,g.w(aRo.map(j$0)));W.push("//www.gstatic.com/eureka/clank/cast_sender.js");NK(W)},dz=function(W,J,K){g.R.call(this); this.S=K!=null?(0,g.Io)(W,K):W;this.F4=J;this.j=(0,g.Io)(this.cq,this);this.W=!1;this.K=0;this.G=this.tp=null;this.T=[]},y5=function(){},Nio=function(){g.P4.call(this,"p")},dkx=function(){g.P4.call(this,"o")},Ukv=function(){return yJo=yJo||new g.t0},Znj=function(W){g.P4.call(this,"serverreachability",W)},UM=function(W){var J=Ukv(); J.dispatchEvent(new Znj(J,W))},Q$r=function(W){g.P4.call(this,"statevent",W)},ZD=function(W){var J=Ukv(); J.dispatchEvent(new Q$r(J,W))},CBo=function(W,J,K,I){g.P4.call(this,"timingevent",W); this.size=J;this.rtt=K;this.retries=I},Q5=function(W,J){if(typeof W!=="function")throw Error("Fn must not be null and must be a function"); return g.vH.setTimeout(function(){W()},J)},CE=function(){},wz=function(W,J,K,I){this.G=W; this.T=J;this.oG=K;this.qD=I||1;this.P7=new g.NW(this);this.Js=45E3;this.SZ=null;this.S=!1;this.C=this.FW=this.N=this.Y3=this.G8=this.eZ=this.PS=null;this.sI=[];this.W=null;this.Z=0;this.j=this.XW=null;this.sT=-1;this.jZ=!1;this.bO=0;this.D0=null;this.SI=this.OI=this.Tx=this.vS=!1;this.K=new wdp},wdp=function(){this.G=null; this.W="";this.K=!1},gdx=function(W,J,K){W.Y3=1; W.N=ik(J.clone());W.C=K;W.vS=!0;M6l(W,null)},M6l=function(W,J){W.G8=Date.now(); MK(W);W.FW=W.N.clone();Jf(W.FW,"t",W.qD);W.Z=0;var K=W.G.Y3;W.K=new wdp;W.W=GWT(W.G,K?J:null,!W.C);W.bO>0&&(W.D0=new g.J5((0,g.Io)(W.o4,W,W.W),W.bO));W.P7.listen(W.W,"readystatechange",W.xZ);J=W.SZ?g.ih(W.SZ):{};W.C?(W.XW||(W.XW="POST"),J["Content-Type"]="application/x-www-form-urlencoded",W.W.send(W.FW,W.XW,W.C,J)):(W.XW="GET",W.W.send(W.FW,W.XW,null,J));UM(1)},xkx=function(W){if(!$kT(W))return g.XI(W.W); var J=g.Wg(W.W);if(J==="")return"";var K="",I=J.length,q=g.cS(W.W)==4;if(!W.K.G){if(typeof TextDecoder==="undefined")return gz(W),Gb(W),"";W.K.G=new g.vH.TextDecoder}for(var S=0;SJ.length)return Onx;J=J.slice(I,I+K);W.Z=I+K;return J},MK=function(W){W.eZ=Date.now()+W.Js; V6v(W,W.Js)},V6v=function(W,J){if(W.PS!=null)throw Error("WatchDog timer not null"); W.PS=Q5((0,g.Io)(W.Sw,W),J)},EdW=function(W){W.PS&&(g.vH.clearTimeout(W.PS),W.PS=null)},Gb=function(W){W.G.eF()||W.jZ||ekx(W.G,W)},gz=function(W){EdW(W); g.hE(W.D0);W.D0=null;W.P7.removeAll();if(W.W){var J=W.W;W.W=null;J.abort();J.dispose()}},kWp=function(W,J){try{var K=W.G; if(K.LQ!=0&&(K.W==W||RkR(K.K,W)))if(!W.OI&&RkR(K.K,W)&&K.LQ==3){try{var I=K.X0.W.parse(J)}catch(y){I=null}if(Array.isArray(I)&&I.length==3){var q=I;if(q[0]==0)a:{if(!K.N){if(K.W)if(K.W.G8+3E30&&(K.bO=1.5*n);I=K;var A=W.O$();if(A){var D=g.il(A,"X-Client-Wire-Protocol");if(D){var f=I.K;!f.W&&(g.uh(D,"spdy")||g.uh(D,"quic")||g.uh(D,"h2"))&&(f.T=f.j,f.W=new Set,f.K&&(mke(f,f.K),f.K=null))}if(I.vS){var h=g.il(A,"X-HTTP-Session-Id");h&&(I.Ym=h,g.hh(I.SZ,I.vS,h))}}K.LQ=3;K.j&&K.j.Fl();K.bb&&(K.iU=Date.now()-W.G8);I=K;var t=W;I.mz=rJT(I,I.Y3?I.qD:null,I.oG);if(t.OI){odR(I.K, t);var F=t,a=I.bO;a&&F.setTimeout(a);F.PS&&(EdW(F),MK(F));I.W=t}else Lrp(I);K.G.length>0&&Tb(K)}else S[0]!="stop"&&S[0]!="close"||OM(K,7);else K.LQ==3&&(S[0]=="stop"||S[0]=="close"?S[0]=="stop"?OM(K,7):K.disconnect():S[0]!="noop"&&K.j&&K.j.Hu(S),K.sI=0)}UM(4)}catch(y){}},zkl=function(W,J){this.W=W; this.map=J;this.context=null},vdT=function(W){this.j=W||10; g.vH.PerformanceNavigationTiming?(W=g.vH.performance.getEntriesByType("navigation"),W=W.length>0&&(W[0].nextHopProtocol=="hq"||W[0].nextHopProtocol=="h2")):W=!!(g.vH.chrome&&g.vH.chrome.loadTimes&&g.vH.chrome.loadTimes()&&g.vH.chrome.loadTimes().wasFetchedViaSpdy);this.T=W?this.j:1;this.W=null;this.T>1&&(this.W=new Set);this.K=null;this.G=[]},YNR=function(W){return W.K?!0:W.W?W.W.size>=W.T:!1},Biv=function(W){return W.K?1:W.W?W.W.size:0},RkR=function(W,J){return W.K?W.K==J:W.W?W.W.has(J):!1},mke= function(W,J){W.W?W.W.add(J):W.K=J},odR=function(W,J){W.K&&W.K==J?W.K=null:W.W&&W.W.has(J)&&W.W.delete(J)},s$r=function(W){if(W.K!=null)return W.G.concat(W.K.sI); if(W.W!=null&&W.W.size!==0){var J=W.G;W=g.d(W.W.values());for(var K=W.next();!K.done;K=W.next())J=J.concat(K.value.sI);return J}return g.U$(W.G)},cJR=function(W,J){var K=new CE; if(g.vH.Image){var I=new Image;I.onload=g.Sl(H$,K,"TestLoadImage: loaded",!0,J,I);I.onerror=g.Sl(H$,K,"TestLoadImage: error",!1,J,I);I.onabort=g.Sl(H$,K,"TestLoadImage: abort",!1,J,I);I.ontimeout=g.Sl(H$,K,"TestLoadImage: timeout",!1,J,I);g.vH.setTimeout(function(){if(I.ontimeout)I.ontimeout()},1E4); I.src=W}else J(!1)},PBo=function(W,J){var K=new CE,I=new AbortController,q=setTimeout(function(){I.abort(); H$(K,"TestPingServer: timeout",!1,J)},1E4); fetch(W,{signal:I.signal}).then(function(S){clearTimeout(q);S.ok?H$(K,"TestPingServer: ok",!0,J):H$(K,"TestPingServer: server error",!1,J)}).catch(function(){clearTimeout(q); H$(K,"TestPingServer: error",!1,J)})},H$=function(W,J,K,I,q){try{q&&(q.onload=null,q.onerror=null,q.onabort=null,q.ontimeout=null),I(K)}catch(S){}},Xdr=function(){this.W=new y5},W9R=function(W,J,K){var I=K||""; try{hJx(W,function(q,S){var p=q;g.i0(q)&&(p=g.Lq(q));J.push(I+S+"="+encodeURIComponent(p))})}catch(q){throw J.push(I+"type="+encodeURIComponent("_badmap")),q; }},V5=function(W,J,K){return K&&K.Kh3?K.Kh3[W]||J:J},iL0=function(W){this.G=[]; this.qD=this.mz=this.SZ=this.oG=this.W=this.Ym=this.vS=this.jZ=this.Z=this.sT=this.C=null;this.hh=this.FW=0;this.Bt=V5("failFast",!1,W);this.OI=this.PS=this.N=this.S=this.j=null;this.Fz=!0;this.Lk=this.D0=-1;this.SI=this.sI=this.G8=0;this.dB=V5("baseRetryDelayMs",5E3,W);this.wB=V5("retryDelaySeedMs",1E4,W);this.Os=V5("forwardChannelMaxRetries",2,W);this.kK=V5("forwardChannelRequestTimeoutMs",2E4,W);this.yr=W&&W.EWS||void 0;this.Nu=W&&W.zps||void 0;this.lN=W&&W.WSu||!1;this.bO=void 0;this.Y3=W&&W.lLW|| !1;this.T="";this.K=new vdT(W&&W.Og3);this.X0=new Xdr;this.P7=W&&W.uUN||!1;this.eZ=W&&W.bgN||!1;this.P7&&this.eZ&&(this.eZ=!1);this.Da=W&&W.SJS||!1;W&&W.Pp0&&(this.Fz=!1);this.bb=!this.P7&&this.Fz&&W&&W.m3I||!1;this.nk=void 0;W&&W.PW&&W.PW>0&&(this.nk=W.PW);this.fE=void 0;this.iU=0;this.Js=!1;this.Tx=this.XW=null},xo=function(W){W.W&&(JFR(W),W.W.cancel(),W.W=null)},K9v=function(W){xo(W); W.N&&(g.vH.clearTimeout(W.N),W.N=null);$o(W);W.K.cancel();W.S&&(typeof W.S==="number"&&g.vH.clearTimeout(W.S),W.S=null)},Tb=function(W){YNR(W.K)||W.S||(W.S=!0,g.Cq(W.y7,W),W.G8=0)},qOj=function(W,J){if(Biv(W.K)>=W.K.T-(W.S?1:0))return!1; if(W.S)return W.G=J.sI.concat(W.G),!0;if(W.LQ==1||W.LQ==2||W.G8>=(W.Bt?0:W.Os))return!1;W.S=Q5((0,g.Io)(W.y7,W,J),Itj(W,W.G8));W.G8++;return!0},pM0=function(W,J){var K; J?K=J.oG:K=W.FW++;var I=W.SZ.clone();g.hh(I,"SID",W.T);g.hh(I,"RID",K);g.hh(I,"AID",W.D0);EM(W,I);W.Z&&W.C&&g.uY(I,W.Z,W.C);K=new wz(W,W.T,K,W.G8+1);W.Z===null&&(K.SZ=W.C);J&&(W.G=J.sI.concat(W.G));J=SOr(W,K,1E3);K.setTimeout(Math.round(W.kK*.5)+Math.round(W.kK*.5*Math.random()));mke(W.K,K);gdx(K,I,J)},EM=function(W,J){W.jZ&&g.BR(W.jZ,function(K,I){g.hh(J,I,K)}); W.j&&hJx({},function(K,I){g.hh(J,I,K)})},SOr=function(W,J,K){K=Math.min(W.G.length,K); var I=W.j?(0,g.Io)(W.j.Ib,W.j,W):null;a:{for(var q=W.G,S=-1;;){var p=["count="+K];S==-1?K>0?(S=q[0].W,p.push("ofs="+S)):S=0:p.push("ofs="+S);for(var n=!0,A=0;A=3)return!1; W.SI++;W.N=Q5((0,g.Io)(W.A5,W),Itj(W,W.sI));W.sI++;return!0},JFR=function(W){W.XW!=null&&(g.vH.clearTimeout(W.XW),W.XW=null)},ltT=function(W){W.W=new wz(W,W.T,"rpc",W.SI); W.Z===null&&(W.W.SZ=W.C);W.W.bO=0;var J=W.mz.clone();g.hh(J,"RID","rpc");g.hh(J,"SID",W.T);g.hh(J,"AID",W.D0);g.hh(J,"CI",W.OI?"0":"1");!W.OI&&W.nk&&g.hh(J,"TO",W.nk);g.hh(J,"TYPE","xmlhttp");EM(W,J);W.Z&&W.C&&g.uY(J,W.Z,W.C);W.bO&&W.W.setTimeout(W.bO);var K=W.W;W=W.qD;K.Y3=1;K.N=ik(J.clone());K.C=null;K.vS=!0;M6l(K,W)},$o=function(W){W.PS!=null&&(g.vH.clearTimeout(W.PS),W.PS=null)},ekx=function(W,J){var K=null; if(W.W==J){$o(W);JFR(W);W.W=null;var I=2}else if(RkR(W.K,J))K=J.sI,odR(W.K,J),I=1;else return;if(W.LQ!=0)if(J.S)if(I==1){K=J.C?J.C.length:0;J=Date.now()-J.G8;var q=W.G8;I=Ukv();I.dispatchEvent(new CBo(I,K,J,q));Tb(W)}else Lrp(W);else{var S=J.sT;q=J.getLastError();if(q==3||q==0&&S>0||!(I==1&&qOj(W,J)||I==2&&bnr(W)))switch(K&&K.length>0&&(J=W.K,J.G=J.G.concat(K)),q){case 1:OM(W,5);break;case 4:OM(W,10);break;case 3:OM(W,6);break;default:OM(W,2)}}},Itj=function(W,J){var K=W.dB+Math.floor(Math.random()* W.wB); W.isActive()||(K*=2);return K*J},OM=function(W,J){if(J==2){var K=(0,g.Io)(W.MEI,W),I=W.Nu,q=!I; I=new g.Sr(I||"//www.google.com/images/cleardot.gif");g.vH.location&&g.vH.location.protocol=="http"||g.p0(I,"https");ik(I);q?cJR(I.toString(),K):PBo(I.toString(),K)}else ZD(2);W.LQ=0;W.j&&W.j.kx(J);nkv(W);K9v(W)},nkv=function(W){W.LQ=0; W.Tx=[];if(W.j){var J=s$r(W.K);if(J.length!=0||W.G.length!=0)g.QG(W.Tx,J),g.QG(W.Tx,W.G),W.K.G.length=0,g.U$(W.G),W.G.length=0;W.j.p9()}},AFR=function(W){if(W.LQ==0)return W.Tx; var J=[];g.QG(J,s$r(W.K));g.QG(J,W.G);return J},rJT=function(W,J,K){var I=g.th(K); I.W!=""?(J&&g.lY(I,J+"."+I.W),g.n0(I,I.G)):(I=g.vH.location,I=tCe(I.protocol,J?J+"."+I.hostname:I.hostname,+I.port,K));J=W.vS;K=W.Ym;J&&K&&g.hh(I,J,K);g.hh(I,"VER",W.t5);EM(W,I);return I},GWT=function(W,J,K){if(J&&!W.Y3)throw Error("Can't create secondary domain capable XhrIo object."); J=W.lN&&!W.yr?new g.vS(new g.Jh({gR:K})):new g.vS(W.yr);J.Z=W.Y3;return J},DVj=function(){},jxo=function(){},Rz=function(W,J){g.t0.call(this); this.W=new iL0(J);this.j=W;this.K=J&&J.f0g||null;W=J&&J.COK||null;J&&J.d3K&&(W?W["X-Client-Protocol"]="webchannel":W={"X-Client-Protocol":"webchannel"});this.W.C=W;W=J&&J.IDW||null;J&&J.MF&&(W?W["X-WebChannel-Content-Type"]=J.MF:W={"X-WebChannel-Content-Type":J.MF});J&&J.Gl&&(W?W["X-WebChannel-Client-Profile"]=J.Gl:W={"X-WebChannel-Client-Profile":J.Gl});this.W.sT=W;(W=J&&J.jeO)&&!g.FC(W)&&(this.W.Z=W);this.S=J&&J.lLW||!1;this.T=J&&J.jOs||!1;(J=J&&J.RgZ)&&!g.FC(J)&&(this.W.vS=J,g.Yr(this.K,J)&&(W= this.K,J in W&&delete W[J]));this.G=new eL(this)},ftR=function(W){Nio.call(this); W.__headers__&&(this.headers=W.__headers__,this.statusCode=W.__status__,delete W.__headers__,delete W.__status__);var J=W.__sm__;J?this.data=(this.W=g.Lx(J))?g.Xe(J,this.W):J:this.data=W},h3G=function(W){dkx.call(this); this.status=1;this.errorCode=W},eL=function(W){this.W=W},txG=function(W,J){this.K=W; this.W=J},F9l=function(W){return AFR(W.W).map(function(J){var K=W.K; J=J.map;"__data__"in J?(J=J.__data__,K=K.T?I_$(J):J):K=J;return K})},bk=function(W,J){if(typeof W!=="function")throw Error("Fn must not be null and must be a function"); return g.vH.setTimeout(function(){W()},J)},mL=function(W){B$.dispatchEvent(new atx(B$,W))},atx=function(W){g.P4.call(this,"statevent",W)},rz=function(W,J,K,I){this.W=W; this.T=J;this.Z=K;this.S=I||1;this.K=45E3;this.G=new g.NW(this);this.j=new g.RI;this.j.setInterval(250)},Ng$=function(W,J,K){W.Pk=1; W.S7=ik(J.clone());W.r4=K;W.vS=!0;uSx(W,null)},dVo=function(W,J,K,I,q){W.Pk=1; W.S7=ik(J.clone());W.r4=null;W.vS=K;q&&(W.O0=!1);uSx(W,I)},uSx=function(W,J){W.IN=Date.now(); yFR(W);W.Wk=W.S7.clone();Jf(W.Wk,"t",W.S);W.KF=0;W.Em=W.W.BQ(W.W.YJ()?J:null);W.Zu>0&&(W.Rv=new g.J5((0,g.Io)(W.bT,W,W.Em),W.Zu));W.G.listen(W.Em,"readystatechange",W.YZ);J=W.D8?g.ih(W.D8):{};W.r4?(W.sH="POST",J["Content-Type"]="application/x-www-form-urlencoded",W.Em.send(W.Wk,W.sH,W.r4,J)):(W.sH="GET",W.O0&&!g.ca&&(J.Connection="close"),W.Em.send(W.Wk,W.sH,null,J));W.W.cU(1)},QxL=function(W,J){var K=W.KF,I=J.indexOf("\n",K); if(I==-1)return UVo;K=Number(J.substring(K,I));if(isNaN(K))return ZLv;I+=1;if(I+K>J.length)return UVo;J=J.slice(I,I+K);W.KF=I+K;return J},yFR=function(W){W.dA=Date.now()+W.K; CHe(W,W.K)},CHe=function(W,J){if(W.Cb!=null)throw Error("WatchDog timer not null"); W.Cb=bk((0,g.Io)(W.iR,W),J)},wMo=function(W){W.Cb&&(g.vH.clearTimeout(W.Cb),W.Cb=null)},Mxo=function(W){W.W.eF()||W.xJ||W.W.hw(W)},oz=function(W){wMo(W); g.hE(W.Rv);W.Rv=null;W.j.stop();W.G.removeAll();if(W.Em){var J=W.Em;W.Em=null;J.abort();J.dispose()}W.hX&&(W.hX=null)},gkL=function(W,J){try{W.W.J5(W,J),W.W.cU(4)}catch(K){}},$VL=function(W,J,K,I,q){if(I==0)K(!1); else{var S=q||0;I--;GqL(W,J,function(p){p?K(!0):g.vH.setTimeout(function(){$VL(W,J,K,I,S)},S)})}},GqL=function(W,J,K){var I=new Image; I.onload=function(){try{LE(I),K(!0)}catch(q){}}; I.onerror=function(){try{LE(I),K(!1)}catch(q){}}; I.onabort=function(){try{LE(I),K(!1)}catch(q){}}; I.ontimeout=function(){try{LE(I),K(!1)}catch(q){}}; g.vH.setTimeout(function(){if(I.ontimeout)I.ontimeout()},J); I.src=W},LE=function(W){W.onload=null; W.onerror=null;W.onabort=null;W.ontimeout=null},xVW=function(W){this.W=W; this.K=new y5},OLx=function(W){var J=ko(W.W,W.jL,"/mail/images/cleardot.gif"); ik(J);$VL(J.toString(),5E3,(0,g.Io)(W.KI,W),3,2E3);W.cU(1)},TgW=function(W){var J=W.W.S; J!=null?(mL(5),J?(mL(11),zb(W.W,W,!1)):(mL(12),zb(W.W,W,!0))):(W.Ri=new rz(W),W.Ri.D8=W.Ot,J=W.W,J=ko(J,J.YJ()?W.EH:null,W.wA),mL(5),Jf(J,"TYPE","xmlhttp"),dVo(W.Ri,J,!1,W.EH,!1))},HL$=function(W,J,K){this.W=1; this.K=[];this.G=[];this.j=new y5;this.C=W||null;this.S=J!=null?J:null;this.N=K||!1},VxT=function(W,J){this.W=W; this.map=J;this.context=null},Ekx=function(W,J,K,I){g.P4.call(this,"timingevent",W); this.size=J;this.rtt=K;this.retries=I},e3v=function(W){g.P4.call(this,"serverreachability",W)},bLo=function(W){W.Z5(1,0); W.gg=ko(W,null,W.Nh);R3T(W)},Bgv=function(W){W.Sd&&(W.Sd.abort(),W.Sd=null); W.EP&&(W.EP.cancel(),W.EP=null);W.Oz&&(g.vH.clearTimeout(W.Oz),W.Oz=null);v$(W);W.VT&&(W.VT.cancel(),W.VT=null);W.Wd&&(g.vH.clearTimeout(W.Wd),W.Wd=null)},mVo=function(W,J){if(W.W==0)throw Error("Invalid operation: sending map when state is closed"); W.K.push(new VxT(W.dO++,J));W.W!=2&&W.W!=3||R3T(W)},rFx=function(W){var J=0; W.EP&&J++;W.VT&&J++;return J},R3T=function(W){W.VT||W.Wd||(W.Wd=bk((0,g.Io)(W.zy,W),0),W.Rj=0)},kqL=function(W,J){if(W.W==1){if(!J){W.Bc=Math.floor(Math.random()*1E5); J=W.Bc++;var K=new rz(W,"",J);K.D8=W.zr;var I=okr(W),q=W.gg.clone();g.hh(q,"RID",J);g.hh(q,"CVER","1");Yo(W,q);Ng$(K,q,I);W.VT=K;W.W=2}}else W.W==3&&(J?L90(W,J):W.K.length==0||W.VT||L90(W))},L90=function(W,J){if(J)if(W.mX>6){W.K=W.G.concat(W.K); W.G.length=0;var K=W.Bc-1;J=okr(W)}else K=J.Z,J=J.r4;else K=W.Bc++,J=okr(W);var I=W.gg.clone();g.hh(I,"SID",W.T);g.hh(I,"RID",K);g.hh(I,"AID",W.uY);Yo(W,I);K=new rz(W,W.T,K,W.Rj+1);K.D8=W.zr;K.setTimeout(1E4+Math.round(1E4*Math.random()));W.VT=K;Ng$(K,I,J)},Yo=function(W,J){W.zG&&(W=W.zG.RJ())&&g.BR(W,function(K,I){g.hh(J,I,K)})},okr=function(W){var J=Math.min(W.K.length,1E3),K=["count="+J]; if(W.mX>6&&J>0){var I=W.K[0].W;K.push("ofs="+I)}else I=0;for(var q={},S=0;S=3)return!1; W.Z++;W.Oz=bk((0,g.Io)(W.L9,W),vk$(W,W.fb));W.fb++;return!0},zb=function(W,J,K){W.Et=W.S==null?K:!W.S; W.Y7=J.BZ;W.N||bLo(W)},v$=function(W){W.oD!=null&&(g.vH.clearTimeout(W.oD),W.oD=null)},vk$=function(W,J){var K=5E3+Math.floor(Math.random()*1E4); W.isActive()||(K*=2);return K*J},sM=function(W,J){if(J==2||J==9){var K=null; W.zG&&(K=null);var I=(0,g.Io)(W.XPs,W);K||(K=new g.Sr("//www.google.com/images/cleardot.gif"),ik(K));GqL(K.toString(),1E4,I)}else mL(2);sxv(W,J)},sxv=function(W,J){W.W=0; W.zG&&W.zG.UX(J);cFR(W);Bgv(W)},cFR=function(W){W.W=0; W.Y7=-1;if(W.zG)if(W.G.length==0&&W.K.length==0)W.zG.rA();else{var J=g.U$(W.G),K=g.U$(W.K);W.G.length=0;W.K.length=0;W.zG.rA(J,K)}},ko=function(W,J,K){var I=g.th(K); if(I.W!="")J&&g.lY(I,J+"."+I.W),g.n0(I,I.G);else{var q=window.location;I=tCe(q.protocol,J?J+"."+q.hostname:q.hostname,+q.port,K)}W.Zi&&g.BR(W.Zi,function(S,p){g.hh(I,p,S)}); g.hh(I,"VER",W.mX);Yo(W,I);return I},PHG=function(){},XMW=function(){this.W=[]; this.K=[]},Wfo=function(W){g.P4.call(this,"channelMessage"); this.message=W},iCv=function(W){g.P4.call(this,"channelError"); this.error=W},JcT=function(W,J){this.action=W; this.params=J||{}},c$=function(W,J){g.R.call(this); this.W=new g.P0(this.eeu,0,this);g.B(this,this.W);this.F4=5E3;this.K=0;if(typeof W==="function")J&&(W=(0,g.Io)(W,J));else if(W&&typeof W.handleEvent==="function")W=(0,g.Io)(W.handleEvent,W);else throw Error("Invalid listener argument");this.G=W},KfL=function(W,J,K,I,q,S,p,n,A,D,f,h,t,F){K=K===void 0?!1:K; I=I===void 0?function(){return""}:I; q=q===void 0?!1:q;S=S===void 0?!1:S;p=p===void 0?!1:p;n=n===void 0?function(){return g.Tv({})}:n; A=A===void 0?!1:A;f=f===void 0?!1:f;h=h===void 0?!1:h;t=t===void 0?!1:t;F=F===void 0?!1:F;this.Y3=W;this.PS=J;this.S=new g.g5;this.K=new c$(this.vAK,this);this.W=null;this.Z=!1;this.C=null;this.G8="";this.sI=this.N=0;this.G=[];this.SI=K;this.vS=I;this.j=S;this.SZ=n;this.jZ=D;this.qD=p;this.XW=null;this.T=g.Tv();this.oG=q;this.Tx=A;this.P7=f;this.eZ=h;this.Fz=t;this.sT=F;this.bO=new qDo;this.OI=new SDo;this.Js=new l_R;this.FW=new p7r;this.D0=new nup;this.bb=new Aar;this.fE=new DUW},SWe=function(W, J,K,I,q){Ive(W); if(W.W){var S=g.Yf("ID_TOKEN"),p=W.W.zr||{};S?p["x-youtube-identity-token"]=S:delete p["x-youtube-identity-token"];W.W.zr=p}qWl(W);I?(I.getState()!=3&&rFx(I)==0||I.getState(),W.W.connect(J,K,W.PS,I.T,I.uY)):q?W.W.connect(J,K,W.PS,q.sessionId,q.arrayId):W.W.connect(J,K,W.PS)},AcR=function(W,J){return W.Fz?!0:W.eZ?Object.values(p2G).includes(J):W.P7?!Object.values(lv$).includes(J):W.sT?Object.values(nge).includes(J):!1},fvW=function(W){var J,K; g.V(function(I){if(I.K==1)return g.Zy(I,2),g.O(I,DbG(W),2);g.$c(I);J=W.G;W.G=[];K=J.length;jOW(W,J,K);P$(W);return g.OH(I,0)})},jOW=function(W,J,K){for(var I=0;I0?K=Object.assign({},K,J):delete K.Authorization;W.W.zr=K}},qWl=function(W){W.jZ&&!W.j&&t2e(W,W.jZ())},X3=function(W){this.scheme="https"; this.port=this.domain="";this.W="/api/lounge";this.K=!0;W=W||document.location.href;var J=Number(g.MO(W)[4]||null)||"";J&&(this.port=":"+J);this.domain=g.gM(W)||"";W=g.CU();W.search("MSIE")>=0&&(W=W.match(/MSIE ([\d.]+)/)[1],g.Q$(W,"10.0")<0&&(this.K=!1))},Wx=function(W,J){var K=W.W; W.K&&(K=W.scheme+"://"+W.domain+W.port+W.W);return g.Vw(K+J,{})},Ffo=function(W,J){g.t0.call(this); var K=this;this.uK=W();this.uK.subscribe("handlerOpened",this.ON,this);this.uK.subscribe("handlerClosed",this.onClosed,this);this.uK.subscribe("handlerError",function(I,q){K.onError(q)}); this.uK.subscribe("handlerMessage",this.onMessage,this);this.W=J},avR=function(W,J,K){var I=this; K=K===void 0?function(){return""}:K; var q=q===void 0?new jxo:q;var S=S===void 0?new g.g5:S;this.pathPrefix=W;this.W=J;this.G8=K;this.j=S;this.N=null;this.C=this.Z=0;this.channel=null;this.S=0;this.G=new c$(function(){I.G.isActive();var p;((p=I.channel)==null?void 0:Biv((new txG(p,p.W)).W.K))===0&&I.connect(I.N,I.Z)}); this.T={};this.K={};this.PS=!1;this.logger=null;this.sI=[];this.Dt=void 0;this.SZ=new qDo;this.XW=new SDo;this.jZ=new p7r;this.vS=new nup},ulo=function(W){g.S_(W.channel,"m",function(){W.S=3; W.G.reset();W.N=null;W.Z=0;for(var J=g.d(W.sI),K=J.next();!K.done;K=J.next())K=K.value,W.channel&&W.channel.send(K);W.sI=[];W.publish("webChannelOpened");W.SZ.yw("WEB_CHANNEL")}); g.S_(W.channel,"n",function(){W.S=0;W.G.isActive()||W.publish("webChannelClosed");var J,K=(J=W.channel)==null?void 0:F9l(new txG(J,J.W));K&&(W.sI=[].concat(g.w(K)));W.XW.yw("WEB_CHANNEL")}); g.S_(W.channel,"p",function(J){var K=J.data;K[0]==="gracefulReconnect"?(W.G.start(),W.channel&&W.channel.close()):W.publish("webChannelMessage",new JcT(K[0],K[1]));W.Dt=J.statusCode;W.jZ.yw("WEB_CHANNEL")}); g.S_(W.channel,"o",function(){W.Dt===401||W.G.start();W.publish("webChannelError");W.vS.yw("WEB_CHANNEL","")})},Noo=function(W){var J=W.G8(); J?W.T["x-youtube-lounge-xsrf-token"]=J:delete W.T["x-youtube-lounge-xsrf-token"]},dbo=function(W){g.t0.call(this); this.W=W();this.W.subscribe("webChannelOpened",this.wO,this);this.W.subscribe("webChannelClosed",this.onClosed,this);this.W.subscribe("webChannelError",this.onError,this);this.W.subscribe("webChannelMessage",this.onMessage,this)},ycr=function(W,J,K,I,q){function S(){return new KfL(Wx(W,"/bc"),J,!1,K,I)} K=K===void 0?function(){return""}:K; return g.yb("enable_mdx_web_channel_desktop")?new dbo(function(){return new avR(Wx(W,"/wc"),J,K)}):new Ffo(S,q)},C2p=function(){var W=Ubo; ZC$();ib.push(W);QO0()},JG=function(W,J){ZC$(); var K=w2r(W,String(J));ib.length==0?M2o(K):(QO0(),g.el(ib,function(I){I(K)}))},K6=function(W){JG("CP",W)},ZC$=function(){ib||(ib=g.sH("yt.mdx.remote.debug.handlers_")||[],g.Yc("yt.mdx.remote.debug.handlers_",ib))},M2o=function(W){var J=(Ij+1)%50; Ij=J;qc[J]=W;SF||(SF=J==49)},QO0=function(){var W=ib; if(qc[0]){var J=SF?Ij:-1,K={};do K={PA:void 0},J=(J+1)%50,K.PA=qc[J],g.el(W,function(I){return function(q){q(I.PA)}}(K)); while(J!=Ij);qc=Array(50);Ij=-1;SF=!1}},w2r=function(W,J){var K=(Date.now()-ggp)/1E3; K.toFixed&&(K=K.toFixed(3));var I=[];I.push("[",K+"s","] ");I.push("[","yt.mdx.remote","] ");I.push(W+": "+J,"\n");return I.join("")},p6=function(W){g.Ao.call(this); this.S=W;this.screens=[]},G3o=function(W,J){var K=W.get(J.uuid)||W.get(J.id); if(K)return W=K.name,K.id=J.id||K.id,K.name=J.name,K.token=J.token,K.uuid=J.uuid||K.uuid,K.name!=W;W.screens.push(J);return!0},$bR=function(W,J){var K=W.screens.length!=J.length; W.screens=g.Ei(W.screens,function(S){return!!vuL(J,S)}); for(var I=J.length,q=0;q0&&W.T0&&d$(W,K)},function(J){W.j=function(){}; W.DB(J)})},SZ$=function(W){var J={}; J.pairingCode=W.XW;J.theme=W.Y3;qNR()&&(J.env_useStageMdx=1);return g.Ho(J)},pbL=function(W){return new Promise(function(J){W.XW=k_W(); if(W.SZ){var K=new chrome.cast.DialLaunchResponse(!0,SZ$(W));J(K);qZx(W)}else W.PS=function(){g.uX(W.C);W.PS=function(){}; W.C=NaN;var I=new chrome.cast.DialLaunchResponse(!0,SZ$(W));J(I);qZx(W)},W.C=g.FW(function(){W.PS()},100)})},nLW=function(W,J,K){W.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(J)); var I=new nE(J);return(new Promise(function(q){lsx(W,I,function(S){S?(W.sI=!0,f6(W.T,I),tG(W,I),d$(W,K)):g.PO(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(J)+" is not online."));q(S)},5)})).then(function(q){return q?new chrome.cast.DialLaunchResponse(!1):pbL(W)})},AjL=function(W,J){var K=W.N.receiver.label,I=W.K.friendlyName; return(new Promise(function(q){rcr(W.T,K,J,I,function(S){S&&S.token&&tG(W,S);q(S)},function(S){F8(W,"Failed to get DIAL screen: "+S); q(null)})})).then(function(q){return q&&q.token?new chrome.cast.DialLaunchResponse(!1):pbL(W)})},lsx=function(W,J,K,I){g.uX(W.S); W.S=0;Lf0(W.T,J,function(q){q||I<0?K(q):W.S=g.FW(function(){lsx(W,J,K,I-1)},300)})},d$=function(W,J){W.info("getDialAppInfoWithTimeout_ "+J); Nc(W)&&(g.uX(W.Z),W.Z=0,J==0?DvW(W):W.Z=g.FW(function(){DvW(W)},J))},DvW=function(W){Nc(W)&&W.G.getDialAppInfo(function(J){W.info("getDialAppInfo dialLaunchData: "+JSON.stringify(J)); J=J.extraData||{};var K=null;if(J.loungeToken){var I;((I=W.W)==null?void 0:I.token)==J.loungeToken&&(K="staleLoungeToken")}else K="missingLoungeToken";K?(W.G8=K,d$(W,3E4)):(W.sI=!1,W.G8="unknown",YWo(W,J.loungeToken),d$(W,J.loungeTokenRefreshIntervalMs))},function(J){W.info("getDialAppInfo error: "+J); W.G8="noLoungeTokenResponse";d$(W,3E4)})},jap=function(W){g.uX(W.S); W.S=0;g.uX(W.Z);W.Z=0;W.j();W.j=function(){}; g.uX(W.C)},yj=function(W,J){hG.call(this,W,J,"ManualSession"); this.G=g.FW((0,g.Io)(this.W2,this,null),150)},Um=function(W,J){g.Ao.call(this); this.config_=J;this.K=W;this.N=J.appId||"233637DE";this.T=J.theme||"cl";this.C=J.disableCastApi||!1;this.S=J.forceMirroring||!1;this.W=null;this.Z=!1;this.G=[];this.j=(0,g.Io)(this.XDN,this)},fs$=function(W,J){return J?g.hW(W.G,function(K){return Af(J,K.label)},W):null},ZA=function(W){JG("Controller",W)},Ubo=function(W){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(W)},Qj=function(W){return W.Z||!!W.G.length||!!W.W},C6=function(W,J,K){J!=W.W&&(g.hE(W.W),(W.W=J)?(K?W.publish("yt-remote-cast2-receiver-resumed", J.K):W.publish("yt-remote-cast2-receiver-selected",J.K),J.subscribe("sessionScreen",(0,g.Io)(W.VR,W,J)),J.subscribe("sessionFailed",function(){return hMj(W,J)}),J.W?W.publish("yt-remote-cast2-session-change",J.W):K&&W.W.W2(null)):W.publish("yt-remote-cast2-session-change",null))},hMj=function(W,J){W.W==J&&W.publish("yt-remote-cast2-session-failed")},tT$=function(W){var J=W.K.uZ(),K=W.W&&W.W.K; W=g.zC(J,function(I){K&&Af(I,K.label)&&(K=null);var q=I.uuid?I.uuid:I.id,S=fs$(this,I);S?(S.label=q,S.friendlyName=I.name):(S=new chrome.cast.Receiver(q,I.name),S.receiverType=chrome.cast.ReceiverType.CUSTOM);return S},W); K&&(K.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(K=new chrome.cast.Receiver(K.label,K.friendlyName),K.receiverType=chrome.cast.ReceiverType.CUSTOM),W.push(K));return W},Uvr=function(W,J,K,I){I.disableCastApi?w$("Cannot initialize because disabled by Mdx config."):FTx()?asR(J,I)&&(uhe(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?NbT(W,K):(window.__onGCastApiAvailable=function(q,S){q?NbT(W,K):(Mc("Failed to load cast API: "+S),dvj(!1),uhe(!1),g.EN("yt-remote-cast-available"),g.EN("yt-remote-cast-receiver"), yjG(),K(!1))},I.loadCastApiSetupScript?g.nI("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?pd$()>=60&&FrL():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?DkR():pd$()>=89?uJv():(t6o(),NK(aRo.map(j$0))))):w$("Cannot initialize because not running Chrome")},yjG=function(){w$("dispose"); var W=g$();W&&W.dispose();g.Yc("yt.mdx.remote.cloudview.instance_",null);ZIR(!1);g.pI(Qa0);Qa0.length=0},GH=function(){return!!g.V0("yt-remote-cast-installed")},C90=function(){var W=g.V0("yt-remote-cast-receiver"); return W?W.friendlyName:null},wbo=function(){w$("clearCurrentReceiver"); g.EN("yt-remote-cast-receiver")},MT0=function(){return GH()?g$()?g$().getCastSession():(Mc("getCastSelector: Cast is not initialized."),null):(Mc("getCastSelector: Cast API is not installed!"),null)},gLR=function(){GH()?g$()?$6()?(w$("Requesting cast selector."),g$().requestSession()):(w$("Wait for cast API to be ready to request the session."),Qa0.push(g.ST("yt-remote-cast2-api-ready",gLR))):Mc("requestCastSelector: Cast is not initialized."):Mc("requestCastSelector: Cast API is not installed!")}, x6=function(W,J){$6()?g$().setConnectedScreenStatus(W,J):Mc("setConnectedScreenStatus called before ready.")},FTx=function(){var W=g.CU().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.ES||W},G$G=function(W,J){g$().init(W,J)},asR=function(W,J){var K=!1; g$()||(W=new Um(W,J),W.subscribe("yt-remote-cast2-availability-change",function(I){g.Hd("yt-remote-cast-available",I);az("yt-remote-cast2-availability-change",I)}),W.subscribe("yt-remote-cast2-receiver-selected",function(I){w$("onReceiverSelected: "+I.friendlyName); g.Hd("yt-remote-cast-receiver",I);az("yt-remote-cast2-receiver-selected",I)}),W.subscribe("yt-remote-cast2-receiver-resumed",function(I){w$("onReceiverResumed: "+I.friendlyName); g.Hd("yt-remote-cast-receiver",I);az("yt-remote-cast2-receiver-resumed",I)}),W.subscribe("yt-remote-cast2-session-change",function(I){w$("onSessionChange: "+DD(I)); I||g.EN("yt-remote-cast-receiver");az("yt-remote-cast2-session-change",I)}),g.Yc("yt.mdx.remote.cloudview.instance_",W),K=!0); w$("cloudview.createSingleton_: "+K);return K},g$=function(){return g.sH("yt.mdx.remote.cloudview.instance_")},NbT=function(W,J){dvj(!0); uhe(!1);G$G(W,function(K){K?(ZIR(!0),g.l9("yt-remote-cast2-api-ready")):(Mc("Failed to initialize cast API."),dvj(!1),g.EN("yt-remote-cast-available"),g.EN("yt-remote-cast-receiver"),yjG());J(K)})},w$=function(W){JG("cloudview",W)},Mc=function(W){JG("cloudview",W)},dvj=function(W){w$("setCastInstalled_ "+W); g.Hd("yt-remote-cast-installed",W)},$6=function(){return!!g.sH("yt.mdx.remote.cloudview.apiReady_")},ZIR=function(W){w$("setApiReady_ "+W); g.Yc("yt.mdx.remote.cloudview.apiReady_",W)},uhe=function(W){g.Yc("yt.mdx.remote.cloudview.initializing_",W)},Om=function(W){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.S=this.Z=0;this.trackData=null;this.Yg=this.Wh=!1;this.N=this.j=this.W=this.T=0;this.G=NaN;this.K=!1;this.reset(W)},$vp=function(W){W.audioTrackId=null; W.trackData=null;W.playerState=-1;W.Wh=!1;W.Yg=!1;W.Z=0;W.S=g.px();W.T=0;W.W=0;W.j=0;W.N=0;W.G=NaN;W.K=!1},TH=function(W){return W.isPlaying()?(g.px()-W.S)/1E3:0},Hx=function(W,J){W.Z=J; W.S=g.px()},Vj=function(W){switch(W.playerState){case 1:case 1081:return(g.px()-W.S)/1E3+W.Z; case -1E3:return 0}return W.Z},Em=function(W,J,K){var I=W.videoId; W.videoId=J;W.index=K;J!=I&&$vp(W)},xvl=function(W){var J={}; J.index=W.index;J.listId=W.listId;J.videoId=W.videoId;J.playerState=W.playerState;J.volume=W.volume;J.muted=W.muted;J.audioTrackId=W.audioTrackId;J.trackData=g.JX(W.trackData);J.hasPrevious=W.Wh;J.hasNext=W.Yg;J.playerTime=W.Z;J.playerTimeAt=W.S;J.seekableStart=W.T;J.seekableEnd=W.W;J.duration=W.j;J.loadedTime=W.N;J.liveIngestionTime=W.G;return J},Rj=function(W,J){g.Ao.call(this); var K=this;this.G=0;this.T=W;this.S=[];this.j=new XMW;this.K=this.W=null;this.C=(0,g.Io)(this.NlW,this);this.Z=(0,g.Io)(this.e6,this);this.N=(0,g.Io)(this.DDS,this);this.PS=(0,g.Io)(this.mDW,this);var I=0;W?(I=W.getProxyState(),I!=3&&(W.subscribe("proxyStateChange",this.PX,this),OIG(this))):I=3;I!=0&&(J?this.PX(I):g.FW(function(){K.PX(I)},0)); (W=MT0())&&eF(this,W);this.subscribe("yt-remote-cast2-session-change",this.PS)},bb=function(W){return new Om(W.T.getPlayerContextData())},OIG=function(W){g.el("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(J){this.S.push(this.T.subscribe(J,g.Sl(this.QBw,J),this))},W)},Tbj=function(W){g.el(W.S,function(J){this.T.unsubscribeByKey(J)},W); W.S.length=0},Bx=function(W){return W.getState()==1},md=function(W,J){var K=W.j; K.W.length+K.K.length<50&&W.j.enqueue(J)},HIo=function(W,J,K){var I=bb(W); Hx(I,K);I.playerState!=-1E3&&(I.playerState=J);r$(W,I)},oj=function(W,J,K){W.T.sendMessage(J,K)},r$=function(W,J){Tbj(W); W.T.setPlayerContextData(xvl(J));OIG(W)},eF=function(W,J){W.K&&(W.K.removeUpdateListener(W.C),W.K.removeMediaListener(W.Z),W.e6(null)); W.K=J;W.K&&(K6("Setting cast session: "+W.K.sessionId),W.K.addUpdateListener(W.C),W.K.addMediaListener(W.Z),W.K.media.length&&W.e6(W.K.media[0]))},VTo=function(W){var J=W.W.media,K=W.W.customData; if(J&&K){var I=bb(W);J.contentId!=I.videoId&&K6("Cast changing video to: "+J.contentId);I.videoId=J.contentId;I.playerState=K.playerState;Hx(I,W.W.getEstimatedTime());r$(W,I)}else K6("No cast media video. Ignoring state update.")},L6=function(W,J,K){return(0,g.Io)(function(I){this.cw("Failed to "+J+" with cast v2 channel. Error code: "+I.code); I.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.cw("Retrying "+J+" using MDx browser channel."),oj(this,J,K))},W)},vx=function(W,J,K,I){I=I===void 0?!1:I; g.Ao.call(this);var q=this;this.S=NaN;this.XW=!1;this.C=this.N=this.sI=this.G8=NaN;this.PS=[];this.j=this.Z=this.T=this.W=this.K=null;this.SZ=W;this.jZ=I;this.PS.push(g.ZR(window,"beforeunload",function(){q.n3(2)})); this.G=[];this.W=new Om;this.Y3=J.id;this.vS=J.idType;this.K=ycr(this.SZ,K,this.EC,this.vS=="shortLived",this.Y3);this.K.listen("channelOpened",function(){ELe(q)}); this.K.listen("channelClosed",function(){k6("Channel closed");isNaN(q.S)?tf(!0):tf();q.dispose()}); this.K.listen("channelError",function(S){tf();isNaN(q.yh())?(S==1&&q.vS=="shortLived"&&q.publish("browserChannelAuthError",S),k6("Channel error: "+S+" without reconnection"),q.dispose()):(q.XW=!0,k6("Channel error: "+S+" with reconnection in "+q.yh()+" ms"),zH(q,2))}); this.K.listen("channelMessage",function(S){eMv(q,S)}); this.K.yS(J.token);this.subscribe("remoteQueueChange",function(){var S=q.W.videoId;g.e6()&&g.Hd("yt-remote-session-video-id",S)})},RMT=function(W){return g.hW(W.G,function(J){return J.type=="LOUNGE_SCREEN"})},k6=function(W){JG("conn",W)},zH=function(W,J){W.publish("proxyStateChange",J)},bIl=function(W){W.S=g.FW(function(){k6("Connecting timeout"); W.n3(1)},2E4)},Bbe=function(W){g.uX(W.S); W.S=NaN},mvG=function(W){g.uX(W.G8); W.G8=NaN},oLo=function(W){rjG(W); W.sI=g.FW(function(){Y6(W,"getNowPlaying")},2E4)},rjG=function(W){g.uX(W.sI); W.sI=NaN},ELe=function(W){k6("Channel opened"); W.XW&&(W.XW=!1,mvG(W),W.G8=g.FW(function(){k6("Timing out waiting for a screen.");W.n3(1)},15E3))},k$T=function(W,J){var K=null; if(J){var I=RMT(W);I&&(K={clientName:I.clientName,deviceMake:I.brand,deviceModel:I.model,osVersion:I.osVersion})}g.Yc("yt.mdx.remote.remoteClient_",K);J&&(Bbe(W),mvG(W));K=W.K.Ws()&&isNaN(W.S);J==K?J&&(zH(W,1),Y6(W,"getSubtitlesTrack")):J?(W.X6()&&W.W.reset(),zH(W,1),Y6(W,"getNowPlaying"),LTT(W)):W.n3(1)},zMr=function(W,J){var K=J.params.videoId; delete J.params.videoId;K==W.W.videoId&&(g.PR(J.params)?W.W.trackData=null:W.W.trackData=J.params,W.publish("remotePlayerChange"))},vLo=function(W,J,K){var I=J.params.videoId||J.params.video_id,q=parseInt(J.params.currentIndex,10); W.W.listId=J.params.listId||W.W.listId;Em(W.W,I,q);W.publish("remoteQueueChange",K)},saW=function(W,J){J.params=J.params||{}; vLo(W,J,"NOW_PLAYING_MAY_CHANGE");YZp(W,J);W.publish("autoplayDismissed")},YZp=function(W,J){var K=parseInt(J.params.currentTime||J.params.current_time,10); Hx(W.W,isNaN(K)?0:K);K=parseInt(J.params.state,10);K=isNaN(K)?-1:K;K==-1&&W.W.playerState==-1E3&&(K=-1E3);W.W.playerState=K;K=Number(J.params.loadedTime);W.W.N=isNaN(K)?0:K;W.W.Cg(Number(J.params.duration));K=W.W;var I=Number(J.params.liveIngestionTime);K.G=I;K.K=isNaN(I)?!1:!0;K=W.W;I=Number(J.params.seekableStartTime);J=Number(J.params.seekableEndTime);K.T=isNaN(I)?0:I;K.W=isNaN(J)?0:J;W.W.playerState==1?oLo(W):rjG(W);W.publish("remotePlayerChange")},cj0=function(W,J){if(W.W.playerState!=-1E3){var K= 1085; switch(parseInt(J.params.adState,10)){case 1:K=1081;break;case 2:K=1084;break;case 0:K=1083}W.W.playerState=K;J=parseInt(J.params.currentTime,10);Hx(W.W,isNaN(J)?0:J);W.publish("remotePlayerChange")}},P9l=function(W,J){var K=J.params.muted=="true"; W.W.volume=parseInt(J.params.volume,10);W.W.muted=K;W.publish("remotePlayerChange")},Xbe=function(W,J){W.Z=J.params.videoId; W.publish("nowAutoplaying",parseInt(J.params.timeout,10))},WHo=function(W,J){W.Z=J.params.videoId||null; W.publish("autoplayUpNext",W.Z)},iJo=function(W,J){W.j=J.params.autoplayMode; W.publish("autoplayModeChange",W.j);W.j=="DISABLED"&&W.publish("autoplayDismissed")},Jm0=function(W,J){var K=J.params.hasNext=="true"; W.W.Wh=J.params.hasPrevious=="true";W.W.Yg=K;W.publish("previousNextChange")},eMv=function(W,J){J=J.message; J.params?k6("Received: action="+J.action+", params="+g.Lq(J.params)):k6("Received: action="+J.action+" {}");switch(J.action){case "loungeStatus":J=KE(J.params.devices);W.G=g.zC(J,function(I){return new lk(I)}); J=!!g.hW(W.G,function(I){return I.type=="LOUNGE_SCREEN"}); k$T(W,J);J=W.j5("mlm");W.publish("multiStateLoopEnabled",J);break;case "loungeScreenDisconnected":g.dv(W.G,function(I){return I.type=="LOUNGE_SCREEN"}); k$T(W,!1);break;case "remoteConnected":var K=new lk(KE(J.params.device));g.hW(W.G,function(I){return I.equals(K)})||izo(W.G,K); break;case "remoteDisconnected":K=new lk(KE(J.params.device));g.dv(W.G,function(I){return I.equals(K)}); break;case "gracefulDisconnect":break;case "playlistModified":vLo(W,J,"QUEUE_MODIFIED");break;case "nowPlaying":saW(W,J);break;case "onStateChange":YZp(W,J);break;case "onAdStateChange":cj0(W,J);break;case "onVolumeChanged":P9l(W,J);break;case "onSubtitlesTrackChanged":zMr(W,J);break;case "nowAutoplaying":Xbe(W,J);break;case "autoplayDismissed":W.publish("autoplayDismissed");break;case "autoplayUpNext":WHo(W,J);break;case "onAutoplayModeChanged":iJo(W,J);break;case "onHasPreviousNextChanged":Jm0(W, J);break;case "requestAssistedSignIn":W.publish("assistedSignInRequested",J.params.authCode);break;case "onLoopModeChanged":W.publish("loopModeChange",J.params.loopMode);break;default:k6("Unrecognized action: "+J.action)}},LTT=function(W){g.uX(W.C); W.C=g.FW(function(){W.n3(1)},864E5)},Y6=function(W,J,K){K?k6("Sending: action="+J+", params="+g.Lq(K)):k6("Sending: action="+J); W.K.sendMessage(J,K)},KHo=function(W){p6.call(this,"ScreenServiceProxy"); this.cP=W;this.W=[];this.W.push(this.cP.$_s("screenChange",(0,g.Io)(this.Hq,this)));this.W.push(this.cP.$_s("onlineScreenChange",(0,g.Io)(this.jZK,this)))},lup=function(W,J){IRp(); if(!F3||!F3.get("yt-remote-disable-remote-module-for-dev")){J=g.Yf("MDX_CONFIG")||J;YDR();X7o();sm||(sm=new X3(J?J.loungeApiHost:void 0),qNR()&&(sm.W="/api/loungedev"));cx||(cx=g.sH("yt.mdx.remote.deferredProxies_")||[],g.Yc("yt.mdx.remote.deferredProxies_",cx));Iuo();var K=Px();if(!K){var I=new jF(sm,J?J.disableAutomaticScreenCache||!1:!1);g.Yc("yt.mdx.remote.screenService_",I);K=Px();var q={};J&&(q={appId:J.appId,disableDial:J.disableDial,theme:J.theme,loadCastApiSetupScript:J.loadCastApiSetupScript, disableCastApi:J.disableCastApi,enableDialLoungeToken:J.enableDialLoungeToken,enableCastLoungeToken:J.enableCastLoungeToken,forceMirroring:J.forceMirroring});g.Yc("yt.mdx.remote.enableConnectWithInitialState_",J?J.enableConnectWithInitialState||!1:!1);Uvr(W,I,function(S){S?X8()&&x6(X8(),"YouTube TV"):I.subscribe("onlineScreenChange",function(){az("yt-remote-receiver-availability-change")})},q)}J&&!g.sH("yt.mdx.remote.initialized_")&&(g.Yc("yt.mdx.remote.initialized_",!0),WK("Initializing: "+g.Lq(J)), iq.push(g.ST("yt-remote-cast2-api-ready",function(){az("yt-remote-api-ready")})),iq.push(g.ST("yt-remote-cast2-availability-change",function(){az("yt-remote-receiver-availability-change")})),iq.push(g.ST("yt-remote-cast2-receiver-selected",function(){Jv(null); az("yt-remote-auto-connect","cast-selector-receiver")})),iq.push(g.ST("yt-remote-cast2-receiver-resumed",function(){az("yt-remote-receiver-resumed","cast-selector-receiver")})),iq.push(g.ST("yt-remote-cast2-session-change",qTo)),iq.push(g.ST("yt-remote-connection-change",function(S){S?x6(X8(),"YouTube TV"):KA()||(x6(null,null),wbo())})),iq.push(g.ST("yt-remote-cast2-session-failed",function(){az("yt-remote-connection-failed")})),W=STv(),J.isAuto&&(W.id+="#dial"),q=J.capabilities||[],g.yb("desktop_enable_autoplay")&& q.push("atp"),q.length>0&&(W.capabilities=q),W.name=J.device,W.app=J.app,(J=J.theme)&&(W.theme=J),WK(" -- with channel params: "+g.Lq(W)),W?(g.Hd("yt-remote-session-app",W.app),g.Hd("yt-remote-session-name",W.name)):(g.EN("yt-remote-session-app"),g.EN("yt-remote-session-name")),g.Yc("yt.mdx.remote.channelParams_",W),K.start(),X8()||pme())}},nb0=function(){var W=Px().cP.$_gos(); var J=In();J&&qa()&&(vuL(W,J)||W.push(J));return zJT(W)},D_$=function(){var W=Amx(); !W&&GH()&&C90()&&(W={key:"cast-selector-receiver",name:C90()});return W},Amx=function(){var W=nb0(),J=In(); J||(J=KA());return g.hW(W,function(K){return J&&Af(J,K.key)?!0:!1})},In=function(){var W=X8(); if(!W)return null;var J=Px().Sl();return jL(J,W)},qTo=function(W){WK("remote.onCastSessionChange_: "+DD(W)); if(W){var J=In();if(J&&J.id==W.id){if(x6(J.id,"YouTube TV"),W.idType=="shortLived"&&(W=W.token))SY&&(SY.token=W),(J=qa())&&J.yS(W)}else J&&pA(),lq(W,1)}else qa()&&pA()},pA=function(){$6()?g$().stopSession():Mc("stopSession called before API ready."); var W=qa();W&&(W.disconnect(1),jhL(null))},fur=function(){var W=qa(); return!!W&&W.getProxyState()!=3},WK=function(W){JG("remote",W)},Px=function(){if(!hoT){var W=g.sH("yt.mdx.remote.screenService_"); hoT=W?new KHo(W):null}return hoT},X8=function(){return g.sH("yt.mdx.remote.currentScreenId_")},tge=function(W){g.Yc("yt.mdx.remote.currentScreenId_",W)},FH$=function(){return g.sH("yt.mdx.remote.connectData_")},Jv=function(W){g.Yc("yt.mdx.remote.connectData_",W)},qa=function(){return g.sH("yt.mdx.remote.connection_")},jhL=function(W){var J=qa(); Jv(null);W||tge("");g.Yc("yt.mdx.remote.connection_",W);cx&&(g.el(cx,function(K){K(W)}),cx.length=0); J&&!W?az("yt-remote-connection-change",!1):!J&&W&&az("yt-remote-connection-change",!0)},KA=function(){var W=g.e6(); if(!W)return null;var J=Px();if(!J)return null;J=J.Sl();return jL(J,W)},lq=function(W,J){X8(); In()&&In();if(nA)SY=W;else{tge(W.id);var K=g.sH("yt.mdx.remote.enableConnectWithInitialState_")||!1;W=new vx(sm,W,STv(),K);W.connect(J,FH$());W.subscribe("beforeDisconnect",function(I){az("yt-remote-before-disconnect",I)}); W.subscribe("beforeDispose",function(){qa()&&(qa(),jhL(null))}); W.subscribe("browserChannelAuthError",function(){var I=In();I&&I.idType=="shortLived"&&($6()?g$().handleBrowserChannelAuthError():Mc("refreshLoungeToken called before API ready."))}); jhL(W)}},pme=function(){var W=KA(); W?(WK("Resume connection to: "+DD(W)),lq(W,0)):(tf(),wbo(),WK("Skipping connecting because no session screen found."))},Iuo=function(){var W=STv(); if(g.PR(W)){W=hf();var J=g.V0("yt-remote-session-name")||"",K=g.V0("yt-remote-session-app")||"";W={device:"REMOTE_CONTROL",id:W,name:J,app:K,mdxVersion:3};W.authuser=String(g.Yf("SESSION_INDEX","0"));(J=g.Yf("DELEGATED_SESSION_ID"))&&(W.pageId=String(J));g.Yc("yt.mdx.remote.channelParams_",W)}},STv=function(){return g.sH("yt.mdx.remote.channelParams_")||{}},NTx=function(W,J,K){g.R.call(this); var I=this;this.W=W;this.X=J;this.vN=K;this.events=new g.BW(this);this.j=!1;this.S=new g.lp(64);this.K=new g.P0(this.PB,500,this);this.G=new g.P0(this.sx,1E3,this);this.N=new dz(this.tEO,0,this);this.T={};this.C=new g.P0(this.zo,1E3,this);this.Z=new g.J5(this.seekTo,1E3,this);this.PS=this.events.D(this.X,"onVolumeChange",function(q){aul(I,q)}); g.B(this,this.events);this.events.D(J,"onCaptionsTrackListChanged",this.lHW);this.events.D(J,"captionschanged",this.hQO);this.events.D(J,"captionssettingschanged",this.VB);this.events.D(J,"videoplayerreset",this.g7);this.events.D(J,"mdxautoplaycancel",function(){I.vN.Z$()}); J.Y("enable_mdx_video_play_directly")&&this.events.D(J,"videodatachange",function(){unl(I.W)||Av(I)||Dd(I,0)}); W=this.vN;W.Iu();W.subscribe("proxyStateChange",this.gs,this);W.subscribe("remotePlayerChange",this.Ec,this);W.subscribe("remoteQueueChange",this.g7,this);W.subscribe("previousNextChange",this.PG,this);W.subscribe("nowAutoplaying",this.Uh,this);W.subscribe("autoplayDismissed",this.NF,this);g.B(this,this.K);g.B(this,this.G);g.B(this,this.N);g.B(this,this.C);g.B(this,this.Z);this.VB();this.g7();this.Ec()},aul=function(W,J){if(Av(W)){W.vN.unsubscribe("remotePlayerChange",W.Ec,W); var K=Math.round(J.volume);J=!!J.muted;var I=bb(W.vN);if(K!==I.volume||J!==I.muted)W.vN.setVolume(K,J),W.C.start();W.vN.subscribe("remotePlayerChange",W.Ec,W)}},d_L=function(W){W.ZH(0); W.K.stop();W.T$(new g.lp(64))},ymj=function(W,J){if(Av(W)&&!W.j){var K=null; J&&(K={style:W.X.getSubtitlesUserSettings()},Object.assign(K,J));W.vN.Kt(W.X.getVideoData(1).videoId,K);W.T=g.E(bb(W.vN).trackData)}},Dd=function(W,J){var K=W.X.getPlaylist(); if(K==null?0:K.listId){var I=K.index;var q=K.listId.toString()}K=W.X.getVideoData(1);W.vN.playVideo(K.videoId,J,I,q,K.playerParams,K.Y3,WQp(K));W.T$(new g.lp(1))},U_0=function(W,J){if(J){var K=W.X.getOption("captions","tracklist",{Pm:1}); K&&K.length?(W.X.setOption("captions","track",J),W.j=!1):(W.X.loadModule("captions"),W.j=!0)}else W.X.setOption("captions","track",{})},Av=function(W){return bb(W.vN).videoId===W.X.getVideoData(1).videoId},ZJj=function(W,J){g.Bf.call(this,W); this.W=J},jY=function(){g.k.call(this,{V:"div", B:"ytp-mdx-popup-dialog",U:{role:"dialog"},L:[{V:"div",B:"ytp-mdx-popup-dialog-inner-content",L:[{V:"div",B:"ytp-mdx-popup-title",Ky:"Saliste de tu cuenta"},{V:"div",B:"ytp-mdx-popup-description",Ky:"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."},{V:"div",B:"ytp-mdx-privacy-popup-buttons",L:[{V:"button",au:["ytp-button", "ytp-mdx-privacy-popup-cancel"],Ky:"Cancelar"},{V:"button",au:["ytp-button","ytp-mdx-privacy-popup-confirm"],Ky:"Confirmar"}]}]}]});this.fade=new g.qf(this,250);this.cancelButton=this.T8("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.T8("ytp-mdx-privacy-popup-confirm");g.B(this,this.fade);this.D(this.cancelButton,"click",this.W);this.D(this.confirmButton,"click",this.K)},fA=function(W){g.k.call(this,{V:"div", B:"ytp-remote",L:[{V:"div",B:"ytp-remote-display-status",L:[{V:"div",B:"ytp-remote-display-status-icon",L:[g.nk0()]},{V:"div",B:"ytp-remote-display-status-text",Ky:"{{statustext}}"}]}]});this.api=W;this.fade=new g.qf(this,250);g.B(this,this.fade);this.D(W,"presentingplayerstatechange",this.onStateChange);this.Ap(W.getPlayerStateObject())},hv=function(W,J){g.ei.call(this,"Reproducir en",1,W,J); this.X=W;this.Hi={};this.D(W,"onMdxReceiversChange",this.T);this.D(W,"presentingplayerstatechange",this.T);this.T()},Qh$=function(W){g.N9.call(this,W); this.xU={key:k_W(),name:"Esta computadora"};this.sQ=null;this.subscriptions=[];this.Wf=this.vN=null;this.Hi=[this.xU];this.jd=this.xU;this.IB=new g.lp(64);this.ra=0;this.VX=-1;this.ih=!1;this.B$=this.I_=this.Jf=null;if(!g.RP(this.player.J())&&!g.Bh(this.player.J())){W=this.player;var J=g.u3(W);J&&(J=J.xg())&&(J=new hv(W,J),g.B(this,J));J=new fA(W);g.B(this,J);g.EY(W,J.element,4);this.Jf=new jY;g.B(this,this.Jf);g.EY(W,this.Jf.element,4);this.ih=!!KA()}},tv=function(W){W.I_&&(W.player.removeEventListener("presentingplayerstatechange", W.I_),W.I_=null)},Cso=function(W,J,K){W.IB=K; W.player.publish("presentingplayerstatechange",new g.Fb(K,J))},FM=function(W,J){if(J.key!==W.jd.key)if(J.key===W.xU.key)pA(); else if(unl(W)&&wmv(W),W.jd=J,!W.player.J().Y("disable_mdx_connection_in_mdx_module_for_music_web")||!g.Bh(W.player.J())){var K=W.player.getPlaylistId();var I=W.player.getVideoData(1);var q=I.videoId;if(!K&&!q||(W.player.getAppState()===2||W.player.getAppState()===1)&&W.player.J().Y("should_clear_video_data_on_player_cued_unstarted"))I=null;else{var S=W.player.getPlaylist();if(S){var p=[];for(var n=0;n2*this.size&&pE(this),!0):!1}; g.u.get=function(W,J){return qK(this.K,W)?this.K[W]:J}; g.u.set=function(W,J){qK(this.K,W)||(this.size+=1,this.W.push(W),this.iC++);this.K[W]=J}; g.u.forEach=function(W,J){for(var K=this.Oa(),I=0;I=I.W.length)return g.lO;var S=I.W[J++];return g.Oi(W?S:I.K[S])}; return q}; var yaG={uTs:"atp",NFZ:"ska",CA8:"que",GD8:"mus",wgg:"sus",kPw:"dsp",MBI:"seq",Rls:"mic",RGZ:"dpa",TqS:"cds",loK:"mlm",C20:"dsdtr",aoZ:"ntb",SuO:"vsp",Vzh:"scn",RFg:"rpe",LAS:"dcn",zqI:"dcp",rgZ:"pas",eq0:"drq",i_8:"opf",TCw:"els",Q5w:"isg",xXu:"svq",g0W:"mvp",l4K:"ads",kZK:"stcp",ipw:"sads",Udu:"dloc"},Bqv={cn3:"u",IBN:"cl",DBN:"k",PJg:"i",yls:"cr",Qmg:"m",BC0:"g",jt:"up"},p2G={Vo:"adPlaying",Ej:"onAdStateChange"},lv$={xgS:"nowPlaying",Z_u:"onStateChange",Vo:"adPlaying",Ej:"onAdStateChange",sj:"nowPlayingShorts", GI:"onShortsStateChange"},nge={sj:"nowPlayingShorts",GI:"onShortsStateChange"};lk.prototype.equals=function(W){return W?this.id==W.id:!1}; var PX$="",F3=null;SN0.prototype.flush=function(W,J){W=W===void 0?[]:W;J=J===void 0?!1:J;if(g.yb("enable_client_streamz_web")){W=g.d(W);for(var K=W.next();!K.done;K=W.next())K=g.idv(K.value),K={serializedIncrementBatch:g.IB(K.K())},g.AF("streamzIncremented",K,{sendIsolatedPayload:J})}}; var uk,hkr=lRo("loadCastFramework")||lRo("loadCastApplicationFramework"),aRo=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.AW(dz,g.R);g.u=dz.prototype;g.u.M7=function(W){this.T=arguments;this.W=!1;this.tp?this.G=g.px()+this.F4:this.tp=g.ba(this.j,this.F4)}; g.u.stop=function(){this.tp&&(g.vH.clearTimeout(this.tp),this.tp=null);this.G=null;this.W=!1;this.T=[]}; g.u.pause=function(){++this.K}; g.u.resume=function(){this.K&&(--this.K,!this.K&&this.W&&(this.W=!1,this.S.apply(null,this.T)))}; g.u.lO=function(){this.stop();dz.Kc.lO.call(this)}; g.u.cq=function(){this.tp&&(g.vH.clearTimeout(this.tp),this.tp=null);this.G?(this.tp=g.ba(this.j,this.G-g.px()),this.G=null):this.K?this.W=!0:(this.W=!1,this.S.apply(null,this.T))};y5.prototype.stringify=function(W){return g.vH.JSON.stringify(W,void 0)}; y5.prototype.parse=function(W){return g.vH.JSON.parse(W,void 0)};g.AW(Nio,g.P4);g.AW(dkx,g.P4);var yJo=null;g.AW(Znj,g.P4);g.AW(Q$r,g.P4);g.AW(CBo,g.P4);CE.prototype.debug=function(){}; CE.prototype.info=function(){}; CE.prototype.warning=function(){};var Tir={},Onx={};g.u=wz.prototype;g.u.setTimeout=function(W){this.Js=W}; g.u.xZ=function(W){W=W.target;var J=this.D0;J&&g.cS(W)==3?J.TN():this.o4(W)}; g.u.o4=function(W){try{if(W==this.W)a:{var J=g.cS(this.W),K=this.W.K,I=this.W.getStatus();if(!(J<3)&&(J!=3||this.W&&(this.K.K||g.XI(this.W)||g.Wg(this.W)))){this.jZ||J!=4||K==7||(K==8||I<=0?UM(3):UM(2));EdW(this);var q=this.W.getStatus();this.sT=q;var S=xkx(this);if(this.S=q==200){if(this.Tx&&!this.OI){b:{if(this.W){var p=g.il(this.W,"X-HTTP-Initial-Response");if(p&&!g.FC(p)){var n=p;break b}}n=null}if(W=n)this.OI=!0,kWp(this,W);else{this.S=!1;this.j=3;ZD(12);gz(this);Gb(this);break a}}if(this.vS){W= !0;for(var A;!this.jZ&&this.Z0&&!this.SI&&(this.SI=!0,this.G.GV(this)):(gz(this),Gb(this))}else kWp(this,S);J==4&&gz(this);this.S&&!this.jZ&&(J==4?ekx(this.G,this):(this.S=!1,MK(this)))}else g.Q6X(this.W),q==400&&S.indexOf("Unknown SID")> 0?(this.j=3,ZD(12)):(this.j=0,ZD(13)),gz(this),Gb(this)}}}catch(D){}finally{}}; g.u.cancel=function(){this.jZ=!0;gz(this)}; g.u.Sw=function(){this.PS=null;var W=Date.now();W-this.eZ>=0?(this.Y3!=2&&(UM(3),ZD(17)),gz(this),this.j=2,Gb(this)):V6v(this,this.eZ-W)}; g.u.getLastError=function(){return this.j}; g.u.O$=function(){return this.W};vdT.prototype.cancel=function(){this.G=s$r(this);if(this.K)this.K.cancel(),this.K=null;else if(this.W&&this.W.size!==0){for(var W=g.d(this.W.values()),J=W.next();!J.done;J=W.next())J.value.cancel();this.W.clear()}};g.u=iL0.prototype;g.u.t5=8;g.u.LQ=1;g.u.connect=function(W,J,K,I){ZD(0);this.oG=W;this.jZ=J||{};K&&I!==void 0&&(this.jZ.OSID=K,this.jZ.OAID=I);this.OI=this.Fz;this.SZ=rJT(this,null,this.oG);Tb(this)}; g.u.disconnect=function(){K9v(this);if(this.LQ==3){var W=this.FW++,J=this.SZ.clone();g.hh(J,"SID",this.T);g.hh(J,"RID",W);g.hh(J,"TYPE","terminate");EM(this,J);W=new wz(this,this.T,W);W.Y3=2;W.N=ik(J.clone());J=!1;if(g.vH.navigator&&g.vH.navigator.sendBeacon)try{J=g.vH.navigator.sendBeacon(W.N.toString(),"")}catch(K){}!J&&g.vH.Image&&((new Image).src=W.N,J=!0);J||(W.W=GWT(W.G,null),W.W.send(W.N));W.G8=Date.now();MK(W)}nkv(this)}; g.u.eF=function(){return this.LQ==0}; g.u.getState=function(){return this.LQ}; g.u.y7=function(W){if(this.S)if(this.S=null,this.LQ==1){if(!W){this.FW=Math.floor(Math.random()*1E5);W=this.FW++;var J=new wz(this,"",W),K=this.C;this.sT&&(K?(K=g.ih(K),g.KU(K,this.sT)):K=this.sT);this.Z!==null||this.eZ||(J.SZ=K,K=null);var I;if(this.P7)a:{for(var q=I=0;q4096){I=q;break a}if(I===4096||q===this.G.length-1){I=q+1;break a}}I= 1E3}else I=1E3;I=SOr(this,J,I);q=this.SZ.clone();g.hh(q,"RID",W);g.hh(q,"CVER",22);this.vS&&g.hh(q,"X-HTTP-Session-Id",this.vS);EM(this,q);K&&(this.eZ?I="headers="+g.tz(g.mHy(K))+"&"+I:this.Z&&g.uY(q,this.Z,K));mke(this.K,J);this.Da&&g.hh(q,"TYPE","init");this.P7?(g.hh(q,"$req",I),g.hh(q,"SID","null"),J.Tx=!0,gdx(J,q,null)):gdx(J,q,I);this.LQ=2}}else this.LQ==3&&(W?pM0(this,W):this.G.length==0||YNR(this.K)||pM0(this))}; g.u.A5=function(){this.N=null;ltT(this);if(this.bb&&!(this.Js||this.W==null||this.iU<=0)){var W=2*this.iU;this.XW=Q5((0,g.Io)(this.OEw,this),W)}}; g.u.OEw=function(){this.XW&&(this.XW=null,this.OI=!1,this.Js=!0,ZD(10),xo(this),ltT(this))}; g.u.GV=function(W){this.W==W&&this.bb&&!this.Js&&(JFR(this),this.Js=!0,ZD(11))}; g.u.jw=function(){this.PS!=null&&(this.PS=null,xo(this),bnr(this),ZD(19))}; g.u.MEI=function(W){W?ZD(2):ZD(1)}; g.u.isActive=function(){return!!this.j&&this.j.isActive(this)}; g.u=DVj.prototype;g.u.Fl=function(){}; g.u.Hu=function(){}; g.u.kx=function(){}; g.u.p9=function(){}; g.u.isActive=function(){return!0}; g.u.Ib=function(){};g.AW(Rz,g.t0);Rz.prototype.open=function(){this.W.j=this.G;this.S&&(this.W.Y3=!0);this.W.connect(this.j,this.K||void 0)}; Rz.prototype.close=function(){this.W.disconnect()}; Rz.prototype.send=function(W){var J=this.W;if(typeof W==="string"){var K={};K.__data__=W;W=K}else this.T&&(K={},K.__data__=g.Lq(W),W=K);J.G.push(new zkl(J.hh++,W));J.LQ==3&&Tb(J)}; Rz.prototype.lO=function(){this.W.j=null;delete this.G;this.W.disconnect();delete this.W;Rz.Kc.lO.call(this)}; g.AW(ftR,Nio);g.AW(h3G,dkx);g.AW(eL,DVj);eL.prototype.Fl=function(){this.W.dispatchEvent("m")}; eL.prototype.Hu=function(W){this.W.dispatchEvent(new ftR(W))}; eL.prototype.kx=function(W){this.W.dispatchEvent(new h3G(W))}; eL.prototype.p9=function(){this.W.dispatchEvent("n")};var B$=new g.t0;g.N(atx,g.P4);g.u=rz.prototype;g.u.D8=null;g.u.un=!1;g.u.Cb=null;g.u.dA=null;g.u.IN=null;g.u.Pk=null;g.u.S7=null;g.u.Wk=null;g.u.r4=null;g.u.Em=null;g.u.KF=0;g.u.hX=null;g.u.sH=null;g.u.Nr=null;g.u.j7=-1;g.u.O0=!0;g.u.xJ=!1;g.u.Zu=0;g.u.Rv=null;var ZLv={},UVo={};g.u=rz.prototype;g.u.setTimeout=function(W){this.K=W}; g.u.YZ=function(W){W=W.target;var J=this.Rv;J&&g.cS(W)==3?J.TN():this.bT(W)}; g.u.bT=function(W){try{if(W==this.Em)a:{var J=g.cS(this.Em),K=this.Em.K,I=this.Em.getStatus();if(g.ca&&!g.gn("420+")){if(J<4)break a}else if(J<3||J==3&&!g.XI(this.Em))break a;this.xJ||J!=4||K==7||(K==8||I<=0?this.W.cU(3):this.W.cU(2));wMo(this);var q=this.Em.getStatus();this.j7=q;var S=g.XI(this.Em);if(this.un=q==200){J==4&&oz(this);if(this.vS){for(W=!0;!this.xJ&&this.KF0?(this.Nr=3,mL(13)):(this.Nr=0,mL(14)),oz(this),Mxo(this)}}catch(n){}finally{}}; g.u.cancel=function(){this.xJ=!0;oz(this)}; g.u.iR=function(){this.Cb=null;var W=Date.now();W-this.dA>=0?(this.Pk!=2&&this.W.cU(3),oz(this),this.Nr=2,mL(18),Mxo(this)):CHe(this,this.dA-W)}; g.u.getLastError=function(){return this.Nr};g.u=xVW.prototype;g.u.Ot=null;g.u.Ri=null;g.u.Aa=!1;g.u.wA=null;g.u.L4=null;g.u.BZ=-1;g.u.EH=null;g.u.jL=null;g.u.connect=function(W){this.wA=W;W=ko(this.W,null,this.wA);mL(3);Date.now();var J=this.W.C;J!=null?(this.EH=J[0],(this.jL=J[1])?(this.L4=1,OLx(this)):(this.L4=2,TgW(this))):(Jf(W,"MODE","init"),this.Ri=new rz(this),this.Ri.D8=this.Ot,dVo(this.Ri,W,!1,null,!0),this.L4=0)}; g.u.KI=function(W){if(W)this.L4=2,TgW(this);else{mL(4);var J=this.W;J.Y7=J.Sd.BZ;sM(J,9)}W&&this.cU(2)}; g.u.BQ=function(W){return this.W.BQ(W)}; g.u.abort=function(){this.Ri&&(this.Ri.cancel(),this.Ri=null);this.BZ=-1}; g.u.eF=function(){return!1}; g.u.J5=function(W,J){this.BZ=W.j7;if(this.L4==0)if(J){try{var K=this.K.parse(J)}catch(I){W=this.W;W.Y7=this.BZ;sM(W,2);return}this.EH=K[0];this.jL=K[1]}else W=this.W,W.Y7=this.BZ,sM(W,2);else this.L4==2&&(this.Aa?(mL(7),Date.now()):J=="11111"?(mL(6),this.Aa=!0,Date.now(),this.BZ=200,this.Ri.cancel(),mL(12),zb(this.W,this,!0)):(mL(8),Date.now(),this.Aa=!1))}; g.u.hw=function(){this.BZ=this.Ri.j7;if(this.Ri.un)this.L4==0?this.jL?(this.L4=1,OLx(this)):(this.L4=2,TgW(this)):this.L4==2&&(this.Aa?(mL(12),zb(this.W,this,!0)):(mL(11),zb(this.W,this,!1)));else{this.L4==0?mL(9):this.L4==2&&mL(10);var W=this.W;this.Ri.getLastError();W.Y7=this.BZ;sM(W,2)}}; g.u.YJ=function(){return this.W.YJ()}; g.u.isActive=function(){return this.W.isActive()}; g.u.cU=function(W){this.W.cU(W)};g.u=HL$.prototype;g.u.zr=null;g.u.Zi=null;g.u.VT=null;g.u.EP=null;g.u.Nh=null;g.u.gg=null;g.u.n9=null;g.u.Du=null;g.u.Bc=0;g.u.dO=0;g.u.zG=null;g.u.Wd=null;g.u.Oz=null;g.u.oD=null;g.u.Sd=null;g.u.Et=null;g.u.uY=-1;g.u.q1=-1;g.u.Y7=-1;g.u.Rj=0;g.u.fb=0;g.u.mX=8;var MgL={OK:0,K4s:2,qSI:4,jmW:5,v7Z:6,STOP:7,PJ:8,KAN:9,WA8:10,sHW:11,gGw:12};g.AW(Ekx,g.P4);g.AW(e3v,g.P4);g.u=HL$.prototype; g.u.connect=function(W,J,K,I,q){mL(0);this.Nh=J;this.Zi=K||{};I&&q!==void 0&&(this.Zi.OSID=I,this.Zi.OAID=q);this.N?(bk((0,g.Io)(this.Tl,this,W),100),bLo(this)):this.Tl(W)}; g.u.disconnect=function(){Bgv(this);if(this.W==3){var W=this.Bc++,J=this.gg.clone();g.hh(J,"SID",this.T);g.hh(J,"RID",W);g.hh(J,"TYPE","terminate");Yo(this,J);W=new rz(this,this.T,W);W.Pk=2;W.S7=ik(J.clone());(new Image).src=W.S7.toString();W.IN=Date.now();yFR(W)}cFR(this)}; g.u.Tl=function(W){this.Sd=new xVW(this);this.Sd.Ot=this.zr;this.Sd.K=this.j;this.Sd.connect(W)}; g.u.eF=function(){return this.W==0}; g.u.getState=function(){return this.W}; g.u.zy=function(W){this.Wd=null;kqL(this,W)}; g.u.L9=function(){this.Oz=null;this.EP=new rz(this,this.T,"rpc",this.Z);this.EP.D8=this.zr;this.EP.Zu=0;var W=this.n9.clone();g.hh(W,"RID","rpc");g.hh(W,"SID",this.T);g.hh(W,"CI",this.Et?"0":"1");g.hh(W,"AID",this.uY);Yo(this,W);g.hh(W,"TYPE","xmlhttp");dVo(this.EP,W,!0,this.Du,!1)}; g.u.J5=function(W,J){if(this.W!=0&&(this.EP==W||this.VT==W))if(this.Y7=W.j7,this.VT==W&&this.W==3)if(this.mX>7){try{var K=this.j.parse(J)}catch(I){K=null}if(Array.isArray(K)&&K.length==3)if(W=K,W[0]==0)a:{if(!this.Oz){if(this.EP)if(this.EP.IN+3E30)){if(I=J==1)this.VT||this.Wd||this.W==1||this.Rj>=2?I=!1:(this.Wd=bk((0,g.Io)(this.zy,this,W),vk$(this,this.Rj)),this.Rj++, I=!0);I=!(I||J==2&&YO0(this))}if(I)switch(K){case 1:sM(this,5);break;case 4:sM(this,10);break;case 3:sM(this,6);break;case 7:sM(this,12);break;default:sM(this,2)}}}; g.u.Z5=function(W){if(!g.ao(arguments,this.W))throw Error("Unexpected channel state: "+this.W);}; g.u.XPs=function(W){W?mL(2):(mL(1),sxv(this,8))}; g.u.BQ=function(W){if(W)throw Error("Can't create secondary domain capable XhrIo object.");W=new g.vS;W.Z=!1;return W}; g.u.isActive=function(){return!!this.zG&&this.zG.isActive(this)}; g.u.cU=function(W){var J=B$;J.dispatchEvent(new e3v(J,W))}; g.u.YJ=function(){return!1}; g.u=PHG.prototype;g.u.C9=function(){}; g.u.eQ=function(){}; g.u.f9=function(){}; g.u.UX=function(){}; g.u.rA=function(){}; g.u.RJ=function(){return{}}; g.u.isActive=function(){return!0};g.u=XMW.prototype;g.u.enqueue=function(W){this.K.push(W)}; g.u.isEmpty=function(){return this.W.length===0&&this.K.length===0}; g.u.clear=function(){this.W=[];this.K=[]}; g.u.contains=function(W){return g.ao(this.W,W)||g.ao(this.K,W)}; g.u.remove=function(W){var J=this.W;var K=(0,g.mIT)(J,W);K>=0?(g.u0(J,K),J=!0):J=!1;return J||g.Nj(this.K,W)}; g.u.S1=function(){for(var W=[],J=this.W.length-1;J>=0;--J)W.push(this.W[J]);J=this.K.length;for(var K=0;K=gbl.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(W=gbl[this.K],this.tp=g.FW((0,g.Io)(this.qU,this),W),this.K++):this.publish("pairingFailed",Error("Server error "+W.status))}; g.u.rO=function(){this.W=null;this.publish("pairingFailed",Error("Server not responding"))}; var gbl=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.AW(n6,p6);g.u=n6.prototype;g.u.start=function(){lb(this)&&this.publish("screenChange");!g.V0("yt-remote-lounge-token-expiration")&&ToW(this);g.uX(this.W);this.W=g.FW((0,g.Io)(this.start,this),1E4)}; g.u.add=function(W,J){lb(this);G3o(this,W);AG(this,!1);this.publish("screenChange");J(W);W.token||ToW(this)}; g.u.remove=function(W,J){var K=lb(this);xbG(this,W)&&(AG(this,!1),K=!0);J(W);K&&this.publish("screenChange")}; g.u.PQ=function(W,J,K,I){var q=lb(this),S=this.get(W.id);S?(S.name!=J&&(S.name=J,AG(this,!1),q=!0),K(W)):I(Error("no such local screen."));q&&this.publish("screenChange")}; g.u.lO=function(){g.uX(this.W);n6.Kc.lO.call(this)}; g.u.Yq=function(W){lb(this);var J=this.screens.length;W=W&&W.screens||[];for(var K=W.length,I=0;I20)break a;n=J(S,p)}S=n}q.name=S}K(f6(this,q))},this), onError:(0,g.Io)(function(q){I(Error("pairing request failed: "+q.status))},this), onTimeout:(0,g.Io)(function(){I(Error("pairing request timed out."))},this)})}; g.u.lO=function(){g.hE(this.K);g.hE(this.W);jF.Kc.lO.call(this)}; g.u.mx=function(){k3v(this);this.publish("screenChange");this.W.update()}; jF.prototype.dispose=jF.prototype.dispose;g.AW(hG,g.Ao);g.u=hG.prototype;g.u.DB=function(W){this.Iu()||(W&&(F8(this,""+W),this.publish("sessionFailed")),this.W=null,this.publish("sessionScreen",null))}; g.u.info=function(W){JG(this.vS,W)}; g.u.P9=function(){return null}; g.u.fu=function(W){var J=this.K;W?(J.displayStatus=new chrome.cast.ReceiverDisplayStatus(W,[]),J.displayStatus.showStop=!0):J.displayStatus=null;chrome.cast.setReceiverDisplayStatus(J,(0,g.Io)(function(){this.info("Updated receiver status for "+J.friendlyName+": "+W)},this),(0,g.Io)(function(){F8(this,"Failed to update receiver status for: "+J.friendlyName)},this))}; g.u.lO=function(){this.fu("");hG.Kc.lO.call(this)};g.N(aj,hG);g.u=aj.prototype;g.u.Uq=function(W){if(this.G){if(this.G==W)return;F8(this,"Overriding cast session with new session object");Isv(this);this.G8=!1;this.C="unknown";this.G.removeUpdateListener(this.sI);this.G.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.XW)}this.G=W;this.G.addUpdateListener(this.sI);this.G.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.XW);X2v(this,"getMdxSessionStatus")}; g.u.W2=function(W){this.info("launchWithParams no-op for Cast: "+g.Lq(W))}; g.u.stop=function(){this.G?this.G.stop((0,g.Io)(function(){this.DB()},this),(0,g.Io)(function(){this.DB(Error("Failed to stop receiver app."))},this)):this.DB(Error("Stopping cast device without session."))}; g.u.fu=function(){}; g.u.lO=function(){this.info("disposeInternal");Isv(this);this.G&&(this.G.removeUpdateListener(this.sI),this.G.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.XW));this.G=null;hG.prototype.lO.call(this)}; g.u.TBO=function(W,J){if(!this.Iu())if(J)if(J=KE(J),g.i0(J))switch(W=""+J.type,J=J.data||{},this.info("onYoutubeMessage_: "+W+" "+g.Lq(J)),W){case "mdxSessionStatus":sOL(this,J);break;case "loungeToken":WTe(this,J);break;default:F8(this,"Unknown youtube message: "+W)}else F8(this,"Unable to parse message.");else F8(this,"No data in message.")}; g.u.xw=function(W,J,K,I){g.uX(this.N);this.N=0;rcr(this.T,this.K.label,W,this.K.friendlyName,(0,g.Io)(function(q){q?J(q):I>=0?(F8(this,"Screen "+W+" appears to be offline. "+I+" retries left."),this.N=g.FW((0,g.Io)(this.xw,this,W,J,K,I-1),300)):K(Error("Unable to fetch screen."))},this),K)}; g.u.P9=function(){return this.G}; g.u.ob=function(W){this.Iu()||W||(F8(this,"Cast session died."),this.DB())};g.N(ub,hG);g.u=ub.prototype;g.u.Uq=function(W){this.G=W;this.G.addUpdateListener(this.jZ)}; g.u.W2=function(W){this.SZ=W;this.PS()}; g.u.stop=function(){jap(this);this.G?this.G.stop((0,g.Io)(this.DB,this,null),(0,g.Io)(this.DB,this,"Failed to stop DIAL device.")):this.DB()}; g.u.lO=function(){jap(this);this.G&&this.G.removeUpdateListener(this.jZ);this.G=null;hG.prototype.lO.call(this)}; g.u.Au=function(W){this.Iu()||W||(F8(this,"DIAL session died."),this.j(),this.j=function(){},this.DB())};g.N(yj,hG);yj.prototype.stop=function(){this.DB()}; yj.prototype.Uq=function(){}; yj.prototype.W2=function(){g.uX(this.G);this.G=NaN;var W=jL(this.T.Sl(),this.K.label);W?tG(this,W):this.DB(Error("No such screen"))}; yj.prototype.lO=function(){g.uX(this.G);this.G=NaN;hG.prototype.lO.call(this)};g.N(Um,g.Ao);g.u=Um.prototype; g.u.init=function(W,J){chrome.cast.timeout.requestSession=3E4;var K=new chrome.cast.SessionRequest(this.N,[chrome.cast.Capability.AUDIO_OUT]);g.yb("desktop_enable_cast_connect")&&(K.androidReceiverCompatible=!0);this.C||(K.dialRequest=new chrome.cast.DialRequest("YouTube"));var I=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;W=W||this.S?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var q=(0,g.Io)(this.cDI,this);K=new chrome.cast.ApiConfig(K,(0,g.Io)(this.QR, this),q,I,W);K.customDialLaunchCallback=(0,g.Io)(this.FeO,this);chrome.cast.initialize(K,(0,g.Io)(function(){this.Iu()||(chrome.cast.addReceiverActionListener(this.j),C2p(),this.K.subscribe("onlineScreenChange",(0,g.Io)(this.sC,this)),this.G=tT$(this),chrome.cast.setCustomReceivers(this.G,function(){},(0,g.Io)(function(S){this.cw("Failed to set initial custom receivers: "+g.Lq(S))},this)),this.publish("yt-remote-cast2-availability-change",Qj(this)),J(!0))},this),(0,g.Io)(function(S){this.cw("Failed to initialize API: "+ g.Lq(S)); J(!1)},this))}; g.u.BKu=function(W,J){ZA("Setting connected screen ID: "+W+" -> "+J);if(this.W){var K=this.W.W;if(!W||K&&K.id!=W)ZA("Unsetting old screen status: "+this.W.K.friendlyName),C6(this,null)}if(W&&J){if(!this.W){W=jL(this.K.Sl(),W);if(!W){ZA("setConnectedScreenStatus: Unknown screen.");return}if(W.idType=="shortLived"){ZA("setConnectedScreenStatus: Screen with id type to be short lived.");return}K=fs$(this,W);K||(ZA("setConnectedScreenStatus: Connected receiver not custom..."),K=new chrome.cast.Receiver(W.uuid? W.uuid:W.id,W.name),K.receiverType=chrome.cast.ReceiverType.CUSTOM,this.G.push(K),chrome.cast.setCustomReceivers(this.G,function(){},(0,g.Io)(function(I){this.cw("Failed to set initial custom receivers: "+g.Lq(I))},this))); ZA("setConnectedScreenStatus: new active receiver: "+K.friendlyName);C6(this,new yj(this.K,K),!0)}this.W.fu(J)}else ZA("setConnectedScreenStatus: no screen.")}; g.u.DRS=function(W){this.Iu()?this.cw("Setting connection data on disposed cast v2"):this.W?this.W.W2(W):this.cw("Setting connection data without a session")}; g.u.pV=function(){this.Iu()?this.cw("Stopping session on disposed cast v2"):this.W?(this.W.stop(),C6(this,null)):ZA("Stopping non-existing session")}; g.u.requestSession=function(){chrome.cast.requestSession((0,g.Io)(this.QR,this),(0,g.Io)(this.ADu,this))}; g.u.lO=function(){this.K.unsubscribe("onlineScreenChange",(0,g.Io)(this.sC,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.j);var W=Ubo,J=g.sH("yt.mdx.remote.debug.handlers_");g.Nj(J||[],W);g.hE(this.W);g.Ao.prototype.lO.call(this)}; g.u.cw=function(W){JG("Controller",W)}; g.u.VR=function(W,J){this.W==W&&(J||C6(this,null),this.publish("yt-remote-cast2-session-change",J))}; g.u.XDN=function(W,J){if(!this.Iu())if(W)switch(W.friendlyName=chrome.cast.unescape(W.friendlyName),ZA("onReceiverAction_ "+W.label+" / "+W.friendlyName+"-- "+J),J){case chrome.cast.ReceiverAction.CAST:if(this.W)if(this.W.K.label!=W.label)ZA("onReceiverAction_: Stopping active receiver: "+this.W.K.friendlyName),this.W.stop();else{ZA("onReceiverAction_: Casting to active receiver.");this.W.W&&this.publish("yt-remote-cast2-session-change",this.W.W);break}switch(W.receiverType){case chrome.cast.ReceiverType.CUSTOM:C6(this, new yj(this.K,W));break;case chrome.cast.ReceiverType.DIAL:C6(this,new ub(this.K,W,this.T,this.config_));break;case chrome.cast.ReceiverType.CAST:C6(this,new aj(this.K,W,this.config_));break;default:this.cw("Unknown receiver type: "+W.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.W&&this.W.K.label==W.label?this.W.stop():this.cw("Stopping receiver w/o session: "+W.friendlyName)}else this.cw("onReceiverAction_ called without receiver.")}; g.u.FeO=function(W){if(this.Iu())return Promise.reject(Error("disposed"));var J=W.receiver;J.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.cw("Not DIAL receiver: "+J.friendlyName),J.receiverType=chrome.cast.ReceiverType.DIAL);var K=this.W?this.W.K:null;if(!K||K.label!=J.label)return this.cw("Receiving DIAL launch request for non-clicked DIAL receiver: "+J.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(K&&K.label==J.label&&K.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.W.W)return ZA("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.W.W),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.cw('Changing CAST intent from "'+K.receiverType+'" to "dial" for '+J.friendlyName);C6(this,new ub(this.K,J,this.T,this.config_))}J=this.W;J.N=W;J.N.appState==chrome.cast.DialAppState.RUNNING?(W=J.N.extraData||{},K=W.screenId||null,Nc(J)&&W.loungeToken?W.loungeTokenRefreshIntervalMs?W=nLW(J,{name:J.K.friendlyName,screenId:W.screenId,loungeToken:W.loungeToken,dialId:J.N.receiver.label, screenIdType:"shortLived"},W.loungeTokenRefreshIntervalMs):(g.PO(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(W)+".")),W=AjL(J,K)):W=AjL(J,K)):W=pbL(J);return W}; g.u.QR=function(W){var J=this;if(!this.Iu()&&!this.S){ZA("New cast session ID: "+W.sessionId);var K=W.receiver;if(K.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.W)if(K.receiverType==chrome.cast.ReceiverType.CAST)ZA("Got resumed cast session before resumed mdx connection."),K.friendlyName=chrome.cast.unescape(K.friendlyName),C6(this,new aj(this.K,K,this.config_),!0);else{this.cw("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var I=this.W.K,q=jL(this.K.Sl(), I.label);q&&Af(q,K.label)&&I.receiverType!=chrome.cast.ReceiverType.CAST&&K.receiverType==chrome.cast.ReceiverType.CAST&&(ZA("onSessionEstablished_: manual to cast session change "+K.friendlyName),g.hE(this.W),this.W=new aj(this.K,K,this.config_),this.W.subscribe("sessionScreen",(0,g.Io)(this.VR,this,this.W)),this.W.subscribe("sessionFailed",function(){return hMj(J,J.W)}),this.W.W2(null)); this.W.Uq(W)}}}; g.u.y0=function(){return this.W?this.W.P9():null}; g.u.ADu=function(W){this.Iu()||(this.cw("Failed to estabilish a session: "+g.Lq(W)),W.code!=chrome.cast.ErrorCode.CANCEL&&C6(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.u.cDI=function(W){ZA("Receiver availability updated: "+W);if(!this.Iu()){var J=Qj(this);this.Z=W==chrome.cast.ReceiverAvailability.AVAILABLE;Qj(this)!=J&&this.publish("yt-remote-cast2-availability-change",Qj(this))}}; g.u.sC=function(){this.Iu()||(this.G=tT$(this),ZA("Updating custom receivers: "+g.Lq(this.G)),chrome.cast.setCustomReceivers(this.G,function(){},(0,g.Io)(function(){this.cw("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",Qj(this)))}; Um.prototype.setLaunchParams=Um.prototype.DRS;Um.prototype.setConnectedScreenStatus=Um.prototype.BKu;Um.prototype.stopSession=Um.prototype.pV;Um.prototype.getCastSession=Um.prototype.y0;Um.prototype.requestSession=Um.prototype.requestSession;Um.prototype.init=Um.prototype.init;Um.prototype.dispose=Um.prototype.dispose;var Qa0=[];g.u=Om.prototype; g.u.reset=function(W){this.listId="";this.index=-1;this.videoId="";$vp(this);this.volume=-1;this.muted=!1;W&&(this.index=W.index,this.listId=W.listId,this.videoId=W.videoId,this.playerState=W.playerState,this.volume=W.volume,this.muted=W.muted,this.audioTrackId=W.audioTrackId,this.trackData=W.trackData,this.Wh=W.hasPrevious,this.Yg=W.hasNext,this.Z=W.playerTime,this.S=W.playerTimeAt,this.T=W.seekableStart,this.W=W.seekableEnd,this.j=W.duration,this.N=W.loadedTime,this.G=W.liveIngestionTime,this.K= !isNaN(this.G))}; g.u.isPlaying=function(){return this.playerState==1}; g.u.isBuffering=function(){return this.playerState==3}; g.u.Fa=function(){return this.playerState==1081}; g.u.Cg=function(W){this.j=isNaN(W)?0:W}; g.u.getDuration=function(){return this.K?this.j+TH(this):this.j}; g.u.clone=function(){return new Om(xvl(this))};g.N(Rj,g.Ao);g.u=Rj.prototype;g.u.getState=function(){return this.G}; g.u.Hd=function(){return this.T.getReconnectTimeout()}; g.u.GR=function(){this.T.reconnect()}; g.u.play=function(){Bx(this)?(this.W?this.W.play(null,g.Fw,L6(this,"play")):oj(this,"play"),HIo(this,1,Vj(bb(this))),this.publish("remotePlayerChange")):md(this,this.play)}; g.u.pause=function(){Bx(this)?(this.W?this.W.pause(null,g.Fw,L6(this,"pause")):oj(this,"pause"),HIo(this,2,Vj(bb(this))),this.publish("remotePlayerChange")):md(this,this.pause)}; g.u.seekTo=function(W){if(Bx(this)){if(this.W){var J=bb(this),K=new chrome.cast.media.SeekRequest;K.currentTime=W;J.isPlaying()||J.isBuffering()?K.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:K.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.W.seek(K,g.Fw,L6(this,"seekTo",{newTime:W}))}else oj(this,"seekTo",{newTime:W});HIo(this,3,W);this.publish("remotePlayerChange")}else md(this,g.Sl(this.seekTo,W))}; g.u.stop=function(){if(Bx(this)){this.W?this.W.stop(null,g.Fw,L6(this,"stopVideo")):oj(this,"stopVideo");var W=bb(this);W.index=-1;W.videoId="";$vp(W);r$(this,W);this.publish("remotePlayerChange")}else md(this,this.stop)}; g.u.setVolume=function(W,J){if(Bx(this)){var K=bb(this);if(this.K){if(K.volume!=W){var I=Math.round(W)/100;this.K.setReceiverVolumeLevel(I,(0,g.Io)(function(){K6("set receiver volume: "+I)},this),(0,g.Io)(function(){this.cw("failed to set receiver volume.")},this))}K.muted!=J&&this.K.setReceiverMuted(J,(0,g.Io)(function(){K6("set receiver muted: "+J)},this),(0,g.Io)(function(){this.cw("failed to set receiver muted.")},this))}else{var q={volume:W, muted:J};K.volume!=-1&&(q.delta=W-K.volume);oj(this,"setVolume",q)}K.muted=J;K.volume=W;r$(this,K)}else md(this,g.Sl(this.setVolume,W,J))}; g.u.Kt=function(W,J){if(Bx(this)){var K=bb(this);W={videoId:W};J&&(K.trackData={trackName:J.name,languageCode:J.languageCode,sourceLanguageCode:J.translationLanguage?J.translationLanguage.languageCode:"",languageName:J.languageName,kind:J.kind},W.style=g.Lq(J.style),g.KU(W,K.trackData));oj(this,"setSubtitlesTrack",W);r$(this,K)}else md(this,g.Sl(this.Kt,W,J))}; g.u.setAudioTrack=function(W,J){Bx(this)?(J=J.getLanguageInfo().getId(),oj(this,"setAudioTrack",{videoId:W,audioTrackId:J}),W=bb(this),W.audioTrackId=J,r$(this,W)):md(this,g.Sl(this.setAudioTrack,W,J))}; g.u.playVideo=function(W,J,K,I,q,S,p){I=I===void 0?null:I;q=q===void 0?null:q;S=S===void 0?null:S;p=p===void 0?null:p;var n=bb(this),A={videoId:W};K!==void 0&&(A.currentIndex=K);Em(n,W,K||0);J!==void 0&&(Hx(n,J),A.currentTime=J);I&&(A.listId=I);q&&(A.playerParams=q);S&&(A.clickTrackingParams=S);p&&(A.locationInfo=g.Lq(p));oj(this,"setPlaylist",A);I||r$(this,n)}; g.u.OD=function(W,J){if(Bx(this)){if(W&&J){var K=bb(this);Em(K,W,J);r$(this,K)}oj(this,"previous")}else md(this,g.Sl(this.OD,W,J))}; g.u.nextVideo=function(W,J){if(Bx(this)){if(W&&J){var K=bb(this);Em(K,W,J);r$(this,K)}oj(this,"next")}else md(this,g.Sl(this.nextVideo,W,J))}; g.u.FF=function(){if(Bx(this)){oj(this,"clearPlaylist");var W=bb(this);W.reset();r$(this,W);this.publish("remotePlayerChange")}else md(this,this.FF)}; g.u.Z$=function(){Bx(this)?oj(this,"dismissAutoplay"):md(this,this.Z$)}; g.u.dispose=function(){if(this.G!=3){var W=this.G;this.G=3;this.publish("proxyStateChange",W,this.G)}g.Ao.prototype.dispose.call(this)}; g.u.lO=function(){Tbj(this);this.T=null;this.j.clear();eF(this,null);g.Ao.prototype.lO.call(this)}; g.u.PX=function(W){if((W!=this.G||W==2)&&this.G!=3&&W!=0){var J=this.G;this.G=W;this.publish("proxyStateChange",J,W);if(W==1)for(;!this.j.isEmpty();)J=W=this.j,J.W.length===0&&(J.W=J.K,J.W.reverse(),J.K=[]),W.W.pop().apply(this);else W==3&&this.dispose()}}; g.u.QBw=function(W,J){this.publish(W,J)}; g.u.NlW=function(W){if(!W)this.e6(null),eF(this,null);else if(this.K.receiver.volume){W=this.K.receiver.volume;var J=bb(this),K=Math.round(100*W.level||0);if(J.volume!=K||J.muted!=W.muted)K6("Cast volume update: "+W.level+(W.muted?" muted":"")),J.volume=K,J.muted=!!W.muted,r$(this,J)}}; g.u.e6=function(W){K6("Cast media: "+!!W);this.W&&this.W.removeUpdateListener(this.N);if(this.W=W)this.W.addUpdateListener(this.N),VTo(this),this.publish("remotePlayerChange")}; g.u.DDS=function(W){W?(VTo(this),this.publish("remotePlayerChange")):this.e6(null)}; g.u.rX=function(){oj(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.u.mDW=function(){var W=MT0();W&&eF(this,W)}; g.u.cw=function(W){JG("CP",W)};g.N(vx,g.Ao);g.u=vx.prototype; g.u.connect=function(W,J){if(J){var K=J.listId,I=J.videoId,q=J.videoIds,S=J.playerParams,p=J.clickTrackingParams,n=J.index,A={videoId:I},D=J.currentTime,f=J.locationInfo;J=J.loopMode;D!==void 0&&(A.currentTime=D<=5?0:D);S&&(A.playerParams=S);f&&(A.locationInfo=f);p&&(A.clickTrackingParams=p);K&&(A.listId=K);q&&q.length>0&&(A.videoIds=q.join(","));n!==void 0&&(A.currentIndex=n);this.jZ&&(A.loopMode=J||"LOOP_MODE_OFF");K&&(this.W.listId=K);this.W.videoId=I;this.W.index=n||0;this.W.state=3;Hx(this.W, D);this.j="UNSUPPORTED";K=this.jZ?"setInitialState":"setPlaylist";k6("Connecting with "+K+" and params: "+g.Lq(A));this.K.connect({method:K,params:g.Lq(A)},W,Wre())}else k6("Connecting without params"),this.K.connect({},W,Wre());bIl(this)}; g.u.yS=function(W){this.K.yS(W)}; g.u.dispose=function(){this.Iu()||(g.Yc("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),zH(this,3));g.Ao.prototype.dispose.call(this)}; g.u.lO=function(){Bbe(this);rjG(this);mvG(this);g.uX(this.N);this.N=NaN;g.uX(this.C);this.C=NaN;this.T=null;g.Q0(this.PS);this.PS.length=0;this.K.dispose();g.Ao.prototype.lO.call(this);this.j=this.Z=this.G=this.W=this.K=null}; g.u.j5=function(W){if(!this.G||this.G.length===0)return!1;for(var J=g.d(this.G),K=J.next();!K.done;K=J.next())if(!K.value.capabilities.has(W))return!1;return!0}; g.u.Pz=function(){var W=3;this.Iu()||(W=0,isNaN(this.yh())?this.K.Ws()&&isNaN(this.S)&&(W=1):W=2);return W}; g.u.n3=function(W){k6("Disconnecting with "+W);g.Yc("yt.mdx.remote.remoteClient_",null);Bbe(this);this.publish("beforeDisconnect",W);W==1&&tf();this.K.disconnect(W);this.dispose()}; g.u.eV=function(){var W=this.W;this.T&&(W=this.W.clone(),Em(W,this.T,W.index));return xvl(W)}; g.u.mRw=function(W){var J=this,K=new Om(W);K.videoId&&K.videoId!=this.W.videoId&&(this.T=K.videoId,g.uX(this.N),this.N=g.FW(function(){if(J.T){var q=J.T;J.T=null;J.W.videoId!=q&&Y6(J,"getNowPlaying")}},5E3)); var I=[];this.W.listId==K.listId&&this.W.videoId==K.videoId&&this.W.index==K.index||I.push("remoteQueueChange");this.W.playerState==K.playerState&&this.W.volume==K.volume&&this.W.muted==K.muted&&Vj(this.W)==Vj(K)&&g.Lq(this.W.trackData)==g.Lq(K.trackData)||I.push("remotePlayerChange");this.W.reset(W);g.el(I,function(q){this.publish(q)},this)}; g.u.X6=function(){var W=this.K.getDeviceId(),J=g.hW(this.G,function(K){return K.type=="REMOTE_CONTROL"&&K.id!=W}); return J?J.id:""}; g.u.yh=function(){return this.K.Hd()}; g.u.mR=function(){return this.j||"UNSUPPORTED"}; g.u.oC=function(){return this.Z||""}; g.u.kZ=function(){!isNaN(this.yh())&&this.K.GR()}; g.u.YMO=function(W,J){Y6(this,W,J);LTT(this)}; g.u.EC=function(){var W=g.eC("SAPISID","")||g.eC("__Secure-1PAPISID")||"",J=g.eC("__Secure-3PAPISID","")||"";if(!W&&!J)return"";W=g.IB(g.Kr(W),2);J=g.IB(g.Kr(J),2);return g.IB(g.Kr(","+W+","+J),2)}; vx.prototype.subscribe=vx.prototype.subscribe;vx.prototype.unsubscribeByKey=vx.prototype.qP;vx.prototype.getProxyState=vx.prototype.Pz;vx.prototype.disconnect=vx.prototype.n3;vx.prototype.getPlayerContextData=vx.prototype.eV;vx.prototype.setPlayerContextData=vx.prototype.mRw;vx.prototype.getOtherConnectedRemoteId=vx.prototype.X6;vx.prototype.getReconnectTimeout=vx.prototype.yh;vx.prototype.getAutoplayMode=vx.prototype.mR;vx.prototype.getAutoplayVideoId=vx.prototype.oC;vx.prototype.reconnect=vx.prototype.kZ; vx.prototype.sendMessage=vx.prototype.YMO;vx.prototype.getXsrfToken=vx.prototype.EC;vx.prototype.isCapabilitySupportedOnConnectedDevices=vx.prototype.j5;g.N(KHo,p6);g.u=KHo.prototype;g.u.Sl=function(W){return this.cP.$_gs(W)}; g.u.contains=function(W){return!!this.cP.$_c(W)}; g.u.get=function(W){return this.cP.$_g(W)}; g.u.start=function(){this.cP.$_st()}; g.u.add=function(W,J,K){this.cP.$_a(W,J,K)}; g.u.remove=function(W,J,K){this.cP.$_r(W,J,K)}; g.u.PQ=function(W,J,K,I){this.cP.$_un(W,J,K,I)}; g.u.lO=function(){for(var W=this.W.length,J=0;J1&&!this.X.getOption("remote","quickCast")?(this.Hi=g.Ro(W,this.W,this),this.P4(g.zC(W,this.W)),W=g.E(this.X.getOption("remote","currentReceiver")),W=this.W(W),this.options[W]&&this.eE(W),this.enable(!0)):this.enable(!1)}; hv.prototype.W=function(W){return W.key}; hv.prototype.W4=function(W){return W==="cast-selector-receiver"?"Transmitir\u2026":this.Hi[W].name}; hv.prototype.ly=function(W){g.ei.prototype.ly.call(this,W);this.X.setOption("remote","currentReceiver",this.Hi[W]);this.VP.ZJ()};g.N(Qh$,g.N9);g.u=Qh$.prototype; g.u.create=function(){var W=this.player.J(),J=g.eb(W);W={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:W.Y("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:W.Y("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:W.Y("enable_cast_short_lived_lounge_token")};lup(J,W);this.subscriptions.push(g.ST("yt-remote-before-disconnect",this.Bl0,this));this.subscriptions.push(g.ST("yt-remote-connection-change",this.aVg,this));this.subscriptions.push(g.ST("yt-remote-receiver-availability-change",this.lr, this));this.subscriptions.push(g.ST("yt-remote-auto-connect",this.vms,this));this.subscriptions.push(g.ST("yt-remote-receiver-resumed",this.MPI,this));this.subscriptions.push(g.ST("mdx-privacy-popup-confirm",this.kvg,this));this.subscriptions.push(g.ST("mdx-privacy-popup-cancel",this.pt3,this));this.lr()}; g.u.load=function(){this.player.cancelPlayback();g.N9.prototype.load.call(this);this.B$=new ZJj(this.player.J(),this);this.player.KO(this.B$);this.sQ=new NTx(this,this.player,this.vN);var W=(W=FH$())?W.currentTime:0;var J=fur()?new Rj(g.E(qa()),void 0):null;W==0&&J&&(W=Vj(bb(J)));W!==0&&this.ZH(W);Cso(this,this.IB,this.IB);this.player.UJ(6)}; g.u.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.t1();this.jd=this.xU;g.tE(this.sQ,this.vN);this.vN=this.B$=this.sQ=null;g.N9.prototype.unload.call(this);this.player.UJ(5);tv(this)}; g.u.lO=function(){g.pI(this.subscriptions);g.N9.prototype.lO.call(this)}; g.u.Jo=function(W){var J=g.EH.apply(1,arguments);this.loaded&&this.sQ.MY.apply(this.sQ,[W].concat(g.w(J)))}; g.u.getAdState=function(){return this.VX}; g.u.Wh=function(){return this.vN?bb(this.vN).Wh:!1}; g.u.Yg=function(){return this.vN?bb(this.vN).Yg:!1}; g.u.ZH=function(W,J){this.ra=W||0;this.player.publish("progresssync",W,J);this.player.z$("onVideoProgress",W||0)}; g.u.getCurrentTime=function(){return this.ra}; g.u.getProgressState=function(){var W=bb(this.vN),J=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!W.Fa()&&this.player.Cc(),clipEnd:J.clipEnd,clipStart:J.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:W.getDuration(),ingestionTime:W.K?W.G+TH(W):W.G,isAtLiveHead:(W.K?W.W+TH(W):W.W)-this.getCurrentTime()<=1,loaded:W.N,seekableEnd:W.K?W.W+TH(W):W.W,seekableStart:W.T>0?W.T+TH(W):W.T,offset:0,viewerLivestreamJoinMediaTime:0}}; g.u.nextVideo=function(){this.vN&&this.vN.nextVideo()}; g.u.OD=function(){this.vN&&this.vN.OD()}; g.u.Bl0=function(W){W===1&&(this.Wf=this.vN?bb(this.vN):null)}; g.u.aVg=function(){var W=fur()?new Rj(g.E(qa()),void 0):null;if(W){var J=this.jd;this.loaded&&this.unload();this.vN=W;this.Wf=null;J.key!==this.xU.key&&(this.jd=J,this.load())}else g.hE(this.vN),this.vN=null,this.loaded&&(this.unload(),(W=this.Wf)&&W.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(W.videoId,Vj(W)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.u.lr=function(){var W=[this.xU],J=W.concat,K=nb0();GH()&&g.V0("yt-remote-cast-available")&&K.push({key:"cast-selector-receiver",name:"Cast..."});this.Hi=J.call(W,K);W=D_$()||this.xU;FM(this,W);this.player.z$("onMdxReceiversChange")}; g.u.vms=function(){var W=g.E(D_$());FM(this,W)}; g.u.MPI=function(){this.jd=g.E(D_$())}; g.u.kvg=function(){this.ih=!0;tv(this);nA=!1;SY&&lq(SY,1);SY=null}; g.u.pt3=function(){this.ih=!1;tv(this);FM(this,this.xU);this.jd=this.xU;nA=!1;SY=null;this.player.playVideo()}; g.u.CQ=function(W,J){switch(W){case "casting":return this.loaded;case "receivers":return this.Hi;case "currentReceiver":return J&&(J.key==="cast-selector-receiver"?gLR():FM(this,J)),this.loaded?this.jd:this.xU;case "quickCast":return this.Hi.length===2&&this.Hi[1].key==="cast-selector-receiver"?(J&&gLR(),!0):!1}}; g.u.rX=function(){this.vN.rX()}; g.u.p_=function(){return!1}; g.u.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.u.isLoggedIn=function(){var W,J;return((W=g.Yf("PLAYER_CONFIG"))==null?void 0:(J=W.args)==null?void 0:J.authuser)!==void 0?!0:!(!g.Yf("SESSION_INDEX")&&!g.Yf("LOGGED_IN"))};g.uV("remote",Qh$);})(_yt_player);