(function(g){var window=this;'use strict';var e7=function(a){g.Mk(a,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^g.Za()).toString(36));return a},f7=function(a,b,c){Array.isArray(c)||(c=[String(c)]);
g.aha(a.D,b,c)},gsb=function(a){if(a instanceof g.wn)return a;
if(typeof a.Km=="function")return a.Km(!1);if(g.Sa(a)){var b=0,c=new g.wn;c.next=function(){for(;;){if(b>=a.length)return g.C1;if(b in a)return g.xn(a[b++]);b++}};
return c}throw Error("Not implemented");},hsb=function(a,b,c){if(g.Sa(a))g.lc(a,b,c);
else for(a=gsb(a);;){var d=a.next();if(d.done)break;b.call(c,d.value,void 0,a)}},isb=function(a,b){var c=[];
hsb(b,function(d){try{var e=g.iq.prototype.B.call(this,d,!0)}catch(f){if(f=="Storage: Invalid value was encountered")return;throw f;}e===void 0?c.push(d):g.mma(e)&&c.push(d)},a);
return c},jsb=function(a,b){isb(a,b).forEach(function(c){g.iq.prototype.remove.call(this,c)},a)},ksb=function(a){if(a.oa){if(a.oa.locationOverrideToken)return{locationOverrideToken:a.oa.locationOverrideToken};
if(a.oa.latitudeE7!=null&&a.oa.longitudeE7!=null)return{latitudeE7:a.oa.latitudeE7,longitudeE7:a.oa.longitudeE7}}return null},lsb=function(a,b){g.Wb(a,b)||a.push(b)},msb=function(a){var b=0,c;
for(c in a)b++;return b},nsb=function(a,b){return g.Qg(a,b)},osb=function(a){try{return g.Na.JSON.parse(a)}catch(b){}a=String(a);
if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},g7=function(a){if(g.Na.JSON)try{return g.Na.JSON.parse(a)}catch(b){}return osb(a)},psb=function(a){if(a.fn&&typeof a.fn=="function")return a.fn();
if(typeof Map!=="undefined"&&a instanceof Map||typeof Set!=="undefined"&&a instanceof Set)return Array.from(a.values());if(typeof a==="string")return a.split("");if(g.Sa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return g.Ng(a)},qsb=function(a){if(a.Go&&typeof a.Go=="function")return a.Go();
if(!a.fn||typeof a.fn!="function"){if(typeof Map!=="undefined"&&a instanceof Map)return Array.from(a.keys());if(!(typeof Set!=="undefined"&&a instanceof Set)){if(g.Sa(a)||typeof a==="string"){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return g.Og(a)}}},rsb=function(a,b){if(a.forEach&&typeof a.forEach=="function")a.forEach(b,void 0);
else if(g.Sa(a)||typeof a==="string")Array.prototype.forEach.call(a,b,void 0);else for(var c=qsb(a),d=psb(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)},ssb=function(a,b,c,d){var e=new g.Bk(null);
a&&g.Ck(e,a);b&&g.Dk(e,b);c&&g.Ek(e,c);d&&(e.B=d);return e},tsb=function(){var a=h7();
this.j=a;a.rk("/client_streamz/youtube/living_room/mdx/channel/opened",g.nb("channel_type"))},usb=function(a,b){a.j.Gm("/client_streamz/youtube/living_room/mdx/channel/opened",b)},vsb=function(){var a=h7();
this.j=a;a.rk("/client_streamz/youtube/living_room/mdx/channel/closed",g.nb("channel_type"))},wsb=function(a,b){a.j.Gm("/client_streamz/youtube/living_room/mdx/channel/closed",b)},xsb=function(){var a=h7();
this.j=a;a.rk("/client_streamz/youtube/living_room/mdx/channel/message_received",g.nb("channel_type"))},ysb=function(a,b){a.j.Gm("/client_streamz/youtube/living_room/mdx/channel/message_received",b)},zsb=function(){var a=h7();
this.j=a;a.rk("/client_streamz/youtube/living_room/mdx/channel/error",g.nb("channel_type"))},Asb=function(a,b){a.j.Gm("/client_streamz/youtube/living_room/mdx/channel/error",b)},Bsb=function(){var a=h7();
this.j=a;a.rk("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps")},Csb=function(){var a=h7();
this.j=a;a.rk("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps")},Dsb=function(a,b){return new g.Ip(a,b)},i7=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},j7=function(a,b){this.B={};
this.j=[];this.ew=this.size=0;var c=arguments.length;if(c>1){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a)if(a instanceof j7)for(c=a.Go(),d=0;d<c.length;d++)this.set(c[d],a.get(c[d]));else for(d in a)this.set(d,a[d])},k7=function(a){if(a.size!=a.j.length){for(var b=0,c=0;b<a.j.length;){var d=a.j[b];
i7(a.B,d)&&(a.j[c++]=d);b++}a.j.length=c}if(a.size!=a.j.length){var e={};for(c=b=0;b<a.j.length;)d=a.j[b],i7(e,d)||(a.j[c++]=d,e[d]=1),b++;a.j.length=c}},Hsb=function(a){this.name=this.id="";
this.clientName="UNKNOWN_INTERFACE";this.app="";this.type="REMOTE_CONTROL";this.ownerObfuscatedGaiaId=this.obfuscatedGaiaId=this.avatar=this.username="";this.capabilities=new Set;this.compatibleSenderThemes=new Set;this.experiments=new Set;this.theme="u";new j7;this.model=this.brand="";this.year=0;this.chipset=this.osVersion=this.os="";this.mdxDialServerType="MDX_DIAL_SERVER_TYPE_UNKNOWN";a&&(this.id=a.id||a.name,this.name=a.name,this.clientName=a.clientName?a.clientName.toUpperCase():"UNKNOWN_INTERFACE",
this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.username=a.user||"",this.avatar=a.userAvatarUri||"",this.obfuscatedGaiaId=a.obfuscatedGaiaId||"",this.ownerObfuscatedGaiaId=a.ownerObfuscatedGaiaId||"",this.theme=a.theme||"u",Esb(this,a.capabilities||""),Fsb(this,a.compatibleSenderThemes||""),Gsb(this,a.experiments||""),this.brand=a.brand||"",this.model=a.model||"",this.year=a.year||0,this.os=a.os||"",this.osVersion=a.osVersion||"",this.chipset=a.chipset||"",this.mdxDialServerType=a.mdxDialServerType||
"MDX_DIAL_SERVER_TYPE_UNKNOWN",a=a.deviceInfo)&&(a=JSON.parse(a),this.brand=a.brand||"",this.model=a.model||"",this.year=a.year||0,this.os=a.os||"",this.osVersion=a.osVersion||"",this.chipset=a.chipset||"",this.clientName=a.clientName?a.clientName.toUpperCase():"UNKNOWN_INTERFACE",this.mdxDialServerType=a.mdxDialServerType||"MDX_DIAL_SERVER_TYPE_UNKNOWN")},Esb=function(a,b){a.capabilities.clear();
g.Bn(b.split(","),g.Ya(nsb,Isb)).forEach(function(c){a.capabilities.add(c)})},Fsb=function(a,b){a.compatibleSenderThemes.clear();
g.Bn(b.split(","),g.Ya(nsb,Jsb)).forEach(function(c){a.compatibleSenderThemes.add(c)})},Gsb=function(a,b){a.experiments.clear();
b.split(",").forEach(function(c){a.experiments.add(c)})},l7=function(a){a=a||{};
this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||"";this.idType=a.screenIdType||"normal"},m7=function(a,b){return!!b&&(a.id==b||a.uuid==b)},Ksb=function(a){return{name:a.name,
screenId:a.id,loungeToken:a.token,dialId:a.uuid,screenIdType:a.idType}},Lsb=function(a){return new l7(a)},Msb=function(a){return Array.isArray(a)?g.Ql(a,Lsb):[]},n7=function(a){return a?'{name:"'+a.name+'",id:'+a.id.substr(0,6)+"..,token:"+((a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+",idType:"+a.idType+"}"):"null"},Nsb=function(a){return Array.isArray(a)?"["+g.Ql(a,n7).join(",")+"]":"null"},Osb=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,
function(a){var b=Math.random()*16|0;
return(a=="x"?b:b&3|8).toString(16)})},Psb=function(a){return g.Ql(a,function(b){return{key:b.id,
name:b.name}})},Qsb=function(a,b){return g.Ub(a,function(c){return c||b?!c!=!b?!1:c.id==b.id:!0})},o7=function(a,b){return g.Ub(a,function(c){return m7(c,b)})},Rsb=function(){var a=(0,g.jt)();
a&&jsb(a,a.j.Km(!0))},p7=function(){var a=g.mt("yt-remote-connected-devices")||[];
g.hc(a);return a},Ssb=function(a){if(a.length==0)return[];
var b=a[0].indexOf("#"),c=b==-1?a[0]:a[0].substring(0,b);return g.Ql(a,function(d,e){return e==0?d:d.substring(c.length)})},Tsb=function(a){g.lt("yt-remote-connected-devices",a,86400)},q7=function(){if(Usb)return Usb;
var a=g.mt("yt-remote-device-id");a||(a=Osb(),g.lt("yt-remote-device-id",a,31536E3));for(var b=p7(),c=1,d=a;g.Wb(b,d);)c++,d=a+"#"+c;return Usb=d},Vsb=function(){var a=p7(),b=q7();
g.ot()&&g.jc(a,b);a=Ssb(a);if(a.length==0)try{g.ps("remote_sid")}catch(c){}else try{g.ns("remote_sid",a.join(","),-1)}catch(c){}},Wsb=function(){return g.mt("yt-remote-session-browser-channel")},Xsb=function(){return g.mt("yt-remote-local-screens")||[]},Ysb=function(){g.lt("yt-remote-lounge-token-expiration",!0,86400)},Zsb=function(a){a.length>5&&(a=a.slice(a.length-5));
var b=g.Ql(Xsb(),function(d){return d.loungeToken}),c=g.Ql(a,function(d){return d.loungeToken});
g.Rl(c,function(d){return!g.Wb(b,d)})&&Ysb();
g.lt("yt-remote-local-screens",a,31536E3)},r7=function(a){a||(g.nt("yt-remote-session-screen-id"),g.nt("yt-remote-session-video-id"));
Vsb();a=p7();g.Yb(a,q7());Tsb(a)},$sb=function(){if(!s7){var a=g.oq();
a&&(s7=new g.fq(a))}},atb=function(){$sb();
return s7?!!s7.get("yt-remote-use-staging-server"):!1},t7=function(a,b){g.Qv[a]=!0;
var c=g.Ov();c&&c.publish.apply(c,arguments);g.Qv[a]=!1},btb=function(){},h7=function(){if(!u7){u7=new g.Ri(new btb);
var a=g.$r("client_streamz_web_flush_count",-1);a!==-1&&(u7.C=a)}return u7},ctb=function(){var a=window.navigator.userAgent.match(/Chrome\/([0-9]+)/);
return a?parseInt(a[1],10):0},dtb=function(a){return!!document.currentScript&&(document.currentScript.src.indexOf("?"+a)!=-1||document.currentScript.src.indexOf("&"+a)!=-1)},etb=function(){return typeof window.__onGCastApiAvailable=="function"?window.__onGCastApiAvailable:null},v7=function(a){a.length?ftb(a.shift(),function(){v7(a)}):gtb()},htb=function(a){return"chrome-extension://"+a+"/cast_sender.js"},ftb=function(a,b,c){var d=document.createElement("script");
d.onerror=b;c&&(d.onload=c);g.gg(d,g.er(a));(document.head||document.documentElement).appendChild(d)},itb=function(){var a=ctb(),b=[];
if(a>1){var c=a-1;b.push("//www.gstatic.com/eureka/clank/"+a+"/cast_sender.js");b.push("//www.gstatic.com/eureka/clank/"+c+"/cast_sender.js")}return b},gtb=function(){var a=etb();
a&&a(!1,"No cast extension found")},ktb=function(){if(jtb){var a=2,b=etb(),c=function(){a--;
a==0&&b&&b(!0)};
window.__onGCastApiAvailable=c;ftb("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",gtb,c)}},ltb=function(){ktb();
var a=itb();a.push("//www.gstatic.com/eureka/clank/cast_sender.js");v7(a)},ntb=function(){ktb();
var a=itb();a.push.apply(a,g.x(mtb.map(htb)));a.push("//www.gstatic.com/eureka/clank/cast_sender.js");v7(a)},w7=function(a,b,c){g.O.call(this);
this.K=c!=null?(0,g.Xa)(a,c):a;this.gj=b;this.G=(0,g.Xa)(this.E5,this);this.j=!1;this.B=0;this.C=this.wd=null;this.D=[]},x7=function(a,b,c){g.O.call(this);
this.D=c!=null?a.bind(c):a;this.gj=b;this.C=null;this.j=!1;this.B=0;this.wd=null},otb=function(a){a.wd=g.Pi(function(){a.wd=null;
a.j&&!a.B&&(a.j=!1,otb(a))},a.gj);
var b=a.C;a.C=null;a.D.apply(null,b)},y7=function(){},ptb=function(){g.bi.call(this,"p")},qtb=function(){g.bi.call(this,"o")},stb=function(){return rtb=rtb||new g.qi},ttb=function(a){g.bi.call(this,"serverreachability",a)},z7=function(a){var b=stb();
b.dispatchEvent(new ttb(b,a))},utb=function(a){g.bi.call(this,"statevent",a)},A7=function(a){var b=stb();
b.dispatchEvent(new utb(b,a))},vtb=function(a,b,c,d){g.bi.call(this,"timingevent",a);
this.size=b;this.rtt=c;this.retries=d},B7=function(a,b){if(typeof a!=="function")throw Error("Fn must not be null and must be a function");
return g.Na.setTimeout(function(){a()},b)},C7=function(){},D7=function(a,b,c,d){this.C=a;
this.D=b;this.Tb=c;this.Qb=d||1;this.rb=new g.Rk(this);this.ib=45E3;this.Ka=null;this.K=!1;this.W=this.Va=this.Z=this.Oa=this.Aa=this.kb=this.oa=null;this.qa=[];this.j=null;this.N=0;this.G=this.Ca=null;this.Kb=-1;this.Ja=!1;this.Ya=0;this.Ta=null;this.Gb=this.Ua=this.Bb=this.Fa=!1;this.B=new wtb},wtb=function(){this.C=null;
this.j="";this.B=!1},ytb=function(a,b,c){a.Oa=1;
a.Z=e7(b.clone());a.W=c;a.Fa=!0;xtb(a,null)},xtb=function(a,b){a.Aa=Date.now();
E7(a);a.Va=a.Z.clone();f7(a.Va,"t",a.Qb);a.N=0;var c=a.C.Oa;a.B=new wtb;a.j=ztb(a.C,c?b:null,!a.W);a.Ya>0&&(a.Ta=new x7((0,g.Xa)(a.MV,a,a.j),a.Ya));a.rb.listen(a.j,"readystatechange",a.G5);b=a.Ka?g.Yg(a.Ka):{};a.W?(a.Ca||(a.Ca="POST"),b["Content-Type"]="application/x-www-form-urlencoded",a.j.send(a.Va,a.Ca,a.W,b)):(a.Ca="GET",a.j.send(a.Va,a.Ca,null,b));z7(1)},Btb=function(a){if(!Atb(a))return g.pj(a.j);
var b=g.qj(a.j);if(b==="")return"";var c="",d=b.length,e=g.nj(a.j)==4;if(!a.B.C){if(typeof TextDecoder==="undefined")return F7(a),G7(a),"";a.B.C=new g.Na.TextDecoder}for(var f=0;f<d;f++)a.B.B=!0,c+=a.B.C.decode(b[f],{stream:!(e&&f==d-1)});b.length=0;a.B.j+=c;a.N=0;return a.B.j},Atb=function(a){return a.j?a.Ca=="GET"&&a.Oa!=2&&a.C.mf:!1},Etb=function(a,b){var c=a.N,d=b.indexOf("\n",c);
if(d==-1)return Ctb;c=Number(b.substring(c,d));if(isNaN(c))return Dtb;d+=1;if(d+c>b.length)return Ctb;b=b.slice(d,d+c);a.N=d+c;return b},E7=function(a){a.kb=Date.now()+a.ib;
Ftb(a,a.ib)},Ftb=function(a,b){if(a.oa!=null)throw Error("WatchDog timer not null");
a.oa=B7((0,g.Xa)(a.F5,a),b)},Gtb=function(a){a.oa&&(g.Na.clearTimeout(a.oa),a.oa=null)},G7=function(a){a.C.Rg()||a.Ja||Htb(a.C,a)},F7=function(a){Gtb(a);
g.vg(a.Ta);a.Ta=null;a.rb.removeAll();if(a.j){var b=a.j;a.j=null;b.abort();b.dispose()}},Ptb=function(a,b){try{var c=a.C;
if(c.Xh!=0&&(c.j==a||Itb(c.B,a)))if(!a.Ua&&Itb(c.B,a)&&c.Xh==3){try{var d=c.nf.j.parse(b)}catch(y){d=null}if(Array.isArray(d)&&d.length==3){var e=d;if(e[0]==0)a:{if(!c.Z){if(c.j)if(c.j.Aa+3E3<a.Aa)H7(c),I7(c);else break a;Jtb(c);A7(18)}}else c.Nd=e[1],0<c.Nd-c.Ta&&e[2]<37500&&c.Ua&&c.qa==0&&!c.oa&&(c.oa=B7((0,g.Xa)(c.H5,c),6E3));if(Ktb(c.B)<=1&&c.jd){try{c.jd()}catch(y){}c.jd=void 0}}else J7(c,11)}else if((a.Ua||c.j==a)&&H7(c),!g.wb(b))for(e=c.nf.j.parse(b),b=0;b<e.length;b++){var f=e[b];c.Ta=f[0];
f=f[1];if(c.Xh==2)if(f[0]=="c"){c.D=f[1];c.Qb=f[2];var h=f[3];h!=null&&(c.NV=h);var l=f[5];l!=null&&typeof l==="number"&&l>0&&(c.Ya=1.5*l);d=c;var m=a.RQ();if(m){var n=g.rj(m,"X-Client-Wire-Protocol");if(n){var p=d.B;!p.j&&(g.xb(n,"spdy")||g.xb(n,"quic")||g.xb(n,"h2"))&&(p.D=p.G,p.j=new Set,p.B&&(Ltb(p,p.B),p.B=null))}if(d.Fa){var q=g.rj(m,"X-HTTP-Session-Id");q&&(d.Ee=q,g.Mk(d.Ka,d.Fa,q))}}c.Xh=3;c.G&&c.G.TV();c.Bc&&(c.Pc=Date.now()-a.Aa);d=c;var r=a;d.Ad=Mtb(d,d.Oa?d.Qb:null,d.Tb);if(r.Ua){Ntb(d.B,
r);var t=r,u=d.Ya;u&&t.setTimeout(u);t.oa&&(Gtb(t),E7(t));d.j=r}else Otb(d);c.C.length>0&&K7(c)}else f[0]!="stop"&&f[0]!="close"||J7(c,7);else c.Xh==3&&(f[0]=="stop"||f[0]=="close"?f[0]=="stop"?J7(c,7):c.disconnect():f[0]!="noop"&&c.G&&c.G.SV(f),c.qa=0)}z7(4)}catch(y){}},Qtb=function(a,b){this.j=a;
this.map=b;this.context=null},Rtb=function(a){this.G=a||10;
g.Na.PerformanceNavigationTiming?(a=g.Na.performance.getEntriesByType("navigation"),a=a.length>0&&(a[0].nextHopProtocol=="hq"||a[0].nextHopProtocol=="h2")):a=!!(g.Na.chrome&&g.Na.chrome.loadTimes&&g.Na.chrome.loadTimes()&&g.Na.chrome.loadTimes().wasFetchedViaSpdy);this.D=a?this.G:1;this.j=null;this.D>1&&(this.j=new Set);this.B=null;this.C=[]},Stb=function(a){return a.B?!0:a.j?a.j.size>=a.D:!1},Ktb=function(a){return a.B?1:a.j?a.j.size:0},Itb=function(a,b){return a.B?a.B==b:a.j?a.j.has(b):!1},Ltb=
function(a,b){a.j?a.j.add(b):a.B=b},Ntb=function(a,b){a.B&&a.B==b?a.B=null:a.j&&a.j.has(b)&&a.j.delete(b)},Ttb=function(a){if(a.B!=null)return a.C.concat(a.B.qa);
if(a.j!=null&&a.j.size!==0){var b=a.C;a=g.w(a.j.values());for(var c=a.next();!c.done;c=a.next())b=b.concat(c.value.qa);return b}return g.ac(a.C)},Utb=function(a,b){var c=new C7;
if(g.Na.Image){var d=new Image;d.onload=g.Ya(L7,c,"TestLoadImage: loaded",!0,b,d);d.onerror=g.Ya(L7,c,"TestLoadImage: error",!1,b,d);d.onabort=g.Ya(L7,c,"TestLoadImage: abort",!1,b,d);d.ontimeout=g.Ya(L7,c,"TestLoadImage: timeout",!1,b,d);g.Na.setTimeout(function(){if(d.ontimeout)d.ontimeout()},1E4);
d.src=a}else b(!1)},Vtb=function(a,b){var c=new C7,d=new AbortController,e=setTimeout(function(){d.abort();
L7(c,"TestPingServer: timeout",!1,b)},1E4);
fetch(a,{signal:d.signal}).then(function(f){clearTimeout(e);f.ok?L7(c,"TestPingServer: ok",!0,b):L7(c,"TestPingServer: server error",!1,b)}).catch(function(){clearTimeout(e);
L7(c,"TestPingServer: error",!1,b)})},L7=function(a,b,c,d,e){try{e&&(e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null),d(c)}catch(f){}},Wtb=function(){this.j=new y7},Xtb=function(a,b,c){var d=c||"";
try{rsb(a,function(e,f){var h=e;g.Ta(e)&&(h=g.Ti(e));b.push(d+f+"="+encodeURIComponent(h))})}catch(e){throw b.push(d+"type="+encodeURIComponent("_badmap")),e;
}},M7=function(a,b,c){return c&&c.G$?c.G$[a]||b:b},Ytb=function(a){this.C=[];
this.Qb=this.Ad=this.Ka=this.Tb=this.j=this.Ee=this.Fa=this.Ja=this.N=this.Kb=this.W=null;this.Uf=this.Va=0;this.gh=M7("failFast",!1,a);this.Ua=this.oa=this.Z=this.K=this.G=null;this.qc=!0;this.Nd=this.Ta=-1;this.Gb=this.qa=this.Aa=0;this.uf=M7("baseRetryDelayMs",5E3,a);this.Vf=M7("retryDelaySeedMs",1E4,a);this.Af=M7("forwardChannelMaxRetries",2,a);this.le=M7("forwardChannelRequestTimeoutMs",2E4,a);this.ge=a&&a.Lqa||void 0;this.Xf=a&&a.Epa||void 0;this.mf=a&&a.Jqa||!1;this.Ya=void 0;this.Oa=a&&a.nfa||
!1;this.D="";this.B=new Rtb(a&&a.Bna);this.nf=new Wtb;this.rb=a&&a.Sna||!1;this.kb=a&&a.Hna||!1;this.rb&&this.kb&&(this.kb=!1);this.Wf=a&&a.rna||!1;a&&a.Vna&&(this.qc=!1);this.Bc=!this.rb&&this.qc&&a&&a.Fna||!1;this.kd=void 0;a&&a.X_&&a.X_>0&&(this.kd=a.X_);this.jd=void 0;this.Pc=0;this.ib=!1;this.Bb=this.Ca=null},I7=function(a){a.j&&(Ztb(a),a.j.cancel(),a.j=null)},$tb=function(a){I7(a);
a.Z&&(g.Na.clearTimeout(a.Z),a.Z=null);H7(a);a.B.cancel();a.K&&(typeof a.K==="number"&&g.Na.clearTimeout(a.K),a.K=null)},K7=function(a){Stb(a.B)||a.K||(a.K=!0,g.zi(a.PV,a),a.Aa=0)},bub=function(a,b){if(Ktb(a.B)>=a.B.D-(a.K?1:0))return!1;
if(a.K)return a.C=b.qa.concat(a.C),!0;if(a.Xh==1||a.Xh==2||a.Aa>=(a.gh?0:a.Af))return!1;a.K=B7((0,g.Xa)(a.PV,a,b),aub(a,a.Aa));a.Aa++;return!0},dub=function(a,b){var c;
b?c=b.Tb:c=a.Va++;var d=a.Ka.clone();g.Mk(d,"SID",a.D);g.Mk(d,"RID",c);g.Mk(d,"AID",a.Ta);N7(a,d);a.N&&a.W&&g.Qk(d,a.N,a.W);c=new D7(a,a.D,c,a.Aa+1);a.N===null&&(c.Ka=a.W);b&&(a.C=b.qa.concat(a.C));b=cub(a,c,1E3);c.setTimeout(Math.round(a.le*.5)+Math.round(a.le*.5*Math.random()));Ltb(a.B,c);ytb(c,d,b)},N7=function(a,b){a.Ja&&g.Ig(a.Ja,function(c,d){g.Mk(b,d,c)});
a.G&&rsb({},function(c,d){g.Mk(b,d,c)})},cub=function(a,b,c){c=Math.min(a.C.length,c);
var d=a.G?(0,g.Xa)(a.G.I5,a.G,a):null;a:{for(var e=a.C,f=-1;;){var h=["count="+c];f==-1?c>0?(f=e[0].j,h.push("ofs="+f)):f=0:h.push("ofs="+f);for(var l=!0,m=0;m<c;m++){var n=e[m].j,p=e[m].map;n-=f;if(n<0)f=Math.max(0,e[m].j-100),l=!1;else try{Xtb(p,h,"req"+n+"_")}catch(q){d&&d(p)}}if(l){d=h.join("&");break a}}d=void 0}a=a.C.splice(0,c);b.qa=a;return d},Otb=function(a){a.j||a.Z||(a.Gb=1,g.zi(a.OV,a),a.qa=0)},Jtb=function(a){if(a.j||a.Z||a.qa>=3)return!1;
a.Gb++;a.Z=B7((0,g.Xa)(a.OV,a),aub(a,a.qa));a.qa++;return!0},Ztb=function(a){a.Ca!=null&&(g.Na.clearTimeout(a.Ca),a.Ca=null)},eub=function(a){a.j=new D7(a,a.D,"rpc",a.Gb);
a.N===null&&(a.j.Ka=a.W);a.j.Ya=0;var b=a.Ad.clone();g.Mk(b,"RID","rpc");g.Mk(b,"SID",a.D);g.Mk(b,"AID",a.Ta);g.Mk(b,"CI",a.Ua?"0":"1");!a.Ua&&a.kd&&g.Mk(b,"TO",a.kd);g.Mk(b,"TYPE","xmlhttp");N7(a,b);a.N&&a.W&&g.Qk(b,a.N,a.W);a.Ya&&a.j.setTimeout(a.Ya);var c=a.j;a=a.Qb;c.Oa=1;c.Z=e7(b.clone());c.W=null;c.Fa=!0;xtb(c,a)},H7=function(a){a.oa!=null&&(g.Na.clearTimeout(a.oa),a.oa=null)},Htb=function(a,b){var c=null;
if(a.j==b){H7(a);Ztb(a);a.j=null;var d=2}else if(Itb(a.B,b))c=b.qa,Ntb(a.B,b),d=1;else return;if(a.Xh!=0)if(b.K)if(d==1){c=b.W?b.W.length:0;b=Date.now()-b.Aa;var e=a.Aa;d=stb();d.dispatchEvent(new vtb(d,c,b,e));K7(a)}else Otb(a);else{var f=b.Kb;e=b.getLastError();if(e==3||e==0&&f>0||!(d==1&&bub(a,b)||d==2&&Jtb(a)))switch(c&&c.length>0&&(b=a.B,b.C=b.C.concat(c)),e){case 1:J7(a,5);break;case 4:J7(a,10);break;case 3:J7(a,6);break;default:J7(a,2)}}},aub=function(a,b){var c=a.uf+Math.floor(Math.random()*
a.Vf);
a.isActive()||(c*=2);return c*b},J7=function(a,b){if(b==2){var c=(0,g.Xa)(a.ufa,a),d=a.Xf,e=!d;
d=new g.Bk(d||"//www.google.com/images/cleardot.gif");g.Na.location&&g.Na.location.protocol=="http"||g.Ck(d,"https");e7(d);e?Utb(d.toString(),c):Vtb(d.toString(),c)}else A7(2);a.Xh=0;a.G&&a.G.RV(b);fub(a);$tb(a)},fub=function(a){a.Xh=0;
a.Bb=[];if(a.G){var b=Ttb(a.B);if(b.length!=0||a.C.length!=0)g.bc(a.Bb,b),g.bc(a.Bb,a.C),a.B.C.length=0,g.ac(a.C),a.C.length=0;a.G.QV()}},gub=function(a){if(a.Xh==0)return a.Bb;
var b=[];g.bc(b,Ttb(a.B));g.bc(b,a.C);return b},Mtb=function(a,b,c){var d=g.Nk(c);
d.j!=""?(b&&g.Dk(d,b+"."+d.j),g.Ek(d,d.C)):(d=g.Na.location,d=ssb(d.protocol,b?b+"."+d.hostname:d.hostname,+d.port,c));b=a.Fa;c=a.Ee;b&&c&&g.Mk(d,b,c);g.Mk(d,"VER",a.NV);N7(a,d);return d},ztb=function(a,b,c){if(b&&!a.Oa)throw Error("Can't create secondary domain capable XhrIo object.");
b=a.mf&&!a.ge?new g.kj(new g.xk({n3:c})):new g.kj(a.ge);b.K=a.Oa;return b},hub=function(){},iub=function(){},P7=function(a,b){g.qi.call(this);
this.j=new Ytb(b);this.G=a;this.B=b&&b.Aaa||null;a=b&&b.zaa||null;b&&b.zna&&(a?a["X-Client-Protocol"]="webchannel":a={"X-Client-Protocol":"webchannel"});this.j.W=a;a=b&&b.dpa||null;b&&b.l0&&(a?a["X-WebChannel-Content-Type"]=b.l0:a={"X-WebChannel-Content-Type":b.l0});b&&b.fY&&(a?a["X-WebChannel-Client-Profile"]=b.fY:a={"X-WebChannel-Client-Profile":b.fY});this.j.Kb=a;(a=b&&b.cpa)&&!g.wb(a)&&(this.j.N=a);this.K=b&&b.nfa||!1;this.D=b&&b.eqa||!1;(b=b&&b.D$)&&!g.wb(b)&&(this.j.Fa=b,g.Pg(this.B,b)&&(a=
this.B,b in a&&delete a[b]));this.C=new O7(this)},jub=function(a){ptb.call(this);
a.__headers__&&(this.headers=a.__headers__,this.statusCode=a.__status__,delete a.__headers__,delete a.__status__);var b=a.__sm__;b?this.data=(this.j=g.Mg(b))?g.Wg(b,this.j):b:this.data=a},kub=function(a){qtb.call(this);
this.status=1;this.errorCode=a},O7=function(a){this.j=a},lub=function(a,b){this.B=a;
this.j=b},mub=function(a){return gub(a.j).map(function(b){var c=a.B;
b=b.map;"__data__"in b?(b=b.__data__,c=c.D?osb(b):b):c=b;return c})},Q7=function(a,b){if(typeof a!=="function")throw Error("Fn must not be null and must be a function");
return g.Na.setTimeout(function(){a()},b)},S7=function(a){R7.dispatchEvent(new nub(R7,a))},nub=function(a){g.bi.call(this,"statevent",a)},T7=function(a,b,c,d){this.j=a;
this.D=b;this.N=c;this.K=d||1;this.B=45E3;this.C=new g.Rk(this);this.G=new g.Oi;this.G.setInterval(250)},pub=function(a,b,c){a.bJ=1;
a.ID=e7(b.clone());a.Cw=c;a.Fa=!0;oub(a,null)},qub=function(a,b,c,d,e){a.bJ=1;
a.ID=e7(b.clone());a.Cw=null;a.Fa=c;e&&(a.I2=!1);oub(a,d)},oub=function(a,b){a.LD=Date.now();
rub(a);a.aJ=a.ID.clone();f7(a.aJ,"t",a.K);a.dJ=0;a.zj=a.j.dO(a.j.MD()?b:null);a.bO>0&&(a.ZI=new x7((0,g.Xa)(a.UV,a,a.zj),a.bO));a.C.listen(a.zj,"readystatechange",a.K5);b=a.Aw?g.Yg(a.Aw):{};a.Cw?(a.cJ="POST",b["Content-Type"]="application/x-www-form-urlencoded",a.zj.send(a.aJ,a.cJ,a.Cw,b)):(a.cJ="GET",a.I2&&!g.mh&&(b.Connection="close"),a.zj.send(a.aJ,a.cJ,null,b));a.j.Ks(1)},uub=function(a,b){var c=a.dJ,d=b.indexOf("\n",c);
if(d==-1)return sub;c=Number(b.substring(c,d));if(isNaN(c))return tub;d+=1;if(d+c>b.length)return sub;b=b.slice(d,d+c);a.dJ=d+c;return b},rub=function(a){a.cO=Date.now()+a.B;
vub(a,a.B)},vub=function(a,b){if(a.Qz!=null)throw Error("WatchDog timer not null");
a.Qz=Q7((0,g.Xa)(a.J5,a),b)},wub=function(a){a.Qz&&(g.Na.clearTimeout(a.Qz),a.Qz=null)},xub=function(a){a.j.Rg()||a.JD||a.j.fO(a)},U7=function(a){wub(a);
g.vg(a.ZI);a.ZI=null;a.G.stop();a.C.removeAll();if(a.zj){var b=a.zj;a.zj=null;b.abort();b.dispose()}a.H3&&(a.H3=null)},yub=function(a,b){try{a.j.VV(a,b),a.j.Ks(4)}catch(c){}},Aub=function(a,b,c,d,e){if(d==0)c(!1);
else{var f=e||0;d--;zub(a,b,function(h){h?c(!0):g.Na.setTimeout(function(){Aub(a,b,c,d,f)},f)})}},zub=function(a,b,c){var d=new Image;
d.onload=function(){try{V7(d),c(!0)}catch(e){}};
d.onerror=function(){try{V7(d),c(!1)}catch(e){}};
d.onabort=function(){try{V7(d),c(!1)}catch(e){}};
d.ontimeout=function(){try{V7(d),c(!1)}catch(e){}};
g.Na.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b);
d.src=a},V7=function(a){a.onload=null;
a.onerror=null;a.onabort=null;a.ontimeout=null},Bub=function(a){this.j=a;
this.B=new y7},Cub=function(a){var b=W7(a.j,a.RE,"/mail/images/cleardot.gif");
e7(b);Aub(b.toString(),5E3,(0,g.Xa)(a.X7,a),3,2E3);a.Ks(1)},Dub=function(a){var b=a.j.K;
b!=null?(S7(5),b?(S7(11),X7(a.j,a,!1)):(S7(12),X7(a.j,a,!0))):(a.yl=new T7(a),a.yl.Aw=a.eO,b=a.j,b=W7(b,b.MD()?a.eJ:null,a.gO),S7(5),f7(b,"TYPE","xmlhttp"),qub(a.yl,b,!1,a.eJ,!1))},Eub=function(a,b,c){this.j=1;
this.B=[];this.C=[];this.G=new y7;this.W=a||null;this.K=b!=null?b:null;this.Z=c||!1},Fub=function(a,b){this.j=a;
this.map=b;this.context=null},Gub=function(a,b,c,d){g.bi.call(this,"timingevent",a);
this.size=b;this.rtt=c;this.retries=d},Hub=function(a){g.bi.call(this,"serverreachability",a)},Jub=function(a){a.L5(1,0);
a.fJ=W7(a,null,a.iO);Iub(a)},Kub=function(a){a.Yt&&(a.Yt.abort(),a.Yt=null);
a.eh&&(a.eh.cancel(),a.eh=null);a.Hr&&(g.Na.clearTimeout(a.Hr),a.Hr=null);Y7(a);a.Ek&&(a.Ek.cancel(),a.Ek=null);a.Kt&&(g.Na.clearTimeout(a.Kt),a.Kt=null)},Lub=function(a,b){if(a.j==0)throw Error("Invalid operation: sending map when state is closed");
a.B.push(new Fub(a.M5++,b));a.j!=2&&a.j!=3||Iub(a)},Mub=function(a){var b=0;
a.eh&&b++;a.Ek&&b++;return b},Iub=function(a){a.Ek||a.Kt||(a.Kt=Q7((0,g.Xa)(a.ZV,a),0),a.Sz=0)},Pub=function(a,b){if(a.j==1){if(!b){a.OD=Math.floor(Math.random()*1E5);
b=a.OD++;var c=new T7(a,"",b);c.Aw=a.Jp;var d=Nub(a),e=a.fJ.clone();g.Mk(e,"RID",b);g.Mk(e,"CVER","1");Z7(a,e);pub(c,e,d);a.Ek=c;a.j=2}}else a.j==3&&(b?Oub(a,b):a.B.length==0||a.Ek||Oub(a))},Oub=function(a,b){if(b)if(a.Dw>6){a.B=a.C.concat(a.B);
a.C.length=0;var c=a.OD-1;b=Nub(a)}else c=b.N,b=b.Cw;else c=a.OD++,b=Nub(a);var d=a.fJ.clone();g.Mk(d,"SID",a.D);g.Mk(d,"RID",c);g.Mk(d,"AID",a.Tz);Z7(a,d);c=new T7(a,a.D,c,a.Sz+1);c.Aw=a.Jp;c.setTimeout(1E4+Math.round(1E4*Math.random()));a.Ek=c;pub(c,d,b)},Z7=function(a,b){a.Xi&&(a=a.Xi.dW())&&g.Ig(a,function(c,d){g.Mk(b,d,c)})},Nub=function(a){var b=Math.min(a.B.length,1E3),c=["count="+b];
if(a.Dw>6&&b>0){var d=a.B[0].j;c.push("ofs="+d)}else d=0;for(var e={},f=0;f<b;e={MG:void 0},f++){e.MG=a.B[f].j;var h=a.B[f].map;e.MG=a.Dw<=6?f:e.MG-d;try{g.Ig(h,function(l){return function(m,n){c.push("req"+l.MG+"_"+n+"="+encodeURIComponent(m))}}(e))}catch(l){c.push("req"+e.MG+"_type="+encodeURIComponent("_badmap"))}}a.C=a.C.concat(a.B.splice(0,b));
return c.join("&")},Qub=function(a){a.eh||a.Hr||(a.N=1,a.Hr=Q7((0,g.Xa)(a.YV,a),0),a.Rz=0)},Sub=function(a){if(a.eh||a.Hr||a.Rz>=3)return!1;
a.N++;a.Hr=Q7((0,g.Xa)(a.YV,a),Rub(a,a.Rz));a.Rz++;return!0},X7=function(a,b,c){a.LN=a.K==null?c:!a.K;
a.Kp=b.Gr;a.Z||Jub(a)},Y7=function(a){a.Ew!=null&&(g.Na.clearTimeout(a.Ew),a.Ew=null)},Rub=function(a,b){var c=5E3+Math.floor(Math.random()*1E4);
a.isActive()||(c*=2);return c*b},$7=function(a,b){if(b==2||b==9){var c=null;
a.Xi&&(c=null);var d=(0,g.Xa)(a.tfa,a);c||(c=new g.Bk("//www.google.com/images/cleardot.gif"),e7(c));zub(c.toString(),1E4,d)}else S7(2);Tub(a,b)},Tub=function(a,b){a.j=0;
a.Xi&&a.Xi.aW(b);Uub(a);Kub(a)},Uub=function(a){a.j=0;
a.Kp=-1;if(a.Xi)if(a.C.length==0&&a.B.length==0)a.Xi.jO();else{var b=g.ac(a.C),c=g.ac(a.B);a.C.length=0;a.B.length=0;a.Xi.jO(b,c)}},W7=function(a,b,c){var d=g.Nk(c);
if(d.j!="")b&&g.Dk(d,b+"."+d.j),g.Ek(d,d.C);else{var e=window.location;d=ssb(e.protocol,b?b+"."+e.hostname:e.hostname,+e.port,c)}a.ND&&g.Ig(a.ND,function(f,h){g.Mk(d,h,f)});
g.Mk(d,"VER",a.Dw);Z7(a,d);return d},Vub=function(){},Wub=function(){this.j=[];
this.B=[]},Xub=function(a){g.bi.call(this,"channelMessage");
this.message=a},Yub=function(a){g.bi.call(this,"channelError");
this.error=a},Zub=function(a,b){this.action=a;
this.params=b||{}},a8=function(a,b){g.O.call(this);
this.j=new g.Ep(this.fda,0,this);g.P(this,this.j);this.gj=5E3;this.B=0;if(typeof a==="function")b&&(a=(0,g.Xa)(a,b));else if(a&&typeof a.handleEvent==="function")a=(0,g.Xa)(a.handleEvent,a);else throw Error("Invalid listener argument");this.C=a},$ub=function(a,b,c,d,e){c=c===void 0?!1:c;
d=d===void 0?function(){return""}:d;
e=e===void 0?!1:e;this.Aa=a;this.N=b;this.C=new g.eq;this.B=new a8(this.zea,this);this.j=null;this.oa=!1;this.K=null;this.W="";this.Z=this.G=0;this.D=[];this.Oa=c;this.qa=d;this.Ua=e;this.Ka=new tsb;this.Ca=new vsb;this.Ja=new xsb;this.Fa=new zsb;this.Ta=new Bsb;this.Va=new Csb},avb=function(a){if(a.j){var b=a.qa(),c=a.j.Jp||{};
b?c["x-youtube-lounge-xsrf-token"]=b:delete c["x-youtube-lounge-xsrf-token"];a.j.Jp=c}},b8=function(a){this.scheme="https";
this.port=this.domain="";this.j="/api/lounge";this.B=!0;a=a||document.location.href;var b=Number(g.$i(4,a))||"";b&&(this.port=":"+b);this.domain=g.aj(a)||"";a=g.Cb();a.search("MSIE")>=0&&(a=a.match(/MSIE ([\d.]+)/)[1],g.Bb(a,"10.0")<0&&(this.B=!1))},c8=function(a,b){var c=a.j;
a.B&&(c=a.scheme+"://"+a.domain+a.port+a.j);return g.gj(c+b,{})},bvb=function(a,b){g.qi.call(this);
var c=this;this.Id=a();this.Id.subscribe("handlerOpened",this.O5,this);this.Id.subscribe("handlerClosed",this.onClosed,this);this.Id.subscribe("handlerError",function(d,e){c.onError(e)});
this.Id.subscribe("handlerMessage",this.onMessage,this);this.j=b},cvb=function(a,b,c){var d=this;
c=c===void 0?function(){return""}:c;
var e=e===void 0?new iub:e;var f=f===void 0?new g.eq:f;this.pathPrefix=a;this.j=b;this.Aa=c;this.G=f;this.Z=null;this.W=this.N=0;this.channel=null;this.K=0;this.C=new a8(function(){d.C.isActive();var h;((h=d.channel)==null?void 0:Ktb((new lub(h,h.j)).j.B))===0&&d.connect(d.Z,d.N)});
this.D={};this.B={};this.oa=!1;this.logger=null;this.qa=[];this.Cg=void 0;this.Ka=new tsb;this.Ca=new vsb;this.Ja=new xsb;this.Fa=new zsb},dvb=function(a){g.ji(a.channel,"m",function(){a.K=3;
a.C.reset();a.Z=null;a.N=0;for(var b=g.w(a.qa),c=b.next();!c.done;c=b.next())c=c.value,a.channel&&a.channel.send(c);a.qa=[];a.publish("webChannelOpened");usb(a.Ka,"WEB_CHANNEL")});
g.ji(a.channel,"n",function(){a.K=0;a.C.isActive()||a.publish("webChannelClosed");var b,c=(b=a.channel)==null?void 0:mub(new lub(b,b.j));c&&(a.qa=[].concat(g.x(c)));wsb(a.Ca,"WEB_CHANNEL")});
g.ji(a.channel,"p",function(b){var c=b.data;c[0]==="gracefulReconnect"?(a.C.start(),a.channel&&a.channel.close()):a.publish("webChannelMessage",new Zub(c[0],c[1]));a.Cg=b.statusCode;ysb(a.Ja,"WEB_CHANNEL")});
g.ji(a.channel,"o",function(){a.Cg===401||a.C.start();a.publish("webChannelError");Asb(a.Fa,"WEB_CHANNEL")})},evb=function(a){var b=a.Aa();
b?a.D["x-youtube-lounge-xsrf-token"]=b:delete a.D["x-youtube-lounge-xsrf-token"]},fvb=function(a){g.qi.call(this);
this.j=a();this.j.subscribe("webChannelOpened",this.P5,this);this.j.subscribe("webChannelClosed",this.onClosed,this);this.j.subscribe("webChannelError",this.onError,this);this.j.subscribe("webChannelMessage",this.onMessage,this)},gvb=function(a,b,c,d,e){function f(){return new $ub(c8(a,"/bc"),b,!1,c,d)}
c=c===void 0?function(){return""}:c;
return g.Zr("enable_mdx_web_channel_desktop")?new fvb(function(){return new cvb(c8(a,"/wc"),b,c)}):new bvb(f,e)},kvb=function(){var a=hvb;
ivb();d8.push(a);jvb()},e8=function(a,b){ivb();
var c=lvb(a,String(b));d8.length==0?mvb(c):(jvb(),g.lc(d8,function(d){d(c)}))},f8=function(a){e8("CP",a)},ivb=function(){d8||(d8=g.Pa("yt.mdx.remote.debug.handlers_")||[],g.Oa("yt.mdx.remote.debug.handlers_",d8))},mvb=function(a){var b=(g8+1)%50;
g8=b;h8[b]=a;i8||(i8=b==49)},jvb=function(){var a=d8;
if(h8[0]){var b=i8?g8:-1;do{b=(b+1)%50;var c=h8[b];g.lc(a,function(d){d(c)})}while(b!=g8);
h8=Array(50);g8=-1;i8=!1}},lvb=function(a,b){var c=(Date.now()-nvb)/1E3;
c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")},j8=function(a){g.Qx.call(this);
this.K=a;this.screens=[]},ovb=function(a,b){var c=a.get(b.uuid)||a.get(b.id);
if(c)return a=c.name,c.id=b.id||c.id,c.name=b.name,c.token=b.token,c.uuid=b.uuid||c.uuid,c.name!=a;a.screens.push(b);return!0},pvb=function(a,b){var c=a.screens.length!=b.length;
a.screens=g.Bn(a.screens,function(f){return!!Qsb(b,f)});
for(var d=0,e=b.length;d<e;d++)c=ovb(a,b[d])||c;return c},qvb=function(a,b){var c=a.screens.length;
a.screens=g.Bn(a.screens,function(d){return!(d||b?!d!=!b?0:d.id==b.id:1)});
return a.screens.length<c},rvb=function(a,b,c,d,e){g.Qx.call(this);
this.C=a;this.N=b;this.D=c;this.K=d;this.G=e;this.B=0;this.j=null;this.wd=NaN},l8=function(a){j8.call(this,"LocalScreenService");
this.B=a;this.j=NaN;k8(this);this.info("Initializing with "+Nsb(this.screens))},svb=function(a){if(a.screens.length){var b=g.Ql(a.screens,function(d){return d.id}),c=c8(a.B,"/pairing/get_lounge_token_batch");
a.B.sendRequest("POST",c,{screen_ids:b.join(",")},(0,g.Xa)(a.e$,a),(0,g.Xa)(a.d$,a))}},k8=function(a){if(g.Zr("deprecate_pair_servlet_enabled"))return pvb(a,[]);
var b=Msb(Xsb());b=g.Bn(b,function(c){return!c.uuid});
return pvb(a,b)},m8=function(a,b){Zsb(g.Ql(a.screens,Ksb));
b&&Ysb()},uvb=function(a,b){g.Qx.call(this);
this.K=b;b=(b=g.mt("yt-remote-online-screen-ids")||"")?b.split(","):[];for(var c={},d=this.K(),e=d.length,f=0;f<e;++f){var h=d[f].id;c[h]=g.Wb(b,h)}this.j=c;this.G=a;this.C=this.D=NaN;this.B=null;tvb("Initialized with "+g.Ti(this.j))},vvb=function(a,b,c){var d=c8(a.G,"/pairing/get_screen_availability");
a.G.sendRequest("POST",d,{lounge_token:b.token},(0,g.Xa)(function(e){e=e.screens||[];for(var f=e.length,h=0;h<f;++h)if(e[h].loungeToken==b.token){c(e[h].status=="online");return}c(!1)},a),(0,g.Xa)(function(){c(!1)},a))},xvb=function(a,b){a:if(msb(b)!=msb(a.j))var c=!1;
else{c=g.Og(b);for(var d=c.length,e=0;e<d;++e)if(!a.j[c[e]]){c=!1;break a}c=!0}c||(tvb("Updated online screens: "+g.Ti(a.j)),a.j=b,a.publish("screenChange"));wvb(a)},n8=function(a){isNaN(a.C)||g.Wr(a.C);
a.C=g.Ur((0,g.Xa)(a.QT,a),a.D>0&&a.D<g.Za()?2E4:1E4)},tvb=function(a){e8("OnlineScreenService",a)},yvb=function(a){var b={};
g.lc(a.K(),function(c){c.token?b[c.token]=c.id:this.qg("Requesting availability of screen w/o lounge token.")});
return b},wvb=function(a){a=g.Og(g.Jg(a.j,function(b){return b}));
g.hc(a);a.length?g.lt("yt-remote-online-screen-ids",a.join(","),60):g.nt("yt-remote-online-screen-ids")},o8=function(a,b){b=b===void 0?!1:b;
j8.call(this,"ScreenService");this.D=a;this.N=b;this.j=this.B=null;this.C=[];this.G={};zvb(this)},Bvb=function(a,b,c,d,e,f){a.info("getAutomaticScreenByIds "+c+" / "+b);
c||(c=a.G[b]);var h=a.Ol(),l=c?o7(h,c):null;c&&(a.N||l)||(l=o7(h,b));if(l){l.uuid=b;var m=p8(a,l);vvb(a.j,m,function(n){e(n?m:null)})}else c?Avb(a,c,(0,g.Xa)(function(n){var p=p8(this,new l7({name:d,
screenId:c,loungeToken:n,dialId:b||""}));vvb(this.j,p,function(q){e(q?p:null)})},a),f):e(null)},Cvb=function(a,b){for(var c=a.screens.length,d=0;d<c;++d)if(a.screens[d].name==b)return a.screens[d];
return null},Dvb=function(a,b,c){vvb(a.j,b,c)},Avb=function(a,b,c,d){a.info("requestLoungeToken_ for "+b);
var e={postParams:{screen_ids:b},method:"POST",context:a,onSuccess:function(f,h){f=h&&h.screens||[];f[0]&&f[0].screenId==b?c(f[0].loungeToken):d(Error("Missing lounge token in token response"))},
onError:function(){d(Error("Request screen lounge token failed"))}};
g.ds(c8(a.D,"/pairing/get_lounge_token_batch"),e)},Evb=function(a){a.screens=a.B.Ol();
var b=a.G,c={},d;for(d in b)c[b[d]]=d;b=a.screens.length;for(d=0;d<b;++d){var e=a.screens[d];e.uuid=c[e.id]||""}a.info("Updated manual screens: "+Nsb(a.screens))},zvb=function(a){Fvb(a);
a.B=new l8(a.D);a.B.subscribe("screenChange",(0,g.Xa)(a.o$,a));Evb(a);a.N||(a.C=Msb(g.mt("yt-remote-automatic-screen-cache")||[]));Fvb(a);a.info("Initializing automatic screens: "+Nsb(a.C));a.j=new uvb(a.D,(0,g.Xa)(a.Ol,a,!0));a.j.subscribe("screenChange",(0,g.Xa)(function(){this.publish("onlineScreenChange")},a))},p8=function(a,b){var c=a.get(b.id);
c?(c.uuid=b.uuid,b=c):((c=o7(a.C,b.uuid))?(c.id=b.id,c.token=b.token,b=c):a.C.push(b),a.N||Gvb(a));Fvb(a);a.G[b.uuid]=b.id;g.lt("yt-remote-device-id-map",a.G,31536E3);return b},Gvb=function(a){a=g.Bn(a.C,function(b){return b.idType!="shortLived"});
g.lt("yt-remote-automatic-screen-cache",g.Ql(a,Ksb))},Fvb=function(a){a.G=g.mt("yt-remote-device-id-map")||{}},q8=function(a,b,c){g.Qx.call(this);
this.Fa=c;this.D=a;this.B=b;this.j=null},r8=function(a,b){a.j=b;
a.publish("sessionScreen",a.j)},Hvb=function(a,b){a.j&&(a.j.token=b,p8(a.D,a.j));
a.publish("sessionScreen",a.j)},s8=function(a,b){e8(a.Fa,b)},t8=function(a,b,c){q8.call(this,a,b,"CastSession");
var d=this;this.config_=c;this.C=null;this.qa=(0,g.Xa)(this.U5,this);this.Ca=(0,g.Xa)(this.tda,this);this.oa=g.Ur(function(){Ivb(d,null)},12E4);
this.N=this.G=this.K=this.Z=0;this.Aa=!1;this.W="unknown"},Kvb=function(a,b){g.Wr(a.N);
a.N=0;b==0?Jvb(a):a.N=g.Ur(function(){Jvb(a)},b)},Jvb=function(a){Lvb(a,"getLoungeToken");
g.Wr(a.G);a.G=g.Ur(function(){Mvb(a,null)},3E4)},Lvb=function(a,b){a.info("sendYoutubeMessage_: "+b+" "+g.Ti());
var c={};c.type=b;a.C?a.C.sendMessage("urn:x-cast:com.google.youtube.mdx",c,function(){},(0,g.Xa)(function(){s8(this,"Failed to send message: "+b+".")},a)):s8(a,"Sending yt message without session: "+g.Ti(c))},Nvb=function(a,b){b?(a.info("onConnectedScreenId_: Received screenId: "+b),a.j&&a.j.id==b||a.oZ(b,function(c){r8(a,c)},function(){return a.Vj()},5)):a.Vj(Error("Waiting for session status timed out."))},Pvb=function(a,b,c){a.info("onConnectedScreenData_: Received screenData: "+JSON.stringify(b));
var d=new l7(b);Ovb(a,d,function(e){e?(a.Aa=!0,p8(a.D,d),r8(a,d),a.W="unknown",Kvb(a,c)):(g.Cr(Error("CastSession, RemoteScreen from screenData: "+JSON.stringify(b)+" is not online.")),a.Vj())},5)},Ivb=function(a,b){g.Wr(a.oa);
a.oa=0;b?a.config_.enableCastLoungeToken&&b.loungeToken?b.deviceId?a.j&&a.j.uuid==b.deviceId||(b.loungeTokenRefreshIntervalMs?Pvb(a,{name:a.B.friendlyName,screenId:b.screenId,loungeToken:b.loungeToken,dialId:b.deviceId,screenIdType:"shortLived"},b.loungeTokenRefreshIntervalMs):(g.Cr(Error("No loungeTokenRefreshIntervalMs presents in mdxSessionStatusData: "+JSON.stringify(b)+".")),Nvb(a,b.screenId))):(g.Cr(Error("No device id presents in mdxSessionStatusData: "+JSON.stringify(b)+".")),Nvb(a,b.screenId)):
Nvb(a,b.screenId):a.Vj(Error("Waiting for session status timed out."))},Mvb=function(a,b){g.Wr(a.G);
a.G=0;var c=null;if(b)if(b.loungeToken){var d;((d=a.j)==null?void 0:d.token)==b.loungeToken&&(c="staleLoungeToken")}else c="missingLoungeToken";else c="noLoungeTokenResponse";c?(a.info("Did not receive a new lounge token in onLoungeToken_ with data: "+(JSON.stringify(b)+", error: "+c)),a.W=c,Kvb(a,3E4)):(Hvb(a,b.loungeToken),a.Aa=!1,a.W="unknown",Kvb(a,b.loungeTokenRefreshIntervalMs))},Ovb=function(a,b,c,d){g.Wr(a.K);
a.K=0;Dvb(a.D,b,function(e){e||d<0?c(e):a.K=g.Ur(function(){Ovb(a,b,c,d-1)},300)})},Qvb=function(a){g.Wr(a.Z);
a.Z=0;g.Wr(a.K);a.K=0;g.Wr(a.oa);a.oa=0;g.Wr(a.G);a.G=0;g.Wr(a.N);a.N=0},u8=function(a,b,c,d){q8.call(this,a,b,"DialSession");
this.config_=d;this.C=this.Z=null;this.Ca="";this.Oa=c;this.Ka=null;this.oa=function(){};
this.W=NaN;this.Ja=(0,g.Xa)(this.V5,this);this.G=function(){};
this.N=this.K=0;this.qa=!1;this.Aa="unknown"},v8=function(a){var b;
return!!(a.config_.enableDialLoungeToken&&((b=a.C)==null?0:b.getDialAppInfo))},Rvb=function(a){a.G=a.D.fW(a.Ca,a.B.label,a.B.friendlyName,v8(a),function(b,c){a.G=function(){};
a.qa=!0;r8(a,b);b.idType=="shortLived"&&c>0&&w8(a,c)},function(b){a.G=function(){};
a.Vj(b)})},Svb=function(a){var b={};
b.pairingCode=a.Ca;b.theme=a.Oa;atb()&&(b.env_useStageMdx=1);return g.fj(b)},Tvb=function(a){return new Promise(function(b){a.Ca=Osb();
if(a.Ka){var c=new chrome.cast.DialLaunchResponse(!0,Svb(a));b(c);Rvb(a)}else a.oa=function(){g.Wr(a.W);a.oa=function(){};
a.W=NaN;var d=new chrome.cast.DialLaunchResponse(!0,Svb(a));b(d);Rvb(a)},a.W=g.Ur(function(){a.oa()},100)})},Vvb=function(a,b,c){a.info("initOnConnectedScreenDataPromise_: Received screenData: "+JSON.stringify(b));
var d=new l7(b);return(new Promise(function(e){Uvb(a,d,function(f){f?(a.qa=!0,p8(a.D,d),r8(a,d),w8(a,c)):g.Cr(Error("DialSession, RemoteScreen from screenData: "+JSON.stringify(b)+" is not online."));e(f)},5)})).then(function(e){return e?new chrome.cast.DialLaunchResponse(!1):Tvb(a)})},Wvb=function(a,b){var c=a.Z.receiver.label,d=a.B.friendlyName;
return(new Promise(function(e){Bvb(a.D,c,b,d,function(f){f&&f.token&&r8(a,f);e(f)},function(f){s8(a,"Failed to get DIAL screen: "+f);
e(null)})})).then(function(e){return e&&e.token?new chrome.cast.DialLaunchResponse(!1):Tvb(a)})},Uvb=function(a,b,c,d){g.Wr(a.K);
a.K=0;Dvb(a.D,b,function(e){e||d<0?c(e):a.K=g.Ur(function(){Uvb(a,b,c,d-1)},300)})},w8=function(a,b){a.info("getDialAppInfoWithTimeout_ "+b);
v8(a)&&(g.Wr(a.N),a.N=0,b==0?Xvb(a):a.N=g.Ur(function(){Xvb(a)},b))},Xvb=function(a){v8(a)&&a.C.getDialAppInfo(function(b){a.info("getDialAppInfo dialLaunchData: "+JSON.stringify(b));
b=b.extraData||{};var c=null;if(b.loungeToken){var d;((d=a.j)==null?void 0:d.token)==b.loungeToken&&(c="staleLoungeToken")}else c="missingLoungeToken";c?(a.Aa=c,w8(a,3E4)):(a.qa=!1,a.Aa="unknown",Hvb(a,b.loungeToken),w8(a,b.loungeTokenRefreshIntervalMs))},function(b){a.info("getDialAppInfo error: "+b);
a.Aa="noLoungeTokenResponse";w8(a,3E4)})},Yvb=function(a){g.Wr(a.K);
a.K=0;g.Wr(a.N);a.N=0;a.G();a.G=function(){};
g.Wr(a.W)},x8=function(a,b){q8.call(this,a,b,"ManualSession");
this.C=g.Ur((0,g.Xa)(this.zB,this,null),150)},y8=function(a,b){g.Qx.call(this);
this.config_=b;this.B=a;this.Z=b.appId||"233637DE";this.D=b.theme||"cl";this.W=b.disableCastApi||!1;this.K=b.forceMirroring||!1;this.j=null;this.N=!1;this.C=[];this.G=(0,g.Xa)(this.qca,this)},Zvb=function(a,b){return b?g.Ub(a.C,function(c){return m7(b,c.label)},a):null},z8=function(a){e8("Controller",a)},hvb=function(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)},A8=function(a){return a.N||!!a.C.length||!!a.j},B8=function(a,b,c){b!=a.j&&(g.vg(a.j),(a.j=b)?(c?a.publish("yt-remote-cast2-receiver-resumed",
b.B):a.publish("yt-remote-cast2-receiver-selected",b.B),b.subscribe("sessionScreen",(0,g.Xa)(a.n1,a,b)),b.subscribe("sessionFailed",function(){return $vb(a,b)}),b.j?a.publish("yt-remote-cast2-session-change",b.j):c&&a.j.zB(null)):a.publish("yt-remote-cast2-session-change",null))},$vb=function(a,b){a.j==b&&a.publish("yt-remote-cast2-session-failed")},awb=function(a){var b=a.B.eW(),c=a.j&&a.j.B;
a=g.Ql(b,function(d){c&&m7(d,c.label)&&(c=null);var e=d.uuid?d.uuid:d.id,f=Zvb(this,d);f?(f.label=e,f.friendlyName=d.name):(f=new chrome.cast.Receiver(e,d.name),f.receiverType=chrome.cast.ReceiverType.CUSTOM);return f},a);
c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a},hwb=function(a,b,c,d){d.disableCastApi?C8("Cannot initialize because disabled by Mdx config."):bwb()?cwb(b,d)&&(dwb(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?ewb(a,c):(window.__onGCastApiAvailable=function(e,f){e?ewb(a,c):(D8("Failed to load cast API: "+f),fwb(!1),dwb(!1),g.nt("yt-remote-cast-available"),g.nt("yt-remote-cast-receiver"),
gwb(),c(!1))},d.loadCastApiSetupScript?g.Vv("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"):window.navigator.userAgent.indexOf("Android")>=0&&window.navigator.userAgent.indexOf("Chrome/")>=0&&window.navigator.presentation?ctb()>=60&&ltb():!window.chrome||!window.navigator.presentation||window.navigator.userAgent.indexOf("Edge")>=0?gtb():ctb()>=89?ntb():(ktb(),v7(mtb.map(htb))))):C8("Cannot initialize because not running Chrome")},gwb=function(){C8("dispose");
var a=E8();a&&a.dispose();g.Oa("yt.mdx.remote.cloudview.instance_",null);iwb(!1);g.Tv(jwb);jwb.length=0},F8=function(){return!!g.mt("yt-remote-cast-installed")},kwb=function(){var a=g.mt("yt-remote-cast-receiver");
return a?a.friendlyName:null},lwb=function(){C8("clearCurrentReceiver");
g.nt("yt-remote-cast-receiver")},mwb=function(){return F8()?E8()?E8().getCastSession():(D8("getCastSelector: Cast is not initialized."),null):(D8("getCastSelector: Cast API is not installed!"),null)},nwb=function(){F8()?E8()?G8()?(C8("Requesting cast selector."),E8().requestSession()):(C8("Wait for cast API to be ready to request the session."),jwb.push(g.Sv("yt-remote-cast2-api-ready",nwb))):D8("requestCastSelector: Cast is not initialized."):D8("requestCastSelector: Cast API is not installed!")},
H8=function(a,b){G8()?E8().setConnectedScreenStatus(a,b):D8("setConnectedScreenStatus called before ready.")},bwb=function(){var a=g.Cb().search(/ (CrMo|Chrome|CriOS)\//)>=0;
return g.fG||a},owb=function(a,b){E8().init(a,b)},cwb=function(a,b){var c=!1;
E8()||(a=new y8(a,b),a.subscribe("yt-remote-cast2-availability-change",function(d){g.lt("yt-remote-cast-available",d);t7("yt-remote-cast2-availability-change",d)}),a.subscribe("yt-remote-cast2-receiver-selected",function(d){C8("onReceiverSelected: "+d.friendlyName);
g.lt("yt-remote-cast-receiver",d);t7("yt-remote-cast2-receiver-selected",d)}),a.subscribe("yt-remote-cast2-receiver-resumed",function(d){C8("onReceiverResumed: "+d.friendlyName);
g.lt("yt-remote-cast-receiver",d);t7("yt-remote-cast2-receiver-resumed",d)}),a.subscribe("yt-remote-cast2-session-change",function(d){C8("onSessionChange: "+n7(d));
d||g.nt("yt-remote-cast-receiver");t7("yt-remote-cast2-session-change",d)}),g.Oa("yt.mdx.remote.cloudview.instance_",a),c=!0);
C8("cloudview.createSingleton_: "+c);return c},E8=function(){return g.Pa("yt.mdx.remote.cloudview.instance_")},ewb=function(a,b){fwb(!0);
dwb(!1);owb(a,function(c){c?(iwb(!0),g.Uv("yt-remote-cast2-api-ready")):(D8("Failed to initialize cast API."),fwb(!1),g.nt("yt-remote-cast-available"),g.nt("yt-remote-cast-receiver"),gwb());b(c)})},C8=function(a){e8("cloudview",a)},D8=function(a){e8("cloudview",a)},fwb=function(a){C8("setCastInstalled_ "+a);
g.lt("yt-remote-cast-installed",a)},G8=function(){return!!g.Pa("yt.mdx.remote.cloudview.apiReady_")},iwb=function(a){C8("setApiReady_ "+a);
g.Oa("yt.mdx.remote.cloudview.apiReady_",a)},dwb=function(a){g.Oa("yt.mdx.remote.cloudview.initializing_",a)},I8=function(a){this.index=-1;
this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.K=this.N=0;this.trackData=null;this.Rl=this.wq=!1;this.Z=this.G=this.j=this.D=0;this.C=NaN;this.B=!1;this.reset(a)},pwb=function(a){a.audioTrackId=null;
a.trackData=null;a.playerState=-1;a.wq=!1;a.Rl=!1;a.N=0;a.K=g.Za();a.D=0;a.j=0;a.G=0;a.Z=0;a.C=NaN;a.B=!1},J8=function(a){return a.isPlaying()?(g.Za()-a.K)/1E3:0},K8=function(a,b){a.N=b;
a.K=g.Za()},L8=function(a){switch(a.playerState){case 1:case 1081:return(g.Za()-a.K)/1E3+a.N;
case -1E3:return 0}return a.N},M8=function(a,b,c){var d=a.videoId;
a.videoId=b;a.index=c;b!=d&&pwb(a)},qwb=function(a){var b={};
b.index=a.index;b.listId=a.listId;b.videoId=a.videoId;b.playerState=a.playerState;b.volume=a.volume;b.muted=a.muted;b.audioTrackId=a.audioTrackId;b.trackData=g.Zg(a.trackData);b.hasPrevious=a.wq;b.hasNext=a.Rl;b.playerTime=a.N;b.playerTimeAt=a.K;b.seekableStart=a.D;b.seekableEnd=a.j;b.duration=a.G;b.loadedTime=a.Z;b.liveIngestionTime=a.C;return b},O8=function(a,b){g.Qx.call(this);
var c=this;this.C=0;this.D=a;this.K=[];this.G=new Wub;this.B=this.j=null;this.W=(0,g.Xa)(this.dba,this);this.N=(0,g.Xa)(this.ZG,this);this.Z=(0,g.Xa)(this.cba,this);this.oa=(0,g.Xa)(this.fba,this);var d=0;a?(d=a.getProxyState(),d!=3&&(a.subscribe("proxyStateChange",this.pU,this),rwb(this))):d=3;d!=0&&(b?this.pU(d):g.Ur(function(){c.pU(d)},0));
(a=mwb())&&N8(this,a);this.subscribe("yt-remote-cast2-session-change",this.oa)},P8=function(a){return new I8(a.D.getPlayerContextData())},rwb=function(a){g.lc("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange multiStateLoopEnabled loopModeChange".split(" "),function(b){this.K.push(this.D.subscribe(b,g.Ya(this.oca,b),this))},a)},swb=function(a){g.lc(a.K,function(b){this.D.unsubscribeByKey(b)},a);
a.K.length=0},Q8=function(a){return a.getState()==1},R8=function(a,b){var c=a.G;
c.j.length+c.B.length<50&&a.G.enqueue(b)},twb=function(a,b,c){var d=P8(a);
K8(d,c);d.playerState!=-1E3&&(d.playerState=b);S8(a,d)},T8=function(a,b,c){a.D.sendMessage(b,c)},S8=function(a,b){swb(a);
a.D.setPlayerContextData(qwb(b));rwb(a)},N8=function(a,b){a.B&&(a.B.removeUpdateListener(a.W),a.B.removeMediaListener(a.N),a.ZG(null));
a.B=b;a.B&&(f8("Setting cast session: "+a.B.sessionId),a.B.addUpdateListener(a.W),a.B.addMediaListener(a.N),a.B.media.length&&a.ZG(a.B.media[0]))},uwb=function(a){var b=a.j.media,c=a.j.customData;
if(b&&c){var d=P8(a);b.contentId!=d.videoId&&f8("Cast changing video to: "+b.contentId);d.videoId=b.contentId;d.playerState=c.playerState;K8(d,a.j.getEstimatedTime());S8(a,d)}else f8("No cast media video. Ignoring state update.")},U8=function(a,b,c){return(0,g.Xa)(function(d){this.qg("Failed to "+b+" with cast v2 channel. Error code: "+d.code);
d.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.qg("Retrying "+b+" using MDx browser channel."),T8(this,b,c))},a)},X8=function(a,b,c,d){d=d===void 0?!1:d;
g.Qx.call(this);var e=this;this.K=NaN;this.Ca=!1;this.W=this.Z=this.qa=this.Aa=NaN;this.oa=[];this.G=this.N=this.D=this.j=this.B=null;this.Ka=a;this.Ja=d;this.oa.push(g.at(window,"beforeunload",function(){e.CA(2)}));
this.C=[];this.j=new I8;this.Oa=b.id;this.Fa=b.idType;this.B=gvb(this.Ka,c,this.jW,this.Fa=="shortLived",this.Oa);this.B.listen("channelOpened",function(){vwb(e)});
this.B.listen("channelClosed",function(){V8("Channel closed");isNaN(e.K)?r7(!0):r7();e.dispose()});
this.B.listen("channelError",function(f){r7();isNaN(e.XF())?(f==1&&e.Fa=="shortLived"&&e.publish("browserChannelAuthError",f),V8("Channel error: "+f+" without reconnection"),e.dispose()):(e.Ca=!0,V8("Channel error: "+f+" with reconnection in "+e.XF()+" ms"),W8(e,2))});
this.B.listen("channelMessage",function(f){wwb(e,f)});
this.B.Ys(b.token);this.subscribe("remoteQueueChange",function(){var f=e.j.videoId;g.ot()&&g.lt("yt-remote-session-video-id",f)})},xwb=function(a){return g.Ub(a.C,function(b){return b.type=="LOUNGE_SCREEN"})},V8=function(a){e8("conn",a)},W8=function(a,b){a.publish("proxyStateChange",b)},ywb=function(a){a.K=g.Ur(function(){V8("Connecting timeout");
a.CA(1)},2E4)},zwb=function(a){g.Wr(a.K);
a.K=NaN},Awb=function(a){g.Wr(a.Aa);
a.Aa=NaN},Cwb=function(a){Bwb(a);
a.qa=g.Ur(function(){Y8(a,"getNowPlaying")},2E4)},Bwb=function(a){g.Wr(a.qa);
a.qa=NaN},vwb=function(a){V8("Channel opened");
a.Ca&&(a.Ca=!1,Awb(a),a.Aa=g.Ur(function(){V8("Timing out waiting for a screen.");a.CA(1)},15E3))},Ewb=function(a,b){var c=null;
if(b){var d=xwb(a);d&&(c={clientName:d.clientName,deviceMake:d.brand,deviceModel:d.model,osVersion:d.osVersion})}g.Oa("yt.mdx.remote.remoteClient_",c);b&&(zwb(a),Awb(a));c=a.B.mB()&&isNaN(a.K);b==c?b&&(W8(a,1),Y8(a,"getSubtitlesTrack")):b?(a.jZ()&&a.j.reset(),W8(a,1),Y8(a,"getNowPlaying"),Dwb(a)):a.CA(1)},Fwb=function(a,b){var c=b.params.videoId;
delete b.params.videoId;c==a.j.videoId&&(g.Sg(b.params)?a.j.trackData=null:a.j.trackData=b.params,a.publish("remotePlayerChange"))},Gwb=function(a,b,c){var d=b.params.videoId||b.params.video_id,e=parseInt(b.params.currentIndex,10);
a.j.listId=b.params.listId||a.j.listId;M8(a.j,d,e);a.publish("remoteQueueChange",c)},Iwb=function(a,b){b.params=b.params||{};
Gwb(a,b,"NOW_PLAYING_MAY_CHANGE");Hwb(a,b);a.publish("autoplayDismissed")},Hwb=function(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10);
K8(a.j,isNaN(c)?0:c);c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;c==-1&&a.j.playerState==-1E3&&(c=-1E3);a.j.playerState=c;c=Number(b.params.loadedTime);a.j.Z=isNaN(c)?0:c;a.j.qr(Number(b.params.duration));c=a.j;var d=Number(b.params.liveIngestionTime);c.C=d;c.B=isNaN(d)?!1:!0;c=a.j;d=Number(b.params.seekableStartTime);b=Number(b.params.seekableEndTime);c.D=isNaN(d)?0:d;c.j=isNaN(b)?0:b;a.j.playerState==1?Cwb(a):Bwb(a);a.publish("remotePlayerChange")},Jwb=function(a,b){if(a.j.playerState!=-1E3){var c=
1085;
switch(parseInt(b.params.adState,10)){case 1:c=1081;break;case 2:c=1084;break;case 0:c=1083}a.j.playerState=c;b=parseInt(b.params.currentTime,10);K8(a.j,isNaN(b)?0:b);a.publish("remotePlayerChange")}},Kwb=function(a,b){var c=b.params.muted=="true";
a.j.volume=parseInt(b.params.volume,10);a.j.muted=c;a.publish("remotePlayerChange")},Lwb=function(a,b){a.N=b.params.videoId;
a.publish("nowAutoplaying",parseInt(b.params.timeout,10))},Mwb=function(a,b){a.N=b.params.videoId||null;
a.publish("autoplayUpNext",a.N)},Nwb=function(a,b){a.G=b.params.autoplayMode;
a.publish("autoplayModeChange",a.G);a.G=="DISABLED"&&a.publish("autoplayDismissed")},Owb=function(a,b){var c=b.params.hasNext=="true";
a.j.wq=b.params.hasPrevious=="true";a.j.Rl=c;a.publish("previousNextChange")},wwb=function(a,b){b=b.message;
b.params?V8("Received: action="+b.action+", params="+g.Ti(b.params)):V8("Received: action="+b.action+" {}");switch(b.action){case "loungeStatus":b=g7(b.params.devices);a.C=g.Ql(b,function(d){return new Hsb(d)});
b=!!g.Ub(a.C,function(d){return d.type=="LOUNGE_SCREEN"});
Ewb(a,b);b=a.m_("mlm");a.publish("multiStateLoopEnabled",b);break;case "loungeScreenDisconnected":g.Zb(a.C,function(d){return d.type=="LOUNGE_SCREEN"});
Ewb(a,!1);break;case "remoteConnected":var c=new Hsb(g7(b.params.device));g.Ub(a.C,function(d){return c?d.id==c.id:!1})||lsb(a.C,c);
break;case "remoteDisconnected":c=new Hsb(g7(b.params.device));g.Zb(a.C,function(d){return c?d.id==c.id:!1});
break;case "gracefulDisconnect":break;case "playlistModified":Gwb(a,b,"QUEUE_MODIFIED");break;case "nowPlaying":Iwb(a,b);break;case "onStateChange":Hwb(a,b);break;case "onAdStateChange":Jwb(a,b);break;case "onVolumeChanged":Kwb(a,b);break;case "onSubtitlesTrackChanged":Fwb(a,b);break;case "nowAutoplaying":Lwb(a,b);break;case "autoplayDismissed":a.publish("autoplayDismissed");break;case "autoplayUpNext":Mwb(a,b);break;case "onAutoplayModeChanged":Nwb(a,b);break;case "onHasPreviousNextChanged":Owb(a,
b);break;case "requestAssistedSignIn":a.publish("assistedSignInRequested",b.params.authCode);break;case "onLoopModeChanged":a.publish("loopModeChange",b.params.loopMode);break;default:V8("Unrecognized action: "+b.action)}},Dwb=function(a){g.Wr(a.W);
a.W=g.Ur(function(){a.CA(1)},864E5)},Y8=function(a,b,c){c?V8("Sending: action="+b+", params="+g.Ti(c)):V8("Sending: action="+b);
a.B.sendMessage(b,c)},Pwb=function(a){j8.call(this,"ScreenServiceProxy");
this.ph=a;this.j=[];this.j.push(this.ph.$_s("screenChange",(0,g.Xa)(this.Z5,this)));this.j.push(this.ph.$_s("onlineScreenChange",(0,g.Xa)(this.Xba,this)))},Uwb=function(a,b){$sb();
if(!s7||!s7.get("yt-remote-disable-remote-module-for-dev")){b=g.zr("MDX_CONFIG")||b;Rsb();Vsb();Z8||(Z8=new b8(b?b.loungeApiHost:void 0),atb()&&(Z8.j="/api/loungedev"));$8||($8=g.Pa("yt.mdx.remote.deferredProxies_")||[],g.Oa("yt.mdx.remote.deferredProxies_",$8));Qwb();var c=a9();if(!c){var d=new o8(Z8,b?b.disableAutomaticScreenCache||!1:!1);g.Oa("yt.mdx.remote.screenService_",d);c=a9();var e={};b&&(e={appId:b.appId,disableDial:b.disableDial,theme:b.theme,loadCastApiSetupScript:b.loadCastApiSetupScript,
disableCastApi:b.disableCastApi,enableDialLoungeToken:b.enableDialLoungeToken,enableCastLoungeToken:b.enableCastLoungeToken,forceMirroring:b.forceMirroring});g.Oa("yt.mdx.remote.enableConnectWithInitialState_",b?b.enableConnectWithInitialState||!1:!1);hwb(a,d,function(f){f?b9()&&H8(b9(),"YouTube TV"):d.subscribe("onlineScreenChange",function(){t7("yt-remote-receiver-availability-change")})},e)}b&&!g.Pa("yt.mdx.remote.initialized_")&&(g.Oa("yt.mdx.remote.initialized_",!0),c9("Initializing: "+g.Ti(b)),
d9.push(g.Sv("yt-remote-cast2-api-ready",function(){t7("yt-remote-api-ready")})),d9.push(g.Sv("yt-remote-cast2-availability-change",function(){t7("yt-remote-receiver-availability-change")})),d9.push(g.Sv("yt-remote-cast2-receiver-selected",function(){e9(null);
t7("yt-remote-auto-connect","cast-selector-receiver")})),d9.push(g.Sv("yt-remote-cast2-receiver-resumed",function(){t7("yt-remote-receiver-resumed","cast-selector-receiver")})),d9.push(g.Sv("yt-remote-cast2-session-change",Rwb)),d9.push(g.Sv("yt-remote-connection-change",function(f){f?H8(b9(),"YouTube TV"):f9()||(H8(null,null),lwb())})),d9.push(g.Sv("yt-remote-cast2-session-failed",function(){t7("yt-remote-connection-failed")})),a=Swb(),b.isAuto&&(a.id+="#dial"),e=b.capabilities||[],g.Zr("desktop_enable_autoplay")&&
e.push("atp"),e.length>0&&(a.capabilities=e),a.name=b.device,a.app=b.app,(b=b.theme)&&(a.theme=b),c9(" -- with channel params: "+g.Ti(a)),a?(g.lt("yt-remote-session-app",a.app),g.lt("yt-remote-session-name",a.name)):(g.nt("yt-remote-session-app"),g.nt("yt-remote-session-name")),g.Oa("yt.mdx.remote.channelParams_",a),c.start(),b9()||Twb())}},Vwb=function(){var a=a9().ph.$_gos();
var b=g9();b&&h9()&&(Qsb(a,b)||a.push(b));return Psb(a)},Xwb=function(){var a=Wwb();
!a&&F8()&&kwb()&&(a={key:"cast-selector-receiver",name:kwb()});return a},Wwb=function(){var a=Vwb(),b=g9();
b||(b=f9());return g.Ub(a,function(c){return b&&m7(b,c.key)?!0:!1})},g9=function(){var a=b9();
if(!a)return null;var b=a9().Ol();return o7(b,a)},Rwb=function(a){c9("remote.onCastSessionChange_: "+n7(a));
if(a){var b=g9();if(b&&b.id==a.id){if(H8(b.id,"YouTube TV"),a.idType=="shortLived"&&(a=a.token))i9&&(i9.token=a),(b=h9())&&b.Ys(a)}else b&&j9(),k9(a,1)}else h9()&&j9()},j9=function(){G8()?E8().stopSession():D8("stopSession called before API ready.");
var a=h9();a&&(a.disconnect(1),Ywb(null))},Zwb=function(){var a=h9();
return!!a&&a.getProxyState()!=3},c9=function(a){e8("remote",a)},a9=function(){if(!$wb){var a=g.Pa("yt.mdx.remote.screenService_");
$wb=a?new Pwb(a):null}return $wb},b9=function(){return g.Pa("yt.mdx.remote.currentScreenId_")},axb=function(a){g.Oa("yt.mdx.remote.currentScreenId_",a)},bxb=function(){return g.Pa("yt.mdx.remote.connectData_")},e9=function(a){g.Oa("yt.mdx.remote.connectData_",a)},h9=function(){return g.Pa("yt.mdx.remote.connection_")},Ywb=function(a){var b=h9();
e9(null);a||axb("");g.Oa("yt.mdx.remote.connection_",a);$8&&(g.lc($8,function(c){c(a)}),$8.length=0);
b&&!a?t7("yt-remote-connection-change",!1):!b&&a&&t7("yt-remote-connection-change",!0)},f9=function(){var a=g.ot();
if(!a)return null;var b=a9();if(!b)return null;b=b.Ol();return o7(b,a)},k9=function(a,b){b9();
g9()&&g9();if(l9)i9=a;else{axb(a.id);var c=g.Pa("yt.mdx.remote.enableConnectWithInitialState_")||!1;a=new X8(Z8,a,Swb(),c);a.connect(b,bxb());a.subscribe("beforeDisconnect",function(d){t7("yt-remote-before-disconnect",d)});
a.subscribe("beforeDispose",function(){h9()&&(h9(),Ywb(null))});
a.subscribe("browserChannelAuthError",function(){var d=g9();d&&d.idType=="shortLived"&&(G8()?E8().handleBrowserChannelAuthError():D8("refreshLoungeToken called before API ready."))});
Ywb(a)}},Twb=function(){var a=f9();
a?(c9("Resume connection to: "+n7(a)),k9(a,0)):(r7(),lwb(),c9("Skipping connecting because no session screen found."))},Qwb=function(){var a=Swb();
if(g.Sg(a)){a=q7();var b=g.mt("yt-remote-session-name")||"",c=g.mt("yt-remote-session-app")||"";a={device:"REMOTE_CONTROL",id:a,name:b,app:c,mdxVersion:3};a.authuser=String(g.zr("SESSION_INDEX","0"));(b=g.zr("DELEGATED_SESSION_ID"))&&(a.pageId=String(b));g.Oa("yt.mdx.remote.channelParams_",a)}},Swb=function(){return g.Pa("yt.mdx.remote.channelParams_")||{}},exb=function(a,b,c){g.O.call(this);
var d=this;this.module=a;this.J=b;this.Ic=c;this.events=new g.jG(this);this.D=!1;this.G=new g.NH(64);this.j=new g.Ep(this.g3,500,this);this.B=new g.Ep(this.j3,1E3,this);this.N=new w7(this.Qfa,0,this);this.C={};this.Z=new g.Ep(this.d4,1E3,this);this.K=new x7(this.seekTo,1E3,this);this.W=this.events.T(this.J,"onVolumeChange",function(e){cxb(d,e)});
g.P(this,this.events);this.events.T(b,"onCaptionsTrackListChanged",this.Iba);this.events.T(b,"captionschanged",this.aba);this.events.T(b,"captionssettingschanged",this.s3);this.events.T(b,"videoplayerreset",this.sM);this.events.T(b,"mdxautoplaycancel",function(){d.Ic.uY()});
b.L("enable_mdx_video_play_directly")&&this.events.T(b,"videodatachange",function(){dxb(d.module)||m9(d)||n9(d,0)});
a=this.Ic;a.Ia();a.subscribe("proxyStateChange",this.f1,this);a.subscribe("remotePlayerChange",this.iH,this);a.subscribe("remoteQueueChange",this.sM,this);a.subscribe("previousNextChange",this.b1,this);a.subscribe("nowAutoplaying",this.W0,this);a.subscribe("autoplayDismissed",this.E0,this);g.P(this,this.j);g.P(this,this.B);g.P(this,this.N);g.P(this,this.Z);g.P(this,this.K);this.s3();this.sM();this.iH()},cxb=function(a,b){if(m9(a)){a.Ic.unsubscribe("remotePlayerChange",a.iH,a);
var c=Math.round(b.volume);b=!!b.muted;var d=P8(a.Ic);if(c!==d.volume||b!==d.muted)a.Ic.setVolume(c,b),a.Z.start();a.Ic.subscribe("remotePlayerChange",a.iH,a)}},fxb=function(a){a.Rc(0);
a.j.stop();a.Ec(new g.NH(64))},gxb=function(a,b){if(m9(a)&&!a.D){var c=null;
b&&(c={style:a.J.getSubtitlesUserSettings()},g.$g(c,b));a.Ic.iW(a.J.getVideoData(1).videoId,c);a.C=P8(a.Ic).trackData}},n9=function(a,b){var c=a.J.getPlaylist();
if(c==null?0:c.listId){var d=c.index;var e=c.listId.toString()}c=a.J.getVideoData(1);a.Ic.playVideo(c.videoId,b,d,e,c.playerParams,c.Fa,ksb(c));a.Ec(new g.NH(1))},hxb=function(a,b){if(b){var c=a.J.getOption("captions","tracklist",{XZ:1});
c&&c.length?(a.J.setOption("captions","track",b),a.D=!1):(a.J.loadModule("captions"),a.D=!0)}else a.J.setOption("captions","track",{})},m9=function(a){return P8(a.Ic).videoId===a.J.getVideoData(1).videoId},o9=function(){g.S.call(this,{I:"div",
S:"ytp-mdx-popup-dialog",X:{role:"dialog"},V:[{I:"div",S:"ytp-mdx-popup-dialog-inner-content",V:[{I:"div",S:"ytp-mdx-popup-title",va:"You're signed out"},{I:"div",S:"ytp-mdx-popup-description",va:"Videos 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."},{I:"div",S:"ytp-mdx-privacy-popup-buttons",V:[{I:"button",La:["ytp-button","ytp-mdx-privacy-popup-cancel"],va:"Cancel"},{I:"button",La:["ytp-button",
"ytp-mdx-privacy-popup-confirm"],va:"Confirm"}]}]}]});this.j=new g.Ny(this,250);this.cancelButton=this.Da("ytp-mdx-privacy-popup-cancel");this.confirmButton=this.Da("ytp-mdx-privacy-popup-confirm");g.P(this,this.j);this.T(this.cancelButton,"click",this.B);this.T(this.confirmButton,"click",this.C)},p9=function(a){g.S.call(this,{I:"div",
S:"ytp-remote",V:[{I:"div",S:"ytp-remote-display-status",V:[{I:"div",S:"ytp-remote-display-status-icon",V:[g.ysa()]},{I:"div",S:"ytp-remote-display-status-text",va:"{{statustext}}"}]}]});this.api=a;this.j=new g.Ny(this,250);g.P(this,this.j);this.T(a,"presentingplayerstatechange",this.onStateChange);this.yd(a.getPlayerStateObject())},q9=function(a,b){g.IX.call(this,"Play on",1,a,b);
this.J=a;this.Hv={};this.T(a,"onMdxReceiversChange",this.D);this.T(a,"presentingplayerstatechange",this.D);this.D()},ixb=function(a){g.hY.call(this,a);
this.Lq={key:Osb(),name:"This computer"};this.Mm=null;this.subscriptions=[];this.xT=this.Ic=null;this.Hv=[this.Lq];this.au=this.Lq;this.Ie=new g.NH(64);this.B_=0;this.Bi=-1;this.BH=!1;this.zH=this.rC=null;if(!g.SP(this.player.U())&&!g.vz(this.player.U())){a=this.player;var b=g.iS(a);b&&(b=b.dn())&&(b=new q9(a,b),g.P(this,b));b=new p9(a);g.P(this,b);g.US(a,b.element,4);this.rC=new o9;g.P(this,this.rC);g.US(a,this.rC.element,4);this.BH=!!f9()}},r9=function(a){a.zH&&(a.player.removeEventListener("presentingplayerstatechange",
a.zH),a.zH=null)},jxb=function(a,b,c){a.Ie=c;
a.player.publish("presentingplayerstatechange",new g.Yy(c,b))},s9=function(a,b){if(b.key!==a.au.key)if(b.key===a.Lq.key)j9();
else if(dxb(a)&&kxb(a),a.au=b,!a.player.U().L("disable_mdx_connection_in_mdx_module_for_music_web")||!g.vz(a.player.U())){var c=a.player.getPlaylistId();var d=a.player.getVideoData(1);var e=d.videoId;if(!c&&!e||(a.player.getAppState()===2||a.player.getAppState()===1)&&a.player.U().L("should_clear_video_data_on_player_cued_unstarted"))d=null;else{var f=a.player.getPlaylist();if(f){var h=[];for(var l=0;l<f.getLength();l++)h[l]=g.eY(f,l).videoId}else h=[e];f=a.player.getCurrentTime(1);a={videoIds:h,
listId:c,videoId:e,playerParams:d.playerParams,clickTrackingParams:d.Fa,index:Math.max(a.player.getPlaylistIndex(),0),currentTime:f===0?void 0:f};(d=ksb(d))&&(a.locationInfo=d);d=a}c9("Connecting to: "+g.Ti(b));b.key=="cast-selector-receiver"?(e9(d||null),b=d||null,G8()?E8().setLaunchParams(b):D8("setLaunchParams called before ready.")):!d&&Zwb()&&b9()==b.key?t7("yt-remote-connection-change",!0):(j9(),e9(d||null),d=a9().Ol(),(b=o7(d,b.key))&&k9(b,1))}},dxb=function(a){var b=a.player.U();
return!b.L("mdx_enable_privacy_disclosure_ui")||a.isLoggedIn()||a.BH||!a.rC?!1:g.fQ(b)||g.hQ(b)},kxb=function(a){a.player.getPlayerStateObject().isPlaying()?a.player.pauseVideo():(a.zH=function(b){!a.BH&&g.$y(b,8)&&(a.player.pauseVideo(),r9(a))},a.player.addEventListener("presentingplayerstatechange",a.zH));
a.rC&&a.rC.rd();h9()||(l9=!0)};
g.k=j7.prototype;g.k.fn=function(){k7(this);for(var a=[],b=0;b<this.j.length;b++)a.push(this.B[this.j[b]]);return a};
g.k.Go=function(){k7(this);return this.j.concat()};
g.k.has=function(a){return i7(this.B,a)};
g.k.isEmpty=function(){return this.size==0};
g.k.clear=function(){this.B={};this.ew=this.size=this.j.length=0};
g.k.remove=function(a){return this.delete(a)};
g.k.delete=function(a){return i7(this.B,a)?(delete this.B[a],--this.size,this.ew++,this.j.length>2*this.size&&k7(this),!0):!1};
g.k.get=function(a,b){return i7(this.B,a)?this.B[a]:b};
g.k.set=function(a,b){i7(this.B,a)||(this.size+=1,this.j.push(a),this.ew++);this.B[a]=b};
g.k.forEach=function(a,b){for(var c=this.Go(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};
g.k.clone=function(){return new j7(this)};
g.k.keys=function(){return g.Zp(this.Km(!0)).j()};
g.k.values=function(){return g.Zp(this.Km(!1)).j()};
g.k.entries=function(){var a=this;return Dsb(this.keys(),function(b){return[b,a.get(b)]})};
g.k.Km=function(a){k7(this);var b=0,c=this.ew,d=this,e=new g.wn;e.next=function(){if(c!=d.ew)throw Error("The map has changed since the iterator was created");if(b>=d.j.length)return g.C1;var f=d.j[b++];return g.xn(a?f:d.B[f])};
return e};
var Isb={dha:"atp",Fla:"ska",Wka:"que",jka:"mus",Dla:"sus",Mia:"dsp",ola:"seq",Zja:"mic",Yha:"dpa",lha:"cds",hka:"mlm",Wha:"dsdtr",qka:"ntb",qma:"vsp",kia:"scn",Yka:"rpe",Tha:"dcn",Uha:"dcp",Fka:"pas",Vha:"drq",vka:"opf",jia:"els",ula:"svq",ika:"mvp"},Jsb={pma:"u",vha:"cl",Eja:"k",cja:"i",Kha:"cr",kka:"m",zia:"g",z7:"up"},Usb="",s7=null;
btb.prototype.flush=function(a,b){a=a===void 0?[]:a;b=b===void 0?!1:b;if(g.Zr("enable_client_streamz_web")){a=g.w(a);for(var c=a.next();!c.done;c=a.next())c=g.Gda(c.value),c={serializedIncrementBatch:g.pc(c.j())},g.Qt("streamzIncremented",c,{sendIsolatedPayload:b})}};
var u7,jtb=dtb("loadCastFramework")||dtb("loadCastApplicationFramework"),mtb=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];g.bb(w7,g.O);g.k=w7.prototype;g.k.D5=function(a){this.D=arguments;this.j=!1;this.wd?this.C=g.Za()+this.gj:this.wd=g.Pi(this.G,this.gj)};
g.k.stop=function(){this.wd&&(g.Na.clearTimeout(this.wd),this.wd=null);this.C=null;this.j=!1;this.D=[]};
g.k.pause=function(){++this.B};
g.k.resume=function(){this.B&&(--this.B,!this.B&&this.j&&(this.j=!1,this.K.apply(null,this.D)))};
g.k.xa=function(){this.stop();w7.Tf.xa.call(this)};
g.k.E5=function(){this.wd&&(g.Na.clearTimeout(this.wd),this.wd=null);this.C?(this.wd=g.Pi(this.G,this.C-g.Za()),this.C=null):this.B?this.j=!0:(this.j=!1,this.K.apply(null,this.D))};g.z(x7,g.O);g.k=x7.prototype;g.k.aO=function(a){this.C=arguments;this.wd||this.B?this.j=!0:otb(this)};
g.k.stop=function(){this.wd&&(g.Na.clearTimeout(this.wd),this.wd=null,this.j=!1,this.C=null)};
g.k.pause=function(){this.B++};
g.k.resume=function(){this.B--;this.B||!this.j||this.wd||(this.j=!1,otb(this))};
g.k.xa=function(){g.O.prototype.xa.call(this);this.stop()};y7.prototype.stringify=function(a){return g.Na.JSON.stringify(a,void 0)};
y7.prototype.parse=function(a){return g.Na.JSON.parse(a,void 0)};g.bb(ptb,g.bi);g.bb(qtb,g.bi);var rtb=null;g.bb(ttb,g.bi);g.bb(utb,g.bi);g.bb(vtb,g.bi);C7.prototype.debug=function(){};
C7.prototype.info=function(){};
C7.prototype.warning=function(){};var Dtb={},Ctb={};g.k=D7.prototype;g.k.setTimeout=function(a){this.ib=a};
g.k.G5=function(a){a=a.target;var b=this.Ta;b&&g.nj(a)==3?b.aO():this.MV(a)};
g.k.MV=function(a){try{if(a==this.j)a:{var b=g.nj(this.j),c=this.j.B,d=this.j.getStatus();if(!(b<3)&&(b!=3||this.j&&(this.B.B||g.pj(this.j)||g.qj(this.j)))){this.Ja||b!=4||c==7||(c==8||d<=0?z7(3):z7(2));Gtb(this);var e=this.j.getStatus();this.Kb=e;var f=Btb(this);if(this.K=e==200){if(this.Bb&&!this.Ua){b:{if(this.j){var h=g.rj(this.j,"X-HTTP-Initial-Response");if(h&&!g.wb(h)){var l=h;break b}}l=null}if(a=l)this.Ua=!0,Ptb(this,a);else{this.K=!1;this.G=3;A7(12);F7(this);G7(this);break a}}if(this.Fa){a=
!0;for(var m;!this.Ja&&this.N<f.length;)if(m=Etb(this,f),m==Ctb){b==4&&(this.G=4,A7(14),a=!1);break}else if(m==Dtb){this.G=4;A7(15);a=!1;break}else Ptb(this,m);Atb(this)&&this.N!=0&&(this.B.j=this.B.j.slice(this.N),this.N=0);b!=4||f.length!=0||this.B.B||(this.G=1,A7(16),a=!1);this.K=this.K&&a;a?f.length>0&&!this.Gb&&(this.Gb=!0,this.C.FS(this)):(F7(this),G7(this))}else Ptb(this,f);b==4&&F7(this);this.K&&!this.Ja&&(b==4?Htb(this.C,this):(this.K=!1,E7(this)))}else g.Zfa(this.j),e==400&&f.indexOf("Unknown SID")>
0?(this.G=3,A7(12)):(this.G=0,A7(13)),F7(this),G7(this)}}}catch(n){}finally{}};
g.k.cancel=function(){this.Ja=!0;F7(this)};
g.k.F5=function(){this.oa=null;var a=Date.now();a-this.kb>=0?(this.Oa!=2&&(z7(3),A7(17)),F7(this),this.G=2,G7(this)):Ftb(this,this.kb-a)};
g.k.getLastError=function(){return this.G};
g.k.RQ=function(){return this.j};Rtb.prototype.cancel=function(){this.C=Ttb(this);if(this.B)this.B.cancel(),this.B=null;else if(this.j&&this.j.size!==0){for(var a=g.w(this.j.values()),b=a.next();!b.done;b=a.next())b.value.cancel();this.j.clear()}};g.k=Ytb.prototype;g.k.NV=8;g.k.Xh=1;g.k.connect=function(a,b,c,d){A7(0);this.Tb=a;this.Ja=b||{};c&&d!==void 0&&(this.Ja.OSID=c,this.Ja.OAID=d);this.Ua=this.qc;this.Ka=Mtb(this,null,this.Tb);K7(this)};
g.k.disconnect=function(){$tb(this);if(this.Xh==3){var a=this.Va++,b=this.Ka.clone();g.Mk(b,"SID",this.D);g.Mk(b,"RID",a);g.Mk(b,"TYPE","terminate");N7(this,b);a=new D7(this,this.D,a);a.Oa=2;a.Z=e7(b.clone());b=!1;if(g.Na.navigator&&g.Na.navigator.sendBeacon)try{b=g.Na.navigator.sendBeacon(a.Z.toString(),"")}catch(c){}!b&&g.Na.Image&&((new Image).src=a.Z,b=!0);b||(a.j=ztb(a.C,null),a.j.send(a.Z));a.Aa=Date.now();E7(a)}fub(this)};
g.k.Rg=function(){return this.Xh==0};
g.k.getState=function(){return this.Xh};
g.k.PV=function(a){if(this.K)if(this.K=null,this.Xh==1){if(!a){this.Va=Math.floor(Math.random()*1E5);a=this.Va++;var b=new D7(this,"",a),c=this.W;this.Kb&&(c?(c=g.Yg(c),g.$g(c,this.Kb)):c=this.Kb);this.N!==null||this.kb||(b.Ka=c,c=null);var d;if(this.rb)a:{for(var e=d=0;e<this.C.length;e++){b:{var f=this.C[e];if("__data__"in f.map&&(f=f.map.__data__,typeof f==="string")){f=f.length;break b}f=void 0}if(f===void 0)break;d+=f;if(d>4096){d=e;break a}if(d===4096||e===this.C.length-1){d=e+1;break a}}d=
1E3}else d=1E3;d=cub(this,b,d);e=this.Ka.clone();g.Mk(e,"RID",a);g.Mk(e,"CVER",22);this.Fa&&g.Mk(e,"X-HTTP-Session-Id",this.Fa);N7(this,e);c&&(this.kb?d="headers="+g.lg(g.bha(c))+"&"+d:this.N&&g.Qk(e,this.N,c));Ltb(this.B,b);this.Wf&&g.Mk(e,"TYPE","init");this.rb?(g.Mk(e,"$req",d),g.Mk(e,"SID","null"),b.Bb=!0,ytb(b,e,null)):ytb(b,e,d);this.Xh=2}}else this.Xh==3&&(a?dub(this,a):this.C.length==0||Stb(this.B)||dub(this))};
g.k.OV=function(){this.Z=null;eub(this);if(this.Bc&&!(this.ib||this.j==null||this.Pc<=0)){var a=2*this.Pc;this.Ca=B7((0,g.Xa)(this.Zaa,this),a)}};
g.k.Zaa=function(){this.Ca&&(this.Ca=null,this.Ua=!1,this.ib=!0,A7(10),I7(this),eub(this))};
g.k.FS=function(a){this.j==a&&this.Bc&&!this.ib&&(Ztb(this),this.ib=!0,A7(11))};
g.k.H5=function(){this.oa!=null&&(this.oa=null,I7(this),Jtb(this),A7(19))};
g.k.ufa=function(a){a?A7(2):A7(1)};
g.k.isActive=function(){return!!this.G&&this.G.isActive(this)};
g.k=hub.prototype;g.k.TV=function(){};
g.k.SV=function(){};
g.k.RV=function(){};
g.k.QV=function(){};
g.k.isActive=function(){return!0};
g.k.I5=function(){};g.bb(P7,g.qi);P7.prototype.open=function(){this.j.G=this.C;this.K&&(this.j.Oa=!0);this.j.connect(this.G,this.B||void 0)};
P7.prototype.close=function(){this.j.disconnect()};
P7.prototype.send=function(a){var b=this.j;if(typeof a==="string"){var c={};c.__data__=a;a=c}else this.D&&(c={},c.__data__=g.Ti(a),a=c);b.C.push(new Qtb(b.Uf++,a));b.Xh==3&&K7(b)};
P7.prototype.xa=function(){this.j.G=null;delete this.C;this.j.disconnect();delete this.j;P7.Tf.xa.call(this)};
g.bb(jub,ptb);g.bb(kub,qtb);g.bb(O7,hub);O7.prototype.TV=function(){this.j.dispatchEvent("m")};
O7.prototype.SV=function(a){this.j.dispatchEvent(new jub(a))};
O7.prototype.RV=function(a){this.j.dispatchEvent(new kub(a))};
O7.prototype.QV=function(){this.j.dispatchEvent("n")};var R7=new g.qi;g.z(nub,g.bi);g.k=T7.prototype;g.k.Aw=null;g.k.Jt=!1;g.k.Qz=null;g.k.cO=null;g.k.LD=null;g.k.bJ=null;g.k.ID=null;g.k.aJ=null;g.k.Cw=null;g.k.zj=null;g.k.dJ=0;g.k.H3=null;g.k.cJ=null;g.k.Bw=null;g.k.KD=-1;g.k.I2=!0;g.k.JD=!1;g.k.bO=0;g.k.ZI=null;var tub={},sub={};g.k=T7.prototype;g.k.setTimeout=function(a){this.B=a};
g.k.K5=function(a){a=a.target;var b=this.ZI;b&&g.nj(a)==3?b.aO():this.UV(a)};
g.k.UV=function(a){try{if(a==this.zj)a:{var b=g.nj(this.zj),c=this.zj.B,d=this.zj.getStatus();if(g.mh&&!g.oc("420+")){if(b<4)break a}else if(b<3||b==3&&!g.pj(this.zj))break a;this.JD||b!=4||c==7||(c==8||d<=0?this.j.Ks(3):this.j.Ks(2));wub(this);var e=this.zj.getStatus();this.KD=e;var f=g.pj(this.zj);if(this.Jt=e==200){b==4&&U7(this);if(this.Fa){for(a=!0;!this.JD&&this.dJ<f.length;){var h=uub(this,f);if(h==sub){b==4&&(this.Bw=4,S7(15),a=!1);break}else if(h==tub){this.Bw=4;S7(16);a=!1;break}else yub(this,
h)}b==4&&f.length==0&&(this.Bw=1,S7(17),a=!1);this.Jt=this.Jt&&a;a||(U7(this),xub(this))}else yub(this,f);this.Jt&&!this.JD&&(b==4?this.j.fO(this):(this.Jt=!1,rub(this)))}else e==400&&f.indexOf("Unknown SID")>0?(this.Bw=3,S7(13)):(this.Bw=0,S7(14)),U7(this),xub(this)}}catch(l){}finally{}};
g.k.cancel=function(){this.JD=!0;U7(this)};
g.k.J5=function(){this.Qz=null;var a=Date.now();a-this.cO>=0?(this.bJ!=2&&this.j.Ks(3),U7(this),this.Bw=2,S7(18),xub(this)):vub(this,this.cO-a)};
g.k.getLastError=function(){return this.Bw};g.k=Bub.prototype;g.k.eO=null;g.k.yl=null;g.k.SM=!1;g.k.gO=null;g.k.Em=null;g.k.Gr=-1;g.k.eJ=null;g.k.RE=null;g.k.connect=function(a){this.gO=a;a=W7(this.j,null,this.gO);S7(3);Date.now();var b=this.j.W;b!=null?(this.eJ=b[0],(this.RE=b[1])?(this.Em=1,Cub(this)):(this.Em=2,Dub(this))):(f7(a,"MODE","init"),this.yl=new T7(this),this.yl.Aw=this.eO,qub(this.yl,a,!1,null,!0),this.Em=0)};
g.k.X7=function(a){if(a)this.Em=2,Dub(this);else{S7(4);var b=this.j;b.Kp=b.Yt.Gr;$7(b,9)}a&&this.Ks(2)};
g.k.dO=function(a){return this.j.dO(a)};
g.k.abort=function(){this.yl&&(this.yl.cancel(),this.yl=null);this.Gr=-1};
g.k.Rg=function(){return!1};
g.k.VV=function(a,b){this.Gr=a.KD;if(this.Em==0)if(b){try{var c=this.B.parse(b)}catch(d){a=this.j;a.Kp=this.Gr;$7(a,2);return}this.eJ=c[0];this.RE=c[1]}else a=this.j,a.Kp=this.Gr,$7(a,2);else this.Em==2&&(this.SM?(S7(7),Date.now()):b=="11111"?(S7(6),this.SM=!0,Date.now(),this.Gr=200,this.yl.cancel(),S7(12),X7(this.j,this,!0)):(S7(8),Date.now(),this.SM=!1))};
g.k.fO=function(){this.Gr=this.yl.KD;if(this.yl.Jt)this.Em==0?this.RE?(this.Em=1,Cub(this)):(this.Em=2,Dub(this)):this.Em==2&&(this.SM?(S7(12),X7(this.j,this,!0)):(S7(11),X7(this.j,this,!1)));else{this.Em==0?S7(9):this.Em==2&&S7(10);var a=this.j;this.yl.getLastError();a.Kp=this.Gr;$7(a,2)}};
g.k.MD=function(){return this.j.MD()};
g.k.isActive=function(){return this.j.isActive()};
g.k.Ks=function(a){this.j.Ks(a)};g.k=Eub.prototype;g.k.Jp=null;g.k.ND=null;g.k.Ek=null;g.k.eh=null;g.k.iO=null;g.k.fJ=null;g.k.WV=null;g.k.hO=null;g.k.OD=0;g.k.M5=0;g.k.Xi=null;g.k.Kt=null;g.k.Hr=null;g.k.Ew=null;g.k.Yt=null;g.k.LN=null;g.k.Tz=-1;g.k.XV=-1;g.k.Kp=-1;g.k.Sz=0;g.k.Rz=0;g.k.Dw=8;g.bb(Gub,g.bi);g.bb(Hub,g.bi);g.k=Eub.prototype;g.k.connect=function(a,b,c,d,e){S7(0);this.iO=b;this.ND=c||{};d&&e!==void 0&&(this.ND.OSID=d,this.ND.OAID=e);this.Z?(Q7((0,g.Xa)(this.hY,this,a),100),Jub(this)):this.hY(a)};
g.k.disconnect=function(){Kub(this);if(this.j==3){var a=this.OD++,b=this.fJ.clone();g.Mk(b,"SID",this.D);g.Mk(b,"RID",a);g.Mk(b,"TYPE","terminate");Z7(this,b);a=new T7(this,this.D,a);a.bJ=2;a.ID=e7(b.clone());(new Image).src=a.ID.toString();a.LD=Date.now();rub(a)}Uub(this)};
g.k.hY=function(a){this.Yt=new Bub(this);this.Yt.eO=this.Jp;this.Yt.B=this.G;this.Yt.connect(a)};
g.k.Rg=function(){return this.j==0};
g.k.getState=function(){return this.j};
g.k.ZV=function(a){this.Kt=null;Pub(this,a)};
g.k.YV=function(){this.Hr=null;this.eh=new T7(this,this.D,"rpc",this.N);this.eh.Aw=this.Jp;this.eh.bO=0;var a=this.WV.clone();g.Mk(a,"RID","rpc");g.Mk(a,"SID",this.D);g.Mk(a,"CI",this.LN?"0":"1");g.Mk(a,"AID",this.Tz);Z7(this,a);g.Mk(a,"TYPE","xmlhttp");qub(this.eh,a,!0,this.hO,!1)};
g.k.VV=function(a,b){if(this.j!=0&&(this.eh==a||this.Ek==a))if(this.Kp=a.KD,this.Ek==a&&this.j==3)if(this.Dw>7){try{var c=this.G.parse(b)}catch(d){c=null}if(Array.isArray(c)&&c.length==3)if(a=c,a[0]==0)a:{if(!this.Hr){if(this.eh)if(this.eh.LD+3E3<this.Ek.LD)Y7(this),this.eh.cancel(),this.eh=null;else break a;Sub(this);S7(19)}}else this.XV=a[1],0<this.XV-this.Tz&&a[2]<37500&&this.LN&&this.Rz==0&&!this.Ew&&(this.Ew=Q7((0,g.Xa)(this.N5,this),6E3));else $7(this,11)}else b!=null&&$7(this,11);else if(this.eh==
a&&Y7(this),!g.wb(b))for(a=this.G.parse(b),b=0;b<a.length;b++)c=a[b],this.Tz=c[0],c=c[1],this.j==2?c[0]=="c"?(this.D=c[1],this.hO=c[2],c=c[3],c!=null?this.Dw=c:this.Dw=6,this.j=3,this.Xi&&this.Xi.cW(),this.WV=W7(this,this.MD()?this.hO:null,this.iO),Qub(this)):c[0]=="stop"&&$7(this,7):this.j==3&&(c[0]=="stop"?$7(this,7):c[0]!="noop"&&this.Xi&&this.Xi.bW(c),this.Rz=0)};
g.k.N5=function(){this.Ew!=null&&(this.Ew=null,this.eh.cancel(),this.eh=null,Sub(this),S7(20))};
g.k.fO=function(a){if(this.eh==a){Y7(this);this.eh=null;var b=2}else if(this.Ek==a)this.Ek=null,b=1;else return;this.Kp=a.KD;if(this.j!=0)if(a.Jt)if(b==1){b=a.Cw?a.Cw.length:0;a=Date.now()-a.LD;var c=R7;c.dispatchEvent(new Gub(c,b,a,this.Sz));Iub(this);this.C.length=0}else Qub(this);else{c=a.getLastError();var d;if(!(d=c==3||c==7||c==0&&this.Kp>0)){if(d=b==1)this.Ek||this.Kt||this.j==1||this.Sz>=2?d=!1:(this.Kt=Q7((0,g.Xa)(this.ZV,this,a),Rub(this,this.Sz)),this.Sz++,d=!0);d=!(d||b==2&&Sub(this))}if(d)switch(c){case 1:$7(this,
5);break;case 4:$7(this,10);break;case 3:$7(this,6);break;case 7:$7(this,12);break;default:$7(this,2)}}};
g.k.L5=function(a){if(!g.Wb(arguments,this.j))throw Error("Unexpected channel state: "+this.j);};
g.k.tfa=function(a){a?S7(2):(S7(1),Tub(this,8))};
g.k.dO=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new g.kj;a.K=!1;return a};
g.k.isActive=function(){return!!this.Xi&&this.Xi.isActive(this)};
g.k.Ks=function(a){var b=R7;b.dispatchEvent(new Hub(b,a))};
g.k.MD=function(){return!1};
g.k=Vub.prototype;g.k.cW=function(){};
g.k.bW=function(){};
g.k.aW=function(){};
g.k.jO=function(){};
g.k.dW=function(){return{}};
g.k.isActive=function(){return!0};g.k=Wub.prototype;g.k.enqueue=function(a){this.B.push(a)};
g.k.isEmpty=function(){return this.j.length===0&&this.B.length===0};
g.k.clear=function(){this.j=[];this.B=[]};
g.k.contains=function(a){return g.Wb(this.j,a)||g.Wb(this.B,a)};
g.k.remove=function(a){var b=this.j;var c=(0,g.dab)(b,a);c>=0?(g.Xb(b,c),b=!0):b=!1;return b||g.Yb(this.B,a)};
g.k.fn=function(){for(var a=[],b=this.j.length-1;b>=0;--b)a.push(this.j[b]);var c=this.B.length;for(b=0;b<c;++b)a.push(this.B[b]);return a};g.z(Xub,g.bi);g.z(Yub,g.bi);g.bb(a8,g.O);g.k=a8.prototype;g.k.fda=function(){this.gj=Math.min(3E5,this.gj*2);this.C();this.B&&this.start()};
g.k.start=function(){var a=this.gj+15E3*Math.random();g.Fp(this.j,a);this.B=Date.now()+a};
g.k.stop=function(){this.j.stop();this.B=0};
g.k.isActive=function(){return this.j.isActive()};
g.k.reset=function(){this.j.stop();this.gj=5E3};g.bb($ub,Vub);g.k=$ub.prototype;g.k.subscribe=function(a,b,c){return this.C.subscribe(a,b,c)};
g.k.unsubscribe=function(a,b,c){return this.C.unsubscribe(a,b,c)};
g.k.Fh=function(a){return this.C.Fh(a)};
g.k.publish=function(a,b){return this.C.publish.apply(this.C,arguments)};
g.k.dispose=function(){this.oa||(this.oa=!0,g.vg(this.C),this.disconnect(),g.vg(this.B),this.B=null,this.qa=function(){return""})};
g.k.Ia=function(){return this.oa};
g.k.connect=function(a,b,c){if(!this.j||this.j.getState()!=2){this.W="";this.B.stop();this.K=a||null;this.G=b||0;a=this.Aa+"/test";b=this.Aa+"/bind";var d=new Eub(c?c.firstTestResults:null,c?c.secondTestResults:null,this.Oa),e=this.j;e&&(e.Xi=null);d.Xi=this;this.j=d;avb(this);if(this.j){d=g.zr("ID_TOKEN");var f=this.j.Jp||{};d?f["x-youtube-identity-token"]=d:delete f["x-youtube-identity-token"];this.j.Jp=f}e?(e.getState()!=3&&Mub(e)==0||e.getState(),this.j.connect(a,b,this.N,e.D,e.Tz)):c?this.j.connect(a,
b,this.N,c.sessionId,c.arrayId):this.j.connect(a,b,this.N)}};
g.k.disconnect=function(a){this.Z=a||0;this.B.stop();avb(this);this.j&&(this.j.getState()==3&&Pub(this.j),this.j.disconnect());this.Z=0};
g.k.sendMessage=function(a,b){a={_sc:a};b&&g.$g(a,b);this.B.isActive()||(this.j?this.j.getState():0)==2?this.D.push(a):this.mB()&&(avb(this),Lub(this.j,a))};
g.k.cW=function(){this.B.reset();this.K=null;this.G=0;if(this.D.length){var a=this.D;this.D=[];for(var b=0,c=a.length;b<c;++b)Lub(this.j,a[b])}this.publish("handlerOpened");usb(this.Ka,"BROWSER_CHANNEL")};
g.k.aW=function(a){var b=a==2&&this.j.Kp==401;a==4||b||this.B.start();this.publish("handlerError",a,b);Asb(this.Fa,"BROWSER_CHANNEL")};
g.k.jO=function(a,b){if(!this.B.isActive())this.publish("handlerClosed");else if(b)for(var c=0,d=b.length;c<d;++c){var e=b[c].map;e&&this.D.push(e)}wsb(this.Ca,"BROWSER_CHANNEL");a&&this.Ta.j.lO("/client_streamz/youtube/living_room/mdx/browser_channel/pending_maps",a.length);b&&this.Va.j.lO("/client_streamz/youtube/living_room/mdx/browser_channel/undelivered_maps",b.length)};
g.k.dW=function(){var a={v:2};this.W&&(a.gsessionid=this.W);this.G!=0&&(a.ui=""+this.G);this.Z!=0&&(a.ui=""+this.Z);this.K&&g.$g(a,this.K);return a};
g.k.bW=function(a){a[0]=="S"?this.W=a[1]:a[0]=="gracefulReconnect"?(this.B.start(),this.j.disconnect()):this.publish("handlerMessage",new Zub(a[0],a[1]));ysb(this.Ja,"BROWSER_CHANNEL")};
g.k.mB=function(){return!!this.j&&this.j.getState()==3};
g.k.Ys=function(a){(this.N.loungeIdToken=a)||this.B.stop();if(this.Ua&&this.j){var b=this.j.Jp||{};a?b["X-YouTube-LoungeId-Token"]=a:delete b["X-YouTube-LoungeId-Token"];this.j.Jp=b}};
g.k.getDeviceId=function(){return this.N.id};
g.k.Du=function(){return this.B.isActive()?this.B.B-Date.now():NaN};
g.k.cz=function(){var a=this.B;g.Gp(a.j);a.start()};
g.k.zea=function(){this.B.isActive();Mub(this.j)==0&&this.connect(this.K,this.G)};b8.prototype.sendRequest=function(a,b,c,d,e,f,h){a={format:f?"RAW":"JSON",method:a,context:this,timeout:5E3,withCredentials:!!h,onSuccess:g.Ya(this.D,d,!f),onError:g.Ya(this.C,e),onTimeout:g.Ya(this.G,e)};c&&(a.postParams=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return g.ds(b,a)};
b8.prototype.D=function(a,b,c,d){b?a(d):a({text:c.responseText})};
b8.prototype.C=function(a,b){a(Error("Request error: "+b.status))};
b8.prototype.G=function(a){a(Error("request timed out"))};g.z(bvb,g.qi);g.k=bvb.prototype;g.k.connect=function(a,b,c){this.Id.connect(a,b,c)};
g.k.disconnect=function(a){this.Id.disconnect(a)};
g.k.cz=function(){this.Id.cz()};
g.k.getDeviceId=function(){return this.Id.getDeviceId()};
g.k.Du=function(){return this.Id.Du()};
g.k.mB=function(){return this.Id.mB()};
g.k.O5=function(){this.dispatchEvent("channelOpened");var a=this.Id,b=this.j;g.lt("yt-remote-session-browser-channel",{firstTestResults:[""],secondTestResults:!a.j.LN,sessionId:a.j.D,arrayId:a.j.Tz});g.lt("yt-remote-session-screen-id",b);a=p7();b=q7();g.Wb(a,b)||a.push(b);Tsb(a);Vsb()};
g.k.onClosed=function(){this.dispatchEvent("channelClosed")};
g.k.onMessage=function(a){this.dispatchEvent(new Xub(a))};
g.k.onError=function(a){this.dispatchEvent(new Yub(a?1:0))};
g.k.sendMessage=function(a,b){this.Id.sendMessage(a,b)};
g.k.Ys=function(a){this.Id.Ys(a)};
g.k.dispose=function(){this.Id.dispose()};g.k=cvb.prototype;
g.k.connect=function(a,b){a=a===void 0?{}:a;b=b===void 0?0:b;this.K!==2&&(this.C.stop(),this.Z=a,this.N=b,evb(this),(a=g.zr("ID_TOKEN"))?this.D["x-youtube-identity-token"]=a:delete this.D["x-youtube-identity-token"],this.j&&(this.B.device=this.j.device,this.B.name=this.j.name,this.B.app=this.j.app,this.B.id=this.j.id,this.j.vaa&&(this.B.mdxVersion=""+this.j.vaa),this.j.theme&&(this.B.theme=this.j.theme),this.j.capabilities&&(this.B.capabilities=this.j.capabilities),this.j.n8&&(this.B.cst=this.j.n8),
this.j.authuser&&(this.B.authuser=this.j.authuser),this.j.pageId&&(this.B.pageId=this.j.pageId)),this.N!==0?this.B.ui=""+this.N:delete this.B.ui,Object.assign(this.B,this.Z),this.channel=new P7(this.pathPrefix,{D$:"gsessionid",zaa:this.D,Aaa:this.B}),this.channel.open(),this.K=2,dvb(this))};
g.k.disconnect=function(a){this.W=a===void 0?0:a;this.C.stop();evb(this);this.channel&&(this.W!==0?this.B.ui=""+this.W:delete this.B.ui,this.channel.close());this.W=0};
g.k.Du=function(){return this.C.isActive()?this.C.B-Date.now():NaN};
g.k.cz=function(){var a=this.C;g.Gp(a.j);a.start()};
g.k.sendMessage=function(a,b){this.channel&&(evb(this),a=Object.assign({},{_sc:a},b),this.channel.send(a))};
g.k.Ys=function(a){a||this.C.stop();a?this.D["X-YouTube-LoungeId-Token"]=a:delete this.D["X-YouTube-LoungeId-Token"]};
g.k.getDeviceId=function(){return this.j?this.j.id:""};
g.k.publish=function(a){return this.G.publish.apply(this.G,[a].concat(g.x(g.Ea.apply(1,arguments))))};
g.k.subscribe=function(a,b,c){return this.G.subscribe(a,b,c)};
g.k.unsubscribe=function(a,b,c){return this.G.unsubscribe(a,b,c)};
g.k.Fh=function(a){return this.G.Fh(a)};
g.k.dispose=function(){this.oa||(this.oa=!0,g.vg(this.G),this.disconnect(),g.vg(this.C),this.Aa=function(){return""})};
g.k.Ia=function(){return this.oa};g.z(fvb,g.qi);g.k=fvb.prototype;g.k.connect=function(a,b){this.j.connect(a,b)};
g.k.disconnect=function(a){this.j.disconnect(a)};
g.k.cz=function(){this.j.cz()};
g.k.getDeviceId=function(){return this.j.getDeviceId()};
g.k.Du=function(){return this.j.Du()};
g.k.mB=function(){return this.j.K===3};
g.k.P5=function(){this.dispatchEvent("channelOpened")};
g.k.onClosed=function(){this.dispatchEvent("channelClosed")};
g.k.onMessage=function(a){this.dispatchEvent(new Xub(a))};
g.k.onError=function(){this.dispatchEvent(new Yub(this.j.Cg===401?1:0))};
g.k.sendMessage=function(a,b){this.j.sendMessage(a,b)};
g.k.Ys=function(a){this.j.Ys(a)};
g.k.dispose=function(){this.j.dispose()};var nvb=Date.now(),d8=null,h8=Array(50),g8=-1,i8=!1;g.bb(j8,g.Qx);j8.prototype.Ol=function(){return this.screens};
j8.prototype.contains=function(a){return!!Qsb(this.screens,a)};
j8.prototype.get=function(a){return a?o7(this.screens,a):null};
j8.prototype.info=function(a){e8(this.K,a)};g.z(rvb,g.Qx);g.k=rvb.prototype;g.k.start=function(){!this.j&&isNaN(this.wd)&&this.Q1()};
g.k.stop=function(){this.j&&(this.j.abort(),this.j=null);isNaN(this.wd)||(g.Wr(this.wd),this.wd=NaN)};
g.k.xa=function(){this.stop();g.Qx.prototype.xa.call(this)};
g.k.Q1=function(){this.wd=NaN;this.j=g.ds(c8(this.C,"/pairing/get_screen"),{method:"POST",postParams:{pairing_code:this.N},timeout:5E3,onSuccess:(0,g.Xa)(this.R5,this),onError:(0,g.Xa)(this.Q5,this),onTimeout:(0,g.Xa)(this.S5,this)})};
g.k.R5=function(a,b){this.j=null;a=b.screen||{};a.dialId=this.D;a.name=this.K;b=-1;this.G&&a.shortLivedLoungeToken&&a.shortLivedLoungeToken.value&&a.shortLivedLoungeToken.refreshIntervalMs&&(a.screenIdType="shortLived",a.loungeToken=a.shortLivedLoungeToken.value,b=a.shortLivedLoungeToken.refreshIntervalMs);this.publish("pairingComplete",new l7(a),b)};
g.k.Q5=function(a){this.j=null;a.status&&a.status==404?this.B>=lxb.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(a=lxb[this.B],this.wd=g.Ur((0,g.Xa)(this.Q1,this),a),this.B++):this.publish("pairingFailed",Error("Server error "+a.status))};
g.k.S5=function(){this.j=null;this.publish("pairingFailed",Error("Server not responding"))};
var lxb=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];g.bb(l8,j8);g.k=l8.prototype;g.k.start=function(){k8(this)&&this.publish("screenChange");!g.mt("yt-remote-lounge-token-expiration")&&svb(this);g.Wr(this.j);this.j=g.Ur((0,g.Xa)(this.start,this),1E4)};
g.k.add=function(a,b){k8(this);ovb(this,a);m8(this,!1);this.publish("screenChange");b(a);a.token||svb(this)};
g.k.remove=function(a,b){var c=k8(this);qvb(this,a)&&(m8(this,!1),c=!0);b(a);c&&this.publish("screenChange")};
g.k.KN=function(a,b,c,d){var e=k8(this),f=this.get(a.id);f?(f.name!=b&&(f.name=b,m8(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.publish("screenChange")};
g.k.xa=function(){g.Wr(this.j);l8.Tf.xa.call(this)};
g.k.e$=function(a){k8(this);var b=this.screens.length;a=a&&a.screens||[];for(var c=0,d=a.length;c<d;++c){var e=a[c],f=this.get(e.screenId);f&&(f.token=e.loungeToken,--b)}m8(this,!b);b&&e8(this.K,"Missed "+b+" lounge tokens.")};
g.k.d$=function(a){e8(this.K,"Requesting lounge tokens failed: "+a)};g.z(uvb,g.Qx);g.k=uvb.prototype;g.k.start=function(){var a=parseInt(g.mt("yt-remote-fast-check-period")||"0",10);(this.D=g.Za()-144E5<a?0:a)?n8(this):(this.D=g.Za()+3E5,g.lt("yt-remote-fast-check-period",this.D),this.QT())};
g.k.isEmpty=function(){return g.Sg(this.j)};
g.k.update=function(){tvb("Updating availability on schedule.");var a=this.K(),b=g.Jg(this.j,function(c,d){return c&&!!o7(a,d)},this);
xvb(this,b)};
g.k.xa=function(){g.Wr(this.C);this.C=NaN;this.B&&(this.B.abort(),this.B=null);g.Qx.prototype.xa.call(this)};
g.k.QT=function(){g.Wr(this.C);this.C=NaN;this.B&&this.B.abort();var a=yvb(this);if(msb(a)){var b=c8(this.G,"/pairing/get_screen_availability");this.B=this.G.sendRequest("POST",b,{lounge_token:g.Og(a).join(",")},(0,g.Xa)(this.Mca,this,a),(0,g.Xa)(this.Lca,this))}else xvb(this,{}),n8(this)};
g.k.Mca=function(a,b){this.B=null;var c=g.Og(yvb(this));if(g.ic(c,g.Og(a))){b=b.screens||[];c={};for(var d=b.length,e=0;e<d;++e)c[a[b[e].loungeToken]]=b[e].status=="online";xvb(this,c);n8(this)}else this.qg("Changing Screen set during request."),this.QT()};
g.k.Lca=function(a){this.qg("Screen availability failed: "+a);this.B=null;n8(this)};
g.k.qg=function(a){e8("OnlineScreenService",a)};g.bb(o8,j8);g.k=o8.prototype;g.k.start=function(){this.B.start();this.j.start();this.screens.length&&(this.publish("screenChange"),this.j.isEmpty()||this.publish("onlineScreenChange"))};
g.k.add=function(a,b,c){this.B.add(a,b,c)};
g.k.remove=function(a,b,c){this.B.remove(a,b,c);this.j.update()};
g.k.KN=function(a,b,c,d){this.B.contains(a)?this.B.KN(a,b,c,d):(a="Updating name of unknown screen: "+a.name,e8(this.K,a),d(Error(a)))};
g.k.Ol=function(a){return a?this.screens:g.$b(this.screens,g.Bn(this.C,function(b){return!this.contains(b)},this))};
g.k.eW=function(){return g.Bn(this.Ol(!0),function(a){return!!this.j.j[a.id]},this)};
g.k.fW=function(a,b,c,d,e,f){var h=this;this.info("getDialScreenByPairingCode "+a+" / "+b);var l=new rvb(this.D,a,b,c,d);l.subscribe("pairingComplete",function(m,n){g.vg(l);e(p8(h,m),n)});
l.subscribe("pairingFailed",function(m){g.vg(l);f(m)});
l.start();return(0,g.Xa)(l.stop,l)};
g.k.T5=function(a,b,c,d){g.ds(c8(this.D,"/pairing/get_screen"),{method:"POST",postParams:{pairing_code:a},timeout:5E3,onSuccess:(0,g.Xa)(function(e,f){e=new l7(f.screen||{});if(!e.name||Cvb(this,e.name)){a:{f=e.name;for(var h=2,l=b(f,h);Cvb(this,l);){h++;if(h>20)break a;l=b(f,h)}f=l}e.name=f}c(p8(this,e))},this),
onError:(0,g.Xa)(function(e){d(Error("pairing request failed: "+e.status))},this),
onTimeout:(0,g.Xa)(function(){d(Error("pairing request timed out."))},this)})};
g.k.xa=function(){g.vg(this.B);g.vg(this.j);o8.Tf.xa.call(this)};
g.k.o$=function(){Evb(this);this.publish("screenChange");this.j.update()};
o8.prototype.dispose=o8.prototype.dispose;g.bb(q8,g.Qx);g.k=q8.prototype;g.k.Vj=function(a){this.Ia()||(a&&(s8(this,""+a),this.publish("sessionFailed")),this.j=null,this.publish("sessionScreen",null))};
g.k.info=function(a){e8(this.Fa,a)};
g.k.gW=function(){return null};
g.k.lU=function(a){var b=this.B;a?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,(0,g.Xa)(function(){this.info("Updated receiver status for "+b.friendlyName+": "+a)},this),(0,g.Xa)(function(){s8(this,"Failed to update receiver status for: "+b.friendlyName)},this))};
g.k.xa=function(){this.lU("");q8.Tf.xa.call(this)};g.z(t8,q8);g.k=t8.prototype;g.k.jU=function(a){if(this.C){if(this.C==a)return;s8(this,"Overriding cast session with new session object");Qvb(this);this.Aa=!1;this.W="unknown";this.C.removeUpdateListener(this.qa);this.C.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Ca)}this.C=a;this.C.addUpdateListener(this.qa);this.C.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.Ca);Lvb(this,"getMdxSessionStatus")};
g.k.zB=function(a){this.info("launchWithParams no-op for Cast: "+g.Ti(a))};
g.k.stop=function(){this.C?this.C.stop((0,g.Xa)(function(){this.Vj()},this),(0,g.Xa)(function(){this.Vj(Error("Failed to stop receiver app."))},this)):this.Vj(Error("Stopping cast device without session."))};
g.k.lU=function(){};
g.k.xa=function(){this.info("disposeInternal");Qvb(this);this.C&&(this.C.removeUpdateListener(this.qa),this.C.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.Ca));this.C=null;q8.prototype.xa.call(this)};
g.k.tda=function(a,b){if(!this.Ia())if(b)if(b=g7(b),g.Ta(b))switch(a=""+b.type,b=b.data||{},this.info("onYoutubeMessage_: "+a+" "+g.Ti(b)),a){case "mdxSessionStatus":Ivb(this,b);break;case "loungeToken":Mvb(this,b);break;default:s8(this,"Unknown youtube message: "+a)}else s8(this,"Unable to parse message.");else s8(this,"No data in message.")};
g.k.oZ=function(a,b,c,d){g.Wr(this.Z);this.Z=0;Bvb(this.D,this.B.label,a,this.B.friendlyName,(0,g.Xa)(function(e){e?b(e):d>=0?(s8(this,"Screen "+a+" appears to be offline. "+d+" retries left."),this.Z=g.Ur((0,g.Xa)(this.oZ,this,a,b,c,d-1),300)):c(Error("Unable to fetch screen."))},this),c)};
g.k.gW=function(){return this.C};
g.k.U5=function(a){this.Ia()||a||(s8(this,"Cast session died."),this.Vj())};g.z(u8,q8);g.k=u8.prototype;g.k.jU=function(a){this.C=a;this.C.addUpdateListener(this.Ja)};
g.k.zB=function(a){this.Ka=a;this.oa()};
g.k.stop=function(){Yvb(this);this.C?this.C.stop((0,g.Xa)(this.Vj,this,null),(0,g.Xa)(this.Vj,this,"Failed to stop DIAL device.")):this.Vj()};
g.k.xa=function(){Yvb(this);this.C&&this.C.removeUpdateListener(this.Ja);this.C=null;q8.prototype.xa.call(this)};
g.k.V5=function(a){this.Ia()||a||(s8(this,"DIAL session died."),this.G(),this.G=function(){},this.Vj())};g.z(x8,q8);x8.prototype.stop=function(){this.Vj()};
x8.prototype.jU=function(){};
x8.prototype.zB=function(){g.Wr(this.C);this.C=NaN;var a=o7(this.D.Ol(),this.B.label);a?r8(this,a):this.Vj(Error("No such screen"))};
x8.prototype.xa=function(){g.Wr(this.C);this.C=NaN;q8.prototype.xa.call(this)};g.z(y8,g.Qx);g.k=y8.prototype;
g.k.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest(this.Z,[chrome.cast.Capability.AUDIO_OUT]);g.Zr("desktop_enable_cast_connect")&&(c.androidReceiverCompatible=!0);this.W||(c.dialRequest=new chrome.cast.DialRequest("YouTube"));var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;a=a||this.K?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var e=(0,g.Xa)(this.tca,this);c=new chrome.cast.ApiConfig(c,(0,g.Xa)(this.l1,
this),e,d,a);c.customDialLaunchCallback=(0,g.Xa)(this.oba,this);chrome.cast.initialize(c,(0,g.Xa)(function(){this.Ia()||(chrome.cast.addReceiverActionListener(this.G),kvb(),this.B.subscribe("onlineScreenChange",(0,g.Xa)(this.hW,this)),this.C=awb(this),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.Xa)(function(f){this.qg("Failed to set initial custom receivers: "+g.Ti(f))},this)),this.publish("yt-remote-cast2-availability-change",A8(this)),b(!0))},this),(0,g.Xa)(function(f){this.qg("Failed to initialize API: "+
g.Ti(f));
b(!1)},this))};
g.k.Lea=function(a,b){z8("Setting connected screen ID: "+a+" -> "+b);if(this.j){var c=this.j.j;if(!a||c&&c.id!=a)z8("Unsetting old screen status: "+this.j.B.friendlyName),B8(this,null)}if(a&&b){if(!this.j){a=o7(this.B.Ol(),a);if(!a){z8("setConnectedScreenStatus: Unknown screen.");return}if(a.idType=="shortLived"){z8("setConnectedScreenStatus: Screen with id type to be short lived.");return}c=Zvb(this,a);c||(z8("setConnectedScreenStatus: Connected receiver not custom..."),c=new chrome.cast.Receiver(a.uuid?
a.uuid:a.id,a.name),c.receiverType=chrome.cast.ReceiverType.CUSTOM,this.C.push(c),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.Xa)(function(d){this.qg("Failed to set initial custom receivers: "+g.Ti(d))},this)));
z8("setConnectedScreenStatus: new active receiver: "+c.friendlyName);B8(this,new x8(this.B,c),!0)}this.j.lU(b)}else z8("setConnectedScreenStatus: no screen.")};
g.k.Oea=function(a){this.Ia()?this.qg("Setting connection data on disposed cast v2"):this.j?this.j.zB(a):this.qg("Setting connection data without a session")};
g.k.X5=function(){this.Ia()?this.qg("Stopping session on disposed cast v2"):this.j?(this.j.stop(),B8(this,null)):z8("Stopping non-existing session")};
g.k.requestSession=function(){chrome.cast.requestSession((0,g.Xa)(this.l1,this),(0,g.Xa)(this.Pca,this))};
g.k.xa=function(){this.B.unsubscribe("onlineScreenChange",(0,g.Xa)(this.hW,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.G);var a=hvb,b=g.Pa("yt.mdx.remote.debug.handlers_");g.Yb(b||[],a);g.vg(this.j);g.Qx.prototype.xa.call(this)};
g.k.qg=function(a){e8("Controller",a)};
g.k.n1=function(a,b){this.j==a&&(b||B8(this,null),this.publish("yt-remote-cast2-session-change",b))};
g.k.qca=function(a,b){if(!this.Ia())if(a)switch(a.friendlyName=chrome.cast.unescape(a.friendlyName),z8("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.j)if(this.j.B.label!=a.label)z8("onReceiverAction_: Stopping active receiver: "+this.j.B.friendlyName),this.j.stop();else{z8("onReceiverAction_: Casting to active receiver.");this.j.j&&this.publish("yt-remote-cast2-session-change",this.j.j);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:B8(this,
new x8(this.B,a));break;case chrome.cast.ReceiverType.DIAL:B8(this,new u8(this.B,a,this.D,this.config_));break;case chrome.cast.ReceiverType.CAST:B8(this,new t8(this.B,a,this.config_));break;default:this.qg("Unknown receiver type: "+a.receiverType)}break;case chrome.cast.ReceiverAction.STOP:this.j&&this.j.B.label==a.label?this.j.stop():this.qg("Stopping receiver w/o session: "+a.friendlyName)}else this.qg("onReceiverAction_ called without receiver.")};
g.k.oba=function(a){if(this.Ia())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.qg("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.j?this.j.B:null;if(!c||c.label!=b.label)return this.qg("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.j.j)return z8("Reselecting dial screen."),
this.publish("yt-remote-cast2-session-change",this.j.j),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.qg('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+b.friendlyName);B8(this,new u8(this.B,b,this.D,this.config_))}b=this.j;b.Z=a;b.Z.appState==chrome.cast.DialAppState.RUNNING?(a=b.Z.extraData||{},c=a.screenId||null,v8(b)&&a.loungeToken?a.loungeTokenRefreshIntervalMs?a=Vvb(b,{name:b.B.friendlyName,screenId:a.screenId,loungeToken:a.loungeToken,dialId:b.Z.receiver.label,
screenIdType:"shortLived"},a.loungeTokenRefreshIntervalMs):(g.Cr(Error("No loungeTokenRefreshIntervalMs presents in additionalData: "+JSON.stringify(a)+".")),a=Wvb(b,c)):a=Wvb(b,c)):a=Tvb(b);return a};
g.k.l1=function(a){var b=this;if(!this.Ia()&&!this.K){z8("New cast session ID: "+a.sessionId);var c=a.receiver;if(c.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.j)if(c.receiverType==chrome.cast.ReceiverType.CAST)z8("Got resumed cast session before resumed mdx connection."),c.friendlyName=chrome.cast.unescape(c.friendlyName),B8(this,new t8(this.B,c,this.config_),!0);else{this.qg("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var d=this.j.B,e=o7(this.B.Ol(),
d.label);e&&m7(e,c.label)&&d.receiverType!=chrome.cast.ReceiverType.CAST&&c.receiverType==chrome.cast.ReceiverType.CAST&&(z8("onSessionEstablished_: manual to cast session change "+c.friendlyName),g.vg(this.j),this.j=new t8(this.B,c,this.config_),this.j.subscribe("sessionScreen",(0,g.Xa)(this.n1,this,this.j)),this.j.subscribe("sessionFailed",function(){return $vb(b,b.j)}),this.j.zB(null));
this.j.jU(a)}}};
g.k.W5=function(){return this.j?this.j.gW():null};
g.k.Pca=function(a){this.Ia()||(this.qg("Failed to estabilish a session: "+g.Ti(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&B8(this,null),this.publish("yt-remote-cast2-session-failed"))};
g.k.tca=function(a){z8("Receiver availability updated: "+a);if(!this.Ia()){var b=A8(this);this.N=a==chrome.cast.ReceiverAvailability.AVAILABLE;A8(this)!=b&&this.publish("yt-remote-cast2-availability-change",A8(this))}};
g.k.hW=function(){this.Ia()||(this.C=awb(this),z8("Updating custom receivers: "+g.Ti(this.C)),chrome.cast.setCustomReceivers(this.C,function(){},(0,g.Xa)(function(){this.qg("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",A8(this)))};
y8.prototype.setLaunchParams=y8.prototype.Oea;y8.prototype.setConnectedScreenStatus=y8.prototype.Lea;y8.prototype.stopSession=y8.prototype.X5;y8.prototype.getCastSession=y8.prototype.W5;y8.prototype.requestSession=y8.prototype.requestSession;y8.prototype.init=y8.prototype.init;y8.prototype.dispose=y8.prototype.dispose;var jwb=[];g.k=I8.prototype;
g.k.reset=function(a){this.listId="";this.index=-1;this.videoId="";pwb(this);this.volume=-1;this.muted=!1;a&&(this.index=a.index,this.listId=a.listId,this.videoId=a.videoId,this.playerState=a.playerState,this.volume=a.volume,this.muted=a.muted,this.audioTrackId=a.audioTrackId,this.trackData=a.trackData,this.wq=a.hasPrevious,this.Rl=a.hasNext,this.N=a.playerTime,this.K=a.playerTimeAt,this.D=a.seekableStart,this.j=a.seekableEnd,this.G=a.duration,this.Z=a.loadedTime,this.C=a.liveIngestionTime,this.B=
!isNaN(this.C))};
g.k.isPlaying=function(){return this.playerState==1};
g.k.isBuffering=function(){return this.playerState==3};
g.k.Tl=function(){return this.playerState==1081};
g.k.qr=function(a){this.G=isNaN(a)?0:a};
g.k.getDuration=function(){return this.B?this.G+J8(this):this.G};
g.k.clone=function(){return new I8(qwb(this))};g.z(O8,g.Qx);g.k=O8.prototype;g.k.getState=function(){return this.C};
g.k.Du=function(){return this.D.getReconnectTimeout()};
g.k.cz=function(){this.D.reconnect()};
g.k.play=function(){Q8(this)?(this.j?this.j.play(null,g.Bi,U8(this,"play")):T8(this,"play"),twb(this,1,L8(P8(this))),this.publish("remotePlayerChange")):R8(this,this.play)};
g.k.pause=function(){Q8(this)?(this.j?this.j.pause(null,g.Bi,U8(this,"pause")):T8(this,"pause"),twb(this,2,L8(P8(this))),this.publish("remotePlayerChange")):R8(this,this.pause)};
g.k.seekTo=function(a){if(Q8(this)){if(this.j){var b=P8(this),c=new chrome.cast.media.SeekRequest;c.currentTime=a;b.isPlaying()||b.isBuffering()?c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_START:c.resumeState=chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.j.seek(c,g.Bi,U8(this,"seekTo",{newTime:a}))}else T8(this,"seekTo",{newTime:a});twb(this,3,a);this.publish("remotePlayerChange")}else R8(this,g.Ya(this.seekTo,a))};
g.k.stop=function(){if(Q8(this)){this.j?this.j.stop(null,g.Bi,U8(this,"stopVideo")):T8(this,"stopVideo");var a=P8(this);a.index=-1;a.videoId="";pwb(a);S8(this,a);this.publish("remotePlayerChange")}else R8(this,this.stop)};
g.k.setVolume=function(a,b){if(Q8(this)){var c=P8(this);if(this.B){if(c.volume!=a){var d=Math.round(a)/100;this.B.setReceiverVolumeLevel(d,(0,g.Xa)(function(){f8("set receiver volume: "+d)},this),(0,g.Xa)(function(){this.qg("failed to set receiver volume.")},this))}c.muted!=b&&this.B.setReceiverMuted(b,(0,g.Xa)(function(){f8("set receiver muted: "+b)},this),(0,g.Xa)(function(){this.qg("failed to set receiver muted.")},this))}else{var e={volume:a,
muted:b};c.volume!=-1&&(e.delta=a-c.volume);T8(this,"setVolume",e)}c.muted=b;c.volume=a;S8(this,c)}else R8(this,g.Ya(this.setVolume,a,b))};
g.k.iW=function(a,b){if(Q8(this)){var c=P8(this);a={videoId:a};b&&(c.trackData={trackName:b.name,languageCode:b.languageCode,sourceLanguageCode:b.translationLanguage?b.translationLanguage.languageCode:"",languageName:b.languageName,kind:b.kind},a.style=g.Ti(b.style),g.$g(a,c.trackData));T8(this,"setSubtitlesTrack",a);S8(this,c)}else R8(this,g.Ya(this.iW,a,b))};
g.k.setAudioTrack=function(a,b){Q8(this)?(b=b.getLanguageInfo().getId(),T8(this,"setAudioTrack",{videoId:a,audioTrackId:b}),a=P8(this),a.audioTrackId=b,S8(this,a)):R8(this,g.Ya(this.setAudioTrack,a,b))};
g.k.playVideo=function(a,b,c,d,e,f,h){d=d===void 0?null:d;e=e===void 0?null:e;f=f===void 0?null:f;h=h===void 0?null:h;var l=P8(this),m={videoId:a};c!==void 0&&(m.currentIndex=c);M8(l,a,c||0);b!==void 0&&(K8(l,b),m.currentTime=b);d&&(m.listId=d);e&&(m.playerParams=e);f&&(m.clickTrackingParams=f);h&&(m.locationInfo=g.Ti(h));T8(this,"setPlaylist",m);d||S8(this,l)};
g.k.LM=function(a,b){if(Q8(this)){if(a&&b){var c=P8(this);M8(c,a,b);S8(this,c)}T8(this,"previous")}else R8(this,g.Ya(this.LM,a,b))};
g.k.nextVideo=function(a,b){if(Q8(this)){if(a&&b){var c=P8(this);M8(c,a,b);S8(this,c)}T8(this,"next")}else R8(this,g.Ya(this.nextVideo,a,b))};
g.k.pP=function(){if(Q8(this)){T8(this,"clearPlaylist");var a=P8(this);a.reset();S8(this,a);this.publish("remotePlayerChange")}else R8(this,this.pP)};
g.k.uY=function(){Q8(this)?T8(this,"dismissAutoplay"):R8(this,this.uY)};
g.k.dispose=function(){if(this.C!=3){var a=this.C;this.C=3;this.publish("proxyStateChange",a,this.C)}g.Qx.prototype.dispose.call(this)};
g.k.xa=function(){swb(this);this.D=null;this.G.clear();N8(this,null);g.Qx.prototype.xa.call(this)};
g.k.pU=function(a){if((a!=this.C||a==2)&&this.C!=3&&a!=0){var b=this.C;this.C=a;this.publish("proxyStateChange",b,a);if(a==1)for(;!this.G.isEmpty();)b=a=this.G,b.j.length===0&&(b.j=b.B,b.j.reverse(),b.B=[]),a.j.pop().apply(this);else a==3&&this.dispose()}};
g.k.oca=function(a,b){this.publish(a,b)};
g.k.dba=function(a){if(!a)this.ZG(null),N8(this,null);else if(this.B.receiver.volume){a=this.B.receiver.volume;var b=P8(this),c=Math.round(100*a.level||0);if(b.volume!=c||b.muted!=a.muted)f8("Cast volume update: "+a.level+(a.muted?" muted":"")),b.volume=c,b.muted=!!a.muted,S8(this,b)}};
g.k.ZG=function(a){f8("Cast media: "+!!a);this.j&&this.j.removeUpdateListener(this.Z);if(this.j=a)this.j.addUpdateListener(this.Z),uwb(this),this.publish("remotePlayerChange")};
g.k.cba=function(a){a?(uwb(this),this.publish("remotePlayerChange")):this.ZG(null)};
g.k.UU=function(){T8(this,"sendDebugCommand",{debugCommand:"stats4nerds "})};
g.k.fba=function(){var a=mwb();a&&N8(this,a)};
g.k.qg=function(a){e8("CP",a)};g.z(X8,g.Qx);g.k=X8.prototype;
g.k.connect=function(a,b){if(b){var c=b.listId,d=b.videoId,e=b.videoIds,f=b.playerParams,h=b.clickTrackingParams,l=b.index,m={videoId:d},n=b.currentTime,p=b.locationInfo;b=b.loopMode;n!==void 0&&(m.currentTime=n<=5?0:n);f&&(m.playerParams=f);p&&(m.locationInfo=p);h&&(m.clickTrackingParams=h);c&&(m.listId=c);e&&e.length>0&&(m.videoIds=e.join(","));l!==void 0&&(m.currentIndex=l);this.Ja&&(m.loopMode=b||"LOOP_MODE_OFF");c&&(this.j.listId=c);this.j.videoId=d;this.j.index=l||0;this.j.state=3;K8(this.j,
n);this.G="UNSUPPORTED";c=this.Ja?"setInitialState":"setPlaylist";V8("Connecting with "+c+" and params: "+g.Ti(m));this.B.connect({method:c,params:g.Ti(m)},a,Wsb())}else V8("Connecting without params"),this.B.connect({},a,Wsb());ywb(this)};
g.k.Ys=function(a){this.B.Ys(a)};
g.k.dispose=function(){this.Ia()||(g.Oa("yt.mdx.remote.remoteClient_",null),this.publish("beforeDispose"),W8(this,3));g.Qx.prototype.dispose.call(this)};
g.k.xa=function(){zwb(this);Bwb(this);Awb(this);g.Wr(this.Z);this.Z=NaN;g.Wr(this.W);this.W=NaN;this.D=null;g.bt(this.oa);this.oa.length=0;this.B.dispose();g.Qx.prototype.xa.call(this);this.G=this.N=this.C=this.j=this.B=null};
g.k.m_=function(a){if(!this.C||this.C.length===0)return!1;for(var b=g.w(this.C),c=b.next();!c.done;c=b.next())if(!c.value.capabilities.has(a))return!1;return!0};
g.k.L9=function(){var a=3;this.Ia()||(a=0,isNaN(this.XF())?this.B.mB()&&isNaN(this.K)&&(a=1):a=2);return a};
g.k.CA=function(a){V8("Disconnecting with "+a);g.Oa("yt.mdx.remote.remoteClient_",null);zwb(this);this.publish("beforeDisconnect",a);a==1&&r7();this.B.disconnect(a);this.dispose()};
g.k.F9=function(){var a=this.j;this.D&&(a=this.j.clone(),M8(a,this.D,a.index));return qwb(a)};
g.k.Rea=function(a){var b=this,c=new I8(a);c.videoId&&c.videoId!=this.j.videoId&&(this.D=c.videoId,g.Wr(this.Z),this.Z=g.Ur(function(){if(b.D){var e=b.D;b.D=null;b.j.videoId!=e&&Y8(b,"getNowPlaying")}},5E3));
var d=[];this.j.listId==c.listId&&this.j.videoId==c.videoId&&this.j.index==c.index||d.push("remoteQueueChange");this.j.playerState==c.playerState&&this.j.volume==c.volume&&this.j.muted==c.muted&&L8(this.j)==L8(c)&&g.Ti(this.j.trackData)==g.Ti(c.trackData)||d.push("remotePlayerChange");this.j.reset(a);g.lc(d,function(e){this.publish(e)},this)};
g.k.jZ=function(){var a=this.B.getDeviceId(),b=g.Ub(this.C,function(c){return c.type=="REMOTE_CONTROL"&&c.id!=a});
return b?b.id:""};
g.k.XF=function(){return this.B.Du()};
g.k.p9=function(){return this.G||"UNSUPPORTED"};
g.k.q9=function(){return this.N||""};
g.k.Y5=function(){!isNaN(this.XF())&&this.B.cz()};
g.k.Iea=function(a,b){Y8(this,a,b);Dwb(this)};
g.k.jW=function(){var a=g.os("SAPISID","")||g.os("__Secure-1PAPISID")||"",b=g.os("__Secure-3PAPISID","")||"";if(!a&&!b)return"";a=g.pc(g.tb(a),2);b=g.pc(g.tb(b),2);return g.pc(g.tb(","+a+","+b),2)};
X8.prototype.subscribe=X8.prototype.subscribe;X8.prototype.unsubscribeByKey=X8.prototype.Fh;X8.prototype.getProxyState=X8.prototype.L9;X8.prototype.disconnect=X8.prototype.CA;X8.prototype.getPlayerContextData=X8.prototype.F9;X8.prototype.setPlayerContextData=X8.prototype.Rea;X8.prototype.getOtherConnectedRemoteId=X8.prototype.jZ;X8.prototype.getReconnectTimeout=X8.prototype.XF;X8.prototype.getAutoplayMode=X8.prototype.p9;X8.prototype.getAutoplayVideoId=X8.prototype.q9;X8.prototype.reconnect=X8.prototype.Y5;
X8.prototype.sendMessage=X8.prototype.Iea;X8.prototype.getXsrfToken=X8.prototype.jW;X8.prototype.isCapabilitySupportedOnConnectedDevices=X8.prototype.m_;g.z(Pwb,j8);g.k=Pwb.prototype;g.k.Ol=function(a){return this.ph.$_gs(a)};
g.k.contains=function(a){return!!this.ph.$_c(a)};
g.k.get=function(a){return this.ph.$_g(a)};
g.k.start=function(){this.ph.$_st()};
g.k.add=function(a,b,c){this.ph.$_a(a,b,c)};
g.k.remove=function(a,b,c){this.ph.$_r(a,b,c)};
g.k.KN=function(a,b,c,d){this.ph.$_un(a,b,c,d)};
g.k.xa=function(){for(var a=0,b=this.j.length;a<b;++a)this.ph.$_ubk(this.j[a]);this.j.length=0;this.ph=null;j8.prototype.xa.call(this)};
g.k.Z5=function(){this.publish("screenChange")};
g.k.Xba=function(){this.publish("onlineScreenChange")};
o8.prototype.$_st=o8.prototype.start;o8.prototype.$_gspc=o8.prototype.T5;o8.prototype.$_gsppc=o8.prototype.fW;o8.prototype.$_c=o8.prototype.contains;o8.prototype.$_g=o8.prototype.get;o8.prototype.$_a=o8.prototype.add;o8.prototype.$_un=o8.prototype.KN;o8.prototype.$_r=o8.prototype.remove;o8.prototype.$_gs=o8.prototype.Ol;o8.prototype.$_gos=o8.prototype.eW;o8.prototype.$_s=o8.prototype.subscribe;o8.prototype.$_ubk=o8.prototype.Fh;var i9=null,l9=!1,Z8=null,$8=null,$wb=null,d9=[];g.z(exb,g.O);g.k=exb.prototype;g.k.xa=function(){g.O.prototype.xa.call(this);this.j.stop();this.B.stop();this.N.stop();var a=this.Ic;a.unsubscribe("proxyStateChange",this.f1,this);a.unsubscribe("remotePlayerChange",this.iH,this);a.unsubscribe("remoteQueueChange",this.sM,this);a.unsubscribe("previousNextChange",this.b1,this);a.unsubscribe("nowAutoplaying",this.W0,this);a.unsubscribe("autoplayDismissed",this.E0,this);this.Ic=this.module=null};
g.k.Ql=function(a){var b=g.Ea.apply(1,arguments);if(this.Ic.C!=2)if(m9(this)){if(!P8(this.Ic).Tl()||a!=="control_seek")switch(a){case "control_toggle_play_pause":P8(this.Ic).isPlaying()?this.Ic.pause():this.Ic.play();break;case "control_play":this.Ic.play();break;case "control_pause":this.Ic.pause();break;case "control_seek":this.K.aO(b[0],b[1]);break;case "control_subtitles_set_track":gxb(this,b[0]);break;case "control_set_audio_track":this.setAudioTrack(b[0])}}else switch(a){case "control_toggle_play_pause":case "control_play":case "control_pause":b=
this.J.getCurrentTime();n9(this,b===0?void 0:b);break;case "control_seek":n9(this,b[0]);break;case "control_subtitles_set_track":gxb(this,b[0]);break;case "control_set_audio_track":this.setAudioTrack(b[0])}};
g.k.aba=function(a){this.N.D5(a)};
g.k.Qfa=function(a){this.Ql("control_subtitles_set_track",g.Sg(a)?null:a)};
g.k.s3=function(){var a=this.J.getOption("captions","track");g.Sg(a)||gxb(this,a)};
g.k.Rc=function(a){this.module.Rc(a,this.J.getVideoData().lengthSeconds)};
g.k.Iba=function(){g.Sg(this.C)||hxb(this,this.C);this.D=!1};
g.k.f1=function(a,b){this.B.stop();b===2&&this.j3()};
g.k.iH=function(){if(m9(this)){this.j.stop();var a=P8(this.Ic);switch(a.playerState){case 1080:case 1081:case 1084:case 1085:this.module.Bi=1;break;case 1082:case 1083:this.module.Bi=0;break;default:this.module.Bi=-1}switch(a.playerState){case 1081:case 1:this.Ec(new g.NH(8));this.g3();break;case 1085:case 3:this.Ec(new g.NH(9));break;case 1083:case 0:this.Ec(new g.NH(2));this.K.stop();this.Rc(this.J.getVideoData().lengthSeconds);break;case 1084:this.Ec(new g.NH(4));break;case 2:this.Ec(new g.NH(4));
this.Rc(L8(a));break;case -1:this.Ec(new g.NH(64));break;case -1E3:this.Ec(new g.NH(128,{errorCode:"mdx.remoteerror",errorMessage:"This video is not available for remote playback.",EA:2}))}a=P8(this.Ic).trackData;var b=this.C;(a||b?a&&b&&a.trackName==b.trackName&&a.languageCode==b.languageCode&&a.languageName==b.languageName&&a.kind==b.kind:1)||(this.C=a,hxb(this,a));a=P8(this.Ic);a.volume===-1||Math.round(this.J.getVolume())===a.volume&&this.J.isMuted()===a.muted||this.Z.isActive()||this.d4()}else fxb(this)};
g.k.b1=function(){this.J.publish("mdxpreviousnextchange")};
g.k.sM=function(){m9(this)||fxb(this)};
g.k.W0=function(a){isNaN(a)||this.J.publish("mdxnowautoplaying",a)};
g.k.E0=function(){this.J.publish("mdxautoplaycanceled")};
g.k.setAudioTrack=function(a){m9(this)&&this.Ic.setAudioTrack(this.J.getVideoData(1).videoId,a)};
g.k.seekTo=function(a,b){P8(this.Ic).playerState===-1?n9(this,a):b&&this.Ic.seekTo(a)};
g.k.d4=function(){var a=this;if(m9(this)){var b=P8(this.Ic);this.events.Mc(this.W);b.muted?this.J.mute():this.J.unMute();this.J.setVolume(b.volume);this.W=this.events.T(this.J,"onVolumeChange",function(c){cxb(a,c)})}};
g.k.g3=function(){this.j.stop();if(!this.Ic.Ia()){var a=P8(this.Ic);a.isPlaying()&&this.Ec(new g.NH(8));this.Rc(L8(a));this.j.start()}};
g.k.j3=function(){this.B.stop();this.j.stop();var a=this.Ic.Du();this.Ic.C==2&&!isNaN(a)&&this.B.start()};
g.k.Ec=function(a){this.B.stop();var b=this.G;if(!g.TH(b,a)){var c=g.U(a,2);c!==g.U(this.G,2)&&this.J.OC(c);this.G=a;jxb(this.module,b,a)}};g.z(o9,g.S);o9.prototype.rd=function(){this.j.show()};
o9.prototype.Mb=function(){this.j.hide()};
o9.prototype.B=function(){t7("mdx-privacy-popup-cancel");this.Mb()};
o9.prototype.C=function(){t7("mdx-privacy-popup-confirm");this.Mb()};g.z(p9,g.S);p9.prototype.onStateChange=function(a){this.yd(a.state)};
p9.prototype.yd=function(a){if(this.api.getPresentingPlayerType()===3){var b={RECEIVER_NAME:this.api.getOption("remote","currentReceiver").name};a=g.U(a,128)?g.XE("Error on $RECEIVER_NAME",b):a.isPlaying()||a.isPaused()?g.XE("Playing on $RECEIVER_NAME",b):g.XE("Connected to $RECEIVER_NAME",b);this.updateValue("statustext",a);this.j.show()}else this.j.hide()};g.z(q9,g.IX);q9.prototype.D=function(){var a=this.J.getOption("remote","receivers");a&&a.length>1&&!this.J.getOption("remote","quickCast")?(this.Hv=g.mc(a,this.j,this),this.Bl(g.Ql(a,this.j)),a=this.J.getOption("remote","currentReceiver"),a=this.j(a),this.options[a]&&this.Ji(a),this.enable(!0)):this.enable(!1)};
q9.prototype.j=function(a){return a.key};
q9.prototype.Al=function(a){return a==="cast-selector-receiver"?"Cast...":this.Hv[a].name};
q9.prototype.fh=function(a){g.IX.prototype.fh.call(this,a);this.J.setOption("remote","currentReceiver",this.Hv[a]);this.Cb.Mb()};g.z(ixb,g.hY);g.k=ixb.prototype;
g.k.create=function(){var a=this.player.U(),b=g.RP(a);a={device:"Desktop",app:"youtube-desktop",loadCastApiSetupScript:a.L("mdx_load_cast_api_bootstrap_script"),enableDialLoungeToken:a.L("enable_dial_short_lived_lounge_token"),enableCastLoungeToken:a.L("enable_cast_short_lived_lounge_token")};Uwb(b,a);this.subscriptions.push(g.Sv("yt-remote-before-disconnect",this.Yaa,this));this.subscriptions.push(g.Sv("yt-remote-connection-change",this.vca,this));this.subscriptions.push(g.Sv("yt-remote-receiver-availability-change",this.e1,
this));this.subscriptions.push(g.Sv("yt-remote-auto-connect",this.sca,this));this.subscriptions.push(g.Sv("yt-remote-receiver-resumed",this.rca,this));this.subscriptions.push(g.Sv("mdx-privacy-popup-confirm",this.Tda,this));this.subscriptions.push(g.Sv("mdx-privacy-popup-cancel",this.Sda,this));this.e1()};
g.k.load=function(){this.player.cancelPlayback();g.hY.prototype.load.call(this);this.Mm=new exb(this,this.player,this.Ic);var a=(a=bxb())?a.currentTime:0;var b=Zwb()?new O8(h9(),void 0):null;a==0&&b&&(a=L8(P8(b)));a!==0&&this.Rc(a);jxb(this,this.Ie,this.Ie);this.player.lr(6)};
g.k.unload=function(){this.player.publish("mdxautoplaycanceled");this.au=this.Lq;g.wg(this.Mm,this.Ic);this.Ic=this.Mm=null;g.hY.prototype.unload.call(this);this.player.lr(5);r9(this)};
g.k.xa=function(){g.Tv(this.subscriptions);g.hY.prototype.xa.call(this)};
g.k.dH=function(a){var b=g.Ea.apply(1,arguments);this.loaded&&this.Mm.Ql.apply(this.Mm,[a].concat(g.x(b)))};
g.k.getAdState=function(){return this.Bi};
g.k.wq=function(){return this.Ic?P8(this.Ic).wq:!1};
g.k.Rl=function(){return this.Ic?P8(this.Ic).Rl:!1};
g.k.Rc=function(a,b){this.B_=a||0;this.player.publish("progresssync",a,b);this.player.Cd("onVideoProgress",a||0)};
g.k.getCurrentTime=function(){return this.B_};
g.k.getProgressState=function(){var a=P8(this.Ic),b=this.player.getVideoData();return{airingStart:0,airingEnd:0,allowSeeking:!a.Tl()&&this.player.Ph(),clipEnd:b.clipEnd,clipStart:b.clipStart,current:this.getCurrentTime(),displayedStart:-1,duration:a.getDuration(),ingestionTime:a.B?a.C+J8(a):a.C,isAtLiveHead:(a.B?a.j+J8(a):a.j)-this.getCurrentTime()<=1,loaded:a.Z,seekableEnd:a.B?a.j+J8(a):a.j,seekableStart:a.D>0?a.D+J8(a):a.D,offset:0,viewerLivestreamJoinMediaTime:0}};
g.k.nextVideo=function(){this.Ic&&this.Ic.nextVideo()};
g.k.LM=function(){this.Ic&&this.Ic.LM()};
g.k.Yaa=function(a){a===1&&(this.xT=this.Ic?P8(this.Ic):null)};
g.k.vca=function(){var a=Zwb()?new O8(h9(),void 0):null;if(a){var b=this.au;this.loaded&&this.unload();this.Ic=a;this.xT=null;b.key!==this.Lq.key&&(this.au=b,this.load())}else g.vg(this.Ic),this.Ic=null,this.loaded&&(this.unload(),(a=this.xT)&&a.videoId===this.player.getVideoData().videoId&&this.player.cueVideoById(a.videoId,L8(a)));this.player.publish("videodatachange","newdata",this.player.getVideoData(),3)};
g.k.e1=function(){var a=[this.Lq],b=a.concat,c=Vwb();F8()&&g.mt("yt-remote-cast-available")&&c.push({key:"cast-selector-receiver",name:"Cast..."});this.Hv=b.call(a,c);a=Xwb()||this.Lq;s9(this,a);this.player.Cd("onMdxReceiversChange")};
g.k.sca=function(){var a=Xwb();s9(this,a)};
g.k.rca=function(){this.au=Xwb()};
g.k.Tda=function(){this.BH=!0;r9(this);l9=!1;i9&&k9(i9,1);i9=null};
g.k.Sda=function(){this.BH=!1;r9(this);s9(this,this.Lq);this.au=this.Lq;l9=!1;i9=null;this.player.playVideo()};
g.k.gi=function(a,b){switch(a){case "casting":return this.loaded;case "receivers":return this.Hv;case "currentReceiver":return b&&(b.key==="cast-selector-receiver"?nwb():s9(this,b)),this.loaded?this.au:this.Lq;case "quickCast":return this.Hv.length===2&&this.Hv[1].key==="cast-selector-receiver"?(b&&nwb(),!0):!1}};
g.k.UU=function(){this.Ic.UU()};
g.k.Ln=function(){return!1};
g.k.getOptions=function(){return["casting","receivers","currentReceiver","quickCast"]};
g.k.isLoggedIn=function(){var a,b;return((a=g.zr("PLAYER_CONFIG"))==null?void 0:(b=a.args)==null?void 0:b.authuser)!==void 0?!0:!(!g.zr("SESSION_INDEX")&&!g.zr("LOGGED_IN"))};g.gY("remote",ixb);})(_yt_player);
