text: (function(g){var window=this;/*
  
   Copyright The Closure Library Authors.
   SPDX-License-Identifier: Apache-2.0
  */
  var L0=function(a){a.V("cardstatechange",a.Kg()&&a.Qi()?1:0)},M0=function(a,b){var c=g.Ma(b),d=c?b:arguments;
  for(c=c?0:1;c<d.length;c++){if(null==a)return;a=a[d[c]]}return a},xEa=function(a){var b=g.wg(a);
  a=g.Cg(a);return new g.cg(b.x,b.y,a.width,a.height)},yEa=function(a){return Math.pow(a,3)},zEa=function(a){return 3*a*a-2*a*a*a},P0=function(a){a=g.Pa(a);
  delete N0[a];g.Pb(N0)&&O0&&O0.stop()},BEa=function(){O0||(O0=new g.K(function(){AEa()},20));
  var a=O0;a.isActive()||a.start()},AEa=function(){var a=g.Sa();
  g.Cb(N0,function(b){CEa(b,a)});
  g.Pb(N0)||BEa()},Q0=function(a,b,c,d){g.pn.call(this);
  if(!Array.isArray(a)||!Array.isArray(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.i=a;this.J=b;this.duration=c;this.C=d;this.coords=[];this.progress=this.I=0;this.B=null},CEa=function(a,b){b<a.startTime&&(a.endTime=b+a.endTime-a.startTime,a.startTime=b);
  a.progress=(b-a.startTime)/(a.endTime-a.startTime);1<a.progress&&(a.progress=1);a.I=1E3/(b-a.B);a.B=b;DEa(a,a.progress);1==a.progress?(a.La=0,P0(a),a.onFinish(),a.Er()):a.Mb()&&a.tw()},DEa=function(a,b){"function"===typeof a.C&&(b=a.C(b));
  a.coords=Array(a.i.length);for(var c=0;c<a.i.length;c++)a.coords[c]=(a.J[c]-a.i[c])*b+a.i[c]},EEa=function(a,b){g.Cl.call(this,a);
  this.coords=b.coords;this.x=b.coords[0];this.y=b.coords[1];this.z=b.coords[2];this.duration=b.duration;this.progress=b.progress;this.fps=b.I;this.state=b.La},R0=function(a,b,c,d,e){Q0.call(this,b,c,d,e);
  this.element=a},S0=function(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");
  R0.call(this,a,b,c,d,e)},T0=function(a){g.E.call(this);
  this.l=a||window;this.i=[]},U0=function(a){return a.baseUrl||null},V0=function(a,b){return g.Ne(g.Qc(a,b,void 0),function(c){return!!c})},FEa=function(a,b,c){function d(U){var oa,xa,La,Va=U.hovercardButton;
  if(!Va)return null;Va=Va.subscribeButtonRenderer;if(!Va)return null;var mc=f(Va.unsubscribedButtonText),tb=f(Va.subscribedButtonText);if(Va.subscribed){var Zc=f(Va.subscriberCountWithUnsubscribeText);var Tb=f(Va.subscriberCountText)}else Zc=f(Va.subscriberCountText),Tb=f(Va.subscriberCountWithSubscribeText);var ac=null;return U.signinEndpoint&&(ac=M0(U,"signinEndpoint","webNavigationEndpointData","url"),ac||(ac=null===(La=null===(xa=null===(oa=Va.signInEndpoint)||void 0===oa?void 0:oa.commandMetadata)||
  void 0===xa?void 0:xa.webCommandMetadata)||void 0===La?void 0:La.url),!ac)?null:mc&&(tb||ac)?{subscribed:Va.subscribed,subscribeText:mc,subscribeCount:Zc,unsubscribeText:tb,unsubscribeCount:Tb,enabled:Va.enabled,signinUrl:ac,classic:U.useClassicSubscribeButton}:null}
  function e(U){if(U){var oa=[],xa=U.videoId;xa&&oa.push("v="+xa);(xa=U.playlistId)&&oa.push("list="+xa);(U=U.startTimeSeconds)&&oa.push("t="+U);return"/watch?"+oa.join("&")}}
  function f(U){if(!U)return null;var oa=U.simpleText;return oa?oa:U.runs?g.Qc(U.runs,function(xa){return xa.text}).join(""):null}
  b=b.endscreenElementRenderer;if(!b)return null;var h=b.style,l=b.endpoint||{},m=null,n=null,p=null,r=null,t=null,w=null,x=!1,y=null,G=null,B=null,F=null,L=null;if("VIDEO"===h)l.urlEndpoint?m=l.urlEndpoint.url:m=e(l.watchEndpoint),n=!1,p=a,r=f(b.videoDuration);else if("PLAYLIST"===h)l.urlEndpoint?m=l.urlEndpoint.url:m=e(l.watchEndpoint),n=!1,p=a,t=f(b.playlistLength);else if("CHANNEL"===h){if(x=M0(l,"browseEndpoint","browseId"))w=x,m="/channel/"+w;n=!1;p="new";(x=!!b.isSubscribe)?y=d(b):G=f(b.subscribersText)}else"WEBSITE"===
  h?((B=M0(l,"urlEndpoint","url"))&&(m=B),n=!0,p="new",B=b.icon.thumbnails[0].url):"CREATOR_MERCHANDISE"===h&&(b.productPrice&&(F=f(b.productPrice)),b.additionalFeesText&&(L=f(b.additionalFeesText)),(n=M0(l,"urlEndpoint","url"))&&(m=n),n=!0,p="new");a=M0(b,"title","accessibility","accessibilityData","label");var I=b.endpoint?b.endpoint.clickTrackingParams:null,H="";if(b.metadata){var M=f(b.metadata);M&&(H=M)}return{id:"element-"+c,type:h,title:f(b.title),metadata:H,callToAction:f(b.callToAction),iD:b.image,
  iconUrl:B,left:Number(b.left),width:Number(b.width),top:Number(b.top),aspectRatio:Number(b.aspectRatio),startMs:Math.floor(Number(b.startMs)),endMs:Math.floor(Number(b.endMs)),videoDuration:r,playlistLength:t,channelId:w,subscribeButton:y,subscribersText:G,isSubscribe:x,targetUrl:m||null,hM:n,Dd:I?{itct:I}:null,NQ:p,cq:a?a:null,kM:b.isPlaceholder,impressionUrls:V0(b.impressionUrls||[],U0),aM:V0(b.hovercardShowUrls||[],U0),clickUrls:V0(l.loggingUrls||[],U0),visualElement:g.gu(b.trackingParams),productPrice:F,
  additionalFeesText:L}},W0=function(a,b){var c={startMs:Math.floor(Number(a.startMs)),
  impressionUrls:V0(a.impressionUrls||[],U0),elements:V0(a.elements||[],function(d,e){return FEa(b,d,e)})};
  a.trackingParams&&(c.visualElement=g.gu(a.trackingParams));return c},X0=function(a){g.gN.call(this,a);
  this.u=this.endscreen=null;this.i={};this.C={};this.B=this.l=null;this.J=[];this.W=!0;this.I=0;a=a.T();this.L=g.ZF(a)||g.bG(a);this.events=new g.ZM(this);g.J(this,this.events);this.events.N(this.player,g.DD("creatorendscreen"),this.Bd);this.events.N(this.player,g.ED("creatorendscreen"),this.rf);this.events.N(this.player,"resize",this.Za);this.events.N(window,"focus",this.PP);this.load();var b=g.Ie("STYLE");(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(b);g.Gi(this,function(){g.Me(b)});
  b.sheet&&(b.sheet.insertRule(".ytp-ce-playlist-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASBAMAAACk4JNkAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEVMaXGzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7P///91E4wTAAAACXRSTlMArBbpVOtYrReN+x2FAAAAAWJLR0QKaND0VgAAACFJREFUCNdjYCAWzIQAFBaZ6hgVYLKcJnBWGEyWvYGASwCXtBf7m4i3CQAAAABJRU5ErkJggg==) no-repeat center;background-size:18px;width:18px;height:18px}",0),b.sheet.insertRule(".ytp-ce-size-853 .ytp-ce-playlist-icon, .ytp-ce-size-1280 .ytp-ce-playlist-icon, .ytp-ce-size-1920 .ytp-ce-playlist-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEVMaXGzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7P///9RfzIKAAAAC3RSTlMAvDeyLvxYtDK9Ogx4T1QAAAABYktHRAyBs1FjAAAAK0lEQVQY02NgoBjshgO8HJoYwKiAMGAD92YHJM7uMCTO9gaEHs4FlPuZAQC8Fj8x/xHjxwAAAABJRU5ErkJggg==) no-repeat center;background-size:24px;width:24px;height:24px}",
  0))},GEa=function(a){return a.player.getVideoData().C?"current":a.L?"new":"current"},Y0=function(a){return"creator-endscreen-editor"===a.player.T().playerStyle},HEa=function(a){var b=a.player.getVideoData(),c=b.videoId;
  a.u&&a.u.abort();c={method:"POST",onFinish:function(e){var f=a.u=null;200===e.status&&(e=e.responseText,")]}"===e.substring(0,3)&&(e=e.substring(3),f=JSON.parse(e),f=W0(f,GEa(a))));Z0(a,f)},
  urlParams:{v:c},withCredentials:!0};a.L&&(c.urlParams.ptype="embedded");var d=b.gm;d&&(c.postParams={ad_tracking:d});if(b=g.Oia(b))if(b=g.Lc(b),b=g.Hc(b))a.u=g.Up(b,c)},Z0=function(a,b,c){c=void 0===c?!0:c;
  a.player.Re("creatorendscreen");a.l&&(a.l.dispose(),a.l=null,a.B.dispose(),a.B=null);for(var d=g.q(Object.values(a.i)),e=d.next();!e.done;e=d.next())e.value.dispose();a.i={};a.C={};0<a.J.length&&(a.J.forEach(function(l){l.dispose()}),a.J.length=0);
  a.I=0;if((a.endscreen=b)&&b.elements){c&&IEa(a);c=[];d=new g.AD(b.startMs,0x7ffffffffffff,{id:"ytp-ce-in-endscreen",namespace:"creatorendscreen"});c.push(d);a.player.T().i||(a.l=new g.W({D:"div",K:"ytp-ce-shadow"}),g.XM(a.player,a.l.element,4),a.B=new g.NL(a.l,200));for(d=0;d<b.elements.length;++d){e=b.elements[d];var f=JEa(a,e);if(f){a.i[e.id]=f;a.C[e.id]=e;g.XM(a.player,f.element,4);var h=new g.AD(e.startMs,e.endMs,{id:"ytp-ce-element-"+e.id,namespace:"creatorendscreen"});c.push(h);KEa(a,f,e)}else g.lt(new g.Xr("buildEndscreenElement null",
  e))}a.player.ud(c);a.Za()}},IEa=function(a){var b=g.ku(),c=g.mu();
  c&&b&&a.endscreen.visualElement&&g.Au(c,b,a.endscreen.visualElement)},JEa=function(a,b){var c=null;
  switch(b.type){case "VIDEO":c=a.player.Z("player_endscreen_ellipsis_fix")?["ytp-webkit-ellipsis"]:["yt-ui-ellipsis","yt-ui-ellipsis-2"];c={D:"div",ka:["ytp-ce-element","ytp-ce-video"],U:{tabindex:"0","aria-label":b.cq||"","aria-hidden":"true"},S:[{D:"div",K:"ytp-ce-element-shadow"},{D:"div",K:"ytp-ce-covering-image",U:$0(b)},{D:"div",K:"ytp-ce-covering-shadow-top"},{D:"a",K:"ytp-ce-covering-overlay",U:{href:a1(a,b.targetUrl),tabindex:"-1"},S:[{D:"div",ka:["ytp-ce-video-title"].concat(g.la(c)),U:{dir:g.vn(b.title||
  "")},ba:b.title},{D:"div",K:"ytp-ce-video-duration",ba:b.videoDuration||void 0}]}]};c=new g.W(c);break;case "PLAYLIST":c=a.player.Z("player_endscreen_ellipsis_fix")?["ytp-webkit-ellipsis"]:["yt-ui-ellipsis","yt-ui-ellipsis-2"];c={D:"div",ka:["ytp-ce-element","ytp-ce-playlist"],U:{tabindex:"0","aria-label":b.cq||"","aria-hidden":"true"},S:[{D:"div",K:"ytp-ce-element-shadow"},{D:"div",K:"ytp-ce-covering-image",U:$0(b)},{D:"div",K:"ytp-ce-covering-shadow-top"},{D:"a",K:"ytp-ce-covering-overlay",U:{href:a1(a,
  b.targetUrl),tabindex:"-1"},S:[{D:"div",ka:["ytp-ce-playlist-title"].concat(g.la(c)),U:{dir:g.vn(b.title||"")},ba:b.title},{D:"div",K:"ytp-ce-playlist-count",S:[{D:"div",K:"ytp-ce-playlist-icon"},{D:"div",K:"ytp-ce-playlist-count-text",ba:b.playlistLength||void 0}]}]}]};c=new g.W(c);break;case "CHANNEL":c={D:"div",ka:["ytp-ce-element","ytp-ce-channel",b.isSubscribe?"ytp-ce-channel-this":"ytp-ce-channel-that"],U:{tabindex:"0","aria-label":b.cq||"","aria-hidden":"true"},S:[{D:"div",K:"ytp-ce-element-shadow"},
  {D:"div",K:"ytp-ce-expanding-overlay",S:[{D:"div",K:"ytp-ce-expanding-overlay-hider"},{D:"div",K:"ytp-ce-expanding-overlay-background"},{D:"div",K:"ytp-ce-expanding-overlay-content",S:[{D:"div",K:"ytp-ce-expanding-overlay-body",S:[{D:"div",K:"ytp-ce-expanding-overlay-body-padding",S:[{D:"a",ka:["ytp-ce-channel-title","ytp-ce-link"],U:{href:a1(a,b.targetUrl),target:"_blank",tabindex:"-1",dir:g.vn(b.title||"")},ba:b.title},b.subscribeButton?{D:"div",K:"ytp-ce-subscribe-container",S:[{D:"div",K:"ytp-ce-channel-subscribe"}]}:
  "",b.subscribersText?{D:"div",K:"ytp-ce-channel-subscribers-text",ba:b.subscribersText}:"",b.metadata?{D:"div",ka:["ytp-ce-channel-metadata","yt-ui-ellipsis","yt-ui-ellipsis-3"],ba:b.metadata}:""]}]}]}]},{D:"div",K:"ytp-ce-expanding-image",U:$0(b)}]};c=new g.W(c);var d=g.se(document,"div","ytp-ce-channel-subscribe",c.element)[0];if(b.subscribeButton&&b.channelId){g.N(d,"ytp-ce-subscribe-button");if(a.player.T().i){var e=null;var f=b.Dd.itct}else e="endscreen",f=null;e=new g.hO(b.subscribeButton.subscribeText,
  b.subscribeButton.subscribeCount,b.subscribeButton.unsubscribeText,b.subscribeButton.unsubscribeCount,!!b.subscribeButton.enabled,!!b.subscribeButton.classic,b.channelId,!!b.subscribeButton.subscribed,e,f,b.subscribeButton.signinUrl,a.player);d.appendChild(e.element);a.J.push(e)}break;case "WEBSITE":c={D:"div",ka:["ytp-ce-element","ytp-ce-website"],U:{tabindex:"0","aria-label":b.cq||"","aria-hidden":"true"},S:[{D:"div",K:"ytp-ce-element-shadow"},{D:"div",K:"ytp-ce-expanding-overlay",S:[{D:"div",K:"ytp-ce-expanding-overlay-hider"},
  {D:"div",K:"ytp-ce-expanding-overlay-background"},{D:"div",K:"ytp-ce-expanding-overlay-content",S:[{D:"div",K:"ytp-ce-expanding-overlay-body",S:[{D:"div",K:"ytp-ce-expanding-overlay-body-padding",S:[{D:"div",K:"ytp-ce-website-title",U:{dir:g.vn(b.title||"")},ba:b.title},{D:"div",K:"ytp-ce-website-metadata",ba:b.metadata},{D:"a",ka:["ytp-ce-website-goto","ytp-ce-link"],U:{href:a1(a,b.targetUrl),target:"_blank",tabindex:"-1"},ba:b.callToAction}]}]}]}]},{D:"div",K:"ytp-ce-expanding-image",U:$0(b)},{D:"div",
  K:"ytp-ce-expanding-icon",U:LEa(b.iconUrl)}]};c=new g.W(c);break;case "CREATOR_MERCHANDISE":c="",b.productPrice&&(c={D:"div",K:"ytp-ce-merchandise-price-container",S:[{D:"div",K:"ytp-ce-merchandise-price",ba:b.productPrice}]},b.additionalFeesText&&c.S.push({D:"div",K:"ytp-ce-merchandise-additional-fees",ba:b.additionalFeesText})),c={D:"div",ka:["ytp-ce-element","ytp-ce-merchandise"],U:{tabindex:"0","aria-label":b.cq||"","aria-hidden":"true"},S:[{D:"div",K:"ytp-ce-element-shadow"},{D:"div",K:"ytp-ce-expanding-overlay",
  S:[{D:"div",K:"ytp-ce-expanding-overlay-hider"},{D:"div",K:"ytp-ce-expanding-overlay-background"},{D:"div",K:"ytp-ce-expanding-overlay-content",S:[{D:"div",K:"ytp-ce-expanding-overlay-body",S:[{D:"div",K:"ytp-ce-expanding-overlay-body-padding",S:[{D:"div",K:"ytp-ce-merchandise-title",U:{dir:g.vn(b.title||"")},ba:b.title},c,{D:"div",K:"ytp-ce-merchandise-metadata",ba:b.metadata},{D:"a",ka:["ytp-ce-merchandise-goto","ytp-ce-link"],U:{href:a1(a,b.targetUrl),target:"_blank",tabindex:"-1"},ba:b.callToAction}]}]}]}]},
  {D:"div",K:"ytp-ce-expanding-image",U:$0(b)},{D:"div",K:"ytp-ce-merchandise-invideo-cta-container",S:[{D:"div",K:"ytp-ce-merchandise-invideo-cta",ba:b.callToAction||void 0}]}]},c=new g.W(c)}b.kM&&g.N(c.element,"ytp-ce-placeholder");return c},$0=function(a){if(a.iD)var b=a.iD.thumbnails;
  return LEa(b?b[b.length-1].url:null)},LEa=function(a){return a?{style:"background-image: url("+a+")"}:{}},KEa=function(a,b,c){function d(m){m&&(b.ya("blur",function(){"none"!=m.style.display&&a.W&&m.focus()}),b.N(m,"focus",f),b.N(m,"blur",h))}
  function e(m){a.I+=m;0<a.I?(g.N(b.element,"ytp-ce-force-expand"),b1(a,c.id,!0)):(g.mn(b.element,"ytp-ce-force-expand"),g.mn(b.element,"ytp-ce-element-hover"),b1(a,c.id,!1))}
  function f(){e(1)}
  function h(){e(-1)}
  b.ya("mouseenter",function(){c1(a,b,c)});
  b.ya("mouseleave",function(){d1(a,b,c)});
  a.player.T().i||b.ya("click",function(){g.N(b.element,"ytp-ce-element-hover")});
  b.ya("click",function(m){MEa(a,c,m)});
  b.ya("keypress",function(m){MEa(a,c,m)});
  b.ya("focus",function(){c1(a,b,c)});
  b.ya("blur",function(){d1(a,b,c)});
  b.ya("touchstart",function(){c1(a,b,c)});
  var l=g.ue("ytp-ce-expanding-overlay-hider",b.element);l&&b.N(l,"touchstart",function(m){m=m||window.event;m.cancelBubble=!0;m.stopPropagation&&m.stopPropagation();g.mn(b.element,"ytp-ce-element-hover");g.mn(b.element,"ytp-ce-force-expand")});
  b.ya("keydown",function(m){a.W=9===m.keyCode&&!m.shiftKey});
  d(g.ue("ytp-sb-subscribe",b.element));d(g.ue("ytp-sb-unsubscribe",b.element));b.ya("focus",f);b.ya("blur",h)},MEa=function(a,b,c){if(b.targetUrl&&(!c||"keypress"!==c.type||13===c.keyCode)){for(var d=c.target;d&&!g.kn(d,"ytp-ce-element");){g.kn(d,"subscribe-label")&&e1(a,b);
  if(g.kn(d,"ytp-ce-channel-subscribe"))return;d=g.Oe(d)}if(!d||g.kn(d,"ytp-ce-element-hover")){c.preventDefault();c.stopPropagation();if(d=a.i[b.id])d1(a,d,b),d.element.blur();if(c.ctrlKey||c.metaKey||"new"===b.NQ)e1(a,b),a.player.sendVideoStatsEngageEvent(17,void 0),a.player.pauseVideo(),c=g.Lc(a1(a,b.targetUrl)),c=g.Hc(c),g.KJ(c,void 0,b.Dd);else{var e=a.player.getVideoData().C,f=function(){var h=a1(a,b.targetUrl),l=b.Dd,m=g.Cp(h);e&&m&&(m.v||m.list)?a.player.Ii(m.v,l,m.list,!1):g.JJ(h,l)};
  e1(a,b,function(){a.player.sendVideoStatsEngageEvent(17,f)})}}}},a1=function(a,b){var c=a.player.T();
  if(b){if(b.startsWith("//"))return c.protocol+":"+b;if(b.startsWith("/"))return g.FG(c)+b}else return"";return b},c1=function(a,b,c){g.kn(b.element,"ytp-ce-element-hover")||("VIDEO"===c.type||"PLAYLIST"===c.type?g.N(b.element,"ytp-ce-element-hover"):a.player.T().i?(new g.K(function(){g.N(b.element,"ytp-ce-element-hover")},200)).start():g.N(b.element,"ytp-ce-element-hover"),f1(a,c.aM),b1(a,c.id,!0))},d1=function(a,b,c){g.mn(b.element,"ytp-ce-element-hover");
  g.mn(b.element,"ytp-ce-force-expand");b1(a,c.id,!1)},b1=function(a,b,c){a.l&&(c?a.B.show():a.B.hide());
  for(var d=g.q(Object.keys(a.i)),e=d.next();!e.done;e=d.next())e=e.value,e!==b&&g.O(a.i[e].element,"ytp-ce-element-shadow-show",c)},f1=function(a,b,c){function d(){f||(e++,e===b.length&&(h.stop(),c&&c()))}
  if(!b||0===b.length||Y0(a))c&&c();else{b=NEa(a,b);var e=0,f=!1,h=new g.K(function(){f=!0;c&&c()},1E3,a);
  h.start();for(a=0;a<b.length;a++)g.qq(b[a],d)}},e1=function(a,b,c){f1(a,b.clickUrls,c);
  (a=g.mu())&&b.hM&&g.Du(a,b.visualElement)},NEa=function(a,b){var c=a.player.getVideoData().clientPlaybackNonce,d=a.player.getCurrentTime().toFixed(2);
  c={CPN:c,AD_CPN:c,MT:d};d=[];for(var e=0;e<b.length;e++)d.push(a.Kz(b[e],c));return d},OEa=function(a){return Array.isArray(a)&&a.length?a[0]:a},g1=function(a){return"string"===typeof a?a:""},h1=function(a,b,c){for(var d in b)if(b[d]===a)return a;
  return c},PEa=function(a){this.externalId=a},QEa=function(a,b,c,d){this.value=a;
  this.target=b;this.showLinkIcon=c;this.i=d},i1=function(a){return a.value?a.value:null},j1=function(a){if(!a)return null;
  var b=g.Lc(g1(a.value));b=g.Hc(b);if(!b)return null;var c=h1(a.target,REa,"current");if(null==c)a=null;else{var d=a.show_link_icon;a=new QEa(b,c,"true"===d||"false"===d?"true"===d:!0,null!=a.pause_on_navigation?a.pause_on_navigation:!0)}return a},SEa=function(a,b,c,d){this.type=a;
  this.trigger=b;this.url=c;this.subscribeData=d},VEa=function(a){if(!a)return null;
  var b=h1(a.type,TEa),c=h1(a.trigger,UEa),d=OEa(a.url);d=j1(d?d:null);a=OEa(a.subscribeData);var e=a?a:null;e?(a=g1(e.external_user_id),e=g1(e.subscription_token),a=a&&e?new PEa(a):null):a=null;return b?new SEa(b,c,d,a):null},WEa=function(a,b,c,d,e){this.id=a;
  this.type=b;this.style=c;this.data=e;this.action=d||[]},YEa=function(a){return(a=XEa(a,function(b){return"openUrl"===b.type&&null!=b.url}))?a.url:null},XEa=function(a,b){return g.cb(a.action,b,void 0)},ZEa=function(a,b){this.context=a;
  this.i=b},l1=function(a){return a.customMessage?k1("div","iv-card-message",a.customMessage):""},m1=function(a,b){var c="background-image: url("+a+");",d=[];
  b&&d.push(b);return{D:"div",K:"iv-card-image",U:{style:c},S:d}},n1=function(a){if(!a.metaInfo||0===a.metaInfo.length)return"";
  var b=[];a=g.q(a.metaInfo);for(var c=a.next();!c.done;c=a.next())b.push(k1("li","",c.value));return{D:"ul",K:"iv-card-meta-info",S:b}},k1=function(a,b,c){b?"string"===typeof b?b={"class":b}:Array.isArray(b)&&(b={"class":b.join(" ")}):b={};
  b.dir=g.vn(c);return{D:a,U:b,ba:c}},$Ea=function(a){if(!a.customMessage)return"";
  var b=["iv-card-action","iv-card-primary-link"],c={};a.ct&&(b.push("iv-card-action-icon"),c.style="background-image: url("+a.ct+");");c.dir=g.vn(a.customMessage);var d=[{D:"span",ba:a.customMessage}];a.showLinkIcon&&(d.push("\u00a0"),d.push({D:"span",K:"iv-card-link-icon"}));return{D:"div",ka:b,U:c,S:d}},o1=function(a,b,c,d){if(d){b=g.q(b);
  for(var e=b.next();!e.done;e=b.next())a.i(e.value,d,c.id,c.Dd,c.tracking.click,5)}},aFa=function(a,b){this.merchant=a;
  this.price=b},bFa=function(a){var b;
  (b=a)&&!(b=1<a.length?"/"===a.charAt(0)&&"/"!==a.charAt(1):"/"===a)&&(b=a.replace(/^(https?:)?\/\//,""),b=b.split("/",1),b=!b||1>b.length||!b[0]?[]:b[0].toLowerCase().split(".").reverse(),b="com"===b[0]&&"youtube"===b[1]||"be"===b[0]&&"youtu"===b[1]);return b?-1===a.indexOf("/redirect?"):!1},cFa=function(a,b){return b?b:bFa(a)?"current":"new"},p1=function(a,b){g.E.call(this);
  var c=this;this.element=a;this.context=b;this.Ma=!1;this.za=new Map;this.Da=new Map;this.context.G.addEventListener(g.DD("annotations_module"),function(d){(d=c.za.get(d))&&d.apply(c)});
  this.context.G.addEventListener(g.ED("annotations_module"),function(d){(d=c.Da.get(d))&&d.apply(c)})},q1=function(a,b,c,d,e,f,h){a.context.i.ya(b,"click",function(l){a.uw(c,d,e,f||[],h||0,l)});
  a.context.i.ya(b,"touchstart",function(){a.Ma=!1});
  a.context.i.ya(b,"touchmove",function(){a.Ma=!0})},dFa=function(a){if(a.urlEndpoint&&a.urlEndpoint.url)return a.urlEndpoint.url;
  if(a.watchEndpoint&&a.watchEndpoint.videoId){var b="/watch?v="+a.watchEndpoint.videoId;a.watchEndpoint.playlistId&&(b+="&list="+a.watchEndpoint.playlistId);a.watchEndpoint.index&&(b+="&index="+a.watchEndpoint.index);a.watchEndpoint.startTimeSeconds&&(b+="&t="+a.watchEndpoint.startTimeSeconds);return b}return null},r1=function(a,b,c){return{eE:(a.impressionLoggingUrlsV2s||[]).map(function(d){return d.baseUrl||""}),
  click:(c.loggingUrls||[]).map(function(d){return d.baseUrl||""}),
  close:(b.dismissLoggingUrlsV2s||[]).map(function(d){return d.baseUrl||""}),
  nH:(b.impressionLoggingUrlsV2s||[]).map(function(d){return d.baseUrl||""}),
  qv:(b.clickLoggingUrlsV2s||[]).map(function(d){return d.baseUrl||""})}},u1=function(a,b,c){p1.call(this,b,c);
  var d=this;this.G=a;this.eventId=null;this.la=this.Ya=this.u=this.ce=!1;this.ca=null;this.cards=[];this.Pa=this.L=this.ga=this.C=this.ma=this.i=null;this.X=[];this.J=this.Vd=this.ia=null;this.I=0;this.ea=new g.K(g.Ia,c.B.sd?4E3:3E3);g.J(this,this.ea);this.Ha=new g.K(g.Ia);g.J(this,this.Ha);this.Y=new ZEa(c,function(e,f,h,l,m,n){q1(d,e,f,h,l,m,n)});
  this.W=new g.W({D:"div",K:"iv-drawer",U:{id:"iv-drawer"},S:[{D:"div",K:"iv-drawer-header",U:{"aria-role":"heading"},S:[{D:"span",K:"iv-drawer-header-text"},{D:"button",ka:["iv-drawer-close-button","ytp-button"],U:{"aria-label":"Hide cards",tabindex:"0"}}]},{D:"div",K:"iv-drawer-content"}]});g.J(this,this.W);this.B=this.W.element;this.Ja=new g.NL(this.W,330);g.J(this,this.Ja);this.Va=g.ue("iv-drawer-header-text",this.B);this.l=g.ue("iv-drawer-content",this.B);this.addCueRange(0,1E3*c.videoData.lengthSeconds,
  "",function(){d.Ya&&s1(d,"YOUTUBE_DRAWER_AUTO_OPEN")},function(){(d.Ya=d.u)&&t1(d)})},eFa=function(a,b){var c=b.data;
  c.autoOpenMs&&a.addCueRange(c.autoOpenMs,0x8000000000000,"",function(){s1(a,"YOUTUBE_DRAWER_AUTO_OPEN")});
  c.autoCloseMs&&a.addCueRange(c.autoCloseMs,0x8000000000000,"",function(){t1(a)});
  var d=c.headerText;g.Qe(a.Va,d);a.L&&a.L.setAttribute("title",d);c.eventId&&(a.eventId=c.eventId);a.ia=g.gu(c.trackingParams);a.J=g.gu(c.closeTrackingParams);a.Vd=g.gu(c.iconTrackingParams)},fFa=function(a,b){var c=b.cardId?b.cardId:"cr:"+a.I;
  if(b.content.simpleCardContentRenderer){if(!b.cueRanges.length)return;var d=b.content.simpleCardContentRenderer,e=b.teaser.simpleCardTeaserRenderer,f=b.icon?b.icon.infoCardIconRenderer:null;c={id:c,timestamp:a.I,type:"simple",teaserText:g.KD(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,Dd:v1(a,c,b,d),sponsored:!1,tracking:r1(d,e,d.command),Sj:d.trackingParams?g.gu(d.trackingParams):null,Hh:e.trackingParams?
  g.gu(e.trackingParams):null,Vd:f&&f.trackingParams?g.gu(f.trackingParams):null,imageUrl:w1(d.image.thumbnails,290).url,displayDomain:d.displayDomain?g.KD(d.displayDomain):null,showLinkIcon:!!d.showLinkIcon,ct:null,title:d.title?g.KD(d.title):"",customMessage:d.callToAction?g.KD(d.callToAction):"",url:d.command.urlEndpoint.url?j1({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:d.command.urlEndpoint.url}):null};x1(a,c)}else if(b.content.collaboratorInfoCardContentRenderer){if(!b.cueRanges.length)return;
  d=b.content.collaboratorInfoCardContentRenderer;e=b.teaser.simpleCardTeaserRenderer;f=b.icon?b.icon.infoCardIconRenderer:null;c={id:c,timestamp:a.I,type:"collaborator",teaserText:g.KD(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,Dd:v1(a,c,b,d),sponsored:!1,tracking:r1(d,e,d.endpoint),Sj:d.trackingParams?g.gu(d.trackingParams):null,Hh:e.trackingParams?g.gu(e.trackingParams):null,Vd:f&&f.trackingParams?g.gu(f.trackingParams):
  null,channelId:d.endpoint.browseEndpoint.browseId,customMessage:d.customText?g.KD(d.customText):null,tG:w1(d.channelAvatar.thumbnails,290).url,title:d.channelName?g.KD(d.channelName):"",metaInfo:[d.subscriberCountText?g.KD(d.subscriberCountText):""],url:j1({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:d.endpoint.browseEndpoint.canonicalBaseUrl?d.endpoint.browseEndpoint.canonicalBaseUrl:"/channel/"+d.endpoint.browseEndpoint.browseId})};x1(a,c)}else if(b.content.playlistInfoCardContentRenderer){if(!b.cueRanges.length)return;
  d=b.content.playlistInfoCardContentRenderer;e=b.teaser.simpleCardTeaserRenderer;f=b.icon?b.icon.infoCardIconRenderer:null;c={id:c,timestamp:a.I,type:"playlist",teaserText:g.KD(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,Dd:v1(a,c,b,d),sponsored:!1,tracking:r1(d,e,d.action),Sj:d.trackingParams?g.gu(d.trackingParams):null,Hh:e.trackingParams?g.gu(e.trackingParams):null,Vd:f&&f.trackingParams?g.gu(f.trackingParams):
  null,us:w1(d.playlistThumbnail.thumbnails,258).url,customMessage:d.customMessage?g.KD(d.customMessage):null,playlistVideoCount:g.KD(d.playlistVideoCount),title:d.playlistTitle?g.KD(d.playlistTitle):"",metaInfo:[d.channelName?g.KD(d.channelName):"",d.videoCountText?g.KD(d.videoCountText):""],url:j1({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:dFa(d.action)})};x1(a,c)}else if(b.content.videoInfoCardContentRenderer){if(!b.cueRanges.length)return;d=b.content.videoInfoCardContentRenderer;
  e=b.teaser.simpleCardTeaserRenderer;f=b.icon?b.icon.infoCardIconRenderer:null;c={id:c,timestamp:a.I,type:"video",teaserText:g.KD(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,Dd:v1(a,c,b,d),sponsored:!1,tracking:r1(d,e,d.action),Sj:d.trackingParams?g.gu(d.trackingParams):null,Hh:e.trackingParams?g.gu(e.trackingParams):null,Vd:f&&f.trackingParams?g.gu(f.trackingParams):null,us:w1(d.videoThumbnail.thumbnails,
  258).url,videoDuration:d.lengthString?g.KD(d.lengthString):null,customMessage:d.customMessage?g.KD(d.customMessage):null,title:d.videoTitle?g.KD(d.videoTitle):"",metaInfo:[d.channelName?g.KD(d.channelName):"",d.viewCountText?g.KD(d.viewCountText):""],isLiveNow:!!d.badge,url:j1({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:dFa(d.action)})};x1(a,c)}a.I++},w1=function(a,b){for(var c=-1,d=-1,e=0;e<a.length;e++){if(a[e].height===b||290===a[e].width)return a[e];
  ((a[e].height||0)<b||290>(a[e].width||0))&&(0>c||(a[c].height||0)<(a[e].height||0)||(a[c].width||0)<(a[e].width||0))?c=e:((a[e].height||0)>=b||290<=(a[e].width||0))&&(0>d||(a[d].height||0)>(a[e].height||0)||(a[d].width||0)>(a[e].width||0))&&(d=e)}return a[0<=d?d:c]},v1=function(a,b,c,d){return{feature:c.feature?c.feature:"cards",
  src_vid:a.context.videoData.videoId,annotation_id:b,ei:a.context.videoData.eventId||"",itct:d.trackingParams||""}},hFa=function(a,b){var c=gFa(a,b);
  c&&(c===a.i&&(a.i=null),a.G.removeCueRange(c.card.id),g.Me(c.ix),g.kb(a.cards,c),a.ht(),y1(a))},s1=function(a,b,c){if(!a.u){a.Ja.show();
  a.ma=new g.K(function(){g.N(a.context.G.getRootNode(),g.VS.IV_DRAWER_OPEN)},0);
  a.ma.start();a.ca=g.Xo(a.l,"mousewheel",function(h){a.ea.start();h.preventDefault();h=h||window.event;var l=0;"MozMousePixelScroll"==h.type?l=0==(h.axis==h.HORIZONTAL_AXIS)?h.detail:0:window.opera?l=h.detail:l=0==h.wheelDelta%120?"WebkitTransform"in document.documentElement.style?window.chrome&&0==navigator.platform.indexOf("Mac")?h.wheelDeltaY/-30:h.wheelDeltaY/-1.2:h.wheelDelta/-1.6:h.wheelDeltaY/-3;if(h=l)a.l.scrollTop+=h});
  a.u=!0;var d=g.mu();d&&a.ia&&a.J&&g.Bu(d,[a.ia,a.J]);b={TRIGGER_TYPE:b};for(var e=g.q(a.cards),f=e.next();!f.done;f=e.next())f=f.value,f.IE||(f.IE=!0,iFa(a.context.logger,f.card.tracking.eE,b)),d&&g.Bu(d,[f.card.Sj]);L0(a.G);c&&(a.C=new g.K(function(){a.ga=a.L;a.Pa.focus()},330),a.C.start())}},t1=function(a){a.u&&(a.Ja.hide(),g.Yo(a.ca),a.ca=null,g.mn(a.context.G.getRootNode(),g.VS.IV_DRAWER_OPEN),a.u=!1,L0(a.G),a.C&&a.C.stop(),a.C=new g.K(function(){a.ga&&(a.ga.focus(),a.ga=null)},330),a.C.start())},
  kFa=function(a){g.ln(a.element,[g.VS.STOP_EVENT_PROPAGATION,
  "iv-drawer-manager"]);g.XM(a.G,a.B,5);jFa(a);a.L=g.ue("ytp-cards-button",a.G.getRootNode());a.Pa=g.ue("iv-drawer-close-button",a.B);a.ce=!0},jFa=function(a){var b=g.ue("iv-drawer-close-button",a.B);
  a.context.i.ya(b,"click",a.RK,a);a.context.i.ya(a.l,"touchend",function(){a.ea.start()});
  a.context.i.ya(a.l,"scroll",a.cL,a);a.context.l.subscribe("onHideControls",function(){a.la=!0});
  a.context.l.subscribe("onShowControls",function(){a.la=!1});
  a.context.l.subscribe("onVideoAreaChange",function(){a.la=g.kn(a.G.getRootNode(),"ytp-autohide")});
  a.X.push(g.Co("iv-button-shown",a.pM,a));a.X.push(g.Co("iv-button-hidden",a.oM,a));a.X.push(g.Co("iv-teaser-shown",a.tJ,a));a.X.push(g.Co("iv-teaser-hidden",a.rM,a));a.X.push(g.Co("iv-teaser-clicked",a.sJ,a))},x1=function(a,b){a.ce||kFa(a);
  hFa(a,b.id);var c=lFa(a,b);if(c){var d={card:b,ix:c.element,IE:!1},e=mFa(a,d);g.rb(a.cards,e,0,d);c.fa(a.l,e);a.ht();b.autoOpen?a.addCueRange(b.startMs,0x8000000000000,b.id,function(){a.u||(a.i=d,y1(a),nFa(a,d),s1(a,"YOUTUBE_DRAWER_AUTO_OPEN",!1))}):(c=1E3*a.context.G.getCurrentTime(),5E3>c&&c>b.startMs&&oFa(a,d),a.addCueRange(b.startMs,b.startMs+1,b.id,function(){oFa(a,d)}),y1(a))}},lFa=function(a,b){switch(b.type){case "simple":var c=a.Y;
  var d=b.displayDomain?{D:"div",K:"iv-card-image-text",ba:b.displayDomain}:void 0;var e=$Ea(b);d={D:"div",ka:["iv-card"],S:[{D:"a",K:"iv-click-target",U:{href:b.url?i1(b.url)||"":""},S:[m1(b.imageUrl,d),{D:"div",K:"iv-card-content",S:[k1("h2",void 0,b.title),e]}]}]};d=new g.W(d);o1(c,g.te("iv-click-target",d.element),b,b.url);return d;case "collaborator":return c=a.Y,d={D:"div",ka:["iv-card","iv-card-channel"],S:[{D:"a",ka:["iv-click-target"],U:{href:i1(b.url)||"","data-ytid":b.channelId},S:[m1(b.tG),
  {D:"div",K:"iv-card-content",S:[l1(b),{D:"h2",K:"iv-card-primary-link",ba:b.title},n1(b)]}]}]},d=new g.W(d),o1(c,g.te("iv-click-target",d.element),b,b.url),d;case "playlist":return c=a.Y,d={D:"div",ka:["iv-card","iv-card-playlist"],S:[{D:"a",K:"iv-click-target",U:{href:i1(b.url)||""},S:[m1(b.us,{D:"div",K:"iv-card-image-overlay",S:[{D:"span",K:"iv-card-playlist-video-count",ba:b.playlistVideoCount}]}),{D:"div",K:"iv-card-content",S:[l1(b),k1("h2","iv-card-primary-link",b.title),n1(b)]}]}]},d=new g.W(d),
  o1(c,g.te("iv-click-target",d.element),b,b.url),d;case "productListing":c=a.Y;var f=!g.gb(b.offers);d=["iv-card"];e="";var h=$Ea(b);f&&(d.push("iv-card-product-listing"),e="iv-card-primary-link",h=b.offers[0],f=[],h.price&&f.push({D:"div",K:"iv-card-offer-price",ba:h.price}),h.merchant&&f.push({D:"div",K:"iv-card-offer-merchant",ba:h.merchant}),h={D:"div",S:f});f=b.url?i1(b.url)||"":"";d={D:"div",ka:d,U:{tabindex:"0"},S:[{D:"a",ka:["iv-card-image","iv-click-target"],U:{style:"background-image: url("+
  b.imageUrl+");",href:f,"aria-hidden":"true",tabindex:"-1"}},{D:"div",K:"iv-card-content",S:[b.sponsored?{D:"div",K:"iv-card-sponsored",S:["Sponsored",{D:"div",K:"iv-ad-info-container",S:[{D:"div",K:"iv-ad-info",ba:"{{adInfo}}"},{D:"div",K:"iv-ad-info-icon-container",S:[{D:"div",K:"iv-ad-info-icon"},{D:"div",K:"iv-ad-info-callout"}]}]}]}:"",{D:"a",K:"iv-click-target",U:{href:f},S:[k1("h2",e,b.title),h]}]}]};d=new g.W(d);e=g.Ie("span");g.Qe(e,"You are seeing this product because we think it is relevant to the video. Google may be compensated by the merchant.");
  d.Fc(e,"adInfo");o1(c,g.te("iv-click-target",d.element),b,b.url);return d;case "video":return c=a.Y,e=b.videoDuration?{D:"span",K:"iv-card-video-duration",ba:b.videoDuration}:void 0,h=b.isLiveNow?{D:"span",ka:["yt-badge","yt-badge-live"],ba:"LIVE NOW"}:null,e={D:"div",ka:["iv-card","iv-card-video"],S:[{D:"a",K:"iv-click-target",U:{href:(null===(d=b.url)||void 0===d?void 0:i1(d))||""},S:[m1(b.us,e),{D:"div",K:"iv-card-content",S:[l1(b),k1("h2","iv-card-primary-link",b.title),n1(b),h]}]}]},d=new g.W(e),
  o1(c,g.te("iv-click-target",d.element),b,b.url),d;default:return null}},mFa=function(a,b){if(0===a.cards.length)return 0;
  var c=g.db(a.cards,function(d){return b.card.startMs>d.card.startMs||b.card.startMs===d.card.startMs&&b.card.timestamp>=d.card.timestamp?!0:!1});
  return-1===c?0:c+1},pFa=function(a){return a.i?"productListing"===a.i.card.type:g.fh(a.cards,function(b){return"productListing"===b.card.type})},y1=function(a){g.O(a.G.getRootNode(),"ytp-cards-shopping-active",pFa(a))},oFa=function(a,b){if(!g.kn(a.G.getRootNode(),"ytp-cards-teaser-shown")){if(a.i!==b){var c=g.mu(),d=a.i?a.i.card.Vd:a.Vd;
  c&&d&&g.Cu(c,[d]);a.i=b;y1(a)}if(c="none"!=a.element.style.display)g.T(a.context.G.T().experiments,"html5_enable_single_video_vod_ivar_on_pacf")||2!==a.context.G.getPresentingPlayerType()?(c=a.context.G.getPlayerState(),d=0===c&&0===a.context.G.getCurrentTime(),c=1===c||3===c||d):c=1===a.context.G.getAdState();c&&b.card.teaserDurationMs&&a.G.rp(!0,{teaserText:b.card.teaserText,durationMs:b.card.teaserDurationMs});a.Ha.isActive()||((!a.u||!a.ea.isActive()&&a.la)&&nFa(a,b),a.Ha.start(910+b.card.teaserDurationMs))}},
  nFa=function(a,b){if(a.W.ab){var c=new Q0([0,
  a.l.scrollTop],[0,b.ix.offsetTop],600,zEa);a.context.u.ya(c,"animate",function(d){a.l.scrollTop=d.y});
  a.context.u.ya(c,"finish",function(d){a.l.scrollTop=d.y});
  c.play()}else g.$K(a.W,!0),a.l.scrollTop=b.ix.offsetTop,g.$K(a.W,!1)},z1=function(a){return a.i&&a.i.card?a.i.card:a.cards[0]&&a.cards[0].card?a.cards[0].card:null},gFa=function(a,b){return g.cb(a.cards,function(c){return c.card.id===b})},A1=function(a,b,c){p1.call(this,a,b);
  this.annotation=c;this.isActive=!1},qFa=function(a){var b=a.annotation.data;
  "start_ms"in b&&"end_ms"in b&&a.addCueRange(b.start_ms,b.end_ms,a.annotation.id,function(){a.show()},function(){a.hide()})},B1=function(a,b,c){A1.call(this,a,b,c);
  this.l=null;this.J=!1;this.u=null;this.B=!1;this.i=this.I=this.C=null},rFa=function(a,b){var c=void 0===c?0:c;
  var d=xEa(b).width;g.ug(b,d);c=new S0(b,[d,b.offsetTop],[d-d-c,b.offsetTop],200,yEa);g.J(a,c);a.context.u.ya(c,"begin",function(){g.Fg(b,!0)});
  c.play()},uFa=function(a,b){if(b.channel_name){var c=a.createElement({D:"div",
  ka:["iv-branding-context-name"],ba:b.channel_name}),d=a.createElement({D:"div",ka:["iv-branding-context-subscribe"]}),e=b.standalone_subscribe_button_data;e&&(a.i=new g.hO(e.subscribeText,e.subscribeCount,e.unsubscribeText,e.unsubscribeCount,!!e.enabled,!!e.classic,b.channel_id,!!e.subscribed,e.feature,b.session_data.itct,e.signinUrl,a.context.G),a.i.fa(d));var f=a.createElement({D:"div",ka:["iv-branding-context-subscribe-caret"]}),h=a.createElement({D:"div",ka:["branding-context-container-inner"]});
  h.appendChild(f);h.appendChild(c);h.appendChild(d);g.Fg(h,!1);var l=a.createElement({D:"div",ka:["branding-context-container-outer"]});l.appendChild(h);g.mg(l,"right",b.image_width+"px");a.element.appendChild(l);a.u=new g.K(function(){sFa(a,h,l)},500);
  g.J(a,a.u);a.context.i.ya(a.element,"mouseover",function(){tFa(a,h,l,f,b.image_height)});
  a.context.i.ya(a.element,"mouseout",function(){a.u.start()})}},tFa=function(a,b,c,d,e){a.u.stop();
  if(!a.B){var f=g.Cg(b);a.i||(b.style.width=g.tg(f.width,!0),c.style.width=g.tg(f.width,!0));g.mg(d,"top",f.height-Math.max(Math.min(f.height,e)/2+10,20)+"px");g.mg(d,"right","1px");a.B=!0;g.Fg(b,!0);a.C=new g.K(function(){g.N(this.element,"iv-branding-active")},0,a);
  a.C.start()}},sFa=function(a,b,c){g.mn(a.element,"iv-branding-active");
  a.I=new g.K(function(){g.Fg(b,!1);a.i||(c.style.width=g.tg(0,!0))},250);
  a.I.start();a.B=!1},vFa=function(a,b,c,d,e,f,h){this.i=a;
  this.u=b;this.B=c;this.videoData=d;this.logger=e;this.G=f;this.l=h},C1=function(a,b,c){A1.call(this,a,b,c);
  var d=this;this.L=this.isCollapsed=this.W=!1;this.I=5E3;this.l=this.u=this.i=this.B=null;this.J=this.createElement({D:"div",ka:["iv-promo-contents"]});this.C=new g.K(function(){d.i.setAttribute("aria-hidden","true");g.Fg(d.u,!1);g.Fg(d.l,!0)},700,this);
  g.J(this,this.C)},wFa=function(a){var b=a.annotation.data;
  if("cta"===a.annotation.style)var c=6;else if("video"===a.annotation.style||"playlist"===a.annotation.style)c=7;a.I=b.collapsedelay_ms||a.I;var d=["iv-promo","iv-promo-inactive"];a.element.setAttribute("aria-hidden","true");a.element.setAttribute("aria-label","Promotion");a.element.tabIndex=0;var e=YEa(a.annotation),f=b.image_url;if(f){var h=a.createElement({D:"div",ka:["iv-promo-img","iv-click-target"]});f=a.createElement({D:"img",U:{src:f,"aria-hidden":"true"}});h.appendChild(f);b.video_duration&&
  !b.is_live?(f=a.createElement({D:"span",K:"iv-promo-video-duration",ba:b.video_duration}),h.appendChild(f)):b.playlist_length&&(f=a.createElement({D:"span",K:"iv-promo-playlist-length",ba:b.playlist_length.toString()}),h.appendChild(f));e&&q1(a,h,e,a.annotation.id,b.session_data,void 0,c)}e?(f=a.createElement({D:"a",K:"iv-promo-txt"}),g.md(f,i1(e)),a.i=f):a.i=a.createElement({D:"div",K:"iv-promo-txt"});switch(a.annotation.style){case "cta":case "website":var l=a.createElement({D:"p",S:[{D:"strong",
  ba:b.text_line_1}]});var m=a.createElement({D:"p",S:[{D:"span",K:"iv-promo-link",ba:b.text_line_2}]});if(f=b.text_line_3){d.push("iv-promo-website-card-cta-redesign");var n=a.createElement({D:"button",ka:["iv-promo-round-expand-icon","ytp-button"]});f=a.createElement({D:"button",ka:["iv-button","iv-promo-button"],S:[{D:"span",K:"iv-button-content",ba:f}]});var p=a.createElement({D:"div",K:"iv-promo-button-container"});p.appendChild(f);e&&q1(a,a.element,e,a.annotation.id,b.session_data,void 0,c)}g.N(a.i,
  "iv-click-target");e&&q1(a,a.i,e,a.annotation.id,b.session_data,void 0,c);break;case "playlist":case "video":l=a.createElement({D:"p",S:[{D:"span",ba:b.text_line_1}]}),m=a.createElement({D:"p",S:[{D:"strong",ba:b.text_line_2}]}),b.is_live&&(l=m,m=a.createElement({D:"span",ka:["yt-badge","iv-promo-badge-live"],ba:"LIVE NOW"})),g.N(a.i,"iv-click-target"),e&&q1(a,a.i,e,a.annotation.id,b.session_data,void 0,c),d.push("iv-promo-video")}l&&a.i.appendChild(l);m&&a.i.appendChild(m);a.J.appendChild(a.i);p&&
  a.J.appendChild(p);c=a.createElement({D:"div",K:"iv-promo-actions"});a.l=a.createElement({D:"button",ka:["iv-promo-expand","ytp-button"]});a.l.title="Expand";a.context.i.ya(a.l,"click",function(r){D1(a,5E3,r)});
  c.appendChild(a.l);g.Fg(a.l,!1);a.context.i.ya(a.element,"mouseover",a.JL,a);a.context.i.ya(a.element,"mouseout",a.IL,a);a.context.i.ya(a.element,"touchend",function(r){D1(a,5E3,r)});
  a.u=a.createElement({D:"button",ka:["iv-promo-close","ytp-button"]});a.u.title="Close";a.context.i.ya(a.u,"click","cta"===a.annotation.style&&b.text_line_3?a.DL:a.CL,a);c.appendChild(a.u);g.ln(a.element,d);h&&(a.element.appendChild(h),n&&h.appendChild(n));a.element.appendChild(a.J);a.element.appendChild(c)},D1=function(a,b,c){c.stopPropagation();
  xFa(a);yFa(a,b);a.i.focus()},zFa=function(a){a.isCollapsed||a.L||a.B||(g.N(a.element,"iv-promo-collapsed"),a.isCollapsed=!0,a.C.start())},xFa=function(a){a.C.stop();
  a.isCollapsed&&(g.nn(a.element,["iv-promo-collapsed","iv-promo-collapsed-no-delay"]),a.isCollapsed=!1,a.i&&a.i.removeAttribute("aria-hidden"),g.Fg(a.l,!1),g.Fg(a.u,!0))},yFa=function(a,b){a.B||(a.B=g.Gm(function(){E1(this);
  zFa(this)},b,a))},E1=function(a){a.B&&(g.A.clearTimeout(a.B),a.B=null)},AFa=function(a){this.G=a},iFa=function(a,b,c){b&&(c?F1(a,b.map(function(d){return g.$m(d,c)})):F1(a,b))},F1=function(a,b,c,d){var e=1,f=void 0,h=-1;
  if(c){var l=!1;f=function(){e--;e||l||(clearTimeout(h),l=!0,c())};
  h=setTimeout(function(){l=!0;c()},1E3)}b=g.q(b||[]);
  for(var m=b.next();!m.done;m=b.next())m=m.value,e++,g.qq(m,f);d&&(e++,0!==d&&a.G.sendVideoStatsEngageEvent(d,f))},G1=function(a){g.gN.call(this,a);
  var b=this;this.W=!1;this.loadNumber=0;this.J={};this.logger=new AFa(this.player);this.C=new g.ZM(this);this.I=this.u=null;this.events=new g.ZM(this);this.L=this.i=null;this.X=[];g.J(this,this.C);this.C.N(this.player,"onVideoAreaChange",function(){b.V("onVideoAreaChange")});
  this.C.N(this.player,"onHideControls",function(){b.V("onHideControls")});
  this.C.N(this.player,"onShowControls",function(){b.V("onShowControls")});
  this.C.N(this.player,"resize",function(d){b.V("resize",d)});
  this.C.N(this.player,"presentingplayerstatechange",function(d){b.V("presentingplayerstatechange",d)});
  this.subscribe("presentingplayerstatechange",this.uJ,this);this.subscribe("resize",this.Ku,this);this.player.T().L.subscribe("vast_info_card_add",this.gG,this);g.J(this,this.events);this.Y=this.createElement({D:"div",K:"video-custom-annotations"});this.l=new g.W({D:"div",ka:["ytp-player-content","ytp-iv-player-content"]});g.J(this,this.l);g.XM(this.player,this.l.element,4);this.l.hide();this.B=new g.W({D:"div",ka:["ytp-iv-video-content"]});g.J(this,this.B);a=this.createElement({D:"div",K:"video-annotations"});
  a.appendChild(this.Y);this.B.element.appendChild(a);this.Jn()&&this.load();var c=this.createElement({D:"style"});(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(c);g.Gi(this,function(){g.Me(c)});
  if(a=c.sheet)a.insertRule(".iv-promo .iv-promo-contents .iv-promo-txt .iv-promo-link:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUBAMAAAB/pwA+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAHlBMVEVMaXH////////////////////////////////////Z6AnKAAAACXRSTlMA+/A2IuI1mJIldm0CAAAAAWJLR0QB/wIt3gAAAEVJREFUCNdjYGCYCQUMBJlACOIzIDElIcyZkwxgojOVWWDMSQauMKYySySUOSnBdSaUOZ0lEsac2YqwYiZ+JhwgM7E5HACgzVCI/YJ59AAAAABJRU5ErkJggg==) no-repeat center;background-size:10px;width:10px;height:10px}",
  0),a.insertRule(".iv-promo .iv-promo-actions .iv-promo-close:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEVMaXH///////////////////////////////////////////9tKdXLAAAAC3RSTlMAVaQDpaimqQbl5rjXUFUAAAABYktHRAH/Ai3eAAAAPUlEQVQI12MQMmAwEmDwDmaOTmAw39663YCBuXp2MQMDQ+fOBgYG5ujVwQwMptvbgeLaxczVCQwiBgxmAgBkXg1FN5iwiAAAAABJRU5ErkJggg==) no-repeat center;background-size:9px;width:9px;height:9px}",
  0),a.insertRule(".iv-promo .iv-promo-actions .iv-promo-expand:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAJBAMAAADnQZCTAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEVMaXHMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMz////eMKB4AAAAC3RSTlMAOpE7k5Uvj5kpfRaQSaQAAAABYktHRAsf18TAAAAAHklEQVQI12MQYGBQZmBwTWCo0GSo6AKRQDZQRIABADXXA/UkIpvtAAAAAElFTkSuQmCC) no-repeat center;background-size:4px 9px;width:4px;height:9px}",0),a.insertRule(".iv-promo-website-card-cta-redesign .iv-promo-round-expand-icon:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfgCgUUEztsNfqrAAAAXklEQVRYw+3Uuw2AQAwEUUNXfBpDIvBRMhQwJJAScNrA0r4CdiQHjjAzK4NGKucPAFmCnZcmwcTphBNO9CTGH4VB+/Zm6YlYis9fhedXz38FNvFriCCl808iw8ysrBu65gCeuV/CfgAAAABJRU5ErkJggg==) no-repeat center;background-size:18px 18px;width:18px;height:18px}",
  0),a.insertRule(".iv-card-link-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASBAMAAACk4JNkAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEVMaXG7u7u7u7u7u7u7u7u7u7u7u7v///+WKTAlAAAABnRSTlMAFdQWbGj9GiOuAAAAAWJLR0QHFmGI6wAAAEhJREFUCNdjYACBNCBgQGMxMKrBWEJJaRAJRjVlKEsoSQDIAqtSZICwgEIQFkgIZBRECMxiBqsCsVjAqsCygQwwFgMeFgQgswBg2xjLrfC4mgAAAABJRU5ErkJggg==) no-repeat center;background-size:9px;width:9px;height:9px}",0),a.insertRule(".iv-card-playlist-video-count:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEVMaXH///////////////////////////////////////////9tKdXLAAAAC3RSTlMAvDeyLvxYtDK9Ogx4T1QAAAABYktHRAH/Ai3eAAAAK0lEQVQY02NgoBjshgO8HJoYwKiAMGAD92YHJM7uMCTO9gaEHs4FlPuZAQC8Fj8x/xHjxwAAAABJRU5ErkJggg==) no-repeat center;background-size:24px;width:24px;height:24px}",
  0),a.insertRule(".iv-drawer-close-button:after {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAgMAAAArG7R0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEVMaXH////////OZTV/AAAAAnRSTlMAoKBFbtAAAAABYktHRAH/Ai3eAAAAKUlEQVQI12MIYGBlSGGQBMIUBjbHCQyM0xwYGDIZwBjEBomB5EBqgGoBolQGzYuy51cAAAAASUVORK5CYII=) no-repeat center;background-size:12px;width:12px;height:12px}",0),a.insertRule(".iv-ad-info-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAMAAACecocUAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAVFBMVEVMaXGUlJSYmJiZmZmYmJiXl5eZmZmZmZmWlpaVlZWOjo6ZmZmSkpKXl5eYmJiYmJiZmZmZmZmZmZmZmZmYmJiJiYmXl5eZmZmYmJiWlpaZmZn///+81lbeAAAAGnRSTlMAE5DM80DliTMMEjccWIM5p1UjaTQNgB5cLlr5mgUAAAABYktHRBsCYNSkAAAAVElEQVQI102NRw7AIBADhw7ppIf/PzQLJ/ZgWSNrFlDaWKMVcs6HmGLwTqjEME6CFDrAXBYIGhNh3TJEg02wHydctvFc7sbrvnXZV8/zfs3T+7u/P7CrAso35YfPAAAAAElFTkSuQmCC) no-repeat center;background-size:11px;width:11px;height:11px}",
  0),a.insertRule(".annotation-close-button {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEVMaXEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/Pz9aWloBAQGZmZlbW1v///+X9wUzAAAACHRSTlMANprf+g6lyRmB9hUAAAABYktHRA5vvTBPAAAAWUlEQVQI12NgYBAycVZkAIKwDiBIZWBgrQAx2gMY2DrAIIFBomPWju6VHY0MGh1rbu891dHEYNGx9+yd2x3NDB4d3XfO7uhoQTDgUnDFcO1wA+FWwC2FOQMAdKg6tUSAFEAAAAAASUVORK5CYII=) no-repeat center}",0),a.insertRule(".annotation-link-icon {background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAMAAAANmfvwAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAUVBMVEVMaXH////////////////////////////////////////////////////////////////////////////////////////////////////////JzkR1AAAAGnRSTlMAfXf+c3xsdGdv/GJoXPtXXflSVk5L7DBH9VeFfsQAAAABYktHRAH/Ai3eAAAAgElEQVQ4y93SSQ6AIAwFULSOOOJs739Qf9SF0VA2uNCu+psHaQJK7cVCqY+Rg92PXA++Q84KnCR03UIRJrFEKMEgZYFQhpyzQHSBWJJAdIVUENtJ3SC0mu3EdOh7zXZiBrRdzQLJ0Y1GfOlpVstD3HaZktX9X/gvRCxvxL6FR7IBS1RTM5xIpLoAAAAASUVORK5CYII=) no-repeat center}",
  0)},BFa=function(a){a=a.createElement({D:"div",
  ka:["annotation","annotation-type-custom"]});g.Fg(a,!1);return a},CFa=function(a,b){var c=!b.isCued()&&!g.V(b,1024);
  g.$K(a.l,c);g.$K(a.B,c)},DFa=function(a,b,c){a.W=!0;
  a.I=g.Up(b,c)},EFa=function(a,b){for(var c={},d=g.q(b.attributes),e=d.next();!e.done;e=d.next())e=e.value,c[e.name]=e.nodeValue;
  for(d=0;d<b.childNodes.length;d++)if(e=b.childNodes[d],g.Na(e)&&1==e.nodeType){if(c[e.tagName])var f=c[e.tagName];else if("data"===e.tagName){0<e.childNodes.length&&(f=e.childNodes[0].nodeValue,c[e.tagName]="string"===typeof f?f.trim():f);continue}else f=[],c[e.tagName]=f;e&&"TEXT"===e.tagName?1===e.childNodes.length&&3===e.childNodes[0].nodeType?f.push(e.childNodes[0].nodeValue):f.push(""):e&&f.push(EFa(a,e))}return c},HFa=function(a){var b=a.player.getVideoData();
  if(b.ca){var c=a.player.T().L.get(b.videoId);if(c){var d={format:"XML",urlParams:{},method:"POST",withCredentials:!0,onFinish:function(e,f,h){e=b.videoId;a.loaded&&a.loadNumber===a.loadNumber&&a.player.getVideoData().videoId===e&&(h=g.Op(h)&&h.responseXML?h.responseXML:null)&&H1(a,h)}};
  g.np()&&(d.onFinish=FFa(a,d.onFinish));d.postParams={ic_only:"1"};GFa(d,c);a.W=!0;g.Up(b.ca,d)}}},GFa=function(a,b){a.method="POST";
  a.postParams=a.postParams||{};b.nq&&(a.postParams.ic_coll=b.nq);b.lt&&(a.postParams.ic_xml=b.lt);b.ys&&(a.postParams.ic_track=b.ys)},IFa=function(a){var b=new g.W({D:"div"});
  g.Fg(b.element,!1);var c=new u1(a.player,b.element,I1(a));g.J(c,b);b.fa(a.l.element);c.Xr();return c},I1=function(a){if(!a.L){var b=new T0(a);
  g.J(a,b);var c=new g.B_(a);g.J(a,c);a.L=new vFa(b,c,a.player.T(),a.player.getVideoData(),a.logger,a.player,a.sd)}return a.L},H1=function(a,b){var c=!1,d=b.getElementsByTagName("annotations");
  if(d&&!(1>d.length)&&(d=d[0].getAttribute("itct"))){var e=g.mu();if(e){var f=g.ku();f&&g.tu(g.Lo("use_default_events_client")?void 0:g.dt,e,f,[g.gu(d)])}}d=b.getElementsByTagName("annotation");for(e=0;e<d.length;e++){var h=EFa(a,d[e]);f=null;try{if(h){var l=h.id,m=/.+/;var n="string"===typeof l&&null!=m&&null!=l&&l.match(m)?l:"";var p=h1(h.type,JFa),r=h1(h.style,KFa),t=g1(h.data),w=0!==t.length?JSON.parse(t):{};var x=h.action;h=VEa;if(null==x)var y=null;else if(g.Ma(x)){m=[];for(var G=g.q(x),B=G.next();!B.done;B=
  G.next()){var F=h(B.value);F&&m.push(F)}y=m}else{var L=h(x);y=L?[L]:[]}f=n&&p?new WEa(n,p,r,y,w):null}else f=null}catch(xa){}if(f)if("branding"===f.type||"promotion"===f.type){h=a;m=f;var I=BFa(h),H=null;switch(m.type){case "branding":if(h.player.T().Eb)break;h.l.element.appendChild(I);H=new B1(I,I1(h),m);break;case "promotion":g.XM(h.player,I,4),H=new C1(I,I1(h),m)}H&&H.Xr();if(h=H)g.J(a,h),a.J[f.id]=h}else if("card"===f.type||"drawer"===f.type){a.i||(a.i=IFa(a),g.J(a,a.i));if("card"===f.type){c=
  a.i;var M=f&&f.data&&f.data.card_type;h=f.data;if(M)switch(m=h.tracking||{},m={eE:m.impression,click:m.click,close:m.close,nH:m.teaser_impression,qv:m.teaser_click},I=h.tracking_params||{},H=null,M){case "collaborator":f={id:f.id,timestamp:h.timestamp||0,type:h.card_type,teaserText:h.teaser_text,teaserDurationMs:h.teaser_duration_ms,startMs:h.start_ms,autoOpen:h.auto_open||!1,Dd:h.session_data||{},sponsored:h.sponsored||!1,tracking:m,Sj:I.card?g.gu(I.card):null,Hh:I.teaser?g.gu(I.teaser):null,Vd:I.icon?
  g.gu(I.icon):null,channelId:h.channel_id,customMessage:h.custom_message?h.custom_message:null,tG:h.image_url,title:h.title,metaInfo:h.meta_info,url:j1({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url})};x1(c,f);break;case "playlist":f={id:f.id,timestamp:h.timestamp||0,type:h.card_type,teaserText:h.teaser_text,teaserDurationMs:h.teaser_duration_ms,startMs:h.start_ms,autoOpen:h.auto_open||!1,Dd:h.session_data||{},sponsored:h.sponsored||!1,tracking:m,Sj:I.card?g.gu(I.card):
  null,Hh:I.teaser?g.gu(I.teaser):null,Vd:I.icon?g.gu(I.icon):null,us:h.image_url,playlistVideoCount:h.playlist_video_count,customMessage:h.custom_message?h.custom_message:null,title:h.title,metaInfo:h.meta_info,url:j1({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url})};x1(c,f);break;case "productListing":h.signin_url&&(H=j1({target:"current",value:h.signin_url}));M=[];for(var U=h.offers||[],oa=0;oa<U.length;oa++)M.push(new aFa(g.td(U[oa].merchant),g.td(U[oa].price)));f=
  {id:f.id,timestamp:h.timestamp||0,type:h.card_type,teaserText:h.teaser_text,teaserDurationMs:h.teaser_duration_ms,startMs:h.start_ms,autoOpen:h.auto_open||!1,Dd:h.session_data||{},sponsored:h.sponsored||!1,tracking:m,Sj:I.card?g.gu(I.card):null,Hh:I.teaser?g.gu(I.teaser):null,Vd:I.icon?g.gu(I.icon):null,imageUrl:h.image_url,displayDomain:h.display_domain?h.display_domain:null,showLinkIcon:!!h.show_link_icon,ct:h.button_icon_url?h.button_icon_url:null,title:h.title,customMessage:h.custom_message?h.custom_message:
  null,url:j1({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url}),i4:H,h4:h.signin_title?h.signin_title:void 0,g4:h.signin_message?h.signin_message:void 0,offers:M};x1(c,f);break;case "simple":f={id:f.id,timestamp:h.timestamp||0,type:h.card_type,teaserText:h.teaser_text,teaserDurationMs:h.teaser_duration_ms,startMs:h.start_ms,autoOpen:h.auto_open||!1,Dd:h.session_data||{},sponsored:h.sponsored||!1,tracking:m,Sj:I.card?g.gu(I.card):null,Hh:I.teaser?g.gu(I.teaser):null,Vd:I.icon?
  g.gu(I.icon):null,imageUrl:h.image_url,displayDomain:h.display_domain?h.display_domain:null,showLinkIcon:!!h.show_link_icon,ct:h.button_icon_url?h.button_icon_url:null,title:h.title,customMessage:h.custom_message?h.custom_message:null,url:j1({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url})};x1(c,f);break;case "video":f={id:f.id,timestamp:h.timestamp||0,type:h.card_type,teaserText:h.teaser_text,teaserDurationMs:h.teaser_duration_ms,startMs:h.start_ms,autoOpen:h.auto_open||
  !1,Dd:h.session_data||{},sponsored:h.sponsored||!1,tracking:m,Sj:I.card?g.gu(I.card):null,Hh:I.teaser?g.gu(I.teaser):null,Vd:I.icon?g.gu(I.icon):null,us:h.image_url,videoDuration:h.video_duration||null,customMessage:h.custom_message?h.custom_message:null,title:h.title,metaInfo:h.meta_info,isLiveNow:!!h.is_live_now,url:j1({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url})},x1(c,f)}}else eFa(a.i,f);c=!0}}c&&(L0(a.player),a.Ku())},LFa=function(a,b){var c=!1;
  a.i||(a.i=IFa(a),g.J(a,a.i));for(var d=g.q(b.cards||[]),e=d.next();!e.done;e=d.next())e=e.value,e.cardRenderer&&(fFa(a.i,e.cardRenderer),c=!0);c&&(c=a.i,d=b.headerText?g.KD(b.headerText):"",g.Qe(c.Va,d),c.L&&c.L.setAttribute("title",d),c.context.videoData.eventId&&(c.eventId=c.context.videoData.eventId),c.ia=b.trackingParams?g.gu(b.trackingParams):null,c.J=b.closeButton.infoCardIconRenderer.trackingParams?g.gu(b.closeButton.infoCardIconRenderer.trackingParams):null,c.Vd=b.icon.infoCardIconRenderer.trackingParams?
  g.gu(b.icon.infoCardIconRenderer.trackingParams):null,L0(a.player),a.Ku())},MFa=function(a,b,c,d,e){if(!a.player.T().Eb){var f=[];
  b.navigationEndpoint&&b.navigationEndpoint.browseEndpoint&&b.navigationEndpoint.browseEndpoint.browseId&&f.push(new SEa("openUrl","click",new QEa("/channel/"+b.navigationEndpoint.browseEndpoint.browseId,"new",!0,!0),null));var h=b.watermark.thumbnails[0];d={channel_name:b.channelName,end_ms:b.endTimeMs,image_height:h.height,image_type:1,image_url:h.url,image_width:h.width,is_mobile:!1,session_data:{annotation_id:c,ei:e,feature:"iv",itct:b.trackingParams,src_vid:d},start_ms:b.startTimeMs};if(b.subscribeButton&&
  b.subscribeButton.subscribeButtonRenderer){d.channel_id=b.subscribeButton.subscribeButtonRenderer.channelId;var l;b=b.subscribeButton.subscribeButtonRenderer;var m,n;h=e=null;b.subscribed?(b.subscriberCountWithUnsubscribeText&&(e=g.KD(b.subscriberCountWithUnsubscribeText)),b.subscriberCountText&&(h=g.KD(b.subscriberCountText))):(b.subscriberCountText&&(e=g.KD(b.subscriberCountText)),b.subscriberCountWithSubscribeText&&(h=g.KD(b.subscriberCountWithSubscribeText)));var p=b.signInEndpoint&&b.signInEndpoint.webNavigationEndpointData&&
  b.signInEndpoint.webNavigationEndpointData.url?b.signInEndpoint.webNavigationEndpointData.url:(null===(n=null===(m=null===(l=b.signInEndpoint)||void 0===l?void 0:l.commandMetadata)||void 0===m?void 0:m.webCommandMetadata)||void 0===n?void 0:n.url)||"";l={subscribeText:g.KD(b.unsubscribedButtonText),subscribeCount:e||"",unsubscribeText:g.KD(b.subscribedButtonText),unsubscribeCount:h||"",enabled:b.enabled||!1,classic:!1,subscribed:b.subscribed||!1,feature:"iv",signInUrl:p};d.standalone_subscribe_button_data=
  l}f=new WEa(c,"branding","branding",f,d);l=BFa(a);a.l.element.appendChild(l);f=new B1(l,I1(a),f);f.Xr();g.J(f,f);a.J[c]=f}},FFa=function(a,b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];
  a.na()||(d.unshift(b),b=g.Qa.apply(window,d),a.X.push(g.lp(b)))}},NFa=function(a){return"annotation-editor"===a||"live-dashboard"===a};
  g.QM.prototype.rp=g.ca(15,function(a,b){var c=g.rN(this.Ta());c&&c.rp(a,b)});
  var N0={},O0=null;g.Ta(Q0,g.pn);g.k=Q0.prototype;g.k.getDuration=function(){return this.duration};
  g.k.play=function(a){if(a||0==this.La)this.progress=0,this.coords=this.i;else if(this.Mb())return!1;P0(this);this.startTime=a=g.Sa();-1==this.La&&(this.startTime-=this.duration*this.progress);this.endTime=this.startTime+this.duration;this.B=this.startTime;this.progress||this.Ju();this.oh("play");-1==this.La&&this.oh("resume");this.La=1;var b=g.Pa(this);b in N0||(N0[b]=this);BEa();CEa(this,a);return!0};
  g.k.stop=function(a){P0(this);this.La=0;a&&(this.progress=1);DEa(this,this.progress);this.oh("stop");this.Er()};
  g.k.pause=function(){this.Mb()&&(P0(this),this.La=-1,this.oh("pause"))};
  g.k.da=function(){0==this.La||this.stop(!1);this.oh("destroy");Q0.Fd.da.call(this)};
  g.k.destroy=function(){this.dispose()};
  g.k.tw=function(){this.oh("animate")};
  g.k.oh=function(a){this.dispatchEvent(new EEa(a,this))};
  g.Ta(EEa,g.Cl);g.Ta(R0,Q0);R0.prototype.u=g.Ia;R0.prototype.tw=function(){this.u();R0.Fd.tw.call(this)};
  R0.prototype.Er=function(){this.u();R0.Fd.Er.call(this)};
  R0.prototype.Ju=function(){this.u();R0.Fd.Ju.call(this)};
  g.Ta(S0,R0);S0.prototype.u=function(){this.element.style.left=Math.round(this.coords[0])+"px";this.element.style.top=Math.round(this.coords[1])+"px"};g.u(T0,g.E);T0.prototype.ya=function(a,b,c,d){c=(0,g.C)(c,d||this.l);a=g.Xo(a,b,c);this.i.push(a);return a};
  T0.prototype.Wy=function(a,b,c,d){c=(0,g.C)(c,d||this.l);a=g.fp(a,b,c);this.i.push(a);return a};
  T0.prototype.Hb=function(a){g.Yo(a);g.kb(this.i,a)};
  T0.prototype.da=function(){g.Yo(this.i);this.i.length=0;g.E.prototype.da.call(this)};g.u(X0,g.gN);g.k=X0.prototype;g.k.load=function(){g.gN.prototype.load.call(this);if(!Y0(this)){var a=g.Pia(this.player.getVideoData());a?(a=W0(a,GEa(this)),Z0(this,a,!1)):HEa(this)}};
  g.k.unload=function(){Z0(this,null);this.u&&(this.u.abort(),this.u=null);g.gN.prototype.unload.call(this)};
  g.k.Ge=function(a,b){if(!Y0(this))return null;if("loadCustomEndscreenRenderer"===a){var c=W0(b,"new");Z0(this,c);return!0}return null};
  g.k.getOptions=function(){return Y0(this)?["loadCustomEndscreenRenderer"]:[]};
  g.k.Za=function(){if(this.endscreen&&this.endscreen.elements){var a=this.player.getVideoContentRect();if(a&&0!==a.width&&0!==a.height){var b=this.player.getPlayerSize();if(b&&0!==b.width&&0!==b.height){var c=a.width/a.height;var d=0;for(var e=-1,f=0;f<OFa.length;f++){var h=Math.abs(b.width-OFa[f]);if(-1===e||d>=h)e=f,d=h}d=PFa[e];this.l&&g.mg(this.l.element,"outline-width",Math.max(b.width,b.height)+"px");for(b=0;b<this.endscreen.elements.length;++b)if(f=this.endscreen.elements[b].id,e=this.i[f],
  h=this.C[f],e&&h){var l=h.width*c/h.aspectRatio;f=Math.round(l*a.height);var m=a.left+Math.round(h.left*a.width),n=a.top+Math.round(h.top*a.height);g.Bg(e.element,Math.round(h.width*a.width),f);g.ug(e.element,m,n);g.nn(e.element,QFa);m=h.left+h.width/2;h=h.top+l/2;g.N(e.element,.5>=m&&.5>=h?"ytp-ce-top-left-quad":.5<m&&.5>=h?"ytp-ce-top-right-quad":.5>=m&&.5<h?"ytp-ce-bottom-left-quad":"ytp-ce-bottom-right-quad");g.nn(e.element,PFa);g.N(e.element,d);(e=g.se(document,"div","ytp-ce-expanding-overlay-body",
  e.element)[0])&&g.mg(e,"height",f+"px")}}}}};
  g.k.Bd=function(a){if(this.endscreen)if("ytp-ce-in-endscreen"===a.getId())f1(this,this.endscreen.impressionUrls),(a=g.mu())&&this.endscreen.visualElement&&g.uu(a,this.endscreen.visualElement,void 0);else{a=a.getId().substring(15);var b=this.i[a],c=this.C[a];g.N(b.element,"ytp-ce-element-show");b.element.removeAttribute("aria-hidden");b=this.player.getRootNode();g.N(b,"ytp-ce-shown");f1(this,c.impressionUrls);(b=g.mu())&&g.uu(b,c.visualElement,void 0);this.player.T().u&&this.player.xa("endscreenelementshown",
  a)}};
  g.k.rf=function(a){if("ytp-ce-in-endscreen"!==a.getId()){a=a.getId().substring(15);var b=this.i[a];g.mn(b.element,"ytp-ce-element-show");b.element.setAttribute("aria-hidden","true");b=this.player.getRootNode();g.mn(b,"ytp-ce-shown");this.player.T().u&&this.player.xa("endscreenelementhidden",a)}};
  g.k.PP=function(a){var b=this;a.target===window&&(new g.K(function(){for(var c=g.q(Object.values(b.i)),d=c.next();!d.done;d=c.next())g.nn(d.value.element,["ytp-ce-force-expand","ytp-ce-element-hover","ytp-ce-element-shadow-show"])},0)).start()};
  g.k.Kz=function(a,b){return a.replace(/%5B[a-zA-Z_:]+%5D|\[[a-zA-Z_:]+\]/g,function(c){var d=unescape(c);d=d.substring(1,d.length-1);return b[d]?escape(b[d]):c})};
  var OFa=[346,426,470,506,570,640,853,1280,1920],PFa="ytp-ce-size-346 ytp-ce-size-426 ytp-ce-size-470 ytp-ce-size-506 ytp-ce-size-570 ytp-ce-size-640 ytp-ce-size-853 ytp-ce-size-1280 ytp-ce-size-1920".split(" "),QFa=["ytp-ce-top-left-quad","ytp-ce-top-right-quad","ytp-ce-bottom-left-quad","ytp-ce-bottom-right-quad"];var REa={NU:"current",l_:"new"};var TEa={CLOSE:"close",x_:"openUrl",vK:"subscribe"},UEa={GS:"click",CLOSE:"close",hW:"hidden",F0:"rollOut",G0:"rollOver",r1:"shown"};var KFa={aS:"anchored",WH:"branding",CHANNEL:"channel",LU:"cta",kW:"highlightText",jX:"label",PLAYLIST:"playlist",e0:"popup",B1:"speech",vK:"subscribe",S1:"title",VIDEO:"video",d3:"website"},JFa={WH:"branding",tS:"card",bV:"drawer",jW:"highlight",IY:"marker",n0:"promotion",TEXT:"text",k3:"widget"};g.u(p1,g.E);g.k=p1.prototype;g.k.addCueRange=function(a,b,c,d,e){a=new g.AD(a,b,{id:c});a.namespace="annotations_module";d&&this.za.set(a,d);e&&this.Da.set(a,e);this.context.G.ud([a])};
  g.k.Xr=function(){this.context.l.subscribe("resize",this.ht,this)};
  g.k.uw=function(a,b,c,d,e,f){if(this.Ma)return!1;f&&(f.stopPropagation(),f.preventDefault());this.navigate(a,c,d,e);return!1};
  g.k.show=function(){};
  g.k.hide=function(){};
  g.k.destroy=function(){g.Me(this.element)};
  g.k.ht=function(){};
  g.k.navigate=function(a,b,c,d){var e=this,f=i1(a);if(f){var h=cFa(f,a.target),l=function(){a.i&&e.context.G.pauseVideo();var m=e.context.videoData.C||!1,n=g.Cp(f||"");m&&n&&(n.v||n.list)?e.context.G.Ii(n.v,b,n.list,!1):g.KJ(f||"","current"===h?"_top":void 0,b)};
  "new"===h&&(l(),l=null);F1(this.context.logger,c,l,d);bFa(f)||(c=g.mu(),d=b.itct,c&&d&&g.Du(c,g.gu(d)))}};
  g.k.da=function(){this.za.clear();this.Da.clear();g.E.prototype.da.call(this)};
  g.k.createElement=function(a){a=new g.W(a);g.J(this,a);return a.element};g.u(u1,p1);g.k=u1.prototype;g.k.isAvailable=function(){var a;if(a=!!this.cards.length)(a=this.G.getRootNode())?(a=g.Cg(a),a=173<a.width&&173<a.height):a=!1;return a};
  g.k.ht=function(){var a=this.isAvailable();g.Fg(this.element,a);g.O(this.context.G.getRootNode(),g.VS.IV_DRAWER_ENABLED,a);L0(this.G)};
  g.k.destroy=function(){this.G.rp(!1);try{this.G.getRootNode().removeChild(this.B)}catch(a){}g.Do(this.X);g.Yo(this.ca);this.ma&&this.ma.dispose();this.C&&this.C.dispose();p1.prototype.destroy.call(this)};
  g.k.RK=function(){if(this.u){F1(this.context.logger,z1(this).tracking.close);var a=g.mu();a&&this.J&&g.Du(a,this.J);t1(this)}};
  g.k.cL=function(){g.O(this.B,"iv-drawer-scrolled",0<this.l.scrollTop)};
  g.k.pM=function(){var a=g.mu(),b=z1(this);b=b?b.Vd:this.Vd;a&&b&&g.Bu(a,[b])};
  g.k.oM=function(){var a=g.mu(),b=z1(this);b=b?b.Vd:this.Vd;a&&b&&g.Cu(a,[b])};
  g.k.tJ=function(){var a=z1(this);F1(this.context.logger,a.tracking.nH);var b=g.mu();b&&a&&g.Bu(b,[a.Hh,a.Vd])};
  g.k.rM=function(){var a=g.mu(),b=z1(this);a&&b&&g.Cu(a,[b.Hh])};
  g.k.sJ=function(a){var b=z1(this),c=g.mu();this.i?a?(a=this.context.logger,F1(a,b.tracking.qv),a.G.sendVideoStatsEngageEvent(4,void 0),c&&b.Hh&&g.Du(c,b.Hh)):(a=this.context.logger,F1(a,b.tracking.qv),a.G.sendVideoStatsEngageEvent(4,void 0),c&&b.Vd&&g.Du(c,b.Vd)):(a=this.context.logger,F1(a,b.tracking.qv),a.G.sendVideoStatsEngageEvent(4,void 0),c&&this.Vd&&g.Du(c,this.Vd))};g.u(A1,p1);A1.prototype.Xr=function(){p1.prototype.Xr.call(this);qFa(this)};
  A1.prototype.show=function(){p1.prototype.show.call(this);var a=g.mu(),b=this.annotation.data;a&&b&&(b=b.session_data)&&g.Bu(a,[g.gu(b.itct)])};
  A1.prototype.hide=function(){p1.prototype.hide.call(this);var a=g.mu(),b=this.annotation.data;a&&b&&(b=b.session_data)&&g.Cu(a,[g.gu(b.itct)])};g.u(B1,A1);
  B1.prototype.show=function(){if(!this.isActive){A1.prototype.show.call(this);if(!this.J){g.N(this.element,"iv-branding");var a=this.annotation.data;this.l=this.createElement({D:"img",ka:["branding-img","iv-click-target"],U:{"aria-label":"Channel watermark",src:a.image_url,width:a.image_width,height:a.image_height}});g.Fg(this.l,!1);var b=this.createElement({D:"div",ka:["branding-img-container"]});b.appendChild(this.l);this.element.appendChild(b);(b=YEa(this.annotation))&&q1(this,this.l,b,this.annotation.id,
  a.session_data);uFa(this,a);this.J=!0}g.Fg(this.element,!0);this.isActive=!0;this.l&&rFa(this,this.l)}};
  B1.prototype.hide=function(){this.isActive&&(A1.prototype.hide.call(this),g.Fg(this.element,!1),this.isActive=!1)};
  B1.prototype.destroy=function(){this.i&&(this.i.dispose(),this.i=null);A1.prototype.destroy.call(this)};g.u(C1,A1);g.k=C1.prototype;g.k.show=function(){this.isActive||(A1.prototype.show.call(this),this.W||(wFa(this),this.W=!0),g.Fg(this.element,!0),g.Gm(function(){g.mn(this.element,"iv-promo-inactive")},100,this),this.element.removeAttribute("aria-hidden"),this.isActive=!0,E1(this),xFa(this),yFa(this,this.I))};
  g.k.hide=function(){this.isActive&&(g.N(this.element,"iv-promo-inactive"),this.isActive=!1,this.element.setAttribute("aria-hidden","true"))};
  g.k.uw=function(a,b,c,d,e,f){return this.isCollapsed?!1:A1.prototype.uw.call(this,a,b,c,d,e,f)};
  g.k.JL=function(a){this.L=!0;D1(this,500,a)};
  g.k.IL=function(){this.L=!1;zFa(this)};
  g.k.CL=function(a){a.stopPropagation();this.hide()};
  g.k.DL=function(a){a.stopPropagation();E1(this);this.isCollapsed=!0;g.N(this.element,"iv-promo-collapsed-no-delay");this.C.start()};
  g.k.destroy=function(){this.C.dispose();A1.prototype.destroy.call(this)};g.u(G1,g.gN);g.k=G1.prototype;g.k.Ge=function(a,b){if(!NFa(this.player.T().playerStyle))return null;switch(a){case "loadCustomAnnotationsXml":var c=g.A_(b);c&&H1(this,c);return!0;case "removeCustomAnnotationById":return b&&this.i&&(hFa(this.i,b),L0(this.player)),!0}return null};
  g.k.getOptions=function(){return NFa(this.player.T().playerStyle)?["loadCustomAnnotationsXml","removeCustomAnnotationById"]:[]};
  g.k.Jn=function(){var a=this.player.T(),b=this.player.getVideoData();return b.C&&a.pfpChazalUi?!1:1===(a.annotationsLoadPolicy||b.annotationsLoadPolicy)&&!b.fF||a.L.get(b.videoId)||g.jI(b)||g.kI(b)?!0:!1};
  g.k.Ku=function(){if(this.B){var a=this.player.Ka().getVideoContentRect(!0);g.Bg(this.B.element,a.width,a.height);g.ug(this.B.element,a.left,a.top)}if(this.i){var b=this.player.cj();a=this.i;b=b.width;g.O(a.B,"iv-drawer-small",426>=b);g.O(a.B,"iv-drawer-big",1280<=b)}};
  g.k.uJ=function(a){CFa(this,a.state);g.V(a.state,2)&&(this.Kg()&&this.Qi()&&2!==this.player.getPresentingPlayerType()&&this.setCardsVisible(!1),this.rp(!1))};
  g.k.load=function(){function a(h){var l=b.loadNumber;b.I=null;b.loaded&&b.loadNumber===l&&b.player.getVideoData().videoId===d&&(h=g.Op(h)&&h.responseXML?h.responseXML:null)&&(H1(b,h),g.N(b.player.getRootNode(),"iv-module-loaded"))}
  var b=this;g.gN.prototype.load.call(this);CFa(this,this.player.Wa());this.loadNumber++;var c=this.player.getVideoData(),d=c.videoId;g.np()&&(a=FFa(this,a));var e={format:"XML",onFinish:a,onError:function(){b.I=null},
  urlParams:{}};c.isPharma&&(e.urlParams.pharma="1");e.method="POST";e.withCredentials=!0;var f=this.player.T().L.get(d);f&&GFa(e,f);f=f&&(f.lt||f.nq);if(!c.Ik||f)c.ca?DFa(this,c.ca,e):(this.u=function(){b.Oa(e)},this.player.addEventListener("videodatachange",this.u));
  g.XM(this.player,this.B.element,4);this.Ku();(f=g.jI(c))&&LFa(this,f);(f=g.kI(c))&&f.featuredChannel&&MFa(this,f.featuredChannel,f.annotationId||"branding",c.videoId||null,c.eventId||null)};
  g.k.Oa=function(a){var b=this.player.getVideoData();b.ca&&(this.u&&(this.player.removeEventListener("videodatachange",this.u),this.u=null),DFa(this,b.ca,a))};
  g.k.unload=function(){this.player.Re("annotations_module");for(var a=g.q(Object.keys(this.J)),b=a.next();!b.done;b=a.next())this.J[b.value].destroy();this.L=null;this.i&&(this.i.destroy(),this.i=null,L0(this.player));this.W=!1;this.I&&(this.I.abort(),this.I=null);this.J={};this.l.hide();g.gN.prototype.unload.call(this);this.B.detach();this.u&&(this.player.removeEventListener("videodatachange",this.u),this.u=null)};
  g.k.gG=function(a){a===this.player.getVideoData().videoId&&(this.loaded?HFa(this):this.load())};
  g.k.Kg=function(){return!!this.i&&this.i.isAvailable()};
  g.k.Qi=function(){this.Kg();return!!this.i&&this.i.u};
  g.k.setCardsVisible=function(a,b,c){b=void 0===b?!1:b;this.Kg();this.i&&(a?c?s1(this.i,c,b):s1(this.i,"YOUTUBE_DRAWER_AUTO_OPEN",b):t1(this.i))};
  g.k.rp=function(a,b){this.player.V(a?"cardsteasershow":"cardsteaserhide",b)};
  g.k.da=function(){this.player.T().L.unsubscribe("vast_info_card_add",this.gG,this);g.mn(this.player.getRootNode(),g.VS.IV_DRAWER_OPEN);for(var a=this.X,b=0,c=a.length;b<c;b++)g.op(a[b]);this.X.length=0;g.gN.prototype.da.call(this)};
  g.k.createElement=function(a){a=new g.W(a);g.J(this,a);return a.element};g.mN.annotations_module=G1;g.mN.creatorendscreen=X0;})(_yt_player);
  