(function(g){var window=this;'use strict';var uv8=function(e){if(e instanceof g.dc)return e;if(typeof e.TT=="function")return e.TT(!1);if(g.BB(e)){var a=0,r=new g.dc;r.next=function(){for(;;){if(a>=e.length)return g.fd;if(a in e)return g.JV(e[a++]);a++}}; return r}throw Error("Not implemented");},KVG=function(e,a,r){if(g.BB(e))g.FN(e,a,r); else for(e=uv8(e);;){var P=e.next();if(P.done)break;a.call(r,P.value,void 0,e)}},eI=function(e){g.Tk(e,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.f5()).toString(36)); return e},av=function(e,a,r){Array.isArray(r)||(r=[String(r)]); g.NTL(e.L,a,r)},e_G=function(e,a){var r=[]; KVG(a,function(P){try{var B=g.Dw.prototype.T.call(this,P,!0)}catch(h){if(h=="Storage: Invalid value was encountered")return;throw h;}B===void 0?r.push(P):g.Sel(B)&&r.push(P)},e); return r},a75=function(e,a){e_G(e,a).forEach(function(r){g.Dw.prototype.remove.call(this,r)},e)},rl9=function(e){if(e.RO){if(e.RO.locationOverrideToken)return{locationOverrideToken:e.RO.locationOverrideToken}; if(e.RO.latitudeE7!=null&&e.RO.longitudeE7!=null)return{latitudeE7:e.RO.latitudeE7,longitudeE7:e.RO.longitudeE7}}return null},Pe8=function(e,a){g.ZB(e,a)||e.push(a)},Bel=function(e){var a=0,r; for(r in e)a++;return a},h_N=function(e,a){return g.X7(e,a)},clG=function(e){try{return g.uq.JSON.parse(e)}catch(a){}e=String(e); if(/^\s*$/.test(e)?0:/^[\],:{}\s\u2028\u2029]*$/.test(e.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+e+")")}catch(a){}throw Error("Invalid JSON string: "+e);},rK=function(e){if(g.uq.JSON)try{return g.uq.JSON.parse(e)}catch(a){}return clG(e)},o2G=function(){var e=PL(); this.S=e;e.gM("/client_streamz/youtube/living_room/mdx/channel/opened",g.hS("channel_type"))},n2G=function(){var e=PL(); this.S=e;e.gM("/client_streamz/youtube/living_room/mdx/channel/closed",g.hS("channel_type"))},ylw=function(){var e=PL(); this.S=e;e.gM("/client_streamz/youtube/living_room/mdx/channel/message_received",g.hS("channel_type"))},TeV=function(){var e=PL(); this.S=e;e.gM("/client_streamz/youtube/living_room/mdx/channel/success")},Xfl=function(){var e=PL(); this.S=e;e.gM("/client_streamz/youtube/living_room/mdx/channel/error",g.hS("channel_type"),g.hS("error_type"))},f7N=function(){var e=PL(); this.S=e;e.gM("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},AlB=function(){var e=PL(); this.S=e;e.gM("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},UrG=function(e,a,r,P){var B=new g.ri(null); e&&g.PP(B,e);a&&g.BP(B,a);r&&g.hn(B,r);P&&(B.T=P);return B},Cea=function(e,a){return new g.u9(e,a)},BL=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},GuB=function(e,a){return e===a},hj=function(e,a){this.T={}; this.S=[];this.HB=this.size=0;var r=arguments.length;if(r>1){if(r%2)throw Error("Uneven number of arguments");for(var P=0;P5&&(e=e.slice(e.length-5)); var a=g.ba(e6M(),function(P){return P.loungeToken}),r=g.ba(e,function(P){return P.loungeToken}); g.tK(r,function(P){return!g.ZB(a,P)})&&a1a(); g.Vy("yt-remote-local-screens",e,31536E3)},U1=function(e){e||(g.Qy("yt-remote-session-screen-id"),g.Qy("yt-remote-session-video-id")); uw8();e=f9();g.k9(e,Aj());MwN(e)},PQb=function(){if(!C9){var e=g.LT(); e&&(C9=new g.kx(e))}},BuG=function(){PQb(); return C9?!!C9.get("yt-remote-use-staging-server"):!1},GU=function(e,a){g.Fm[e]=!0; var r=g.sj();r&&r.publish.apply(r,arguments);g.Fm[e]=!1},h6N=function(){},PL=function(){if(!E1){E1=new g.xP(new h6N); var e=g.Gu("client_streamz_web_flush_count",-1);e!==-1&&(E1.B=e)}return E1},cJB=function(){var e=window.navigator.userAgent.match(/Chrome\/([0-9]+)/); return e?parseInt(e[1],10):0},ofl=function(e){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+e)!=-1||document.currentScript.src.indexOf("&"+e)!=-1)},nfN=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},br=function(e){e.length?yJl(e.shift(),function(){br(e)}):TuB()},Xhl=function(e){return"chrome-extension://"+e+"/cast_sender.js"},yJl=function(e,a,r){var P=document.createElement("script"); P.onerror=a;r&&(P.onload=r);g.gf(P,g.gM(e));(document.head||document.documentElement).appendChild(P)},f1l=function(){var e=cJB(),a=[]; if(e>1){var r=e-1;a.push("//www.gstatic.com/eureka/clank/"+e+"/cast_sender.js");a.push("//www.gstatic.com/eureka/clank/"+r+"/cast_sender.js")}return a},TuB=function(){var e=nfN(); e&&e(!1,"No cast extension found")},UlZ=function(){if(AJw){var e=2,a=nfN(),r=function(){e--; e==0&&a&&a(!0)}; window.__onGCastApiAvailable=r;yJl("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",TuB,r)}},CQZ=function(){UlZ(); var e=f1l();e.push("//www.gstatic.com/eureka/clank/cast_sender.js");br(e)},EfG=function(){UlZ(); var e=f1l();e.push.apply(e,g.UO(GnG.map(Xhl)));e.push("//www.gstatic.com/eureka/clank/cast_sender.js");br(e)},tj=function(e,a,r){g.N.call(this); this.Z=r!=null?(0,g.yG)(e,r):e;this.FG=a;this.C=(0,g.yG)(this.Jk,this);this.S=!1;this.T=0;this.B=this.JC=null;this.L=[]},gK=function(){},bEB=function(){g.se.call(this,"p")},t$V=function(){g.se.call(this,"o")},ZEB=function(){return gfB=gfB||new g.AP},OEb=function(e){g.se.call(this,"serverreachability",e)},Zv=function(e){var a=ZEB(); a.dispatchEvent(new OEb(a,e))},knb=function(e){g.se.call(this,"statevent",e)},O1=function(e){var a=ZEB(); a.dispatchEvent(new knb(a,e))},dlB=function(e,a,r,P){g.se.call(this,"timingevent",e); this.size=a;this.rtt=r;this.retries=P},ka=function(e,a){if(typeof e!=="function")throw Error("Fn must not be null and must be a function"); return g.uq.setTimeout(function(){e()},a)},dK=function(){},Jj=function(e,a,r,P){this.B=e; this.L=a;this.h9=r;this.sM=P||1;this.HA=new g.CX(this);this.k$=45E3;this.e1=null;this.Z=!1;this.N=this.ym=this.Y=this.XM=this.TQ=this.rP=this.HW=null;this.oH=[];this.S=null;this.D=0;this.C=this.Eo=null;this.bv=-1;this.Cf=!1;this.PW=0;this.GQ=null;this.ID=this.Uo=this.T$=this.Lf=!1;this.T=new JJB},JJB=function(){this.T=null; this.S="";this.B=!1},V$G=function(e,a,r){e.XM=1; e.Y=eI(a.clone());e.N=r;e.Lf=!0;Dla(e,null)},Dla=function(e,a){e.TQ=Date.now(); Dv(e);e.ym=e.Y.clone();av(e.ym,"t",e.sM);e.D=0;var r=e.B.XM;e.T=new JJB;e.S=$lG(e.B,r?a:null,!e.N);e.PW>0&&(e.GQ=new g.Me((0,g.yG)(e.jb,e,e.S),e.PW));e.HA.listen(e.S,"readystatechange",e.yp);a=e.e1?g.GX(e.e1):{};e.N?(e.Eo||(e.Eo="POST"),a["Content-Type"]="application/x-www-form-urlencoded",e.S.send(e.ym,e.Eo,e.N,a)):(e.Eo="GET",e.S.send(e.ym,e.Eo,null,a));Zv(1)},WiB=function(e){if(!Q6l(e))return g.M_(e.S); var a=g.jC(e.S);if(a==="")return"";var r="",P=a.length,B=g.mK(e.S)==4;if(!e.T.T){if(typeof TextDecoder==="undefined")return V1(e),$a(e),"";e.T.T=new g.uq.TextDecoder}for(var h=0;ha.length)return l19;a=a.slice(P,P+r);e.D=P+r;return a},Dv=function(e){e.rP=Date.now()+e.k$; wha(e,e.k$)},wha=function(e,a){if(e.HW!=null)throw Error("WatchDog timer not null"); e.HW=ka((0,g.yG)(e.GI,e),a)},ph5=function(e){e.HW&&(g.uq.clearTimeout(e.HW),e.HW=null)},$a=function(e){e.B.iQ()||e.Cf||iEZ(e.B,e)},V1=function(e){ph5(e); g.Pe(e.GQ);e.GQ=null;e.HA.removeAll();if(e.S){var a=e.S;e.S=null;a.abort();a.dispose()}},R6N=function(e,a){try{var r=e.B; if(r.Mq!=0&&(r.S==e||z6G(r.T,e)))if(!e.Uo&&z6G(r.T,e)&&r.Mq==3){try{var P=r.RL.S.parse(a)}catch(O){P=null}if(Array.isArray(P)&&P.length==3){var B=P;if(B[0]==0)a:{if(!r.Y){if(r.S)if(r.S.TQ+3E30&&(r.PW=1.5*y);P=r;var T=e.I3();if(T){var X=g.uE(T,"X-Client-Wire-Protocol");if(X){var f=P.T;!f.S&&(g.lO(X,"spdy")||g.lO(X,"quic")||g.lO(X,"h2"))&&(f.L=f.C,f.S=new Set,f.T&&(I1w(f,f.T),f.T=null))}if(P.Lf){var A=g.uE(T,"X-HTTP-Session-Id");A&&(P.Yf=A,g.Tk(P.e1,P.Lf,A))}}r.Mq=3;r.C&&r.C.A0();r.J9&&(r.Q2=Date.now()-e.TQ);P=r;var U=e;P.Ge=HEG(P,P.XM?P.sM:null,P.h9);if(U.Uo){quG(P.T, U);var C=U,G=P.PW;G&&C.setTimeout(G);C.HW&&(ph5(C),Dv(C));P.S=U}else vf5(P);r.B.length>0&&L9(r)}else h[0]!="stop"&&h[0]!="close"||lr(r,7);else r.Mq==3&&(h[0]=="stop"||h[0]=="close"?h[0]=="stop"?lr(r,7):r.disconnect():h[0]!="noop"&&r.C&&r.C.xt(h),r.oH=0)}Zv(4)}catch(O){}},SuN=function(e,a){this.S=e; this.map=a;this.context=null},s69=function(e){this.C=e||10; g.uq.PerformanceNavigationTiming?(e=g.uq.performance.getEntriesByType("navigation"),e=e.length>0&&(e[0].nextHopProtocol=="hq"||e[0].nextHopProtocol=="h2")):e=!!(g.uq.chrome&&g.uq.chrome.loadTimes&&g.uq.chrome.loadTimes()&&g.uq.chrome.loadTimes().wasFetchedViaSpdy);this.L=e?this.C:1;this.S=null;this.L>1&&(this.S=new Set);this.T=null;this.B=[]},mlM=function(e){return e.T?!0:e.S?e.S.size>=e.L:!1},xl8=function(e){return e.T?1:e.S?e.S.size:0},z6G=function(e,a){return e.T?e.T==a:e.S?e.S.has(a):!1},I1w= function(e,a){e.S?e.S.add(a):e.T=a},quG=function(e,a){e.T&&e.T==a?e.T=null:e.S&&e.S.has(a)&&e.S.delete(a)},FiG=function(e){if(e.T!=null)return e.B.concat(e.T.oH); if(e.S!=null&&e.S.size!==0){var a=e.B;e=g.Z(e.S.values());for(var r=e.next();!r.done;r=e.next())a=a.concat(r.value.oH);return a}return g.WB(e.B)},M$B=function(e,a){var r=new dK; if(g.uq.Image){var P=new Image;P.onload=g.TV(Ya,r,"TestLoadImage: loaded",!0,a,P);P.onerror=g.TV(Ya,r,"TestLoadImage: error",!1,a,P);P.onabort=g.TV(Ya,r,"TestLoadImage: abort",!1,a,P);P.ontimeout=g.TV(Ya,r,"TestLoadImage: timeout",!1,a,P);g.uq.setTimeout(function(){if(P.ontimeout)P.ontimeout()},1E4); P.src=e}else a(!1)},j6N=function(e,a){var r=new dK,P=new AbortController,B=setTimeout(function(){P.abort(); Ya(r,"TestPingServer: timeout",!1,a)},1E4); fetch(e,{signal:P.signal}).then(function(h){clearTimeout(B);h.ok?Ya(r,"TestPingServer: ok",!0,a):Ya(r,"TestPingServer: server error",!1,a)}).catch(function(){clearTimeout(B); Ya(r,"TestPingServer: error",!1,a)})},Ya=function(e,a,r,P,B){try{B&&(B.onload=null,B.onerror=null,B.onabort=null,B.ontimeout=null),P(r)}catch(h){}},una=function(){this.S=new gK},wK=function(e,a,r){return r&&r.EJ?r.EJ[e]||a:a},KiG=function(e){this.B=[]; this.sM=this.Ge=this.e1=this.h9=this.S=this.Yf=this.Lf=this.Cf=this.D=this.bv=this.N=null;this.FI=this.ym=0;this.mJ=wK("failFast",!1,e);this.Uo=this.HW=this.Y=this.Z=this.C=null;this.dW=!0;this.RO=this.GQ=-1;this.ID=this.oH=this.TQ=0;this.Ky=wK("baseRetryDelayMs",5E3,e);this.sx=wK("retryDelaySeedMs",1E4,e);this.h1=wK("forwardChannelMaxRetries",2,e);this.kh=wK("forwardChannelRequestTimeoutMs",2E4,e);this.QH=e&&e.mHQ||void 0;this.A1=e&&e.lNW||void 0;this.py=e&&e.DHf||!1;this.PW=void 0;this.XM=e&&e.e8o|| !1;this.L="";this.T=new s69(e&&e.kJF);this.RL=new una;this.HA=e&&e.ZT1||!1;this.rP=e&&e.Bx1||!1;this.HA&&this.rP&&(this.rP=!1);this.t1=e&&e.PqM||!1;e&&e.Q5P&&(this.dW=!1);this.J9=!this.HA&&this.dW&&e&&e.N0r||!1;this.AC=void 0;e&&e.Oy&&e.Oy>0&&(this.AC=e.Oy);this.Te=void 0;this.Q2=0;this.k$=!1;this.T$=this.Eo=null},WL=function(e){e.S&&(eXB(e),e.S.cancel(),e.S=null)},aIB=function(e){WL(e); e.Y&&(g.uq.clearTimeout(e.Y),e.Y=null);Q1(e);e.T.cancel();e.Z&&(typeof e.Z==="number"&&g.uq.clearTimeout(e.Z),e.Z=null)},L9=function(e){mlM(e.T)||e.Z||(e.Z=!0,g.kP(e.mX,e),e.TQ=0)},PkZ=function(e,a){if(xl8(e.T)>=e.T.L-(e.Z?1:0))return!1; if(e.Z)return e.B=a.oH.concat(e.B),!0;if(e.Mq==1||e.Mq==2||e.TQ>=(e.mJ?0:e.h1))return!1;e.Z=ka((0,g.yG)(e.mX,e,a),r7N(e,e.TQ));e.TQ++;return!0},hXG=function(e,a){var r; a?r=a.h9:r=e.ym++;var P=e.e1.clone();g.Tk(P,"SID",e.L);g.Tk(P,"RID",r);g.Tk(P,"AID",e.GQ);p9(e,P);e.D&&e.N&&g.UC(P,e.D,e.N);r=new Jj(e,e.L,r,e.TQ+1);e.D===null&&(r.e1=e.N);a&&(e.B=a.oH.concat(e.B));a=B19(e,r,1E3);r.setTimeout(Math.round(e.kh*.5)+Math.round(e.kh*.5*Math.random()));I1w(e.T,r);V$G(r,P,a)},p9=function(e,a){e.Cf&&g.K5(e.Cf,function(r,P){g.Tk(a,P,r)}); e.C&&g.K5({},function(r,P){g.Tk(a,P,r)})},B19=function(e,a,r){r=Math.min(e.B.length,r); var P=e.C?(0,g.yG)(e.C.FC,e.C,e):null;a:{for(var B=e.B,h=-1;;){var c=["count="+r];h==-1?r>0?(h=B[0].S,c.push("ofs="+h)):h=0:c.push("ofs="+h);for(var y=!0,T=0;T=3)return!1; e.ID++;e.Y=ka((0,g.yG)(e.fk,e),r7N(e,e.oH));e.oH++;return!0},eXB=function(e){e.Eo!=null&&(g.uq.clearTimeout(e.Eo),e.Eo=null)},c7b=function(e){e.S=new Jj(e,e.L,"rpc",e.ID); e.D===null&&(e.S.e1=e.N);e.S.PW=0;var a=e.Ge.clone();g.Tk(a,"RID","rpc");g.Tk(a,"SID",e.L);g.Tk(a,"AID",e.GQ);g.Tk(a,"CI",e.Uo?"0":"1");!e.Uo&&e.AC&&g.Tk(a,"TO",e.AC);g.Tk(a,"TYPE","xmlhttp");p9(e,a);e.D&&e.N&&g.UC(a,e.D,e.N);e.PW&&e.S.setTimeout(e.PW);var r=e.S;e=e.sM;r.XM=1;r.Y=eI(a.clone());r.N=null;r.Lf=!0;Dla(r,e)},Q1=function(e){e.HW!=null&&(g.uq.clearTimeout(e.HW),e.HW=null)},iEZ=function(e,a){var r=null; if(e.S==a){Q1(e);eXB(e);e.S=null;var P=2}else if(z6G(e.T,a))r=a.oH,quG(e.T,a),P=1;else return;if(e.Mq!=0)if(a.Z)if(P==1){r=a.N?a.N.length:0;a=Date.now()-a.TQ;var B=e.TQ;P=ZEB();P.dispatchEvent(new dlB(P,r,a,B));L9(e)}else vf5(e);else{var h=a.bv;B=a.getLastError();if(B==3||B==0&&h>0||!(P==1&&PkZ(e,a)||P==2&&NuZ(e)))switch(r&&r.length>0&&(a=e.T,a.B=a.B.concat(r)),B){case 1:lr(e,5);break;case 4:lr(e,10);break;case 3:lr(e,6);break;default:lr(e,2)}}},r7N=function(e,a){var r=e.Ky+Math.floor(Math.random()* e.sx); e.isActive()||(r*=2);return r*a},lr=function(e,a){if(a==2){var r=(0,g.yG)(e.DCM,e),P=e.A1,B=!P; P=new g.ri(P||"//www.google.com/images/cleardot.gif");g.uq.location&&g.uq.location.protocol=="http"||g.PP(P,"https");eI(P);B?M$B(P.toString(),r):j6N(P.toString(),r)}else O1(2);e.Mq=0;e.C&&e.C.t0(a);ohV(e);aIB(e)},ohV=function(e){e.Mq=0; e.T$=[];if(e.C){var a=FiG(e.T);if(a.length!=0||e.B.length!=0)g.lN(e.T$,a),g.lN(e.T$,e.B),e.T.B.length=0,g.WB(e.B),e.B.length=0;e.C.h0()}},nha=function(e){if(e.Mq==0)return e.T$; var a=[];g.lN(a,FiG(e.T));g.lN(a,e.B);return a},HEG=function(e,a,r){var P=g.Xu(r); P.S!=""?(a&&g.BP(P,a+"."+P.S),g.hn(P,P.B)):(P=g.uq.location,P=UrG(P.protocol,a?a+"."+P.hostname:P.hostname,+P.port,r));a=e.Lf;r=e.Yf;a&&r&&g.Tk(P,a,r);g.Tk(P,"VER",e.zk);p9(e,P);return P},$lG=function(e,a,r){if(a&&!e.XM)throw Error("Can't create secondary domain capable XhrIo object."); a=e.py&&!e.QH?new g.Rt(new g.uT({gB:r})):new g.Rt(e.QH);a.D=e.XM;return a},y7w=function(){},T1B=function(){},zU=function(e,a){g.AP.call(this); this.S=new KiG(a);this.C=e;this.T=a&&a.BPr||null;e=a&&a.TP1||null;a&&a.FHo&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"});this.S.N=e;e=a&&a.GpQ||null;a&&a.C7&&(e?e["X-WebChannel-Content-Type"]=a.C7:e={"X-WebChannel-Content-Type":a.C7});a&&a.E_&&(e?e["X-WebChannel-Client-Profile"]=a.E_:e={"X-WebChannel-Client-Profile":a.E_});this.S.bv=e;(e=a&&a.JD1)&&!g.Wd(e)&&(this.S.D=e);this.Z=a&&a.e8o||!1;this.L=a&&a.MmH||!1;(a=a&&a.Ta)&&!g.Wd(a)&&(this.S.Lf=a,g.TX(this.T,a)&&(e= this.T,a in e&&delete e[a]));this.B=new ir(this)},XUl=function(e){bEB.call(this); e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var a=e.__sm__;a?this.data=(this.S=g.Pd(a))?g.UH(a,this.S):a:this.data=e},fI5=function(e){t$V.call(this); this.status=1;this.errorCode=e},ir=function(e){this.S=e},A7N=function(e,a){this.T=e; this.S=a},UUV=function(e){return nha(e.S).map(function(a){var r=e.T; a=a.map;"__data__"in a?(a=a.__data__,r=r.L?clG(a):a):r=a;return r})},N2=function(e,a){if(typeof e!=="function")throw Error("Fn must not be null and must be a function"); return g.uq.setTimeout(function(){e()},a)},Iv=function(e){xa.dispatchEvent(new CkN(xa,e))},CkN=function(e){g.se.call(this,"statevent",e)},HL=function(e,a,r,P){this.S=e; this.L=a;this.D=r;this.Z=P||1;this.T=45E3;this.B=new g.CX(this);this.C=new g.iE;this.C.setInterval(250)},Eh8=function(e,a,r){e.qM=1; e.Xi=eI(a.clone());e.Id=r;e.Lf=!0;GE9(e,null)},blB=function(e,a,r,P,B){e.qM=1; e.Xi=eI(a.clone());e.Id=null;e.Lf=r;B&&(e.cD=!1);GE9(e,P)},GE9=function(e,a){e.U$=Date.now(); tV8(e);e.GZ=e.Xi.clone();av(e.GZ,"t",e.Z);e.k6=0;e.I$=e.S.TN(e.S.jS()?a:null);e.Rf>0&&(e.Ju=new g.Me((0,g.yG)(e.P3,e,e.I$),e.Rf));e.B.listen(e.I$,"readystatechange",e.Vp);a=e.OD?g.GX(e.OD):{};e.Id?(e.FL="POST",a["Content-Type"]="application/x-www-form-urlencoded",e.I$.send(e.GZ,e.FL,e.Id,a)):(e.FL="GET",e.cD&&!g.T7&&(a.Connection="close"),e.I$.send(e.GZ,e.FL,null,a));e.S.JD(1)},Ol8=function(e,a){var r=e.k6,P=a.indexOf("\n",r); if(P==-1)return ghB;r=Number(a.substring(r,P));if(isNaN(r))return Zlw;P+=1;if(P+r>a.length)return ghB;a=a.slice(P,P+r);e.k6=P+r;return a},tV8=function(e){e.b8=Date.now()+e.T; kEw(e,e.T)},kEw=function(e,a){if(e.xq!=null)throw Error("WatchDog timer not null"); e.xq=N2((0,g.yG)(e.k7,e),a)},dUb=function(e){e.xq&&(g.uq.clearTimeout(e.xq),e.xq=null)},J7M=function(e){e.S.iQ()||e.QQ||e.S.gS(e)},q2=function(e){dUb(e); g.Pe(e.Ju);e.Ju=null;e.C.stop();e.B.removeAll();if(e.I$){var a=e.I$;e.I$=null;a.abort();a.dispose()}e.tE&&(e.tE=null)},DUw=function(e,a){try{e.S.Yt(e,a),e.S.JD(4)}catch(r){}},$U8=function(e,a,r,P,B){if(P==0)r(!1); else{var h=B||0;P--;VVN(e,a,function(c){c?r(!0):g.uq.setTimeout(function(){$U8(e,a,r,P,h)},h)})}},VVN=function(e,a,r){var P=new Image; P.onload=function(){try{vL(P),r(!0)}catch(B){}}; P.onerror=function(){try{vL(P),r(!1)}catch(B){}}; P.onabort=function(){try{vL(P),r(!1)}catch(B){}}; P.ontimeout=function(){try{vL(P),r(!1)}catch(B){}}; g.uq.setTimeout(function(){if(P.ontimeout)P.ontimeout()},a); P.src=e},vL=function(e){e.onload=null; e.onerror=null;e.onabort=null;e.ontimeout=null},Qq8=function(e){this.S=e; this.T=new gK},WQB=function(e){var a=Rv(e.S,e.wz,"/mail/images/cleardot.gif"); eI(a);$U8(a.toString(),5E3,(0,g.yG)(e.wm,e),3,2E3);e.JD(1)},lIV=function(e){var a=e.S.Z; a!=null?(Iv(5),a?(Iv(11),SI(e.S,e,!1)):(Iv(12),SI(e.S,e,!0))):(e.Oe=new HL(e),e.Oe.OD=e.BK,a=e.S,a=Rv(a,a.jS()?e.Vi:null,e.LZ),Iv(5),av(a,"TYPE","xmlhttp"),blB(e.Oe,a,!1,e.Vi,!1))},LQ9=function(e,a,r){this.S=1; this.T=[];this.B=[];this.C=new gK;this.N=e||null;this.Z=a!=null?a:null;this.Y=r||!1},Yv5=function(e,a){this.S=e; this.map=a;this.context=null},wU8=function(e,a,r,P){g.se.call(this,"timingevent",e); this.size=a;this.rtt=r;this.retries=P},pUG=function(e){g.se.call(this,"serverreachability",e)},zXN=function(e){e.Mv(1,0); e.MM=Rv(e,null,e.EK);ilw(e)},N1V=function(e){e.Tz&&(e.Tz.abort(),e.Tz=null); e.R4&&(e.R4.cancel(),e.R4=null);e.HS&&(g.uq.clearTimeout(e.HS),e.HS=null);s1(e);e.WI&&(e.WI.cancel(),e.WI=null);e.YE&&(g.uq.clearTimeout(e.YE),e.YE=null)},xUG=function(e,a){if(e.S==0)throw Error("Invalid operation: sending map when state is closed"); e.T.push(new Yv5(e.vF++,a));e.S!=2&&e.S!=3||ilw(e)},IIV=function(e){var a=0; e.R4&&a++;e.WI&&a++;return a},ilw=function(e){e.WI||e.YE||(e.YE=N2((0,g.yG)(e.qn,e),0),e.Px=0)},vhV=function(e,a){if(e.S==1){if(!a){e.fz=Math.floor(Math.random()*1E5); a=e.fz++;var r=new HL(e,"",a);r.OD=e.nW;var P=HlZ(e),B=e.MM.clone();g.Tk(B,"RID",a);g.Tk(B,"CVER","1");my(e,B);Eh8(r,B,P);e.WI=r;e.S=2}}else e.S==3&&(a?qvZ(e,a):e.T.length==0||e.WI||qvZ(e))},qvZ=function(e,a){if(a)if(e.ED>6){e.T=e.B.concat(e.T); e.B.length=0;var r=e.fz-1;a=HlZ(e)}else r=a.D,a=a.Id;else r=e.fz++,a=HlZ(e);var P=e.MM.clone();g.Tk(P,"SID",e.L);g.Tk(P,"RID",r);g.Tk(P,"AID",e.dO);my(e,P);r=new HL(e,e.L,r,e.Px+1);r.OD=e.nW;r.setTimeout(1E4+Math.round(1E4*Math.random()));e.WI=r;Eh8(r,P,a)},my=function(e,a){e.v7&&(e=e.v7.v3())&&g.K5(e,function(r,P){g.Tk(a,P,r)})},HlZ=function(e){var a=Math.min(e.T.length,1E3),r=["count="+a]; if(e.ED>6&&a>0){var P=e.T[0].S;r.push("ofs="+P)}else P=0;for(var B={},h=0;h=3)return!1; e.D++;e.HS=N2((0,g.yG)(e.yv,e),SvB(e,e.AK));e.AK++;return!0},SI=function(e,a,r){e.Pp=e.Z==null?r:!e.Z; e.eV=a.uP;e.Y||zXN(e)},s1=function(e){e.Kg!=null&&(g.uq.clearTimeout(e.Kg),e.Kg=null)},SvB=function(e,a){var r=5E3+Math.floor(Math.random()*1E4); e.isActive()||(r*=2);return r*a},Fk=function(e,a){if(a==2||a==9){var r=null; e.v7&&(r=null);var P=(0,g.yG)(e.QUW,e);r||(r=new g.ri("//www.google.com/images/cleardot.gif"),eI(r));VVN(r.toString(),1E4,P)}else Iv(2);mUG(e,a)},mUG=function(e,a){e.S=0; e.v7&&e.v7.Fs(a);FQV(e);N1V(e)},FQV=function(e){e.S=0; e.eV=-1;if(e.v7)if(e.B.length==0&&e.T.length==0)e.v7.KZ();else{var a=g.WB(e.B),r=g.WB(e.T);e.B.length=0;e.T.length=0;e.v7.KZ(a,r)}},Rv=function(e,a,r){var P=g.Xu(r); if(P.S!="")a&&g.BP(P,a+"."+P.S),g.hn(P,P.B);else{var B=window.location;P=UrG(B.protocol,a?a+"."+B.hostname:B.hostname,+B.port,r)}e.z7&&g.K5(e.z7,function(h,c){g.Tk(P,c,h)}); g.Tk(P,"VER",e.ED);my(e,P);return P},MVN=function(){},jqB=function(){this.S=[]; this.T=[]},uXV=function(e){g.se.call(this,"channelMessage"); this.message=e},KQ9=function(e){g.se.call(this,"channelError"); this.error=e},ePM=function(e,a){this.action=e; this.params=a||{}},M2=function(e,a){g.N.call(this); this.S=new g.vP(this.B1$,0,this);g.x(this,this.S);this.FG=5E3;this.T=0;if(typeof e==="function")a&&(e=(0,g.yG)(e,a));else if(e&&typeof e.handleEvent==="function")e=(0,g.yG)(e.handleEvent,e);else throw Error("Invalid listener argument");this.B=e},aHa=function(e,a,r,P,B,h,c,y,T,X,f,A,U,C){r=r===void 0?!1:r; P=P===void 0?function(){return""}:P; B=B===void 0?!1:B;h=h===void 0?!1:h;c=c===void 0?!1:c;y=y===void 0?function(){return g.lE({})}:y; T=T===void 0?!1:T;f=f===void 0?!1:f;A=A===void 0?!1:A;U=U===void 0?!1:U;C=C===void 0?!1:C;this.XM=e;this.HW=a;this.Z=new g.Oy;this.T=new M2(this.jLm,this);this.S=null;this.D=!1;this.N=null;this.TQ="";this.oH=this.Y=0;this.B=[];this.ID=r;this.Lf=P;this.C=h;this.e1=y;this.Cf=X;this.sM=c;this.Eo=null;this.L=g.lE();this.h9=B;this.T$=T;this.HA=f;this.rP=A;this.dW=U;this.bv=C;this.PW=new o2G;this.Uo=new n2G;this.k$=new TeV;this.ym=new ylw;this.GQ=new Xfl;this.J9=new f7N;this.Te=new AlB},BAa=function(e, a,r,P,B){rEl(e); if(e.S){var h=g.IM("ID_TOKEN"),c=e.S.nW||{};h?c["x-youtube-identity-token"]=h:delete c["x-youtube-identity-token"];e.S.nW=c}P48(e);P?(P.getState()!=3&&IIV(P)==0||P.getState(),e.S.connect(a,r,e.HW,P.L,P.dO)):B?e.S.connect(a,r,e.HW,B.sessionId,B.arrayId):e.S.connect(a,r,e.HW)},nMG=function(e,a){return e.dW?!0:e.rP?Object.values(hPG).includes(a):e.HA?!Object.values(cEb).includes(a):e.bv?Object.values(oMN).includes(a):!1},XNw=function(e){var a,r; g.Y(function(P){if(P.T==1)return g.d4(P,2),g.l(P,yE9(e),2);g.YN(P);a=e.B;e.B=[];r=a.length;TAB(e,a,r);jI(e);return g.pL(P,0)})},TAB=function(e,a,r){for(var P=0;P0?r=Object.assign({},r,a):delete r.Authorization;e.S.nW=r}},P48=function(e){e.Cf&&!e.C&&AEM(e,e.Cf())},ur=function(e){this.scheme="https"; this.port=this.domain="";this.S="/api/lounge";this.T=!0;e=e||document.location.href;var a=Number(g.yp(e)[4]||null)||"";a&&(this.port=":"+a);this.domain=g.TS(e)||"";e=g.zX();e.search("MSIE")>=0&&(e=e.match(/MSIE ([\d.]+)/)[1],g.iO(e,"10.0")<0&&(this.T=!1))},K9=function(e,a){var r=e.S; e.T&&(r=e.scheme+"://"+e.domain+e.port+e.S);return g.EW(r+a,{})},UxG=function(e,a){g.AP.call(this); var r=this;this.oO=e();this.oO.subscribe("handlerOpened",this.uf,this);this.oO.subscribe("handlerClosed",this.onClosed,this);this.oO.subscribe("handlerError",function(P,B){r.onError(B)}); this.oO.subscribe("handlerMessage",this.onMessage,this);this.S=a},C4G=function(e,a,r){var P=this; r=r===void 0?function(){return""}:r; var B=B===void 0?new T1B:B;var h=h===void 0?new g.Oy:h;this.pathPrefix=e;this.S=a;this.TQ=r;this.C=h;this.Y=null;this.N=this.D=0;this.channel=null;this.Z=0;this.B=new M2(function(){P.B.isActive();var c;((c=P.channel)==null?void 0:xl8((new A7N(c,c.S)).S.T))===0&&P.connect(P.Y,P.D)}); this.L={};this.T={};this.HW=!1;this.logger=null;this.oH=[];this.xK=void 0;this.e1=new o2G;this.Eo=new n2G;this.Cf=new ylw;this.Lf=new Xfl},G4l=function(e){g.at(e.channel,"m",function(){e.Z=3; e.B.reset();e.Y=null;e.D=0;for(var a=g.Z(e.oH),r=a.next();!r.done;r=a.next())r=r.value,e.channel&&e.channel.send(r);e.oH=[];e.publish("webChannelOpened");e.e1.J1("WEB_CHANNEL")}); g.at(e.channel,"n",function(){e.Z=0;e.B.isActive()||e.publish("webChannelClosed");var a,r=(a=e.channel)==null?void 0:UUV(new A7N(a,a.S));r&&(e.oH=[].concat(g.UO(r)));e.Eo.J1("WEB_CHANNEL")}); g.at(e.channel,"p",function(a){var r=a.data;r[0]==="gracefulReconnect"?(e.B.start(),e.channel&&e.channel.close()):e.publish("webChannelMessage",new ePM(r[0],r[1]));e.xK=a.statusCode;e.Cf.J1("WEB_CHANNEL")}); g.at(e.channel,"o",function(){e.xK===401||e.B.start();e.publish("webChannelError");e.Lf.J1("WEB_CHANNEL","")})},EM8=function(e){var a=e.TQ(); a?e.L["x-youtube-lounge-xsrf-token"]=a:delete e.L["x-youtube-lounge-xsrf-token"]},buG=function(e){g.AP.call(this); this.S=e();this.S.subscribe("webChannelOpened",this.Hq,this);this.S.subscribe("webChannelClosed",this.onClosed,this);this.S.subscribe("webChannelError",this.onError,this);this.S.subscribe("webChannelMessage",this.onMessage,this)},tAZ=function(e,a,r,P,B){function h(){return new aHa(K9(e,"/bc"),a,!1,r,P)} r=r===void 0?function(){return""}:r; return g.CK("enable_mdx_web_channel_desktop")?new buG(function(){return new C4G(K9(e,"/wc"),a,r)}):new UxG(h,B)},k49=function(){var e=gMN; Zu5();eM.push(e);Oub()},ai=function(e,a){Zu5(); var r=dxM(e,String(a));eM.length==0?JEV(r):(Oub(),g.FN(eM,function(P){P(r)}))},r5=function(e){ai("CP",e)},Zu5=function(){eM||(eM=g.aZ("yt.mdx.remote.debug.handlers_")||[],g.KL("yt.mdx.remote.debug.handlers_",eM))},JEV=function(e){var a=(Pg+1)%50; Pg=a;Bg[a]=e;hY||(hY=a==49)},Oub=function(){var e=eM; if(Bg[0]){var a=hY?Pg:-1,r={};do r={b6:void 0},a=(a+1)%50,r.b6=Bg[a],g.FN(e,function(P){return function(B){B(P.b6)}}(r)); while(a!=Pg);Bg=Array(50);Pg=-1;hY=!1}},dxM=function(e,a){var r=(Date.now()-Dxl)/1E3; r.toFixed&&(r=r.toFixed(3));var P=[];P.push("[",r+"s","] ");P.push("[","yt.mdx.remote","] ");P.push(e+": "+a,"\n");return P.join("")},cg=function(e){g.aK.call(this); this.Z=e;this.screens=[]},VAl=function(e,a){var r=e.get(a.uuid)||e.get(a.id); if(r)return e=r.name,r.id=a.id||r.id,r.name=a.name,r.token=a.token,r.uuid=a.uuid||r.uuid,r.name!=e;e.screens.push(a);return!0},$xN=function(e,a){var r=e.screens.length!=a.length; e.screens=g.QX(e.screens,function(h){return!!sf9(a,h)}); for(var P=a.length,B=0;B0&&e.L0&&tY(e,r)},function(a){e.C=function(){}; e.xv(a)})},BlB=function(e){var a={}; a.pairingCode=e.Eo;a.theme=e.XM;BuG()&&(a.env_useStageMdx=1);return g.GS(a)},hxG=function(e){return new Promise(function(a){e.Eo=R_8(); if(e.e1){var r=new chrome.cast.DialLaunchResponse(!0,BlB(e));a(r);PhG(e)}else e.HW=function(){g.fK(e.N);e.HW=function(){}; e.N=NaN;var P=new chrome.cast.DialLaunchResponse(!0,BlB(e));a(P);PhG(e)},e.N=g.Tu(function(){e.HW()},100)})},orb=function(e,a,r){e.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(a)); var P=new n9(a);return(new Promise(function(B){cBM(e,P,function(h){h?(e.oH=!0,fI(e.L,P),Uf(e,P),tY(e,r)):g.SX(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(a)+" is not online."));B(h)},5)})).then(function(B){return B?new chrome.cast.DialLaunchResponse(!1):hxG(e)})},nrZ=function(e,a){var r=e.Y.receiver.label,P=e.T.friendlyName; return(new Promise(function(B){IHw(e.L,r,a,P,function(h){h&&h.token&&Uf(e,h);B(h)},function(h){CI(e,"Failed to get DIAL screen: "+h); B(null)})})).then(function(B){return B&&B.token?new chrome.cast.DialLaunchResponse(!1):hxG(e)})},cBM=function(e,a,r,P){g.fK(e.Z); e.Z=0;qjN(e.L,a,function(B){B||P<0?r(B):e.Z=g.Tu(function(){cBM(e,a,r,P-1)},300)})},tY=function(e,a){e.info("getDialAppInfoWithTimeout_ "+a); b$(e)&&(g.fK(e.D),e.D=0,a==0?yBG(e):e.D=g.Tu(function(){yBG(e)},a))},yBG=function(e){b$(e)&&e.B.getDialAppInfo(function(a){e.info("getDialAppInfo dialLaunchData: "+JSON.stringify(a)); a=a.extraData||{};var r=null;if(a.loungeToken){var P;((P=e.S)==null?void 0:P.token)==a.loungeToken&&(r="staleLoungeToken")}else r="missingLoungeToken";r?(e.TQ=r,tY(e,3E4)):(e.oH=!1,e.TQ="unknown",sr9(e,a.loungeToken),tY(e,a.loungeTokenRefreshIntervalMs))},function(a){e.info("getDialAppInfo error: "+a); e.TQ="noLoungeTokenResponse";tY(e,3E4)})},Tlw=function(e){g.fK(e.Z); e.Z=0;g.fK(e.D);e.D=0;e.C();e.C=function(){}; g.fK(e.N)},g5=function(e,a){AY.call(this,e,a,"ManualSession"); this.B=g.Tu((0,g.yG)(this.w6,this,null),150)},Zb=function(e,a){g.aK.call(this); this.config_=a;this.T=e;this.Y=a.appId||"233637DE";this.L=a.theme||"cl";this.N=a.disableCastApi||!1;this.Z=a.forceMirroring||!1;this.S=null;this.D=!1;this.B=[];this.C=(0,g.yG)(this.D51,this)},XCl=function(e,a){return a?g.tw(e.B,function(r){return y1(a,r.label)},e):null},Of=function(e){ai("Controller",e)},gMN=function(e){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(e)},ky=function(e){return e.D||!!e.B.length||!!e.S},d5=function(e,a,r){a!=e.S&&(g.Pe(e.S),(e.S=a)?(r?e.publish("yt-remote-cast2-receiver-resumed", a.T):e.publish("yt-remote-cast2-receiver-selected",a.T),a.subscribe("sessionScreen",(0,g.yG)(e.Xe,e,a)),a.subscribe("sessionFailed",function(){return f49(e,a)}),a.S?e.publish("yt-remote-cast2-session-change",a.S):r&&e.S.w6(null)):e.publish("yt-remote-cast2-session-change",null))},f49=function(e,a){e.S==a&&e.publish("yt-remote-cast2-session-failed")},ABV=function(e){var a=e.T.Nn(),r=e.S&&e.S.T; e=g.ba(a,function(P){r&&y1(P,r.label)&&(r=null);var B=P.uuid?P.uuid:P.id,h=XCl(this,P);h?(h.label=B,h.friendlyName=P.name):(h=new chrome.cast.Receiver(B,P.name),h.receiverType=chrome.cast.ReceiverType.CUSTOM);return h},e); r&&(r.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(r=new chrome.cast.Receiver(r.label,r.friendlyName),r.receiverType=chrome.cast.ReceiverType.CUSTOM),e.push(r));return e},Zh5=function(e,a,r,P){P.disableCastApi?JY("Cannot initialize because disabled by Mdx config."):U8B()?ChB(a,P)&&(Go8(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?Erw(e,r):(window.__onGCastApiAvailable=function(B,h){B?Erw(e,r):(Db("Failed to load cast API: "+h),bhB(!1),Go8(!1),g.Qy("yt-remote-cast-available"),g.Qy("yt-remote-cast-receiver"), tbB(),r(!1))},P.loadCastApiSetupScript?g.eb(grZ):window.navigator.userAgent.indexOf("Android")>=0&&window.navigator.userAgent.indexOf("Chrome/")>=0&&window.navigator.presentation?cJB()>=60&&CQZ():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?TuB():cJB()>=89?EfG():(UlZ(),br(GnG.map(Xhl))))):JY("Cannot initialize because not running Chrome")},tbB=function(){JY("dispose"); var e=Vu();e&&e.dispose();g.KL("yt.mdx.remote.cloudview.instance_",null);Ohb(!1);g.u4(kob);kob.length=0},$y=function(){return!!g.$f("yt-remote-cast-installed")},d8w=function(){var e=g.$f("yt-remote-cast-receiver"); return e?e.friendlyName:null},JB5=function(){JY("clearCurrentReceiver"); g.Qy("yt-remote-cast-receiver")},D89=function(){return $y()?Vu()?Vu().getCastSession():(Db("getCastSelector: Cast is not initialized."),null):(Db("getCastSelector: Cast API is not installed!"),null)},VbN=function(){$y()?Vu()?Qu()?(JY("Requesting cast selector."),Vu().requestSession()):(JY("Wait for cast API to be ready to request the session."),kob.push(g.jA("yt-remote-cast2-api-ready",VbN))):Db("requestCastSelector: Cast is not initialized."):Db("requestCastSelector: Cast API is not installed!")}, Wg=function(e,a){Qu()?Vu().setConnectedScreenStatus(e,a):Db("setConnectedScreenStatus called before ready.")},U8B=function(){var e=g.zX().search(/ (CrMo|Chrome|CriOS)\//)>=0; return g.Ed||e},$8N=function(e,a){Vu().init(e,a)},ChB=function(e,a){var r=!1; Vu()||(e=new Zb(e,a),e.subscribe("yt-remote-cast2-availability-change",function(P){g.Vy("yt-remote-cast-available",P);GU("yt-remote-cast2-availability-change",P)}),e.subscribe("yt-remote-cast2-receiver-selected",function(P){JY("onReceiverSelected: "+P.friendlyName); g.Vy("yt-remote-cast-receiver",P);GU("yt-remote-cast2-receiver-selected",P)}),e.subscribe("yt-remote-cast2-receiver-resumed",function(P){JY("onReceiverResumed: "+P.friendlyName); g.Vy("yt-remote-cast-receiver",P);GU("yt-remote-cast2-receiver-resumed",P)}),e.subscribe("yt-remote-cast2-session-change",function(P){JY("onSessionChange: "+TU(P)); P||g.Qy("yt-remote-cast-receiver");GU("yt-remote-cast2-session-change",P)}),g.KL("yt.mdx.remote.cloudview.instance_",e),r=!0); JY("cloudview.createSingleton_: "+r);return r},Vu=function(){return g.aZ("yt.mdx.remote.cloudview.instance_")},Erw=function(e,a){bhB(!0); Go8(!1);$8N(e,function(r){r?(Ohb(!0),g.Ku("yt-remote-cast2-api-ready")):(Db("Failed to initialize cast API."),bhB(!1),g.Qy("yt-remote-cast-available"),g.Qy("yt-remote-cast-receiver"),tbB());a(r)})},JY=function(e){ai("cloudview",e)},Db=function(e){ai("cloudview",e)},bhB=function(e){JY("setCastInstalled_ "+e); g.Vy("yt-remote-cast-installed",e)},Qu=function(){return!!g.aZ("yt.mdx.remote.cloudview.apiReady_")},Ohb=function(e){JY("setApiReady_ "+e); g.KL("yt.mdx.remote.cloudview.apiReady_",e)},Go8=function(e){g.KL("yt.mdx.remote.cloudview.initializing_",e)},l$=function(e){this.index=-1; this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.C=this.Z=0;this.trackData=null;this.fq=this.Mj=!1;this.Y=this.B=this.D=this.T=0;this.S=NaN;this.L=!1;this.reset(e)},Qya=function(e){e.audioTrackId=null; e.trackData=null;e.playerState=-1;e.Mj=!1;e.fq=!1;e.Z=0;e.C=g.f5();e.T=0;e.D=0;e.B=0;e.Y=0;e.S=NaN;e.L=!1},LI=function(e){return e.isPlaying()?(g.f5()-e.C)/1E3:0},Yy=function(e,a){e.Z=a; e.C=g.f5()},w5=function(e){switch(e.playerState){case 1:case 1081:return(g.f5()-e.C)/1E3+e.Z; case -1E3:return 0}return e.Z},WUB=function(e){return e.L?e.D+LI(e):e.D},pI=function(e,a,r){var P=e.videoId; e.videoId=a;e.index=r;a!=P&&Qya(e)},l4G=function(e){var a={}; a.index=e.index;a.listId=e.listId;a.videoId=e.videoId;a.playerState=e.playerState;a.volume=e.volume;a.muted=e.muted;a.audioTrackId=e.audioTrackId;a.trackData=g.EH(e.trackData);a.hasPrevious=e.Mj;a.hasNext=e.fq;a.playerTime=e.Z;a.playerTimeAt=e.C;a.seekableStart=e.T;a.seekableEnd=e.D;a.duration=e.B;a.loadedTime=e.Y;a.liveIngestionTime=e.S;return a},zN=function(e,a){g.aK.call(this); var r=this;this.B=0;this.L=e;this.Z=[];this.C=new jqB;this.T=this.S=null;this.N=(0,g.yG)(this.YoH,this);this.D=(0,g.yG)(this.xw,this);this.Y=(0,g.yG)(this.dFm,this);this.HW=(0,g.yG)(this.GQQ,this);var P=0;e?(P=e.getProxyState(),P!=3&&(e.subscribe("proxyStateChange",this.YR,this),LUb(this))):P=3;P!=0&&(a?this.YR(P):g.Tu(function(){r.YR(P)},0)); (e=D89())&&i$(this,e);this.subscribe("yt-remote-cast2-session-change",this.HW)},NV=function(e){return new l$(e.L.getPlayerContextData())},LUb=function(e){g.FN("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(a){this.Z.push(this.L.subscribe(a,g.TV(this.Cw1,a),this))},e)},Y3Z=function(e){g.FN(e.Z,function(a){this.L.unsubscribeByKey(a)},e); e.Z.length=0},Ii=function(e){return e.getState()==1},Hg=function(e,a){var r=e.C; r.S.length+r.T.length<50&&e.C.enqueue(a)},wCw=function(e,a,r){var P=NV(e); Yy(P,r);P.playerState!=-1E3&&(P.playerState=a);qV(e,P)},vg=function(e,a,r){e.L.sendMessage(a,r)},qV=function(e,a){Y3Z(e); e.L.setPlayerContextData(l4G(a));LUb(e)},i$=function(e,a){e.T&&(e.T.removeUpdateListener(e.N),e.T.removeMediaListener(e.D),e.xw(null)); e.T=a;e.T&&(r5("Setting cast session: "+e.T.sessionId),e.T.addUpdateListener(e.N),e.T.addMediaListener(e.D),e.T.media.length&&e.xw(e.T.media[0]))},pCV=function(e){var a=e.S.media,r=e.S.customData; if(a&&r){var P=NV(e);a.contentId!=P.videoId&&r5("Cast changing video to: "+a.contentId);P.videoId=a.contentId;P.playerState=r.playerState;Yy(P,e.S.getEstimatedTime());qV(e,P)}else r5("No cast media video. Ignoring state update.")},Ri=function(e,a,r){return(0,g.yG)(function(P){this.lc("Failed to "+a+" with cast v2 channel. Error code: "+P.code); P.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.lc("Retrying "+a+" using MDx browser channel."),vg(this,a,r))},e)},mE=function(e,a,r,P){P=P===void 0?!1:P; g.aK.call(this);var B=this;this.Z=NaN;this.Eo=!1;this.N=this.Y=this.oH=this.TQ=NaN;this.HW=[];this.C=this.D=this.L=this.S=this.T=null;this.e1=e;this.Cf=P;this.HW.push(g.Eu(window,"beforeunload",function(){B.Es(2)})); this.B=[];this.S=new l$;this.XM=a.id;this.Lf=a.idType;this.T=tAZ(this.e1,r,this.Sx,this.Lf=="shortLived",this.XM);this.T.listen("channelOpened",function(){ihZ(B)}); this.T.listen("channelClosed",function(){SM("Channel closed");isNaN(B.Z)?U1(!0):U1();B.dispose()}); this.T.listen("channelError",function(h){U1();isNaN(B.Qg())?(h==1&&B.Lf=="shortLived"&&B.publish("browserChannelAuthError",h),SM("Channel error: "+h+" without reconnection"),B.dispose()):(B.Eo=!0,SM("Channel error: "+h+" with reconnection in "+B.Qg()+" ms"),sf(B,2))}); this.T.listen("channelMessage",function(h){zxl(B,h)}); this.T.Wi(a.token);this.subscribe("remoteQueueChange",function(){var h=B.S.videoId;g.Wh()&&g.Vy("yt-remote-session-video-id",h)})},NlN=function(e){return g.tw(e.B,function(a){return a.type=="LOUNGE_SCREEN"})},SM=function(e){ai("conn",e)},sf=function(e,a){e.publish("proxyStateChange",a)},x8G=function(e){e.Z=g.Tu(function(){SM("Connecting timeout"); e.Es(1)},2E4)},I4l=function(e){g.fK(e.Z); e.Z=NaN},HhG=function(e){g.fK(e.TQ); e.TQ=NaN},vrl=function(e){q3B(e); e.oH=g.Tu(function(){F3(e,"getNowPlaying")},2E4)},q3B=function(e){g.fK(e.oH); e.oH=NaN},ihZ=function(e){SM("Channel opened"); e.Eo&&(e.Eo=!1,HhG(e),e.TQ=g.Tu(function(){SM("Timing out waiting for a screen.");e.Es(1)},15E3))},S3B=function(e,a){var r=null; if(a){var P=NlN(e);P&&(r={clientName:P.clientName,deviceMake:P.brand,deviceModel:P.model,osVersion:P.osVersion})}g.KL("yt.mdx.remote.remoteClient_",r);a&&(I4l(e),HhG(e));r=e.T.sX()&&isNaN(e.Z);a==r?a&&(sf(e,1),F3(e,"getSubtitlesTrack")):a?(e.UW()&&e.S.reset(),sf(e,1),F3(e,"getNowPlaying"),RxG(e)):e.Es(1)},syb=function(e,a){var r=a.params.videoId; delete a.params.videoId;r==e.S.videoId&&(g.Ak(a.params)?e.S.trackData=null:e.S.trackData=a.params,e.publish("remotePlayerChange"))},m85=function(e,a,r){var P=a.params.videoId||a.params.video_id,B=parseInt(a.params.currentIndex,10); e.S.listId=a.params.listId||e.S.listId;pI(e.S,P,B);e.publish("remoteQueueChange",r)},Mba=function(e,a){a.params=a.params||{}; m85(e,a,"NOW_PLAYING_MAY_CHANGE");FUG(e,a);e.publish("autoplayDismissed")},FUG=function(e,a){var r=parseInt(a.params.currentTime||a.params.current_time,10); Yy(e.S,isNaN(r)?0:r);r=parseInt(a.params.state,10);r=isNaN(r)?-1:r;r==-1&&e.S.playerState==-1E3&&(r=-1E3);e.S.playerState=r;r=Number(a.params.loadedTime);e.S.Y=isNaN(r)?0:r;e.S.q2(Number(a.params.duration));r=e.S;var P=Number(a.params.liveIngestionTime);r.S=P;r.L=isNaN(P)?!1:!0;r=e.S;P=Number(a.params.seekableStartTime);a=Number(a.params.seekableEndTime);r.T=isNaN(P)?0:P;r.D=isNaN(a)?0:a;e.S.playerState==1?vrl(e):q3B(e);e.publish("remotePlayerChange")},jyV=function(e,a){if(e.S.playerState!=-1E3){var r= 1085; switch(parseInt(a.params.adState,10)){case 1:r=1081;break;case 2:r=1084;break;case 0:r=1083}e.S.playerState=r;a=parseInt(a.params.currentTime,10);Yy(e.S,isNaN(a)?0:a);e.publish("remotePlayerChange")}},uzN=function(e,a){var r=a.params.muted=="true"; e.S.volume=parseInt(a.params.volume,10);e.S.muted=r;e.publish("remotePlayerChange")},KUZ=function(e,a){e.D=a.params.videoId; e.publish("nowAutoplaying",parseInt(a.params.timeout,10))},eN5=function(e,a){e.D=a.params.videoId||null; e.publish("autoplayUpNext",e.D)},a6G=function(e,a){e.C=a.params.autoplayMode; e.publish("autoplayModeChange",e.C);e.C=="DISABLED"&&e.publish("autoplayDismissed")},rp5=function(e,a){var r=a.params.hasNext=="true"; e.S.Mj=a.params.hasPrevious=="true";e.S.fq=r;e.publish("previousNextChange")},zxl=function(e,a){a=a.message; a.params?SM("Received: action="+a.action+", params="+g.Hy(a.params)):SM("Received: action="+a.action+" {}");switch(a.action){case "loungeStatus":a=rK(a.params.devices);e.B=g.ba(a,function(P){return new ov(P)}); a=!!g.tw(e.B,function(P){return P.type=="LOUNGE_SCREEN"}); S3B(e,a);a=e.zD("mlm");e.publish("multiStateLoopEnabled",a);break;case "loungeScreenDisconnected":g.$9(e.B,function(P){return P.type=="LOUNGE_SCREEN"}); S3B(e,!1);break;case "remoteConnected":var r=new ov(rK(a.params.device));g.tw(e.B,function(P){return P.equals(r)})||Pe8(e.B,r); break;case "remoteDisconnected":r=new ov(rK(a.params.device));g.$9(e.B,function(P){return P.equals(r)}); break;case "gracefulDisconnect":break;case "playlistModified":m85(e,a,"QUEUE_MODIFIED");break;case "nowPlaying":Mba(e,a);break;case "onStateChange":FUG(e,a);break;case "onAdStateChange":jyV(e,a);break;case "onVolumeChanged":uzN(e,a);break;case "onSubtitlesTrackChanged":syb(e,a);break;case "nowAutoplaying":KUZ(e,a);break;case "autoplayDismissed":e.publish("autoplayDismissed");break;case "autoplayUpNext":eN5(e,a);break;case "onAutoplayModeChanged":a6G(e,a);break;case "onHasPreviousNextChanged":rp5(e, a);break;case "requestAssistedSignIn":e.publish("assistedSignInRequested",a.params.authCode);break;case "onLoopModeChanged":e.publish("loopModeChange",a.params.loopMode);break;default:SM("Unrecognized action: "+a.action)}},RxG=function(e){g.fK(e.N); e.N=g.Tu(function(){e.Es(1)},864E5)},F3=function(e,a,r){r?SM("Sending: action="+a+", params="+g.Hy(r)):SM("Sending: action="+a); e.T.sendMessage(a,r)},Ps8=function(e){cg.call(this,"ScreenServiceProxy"); this.a4=e;this.S=[];this.S.push(this.a4.$_s("screenChange",(0,g.yG)(this.OR,this)));this.S.push(this.a4.$_s("onlineScreenChange",(0,g.yG)(this.c9d,this)))},nZN=function(e,a){PQb(); if(!C9||!C9.get("yt-remote-disable-remote-module-for-dev")){a=g.IM("MDX_CONFIG")||a;mrG();uw8();MV||(MV=new ur(a?a.loungeApiHost:void 0),BuG()&&(MV.S="/api/loungedev"));jM||(jM=g.aZ("yt.mdx.remote.deferredProxies_")||[],g.KL("yt.mdx.remote.deferredProxies_",jM));BhN();var r=u$();if(!r){var P=new X3(MV,a?a.disableAutomaticScreenCache||!1:!1);g.KL("yt.mdx.remote.screenService_",P);r=u$();var B={};a&&(B={appId:a.appId,disableDial:a.disableDial,theme:a.theme,loadCastApiSetupScript:a.loadCastApiSetupScript, disableCastApi:a.disableCastApi,enableDialLoungeToken:a.enableDialLoungeToken,enableCastLoungeToken:a.enableCastLoungeToken,forceMirroring:a.forceMirroring});g.KL("yt.mdx.remote.enableConnectWithInitialState_",a?a.enableConnectWithInitialState||!1:!1);Zh5(e,P,function(h){h?KI()&&Wg(KI(),"YouTube TV"):P.subscribe("onlineScreenChange",function(){GU("yt-remote-receiver-availability-change")})},B)}a&&!g.aZ("yt.mdx.remote.initialized_")&&(g.KL("yt.mdx.remote.initialized_",!0),e1("Initializing: "+g.Hy(a)), ae.push(g.jA("yt-remote-cast2-api-ready",function(){GU("yt-remote-api-ready")})),ae.push(g.jA("yt-remote-cast2-availability-change",function(){GU("yt-remote-receiver-availability-change")})),ae.push(g.jA("yt-remote-cast2-receiver-selected",function(){rR(null); GU("yt-remote-auto-connect","cast-selector-receiver")})),ae.push(g.jA("yt-remote-cast2-receiver-resumed",function(){GU("yt-remote-receiver-resumed","cast-selector-receiver")})),ae.push(g.jA("yt-remote-cast2-session-change",hN5)),ae.push(g.jA("yt-remote-connection-change",function(h){h?Wg(KI(),"YouTube TV"):Pk()||(Wg(null,null),JB5())})),ae.push(g.jA("yt-remote-cast2-session-failed",function(){GU("yt-remote-connection-failed")})),e=cp5(),a.isAuto&&(e.id+="#dial"),B=a.capabilities||[],B.length>0&&(e.capabilities= B),e.name=a.device,e.app=a.app,(a=a.theme)&&(e.theme=a),e1(" -- with channel params: "+g.Hy(e)),e?(g.Vy("yt-remote-session-app",e.app),g.Vy("yt-remote-session-name",e.name)):(g.Qy("yt-remote-session-app"),g.Qy("yt-remote-session-name")),g.KL("yt.mdx.remote.channelParams_",e),r.start(),KI()||oZN())}},ypV=function(){var e=u$().a4.$_gos(); var a=Bk();a&&hf()&&(sf9(e,a)||e.push(a));return SP8(e)},XWG=function(){var e=Thw(); !e&&$y()&&d8w()&&(e={key:"cast-selector-receiver",name:d8w()});return e},Thw=function(){var e=ypV(),a=Bk(); a||(a=Pk());return g.tw(e,function(r){return a&&y1(a,r.key)?!0:!1})},Bk=function(){var e=KI(); if(!e)return null;var a=u$().Ue();return Xk(a,e)},hN5=function(e){e1("remote.onCastSessionChange_: "+TU(e)); if(e){var a=Bk();if(a&&a.id==e.id){if(Wg(a.id,"YouTube TV"),e.idType=="shortLived"&&(e=e.token))ck&&(ck.token=e),(a=hf())&&a.Wi(e)}else a&&oe(),ns(e,1)}else hf()&&oe()},oe=function(){Qu()?Vu().stopSession():Db("stopSession called before API ready."); var e=hf();e&&(e.disconnect(1),f6N(null))},ApG=function(){var e=hf(); return!!e&&e.getProxyState()!=3},e1=function(e){ai("remote",e)},u$=function(){if(!U9l){var e=g.aZ("yt.mdx.remote.screenService_"); U9l=e?new Ps8(e):null}return U9l},KI=function(){return g.aZ("yt.mdx.remote.currentScreenId_")},CsZ=function(e){g.KL("yt.mdx.remote.currentScreenId_",e)},GGN=function(){return g.aZ("yt.mdx.remote.connectData_")},rR=function(e){g.KL("yt.mdx.remote.connectData_",e)},hf=function(){return g.aZ("yt.mdx.remote.connection_")},f6N=function(e){var a=hf(); rR(null);e||CsZ("");g.KL("yt.mdx.remote.connection_",e);jM&&(g.FN(jM,function(r){r(e)}),jM.length=0); a&&!e?GU("yt-remote-connection-change",!1):!a&&e&&GU("yt-remote-connection-change",!0)},Pk=function(){var e=g.Wh(); if(!e)return null;var a=u$();if(!a)return null;a=a.Ue();return Xk(a,e)},ns=function(e,a){KI(); Bk()&&Bk();if(yO)ck=e;else{CsZ(e.id);var r=g.aZ("yt.mdx.remote.enableConnectWithInitialState_")||!1;e=new mE(MV,e,cp5(),r);e.connect(a,GGN());e.subscribe("beforeDisconnect",function(P){GU("yt-remote-before-disconnect",P)}); e.subscribe("beforeDispose",function(){hf()&&(hf(),f6N(null))}); e.subscribe("browserChannelAuthError",function(){var P=Bk();P&&P.idType=="shortLived"&&(Qu()?Vu().handleBrowserChannelAuthError():Db("refreshLoungeToken called before API ready."))}); f6N(e)}},oZN=function(){var e=Pk(); e?(e1("Resume connection to: "+TU(e)),ns(e,0)):(U1(),JB5(),e1("Skipping connecting because no session screen found."))},BhN=function(){var e=cp5(); if(g.Ak(e)){e=Aj();var a=g.$f("yt-remote-session-name")||"",r=g.$f("yt-remote-session-app")||"";e={device:"REMOTE_CONTROL",id:e,name:a,app:r,mdxVersion:3};e.authuser=String(g.IM("SESSION_INDEX","0"));(a=g.IM("DELEGATED_SESSION_ID"))&&(e.pageId=String(a));g.KL("yt.mdx.remote.channelParams_",e)}},cp5=function(){return g.aZ("yt.mdx.remote.channelParams_")||{}},ts8=function(e,a,r){g.N.call(this); var P=this;this.S=e;this.W=a;this.rW=r;this.events=new g.Zc(this);this.C=!1;this.Z=new g.Q9(64);this.T=new g.vP(this.n$,500,this);this.B=new g.vP(this.SY,1E3,this);this.Y=new tj(this.vKQ,0,this);this.L={};this.N=new g.vP(this.Rw,1E3,this);this.D=new g.Me(this.seekTo,1E3,this);this.HW=this.events.j(this.W,"onVolumeChange",function(B){EZG(P,B)}); g.x(this,this.events);this.events.j(a,"onCaptionsTrackListChanged",this.WLP);this.events.j(a,"captionschanged",this.Azr);this.events.j(a,"captionssettingschanged",this.K$);this.events.j(a,"videoplayerreset",this.r3);this.events.j(a,"mdxautoplaycancel",function(){P.rW.PP()}); a.X("enable_mdx_video_play_directly")&&this.events.j(a,"videodatachange",function(){b45(P.S)||Tw(P)||XV(P,0)}); e=this.rW;e.wP();e.subscribe("proxyStateChange",this.lA,this);e.subscribe("remotePlayerChange",this.Jd,this);e.subscribe("remoteQueueChange",this.r3,this);e.subscribe("previousNextChange",this.Lu,this);e.subscribe("nowAutoplaying",this.Rr,this);e.subscribe("autoplayDismissed",this.GY,this);g.x(this,this.T);g.x(this,this.B);g.x(this,this.Y);g.x(this,this.N);g.x(this,this.D);this.K$();this.r3();this.Jd()},EZG=function(e,a){if(Tw(e)){e.rW.unsubscribe("remotePlayerChange",e.Jd,e); var r=Math.round(a.volume);a=!!a.muted;var P=NV(e.rW);if(r!==P.volume||a!==P.muted)e.rW.setVolume(r,a),e.N.start();e.rW.subscribe("remotePlayerChange",e.Jd,e)}},gZb=function(e){e.j5(0); e.T.stop();e.S5(new g.Q9(64))},Z4N=function(e,a){if(Tw(e)&&!e.C){var r=null; a&&(r={style:e.W.getSubtitlesUserSettings()},Object.assign(r,a));e.rW.o_(e.W.getVideoData(1).videoId,r);e.L=NV(e.rW).trackData}},XV=function(e,a){var r=e.W.getPlaylist(); if(r==null?0:r.listId){var P=r.index;var B=r.listId.toString()}r=e.W.getVideoData(1);e.rW.playVideo(r.videoId,a,P,B,r.playerParams,r.e1,rl9(r));e.S5(new g.Q9(1))},O4Z=function(e,a){if(a){var r=e.W.getOption("captions","tracklist",{WR:1}); r&&r.length?(e.W.setOption("captions","track",a),e.C=!1):(e.W.loadModule("captions"),e.C=!0)}else e.W.setOption("captions","track",{})},Tw=function(e){return NV(e.rW).videoId===e.W.getVideoData(1).videoId},kGN=function(e,a){g.M3.call(this,e); this.S=a},fs=function(){g.v.call(this,{K:"div", U:"ytp-mdx-popup-dialog",J:{role:"dialog"},V:[{K:"div",U:"ytp-mdx-popup-dialog-inner-content",V:[{K:"div",U:"ytp-mdx-popup-title",S1:"You're signed out"},{K:"div",U:"ytp-mdx-popup-description",S1:"Videos that you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer."},{K:"div",U:"ytp-mdx-privacy-popup-buttons",V:[{K:"button",WW:["ytp-button","ytp-mdx-privacy-popup-cancel"],S1:"Cancel"},{K:"button",WW:["ytp-button", "ytp-mdx-privacy-popup-confirm"],S1:"Confirm"}]}]}]});this.fade=new g.jq(this,250);this.cancelButton=this.BW("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.BW("ytp-mdx-privacy-popup-confirm");g.x(this,this.fade);this.j(this.cancelButton,"click",this.S);this.j(this.confirmButton,"click",this.T)},Af=function(e){g.v.call(this,{K:"div", U:"ytp-remote",V:[{K:"div",U:"ytp-remote-display-status",V:[{K:"div",U:"ytp-remote-display-status-icon",V:[g.yJj()]},{K:"div",U:"ytp-remote-display-status-text",S1:"{{statustext}}"}]}]});this.api=e;this.fade=new g.jq(this,250);g.x(this,this.fade);this.j(e,"presentingplayerstatechange",this.onStateChange);this.dg(e.getPlayerStateObject())},US=function(e,a){g.x7.call(this,"Play on",1,e,a); this.W=e;this.Q4={};this.j(e,"onMdxReceiversChange",this.L);this.j(e,"presentingplayerstatechange",this.L);this.L()},d95=function(e){g.Vn.call(this,e); this.Tf={key:R_8(),name:"This computer"};this.Br=null;this.subscriptions=[];this.q3=this.rW=null;this.Q4=[this.Tf];this.gC=this.Tf;this.kf=new g.Q9(64);this.Jm=0;this.In=-1;this.T5=!1;this.K5=this.RM=this.Tc=null;if(!g.hZ(this.player.G())&&!g.L$(this.player.G())){e=this.player;var a=g.lL(e);a&&(a=a.Ch())&&(a=new US(e,a),g.x(this,a));a=new Af(e);g.x(this,a);g.MY(e,a.element,4);this.Tc=new fs;g.x(this,this.Tc);g.MY(e,this.Tc.element,4);this.T5=!!Pk()}},Cs=function(e){e.RM&&(e.player.removeEventListener("presentingplayerstatechange", e.RM),e.RM=null)},Jpa=function(e,a,r){e.kf=r; e.player.publish("presentingplayerstatechange",new g.n$(r,a))},Gw=function(e,a){if(a.key!==e.gC.key)if(a.key===e.Tf.key)oe(); else if(b45(e)&&D9G(e),e.gC=a,!e.player.G().X("disable_mdx_connection_in_mdx_module_for_music_web")||!g.L$(e.player.G())){var r=e.player.getPlaylistId();var P=e.player.getVideoData(1);var B=P.videoId;if(!r&&!B||(e.player.getAppState()===2||e.player.getAppState()===1)&&e.player.G().X("should_clear_video_data_on_player_cued_unstarted"))P=null;else{var h=e.player.getPlaylist();if(h){var c=[];for(var y=0;y2*this.size&&cL(this),!0):!1}; g.E.get=function(e,a){return BL(this.T,e)?this.T[e]:a}; g.E.set=function(e,a){BL(this.T,e)||(this.size+=1,this.S.push(e),this.HB++);this.T[e]=a}; g.E.forEach=function(e,a){for(var r=this.Yl(),P=0;P=P.S.length)return g.fd;var h=P.S[a++];return g.JV(e?h:P.T[h])}; return B}; var g2G={Z5H:"atp",NM1:"ska",WId:"que",jsW:"mus",vgo:"sus",pI$:"dsp",sZW:"seq",evf:"mic",WVP:"dpa",DQd:"mlm",KVm:"dsdtr",xQo:"ntb",PyH:"vsp",cjW:"scn",ltQ:"rpe",O8d:"dcn",LVM:"dcp",NbQ:"pas",EvH:"drq",JOo:"opf",fWd:"els",z5$:"isg",d2M:"svq",UQF:"mvp",w7P:"ads",Rq$:"stcp",GTr:"sads",IWQ:"dloc",lWf:"dcw",X7r:"asw",CQH:"apw"},ZKB={xKQ:"u",Y2r:"cl",vPm:"k",wIQ:"i",nv$:"cr",zv$:"m",FV1:"g",qx:"up"},hPG={DM:"adPlaying",fK:"onAdStateChange"},cEb={Phm:"nowPlaying",yOW:"onStateChange",DM:"adPlaying",fK:"onAdStateChange", jt:"nowPlayingShorts",cz:"onShortsStateChange"},oMN={jt:"nowPlayingShorts",cz:"onShortsStateChange"};ov.prototype.equals=function(e){return e?this.id==e.id:!1}; var jfG="",C9=null;g.b(h6N,g.wG);var E1,AJw=ofl("loadCastFramework")||ofl("loadCastApplicationFramework"),GnG=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.UG(tj,g.N);g.E=tj.prototype;g.E.Y7=function(e){this.L=arguments;this.S=!1;this.JC?this.B=g.f5()+this.FG:this.JC=g.zQ(this.C,this.FG)}; g.E.stop=function(){this.JC&&(g.uq.clearTimeout(this.JC),this.JC=null);this.B=null;this.S=!1;this.L=[]}; g.E.pause=function(){++this.T}; g.E.resume=function(){this.T&&(--this.T,!this.T&&this.S&&(this.S=!1,this.Z.apply(null,this.L)))}; g.E.RH=function(){this.stop();tj.Tl.RH.call(this)}; g.E.Jk=function(){this.JC&&(g.uq.clearTimeout(this.JC),this.JC=null);this.B?(this.JC=g.zQ(this.C,this.B-g.f5()),this.B=null):this.T?this.S=!0:(this.S=!1,this.Z.apply(null,this.L))};gK.prototype.stringify=function(e){return g.uq.JSON.stringify(e,void 0)}; gK.prototype.parse=function(e){return g.uq.JSON.parse(e,void 0)};g.UG(bEB,g.se);g.UG(t$V,g.se);var gfB=null;g.UG(OEb,g.se);g.UG(knb,g.se);g.UG(dlB,g.se);dK.prototype.debug=function(){}; dK.prototype.info=function(){}; dK.prototype.warning=function(){};var Lia={},l19={};g.E=Jj.prototype;g.E.setTimeout=function(e){this.k$=e}; g.E.yp=function(e){e=e.target;var a=this.GQ;a&&g.mK(e)==3?a.iN():this.jb(e)}; g.E.jb=function(e){try{if(e==this.S)a:{var a=g.mK(this.S),r=this.S.T,P=this.S.getStatus();if(!(a<3)&&(a!=3||this.S&&(this.T.B||g.M_(this.S)||g.jC(this.S)))){this.Cf||a!=4||r==7||(r==8||P<=0?Zv(3):Zv(2));ph5(this);var B=this.S.getStatus();this.bv=B;var h=WiB(this);if(this.Z=B==200){if(this.T$&&!this.Uo){b:{if(this.S){var c=g.uE(this.S,"X-HTTP-Initial-Response");if(c&&!g.Wd(c)){var y=c;break b}}y=null}if(e=y)this.Uo=!0,R6N(this,e);else{this.Z=!1;this.C=3;O1(12);V1(this);$a(this);break a}}if(this.Lf){e= !0;for(var T;!this.Cf&&this.D0&&!this.ID&&(this.ID=!0,this.B.oN(this)):(V1(this),$a(this))}else R6N(this,h);a==4&&V1(this);this.Z&&!this.Cf&&(a==4?iEZ(this.B,this):(this.Z=!1,Dv(this)))}else g.b6I(this.S),B==400&&h.indexOf("Unknown SID")> 0?(this.C=3,O1(12)):(this.C=0,O1(13)),V1(this),$a(this)}}}catch(X){}finally{}}; g.E.cancel=function(){this.Cf=!0;V1(this)}; g.E.GI=function(){this.HW=null;var e=Date.now();e-this.rP>=0?(this.XM!=2&&(Zv(3),O1(17)),V1(this),this.C=2,$a(this)):wha(this,this.rP-e)}; g.E.getLastError=function(){return this.C}; g.E.I3=function(){return this.S};s69.prototype.cancel=function(){this.B=FiG(this);if(this.T)this.T.cancel(),this.T=null;else if(this.S&&this.S.size!==0){for(var e=g.Z(this.S.values()),a=e.next();!a.done;a=e.next())a.value.cancel();this.S.clear()}};g.E=KiG.prototype;g.E.zk=8;g.E.Mq=1;g.E.connect=function(e,a,r,P){O1(0);this.h9=e;this.Cf=a||{};r&&P!==void 0&&(this.Cf.OSID=r,this.Cf.OAID=P);this.Uo=this.dW;this.e1=HEG(this,null,this.h9);L9(this)}; g.E.disconnect=function(){aIB(this);if(this.Mq==3){var e=this.ym++,a=this.e1.clone();g.Tk(a,"SID",this.L);g.Tk(a,"RID",e);g.Tk(a,"TYPE","terminate");p9(this,a);e=new Jj(this,this.L,e);e.XM=2;e.Y=eI(a.clone());a=!1;if(g.uq.navigator&&g.uq.navigator.sendBeacon)try{a=g.uq.navigator.sendBeacon(e.Y.toString(),"")}catch(r){}!a&&g.uq.Image&&((new Image).src=e.Y,a=!0);a||(e.S=$lG(e.B,null),e.S.send(e.Y));e.TQ=Date.now();Dv(e)}ohV(this)}; g.E.iQ=function(){return this.Mq==0}; g.E.getState=function(){return this.Mq}; g.E.mX=function(e){if(this.Z)if(this.Z=null,this.Mq==1){if(!e){this.ym=Math.floor(Math.random()*1E5);e=this.ym++;var a=new Jj(this,"",e),r=this.N;this.bv&&(r?(r=g.GX(r),g.bO(r,this.bv)):r=this.bv);this.D!==null||this.rP||(a.e1=r,r=null);var P;if(this.HA)a:{for(var B=P=0;B4096){P=B;break a}if(P===4096||B===this.B.length-1){P=B+1;break a}}P= 1E3}else P=1E3;P=B19(this,a,P);B=this.e1.clone();g.Tk(B,"RID",e);g.Tk(B,"CVER",22);this.Lf&&g.Tk(B,"X-HTTP-Session-Id",this.Lf);p9(this,B);r&&(this.rP?P="headers="+g.VC(g.x1L(r))+"&"+P:this.D&&g.UC(B,this.D,r));I1w(this.T,a);this.t1&&g.Tk(B,"TYPE","init");this.HA?(g.Tk(B,"$req",P),g.Tk(B,"SID","null"),a.T$=!0,V$G(a,B,null)):V$G(a,B,P);this.Mq=2}}else this.Mq==3&&(e?hXG(this,e):this.B.length==0||mlM(this.T)||hXG(this))}; g.E.fk=function(){this.Y=null;c7b(this);if(this.J9&&!(this.k$||this.S==null||this.Q2<=0)){var e=4*this.Q2;this.Eo=ka((0,g.yG)(this.xFW,this),e)}}; g.E.xFW=function(){this.Eo&&(this.Eo=null,this.Uo=!1,this.k$=!0,O1(10),WL(this),c7b(this))}; g.E.oN=function(e){this.S==e&&this.J9&&!this.k$&&(eXB(this),this.k$=!0,O1(11))}; g.E.qv=function(){this.HW!=null&&(this.HW=null,WL(this),NuZ(this),O1(19))}; g.E.DCM=function(e){e?O1(2):O1(1)}; g.E.isActive=function(){return!!this.C&&this.C.isActive(this)}; g.E=y7w.prototype;g.E.A0=function(){}; g.E.xt=function(){}; g.E.t0=function(){}; g.E.h0=function(){}; g.E.isActive=function(){return!0}; g.E.FC=function(){};g.UG(zU,g.AP);zU.prototype.open=function(){this.S.C=this.B;this.Z&&(this.S.XM=!0);this.S.connect(this.C,this.T||void 0)}; zU.prototype.close=function(){this.S.disconnect()}; zU.prototype.send=function(e){var a=this.S;if(typeof e==="string"){var r={};r.__data__=e;e=r}else this.L&&(r={},r.__data__=g.Hy(e),e=r);a.B.push(new SuN(a.FI++,e));a.Mq==3&&L9(a)}; zU.prototype.RH=function(){this.S.C=null;delete this.B;this.S.disconnect();delete this.S;zU.Tl.RH.call(this)}; g.UG(XUl,bEB);g.UG(fI5,t$V);g.UG(ir,y7w);ir.prototype.A0=function(){this.S.dispatchEvent("m")}; ir.prototype.xt=function(e){this.S.dispatchEvent(new XUl(e))}; ir.prototype.t0=function(e){this.S.dispatchEvent(new fI5(e))}; ir.prototype.h0=function(){this.S.dispatchEvent("n")};var xa=new g.AP;g.b(CkN,g.se);g.E=HL.prototype;g.E.OD=null;g.E.Pi=!1;g.E.xq=null;g.E.b8=null;g.E.U$=null;g.E.qM=null;g.E.Xi=null;g.E.GZ=null;g.E.Id=null;g.E.I$=null;g.E.k6=0;g.E.tE=null;g.E.FL=null;g.E.Lg=null;g.E.Dd=-1;g.E.cD=!0;g.E.QQ=!1;g.E.Rf=0;g.E.Ju=null;var Zlw={},ghB={};g.E=HL.prototype;g.E.setTimeout=function(e){this.T=e}; g.E.Vp=function(e){e=e.target;var a=this.Ju;a&&g.mK(e)==3?a.iN():this.P3(e)}; g.E.P3=function(e){try{if(e==this.I$)a:{var a=g.mK(this.I$),r=this.I$.T,P=this.I$.getStatus();if(g.T7&&!g.x8("420+")){if(a<4)break a}else if(a<3||a==3&&!g.M_(this.I$))break a;this.QQ||a!=4||r==7||(r==8||P<=0?this.S.JD(3):this.S.JD(2));dUb(this);var B=this.I$.getStatus();this.Dd=B;var h=g.M_(this.I$);if(this.Pi=B==200){a==4&&q2(this);if(this.Lf){for(e=!0;!this.QQ&&this.k60?(this.Lg=3,Iv(13)):(this.Lg=0,Iv(14)),q2(this),J7M(this)}}catch(y){}finally{}}; g.E.cancel=function(){this.QQ=!0;q2(this)}; g.E.k7=function(){this.xq=null;var e=Date.now();e-this.b8>=0?(this.qM!=2&&this.S.JD(3),q2(this),this.Lg=2,Iv(18),J7M(this)):kEw(this,this.b8-e)}; g.E.getLastError=function(){return this.Lg};g.E=Qq8.prototype;g.E.BK=null;g.E.Oe=null;g.E.UC=!1;g.E.LZ=null;g.E.oZ=null;g.E.uP=-1;g.E.Vi=null;g.E.wz=null;g.E.connect=function(e){this.LZ=e;e=Rv(this.S,null,this.LZ);Iv(3);Date.now();var a=this.S.N;a!=null?(this.Vi=a[0],(this.wz=a[1])?(this.oZ=1,WQB(this)):(this.oZ=2,lIV(this))):(av(e,"MODE","init"),this.Oe=new HL(this),this.Oe.OD=this.BK,blB(this.Oe,e,!1,null,!0),this.oZ=0)}; g.E.wm=function(e){if(e)this.oZ=2,lIV(this);else{Iv(4);var a=this.S;a.eV=a.Tz.uP;Fk(a,9)}e&&this.JD(2)}; g.E.TN=function(e){return this.S.TN(e)}; g.E.abort=function(){this.Oe&&(this.Oe.cancel(),this.Oe=null);this.uP=-1}; g.E.iQ=function(){return!1}; g.E.Yt=function(e,a){this.uP=e.Dd;if(this.oZ==0)if(a){try{var r=this.T.parse(a)}catch(P){e=this.S;e.eV=this.uP;Fk(e,2);return}this.Vi=r[0];this.wz=r[1]}else e=this.S,e.eV=this.uP,Fk(e,2);else this.oZ==2&&(this.UC?(Iv(7),Date.now()):a=="11111"?(Iv(6),this.UC=!0,Date.now(),this.uP=200,this.Oe.cancel(),Iv(12),SI(this.S,this,!0)):(Iv(8),Date.now(),this.UC=!1))}; g.E.gS=function(){this.uP=this.Oe.Dd;if(this.Oe.Pi)this.oZ==0?this.wz?(this.oZ=1,WQB(this)):(this.oZ=2,lIV(this)):this.oZ==2&&(this.UC?(Iv(12),SI(this.S,this,!0)):(Iv(11),SI(this.S,this,!1)));else{this.oZ==0?Iv(9):this.oZ==2&&Iv(10);var e=this.S;this.Oe.getLastError();e.eV=this.uP;Fk(e,2)}}; g.E.jS=function(){return this.S.jS()}; g.E.isActive=function(){return this.S.isActive()}; g.E.JD=function(e){this.S.JD(e)};g.E=LQ9.prototype;g.E.nW=null;g.E.z7=null;g.E.WI=null;g.E.R4=null;g.E.EK=null;g.E.MM=null;g.E.J0=null;g.E.If=null;g.E.fz=0;g.E.vF=0;g.E.v7=null;g.E.YE=null;g.E.HS=null;g.E.Kg=null;g.E.Tz=null;g.E.Pp=null;g.E.dO=-1;g.E.Gk=-1;g.E.eV=-1;g.E.Px=0;g.E.AK=0;g.E.ED=8;var VsZ={OK:0,QZM:2,OqW:4,dQW:5,tQz:6,STOP:7,Ur:8,QnM:9,we1:10,Xem:11,Q4P:12};g.UG(wU8,g.se);g.UG(pUG,g.se);g.E=LQ9.prototype; g.E.connect=function(e,a,r,P,B){Iv(0);this.EK=a;this.z7=r||{};P&&B!==void 0&&(this.z7.OSID=P,this.z7.OAID=B);this.Y?(N2((0,g.yG)(this.ez,this,e),100),zXN(this)):this.ez(e)}; g.E.disconnect=function(){N1V(this);if(this.S==3){var e=this.fz++,a=this.MM.clone();g.Tk(a,"SID",this.L);g.Tk(a,"RID",e);g.Tk(a,"TYPE","terminate");my(this,a);e=new HL(this,this.L,e);e.qM=2;e.Xi=eI(a.clone());(new Image).src=e.Xi.toString();e.U$=Date.now();tV8(e)}FQV(this)}; g.E.ez=function(e){this.Tz=new Qq8(this);this.Tz.BK=this.nW;this.Tz.T=this.C;this.Tz.connect(e)}; g.E.iQ=function(){return this.S==0}; g.E.getState=function(){return this.S}; g.E.qn=function(e){this.YE=null;vhV(this,e)}; g.E.yv=function(){this.HS=null;this.R4=new HL(this,this.L,"rpc",this.D);this.R4.OD=this.nW;this.R4.Rf=0;var e=this.J0.clone();g.Tk(e,"RID","rpc");g.Tk(e,"SID",this.L);g.Tk(e,"CI",this.Pp?"0":"1");g.Tk(e,"AID",this.dO);my(this,e);g.Tk(e,"TYPE","xmlhttp");blB(this.R4,e,!0,this.If,!1)}; g.E.Yt=function(e,a){if(this.S!=0&&(this.R4==e||this.WI==e))if(this.eV=e.Dd,this.WI==e&&this.S==3)if(this.ED>7){try{var r=this.C.parse(a)}catch(P){r=null}if(Array.isArray(r)&&r.length==3)if(e=r,e[0]==0)a:{if(!this.HS){if(this.R4)if(this.R4.U$+3E30)){if(P=a==1)this.WI||this.YE||this.S==1||this.Px>=2?P=!1:(this.YE=N2((0,g.yG)(this.qn,this,e),SvB(this,this.Px)),this.Px++, P=!0);P=!(P||a==2&&sqa(this))}if(P)switch(r){case 1:Fk(this,5);break;case 4:Fk(this,10);break;case 3:Fk(this,6);break;case 7:Fk(this,12);break;default:Fk(this,2)}}}; g.E.Mv=function(e){if(!g.ZB(arguments,this.S))throw Error("Unexpected channel state: "+this.S);}; g.E.QUW=function(e){e?Iv(2):(Iv(1),mUG(this,8))}; g.E.TN=function(e){if(e)throw Error("Can't create secondary domain capable XhrIo object.");e=new g.Rt;e.D=!1;return e}; g.E.isActive=function(){return!!this.v7&&this.v7.isActive(this)}; g.E.JD=function(e){var a=xa;a.dispatchEvent(new pUG(a,e))}; g.E.jS=function(){return!1}; g.E=MVN.prototype;g.E.Vv=function(){}; g.E.kt=function(){}; g.E.Mn=function(){}; g.E.Fs=function(){}; g.E.KZ=function(){}; g.E.v3=function(){return{}}; g.E.isActive=function(){return!0};g.E=jqB.prototype;g.E.enqueue=function(e){this.T.push(e)}; g.E.isEmpty=function(){return this.S.length===0&&this.T.length===0}; g.E.clear=function(){this.S=[];this.T=[]}; g.E.contains=function(e){return g.ZB(this.S,e)||g.ZB(this.T,e)}; g.E.remove=function(e){var a=this.S;var r=(0,g.VaN)(a,e);r>=0?(g.OG(a,r),a=!0):a=!1;return a||g.k9(this.T,e)}; g.E.XP=function(){for(var e=[],a=this.S.length-1;a>=0;--a)e.push(this.S[a]);a=this.T.length;for(var r=0;r=$9G.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(e=$9G[this.T],this.JC=g.Tu((0,g.yG)(this.NN,this),e),this.T++):this.publish("pairingFailed",Error("Server error "+e.status))}; g.E.Se=function(){this.S=null;this.publish("pairingFailed",Error("Server not responding"))}; var $9G=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.UG(nI,cg);g.E=nI.prototype;g.E.start=function(){oi(this)&&this.publish("screenChange");!g.$f("yt-remote-lounge-token-expiration")&&lHN(this);g.fK(this.S);this.S=g.Tu((0,g.yG)(this.start,this),1E4)}; g.E.add=function(e,a){oi(this);VAl(this,e);yu(this,!1);this.publish("screenChange");a(e);e.token||lHN(this)}; g.E.remove=function(e,a){var r=oi(this);QrN(this,e)&&(yu(this,!1),r=!0);a(e);r&&this.publish("screenChange")}; g.E.xi=function(e,a,r,P){var B=oi(this),h=this.get(e.id);h?(h.name!=a&&(h.name=a,yu(this,!1),B=!0),r(e)):P(Error("no such local screen."));B&&this.publish("screenChange")}; g.E.RH=function(){g.fK(this.S);nI.Tl.RH.call(this)}; g.E.tV=function(e){oi(this);var a=this.screens.length;e=e&&e.screens||[];for(var r=e.length,P=0;P20)break a;y=a(h,c)}h=y}B.name=h}r(fI(this,B))},this), onError:(0,g.yG)(function(B){P(Error("pairing request failed: "+B.status))},this), onTimeout:(0,g.yG)(function(){P(Error("pairing request timed out."))},this)})}; g.E.RH=function(){g.Pe(this.T);g.Pe(this.S);X3.Tl.RH.call(this)}; g.E.FB=function(){vMl(this);this.publish("screenChange");this.S.update()}; X3.prototype.dispose=X3.prototype.dispose;g.UG(AY,g.aK);g.E=AY.prototype;g.E.xv=function(e){this.wP()||(e&&(CI(this,""+e),this.publish("sessionFailed")),this.S=null,this.publish("sessionScreen",null))}; g.E.info=function(e){ai(this.Lf,e)}; g.E.uj=function(){return null}; g.E.xR=function(e){var a=this.T;e?(a.displayStatus=new chrome.cast.ReceiverDisplayStatus(e,[]),a.displayStatus.showStop=!0):a.displayStatus=null;chrome.cast.setReceiverDisplayStatus(a,(0,g.yG)(function(){this.info("Updated receiver status for "+a.friendlyName+": "+e)},this),(0,g.yG)(function(){CI(this,"Failed to update receiver status for: "+a.friendlyName)},this))}; g.E.RH=function(){this.xR("");AY.Tl.RH.call(this)};g.b(GN,AY);g.E=GN.prototype;g.E.sY=function(e){if(this.B){if(this.B==e)return;CI(this,"Overriding cast session with new session object");rBb(this);this.TQ=!1;this.N="unknown";this.B.removeUpdateListener(this.oH);this.B.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Eo)}this.B=e;this.B.addUpdateListener(this.oH);this.B.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.Eo);jr9(this,"getMdxSessionStatus")}; g.E.w6=function(e){this.info("launchWithParams no-op for Cast: "+g.Hy(e))}; g.E.stop=function(){this.B?this.B.stop((0,g.yG)(function(){this.xv()},this),(0,g.yG)(function(){this.xv(Error("Failed to stop receiver app."))},this)):this.xv(Error("Stopping cast device without session."))}; g.E.xR=function(){}; g.E.RH=function(){this.info("disposeInternal");rBb(this);this.B&&(this.B.removeUpdateListener(this.oH),this.B.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Eo));this.B=null;AY.prototype.RH.call(this)}; g.E.C5P=function(e,a){if(!this.wP())if(a)if(a=rK(a),g.hw(a))switch(e=""+a.type,a=a.data||{},this.info("onYoutubeMessage_: "+e+" "+g.Hy(a)),e){case "mdxSessionStatus":mxG(this,a);break;case "loungeToken":um5(this,a);break;default:CI(this,"Unknown youtube message: "+e)}else CI(this,"Unable to parse message.");else CI(this,"No data in message.")}; g.E.sW=function(e,a,r,P){g.fK(this.Y);this.Y=0;IHw(this.L,this.T.label,e,this.T.friendlyName,(0,g.yG)(function(B){B?a(B):P>=0?(CI(this,"Screen "+e+" appears to be offline. "+P+" retries left."),this.Y=g.Tu((0,g.yG)(this.sW,this,e,a,r,P-1),300)):r(Error("Unable to fetch screen."))},this),r)}; g.E.uj=function(){return this.B}; g.E.RA=function(e){this.wP()||e||(CI(this,"Cast session died."),this.xv())};g.b(Ef,AY);g.E=Ef.prototype;g.E.sY=function(e){this.B=e;this.B.addUpdateListener(this.Cf)}; g.E.w6=function(e){this.e1=e;this.HW()}; g.E.stop=function(){Tlw(this);this.B?this.B.stop((0,g.yG)(this.xv,this,null),(0,g.yG)(this.xv,this,"Failed to stop DIAL device.")):this.xv()}; g.E.RH=function(){Tlw(this);this.B&&this.B.removeUpdateListener(this.Cf);this.B=null;AY.prototype.RH.call(this)}; g.E.bf=function(e){this.wP()||e||(CI(this,"DIAL session died."),this.C(),this.C=function(){},this.xv())};g.b(g5,AY);g5.prototype.stop=function(){this.xv()}; g5.prototype.sY=function(){}; g5.prototype.w6=function(){g.fK(this.B);this.B=NaN;var e=Xk(this.L.Ue(),this.T.label);e?Uf(this,e):this.xv(Error("No such screen"))}; g5.prototype.RH=function(){g.fK(this.B);this.B=NaN;AY.prototype.RH.call(this)};g.b(Zb,g.aK);g.E=Zb.prototype; g.E.init=function(e,a){chrome.cast.timeout.requestSession=3E4;var r=new chrome.cast.SessionRequest(this.Y,[chrome.cast.Capability.AUDIO_OUT]);g.CK("desktop_enable_cast_connect")&&(r.androidReceiverCompatible=!0);this.N||(r.dialRequest=new chrome.cast.DialRequest("YouTube"));var P=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;e=e||this.Z?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var B=(0,g.yG)(this.zuW,this);r=new chrome.cast.ApiConfig(r,(0,g.yG)(this.wh, this),B,P,e);r.customDialLaunchCallback=(0,g.yG)(this.rzo,this);chrome.cast.initialize(r,(0,g.yG)(function(){this.wP()||(chrome.cast.addReceiverActionListener(this.C),k49(),this.T.subscribe("onlineScreenChange",(0,g.yG)(this.H2,this)),this.B=ABV(this),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.yG)(function(h){this.lc("Failed to set initial custom receivers: "+g.Hy(h))},this)),this.publish("yt-remote-cast2-availability-change",ky(this)),a(!0))},this),(0,g.yG)(function(h){this.lc("Failed to initialize API: "+ g.Hy(h)); a(!1)},this))}; g.E.YxP=function(e,a){Of("Setting connected screen ID: "+e+" -> "+a);if(this.S){var r=this.S.S;if(!e||r&&r.id!=e)Of("Unsetting old screen status: "+this.S.T.friendlyName),d5(this,null)}if(e&&a){if(!this.S){e=Xk(this.T.Ue(),e);if(!e){Of("setConnectedScreenStatus: Unknown screen.");return}if(e.idType=="shortLived"){Of("setConnectedScreenStatus: Screen with id type to be short lived.");return}r=XCl(this,e);r||(Of("setConnectedScreenStatus: Connected receiver not custom..."),r=new chrome.cast.Receiver(e.uuid? e.uuid:e.id,e.name),r.receiverType=chrome.cast.ReceiverType.CUSTOM,this.B.push(r),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.yG)(function(P){this.lc("Failed to set initial custom receivers: "+g.Hy(P))},this))); Of("setConnectedScreenStatus: new active receiver: "+r.friendlyName);d5(this,new g5(this.T,r),!0)}this.S.xR(a)}else Of("setConnectedScreenStatus: no screen.")}; g.E.qxM=function(e){this.wP()?this.lc("Setting connection data on disposed cast v2"):this.S?this.S.w6(e):this.lc("Setting connection data without a session")}; g.E.Bq=function(){this.wP()?this.lc("Stopping session on disposed cast v2"):this.S?(this.S.stop(),d5(this,null)):Of("Stopping non-existing session")}; g.E.requestSession=function(){chrome.cast.requestSession((0,g.yG)(this.wh,this),(0,g.yG)(this.rCr,this))}; g.E.RH=function(){this.T.unsubscribe("onlineScreenChange",(0,g.yG)(this.H2,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.C);var e=gMN,a=g.aZ("yt.mdx.remote.debug.handlers_");g.k9(a||[],e);g.Pe(this.S);g.aK.prototype.RH.call(this)}; g.E.lc=function(e){ai("Controller",e)}; g.E.Xe=function(e,a){this.S==e&&(a||d5(this,null),this.publish("yt-remote-cast2-session-change",a))}; g.E.D51=function(e,a){if(!this.wP())if(e)switch(e.friendlyName=chrome.cast.unescape(e.friendlyName),Of("onReceiverAction_ "+e.label+" / "+e.friendlyName+"-- "+a),a){case chrome.cast.ReceiverAction.CAST:if(this.S)if(this.S.T.label!=e.label)Of("onReceiverAction_: Stopping active receiver: "+this.S.T.friendlyName),this.S.stop();else{Of("onReceiverAction_: Casting to active receiver.");this.S.S&&this.publish("yt-remote-cast2-session-change",this.S.S);break}switch(e.receiverType){case chrome.cast.ReceiverType.CUSTOM:d5(this, new g5(this.T,e));break;case chrome.cast.ReceiverType.DIAL:d5(this,new Ef(this.T,e,this.L,this.config_));break;case chrome.cast.ReceiverType.CAST:d5(this,new GN(this.T,e,this.config_));break;default:this.lc("Unknown receiver type: "+e.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.S&&this.S.T.label==e.label?this.S.stop():this.lc("Stopping receiver w/o session: "+e.friendlyName)}else this.lc("onReceiverAction_ called without receiver.")}; g.E.rzo=function(e){if(this.wP())return Promise.reject(Error("disposed"));var a=e.receiver;a.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.lc("Not DIAL receiver: "+a.friendlyName),a.receiverType=chrome.cast.ReceiverType.DIAL);var r=this.S?this.S.T:null;if(!r||r.label!=a.label)return this.lc("Receiving DIAL launch request for non-clicked DIAL receiver: "+a.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(r&&r.label==a.label&&r.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.S.S)return Of("Reselecting dial screen."), this.publish("yt-remote-cast2-session-change",this.S.S),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.lc('Changing CAST intent from "'+r.receiverType+'" to "dial" for '+a.friendlyName);d5(this,new Ef(this.T,a,this.L,this.config_))}a=this.S;a.Y=e;a.Y.appState==chrome.cast.DialAppState.RUNNING?(e=a.Y.extraData||{},r=e.screenId||null,b$(a)&&e.loungeToken?e.loungeTokenRefreshIntervalMs?e=orb(a,{name:a.T.friendlyName,screenId:e.screenId,loungeToken:e.loungeToken,dialId:a.Y.receiver.label, screenIdType:"shortLived"},e.loungeTokenRefreshIntervalMs):(g.SX(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(e)+".")),e=nrZ(a,r)):e=nrZ(a,r)):e=hxG(a);return e}; g.E.wh=function(e){var a=this;if(!this.wP()&&!this.Z){Of("New cast session ID: "+e.sessionId);var r=e.receiver;if(r.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.S)if(r.receiverType==chrome.cast.ReceiverType.CAST)Of("Got resumed cast session before resumed mdx connection."),r.friendlyName=chrome.cast.unescape(r.friendlyName),d5(this,new GN(this.T,r,this.config_),!0);else{this.lc("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var P=this.S.T,B=Xk(this.T.Ue(), P.label);B&&y1(B,r.label)&&P.receiverType!=chrome.cast.ReceiverType.CAST&&r.receiverType==chrome.cast.ReceiverType.CAST&&(Of("onSessionEstablished_: manual to cast session change "+r.friendlyName),g.Pe(this.S),this.S=new GN(this.T,r,this.config_),this.S.subscribe("sessionScreen",(0,g.yG)(this.Xe,this,this.S)),this.S.subscribe("sessionFailed",function(){return f49(a,a.S)}),this.S.w6(null)); this.S.sY(e)}}}; g.E.Tt=function(){return this.S?this.S.uj():null}; g.E.rCr=function(e){this.wP()||(this.lc("Failed to estabilish a session: "+g.Hy(e)),e.code!=chrome.cast.ErrorCode.CANCEL&&d5(this,null),this.publish("yt-remote-cast2-session-failed"))}; g.E.zuW=function(e){Of("Receiver availability updated: "+e);if(!this.wP()){var a=ky(this);this.D=e==chrome.cast.ReceiverAvailability.AVAILABLE;ky(this)!=a&&this.publish("yt-remote-cast2-availability-change",ky(this))}}; g.E.H2=function(){this.wP()||(this.B=ABV(this),Of("Updating custom receivers: "+g.Hy(this.B)),chrome.cast.setCustomReceivers(this.B,function(){},(0,g.yG)(function(){this.lc("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",ky(this)))}; Zb.prototype.setLaunchParams=Zb.prototype.qxM;Zb.prototype.setConnectedScreenStatus=Zb.prototype.YxP;Zb.prototype.stopSession=Zb.prototype.Bq;Zb.prototype.getCastSession=Zb.prototype.Tt;Zb.prototype.requestSession=Zb.prototype.requestSession;Zb.prototype.init=Zb.prototype.init;Zb.prototype.dispose=Zb.prototype.dispose;var QuG=g.GJ(["https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"]),kob=[],grZ=g.uF(QuG);g.E=l$.prototype; g.E.reset=function(e){this.listId="";this.index=-1;this.videoId="";Qya(this);this.volume=-1;this.muted=!1;e&&(this.index=e.index,this.listId=e.listId,this.videoId=e.videoId,this.playerState=e.playerState,this.volume=e.volume,this.muted=e.muted,this.audioTrackId=e.audioTrackId,this.trackData=e.trackData,this.Mj=e.hasPrevious,this.fq=e.hasNext,this.Z=e.playerTime,this.C=e.playerTimeAt,this.T=e.seekableStart,this.D=e.seekableEnd,this.B=e.duration,this.Y=e.loadedTime,this.S=e.liveIngestionTime,this.L= !isNaN(this.S))}; g.E.isPlaying=function(){return this.playerState==1}; g.E.isBuffering=function(){return this.playerState==3}; g.E.q2=function(e){this.B=isNaN(e)?0:e}; g.E.getDuration=function(){return this.L?this.B+LI(this):this.B}; g.E.clone=function(){return new l$(l4G(this))};g.b(zN,g.aK);g.E=zN.prototype;g.E.getState=function(){return this.B}; g.E.Dq=function(){return this.L.getReconnectTimeout()}; g.E.qI=function(){this.L.reconnect()}; g.E.play=function(){Ii(this)?(this.S?this.S.play(null,g.LO,Ri(this,"play")):vg(this,"play"),wCw(this,1,w5(NV(this))),this.publish("remotePlayerChange")):Hg(this,this.play)}; g.E.pause=function(){Ii(this)?(this.S?this.S.pause(null,g.LO,Ri(this,"pause")):vg(this,"pause"),wCw(this,2,w5(NV(this))),this.publish("remotePlayerChange")):Hg(this,this.pause)}; g.E.seekTo=function(e){if(Ii(this)){if(this.S){var a=NV(this),r=new chrome.cast.media.SeekRequest;r.currentTime=e;a.isPlaying()||a.isBuffering()?r.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:r.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.S.seek(r,g.LO,Ri(this,"seekTo",{newTime:e}))}else vg(this,"seekTo",{newTime:e});wCw(this,3,e);this.publish("remotePlayerChange")}else Hg(this,g.TV(this.seekTo,e))}; g.E.stop=function(){if(Ii(this)){this.S?this.S.stop(null,g.LO,Ri(this,"stopVideo")):vg(this,"stopVideo");var e=NV(this);e.index=-1;e.videoId="";Qya(e);qV(this,e);this.publish("remotePlayerChange")}else Hg(this,this.stop)}; g.E.setVolume=function(e,a){if(Ii(this)){var r=NV(this);if(this.T){if(r.volume!=e){var P=Math.round(e)/100;this.T.setReceiverVolumeLevel(P,(0,g.yG)(function(){r5("set receiver volume: "+P)},this),(0,g.yG)(function(){this.lc("failed to set receiver volume.")},this))}r.muted!=a&&this.T.setReceiverMuted(a,(0,g.yG)(function(){r5("set receiver muted: "+a)},this),(0,g.yG)(function(){this.lc("failed to set receiver muted.")},this))}else{var B={volume:e, muted:a};r.volume!=-1&&(B.delta=e-r.volume);vg(this,"setVolume",B)}r.muted=a;r.volume=e;qV(this,r)}else Hg(this,g.TV(this.setVolume,e,a))}; g.E.o_=function(e,a){if(Ii(this)){var r=NV(this);e={videoId:e};a&&(r.trackData={trackName:a.name,languageCode:a.languageCode,sourceLanguageCode:a.translationLanguage?a.translationLanguage.languageCode:"",languageName:a.languageName,kind:a.kind},e.style=g.Hy(a.style),g.bO(e,r.trackData));vg(this,"setSubtitlesTrack",e);qV(this,r)}else Hg(this,g.TV(this.o_,e,a))}; g.E.setAudioTrack=function(e,a){Ii(this)?(a=a.getLanguageInfo().getId(),vg(this,"setAudioTrack",{videoId:e,audioTrackId:a}),e=NV(this),e.audioTrackId=a,qV(this,e)):Hg(this,g.TV(this.setAudioTrack,e,a))}; g.E.playVideo=function(e,a,r,P,B,h,c){P=P===void 0?null:P;B=B===void 0?null:B;h=h===void 0?null:h;c=c===void 0?null:c;var y=NV(this),T={videoId:e};r!==void 0&&(T.currentIndex=r);pI(y,e,r||0);a!==void 0&&(Yy(y,a),T.currentTime=a);P&&(T.listId=P);B&&(T.playerParams=B);h&&(T.clickTrackingParams=h);c&&(T.locationInfo=g.Hy(c));vg(this,"setPlaylist",T);P||qV(this,y)}; g.E.ey=function(e,a){if(Ii(this)){if(e&&a){var r=NV(this);pI(r,e,a);qV(this,r)}vg(this,"previous")}else Hg(this,g.TV(this.ey,e,a))}; g.E.nextVideo=function(e,a){if(Ii(this)){if(e&&a){var r=NV(this);pI(r,e,a);qV(this,r)}vg(this,"next")}else Hg(this,g.TV(this.nextVideo,e,a))}; g.E.QW=function(){if(Ii(this)){vg(this,"clearPlaylist");var e=NV(this);e.reset();qV(this,e);this.publish("remotePlayerChange")}else Hg(this,this.QW)}; g.E.PP=function(){Ii(this)?vg(this,"dismissAutoplay"):Hg(this,this.PP)}; g.E.dispose=function(){if(this.B!=3){var e=this.B;this.B=3;this.publish("proxyStateChange",e,this.B)}g.aK.prototype.dispose.call(this)}; g.E.RH=function(){Y3Z(this);this.L=null;this.C.clear();i$(this,null);g.aK.prototype.RH.call(this)}; g.E.YR=function(e){if((e!=this.B||e==2)&&this.B!=3&&e!=0){var a=this.B;this.B=e;this.publish("proxyStateChange",a,e);if(e==1)for(;!this.C.isEmpty();)a=e=this.C,a.S.length===0&&(a.S=a.T,a.S.reverse(),a.T=[]),e.S.pop().apply(this);else e==3&&this.dispose()}}; g.E.Cw1=function(e,a){this.publish(e,a)}; g.E.YoH=function(e){if(!e)this.xw(null),i$(this,null);else if(this.T.receiver.volume){e=this.T.receiver.volume;var a=NV(this),r=Math.round(100*e.level||0);if(a.volume!=r||a.muted!=e.muted)r5("Cast volume update: "+e.level+(e.muted?" muted":"")),a.volume=r,a.muted=!!e.muted,qV(this,a)}}; g.E.xw=function(e){r5("Cast media: "+!!e);this.S&&this.S.removeUpdateListener(this.Y);if(this.S=e)this.S.addUpdateListener(this.Y),pCV(this),this.publish("remotePlayerChange")}; g.E.dFm=function(e){e?(pCV(this),this.publish("remotePlayerChange")):this.xw(null)}; g.E.eg=function(){vg(this,"sendDebugCommand",{debugCommand:"stats4nerds "})}; g.E.GQQ=function(){var e=D89();e&&i$(this,e)}; g.E.lc=function(e){ai("CP",e)};g.b(mE,g.aK);g.E=mE.prototype; g.E.connect=function(e,a){if(a){var r=a.listId,P=a.videoId,B=a.videoIds,h=a.playerParams,c=a.clickTrackingParams,y=a.index,T={videoId:P},X=a.currentTime,f=a.locationInfo;a=a.loopMode;X!==void 0&&(T.currentTime=X<=5?0:X);h&&(T.playerParams=h);f&&(T.locationInfo=f);c&&(T.clickTrackingParams=c);r&&(T.listId=r);B&&B.length>0&&(T.videoIds=B.join(","));y!==void 0&&(T.currentIndex=y);this.Cf&&(T.loopMode=a||"LOOP_MODE_OFF");r&&(this.S.listId=r);this.S.videoId=P;this.S.index=y||0;this.S.state=3;Yy(this.S, X);this.C="UNSUPPORTED";r=this.Cf?"setInitialState":"setPlaylist";SM("Connecting with "+r+" and params: "+g.Hy(T));this.T.connect({method:r,params:g.Hy(T)},e,Kpw())}else SM("Connecting without params"),this.T.connect({},e,Kpw());x8G(this)}; g.E.Wi=function(e){this.T.Wi(e)}; g.E.dispose=function(){this.wP()||(g.KL("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),sf(this,3));g.aK.prototype.dispose.call(this)}; g.E.RH=function(){I4l(this);q3B(this);HhG(this);g.fK(this.Y);this.Y=NaN;g.fK(this.N);this.N=NaN;this.L=null;g.bQ(this.HW);this.HW.length=0;this.T.dispose();g.aK.prototype.RH.call(this);this.C=this.D=this.B=this.S=this.T=null}; g.E.zD=function(e){if(!this.B||this.B.length===0)return!1;for(var a=g.Z(this.B),r=a.next();!r.done;r=a.next())if(!r.value.capabilities.has(e))return!1;return!0}; g.E.IV=function(){var e=3;this.wP()||(e=0,isNaN(this.Qg())?this.T.sX()&&isNaN(this.Z)&&(e=1):e=2);return e}; g.E.Es=function(e){SM("Disconnecting with "+e);g.KL("yt.mdx.remote.remoteClient_",null);I4l(this);this.publish("beforeDisconnect",e);e==1&&U1();this.T.disconnect(e);this.dispose()}; g.E.RV=function(){var e=this.S;this.L&&(e=this.S.clone(),pI(e,this.L,e.index));return l4G(e)}; g.E.VKP=function(e){var a=this,r=new l$(e);r.videoId&&r.videoId!=this.S.videoId&&(this.L=r.videoId,g.fK(this.Y),this.Y=g.Tu(function(){if(a.L){var B=a.L;a.L=null;a.S.videoId!=B&&F3(a,"getNowPlaying")}},5E3)); var P=[];this.S.listId==r.listId&&this.S.videoId==r.videoId&&this.S.index==r.index||P.push("remoteQueueChange");this.S.playerState==r.playerState&&this.S.volume==r.volume&&this.S.muted==r.muted&&w5(this.S)==w5(r)&&g.Hy(this.S.trackData)==g.Hy(r.trackData)||P.push("remotePlayerChange");this.S.reset(e);g.FN(P,function(B){this.publish(B)},this)}; g.E.UW=function(){var e=this.T.getDeviceId(),a=g.tw(this.B,function(r){return r.type=="REMOTE_CONTROL"&&r.id!=e}); return a?a.id:""}; g.E.Qg=function(){return this.T.Dq()}; g.E.yN=function(){return this.C||"UNSUPPORTED"}; g.E.qG=function(){return this.D||""}; g.E.gw=function(){!isNaN(this.Qg())&&this.T.qI()}; g.E.xfr=function(e,a){F3(this,e,a);RxG(this)}; g.E.Sx=function(){var e=g.le("SAPISID","")||g.le("__Secure-1PAPISID")||"",a=g.le("__Secure-3PAPISID","")||"";if(!e&&!a)return"";e=g.Vq(g.DX(e),2);a=g.Vq(g.DX(a),2);return g.Vq(g.DX(","+e+","+a),2)}; mE.prototype.subscribe=mE.prototype.subscribe;mE.prototype.unsubscribeByKey=mE.prototype.VJ;mE.prototype.getProxyState=mE.prototype.IV;mE.prototype.disconnect=mE.prototype.Es;mE.prototype.getPlayerContextData=mE.prototype.RV;mE.prototype.setPlayerContextData=mE.prototype.VKP;mE.prototype.getOtherConnectedRemoteId=mE.prototype.UW;mE.prototype.getReconnectTimeout=mE.prototype.Qg;mE.prototype.getAutoplayMode=mE.prototype.yN;mE.prototype.getAutoplayVideoId=mE.prototype.qG;mE.prototype.reconnect=mE.prototype.gw; mE.prototype.sendMessage=mE.prototype.xfr;mE.prototype.getXsrfToken=mE.prototype.Sx;mE.prototype.isCapabilitySupportedOnConnectedDevices=mE.prototype.zD;g.b(Ps8,cg);g.E=Ps8.prototype;g.E.Ue=function(e){return this.a4.$_gs(e)}; g.E.contains=function(e){return!!this.a4.$_c(e)}; g.E.get=function(e){return this.a4.$_g(e)}; g.E.start=function(){this.a4.$_st()}; g.E.add=function(e,a,r){this.a4.$_a(e,a,r)}; g.E.remove=function(e,a,r){this.a4.$_r(e,a,r)}; g.E.xi=function(e,a,r,P){this.a4.$_un(e,a,r,P)}; g.E.RH=function(){for(var e=this.S.length,a=0;a1&&!this.W.getOption("remote","quickCast")?(this.Q4=g.MM(e,this.S,this),this.Is(g.ba(e,this.S)),e=this.W.getOption("remote","currentReceiver"),e=this.S(e),this.options[e]&&this.Nq(e),this.enable(!0)):this.enable(!1)}; US.prototype.S=function(e){return e.key}; US.prototype.Sv=function(e){return e==="cast-selector-receiver"?"Cast...":this.Q4[e].name}; US.prototype.bQ=function(e){g.x7.prototype.bQ.call(this,e);this.W.setOption("remote","currentReceiver",this.Q4[e]);this.OM.XN()};g.b(d95,g.Vn);g.E=d95.prototype; g.E.create=function(){var e=this.player.G(),a=g.Bb(e);e={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:e.X("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:e.X("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:e.X("enable_cast_short_lived_lounge_token")};nZN(a,e);this.subscriptions.push(g.jA("yt-remote-before-disconnect",this.t11,this));this.subscriptions.push(g.jA("yt-remote-connection-change",this.f5W,this));this.subscriptions.push(g.jA("yt-remote-receiver-availability-change",this.Wd, this));this.subscriptions.push(g.jA("yt-remote-auto-connect",this.jzW,this));this.subscriptions.push(g.jA("yt-remote-receiver-resumed",this.U5W,this));this.subscriptions.push(g.jA("mdx-privacy-popup-confirm",this.N1Q,this));this.subscriptions.push(g.jA("mdx-privacy-popup-cancel",this.riQ,this));this.Wd()}; g.E.load=function(){this.player.cancelPlayback();g.Vn.prototype.load.call(this);this.K5=new kGN(this.player.G(),this);this.player.Vb(this.K5);this.Br=new ts8(this,this.player,this.rW);var e=(e=GGN())?e.currentTime:0;var a=ApG()?new zN(hf(),void 0):null;e==0&&a&&(e=w5(NV(a)));e!==0&&this.j5(e);Jpa(this,this.kf,this.kf);this.player.jd(6)}; g.E.unload=function(){this.player.publish("mdxautoplaycanceled");this.player.UZ();this.gC=this.Tf;g.Be(this.Br,this.rW);this.rW=this.K5=this.Br=null;g.Vn.prototype.unload.call(this);this.player.jd(5);Cs(this)}; g.E.RH=function(){g.u4(this.subscriptions);g.Vn.prototype.RH.call(this)}; g.E.hT=function(e){var a=g.xN.apply(1,arguments);this.loaded&&this.Br.QY.apply(this.Br,[e].concat(g.UO(a)))}; g.E.getAdState=function(){return this.In}; g.E.Mj=function(){return this.rW?NV(this.rW).Mj:!1}; g.E.fq=function(){return this.rW?NV(this.rW).fq:!1}; g.E.j5=function(e,a){this.Jm=e||0;this.player.publish("progresssync",e,a);this.player.Og("onVideoProgress",e||0)}; g.E.getCurrentTime=function(){return this.Jm}; g.E.getDuration=function(){return NV(this.rW).getDuration()||0}; g.E.BZ=function(){var e=NV(this.rW);return e.L?e.S+LI(e):e.S}; g.E.ZP=function(){return NV(this.rW).Y}; g.E.XJ=function(){return WUB(NV(this.rW))}; g.E.er=function(){var e=NV(this.rW);return e.T>0?e.T+LI(e):e.T}; g.E.getProgressState=function(){var e=NV(this.rW),a=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:e.playerState!=1081&&this.player.uQ(),clipEnd:a.clipEnd,clipStart:a.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:this.getDuration(),ingestionTime:this.BZ(),isAtLiveHead:this.isAtLiveHead(),loaded:this.ZP(),seekableEnd:this.XJ(),seekableStart:this.er(),offset:0,viewerLivestreamJoinMediaTime:0}}; g.E.isAtLiveHead=function(){return WUB(NV(this.rW))-this.getCurrentTime()<=1}; g.E.nextVideo=function(){this.rW&&this.rW.nextVideo()}; g.E.ey=function(){this.rW&&this.rW.ey()}; g.E.t11=function(e){e===1&&(this.q3=this.rW?NV(this.rW):null)}; g.E.f5W=function(){var e=ApG()?new zN(hf(),void 0):null;if(e){var a=this.gC;this.loaded&&this.unload();this.rW=e;this.q3=null;a.key!==this.Tf.key&&(this.gC=a,this.load())}else g.Pe(this.rW),this.rW=null,this.loaded&&(this.unload(),(e=this.q3)&&e.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(e.videoId,w5(e)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)}; g.E.Wd=function(){var e=[this.Tf],a=e.concat,r=ypV();$y()&&g.$f("yt-remote-cast-available")&&r.push({key:"cast-selector-receiver",name:"Cast..."});this.Q4=a.call(e,r);e=XWG()||this.Tf;Gw(this,e);this.player.Og("onMdxReceiversChange")}; g.E.jzW=function(){var e=XWG();Gw(this,e)}; g.E.U5W=function(){this.gC=XWG()}; g.E.N1Q=function(){this.T5=!0;Cs(this);yO=!1;ck&&ns(ck,1);ck=null}; g.E.riQ=function(){this.T5=!1;Cs(this);Gw(this,this.Tf);this.gC=this.Tf;yO=!1;ck=null;this.player.playVideo()}; g.E.i$=function(e,a){switch(e){case "casting":return this.loaded;case "receivers":return this.Q4;case "currentReceiver":return a&&(a.key==="cast-selector-receiver"?VbN():Gw(this,a)),this.loaded?this.gC:this.Tf;case "quickCast":return this.Q4.length===2&&this.Q4[1].key==="cast-selector-receiver"?(a&&VbN(),!0):!1}}; g.E.eg=function(){this.rW.eg()}; g.E.FP=function(){return!1}; g.E.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]}; g.E.isLoggedIn=function(){var e,a;return((e=g.IM("PLAYER_CONFIG"))==null?void 0:(a=e.args)==null?void 0:a.authuser)!==void 0?!0:!(!g.IM("SESSION_INDEX")&&!g.IM("LOGGED_IN"))};g.DD("remote",d95);})(_yt_player);