HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/dallavitae/assets/endscreen.js
(function(g){var window=this;'use strict';var Bwb=function(a,b){a.jb("onAutonavCoundownStarted",b)},i6=function(a,b,c){g.Nv(a.element,"ytp-suggestion-set",!!b.videoId);
var d=b.playlistId;c=b.gh(c?c:"mqdefault.jpg");var e=null,f=null;b instanceof g.cS&&(b.lengthText?(e=b.lengthText||null,f=b.yx||null):b.lengthSeconds&&(e=g.HF(b.lengthSeconds),f=g.HF(b.lengthSeconds,!0)));var h=!!d;d=h&&g.gWa(d).type==="RD";var l=b instanceof g.cS?b.isLivePlayback:null,m=b instanceof g.cS?b.isUpcoming:null,n=b.author,p=b.shortViewCount,q=b.publishedTimeText,r=[],t=[];n&&r.push(n);p&&(r.push(p),t.push(p));q&&t.push(q);c={title:b.title,author:n,author_and_views:r.join(" \u2022 "),aria_label:b.ariaLabel||
g.$I("Guarda $TITLE",{TITLE:b.title}),duration:e,timestamp:f,url:b.rl(),is_live:l,is_upcoming:m,is_list:h,is_mix:d,background:c?"background-image: url("+c+")":"",views_and_publish_time:t.join(" \u2022 "),autoplayAlternativeHeader:b.nt};b instanceof g.bS&&(c.playlist_length=b.playlistLength);a.update(c)},j6=function(a){var b=a.U(),c=b.D;
g.W.call(this,{I:"a",S:"ytp-autonav-suggestion-card",W:{href:"{{url}}",target:c?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}}"},V:[{I:"div",La:["ytp-autonav-endscreen-upnext-thumbnail","ytp-autonav-thumbnail-small"],W:{style:"{{background}}"},V:[{I:"div",W:{"aria-label":"{{timestamp}}"},La:["ytp-autonav-timestamp"],xa:"{{duration}}"},{I:"div",La:["ytp-autonav-live-stamp"],xa:"Dal vivo"},
{I:"div",La:["ytp-autonav-upcoming-stamp"],xa:"In programma"},{I:"div",S:"ytp-autonav-list-overlay",V:[{I:"div",S:"ytp-autonav-mix-text",xa:"Mix"},{I:"div",S:"ytp-autonav-mix-icon"}]}]},{I:"div",La:["ytp-autonav-endscreen-upnext-title","ytp-autonav-title-card"],xa:"{{title}}"},{I:"div",La:["ytp-autonav-endscreen-upnext-author","ytp-autonav-author-card"],xa:"{{author}}"},{I:"div",La:["ytp-autonav-endscreen-upnext-author","ytp-autonav-view-and-date-card"],xa:"{{views_and_publish_time}}"}]});this.J=
a;this.suggestion=null;this.j=c;this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress)},k6=function(a,b){b=b===void 0?!1:b;
g.W.call(this,{I:"div",S:"ytp-autonav-endscreen-countdown-overlay"});var c=this;this.K=b;this.cancelCommand=this.G=void 0;this.C=0;this.container=new g.W({I:"div",S:"ytp-autonav-endscreen-countdown-container"});g.M(this,this.container);this.container.Ka(this.element);b=a.U();var d=b.D;this.J=a;this.suggestion=null;this.onVideoDataChange("newdata",this.J.getVideoData());this.T(a,"videodatachange",this.onVideoDataChange);this.j=new g.W({I:"div",S:"ytp-autonav-endscreen-upnext-container",W:{"aria-label":"{{aria_label}}",
"data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}","data-is-upcoming":"{{is_upcoming}}"},V:[{I:"div",S:"ytp-autonav-endscreen-upnext-header"},{I:"div",S:"ytp-autonav-endscreen-upnext-alternative-header",xa:"{{autoplayAlternativeHeader}}"},{I:"a",S:"ytp-autonav-endscreen-link-container",W:{href:"{{url}}",target:d?b.Y:""},V:[{I:"div",S:"ytp-autonav-endscreen-upnext-thumbnail",W:{style:"{{background}}"},V:[{I:"div",W:{"aria-label":"{{timestamp}}"},La:["ytp-autonav-timestamp"],
xa:"{{duration}}"},{I:"div",La:["ytp-autonav-live-stamp"],xa:"Dal vivo"},{I:"div",La:["ytp-autonav-upcoming-stamp"],xa:"In programma"}]},{I:"div",S:"ytp-autonav-endscreen-video-info",V:[{I:"div",S:"ytp-autonav-endscreen-premium-badge"},{I:"div",S:"ytp-autonav-endscreen-upnext-title",xa:"{{title}}"},{I:"div",S:"ytp-autonav-endscreen-upnext-author",xa:"{{author}}"},{I:"div",S:"ytp-autonav-view-and-date",xa:"{{views_and_publish_time}}"},{I:"div",S:"ytp-autonav-author-and-view",xa:"{{author_and_views}}"}]}]}]});
g.M(this,this.j);this.j.Ka(this.container.element);d||this.T(this.j.Fa("ytp-autonav-endscreen-link-container"),"click",this.OU);this.J.createClientVe(this.container.element,this,115127);this.J.createClientVe(this.j.Fa("ytp-autonav-endscreen-link-container"),this,115128);this.overlay=new g.W({I:"div",S:"ytp-autonav-overlay"});g.M(this,this.overlay);this.overlay.Ka(this.container.element);this.B=new g.W({I:"div",S:"ytp-autonav-endscreen-button-container"});g.M(this,this.B);this.B.Ka(this.container.element);
this.cancelButton=new g.W({I:"button",La:["ytp-autonav-endscreen-upnext-button","ytp-autonav-endscreen-upnext-cancel-button",b.L("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],W:{"aria-label":"Annulla riproduzione automatica"},xa:"Annulla"});g.M(this,this.cancelButton);this.cancelButton.Ka(this.B.element);this.cancelButton.listen("click",this.V4,this);this.J.createClientVe(this.cancelButton.element,this,115129);this.playButton=new g.W({I:"a",La:["ytp-autonav-endscreen-upnext-button",
"ytp-autonav-endscreen-upnext-play-button",b.L("web_modern_buttons")?"ytp-autonav-endscreen-upnext-button-rounded":""],W:{href:"{{url}}",role:"button","aria-label":"Riproduci il prossimo video"},xa:"Riproduci ora"});g.M(this,this.playButton);this.playButton.Ka(this.B.element);this.playButton.listen("click",this.OU,this);this.J.L("web_player_autonav_next_button_renderer")?(this.J.createServerVe(this.playButton.element,this.playButton,!0),(b=this.J.getVideoData())&&Cwb(this,b)):this.J.createClientVe(this.playButton.element,
this,115130);this.D=new g.Cv(function(){Dwb(c)},500);
g.M(this,this.D);this.NU();this.T(a,"autonavvisibility",this.NU);this.J.L("web_autonav_color_transition")&&(this.T(a,"autonavchange",this.U4),this.T(a,"onAutonavCoundownStarted",this.zaa))},l6=function(a){var b=a.J.Tn(!0,a.J.isFullscreen());
g.Nv(a.container.element,"ytp-autonav-endscreen-small-mode",a.Qg(b));g.Nv(a.container.element,"ytp-autonav-endscreen-is-premium",!!a.suggestion&&!!a.suggestion.oM);g.Nv(a.J.getRootNode(),"ytp-autonav-endscreen-cancelled-state",!a.J.Ef());g.Nv(a.J.getRootNode(),"countdown-running",a.yl());g.Nv(a.container.element,"ytp-player-content",a.J.Ef());g.Es(a.overlay.element,{width:b.width+"px"});if(!a.yl()){a.J.Ef()?Ewb(a,Math.round(Fwb(a)/1E3)):Ewb(a);b=!!a.suggestion&&!!a.suggestion.nt;var c=a.J.Ef()||!b;
g.Nv(a.container.element,"ytp-autonav-endscreen-upnext-alternative-header-only",!c&&b);g.Nv(a.container.element,"ytp-autonav-endscreen-upnext-no-alternative-header",c&&!b);g.ME(a.B,a.J.Ef());g.Nv(a.element,"ytp-enable-w2w-color-transitions",Gwb(a))}},Dwb=function(a){var b=Fwb(a),c=Math,d=c.min;
var e=a.C?Date.now()-a.C:0;c=d.call(c,e,b);Ewb(a,Math.ceil((b-c)/1E3));b-c<=500&&a.yl()?a.select(!0):a.yl()&&a.D.start()},Fwb=function(a){if(a.J.isFullscreen()){var b;
a=(b=a.J.getVideoData())==null?void 0:b.fD;return a===-1||a===void 0?8E3:a}return a.J.Mt()>=0?a.J.Mt():g.nI(a.J.U().experiments,"autoplay_time")||1E4},Cwb=function(a,b){a.J.L("web_player_autonav_next_button_renderer");
b=b.yfa;a.G=b==null?void 0:b.navigationEndpoint;b=b==null?void 0:b.trackingParams;a.playButton&&b&&a.J.setTrackingParams(a.playButton.element,b)},Gwb=function(a){var b;
return!((b=a.J.getVideoData())==null||!b.watchToWatchTransitionRenderer)},Ewb=function(a,b){b=b===void 0?-1:b;
a=a.j.Fa("ytp-autonav-endscreen-upnext-header");g.Gf(a);if(b>=0){b=String(b);var c="Prossimo video tra $SECONDS".match(RegExp("\\$SECONDS","gi"))[0],d="Prossimo video tra $SECONDS".indexOf(c);if(d>=0){a.appendChild(g.Cf("Prossimo video tra $SECONDS".slice(0,d)));var e=g.Bf("span");g.Hv(e,"ytp-autonav-endscreen-upnext-header-countdown-number");g.Pf(e,b);a.appendChild(e);a.appendChild(g.Cf("Prossimo video tra $SECONDS".slice(d+c.length)));return}}g.Pf(a,"Prossimo video")},m6=function(a,b){g.W.call(this,
{I:"div",
La:["html5-endscreen","ytp-player-content",b||"base-endscreen"]});this.created=!1;this.player=a},n6=function(a){g.W.call(this,{I:"div",
La:["ytp-upnext","ytp-player-content"],W:{"aria-label":"{{aria_label}}"},V:[{I:"div",S:"ytp-cued-thumbnail-overlay-image",W:{style:"{{background}}"}},{I:"span",S:"ytp-upnext-top",V:[{I:"span",S:"ytp-upnext-header",xa:"Prossimo video"},{I:"span",S:"ytp-upnext-title",xa:"{{title}}"},{I:"span",S:"ytp-upnext-author",xa:"{{author}}"}]},{I:"a",S:"ytp-upnext-autoplay-icon",W:{role:"button",href:"{{url}}","aria-label":"Riproduci il prossimo video"},V:[{I:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 72 72",
width:"100%"},V:[{I:"circle",S:"ytp-svg-autoplay-circle",W:{cx:"36",cy:"36",fill:"#fff","fill-opacity":"0.3",r:"31.5"}},{I:"circle",S:"ytp-svg-autoplay-ring",W:{cx:"-36",cy:"36","fill-opacity":"0",r:"33.5",stroke:"#FFFFFF","stroke-dasharray":"211","stroke-dashoffset":"-211","stroke-width":"4",transform:"rotate(-90)"}},{I:"path",S:"ytp-svg-fill",W:{d:"M 24,48 41,36 24,24 V 48 z M 44,24 v 24 h 4 V 24 h -4 z"}}]}]},{I:"span",S:"ytp-upnext-bottom",V:[{I:"span",S:"ytp-upnext-cancel"},{I:"span",S:"ytp-upnext-paused",
xa:"Riproduzione automatica in pausa"}]}]});this.api=a;this.cancelButton=null;this.G=this.Fa("ytp-svg-autoplay-ring");this.C=this.notification=this.j=this.suggestion=null;this.D=new g.Cv(this.VI,5E3,this);this.B=0;var b=this.Fa("ytp-upnext-cancel");this.cancelButton=new g.W({I:"button",La:["ytp-upnext-cancel-button","ytp-button"],W:{tabindex:"0","aria-label":"Annulla riproduzione automatica"},xa:"Annulla"});g.M(this,this.cancelButton);this.cancelButton.listen("click",this.W4,this);this.cancelButton.Ka(b);
this.cancelButton&&this.api.createClientVe(this.cancelButton.element,this,115129);g.M(this,this.D);this.api.createClientVe(this.element,this,18788);b=this.Fa("ytp-upnext-autoplay-icon");this.T(b,"click",this.X4);this.api.createClientVe(b,this,115130);this.PU();this.T(a,"autonavvisibility",this.PU);this.T(a,"mdxnowautoplaying",this.mba);this.T(a,"mdxautoplaycanceled",this.nba);g.Nv(this.element,"ytp-upnext-mobile",this.api.U().B)},Hwb=function(a,b){if(b)return b;
if(a.api.isFullscreen()){var c;a=(c=a.api.getVideoData())==null?void 0:c.fD;return a===-1||a===void 0?8E3:a}return a.api.Mt()>=0?a.api.Mt():g.nI(a.api.U().experiments,"autoplay_time")||1E4},Iwb=function(a,b){b=Hwb(a,b);
var c=Math,d=c.min;var e=(0,g.hC)()-a.B;c=d.call(c,e,b);b=b===0?1:Math.min(c/b,1);a.G.setAttribute("stroke-dashoffset",""+-211*(b+1));b>=1&&a.yl()&&a.api.getPresentingPlayerType()!==3?a.select(!0):a.yl()&&a.j.start()},o6=function(a){m6.call(this,a,"autonav-endscreen");
this.overlay=this.videoData=null;this.table=new g.W({I:"div",S:"ytp-suggestion-panel",V:[{I:"div",La:["ytp-autonav-endscreen-upnext-header","ytp-autonav-endscreen-more-videos"],xa:"Altri video"}]});this.N=new g.W({I:"div",S:"ytp-suggestions-container"});this.videos=[];this.C=null;this.G=this.K=!1;this.B=new k6(this.player);g.M(this,this.B);this.B.Ka(this.element);a.getVideoData().Tf?this.j=this.B:(this.j=new n6(a),g.GT(this.player,this.j.element,4),g.M(this,this.j));this.overlay=new g.W({I:"div",
S:"ytp-autonav-overlay-cancelled-state"});g.M(this,this.overlay);this.overlay.Ka(this.element);this.D=new g.MJ(this);g.M(this,this.D);g.M(this,this.table);this.table.Ka(this.element);this.table.show();g.M(this,this.N);this.N.Ka(this.table.element);this.hide()},p6=function(a){var b=a.Ef();
b!==a.G&&(a.G=b,a.player.publish("autonavvisibility"),a.G?(a.B!==a.j&&a.B.hide(),a.table.hide()):(a.B!==a.j&&a.B.show(),a.table.show()))},q6=function(a,b){g.W.call(this,{I:"button",
La:["ytp-watch-on-youtube-button","ytp-button"],xa:"{{content}}"});this.J=a;this.buttonType=this.buttonType=b;this.T1();this.buttonType===2&&g.Jv(this.element,"ytp-continue-watching-button");this.listen("click",this.onClick);this.listen("videodatachange",this.T1);g.ME(this,!0)},r6=function(a,b){m6.call(this,a,"embeds-lite-endscreen");
this.J=a;this.Pe=b;this.J.createClientVe(this.element,this,156943);this.watchButton=new q6(a,2);g.M(this,this.watchButton);this.watchButton.Ka(this.element);this.hide()},Jwb=function(a){m6.call(this,a,"subscribecard-endscreen");
this.j=new g.W({I:"div",S:"ytp-subscribe-card",V:[{I:"img",S:"ytp-author-image",W:{src:"{{profilePicture}}"}},{I:"div",S:"ytp-subscribe-card-right",V:[{I:"div",S:"ytp-author-name",xa:"{{author}}"},{I:"div",S:"html5-subscribe-button-container"}]}]});g.M(this,this.j);this.j.Ka(this.element);var b=a.getVideoData();this.subscribeButton=new g.WV("Iscriviti",null,"Annulla iscrizione",null,!0,!1,b.Ql,b.subscribed,"trailer-endscreen",null,a,!1);g.M(this,this.subscribeButton);this.subscribeButton.Ka(this.j.Fa("html5-subscribe-button-container"));
this.T(a,"videodatachange",this.Ua);this.Ua();this.hide()},s6=function(a){var b=a.U(),c=g.KJ||g.lR?{style:"will-change: opacity"}:void 0,d=b.D,e=["ytp-videowall-still"];
b.B&&e.push("ytp-videowall-show-text");g.W.call(this,{I:"a",La:e,W:{href:"{{url}}",target:d?b.Y:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},V:[{I:"div",S:"ytp-videowall-still-image",W:{style:"{{background}}"}},{I:"span",S:"ytp-videowall-still-info",W:{"aria-hidden":"true"},V:[{I:"span",S:"ytp-videowall-still-info-bg",V:[{I:"span",S:"ytp-videowall-still-info-content",W:c,V:[{I:"span",S:"ytp-videowall-still-info-title",xa:"{{title}}"},
{I:"span",S:"ytp-videowall-still-info-author",xa:"{{author_and_views}}"},{I:"span",S:"ytp-videowall-still-info-live",xa:"Dal vivo"},{I:"span",S:"ytp-videowall-still-info-duration",xa:"{{duration}}"}]}]}]},{I:"span",La:["ytp-videowall-still-listlabel-regular","ytp-videowall-still-listlabel"],W:{"aria-hidden":"true"},V:[{I:"span",S:"ytp-videowall-still-listlabel-icon"},"Playlist",{I:"span",S:"ytp-videowall-still-listlabel-length",V:[" (",{I:"span",xa:"{{playlist_length}}"},")"]}]},{I:"span",La:["ytp-videowall-still-listlabel-mix",
"ytp-videowall-still-listlabel"],W:{"aria-hidden":"true"},V:[{I:"span",S:"ytp-videowall-still-listlabel-mix-icon"},"Mix",{I:"span",S:"ytp-videowall-still-listlabel-length",xa:" (50+)"}]}]});this.suggestion=null;this.B=d;this.api=a;this.j=new g.MJ(this);g.M(this,this.j);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.j.T(a,"videodatachange",this.onVideoDataChange);a.createServerVe(this.element,this);this.onVideoDataChange()},t6=function(a){m6.call(this,a,"videowall-endscreen");
var b=this;this.J=a;this.C=0;this.stills=[];this.D=this.videoData=null;this.G=this.N=!1;this.Y=null;this.B=new g.MJ(this);g.M(this,this.B);this.K=new g.Cv(function(){g.Jv(b.element,"ytp-show-tiles")},0);
g.M(this,this.K);var c=new g.W({I:"button",La:["ytp-button","ytp-endscreen-previous"],W:{"aria-label":"Indietro"},V:[g.SE()]});g.M(this,c);c.Ka(this.element);c.listen("click",this.b5,this);this.table=new g.JE({I:"div",S:"ytp-endscreen-content"});g.M(this,this.table);this.table.Ka(this.element);c=new g.W({I:"button",La:["ytp-button","ytp-endscreen-next"],W:{"aria-label":"Avanti"},V:[g.TE()]});g.M(this,c);c.Ka(this.element);c.listen("click",this.a5,this);a.getVideoData().Tf?this.j=new k6(a,!0):this.j=
new n6(a);g.M(this,this.j);g.GT(this.player,this.j.element,4);a.createClientVe(this.element,this,158789);this.hide()},u6=function(a){return g.HT(a.player)&&a.ZD()&&!a.D},v6=function(a){var b=a.Ef();
b!==a.N&&(a.N=b,a.player.publish("autonavvisibility"))},w6=function(a){m6.call(this,a,"watch-again-on-youtube-endscreen");
this.watchButton=new q6(a,1);g.M(this,this.watchButton);this.watchButton.Ka(this.element);g.ukb(a)&&(this.j=new g.b2(a),g.M(this,this.j),this.B=new g.W({I:"div",La:["ytp-watch-again-on-youtube-endscreen-more-videos-container"],W:{tabIndex:"-1"},V:[this.j]}),g.M(this,this.B),this.j.Ka(this.B.element),this.B.Ka(this.element));a.createClientVe(this.element,this,156914);this.hide()},Nwb=function(a){g.fV.call(this,a);
var b=this;this.endScreen=null;this.B=this.j=this.C=this.D=!1;this.listeners=new g.MJ(this);g.M(this,this.listeners);var c=a.U(),d=a.getVideoData();d=d&&d.limitedPlaybackDurationInSeconds!==0;g.eB(g.vR(c))&&d&&!g.DT(a)?(this.B=!0,this.endScreen=new r6(a,g.uT(a))):a.fd()?this.endScreen=new w6(a):Kwb(a)?(this.D=!0,Lwb(this),this.j?this.endScreen=new o6(a):this.endScreen=new t6(a)):c.Kg?this.endScreen=new Jwb(a):this.endScreen=new m6(a);g.M(this,this.endScreen);g.GT(a,this.endScreen.element,4);Mwb(this);
this.listeners.T(a,"videodatachange",this.onVideoDataChange,this);this.listeners.T(a,g.UI("endscreen"),function(e){b.onCueRangeEnter(e)});
this.listeners.T(a,g.VI("endscreen"),function(e){b.onCueRangeExit(e)})},Lwb=function(a){var b=a.player.getVideoData();
if(!b||a.j===b.Wl&&a.C===b.Tf)return!1;a.j=b.Wl;a.C=b.Tf;return!0},Kwb=function(a){a=a.U();
return a.Ed&&!a.Kg},Mwb=function(a){a.player.qf("endscreen");
var b=a.player.getVideoData();b=new g.TI(Math.max((b.lengthSeconds-10)*1E3,0),0x8000000000000,{id:"preload",namespace:"endscreen"});var c=new g.TI(0x8000000000000,0x8000000000000,{id:"load",priority:8,namespace:"endscreen"});a.player.lf([b,c])};
g.zT.prototype.Mt=g.ca(15,function(){return this.app.Mt()});
g.D0.prototype.Mt=g.ca(14,function(){return this.getVideoData().BX});
g.vT.prototype.Gs=g.ca(13,function(a){this.Ei().Gs(a)});
g.kW.prototype.Gs=g.ca(12,function(a){this.j!==a&&(this.j=a,this.Ua())});
g.rX.prototype.Gs=g.ca(11,function(a){this.overflowButton&&this.overflowButton.Gs(a)});
g.vT.prototype.Hs=g.ca(10,function(a){this.Ei().Hs(a)});
g.pW.prototype.Hs=g.ca(9,function(a){this.j!==a&&(this.j=a,this.Ua())});
g.rX.prototype.Hs=g.ca(8,function(a){this.shareButton&&this.shareButton.Hs(a)});
g.vT.prototype.kC=g.ca(7,function(a){this.Ei().kC(a)});
g.PV.prototype.kC=g.ca(6,function(a){this.nS!==a&&(this.nS=a,this.Oq())});
g.vT.prototype.jC=g.ca(5,function(a){this.Ei().jC(a)});
g.rX.prototype.jC=g.ca(4,function(a){this.mS!==a&&(this.mS=a,this.Nq())});g.x(j6,g.W);j6.prototype.select=function(){this.J.hp(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.AE||void 0)&&this.J.logClick(this.element)};
j6.prototype.onClick=function(a){g.XT(a,this.J,this.j,this.suggestion.sessionData||void 0)&&this.select()};
j6.prototype.onKeyPress=function(a){switch(a.keyCode){case 13:case 32:a.defaultPrevented||(this.select(),a.preventDefault())}};g.x(k6,g.W);g.k=k6.prototype;g.k.bI=function(a){this.suggestion!==a&&(this.suggestion=a,i6(this.j,a),this.playButton.updateValue("url",this.suggestion.rl()),l6(this))};
g.k.yl=function(){return this.C>0};
g.k.tC=function(){this.yl()||(this.C=Date.now(),Dwb(this),Bwb(this.J,Fwb(this)),g.Nv(this.J.getRootNode(),"countdown-running",this.yl()))};
g.k.Xx=function(){this.Hq();Dwb(this);var a=this.j.Fa("ytp-autonav-endscreen-upnext-header");a&&g.Pf(a,"Prossimo video")};
g.k.Hq=function(){this.yl()&&(this.D.stop(),this.C=0)};
g.k.select=function(a){this.J.nextVideo(!1,a===void 0?!1:a);this.Hq()};
g.k.OU=function(a){g.XT(a,this.J)&&(a.currentTarget===this.playButton.element?this.J.logClick(this.playButton.element):a.currentTarget===this.j.Fa("ytp-autonav-endscreen-link-container")&&(a=this.j.Fa("ytp-autonav-endscreen-link-container"),this.J.logVisibility(a,!0),this.J.logClick(a)),this.J.L("web_player_autonav_next_button_renderer")&&this.G?(this.J.jb("innertubeCommand",this.G),this.Hq()):this.select())};
g.k.V4=function(){this.J.logClick(this.cancelButton.element);g.BT(this.J,!0);this.cancelCommand&&this.J.jb("innertubeCommand",this.cancelCommand)};
g.k.onVideoDataChange=function(a,b){this.J.L("web_player_autonav_next_button_renderer")&&Cwb(this,b);var c;this.cancelCommand=(c=b.vfa)==null?void 0:c.command};
g.k.zaa=function(a){if(Gwb(this)){var b=this.J.getVideoData().watchToWatchTransitionRenderer,c=b==null?void 0:b.fromColorPaletteDark;b=b==null?void 0:b.toColorPaletteDark;if(c&&b){var d=this.element;d.style.setProperty("--w2w-start-background-color",g.QF(c.surgeColor));d.style.setProperty("--w2w-start-primary-text-color",g.QF(c.primaryTitleColor));d.style.setProperty("--w2w-start-secondary-text-color",g.QF(c.secondaryTitleColor));d.style.setProperty("--w2w-end-background-color",g.QF(b.surgeColor));
d.style.setProperty("--w2w-end-primary-text-color",g.QF(b.primaryTitleColor));d.style.setProperty("--w2w-end-secondary-text-color",g.QF(b.secondaryTitleColor));d.style.setProperty("--w2w-animation-duration",a+"ms")}g.Nv(this.element,"ytp-w2w-animate",!0)}};
g.k.U4=function(a){this.J.L("web_autonav_color_transition")&&a!==2&&g.Nv(this.element,"ytp-w2w-animate",!1)};
g.k.NU=function(){var a=this.J.Ef();this.K&&this.Ib!==a&&g.ME(this,a);l6(this);this.J.logVisibility(this.container.element,a);this.J.logVisibility(this.cancelButton.element,a);this.J.logVisibility(this.j.Fa("ytp-autonav-endscreen-link-container"),a);this.J.logVisibility(this.playButton.element,a)};
g.k.Qg=function(a){return a.width<400||a.height<459};g.x(m6,g.W);g.k=m6.prototype;g.k.create=function(){this.created=!0};
g.k.destroy=function(){this.created=!1};
g.k.ZD=function(){return!1};
g.k.Ef=function(){return!1};
g.k.DZ=function(){return!1};g.x(n6,g.W);g.k=n6.prototype;g.k.VI=function(){this.notification&&(this.D.stop(),this.Oc(this.C),this.C=null,this.notification.close(),this.notification=null)};
g.k.bI=function(a){this.suggestion=a;i6(this,a,"hqdefault.jpg")};
g.k.PU=function(){g.ME(this,this.api.Ef());this.api.logVisibility(this.element,this.api.Ef());this.api.logVisibility(this.Fa("ytp-upnext-autoplay-icon"),this.api.Ef());this.cancelButton&&this.api.logVisibility(this.cancelButton.element,this.api.Ef())};
g.k.wba=function(){window.focus();this.VI()};
g.k.tC=function(a){var b=this;this.yl()||(g.rD("a11y-announce","Prossimo video "+this.suggestion.title),this.B=(0,g.hC)(),this.j=new g.Cv(function(){Iwb(b,a)},25),Iwb(this,a),Bwb(this.api,Hwb(this,a)));
g.Lv(this.element,"ytp-upnext-autoplay-paused")};
g.k.hide=function(){g.W.prototype.hide.call(this)};
g.k.yl=function(){return!!this.j};
g.k.Xx=function(){this.Hq();this.B=(0,g.hC)();Iwb(this);g.Jv(this.element,"ytp-upnext-autoplay-paused")};
g.k.Hq=function(){this.yl()&&(this.j.dispose(),this.j=null)};
g.k.select=function(a){a=a===void 0?!1:a;if(this.api.U().L("autonav_notifications")&&a&&window.Notification&&typeof document.hasFocus==="function"){var b=Notification.permission;b==="default"?Notification.requestPermission():b!=="granted"||document.hasFocus()||(this.VI(),this.notification=new Notification("Prossimo video",{body:this.suggestion.title,icon:this.suggestion.gh()}),this.C=this.T(this.notification,"click",this.wba),this.D.start())}this.Hq();this.api.nextVideo(!1,a)};
g.k.X4=function(a){!g.Of(this.cancelButton.element,a.target)&&g.XT(a,this.api)&&(this.api.Ef()&&this.api.logClick(this.Fa("ytp-upnext-autoplay-icon")),this.select())};
g.k.W4=function(){this.api.Ef()&&this.cancelButton&&this.api.logClick(this.cancelButton.element);g.BT(this.api,!0)};
g.k.mba=function(a){this.api.getPresentingPlayerType();this.show();this.tC(a)};
g.k.nba=function(){this.api.getPresentingPlayerType();this.Hq();this.hide()};
g.k.ya=function(){this.Hq();this.VI();g.W.prototype.ya.call(this)};g.x(o6,m6);g.k=o6.prototype;g.k.create=function(){m6.prototype.create.call(this);this.D.T(this.player,"appresize",this.jD);this.D.T(this.player,"onVideoAreaChange",this.jD);this.D.T(this.player,"videodatachange",this.onVideoDataChange);this.D.T(this.player,"autonavchange",this.QU);this.D.T(this.player,"onAutonavCancelled",this.Y4);this.onVideoDataChange()};
g.k.show=function(){m6.prototype.show.call(this);(this.K||this.C&&this.C!==this.videoData.clientPlaybackNonce)&&g.BT(this.player,!1);g.HT(this.player)&&this.ZD()&&!this.C?(p6(this),this.videoData.autonavState===2?this.player.getVisibilityState()===3?this.j.select(!0):this.j.tC():this.videoData.autonavState===3&&this.j.Xx()):(g.BT(this.player,!0),p6(this));this.jD()};
g.k.hide=function(){m6.prototype.hide.call(this);this.j.Xx();p6(this)};
g.k.jD=function(){var a=this.player.Tn(!0,this.player.isFullscreen());p6(this);l6(this.B);g.Nv(this.element,"ytp-autonav-cancelled-small-mode",this.Qg(a));g.Nv(this.element,"ytp-autonav-cancelled-tiny-mode",this.uK(a));g.Nv(this.element,"ytp-autonav-cancelled-mini-mode",a.width<=400||a.height<=360);this.overlay&&g.Es(this.overlay.element,{width:a.width+"px"});if(!this.G)for(a=0;a<this.videos.length;a++)g.Nv(this.videos[a].element,"ytp-suggestion-card-with-margin",a%2===1)};
g.k.onVideoDataChange=function(){var a=this.player.getVideoData();if(this.videoData!==a&&a){this.videoData=a;if((a=this.videoData.suggestions)&&a.length||this.player.L("web_player_autonav_empty_suggestions_fix")){var b=g.ES(this.videoData);b&&(this.j.bI(b),this.j!==this.B&&this.B.bI(b))}if(a&&a.length)for(b=0;b<Owb.length;++b){var c=Owb[b];if(a&&a[c]){this.videos[b]=new j6(this.player);var d=this.videos[b];c=a[c];d.suggestion!==c&&(d.suggestion=c,i6(d,c));g.M(this,this.videos[b]);this.videos[b].Ka(this.N.element)}}this.jD()}};
g.k.QU=function(a){a===1?(this.K=!1,this.C=this.videoData.clientPlaybackNonce,this.j.Hq(),this.Ib&&this.jD()):(this.K=!0,this.Ef()&&(a===2?this.j.tC():a===3&&this.j.Xx()))};
g.k.Y4=function(a){a?this.QU(1):(this.C=null,this.K=!1)};
g.k.ZD=function(){return this.videoData.autonavState!==1};
g.k.Qg=function(a){return(a.width<910||a.height<459)&&!this.uK(a)&&!(a.width<=400||a.height<=360)};
g.k.uK=function(a){return a.width<800&&!(a.width<=400||a.height<=360)};
g.k.Ef=function(){return this.Ib&&g.HT(this.player)&&this.ZD()&&!this.C};
var Owb=[1,3,2,4];g.x(q6,g.W);g.k=q6.prototype;g.k.T1=function(){switch(this.buttonType){case 1:var a="Guarda di nuovo su YouTube";var b=156915;break;case 2:a="Continua a guardare su YouTube";b=156942;break;default:a="Continua a guardare su YouTube",b=156942}this.update({content:a});this.J.hasVe(this.element)&&this.J.destroyVe(this.element);this.J.createClientVe(this.element,this,b)};
g.k.onClick=function(a){this.J.L("web_player_log_click_before_generating_ve_conversion_params")&&this.J.logClick(this.element);g.ZT(this.getVideoUrl(),this.J,a);this.J.L("web_player_log_click_before_generating_ve_conversion_params")||this.J.logClick(this.element)};
g.k.getVideoUrl=function(){var a=!0;switch(this.buttonType){case 1:a=!0;break;case 2:a=!1}a=this.J.getVideoUrl(a,!1,!1,!0);var b=this.J.U();if(g.mR(b)){var c={};g.mR(b)&&g.pT(this.J,"addEmbedsConversionTrackingParams",[c]);if(!this.J.L("embeds_web_enable_referring_feature_deprecation")){a:{switch(this.buttonType){case 2:b="emb_ytp_continue_watching";break a}b="emb_ytp_watch_again"}g.IO(c,b)}a=g.Bn(a,c)}return a};
g.k.logVisibility=function(){this.J.logVisibility(this.element,this.Ib&&this.Z)};
g.k.show=function(){g.W.prototype.show.call(this);this.logVisibility()};
g.k.hide=function(){g.W.prototype.hide.call(this);this.logVisibility()};
g.k.Mc=function(a){g.W.prototype.Mc.call(this,a);this.logVisibility()};g.x(r6,m6);r6.prototype.show=function(){this.player.getPlayerState()!==3&&(m6.prototype.show.call(this),this.Pe.jC(!0),this.Pe.Hs(!0),this.J.U().Je||this.Pe.Gs(!0),this.J.logVisibility(this.element,!0),this.watchButton.Mc(!0))};
r6.prototype.hide=function(){m6.prototype.hide.call(this);this.Pe.jC(!1);this.Pe.Hs(!1);this.Pe.Gs(!1);this.J.logVisibility(this.element,!1);this.watchButton.Mc(!1)};g.x(Jwb,m6);Jwb.prototype.Ua=function(){var a=this.player.getVideoData();this.j.update({profilePicture:a.profilePicture,author:a.author});this.subscribeButton.channelId=a.Ql;var b=this.subscribeButton;a.subscribed?b.j():b.B()};g.x(s6,g.W);s6.prototype.select=function(){this.api.hp(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.AE||void 0)&&this.api.logClick(this.element)};
s6.prototype.onClick=function(a){if(g.mR(this.api.U())&&this.api.L("web_player_log_click_before_generating_ve_conversion_params")){this.api.logClick(this.element);var b=this.suggestion.rl(),c={};g.IYa(this.api,c,"emb_rel_end");b=g.Bn(b,c);g.ZT(b,this.api,a)}else g.XT(a,this.api,this.B,this.suggestion.sessionData||void 0)&&this.select()};
s6.prototype.onKeyPress=function(a){switch(a.keyCode){case 13:case 32:a.defaultPrevented||(this.select(),a.preventDefault())}};
s6.prototype.onVideoDataChange=function(){var a=this.api.getVideoData(),b=this.api.U();this.B=a.Gf?!1:b.D};g.x(t6,m6);g.k=t6.prototype;g.k.create=function(){m6.prototype.create.call(this);var a=this.player.getVideoData();a&&(this.videoData=a);this.Uq();this.B.T(this.player,"appresize",this.Uq);this.B.T(this.player,"onVideoAreaChange",this.Uq);this.B.T(this.player,"videodatachange",this.onVideoDataChange);this.B.T(this.player,"autonavchange",this.YM);this.B.T(this.player,"onAutonavCancelled",this.Z4);a=this.videoData.autonavState;a!==this.Y&&this.YM(a);this.B.T(this.element,"transitionend",this.Jca)};
g.k.destroy=function(){g.tB(this.B);g.vb(this.stills);this.stills=[];m6.prototype.destroy.call(this);g.Lv(this.element,"ytp-show-tiles");this.K.stop();this.Y=this.videoData.autonavState};
g.k.ZD=function(){return this.videoData.autonavState!==1};
g.k.show=function(){var a=this.Ib;m6.prototype.show.call(this);g.Lv(this.element,"ytp-show-tiles");this.player.U().B?g.Ev(this.K):this.K.start();(this.G||this.D&&this.D!==this.videoData.clientPlaybackNonce)&&g.BT(this.player,!1);u6(this)?(v6(this),this.videoData.autonavState===2?this.player.getVisibilityState()===3?this.j.select(!0):this.j.tC():this.videoData.autonavState===3&&this.j.Xx()):(g.BT(this.player,!0),v6(this));a!==this.Ib&&this.player.logVisibility(this.element,!0)};
g.k.hide=function(){var a=this.Ib;m6.prototype.hide.call(this);this.j.Xx();v6(this);a!==this.Ib&&this.player.logVisibility(this.element,!1)};
g.k.Jca=function(a){a.target===this.element&&this.Uq()};
g.k.Uq=function(){var a,b,c,d;var e=((a=this.videoData)==null?0:(b=a.suggestions)==null?0:b.length)?(c=this.videoData)==null?void 0:c.suggestions:[(d=this.videoData)==null?void 0:g.ES(d)];if(e.length){g.Jv(this.element,"ytp-endscreen-paginate");var f=this.J.Tn(!0,this.J.isFullscreen());if(a=g.uT(this.J))a=a.Hh()?48:32,f.width-=a*2;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;p>0&&(a<l||b<m);){var q=a/2,r=b/2,t=a<=l-2&&p>=r*n,u=b<=m-2&&p>=q*n;if((q+1)/r*d/h>h/(q/(r+1)*d)&&u)p-=q*n,b+=2;else if(t)p-=r*n,a+=2;else if(u)p-=q*n,b+=2;else break}d=!1;p>=3*n&&c*n-p<=6&&(b>=4||a>=4)&&(d=!0);n=a*96;p=b*54;h=n/p<h?f.height/p:f.width/n;h=Math.min(h,2);n=Math.floor(Math.min(f.width,n*h));p=Math.floor(Math.min(f.height,p*h));f=this.table.element;f.ariaLive="polite";g.Ps(f,n,p);g.Es(f,{marginLeft:n/-2+"px",marginTop:p/-2+"px"});this.j.bI(g.ES(this.videoData));this.j instanceof
k6&&l6(this.j);g.Nv(this.element,"ytp-endscreen-takeover",u6(this));v6(this);n+=4;p+=4;h=0;f.ariaBusy="true";for(l=0;l<a;l++)for(m=0;m<b;m++)if(q=h,t=0,d&&l>=a-2&&m>=b-2?t=1:m%2===0&&l%2===0&&(m<2&&l<2?m===0&&l===0&&(t=2):t=2),q=g.Ae(q+this.C,c),t!==0){r=this.stills[h];r||(r=new s6(this.player),this.stills[h]=r,f.appendChild(r.element));u=Math.floor(p*m/b);var w=Math.floor(n*l/a),A=Math.floor(p*(m+t)/b)-u-4,C=Math.floor(n*(l+t)/a)-w-4;g.Ls(r.element,w,u);g.Ps(r.element,C,A);g.Es(r.element,"transitionDelay",
(m+l)/20+"s");g.Nv(r.element,"ytp-videowall-still-mini",t===1);g.Nv(r.element,"ytp-videowall-still-large",t>2);t=Math.max(C,A);g.Nv(r.element,"ytp-videowall-still-round-large",t>=256);g.Nv(r.element,"ytp-videowall-still-round-medium",t>96&&t<256);g.Nv(r.element,"ytp-videowall-still-round-small",t<=96);q=e[q];r.suggestion!==q&&(r.suggestion=q,t=r.api.U(),u=g.Iv(r.element,"ytp-videowall-still-large")?"hqdefault.jpg":"mqdefault.jpg",i6(r,q,u),g.mR(t)&&!r.api.L("web_player_log_click_before_generating_ve_conversion_params")&&
(t=q.rl(),u={},g.pT(r.api,"addEmbedsConversionTrackingParams",[u]),r.api.L("embeds_web_enable_referring_feature_deprecation")||g.IO(u,"emb_rel_end"),t=g.Bn(t,u),r.updateValue("url",t)),(q=(q=q.sessionData)&&q.itct)&&r.api.setTrackingParams(r.element,q));h++}f.ariaBusy="false";g.Nv(this.element,"ytp-endscreen-paginate",h<c);for(e=this.stills.length-1;e>=h;e--)a=this.stills[e],g.Mf(a.element),g.ub(a);this.stills.length=h}};
g.k.onVideoDataChange=function(){var a=this.player.getVideoData(1);this.videoData!==a&&(a!=null&&g.ES(a)?(this.C=0,this.videoData=a,this.Uq()):this.player.oa("missg",{vid:(a==null?void 0:a.videoId)||"",cpn:(a==null?void 0:a.clientPlaybackNonce)||""}))};
g.k.a5=function(){this.C+=this.stills.length;this.Uq()};
g.k.b5=function(){this.C-=this.stills.length;this.Uq()};
g.k.DZ=function(){return this.j.yl()};
g.k.YM=function(a){a===1?(this.G=!1,this.D=this.videoData.clientPlaybackNonce,this.j.Hq(),this.Ib&&this.Uq()):(this.G=!0,this.Ib&&u6(this)&&(a===2?this.j.tC():a===3&&this.j.Xx()))};
g.k.Z4=function(a){if(a){for(a=0;a<this.stills.length;a++)this.J.logVisibility(this.stills[a].element,!0);this.YM(1)}else this.D=null,this.G=!1;this.Uq()};
g.k.Ef=function(){return this.Ib&&u6(this)};g.x(w6,m6);w6.prototype.show=function(){if(this.player.getPlayerState()!==3){m6.prototype.show.call(this);var a=this.B;if(a){var b=this.j.suggestionData.length>0;g.Nv(this.element,"ytp-shorts-branded-ui",b);b?a.show():a.hide()}var c;(c=g.uT(this.player))==null||c.kC(!0);this.player.logVisibility(this.element,!0);this.watchButton.Mc(!0)}};
w6.prototype.hide=function(){m6.prototype.hide.call(this);var a;(a=g.uT(this.player))==null||a.kC(!1);this.player.logVisibility(this.element,!1);this.watchButton.Mc(!1)};g.x(Nwb,g.fV);g.k=Nwb.prototype;g.k.bv=function(){var a=this.player.getVideoData(),b=a.mutedAutoplay;if((this.player.fd()||this.B)&&!b)return!0;var c;var d=!!((a==null?0:g.ES(a))||(a==null?0:(c=a.suggestions)==null?0:c.length));d=!Kwb(this.player)||d;a=a.Hj;c=this.player.NE();return d&&!a&&!c&&!b};
g.k.Ef=function(){return this.endScreen.Ef()};
g.k.k$=function(){return this.Ef()?this.endScreen.DZ():!1};
g.k.ya=function(){this.player.qf("endscreen");g.fV.prototype.ya.call(this)};
g.k.load=function(){var a=this.player.getVideoData();var b=a.transitionEndpointAtEndOfStream;if(b&&b.videoId){var c=this.player.Bb().Ie.get("heartbeat"),d=g.ES(a);!d||b.videoId!==d.videoId||a.YV?(this.player.hp(b.videoId,void 0,void 0,!0,!0,b),c&&c.EK("HEARTBEAT_ACTION_TRIGGER_AT_STREAM_END","HEARTBEAT_ACTION_TRANSITION_REASON_HAS_NEW_STREAM_TRANSITION_ENDPOINT"),a=!0):a=!1}else a=!1;a||(g.fV.prototype.load.call(this),this.endScreen.show())};
g.k.unload=function(){g.fV.prototype.unload.call(this);this.endScreen.hide();this.endScreen.destroy()};
g.k.onCueRangeEnter=function(a){this.bv()&&(this.endScreen.created||this.endScreen.create(),a.getId()==="load"&&this.load())};
g.k.onCueRangeExit=function(a){a.getId()==="load"&&this.loaded&&this.unload()};
g.k.onVideoDataChange=function(){Mwb(this);this.D&&Lwb(this)&&(this.endScreen&&(this.endScreen.hide(),this.endScreen.created&&this.endScreen.destroy(),this.endScreen.dispose()),this.j?this.endScreen=new o6(this.player):this.endScreen=new t6(this.player),g.M(this,this.endScreen),g.GT(this.player,this.endScreen.element,4))};g.eV("endscreen",Nwb);})(_yt_player);