c95d6e938d37501dd1ed591da1cc22ce1d61524dc15e19e27d77132410c16e63

Source Code:

(function(g){var window=this;/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
var p2=function(a){a.V("cardstatechange",g.CT(a)&&g.DT(a)?1:0)},jDa=function(a){var b=g.yg(a);
a=g.Eg(a);return new g.dg(b.x,b.y,a.width,a.height)},kDa=function(a){return Math.pow(a,3)},lDa=function(a){return 3*a*a-2*a*a*a},s2=function(a){a=g.Ra(a);
delete q2[a];g.Rb(q2)&&r2&&r2.stop()},nDa=function(){r2||(r2=new g.F(function(){mDa()},20));
var a=r2;a.isActive()||a.start()},mDa=function(){var a=g.A();
g.Eb(q2,function(b){oDa(b,a)});
g.Rb(q2)||nDa()},t2=function(a,b,c,d){g.xn.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.u=a;this.K=b;this.duration=c;this.F=d;this.coords=[];this.progress=this.J=0;this.D=null},oDa=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.J=1E3/(b-a.D);a.D=b;pDa(a,a.progress);1==a.progress?(a.Ja=0,s2(a),a.ag(),a.wr()):a.Fb()&&a.uy()},pDa=function(a,b){"function"===typeof a.F&&(b=a.F(b));
a.coords=Array(a.u.length);for(var c=0;c<a.u.length;c++)a.coords[c]=(a.K[c]-a.u[c])*b+a.u[c]},qDa=function(a,b){g.Dl.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.J;this.state=b.Ja},u2=function(a,b,c,d,e){t2.call(this,b,c,d,e);
this.element=a},v2=function(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");
u2.call(this,a,b,c,d,e)},w2=function(a){g.B.call(this);
this.B=a||window;this.u=[]},x2=function(a){return a.baseUrl||null},y2=function(a,b){return g.He(g.Mc(a,b,void 0),function(c){return!!c})},rDa=function(a,b,c){function d(Pa){var Sa,$a,lc,Yb=Pa.hovercardButton;
if(!Yb)return null;Yb=Yb.subscribeButtonRenderer;if(!Yb)return null;var Pe=f(Yb.unsubscribedButtonText),re=f(Yb.subscribedButtonText);if(Yb.subscribed){var nf=f(Yb.subscriberCountWithUnsubscribeText);var Uf=f(Yb.subscriberCountText)}else nf=f(Yb.subscriberCountText),Uf=f(Yb.subscriberCountWithSubscribeText);var Oc=null;return Pa.signinEndpoint&&(Oc=g.Mb(Pa,"signinEndpoint","webNavigationEndpointData","url"),Oc||(Oc=null===(lc=null===($a=null===(Sa=Yb.signInEndpoint)||void 0===Sa?void 0:Sa.commandMetadata)||
void 0===$a?void 0:$a.webCommandMetadata)||void 0===lc?void 0:lc.url),!Oc)?null:Pe&&(re||Oc)?{subscribed:Yb.subscribed,subscribeText:Pe,subscribeCount:nf,unsubscribeText:re,unsubscribeCount:Uf,enabled:Yb.enabled,signinUrl:Oc,classic:Pa.useClassicSubscribeButton}:null}
function e(Pa){if(Pa){var Sa=[],$a=Pa.videoId;$a&&Sa.push("v="+$a);($a=Pa.playlistId)&&Sa.push("list="+$a);(Pa=Pa.startTimeSeconds)&&Sa.push("t="+Pa);return"/watch?"+Sa.join("&")}}
function f(Pa){if(!Pa)return null;var Sa=Pa.simpleText;return Sa?Sa:Pa.runs?g.Mc(Pa.runs,function($a){return $a.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,E=null,D=null,G=null,I=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=g.Mb(l,"browseEndpoint","browseId"))w=x,m="/channel/"+w;n=!1;p="new";(x=!!b.isSubscribe)?y=d(b):E=f(b.subscribersText)}else"WEBSITE"===
h?((D=g.Mb(l,"urlEndpoint","url"))&&(m=D),n=!0,p="new",D=b.icon.thumbnails[0].url):"CREATOR_MERCHANDISE"===h&&(b.productPrice&&(G=f(b.productPrice)),b.additionalFeesText&&(I=f(b.additionalFeesText)),(n=g.Mb(l,"urlEndpoint","url"))&&(m=n),n=!0,p="new");a=g.Mb(b,"title","accessibility","accessibilityData","label");var H=b.endpoint?b.endpoint.clickTrackingParams:null,Ba="";if(b.metadata){var la=f(b.metadata);la&&(Ba=la)}return{id:"element-"+c,type:h,title:f(b.title),metadata:Ba,callToAction:f(b.callToAction),
MC:b.image,iconUrl:D,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:E,isSubscribe:x,targetUrl:m||null,uL:n,wd:H?{itct:H}:null,pS:p,Hp:a?a:null,xL:b.isPlaceholder,impressionUrls:y2(b.impressionUrls||[],x2),mL:y2(b.hovercardShowUrls||[],x2),clickUrls:y2(l.loggingUrls||[],x2),visualElement:g.Tt(b.trackingParams),
productPrice:G,additionalFeesText:I}},z2=function(a,b){var c={startMs:Math.floor(Number(a.startMs)),
impressionUrls:y2(a.impressionUrls||[],x2),elements:y2(a.elements||[],function(d,e){return rDa(b,d,e)})};
a.trackingParams&&(c.visualElement=g.Tt(a.trackingParams));return c},A2=function(a){g.tS.call(this,a);
this.C=this.endscreen=null;this.u={};this.F={};this.D=this.B=null;this.K=[];this.S=!0;this.J=0;a=a.T();this.P=g.CD(a)||g.ED(a);this.events=new g.dR(this);g.C(this,this.events);this.events.N(this.player,g.TF("creatorendscreen"),this.kM);this.events.N(this.player,g.UF("creatorendscreen"),this.lM);this.events.N(this.player,"resize",this.Ua);this.events.N(window,"focus",this.rR);this.load();var b=g.Ce("STYLE");(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(b);g.Yf(this,function(){g.Ge(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))},sDa=function(a){return a.player.getVideoData().oc?"current":a.P?"new":"current"},B2=function(a){return"creator-endscreen-editor"===a.player.T().playerStyle},tDa=function(a){var b=a.player.getVideoData(),c=b.videoId;
a.C&&a.C.abort();c={method:"POST",ag:function(e){var f=a.C=null;200===e.status&&(e=e.responseText,")]}"===e.substring(0,3)&&(e=e.substring(3),f=JSON.parse(e),f=z2(f,sDa(a))));C2(a,f)},
sj:{v:c},withCredentials:!0};a.P&&(c.sj.ptype="embedded");var d=b.Bt;d&&(c.pc={ad_tracking:d});if(b=g.zI(b))if(b=g.Hc(b),b=g.Dc(b))a.C=g.sq(b,c)},C2=function(a,b,c){c=void 0===c?!0:c;
g.GT(a.player,"creatorendscreen");a.B&&(a.B.dispose(),a.B=null,a.D.dispose(),a.D=null);for(var d=g.q(Object.values(a.u)),e=d.next();!e.done;e=d.next())e.value.dispose();a.u={};a.F={};0<a.K.length&&(a.K.forEach(function(l){l.dispose()}),a.K.length=0);
a.J=0;if((a.endscreen=b)&&b.elements){c&&uDa(a);c=[];d=new g.QF(b.startMs,0x7ffffffffffff,{id:"ytp-ce-in-endscreen",namespace:"creatorendscreen"});c.push(d);a.player.T().u||(a.B=new g.U({G:"div",L:"ytp-ce-shadow"}),g.lP(a.player,a.B.element,4),a.D=new g.ZN(a.B,200));for(d=0;d<b.elements.length;++d){e=b.elements[d];var f=vDa(a,e);if(f){a.u[e.id]=f;a.F[e.id]=e;g.lP(a.player,f.element,4);var h=new g.QF(e.startMs,e.endMs,{id:"ytp-ce-element-"+e.id,namespace:"creatorendscreen"});c.push(h);wDa(a,f,e)}else g.gr(new g.nr("buildEndscreenElement null",
e))}g.lN(a.player,c);a.Ua()}},uDa=function(a){var b=g.Xt(),c=g.Zt();
c&&b&&a.endscreen.visualElement&&g.lu(c,b,a.endscreen.visualElement)},vDa=function(a,b){var c=null;
switch(b.type){case "VIDEO":c=a.player.aa("player_endscreen_ellipsis_fix")?["ytp-webkit-ellipsis"]:["yt-ui-ellipsis","yt-ui-ellipsis-2"];c={G:"div",ka:["ytp-ce-element","ytp-ce-video"],U:{tabindex:"0","aria-label":b.Hp||"","aria-hidden":"true"},R:[{G:"div",L:"ytp-ce-element-shadow"},{G:"div",L:"ytp-ce-covering-image",U:D2(b)},{G:"div",L:"ytp-ce-covering-shadow-top"},{G:"a",L:"ytp-ce-covering-overlay",U:{href:E2(a,b.targetUrl),tabindex:"-1"},R:[{G:"div",ka:["ytp-ce-video-title"].concat(g.ma(c)),U:{dir:g.Dn(b.title||
"")},Z:b.title},{G:"div",L:"ytp-ce-video-duration",Z:b.videoDuration||void 0}]}]};c=new g.U(c);break;case "PLAYLIST":c=a.player.aa("player_endscreen_ellipsis_fix")?["ytp-webkit-ellipsis"]:["yt-ui-ellipsis","yt-ui-ellipsis-2"];c={G:"div",ka:["ytp-ce-element","ytp-ce-playlist"],U:{tabindex:"0","aria-label":b.Hp||"","aria-hidden":"true"},R:[{G:"div",L:"ytp-ce-element-shadow"},{G:"div",L:"ytp-ce-covering-image",U:D2(b)},{G:"div",L:"ytp-ce-covering-shadow-top"},{G:"a",L:"ytp-ce-covering-overlay",U:{href:E2(a,
b.targetUrl),tabindex:"-1"},R:[{G:"div",ka:["ytp-ce-playlist-title"].concat(g.ma(c)),U:{dir:g.Dn(b.title||"")},Z:b.title},{G:"div",L:"ytp-ce-playlist-count",R:[{G:"div",L:"ytp-ce-playlist-icon"},{G:"div",L:"ytp-ce-playlist-count-text",Z:b.playlistLength||void 0}]}]}]};c=new g.U(c);break;case "CHANNEL":c={G:"div",ka:["ytp-ce-element","ytp-ce-channel",b.isSubscribe?"ytp-ce-channel-this":"ytp-ce-channel-that"],U:{tabindex:"0","aria-label":b.Hp||"","aria-hidden":"true"},R:[{G:"div",L:"ytp-ce-element-shadow"},
{G:"div",L:"ytp-ce-expanding-overlay",R:[{G:"div",L:"ytp-ce-expanding-overlay-hider"},{G:"div",L:"ytp-ce-expanding-overlay-background"},{G:"div",L:"ytp-ce-expanding-overlay-content",R:[{G:"div",L:"ytp-ce-expanding-overlay-body",R:[{G:"div",L:"ytp-ce-expanding-overlay-body-padding",R:[{G:"a",ka:["ytp-ce-channel-title","ytp-ce-link"],U:{href:E2(a,b.targetUrl),target:"_blank",tabindex:"-1",dir:g.Dn(b.title||"")},Z:b.title},b.subscribeButton?{G:"div",L:"ytp-ce-subscribe-container",R:[{G:"div",L:"ytp-ce-channel-subscribe"}]}:
"",b.subscribersText?{G:"div",L:"ytp-ce-channel-subscribers-text",Z:b.subscribersText}:"",b.metadata?{G:"div",ka:["ytp-ce-channel-metadata","yt-ui-ellipsis","yt-ui-ellipsis-3"],Z:b.metadata}:""]}]}]}]},{G:"div",L:"ytp-ce-expanding-image",U:D2(b)}]};c=new g.U(c);var d=g.ne(document,"div","ytp-ce-channel-subscribe",c.element)[0];if(b.subscribeButton&&b.channelId){g.J(d,"ytp-ce-subscribe-button");if(a.player.T().u){var e=null;var f=b.wd.itct}else e="endscreen",f=null;e=new g.SU(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.K.push(e)}break;case "WEBSITE":c={G:"div",ka:["ytp-ce-element","ytp-ce-website"],U:{tabindex:"0","aria-label":b.Hp||"","aria-hidden":"true"},R:[{G:"div",L:"ytp-ce-element-shadow"},{G:"div",L:"ytp-ce-expanding-overlay",R:[{G:"div",L:"ytp-ce-expanding-overlay-hider"},
{G:"div",L:"ytp-ce-expanding-overlay-background"},{G:"div",L:"ytp-ce-expanding-overlay-content",R:[{G:"div",L:"ytp-ce-expanding-overlay-body",R:[{G:"div",L:"ytp-ce-expanding-overlay-body-padding",R:[{G:"div",L:"ytp-ce-website-title",U:{dir:g.Dn(b.title||"")},Z:b.title},{G:"div",L:"ytp-ce-website-metadata",Z:b.metadata},{G:"a",ka:["ytp-ce-website-goto","ytp-ce-link"],U:{href:E2(a,b.targetUrl),target:"_blank",tabindex:"-1"},Z:b.callToAction}]}]}]}]},{G:"div",L:"ytp-ce-expanding-image",U:D2(b)},{G:"div",
L:"ytp-ce-expanding-icon",U:xDa(b.iconUrl)}]};c=new g.U(c);break;case "CREATOR_MERCHANDISE":c="",b.productPrice&&(c={G:"div",L:"ytp-ce-merchandise-price-container",R:[{G:"div",L:"ytp-ce-merchandise-price",Z:b.productPrice}]},b.additionalFeesText&&c.R.push({G:"div",L:"ytp-ce-merchandise-additional-fees",Z:b.additionalFeesText})),c={G:"div",ka:["ytp-ce-element","ytp-ce-merchandise"],U:{tabindex:"0","aria-label":b.Hp||"","aria-hidden":"true"},R:[{G:"div",L:"ytp-ce-element-shadow"},{G:"div",L:"ytp-ce-expanding-overlay",
R:[{G:"div",L:"ytp-ce-expanding-overlay-hider"},{G:"div",L:"ytp-ce-expanding-overlay-background"},{G:"div",L:"ytp-ce-expanding-overlay-content",R:[{G:"div",L:"ytp-ce-expanding-overlay-body",R:[{G:"div",L:"ytp-ce-expanding-overlay-body-padding",R:[{G:"div",L:"ytp-ce-merchandise-title",U:{dir:g.Dn(b.title||"")},Z:b.title},c,{G:"div",L:"ytp-ce-merchandise-metadata",Z:b.metadata},{G:"a",ka:["ytp-ce-merchandise-goto","ytp-ce-link"],U:{href:E2(a,b.targetUrl),target:"_blank",tabindex:"-1"},Z:b.callToAction}]}]}]}]},
{G:"div",L:"ytp-ce-expanding-image",U:D2(b)},{G:"div",L:"ytp-ce-merchandise-invideo-cta-container",R:[{G:"div",L:"ytp-ce-merchandise-invideo-cta",Z:b.callToAction||void 0}]}]},c=new g.U(c)}b.xL&&g.J(c.element,"ytp-ce-placeholder");return c},D2=function(a){if(a.MC)var b=a.MC.thumbnails;
return xDa(b?b[b.length-1].url:null)},xDa=function(a){return a?{style:"background-image: url("+a+")"}:{}},wDa=function(a,b,c){function d(m){m&&(b.xa("blur",function(){"none"!=m.style.display&&a.S&&m.focus()}),b.N(m,"focus",f),b.N(m,"blur",h))}
function e(m){a.J+=m;0<a.J?(g.J(b.element,"ytp-ce-force-expand"),F2(a,c.id,!0)):(g.un(b.element,"ytp-ce-force-expand"),g.un(b.element,"ytp-ce-element-hover"),F2(a,c.id,!1))}
function f(){e(1)}
function h(){e(-1)}
b.xa("mouseenter",function(){G2(a,b,c)});
b.xa("mouseleave",function(){H2(a,b,c)});
a.player.T().u||b.xa("click",function(){g.J(b.element,"ytp-ce-element-hover")});
b.xa("click",function(m){yDa(a,c,m)});
b.xa("keypress",function(m){yDa(a,c,m)});
b.xa("focus",function(){G2(a,b,c)});
b.xa("blur",function(){H2(a,b,c)});
b.xa("touchstart",function(){G2(a,b,c)});
var l=g.pe("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.un(b.element,"ytp-ce-element-hover");g.un(b.element,"ytp-ce-force-expand")});
b.xa("keydown",function(m){a.S=9===m.keyCode&&!m.shiftKey});
d(g.pe("ytp-sb-subscribe",b.element));d(g.pe("ytp-sb-unsubscribe",b.element));b.xa("focus",f);b.xa("blur",h)},yDa=function(a,b,c){if(b.targetUrl&&(!c||"keypress"!==c.type||13===c.keyCode)){for(var d=c.target;d&&!g.sn(d,"ytp-ce-element");){g.sn(d,"subscribe-label")&&I2(a,b);
if(g.sn(d,"ytp-ce-channel-subscribe"))return;d=g.Ie(d)}if(!d||g.sn(d,"ytp-ce-element-hover")){c.preventDefault();c.stopPropagation();if(d=a.u[b.id])H2(a,d,b),d.element.blur();if(c.ctrlKey||c.metaKey||"new"===b.pS)I2(a,b),a.player.sendVideoStatsEngageEvent(17,void 0),a.player.pauseVideo(),c=g.Hc(E2(a,b.targetUrl)),c=g.Dc(c),g.eL(c,void 0,b.wd);else{var e=a.player.getVideoData().oc,f=function(){var h=E2(a,b.targetUrl),l=b.wd,m=g.aq(h);e&&m&&(m.v||m.list)?g.qT(a.player,m.v,l,m.list,!1):g.dL(h,l)};
I2(a,b,function(){a.player.sendVideoStatsEngageEvent(17,f)})}}}},E2=function(a,b){var c=a.player.T();
if(b){if(b.startsWith("//"))return c.protocol+":"+b;if(b.startsWith("/"))return g.hE(c)+b}else return"";return b},G2=function(a,b,c){g.sn(b.element,"ytp-ce-element-hover")||("VIDEO"===c.type||"PLAYLIST"===c.type?g.J(b.element,"ytp-ce-element-hover"):a.player.T().u?(new g.F(function(){g.J(b.element,"ytp-ce-element-hover")},200)).start():g.J(b.element,"ytp-ce-element-hover"),J2(a,c.mL),F2(a,c.id,!0))},H2=function(a,b,c){g.un(b.element,"ytp-ce-element-hover");
g.un(b.element,"ytp-ce-force-expand");F2(a,c.id,!1)},F2=function(a,b,c){a.B&&(c?a.D.show():a.D.hide());
for(var d=g.q(Object.keys(a.u)),e=d.next();!e.done;e=d.next())e=e.value,e!==b&&g.K(a.u[e].element,"ytp-ce-element-shadow-show",c)},J2=function(a,b,c){function d(){f||(e++,e===b.length&&(h.stop(),c&&c()))}
if(!b||0===b.length||B2(a))c&&c();else{b=zDa(a,b);var e=0,f=!1,h=new g.F(function(){f=!0;c&&c()},1E3,a);
h.start();for(a=0;a<b.length;a++)g.yu(b[a],d)}},I2=function(a,b,c){J2(a,b.clickUrls,c);
(a=g.Zt())&&b.uL&&g.ou(a,b.visualElement)},zDa=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(ADa(b[e],c));return d},ADa=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})},BDa=function(a){return Array.isArray(a)&&a.length?a[0]:a},K2=function(a){return"string"===typeof a?a:""},L2=function(a,b,c){for(var d in b)if(b[d]===a)return a;
return c},CDa=function(a){this.externalId=a},DDa=function(a,b,c,d){this.value=a;
this.target=b;this.showLinkIcon=c;this.u=d},M2=function(a){return a.value?a.value:null},N2=function(a){if(!a)return null;
var b=g.Hc(K2(a.value));b=g.Dc(b);if(!b)return null;var c=L2(a.target,EDa,"current");if(null==c)a=null;else{var d=a.show_link_icon;a=new DDa(b,c,"true"===d||"false"===d?"true"===d:!0,null!=a.pause_on_navigation?a.pause_on_navigation:!0)}return a},FDa=function(a,b,c,d){this.type=a;
this.trigger=b;this.url=c;this.subscribeData=d},IDa=function(a){if(!a)return null;
var b=L2(a.type,GDa),c=L2(a.trigger,HDa),d=BDa(a.url);d=N2(d?d:null);a=BDa(a.subscribeData);var e=a?a:null;e?(a=K2(e.external_user_id),e=K2(e.subscription_token),a=a&&e?new CDa(a):null):a=null;return b?new FDa(b,c,d,a):null},JDa=function(a,b,c,d,e){this.id=a;
this.type=b;this.style=c;this.data=e;this.action=d||[]},LDa=function(a){return(a=KDa(a,function(b){return"openUrl"===b.type&&null!=b.url}))?a.url:null},KDa=function(a,b){return g.fb(a.action,b,void 0)},MDa=function(a,b){this.context=a;
this.u=b},P2=function(a){return a.customMessage?O2("div","iv-card-message",a.customMessage):""},Q2=function(a,b){var c="background-image: url("+a+");",d=[];
b&&d.push(b);return{G:"div",L:"iv-card-image",U:{style:c},R:d}},R2=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(O2("li","",c.value));return{G:"ul",L:"iv-card-meta-info",R:b}},O2=function(a,b,c){b?"string"===typeof b?b={"class":b}:Array.isArray(b)&&(b={"class":b.join(" ")}):b={};
b.dir=g.Dn(c);return{G:a,U:b,Z:c}},NDa=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.Dn(a.customMessage);var d=[{G:"span",Z:a.customMessage}];a.showLinkIcon&&(d.push("\u00a0"),d.push({G:"span",L:"iv-card-link-icon"}));return{G:"div",ka:b,U:c,R:d}},S2=function(a,b,c,d){if(d){b=g.q(b);
for(var e=b.next();!e.done;e=b.next())a.u(e.value,d,c.id,c.wd,c.Pf.click,5)}},ODa=function(a,b){this.merchant=a;
this.price=b},PDa=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},QDa=function(a,b){return b?b:PDa(a)?"current":"new"},T2=function(a,b){g.B.call(this);
var c=this;this.element=a;this.context=b;this.Ta=!1;this.Ba=new Map;this.Ma=new Map;this.context.I.addEventListener(g.TF("annotations_module"),function(d){(d=c.Ba.get(d))&&d.apply(c)});
this.context.I.addEventListener(g.UF("annotations_module"),function(d){(d=c.Ma.get(d))&&d.apply(c)})},U2=function(a,b,c,d,e,f,h){a.context.u.xa(b,"click",function(l){a.sz(c,d,e,f||[],h||0,l)});
a.context.u.xa(b,"touchstart",function(){a.Ta=!1});
a.context.u.xa(b,"touchmove",function(){a.Ta=!0})},RDa=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},V2=function(a,b,c){return{PD:(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||""}),
aI:(b.impressionLoggingUrlsV2s||[]).map(function(d){return d.baseUrl||""}),
rw:(b.clickLoggingUrlsV2s||[]).map(function(d){return d.baseUrl||""})}},Y2=function(a,b,c){T2.call(this,b,c);
var d=this;this.I=a;this.eventId=null;this.ga=this.vb=this.C=this.Vd=!1;this.la=null;this.cards=[];this.Za=this.P=this.ra=this.F=this.na=this.u=null;this.X=[];this.K=this.Id=this.fa=null;this.J=0;this.da=new g.F(g.Ka,c.W.Rf?4E3:3E3);g.C(this,this.da);this.Pa=new g.F(g.Ka);g.C(this,this.Pa);this.Y=new MDa(c,function(e,f,h,l,m,n){U2(d,e,f,h,l,m,n)});
this.S=new g.U({G:"div",L:"iv-drawer",U:{id:"iv-drawer"},R:[{G:"div",L:"iv-drawer-header",U:{"aria-role":"heading"},R:[{G:"span",L:"iv-drawer-header-text"},{G:"button",ka:["iv-drawer-close-button","ytp-button"],U:{"aria-label":"\u30ab\u30fc\u30c9\u3092\u9589\u3058\u308b",tabindex:"0"}}]},{G:"div",L:"iv-drawer-content"}]});g.C(this,this.S);this.D=this.S.element;this.Ha=new g.ZN(this.S,330);g.C(this,this.Ha);this.qb=g.pe("iv-drawer-header-text",this.D);this.B=g.pe("iv-drawer-content",this.D);this.addCueRange(0,
1E3*c.videoData.lengthSeconds,"",function(){d.vb&&W2(d,"YOUTUBE_DRAWER_AUTO_OPEN")},function(){(d.vb=d.C)&&X2(d)})},SDa=function(a,b){var c=b.data;
c.autoOpenMs&&a.addCueRange(c.autoOpenMs,0x8000000000000,"",function(){W2(a,"YOUTUBE_DRAWER_AUTO_OPEN")});
c.autoCloseMs&&a.addCueRange(c.autoCloseMs,0x8000000000000,"",function(){X2(a)});
var d=c.headerText;g.Ke(a.qb,d);a.P&&a.P.setAttribute("title",d);c.eventId&&(a.eventId=c.eventId);a.fa=g.Tt(c.trackingParams);a.K=g.Tt(c.closeTrackingParams);a.Id=g.Tt(c.iconTrackingParams)},TDa=function(a,b){var c=b.cardId?b.cardId:"cr:"+a.J;
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.J,type:"simple",teaserText:g.S(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,wd:Z2(a,c,b,d),sponsored:!1,Pf:V2(d,e,d.command),Aj:d.trackingParams?g.Tt(d.trackingParams):null,ph:e.trackingParams?g.Tt(e.trackingParams):
null,Id:f&&f.trackingParams?g.Tt(f.trackingParams):null,imageUrl:$2(d.image.thumbnails,290).url,displayDomain:d.displayDomain?g.S(d.displayDomain):null,showLinkIcon:!!d.showLinkIcon,ct:null,title:d.title?g.S(d.title):"",customMessage:d.callToAction?g.S(d.callToAction):"",url:d.command.urlEndpoint.url?N2({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:d.command.urlEndpoint.url}):null};a3(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.J,type:"collaborator",teaserText:g.S(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,wd:Z2(a,c,b,d),sponsored:!1,Pf:V2(d,e,d.endpoint),Aj:d.trackingParams?g.Tt(d.trackingParams):null,ph:e.trackingParams?g.Tt(e.trackingParams):null,Id:f&&f.trackingParams?g.Tt(f.trackingParams):
null,channelId:d.endpoint.browseEndpoint.browseId,customMessage:d.customText?g.S(d.customText):null,TG:$2(d.channelAvatar.thumbnails,290).url,title:d.channelName?g.S(d.channelName):"",metaInfo:[d.subscriberCountText?g.S(d.subscriberCountText):""],url:N2({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:d.endpoint.browseEndpoint.canonicalBaseUrl?d.endpoint.browseEndpoint.canonicalBaseUrl:"/channel/"+d.endpoint.browseEndpoint.browseId})};a3(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.J,type:"playlist",teaserText:g.S(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,wd:Z2(a,c,b,d),sponsored:!1,Pf:V2(d,e,d.action),Aj:d.trackingParams?g.Tt(d.trackingParams):null,ph:e.trackingParams?g.Tt(e.trackingParams):null,Id:f&&f.trackingParams?g.Tt(f.trackingParams):
null,rs:$2(d.playlistThumbnail.thumbnails,258).url,customMessage:d.customMessage?g.S(d.customMessage):null,playlistVideoCount:g.S(d.playlistVideoCount),title:d.playlistTitle?g.S(d.playlistTitle):"",metaInfo:[d.channelName?g.S(d.channelName):"",d.videoCountText?g.S(d.videoCountText):""],url:N2({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:RDa(d.action)})};a3(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.J,type:"video",teaserText:g.S(e.message),teaserDurationMs:Number(b.cueRanges[0].teaserDurationMs),startMs:Number(b.cueRanges[0].startCardActiveMs),autoOpen:!!b.autoOpen,wd:Z2(a,c,b,d),sponsored:!1,Pf:V2(d,e,d.action),Aj:d.trackingParams?g.Tt(d.trackingParams):null,ph:e.trackingParams?g.Tt(e.trackingParams):null,Id:f&&f.trackingParams?g.Tt(f.trackingParams):null,rs:$2(d.videoThumbnail.thumbnails,258).url,
videoDuration:d.lengthString?g.S(d.lengthString):null,customMessage:d.customMessage?g.S(d.customMessage):null,title:d.videoTitle?g.S(d.videoTitle):"",metaInfo:[d.channelName?g.S(d.channelName):"",d.viewCountText?g.S(d.viewCountText):""],isLiveNow:!!d.badge,url:N2({pause_on_navigation:!a.context.videoData.isLivePlayback,target:"new",value:RDa(d.action)})};a3(a,c)}a.J++},$2=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]},Z2=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||""}},VDa=function(a,b){var c=UDa(a,b);
c&&(c===a.u&&(a.u=null),a.I.removeCueRange(c.card.id),g.Ge(c.wx),g.ob(a.cards,c),a.ht(),b3(a))},W2=function(a,b,c){if(!a.C){a.Ha.show();
a.na=new g.F(function(){g.J(a.context.I.getRootNode(),g.HY.IV_DRAWER_OPEN)},0);
a.na.start();a.la=g.dp(a.B,"mousewheel",function(h){a.da.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.B.scrollTop+=h});
a.C=!0;var d=g.Zt();d&&a.fa&&a.K&&g.mu(d,[a.fa,a.K]);b={TRIGGER_TYPE:b};for(var e=g.q(a.cards),f=e.next();!f.done;f=e.next())f=f.value,f.wE||(f.wE=!0,WDa(a.context.logger,f.card.Pf.PD,b)),d&&g.mu(d,[f.card.Aj]);p2(a.I);c&&(a.F=new g.F(function(){a.ra=a.P;a.Za.focus()},330),a.F.start())}},X2=function(a){a.C&&(a.Ha.hide(),g.ep(a.la),a.la=null,g.un(a.context.I.getRootNode(),g.HY.IV_DRAWER_OPEN),a.C=!1,p2(a.I),a.F&&a.F.stop(),a.F=new g.F(function(){a.ra&&(a.ra.focus(),a.ra=null)},330),a.F.start())},YDa=
function(a){g.tn(a.element,[g.HY.STOP_EVENT_PROPAGATION,
"iv-drawer-manager"]);g.lP(a.I,a.D,5);XDa(a);a.P=g.pe("ytp-cards-button",a.I.getRootNode());a.Za=g.pe("iv-drawer-close-button",a.D);a.Vd=!0},XDa=function(a){var b=g.pe("iv-drawer-close-button",a.D);
a.context.u.xa(b,"click",a.SJ,a);a.context.u.xa(a.B,"touchend",function(){a.da.start()});
a.context.u.xa(a.B,"scroll",a.eK,a);a.context.B.subscribe("onHideControls",function(){a.ga=!0});
a.context.B.subscribe("onShowControls",function(){a.ga=!1});
a.context.B.subscribe("onVideoAreaChange",function(){a.ga=g.sn(a.I.getRootNode(),"ytp-autohide")});
a.X.push(g.Oo("iv-button-shown",a.BL,a));a.X.push(g.Oo("iv-button-hidden",a.AL,a));a.X.push(g.Oo("iv-teaser-shown",a.EM,a));a.X.push(g.Oo("iv-teaser-hidden",a.DL,a));a.X.push(g.Oo("iv-teaser-clicked",a.DM,a))},a3=function(a,b){a.Vd||YDa(a);
VDa(a,b.id);var c=ZDa(a,b);if(c){var d={card:b,wx:c.element,wE:!1},e=$Da(a,d);g.ub(a.cards,e,0,d);c.ha(a.B,e);a.ht();b.autoOpen?a.addCueRange(b.startMs,0x8000000000000,b.id,function(){a.C||(a.u=d,b3(a),aEa(a,d),W2(a,"YOUTUBE_DRAWER_AUTO_OPEN",!1))}):(c=1E3*a.context.I.getCurrentTime(),5E3>c&&c>b.startMs&&bEa(a,d),a.addCueRange(b.startMs,b.startMs+1,b.id,function(){bEa(a,d)}),b3(a))}},ZDa=function(a,b){switch(b.type){case "simple":var c=a.Y;
var d=b.displayDomain?{G:"div",L:"iv-card-image-text",Z:b.displayDomain}:void 0;var e=NDa(b);d={G:"div",ka:["iv-card"],R:[{G:"a",L:"iv-click-target",U:{href:b.url?M2(b.url)||"":""},R:[Q2(b.imageUrl,d),{G:"div",L:"iv-card-content",R:[O2("h2",void 0,b.title),e]}]}]};d=new g.U(d);S2(c,g.oe("iv-click-target",d.element),b,b.url);return d;case "collaborator":return c=a.Y,d={G:"div",ka:["iv-card","iv-card-channel"],R:[{G:"a",ka:["iv-click-target"],U:{href:M2(b.url)||"","data-ytid":b.channelId},R:[Q2(b.TG),
{G:"div",L:"iv-card-content",R:[P2(b),{G:"h2",L:"iv-card-primary-link",Z:b.title},R2(b)]}]}]},d=new g.U(d),S2(c,g.oe("iv-click-target",d.element),b,b.url),d;case "playlist":return c=a.Y,d={G:"div",ka:["iv-card","iv-card-playlist"],R:[{G:"a",L:"iv-click-target",U:{href:M2(b.url)||""},R:[Q2(b.rs,{G:"div",L:"iv-card-image-overlay",R:[{G:"span",L:"iv-card-playlist-video-count",Z:b.playlistVideoCount}]}),{G:"div",L:"iv-card-content",R:[P2(b),O2("h2","iv-card-primary-link",b.title),R2(b)]}]}]},d=new g.U(d),
S2(c,g.oe("iv-click-target",d.element),b,b.url),d;case "productListing":c=a.Y;var f=!g.kb(b.offers);d=["iv-card"];e="";var h=NDa(b);f&&(d.push("iv-card-product-listing"),e="iv-card-primary-link",h=b.offers[0],f=[],h.price&&f.push({G:"div",L:"iv-card-offer-price",Z:h.price}),h.merchant&&f.push({G:"div",L:"iv-card-offer-merchant",Z:h.merchant}),h={G:"div",R:f});f=b.url?M2(b.url)||"":"";d={G:"div",ka:d,U:{tabindex:"0"},R:[{G:"a",ka:["iv-card-image","iv-click-target"],U:{style:"background-image: url("+
b.imageUrl+");",href:f,"aria-hidden":"true",tabindex:"-1"}},{G:"div",L:"iv-card-content",R:[b.sponsored?{G:"div",L:"iv-card-sponsored",R:["\u30b9\u30dd\u30f3\u30b5\u30fc\u63d0\u4f9b",{G:"div",L:"iv-ad-info-container",R:[{G:"div",L:"iv-ad-info",Z:"{{adInfo}}"},{G:"div",L:"iv-ad-info-icon-container",R:[{G:"div",L:"iv-ad-info-icon"},{G:"div",L:"iv-ad-info-callout"}]}]}]}:"",{G:"a",L:"iv-click-target",U:{href:f},R:[O2("h2",e,b.title),h]}]}]};d=new g.U(d);e=g.Ce("span");g.Ke(e,"\u3053\u306e\u52d5\u753b\u306b\u95a2\u9023\u3057\u3066\u3044\u308b\u3068\u601d\u308f\u308c\u308b\u5546\u54c1\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002Google \u306f\u8ca9\u58f2\u8005\u304b\u3089\u652f\u6255\u3044\u3092\u53d7\u3051\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002");
d.Dc(e,"adInfo");S2(c,g.oe("iv-click-target",d.element),b,b.url);return d;case "video":return c=a.Y,e=b.videoDuration?{G:"span",L:"iv-card-video-duration",Z:b.videoDuration}:void 0,h=b.isLiveNow?{G:"span",ka:["yt-badge","yt-badge-live"],Z:"\u30e9\u30a4\u30d6\u914d\u4fe1\u4e2d"}:null,e={G:"div",ka:["iv-card","iv-card-video"],R:[{G:"a",L:"iv-click-target",U:{href:(null===(d=b.url)||void 0===d?void 0:M2(d))||""},R:[Q2(b.rs,e),{G:"div",L:"iv-card-content",R:[P2(b),O2("h2","iv-card-primary-link",b.title),
R2(b),h]}]}]},d=new g.U(e),S2(c,g.oe("iv-click-target",d.element),b,b.url),d;default:return null}},$Da=function(a,b){if(0===a.cards.length)return 0;
var c=g.gb(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},cEa=function(a){return a.u?"productListing"===a.u.card.type:g.ph(a.cards,function(b){return"productListing"===b.card.type})},b3=function(a){g.K(a.I.getRootNode(),"ytp-cards-shopping-active",cEa(a))},bEa=function(a,b){if(!g.sn(a.I.getRootNode(),"ytp-cards-teaser-shown")){if(a.u!==b){var c=g.Zt(),d=a.u?a.u.card.Id:a.Id;
c&&d&&g.nu(c,[d]);a.u=b;b3(a)}if(c="none"!=a.element.style.display)2===a.context.I.getPresentingPlayerType()?c=1===a.context.I.getAdState():(c=a.context.I.getPlayerState(),d=0===c&&0===a.context.I.getCurrentTime(),c=1===c||3===c||d);c&&b.card.teaserDurationMs&&(c={teaserText:b.card.teaserText,durationMs:b.card.teaserDurationMs},(d=g.BT(g.rT(a.I)))&&d.nz(!0,c));a.Pa.isActive()||((!a.C||!a.da.isActive()&&a.ga)&&aEa(a,b),a.Pa.start(910+b.card.teaserDurationMs))}},aEa=function(a,b){if(a.S.bb){var c=new t2([0,
a.B.scrollTop],[0,b.wx.offsetTop],600,lDa);a.context.C.xa(c,"animate",function(d){a.B.scrollTop=d.y});
a.context.C.xa(c,"finish",function(d){a.B.scrollTop=d.y});
c.play()}else g.vN(a.S,!0),a.B.scrollTop=b.wx.offsetTop,g.vN(a.S,!1)},c3=function(a){return a.u&&a.u.card?a.u.card:a.cards[0]&&a.cards[0].card?a.cards[0].card:null},UDa=function(a,b){return g.fb(a.cards,function(c){return c.card.id===b})},d3=function(a,b,c){T2.call(this,a,b);
this.annotation=c;this.isActive=!1},dEa=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.K=!1;this.C=null;this.D=!1;this.u=this.J=this.F=null},eEa=function(a,b){var c=void 0===c?0:c;
var d=jDa(b).width;g.wg(b,d);c=new v2(b,[d,b.offsetTop],[d-d-c,b.offsetTop],200,kDa);g.C(a,c);a.context.C.xa(c,"begin",function(){g.Fg(b,!0)});
c.play()},hEa=function(a,b){if(b.channel_name){var c=a.createElement({G:"div",
ka:["iv-branding-context-name"],Z:b.channel_name}),d=a.createElement({G:"div",ka:["iv-branding-context-subscribe"]}),e=b.standalone_subscribe_button_data;e&&(a.u=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,e.signinUrl,a.context.I),a.u.ha(d));var f=a.createElement({G:"div",ka:["iv-branding-context-subscribe-caret"]}),h=a.createElement({G:"div",ka:["branding-context-container-inner"]});
h.appendChild(f);h.appendChild(c);h.appendChild(d);g.Fg(h,!1);var l=a.createElement({G:"div",ka:["branding-context-container-outer"]});l.appendChild(h);g.og(l,"right",b.image_width+"px");a.element.appendChild(l);a.C=new g.F(function(){fEa(a,h,l)},500);
g.C(a,a.C);a.context.u.xa(a.element,"mouseover",function(){gEa(a,h,l,f,b.image_height)});
a.context.u.xa(a.element,"mouseout",function(){a.C.start()})}},gEa=function(a,b,c,d,e){a.C.stop();
if(!a.D){var f=g.Eg(b);a.u||(b.style.width=g.vg(f.width,!0),c.style.width=g.vg(f.width,!0));g.og(d,"top",f.height-Math.max(Math.min(f.height,e)/2+10,20)+"px");g.og(d,"right","1px");a.D=!0;g.Fg(b,!0);a.F=new g.F(function(){g.J(this.element,"iv-branding-active")},0,a);
a.F.start()}},fEa=function(a,b,c){g.un(a.element,"iv-branding-active");
a.J=new g.F(function(){g.Fg(b,!1);a.u||(c.style.width=g.vg(0,!0))},250);
a.J.start();a.D=!1},iEa=function(a,b,c,d,e,f,h){this.u=a;
this.C=b;this.W=c;this.videoData=d;this.logger=e;this.I=f;this.B=h},f3=function(a,b,c){d3.call(this,a,b,c);
var d=this;this.P=this.isCollapsed=this.S=!1;this.J=5E3;this.B=this.C=this.u=this.D=null;this.K=this.createElement({G:"div",ka:["iv-promo-contents"]});this.F=new g.F(function(){d.u.setAttribute("aria-hidden","true");g.Fg(d.C,!1);g.Fg(d.B,!0)},700,this);
g.C(this,this.F)},jEa=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.J=b.collapsedelay_ms||a.J;var d=["iv-promo","iv-promo-inactive"];a.element.setAttribute("aria-hidden","true");a.element.setAttribute("aria-label","\u30d7\u30ed\u30e2\u30fc\u30b7\u30e7\u30f3");a.element.tabIndex=0;var e=LDa(a.annotation),f=b.image_url;if(f){var h=a.createElement({G:"div",ka:["iv-promo-img","iv-click-target"]});f=a.createElement({G:"img",U:{src:f,"aria-hidden":"true"}});
h.appendChild(f);b.video_duration&&!b.is_live?(f=a.createElement({G:"span",L:"iv-promo-video-duration",Z:b.video_duration}),h.appendChild(f)):b.playlist_length&&(f=a.createElement({G:"span",L:"iv-promo-playlist-length",Z:b.playlist_length.toString()}),h.appendChild(f));e&&U2(a,h,e,a.annotation.id,b.session_data,void 0,c)}e?(f=a.createElement({G:"a",L:"iv-promo-txt"}),g.gd(f,M2(e)),a.u=f):a.u=a.createElement({G:"div",L:"iv-promo-txt"});switch(a.annotation.style){case "cta":case "website":var l=a.createElement({G:"p",
R:[{G:"strong",Z:b.text_line_1}]});var m=a.createElement({G:"p",R:[{G:"span",L:"iv-promo-link",Z:b.text_line_2}]});if(f=b.text_line_3){d.push("iv-promo-website-card-cta-redesign");var n=a.createElement({G:"button",ka:["iv-promo-round-expand-icon","ytp-button"]});f=a.createElement({G:"button",ka:["iv-button","iv-promo-button"],R:[{G:"span",L:"iv-button-content",Z:f}]});var p=a.createElement({G:"div",L:"iv-promo-button-container"});p.appendChild(f);e&&U2(a,a.element,e,a.annotation.id,b.session_data,
void 0,c)}g.J(a.u,"iv-click-target");e&&U2(a,a.u,e,a.annotation.id,b.session_data,void 0,c);break;case "playlist":case "video":l=a.createElement({G:"p",R:[{G:"span",Z:b.text_line_1}]}),m=a.createElement({G:"p",R:[{G:"strong",Z:b.text_line_2}]}),b.is_live&&(l=m,m=a.createElement({G:"span",ka:["yt-badge","iv-promo-badge-live"],Z:"\u30e9\u30a4\u30d6\u914d\u4fe1\u4e2d"})),g.J(a.u,"iv-click-target"),e&&U2(a,a.u,e,a.annotation.id,b.session_data,void 0,c),d.push("iv-promo-video")}l&&a.u.appendChild(l);m&&
a.u.appendChild(m);a.K.appendChild(a.u);p&&a.K.appendChild(p);c=a.createElement({G:"div",L:"iv-promo-actions"});a.B=a.createElement({G:"button",ka:["iv-promo-expand","ytp-button"]});a.B.title="\u62e1\u5927";a.context.u.xa(a.B,"click",function(r){g3(a,5E3,r)});
c.appendChild(a.B);g.Fg(a.B,!1);a.context.u.xa(a.element,"mouseover",a.UK,a);a.context.u.xa(a.element,"mouseout",a.TK,a);a.context.u.xa(a.element,"touchend",function(r){g3(a,5E3,r)});
a.C=a.createElement({G:"button",ka:["iv-promo-close","ytp-button"]});a.C.title="\u9589\u3058\u308b";a.context.u.xa(a.C,"click","cta"===a.annotation.style&&b.text_line_3?a.OK:a.NK,a);c.appendChild(a.C);g.tn(a.element,d);h&&(a.element.appendChild(h),n&&h.appendChild(n));a.element.appendChild(a.K);a.element.appendChild(c)},g3=function(a,b,c){c.stopPropagation();
kEa(a);lEa(a,b);a.u.focus()},mEa=function(a){a.isCollapsed||a.P||a.D||(g.J(a.element,"iv-promo-collapsed"),a.isCollapsed=!0,a.F.start())},kEa=function(a){a.F.stop();
a.isCollapsed&&(g.vn(a.element,["iv-promo-collapsed","iv-promo-collapsed-no-delay"]),a.isCollapsed=!1,a.u&&a.u.removeAttribute("aria-hidden"),g.Fg(a.B,!1),g.Fg(a.C,!0))},lEa=function(a,b){a.D||(a.D=g.Km(function(){h3(this);
mEa(this)},b,a))},h3=function(a){a.D&&(g.v.clearTimeout(a.D),a.D=null)},nEa=function(a){this.I=a},WDa=function(a,b,c){b&&(c?i3(a,b.map(function(d){return g.dn(d,c)})):i3(a,b))},i3=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.yu(m,f);d&&(e++,0!==d&&a.I.sendVideoStatsEngageEvent(d,f))},j3=function(a){g.tS.call(this,a);
var b=this;this.S=!1;this.loadNumber=0;this.K={};this.logger=new nEa(this.player);this.F=new g.dR(this);this.J=this.C=null;this.events=new g.dR(this);this.P=this.u=null;this.X=[];g.C(this,this.F);this.F.N(this.player,"onVideoAreaChange",function(){b.V("onVideoAreaChange")});
this.F.N(this.player,"onHideControls",function(){b.V("onHideControls")});
this.F.N(this.player,"onShowControls",function(){b.V("onShowControls")});
this.F.N(this.player,"resize",function(d){b.V("resize",d)});
this.F.N(this.player,"presentingplayerstatechange",function(d){b.V("presentingplayerstatechange",d)});
this.subscribe("presentingplayerstatechange",this.CM,this);this.subscribe("resize",this.Dv,this);this.player.T().P.subscribe("vast_info_card_add",this.yG,this);g.C(this,this.events);this.Y=this.createElement({G:"div",L:"video-custom-annotations"});this.B=new g.U({G:"div",ka:["ytp-player-content","ytp-iv-player-content"]});g.C(this,this.B);g.lP(this.player,this.B.element,4);this.B.hide();this.D=new g.U({G:"div",ka:["ytp-iv-video-content"]});g.C(this,this.D);a=this.createElement({G:"div",L:"video-annotations"});
a.appendChild(this.Y);this.D.element.appendChild(a);oEa(this)&&this.load();var c=this.createElement({G:"style"});(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(c);g.Yf(this,function(){g.Ge(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)},pEa=function(a){a=a.createElement({G:"div",
ka:["annotation","annotation-type-custom"]});g.Fg(a,!1);return a},oEa=function(a){var b=a.player.T();
a=a.player.getVideoData();return a.oc&&b.pfpChazalUi?!1:1===(b.annotationsLoadPolicy||a.annotationsLoadPolicy)&&!a.GI||b.P.get(a.videoId)||g.BI(a)||g.CI(a)?!0:!1},qEa=function(a,b){var c=!b.isCued()&&!g.T(b,1024);
g.vN(a.B,c);g.vN(a.D,c)},rEa=function(a,b,c){a.S=!0;
a.J=g.sq(b,c)},sEa=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.Oa(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(sEa(a,e))}return c},vEa=function(a){var b=a.player.getVideoData();
if(b.Ng){var c=a.player.T().P.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.mq(h)&&h.responseXML?h.responseXML:null)&&k3(a,h)}};
g.vp()&&(d.onFinish=tEa(a,d.onFinish));d.postParams={ic_only:"1"};uEa(d,c);a.S=!0;g.sq(b.Ng,d)}}},uEa=function(a,b){a.method="POST";
a.pc=a.pc||{};b.Up&&(a.pc.ic_coll=b.Up);b.lt&&(a.pc.ic_xml=b.lt);b.xs&&(a.pc.ic_track=b.xs)},wEa=function(a){var b=new g.U({G:"div"});
g.Fg(b.element,!1);var c=new Y2(a.player,b.element,l3(a));g.C(c,b);b.ha(a.B.element);c.Wr();return c},l3=function(a){if(!a.P){var b=new w2(a);
g.C(a,b);var c=new g.f1(a);g.C(a,c);a.P=new iEa(b,c,a.player.T(),a.player.getVideoData(),a.logger,a.player,a.ra)}return a.P},k3=function(a,b){var c=!1,d=b.getElementsByTagName("annotations");
if(d&&!(1>d.length)&&(d=d[0].getAttribute("itct"))){var e=g.Zt();if(e){var f=g.Xt();f&&g.eu(g.wo("use_default_events_client")?void 0:g.Hs,e,f,[g.Tt(d)])}}d=b.getElementsByTagName("annotation");for(e=0;e<d.length;e++){var h=sEa(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=L2(h.type,xEa),r=L2(h.style,yEa),t=K2(h.data),w=0!==t.length?JSON.parse(t):{};var x=h.action;h=IDa;if(null==x)var y=null;else if(g.Na(x)){m=[];for(var E=g.q(x),D=E.next();!D.done;D=
E.next()){var G=h(D.value);G&&m.push(G)}y=m}else{var I=h(x);y=I?[I]:[]}f=n&&p?new JDa(n,p,r,y,w):null}else f=null}catch($a){}if(f)if("branding"===f.type||"promotion"===f.type){h=a;m=f;var H=pEa(h),Ba=null;switch(m.type){case "branding":if(h.player.T().Ub)break;h.B.element.appendChild(H);Ba=new e3(H,l3(h),m);break;case "promotion":g.lP(h.player,H,4),Ba=new f3(H,l3(h),m)}Ba&&Ba.Wr();if(h=Ba)g.C(a,h),a.K[f.id]=h}else if("card"===f.type||"drawer"===f.type){a.u||(a.u=wEa(a),g.C(a,a.u));if("card"===f.type){c=
a.u;var la=f&&f.data&&f.data.card_type;h=f.data;if(la)switch(m=h.tracking||{},m={PD:m.impression,click:m.click,close:m.close,aI:m.teaser_impression,rw:m.teaser_click},H=h.tracking_params||{},Ba=null,la){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,wd:h.session_data||{},sponsored:h.sponsored||!1,Pf:m,Aj:H.card?g.Tt(H.card):null,ph:H.teaser?g.Tt(H.teaser):null,Id:H.icon?
g.Tt(H.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:N2({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url})};a3(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,wd:h.session_data||{},sponsored:h.sponsored||!1,Pf:m,Aj:H.card?g.Tt(H.card):null,
ph:H.teaser?g.Tt(H.teaser):null,Id:H.icon?g.Tt(H.icon):null,rs:h.image_url,playlistVideoCount:h.playlist_video_count,customMessage:h.custom_message?h.custom_message:null,title:h.title,metaInfo:h.meta_info,url:N2({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url})};a3(c,f);break;case "productListing":h.signin_url&&(Ba=N2({target:"current",value:h.signin_url}));la=[];for(var Pa=h.offers||[],Sa=0;Sa<Pa.length;Sa++)la.push(new ODa(g.md(Pa[Sa].merchant),g.md(Pa[Sa].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,wd:h.session_data||{},sponsored:h.sponsored||!1,Pf:m,Aj:H.card?g.Tt(H.card):null,ph:H.teaser?g.Tt(H.teaser):null,Id:H.icon?g.Tt(H.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:N2({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url}),x5:Ba,w5:h.signin_title?h.signin_title:void 0,v5:h.signin_message?h.signin_message:void 0,offers:la};a3(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,wd:h.session_data||{},sponsored:h.sponsored||!1,Pf:m,Aj:H.card?g.Tt(H.card):null,ph:H.teaser?g.Tt(H.teaser):null,Id:H.icon?
g.Tt(H.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:N2({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url})};a3(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,wd:h.session_data||{},sponsored:h.sponsored||!1,Pf:m,Aj:H.card?g.Tt(H.card):null,ph:H.teaser?g.Tt(H.teaser):null,Id:H.icon?g.Tt(H.icon):null,rs: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:N2({pause_on_navigation:h.pause_on_navigation,target:h.target||"new",value:h.url})},a3(c,f)}}else SDa(a.u,f);c=!0}}c&&(p2(a.player),a.Dv())},zEa=function(a,b){var c=!1;
a.u||(a.u=wEa(a),g.C(a,a.u));for(var d=g.q(b.cards||[]),e=d.next();!e.done;e=d.next())e=e.value,e.cardRenderer&&(TDa(a.u,e.cardRenderer),c=!0);c&&(c=a.u,d=b.headerText?g.S(b.headerText):"",g.Ke(c.qb,d),c.P&&c.P.setAttribute("title",d),c.context.videoData.eventId&&(c.eventId=c.context.videoData.eventId),c.fa=b.trackingParams?g.Tt(b.trackingParams):null,c.K=b.closeButton.infoCardIconRenderer.trackingParams?g.Tt(b.closeButton.infoCardIconRenderer.trackingParams):null,c.Id=b.icon.infoCardIconRenderer.trackingParams?
g.Tt(b.icon.infoCardIconRenderer.trackingParams):null,p2(a.player),a.Dv())},AEa=function(a,b,c,d,e){if(!a.player.T().Ub){var f=[];
b.navigationEndpoint&&b.navigationEndpoint.browseEndpoint&&b.navigationEndpoint.browseEndpoint.browseId&&f.push(new FDa("openUrl","click",new DDa("/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.S(b.subscriberCountWithUnsubscribeText)),b.subscriberCountText&&(h=g.S(b.subscriberCountText))):(b.subscriberCountText&&(e=g.S(b.subscriberCountText)),b.subscriberCountWithSubscribeText&&(h=g.S(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.S(b.unsubscribedButtonText),subscribeCount:e||"",unsubscribeText:g.S(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 JDa(c,"branding","branding",f,d);l=pEa(a);a.B.element.appendChild(l);f=new e3(l,l3(a),f);f.Wr();g.C(f,f);a.K[c]=f}},tEa=function(a,b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];
a.ma()||(d.unshift(b),b=g.Ta.apply(window,d),a.X.push(g.tp(b)))}},BEa=function(a){return"annotation-editor"===a||"live-dashboard"===a},q2={},r2=null;g.Va(t2,g.xn);g.k=t2.prototype;g.k.getDuration=function(){return this.duration};
g.k.play=function(a){if(a||0==this.Ja)this.progress=0,this.coords=this.u;else if(this.Fb())return!1;s2(this);this.startTime=a=g.A();-1==this.Ja&&(this.startTime-=this.duration*this.progress);this.endTime=this.startTime+this.duration;this.D=this.startTime;this.progress||this.Bv();this.Rg("play");-1==this.Ja&&this.Rg("resume");this.Ja=1;var b=g.Ra(this);b in q2||(q2[b]=this);nDa();oDa(this,a);return!0};
g.k.stop=function(a){s2(this);this.Ja=0;a&&(this.progress=1);pDa(this,this.progress);this.Rg("stop");this.wr()};
g.k.pause=function(){this.Fb()&&(s2(this),this.Ja=-1,this.Rg("pause"))};
g.k.ca=function(){0==this.Ja||this.stop(!1);this.Rg("destroy");t2.Gd.ca.call(this)};
g.k.destroy=function(){this.dispose()};
g.k.uy=function(){this.Rg("animate")};
g.k.Rg=function(a){this.dispatchEvent(new qDa(a,this))};
g.Va(qDa,g.Dl);g.Va(u2,t2);u2.prototype.C=g.Ka;u2.prototype.uy=function(){this.C();u2.Gd.uy.call(this)};
u2.prototype.wr=function(){this.C();u2.Gd.wr.call(this)};
u2.prototype.Bv=function(){this.C();u2.Gd.Bv.call(this)};
g.Va(v2,u2);v2.prototype.C=function(){this.element.style.left=Math.round(this.coords[0])+"px";this.element.style.top=Math.round(this.coords[1])+"px"};g.u(w2,g.B);w2.prototype.xa=function(a,b,c,d){c=(0,g.z)(c,d||this.B);a=g.dp(a,b,c);this.u.push(a);return a};
w2.prototype.hz=function(a,b,c,d){c=(0,g.z)(c,d||this.B);a=g.np(a,b,c);this.u.push(a);return a};
w2.prototype.Kb=function(a){g.ep(a);g.ob(this.u,a)};
w2.prototype.ca=function(){g.ep(this.u);this.u.length=0;g.B.prototype.ca.call(this)};g.u(A2,g.tS);g.k=A2.prototype;g.k.load=function(){g.tS.prototype.load.call(this);if(!B2(this)){var a=g.AI(this.player.getVideoData());a?(a=z2(a,sDa(this)),C2(this,a,!1)):tDa(this)}};
g.k.unload=function(){C2(this,null);this.C&&(this.C.abort(),this.C=null);g.tS.prototype.unload.call(this)};
g.k.te=function(a,b){if(!B2(this))return null;if("loadCustomEndscreenRenderer"===a){var c=z2(b,"new");C2(this,c);return!0}return null};
g.k.getOptions=function(){return B2(this)?["loadCustomEndscreenRenderer"]:[]};
g.k.Ua=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<CEa.length;f++){var h=Math.abs(b.width-CEa[f]);if(-1===e||d>=h)e=f,d=h}d=DEa[e];this.B&&g.og(this.B.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.u[f],
h=this.F[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.Dg(e.element,Math.round(h.width*a.width),f);g.wg(e.element,m,n);g.vn(e.element,EEa);m=h.left+h.width/2;h=h.top+l/2;g.J(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.vn(e.element,DEa);g.J(e.element,d);(e=g.ne(document,"div","ytp-ce-expanding-overlay-body",
e.element)[0])&&g.og(e,"height",f+"px")}}}}};
g.k.kM=function(a){if(this.endscreen)if("ytp-ce-in-endscreen"===a.getId())J2(this,this.endscreen.impressionUrls),(a=g.Zt())&&this.endscreen.visualElement&&g.fu(a,this.endscreen.visualElement,void 0);else{a=a.getId().substring(15);var b=this.u[a],c=this.F[a];g.J(b.element,"ytp-ce-element-show");b.element.removeAttribute("aria-hidden");b=this.player.getRootNode();g.J(b,"ytp-ce-shown");J2(this,c.impressionUrls);(b=g.Zt())&&g.fu(b,c.visualElement,void 0);this.player.T().C&&this.player.ya("endscreenelementshown",
a)}};
g.k.lM=function(a){if("ytp-ce-in-endscreen"!==a.getId()){a=a.getId().substring(15);var b=this.u[a];g.un(b.element,"ytp-ce-element-show");b.element.setAttribute("aria-hidden","true");b=this.player.getRootNode();g.un(b,"ytp-ce-shown");this.player.T().C&&this.player.ya("endscreenelementhidden",a)}};
g.k.rR=function(a){var b=this;a.target===window&&(new g.F(function(){for(var c=g.q(Object.values(b.u)),d=c.next();!d.done;d=c.next())g.vn(d.value.element,["ytp-ce-force-expand","ytp-ce-element-hover","ytp-ce-element-shadow-show"])},0)).start()};
var CEa=[346,426,470,506,570,640,853,1280,1920],DEa="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(" "),EEa=["ytp-ce-top-left-quad","ytp-ce-top-right-quad","ytp-ce-bottom-left-quad","ytp-ce-bottom-right-quad"];var EDa={gW:"current",B0:"new"};var GDa={CLOSE:"close",M0:"openUrl",rJ:"subscribe"},HDa={mU:"click",CLOSE:"close",AX:"hidden",f2:"rollOut",g2:"rollOver",M2:"shown"};var yEa={GT:"anchored",XI:"branding",CHANNEL:"channel",fW:"cta",DX:"highlightText",BY:"label",PLAYLIST:"playlist",E1:"popup",V2:"speech",rJ:"subscribe",q3:"title",VIDEO:"video",w4:"website"},xEa={XI:"branding",bU:"card",tW:"drawer",CX:"highlight",YZ:"marker",M1:"promotion",TEXT:"text",C4:"widget"};g.u(T2,g.B);g.k=T2.prototype;g.k.addCueRange=function(a,b,c,d,e){a=new g.QF(a,b,{id:c});a.namespace="annotations_module";d&&this.Ba.set(a,d);e&&this.Ma.set(a,e);g.lN(this.context.I,[a])};
g.k.Wr=function(){this.context.B.subscribe("resize",this.ht,this)};
g.k.sz=function(a,b,c,d,e,f){if(this.Ta)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.Ge(this.element)};
g.k.ht=function(){};
g.k.navigate=function(a,b,c,d){var e=this,f=M2(a);if(f){var h=QDa(f,a.target),l=function(){a.u&&e.context.I.pauseVideo();var m=e.context.videoData.oc||!1,n=g.aq(f||"");m&&n&&(n.v||n.list)?g.pT(e.context.I.app,n.v,b,n.list,!1,void 0):g.eL(f||"","current"===h?"_top":void 0,b)};
"new"===h&&(l(),l=null);i3(this.context.logger,c,l,d);PDa(f)||(c=g.Zt(),d=b.itct,c&&d&&g.ou(c,g.Tt(d)))}};
g.k.ca=function(){this.Ba.clear();this.Ma.clear();g.B.prototype.ca.call(this)};
g.k.createElement=function(a){a=new g.U(a);g.C(this,a);return a.element};g.u(Y2,T2);g.k=Y2.prototype;g.k.isAvailable=function(){var a;if(a=!!this.cards.length)(a=this.I.getRootNode())?(a=g.Eg(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.K(this.context.I.getRootNode(),g.HY.IV_DRAWER_ENABLED,a);p2(this.I)};
g.k.destroy=function(){var a=g.BT(g.rT(this.I));a&&a.nz(!1,void 0);try{this.I.getRootNode().removeChild(this.D)}catch(b){}g.Po(this.X);g.ep(this.la);this.na&&this.na.dispose();this.F&&this.F.dispose();T2.prototype.destroy.call(this)};
g.k.SJ=function(){if(this.C){i3(this.context.logger,c3(this).Pf.close);var a=g.Zt();a&&this.K&&g.ou(a,this.K);X2(this)}};
g.k.eK=function(){g.K(this.D,"iv-drawer-scrolled",0<this.B.scrollTop)};
g.k.BL=function(){var a=g.Zt(),b=c3(this);b=b?b.Id:this.Id;a&&b&&g.mu(a,[b])};
g.k.AL=function(){var a=g.Zt(),b=c3(this);b=b?b.Id:this.Id;a&&b&&g.nu(a,[b])};
g.k.EM=function(){var a=c3(this);i3(this.context.logger,a.Pf.aI);var b=g.Zt();b&&a&&g.mu(b,[a.ph,a.Id])};
g.k.DL=function(){var a=g.Zt(),b=c3(this);a&&b&&g.nu(a,[b.ph])};
g.k.DM=function(a){var b=c3(this),c=g.Zt();this.u?a?(a=this.context.logger,i3(a,b.Pf.rw),a.I.sendVideoStatsEngageEvent(4,void 0),c&&b.ph&&g.ou(c,b.ph)):(a=this.context.logger,i3(a,b.Pf.rw),a.I.sendVideoStatsEngageEvent(4,void 0),c&&b.Id&&g.ou(c,b.Id)):(a=this.context.logger,i3(a,b.Pf.rw),a.I.sendVideoStatsEngageEvent(4,void 0),c&&this.Id&&g.ou(c,this.Id))};g.u(d3,T2);d3.prototype.Wr=function(){T2.prototype.Wr.call(this);dEa(this)};
d3.prototype.show=function(){T2.prototype.show.call(this);var a=g.Zt(),b=this.annotation.data;a&&b&&(b=b.session_data)&&g.mu(a,[g.Tt(b.itct)])};
d3.prototype.hide=function(){T2.prototype.hide.call(this);var a=g.Zt(),b=this.annotation.data;a&&b&&(b=b.session_data)&&g.nu(a,[g.Tt(b.itct)])};g.u(e3,d3);
e3.prototype.show=function(){if(!this.isActive){d3.prototype.show.call(this);if(!this.K){g.J(this.element,"iv-branding");var a=this.annotation.data;this.B=this.createElement({G:"img",ka:["branding-img","iv-click-target"],U:{"aria-label":"\u30c1\u30e3\u30f3\u30cd\u30eb\u306e\u900f\u304b\u3057",src:a.image_url,width:a.image_width,height:a.image_height}});g.Fg(this.B,!1);var b=this.createElement({G:"div",ka:["branding-img-container"]});b.appendChild(this.B);this.element.appendChild(b);(b=LDa(this.annotation))&&
U2(this,this.B,b,this.annotation.id,a.session_data);hEa(this,a);this.K=!0}g.Fg(this.element,!0);this.isActive=!0;this.B&&eEa(this,this.B)}};
e3.prototype.hide=function(){this.isActive&&(d3.prototype.hide.call(this),g.Fg(this.element,!1),this.isActive=!1)};
e3.prototype.destroy=function(){this.u&&(this.u.dispose(),this.u=null);d3.prototype.destroy.call(this)};g.u(f3,d3);g.k=f3.prototype;g.k.show=function(){this.isActive||(d3.prototype.show.call(this),this.S||(jEa(this),this.S=!0),g.Fg(this.element,!0),g.Km(function(){g.un(this.element,"iv-promo-inactive")},100,this),this.element.removeAttribute("aria-hidden"),this.isActive=!0,h3(this),kEa(this),lEa(this,this.J))};
g.k.hide=function(){this.isActive&&(g.J(this.element,"iv-promo-inactive"),this.isActive=!1,this.element.setAttribute("aria-hidden","true"))};
g.k.sz=function(a,b,c,d,e,f){return this.isCollapsed?!1:d3.prototype.sz.call(this,a,b,c,d,e,f)};
g.k.UK=function(a){this.P=!0;g3(this,500,a)};
g.k.TK=function(){this.P=!1;mEa(this)};
g.k.NK=function(a){a.stopPropagation();this.hide()};
g.k.OK=function(a){a.stopPropagation();h3(this);this.isCollapsed=!0;g.J(this.element,"iv-promo-collapsed-no-delay");this.F.start()};
g.k.destroy=function(){this.F.dispose();d3.prototype.destroy.call(this)};g.u(j3,g.tS);g.k=j3.prototype;g.k.te=function(a,b){if(!BEa(this.player.T().playerStyle))return null;switch(a){case "loadCustomAnnotationsXml":var c=g.e1(b);c&&k3(this,c);return!0;case "removeCustomAnnotationById":return b&&this.u&&(VDa(this.u,b),p2(this.player)),!0}return null};
g.k.getOptions=function(){return BEa(this.player.T().playerStyle)?["loadCustomAnnotationsXml","removeCustomAnnotationById"]:[]};
g.k.Dv=function(){if(this.D){var a=g.mJ(this.player).getVideoContentRect(!0);g.Dg(this.D.element,a.width,a.height);g.wg(this.D.element,a.left,a.top)}if(this.u){var b=this.player.Ni();a=this.u;b=b.width;g.K(a.D,"iv-drawer-small",426>=b);g.K(a.D,"iv-drawer-big",1280<=b)}};
g.k.CM=function(a){qEa(this,a.state);g.T(a.state,2)&&(this.Yq()&&this.HE()&&2!==this.player.getPresentingPlayerType()&&this.setCardsVisible(!1),this.nz(!1))};
g.k.load=function(){function a(h){var l=b.loadNumber;b.J=null;b.loaded&&b.loadNumber===l&&b.player.getVideoData().videoId===d&&(h=g.mq(h)&&h.responseXML?h.responseXML:null)&&(k3(b,h),g.J(b.player.getRootNode(),"iv-module-loaded"))}
var b=this;g.tS.prototype.load.call(this);qEa(this,g.NJ(this.player));this.loadNumber++;var c=this.player.getVideoData(),d=c.videoId;g.vp()&&(a=tEa(this,a));var e={format:"XML",ag:a,onError:function(){b.J=null},
sj:{}};c.isPharma&&(e.sj.pharma="1");e.method="POST";e.withCredentials=!0;var f=this.player.T().P.get(d);f&&uEa(e,f);f=f&&(f.lt||f.Up);if(!c.Ws||f)c.Ng?rEa(this,c.Ng,e):(this.C=function(){b.Qa(e)},this.player.addEventListener("videodatachange",this.C));
g.lP(this.player,this.D.element,4);this.Dv();(f=g.BI(c))&&zEa(this,f);(f=g.CI(c))&&f.featuredChannel&&AEa(this,f.featuredChannel,f.annotationId||"branding",c.videoId||null,c.eventId||null)};
g.k.Qa=function(a){var b=this.player.getVideoData();b.Ng&&(this.C&&(this.player.removeEventListener("videodatachange",this.C),this.C=null),rEa(this,b.Ng,a))};
g.k.unload=function(){g.GT(this.player,"annotations_module");for(var a=g.q(Object.keys(this.K)),b=a.next();!b.done;b=a.next())this.K[b.value].destroy();this.P=null;this.u&&(this.u.destroy(),this.u=null,p2(this.player));this.S=!1;this.J&&(this.J.abort(),this.J=null);this.K={};this.B.hide();g.tS.prototype.unload.call(this);this.D.detach();this.C&&(this.player.removeEventListener("videodatachange",this.C),this.C=null)};
g.k.yG=function(a){a===this.player.getVideoData().videoId&&(this.loaded?vEa(this):this.load())};
g.k.Yq=function(){return!!this.u&&this.u.isAvailable()};
g.k.HE=function(){this.Yq();return!!this.u&&this.u.C};
g.k.setCardsVisible=function(a,b,c){b=void 0===b?!1:b;this.Yq();this.u&&(a?c?W2(this.u,c,b):W2(this.u,"YOUTUBE_DRAWER_AUTO_OPEN",b):X2(this.u))};
g.k.nz=function(a,b){this.player.V(a?"cardsteasershow":"cardsteaserhide",b)};
g.k.ca=function(){this.player.T().P.unsubscribe("vast_info_card_add",this.yG,this);g.un(this.player.getRootNode(),g.HY.IV_DRAWER_OPEN);for(var a=this.X,b=0,c=a.length;b<c;b++)g.wp(a[b]);this.X.length=0;g.tS.prototype.ca.call(this)};
g.k.createElement=function(a){a=new g.U(a);g.C(this,a);return a.element};g.aU.annotations_module=j3;g.aU.creatorendscreen=A2;})(_yt_player);