Ul=function(){return Rl()?Nl()?Ol.getCastSession():(Il("getCastSelector: Cast is not initialized."),null):(Il("getCastSelector: Cast API is not installed!"),null)};

Wl=function(){Rl()?Nl()?Vl()?(El("Requesting cast selector."),Ol.requestSession()):(El("Wait for cast API to be ready to request the session."),Ql.push($i("yt-remote-cast2-api-ready",Wl))):Il("requestCastSelector: Cast is not initialized."):Il("requestCastSelector: Cast API is not installed!")};

Xl=function(a){Vl()?Nl().setLaunchParams(a):Il("setLaunchParams called before ready.")};

Yl=function(a,b){Vl()?Nl().setConnectedScreenStatus(a,b):Il("setConnectedScreenStatus called before ready.")};

cm=function(a){this.type="";this.state=this.source=this.data=this.currentTarget=this.relatedTarget=this.target=null;this.charCode=this.keyCode=0;this.shiftKey=this.ctrlKey=this.altKey=!1;this.rotation=this.clientY=this.clientX=0;this.scale=1;this.changedTouches=this.touches=null;if(a=a||window.event){this.event=a;for(var b in a)b in bm||(this[b]=a[b]);this.scale=a.scale;this.rotation=a.rotation;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName?

Kx(c.keywords));c.rvs&&(a.H=Jj(c.rvs));a.contentCheckOk=Wu(a.contentCheckOk,"1"==c.cco);a.racyCheckOk=Wu(a.racyCheckOk,"1"==c.rco);a.oauthToken=Zu(a.oauthToken,c.oauth_token);a.visitorData=Zu(a.visitorData,c.visitor_data);c.session_data&&(a.V=Gj(c.session_data,"&"));c.endscreen_autoplay_session_data&&(a.Gc=Gj(c.endscreen_autoplay_session_data,"&"));a.Wc=Zu(a.Wc,c.endscreen_ad_tracking_data);a.ib=Zu(a.ib,c.tracking_list||c.tv_list);D(Gx.A,function(a){a in c&&(this.A[a]=c[a])},a)};

kA=function(a){if(!(a.getHours&&a.getSeconds&&a.getMinutes))throw Error("The date to format has no time (probably a goog.date.Date). Use Date or goog.date.DateTime, or use a pattern without time fields.");};

UA=function(a,b,c,d){TA.call(this);if(!ea(a)||!ea(b))throw Error("Start and end parameters must be arrays");if(a.length!=b.length)throw Error("Start and end points must be the same length");this.o=a;this.F=b;this.duration=c;this.C=d;this.g=[];this.progress=this.D=0;this.B=null};

new hr(this.F,330,SC(this,"drawer_peek"));SC(this,"drawer_peek")&&J(this.A,"ytp-drawer-peek");this.Z=of("iv-drawer-header",this.A);this.$c=of("iv-drawer-content",this.A);a=["iv-drawer-teaser"];this.g.b.o.experiments.bx&&a.push("iv-exp-cards-teaser-prominent");a=["div",a,["div","iv-drawer-teaser-box"],["div","iv-drawer-teaser-text"],["button",{title:O("YTP_DRAWER_HEADER_TEXT_2"),"aria-label":O("YTP_CARDS_BUTTON_ARIA_LABEL")},["span"]]];this.$=(new Q(a)).element;of("iv-drawer-teaser-text",this.$);this.o=

aD=function(a){if(!Daa.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(Eaa,"#$1$1$2$2$3$3"));a=a.toLowerCase();return[(0,window.parseInt)(a.substr(1,2),16),(0,window.parseInt)(a.substr(3,2),16),(0,window.parseInt)(a.substr(5,2),16)]};

bD=function(a,b,c,d,e){UA.call(this,b,c,d,e);this.element=a};

cD=function(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");bD.apply(this,arguments)};