(function(g){var window=this;'use strict';var Ehb=function(a,b){a.Qa("onAutonavCoundownStarted",b)},l6=function(a,b,c){g.Cq(a.element,"ytp-suggestion-set",!!b.videoId); var d=b.playlistId;c=b.Ig(c?c:"mqdefault.jpg");var e=null,f=null;b instanceof g.UN&&(b.lengthText?(e=b.lengthText||null,f=b.Vv||null):b.lengthSeconds&&(e=g.NR(b.lengthSeconds),f=g.NR(b.lengthSeconds,!0)));var h=!!d;d=h&&"RD"===g.SN(d).type;var l=b instanceof g.UN?b.isLivePlayback:null,m=b instanceof g.UN?b.isUpcoming:null,n=b.author,p=b.shortViewCount,q=b.publishedTimeText,r=[],v=[];n&&r.push(n);p&&(r.push(p),v.push(p));q&&v.push(q);c={title:b.title,author:n,author_and_views:r.join(" \u2022 "),aria_label:b.ariaLabel|| g.VP("Assistir a $TITLE",{TITLE:b.title}),duration:e,timestamp:f,url:b.Mk(),is_live:l,is_upcoming:m,is_list:h,is_mix:d,background:c?"background-image: url("+c+")":"",views_and_publish_time:v.join(" \u2022 "),autoplayAlternativeHeader:b.ws};b instanceof g.TN&&(c.playlist_length=b.playlistLength);a.update(c)},m6=function(a){var b=a.W(),c=b.C; g.X.call(this,{G:"a",S:"ytp-autonav-suggestion-card",Y:{href:"{{url}}",target:c?b.ea:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},X:[{G:"div",Ma:["ytp-autonav-endscreen-upnext-thumbnail","ytp-autonav-thumbnail-small"],Y:{style:"{{background}}"},X:[{G:"div",Y:{"aria-label":"{{timestamp}}"},Ma:["ytp-autonav-timestamp"],Aa:"{{duration}}"},{G:"div",Ma:["ytp-autonav-live-stamp"],Aa:"Ao vivo"}, {G:"div",Ma:["ytp-autonav-upcoming-stamp"],Aa:"Em breve"},{G:"div",S:"ytp-autonav-list-overlay",X:[{G:"div",S:"ytp-autonav-mix-text",Aa:"Mix"},{G:"div",S:"ytp-autonav-mix-icon"}]}]},{G:"div",Ma:["ytp-autonav-endscreen-upnext-title","ytp-autonav-title-card"],Aa:"{{title}}"},{G:"div",Ma:["ytp-autonav-endscreen-upnext-author","ytp-autonav-author-card"],Aa:"{{author}}"},{G:"div",Ma:["ytp-autonav-endscreen-upnext-author","ytp-autonav-view-and-date-card"],Aa:"{{views_and_publish_time}}"}]});this.I=a;this.suggestion= null;this.j=c;this.Ua("click",this.onClick);this.Ua("keypress",this.onKeyPress)},n6=function(a,b){b=void 0===b?!1:b; g.X.call(this,{G:"div",S:"ytp-autonav-endscreen-countdown-overlay"});var c=this;this.J=b;this.D=void 0;this.B=0;this.container=new g.X({G:"div",S:"ytp-autonav-endscreen-countdown-container"});g.G(this,this.container);this.container.Ia(this.element);b=a.W();var d=b.C;this.I=a;this.suggestion=null;this.onVideoDataChange("newdata",this.I.getVideoData());this.T(a,"videodatachange",this.onVideoDataChange);this.j=new g.X({G:"div",S:"ytp-autonav-endscreen-upnext-container",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}}"},X:[{G:"div",S:"ytp-autonav-endscreen-upnext-header"},{G:"div",S:"ytp-autonav-endscreen-upnext-alternative-header",Aa:"{{autoplayAlternativeHeader}}"},{G:"a",S:"ytp-autonav-endscreen-link-container",Y:{href:"{{url}}",target:d?b.ea:""},X:[{G:"div",S:"ytp-autonav-endscreen-upnext-thumbnail",Y:{style:"{{background}}"},X:[{G:"div",Y:{"aria-label":"{{timestamp}}"},Ma:["ytp-autonav-timestamp"], Aa:"{{duration}}"},{G:"div",Ma:["ytp-autonav-live-stamp"],Aa:"Ao vivo"},{G:"div",Ma:["ytp-autonav-upcoming-stamp"],Aa:"Em breve"}]},{G:"div",S:"ytp-autonav-endscreen-video-info",X:[{G:"div",S:"ytp-autonav-endscreen-premium-badge"},{G:"div",S:"ytp-autonav-endscreen-upnext-title",Aa:"{{title}}"},{G:"div",S:"ytp-autonav-endscreen-upnext-author",Aa:"{{author}}"},{G:"div",S:"ytp-autonav-view-and-date",Aa:"{{views_and_publish_time}}"},{G:"div",S:"ytp-autonav-author-and-view",Aa:"{{author_and_views}}"}]}]}]}); g.G(this,this.j);this.j.Ia(this.container.element);d||this.T(this.j.Ha("ytp-autonav-endscreen-link-container"),"click",this.tR);this.I.xb(this.container.element,this,115127);this.I.xb(this.j.Ha("ytp-autonav-endscreen-link-container"),this,115128);this.overlay=new g.X({G:"div",S:"ytp-autonav-overlay"});g.G(this,this.overlay);this.overlay.Ia(this.container.element);this.u=new g.X({G:"div",S:"ytp-autonav-endscreen-button-container"});g.G(this,this.u);this.u.Ia(this.container.element);this.cancelButton= new g.X({G:"button",Ma:["ytp-autonav-endscreen-upnext-button","ytp-autonav-endscreen-upnext-cancel-button",b.N("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],Y:{"aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},Aa:"Cancelar"});g.G(this,this.cancelButton);this.cancelButton.Ia(this.u.element);this.cancelButton.Ua("click",this.S_,this);this.I.xb(this.cancelButton.element,this,115129);this.playButton=new g.X({G:"a",Ma:["ytp-autonav-endscreen-upnext-button","ytp-autonav-endscreen-upnext-play-button", b.N("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],Y:{href:"{{url}}",role:"button","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},Aa:"Assista agora"});g.G(this,this.playButton);this.playButton.Ia(this.u.element);this.playButton.Ua("click",this.tR,this);this.I.xb(this.playButton.element,this,115130);this.C=new g.qq(function(){Fhb(c)},500); g.G(this,this.C);this.sR();this.T(a,"autonavvisibility",this.sR);this.I.N("web_autonav_color_transition")&&(this.T(a,"autonavchange",this.R_),this.T(a,"onAutonavCoundownStarted",this.u6))},o6=function(a){var b=a.I.Lk(!0,a.I.isFullscreen()); g.Cq(a.container.element,"ytp-autonav-endscreen-small-mode",a.jh(b));g.Cq(a.container.element,"ytp-autonav-endscreen-is-premium",!!a.suggestion&&!!a.suggestion.UI);g.Cq(a.I.getRootNode(),"ytp-autonav-endscreen-cancelled-state",!a.I.Kf());g.Cq(a.I.getRootNode(),"countdown-running",a.Qk());g.Cq(a.container.element,"ytp-player-content",a.I.Kf());g.qn(a.overlay.element,{width:b.width+"px"});if(!a.Qk()){a.I.Kf()?Ghb(a,Math.round(Hhb(a)/1E3)):Ghb(a);b=!!a.suggestion&&!!a.suggestion.ws;var c=a.I.Kf()||!b; g.Cq(a.container.element,"ytp-autonav-endscreen-upnext-alternative-header-only",!c&&b);g.Cq(a.container.element,"ytp-autonav-endscreen-upnext-no-alternative-header",c&&!b);g.fR(a.u,a.I.Kf());g.Cq(a.element,"ytp-enable-w2w-color-transitions",Ihb(a))}},Fhb=function(a){var b=Hhb(a),c=Math,d=c.min; var e=a.B?Date.now()-a.B:0;c=d.call(c,e,b);Ghb(a,Math.ceil((b-c)/1E3));500>=b-c&&a.Qk()?a.select(!0):a.Qk()&&a.C.start()},Hhb=function(a){if(a.I.isFullscreen()){var b; a=null==(b=a.I.getVideoData())?void 0:b.TE;return-1===a||void 0===a?8E3:a}return 0<=a.I.Ns()?a.I.Ns():g.nL(a.I.W().experiments,"autoplay_time")||1E4},Ihb=function(a){var b; return!(null==(b=a.I.getVideoData())||!b.watchToWatchTransitionRenderer)},Ghb=function(a,b){b=void 0===b?-1:b; a=a.j.Ha("ytp-autonav-endscreen-upnext-header");g.lf(a);if(0<=b){b=String(b);var c="Pr\u00f3ximo v\u00eddeo em $SECONDS".match(RegExp("\\$SECONDS","gi"))[0],d="Pr\u00f3ximo v\u00eddeo em $SECONDS".indexOf(c);if(0<=d){a.appendChild(g.df("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(0,d)));var e=g.cf("span");g.wq(e,"ytp-autonav-endscreen-upnext-header-countdown-number");g.qf(e,b);a.appendChild(e);a.appendChild(g.df("Pr\u00f3ximo v\u00eddeo em $SECONDS".slice(d+c.length)));return}}g.qf(a,"Pr\u00f3ximo")}, p6=function(a,b){g.X.call(this,{G:"div", Ma:["html5-endscreen","ytp-player-content",b||"base-endscreen"]});this.created=!1;this.player=a},q6=function(a){g.X.call(this,{G:"div", Ma:["ytp-upnext","ytp-player-content"],Y:{"aria-label":"{{aria_label}}"},X:[{G:"div",S:"ytp-cued-thumbnail-overlay-image",Y:{style:"{{background}}"}},{G:"span",S:"ytp-upnext-top",X:[{G:"span",S:"ytp-upnext-header",Aa:"Pr\u00f3ximo"},{G:"span",S:"ytp-upnext-title",Aa:"{{title}}"},{G:"span",S:"ytp-upnext-author",Aa:"{{author}}"}]},{G:"a",S:"ytp-upnext-autoplay-icon",Y:{role:"button",href:"{{url}}","aria-label":"Reproduzir pr\u00f3ximo v\u00eddeo"},X:[{G:"svg",Y:{height:"100%",version:"1.1",viewBox:"0 0 72 72", width:"100%"},X:[{G:"circle",S:"ytp-svg-autoplay-circle",Y:{cx:"36",cy:"36",fill:"#fff","fill-opacity":"0.3",r:"31.5"}},{G:"circle",S:"ytp-svg-autoplay-ring",Y:{cx:"-36",cy:"36","fill-opacity":"0",r:"33.5",stroke:"#FFFFFF","stroke-dasharray":"211","stroke-dashoffset":"-211","stroke-width":"4",transform:"rotate(-90)"}},{G:"path",S:"ytp-svg-fill",Y:{d:"M 24,48 41,36 24,24 V 48 z M 44,24 v 24 h 4 V 24 h -4 z"}}]}]},{G:"span",S:"ytp-upnext-bottom",X:[{G:"span",S:"ytp-upnext-cancel"},{G:"span",S:"ytp-upnext-paused", Aa:"Reprodu\u00e7\u00e3o autom\u00e1tica pausada"}]}]});this.api=a;this.cancelButton=null;this.D=this.Ha("ytp-svg-autoplay-ring");this.B=this.notification=this.j=this.suggestion=null;this.C=new g.qq(this.NF,5E3,this);this.u=0;var b=this.Ha("ytp-upnext-cancel");this.cancelButton=new g.X({G:"button",Ma:["ytp-upnext-cancel-button","ytp-button"],Y:{tabindex:"0","aria-label":"Cancelar reprodu\u00e7\u00e3o autom\u00e1tica"},Aa:"Cancelar"});g.G(this,this.cancelButton);this.cancelButton.Ua("click",this.T_, this);this.cancelButton.Ia(b);this.cancelButton&&this.api.xb(this.cancelButton.element,this,115129);g.G(this,this.C);this.api.xb(this.element,this,18788);b=this.Ha("ytp-upnext-autoplay-icon");this.T(b,"click",this.U_);this.api.xb(b,this,115130);this.uR();this.T(a,"autonavvisibility",this.uR);this.T(a,"mdxnowautoplaying",this.d7);this.T(a,"mdxautoplaycanceled",this.e7);g.Cq(this.element,"ytp-upnext-mobile",this.api.W().u)},Jhb=function(a,b){if(b)return b; if(a.api.isFullscreen()){var c;a=null==(c=a.api.getVideoData())?void 0:c.TE;return-1===a||void 0===a?8E3:a}return 0<=a.api.Ns()?a.api.Ns():g.nL(a.api.W().experiments,"autoplay_time")||1E4},Khb=function(a,b){b=Jhb(a,b); var c=Math,d=c.min;var e=(0,g.EB)()-a.u;c=d.call(c,e,b);b=0===b?1:Math.min(c/b,1);a.D.setAttribute("stroke-dashoffset",""+-211*(b+1));1<=b&&a.Qk()&&3!==a.api.getPresentingPlayerType()?a.select(!0):a.Qk()&&a.j.start()},r6=function(a){p6.call(this,a,"autonav-endscreen"); this.overlay=this.videoData=null;this.table=new g.X({G:"div",S:"ytp-suggestion-panel",X:[{G:"div",Ma:["ytp-autonav-endscreen-upnext-header","ytp-autonav-endscreen-more-videos"],Aa:"Mais v\u00eddeos"}]});this.K=new g.X({G:"div",S:"ytp-suggestions-container"});this.videos=[];this.B=null;this.D=this.J=!1;this.u=new n6(this.player);g.G(this,this.u);this.u.Ia(this.element);a.getVideoData().Re?this.j=this.u:(this.j=new q6(a),g.cT(this.player,this.j.element,4),g.G(this,this.j));this.overlay=new g.X({G:"div", S:"ytp-autonav-overlay-cancelled-state"});g.G(this,this.overlay);this.overlay.Ia(this.element);this.C=new g.fK(this);g.G(this,this.C);g.G(this,this.table);this.table.Ia(this.element);this.table.show();g.G(this,this.K);this.K.Ia(this.table.element);this.hide()},s6=function(a){var b=a.Kf(); b!==a.D&&(a.D=b,a.player.qa("autonavvisibility"),a.D?(a.u!==a.j&&a.u.hide(),a.table.hide()):(a.u!==a.j&&a.u.show(),a.table.show()))},t6=function(a,b){g.X.call(this,{G:"button", Ma:["ytp-watch-on-youtube-button","ytp-button"],Aa:"{{content}}"});this.I=a;this.buttonType=this.buttonType=b;b=this.I.getVideoData();if(a.N("embeds_enable_server_driven_watch_again_on_youtube")){var c,d;if(c=(a=null==(c=b.Bd)?void 0:null==(d=c.playerOverlays)?void 0:d.playerOverlayRenderer)&&g.R(a.watchOnYoutubeButton,g.FKa))this.j=c}if(this.j)this.update({content:this.j.title}),this.I.Wf(this.element,this),this.I.eg(this.element,this.j.trackingParams||null);else{switch(this.buttonType){case 1:c= "Assista outra vez no YouTube";d=156915;break;case 2:c="Continue assistindo no YouTube";d=156942;break;default:c="Continue assistindo no YouTube",d=156942}this.update({content:c});this.I.xb(this.element,this,d)}2===this.buttonType&&g.yq(this.element,"ytp-continue-watching-button");this.Ua("click",this.onClick);g.fR(this,!0)},u6=function(a,b){p6.call(this,a,"embeds-lite-endscreen"); this.I=a;this.j=b;this.I.xb(this.element,this,156943);this.watchButton=new t6(a,2);g.G(this,this.watchButton);this.watchButton.Ia(this.element);this.hide()},Lhb=function(a){p6.call(this,a,"subscribecard-endscreen"); this.j=new g.X({G:"div",S:"ytp-subscribe-card",X:[{G:"img",S:"ytp-author-image",Y:{src:"{{profilePicture}}"}},{G:"div",S:"ytp-subscribe-card-right",X:[{G:"div",S:"ytp-author-name",Aa:"{{author}}"},{G:"div",S:"html5-subscribe-button-container"}]}]});g.G(this,this.j);this.j.Ia(this.element);var b=a.getVideoData();this.subscribeButton=new g.MU("Inscreva-se",null,"Cancelar assinatura",null,!0,!1,b.vk,b.subscribed,"trailer-endscreen",null,a);g.G(this,this.subscribeButton);this.subscribeButton.Ia(this.j.Ha("html5-subscribe-button-container")); this.T(a,"videodatachange",this.Ta);this.Ta();this.hide()},v6=function(a){var b=a.W(),c=g.iK||g.pM?{style:"will-change: opacity"}:void 0,d=b.C,e=["ytp-videowall-still"]; b.u&&e.push("ytp-videowall-show-text");g.X.call(this,{G:"a",Ma:e,Y:{href:"{{url}}",target:d?b.ea:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},X:[{G:"div",S:"ytp-videowall-still-image",Y:{style:"{{background}}"}},{G:"span",S:"ytp-videowall-still-info",Y:{"aria-hidden":"true"},X:[{G:"span",S:"ytp-videowall-still-info-bg",X:[{G:"span",S:"ytp-videowall-still-info-content",Y:c,X:[{G:"span",S:"ytp-videowall-still-info-title",Aa:"{{title}}"}, {G:"span",S:"ytp-videowall-still-info-author",Aa:"{{author_and_views}}"},{G:"span",S:"ytp-videowall-still-info-live",Aa:"Ao vivo"},{G:"span",S:"ytp-videowall-still-info-duration",Aa:"{{duration}}"}]}]}]},{G:"span",Ma:["ytp-videowall-still-listlabel-regular","ytp-videowall-still-listlabel"],Y:{"aria-hidden":"true"},X:[{G:"span",S:"ytp-videowall-still-listlabel-icon"},"Playlist",{G:"span",S:"ytp-videowall-still-listlabel-length",X:[" (",{G:"span",Aa:"{{playlist_length}}"},")"]}]},{G:"span",Ma:["ytp-videowall-still-listlabel-mix", "ytp-videowall-still-listlabel"],Y:{"aria-hidden":"true"},X:[{G:"span",S:"ytp-videowall-still-listlabel-mix-icon"},"Mix",{G:"span",S:"ytp-videowall-still-listlabel-length",Aa:" (50+)"}]}]});this.suggestion=null;this.u=d;this.api=a;this.j=new g.fK(this);g.G(this,this.j);this.Ua("click",this.onClick);this.Ua("keypress",this.onKeyPress);this.j.T(a,"videodatachange",this.onVideoDataChange);a.Wf(this.element,this);this.onVideoDataChange()},w6=function(a){p6.call(this,a,"videowall-endscreen"); var b=this;this.I=a;this.B=0;this.stills=[];this.C=this.videoData=null;this.D=this.K=!1;this.V=null;this.u=new g.fK(this);g.G(this,this.u);this.J=new g.qq(function(){g.yq(b.element,"ytp-show-tiles")},0); g.G(this,this.J);var c=new g.X({G:"button",Ma:["ytp-button","ytp-endscreen-previous"],Y:{"aria-label":"Anterior"},X:[g.jR()]});g.G(this,c);c.Ia(this.element);c.Ua("click",this.Y_,this);this.table=new g.cR({G:"div",S:"ytp-endscreen-content"});g.G(this,this.table);this.table.Ia(this.element);c=new g.X({G:"button",Ma:["ytp-button","ytp-endscreen-next"],Y:{"aria-label":"Pr\u00f3ximo"},X:[g.kR()]});g.G(this,c);c.Ia(this.element);c.Ua("click",this.X_,this);a.getVideoData().Re?this.j=new n6(a,!0):this.j= new q6(a);g.G(this,this.j);g.cT(this.player,this.j.element,4);a.xb(this.element,this,158789);this.hide()},x6=function(a){return g.dT(a.player)&&a.qB()&&!a.C},y6=function(a){var b=a.Kf(); b!==a.K&&(a.K=b,a.player.qa("autonavvisibility"))},z6=function(a){p6.call(this,a,"watch-again-on-youtube-endscreen"); this.watchButton=new t6(a,1);g.G(this,this.watchButton);this.watchButton.Ia(this.element);g.b9a(a)&&(this.j=new g.i3(a,g.MS(a)),g.G(this,this.j),this.u=new g.X({G:"div",Ma:["ytp-watch-again-on-youtube-endscreen-more-videos-container"],Y:{tabIndex:"-1"},X:[this.j]}),g.G(this,this.u),this.j.Ia(this.u.element),this.u.Ia(this.element));a.xb(this.element,this,156914);this.hide()},Phb=function(a){g.dU.call(this,a); var b=this;this.endScreen=null;this.u=this.j=this.B=this.C=!1;this.listeners=new g.fK(this);g.G(this,this.listeners);var c=a.W(),d=a.getVideoData();d=d&&0!==d.endSeconds;g.jA(g.IM(c))&&d&&!g.ZS(a)?(this.u=!0,this.endScreen=new u6(a,g.MS(a))):g.$S(a)?this.endScreen=new z6(a):Mhb(a)?(this.C=!0,Nhb(this),this.j?this.endScreen=new r6(a):this.endScreen=new w6(a)):c.Ch?this.endScreen=new Lhb(a):this.endScreen=new p6(a);g.G(this,this.endScreen);g.cT(a,this.endScreen.element,4);Ohb(this);this.listeners.T(a, "videodatachange",this.onVideoDataChange,this);this.listeners.T(a,g.$F("endscreen"),function(e){b.onCueRangeEnter(e)}); this.listeners.T(a,g.aG("endscreen"),function(e){b.onCueRangeExit(e)})},Nhb=function(a){var b=a.player.getVideoData(); if(!b||a.j===b.Gl&&a.B===b.Re)return!1;a.j=b.Gl;a.B=b.Re;return!0},Mhb=function(a){a=a.W(); return a.Gd&&!a.Ch},Ohb=function(a){a.player.Pe("endscreen"); var b=a.player.getVideoData();b=new g.YF(Math.max(1E3*(b.lengthSeconds-10),0),0x8000000000000,{id:"preload",namespace:"endscreen"});var c=new g.YF(0x8000000000000,0x8000000000000,{id:"load",priority:8,namespace:"endscreen"});a.player.cf([b,c])}; g.BW.prototype.eA=g.da(36,function(a){this.cP!==a&&(this.cP=a,this.Bl())}); g.pV.prototype.Er=g.da(35,function(a){this.u!==a&&(this.u=a,this.Ta())}); g.BW.prototype.Er=g.da(34,function(a){this.shareButton&&this.shareButton.Er(a)}); g.lV.prototype.Dr=g.da(33,function(a){this.j!==a&&(this.j=a,this.Ta())}); g.BW.prototype.Dr=g.da(32,function(a){this.overflowButton&&this.overflowButton.Dr(a)}); g.DU.prototype.rE=g.da(31,function(a){this.dP!==a&&(this.dP=a,this.Op())}); g.VS.prototype.Ns=g.da(5,function(){return this.app.Ns()}); g.r_.prototype.Ns=g.da(4,function(){return this.getVideoData().OS});g.x(m6,g.X);m6.prototype.select=function(){this.I.oo(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.MB||void 0)&&this.I.ub(this.element)}; m6.prototype.onClick=function(a){g.sT(a,this.I,this.j,this.suggestion.sessionData||void 0)&&this.select()}; m6.prototype.onKeyPress=function(a){switch(a.keyCode){case 13:case 32:g.cQ(a)||(this.select(),g.dQ(a))}};g.x(n6,g.X);g.k=n6.prototype;g.k.eF=function(a){this.suggestion!==a&&(this.suggestion=a,l6(this.j,a),this.playButton.updateValue("url",this.suggestion.Mk()),o6(this))}; g.k.Qk=function(){return 0a.width||459>a.height};g.x(p6,g.X);g.k=p6.prototype;g.k.create=function(){this.created=!0}; g.k.destroy=function(){this.created=!1}; g.k.qB=function(){return!1}; g.k.Kf=function(){return!1}; g.k.WV=function(){return!1};g.x(q6,g.X);g.k=q6.prototype;g.k.NF=function(){this.notification&&(this.C.stop(),this.Kc(this.B),this.B=null,this.notification.close(),this.notification=null)}; g.k.eF=function(a){this.suggestion=a;l6(this,a,"hqdefault.jpg")}; g.k.uR=function(){g.fR(this,this.api.Kf());this.api.Za(this.element,this.api.Kf());this.api.Za(this.Ha("ytp-upnext-autoplay-icon"),this.api.Kf());this.cancelButton&&this.api.Za(this.cancelButton.element,this.api.Kf())}; g.k.m7=function(){window.focus();this.NF()}; g.k.mA=function(a){var b=this;this.Qk()||(g.kD("a11y-announce","Pr\u00f3ximo "+this.suggestion.title),this.u=(0,g.EB)(),this.j=new g.qq(function(){Khb(b,a)},25),Khb(this,a),Ehb(this.api,Jhb(this,a))); g.Aq(this.element,"ytp-upnext-autoplay-paused")}; g.k.hide=function(){g.X.prototype.hide.call(this)}; g.k.Qk=function(){return!!this.j}; g.k.pw=function(){this.Kr();this.u=(0,g.EB)();Khb(this);g.yq(this.element,"ytp-upnext-autoplay-paused")}; g.k.Kr=function(){this.Qk()&&(this.j.dispose(),this.j=null)}; g.k.select=function(a){a=void 0===a?!1:a;if(this.api.W().N("autonav_notifications")&&a&&window.Notification&&"function"===typeof document.hasFocus){var b=Notification.permission;"default"===b?Notification.requestPermission():"granted"!==b||document.hasFocus()||(this.NF(),this.notification=new Notification("Pr\u00f3ximo",{body:this.suggestion.title,icon:this.suggestion.Ig()}),this.B=this.T(this.notification,"click",this.m7),this.C.start())}this.Kr();this.api.nextVideo(!1,a)}; g.k.U_=function(a){!g.pf(this.cancelButton.element,g.bQ(a))&&g.sT(a,this.api)&&(this.api.Kf()&&this.api.ub(this.Ha("ytp-upnext-autoplay-icon")),this.select())}; g.k.T_=function(){this.api.Kf()&&this.cancelButton&&this.api.ub(this.cancelButton.element);g.XS(this.api,!0)}; g.k.d7=function(a){this.api.getPresentingPlayerType();this.show();this.mA(a)}; g.k.e7=function(){this.api.getPresentingPlayerType();this.Kr();this.hide()}; g.k.xa=function(){this.Kr();this.NF();g.X.prototype.xa.call(this)};g.x(r6,p6);g.k=r6.prototype;g.k.create=function(){p6.prototype.create.call(this);this.C.T(this.player,"appresize",this.TA);this.C.T(this.player,"onVideoAreaChange",this.TA);this.C.T(this.player,"videodatachange",this.onVideoDataChange);this.C.T(this.player,"autonavchange",this.vR);this.C.T(this.player,"autonavcancel",this.V_);this.onVideoDataChange()}; g.k.show=function(){p6.prototype.show.call(this);(this.J||this.B&&this.B!==this.videoData.clientPlaybackNonce)&&g.XS(this.player,!1);g.dT(this.player)&&this.qB()&&!this.B?(s6(this),2===this.videoData.autonavState?3===this.player.getVisibilityState()?this.j.select(!0):this.j.mA():3===this.videoData.autonavState&&this.j.pw()):(g.XS(this.player,!0),s6(this));this.TA()}; g.k.hide=function(){p6.prototype.hide.call(this);this.j.pw();s6(this)}; g.k.TA=function(){var a=this.player.Lk(!0,this.player.isFullscreen());s6(this);o6(this.u);g.Cq(this.element,"ytp-autonav-cancelled-small-mode",this.jh(a));g.Cq(this.element,"ytp-autonav-cancelled-tiny-mode",this.bH(a));g.Cq(this.element,"ytp-autonav-cancelled-mini-mode",400>=a.width||360>=a.height);this.overlay&&g.qn(this.overlay.element,{width:a.width+"px"});if(!this.D)for(a=0;aa.width||459>a.height)&&!this.bH(a)&&!(400>=a.width||360>=a.height)}; g.k.bH=function(a){return 800>a.width&&!(400>=a.width||360>=a.height)}; g.k.Kf=function(){return this.Fb&&g.dT(this.player)&&this.qB()&&!this.B}; var Qhb=[1,3,2,4];g.x(t6,g.X);g.k=t6.prototype;g.k.onClick=function(a){this.I.N("web_player_log_click_before_generating_ve_conversion_params")&&this.I.ub(this.element);this.j?this.I.Qa("innertubeCommand",g.R(this.j.onTap,g.$Q)):g.tT(this.getVideoUrl(),this.I,a);this.I.N("web_player_log_click_before_generating_ve_conversion_params")||this.I.ub(this.element)}; g.k.getVideoUrl=function(){var a=!0;switch(this.buttonType){case 1:a=!0;break;case 2:a=!1}a=this.I.getVideoUrl(a,!1,!1,!0);var b=this.I.W();if(g.rM(b)||g.AM(b)){var c={};b.Ea&&g.rM(b)&&g.DS(c,b.loaderUrl);g.rM(b)&&g.KS(this.I,"addEmbedsConversionTrackingParams",[c]);a:{switch(this.buttonType){case 2:b="emb_ytp_continue_watching";break a}b="emb_ytp_watch_again"}g.CS(c,b);a=g.Ij(a,c)}return a}; g.k.Za=function(){this.I.Za(this.element,this.Fb&&this.ea)}; g.k.show=function(){g.X.prototype.show.call(this);this.Za()}; g.k.hide=function(){g.X.prototype.hide.call(this);this.Za()}; g.k.pc=function(a){g.X.prototype.pc.call(this,a);this.Za()};g.x(u6,p6);u6.prototype.show=function(){3!==this.player.getPlayerState()&&(p6.prototype.show.call(this),this.j.eA(!0),this.j.Er(!0),this.I.W().Lc||this.j.Dr(!0),this.I.Za(this.element,!0),this.watchButton.pc(!0))}; u6.prototype.hide=function(){p6.prototype.hide.call(this);this.j.eA(!1);this.j.Er(!1);this.j.Dr(!1);this.I.Za(this.element,!1);this.watchButton.pc(!1)};g.x(Lhb,p6);Lhb.prototype.Ta=function(){var a=this.player.getVideoData();this.j.update({profilePicture:a.profilePicture,author:a.author});this.subscribeButton.channelId=a.vk;var b=this.subscribeButton;a.subscribed?b.j():b.u()};g.x(v6,g.X);v6.prototype.select=function(){this.api.oo(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.MB||void 0)&&this.api.ub(this.element)}; v6.prototype.onClick=function(a){if(g.rM(this.api.W())&&this.api.N("web_player_log_click_before_generating_ve_conversion_params")){this.api.ub(this.element);var b=this.suggestion.Mk(),c={};g.eKa(this.api,c,"emb_rel_end");b=g.Ij(b,c);g.tT(b,this.api,a)}else g.sT(a,this.api,this.u,this.suggestion.sessionData||void 0)&&this.select()}; v6.prototype.onKeyPress=function(a){switch(a.keyCode){case 13:case 32:g.cQ(a)||(this.select(),g.dQ(a))}}; v6.prototype.onVideoDataChange=function(){var a=this.api.getVideoData(),b=this.api.W();this.u=a.Ed?!1:b.C};g.x(w6,p6);g.k=w6.prototype;g.k.create=function(){p6.prototype.create.call(this);var a=this.player.getVideoData();a&&(this.videoData=a);this.Xp();this.u.T(this.player,"appresize",this.Xp);this.u.T(this.player,"onVideoAreaChange",this.Xp);this.u.T(this.player,"videodatachange",this.onVideoDataChange);this.u.T(this.player,"autonavchange",this.RJ);this.u.T(this.player,"autonavcancel",this.W_);a=this.videoData.autonavState;a!==this.V&&this.RJ(a);this.u.T(this.element,"transitionend",this.z8)}; g.k.destroy=function(){g.FA(this.u);g.sb(this.stills);this.stills=[];p6.prototype.destroy.call(this);g.Aq(this.element,"ytp-show-tiles");this.J.stop();this.V=this.videoData.autonavState}; g.k.qB=function(){return 1!==this.videoData.autonavState}; g.k.show=function(){var a=this.Fb;p6.prototype.show.call(this);g.Aq(this.element,"ytp-show-tiles");this.player.W().u?g.sq(this.J):this.J.start();(this.D||this.C&&this.C!==this.videoData.clientPlaybackNonce)&&g.XS(this.player,!1);x6(this)?(y6(this),2===this.videoData.autonavState?3===this.player.getVisibilityState()?this.j.select(!0):this.j.mA():3===this.videoData.autonavState&&this.j.pw()):(g.XS(this.player,!0),y6(this));a!==this.Fb&&this.player.Za(this.element,!0)}; g.k.hide=function(){var a=this.Fb;p6.prototype.hide.call(this);this.j.pw();y6(this);a!==this.Fb&&this.player.Za(this.element,!1)}; g.k.z8=function(a){g.bQ(a)===this.element&&this.Xp()}; g.k.Xp=function(){var a,b,c,d;var e=(null==(a=this.videoData)?0:null==(b=a.suggestions)?0:b.length)?null==(c=this.videoData)?void 0:c.suggestions:[null==(d=this.videoData)?void 0:g.AO(d)];if(e.length){g.yq(this.element,"ytp-endscreen-paginate");var f=this.I.Lk(!0,this.I.isFullscreen());if(a=g.MS(this.I))a=a.Kg()?48:32,f.width-=2*a;var h=f.width/f.height;d=96/54;b=a=2;var l=Math.max(f.width/96,2),m=Math.max(f.height/54,2);c=e.length;var n=Math.pow(2,2);var p=c*n+(Math.pow(2,2)-n);p+=Math.pow(2,2)- n;for(p-=n;0=r*n,y=b<=m-2&&p>=q*n;if((q+1)/r*d/h>h/(q/(r+1)*d)&&y)p-=q*n,b+=2;else if(v)p-=r*n,a+=2;else if(y)p-=q*n,b+=2;else break}d=!1;p>=3*n&&6>=c*n-p&&(4<=b||4<=a)&&(d=!0);n=96*a;p=54*b;h=n/p=a-2&&m>=b-2?v=1:0===m%2&&0===l%2&&(2>m&&2>l?0===m&&0===l&&(v=2):v=2),q=g.se(q+this.B,c),0!==v){r=this.stills[h];r||(r=new v6(this.player),this.stills[h]=r,f.appendChild(r.element));y=Math.floor(p*m/b);var A=Math.floor(n*l/a),F=Math.floor(p*(m+v)/b)-y-4,M=Math.floor(n*(l+v)/a)-A-4;g.wn(r.element,A,y);g.An(r.element,M,F);g.qn(r.element,"transitionDelay", (m+l)/20+"s");g.Cq(r.element,"ytp-videowall-still-mini",1===v);g.Cq(r.element,"ytp-videowall-still-large",2v);g.Cq(r.element,"ytp-videowall-still-round-small",96>=v);q=e[q];r.suggestion!==q&&(r.suggestion=q,v=r.api.W(),y=g.xq(r.element,"ytp-videowall-still-large")?"hqdefault.jpg":"mqdefault.jpg",l6(r,q,y),g.rM(v)&&!r.api.N("web_player_log_click_before_generating_ve_conversion_params")&& (y=q.Mk(),A={},v.Ea&&g.DS(A,v.loaderUrl),g.KS(r.api,"addEmbedsConversionTrackingParams",[A]),y=g.Ij(y,g.CS(A,"emb_rel_end")),r.updateValue("url",y)),(q=(q=q.sessionData)&&q.itct)&&r.api.eg(r.element,q));h++}f.ariaBusy="false";g.Cq(this.element,"ytp-endscreen-paginate",h=h;e--)a=this.stills[e],g.nf(a.element),g.qb(a);this.stills.length=h}}; g.k.onVideoDataChange=function(){var a=this.player.getVideoData();this.videoData!==a&&(this.B=0,this.videoData=a,this.Xp())}; g.k.X_=function(){this.B+=this.stills.length;this.Xp()}; g.k.Y_=function(){this.B-=this.stills.length;this.Xp()}; g.k.WV=function(){return this.j.Qk()}; g.k.RJ=function(a){1===a?(this.D=!1,this.C=this.videoData.clientPlaybackNonce,this.j.Kr(),this.Fb&&this.Xp()):(this.D=!0,this.Fb&&x6(this)&&(2===a?this.j.mA():3===a&&this.j.pw()))}; g.k.W_=function(a){if(a){for(a=0;a