(function(g){var window=this;'use strict';var Lpc=function(D,O){D.F1("onAutonavCoundownStarted",O)},PF8=function(D){var O,h,V; return D==null?void 0:(O=D.playerOverlays)==null?void 0:(h=O.playerOverlayRenderer)==null?void 0:(V=h.autoplay)==null?void 0:V.playerOverlayAutoplayRenderer},ba=function(D,O,h){g.my(D.element,"ytp-suggestion-set",!!O.videoId); var V=O.playlistId;h=O.zF(h?h:"mqdefault.jpg");var k=null,C=null;O instanceof g.Rm&&(O.lengthText?(k=O.lengthText||null,C=O.gp||null):O.lengthSeconds&&(k=g.t5(O.lengthSeconds),C=g.t5(O.lengthSeconds,!0)));var M=!!V;V=M&&g.P0(V).type==="RD";var c=O instanceof g.Rm?O.isLivePlayback:null,S=O instanceof g.Rm?O.isUpcoming:null,Y=O.author,J=O.shortViewCount,q=O.publishedTimeText,u=[],H=[];Y&&u.push(Y);J&&(u.push(J),H.push(J));q&&H.push(q);h={title:O.title,author:Y,author_and_views:u.join(" \u2022 "),aria_label:O.ariaLabel|| g.a6("Assistir a $TITLE",{TITLE:O.title}),duration:k,timestamp:C,url:O.sM(),is_live:c,is_upcoming:S,is_list:M,is_mix:V,background:h?"background-image: url("+h+")":"",views_and_publish_time:H.join(" \u2022 "),autoplayAlternativeHeader:O.Jj};O instanceof g.gS&&(h.playlist_length=O.playlistLength);D.update(h)},cv=function(D){var O=D.V(),h=O.W; g.N.call(this,{X:"a",Y:"ytp-autonav-suggestion-card",B:{href:"{{url}}",target:h?O.U:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},N:[{X:"div",Z8:["ytp-autonav-endscreen-upnext-thumbnail","ytp-autonav-thumbnail-small"],B:{style:"{{background}}"},N:[{X:"div",B:{"aria-label":"{{timestamp}}"},Z8:["ytp-autonav-timestamp"],W3:"{{duration}}"},{X:"div",Z8:["ytp-autonav-live-stamp"],W3:"Ao vivo"}, {X:"div",Z8:["ytp-autonav-upcoming-stamp"],W3:"Em breve"},{X:"div",Y:"ytp-autonav-list-overlay",N:[{X:"div",Y:"ytp-autonav-mix-text",W3:"Mix"},{X:"div",Y:"ytp-autonav-mix-icon"}]}]},{X:"div",Z8:["ytp-autonav-endscreen-upnext-title","ytp-autonav-title-card"],W3:"{{title}}"},{X:"div",Z8:["ytp-autonav-endscreen-upnext-author","ytp-autonav-author-card"],W3:"{{author}}"},{X:"div",Z8:["ytp-autonav-endscreen-upnext-author","ytp-autonav-view-and-date-card"],W3:"{{views_and_publish_time}}"}]});this.C=D;this.suggestion= null;this.D=h;this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress)},Ss=function(D,O){O=O===void 0?!1:O; g.N.call(this,{X:"div",Y:"ytp-autonav-endscreen-countdown-overlay"});var h=this;this.L=O;this.cancelCommand=this.J=void 0;this.j=0;this.container=new g.N({X:"div",Y:"ytp-autonav-endscreen-countdown-container"});g.F(this,this.container);this.container.CF(this.element);O=D.V();var V=O.W;this.C=D;this.suggestion=null;this.onVideoDataChange("newdata",this.C.getVideoData());this.G(D,"videodatachange",this.onVideoDataChange);this.D=new g.N({X:"div",Y:"ytp-autonav-endscreen-upnext-container",B:{"aria-label":"{{aria_label}}", "data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},N:[{X:"div",Y:"ytp-autonav-endscreen-upnext-header"},{X:"div",Y:"ytp-autonav-endscreen-upnext-alternative-header",W3:"{{autoplayAlternativeHeader}}"},{X:"a",Y:"ytp-autonav-endscreen-link-container",B:{href:"{{url}}",target:V?O.U:""},N:[{X:"div",Y:"ytp-autonav-endscreen-upnext-thumbnail",B:{style:"{{background}}"},N:[{X:"div",B:{"aria-label":"{{timestamp}}"},Z8:["ytp-autonav-timestamp"], W3:"{{duration}}"},{X:"div",Z8:["ytp-autonav-live-stamp"],W3:"Ao vivo"},{X:"div",Z8:["ytp-autonav-upcoming-stamp"],W3:"Em breve"}]},{X:"div",Y:"ytp-autonav-endscreen-video-info",N:[{X:"div",Y:"ytp-autonav-endscreen-premium-badge"},{X:"div",Y:"ytp-autonav-endscreen-upnext-title",W3:"{{title}}"},{X:"div",Y:"ytp-autonav-endscreen-upnext-author",W3:"{{author}}"},{X:"div",Y:"ytp-autonav-view-and-date",W3:"{{views_and_publish_time}}"},{X:"div",Y:"ytp-autonav-author-and-view",W3:"{{author_and_views}}"}]}]}]}); g.F(this,this.D);this.D.CF(this.container.element);V||this.G(this.D.z2("ytp-autonav-endscreen-link-container"),"click",this.Pg);this.C.createClientVe(this.container.element,this,115127);this.C.createClientVe(this.D.z2("ytp-autonav-endscreen-link-container"),this,115128);this.overlay=new g.N({X:"div",Y:"ytp-autonav-overlay"});g.F(this,this.overlay);this.overlay.CF(this.container.element);this.K=new g.N({X:"div",Y:"ytp-autonav-endscreen-button-container"});g.F(this,this.K);this.K.CF(this.container.element); this.cancelButton=new g.N({X:"button",Z8:["ytp-autonav-endscreen-upnext-button","ytp-autonav-endscreen-upnext-cancel-button",O.S("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],B:{"aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},W3:"Cancelar"});g.F(this,this.cancelButton);this.cancelButton.CF(this.K.element);this.cancelButton.listen("click",this.HV,this);this.C.createClientVe(this.cancelButton.element,this,115129);this.playButton=new g.N({X:"a",Z8:["ytp-autonav-endscreen-upnext-button", "ytp-autonav-endscreen-upnext-play-button",O.S("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],B:{href:"{{url}}",role:"button","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},W3:"Assista agora"});g.F(this,this.playButton);this.playButton.CF(this.K.element);this.playButton.listen("click",this.Pg,this);this.C.createServerVe(this.playButton.element,this.playButton,!0);(O=this.C.getVideoData())&&g08(this,O);this.W=new g.VQ(function(){R_0(h)},500); g.F(this,this.W);this.O1();this.G(D,"autonavvisibility",this.O1);this.C.S("web_autonav_color_transition")&&(this.G(D,"autonavchange",this.CP),this.G(D,"onAutonavCoundownStarted",this.R7T))},YD=function(D){var O=D.C.Mc(!0,D.C.isFullscreen()); g.my(D.container.element,"ytp-autonav-endscreen-small-mode",D.Q0(O));g.my(D.container.element,"ytp-autonav-endscreen-is-premium",!!D.suggestion&&!!D.suggestion.RO8);g.my(D.C.getRootNode(),"ytp-autonav-endscreen-cancelled-state",!D.C.Pa());g.my(D.C.getRootNode(),"countdown-running",D.Ld());g.my(D.container.element,"ytp-player-content",D.C.Pa());g.Ks(D.overlay.element,{width:O.width+"px"});if(!D.Ld()){D.C.Pa()?a4c(D,Math.round(f4C(D)/1E3)):a4c(D);O=!!D.suggestion&&!!D.suggestion.Jj;var h=D.C.Pa()|| !O;g.my(D.container.element,"ytp-autonav-endscreen-upnext-alternative-header-only",!h&&O);g.my(D.container.element,"ytp-autonav-endscreen-upnext-no-alternative-header",h&&!O);D.K.Uv(D.C.Pa());g.my(D.element,"ytp-enable-w2w-color-transitions",Kpx(D))}},R_0=function(D){var O=f4C(D),h=Math,V=h.min; var k=D.j?Date.now()-D.j:0;h=V.call(h,k,O);a4c(D,Math.ceil((O-h)/1E3));O-h<=500&&D.Ld()?D.select(!0):D.Ld()&&D.W.start()},f4C=function(D){if(D.C.isFullscreen()){var O; D=(O=D.C.getVideoData())==null?void 0:O.T5;return D===-1||D===void 0?8E3:D}return D.C.aO()>=0?D.C.aO():g.Le(D.C.V().experiments,"autoplay_time")||1E4},g08=function(D,O){O=O.getWatchNextResponse(); var h,V;O=(h=PF8(O))==null?void 0:(V=h.nextButton)==null?void 0:V.buttonRenderer;D.J=O==null?void 0:O.navigationEndpoint;h=O==null?void 0:O.trackingParams;D.playButton&&h&&D.C.setTrackingParams(D.playButton.element,h)},Kpx=function(D){var O; return!((O=D.C.getVideoData())==null||!O.watchToWatchTransitionRenderer)},a4c=function(D,O){O=O===void 0?-1:O; D=D.D.z2("ytp-autonav-endscreen-upnext-header");g.cj(D);if(O>=0){O=String(O);var h="Pr\u00f3ximo v\u00eddeo em $SECONDS".match(RegExp("\\$SECONDS","gi"))[0],V="Pr\u00f3ximo v\u00eddeo em $SECONDS".indexOf(h);if(V>=0){D.appendChild(g.Mf("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(0,V)));var k=g.CZ("span");g.SX(k,"ytp-autonav-endscreen-upnext-header-countdown-number");g.qf(k,O);D.appendChild(k);D.appendChild(g.Mf("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(V+h.length)));return}}g.qf(D,"Pr\u00f3ximo")}, Jo=function(D,O){g.N.call(this,{X:"div", Z8:["html5-endscreen","ytp-player-content",O||"base-endscreen"]});this.created=!1;this.player=D},qN=function(D){g.N.call(this,{X:"div", Z8:["ytp-upnext","ytp-player-content"],B:{"aria-label":"{{aria_label}}"},N:[{X:"div",Y:"ytp-cued-thumbnail-overlay-image",B:{style:"{{background}}"}},{X:"span",Y:"ytp-upnext-top",N:[{X:"span",Y:"ytp-upnext-header",W3:"Pr\u00f3ximo"},{X:"span",Y:"ytp-upnext-title",W3:"{{title}}"},{X:"span",Y:"ytp-upnext-author",W3:"{{author}}"}]},{X:"a",Y:"ytp-upnext-autoplay-icon",B:{role:"button",href:"{{url}}","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},N:[{X:"svg",B:{height:"100%",version:"1.1",viewBox:"0 0 72 72", width:"100%"},N:[{X:"circle",Y:"ytp-svg-autoplay-circle",B:{cx:"36",cy:"36",fill:"#fff","fill-opacity":"0.3",r:"31.5"}},{X:"circle",Y:"ytp-svg-autoplay-ring",B:{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",Y:"ytp-svg-fill",B:{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",Y:"ytp-upnext-bottom",N:[{X:"span",Y:"ytp-upnext-cancel"},{X:"span",Y:"ytp-upnext-paused", W3:"Reprodu\u00e7\u00e3o autom\u00e1tica pausada"}]}]});this.api=D;this.cancelButton=null;this.J=this.z2("ytp-svg-autoplay-ring");this.j=this.notification=this.D=this.suggestion=null;this.W=new g.VQ(this.QZ,5E3,this);this.K=0;var O=this.z2("ytp-upnext-cancel");this.cancelButton=new g.N({X:"button",Z8:["ytp-upnext-cancel-button","ytp-button"],B:{tabindex:"0","aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},W3:"Cancelar"});g.F(this,this.cancelButton);this.cancelButton.listen("click",this.S6, this);this.cancelButton.CF(O);this.cancelButton&&this.api.createClientVe(this.cancelButton.element,this,115129);g.F(this,this.W);this.api.createClientVe(this.element,this,18788);O=this.z2("ytp-upnext-autoplay-icon");this.G(O,"click",this.e6);this.api.createClientVe(O,this,115130);this.ob();this.G(D,"autonavvisibility",this.ob);this.G(D,"mdxnowautoplaying",this.cC5);this.G(D,"mdxautoplaycanceled",this.XFF);g.my(this.element,"ytp-upnext-mobile",this.api.V().K)},E08=function(D,O){if(O)return O; if(D.api.isFullscreen()){var h;D=(h=D.api.getVideoData())==null?void 0:h.T5;return D===-1||D===void 0?8E3:D}return D.api.aO()>=0?D.api.aO():g.Le(D.api.V().experiments,"autoplay_time")||1E4},j59=function(D,O){O=E08(D,O); var h=Math,V=h.min;var k=(0,g.sk)()-D.K;h=V.call(h,k,O);O=O===0?1:Math.min(h/O,1);D.J.setAttribute("stroke-dashoffset",""+-211*(O+1));O>=1&&D.Ld()&&D.api.getPresentingPlayerType()!==3?D.select(!0):D.Ld()&&D.D.start()},ua=function(D){Jo.call(this,D,"autonav-endscreen"); this.overlay=this.videoData=null;this.table=new g.N({X:"div",Y:"ytp-suggestion-panel",N:[{X:"div",Z8:["ytp-autonav-endscreen-upnext-header","ytp-autonav-endscreen-more-videos"],W3:"Mais v\u00eddeos"}]});this.T=new g.N({X:"div",Y:"ytp-suggestions-container"});this.videos=[];this.j=null;this.J=this.L=!1;this.K=new Ss(this.player);g.F(this,this.K);this.K.CF(this.element);D.getVideoData().t_?this.D=this.K:(this.D=new qN(D),g.X7(this.player,this.D.element,4),g.F(this,this.D));this.overlay=new g.N({X:"div", Y:"ytp-autonav-overlay-cancelled-state"});g.F(this,this.overlay);this.overlay.CF(this.element);this.W=new g.Fh(this);g.F(this,this.W);g.F(this,this.table);this.table.CF(this.element);this.table.show();g.F(this,this.T);this.T.CF(this.table.element);this.hide()},Hv=function(D){var O=D.Pa(); O!==D.J&&(D.J=O,D.player.publish("autonavvisibility"),D.J?(D.K!==D.D&&D.K.hide(),D.table.hide()):(D.K!==D.D&&D.K.show(),D.table.show()))},mL=function(D,O){g.N.call(this,{X:"button", Z8:["ytp-watch-on-youtube-button","ytp-button"],W3:"{{content}}"});this.C=D;this.buttonType=this.buttonType=O;this.K9();this.buttonType===2&&g.JX(this.element,"ytp-continue-watching-button");this.listen("click",this.onClick);this.listen("videodatachange",this.K9);this.Uv(!0)},es=function(D,O){Jo.call(this,D,"embeds-lite-endscreen"); this.C=D;this.D=O;this.C.createClientVe(this.element,this,156943);this.watchButton=new mL(D,2);g.F(this,this.watchButton);this.watchButton.CF(this.element);this.hide()},U4_=function(D){Jo.call(this,D,"subscribecard-endscreen"); this.D=new g.N({X:"div",Y:"ytp-subscribe-card",N:[{X:"img",Y:"ytp-author-image",B:{src:"{{profilePicture}}"}},{X:"div",Y:"ytp-subscribe-card-right",N:[{X:"div",Y:"ytp-author-name",W3:"{{author}}"},{X:"div",Y:"html5-subscribe-button-container"}]}]});g.F(this,this.D);this.D.CF(this.element);var O=D.getVideoData();this.subscribeButton=new g.eu("Inscreva-se",null,"Cancelar assinatura",null,!0,!1,O.Do,O.subscribed,"trailer-endscreen",null,D,!1);g.F(this,this.subscribeButton);this.subscribeButton.CF(this.D.z2("html5-subscribe-button-container")); this.G(D,"videodatachange",this.x7);this.x7();this.hide()},LC=function(D){var O=D.V(),h=g.Tr||g.fh?{style:"will-change: opacity"}:void 0,V=O.W,k=["ytp-videowall-still"]; O.K&&k.push("ytp-videowall-show-text");g.N.call(this,{X:"a",Z8:k,B:{href:"{{url}}",target:V?O.U:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},N:[{X:"div",Y:"ytp-videowall-still-image",B:{style:"{{background}}"}},{X:"span",Y:"ytp-videowall-still-info",B:{"aria-hidden":"true"},N:[{X:"span",Y:"ytp-videowall-still-info-bg",N:[{X:"span",Y:"ytp-videowall-still-info-content",B:h,N:[{X:"span",Y:"ytp-videowall-still-info-title",W3:"{{title}}"}, {X:"span",Y:"ytp-videowall-still-info-author",W3:"{{author_and_views}}"},{X:"span",Y:"ytp-videowall-still-info-live",W3:"Ao vivo"},{X:"span",Y:"ytp-videowall-still-info-duration",W3:"{{duration}}"}]}]}]},{X:"span",Z8:["ytp-videowall-still-listlabel-regular","ytp-videowall-still-listlabel"],B:{"aria-hidden":"true"},N:[{X:"span",Y:"ytp-videowall-still-listlabel-icon"},"Playlist",{X:"span",Y:"ytp-videowall-still-listlabel-length",N:[" (",{X:"span",W3:"{{playlist_length}}"},")"]}]},{X:"span",Z8:["ytp-videowall-still-listlabel-mix", "ytp-videowall-still-listlabel"],B:{"aria-hidden":"true"},N:[{X:"span",Y:"ytp-videowall-still-listlabel-mix-icon"},"Mix",{X:"span",Y:"ytp-videowall-still-listlabel-length",W3:" (50+)"}]}]});this.suggestion=null;this.K=V;this.api=D;this.D=new g.Fh(this);g.F(this,this.D);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.D.G(D,"videodatachange",this.onVideoDataChange);D.createServerVe(this.element,this);this.onVideoDataChange()},Pv=function(D){Jo.call(this,D,"videowall-endscreen"); var O=this;this.C=D;this.j=0;this.stills=[];this.W=this.videoData=null;this.J=this.T=!1;this.U=null;this.K=new g.Fh(this);g.F(this,this.K);this.L=new g.VQ(function(){g.JX(O.element,"ytp-show-tiles")},0); g.F(this,this.L);var h=new g.N({X:"button",Z8:["ytp-button","ytp-endscreen-previous"],B:{"aria-label":"Anterior"},N:[g.E1()]});g.F(this,h);h.CF(this.element);h.listen("click",this.M$,this);this.table=new g.mq({X:"div",Y:"ytp-endscreen-content"});g.F(this,this.table);this.table.CF(this.element);h=new g.N({X:"button",Z8:["ytp-button","ytp-endscreen-next"],B:{"aria-label":"Pr\u00f3ximo"},N:[g.jg()]});g.F(this,h);h.CF(this.element);h.listen("click",this.yg,this);D.getVideoData().t_?this.D=new Ss(D,!0): this.D=new qN(D);g.F(this,this.D);g.X7(this.player,this.D.element,4);D.createClientVe(this.element,this,158789);this.hide()},gf=function(D){return g.BR(D.player)&&D.So()&&!D.W},RN=function(D){var O=D.Pa(); O!==D.T&&(D.T=O,D.player.publish("autonavvisibility"))},aN=function(D){Jo.call(this,D,"watch-again-on-youtube-endscreen"); this.watchButton=new mL(D,1);g.F(this,this.watchButton);this.watchButton.CF(this.element);g.L$w(D)&&(this.D=new g.IW(D),g.F(this,this.D),this.K=new g.N({X:"div",Z8:["ytp-watch-again-on-youtube-endscreen-more-videos-container"],B:{tabIndex:"-1"},N:[this.D]}),g.F(this,this.K),this.D.CF(this.K.element),this.K.CF(this.element));D.createClientVe(this.element,this,156914);this.hide()},v0m=function(D){g.dX.call(this,D); var O=this;this.endScreen=null;this.K=this.D=this.j=this.W=!1;this.listeners=new g.Fh(this);g.F(this,this.listeners);var h=D.V(),V=D.getVideoData();V=V&&V.limitedPlaybackDurationInSeconds!==0;g.mY(g.sA(h))&&V&&!g.pN(D)?(this.K=!0,this.endScreen=new es(D,g.G3(D))):D.isEmbedsShortsMode()?this.endScreen=new aN(D):Aqm(D)?(this.W=!0,GnS(this),this.D?this.endScreen=new ua(D):this.endScreen=new Pv(D)):h.WM?this.endScreen=new U4_(D):this.endScreen=new Jo(D);g.F(this,this.endScreen);g.X7(D,this.endScreen.element, 4);tf9(this);this.listeners.G(D,"videodatachange",this.onVideoDataChange,this);this.listeners.G(D,g.Y8("endscreen"),function(k){O.onCueRangeEnter(k)}); this.listeners.G(D,g.J6("endscreen"),function(k){O.onCueRangeExit(k)})},GnS=function(D){var O=D.player.getVideoData(); if(!O||D.D===O.Jf&&D.j===O.t_)return!1;D.D=O.Jf;D.j=O.t_;return!0},Aqm=function(D){D=D.V(); return D.PF&&!D.WM&&!D.disableOrganicUi},tf9=function(D){D.player.aH("endscreen"); var O=D.player.getVideoData();O=new g.cw(Math.max((O.lengthSeconds-10)*1E3,0),0x8000000000000,{id:"preload",namespace:"endscreen"});var h=new g.cw(0x8000000000000,0x8000000000000,{id:"load",priority:8,namespace:"endscreen"});D.player.B2([O,h])}; g.F7.prototype.aO=g.V_(14,function(){return this.app.aO()}); g.Kx.prototype.aO=g.V_(13,function(){return this.getVideoData().cT}); g.T3.prototype.kx=g.V_(12,function(D){this.Zb().kx(D)}); g.wF.prototype.kx=g.V_(11,function(D){this.D!==D&&(this.D=D,this.x7())}); g.F9.prototype.kx=g.V_(10,function(D){this.overflowButton&&this.overflowButton.kx(D)}); g.T3.prototype.aJ=g.V_(9,function(D){this.Zb().aJ(D)}); g.zU.prototype.aJ=g.V_(8,function(D){this.K!==D&&(this.K=D,this.x7())}); g.F9.prototype.aJ=g.V_(7,function(D){this.shareButton&&this.shareButton.aJ(D)}); g.T3.prototype.J4=g.V_(6,function(D){this.Zb().J4(D)}); g.Su.prototype.J4=g.V_(5,function(D){this.uw!==D&&(this.uw=D,this.uN())}); g.T3.prototype.uu=g.V_(4,function(D){this.Zb().uu(D)}); g.F9.prototype.uu=g.V_(3,function(D){this.WP!==D&&(this.WP=D,this.W$())});g.e(cv,g.N);cv.prototype.select=function(){this.C.g5(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.Dy||void 0)&&this.C.logClick(this.element)}; cv.prototype.onClick=function(D){g.P4(D,this.C,this.D,this.suggestion.sessionData||void 0)&&this.select()}; cv.prototype.onKeyPress=function(D){switch(D.keyCode){case 13:case 32:D.defaultPrevented||(this.select(),D.preventDefault())}};g.e(Ss,g.N);g.b=Ss.prototype;g.b.mO=function(D){this.suggestion!==D&&(this.suggestion=D,ba(this.D,D),this.playButton.updateValue("url",this.suggestion.sM()),YD(this))}; g.b.Ld=function(){return this.j>0}; g.b.SD=function(){this.Ld()||(this.j=Date.now(),R_0(this),Lpc(this.C,f4C(this)),g.my(this.C.getRootNode(),"countdown-running",this.Ld()))}; g.b.fM=function(){this.m0();R_0(this);var D=this.D.z2("ytp-autonav-endscreen-upnext-header");D&&g.qf(D,"Pr\u00f3ximo")}; g.b.m0=function(){this.Ld()&&(this.W.stop(),this.j=0)}; g.b.select=function(D){this.C.nextVideo(!1,D===void 0?!1:D);this.m0()}; g.b.Pg=function(D){g.P4(D,this.C)&&(D.currentTarget===this.playButton.element?this.C.logClick(this.playButton.element):D.currentTarget===this.D.z2("ytp-autonav-endscreen-link-container")&&(D=this.D.z2("ytp-autonav-endscreen-link-container"),this.C.logVisibility(D,!0),this.C.logClick(D)),this.J?(this.C.F1("innertubeCommand",this.J),this.m0()):this.select())}; g.b.HV=function(){this.C.logClick(this.cancelButton.element);g.iA(this.C,!0);this.cancelCommand&&this.C.F1("innertubeCommand",this.cancelCommand)}; g.b.onVideoDataChange=function(D,O){g08(this,O);D=O.getWatchNextResponse();var h,V;D=(h=PF8(D))==null?void 0:(V=h.cancelButton)==null?void 0:V.buttonRenderer;this.cancelCommand=D==null?void 0:D.command}; g.b.R7T=function(D){if(Kpx(this)){var O=this.C.getVideoData().watchToWatchTransitionRenderer,h=O==null?void 0:O.fromColorPaletteDark;O=O==null?void 0:O.toColorPaletteDark;if(h&&O){var V=this.element;V.style.setProperty("--w2w-start-background-color",g.NT(h.surgeColor));V.style.setProperty("--w2w-start-primary-text-color",g.NT(h.primaryTitleColor));V.style.setProperty("--w2w-start-secondary-text-color",g.NT(h.secondaryTitleColor));V.style.setProperty("--w2w-end-background-color",g.NT(O.surgeColor)); V.style.setProperty("--w2w-end-primary-text-color",g.NT(O.primaryTitleColor));V.style.setProperty("--w2w-end-secondary-text-color",g.NT(O.secondaryTitleColor));V.style.setProperty("--w2w-animation-duration",D+"ms")}g.my(this.element,"ytp-w2w-animate",!0)}}; g.b.CP=function(D){this.C.S("web_autonav_color_transition")&&D!==2&&g.my(this.element,"ytp-w2w-animate",!1)}; g.b.O1=function(){var D=this.C.Pa();this.L&&this.WQ!==D&&this.Uv(D);YD(this);this.C.logVisibility(this.container.element,D);this.C.logVisibility(this.cancelButton.element,D);this.C.logVisibility(this.D.z2("ytp-autonav-endscreen-link-container"),D);this.C.logVisibility(this.playButton.element,D)}; g.b.Q0=function(D){return D.width<400||D.height<459};g.e(Jo,g.N);g.b=Jo.prototype;g.b.create=function(){this.created=!0}; g.b.destroy=function(){this.created=!1}; g.b.So=function(){return!1}; g.b.Pa=function(){return!1}; g.b.Iz=function(){return!1};g.e(qN,g.N);g.b=qN.prototype;g.b.QZ=function(){this.notification&&(this.W.stop(),this.XT(this.j),this.j=null,this.notification.close(),this.notification=null)}; g.b.mO=function(D){this.suggestion=D;ba(this,D,"hqdefault.jpg")}; g.b.ob=function(){this.Uv(this.api.Pa());this.api.logVisibility(this.element,this.api.Pa());this.api.logVisibility(this.z2("ytp-upnext-autoplay-icon"),this.api.Pa());this.cancelButton&&this.api.logVisibility(this.cancelButton.element,this.api.Pa())}; g.b.Maw=function(){window.focus();this.QZ()}; g.b.SD=function(D){var O=this;this.Ld()||(g.P9("a11y-announce","Pr\u00f3ximo "+this.suggestion.title),this.K=(0,g.sk)(),this.D=new g.VQ(function(){j59(O,D)},25),j59(this,D),Lpc(this.api,E08(this,D))); g.uY(this.element,"ytp-upnext-autoplay-paused")}; g.b.hide=function(){g.N.prototype.hide.call(this)}; g.b.Ld=function(){return!!this.D}; g.b.fM=function(){this.m0();this.K=(0,g.sk)();j59(this);g.JX(this.element,"ytp-upnext-autoplay-paused")}; g.b.m0=function(){this.Ld()&&(this.D.dispose(),this.D=null)}; g.b.select=function(D){D=D===void 0?!1:D;if(this.api.V().S("autonav_notifications")&&D&&window.Notification&&typeof document.hasFocus==="function"){var O=Notification.permission;O==="default"?Notification.requestPermission():O!=="granted"||document.hasFocus()||(this.QZ(),this.notification=new Notification("Pr\u00f3ximo",{body:this.suggestion.title,icon:this.suggestion.zF()}),this.j=this.G(this.notification,"click",this.Maw),this.W.start())}this.m0();this.api.nextVideo(!1,D)}; g.b.e6=function(D){!g.JJ(this.cancelButton.element,D.target)&&g.P4(D,this.api)&&(this.api.Pa()&&this.api.logClick(this.z2("ytp-upnext-autoplay-icon")),this.select())}; g.b.S6=function(){this.api.Pa()&&this.cancelButton&&this.api.logClick(this.cancelButton.element);g.iA(this.api,!0)}; g.b.cC5=function(D){this.api.getPresentingPlayerType();this.show();this.SD(D)}; g.b.XFF=function(){this.api.getPresentingPlayerType();this.m0();this.hide()}; g.b.fF=function(){this.m0();this.QZ();g.N.prototype.fF.call(this)};g.e(ua,Jo);g.b=ua.prototype;g.b.create=function(){Jo.prototype.create.call(this);this.W.G(this.player,"appresize",this.jt);this.W.G(this.player,"onVideoAreaChange",this.jt);this.W.G(this.player,"videodatachange",this.onVideoDataChange);this.W.G(this.player,"autonavchange",this.Fy);this.W.G(this.player,"onAutonavCancelled",this.wM);this.onVideoDataChange()}; g.b.show=function(){Jo.prototype.show.call(this);(this.L||this.j&&this.j!==this.videoData.clientPlaybackNonce)&&g.iA(this.player,!1);g.BR(this.player)&&this.So()&&!this.j?(Hv(this),this.videoData.autonavState===2?this.player.getVisibilityState()===3?this.D.select(!0):this.D.SD():this.videoData.autonavState===3&&this.D.fM()):(g.iA(this.player,!0),Hv(this));this.jt()}; g.b.hide=function(){Jo.prototype.hide.call(this);this.D.fM();Hv(this)}; g.b.jt=function(){var D=this.player.Mc(!0,this.player.isFullscreen());Hv(this);YD(this.K);g.my(this.element,"ytp-autonav-cancelled-small-mode",this.Q0(D));g.my(this.element,"ytp-autonav-cancelled-tiny-mode",this.aV(D));g.my(this.element,"ytp-autonav-cancelled-mini-mode",D.width<=400||D.height<=360);this.overlay&&g.Ks(this.overlay.element,{width:D.width+"px"});if(!this.J)for(D=0;D0&&(D= q*4,H=O<=S-2&&Y>=J*4;if((J+1)/q*V/M>M/(J/(q+1)*V)&&H)Y-=J*4,O+=2;else if(u)Y-=q*4,D+=2;else if(H)Y-=J*4,O+=2;else break}V=!1;Y>=12&&h*4-Y<=6&&(O>=4||D>=4)&&(V=!0);Y=D*96;c=O*54;M=Y/c=D-2&&J>=O-2?H=1:J%2===0&&S%2===0&&(J<2&&S<2?J===0&&S===0&&(H=2):H=2),q=g.er(q+this.j,h),H!==0){u=this.stills[M];u||(u=new LC(this.player),this.stills[M]=u,C.appendChild(u.element));var m=Math.floor(c*J/O),R=Math.floor(Y*S/D),f=Math.floor(c*(J+H)/O)-m-4,E=Math.floor(Y*(S+H)/D)-R-4;g.tu(u.element,R,m);g.sy(u.element,E,f);g.Ks(u.element,"transitionDelay",(J+S)/20+"s");g.my(u.element,"ytp-videowall-still-mini", H===1);g.my(u.element,"ytp-videowall-still-large",H>2);H=Math.max(E,f);g.my(u.element,"ytp-videowall-still-round-large",H>=256);g.my(u.element,"ytp-videowall-still-round-medium",H>96&&H<256);g.my(u.element,"ytp-videowall-still-round-small",H<=96);q=k[q];u.suggestion!==q&&(u.suggestion=q,H=u.api.V(),m=g.YF(u.element,"ytp-videowall-still-large")?"hqdefault.jpg":"mqdefault.jpg",ba(u,q,m),g.EA(H)&&!u.api.S("web_player_log_click_before_generating_ve_conversion_params")&&(H=q.sM(),m={},g.KN(u.api,"addEmbedsConversionTrackingParams", [m]),H=g.lF(H,m),u.updateValue("url",H)),(q=(q=q.sessionData)&&q.itct)&&u.api.setTrackingParams(u.element,q));M++}C.ariaBusy="false";g.my(this.element,"ytp-endscreen-paginate",M=M;k--)D=this.stills[k],g.Ye(D.element),g.SR(D);this.stills.length=M}}; g.b.onVideoDataChange=function(){var D=this.player.getVideoData(1);this.videoData!==D&&(D!=null&&g.CO(D)?(this.j=0,this.videoData=D,this.Co()):this.player.KF("missg",{vid:(D==null?void 0:D.videoId)||"",cpn:(D==null?void 0:D.clientPlaybackNonce)||""}))}; g.b.yg=function(){this.j+=this.stills.length;this.Co()}; g.b.M$=function(){this.j-=this.stills.length;this.Co()}; g.b.Iz=function(){return this.D.Ld()}; g.b.fq=function(D){D===1?(this.J=!1,this.W=this.videoData.clientPlaybackNonce,this.D.m0(),this.WQ&&this.Co()):(this.J=!0,this.WQ&&gf(this)&&(D===2?this.D.SD():D===3&&this.D.fM()))}; g.b.ZG=function(D){if(D){for(D=0;D0||D.endSeconds>0):D.mutedAutoplay;if((this.player.isEmbedsShortsMode()||this.K)&&!O)return!0;var h;var V=!!((D==null?0:g.CO(D))||(D==null?0:(h=D.suggestions)==null?0:h.length));V=!Aqm(this.player)||V;D=D.FC;h=this.player.XH();return V&&!D&&!h&&!O}; g.b.Pa=function(){return this.endScreen.Pa()}; g.b.Sw1=function(){return this.Pa()?this.endScreen.Iz():!1}; g.b.fF=function(){this.player.aH("endscreen");g.dX.prototype.fF.call(this)}; g.b.load=function(){var D=this.player.getVideoData();var O=D.transitionEndpointAtEndOfStream;if(O&&O.videoId){var h=this.player.Ev().oH.get("heartbeat"),V=g.CO(D);!V||O.videoId!==V.videoId||D.a$?(this.player.g5(O.videoId,void 0,void 0,!0,!0,O),h&&h.rg("HEARTBEAT_ACTION_TRIGGER_AT_STREAM_END","HEARTBEAT_ACTION_TRANSITION_REASON_HAS_NEW_STREAM_TRANSITION_ENDPOINT"),D=!0):D=!1}else D=!1;D||(g.dX.prototype.load.call(this),this.endScreen.show())}; g.b.unload=function(){g.dX.prototype.unload.call(this);this.endScreen.hide();this.endScreen.destroy()}; g.b.onCueRangeEnter=function(D){this.Bz()&&(this.endScreen.created||this.endScreen.create(),D.getId()==="load"&&this.load())}; g.b.onCueRangeExit=function(D){D.getId()==="load"&&this.loaded&&this.unload()}; g.b.onVideoDataChange=function(){tf9(this);this.W&&GnS(this)&&(this.endScreen&&(this.endScreen.hide(),this.endScreen.created&&this.endScreen.destroy(),this.endScreen.dispose()),this.D?this.endScreen=new ua(this.player):this.endScreen=new Pv(this.player),g.F(this,this.endScreen),g.X7(this.player,this.endScreen.element,4))};g.TP("endscreen",v0m);})(_yt_player);