(function(g){var window=this;'use strict';var jom=function(y){if(y instanceof g.Rz)return y;if(typeof y.CX=="function")return y.CX(!1);if(g.ve(y)){var q=0,Q=new g.Rz;Q.next=function(){for(;;){if(q>=y.length)return g.Om;if(q in y)return g.sp(y[q++]);q++}}; return Q}throw Error("Not implemented");},Qo_=function(y,q,Q){if(g.ve(y))g.mS(y,q,Q); else for(y=jom(y);;){var p=y.next();if(p.done)break;q.call(Q,p.value,void 0,y)}},yx=function(y){g.hA(y,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.fh()).toString(36)); return y},qi=function(y,q,Q){Array.isArray(Q)||(Q=[String(Q)]); g.zbg(y.Y,q,Q)},pFm=function(y,q){var Q=[]; Qo_(q,function(p){try{var v=g.Df.prototype.dO.call(this,p,!0)}catch(d){if(d=="Storage: Invalid value was encountered")return;throw d;}v===void 0?Q.push(p):g.y9S(v)&&Q.push(p)},y); return Q},vQn=function(y,q){pFm(y,q).forEach(function(Q){g.Df.prototype.remove.call(this,Q)},y)},d7G=function(y){if(y.Kg){if(y.Kg.locationOverrideToken)return{locationOverrideToken:y.Kg.locationOverrideToken}; if(y.Kg.latitudeE7!=null&&y.Kg.longitudeE7!=null)return{latitudeE7:y.Kg.latitudeE7,longitudeE7:y.Kg.longitudeE7}}return null},T_n=function(y,q){g.Eu(y,q)||y.push(q)},Vsn=function(y){var q=0,Q; for(Q in y)q++;return q},O9_=function(y,q){return g.YG(y,q)},wFe=function(y){try{return g.CS.JSON.parse(y)}catch(q){}y=String(y); if(/^\s*$/.test(y)?0:/^[\],:{}\s\u2028\u2029]*$/.test(y.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("("+y+")")}catch(q){}throw Error("Invalid JSON string: "+y);},j1=function(y){if(g.CS.JSON)try{return g.CS.JSON.parse(y)}catch(q){}return wFe(y)},JMq=function(){var y=Qx(); this.K=y;y.Ov("/client_streamz/youtube/living_room/mdx/channel/opened",g.ON("channel_type"))},FU_=function(){var y=Qx(); this.K=y;y.Ov("/client_streamz/youtube/living_room/mdx/channel/closed",g.ON("channel_type"))},Yxk=function(){var y=Qx(); this.K=y;y.Ov("/client_streamz/youtube/living_room/mdx/channel/message_received",g.ON("channel_type"))},f1S=function(){var y=Qx(); this.K=y;y.Ov("/client_streamz/youtube/living_room/mdx/channel/success")},hfn=function(){var y=Qx(); this.K=y;y.Ov("/client_streamz/youtube/living_room/mdx/channel/error",g.ON("channel_type"),g.ON("error_type"))},b9q=function(){var y=Qx(); this.K=y;y.Ov("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},$7w=function(){var y=Qx(); this.K=y;y.Ov("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},KUn=function(y,q,Q,p){var v=new g.To(null); y&&g.V3(v,y);q&&g.Oa(v,q);Q&&g.wP(v,Q);p&&(v.W=p);return v},x7h=function(y,q){return new g.dl(y,q)},pJ=function(y,q){return Object.prototype.hasOwnProperty.call(y,q)},WUe=function(y,q){return y===q},vL=function(y,q){this.W={}; this.K=[];this.WD=this.size=0;var Q=arguments.length;if(Q>1){if(Q%2)throw Error("Uneven number of arguments");for(var p=0;p5&&(y=y.slice(y.length-5)); var q=g.W5(vJn(),function(p){return p.loungeToken}),Q=g.W5(y,function(p){return p.loungeToken}); g.Zn(Q,function(p){return!g.Eu(q,p)})&&dxw(); g.DW("yt-remote-local-screens",y,31536E3)},fJ=function(y){y||(g.Ie("yt-remote-session-screen-id"),g.Ie("yt-remote-session-video-id")); Qew();y=Fd();g.Lh(y,YH());qM_(y)},Veu=function(){if(!hC){var y=g.U$(); y&&(hC=new g.MM(y))}},O_k=function(){Veu(); return hC?!!hC.get("yt-remote-use-staging-server"):!1},bf=function(y,q){g.qB[y]=!0; var Q=g.C0();Q&&Q.publish.apply(Q,arguments);g.qB[y]=!1},wnq=function(){},Qx=function(){if(!$H){$H=new g.A9(new wnq); var y=g.L9("client_streamz_web_flush_count",-1);y!==-1&&($H.N=y)}return $H},Jpm=function(){var y=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return y?parseInt(y[1],10):0},FFw=function(y){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+y)!=-1||document.currentScript.src.indexOf("&"+y)!=-1)},YMG=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},KJ=function(y){y.length?fW_(y.shift(),function(){KJ(y)}):hIG()},b_n=function(y){return"chrome-extension://"+y+"/cast_sender.js"},fW_=function(y,q,Q){var p=document.createElement("script"); p.onerror=q;Q&&(p.onload=Q);g.tK(p,g.HA(y));(document.head||document.documentElement).appendChild(p)},$xc=function(){var y=Jpm(),q=[]; if(y>1){var Q=y-1;q.push("//www.gstatic.com/eureka/clank/"+y+"/cast_sender.js");q.push("//www.gstatic.com/eureka/clank/"+Q+"/cast_sender.js")}return q},hIG=function(){var y=YMG(); y&&y(!1,"No cast extension found")},xx_=function(){if(KFk){var y=2,q=YMG(),Q=function(){y--; y==0&&q&&q(!0)}; window.__onGCastApiAvailable=Q;fW_("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",hIG,Q)}},WFS=function(){xx_(); var y=$xc();y.push("//www.gstatic.com/eureka/clank/cast_sender.js");KJ(y)},tee=function(){xx_(); var y=$xc();y.push.apply(y,g.hH(Z_n.map(b_n)));y.push("//www.gstatic.com/eureka/clank/cast_sender.js");KJ(y)},xH=function(y,q,Q){g.I.call(this); this.G=Q!=null?(0,g.wk)(y,Q):y;this.Of=q;this.J=(0,g.wk)(this.Bf,this);this.K=!1;this.W=0;this.N=this.AU=null;this.Y=[]},WL=function(){},EJ_=function(){g.XG.call(this,"p")},kHk=function(){g.XG.call(this,"o")},aWk=function(){return LFw=LFw||new g.Ky},Nfm=function(y){g.XG.call(this,"serverreachability",y)},Zx=function(y){var q=aWk(); q.dispatchEvent(new Nfm(q,y))},SMS=function(y){g.XG.call(this,"statevent",y)},tC=function(y){var q=aWk(); q.dispatchEvent(new SMS(q,y))},H_m=function(y,q,Q,p){g.XG.call(this,"timingevent",y); this.size=q;this.rtt=Q;this.retries=p},Ec=function(y,q){if(typeof y!=="function")throw Error("Fn must not be null and must be a function"); return g.CS.setTimeout(function(){y()},q)},kH=function(){},LJ=function(y,q,Q,p){this.N=y; this.Y=q;this.XL=Q;this.hw=p||1;this.q$=new g.WH(this);this.Dw=45E3;this.vI=null;this.G=!1;this.j=this.Ty=this.C=this.LK=this.m3=this.Os=this.cI=null;this.N$=[];this.K=null;this.X=0;this.J=this.Sj=null;this.cB=-1;this.Es=!1;this.BI=0;this.HI=null;this.Se=this.Vm=this.RH=this.gp=!1;this.W=new RI_},RI_=function(){this.W=null; this.K="";this.N=!1},Mem=function(y,q,Q){y.LK=1; y.C=yx(q.clone());y.j=Q;y.gp=!0;seC(y,null)},seC=function(y,q){y.m3=Date.now(); aP(y);y.Ty=y.C.clone();qi(y.Ty,"t",y.hw);y.X=0;var Q=y.N.Vm;y.W=new RI_;y.K=lWh(y.N,Q?q:null,!y.j);y.BI>0&&(y.HI=new g.pU((0,g.wk)(y.Z9,y,y.K),y.BI));y.q$.listen(y.K,"readystatechange",y.zl);q=y.vI?g.KM(y.vI):{};y.j?(y.Sj||(y.Sj="POST"),q["Content-Type"]="application/x-www-form-urlencoded",y.K.send(y.Ty,y.Sj,y.j,q)):(y.Sj="GET",y.K.send(y.Ty,y.Sj,null,q));Zx(1)},DxS=function(y){if(!zIw(y))return g.qv(y.K); var q=g.jT(y.K);if(q==="")return"";var Q="",p=q.length,v=g.Cy(y.K)==4;if(!y.W.W){if(typeof TextDecoder==="undefined")return Ni(y),S1(y),"";y.W.W=new g.CS.TextDecoder}for(var d=0;dq.length)return uWk;q=q.slice(p,p+Q);y.X=p+Q;return q},aP=function(y){y.Os=Date.now()+y.Dw; gJC(y,y.Dw)},gJC=function(y,q){if(y.cI!=null)throw Error("WatchDog timer not null"); y.cI=Ec((0,g.wk)(y.Hf,y),q)},cph=function(y){y.cI&&(g.CS.clearTimeout(y.cI),y.cI=null)},S1=function(y){y.N.Pt()||y.Es||Ux_(y.N,y)},Ni=function(y){cph(y); g.w5(y.HI);y.HI=null;y.q$.removeAll();if(y.K){var q=y.K;y.K=null;q.abort();q.dispose()}},i_X=function(y,q){try{var Q=y.N; if(Q.P3!=0&&(Q.K==y||rph(Q.W,y)))if(!y.Vm&&rph(Q.W,y)&&Q.P3==3){try{var p=Q.cn.K.parse(q)}catch(k){p=null}if(Array.isArray(p)&&p.length==3){var v=p;if(v[0]==0)a:{if(!Q.C){if(Q.K)if(Q.K.m3+3E30&&(Q.BI=1.5*w);p=Q;var J=y.cU();if(J){var F=g.Qn(J,"X-Client-Wire-Protocol");if(F){var Y=p.W;!Y.K&&(g.D0(F,"spdy")||g.D0(F,"quic")||g.D0(F,"h2"))&&(Y.Y=Y.J,Y.K=new Set,Y.W&&(eIh(Y,Y.W),Y.W=null))}if(p.gp){var f=g.Qn(J,"X-HTTP-Session-Id");f&&(p.zf=f,g.hA(p.vI,p.gp,f))}}Q.P3=3;Q.J&&Q.J.zF();Q.Mz&&(Q.F0=Date.now()-y.m3);p=Q;var h=y;p.BT=Bfq(p,p.Vm?p.XL:null,p.T8); if(h.Vm){GHh(p.W,h);var b=h,Z=p.BI;Z&&b.setTimeout(Z);b.cI&&(cph(b),aP(b));p.K=h}else PwG(p);Q.N.length>0&&Mi(Q)}else d[0]!="stop"&&d[0]!="close"||sc(Q,7);else Q.P3==3&&(d[0]=="stop"||d[0]=="close"?d[0]=="stop"?sc(Q,7):Q.disconnect():d[0]!="noop"&&Q.J&&Q.J.HN(d),Q.N$=0)}Zx(4)}catch(k){}},Xnn=function(y,q){this.K=y; this.map=q;this.context=null},mx_=function(y){this.J=y||10; g.CS.PerformanceNavigationTiming?(y=g.CS.performance.getEntriesByType("navigation"),y=y.length>0&&(y[0].nextHopProtocol=="hq"||y[0].nextHopProtocol=="h2")):y=!!(g.CS.chrome&&g.CS.chrome.loadTimes&&g.CS.chrome.loadTimes()&&g.CS.chrome.loadTimes().wasFetchedViaSpdy);this.Y=y?this.J:1;this.K=null;this.Y>1&&(this.K=new Set);this.W=null;this.N=[]},Cwm=function(y){return y.W?!0:y.K?y.K.size>=y.Y:!1},Ap_=function(y){return y.W?1:y.K?y.K.size:0},rph=function(y,q){return y.W?y.W==q:y.K?y.K.has(q):!1},eIh= function(y,q){y.K?y.K.add(q):y.W=q},GHh=function(y,q){y.W&&y.W==q?y.W=null:y.K&&y.K.has(q)&&y.K.delete(q)},y_k=function(y){if(y.W!=null)return y.N.concat(y.W.N$); if(y.K!=null&&y.K.size!==0){var q=y.N;y=g.t(y.K.values());for(var Q=y.next();!Q.done;Q=y.next())q=q.concat(Q.value.N$);return q}return g.zX(y.N)},qfS=function(y,q){var Q=new kH; if(g.CS.Image){var p=new Image;p.onload=g.Yq(lf,Q,"TestLoadImage: loaded",!0,q,p);p.onerror=g.Yq(lf,Q,"TestLoadImage: error",!1,q,p);p.onabort=g.Yq(lf,Q,"TestLoadImage: abort",!1,q,p);p.ontimeout=g.Yq(lf,Q,"TestLoadImage: timeout",!1,q,p);g.CS.setTimeout(function(){if(p.ontimeout)p.ontimeout()},1E4); p.src=y}else q(!1)},jkc=function(y,q){var Q=new kH,p=new AbortController,v=setTimeout(function(){p.abort(); lf(Q,"TestPingServer: timeout",!1,q)},1E4); fetch(y,{signal:p.signal}).then(function(d){clearTimeout(v);d.ok?lf(Q,"TestPingServer: ok",!0,q):lf(Q,"TestPingServer: server error",!1,q)}).catch(function(){clearTimeout(v); lf(Q,"TestPingServer: error",!1,q)})},lf=function(y,q,Q,p,v){try{v&&(v.onload=null,v.onerror=null,v.onabort=null,v.ontimeout=null),p(Q)}catch(d){}},QkX=function(){this.K=new WL},zY=function(y,q,Q){return Q&&Q.qk?Q.qk[y]||q:q},p9G=function(y){this.N=[]; this.XL=this.BT=this.vI=this.T8=this.K=this.zf=this.gp=this.Es=this.X=this.RH=this.j=null;this.oo=this.Ty=0;this.b9=zY("failFast",!1,y);this.HI=this.cI=this.C=this.G=this.J=null;this.Aw=!0;this.Kg=this.LK=-1;this.hw=this.N$=this.m3=0;this.eB=zY("baseRetryDelayMs",5E3,y);this.t1=zY("retryDelaySeedMs",1E4,y);this.Bn=zY("forwardChannelMaxRetries",2,y);this.I7=zY("forwardChannelRequestTimeoutMs",2E4,y);this.ra=y&&y.QUI||void 0;this.zI=y&&y.rgj||void 0;this.Wn=y&&y.vUw||!1;this.BI=void 0;this.Vm=y&&y.fnm|| !1;this.Y="";this.W=new mx_(y&&y.PSf);this.cn=new QkX;this.q$=y&&y.L_$||!1;this.Os=y&&y.e1b||!1;this.q$&&this.Os&&(this.Os=!1);this.Hn=y&&y.DrI||!1;y&&y.VdK&&(this.Aw=!1);this.Mz=!this.q$&&this.Aw&&y&&y.W_b||!1;this.EW=void 0;y&&y.jr&&y.jr>0&&(this.EW=y.jr);this.cB=void 0;this.F0=0;this.Dw=!1;this.Se=this.Sj=null},RP=function(y){y.K&&(vCS(y),y.K.cancel(),y.K=null)},dbS=function(y){RP(y); y.C&&(g.CS.clearTimeout(y.C),y.C=null);HL(y);y.W.cancel();y.G&&(typeof y.G==="number"&&g.CS.clearTimeout(y.G),y.G=null)},Mi=function(y){Cwm(y.W)||y.G||(y.G=!0,g.MN(y.BN,y),y.m3=0)},VKk=function(y,q){if(Ap_(y.W)>=y.W.Y-(y.G?1:0))return!1; if(y.G)return y.N=q.N$.concat(y.N),!0;if(y.P3==1||y.P3==2||y.m3>=(y.b9?0:y.Bn))return!1;y.G=Ec((0,g.wk)(y.BN,y,q),TUm(y,y.m3));y.m3++;return!0},w9_=function(y,q){var Q; q?Q=q.XL:Q=y.Ty++;var p=y.vI.clone();g.hA(p,"SID",y.Y);g.hA(p,"RID",Q);g.hA(p,"AID",y.LK);Dx(y,p);y.X&&y.j&&g.x0(p,y.X,y.j);Q=new LJ(y,y.Y,Q,y.m3+1);y.X===null&&(Q.vI=y.j);q&&(y.N=q.N$.concat(y.N));q=OdC(y,Q,1E3);Q.setTimeout(Math.round(y.I7*.5)+Math.round(y.I7*.5*Math.random()));eIh(y.W,Q);Mem(Q,p,q)},Dx=function(y,q){y.Es&&g.qO(y.Es,function(Q,p){g.hA(q,p,Q)}); y.J&&g.qO({},function(Q,p){g.hA(q,p,Q)})},OdC=function(y,q,Q){Q=Math.min(y.N.length,Q); var p=y.J?(0,g.wk)(y.J.Ae,y.J,y):null;a:{for(var v=y.N,d=-1;;){var T=["count="+Q];d==-1?Q>0?(d=v[0].K,T.push("ofs="+d)):d=0:T.push("ofs="+d);for(var O=!0,w=0;w=3)return!1; y.hw++;y.C=Ec((0,g.wk)(y.b$,y),TUm(y,y.N$));y.N$++;return!0},vCS=function(y){y.Sj!=null&&(g.CS.clearTimeout(y.Sj),y.Sj=null)},J_q=function(y){y.K=new LJ(y,y.Y,"rpc",y.hw); y.X===null&&(y.K.vI=y.j);y.K.BI=0;var q=y.BT.clone();g.hA(q,"RID","rpc");g.hA(q,"SID",y.Y);g.hA(q,"AID",y.LK);g.hA(q,"CI",y.HI?"0":"1");!y.HI&&y.EW&&g.hA(q,"TO",y.EW);g.hA(q,"TYPE","xmlhttp");Dx(y,q);y.X&&y.j&&g.x0(q,y.X,y.j);y.BI&&y.K.setTimeout(y.BI);var Q=y.K;y=y.XL;Q.LK=1;Q.C=yx(q.clone());Q.j=null;Q.gp=!0;seC(Q,y)},HL=function(y){y.cI!=null&&(g.CS.clearTimeout(y.cI),y.cI=null)},Ux_=function(y,q){var Q=null; if(y.K==q){HL(y);vCS(y);y.K=null;var p=2}else if(rph(y.W,q))Q=q.N$,GHh(y.W,q),p=1;else return;if(y.P3!=0)if(q.G)if(p==1){Q=q.j?q.j.length:0;q=Date.now()-q.m3;var v=y.m3;p=aWk();p.dispatchEvent(new H_m(p,Q,q,v));Mi(y)}else PwG(y);else{var d=q.cB;v=q.getLastError();if(v==3||v==0&&d>0||!(p==1&&VKk(y,q)||p==2&&oJm(y)))switch(Q&&Q.length>0&&(q=y.W,q.N=q.N.concat(Q)),v){case 1:sc(y,5);break;case 4:sc(y,10);break;case 3:sc(y,6);break;default:sc(y,2)}}},TUm=function(y,q){var Q=y.eB+Math.floor(Math.random()* y.t1); y.isActive()||(Q*=2);return Q*q},sc=function(y,q){if(q==2){var Q=(0,g.wk)(y.FTK,y),p=y.zI,v=!p; p=new g.To(p||"//www.google.com/images/cleardot.gif");g.CS.location&&g.CS.location.protocol=="http"||g.V3(p,"https");yx(p);v?qfS(p.toString(),Q):jkc(p.toString(),Q)}else tC(2);y.P3=0;y.J&&y.J.tQ(q);FGG(y);dbS(y)},FGG=function(y){y.P3=0; y.Se=[];if(y.J){var q=y_k(y.W);if(q.length!=0||y.N.length!=0)g.nh(y.Se,q),g.nh(y.Se,y.N),y.W.N.length=0,g.zX(y.N),y.N.length=0;y.J.kt()}},Yfm=function(y){if(y.P3==0)return y.Se; var q=[];g.nh(q,y_k(y.W));g.nh(q,y.N);return q},Bfq=function(y,q,Q){var p=g.b6(Q); p.K!=""?(q&&g.Oa(p,q+"."+p.K),g.wP(p,p.N)):(p=g.CS.location,p=KUn(p.protocol,q?q+"."+p.hostname:p.hostname,+p.port,Q));q=y.gp;Q=y.zf;q&&Q&&g.hA(p,q,Q);g.hA(p,"VER",y.hQ);Dx(y,p);return p},lWh=function(y,q,Q){if(q&&!y.Vm)throw Error("Can't create secondary domain capable XhrIo object."); q=y.Wn&&!y.ra?new g.iu(new g.Q3({dH:Q})):new g.iu(y.ra);q.X=y.Vm;return q},fGS=function(){},hgS=function(){},IP=function(y,q){g.Ky.call(this); this.K=new p9G(q);this.J=y;this.W=q&&q.nfB||null;y=q&&q.d$3||null;q&&q.OPf&&(y?y["X-Client-Protocol"]="webchannel":y={"X-Client-Protocol":"webchannel"});this.K.j=y;y=q&&q.nlw||null;q&&q.YY&&(y?y["X-WebChannel-Content-Type"]=q.YY:y={"X-WebChannel-Content-Type":q.YY});q&&q.NV&&(y?y["X-WebChannel-Client-Profile"]=q.NV:y={"X-WebChannel-Client-Profile":q.NV});this.K.RH=y;(y=q&&q.dEf)&&!g.zu(y)&&(this.K.X=y);this.G=q&&q.fnm||!1;this.Y=q&&q.lVs||!1;(q=q&&q.dT)&&!g.zu(q)&&(this.K.gp=q,g.F2(this.W,q)&&(y= this.W,q in y&&delete y[q]));this.N=new uf(this)},bd_=function(y){EJ_.call(this); y.__headers__&&(this.headers=y.__headers__,this.statusCode=y.__status__,delete y.__headers__,delete y.__status__);var q=y.__sm__;q?this.data=(this.K=g.Tu(q))?g.bo(q,this.K):q:this.data=y},$be=function(y){kHk.call(this); this.status=1;this.errorCode=y},uf=function(y){this.K=y},KGh=function(y,q){this.W=y; this.K=q},xb_=function(y){return Yfm(y.K).map(function(q){var Q=y.W; q=q.map;"__data__"in q?(q=q.__data__,Q=Q.Y?wFe(q):q):Q=q;return Q})},nJ=function(y,q){if(typeof y!=="function")throw Error("Fn must not be null and must be a function"); return g.CS.setTimeout(function(){y()},q)},cL=function(y){g$.dispatchEvent(new WGm(g$,y))},WGm=function(y){g.XG.call(this,"statevent",y)},Uc=function(y,q,Q,p){this.K=y; this.Y=q;this.X=Q;this.G=p||1;this.W=45E3;this.N=new g.WH(this);this.J=new g.Un;this.J.setInterval(250)},tK_=function(y,q,Q){y.En=1; y.x$=yx(q.clone());y.wL=Q;y.gp=!0;Zdk(y,null)},ECG=function(y,q,Q,p,v){y.En=1; y.x$=yx(q.clone());y.wL=null;y.gp=Q;v&&(y.wH=!1);Zdk(y,p)},Zdk=function(y,q){y.bd=Date.now(); k3k(y);y.Un=y.x$.clone();qi(y.Un,"t",y.G);y.Ld=0;y.gi=y.K.Oq(y.K.Bb()?q:null);y.nY>0&&(y.QT=new g.pU((0,g.wk)(y.TF,y,y.gi),y.nY));y.N.listen(y.gi,"readystatechange",y.o3);q=y.aI?g.KM(y.aI):{};y.wL?(y.iR="POST",q["Content-Type"]="application/x-www-form-urlencoded",y.gi.send(y.Un,y.iR,y.wL,q)):(y.iR="GET",y.wH&&!g.FU&&(q.Connection="close"),y.gi.send(y.Un,y.iR,null,q));y.K.kM(1)},NUm=function(y,q){var Q=y.Ld,p=q.indexOf("\n",Q); if(p==-1)return LGC;Q=Number(q.substring(Q,p));if(isNaN(Q))return aGC;p+=1;if(p+Q>q.length)return LGC;q=q.slice(p,p+Q);y.Ld=p+Q;return q},k3k=function(y){y.CY=Date.now()+y.W; Sf_(y,y.W)},Sf_=function(y,q){if(y.Am!=null)throw Error("WatchDog timer not null"); y.Am=nJ((0,g.wk)(y.DH,y),q)},HdG=function(y){y.Am&&(g.CS.clearTimeout(y.Am),y.Am=null)},Rgm=function(y){y.K.Pt()||y.Xk||y.K.jN(y)},r$=function(y){HdG(y); g.w5(y.QT);y.QT=null;y.J.stop();y.N.removeAll();if(y.gi){var q=y.gi;y.gi=null;q.abort();q.dispose()}y.sb&&(y.sb=null)},sku=function(y,q){try{y.K.AQ(y,q),y.K.kM(4)}catch(Q){}},lGu=function(y,q,Q,p,v){if(p==0)Q(!1); else{var d=v||0;p--;MK_(y,q,function(T){T?Q(!0):g.CS.setTimeout(function(){lGu(y,q,Q,p,d)},d)})}},MK_=function(y,q,Q){var p=new Image; p.onload=function(){try{oP(p),Q(!0)}catch(v){}}; p.onerror=function(){try{oP(p),Q(!1)}catch(v){}}; p.onabort=function(){try{oP(p),Q(!1)}catch(v){}}; p.ontimeout=function(){try{oP(p),Q(!1)}catch(v){}}; g.CS.setTimeout(function(){if(p.ontimeout)p.ontimeout()},q); p.src=y},oP=function(y){y.onload=null; y.onerror=null;y.onabort=null;y.ontimeout=null},zgq=function(y){this.K=y; this.W=new WL},Db_=function(y){var q=AC(y.K,y.Vw,"/mail/images/cleardot.gif"); yx(q);lGu(q.toString(),5E3,(0,g.wk)(y.P2,y),3,2E3);y.kM(1)},uyw=function(y){var q=y.K.G; q!=null?(cL(5),q?(cL(11),e1(y.K,y,!1)):(cL(12),e1(y.K,y,!0))):(y.PC=new Uc(y),y.PC.aI=y.Pw,q=y.K,q=AC(q,q.Bb()?y.G6:null,y.qP),cL(5),qi(q,"TYPE","xmlhttp"),ECG(y.PC,q,!1,y.G6,!1))},IGu=function(y,q,Q){this.K=1; this.W=[];this.N=[];this.J=new WL;this.j=y||null;this.G=q!=null?q:null;this.C=Q||!1},nCu=function(y,q){this.K=y; this.map=q;this.context=null},gCm=function(y,q,Q,p){g.XG.call(this,"timingevent",y); this.size=q;this.rtt=Q;this.retries=p},c_e=function(y){g.XG.call(this,"serverreachability",y)},r__=function(y){y.lM(1,0); y.VT=AC(y,null,y.Kj);UbS(y)},oCq=function(y){y.P7&&(y.P7.abort(),y.P7=null); y.MK&&(y.MK.cancel(),y.MK=null);y.Da&&(g.CS.clearTimeout(y.Da),y.Da=null);BL(y);y.S0&&(y.S0.cancel(),y.S0=null);y.xl&&(g.CS.clearTimeout(y.xl),y.xl=null)},A_k=function(y,q){if(y.K==0)throw Error("Invalid operation: sending map when state is closed"); y.W.push(new nCu(y.Co++,q));y.K!=2&&y.K!=3||UbS(y)},egC=function(y){var q=0; y.MK&&q++;y.S0&&q++;return q},UbS=function(y){y.S0||y.xl||(y.xl=nJ((0,g.wk)(y.dc,y),0),y.o_=0)},Pv_=function(y,q){if(y.K==1){if(!q){y.Hb=Math.floor(Math.random()*1E5); q=y.Hb++;var Q=new Uc(y,"",q);Q.aI=y.o5;var p=BUk(y),v=y.VT.clone();g.hA(v,"RID",q);g.hA(v,"CVER","1");GY(y,v);tK_(Q,v,p);y.S0=Q;y.K=2}}else y.K==3&&(q?G3n(y,q):y.W.length==0||y.S0||G3n(y))},G3n=function(y,q){if(q)if(y.Sp>6){y.W=y.N.concat(y.W); y.N.length=0;var Q=y.Hb-1;q=BUk(y)}else Q=q.X,q=q.wL;else Q=y.Hb++,q=BUk(y);var p=y.VT.clone();g.hA(p,"SID",y.Y);g.hA(p,"RID",Q);g.hA(p,"AID",y.l2);GY(y,p);Q=new Uc(y,y.Y,Q,y.o_+1);Q.aI=y.o5;Q.setTimeout(1E4+Math.round(1E4*Math.random()));y.S0=Q;tK_(Q,p,q)},GY=function(y,q){y.qK&&(y=y.qK.jy())&&g.qO(y,function(Q,p){g.hA(q,p,Q)})},BUk=function(y){var q=Math.min(y.W.length,1E3),Q=["count="+q]; if(y.Sp>6&&q>0){var p=y.W[0].K;Q.push("ofs="+p)}else p=0;for(var v={},d=0;d=3)return!1; y.X++;y.Da=nJ((0,g.wk)(y.l$,y),X9m(y,y.DZ));y.DZ++;return!0},e1=function(y,q,Q){y.Qu=y.G==null?Q:!y.G; y.W9=q.AT;y.C||r__(y)},BL=function(y){y.gL!=null&&(g.CS.clearTimeout(y.gL),y.gL=null)},X9m=function(y,q){var Q=5E3+Math.floor(Math.random()*1E4); y.isActive()||(Q*=2);return Q*q},PL=function(y,q){if(q==2||q==9){var Q=null; y.qK&&(Q=null);var p=(0,g.wk)(y.Mas,y);Q||(Q=new g.To("//www.google.com/images/cleardot.gif"),yx(Q));MK_(Q.toString(),1E4,p)}else cL(2);CvG(y,q)},CvG=function(y,q){y.K=0; y.qK&&y.qK.Cv(q);yP_(y);oCq(y)},yP_=function(y){y.K=0; y.W9=-1;if(y.qK)if(y.N.length==0&&y.W.length==0)y.qK.WY();else{var q=g.zX(y.N),Q=g.zX(y.W);y.N.length=0;y.W.length=0;y.qK.WY(q,Q)}},AC=function(y,q,Q){var p=g.b6(Q); if(p.K!="")q&&g.Oa(p,q+"."+p.K),g.wP(p,p.N);else{var v=window.location;p=KUn(v.protocol,q?q+"."+v.hostname:v.hostname,+v.port,Q)}y.k$&&g.qO(y.k$,function(d,T){g.hA(p,T,d)}); g.hA(p,"VER",y.Sp);GY(y,p);return p},q9C=function(){},jcm=function(){this.K=[]; this.W=[]},QcX=function(y){g.XG.call(this,"channelMessage"); this.message=y},pV_=function(y){g.XG.call(this,"channelError"); this.error=y},vfh=function(y,q){this.action=y; this.params=q||{}},Xd=function(y,q){g.I.call(this); this.K=new g.y0(this.nys,0,this);g.n(this,this.K);this.Of=5E3;this.W=0;if(typeof y==="function")q&&(y=(0,g.wk)(y,q));else if(y&&typeof y.handleEvent==="function")y=(0,g.wk)(y.handleEvent,y);else throw Error("Invalid listener argument");this.N=y},d3_=function(y,q,Q,p,v,d,T,O,w,J,F,Y,f,h){Q=Q===void 0?!1:Q; p=p===void 0?function(){return""}:p; v=v===void 0?!1:v;d=d===void 0?!1:d;T=T===void 0?!1:T;O=O===void 0?function(){return g.uu({})}:O; w=w===void 0?!1:w;F=F===void 0?!1:F;Y=Y===void 0?!1:Y;f=f===void 0?!1:f;h=h===void 0?!1:h;this.LK=y;this.cI=q;this.G=new g.s$;this.W=new Xd(this.wty,this);this.K=null;this.X=!1;this.j=null;this.m3="";this.N$=this.C=0;this.N=[];this.Se=Q;this.gp=p;this.J=d;this.vI=O;this.Es=J;this.hw=T;this.Sj=null;this.Y=g.uu();this.XL=v;this.RH=w;this.q$=F;this.Os=Y;this.T8=f;this.cB=h;this.BI=new JMq;this.Vm=new FU_;this.Dw=new f1S;this.Ty=new Yxk;this.HI=new hfn;this.Aw=new b9q;this.Mz=new $7w},O0m=function(y, q,Q,p,v){TWq(y); if(y.K){var d=g.XY("ID_TOKEN"),T=y.K.o5||{};d?T["x-youtube-identity-token"]=d:delete T["x-youtube-identity-token"];y.K.o5=T}VB_(y);p?(p.getState()!=3&&egC(p)==0||p.getState(),y.K.connect(q,Q,y.cI,p.Y,p.l2)):v?y.K.connect(q,Q,y.cI,v.sessionId,v.arrayId):y.K.connect(q,Q,y.cI)},Y9S=function(y,q){return y.T8?!0:y.Os?Object.values(wVe).includes(q):y.q$?!Object.values(JP_).includes(q):y.cB?Object.values(FLm).includes(q):!1},b0G=function(y){var q,Q; g.M(function(p){if(p.K==1)return g.kD(p,2),g.R(p,fw_(y),2);g.l8(p);q=y.N;y.N=[];Q=q.length;hjh(y,q,Q);m7(y);return g.zf(p,0)})},hjh=function(y,q,Q){for(var p=0;p0?Q=Object.assign({},Q,q):delete Q.Authorization;y.K.o5=Q}},VB_=function(y){y.Es&&!y.J&&KLe(y,y.Es())},CJ=function(y){this.scheme="https"; this.port=this.domain="";this.K="/api/lounge";this.W=!0;y=y||document.location.href;var q=Number(g.b_(y)[4]||null)||"";q&&(this.port=":"+q);this.domain=g.$b(y)||"";y=g.cK();y.search("MSIE")>=0&&(y=y.match(/MSIE ([\d.]+)/)[1],g.gO(y,"10.0")<0&&(this.W=!1))},y2=function(y,q){var Q=y.K; y.W&&(Q=y.scheme+"://"+y.domain+y.port+y.K);return g.kb(Q+q,{})},x3X=function(y,q){g.Ky.call(this); var Q=this;this.handler=y();this.handler.subscribe("handlerOpened",this.OD,this);this.handler.subscribe("handlerClosed",this.onClosed,this);this.handler.subscribe("handlerError",function(p,v){Q.onError(v)}); this.handler.subscribe("handlerMessage",this.onMessage,this);this.K=q},WLk=function(y,q,Q){var p=this; Q=Q===void 0?function(){return""}:Q; var v=v===void 0?new hgS:v;var d=d===void 0?new g.s$:d;this.pathPrefix=y;this.K=q;this.m3=Q;this.J=d;this.C=null;this.j=this.X=0;this.channel=null;this.G=0;this.N=new Xd(function(){p.N.isActive();var T;((T=p.channel)==null?void 0:Ap_((new KGh(T,T.K)).K.W))===0&&p.connect(p.C,p.X)}); this.Y={};this.W={};this.cI=!1;this.logger=null;this.N$=[];this.Bt=void 0;this.vI=new JMq;this.Sj=new FU_;this.Es=new Yxk;this.gp=new hfn},Z0u=function(y){g.vq(y.channel,"m",function(){y.G=3; y.N.reset();y.C=null;y.X=0;for(var q=g.t(y.N$),Q=q.next();!Q.done;Q=q.next())Q=Q.value,y.channel&&y.channel.send(Q);y.N$=[];y.publish("webChannelOpened");y.vI.DN("WEB_CHANNEL")}); g.vq(y.channel,"n",function(){y.G=0;y.N.isActive()||y.publish("webChannelClosed");var q,Q=(q=y.channel)==null?void 0:xb_(new KGh(q,q.K));Q&&(y.N$=[].concat(g.hH(Q)));y.Sj.DN("WEB_CHANNEL")}); g.vq(y.channel,"p",function(q){var Q=q.data;Q[0]==="gracefulReconnect"?(y.N.start(),y.channel&&y.channel.close()):y.publish("webChannelMessage",new vfh(Q[0],Q[1]));y.Bt=q.statusCode;y.Es.DN("WEB_CHANNEL")}); g.vq(y.channel,"o",function(){y.Bt===401||y.N.start();y.publish("webChannelError");y.gp.DN("WEB_CHANNEL","")})},tBk=function(y){var q=y.m3(); q?y.Y["x-youtube-lounge-xsrf-token"]=q:delete y.Y["x-youtube-lounge-xsrf-token"]},Efu=function(y){g.Ky.call(this); this.K=y();this.K.subscribe("webChannelOpened",this.Pf,this);this.K.subscribe("webChannelClosed",this.onClosed,this);this.K.subscribe("webChannelError",this.onError,this);this.K.subscribe("webChannelMessage",this.onMessage,this)},kUm=function(y,q,Q,p,v){function d(){return new d3_(y2(y,"/bc"),q,!1,Q,p)} Q=Q===void 0?function(){return""}:Q; return g.kQ("enable_mdx_web_channel_desktop")?new Efu(function(){return new WLk(y2(y,"/wc"),q,Q)}):new x3X(d,v)},S9X=function(){var y=LLq; awS();q2.push(y);NWc()},jg=function(y,q){awS(); var Q=H0m(y,String(q));q2.length==0?Rjm(Q):(NWc(),g.mS(q2,function(p){p(Q)}))},Q2=function(y){jg("CP",y)},awS=function(){q2||(q2=g.qw("yt.mdx.remote.debug.handlers_")||[],g.y_("yt.mdx.remote.debug.handlers_",q2))},Rjm=function(y){var q=(pw+1)%50; pw=q;vE[q]=y;de||(de=q==49)},NWc=function(){var y=q2; if(vE[0]){var q=de?pw:-1,Q={};do Q={TM:void 0},q=(q+1)%50,Q.TM=vE[q],g.mS(y,function(p){return function(v){v(p.TM)}}(Q)); while(q!=pw);vE=Array(50);pw=-1;de=!1}},H0m=function(y,q){var Q=(Date.now()-sc_)/1E3; Q.toFixed&&(Q=Q.toFixed(3));var p=[];p.push("[",Q+"s","] ");p.push("[","yt.mdx.remote","] ");p.push(y+": "+q,"\n");return p.join("")},Tk=function(y){g.V6.call(this); this.G=y;this.screens=[]},MBu=function(y,q){var Q=y.get(q.uuid)||y.get(q.id); if(Q)return y=Q.name,Q.id=q.id||Q.id,Q.name=q.name,Q.token=q.token,Q.uuid=q.uuid||Q.uuid,Q.name!=y;y.screens.push(q);return!0},lwe=function(y,q){var Q=y.screens.length!=q.length; y.screens=g.DQ(y.screens,function(d){return!!m7n(q,d)}); for(var p=q.length,v=0;v0&&y.Y0&&WE(y,Q)},function(q){y.J=function(){}; y.BJ(q)})},ObC=function(y){var q={}; q.pairingCode=y.Sj;q.theme=y.LK;O_k()&&(q.env_useStageMdx=1);return g.Ew(q)},waS=function(y){return new Promise(function(q){y.Sj=i9G(); if(y.vI){var Q=new chrome.cast.DialLaunchResponse(!0,ObC(y));q(Q);V$_(y)}else y.cI=function(){g.Z1(y.j);y.cI=function(){}; y.j=NaN;var p=new chrome.cast.DialLaunchResponse(!0,ObC(y));q(p);V$_(y)},y.j=g.xQ(function(){y.cI()},100)})},Fzk=function(y,q,Q){y.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(q)); var p=new Vx(q);return(new Promise(function(v){Jzn(y,p,function(d){d?(y.N$=!0,Ym(y.Y,p),hg(y,p),WE(y,Q)):g.y9(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(q)+" is not online."));v(d)},5)})).then(function(v){return v?new chrome.cast.DialLaunchResponse(!1):waS(y)})},Y4n=function(y,q){var Q=y.C.receiver.label,p=y.W.friendlyName; return(new Promise(function(v){eju(y.Y,Q,q,p,function(d){d&&d.token&&hg(y,d);v(d)},function(d){bA(y,"Failed to get DIAL screen: "+d); v(null)})})).then(function(v){return v&&v.token?new chrome.cast.DialLaunchResponse(!1):waS(y)})},Jzn=function(y,q,Q,p){g.Z1(y.G); y.G=0;GUC(y.Y,q,function(v){v||p<0?Q(v):y.G=g.xQ(function(){Jzn(y,q,Q,p-1)},300)})},WE=function(y,q){y.info("getDialAppInfoWithTimeout_ "+q); xm(y)&&(g.Z1(y.X),y.X=0,q==0?fXq(y):y.X=g.xQ(function(){fXq(y)},q))},fXq=function(y){xm(y)&&y.N.getDialAppInfo(function(q){y.info("getDialAppInfo dialLaunchData: "+JSON.stringify(q)); q=q.extraData||{};var Q=null;if(q.loungeToken){var p;((p=y.K)==null?void 0:p.token)==q.loungeToken&&(Q="staleLoungeToken")}else Q="missingLoungeToken";Q?(y.m3=Q,WE(y,3E4)):(y.N$=!1,y.m3="unknown",m3u(y,q.loungeToken),WE(y,q.loungeTokenRefreshIntervalMs))},function(q){y.info("getDialAppInfo error: "+q); y.m3="noLoungeTokenResponse";WE(y,3E4)})},h$S=function(y){g.Z1(y.G); y.G=0;g.Z1(y.X);y.X=0;y.J();y.J=function(){}; g.Z1(y.j)},Zv=function(y,q){fw.call(this,y,q,"ManualSession"); this.N=g.xQ((0,g.wk)(this.EV,this,null),150)},tg=function(y,q){g.V6.call(this); this.config_=q;this.W=y;this.C=q.appId||"233637DE";this.Y=q.theme||"cl";this.j=q.disableCastApi||!1;this.G=q.forceMirroring||!1;this.K=null;this.X=!1;this.N=[];this.J=(0,g.wk)(this.m4I,this)},bbe=function(y,q){return q?g.ZC(y.N,function(Q){return Oc(q,Q.label)},y):null},Eb=function(y){jg("Controller",y)},LLq=function(y){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(y)},km=function(y){return y.X||!!y.N.length||!!y.K},Lw=function(y,q,Q){q!=y.K&&(g.w5(y.K),(y.K=q)?(Q?y.publish("yt-remote-cast2-receiver-resumed", q.W):y.publish("yt-remote-cast2-receiver-selected",q.W),q.subscribe("sessionScreen",(0,g.wk)(y.Wv,y,q)),q.subscribe("sessionFailed",function(){return $Bm(y,q)}),q.K?y.publish("yt-remote-cast2-session-change",q.K):Q&&y.K.EV(null)):y.publish("yt-remote-cast2-session-change",null))},$Bm=function(y,q){y.K==q&&y.publish("yt-remote-cast2-session-failed")},Kzn=function(y){var q=y.W.q7(),Q=y.K&&y.K.W; y=g.W5(q,function(p){Q&&Oc(p,Q.label)&&(Q=null);var v=p.uuid?p.uuid:p.id,d=bbe(this,p);d?(d.label=v,d.friendlyName=p.name):(d=new chrome.cast.Receiver(v,p.name),d.receiverType=chrome.cast.ReceiverType.CUSTOM);return d},y); Q&&(Q.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(Q=new chrome.cast.Receiver(Q.label,Q.friendlyName),Q.receiverType=chrome.cast.ReceiverType.CUSTOM),y.push(Q));return y},aXn=function(y,q,Q,p){p.disableCastApi?aa("Cannot initialize because disabled by Mdx config."):xBc()?WzX(q,p)&&(Zbc(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?t$X(y,Q):(window.__onGCastApiAvailable=function(v,d){v?t$X(y,Q):(N2("Failed to load cast API: "+d),Eie(!1),Zbc(!1),g.Ie("yt-remote-cast-available"),g.Ie("yt-remote-cast-receiver"), k_m(),Q(!1))},p.loadCastApiSetupScript?g.ww(Lzw):window.navigator.userAgent.indexOf("Android")>=0&&window.navigator.userAgent.indexOf("Chrome/")>=0&&window.navigator.presentation?Jpm()>=60&&WFS():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?hIG():Jpm()>=89?tee():(xx_(),KJ(Z_n.map(b_n))))):aa("Cannot initialize because not running Chrome")},k_m=function(){aa("dispose"); var y=Sg();y&&y.dispose();g.y_("yt.mdx.remote.cloudview.instance_",null);Nw_(!1);g.V8(S4n);S4n.length=0},HE=function(){return!!g.uw("yt-remote-cast-installed")},HbS=function(){var y=g.uw("yt-remote-cast-receiver"); return y?y.friendlyName:null},R$n=function(){aa("clearCurrentReceiver"); g.Ie("yt-remote-cast-receiver")},s$q=function(){return HE()?Sg()?Sg().getCastSession():(N2("getCastSelector: Cast is not initialized."),null):(N2("getCastSelector: Cast API is not installed!"),null)},M$e=function(){HE()?Sg()?Ra()?(aa("Requesting cast selector."),Sg().requestSession()):(aa("Wait for cast API to be ready to request the session."),S4n.push(g.Q8("yt-remote-cast2-api-ready",M$e))):N2("requestCastSelector: Cast is not initialized."):N2("requestCastSelector: Cast API is not installed!")}, sb=function(y,q){Ra()?Sg().setConnectedScreenStatus(y,q):N2("setConnectedScreenStatus called before ready.")},xBc=function(){var y=g.cK().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.NL||y},lXk=function(y,q){Sg().init(y,q)},WzX=function(y,q){var Q=!1; Sg()||(y=new tg(y,q),y.subscribe("yt-remote-cast2-availability-change",function(p){g.DW("yt-remote-cast-available",p);bf("yt-remote-cast2-availability-change",p)}),y.subscribe("yt-remote-cast2-receiver-selected",function(p){aa("onReceiverSelected: "+p.friendlyName); g.DW("yt-remote-cast-receiver",p);bf("yt-remote-cast2-receiver-selected",p)}),y.subscribe("yt-remote-cast2-receiver-resumed",function(p){aa("onReceiverResumed: "+p.friendlyName); g.DW("yt-remote-cast-receiver",p);bf("yt-remote-cast2-receiver-resumed",p)}),y.subscribe("yt-remote-cast2-session-change",function(p){aa("onSessionChange: "+w$(p)); p||g.Ie("yt-remote-cast-receiver");bf("yt-remote-cast2-session-change",p)}),g.y_("yt.mdx.remote.cloudview.instance_",y),Q=!0); aa("cloudview.createSingleton_: "+Q);return Q},Sg=function(){return g.qw("yt.mdx.remote.cloudview.instance_")},t$X=function(y,q){Eie(!0); Zbc(!1);lXk(y,function(Q){Q?(Nw_(!0),g.O4("yt-remote-cast2-api-ready")):(N2("Failed to initialize cast API."),Eie(!1),g.Ie("yt-remote-cast-available"),g.Ie("yt-remote-cast-receiver"),k_m());q(Q)})},aa=function(y){jg("cloudview",y)},N2=function(y){jg("cloudview",y)},Eie=function(y){aa("setCastInstalled_ "+y); g.DW("yt-remote-cast-installed",y)},Ra=function(){return!!g.qw("yt.mdx.remote.cloudview.apiReady_")},Nw_=function(y){aa("setApiReady_ "+y); g.y_("yt.mdx.remote.cloudview.apiReady_",y)},Zbc=function(y){g.y_("yt.mdx.remote.cloudview.initializing_",y)},M2=function(y){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.J=this.G=0;this.trackData=null;this.yI=this.bE=!1;this.C=this.N=this.X=this.W=0;this.K=NaN;this.Y=!1;this.reset(y)},z$S=function(y){y.audioTrackId=null; y.trackData=null;y.playerState=-1;y.bE=!1;y.yI=!1;y.G=0;y.J=g.fh();y.W=0;y.X=0;y.N=0;y.C=0;y.K=NaN;y.Y=!1},lA=function(y){return y.isPlaying()?(g.fh()-y.J)/1E3:0},zk=function(y,q){y.G=q; y.J=g.fh()},Dv=function(y){switch(y.playerState){case 1:case 1081:return(g.fh()-y.J)/1E3+y.G; case -1E3:return 0}return y.G},DBw=function(y){return y.Y?y.X+lA(y):y.X},uA=function(y,q,Q){var p=y.videoId; y.videoId=q;y.index=Q;q!=p&&z$S(y)},usS=function(y){var q={}; q.index=y.index;q.listId=y.listId;q.videoId=y.videoId;q.playerState=y.playerState;q.volume=y.volume;q.muted=y.muted;q.audioTrackId=y.audioTrackId;q.trackData=g.xG(y.trackData);q.hasPrevious=y.bE;q.hasNext=y.yI;q.playerTime=y.G;q.playerTimeAt=y.J;q.seekableStart=y.W;q.seekableEnd=y.X;q.duration=y.N;q.loadedTime=y.C;q.liveIngestionTime=y.K;return q},nw=function(y,q){g.V6.call(this); var Q=this;this.N=0;this.Y=y;this.G=[];this.J=new jcm;this.W=this.K=null;this.j=(0,g.wk)(this.EsI,this);this.X=(0,g.wk)(this.RV,this);this.C=(0,g.wk)(this.UUy,this);this.cI=(0,g.wk)(this.Lej,this);var p=0;y?(p=y.getProxyState(),p!=3&&(y.subscribe("proxyStateChange",this.kT,this),IXC(this))):p=3;p!=0&&(q?this.kT(p):g.xQ(function(){Q.kT(p)},0)); (y=s$q())&&Ia(this,y);this.subscribe("yt-remote-cast2-session-change",this.cI)},ge=function(y){return new M2(y.Y.getPlayerContextData())},IXC=function(y){g.mS("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(q){this.G.push(this.Y.subscribe(q,g.Yq(this.Mbj,q),this))},y)},nih=function(y){g.mS(y.G,function(q){this.Y.unsubscribeByKey(q)},y); y.G.length=0},cE=function(y){return y.getState()==1},Ub=function(y,q){var Q=y.J; Q.K.length+Q.W.length<50&&y.J.enqueue(q)},gih=function(y,q,Q){var p=ge(y); zk(p,Q);p.playerState!=-1E3&&(p.playerState=q);re(y,p)},oa=function(y,q,Q){y.Y.sendMessage(q,Q)},re=function(y,q){nih(y); y.Y.setPlayerContextData(usS(q));IXC(y)},Ia=function(y,q){y.W&&(y.W.removeUpdateListener(y.j),y.W.removeMediaListener(y.X),y.RV(null)); y.W=q;y.W&&(Q2("Setting cast session: "+y.W.sessionId),y.W.addUpdateListener(y.j),y.W.addMediaListener(y.X),y.W.media.length&&y.RV(y.W.media[0]))},czG=function(y){var q=y.K.media,Q=y.K.customData; if(q&&Q){var p=ge(y);q.contentId!=p.videoId&&Q2("Cast changing video to: "+q.contentId);p.videoId=q.contentId;p.playerState=Q.playerState;zk(p,y.K.getEstimatedTime());re(y,p)}else Q2("No cast media video. Ignoring state update.")},Ag=function(y,q,Q){return(0,g.wk)(function(p){this.vt("Failed to "+q+" with cast v2 channel. Error code: "+p.code); p.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.vt("Retrying "+q+" using MDx browser channel."),oa(this,q,Q))},y)},Gk=function(y,q,Q,p){p=p===void 0?!1:p; g.V6.call(this);var v=this;this.G=NaN;this.Sj=!1;this.j=this.C=this.N$=this.m3=NaN;this.cI=[];this.J=this.X=this.Y=this.K=this.W=null;this.vI=y;this.Es=p;this.cI.push(g.ae(window,"beforeunload",function(){v.vE(2)})); this.N=[];this.K=new M2;this.LK=q.id;this.gp=q.idType;this.W=kUm(this.vI,Q,this.RN,this.gp=="shortLived",this.LK);this.W.listen("channelOpened",function(){UBX(v)}); this.W.listen("channelClosed",function(){eg("Channel closed");isNaN(v.G)?fJ(!0):fJ();v.dispose()}); this.W.listen("channelError",function(d){fJ();isNaN(v.Ta())?(d==1&&v.gp=="shortLived"&&v.publish("browserChannelAuthError",d),eg("Channel error: "+d+" without reconnection"),v.dispose()):(v.Sj=!0,eg("Channel error: "+d+" with reconnection in "+v.Ta()+" ms"),BE(v,2))}); this.W.listen("channelMessage",function(d){rzu(v,d)}); this.W.mj(q.token);this.subscribe("remoteQueueChange",function(){var d=v.K.videoId;g.n_()&&g.DW("yt-remote-session-video-id",d)})},oiG=function(y){return g.ZC(y.N,function(q){return q.type=="LOUNGE_SCREEN"})},eg=function(y){jg("conn",y)},BE=function(y,q){y.publish("proxyStateChange",q)},AzS=function(y){y.G=g.xQ(function(){eg("Connecting timeout"); y.vE(1)},2E4)},e$G=function(y){g.Z1(y.G); y.G=NaN},Bwn=function(y){g.Z1(y.m3); y.m3=NaN},PtS=function(y){G_k(y); y.N$=g.xQ(function(){PE(y,"getNowPlaying")},2E4)},G_k=function(y){g.Z1(y.N$); y.N$=NaN},UBX=function(y){eg("Channel opened"); y.Sj&&(y.Sj=!1,Bwn(y),y.m3=g.xQ(function(){eg("Timing out waiting for a screen.");y.vE(1)},15E3))},XaS=function(y,q){var Q=null; if(q){var p=oiG(y);p&&(Q={clientName:p.clientName,deviceMake:p.brand,deviceModel:p.model,osVersion:p.osVersion})}g.y_("yt.mdx.remote.remoteClient_",Q);q&&(e$G(y),Bwn(y));Q=y.W.H1()&&isNaN(y.G);q==Q?q&&(BE(y,1),PE(y,"getSubtitlesTrack")):q?(y.U5()&&y.K.reset(),BE(y,1),PE(y,"getNowPlaying"),ibm(y)):y.vE(1)},mBX=function(y,q){var Q=q.params.videoId; delete q.params.videoId;Q==y.K.videoId&&(g.hn(q.params)?y.K.trackData=null:y.K.trackData=q.params,y.publish("remotePlayerChange"))},Ct_=function(y,q,Q){var p=q.params.videoId||q.params.video_id,v=parseInt(q.params.currentIndex,10); y.K.listId=q.params.listId||y.K.listId;uA(y.K,p,v);y.publish("remoteQueueChange",Q)},q0X=function(y,q){q.params=q.params||{}; Ct_(y,q,"NOW_PLAYING_MAY_CHANGE");y4q(y,q);y.publish("autoplayDismissed")},y4q=function(y,q){var Q=parseInt(q.params.currentTime||q.params.current_time,10); zk(y.K,isNaN(Q)?0:Q);Q=parseInt(q.params.state,10);Q=isNaN(Q)?-1:Q;Q==-1&&y.K.playerState==-1E3&&(Q=-1E3);y.K.playerState=Q;Q=Number(q.params.loadedTime);y.K.C=isNaN(Q)?0:Q;y.K.pL(Number(q.params.duration));Q=y.K;var p=Number(q.params.liveIngestionTime);Q.K=p;Q.Y=isNaN(p)?!1:!0;Q=y.K;p=Number(q.params.seekableStartTime);q=Number(q.params.seekableEndTime);Q.W=isNaN(p)?0:p;Q.X=isNaN(q)?0:q;y.K.playerState==1?PtS(y):G_k(y);y.publish("remotePlayerChange")},jOm=function(y,q){if(y.K.playerState!=-1E3){var Q= 1085; switch(parseInt(q.params.adState,10)){case 1:Q=1081;break;case 2:Q=1084;break;case 0:Q=1083}y.K.playerState=Q;q=parseInt(q.params.currentTime,10);zk(y.K,isNaN(q)?0:q);y.publish("remotePlayerChange")}},QOG=function(y,q){var Q=q.params.muted=="true"; y.K.volume=parseInt(q.params.volume,10);y.K.muted=Q;y.publish("remotePlayerChange")},pW_=function(y,q){y.X=q.params.videoId; y.publish("nowAutoplaying",parseInt(q.params.timeout,10))},vlk=function(y,q){y.X=q.params.videoId||null; y.publish("autoplayUpNext",y.X)},dqh=function(y,q){y.J=q.params.autoplayMode; y.publish("autoplayModeChange",y.J);y.J=="DISABLED"&&y.publish("autoplayDismissed")},Tyu=function(y,q){var Q=q.params.hasNext=="true"; y.K.bE=q.params.hasPrevious=="true";y.K.yI=Q;y.publish("previousNextChange")},rzu=function(y,q){q=q.message; q.params?eg("Received: action="+q.action+", params="+g.Bq(q.params)):eg("Received: action="+q.action+" {}");switch(q.action){case "loungeStatus":q=j1(q.params.devices);y.N=g.W5(q,function(p){return new TY(p)}); q=!!g.ZC(y.N,function(p){return p.type=="LOUNGE_SCREEN"}); XaS(y,q);q=y.r5("mlm");y.publish("multiStateLoopEnabled",q);break;case "loungeScreenDisconnected":g.Mw(y.N,function(p){return p.type=="LOUNGE_SCREEN"}); XaS(y,!1);break;case "remoteConnected":var Q=new TY(j1(q.params.device));g.ZC(y.N,function(p){return p.equals(Q)})||T_n(y.N,Q); break;case "remoteDisconnected":Q=new TY(j1(q.params.device));g.Mw(y.N,function(p){return p.equals(Q)}); break;case "gracefulDisconnect":break;case "playlistModified":Ct_(y,q,"QUEUE_MODIFIED");break;case "nowPlaying":q0X(y,q);break;case "onStateChange":y4q(y,q);break;case "onAdStateChange":jOm(y,q);break;case "onVolumeChanged":QOG(y,q);break;case "onSubtitlesTrackChanged":mBX(y,q);break;case "nowAutoplaying":pW_(y,q);break;case "autoplayDismissed":y.publish("autoplayDismissed");break;case "autoplayUpNext":vlk(y,q);break;case "onAutoplayModeChanged":dqh(y,q);break;case "onHasPreviousNextChanged":Tyu(y, q);break;case "requestAssistedSignIn":y.publish("assistedSignInRequested",q.params.authCode);break;case "onLoopModeChanged":y.publish("loopModeChange",q.params.loopMode);break;default:eg("Unrecognized action: "+q.action)}},ibm=function(y){g.Z1(y.j); y.j=g.xQ(function(){y.vE(1)},864E5)},PE=function(y,q,Q){Q?eg("Sending: action="+q+", params="+g.Bq(Q)):eg("Sending: action="+q); y.W.sendMessage(q,Q)},Vpn=function(y){Tk.call(this,"ScreenServiceProxy"); this.gh=y;this.K=[];this.K.push(this.gh.$_s("screenChange",(0,g.wk)(this.mI,this)));this.K.push(this.gh.$_s("onlineScreenChange",(0,g.wk)(this.ed3,this)))},Y0m=function(y,q){Veu(); if(!hC||!hC.get("yt-remote-disable-remote-module-for-dev")){q=g.XY("MDX_CONFIG")||q;Cbh();Qew();iA||(iA=new CJ(q?q.loungeApiHost:void 0),O_k()&&(iA.K="/api/loungedev"));XN||(XN=g.qw("yt.mdx.remote.deferredProxies_")||[],g.y_("yt.mdx.remote.deferredProxies_",XN));ODG();var Q=mN();if(!Q){var p=new FN(iA,q?q.disableAutomaticScreenCache||!1:!1);g.y_("yt.mdx.remote.screenService_",p);Q=mN();var v={};q&&(v={appId:q.appId,disableDial:q.disableDial,theme:q.theme,loadCastApiSetupScript:q.loadCastApiSetupScript, disableCastApi:q.disableCastApi,enableDialLoungeToken:q.enableDialLoungeToken,enableCastLoungeToken:q.enableCastLoungeToken,forceMirroring:q.forceMirroring});g.y_("yt.mdx.remote.enableConnectWithInitialState_",q?q.enableConnectWithInitialState||!1:!1);aXn(y,p,function(d){d?Cw()&&sb(Cw(),"YouTube TV"):p.subscribe("onlineScreenChange",function(){bf("yt-remote-receiver-availability-change")})},v)}q&&!g.qw("yt.mdx.remote.initialized_")&&(g.y_("yt.mdx.remote.initialized_",!0),yk("Initializing: "+g.Bq(q)), qJ.push(g.Q8("yt-remote-cast2-api-ready",function(){bf("yt-remote-api-ready")})),qJ.push(g.Q8("yt-remote-cast2-availability-change",function(){bf("yt-remote-receiver-availability-change")})),qJ.push(g.Q8("yt-remote-cast2-receiver-selected",function(){jQ(null); bf("yt-remote-auto-connect","cast-selector-receiver")})),qJ.push(g.Q8("yt-remote-cast2-receiver-resumed",function(){bf("yt-remote-receiver-resumed","cast-selector-receiver")})),qJ.push(g.Q8("yt-remote-cast2-session-change",wW_)),qJ.push(g.Q8("yt-remote-connection-change",function(d){d?sb(Cw(),"YouTube TV"):Qk()||(sb(null,null),R$n())})),qJ.push(g.Q8("yt-remote-cast2-session-failed",function(){bf("yt-remote-connection-failed")})),y=J4k(),q.isAuto&&(y.id+="#dial"),v=q.capabilities||[],v.length>0&&(y.capabilities= v),y.name=q.device,y.app=q.app,(q=q.theme)&&(y.theme=q),yk(" -- with channel params: "+g.Bq(y)),y?(g.DW("yt-remote-session-app",y.app),g.DW("yt-remote-session-name",y.name)):(g.Ie("yt-remote-session-app"),g.Ie("yt-remote-session-name")),g.y_("yt.mdx.remote.channelParams_",y),Q.start(),Cw()||F3X())}},fhe=function(){var y=mN().gh.$_gos(); var q=p2();q&&vC()&&(m7n(y,q)||y.push(q));return XFh(y)},bDn=function(){var y=h7q(); !y&&HE()&&HbS()&&(y={key:"cast-selector-receiver",name:HbS()});return y},h7q=function(){var y=fhe(),q=p2(); q||(q=Qk());return g.ZC(y,function(Q){return q&&Oc(q,Q.key)?!0:!1})},p2=function(){var y=Cw(); if(!y)return null;var q=mN().SA();return JC(q,y)},wW_=function(y){yk("remote.onCastSessionChange_: "+w$(y)); if(y){var q=p2();if(q&&q.id==y.id){if(sb(q.id,"YouTube TV"),y.idType=="shortLived"&&(y=y.token))dv&&(dv.token=y),(q=vC())&&q.mj(y)}else q&&Tv(),Vk(y,1)}else vC()&&Tv()},Tv=function(){Ra()?Sg().stopSession():N2("stopSession called before API ready."); var y=vC();y&&(y.disconnect(1),$qm(null))},K3m=function(){var y=vC(); return!!y&&y.getProxyState()!=3},yk=function(y){jg("remote",y)},mN=function(){if(!xqm){var y=g.qw("yt.mdx.remote.screenService_"); xqm=y?new Vpn(y):null}return xqm},Cw=function(){return g.qw("yt.mdx.remote.currentScreenId_")},W3e=function(y){g.y_("yt.mdx.remote.currentScreenId_",y)},ZD_=function(){return g.qw("yt.mdx.remote.connectData_")},jQ=function(y){g.y_("yt.mdx.remote.connectData_",y)},vC=function(){return g.qw("yt.mdx.remote.connection_")},$qm=function(y){var q=vC(); jQ(null);y||W3e("");g.y_("yt.mdx.remote.connection_",y);XN&&(g.mS(XN,function(Q){Q(y)}),XN.length=0); q&&!y?bf("yt-remote-connection-change",!1):!q&&y&&bf("yt-remote-connection-change",!0)},Qk=function(){var y=g.n_(); if(!y)return null;var q=mN();if(!q)return null;q=q.SA();return JC(q,y)},Vk=function(y,q){Cw(); p2()&&p2();if(Oz)dv=y;else{W3e(y.id);var Q=g.qw("yt.mdx.remote.enableConnectWithInitialState_")||!1;y=new Gk(iA,y,J4k(),Q);y.connect(q,ZD_());y.subscribe("beforeDisconnect",function(p){bf("yt-remote-before-disconnect",p)}); y.subscribe("beforeDispose",function(){vC()&&(vC(),$qm(null))}); y.subscribe("browserChannelAuthError",function(){var p=p2();p&&p.idType=="shortLived"&&(Ra()?Sg().handleBrowserChannelAuthError():N2("refreshLoungeToken called before API ready."))}); $qm(y)}},F3X=function(){var y=Qk(); y?(yk("Resume connection to: "+w$(y)),Vk(y,0)):(fJ(),R$n(),yk("Skipping connecting because no session screen found."))},ODG=function(){var y=J4k(); if(g.hn(y)){y=YH();var q=g.uw("yt-remote-session-name")||"",Q=g.uw("yt-remote-session-app")||"";y={device:"REMOTE_CONTROL",id:y,name:q,app:Q,mdxVersion:3};y.authuser=String(g.XY("SESSION_INDEX","0"));(q=g.XY("DELEGATED_SESSION_ID"))&&(y.pageId=String(q));g.y_("yt.mdx.remote.channelParams_",y)}},J4k=function(){return g.qw("yt.mdx.remote.channelParams_")||{}},kIh=function(y,q,Q){g.I.call(this); var p=this;this.K=y;this.U=q;this.O9=Q;this.events=new g.sU(this);this.J=!1;this.G=new g.nj(64);this.W=new g.y0(this.tB,500,this);this.N=new g.y0(this.HZ,1E3,this);this.C=new xH(this.X33,0,this);this.Y={};this.j=new g.y0(this.ll,1E3,this);this.X=new g.pU(this.seekTo,1E3,this);this.cI=this.events.Z(this.U,"onVolumeChange",function(v){tpX(p,v)}); g.n(this,this.events);this.events.Z(q,"onCaptionsTrackListChanged",this.fG3);this.events.Z(q,"captionschanged",this.vsm);this.events.Z(q,"captionssettingschanged",this.PZ);this.events.Z(q,"videoplayerreset",this.t2);this.events.Z(q,"mdxautoplaycancel",function(){p.O9.xX()}); q.L("enable_mdx_video_play_directly")&&this.events.Z(q,"videodatachange",function(){Elm(p.K)||wv(p)||Je(p,0)}); y=this.O9;y.iB();y.subscribe("proxyStateChange",this.jD,this);y.subscribe("remotePlayerChange",this.m9,this);y.subscribe("remoteQueueChange",this.t2,this);y.subscribe("previousNextChange",this.CB,this);y.subscribe("nowAutoplaying",this.T2,this);y.subscribe("autoplayDismissed",this.LB,this);g.n(this,this.W);g.n(this,this.N);g.n(this,this.C);g.n(this,this.j);g.n(this,this.X);this.PZ();this.t2();this.m9()},tpX=function(y,q){if(wv(y)){y.O9.unsubscribe("remotePlayerChange",y.m9,y); var Q=Math.round(q.volume);q=!!q.muted;var p=ge(y.O9);if(Q!==p.volume||q!==p.muted)y.O9.setVolume(Q,q),y.j.start();y.O9.subscribe("remotePlayerChange",y.m9,y)}},L3G=function(y){y.xj(0); y.W.stop();y.R7(new g.nj(64))},ahq=function(y,q){if(wv(y)&&!y.J){var Q=null; q&&(Q={style:y.U.getSubtitlesUserSettings()},Object.assign(Q,q));y.O9.cj(y.U.getVideoData(1).videoId,Q);y.Y=ge(y.O9).trackData}},Je=function(y,q){var Q=y.U.getPlaylist(); if(Q==null?0:Q.listId){var p=Q.index;var v=Q.listId.toString()}Q=y.U.getVideoData(1);y.O9.playVideo(Q.videoId,q,p,v,Q.playerParams,Q.N$,d7G(Q));y.R7(new g.nj(1))},NyC=function(y,q){if(q){var Q=y.U.getOption("captions","tracklist",{YS:1}); Q&&Q.length?(y.U.setOption("captions","track",q),y.J=!1):(y.U.loadModule("captions"),y.J=!0)}else y.U.setOption("captions","track",{})},wv=function(y){return ge(y.O9).videoId===y.U.getVideoData(1).videoId},S0u=function(y,q){g.eU.call(this,y); this.K=q},Fw=function(){g.r.call(this,{S:"div", V:"ytp-mdx-popup-dialog",B:{role:"dialog"},D:[{S:"div",V:"ytp-mdx-popup-dialog-inner-content",D:[{S:"div",V:"ytp-mdx-popup-title",M$:"Voc\u00ea n\u00e3o fez login"},{S:"div",V:"ytp-mdx-popup-description",M$:"Os v\u00eddeos que voc\u00ea assistir poder\u00e3o ser adicionados ao hist\u00f3rico de visualiza\u00e7\u00e3o da TV e influenciar\u00e3o as recomenda\u00e7\u00f5es dela. Para evitar isso, cancele e fa\u00e7a login no YouTube em um computador."},{S:"div",V:"ytp-mdx-privacy-popup-buttons",D:[{S:"button", rp:["ytp-button","ytp-mdx-privacy-popup-cancel"],M$:"Cancelar"},{S:"button",rp:["ytp-button","ytp-mdx-privacy-popup-confirm"],M$:"Confirmar"}]}]}]});this.fade=new g.vt(this,250);this.cancelButton=this.uB("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.uB("ytp-mdx-privacy-popup-confirm");g.n(this,this.fade);this.Z(this.cancelButton,"click",this.K);this.Z(this.confirmButton,"click",this.W)},Yk=function(y){g.r.call(this,{S:"div", V:"ytp-remote",D:[{S:"div",V:"ytp-remote-display-status",D:[{S:"div",V:"ytp-remote-display-status-icon",D:[g.WFb()]},{S:"div",V:"ytp-remote-display-status-text",M$:"{{statustext}}"}]}]});this.api=y;this.fade=new g.vt(this,250);g.n(this,this.fade);this.Z(y,"presentingplayerstatechange",this.onStateChange);this.hU(y.getPlayerStateObject())},f2=function(y,q){g.Ii.call(this,"Reproduzir em",1,y,q); this.U=y;this.i5={};this.Z(y,"onMdxReceiversChange",this.W);this.Z(y,"presentingplayerstatechange",this.W);this.W()},HDc=function(y){g.LC.call(this,y); this.I2={key:i9G(),name:"Este computador"};this.I5=null;this.subscriptions=[];this.tW=this.O9=null;this.i5=[this.I2];this.qE=this.I2;this.l6=new g.nj(64);this.xS=0;this.Jd=-1;this.Vs=!1;this.sf=this.pM=this.Mb=null;if(!g.Yo(this.player.T())&&!g.Us(this.player.T())){y=this.player;var q=g.c4(y);q&&(q=q.hd())&&(q=new f2(y,q),g.n(this,q));q=new Yk(y);g.n(this,q);g.pq(y,q.element,4);this.Mb=new Fw;g.n(this,this.Mb);g.pq(y,this.Mb.element,4);this.Vs=!!Qk()}},he=function(y){y.pM&&(y.player.removeEventListener("presentingplayerstatechange", y.pM),y.pM=null)},R7m=function(y,q,Q){y.l6=Q; y.player.publish("presentingplayerstatechange",new g.bK(Q,q))},b1=function(y,q){if(q.key!==y.qE.key)if(q.key===y.I2.key)Tv(); else if(Elm(y)&&sO_(y),y.qE=q,!g.Us(y.player.T())){var Q=y.player.getPlaylistId();var p=y.player.getVideoData(1);var v=p.videoId;if(!Q&&!v||(y.player.getAppState()===2||y.player.getAppState()===1)&&y.player.T().L("should_clear_video_data_on_player_cued_unstarted"))p=null;else{var d=y.player.getPlaylist();if(d){var T=[];for(var O=0;O2*this.size&&d$(this),!0):!1}; g.K.get=function(y,q){return pJ(this.W,y)?this.W[y]:q}; g.K.set=function(y,q){pJ(this.W,y)||(this.size+=1,this.K.push(y),this.WD++);this.W[y]=q}; g.K.forEach=function(y,q){for(var Q=this.LH(),p=0;p=p.K.length)return g.Om;var d=p.K[q++];return g.sp(y?d:p.W[d])}; return v}; var kS_={Ni3:"atp",W1K:"ska",Qty:"que",eTV:"mus",fss:"sus",lb3:"dsp",Hm3:"seq",NYf:"mic",WYV:"dpa",wA$:"mlm",fCs:"dsdtr",UXI:"ntb",Dqb:"vsp",yPm:"scn",EeK:"rpe",OVB:"dcn",PHm:"dcp",HLs:"pas",q8b:"drq",pAK:"opf",g9K:"els",e4s:"isg",oeK:"svq",Sr3:"mvp",RNy:"ads",aXb:"stcp",ne3:"sads",jEK:"dloc",R4$:"dcw",MPs:"asw",NSK:"apw",FaK:"wrc",f4f:"pcw",XxK:"ipv"},LUk={TDw:"u",iVf:"cl",kCB:"k",F$B:"i",Az3:"cr",g6j:"m",XC3:"g",sM:"up"},wVe={un:"adPlaying",YR:"onAdStateChange"},JP_={iLB:"nowPlaying",xXb:"onStateChange", un:"adPlaying",YR:"onAdStateChange",M0:"nowPlayingShorts",mq:"onShortsStateChange"},FLm={M0:"nowPlayingShorts",mq:"onShortsStateChange"};TY.prototype.equals=function(y){return y?this.id==y.id:!1}; var jeG="",hC=null;g.x(wnq,g.om);var $H,KFk=FFw("loadCastFramework")||FFw("loadCastApplicationFramework"),Z_n=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.bG(xH,g.I);g.K=xH.prototype;g.K.bM=function(y){this.Y=arguments;this.K=!1;this.AU?this.N=g.fh()+this.Of:this.AU=g.ro(this.J,this.Of)}; g.K.stop=function(){this.AU&&(g.CS.clearTimeout(this.AU),this.AU=null);this.N=null;this.K=!1;this.Y=[]}; g.K.pause=function(){++this.W}; g.K.resume=function(){this.W&&(--this.W,!this.W&&this.K&&(this.K=!1,this.G.apply(null,this.Y)))}; g.K.FV=function(){this.stop();xH.FC.FV.call(this)}; g.K.Bf=function(){this.AU&&(g.CS.clearTimeout(this.AU),this.AU=null);this.N?(this.AU=g.ro(this.J,this.N-g.fh()),this.N=null):this.W?this.K=!0:(this.K=!1,this.G.apply(null,this.Y))};WL.prototype.stringify=function(y){return g.CS.JSON.stringify(y,void 0)}; WL.prototype.parse=function(y){return g.CS.JSON.parse(y,void 0)};g.bG(EJ_,g.XG);g.bG(kHk,g.XG);var LFw=null;g.bG(Nfm,g.XG);g.bG(SMS,g.XG);g.bG(H_m,g.XG);kH.prototype.debug=function(){}; kH.prototype.info=function(){}; kH.prototype.warning=function(){};var IWC={},uWk={};g.K=LJ.prototype;g.K.setTimeout=function(y){this.Dw=y}; g.K.zl=function(y){y=y.target;var q=this.HI;q&&g.Cy(y)==3?q.ZK():this.Z9(y)}; g.K.Z9=function(y){try{if(y==this.K)a:{var q=g.Cy(this.K),Q=this.K.W,p=this.K.getStatus();if(!(q<3)&&(q!=3||this.K&&(this.W.N||g.qv(this.K)||g.jT(this.K)))){this.Es||q!=4||Q==7||(Q==8||p<=0?Zx(3):Zx(2));cph(this);var v=this.K.getStatus();this.cB=v;var d=DxS(this);if(this.G=v==200){if(this.RH&&!this.Vm){b:{if(this.K){var T=g.Qn(this.K,"X-HTTP-Initial-Response");if(T&&!g.zu(T)){var O=T;break b}}O=null}if(y=O)this.Vm=!0,i_X(this,y);else{this.G=!1;this.J=3;tC(12);Ni(this);S1(this);break a}}if(this.gp){y= !0;for(var w;!this.Es&&this.X0&&!this.Se&&(this.Se=!0,this.N.DJ(this)):(Ni(this),S1(this))}else i_X(this,d);q==4&&Ni(this);this.G&&!this.Es&&(q==4?Ux_(this.N,this):(this.G=!1,aP(this)))}else g.hn3(this.K),v==400&&d.indexOf("Unknown SID")> 0?(this.J=3,tC(12)):(this.J=0,tC(13)),Ni(this),S1(this)}}}catch(J){}finally{}}; g.K.cancel=function(){this.Es=!0;Ni(this)}; g.K.Hf=function(){this.cI=null;var y=Date.now();y-this.Os>=0?(this.LK!=2&&(Zx(3),tC(17)),Ni(this),this.J=2,S1(this)):gJC(this,this.Os-y)}; g.K.getLastError=function(){return this.J}; g.K.cU=function(){return this.K};mx_.prototype.cancel=function(){this.N=y_k(this);if(this.W)this.W.cancel(),this.W=null;else if(this.K&&this.K.size!==0){for(var y=g.t(this.K.values()),q=y.next();!q.done;q=y.next())q.value.cancel();this.K.clear()}};g.K=p9G.prototype;g.K.hQ=8;g.K.P3=1;g.K.connect=function(y,q,Q,p){tC(0);this.T8=y;this.Es=q||{};Q&&p!==void 0&&(this.Es.OSID=Q,this.Es.OAID=p);this.HI=this.Aw;this.vI=Bfq(this,null,this.T8);Mi(this)}; g.K.disconnect=function(){dbS(this);if(this.P3==3){var y=this.Ty++,q=this.vI.clone();g.hA(q,"SID",this.Y);g.hA(q,"RID",y);g.hA(q,"TYPE","terminate");Dx(this,q);y=new LJ(this,this.Y,y);y.LK=2;y.C=yx(q.clone());q=!1;if(g.CS.navigator&&g.CS.navigator.sendBeacon)try{q=g.CS.navigator.sendBeacon(y.C.toString(),"")}catch(Q){}!q&&g.CS.Image&&((new Image).src=y.C,q=!0);q||(y.K=lWh(y.N,null),y.K.send(y.C));y.m3=Date.now();aP(y)}FGG(this)}; g.K.Pt=function(){return this.P3==0}; g.K.getState=function(){return this.P3}; g.K.BN=function(y){if(this.G)if(this.G=null,this.P3==1){if(!y){this.Ty=Math.floor(Math.random()*1E5);y=this.Ty++;var q=new LJ(this,"",y),Q=this.j;this.RH&&(Q?(Q=g.KM(Q),g.WK(Q,this.RH)):Q=this.RH);this.X!==null||this.Os||(q.vI=Q,Q=null);var p;if(this.q$)a:{for(var v=p=0;v4096){p=v;break a}if(p===4096||v===this.N.length-1){p=v+1;break a}}p= 1E3}else p=1E3;p=OdC(this,q,p);v=this.vI.clone();g.hA(v,"RID",y);g.hA(v,"CVER",22);this.gp&&g.hA(v,"X-HTTP-Session-Id",this.gp);Dx(this,v);Q&&(this.Os?p="headers="+g.R2(g.Dag(Q))+"&"+p:this.X&&g.x0(v,this.X,Q));eIh(this.W,q);this.Hn&&g.hA(v,"TYPE","init");this.q$?(g.hA(v,"$req",p),g.hA(v,"SID","null"),q.RH=!0,Mem(q,v,null)):Mem(q,v,p);this.P3=2}}else this.P3==3&&(y?w9_(this,y):this.N.length==0||Cwm(this.W)||w9_(this))}; g.K.b$=function(){this.C=null;J_q(this);if(this.Mz&&!(this.Dw||this.K==null||this.F0<=0)){var y=4*this.F0;this.Sj=Ec((0,g.wk)(this.sHV,this),y)}}; g.K.sHV=function(){this.Sj&&(this.Sj=null,this.HI=!1,this.Dw=!0,tC(10),RP(this),J_q(this))}; g.K.DJ=function(y){this.K==y&&this.Mz&&!this.Dw&&(vCS(this),this.Dw=!0,tC(11))}; g.K.Tl=function(){this.cI!=null&&(this.cI=null,RP(this),oJm(this),tC(19))}; g.K.FTK=function(y){y?tC(2):tC(1)}; g.K.isActive=function(){return!!this.J&&this.J.isActive(this)}; g.K=fGS.prototype;g.K.zF=function(){}; g.K.HN=function(){}; g.K.tQ=function(){}; g.K.kt=function(){}; g.K.isActive=function(){return!0}; g.K.Ae=function(){};g.bG(IP,g.Ky);IP.prototype.open=function(){this.K.J=this.N;this.G&&(this.K.Vm=!0);this.K.connect(this.J,this.W||void 0)}; IP.prototype.close=function(){this.K.disconnect()}; IP.prototype.send=function(y){var q=this.K;if(typeof y==="string"){var Q={};Q.__data__=y;y=Q}else this.Y&&(Q={},Q.__data__=g.Bq(y),y=Q);q.N.push(new Xnn(q.oo++,y));q.P3==3&&Mi(q)}; IP.prototype.FV=function(){this.K.J=null;delete this.N;this.K.disconnect();delete this.K;IP.FC.FV.call(this)}; g.bG(bd_,EJ_);g.bG($be,kHk);g.bG(uf,fGS);uf.prototype.zF=function(){this.K.dispatchEvent("m")}; uf.prototype.HN=function(y){this.K.dispatchEvent(new bd_(y))}; uf.prototype.tQ=function(y){this.K.dispatchEvent(new $be(y))}; uf.prototype.kt=function(){this.K.dispatchEvent("n")}; KGh.prototype.commit=function(y){this.K.cB=y};var g$=new g.Ky;g.x(WGm,g.XG);g.K=Uc.prototype;g.K.aI=null;g.K.V2=!1;g.K.Am=null;g.K.CY=null;g.K.bd=null;g.K.En=null;g.K.x$=null;g.K.Un=null;g.K.wL=null;g.K.gi=null;g.K.Ld=0;g.K.sb=null;g.K.iR=null;g.K.uJ=null;g.K.ZY=-1;g.K.wH=!0;g.K.Xk=!1;g.K.nY=0;g.K.QT=null;var aGC={},LGC={};g.K=Uc.prototype;g.K.setTimeout=function(y){this.W=y}; g.K.o3=function(y){y=y.target;var q=this.QT;q&&g.Cy(y)==3?q.ZK():this.TF(y)}; g.K.TF=function(y){try{if(y==this.gi)a:{var q=g.Cy(this.gi),Q=this.gi.W,p=this.gi.getStatus();if(g.FU&&!g.Uj("420+")){if(q<4)break a}else if(q<3||q==3&&!g.qv(this.gi))break a;this.Xk||q!=4||Q==7||(Q==8||p<=0?this.K.kM(3):this.K.kM(2));HdG(this);var v=this.gi.getStatus();this.ZY=v;var d=g.qv(this.gi);if(this.V2=v==200){q==4&&r$(this);if(this.gp){for(y=!0;!this.Xk&&this.Ld0?(this.uJ=3,cL(13)):(this.uJ=0,cL(14)),r$(this),Rgm(this)}}catch(O){}finally{}}; g.K.cancel=function(){this.Xk=!0;r$(this)}; g.K.DH=function(){this.Am=null;var y=Date.now();y-this.CY>=0?(this.En!=2&&this.K.kM(3),r$(this),this.uJ=2,cL(18),Rgm(this)):Sf_(this,this.CY-y)}; g.K.getLastError=function(){return this.uJ};g.K=zgq.prototype;g.K.Pw=null;g.K.PC=null;g.K.g_=!1;g.K.qP=null;g.K.Dx=null;g.K.AT=-1;g.K.G6=null;g.K.Vw=null;g.K.connect=function(y){this.qP=y;y=AC(this.K,null,this.qP);cL(3);Date.now();var q=this.K.j;q!=null?(this.G6=q[0],(this.Vw=q[1])?(this.Dx=1,Db_(this)):(this.Dx=2,uyw(this))):(qi(y,"MODE","init"),this.PC=new Uc(this),this.PC.aI=this.Pw,ECG(this.PC,y,!1,null,!0),this.Dx=0)}; g.K.P2=function(y){if(y)this.Dx=2,uyw(this);else{cL(4);var q=this.K;q.W9=q.P7.AT;PL(q,9)}y&&this.kM(2)}; g.K.Oq=function(y){return this.K.Oq(y)}; g.K.abort=function(){this.PC&&(this.PC.cancel(),this.PC=null);this.AT=-1}; g.K.Pt=function(){return!1}; g.K.AQ=function(y,q){this.AT=y.ZY;if(this.Dx==0)if(q){try{var Q=this.W.parse(q)}catch(p){y=this.K;y.W9=this.AT;PL(y,2);return}this.G6=Q[0];this.Vw=Q[1]}else y=this.K,y.W9=this.AT,PL(y,2);else this.Dx==2&&(this.g_?(cL(7),Date.now()):q=="11111"?(cL(6),this.g_=!0,Date.now(),this.AT=200,this.PC.cancel(),cL(12),e1(this.K,this,!0)):(cL(8),Date.now(),this.g_=!1))}; g.K.jN=function(){this.AT=this.PC.ZY;if(this.PC.V2)this.Dx==0?this.Vw?(this.Dx=1,Db_(this)):(this.Dx=2,uyw(this)):this.Dx==2&&(this.g_?(cL(12),e1(this.K,this,!0)):(cL(11),e1(this.K,this,!1)));else{this.Dx==0?cL(9):this.Dx==2&&cL(10);var y=this.K;this.PC.getLastError();y.W9=this.AT;PL(y,2)}}; g.K.Bb=function(){return this.K.Bb()}; g.K.isActive=function(){return this.K.isActive()}; g.K.kM=function(y){this.K.kM(y)};g.K=IGu.prototype;g.K.o5=null;g.K.k$=null;g.K.S0=null;g.K.MK=null;g.K.Kj=null;g.K.VT=null;g.K.D9=null;g.K.fY=null;g.K.Hb=0;g.K.Co=0;g.K.qK=null;g.K.xl=null;g.K.Da=null;g.K.gL=null;g.K.P7=null;g.K.Qu=null;g.K.l2=-1;g.K.o6=-1;g.K.W9=-1;g.K.o_=0;g.K.DZ=0;g.K.Sp=8;var Mpn={OK:0,VGV:2,j5$:4,LLf:5,zEy:6,STOP:7,N0:8,mBy:9,MYK:10,Y8f:11,YfK:12};g.bG(gCm,g.XG);g.bG(c_e,g.XG);g.K=IGu.prototype; g.K.connect=function(y,q,Q,p,v){cL(0);this.Kj=q;this.k$=Q||{};p&&v!==void 0&&(this.k$.OSID=p,this.k$.OAID=v);this.C?(nJ((0,g.wk)(this.uY,this,y),100),r__(this)):this.uY(y)}; g.K.disconnect=function(){oCq(this);if(this.K==3){var y=this.Hb++,q=this.VT.clone();g.hA(q,"SID",this.Y);g.hA(q,"RID",y);g.hA(q,"TYPE","terminate");GY(this,q);y=new Uc(this,this.Y,y);y.En=2;y.x$=yx(q.clone());(new Image).src=y.x$.toString();y.bd=Date.now();k3k(y)}yP_(this)}; g.K.uY=function(y){this.P7=new zgq(this);this.P7.Pw=this.o5;this.P7.W=this.J;this.P7.connect(y)}; g.K.Pt=function(){return this.K==0}; g.K.getState=function(){return this.K}; g.K.dc=function(y){this.xl=null;Pv_(this,y)}; g.K.l$=function(){this.Da=null;this.MK=new Uc(this,this.Y,"rpc",this.X);this.MK.aI=this.o5;this.MK.nY=0;var y=this.D9.clone();g.hA(y,"RID","rpc");g.hA(y,"SID",this.Y);g.hA(y,"CI",this.Qu?"0":"1");g.hA(y,"AID",this.l2);GY(this,y);g.hA(y,"TYPE","xmlhttp");ECG(this.MK,y,!0,this.fY,!1)}; g.K.AQ=function(y,q){if(this.K!=0&&(this.MK==y||this.S0==y))if(this.W9=y.ZY,this.S0==y&&this.K==3)if(this.Sp>7){try{var Q=this.J.parse(q)}catch(p){Q=null}if(Array.isArray(Q)&&Q.length==3)if(y=Q,y[0]==0)a:{if(!this.Da){if(this.MK)if(this.MK.bd+3E30)){if(p=q==1)this.S0||this.xl||this.K==1||this.o_>=2?p=!1:(this.xl=nJ((0,g.wk)(this.dc,this,y),X9m(this,this.o_)),this.o_++, p=!0);p=!(p||q==2&&mb_(this))}if(p)switch(Q){case 1:PL(this,5);break;case 4:PL(this,10);break;case 3:PL(this,6);break;case 7:PL(this,12);break;default:PL(this,2)}}}; g.K.lM=function(y){if(!g.Eu(arguments,this.K))throw Error("Unexpected channel state: "+this.K);}; g.K.Mas=function(y){y?cL(2):(cL(1),CvG(this,8))}; g.K.Oq=function(y){if(y)throw Error("Can't create secondary domain capable XhrIo object.");y=new g.iu;y.X=!1;return y}; g.K.isActive=function(){return!!this.qK&&this.qK.isActive(this)}; g.K.kM=function(y){var q=g$;q.dispatchEvent(new c_e(q,y))}; g.K.Bb=function(){return!1}; g.K=q9C.prototype;g.K.OG=function(){}; g.K.I6=function(){}; g.K.PN=function(){}; g.K.Cv=function(){}; g.K.WY=function(){}; g.K.jy=function(){return{}}; g.K.isActive=function(){return!0};g.K=jcm.prototype;g.K.enqueue=function(y){this.W.push(y)}; g.K.isEmpty=function(){return this.K.length===0&&this.W.length===0}; g.K.clear=function(){this.K=[];this.W=[]}; g.K.contains=function(y){return g.Eu(this.K,y)||g.Eu(this.W,y)}; g.K.remove=function(y){var q=this.K;var Q=(0,g.NkS)(q,y);Q>=0?(g.kq(q,Q),q=!0):q=!1;return q||g.Lh(this.W,y)}; g.K.mL=function(){for(var y=[],q=this.K.length-1;q>=0;--q)y.push(this.K[q]);q=this.W.length;for(var Q=0;Q=lhk.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(y=lhk[this.W],this.AU=g.xQ((0,g.wk)(this.Xy,this),y),this.W++):this.publish("pairingFailed",Error("Server error "+y.status))}; g.K.Ke=function(){this.K=null;this.publish("pairingFailed",Error("Server not responding"))}; var lhk=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.bG(Ob,Tk);g.K=Ob.prototype;g.K.start=function(){V2(this)&&this.publish("screenChange");!g.uw("yt-remote-lounge-token-expiration")&&uXX(this);g.Z1(this.K);this.K=g.xQ((0,g.wk)(this.start,this),1E4)}; g.K.add=function(y,q){V2(this);MBu(this,y);we(this,!1);this.publish("screenChange");q(y);y.token||uXX(this)}; g.K.remove=function(y,q){var Q=V2(this);zjC(this,y)&&(we(this,!1),Q=!0);q(y);Q&&this.publish("screenChange")}; g.K.J5=function(y,q,Q,p){var v=V2(this),d=this.get(y.id);d?(d.name!=q&&(d.name=q,we(this,!1),v=!0),Q(y)):p(Error("no such local screen."));v&&this.publish("screenChange")}; g.K.FV=function(){g.Z1(this.K);Ob.FC.FV.call(this)}; g.K.gT=function(y){V2(this);var q=this.screens.length;y=y&&y.screens||[];for(var Q=y.length,p=0;p20)break a;O=q(d,T)}d=O}v.name=d}Q(Ym(this,v))},this), onError:(0,g.wk)(function(v){p(Error("pairing request failed: "+v.status))},this), onTimeout:(0,g.wk)(function(){p(Error("pairing request timed out."))},this)})}; g.K.FV=function(){g.w5(this.W);g.w5(this.K);FN.FC.FV.call(this)}; g.K.Lc=function(){PIn(this);this.publish("screenChange");this.K.update()}; FN.prototype.dispose=FN.prototype.dispose;g.bG(fw,g.V6);g.K=fw.prototype;g.K.BJ=function(y){this.iB()||(y&&(bA(this,""+y),this.publish("sessionFailed")),this.K=null,this.publish("sessionScreen",null))}; g.K.info=function(y){jg(this.gp,y)}; g.K.Kr=function(){return null}; g.K.Zc=function(y){var q=this.W;y?(q.displayStatus=new chrome.cast.ReceiverDisplayStatus(y,[]),q.displayStatus.showStop=!0):q.displayStatus=null;chrome.cast.setReceiverDisplayStatus(q,(0,g.wk)(function(){this.info("Updated receiver status for "+q.friendlyName+": "+y)},this),(0,g.wk)(function(){bA(this,"Failed to update receiver status for: "+q.friendlyName)},this))}; g.K.FV=function(){this.Zc("");fw.FC.FV.call(this)};g.x($m,fw);g.K=$m.prototype;g.K.xT=function(y){if(this.N){if(this.N==y)return;bA(this,"Overriding cast session with new session object");Tww(this);this.m3=!1;this.j="unknown";this.N.removeUpdateListener(this.N$);this.N.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Sj)}this.N=y;this.N.addUpdateListener(this.N$);this.N.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.Sj);j$G(this,"getMdxSessionStatus")}; g.K.EV=function(y){this.info("launchWithParams no-op for Cast: "+g.Bq(y))}; g.K.stop=function(){this.N?this.N.stop((0,g.wk)(function(){this.BJ()},this),(0,g.wk)(function(){this.BJ(Error("Failed to stop receiver app."))},this)):this.BJ(Error("Stopping cast device without session."))}; g.K.Zc=function(){}; g.K.FV=function(){this.info("disposeInternal");Tww(this);this.N&&(this.N.removeUpdateListener(this.N$),this.N.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Sj));this.N=null;fw.prototype.FV.call(this)}; g.K.MBs=function(y,q){if(!this.iB())if(q)if(q=j1(q),g.dk(q))switch(y=""+q.type,q=q.data||{},this.info("onYoutubeMessage_: "+y+" "+g.Bq(q)),y){case "mdxSessionStatus":CIe(this,q);break;case "loungeToken":Q$q(this,q);break;default:bA(this,"Unknown youtube message: "+y)}else bA(this,"Unable to parse message.");else bA(this,"No data in message.")}; g.K.Vo=function(y,q,Q,p){g.Z1(this.C);this.C=0;eju(this.Y,this.W.label,y,this.W.friendlyName,(0,g.wk)(function(v){v?q(v):p>=0?(bA(this,"Screen "+y+" appears to be offline. "+p+" retries left."),this.C=g.xQ((0,g.wk)(this.Vo,this,y,q,Q,p-1),300)):Q(Error("Unable to fetch screen."))},this),Q)}; g.K.Kr=function(){return this.N}; g.K.RZ=function(y){this.iB()||y||(bA(this,"Cast session died."),this.BJ())};g.x(Kw,fw);g.K=Kw.prototype;g.K.xT=function(y){this.N=y;this.N.addUpdateListener(this.Es)}; g.K.EV=function(y){this.vI=y;this.cI()}; g.K.stop=function(){h$S(this);this.N?this.N.stop((0,g.wk)(this.BJ,this,null),(0,g.wk)(this.BJ,this,"Failed to stop DIAL device.")):this.BJ()}; g.K.FV=function(){h$S(this);this.N&&this.N.removeUpdateListener(this.Es);this.N=null;fw.prototype.FV.call(this)}; g.K.Ng=function(y){this.iB()||y||(bA(this,"DIAL session died."),this.J(),this.J=function(){},this.BJ())};g.x(Zv,fw);Zv.prototype.stop=function(){this.BJ()}; Zv.prototype.xT=function(){}; Zv.prototype.EV=function(){g.Z1(this.N);this.N=NaN;var y=JC(this.Y.SA(),this.W.label);y?hg(this,y):this.BJ(Error("No such screen"))}; Zv.prototype.FV=function(){g.Z1(this.N);this.N=NaN;fw.prototype.FV.call(this)};g.x(tg,g.V6);g.K=tg.prototype; g.K.init=function(y,q){chrome.cast.timeout.requestSession=3E4;var Q=new chrome.cast.SessionRequest(this.C,[chrome.cast.Capability.AUDIO_OUT]);g.kQ("desktop_enable_cast_connect")&&(Q.androidReceiverCompatible=!0);this.j||(Q.dialRequest=new chrome.cast.DialRequest("YouTube"));var p=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;y=y||this.G?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var v=(0,g.wk)(this.wOI,this);Q=new chrome.cast.ApiConfig(Q,(0,g.wk)(this.fB, this),v,p,y);Q.customDialLaunchCallback=(0,g.wk)(this.b3K,this);chrome.cast.initialize(Q,(0,g.wk)(function(){this.iB()||(chrome.cast.addReceiverActionListener(this.J),S9X(),this.W.subscribe("onlineScreenChange",(0,g.wk)(this.Wj,this)),this.N=Kzn(this),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.wk)(function(d){this.vt("Failed to set initial custom receivers: "+g.Bq(d))},this)),this.publish("yt-remote-cast2-availability-change",km(this)),q(!0))},this),(0,g.wk)(function(d){this.vt("Failed to initialize API: "+ g.Bq(d)); q(!1)},this))}; g.K.ins=function(y,q){Eb("Setting connected screen ID: "+y+" -> "+q);if(this.K){var Q=this.K.K;if(!y||Q&&Q.id!=y)Eb("Unsetting old screen status: "+this.K.W.friendlyName),Lw(this,null)}if(y&&q){if(!this.K){y=JC(this.W.SA(),y);if(!y){Eb("setConnectedScreenStatus: Unknown screen.");return}if(y.idType=="shortLived"){Eb("setConnectedScreenStatus: Screen with id type to be short lived.");return}Q=bbe(this,y);Q||(Eb("setConnectedScreenStatus: Connected receiver not custom..."),Q=new chrome.cast.Receiver(y.uuid? y.uuid:y.id,y.name),Q.receiverType=chrome.cast.ReceiverType.CUSTOM,this.N.push(Q),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.wk)(function(p){this.vt("Failed to set initial custom receivers: "+g.Bq(p))},this))); Eb("setConnectedScreenStatus: new active receiver: "+Q.friendlyName);Lw(this,new Zv(this.W,Q),!0)}this.K.Zc(q)}else Eb("setConnectedScreenStatus: no screen.")}; g.K.VKp=function(y){this.iB()?this.vt("Setting connection data on disposed cast v2"):this.K?this.K.EV(y):this.vt("Setting connection data without a session")}; g.K.FG=function(){this.iB()?this.vt("Stopping session on disposed cast v2"):this.K?(this.K.stop(),Lw(this,null)):Eb("Stopping non-existing session")}; g.K.requestSession=function(){chrome.cast.requestSession((0,g.wk)(this.fB,this),(0,g.wk)(this.bg$,this))}; g.K.FV=function(){this.W.unsubscribe("onlineScreenChange",(0,g.wk)(this.Wj,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.J);var y=LLq,q=g.qw("yt.mdx.remote.debug.handlers_");g.Lh(q||[],y);g.w5(this.K);g.V6.prototype.FV.call(this)}; g.K.vt=function(y){jg("Controller",y)}; g.K.Wv=function(y,q){this.K==y&&(q||Lw(this,null),this.publish("yt-remote-cast2-session-change",q))}; g.K.m4I=function(y,q){if(!this.iB())if(y)switch(y.friendlyName=chrome.cast.unescape(y.friendlyName),Eb("onReceiverAction_ "+y.label+" / "+y.friendlyName+"-- "+q),q){case chrome.cast.ReceiverAction.CAST:if(this.K)if(this.K.W.label!=y.label)Eb("onReceiverAction_: Stopping active receiver: "+this.K.W.friendlyName),this.K.stop();else{Eb("onReceiverAction_: Casting to active receiver.");this.K.K&&this.publish("yt-remote-cast2-session-change",this.K.K);break}switch(y.receiverType){case chrome.cast.ReceiverType.CUSTOM:Lw(this, new Zv(this.W,y));break;case chrome.cast.ReceiverType.DIAL:Lw(this,new Kw(this.W,y,this.Y,this.config_));break;case chrome.cast.ReceiverType.CAST:Lw(this,new $m(this.W,y,this.config_));break;default:this.vt("Unknown receiver type: "+y.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.K&&this.K.W.label==y.label?this.K.stop():this.vt("Stopping receiver w/o session: "+y.friendlyName)}else this.vt("onReceiverAction_ called without receiver.")}; g.K.b3K=function(y){if(this.iB())return Promise.reject(Error("disposed"));var q=y.receiver;q.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.vt("Not DIAL receiver: "+q.friendlyName),q.receiverType=chrome.cast.ReceiverType.DIAL);var Q=this.K?this.K.W:null;if(!Q||Q.label!=q.label)return this.vt("Receiving DIAL launch request for non-clicked DIAL receiver: "+q.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(Q&&Q.label==q.label&&Q.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.K.K)return Eb("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.K.K),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.vt('Changing CAST intent from "'+Q.receiverType+'" to "dial" for '+q.friendlyName);Lw(this,new Kw(this.W,q,this.Y,this.config_))}q=this.K;q.C=y;q.C.appState==chrome.cast.DialAppState.RUNNING?(y=q.C.extraData||{},Q=y.screenId||null,xm(q)&&y.loungeToken?y.loungeTokenRefreshIntervalMs?y=Fzk(q,{name:q.W.friendlyName,screenId:y.screenId,loungeToken:y.loungeToken,dialId:q.C.receiver.label, screenIdType:"shortLived"},y.loungeTokenRefreshIntervalMs):(g.y9(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(y)+".")),y=Y4n(q,Q)):y=Y4n(q,Q)):y=waS(q);return y}; g.K.fB=function(y){var q=this;if(!this.iB()&&!this.G){Eb("New cast session ID: "+y.sessionId);var Q=y.receiver;if(Q.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.K)if(Q.receiverType==chrome.cast.ReceiverType.CAST)Eb("Got resumed cast session before resumed mdx connection."),Q.friendlyName=chrome.cast.unescape(Q.friendlyName),Lw(this,new $m(this.W,Q,this.config_),!0);else{this.vt("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var p=this.K.W,v=JC(this.W.SA(), p.label);v&&Oc(v,Q.label)&&p.receiverType!=chrome.cast.ReceiverType.CAST&&Q.receiverType==chrome.cast.ReceiverType.CAST&&(Eb("onSessionEstablished_: manual to cast session change "+Q.friendlyName),g.w5(this.K),this.K=new $m(this.W,Q,this.config_),this.K.subscribe("sessionScreen",(0,g.wk)(this.Wv,this,this.K)),this.K.subscribe("sessionFailed",function(){return $Bm(q,q.K)}),this.K.EV(null)); this.K.xT(y)}}}; g.K.Mg=function(){return this.K?this.K.Kr():null}; g.K.bg$=function(y){this.iB()||(this.vt("Failed to estabilish a session: "+g.Bq(y)),y.code!=chrome.cast.ErrorCode.CANCEL&&Lw(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.K.wOI=function(y){Eb("Receiver availability updated: "+y);if(!this.iB()){var q=km(this);this.X=y==chrome.cast.ReceiverAvailability.AVAILABLE;km(this)!=q&&this.publish("yt-remote-cast2-availability-change",km(this))}}; g.K.Wj=function(){this.iB()||(this.N=Kzn(this),Eb("Updating custom receivers: "+g.Bq(this.N)),chrome.cast.setCustomReceivers(this.N,function(){},(0,g.wk)(function(){this.vt("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",km(this)))}; tg.prototype.setLaunchParams=tg.prototype.VKp;tg.prototype.setConnectedScreenStatus=tg.prototype.ins;tg.prototype.stopSession=tg.prototype.FG;tg.prototype.getCastSession=tg.prototype.Mg;tg.prototype.requestSession=tg.prototype.requestSession;tg.prototype.init=tg.prototype.init;tg.prototype.dispose=tg.prototype.dispose;var z7m=g.b8(["https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"]),S4n=[],Lzw=g.yH(z7m);g.K=M2.prototype; g.K.reset=function(y){this.listId="";this.index=-1;this.videoId="";z$S(this);this.volume=-1;this.muted=!1;y&&(this.index=y.index,this.listId=y.listId,this.videoId=y.videoId,this.playerState=y.playerState,this.volume=y.volume,this.muted=y.muted,this.audioTrackId=y.audioTrackId,this.trackData=y.trackData,this.bE=y.hasPrevious,this.yI=y.hasNext,this.G=y.playerTime,this.J=y.playerTimeAt,this.W=y.seekableStart,this.X=y.seekableEnd,this.N=y.duration,this.C=y.loadedTime,this.K=y.liveIngestionTime,this.Y= !isNaN(this.K))}; g.K.isPlaying=function(){return this.playerState==1}; g.K.isBuffering=function(){return this.playerState==3}; g.K.pL=function(y){this.N=isNaN(y)?0:y}; g.K.getDuration=function(){return this.Y?this.N+lA(this):this.N}; g.K.clone=function(){return new M2(usS(this))};g.x(nw,g.V6);g.K=nw.prototype;g.K.getState=function(){return this.N}; g.K.Jg=function(){return this.Y.getReconnectTimeout()}; g.K.IX=function(){this.Y.reconnect()}; g.K.play=function(){cE(this)?(this.K?this.K.play(null,g.D5,Ag(this,"play")):oa(this,"play"),gih(this,1,Dv(ge(this))),this.publish("remotePlayerChange")):Ub(this,this.play)}; g.K.pause=function(){cE(this)?(this.K?this.K.pause(null,g.D5,Ag(this,"pause")):oa(this,"pause"),gih(this,2,Dv(ge(this))),this.publish("remotePlayerChange")):Ub(this,this.pause)}; g.K.seekTo=function(y){if(cE(this)){if(this.K){var q=ge(this),Q=new chrome.cast.media.SeekRequest;Q.currentTime=y;q.isPlaying()||q.isBuffering()?Q.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:Q.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.K.seek(Q,g.D5,Ag(this,"seekTo",{newTime:y}))}else oa(this,"seekTo",{newTime:y});gih(this,3,y);this.publish("remotePlayerChange")}else Ub(this,g.Yq(this.seekTo,y))}; g.K.stop=function(){if(cE(this)){this.K?this.K.stop(null,g.D5,Ag(this,"stopVideo")):oa(this,"stopVideo");var y=ge(this);y.index=-1;y.videoId="";z$S(y);re(this,y);this.publish("remotePlayerChange")}else Ub(this,this.stop)}; g.K.setVolume=function(y,q){if(cE(this)){var Q=ge(this);if(this.W){if(Q.volume!=y){var p=Math.round(y)/100;this.W.setReceiverVolumeLevel(p,(0,g.wk)(function(){Q2("set receiver volume: "+p)},this),(0,g.wk)(function(){this.vt("failed to set receiver volume.")},this))}Q.muted!=q&&this.W.setReceiverMuted(q,(0,g.wk)(function(){Q2("set receiver muted: "+q)},this),(0,g.wk)(function(){this.vt("failed to set receiver muted.")},this))}else{var v={volume:y, muted:q};Q.volume!=-1&&(v.delta=y-Q.volume);oa(this,"setVolume",v)}Q.muted=q;Q.volume=y;re(this,Q)}else Ub(this,g.Yq(this.setVolume,y,q))}; g.K.cj=function(y,q){if(cE(this)){var Q=ge(this);y={videoId:y};q&&(Q.trackData={trackName:q.name,languageCode:q.languageCode,sourceLanguageCode:q.translationLanguage?q.translationLanguage.languageCode:"",languageName:q.languageName,kind:q.kind},y.style=g.Bq(q.style),g.WK(y,Q.trackData));oa(this,"setSubtitlesTrack",y);re(this,Q)}else Ub(this,g.Yq(this.cj,y,q))}; g.K.setAudioTrack=function(y,q){cE(this)?(q=q.getLanguageInfo().getId(),oa(this,"setAudioTrack",{videoId:y,audioTrackId:q}),y=ge(this),y.audioTrackId=q,re(this,y)):Ub(this,g.Yq(this.setAudioTrack,y,q))}; g.K.playVideo=function(y,q,Q,p,v,d,T){p=p===void 0?null:p;v=v===void 0?null:v;d=d===void 0?null:d;T=T===void 0?null:T;var O=ge(this),w={videoId:y};Q!==void 0&&(w.currentIndex=Q);uA(O,y,Q||0);q!==void 0&&(zk(O,q),w.currentTime=q);p&&(w.listId=p);v&&(w.playerParams=v);d&&(w.clickTrackingParams=d);T&&(w.locationInfo=g.Bq(T));oa(this,"setPlaylist",w);p||re(this,O)}; g.K.My=function(y,q){if(cE(this)){if(y&&q){var Q=ge(this);uA(Q,y,q);re(this,Q)}oa(this,"previous")}else Ub(this,g.Yq(this.My,y,q))}; g.K.nextVideo=function(y,q){if(cE(this)){if(y&&q){var Q=ge(this);uA(Q,y,q);re(this,Q)}oa(this,"next")}else Ub(this,g.Yq(this.nextVideo,y,q))}; g.K.mz=function(){if(cE(this)){oa(this,"clearPlaylist");var y=ge(this);y.reset();re(this,y);this.publish("remotePlayerChange")}else Ub(this,this.mz)}; g.K.xX=function(){cE(this)?oa(this,"dismissAutoplay"):Ub(this,this.xX)}; g.K.dispose=function(){if(this.N!=3){var y=this.N;this.N=3;this.publish("proxyStateChange",y,this.N)}g.V6.prototype.dispose.call(this)}; g.K.FV=function(){nih(this);this.Y=null;this.J.clear();Ia(this,null);g.V6.prototype.FV.call(this)}; g.K.kT=function(y){if((y!=this.N||y==2)&&this.N!=3&&y!=0){var q=this.N;this.N=y;this.publish("proxyStateChange",q,y);if(y==1)for(;!this.J.isEmpty();)q=y=this.J,q.K.length===0&&(q.K=q.W,q.K.reverse(),q.W=[]),y.K.pop().apply(this);else y==3&&this.dispose()}}; g.K.Mbj=function(y,q){this.publish(y,q)}; g.K.EsI=function(y){if(!y)this.RV(null),Ia(this,null);else if(this.W.receiver.volume){y=this.W.receiver.volume;var q=ge(this),Q=Math.round(100*y.level||0);if(q.volume!=Q||q.muted!=y.muted)Q2("Cast volume update: "+y.level+(y.muted?" muted":"")),q.volume=Q,q.muted=!!y.muted,re(this,q)}}; g.K.RV=function(y){Q2("Cast media: "+!!y);this.K&&this.K.removeUpdateListener(this.C);if(this.K=y)this.K.addUpdateListener(this.C),czG(this),this.publish("remotePlayerChange")}; g.K.UUy=function(y){y?(czG(this),this.publish("remotePlayerChange")):this.RV(null)}; g.K.gr=function(){oa(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.K.Lej=function(){var y=s$q();y&&Ia(this,y)}; g.K.vt=function(y){jg("CP",y)};g.x(Gk,g.V6);g.K=Gk.prototype; g.K.connect=function(y,q){if(q){var Q=q.listId,p=q.videoId,v=q.videoIds,d=q.playerParams,T=q.clickTrackingParams,O=q.index,w={videoId:p},J=q.currentTime,F=q.locationInfo;q=q.loopMode;J!==void 0&&(w.currentTime=J<=5?0:J);d&&(w.playerParams=d);F&&(w.locationInfo=F);T&&(w.clickTrackingParams=T);Q&&(w.listId=Q);v&&v.length>0&&(w.videoIds=v.join(","));O!==void 0&&(w.currentIndex=O);this.Es&&(w.loopMode=q||"LOOP_MODE_OFF");Q&&(this.K.listId=Q);this.K.videoId=p;this.K.index=O||0;this.K.state=3;zk(this.K, J);this.J="UNSUPPORTED";Q=this.Es?"setInitialState":"setPlaylist";eg("Connecting with "+Q+" and params: "+g.Bq(w));this.W.connect({method:Q,params:g.Bq(w)},y,pnG())}else eg("Connecting without params"),this.W.connect({},y,pnG());AzS(this)}; g.K.mj=function(y){this.W.mj(y)}; g.K.dispose=function(){this.iB()||(g.y_("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),BE(this,3));g.V6.prototype.dispose.call(this)}; g.K.FV=function(){e$G(this);G_k(this);Bwn(this);g.Z1(this.C);this.C=NaN;g.Z1(this.j);this.j=NaN;this.Y=null;g.Nx(this.cI);this.cI.length=0;this.W.dispose();g.V6.prototype.FV.call(this);this.J=this.X=this.N=this.K=this.W=null}; g.K.r5=function(y){if(!this.N||this.N.length===0)return!1;for(var q=g.t(this.N),Q=q.next();!Q.done;Q=q.next())if(!Q.value.capabilities.has(y))return!1;return!0}; g.K.Ch=function(){var y=3;this.iB()||(y=0,isNaN(this.Ta())?this.W.H1()&&isNaN(this.G)&&(y=1):y=2);return y}; g.K.vE=function(y){eg("Disconnecting with "+y);g.y_("yt.mdx.remote.remoteClient_",null);e$G(this);this.publish("beforeDisconnect",y);y==1&&fJ();this.W.disconnect(y);this.dispose()}; g.K.zK=function(){var y=this.K;this.Y&&(y=this.K.clone(),uA(y,this.Y,y.index));return usS(y)}; g.K.Zn$=function(y){var q=this,Q=new M2(y);Q.videoId&&Q.videoId!=this.K.videoId&&(this.Y=Q.videoId,g.Z1(this.C),this.C=g.xQ(function(){if(q.Y){var v=q.Y;q.Y=null;q.K.videoId!=v&&PE(q,"getNowPlaying")}},5E3)); var p=[];this.K.listId==Q.listId&&this.K.videoId==Q.videoId&&this.K.index==Q.index||p.push("remoteQueueChange");this.K.playerState==Q.playerState&&this.K.volume==Q.volume&&this.K.muted==Q.muted&&Dv(this.K)==Dv(Q)&&g.Bq(this.K.trackData)==g.Bq(Q.trackData)||p.push("remotePlayerChange");this.K.reset(y);g.mS(p,function(v){this.publish(v)},this)}; g.K.U5=function(){var y=this.W.getDeviceId(),q=g.ZC(this.N,function(Q){return Q.type=="REMOTE_CONTROL"&&Q.id!=y}); return q?q.id:""}; g.K.Ta=function(){return this.W.Jg()}; g.K.vy=function(){return this.J||"UNSUPPORTED"}; g.K.Qt=function(){return this.X||""}; g.K.YO=function(){!isNaN(this.Ta())&&this.W.IX()}; g.K.vWw=function(y,q){PE(this,y,q);ibm(this)}; g.K.RN=function(){var y=g.cF("SAPISID","")||g.cF("__Secure-1PAPISID")||"",q=g.cF("__Secure-3PAPISID","")||"";if(!y&&!q)return"";y=g.Rq(g.H5(y),2);q=g.Rq(g.H5(q),2);return g.Rq(g.H5(","+y+","+q),2)}; Gk.prototype.subscribe=Gk.prototype.subscribe;Gk.prototype.unsubscribeByKey=Gk.prototype.OY;Gk.prototype.getProxyState=Gk.prototype.Ch;Gk.prototype.disconnect=Gk.prototype.vE;Gk.prototype.getPlayerContextData=Gk.prototype.zK;Gk.prototype.setPlayerContextData=Gk.prototype.Zn$;Gk.prototype.getOtherConnectedRemoteId=Gk.prototype.U5;Gk.prototype.getReconnectTimeout=Gk.prototype.Ta;Gk.prototype.getAutoplayMode=Gk.prototype.vy;Gk.prototype.getAutoplayVideoId=Gk.prototype.Qt;Gk.prototype.reconnect=Gk.prototype.YO; Gk.prototype.sendMessage=Gk.prototype.vWw;Gk.prototype.getXsrfToken=Gk.prototype.RN;Gk.prototype.isCapabilitySupportedOnConnectedDevices=Gk.prototype.r5;g.x(Vpn,Tk);g.K=Vpn.prototype;g.K.SA=function(y){return this.gh.$_gs(y)}; g.K.contains=function(y){return!!this.gh.$_c(y)}; g.K.get=function(y){return this.gh.$_g(y)}; g.K.start=function(){this.gh.$_st()}; g.K.add=function(y,q,Q){this.gh.$_a(y,q,Q)}; g.K.remove=function(y,q,Q){this.gh.$_r(y,q,Q)}; g.K.J5=function(y,q,Q,p){this.gh.$_un(y,q,Q,p)}; g.K.FV=function(){for(var y=this.K.length,q=0;q1&&!this.U.getOption("remote","quickCast")?(this.i5=g.Ch(y,this.K,this),this.qo(g.W5(y,this.K)),y=this.U.getOption("remote","currentReceiver"),y=this.K(y),this.options[y]&&this.K1(y),this.enable(!0)):this.enable(!1)}; f2.prototype.K=function(y){return y.key}; f2.prototype.WC=function(y){return y==="cast-selector-receiver"?"Elenco...":this.i5[y].name}; f2.prototype.Fo=function(y){g.Ii.prototype.Fo.call(this,y);this.U.setOption("remote","currentReceiver",this.i5[y]);this.fK.QN()};g.x(HDc,g.LC);g.K=HDc.prototype; g.K.create=function(){var y=this.player.T(),q=g.F_(y);y={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:y.L("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:y.L("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:y.L("enable_cast_short_lived_lounge_token")};Y0m(q,y);this.subscriptions.push(g.Q8("yt-remote-before-disconnect",this.rwb,this));this.subscriptions.push(g.Q8("yt-remote-connection-change",this.Syp,this));this.subscriptions.push(g.Q8("yt-remote-receiver-availability-change",this.PW, this));this.subscriptions.push(g.Q8("yt-remote-auto-connect",this.ufK,this));this.subscriptions.push(g.Q8("yt-remote-receiver-resumed",this.amp,this));this.subscriptions.push(g.Q8("mdx-privacy-popup-confirm",this.kIK,this));this.subscriptions.push(g.Q8("mdx-privacy-popup-cancel",this.BdK,this));this.PW()}; g.K.load=function(){this.player.cancelPlayback();g.LC.prototype.load.call(this);this.sf=new S0u(this.player.T(),this);this.player.UC(this.sf);this.I5=new kIh(this,this.player,this.O9);var y=(y=ZD_())?y.currentTime:0;var q=K3m()?new nw(vC(),void 0):null;y==0&&q&&(y=Dv(ge(q)));y!==0&&this.xj(y);R7m(this,this.l6,this.l6);this.player.eW(6)}; g.K.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.qA();this.qE=this.I2;g.JT(this.I5,this.O9);this.O9=this.sf=this.I5=null;g.LC.prototype.unload.call(this);this.player.eW(5);he(this)}; g.K.FV=function(){g.V8(this.subscriptions);g.LC.prototype.FV.call(this)}; g.K.v5=function(y){var q=g.nS.apply(1,arguments);this.loaded&&this.I5.JP.apply(this.I5,[y].concat(g.hH(q)))}; g.K.getAdState=function(){return this.Jd}; g.K.bE=function(){return this.O9?ge(this.O9).bE:!1}; g.K.yI=function(){return this.O9?ge(this.O9).yI:!1}; g.K.xj=function(y,q){this.xS=y||0;this.player.publish("progresssync",y,q);this.player.mu("onVideoProgress",y||0)}; g.K.getCurrentTime=function(){return this.xS}; g.K.getDuration=function(){return ge(this.O9).getDuration()||0}; g.K.Sb=function(){var y=ge(this.O9);return y.Y?y.K+lA(y):y.K}; g.K.gk=function(){return ge(this.O9).C}; g.K.iH=function(){return DBw(ge(this.O9))}; g.K.ML=function(){var y=ge(this.O9);return y.W>0?y.W+lA(y):y.W}; g.K.getProgressState=function(){var y=ge(this.O9),q=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:y.playerState!=1081&&this.player.jK(),clipEnd:q.clipEnd,clipStart:q.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.Sb(),isAtLiveHead:this.isAtLiveHead(),loaded:this.gk(),seekableEnd:this.iH(),seekableStart:this.ML(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.K.isAtLiveHead=function(){return DBw(ge(this.O9))-this.getCurrentTime()<=1}; g.K.nextVideo=function(){this.O9&&this.O9.nextVideo()}; g.K.My=function(){this.O9&&this.O9.My()}; g.K.rwb=function(y){y===1&&(this.tW=this.O9?ge(this.O9):null)}; g.K.Syp=function(){var y=K3m()?new nw(vC(),void 0):null;if(y){var q=this.qE;this.loaded&&this.unload();this.O9=y;this.tW=null;q.key!==this.I2.key&&(this.qE=q,this.load())}else g.w5(this.O9),this.O9=null,this.loaded&&(this.unload(),(y=this.tW)&&y.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(y.videoId,Dv(y)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.K.PW=function(){var y=[this.I2],q=y.concat,Q=fhe();HE()&&g.uw("yt-remote-cast-available")&&Q.push({key:"cast-selector-receiver",name:"Cast..."});this.i5=q.call(y,Q);y=bDn()||this.I2;b1(this,y);this.player.mu("onMdxReceiversChange")}; g.K.ufK=function(){var y=bDn();b1(this,y)}; g.K.amp=function(){this.qE=bDn()}; g.K.kIK=function(){this.Vs=!0;he(this);Oz=!1;dv&&Vk(dv,1);dv=null}; g.K.BdK=function(){this.Vs=!1;he(this);b1(this,this.I2);this.qE=this.I2;Oz=!1;dv=null;this.player.playVideo()}; g.K.c_=function(y,q){switch(y){case "casting":return this.loaded;case "receivers":return this.i5;case "currentReceiver":return q&&(q.key==="cast-selector-receiver"?M$e():b1(this,q)),this.loaded?this.qE:this.I2;case "quickCast":return this.i5.length===2&&this.i5[1].key==="cast-selector-receiver"?(q&&M$e(),!0):!1}}; g.K.gr=function(){this.O9.gr()}; g.K.VD=function(){return!1}; g.K.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.K.isLoggedIn=function(){var y,q;return((y=g.XY("PLAYER_CONFIG"))==null?void 0:(q=y.args)==null?void 0:q.authuser)!==void 0?!0:!(!g.XY("SESSION_INDEX")&&!g.XY("LOGGED_IN"))};g.k1("remote",HDc);})(_yt_player);