(function(g){var window=this;'use strict';var z2=function(a){a.publish("cardstatechange",a.vl()&&a.Hp()?1:0)},A2=function(a,b){var c=g.Qa(b),d=c?b:arguments; for(c=c?0:1;c1&&(a.progress=1);a.K=1E3/(b-a.D);a.D=b;Vbb(a,a.progress);a.progress==1?(a.j=0,D2(a),a.onFinish(),a.As()):a.isPlaying()&&a.SN()},Vbb=function(a,b){typeof a.G==="function"&&(b=a.G(b)); a.coords=Array(a.B.length);for(var c=0;c0&&(a.N.forEach(function(l){l.dispose()}),a.N.length=0); a.K=0;if((a.endscreen=b)&&b.elements){c&&fcb(a);c=[];d=new g.LC(b.startMs,0x7ffffffffffff,{id:"ytp-ce-in-endscreen",namespace:"creatorendscreen"});c.push(d);a.player.U().B||(a.B=new g.U({I:"div",S:"ytp-ce-shadow"}),g.oR(a.player,a.B.element,4),a.D=new g.Tx(a.B,200));for(d=0;d0?(g.To(b.element,"ytp-ce-force-expand"),M2(a,c.id,!0)):(g.Vo(b.element,"ytp-ce-force-expand"),g.Vo(b.element,"ytp-ce-element-hover"),M2(a,c.id,!1))} function f(){e(1)} function h(){e(-1)} b.listen("mouseenter",function(){jcb(a,b,c)}); b.listen("mouseleave",function(){kcb(a,b,c)}); a.player.U().B||b.listen("click",function(){g.To(b.element,"ytp-ce-element-hover")}); b.listen("click",function(m){lcb(a,c,m)}); b.listen("keypress",function(m){lcb(a,c,m)}); b.listen("focus",function(){jcb(a,b,c)}); b.listen("blur",function(){kcb(a,b,c)}); b.listen("touchstart",function(){jcb(a,b,c)}); var l=g.ce("ytp-ce-expanding-overlay-hider",b.element);l&&b.T(l,"touchstart",function(m){m.stopPropagation();g.Vo(b.element,"ytp-ce-element-hover");g.Vo(b.element,"ytp-ce-force-expand")}); b.listen("keydown",function(m){a.Y=m.keyCode===9&&!m.shiftKey}); d(g.ce("ytp-sb-subscribe",b.element));d(g.ce("ytp-sb-unsubscribe",b.element));b.listen("focus",f);b.listen("blur",h)},lcb=function(a,b,c){if(b.targetUrl&&(!c||c.type!=="keypress"||c.keyCode===13)){for(var d=c.target;d&&!g.So(d,"ytp-ce-element");){g.So(d,"subscribe-label")&&mcb(a,b); if(g.So(d,"ytp-ce-channel-subscribe"))return;d=d.parentElement||null}if(!d||g.So(d,"ytp-ce-element-hover")){c.preventDefault();c.stopPropagation();if(d=a.j[b.id])kcb(a,d,b),d.element.blur();if(c.ctrlKey||c.metaKey||b.Hea==="new")mcb(a,b),a.player.sendVideoStatsEngageEvent(17,void 0),a.player.pauseVideo(),c=g.qd(L2(a,b.targetUrl)),c=g.md(c),g.Ey(c,void 0,b.sessionData);else{var e=g.KO(a.player.U())||a.player.getVideoData().Gf,f=function(){var h=L2(a,b.targetUrl),l=b.sessionData,m=b.watchEndpoint,n= g.Sq(h);e&&n&&(n.v||n.list)?a.player.tp(n.v,l,n.list,!1,void 0,m||void 0):g.Dy(h,l)}; mcb(a,b,function(){a.player.sendVideoStatsEngageEvent(17,f)})}}}},L2=function(a,b){a=a.player.U(); if(b){if(b.startsWith("//"))return a.protocol+":"+b;if(b.startsWith("/"))return g.SO(a)+b}else return"";return b},jcb=function(a,b,c){g.So(b.element,"ytp-ce-element-hover")||(c.type==="VIDEO"||c.type==="PLAYLIST"?g.To(b.element,"ytp-ce-element-hover"):a.player.U().B?(new g.Lo(function(){g.To(b.element,"ytp-ce-element-hover")},200)).start():g.To(b.element,"ytp-ce-element-hover"),N2(a,c.a$),M2(a,c.id,!0))},kcb=function(a,b,c){g.Vo(b.element,"ytp-ce-element-hover"); g.Vo(b.element,"ytp-ce-force-expand");M2(a,c.id,!1)},M2=function(a,b,c){a.B&&(c?a.D.show():a.D.hide()); for(var d=g.w(Object.keys(a.j)),e=d.next();!e.done;e=d.next())e=e.value,e!==b&&g.Xo(a.j[e].element,"ytp-ce-element-shadow-show",c)},N2=function(a,b,c){function d(){f||(e++,e===b.length&&(h.stop(),c&&c()))} if(!b||b.length===0||I2(a))c&&c();else{b=ncb(a,b);var e=0,f=!1,h=new g.Lo(function(){f=!0;c&&c()},1E3,a); h.start();for(a=0;a1?a.charAt(0)==="/"&&a.charAt(1)!=="/":a==="/")&&(b=a.replace(/^(https?:)?\/\//,"").split("/",1),b=!b||b.length<1||!b[0]?[]:b[0].toLowerCase().split(".").reverse(),b=b[0]==="com"&&b[1]==="youtube"||b[0]==="be"&&b[1]==="youtu");return b?a.indexOf("/redirect?")===-1:!1},Ecb=function(a,b){return b?b:Dcb(a)?"current":"new"},U2=function(a,b){g.O.call(this); var c=this;this.element=a;this.context=b;this.ob=!1;this.Wa=new Map;this.Ya=new Map;this.context.J.addEventListener(g.NC("annotations_module"),function(d){(d=c.Wa.get(d))&&d.apply(c)}); this.context.J.addEventListener(g.OC("annotations_module"),function(d){(d=c.Ya.get(d))&&d.apply(c)})},V2=function(a,b,c,d,e,f,h){a.context.j.listen(b,"click",function(l){a.TN(c,d,e,f||[],h||0,l)}); a.context.j.listen(b,"touchstart",function(){a.ob=!1}); a.context.j.listen(b,"touchmove",function(){a.ob=!0})},Fcb=function(a){var b; return((b=g.Q(a,g.Bx))==null?0:b.url)?g.Q(a,g.Bx).url:(a=g.Q(a,g.VP))&&a.videoId?(b="/watch?v="+a.videoId,a.playlistId&&(b+="&list="+a.playlistId),a.index&&(b+="&index="+a.index),a.startTimeSeconds&&(b+="&t="+a.startTimeSeconds),b):null},W2=function(a,b,c){return{oZ:(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||""}), O2:(b.impressionLoggingUrlsV2s||[]).map(function(d){return d.baseUrl||""}), MM:(b.clickLoggingUrlsV2s||[]).map(function(d){return d.baseUrl||""})}},Gcb=function(a,b,c){U2.call(this,b,c); var d=this;this.J=a;this.eventId=null;this.Ab=this.Ka=this.Kb=this.C=this.isInitialized=!1;this.cards=[];this.yb=this.Z=this.Ma=this.G=this.Va=this.j=null;this.qa=[];this.ra=this.N=this.Df=this.Ga=null;this.K=0;this.Fa=new g.Lo(function(){},c.W.bk?4E3:3E3); g.P(this,this.Fa);this.fb=new g.Lo(function(){}); g.P(this,this.fb);this.Aa=new ycb(c,function(e,f,h,l,m,n){V2(d,e,f,h,l,m,n)}); this.Y=new g.U({I:"div",S:"iv-drawer",X:{id:"iv-drawer"},V:[{I:"div",S:"iv-drawer-header",X:{"aria-role":"heading"},V:[{I:"span",S:"iv-drawer-header-text"},{I:"button",Na:["iv-drawer-close-button","ytp-button"],X:{"aria-label":"Hide cards",tabindex:"0"}}]},{I:"div",S:"iv-drawer-content"}]});g.P(this,this.Y);this.D=this.Y.element;this.Xa=new g.Tx(this.Y,330);g.P(this,this.Xa);this.Jb=g.ce("iv-drawer-header-text",this.D);this.B=g.ce("iv-drawer-content",this.D);this.addCueRange(0,c.videoData.lengthSeconds* 1E3,"",function(){d.Kb&&X2(d,"YOUTUBE_DRAWER_AUTO_OPEN")},function(){(d.Kb=d.C)&&Y2(d)}); this.Ra=new g.iE(this);g.P(this,this.Ra);this.J.addEventListener("videodatachange",this.mu.bind(this))},Hcb=function(a,b){b=b.data; b.autoOpenMs&&a.addCueRange(b.autoOpenMs,0x8000000000000,"",function(){X2(a,"YOUTUBE_DRAWER_AUTO_OPEN")}); b.autoCloseMs&&a.addCueRange(b.autoCloseMs,0x8000000000000,"",function(){Y2(a)}); var c=b.headerText;g.qe(a.Jb,c);a.Z&&a.Z.setAttribute("title",c);b.eventId&&(a.eventId=b.eventId);a.Ga=g.lw(b.trackingParams);a.N=g.lw(b.closeTrackingParams);a.Df=g.lw(b.iconTrackingParams)},Icb=function(a,b){var c=b.cardId?b.cardId:"cr:"+a.K,d=a.J.U().experiments.kb("enable_error_corrections_infocard_web_client"); if(!b.content&&b.teaser.simpleCardTeaserRenderer&&d){var e=b.teaser.simpleCardTeaserRenderer,f=b.icon?b.icon.infoCardIconRenderer:null;b={id:c,timestamp:a.K,type:"simple",teaserText:g.hx(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,sessionData:{},sponsored:!1,sj:{},Kp:null,Xj:e.trackingParams?g.lw(e.trackingParams):null,Df:f&&f.trackingParams?g.lw(f.trackingParams):null,imageUrl:"",displayDomain:null,showLinkIcon:!1, qE:null,title:"",customMessage:"",url:null,onClickCommand:e.onTapCommand||null};Z2(a,b)}else{var h;if((h=b.content)==null?0:h.simpleCardContentRenderer){if(!b.cueRanges.length)return;f=(e=b.content)==null?void 0:e.simpleCardContentRenderer;e=b.teaser.simpleCardTeaserRenderer;var l=b.icon?b.icon.infoCardIconRenderer:null;b={id:c,timestamp:a.K,type:"simple",teaserText:g.hx(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen, sessionData:$2(a,c,b,f),sponsored:!1,sj:W2(f,e,f.command),Kp:f.trackingParams?g.lw(f.trackingParams):null,Xj:e.trackingParams?g.lw(e.trackingParams):null,Df:l&&l.trackingParams?g.lw(l.trackingParams):null,imageUrl:a3(f.image.thumbnails,290).url,displayDomain:f.displayDomain?g.hx(f.displayDomain):null,showLinkIcon:!!f.showLinkIcon,qE:null,title:f.title?g.hx(f.title):"",customMessage:f.callToAction?g.hx(f.callToAction):"",url:g.Q(f.command,g.Bx).url?Q2({pause_on_navigation:!a.context.videoData.isLivePlayback, target:"new",value:g.Q(f.command,g.Bx).url}):null,onClickCommand:null};Z2(a,b)}else{var m;if((m=b.content)==null?0:m.collaboratorInfoCardContentRenderer){if(!b.cueRanges.length)return;e=(f=b.content)==null?void 0:f.collaboratorInfoCardContentRenderer;f=b.teaser.simpleCardTeaserRenderer;l=b.icon?b.icon.infoCardIconRenderer:null;b={id:c,timestamp:a.K,type:"collaborator",teaserText:g.hx(f.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs), autoOpen:!!b.autoOpen,sessionData:$2(a,c,b,e),sponsored:!1,sj:W2(e,f,e.endpoint),Kp:e.trackingParams?g.lw(e.trackingParams):null,Xj:f.trackingParams?g.lw(f.trackingParams):null,Df:l&&l.trackingParams?g.lw(l.trackingParams):null,channelId:g.Q(e.endpoint,g.oQ).browseId,customMessage:e.customText?g.hx(e.customText):null,profileImageUrl:a3(e.channelAvatar.thumbnails,290).url,title:e.channelName?g.hx(e.channelName):"",metaInfo:[e.subscriberCountText?g.hx(e.subscriberCountText):""],url:Q2({pause_on_navigation:!a.context.videoData.isLivePlayback, target:"new",value:g.Q(e.endpoint,g.oQ).canonicalBaseUrl?g.Q(e.endpoint,g.oQ).canonicalBaseUrl:"/channel/"+g.Q(e.endpoint,g.oQ).browseId}),onClickCommand:null};Z2(a,b)}else{var n;if((n=b.content)==null?0:n.playlistInfoCardContentRenderer){if(!b.cueRanges.length)return;e=(l=b.content)==null?void 0:l.playlistInfoCardContentRenderer;f=b.teaser.simpleCardTeaserRenderer;l=b.icon?b.icon.infoCardIconRenderer:null;b={id:c,timestamp:a.K,type:"playlist",teaserText:g.hx(f.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs), startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,sessionData:$2(a,c,b,e),sponsored:!1,sj:W2(e,f,e.action),Kp:e.trackingParams?g.lw(e.trackingParams):null,Xj:f.trackingParams?g.lw(f.trackingParams):null,Df:l&&l.trackingParams?g.lw(l.trackingParams):null,ZH:a3(e.playlistThumbnail.thumbnails,258).url,customMessage:e.customMessage?g.hx(e.customMessage):null,playlistVideoCount:g.hx(e.playlistVideoCount),title:e.playlistTitle?g.hx(e.playlistTitle):"",metaInfo:[e.channelName?g.hx(e.channelName): "",e.videoCountText?g.hx(e.videoCountText):""],url:Q2({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:Fcb(e.action)}),onClickCommand:null};Z2(a,b)}else{var p;if((p=b.content)==null?0:p.videoInfoCardContentRenderer){if(!b.cueRanges.length)return;var q;e=(q=b.content)==null?void 0:q.videoInfoCardContentRenderer;f=b.teaser.simpleCardTeaserRenderer;l=b.icon?b.icon.infoCardIconRenderer:null;b={id:c,timestamp:a.K,type:"video",teaserText:g.hx(f.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs), startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,sessionData:$2(a,c,b,e),sponsored:!1,sj:W2(e,f,e.action),Kp:e.trackingParams?g.lw(e.trackingParams):null,Xj:f.trackingParams?g.lw(f.trackingParams):null,Df:l&&l.trackingParams?g.lw(l.trackingParams):null,ZH:a3(e.videoThumbnail.thumbnails,258).url,videoDuration:e.lengthString?g.hx(e.lengthString):null,customMessage:e.customMessage?g.hx(e.customMessage):null,title:e.videoTitle?g.hx(e.videoTitle):"",metaInfo:[e.channelName?g.hx(e.channelName): "",e.viewCountText?g.hx(e.viewCountText):""],isLiveNow:!!e.badge,url:Q2({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:Fcb(e.action)}),onClickCommand:null};Z2(a,b)}}}}}a.K++},a3=function(a,b){for(var c=-1,d=-1,e=0;e=b||(a[e].width||0)>=290)&&(d<0||(a[d].height||0)>(a[e].height||0)||(a[d].width||0)>(a[e].width||0))&&(d=e)}return a[d>=0?d:c]},$2=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||""}},Kcb=function(a,b){if(b=Jcb(a,b))b===a.j&&(a.j=null),a.J.removeCueRange(b.xf.id),g.oe(b.JO),g.Qb(a.cards,b),a.eJ(),b3(a)},X2=function(a,b,c){if(!a.C){a.Xa.show(); a.Va=new g.Lo(function(){g.To(a.context.J.getRootNode(),g.tX.IV_DRAWER_OPEN)},0); a.Va.start();a.Ra.T(a.B,"mousewheel",function(h){a.Fa.start();h.preventDefault();h=h||window.event;var l=0;h.type=="MozMousePixelScroll"?l=0==(h.axis==h.HORIZONTAL_AXIS)?h.detail:0:window.opera?l=h.detail:l=h.wheelDelta%120==0?"WebkitTransform"in document.documentElement.style?window.chrome&&navigator.platform.indexOf("Mac")==0?h.wheelDeltaY/-30:h.wheelDeltaY/-1.2:h.wheelDelta/-1.6:h.wheelDeltaY/-3;if(h=l)a.B.scrollTop+=h}); a.C=!0;var d=g.ow();d&&a.Ga&&a.N&&g.Sw(d,[a.Ga,a.N]);b={TRIGGER_TYPE:b};for(var e=g.w(a.cards),f=e.next();!f.done;f=e.next())f=f.value,f.r_||(f.r_=!0,Lcb(a.context.logger,f.xf.sj.oZ,b)),d&&g.Sw(d,[f.xf.Kp]);z2(a.J);c&&(a.G=new g.Lo(function(){a.Ma=a.Z;a.yb.focus()},330),a.G.start())}},Y2=function(a){a.C&&(a.Xa.hide(),g.ps(a.Ra),g.Vo(a.context.J.getRootNode(),g.tX.IV_DRAWER_OPEN),a.C=!1,z2(a.J),a.G&&a.G.stop(),a.G=new g.Lo(function(){a.Ma&&(a.Ma.focus(),a.Ma=null)},330),a.G.start())},Mcb=function(a){g.Uo(a.Ib(), [g.tX.STOP_EVENT_PROPAGATION, "iv-drawer-manager"]);g.oR(a.J,a.D,5);a.QI();a.Z=g.ce("ytp-cards-button",a.J.getRootNode());a.yb=g.ce("iv-drawer-close-button",a.D);a.isInitialized=!0},Ncb=function(a){a.qa.push(g.Zu("iv-teaser-shown",a.D6,a)); a.qa.push(g.Zu("iv-teaser-hidden",a.D$,a));a.qa.push(g.Zu("iv-teaser-clicked",a.C6,a));a.Ab=!0},Ocb=function(a,b){var c; return b.onClickCommand&&((c=g.Q(b.onClickCommand,g.F$a))==null?void 0:c.targetId)==="engagement-panel-error-corrections"?(a.ra=b,!0):!1},Pcb=function(a,b){a.ra=b; var c=a.J.getVideoData();if(!c)return!1;c=g.nP(c);if(c==null?0:c.markersMap)for(var d,e=0;((d=c)==null?void 0:d.markersMap.length)>e;e++){var f=void 0,h=(f=c)==null?void 0:f.markersMap[e];if(h.key==="ERROR_CORRECTION_MARKERS"&&(f=void 0,(h=(f=h.value)==null?void 0:f.markers)&&h.length>0))return d=void 0,b.startMs=((d=g.Q(h[0],g.pRa))==null?void 0:d.timeRangeStartMillis)||0,a.ra=null,!0}return!1},Z2=function(a,b){if(!Ocb(a,b)||Pcb(a,b)){var c=Qcb(a,b); if(c){var d={xf:b,JO:c.element,r_:!1};if(b.onClickCommand)a.J.L("web_infocards_teaser_show_logging_fix")&&(a.Ab||Ncb(a),Kcb(a,b.id),c=a.findLastIndex(d),g.Wb(a.cards,c,0,d));else{a.isInitialized||Mcb(a);Kcb(a,b.id);var e=a.findLastIndex(d);g.Wb(a.cards,e,0,d);c.Ja(a.B,e);a.eJ()}b.autoOpen?a.addCueRange(b.startMs,0x8000000000000,b.id,function(){a.C||(a.j=d,b3(a),Rcb(a,d),X2(a,"YOUTUBE_DRAWER_AUTO_OPEN",!1))}):(c=a.context.J.getCurrentTime()*1E3,c<5E3&&c>b.startMs&&Scb(a,d),a.addCueRange(b.startMs, b.startMs+1,b.id,function(){Scb(a,d)}),b3(a))}}},Qcb=function(a,b){switch(b.type){case "simple":a=a.Aa; var c=b.displayDomain?{I:"div",S:"iv-card-image-text",va:b.displayDomain}:void 0;var d=Bcb(b);c={I:"div",Na:["iv-card"],V:[{I:"a",S:"iv-click-target",X:{href:b.url?P2(b.url)||"":""},V:[S2(b.imageUrl,c),{I:"div",S:"iv-card-content",V:[R2("h2",void 0,b.title),d]}]}]};c=new g.U(c);T2(a,g.be("iv-click-target",c.element),b,b.url);b=c;break;case "collaborator":a=a.Aa;c={I:"div",Na:["iv-card","iv-card-channel"],V:[{I:"a",Na:["iv-click-target"],X:{href:P2(b.url)||"","data-ytid":b.channelId},V:[S2(b.profileImageUrl), {I:"div",S:"iv-card-content",V:[zcb(b),{I:"h2",S:"iv-card-primary-link",va:b.title},Acb(b)]}]}]};c=new g.U(c);T2(a,g.be("iv-click-target",c.element),b,b.url);b=c;break;case "playlist":a=a.Aa;c={I:"div",Na:["iv-card","iv-card-playlist"],V:[{I:"a",S:"iv-click-target",X:{href:P2(b.url)||""},V:[S2(b.ZH,{I:"div",S:"iv-card-image-overlay",V:[{I:"span",S:"iv-card-playlist-video-count",va:b.playlistVideoCount}]}),{I:"div",S:"iv-card-content",V:[zcb(b),R2("h2","iv-card-primary-link",b.title),Acb(b)]}]}]}; c=new g.U(c);T2(a,g.be("iv-click-target",c.element),b,b.url);b=c;break;case "productListing":a=a.Aa;var e=b.offers.length!=0;c=["iv-card"];d="";var f=Bcb(b);e&&(c.push("iv-card-product-listing"),d="iv-card-primary-link",f=b.offers[0],e=[],f.price&&e.push({I:"div",S:"iv-card-offer-price",va:f.price}),f.merchant&&e.push({I:"div",S:"iv-card-offer-merchant",va:f.merchant}),f={I:"div",V:e});e=b.url?P2(b.url)||"":"";c={I:"div",Na:c,X:{tabindex:"0"},V:[{I:"a",Na:["iv-card-image","iv-click-target"],X:{style:"background-image: url("+ b.imageUrl+");",href:e,"aria-hidden":"true",tabindex:"-1"}},{I:"div",S:"iv-card-content",V:[b.sponsored?{I:"div",S:"iv-card-sponsored",V:["Sponsored",{I:"div",S:"iv-ad-info-container",V:[{I:"div",S:"iv-ad-info",va:"{{adInfo}}"},{I:"div",S:"iv-ad-info-icon-container",V:[{I:"div",S:"iv-ad-info-icon"},{I:"div",S:"iv-ad-info-callout"}]}]}]}:"",{I:"a",S:"iv-click-target",X:{href:e},V:[R2("h2",d,b.title),f]}]}]};c=new g.U(c);d=g.he("span");g.qe(d,"You are seeing this product because we think it is relevant to the video. Google may be compensated by the merchant."); c.Dd(d,"adInfo");T2(a,g.be("iv-click-target",c.element),b,b.url);b=c;break;case "video":a=a.Aa;d=b.videoDuration?{I:"span",S:"iv-card-video-duration",va:b.videoDuration}:void 0;f=b.isLiveNow?{I:"span",Na:["yt-badge","yt-badge-live"],va:"LIVE NOW"}:null;e={I:"div",Na:["iv-card","iv-card-video"],V:[{I:"a",S:"iv-click-target",X:{href:((c=b.url)==null?void 0:P2(c))||""},V:[S2(b.ZH,d),{I:"div",S:"iv-card-content",V:[zcb(b),R2("h2","iv-card-primary-link",b.title),Acb(b),f]}]}]};c=new g.U(e);T2(a,g.be("iv-click-target", c.element),b,b.url);b=c;break;default:return null}return b},Tcb=function(a){if(a.j)return a.j.xf.type==="productListing"; if(a.J.L("enable_wn_infocards")){var b;return!((b=a.cards)==null||!b.length)&&g.ol(a.cards,function(c){return c.xf.type==="productListing"})}return g.ol(a.cards,function(c){return c.xf.type==="productListing"})},b3=function(a){g.Xo(a.J.getRootNode(),"ytp-cards-shopping-active",Tcb(a))},Scb=function(a,b){if(!g.So(a.J.getRootNode(),"ytp-cards-teaser-shown")){if(a.j!==b){var c=g.ow(),d=a.j?a.j.xf.Df:a.Df; c&&d&&g.Tw(c,[d]);a.j=b;b3(a)}(c=a.isInitialized&&a.Ib().style.display=="none")||(c=a.context.J.getPlayerState(),d=c===0&&a.context.J.getCurrentTime()===0,c=!(c===1||c===3||d));c||b.xf.teaserDurationMs&&a.J.nC(!0,{teaserText:b.xf.teaserText,durationMs:b.xf.teaserDurationMs,onClickCommand:b.xf.onClickCommand});a.fb.isActive()||((!a.C||!a.Fa.isActive()&&a.Ka)&&Rcb(a,b),a.fb.start(910+b.xf.teaserDurationMs))}},Rcb=function(a,b){a.Y.Gb?(b=new E2([0, a.B.scrollTop],[0,b.JO.offsetTop],600,Zbb),a.context.C.listen(b,"animate",function(c){a.B.scrollTop=c.y}),a.context.C.listen(b,"finish",function(c){a.B.scrollTop=c.y}),b.play()):(g.dx(a.Y,!0),a.B.scrollTop=b.JO.offsetTop,g.dx(a.Y,!1))},c3=function(a){return a.j&&a.j.xf?a.j.xf:a.cards[0]&&a.cards[0].xf?a.cards[0].xf:null},Jcb=function(a,b){return g.Lb(a.cards,function(c){return c.xf.id===b})},d3=function(a,b,c){U2.call(this,a,b); this.annotation=c;this.isActive=!1},Ucb=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()})},e3=function(a,b,c){d3.call(this,a,b,c); this.B=null;this.N=!1;this.C=null;this.D=!1;this.j=this.K=this.G=null},Vcb=function(a,b){var c=c===void 0?0:c; var d=Qbb(b).width;g.bm(b,d);c=new Xbb(b,[d,b.offsetTop],[d-d-c,b.offsetTop],200,Ybb);g.P(a,c);a.context.C.listen(c,"begin",function(){g.nm(b,!0)}); c.play()},Ycb=function(a,b){if(b.channel_name){var c=a.createElement({I:"div", Na:["iv-branding-context-name"],va:b.channel_name}),d=a.createElement({I:"div",Na:["iv-branding-context-subscribe"]}),e=b.standalone_subscribe_button_data;e&&(a.j=new g.SU(e.subscribeText,e.subscribeCount,e.unsubscribeText,e.unsubscribeCount,!!e.enabled,!!e.classic,b.channel_id,!!e.subscribed,e.feature,b.session_data.itct,a.context.J,!1),a.j.Ja(d));var f=a.createElement({I:"div",Na:["iv-branding-context-subscribe-caret"]}),h=a.createElement({I:"div",Na:["branding-context-container-inner"]});h.appendChild(f); h.appendChild(c);h.appendChild(d);g.nm(h,!1);var l=a.createElement({I:"div",Na:["branding-context-container-outer"]});l.appendChild(h);g.Vl(l,"right",b.image_width+"px");g.je(a.Ib(),l);a.C=new g.Lo(function(){Wcb(a,h,l)},500); g.P(a,a.C);a.context.j.listen(a.Ib(),"mouseover",function(){Xcb(a,h,l,f,b.image_height)}); a.context.j.listen(a.Ib(),"mouseout",function(){a.C.start()})}},Xcb=function(a,b,c,d,e){a.C.stop(); if(!a.D){var f=g.mm(b);a.j||(b.style.width=g.am(f.width,!0),c.style.width=g.am(f.width,!0));g.Vl(d,"top",f.height-Math.max(Math.min(f.height,e)/2+10,20)+"px");g.Vl(d,"right","1px");a.D=!0;g.nm(b,!0);a.G=new g.Lo(function(){g.To(this.Ib(),"iv-branding-active")},0,a); a.G.start()}},Wcb=function(a,b,c){g.Vo(a.Ib(),"iv-branding-active"); a.K=new g.Lo(function(){g.nm(b,!1);a.j||(c.style.width=g.am(0,!0))},250); a.K.start();a.D=!1},Zcb=function(a,b,c,d,e,f,h){this.j=a; this.C=b;this.W=c;this.videoData=d;this.logger=e;this.J=f;this.B=h},$cb=function(a,b,c){d3.call(this,a,b,c); var d=this;this.Z=this.isCollapsed=this.Y=!1;this.K=5E3;this.B=this.C=this.j=this.D=null;this.N=this.createElement({I:"div",Na:["iv-promo-contents"]});this.G=new g.Lo(function(){d.j.setAttribute("aria-hidden","true");g.nm(d.C,!1);g.nm(d.B,!0)},700,this); g.P(this,this.G)},cdb=function(a,b,c){c.stopPropagation(); adb(a);bdb(a,b);a.j.focus()},ddb=function(a){a.isCollapsed||a.Z||a.D||(g.To(a.Ib(),"iv-promo-collapsed"),a.isCollapsed=!0,a.G.start())},adb=function(a){a.G.stop(); a.isCollapsed&&(g.Wo(a.Ib(),["iv-promo-collapsed","iv-promo-collapsed-no-delay"]),a.isCollapsed=!1,a.j&&a.j.removeAttribute("aria-hidden"),g.nm(a.B,!1),g.nm(a.C,!0))},bdb=function(a,b){a.D||(a.D=g.Ke(function(){edb(this); ddb(this)},b,a))},edb=function(a){a.D&&(g.Ka.clearTimeout(a.D),a.D=null)},fdb=function(a){this.J=a},Lcb=function(a,b,c){b&&(c?f3(a,b.map(function(d){return g.lo(d,c)})):f3(a,b))},f3=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.w(b||[]); for(var m=b.next();!m.done;m=b.next())m=m.value,e++,g.Hu(m,f);d&&(e++,d!==0&&a.J.sendVideoStatsEngageEvent(d,f))},gdb=function(a){g.ST.call(this,a); var b=this;this.qa=this.Z=!1;this.loadNumber=0;this.K={};this.logger=new fdb(this.player);this.D=new g.iE(this);this.G=this.N=null;this.events=new g.iE(this);this.Zg=this.Y=this.j=null;this.ra=[];g.P(this,this.D);this.D.T(this.player,"onVideoAreaChange",function(){b.publish("onVideoAreaChange")}); this.D.T(this.player,"onHideControls",function(){b.publish("onHideControls")}); this.D.T(this.player,"onShowControls",function(){b.publish("onShowControls")}); this.D.T(this.player,"resize",function(d){b.publish("resize",d)}); this.D.T(this.player,"presentingplayerstatechange",function(d){b.publish("presentingplayerstatechange",d)}); this.subscribe("presentingplayerstatechange",this.E6,this);this.subscribe("resize",this.DL,this);this.player.U().Ka.subscribe("vast_info_card_add",this.I0,this);g.P(this,this.events);this.Aa=this.createElement({I:"div",S:"video-custom-annotations"});this.B=new g.U({I:"div",Na:["ytp-player-content","ytp-iv-player-content"]});g.P(this,this.B);g.oR(this.player,this.B.element,4);this.B.hide();this.C=new g.U({I:"div",Na:["ytp-iv-video-content"]});g.P(this,this.C);a=this.createElement({I:"div",S:"video-annotations"}); a.appendChild(this.Aa);this.C.element.appendChild(a);this.xv()&&this.load();var c=this.createElement({I:"style"});(g.$d("HEAD")[0]||document.body).appendChild(c);this.addOnDisposeCallback(function(){g.oe(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)},hdb=function(a){a=a.createElement({I:"div", Na:["annotation","annotation-type-custom"]});g.nm(a,!1);return a},idb=function(a,b){b=!b.isCued()&&!g.Z(b,1024); g.dx(a.B,b);g.dx(a.C,b)},jdb=function(a,b,c){a.Z=!0; a.G=g.mr(b,c)},kdb=function(a,b){for(var c={},d=g.w(b.attributes),e=d.next();!e.done;e=d.next())e=e.value,c[e.name]=e.nodeValue; for(d=0;d0&&(f=e.childNodes[0].nodeValue,c[e.tagName]=typeof f==="string"?f.trim():f);continue}else f=[],c[e.tagName]=f;e&&e.tagName==="TEXT"?e.childNodes.length===1&&e.childNodes[0].nodeType===3?f.push(e.childNodes[0].nodeValue):f.push(""):e&&f.push(kdb(a,e))}return c},odb=function(a){var b=a.player.getVideoData(); if(b.Xa){var c=a.player.U().Ka.get(b.videoId);if(c){var d={format:"XML",urlParams:{},method:"POST",withCredentials:!0,onFinish:function(e,f,h){e=a.loadNumber;f=b.videoId;a.loaded&&a.loadNumber===e&&a.player.getVideoData().videoId===f&&(h=g.br(h)&&h.responseXML?h.responseXML:null)&&ldb(a,h)}}; g.Ps()&&(d.onFinish=mdb(a,d.onFinish));d.postParams={ic_only:"1"};ndb(d,c);a.Z=!0;g.mr(b.Xa,d)}}},ndb=function(a,b){a.method="POST"; a.postParams=a.postParams||{};b.jJ&&(a.postParams.ic_coll=b.jJ);b.KO&&(a.postParams.ic_xml=b.KO);b.TM&&(a.postParams.ic_track=b.TM)},pdb=function(a){var b=new g.U({I:"div"}); g.nm(b.element,!1);var c=new Gcb(a.player,b.element,g3(a));g.P(c,b);b.Ja(a.B.element);c.JH();return c},rdb=function(a,b){var c,d; if(b=(c=b.getWatchNextResponse())==null?void 0:(d=c.cards)==null?void 0:d.cardCollectionRenderer)a.qa=!0,qdb(a,b),b.headerText&&a.Zg&&(c=g.hx(b.headerText),a.Zg.setAttribute("title",c))},g3=function(a){if(!a.Y){var b=new $bb(a); g.P(a,b);var c=new g.kk(a);g.P(a,c);a.Y=new Zcb(b,c,a.player.U(),a.player.getVideoData(),a.logger,a.player,a.Gj)}return a.Y},ldb=function(a,b){var c=!1,d=b.getElementsByTagName("annotations"); if(d&&!(d.length<1)&&(d=d[0].getAttribute("itct"))){var e=g.ow();if(e){var f=g.nw();f&&g.Iq(g.Jw)(void 0,e,f,[g.lw(d)])}}b=b.getElementsByTagName("annotation");for(d=0;d=h)e=f,d=h}d=xdb[e];this.B&&g.Vl(this.B.element,"outline-width",Math.max(b.width,b.height)+"px");for(b=0;b256||f>256?g.To(e.element,"ytp-ce-large-round"):m>96||f>96?g.To(e.element,"ytp-ce-medium-round"):g.To(e.element,"ytp-ce-small-round");g.Wo(e.element,zdb);m=h.left+h.width/2;h=h.top+l/2;g.To(e.element,m<=.5&&h<=.5?"ytp-ce-top-left-quad":m>.5&&h<=.5?"ytp-ce-top-right-quad": m<=.5&&h>.5?"ytp-ce-bottom-left-quad":"ytp-ce-bottom-right-quad");g.Wo(e.element,xdb);g.To(e.element,d);(e=g.ae(document,"div","ytp-ce-expanding-overlay-body",e.element)[0])&&g.Vl(e,"height",f+"px")}}}}}; g.k.onCueRangeEnter=function(a){if(this.endscreen)if(a.getId()==="ytp-ce-in-endscreen")N2(this,this.endscreen.impressionUrls),(a=g.ow())&&this.endscreen.visualElement&&g.Rw(a,this.endscreen.visualElement);else{a=a.getId().substring(15);var b=this.j[a],c=this.G[a];g.To(b.element,"ytp-ce-element-show");b.element.removeAttribute("aria-hidden");b=this.player.getRootNode();g.To(b,"ytp-ce-shown");N2(this,c.impressionUrls);(b=g.ow())&&g.Rw(b,c.visualElement);this.player.U().N&&this.player.ib("endscreenelementshown", a)}}; g.k.onCueRangeExit=function(a){if(a.getId()!=="ytp-ce-in-endscreen"){a=a.getId().substring(15);var b=this.j[a];g.Vo(b.element,"ytp-ce-element-show");b.element.setAttribute("aria-hidden","true");b=this.player.getRootNode();g.Vo(b,"ytp-ce-shown");this.player.U().N&&this.player.ib("endscreenelementhidden",a)}}; g.k.Lca=function(a){var b=this;a.target===window&&(new g.Lo(function(){for(var c=g.w(Object.values(b.j)),d=c.next();!d.done;d=c.next())g.Wo(d.value.element,["ytp-ce-force-expand","ytp-ce-element-hover","ytp-ce-element-shadow-show"])},0)).start()}; var wdb=[346,426,470,506,570,640,853,1280,1920],xdb="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(" "),zdb=["ytp-ce-top-left-quad","ytp-ce-top-right-quad","ytp-ce-bottom-left-quad","ytp-ce-bottom-right-quad"],ydb=["ytp-ce-small-round","ytp-ce-medium-round","ytp-ce-large-round"];var rcb={eha:"current",Ija:"new"};var tcb={CLOSE:"close",Nja:"openUrl",SUBSCRIBE:"subscribe"},ucb={Nga:"click",CLOSE:"close",fia:"hidden",Aka:"rollOut",Bka:"rollOver",Lka:"shown"};wcb.prototype.De=function(){var a=xcb(this,function(b){return b.type==="openUrl"&&b.url!=null}); return a?a.url:null}; var tdb={Vfa:"anchored",j4:"branding",CHANNEL:"channel",dha:"cta",iia:"highlightText",Xia:"label",PLAYLIST:"playlist",POPUP:"popup",Tka:"speech",SUBSCRIBE:"subscribe",hla:"title",VIDEO:"video",Qla:"website"},sdb={j4:"branding",Bga:"card",qha:"drawer",hia:"highlight",nja:"marker",jka:"promotion",TEXT:"text",uma:"widget"};g.z(U2,g.O);g.k=U2.prototype;g.k.addCueRange=function(a,b,c,d,e){a=new g.LC(a,b,{id:c,namespace:"annotations_module"});d&&this.Wa.set(a,d);e&&this.Ya.set(a,e);this.context.J.mf([a])}; g.k.JH=function(){this.context.B.subscribe("resize",this.eJ,this)}; g.k.Ib=function(){return this.element}; g.k.TN=function(a,b,c,d,e,f){if(this.ob)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.oe(this.Ib())}; g.k.eJ=function(){}; g.k.navigate=function(a,b,c,d){var e=this,f=P2(a);if(f){var h=Ecb(f,a.target),l=function(){a.j&&e.context.J.pauseVideo();var m=e.context.videoData.Gf||!1,n=g.Sq(f||"");m&&n&&(n.v||n.list)?e.context.J.tp(n.v,b,n.list,!1):g.Ey(f||"",h==="current"?"_top":void 0,b)}; h==="new"&&(l(),l=null);f3(this.context.logger,c,l,d);Dcb(f)||(c=g.ow(),d=b.itct,c&&d&&g.Uw(c,g.lw(d)))}}; g.k.xa=function(){this.Wa.clear();this.Ya.clear();g.O.prototype.xa.call(this)}; g.k.createElement=function(a){a=new g.U(a);g.P(this,a);return a.element};g.z(Gcb,U2);g.k=Gcb.prototype;g.k.mu=function(){this.ra&&Z2(this,this.ra)}; g.k.isAvailable=function(){var a;if(a=!!this.cards.length)(a=this.J.getRootNode())?(a=g.mm(a),a=173c.xf.startMs||a.xf.startMs===c.xf.startMs&&a.xf.timestamp>=c.xf.timestamp?!0:!1}); return b===-1?0:b+1}; g.k.F7=function(){if(this.C){f3(this.context.logger,c3(this).sj.close);var a=g.ow();a&&this.N&&g.Uw(a,this.N);Y2(this)}}; g.k.c8=function(){g.Xo(this.D,"iv-drawer-scrolled",this.B.scrollTop>0)}; g.k.C$=function(){var a=g.ow(),b=c3(this);b=b?b.Df:this.Df;a&&b&&g.Sw(a,[b])}; g.k.B$=function(){var a=g.ow(),b=c3(this);b=b?b.Df:this.Df;a&&b&&g.Tw(a,[b])}; g.k.D6=function(){var a=c3(this);f3(this.context.logger,a.sj.O2);var b=g.ow();if(b&&a)if(this.J.L("web_infocards_teaser_show_logging_fix")){var c=[];a.Xj&&c.push(a.Xj);a.Df&&c.push(a.Df);c.length>0&&g.Sw(b,c)}else g.Sw(b,[a.Xj,a.Df])}; g.k.D$=function(){var a=g.ow(),b=c3(this);a&&b&&g.Tw(a,[b.Xj])}; g.k.C6=function(a){var b=c3(this),c=g.ow();this.j?a?(a=this.context.logger,f3(a,b.sj.MM),a.J.sendVideoStatsEngageEvent(4,void 0),c&&b.Xj&&g.Uw(c,b.Xj)):(a=this.context.logger,f3(a,b.sj.MM),a.J.sendVideoStatsEngageEvent(4,void 0),c&&b.Df&&g.Uw(c,b.Df)):(a=this.context.logger,f3(a,b.sj.MM),a.J.sendVideoStatsEngageEvent(4,void 0),c&&this.Df&&g.Uw(c,this.Df))};g.z(d3,U2);d3.prototype.JH=function(){U2.prototype.JH.call(this);Ucb(this)}; d3.prototype.show=function(){U2.prototype.show.call(this);var a=g.ow(),b=this.annotation.data;a&&b&&(b=b.session_data)&&g.Sw(a,[g.lw(b.itct)])}; d3.prototype.hide=function(){U2.prototype.hide.call(this);var a=g.ow(),b=this.annotation.data;a&&b&&(b=b.session_data)&&g.Tw(a,[g.lw(b.itct)])};g.z(e3,d3); e3.prototype.Jy=function(){g.To(this.Ib(),"iv-branding");var a=this.annotation.data;this.B=this.createElement({I:"img",Na:["branding-img","iv-click-target"],X:{"aria-label":"Channel watermark",src:a.image_url,width:a.image_width,height:a.image_height}});g.nm(this.B,!1);var b=this.createElement({I:"button",Na:["branding-img-container","ytp-button"]});b.appendChild(this.B);this.Ib().appendChild(b);var c=this.annotation.De();c&&V2(this,b,c,this.annotation.id,a.session_data);this.context.J.L("disable_branding_context")||Ycb(this, a)}; e3.prototype.show=function(){if(!this.isActive&&(d3.prototype.show.call(this),this.N||(this.Jy(),this.N=!0),g.nm(this.Ib(),!0),this.isActive=!0,this.B)){try{Vcb(this,this.B)}catch(a){}g.To(this.context.J.getRootNode(),"ytp-branding-shown")}}; e3.prototype.hide=function(){this.isActive&&(d3.prototype.hide.call(this),g.nm(this.Ib(),!1),this.isActive=!1,g.Vo(this.context.J.getRootNode(),"ytp-branding-shown"))}; e3.prototype.destroy=function(){this.j&&(this.j.dispose(),this.j=null);d3.prototype.destroy.call(this)};g.z($cb,d3);g.k=$cb.prototype; g.k.Jy=function(){var a=this,b=this.annotation.data;if(this.annotation.style==="cta")var c=6;else if(this.annotation.style==="video"||this.annotation.style==="playlist")c=7;this.K=b.collapsedelay_ms||this.K;var d=["iv-promo","iv-promo-inactive"];this.Ib().setAttribute("aria-hidden","true");this.Ib().setAttribute("aria-label","Promotion");this.Ib().tabIndex=0;var e=this.annotation.De(),f=b.image_url;if(f){var h=this.createElement({I:"div",Na:["iv-promo-img","iv-click-target"]});f=this.createElement({I:"img", X:{src:f,"aria-hidden":"true"}});h.appendChild(f);b.video_duration&&!b.is_live?(f=this.createElement({I:"span",S:"iv-promo-video-duration",va:b.video_duration}),h.appendChild(f)):b.playlist_length&&(f=this.createElement({I:"span",S:"iv-promo-playlist-length",va:b.playlist_length.toString()}),h.appendChild(f));e&&V2(this,h,e,this.annotation.id,b.session_data,void 0,c)}e?(f=this.createElement({I:"a",S:"iv-promo-txt"}),g.Id(f,P2(e)),this.j=f):this.j=this.createElement({I:"div",S:"iv-promo-txt"});switch(this.annotation.style){case "cta":case "website":var l= this.createElement({I:"p",V:[{I:"strong",va:b.text_line_1}]});var m=this.createElement({I:"p",V:[{I:"span",S:"iv-promo-link",va:b.text_line_2}]});if(f=b.text_line_3){d.push("iv-promo-website-card-cta-redesign");var n=this.createElement({I:"button",Na:["iv-promo-round-expand-icon","ytp-button"]});f=this.createElement({I:"button",Na:["iv-button","iv-promo-button"],V:[{I:"span",S:"iv-button-content",va:f}]});var p=this.createElement({I:"div",S:"iv-promo-button-container"});p.appendChild(f);e&&V2(this, this.Ib(),e,this.annotation.id,b.session_data,void 0,c)}g.To(this.j,"iv-click-target");e&&V2(this,this.j,e,this.annotation.id,b.session_data,void 0,c);break;case "playlist":case "video":l=this.createElement({I:"p",V:[{I:"span",va:b.text_line_1}]}),m=this.createElement({I:"p",V:[{I:"strong",va:b.text_line_2}]}),b.is_live&&(l=m,m=this.createElement({I:"span",Na:["yt-badge","iv-promo-badge-live"],va:"LIVE NOW"})),g.To(this.j,"iv-click-target"),e&&V2(this,this.j,e,this.annotation.id,b.session_data,void 0, c),d.push("iv-promo-video")}l&&this.j.appendChild(l);m&&this.j.appendChild(m);this.N.appendChild(this.j);p&&this.N.appendChild(p);c=this.createElement({I:"div",S:"iv-promo-actions"});this.B=this.createElement({I:"button",Na:["iv-promo-expand","ytp-button"]});this.B.title="Expand";this.context.j.listen(this.B,"click",function(q){cdb(a,5E3,q)}); c.appendChild(this.B);g.nm(this.B,!1);this.context.j.listen(this.Ib(),"mouseover",this.D9,this);this.context.j.listen(this.Ib(),"mouseout",this.C9,this);this.context.j.listen(this.Ib(),"touchend",function(q){cdb(a,5E3,q)}); this.C=this.createElement({I:"button",Na:["iv-promo-close","ytp-button"]});this.C.title="Close";this.context.j.listen(this.C,"click",this.annotation.style==="cta"&&b.text_line_3?this.y9:this.x9,this);c.appendChild(this.C);g.Uo(this.Ib(),d);h&&(g.je(this.Ib(),h),n&&h.appendChild(n));g.je(this.Ib(),this.N);g.je(this.Ib(),c)}; g.k.show=function(){this.isActive||(d3.prototype.show.call(this),this.Y||(this.Jy(),this.Y=!0),g.nm(this.Ib(),!0),g.Ke(function(){g.Vo(this.Ib(),"iv-promo-inactive")},100,this),this.Ib().removeAttribute("aria-hidden"),this.isActive=!0,edb(this),adb(this),bdb(this,this.K))}; g.k.hide=function(){this.isActive&&(g.To(this.Ib(),"iv-promo-inactive"),this.isActive=!1,this.Ib().setAttribute("aria-hidden","true"))}; g.k.TN=function(a,b,c,d,e,f){return this.isCollapsed?!1:d3.prototype.TN.call(this,a,b,c,d,e,f)}; g.k.D9=function(a){this.Z=!0;cdb(this,500,a)}; g.k.C9=function(){this.Z=!1;ddb(this)}; g.k.x9=function(a){a.stopPropagation();this.hide()}; g.k.y9=function(a){a.stopPropagation();edb(this);this.isCollapsed=!0;g.To(this.Ib(),"iv-promo-collapsed-no-delay");this.G.start()}; g.k.destroy=function(){this.G.dispose();d3.prototype.destroy.call(this)};g.z(gdb,g.ST);g.k=gdb.prototype;g.k.Wh=function(a,b){if(!vdb(this.player.U().playerStyle))return null;switch(a){case "loadCustomAnnotationsXml":return(a=g.Z0(b))&&ldb(this,a),!0;case "removeCustomAnnotationById":return b&&this.j&&(Kcb(this.j,b),z2(this.player)),!0}return null}; g.k.getOptions=function(){return vdb(this.player.U().playerStyle)?["loadCustomAnnotationsXml","removeCustomAnnotationById"]:[]}; g.k.xv=function(){var a=this.player.U(),b=this.player.getVideoData(),c=a.annotationsLoadPolicy||b.annotationsLoadPolicy;return g.JQ(b)||g.XQ(this.player.app)?!1:c===1&&!b.U0||a.Ka.get(b.videoId)||g.wQ(b)||g.xQ(b)?!0:!1}; g.k.DL=function(){if(this.C){var a=this.player.qb().getVideoContentRect(!0);g.fm(this.C.element,a.width,a.height);g.bm(this.C.element,a.left,a.top)}if(this.j){var b=this.player.ao();a=this.j;b=b.width;g.Xo(a.D,"iv-drawer-small",b<=426);g.Xo(a.D,"iv-drawer-big",b>=1280)}}; g.k.E6=function(a){idb(this,a.state);g.Z(a.state,2)&&(this.vl()&&this.Hp()&&this.player.getPresentingPlayerType()!==2&&this.oC(!1),this.nC(!1))}; g.k.load=function(){function a(h){var l=b.loadNumber;b.G=null;b.loaded&&b.loadNumber===l&&b.player.getVideoData().videoId===d&&(h=g.br(h)&&h.responseXML?h.responseXML:null)&&(ldb(b,h),g.To(b.player.getRootNode(),"iv-module-loaded"))} var b=this;g.ST.prototype.load.call(this);idb(this,this.player.getPlayerStateObject());this.loadNumber++;var c=this.player.getVideoData(),d=c.videoId;g.Ps()&&(a=mdb(this,a));var e={format:"XML",onFinish:a,onError:function(){b.G=null}, urlParams:{}};c.isPharma&&(e.urlParams.pharma="1");e.method="POST";e.withCredentials=!0;var f=this.player.U().Ka.get(d);f&&ndb(e,f);f=f&&(f.KO||f.jJ);if(!c.Uv||f)c.Xa?jdb(this,c.Xa,e):(this.N=function(){if(!b.Z)b.onVideoDataChange(e);var h=b.player.getVideoData();(h==null?0:g.vQ(h))&&!b.qa&&rdb(b,h)},this.player.addEventListener("videodatachange",this.N)); g.oR(this.player,this.C.element,4);this.DL();(f=g.wQ(c))&&qdb(this,f);(f=g.xQ(c))&&f.featuredChannel&&udb(this,f.featuredChannel,f.annotationId||"branding",c.videoId||null,c.eventId||null);this.Zg=g.ce("ytp-cards-button",this.player.getRootNode());g.vQ(c)&&rdb(this,c)}; g.k.onVideoDataChange=function(a){var b=this.player.getVideoData();b.Xa&&jdb(this,b.Xa,a)}; g.k.unload=function(){this.player.sf("annotations_module");for(var a=g.w(Object.keys(this.K)),b=a.next();!b.done;b=a.next())this.K[b.value].destroy();this.Y=null;this.j&&(this.j.destroy(),this.j=null,z2(this.player));this.Z=!1;this.G&&(this.G.abort(),this.G=null);this.qa=!1;this.K={};this.B.hide();g.ST.prototype.unload.call(this);this.C.detach();this.N&&(this.player.removeEventListener("videodatachange",this.N),this.N=null)}; g.k.I0=function(a){a===this.player.getVideoData().videoId&&(this.loaded?odb(this):this.load())}; g.k.vl=function(){var a;return((a=this.j)==null?void 0:a.isAvailable())||this.qa}; g.k.Hp=function(){return!!this.j&&this.j.C}; g.k.oC=function(a,b,c){b=b===void 0?!1:b;this.vl();this.j&&(a?c?X2(this.j,c,b):X2(this.j,"YOUTUBE_DRAWER_AUTO_OPEN",b):Y2(this.j))}; g.k.nC=function(a,b){this.player.publish(a?"cardsteasershow":"cardsteaserhide",b)}; g.k.xa=function(){this.player.U().Ka.unsubscribe("vast_info_card_add",this.I0,this);g.Vo(this.player.getRootNode(),g.tX.IV_DRAWER_OPEN);for(var a=this.ra,b=g.Eo,c=0,d=a.length;c