(function(g){var window=this;'use strict';var vVL=function(F,J){F.jE("onAutonavCoundownStarted",J)},aLR=function(F){var J,b,I; return F==null?void 0:(J=F.playerOverlays)==null?void 0:(b=J.playerOverlayRenderer)==null?void 0:(I=b.autoplay)==null?void 0:I.playerOverlayAutoplayRenderer},M3=function(F,J,b){g.qr(F.element,"ytp-suggestion-set",!!J.videoId); var I=J.playlistId;b=J.lr(b?b:"mqdefault.jpg");var u=null,w=null;J instanceof g.NF&&(J.lengthText?(u=J.lengthText||null,w=J.VF||null):J.lengthSeconds&&(u=g.lD(J.lengthSeconds),w=g.lD(J.lengthSeconds,!0)));var M=!!I;I=M&&g.ir(I).type==="RD";var q=J instanceof g.NF?J.isLivePlayback:null,v=J instanceof g.NF?J.isUpcoming:null,a=J.author,e=J.shortViewCount,K=J.publishedTimeText,p=[],m=[];a&&p.push(a);e&&(p.push(e),m.push(e));K&&m.push(K);b={title:J.title,author:a,author_and_views:p.join(" \u2022 "),aria_label:J.ariaLabel|| g.m8("Assistir a $TITLE",{TITLE:J.title}),duration:u,timestamp:w,url:J.t4(),is_live:q,is_upcoming:v,is_list:M,is_mix:I,background:b?"background-image: url("+b+")":"",views_and_publish_time:m.join(" \u2022 "),autoplayAlternativeHeader:J.lH};J instanceof g.zt&&(b.playlist_length=J.playlistLength);F.update(b)},Al=function(F){var J=F.J(),b=J.Z; g.U.call(this,{X:"a",K:"ytp-autonav-suggestion-card",L:{href:"{{url}}",target:b?J.N:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},j:[{X:"div",Dv:["ytp-autonav-endscreen-upnext-thumbnail","ytp-autonav-thumbnail-small"],L:{style:"{{background}}"},j:[{X:"div",L:{"aria-label":"{{timestamp}}"},Dv:["ytp-autonav-timestamp"],sQ:"{{duration}}"},{X:"div",Dv:["ytp-autonav-live-stamp"],sQ:"Ao vivo"}, {X:"div",Dv:["ytp-autonav-upcoming-stamp"],sQ:"Em breve"},{X:"div",K:"ytp-autonav-list-overlay",j:[{X:"div",K:"ytp-autonav-mix-text",sQ:"Mix"},{X:"div",K:"ytp-autonav-mix-icon"}]}]},{X:"div",Dv:["ytp-autonav-endscreen-upnext-title","ytp-autonav-title-card"],sQ:"{{title}}"},{X:"div",Dv:["ytp-autonav-endscreen-upnext-author","ytp-autonav-author-card"],sQ:"{{author}}"},{X:"div",Dv:["ytp-autonav-endscreen-upnext-author","ytp-autonav-view-and-date-card"],sQ:"{{views_and_publish_time}}"}]});this.G=F;this.suggestion= null;this.C=b;this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress)},q3=function(F,J){J=J===void 0?!1:J; g.U.call(this,{X:"div",K:"ytp-autonav-endscreen-countdown-overlay"});var b=this;this.V=J;this.cancelCommand=this.W=void 0;this.T=0;this.container=new g.U({X:"div",K:"ytp-autonav-endscreen-countdown-container"});g.k(this,this.container);this.container.Az(this.element);J=F.J();var I=J.Z;this.G=F;this.suggestion=null;this.onVideoDataChange("newdata",this.G.getVideoData());this.B(F,"videodatachange",this.onVideoDataChange);this.C=new g.U({X:"div",K:"ytp-autonav-endscreen-upnext-container",L:{"aria-label":"{{aria_label}}", "data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},j:[{X:"div",K:"ytp-autonav-endscreen-upnext-header"},{X:"div",K:"ytp-autonav-endscreen-upnext-alternative-header",sQ:"{{autoplayAlternativeHeader}}"},{X:"a",K:"ytp-autonav-endscreen-link-container",L:{href:"{{url}}",target:I?J.N:""},j:[{X:"div",K:"ytp-autonav-endscreen-upnext-thumbnail",L:{style:"{{background}}"},j:[{X:"div",L:{"aria-label":"{{timestamp}}"},Dv:["ytp-autonav-timestamp"], sQ:"{{duration}}"},{X:"div",Dv:["ytp-autonav-live-stamp"],sQ:"Ao vivo"},{X:"div",Dv:["ytp-autonav-upcoming-stamp"],sQ:"Em breve"}]},{X:"div",K:"ytp-autonav-endscreen-video-info",j:[{X:"div",K:"ytp-autonav-endscreen-premium-badge"},{X:"div",K:"ytp-autonav-endscreen-upnext-title",sQ:"{{title}}"},{X:"div",K:"ytp-autonav-endscreen-upnext-author",sQ:"{{author}}"},{X:"div",K:"ytp-autonav-view-and-date",sQ:"{{views_and_publish_time}}"},{X:"div",K:"ytp-autonav-author-and-view",sQ:"{{author_and_views}}"}]}]}]}); g.k(this,this.C);this.C.Az(this.container.element);I||this.B(this.C.RI("ytp-autonav-endscreen-link-container"),"click",this.pS);this.G.createClientVe(this.container.element,this,115127);this.G.createClientVe(this.C.RI("ytp-autonav-endscreen-link-container"),this,115128);this.overlay=new g.U({X:"div",K:"ytp-autonav-overlay"});g.k(this,this.overlay);this.overlay.Az(this.container.element);this.U=new g.U({X:"div",K:"ytp-autonav-endscreen-button-container"});g.k(this,this.U);this.U.Az(this.container.element); this.cancelButton=new g.U({X:"button",Dv:["ytp-autonav-endscreen-upnext-button","ytp-autonav-endscreen-upnext-cancel-button",J.S("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],L:{"aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},sQ:"Cancelar"});g.k(this,this.cancelButton);this.cancelButton.Az(this.U.element);this.cancelButton.listen("click",this.KC,this);this.G.createClientVe(this.cancelButton.element,this,115129);this.playButton=new g.U({X:"a",Dv:["ytp-autonav-endscreen-upnext-button", "ytp-autonav-endscreen-upnext-play-button",J.S("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],L:{href:"{{url}}",role:"button","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},sQ:"Assista agora"});g.k(this,this.playButton);this.playButton.Az(this.U.element);this.playButton.listen("click",this.pS,this);this.G.createServerVe(this.playButton.element,this.playButton,!0);(J=this.G.getVideoData())&&eBz(this,J);this.Z=new g.ty(function(){KIH(b)},500); g.k(this,this.Z);this.yS();this.B(F,"autonavvisibility",this.yS);this.G.S("web_autonav_color_transition")&&(this.B(F,"autonavchange",this.zJ),this.B(F,"onAutonavCoundownStarted",this.mWG))},vb=function(F){var J=F.G.xK(!0,F.G.isFullscreen()); g.qr(F.container.element,"ytp-autonav-endscreen-small-mode",F.Ru(J));g.qr(F.container.element,"ytp-autonav-endscreen-is-premium",!!F.suggestion&&!!F.suggestion.cwN);g.qr(F.G.getRootNode(),"ytp-autonav-endscreen-cancelled-state",!F.G.w6());g.qr(F.G.getRootNode(),"countdown-running",F.yd());g.qr(F.container.element,"ytp-player-content",F.G.w6());g.aN(F.overlay.element,{width:J.width+"px"});if(!F.yd()){F.G.w6()?pjk(F,Math.round(gVb(F)/1E3)):pjk(F);J=!!F.suggestion&&!!F.suggestion.lH;var b=F.G.w6()|| !J;g.qr(F.container.element,"ytp-autonav-endscreen-upnext-alternative-header-only",!b&&J);g.qr(F.container.element,"ytp-autonav-endscreen-upnext-no-alternative-header",b&&!J);F.U.wY(F.G.w6());g.qr(F.element,"ytp-enable-w2w-color-transitions",mfR(F))}},KIH=function(F){var J=gVb(F),b=Math,I=b.min; var u=F.T?Date.now()-F.T:0;b=I.call(b,u,J);pjk(F,Math.ceil((J-b)/1E3));J-b<=500&&F.yd()?F.select(!0):F.yd()&&F.Z.start()},gVb=function(F){if(F.G.isFullscreen()){var J; F=(J=F.G.getVideoData())==null?void 0:J.Yd;return F===-1||F===void 0?8E3:F}return F.G.jy()>=0?F.G.jy():g.eB(F.G.J().experiments,"autoplay_time")||1E4},eBz=function(F,J){J=J.getWatchNextResponse(); var b,I;J=(b=aLR(J))==null?void 0:(I=b.nextButton)==null?void 0:I.buttonRenderer;F.W=J==null?void 0:J.navigationEndpoint;b=J==null?void 0:J.trackingParams;F.playButton&&b&&F.G.setTrackingParams(F.playButton.element,b)},mfR=function(F){var J; return!((J=F.G.getVideoData())==null||!J.watchToWatchTransitionRenderer)},pjk=function(F,J){J=J===void 0?-1:J; F=F.C.RI("ytp-autonav-endscreen-upnext-header");g.J6(F);if(J>=0){J=String(J);var b="Pr\u00f3ximo v\u00eddeo em $SECONDS".match(RegExp("\\$SECONDS","gi"))[0],I="Pr\u00f3ximo v\u00eddeo em $SECONDS".indexOf(b);if(I>=0){F.appendChild(g.L$("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(0,I)));var u=g.H1("span");g.bG(u,"ytp-autonav-endscreen-upnext-header-countdown-number");g.wK(u,J);F.appendChild(u);F.appendChild(g.L$("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(I+b.length)));return}}g.wK(F,"Pr\u00f3ximo")}, a5=function(F,J){g.U.call(this,{X:"div", Dv:["html5-endscreen","ytp-player-content",J||"base-endscreen"]});this.created=!1;this.player=F},eF=function(F){g.U.call(this,{X:"div", Dv:["ytp-upnext","ytp-player-content"],L:{"aria-label":"{{aria_label}}"},j:[{X:"div",K:"ytp-cued-thumbnail-overlay-image",L:{style:"{{background}}"}},{X:"span",K:"ytp-upnext-top",j:[{X:"span",K:"ytp-upnext-header",sQ:"Pr\u00f3ximo"},{X:"span",K:"ytp-upnext-title",sQ:"{{title}}"},{X:"span",K:"ytp-upnext-author",sQ:"{{author}}"}]},{X:"a",K:"ytp-upnext-autoplay-icon",L:{role:"button",href:"{{url}}","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},j:[{X:"svg",L:{height:"100%",version:"1.1",viewBox:"0 0 72 72", width:"100%"},j:[{X:"circle",K:"ytp-svg-autoplay-circle",L:{cx:"36",cy:"36",fill:"#fff","fill-opacity":"0.3",r:"31.5"}},{X:"circle",K:"ytp-svg-autoplay-ring",L:{cx:"-36",cy:"36","fill-opacity":"0",r:"33.5",stroke:"#FFFFFF","stroke-dasharray":"211","stroke-dashoffset":"-211","stroke-width":"4",transform:"rotate(-90)"}},{X:"path",K:"ytp-svg-fill",L:{d:"M 24,48 41,36 24,24 V 48 z M 44,24 v 24 h 4 V 24 h -4 z"}}]}]},{X:"span",K:"ytp-upnext-bottom",j:[{X:"span",K:"ytp-upnext-cancel"},{X:"span",K:"ytp-upnext-paused", sQ:"Reprodu\u00e7\u00e3o autom\u00e1tica pausada"}]}]});this.api=F;this.cancelButton=null;this.W=this.RI("ytp-svg-autoplay-ring");this.T=this.notification=this.C=this.suggestion=null;this.Z=new g.ty(this.G5,5E3,this);this.U=0;var J=this.RI("ytp-upnext-cancel");this.cancelButton=new g.U({X:"button",Dv:["ytp-upnext-cancel-button","ytp-button"],L:{tabindex:"0","aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},sQ:"Cancelar"});g.k(this,this.cancelButton);this.cancelButton.listen("click",this.tS, this);this.cancelButton.Az(J);this.cancelButton&&this.api.createClientVe(this.cancelButton.element,this,115129);g.k(this,this.Z);this.api.createClientVe(this.element,this,18788);J=this.RI("ytp-upnext-autoplay-icon");this.B(J,"click",this.xF);this.api.createClientVe(J,this,115130);this.Yv();this.B(F,"autonavvisibility",this.Yv);this.B(F,"mdxnowautoplaying",this.FnN);this.B(F,"mdxautoplaycanceled",this.BYf);g.qr(this.element,"ytp-upnext-mobile",this.api.J().U)},yzV=function(F,J){if(J)return J; if(F.api.isFullscreen()){var b;F=(b=F.api.getVideoData())==null?void 0:b.Yd;return F===-1||F===void 0?8E3:F}return F.api.jy()>=0?F.api.jy():g.eB(F.api.J().experiments,"autoplay_time")||1E4},iuV=function(F,J){J=yzV(F,J); var b=Math,I=b.min;var u=(0,g.jR)()-F.U;b=I.call(b,u,J);J=J===0?1:Math.min(b/J,1);F.W.setAttribute("stroke-dashoffset",""+-211*(J+1));J>=1&&F.yd()&&F.api.getPresentingPlayerType()!==3?F.select(!0):F.yd()&&F.C.start()},Ks=function(F){a5.call(this,F,"autonav-endscreen"); this.overlay=this.videoData=null;this.table=new g.U({X:"div",K:"ytp-suggestion-panel",j:[{X:"div",Dv:["ytp-autonav-endscreen-upnext-header","ytp-autonav-endscreen-more-videos"],sQ:"Mais v\u00eddeos"}]});this.Y=new g.U({X:"div",K:"ytp-suggestions-container"});this.videos=[];this.T=null;this.W=this.V=!1;this.U=new q3(this.player);g.k(this,this.U);this.U.Az(this.element);F.getVideoData().n7?this.C=this.U:(this.C=new eF(F),g.Pp(this.player,this.C.element,4),g.k(this,this.C));this.overlay=new g.U({X:"div", K:"ytp-autonav-overlay-cancelled-state"});g.k(this,this.overlay);this.overlay.Az(this.element);this.Z=new g.s5(this);g.k(this,this.Z);g.k(this,this.table);this.table.Az(this.element);this.table.show();g.k(this,this.Y);this.Y.Az(this.table.element);this.hide()},ps=function(F){var J=F.w6(); J!==F.W&&(F.W=J,F.player.publish("autonavvisibility"),F.W?(F.U!==F.C&&F.U.hide(),F.table.hide()):(F.U!==F.C&&F.U.show(),F.table.show()))},gn=function(F,J){g.U.call(this,{X:"button", Dv:["ytp-watch-on-youtube-button","ytp-button"],sQ:"{{content}}"});this.G=F;this.buttonType=this.buttonType=J;this.Rj();this.buttonType===2&&g.uG(this.element,"ytp-continue-watching-button");this.listen("click",this.onClick);this.listen("videodatachange",this.Rj);this.wY(!0)},mr=function(F,J){a5.call(this,F,"embeds-lite-endscreen"); this.G=F;this.C=J;this.G.createClientVe(this.element,this,156943);this.watchButton=new gn(F,2);g.k(this,this.watchButton);this.watchButton.Az(this.element);this.hide()},zBz=function(F){a5.call(this,F,"subscribecard-endscreen"); this.C=new g.U({X:"div",K:"ytp-subscribe-card",j:[{X:"img",K:"ytp-author-image",L:{src:"{{profilePicture}}"}},{X:"div",K:"ytp-subscribe-card-right",j:[{X:"div",K:"ytp-author-name",sQ:"{{author}}"},{X:"div",K:"html5-subscribe-button-container"}]}]});g.k(this,this.C);this.C.Az(this.element);var J=F.getVideoData();this.subscribeButton=new g.Aq("Inscreva-se",null,"Cancelar assinatura",null,!0,!1,J.uB,J.subscribed,"trailer-endscreen",null,F,!1);g.k(this,this.subscribeButton);this.subscribeButton.Az(this.C.RI("html5-subscribe-button-container")); this.B(F,"videodatachange",this.VG);this.VG();this.hide()},yQ=function(F){var J=F.J(),b=g.B4||g.fH?{style:"will-change: opacity"}:void 0,I=J.Z,u=["ytp-videowall-still"]; J.U&&u.push("ytp-videowall-show-text");g.U.call(this,{X:"a",Dv:u,L:{href:"{{url}}",target:I?J.N:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},j:[{X:"div",K:"ytp-videowall-still-image",L:{style:"{{background}}"}},{X:"span",K:"ytp-videowall-still-info",L:{"aria-hidden":"true"},j:[{X:"span",K:"ytp-videowall-still-info-bg",j:[{X:"span",K:"ytp-videowall-still-info-content",L:b,j:[{X:"span",K:"ytp-videowall-still-info-title",sQ:"{{title}}"}, {X:"span",K:"ytp-videowall-still-info-author",sQ:"{{author_and_views}}"},{X:"span",K:"ytp-videowall-still-info-live",sQ:"Ao vivo"},{X:"span",K:"ytp-videowall-still-info-duration",sQ:"{{duration}}"}]}]}]},{X:"span",Dv:["ytp-videowall-still-listlabel-regular","ytp-videowall-still-listlabel"],L:{"aria-hidden":"true"},j:[{X:"span",K:"ytp-videowall-still-listlabel-icon"},"Playlist",{X:"span",K:"ytp-videowall-still-listlabel-length",j:[" (",{X:"span",sQ:"{{playlist_length}}"},")"]}]},{X:"span",Dv:["ytp-videowall-still-listlabel-mix", "ytp-videowall-still-listlabel"],L:{"aria-hidden":"true"},j:[{X:"span",K:"ytp-videowall-still-listlabel-mix-icon"},"Mix",{X:"span",K:"ytp-videowall-still-listlabel-length",sQ:" (50+)"}]}]});this.suggestion=null;this.U=I;this.api=F;this.C=new g.s5(this);g.k(this,this.C);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.C.B(F,"videodatachange",this.onVideoDataChange);F.createServerVe(this.element,this);this.onVideoDataChange()},iZ=function(F){a5.call(this,F,"videowall-endscreen"); var J=this;this.G=F;this.T=0;this.stills=[];this.Z=this.videoData=null;this.W=this.Y=!1;this.N=null;this.U=new g.s5(this);g.k(this,this.U);this.V=new g.ty(function(){g.uG(J.element,"ytp-show-tiles")},0); g.k(this,this.V);var b=new g.U({X:"button",Dv:["ytp-button","ytp-endscreen-previous"],L:{"aria-label":"Anterior"},j:[g.mh()]});g.k(this,b);b.Az(this.element);b.listen("click",this.oi,this);this.table=new g.Mc({X:"div",K:"ytp-endscreen-content"});g.k(this,this.table);this.table.Az(this.element);b=new g.U({X:"button",Dv:["ytp-button","ytp-endscreen-next"],L:{"aria-label":"Pr\u00f3ximo"},j:[g.yr()]});g.k(this,b);b.Az(this.element);b.listen("click",this.vT,this);F.getVideoData().n7?this.C=new q3(F,!0): this.C=new eF(F);g.k(this,this.C);g.Pp(this.player,this.C.element,4);F.createClientVe(this.element,this,158789);this.hide()},zY=function(F){return g.Bp(F.player)&&F.MN()&&!F.Z},N3=function(F){var J=F.w6(); J!==F.Y&&(F.Y=J,F.player.publish("autonavvisibility"))},lZ=function(F){a5.call(this,F,"watch-again-on-youtube-endscreen"); this.watchButton=new gn(F,1);g.k(this,this.watchButton);this.watchButton.Az(this.element);g.l94(F)&&(this.C=new g.t7(F),g.k(this,this.C),this.U=new g.U({X:"div",Dv:["ytp-watch-again-on-youtube-endscreen-more-videos-container"],L:{tabIndex:"-1"},j:[this.C]}),g.k(this,this.U),this.C.Az(this.U.element),this.U.Az(this.element));F.createClientVe(this.element,this,156914);this.hide()},WIt=function(F){g.GN.call(this,F); var J=this;this.endScreen=null;this.U=this.C=this.T=this.Z=!1;this.listeners=new g.s5(this);g.k(this,this.listeners);var b=F.J(),I=F.getVideoData();I=I&&I.limitedPlaybackDurationInSeconds!==0;g.q1(g.S8(b))&&I&&!g.Ef(F)?(this.U=!0,this.endScreen=new mr(F,g.aj(F))):F.isEmbedsShortsMode()?this.endScreen=new lZ(F):NbV(F)?(this.Z=!0,lLb(this),this.C?this.endScreen=new Ks(F):this.endScreen=new iZ(F)):b.n7?this.endScreen=new zBz(F):this.endScreen=new a5(F);g.k(this,this.endScreen);g.Pp(F,this.endScreen.element, 4);fLt(this);this.listeners.B(F,"videodatachange",this.onVideoDataChange,this);this.listeners.B(F,g.u6("endscreen"),function(u){J.onCueRangeEnter(u)}); this.listeners.B(F,g.wq("endscreen"),function(u){J.onCueRangeExit(u)})},lLb=function(F){var J=F.player.getVideoData(); if(!J||F.C===J.A4&&F.T===J.n7)return!1;F.C=J.A4;F.T=J.n7;return!0},NbV=function(F){F=F.J(); return F.y6&&!F.n7&&!F.disableOrganicUi},fLt=function(F){F.player.Yo("endscreen"); var J=F.player.getVideoData();J=new g.b6(Math.max((J.lengthSeconds-10)*1E3,0),0x8000000000000,{id:"preload",namespace:"endscreen"});var b=new g.b6(0x8000000000000,0x8000000000000,{id:"load",priority:8,namespace:"endscreen"});F.player.TU([J,b])}; g.ly.prototype.jy=g.IG(14,function(){return this.app.jy()}); g.Np.prototype.jy=g.IG(13,function(){return this.getVideoData().UO}); g.y_.prototype.aE=g.IG(12,function(F){this.p8().aE(F)}); g.ds.prototype.aE=g.IG(11,function(F){this.C!==F&&(this.C=F,this.VG())}); g.Y3.prototype.aE=g.IG(10,function(F){this.overflowButton&&this.overflowButton.aE(F)}); g.y_.prototype.by=g.IG(9,function(F){this.p8().by(F)}); g.Pm.prototype.by=g.IG(8,function(F){this.U!==F&&(this.U=F,this.VG())}); g.Y3.prototype.by=g.IG(7,function(F){this.shareButton&&this.shareButton.by(F)}); g.y_.prototype.Gp=g.IG(6,function(F){this.p8().Gp(F)}); g.LV.prototype.Gp=g.IG(5,function(F){this.ZE!==F&&(this.ZE=F,this.E1())}); g.y_.prototype.u2=g.IG(4,function(F){this.p8().u2(F)}); g.Y3.prototype.u2=g.IG(3,function(F){this.eW!==F&&(this.eW=F,this.MP())});g.z(Al,g.U);Al.prototype.select=function(){this.G.yp(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.Te||void 0)&&this.G.logClick(this.element)}; Al.prototype.onClick=function(F){g.LE(F,this.G,this.C,this.suggestion.sessionData||void 0)&&this.select()}; Al.prototype.onKeyPress=function(F){switch(F.keyCode){case 13:case 32:F.defaultPrevented||(this.select(),F.preventDefault())}};g.z(q3,g.U);g.A=q3.prototype;g.A.GL=function(F){this.suggestion!==F&&(this.suggestion=F,M3(this.C,F),this.playButton.updateValue("url",this.suggestion.t4()),vb(this))}; g.A.yd=function(){return this.T>0}; g.A.MR=function(){this.yd()||(this.T=Date.now(),KIH(this),vVL(this.G,gVb(this)),g.qr(this.G.getRootNode(),"countdown-running",this.yd()))}; g.A.Pk=function(){this.gf();KIH(this);var F=this.C.RI("ytp-autonav-endscreen-upnext-header");F&&g.wK(F,"Pr\u00f3ximo")}; g.A.gf=function(){this.yd()&&(this.Z.stop(),this.T=0)}; g.A.select=function(F){this.G.nextVideo(!1,F===void 0?!1:F);this.gf()}; g.A.pS=function(F){g.LE(F,this.G)&&(F.currentTarget===this.playButton.element?this.G.logClick(this.playButton.element):F.currentTarget===this.C.RI("ytp-autonav-endscreen-link-container")&&(F=this.C.RI("ytp-autonav-endscreen-link-container"),this.G.logVisibility(F,!0),this.G.logClick(F)),this.W?(this.G.jE("innertubeCommand",this.W),this.gf()):this.select())}; g.A.KC=function(){this.G.logClick(this.cancelButton.element);g.Wp(this.G,!0);this.cancelCommand&&this.G.jE("innertubeCommand",this.cancelCommand)}; g.A.onVideoDataChange=function(F,J){eBz(this,J);F=J.getWatchNextResponse();var b,I;F=(b=aLR(F))==null?void 0:(I=b.cancelButton)==null?void 0:I.buttonRenderer;this.cancelCommand=F==null?void 0:F.command}; g.A.mWG=function(F){if(mfR(this)){var J=this.G.getVideoData().watchToWatchTransitionRenderer,b=J==null?void 0:J.fromColorPaletteDark;J=J==null?void 0:J.toColorPaletteDark;if(b&&J){var I=this.element;I.style.setProperty("--w2w-start-background-color",g.$y(b.surgeColor));I.style.setProperty("--w2w-start-primary-text-color",g.$y(b.primaryTitleColor));I.style.setProperty("--w2w-start-secondary-text-color",g.$y(b.secondaryTitleColor));I.style.setProperty("--w2w-end-background-color",g.$y(J.surgeColor)); I.style.setProperty("--w2w-end-primary-text-color",g.$y(J.primaryTitleColor));I.style.setProperty("--w2w-end-secondary-text-color",g.$y(J.secondaryTitleColor));I.style.setProperty("--w2w-animation-duration",F+"ms")}g.qr(this.element,"ytp-w2w-animate",!0)}}; g.A.zJ=function(F){this.G.S("web_autonav_color_transition")&&F!==2&&g.qr(this.element,"ytp-w2w-animate",!1)}; g.A.yS=function(){var F=this.G.w6();this.V&&this.uT!==F&&this.wY(F);vb(this);this.G.logVisibility(this.container.element,F);this.G.logVisibility(this.cancelButton.element,F);this.G.logVisibility(this.C.RI("ytp-autonav-endscreen-link-container"),F);this.G.logVisibility(this.playButton.element,F)}; g.A.Ru=function(F){return F.width<400||F.height<459};g.z(a5,g.U);g.A=a5.prototype;g.A.create=function(){this.created=!0}; g.A.destroy=function(){this.created=!1}; g.A.MN=function(){return!1}; g.A.w6=function(){return!1}; g.A.U9=function(){return!1};g.z(eF,g.U);g.A=eF.prototype;g.A.G5=function(){this.notification&&(this.Z.stop(),this.iX(this.T),this.T=null,this.notification.close(),this.notification=null)}; g.A.GL=function(F){this.suggestion=F;M3(this,F,"hqdefault.jpg")}; g.A.Yv=function(){this.wY(this.api.w6());this.api.logVisibility(this.element,this.api.w6());this.api.logVisibility(this.RI("ytp-upnext-autoplay-icon"),this.api.w6());this.cancelButton&&this.api.logVisibility(this.cancelButton.element,this.api.w6())}; g.A.nlv=function(){window.focus();this.G5()}; g.A.MR=function(F){var J=this;this.yd()||(g.u0("a11y-announce","Pr\u00f3ximo "+this.suggestion.title),this.U=(0,g.jR)(),this.C=new g.ty(function(){iuV(J,F)},25),iuV(this,F),vVL(this.api,yzV(this,F))); g.Mr(this.element,"ytp-upnext-autoplay-paused")}; g.A.hide=function(){g.U.prototype.hide.call(this)}; g.A.yd=function(){return!!this.C}; g.A.Pk=function(){this.gf();this.U=(0,g.jR)();iuV(this);g.uG(this.element,"ytp-upnext-autoplay-paused")}; g.A.gf=function(){this.yd()&&(this.C.dispose(),this.C=null)}; g.A.select=function(F){F=F===void 0?!1:F;if(this.api.J().S("autonav_notifications")&&F&&window.Notification&&typeof document.hasFocus==="function"){var J=Notification.permission;J==="default"?Notification.requestPermission():J!=="granted"||document.hasFocus()||(this.G5(),this.notification=new Notification("Pr\u00f3ximo",{body:this.suggestion.title,icon:this.suggestion.lr()}),this.T=this.B(this.notification,"click",this.nlv),this.Z.start())}this.gf();this.api.nextVideo(!1,F)}; g.A.xF=function(F){!g.uB(this.cancelButton.element,F.target)&&g.LE(F,this.api)&&(this.api.w6()&&this.api.logClick(this.RI("ytp-upnext-autoplay-icon")),this.select())}; g.A.tS=function(){this.api.w6()&&this.cancelButton&&this.api.logClick(this.cancelButton.element);g.Wp(this.api,!0)}; g.A.FnN=function(F){this.api.getPresentingPlayerType();this.show();this.MR(F)}; g.A.BYf=function(){this.api.getPresentingPlayerType();this.gf();this.hide()}; g.A.X_=function(){this.gf();this.G5();g.U.prototype.X_.call(this)};g.z(Ks,a5);g.A=Ks.prototype;g.A.create=function(){a5.prototype.create.call(this);this.Z.B(this.player,"appresize",this.eY);this.Z.B(this.player,"onVideoAreaChange",this.eY);this.Z.B(this.player,"videodatachange",this.onVideoDataChange);this.Z.B(this.player,"autonavchange",this.jQ);this.Z.B(this.player,"onAutonavCancelled",this.FE);this.onVideoDataChange()}; g.A.show=function(){a5.prototype.show.call(this);(this.V||this.T&&this.T!==this.videoData.clientPlaybackNonce)&&g.Wp(this.player,!1);g.Bp(this.player)&&this.MN()&&!this.T?(ps(this),this.videoData.autonavState===2?this.player.getVisibilityState()===3?this.C.select(!0):this.C.MR():this.videoData.autonavState===3&&this.C.Pk()):(g.Wp(this.player,!0),ps(this));this.eY()}; g.A.hide=function(){a5.prototype.hide.call(this);this.C.Pk();ps(this)}; g.A.eY=function(){var F=this.player.xK(!0,this.player.isFullscreen());ps(this);vb(this.U);g.qr(this.element,"ytp-autonav-cancelled-small-mode",this.Ru(F));g.qr(this.element,"ytp-autonav-cancelled-tiny-mode",this.pG(F));g.qr(this.element,"ytp-autonav-cancelled-mini-mode",F.width<=400||F.height<=360);this.overlay&&g.aN(this.overlay.element,{width:F.width+"px"});if(!this.W)for(F=0;F0&&(F= K*4,m=J<=v-2&&a>=e*4;if((e+1)/K*I/M>M/(e/(K+1)*I)&&m)a-=e*4,J+=2;else if(p)a-=K*4,F+=2;else if(m)a-=e*4,J+=2;else break}I=!1;a>=12&&b*4-a<=6&&(J>=4||F>=4)&&(I=!0);a=F*96;q=J*54;M=a/q=F-2&&e>=J-2?m=1:e%2===0&&v%2===0&&(e<2&&v<2?e===0&&v===0&&(m=2):m=2),K=g.qD(K+this.T,b),m!==0){p=this.stills[M];p||(p=new yQ(this.player),this.stills[M]=p,w.appendChild(p.element));var y=Math.floor(q*e/J),f=Math.floor(a*v/F),d=Math.floor(q*(e+m)/J)-y-4,G=Math.floor(a*(v+m)/F)-f-4;g.yf(p.element,f,y);g.lu(p.element,G,d);g.aN(p.element,"transitionDelay",(e+v)/20+"s");g.qr(p.element,"ytp-videowall-still-mini", m===1);g.qr(p.element,"ytp-videowall-still-large",m>2);m=Math.max(G,d);g.qr(p.element,"ytp-videowall-still-round-large",m>=256);g.qr(p.element,"ytp-videowall-still-round-medium",m>96&&m<256);g.qr(p.element,"ytp-videowall-still-round-small",m<=96);K=u[K];p.suggestion!==K&&(p.suggestion=K,m=p.api.J(),y=g.I3(p.element,"ytp-videowall-still-large")?"hqdefault.jpg":"mqdefault.jpg",M3(p,K,y),g.dN(m)&&!p.api.S("web_player_log_click_before_generating_ve_conversion_params")&&(m=K.t4(),y={},g.wO(p.api,"addEmbedsConversionTrackingParams", [y]),m=g.Os(m,y),p.updateValue("url",m)),(K=(K=K.sessionData)&&K.itct)&&p.api.setTrackingParams(p.element,K));M++}w.ariaBusy="false";g.qr(this.element,"ytp-endscreen-paginate",M=M;u--)F=this.stills[u],g.ID(F.element),g.q8(F);this.stills.length=M}}; g.A.onVideoDataChange=function(){var F=this.player.getVideoData(1);this.videoData!==F&&(F!=null&&g.nC(F)?(this.T=0,this.videoData=F,this.zI()):this.player.UQ("missg",{vid:(F==null?void 0:F.videoId)||"",cpn:(F==null?void 0:F.clientPlaybackNonce)||""}))}; g.A.vT=function(){this.T+=this.stills.length;this.zI()}; g.A.oi=function(){this.T-=this.stills.length;this.zI()}; g.A.U9=function(){return this.C.yd()}; g.A.RT=function(F){F===1?(this.W=!1,this.Z=this.videoData.clientPlaybackNonce,this.C.gf(),this.uT&&this.zI()):(this.W=!0,this.uT&&zY(this)&&(F===2?this.C.MR():F===3&&this.C.Pk()))}; g.A.BT=function(F){if(F){for(F=0;F0||F.endSeconds>0||F.mutedAutoplayDurationMode!==2):F.mutedAutoplay;if((this.player.isEmbedsShortsMode()||this.U)&&!J)return!0;var b;var I=!!((F==null?0:g.nC(F))||(F==null?0:(b=F.suggestions)==null?0:b.length));I=!NbV(this.player)||I;F=F.Tc;b=this.player.im();return I&&!F&&!b&&!J}; g.A.w6=function(){return this.endScreen.w6()}; g.A.FGR=function(){return this.w6()?this.endScreen.U9():!1}; g.A.X_=function(){this.player.Yo("endscreen");g.GN.prototype.X_.call(this)}; g.A.load=function(){var F=this.player.getVideoData();var J=F.transitionEndpointAtEndOfStream;if(J&&J.videoId){var b=this.player.TF().sz.get("heartbeat"),I=g.nC(F);!I||J.videoId!==I.videoId||F.hK?(this.player.yp(J.videoId,void 0,void 0,!0,!0,J),b&&b.eC("HEARTBEAT_ACTION_TRIGGER_AT_STREAM_END","HEARTBEAT_ACTION_TRANSITION_REASON_HAS_NEW_STREAM_TRANSITION_ENDPOINT"),F=!0):F=!1}else F=!1;F||(g.GN.prototype.load.call(this),this.endScreen.show())}; g.A.unload=function(){g.GN.prototype.unload.call(this);this.endScreen.hide();this.endScreen.destroy()}; g.A.onCueRangeEnter=function(F){this.X$()&&(this.endScreen.created||this.endScreen.create(),F.getId()==="load"&&this.load())}; g.A.onCueRangeExit=function(F){F.getId()==="load"&&this.loaded&&this.unload()}; g.A.onVideoDataChange=function(){fLt(this);this.Z&&lLb(this)&&(this.endScreen&&(this.endScreen.hide(),this.endScreen.created&&this.endScreen.destroy(),this.endScreen.dispose()),this.C?this.endScreen=new Ks(this.player):this.endScreen=new iZ(this.player),g.k(this,this.endScreen),g.Pp(this.player,this.endScreen.element,4))};g.jn("endscreen",WIt);})(_yt_player);