(function(g){var window=this;'use strict';var Xa7=function(G,B){G.pN("onAutonavCoundownStarted",B)},qh7=function(G){var B,a,V; return G==null?void 0:(B=G.playerOverlays)==null?void 0:(a=B.playerOverlayRenderer)==null?void 0:(V=a.autoplay)==null?void 0:V.playerOverlayAutoplayRenderer},hv=function(G,B,a){g.Km(G.element,"ytp-suggestion-set",!!B.videoId); var V=B.playlistId;a=B.Sf(a?a:"mqdefault.jpg");var x=null,h=null;B instanceof g.Ey&&(B.lengthText?(x=B.lengthText||null,h=B.Do||null):B.lengthSeconds&&(x=g.E5(B.lengthSeconds),h=g.E5(B.lengthSeconds,!0)));var e=!!V;V=e&&g.Uy(V).type==="RD";var w=B instanceof g.Ey?B.isLivePlayback:null,K=B instanceof g.Ey?B.isUpcoming:null,l=B.author,k=B.shortViewCount,N=B.publishedTimeText,d=[],C=[];l&&d.push(l);k&&(d.push(k),C.push(k));N&&C.push(N);a={title:B.title,author:l,author_and_views:d.join(" \u2022 "),aria_label:B.ariaLabel|| g.tm("Ver $TITLE",{TITLE:B.title}),duration:x,timestamp:h,url:B.O1(),is_live:w,is_upcoming:K,is_list:e,is_mix:V,background:a?"background-image: url("+a+")":"",views_and_publish_time:C.join(" \u2022 "),autoplayAlternativeHeader:B.lq};B instanceof g.Oy&&(a.playlist_length=B.playlistLength);G.update(a)},em=function(G){var B=G.U(),a=B.G; g.T.call(this,{Z:"a",J:"ytp-autonav-suggestion-card",N:{href:"{{url}}",target:a?B.Y:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},D:[{Z:"div",bL:["ytp-autonav-endscreen-upnext-thumbnail","ytp-autonav-thumbnail-small"],N:{style:"{{background}}"},D:[{Z:"div",N:{"aria-label":"{{timestamp}}"},bL:["ytp-autonav-timestamp"],cS:"{{duration}}"},{Z:"div",bL:["ytp-autonav-live-stamp"],cS:"Em direto"}, {Z:"div",bL:["ytp-autonav-upcoming-stamp"],cS:"Brevemente"},{Z:"div",J:"ytp-autonav-list-overlay",D:[{Z:"div",J:"ytp-autonav-mix-text",cS:"Mix"},{Z:"div",J:"ytp-autonav-mix-icon"}]}]},{Z:"div",bL:["ytp-autonav-endscreen-upnext-title","ytp-autonav-title-card"],cS:"{{title}}"},{Z:"div",bL:["ytp-autonav-endscreen-upnext-author","ytp-autonav-author-card"],cS:"{{author}}"},{Z:"div",bL:["ytp-autonav-endscreen-upnext-author","ytp-autonav-view-and-date-card"],cS:"{{views_and_publish_time}}"}]});this.T=G; this.suggestion=null;this.j=a;this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress)},Wc=function(G,B){B=B===void 0?!1:B; g.T.call(this,{Z:"div",J:"ytp-autonav-endscreen-countdown-overlay"});var a=this;this.W=B;this.cancelCommand=this.L=void 0;this.C=0;this.container=new g.T({Z:"div",J:"ytp-autonav-endscreen-countdown-container"});g.X(this,this.container);this.container.iL(this.element);B=G.U();var V=B.G;this.T=G;this.suggestion=null;this.onVideoDataChange("newdata",this.T.getVideoData());this.K(G,"videodatachange",this.onVideoDataChange);this.j=new g.T({Z:"div",J:"ytp-autonav-endscreen-upnext-container",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}}"},D:[{Z:"div",J:"ytp-autonav-endscreen-upnext-header"},{Z:"div",J:"ytp-autonav-endscreen-upnext-alternative-header",cS:"{{autoplayAlternativeHeader}}"},{Z:"a",J:"ytp-autonav-endscreen-link-container",N:{href:"{{url}}",target:V?B.Y:""},D:[{Z:"div",J:"ytp-autonav-endscreen-upnext-thumbnail",N:{style:"{{background}}"},D:[{Z:"div",N:{"aria-label":"{{timestamp}}"},bL:["ytp-autonav-timestamp"], cS:"{{duration}}"},{Z:"div",bL:["ytp-autonav-live-stamp"],cS:"Em direto"},{Z:"div",bL:["ytp-autonav-upcoming-stamp"],cS:"Brevemente"}]},{Z:"div",J:"ytp-autonav-endscreen-video-info",D:[{Z:"div",J:"ytp-autonav-endscreen-premium-badge"},{Z:"div",J:"ytp-autonav-endscreen-upnext-title",cS:"{{title}}"},{Z:"div",J:"ytp-autonav-endscreen-upnext-author",cS:"{{author}}"},{Z:"div",J:"ytp-autonav-view-and-date",cS:"{{views_and_publish_time}}"},{Z:"div",J:"ytp-autonav-author-and-view",cS:"{{author_and_views}}"}]}]}]}); g.X(this,this.j);this.j.iL(this.container.element);V||this.K(this.j.d1("ytp-autonav-endscreen-link-container"),"click",this.rk);this.T.createClientVe(this.container.element,this,115127);this.T.createClientVe(this.j.d1("ytp-autonav-endscreen-link-container"),this,115128);this.overlay=new g.T({Z:"div",J:"ytp-autonav-overlay"});g.X(this,this.overlay);this.overlay.iL(this.container.element);this.X=new g.T({Z:"div",J:"ytp-autonav-endscreen-button-container"});g.X(this,this.X);this.X.iL(this.container.element); this.cancelButton=new g.T({Z:"button",bL:["ytp-autonav-endscreen-upnext-button","ytp-autonav-endscreen-upnext-cancel-button",B.S("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],N:{"aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},cS:"Cancelar"});g.X(this,this.cancelButton);this.cancelButton.iL(this.X.element);this.cancelButton.listen("click",this.sV,this);this.T.createClientVe(this.cancelButton.element,this,115129);this.playButton=new g.T({Z:"a",bL:["ytp-autonav-endscreen-upnext-button", "ytp-autonav-endscreen-upnext-play-button",B.S("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],N:{href:"{{url}}",role:"button","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},cS:"Reproduzir agora"});g.X(this,this.playButton);this.playButton.iL(this.X.element);this.playButton.listen("click",this.rk,this);this.T.createServerVe(this.playButton.element,this.playButton,!0);(B=this.T.getVideoData())&&utC(this,B);this.G=new g.J8(function(){Qz8(a)},500); g.X(this,this.G);this.yJ();this.K(G,"autonavvisibility",this.yJ);this.T.S("web_autonav_color_transition")&&(this.K(G,"autonavchange",this.fb),this.K(G,"onAutonavCoundownStarted",this.bdb))},wu=function(G){var B=G.T.xJ(!0,G.T.isFullscreen()); g.Km(G.container.element,"ytp-autonav-endscreen-small-mode",G.Rm(B));g.Km(G.container.element,"ytp-autonav-endscreen-is-premium",!!G.suggestion&&!!G.suggestion.bRr);g.Km(G.T.getRootNode(),"ytp-autonav-endscreen-cancelled-state",!G.T.XK());g.Km(G.T.getRootNode(),"countdown-running",G.nk());g.Km(G.container.element,"ytp-player-content",G.T.XK());g.K4(G.overlay.element,{width:B.width+"px"});if(!G.nk()){G.T.XK()?LLC(G,Math.round(Tp$(G)/1E3)):LLC(G);B=!!G.suggestion&&!!G.suggestion.lq;var a=G.T.XK()|| !B;g.Km(G.container.element,"ytp-autonav-endscreen-upnext-alternative-header-only",!a&&B);g.Km(G.container.element,"ytp-autonav-endscreen-upnext-no-alternative-header",a&&!B);G.X.zt(G.T.XK());g.Km(G.element,"ytp-enable-w2w-color-transitions",sz7(G))}},Qz8=function(G){var B=Tp$(G),a=Math,V=a.min; var x=G.C?Date.now()-G.C:0;a=V.call(a,x,B);LLC(G,Math.ceil((B-a)/1E3));B-a<=500&&G.nk()?G.select(!0):G.nk()&&G.G.start()},Tp$=function(G){if(G.T.isFullscreen()){var B; G=(B=G.T.getVideoData())==null?void 0:B.GY;return G===-1||G===void 0?8E3:G}return G.T.CK()>=0?G.T.CK():g.kf(G.T.U().experiments,"autoplay_time")||1E4},utC=function(G,B){B=B.getWatchNextResponse(); var a,V;B=(a=qh7(B))==null?void 0:(V=a.nextButton)==null?void 0:V.buttonRenderer;G.L=B==null?void 0:B.navigationEndpoint;a=B==null?void 0:B.trackingParams;G.playButton&&a&&G.T.setTrackingParams(G.playButton.element,a)},sz7=function(G){var B; return!((B=G.T.getVideoData())==null||!B.watchToWatchTransitionRenderer)},LLC=function(G,B){B=B===void 0?-1:B; G=G.j.d1("ytp-autonav-endscreen-upnext-header");g.aL(G);if(B>=0){B=String(B);var a="Seguinte em $SECONDS".match(RegExp("\\$SECONDS","gi"))[0],V="Seguinte em $SECONDS".indexOf(a);if(V>=0){G.appendChild(g.GT("Seguinte em $SECONDS".slice(0,V)));var x=g.M6("span");g.V_(x,"ytp-autonav-endscreen-upnext-header-countdown-number");g.es(x,B);G.appendChild(x);G.appendChild(g.GT("Seguinte em $SECONDS".slice(V+a.length)));return}}g.es(G,"A seguir")},K5=function(G,B){g.T.call(this,{Z:"div", bL:["html5-endscreen","ytp-player-content",B||"base-endscreen"]});this.created=!1;this.player=G},lJ=function(G){g.T.call(this,{Z:"div", bL:["ytp-upnext","ytp-player-content"],N:{"aria-label":"{{aria_label}}"},D:[{Z:"div",J:"ytp-cued-thumbnail-overlay-image",N:{style:"{{background}}"}},{Z:"span",J:"ytp-upnext-top",D:[{Z:"span",J:"ytp-upnext-header",cS:"Pr\u00f3ximo"},{Z:"span",J:"ytp-upnext-title",cS:"{{title}}"},{Z:"span",J:"ytp-upnext-author",cS:"{{author}}"}]},{Z:"a",J:"ytp-upnext-autoplay-icon",N:{role:"button",href:"{{url}}","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},D:[{Z:"svg",N:{height:"100%",version:"1.1",viewBox:"0 0 72 72", width:"100%"},D:[{Z:"circle",J:"ytp-svg-autoplay-circle",N:{cx:"36",cy:"36",fill:"#fff","fill-opacity":"0.3",r:"31.5"}},{Z:"circle",J:"ytp-svg-autoplay-ring",N:{cx:"-36",cy:"36","fill-opacity":"0",r:"33.5",stroke:"#FFFFFF","stroke-dasharray":"211","stroke-dashoffset":"-211","stroke-width":"4",transform:"rotate(-90)"}},{Z:"path",J:"ytp-svg-fill",N:{d:"M 24,48 41,36 24,24 V 48 z M 44,24 v 24 h 4 V 24 h -4 z"}}]}]},{Z:"span",J:"ytp-upnext-bottom",D:[{Z:"span",J:"ytp-upnext-cancel"},{Z:"span",J:"ytp-upnext-paused", cS:"A reprodu\u00e7\u00e3o autom\u00e1tica est\u00e1 em pausa"}]}]});this.api=G;this.cancelButton=null;this.L=this.d1("ytp-svg-autoplay-ring");this.C=this.notification=this.j=this.suggestion=null;this.G=new g.J8(this.xQ,5E3,this);this.X=0;var B=this.d1("ytp-upnext-cancel");this.cancelButton=new g.T({Z:"button",bL:["ytp-upnext-cancel-button","ytp-button"],N:{tabindex:"0","aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},cS:"Cancelar"});g.X(this,this.cancelButton);this.cancelButton.listen("click", this.QZ,this);this.cancelButton.iL(B);this.cancelButton&&this.api.createClientVe(this.cancelButton.element,this,115129);g.X(this,this.G);this.api.createClientVe(this.element,this,18788);B=this.d1("ytp-upnext-autoplay-icon");this.K(B,"click",this.bM);this.api.createClientVe(B,this,115130);this.oS();this.K(G,"autonavvisibility",this.oS);this.K(G,"mdxnowautoplaying",this.riH);this.K(G,"mdxautoplaycanceled",this.v_x);g.Km(this.element,"ytp-upnext-mobile",this.api.U().X)},FLf=function(G,B){if(B)return B; if(G.api.isFullscreen()){var a;G=(a=G.api.getVideoData())==null?void 0:a.GY;return G===-1||G===void 0?8E3:G}return G.api.CK()>=0?G.api.CK():g.kf(G.api.U().experiments,"autoplay_time")||1E4},Jua=function(G,B){B=FLf(G,B); var a=Math,V=a.min;var x=(0,g.yT)()-G.X;a=V.call(a,x,B);B=B===0?1:Math.min(a/B,1);G.L.setAttribute("stroke-dashoffset",""+-211*(B+1));B>=1&&G.nk()&&G.api.getPresentingPlayerType()!==3?G.select(!0):G.nk()&&G.j.start()},k6=function(G){K5.call(this,G,"autonav-endscreen"); this.overlay=this.videoData=null;this.table=new g.T({Z:"div",J:"ytp-suggestion-panel",D:[{Z:"div",bL:["ytp-autonav-endscreen-upnext-header","ytp-autonav-endscreen-more-videos"],cS:"Mais v\u00eddeos"}]});this.V=new g.T({Z:"div",J:"ytp-suggestions-container"});this.videos=[];this.C=null;this.L=this.W=!1;this.X=new Wc(this.player);g.X(this,this.X);this.X.iL(this.element);G.getVideoData().n3?this.j=this.X:(this.j=new lJ(G),g.SX(this.player,this.j.element,4),g.X(this,this.j));this.overlay=new g.T({Z:"div", J:"ytp-autonav-overlay-cancelled-state"});g.X(this,this.overlay);this.overlay.iL(this.element);this.G=new g.Zh(this);g.X(this,this.G);g.X(this,this.table);this.table.iL(this.element);this.table.show();g.X(this,this.V);this.V.iL(this.table.element);this.hide()},NX=function(G){var B=G.XK(); B!==G.L&&(G.L=B,G.player.publish("autonavvisibility"),G.L?(G.X!==G.j&&G.X.hide(),G.table.hide()):(G.X!==G.j&&G.X.show(),G.table.show()))},du=function(G,B){g.T.call(this,{Z:"button", bL:["ytp-watch-on-youtube-button","ytp-button"],cS:"{{content}}"});this.T=G;this.buttonType=this.buttonType=B;this.OH();this.buttonType===2&&g.hi(this.element,"ytp-continue-watching-button");this.listen("click",this.onClick);this.listen("videodatachange",this.OH);this.zt(!0)},C5=function(G,B){K5.call(this,G,"embeds-lite-endscreen"); this.T=G;this.j=B;this.T.createClientVe(this.element,this,156943);this.watchButton=new du(G,2);g.X(this,this.watchButton);this.watchButton.iL(this.element);this.hide()},Au7=function(G){K5.call(this,G,"subscribecard-endscreen"); this.j=new g.T({Z:"div",J:"ytp-subscribe-card",D:[{Z:"img",J:"ytp-author-image",N:{src:"{{profilePicture}}"}},{Z:"div",J:"ytp-subscribe-card-right",D:[{Z:"div",J:"ytp-author-name",cS:"{{author}}"},{Z:"div",J:"html5-subscribe-button-container"}]}]});g.X(this,this.j);this.j.iL(this.element);var B=G.getVideoData();this.subscribeButton=new g.Gx("Subscrever",null,"Anular subsc.",null,!0,!1,B.dB,B.subscribed,"trailer-endscreen",null,G,!1);g.X(this,this.subscribeButton);this.subscribeButton.iL(this.j.d1("html5-subscribe-button-container")); this.K(G,"videodatachange",this.uL);this.uL();this.hide()},zr=function(G){var B=G.U(),a=g.vX||g.jN?{style:"will-change: opacity"}:void 0,V=B.G,x=["ytp-videowall-still"]; B.X&&x.push("ytp-videowall-show-text");g.T.call(this,{Z:"a",bL:x,N:{href:"{{url}}",target:V?B.Y:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},D:[{Z:"div",J:"ytp-videowall-still-image",N:{style:"{{background}}"}},{Z:"span",J:"ytp-videowall-still-info",N:{"aria-hidden":"true"},D:[{Z:"span",J:"ytp-videowall-still-info-bg",D:[{Z:"span",J:"ytp-videowall-still-info-content",N:a,D:[{Z:"span",J:"ytp-videowall-still-info-title",cS:"{{title}}"}, {Z:"span",J:"ytp-videowall-still-info-author",cS:"{{author_and_views}}"},{Z:"span",J:"ytp-videowall-still-info-live",cS:"Em direto"},{Z:"span",J:"ytp-videowall-still-info-duration",cS:"{{duration}}"}]}]}]},{Z:"span",bL:["ytp-videowall-still-listlabel-regular","ytp-videowall-still-listlabel"],N:{"aria-hidden":"true"},D:[{Z:"span",J:"ytp-videowall-still-listlabel-icon"},"Playlist",{Z:"span",J:"ytp-videowall-still-listlabel-length",D:[" (",{Z:"span",cS:"{{playlist_length}}"},")"]}]},{Z:"span",bL:["ytp-videowall-still-listlabel-mix", "ytp-videowall-still-listlabel"],N:{"aria-hidden":"true"},D:[{Z:"span",J:"ytp-videowall-still-listlabel-mix-icon"},"Mix",{Z:"span",J:"ytp-videowall-still-listlabel-length",cS:" (50+)"}]}]});this.suggestion=null;this.X=V;this.api=G;this.j=new g.Zh(this);g.X(this,this.j);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.j.K(G,"videodatachange",this.onVideoDataChange);G.createServerVe(this.element,this);this.onVideoDataChange()},tv=function(G){K5.call(this,G,"videowall-endscreen"); var B=this;this.T=G;this.C=0;this.stills=[];this.G=this.videoData=null;this.L=this.V=!1;this.Y=null;this.X=new g.Zh(this);g.X(this,this.X);this.W=new g.J8(function(){g.hi(B.element,"ytp-show-tiles")},0); g.X(this,this.W);var a=new g.T({Z:"button",bL:["ytp-button","ytp-endscreen-previous"],N:{"aria-label":"Anterior"},D:[g.gI()]});g.X(this,a);a.iL(this.element);a.listen("click",this.B$,this);this.table=new g.le({Z:"div",J:"ytp-endscreen-content"});g.X(this,this.table);this.table.iL(this.element);a=new g.T({Z:"button",bL:["ytp-button","ytp-endscreen-next"],N:{"aria-label":"Seguinte"},D:[g.pr()]});g.X(this,a);a.iL(this.element);a.listen("click",this.Am,this);G.getVideoData().n3?this.j=new Wc(G,!0):this.j= new lJ(G);g.X(this,this.j);g.SX(this.player,this.j.element,4);G.createClientVe(this.element,this,158789);this.hide()},mC=function(G){return g.RJ(G.player)&&G.Vs()&&!G.G},Iu=function(G){var B=G.XK(); B!==G.V&&(G.V=B,G.player.publish("autonavvisibility"))},gu=function(G){K5.call(this,G,"watch-again-on-youtube-endscreen"); this.watchButton=new du(G,1);g.X(this,this.watchButton);this.watchButton.iL(this.element);g.PnH(G)&&(this.j=new g.Yw(G),g.X(this,this.j),this.X=new g.T({Z:"div",bL:["ytp-watch-again-on-youtube-endscreen-more-videos-container"],N:{tabIndex:"-1"},D:[this.j]}),g.X(this,this.X),this.j.iL(this.X.element),this.X.iL(this.element));G.createClientVe(this.element,this,156914);this.hide()},oK9=function(G){g.go.call(this,G); var B=this;this.endScreen=null;this.X=this.j=this.C=this.G=!1;this.listeners=new g.Zh(this);g.X(this,this.listeners);var a=G.U(),V=G.getVideoData();V=V&&V.limitedPlaybackDurationInSeconds!==0;g.KU(g.rG(a))&&V&&!g.fb(G)?(this.X=!0,this.endScreen=new C5(G,g.zA(G))):G.isEmbedsShortsMode()?this.endScreen=new gu(G):Yh9(G)?(this.G=!0,iJ2(this),this.j?this.endScreen=new k6(G):this.endScreen=new tv(G)):a.n3?this.endScreen=new Au7(G):this.endScreen=new K5(G);g.X(this,this.endScreen);g.SX(G,this.endScreen.element, 4);P83(this);this.listeners.K(G,"videodatachange",this.onVideoDataChange,this);this.listeners.K(G,g.hm("endscreen"),function(x){B.onCueRangeEnter(x)}); this.listeners.K(G,g.ew("endscreen"),function(x){B.onCueRangeExit(x)})},iJ2=function(G){var B=G.player.getVideoData(); if(!B||G.j===B.T2&&G.C===B.n3)return!1;G.j=B.T2;G.C=B.n3;return!0},Yh9=function(G){G=G.U(); return G.w7&&!G.n3&&!G.disableOrganicUi},P83=function(G){G.player.KD("endscreen"); var B=G.player.getVideoData();B=new g.V1(Math.max((B.lengthSeconds-10)*1E3,0),0x8000000000000,{id:"preload",namespace:"endscreen"});var a=new g.V1(0x8000000000000,0x8000000000000,{id:"load",priority:8,namespace:"endscreen"});G.player.z1([B,a])}; g.bq.prototype.CK=g.Vb(14,function(){return this.app.CK()}); g.mj.prototype.CK=g.Vb(13,function(){return this.getVideoData().HX}); g.Uc.prototype.Hm=g.Vb(12,function(G){this.UK().Hm(G)}); g.m_.prototype.Hm=g.Vb(11,function(G){this.j!==G&&(this.j=G,this.uL())}); g.fk.prototype.Hm=g.Vb(10,function(G){this.overflowButton&&this.overflowButton.Hm(G)}); g.Uc.prototype.Rr=g.Vb(9,function(G){this.UK().Rr(G)}); g.OF.prototype.Rr=g.Vb(8,function(G){this.X!==G&&(this.X=G,this.uL())}); g.fk.prototype.Rr=g.Vb(7,function(G){this.shareButton&&this.shareButton.Rr(G)}); g.Uc.prototype.ut=g.Vb(6,function(G){this.UK().ut(G)}); g.FJ.prototype.ut=g.Vb(5,function(G){this.UQ!==G&&(this.UQ=G,this.ED())}); g.Uc.prototype.t1=g.Vb(4,function(G){this.UK().t1(G)}); g.fk.prototype.t1=g.Vb(3,function(G){this.IK!==G&&(this.IK=G,this.uX())});g.t(em,g.T);em.prototype.select=function(){this.T.a9(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.hT||void 0)&&this.T.logClick(this.element)}; em.prototype.onClick=function(G){g.hY(G,this.T,this.j,this.suggestion.sessionData||void 0)&&this.select()}; em.prototype.onKeyPress=function(G){switch(G.keyCode){case 13:case 32:G.defaultPrevented||(this.select(),G.preventDefault())}};g.t(Wc,g.T);g.W=Wc.prototype;g.W.K6=function(G){this.suggestion!==G&&(this.suggestion=G,hv(this.j,G),this.playButton.updateValue("url",this.suggestion.O1()),wu(this))}; g.W.nk=function(){return this.C>0}; g.W.VU=function(){this.nk()||(this.C=Date.now(),Qz8(this),Xa7(this.T,Tp$(this)),g.Km(this.T.getRootNode(),"countdown-running",this.nk()))}; g.W.Kg=function(){this.Lu();Qz8(this);var G=this.j.d1("ytp-autonav-endscreen-upnext-header");G&&g.es(G,"A seguir")}; g.W.Lu=function(){this.nk()&&(this.G.stop(),this.C=0)}; g.W.select=function(G){this.T.nextVideo(!1,G===void 0?!1:G);this.Lu()}; g.W.rk=function(G){g.hY(G,this.T)&&(G.currentTarget===this.playButton.element?this.T.logClick(this.playButton.element):G.currentTarget===this.j.d1("ytp-autonav-endscreen-link-container")&&(G=this.j.d1("ytp-autonav-endscreen-link-container"),this.T.logVisibility(G,!0),this.T.logClick(G)),this.L?(this.T.pN("innertubeCommand",this.L),this.Lu()):this.select())}; g.W.sV=function(){this.T.logClick(this.cancelButton.element);g.cE(this.T,!0);this.cancelCommand&&this.T.pN("innertubeCommand",this.cancelCommand)}; g.W.onVideoDataChange=function(G,B){utC(this,B);G=B.getWatchNextResponse();var a,V;G=(a=qh7(G))==null?void 0:(V=a.cancelButton)==null?void 0:V.buttonRenderer;this.cancelCommand=G==null?void 0:G.command}; g.W.bdb=function(G){if(sz7(this)){var B=this.T.getVideoData().watchToWatchTransitionRenderer,a=B==null?void 0:B.fromColorPaletteDark;B=B==null?void 0:B.toColorPaletteDark;if(a&&B){var V=this.element;V.style.setProperty("--w2w-start-background-color",g.XM(a.surgeColor));V.style.setProperty("--w2w-start-primary-text-color",g.XM(a.primaryTitleColor));V.style.setProperty("--w2w-start-secondary-text-color",g.XM(a.secondaryTitleColor));V.style.setProperty("--w2w-end-background-color",g.XM(B.surgeColor)); V.style.setProperty("--w2w-end-primary-text-color",g.XM(B.primaryTitleColor));V.style.setProperty("--w2w-end-secondary-text-color",g.XM(B.secondaryTitleColor));V.style.setProperty("--w2w-animation-duration",G+"ms")}g.Km(this.element,"ytp-w2w-animate",!0)}}; g.W.fb=function(G){this.T.S("web_autonav_color_transition")&&G!==2&&g.Km(this.element,"ytp-w2w-animate",!1)}; g.W.yJ=function(){var G=this.T.XK();this.W&&this.Rt!==G&&this.zt(G);wu(this);this.T.logVisibility(this.container.element,G);this.T.logVisibility(this.cancelButton.element,G);this.T.logVisibility(this.j.d1("ytp-autonav-endscreen-link-container"),G);this.T.logVisibility(this.playButton.element,G)}; g.W.Rm=function(G){return G.width<400||G.height<459};g.t(K5,g.T);g.W=K5.prototype;g.W.create=function(){this.created=!0}; g.W.destroy=function(){this.created=!1}; g.W.Vs=function(){return!1}; g.W.XK=function(){return!1}; g.W.WR=function(){return!1};g.t(lJ,g.T);g.W=lJ.prototype;g.W.xQ=function(){this.notification&&(this.G.stop(),this.i6(this.C),this.C=null,this.notification.close(),this.notification=null)}; g.W.K6=function(G){this.suggestion=G;hv(this,G,"hqdefault.jpg")}; g.W.oS=function(){this.zt(this.api.XK());this.api.logVisibility(this.element,this.api.XK());this.api.logVisibility(this.d1("ytp-upnext-autoplay-icon"),this.api.XK());this.cancelButton&&this.api.logVisibility(this.cancelButton.element,this.api.XK())}; g.W.fcN=function(){window.focus();this.xQ()}; g.W.VU=function(G){var B=this;this.nk()||(g.WD("a11y-announce","Pr\u00f3ximo "+this.suggestion.title),this.X=(0,g.yT)(),this.j=new g.J8(function(){Jua(B,G)},25),Jua(this,G),Xa7(this.api,FLf(this,G))); g.WC(this.element,"ytp-upnext-autoplay-paused")}; g.W.hide=function(){g.T.prototype.hide.call(this)}; g.W.nk=function(){return!!this.j}; g.W.Kg=function(){this.Lu();this.X=(0,g.yT)();Jua(this);g.hi(this.element,"ytp-upnext-autoplay-paused")}; g.W.Lu=function(){this.nk()&&(this.j.dispose(),this.j=null)}; g.W.select=function(G){G=G===void 0?!1:G;if(this.api.U().S("autonav_notifications")&&G&&window.Notification&&typeof document.hasFocus==="function"){var B=Notification.permission;B==="default"?Notification.requestPermission():B!=="granted"||document.hasFocus()||(this.xQ(),this.notification=new Notification("Pr\u00f3ximo",{body:this.suggestion.title,icon:this.suggestion.Sf()}),this.C=this.K(this.notification,"click",this.fcN),this.G.start())}this.Lu();this.api.nextVideo(!1,G)}; g.W.bM=function(G){!g.hw(this.cancelButton.element,G.target)&&g.hY(G,this.api)&&(this.api.XK()&&this.api.logClick(this.d1("ytp-upnext-autoplay-icon")),this.select())}; g.W.QZ=function(){this.api.XK()&&this.cancelButton&&this.api.logClick(this.cancelButton.element);g.cE(this.api,!0)}; g.W.riH=function(G){this.api.getPresentingPlayerType();this.show();this.VU(G)}; g.W.v_x=function(){this.api.getPresentingPlayerType();this.Lu();this.hide()}; g.W.yb=function(){this.Lu();this.xQ();g.T.prototype.yb.call(this)};g.t(k6,K5);g.W=k6.prototype;g.W.create=function(){K5.prototype.create.call(this);this.G.K(this.player,"appresize",this.uK);this.G.K(this.player,"onVideoAreaChange",this.uK);this.G.K(this.player,"videodatachange",this.onVideoDataChange);this.G.K(this.player,"autonavchange",this.Hb);this.G.K(this.player,"onAutonavCancelled",this.Tr);this.onVideoDataChange()}; g.W.show=function(){K5.prototype.show.call(this);(this.W||this.C&&this.C!==this.videoData.clientPlaybackNonce)&&g.cE(this.player,!1);g.RJ(this.player)&&this.Vs()&&!this.C?(NX(this),this.videoData.autonavState===2?this.player.getVisibilityState()===3?this.j.select(!0):this.j.VU():this.videoData.autonavState===3&&this.j.Kg()):(g.cE(this.player,!0),NX(this));this.uK()}; g.W.hide=function(){K5.prototype.hide.call(this);this.j.Kg();NX(this)}; g.W.uK=function(){var G=this.player.xJ(!0,this.player.isFullscreen());NX(this);wu(this.X);g.Km(this.element,"ytp-autonav-cancelled-small-mode",this.Rm(G));g.Km(this.element,"ytp-autonav-cancelled-tiny-mode",this.AM(G));g.Km(this.element,"ytp-autonav-cancelled-mini-mode",G.width<=400||G.height<=360);this.overlay&&g.K4(this.overlay.element,{width:G.width+"px"});if(!this.L)for(G=0;G0&&(G= N*4,C=B<=K-2&&l>=k*4;if((k+1)/N*V/e>e/(k/(N+1)*V)&&C)l-=k*4,B+=2;else if(d)l-=N*4,G+=2;else if(C)l-=k*4,B+=2;else break}V=!1;l>=12&&a*4-l<=6&&(B>=4||G>=4)&&(V=!0);l=G*96;w=B*54;e=l/w=G-2&&k>=B-2?C=1:k%2===0&&K%2===0&&(k<2&&K<2?k===0&&K===0&&(C=2):C=2),N=g.WM(N+this.C,a),C!==0){d=this.stills[e];d||(d=new zr(this.player),this.stills[e]=d,h.appendChild(d.element));var z=Math.floor(w*k/B),p=Math.floor(l*K/G),O=Math.floor(w*(k+C)/B)-z-4,b=Math.floor(l*(K+C)/G)-p-4;g.tI(d.element,p,z);g.p4(d.element,b,O);g.K4(d.element,"transitionDelay",(k+K)/20+"s");g.Km(d.element,"ytp-videowall-still-mini", C===1);g.Km(d.element,"ytp-videowall-still-large",C>2);C=Math.max(b,O);g.Km(d.element,"ytp-videowall-still-round-large",C>=256);g.Km(d.element,"ytp-videowall-still-round-medium",C>96&&C<256);g.Km(d.element,"ytp-videowall-still-round-small",C<=96);N=x[N];d.suggestion!==N&&(d.suggestion=N,C=d.api.U(),z=g.x$(d.element,"ytp-videowall-still-large")?"hqdefault.jpg":"mqdefault.jpg",hv(d,N,z),g.co(C)&&!d.api.S("web_player_log_click_before_generating_ve_conversion_params")&&(C=N.O1(),z={},g.lq(d.api,"addEmbedsConversionTrackingParams", [z]),C=g.LJ(C,z),d.updateValue("url",C)),(N=(N=N.sessionData)&&N.itct)&&d.api.setTrackingParams(d.element,N));e++}h.ariaBusy="false";g.Km(this.element,"ytp-endscreen-paginate",e=e;x--)G=this.stills[x],g.xo(G.element),g.WW(G);this.stills.length=e}}; g.W.onVideoDataChange=function(){var G=this.player.getVideoData(1);this.videoData!==G&&(G!=null&&g.Mk(G)?(this.C=0,this.videoData=G,this.pu()):this.player.FJ("missg",{vid:(G==null?void 0:G.videoId)||"",cpn:(G==null?void 0:G.clientPlaybackNonce)||""}))}; g.W.Am=function(){this.C+=this.stills.length;this.pu()}; g.W.B$=function(){this.C-=this.stills.length;this.pu()}; g.W.WR=function(){return this.j.nk()}; g.W.Y4=function(G){G===1?(this.L=!1,this.G=this.videoData.clientPlaybackNonce,this.j.Lu(),this.Rt&&this.pu()):(this.L=!0,this.Rt&&mC(this)&&(G===2?this.j.VU():G===3&&this.j.Kg()))}; g.W.Lb=function(G){if(G){for(G=0;G0||G.endSeconds>0||G.mutedAutoplayDurationMode!==2);if((this.player.isEmbedsShortsMode()||this.X)&&!B)return!0;var a;var V=!!((G==null?0:g.Mk(G))||(G==null?0:(a=G.suggestions)==null?0:a.length));V=!Yh9(this.player)||V;G=G.H9;a=this.player.aA();return V&&!G&&!a&&!B}; g.W.XK=function(){return this.endScreen.XK()}; g.W.oDH=function(){return this.XK()?this.endScreen.WR():!1}; g.W.yb=function(){this.player.KD("endscreen");g.go.prototype.yb.call(this)}; g.W.load=function(){var G=this.player.getVideoData();var B=G.transitionEndpointAtEndOfStream;if(B&&B.videoId){var a=this.player.Ch().cD.get("heartbeat"),V=g.Mk(G);!V||B.videoId!==V.videoId||G.jb?(this.player.a9(B.videoId,void 0,void 0,!0,!0,B),a&&a.MW("HEARTBEAT_ACTION_TRIGGER_AT_STREAM_END","HEARTBEAT_ACTION_TRANSITION_REASON_HAS_NEW_STREAM_TRANSITION_ENDPOINT"),G=!0):G=!1}else G=!1;G||(g.go.prototype.load.call(this),this.endScreen.show())}; g.W.unload=function(){g.go.prototype.unload.call(this);this.endScreen.hide();this.endScreen.destroy()}; g.W.onCueRangeEnter=function(G){this.Jg()&&(this.endScreen.created||this.endScreen.create(),G.getId()==="load"&&this.load())}; g.W.onCueRangeExit=function(G){G.getId()==="load"&&this.loaded&&this.unload()}; g.W.onVideoDataChange=function(){P83(this);this.G&&iJ2(this)&&(this.endScreen&&(this.endScreen.hide(),this.endScreen.created&&this.endScreen.destroy(),this.endScreen.dispose()),this.j?this.endScreen=new k6(this.player):this.endScreen=new tv(this.player),g.X(this,this.endScreen),g.SX(this.player,this.endScreen.element,4))};g.Is("endscreen",oK9);})(_yt_player);