(function(g){var window=this;'use strict';var zP=function(p,a){p.B.isInline()||g.HE("yt-player-sticky-caption",a,2592E3)},GP=function(p){dY.call(this); this.G=p;this.L=new Map;this.j=new Map;this.W=new Map;this.S=new Map},yda=function(p,a,l){lta(p,a).then(function(y){y&&l(y.trackData,new g.uZ(y.metadata))})},B_=function(p){p.isActive()||p.start()},nZK=function(p,a,l){if(p===255&&a===255||!p&&!a)return{UZ:p, jK:a,result:0};p=SXW[p];a=SXW[a];if(p&128){var y;if(y=!(a&128))y=a,y=l.Me()&&l.jK===y;if(y)return{UZ:p,jK:a,result:1}}else if(a&128&&1<=p&&p<=31)return{UZ:p,jK:a,result:2};return{UZ:p,jK:a,result:3}},Va_=function(p,a){var l=g.qV(p.segments,a); l>=0||l<0&&(-l-1)%2===1||(l=-l-1,l>0&&a-p.segments[l-1]===1&&l0&&a-p.segments[l-1]===1?p.segments[l-1]=a:l=2&&p.S>1&&(--p.S,$d(p).L=0); var y=$d(p);y.timestamp=p.W.time+0;y.L=RZK(a,l);p.S<32&&p.S++},mGM=function(p){return p.L&&p.L.G?p.L.G+p.player.Jg()0?(p=Number(p[0]))?p:0:0},OP=function(){this.segments=[]},T8K=function(p,a){p.player.PG(a); a=g.t(a);for(var l=a.next();!l.done;l=a.next())g.FS(p.t9,l.value);B_(p.Hs)},xd=function(p,a,l,y,S,n,V,z,d,G){var B=G.isInline()&&!0,c={}; Object.assign(c,a);Object.assign(c,p.params);Object.assign(c,l);var r={};Object.assign(r,a.yr);p.params.yr&&Object.assign(r,p.params.yr);Object.assign(r,l.yr);B&&(c.windowOpacity=.6,r.backgroundOpacity=0);c.yr=r;var w=c.OU===1,P=[{X:"span",T:"captions-text",V:{style:"word-wrap: normal; display: block;"}}],F,v,I;(z=z.Cz("caption_edit_on_hover")&&((F=G.getVideoData().getPlayerResponse())==null?void 0:(v=F.captions)==null?void 0:(I=v.playerCaptionsTracklistRenderer)==null?void 0:I.openTranscriptCommand))&& P.unshift({X:"button",T:"caption-edit",V:{tabindex:"0","aria-label":N8M()},N:[{X:"svg",V:{fill:"#e3e3e3",height:"100%",viewBox:"5 5 38 38",width:"100%"},N:[{X:"path",V:{d:"M9 39h2.2l24.25-24.25-1.1-1.1-1.1-1.1L9 36.8Zm-3 3v-6.4L35.4 6.2q.85-.85 2.12-.82 1.27.02 2.12.87L41.8 8.4q.85.85.85 2.1t-.85 2.1L12.4 42Zm33.5-31.55L37.45 8.4Zm-4.05 4.3-1.1-1.1-1.1-1.1 2.2 2.2Z"}}]}]});g.X.call(this,{X:"div",T:"caption-window",V:{id:"caption-window-"+p.id,dir:w?"rtl":"ltr",tabindex:"0",lang:c.lang},N:P});var b= this;this.G=[];this.QY=!1;this.S=p;this.Hs=this.t9=null;this.EC=n;this.O6=V;this.K=null;this.maxWidth=n*.96;this.maxHeight=V*.96;this.L=c;this.qc=l;this.Xu=a;this.j=this.d7("captions-text");this.Ha=this.j.style.getPropertyValue("box-decoration-break")!==""||this.j.style.getPropertyValue("-webkit-box-decoration-break")!=="";this.r7=sgW(y,S,n,V);this.oo=d;z&&(this.W=this.d7("caption-edit"),this.J(this.W,"click",function(){b.oo()})); this.type=0;this.OO=this.r7*$Gl(r);this.Sb=B;p=new g.Us(this.element,!0);g.E(this,p);p.subscribe("dragstart",this.D9,this);p.subscribe("dragmove",this.Qx,this);p.subscribe("dragend",this.BF,this);this.VY=this.Kz=this.Yv=this.Ps=0;p="";this.L.windowOpacity&&(p=UG2(this.L.windowColor),p="rgba("+p[0]+","+p[1]+","+p[2]+","+this.L.windowOpacity+")");a={"background-color":p,display:this.L.isVisible===!1?"none":"","text-align":Qg7[this.L.textAlign]};this.Ha&&(a["border-radius"]=p?this.OO/8+"px":"");(this.U= this.S.params.OU===2||this.S.params.OU===3)&&hZG(this,this.element);g.B8(this.element,a);if(B){var O;(O=this.element.parentElement)==null||O.style.setProperty("--caption-window-color",p)}switch(this.L.wA){case 0:case 1:case 2:g.uD(this.element,"ytp-caption-window-top");break;case 6:case 7:case 8:g.uD(this.element,"ytp-caption-window-bottom")}},Pnl=function(p,a,l,y){p.S.update(); a=nZK(a,l,p.S);switch(a.result){case 0:return;case 1:case 2:return}var S=a.UZ;l=a.jK;if(32<=S||!S)p.L.mode&p.L.S&&(a=S,a&128&&(a=127),l&128&&(l=127),p=p.j.L,a&96&&eV(p,0,a),l&96&&eV(p,0,l),a!==0&&l!==0&&p.style.type===3&&kd(p,y));else if(S&16)a:if(!p.S.matches(S,l)&&(a=p.S,a.UZ=S,a.jK=l,a.state=2,a=S&8?p.G:p.U,p.j=a,p.L.mode=1<<(p.W<<2)+(a.W<<1)+(a.style.type===4?1:0),(p.L.mode|1<<(p.W<<2)+(a.W<<1)+(a.style.type!==4?1:0))&p.L.S))if(l&64){y=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(S&7)<<1|l>>5&1]; p=l&16?((l&14)>>1)*4:0;l=a.L;switch(a.style.get()){case 4:y=l.row;break;case 3:if(y!==l.row){if(y0&&(a+=n,S-=n)):(n=n+S-V,n>0&&(S-=n));EP(l,a,S)}}l.row=y;l.S=p+1}else switch(S&7){case 1:switch(l&112){case 32:eV(a.L,0,32);break a;case 48:l===57?(y=a.L,$d(y).L=0,y.S<32&&y.S++):eV(a.L,1,l&15)}break;case 2:l&32&&eV(a.L,2,l&31);break;case 3:l&32&&eV(a.L,3,l&31);break;case 4:case 5:if(32<=l&&l<=47)switch(l){case 32:HOG(a); break;case 33:y=a.L;y.S>1&&(--y.S,$d(y).L=0);break;case 36:y=a.L;a=$d(y);for(p=0;p<=15;p++)for(l=0;l<=32;l++)if(y.U[p][l]===a){for(;l<=32;l++)y.U[p][l].reset();break}break;case 37:gZG(a,2,y);break;case 38:gZG(a,3,y);break;case 39:gZG(a,4,y);break;case 40:eV(a.L,0,32);break;case 41:a.style.set(2);a.L=a.S;a.L.L=0;a.L.style=a.style;a.U.mode=1<32&&(y.S=32)}}},Jda=function(p,a,l){var y=[],S; for(S in p.L.L)if(p.L.L.hasOwnProperty(S)){var n=p.L.L[S];if(g.GQ(n,l||null)){var V=n.info.captionTrack;V&&V.languageCode===a&&y.push(n)}}return y.length?y[0]:null},Mg=function(){this.state=this.jK=this.UZ=0},ftM=function(p){if(!(p.byteOffset1)return!1;I0(p);I0(p);I0(p);return!0},mX=function(p){return p.Sl&&p.Sl.L},t7=function(p,a){p=p.getAttribute(a); if(p!=null)return p==="1"},N8M=function(){var p=void 0; p=p===void 0?{}:p;var a="suggest_correction"in g.IQl?g.IQl.suggest_correction:"Edit caption";a=a||"";var l={},y;for(y in p){l={cT:l.cT};l.cT=y;var S=function(n){return function(){return String(p[n.cT])}}(l); a=a.replace(new RegExp("\\$\\{"+l.cT+"\\}","gi"),S);a=a.replace(new RegExp("\\$"+l.cT,"gi"),S)}return a},FQa=function(p,a,l,y,S){var n=g.pT(),V=n?g.JI("DIV"):g.JI("RUBY"),z=g.JI("SPAN"); z.textContent=p;V.appendChild(z);p=n?g.JI("DIV"):g.JI("RP");p.textContent=a;V.appendChild(p);a=n?g.JI("DIV"):g.JI("RT");a.textContent=l;V.appendChild(a);l=S.Wi;if(l===10||l===11||l===12||l===13||l===14)if(g.B8(a,"text-emphasis-style","filled circle"),g.B8(a,"text-emphasis-color","currentcolor"),g.B8(a,"webkit-text-emphasis","filled circle"),S.Wi===11||S.Wi===13)g.B8(a,"webkit-text-emphasis-position","under left"),g.B8(a,"text-emphasis-position","under left");l=!0;if(S.Wi===4||S.Wi===7||S.Wi===12|| S.Wi===14)g.B8(V,"ruby-position","over"),g.B8(V,"-webkit-ruby-position","before");else if(S.Wi===5||S.Wi===6||S.Wi===11||S.Wi===13)g.B8(V,"ruby-position","under"),g.B8(V,"-webkit-ruby-position","after"),l=!1;S=n?g.JI("DIV"):g.JI("RP");S.textContent=y;V.appendChild(S);n&&(y=l,g.B8(V,{display:"inline-block",position:"relative"}),n=V.firstElementChild.nextElementSibling,g.B8(n,"display","none"),n=n.nextElementSibling,g.B8(n,{"font-size":"0.5em","line-height":"1.2em","text-align":"center",position:"absolute", left:"50%",transform:"translateX(-50%)",width:"400%"}),g.B8(V.lastElementChild,"display","none"),y?(g.B8(V,"padding-top","0.6em"),g.B8(n,"top","0")):(g.B8(V,"padding-bottom","0.6em"),g.B8(n,"bottom","0")));return V},jV=function(p,a){p=p.getAttribute(a); if(p!=null)return v_.test(p),p},pZW=function(p){var a=p.Yv.getVideoContentRect(!0).height,l=p.Yv.getVideoContentRect(!0).width; if(!a||!l)return null;a*=p.Xu.height;l*=p.Xu.width;return{width:l,height:a}},W_=function(p,a){if(p.S&&(a===void 0||!a)||!p.videoData.captionTracks.length)return!1; p=p.getAudioTrack();return!!p.L||p.S==="FORCED_ON"},H_=function(p,a){if(p.storage)try{p.storage.set("module-enabled",a)}catch(l){}},D9=function(p,a){p=p.getAttribute(a); if(p!=null)return Number(p)},a1b=function(p,a){var l=p.B.F7().gG().textTracks; p=p.S.toString();for(var y=0;y=2?.5:1;for(n=d;n<=B;n+=G)y.push(n+"px "+n+"px "+S);break;case 2:y.push(d+"px "+d+"px "+V);y.push("-"+d+"px -"+d+"px "+S);break;case 3:for(B=0;B<5;B++)y.push("0 0 "+ G+"px "+S)}l["text-shadow"]=y.join(", ")}S="";switch(a.fontFamily){case 1:S='"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace';break;case 2:S='"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif';break;case 3:S='"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace';break;case 5:S='"Comic Sans MS", Impact, Handlee, fantasy';break;case 6:S='"Monotype Corsiva", "URW Chancery L", "Apple Chancery", "Dancing Script", cursive';break;case 7:S=g.pT()? '"Carrois Gothic SC", sans-serif-smallcaps':'Arial, Helvetica, Verdana, "Marcellus SC", sans-serif';break;case 0:case 4:S='"YouTube Noto", Roboto, Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif'}S&&(l["font-family"]=S);S=a.offset;S==null&&(S=p.L.yr.offset);switch(S){case 0:l["vertical-align"]="sub";break;case 2:l["vertical-align"]="super"}a.fontFamily===7&&(l["font-variant"]="small-caps");a.bold&&(l["font-weight"]="bold");a.italic&&(l["font-style"]="italic");a.underline&&(l["text-decoration"]= "underline");a.cB&&(l.visibility="hidden");a.gW===1&&p.U&&(l["text-combine-upright"]="all",l["text-orientation"]="mixed",S=g.Kk||g.yd,p.S.params.OU===3?l.transform=S?"rotate(90deg)":"rotate(180deg)":S&&(l.transform="rotate(-90deg)"));if(a.textEmphasis===1||a.textEmphasis===2||a.textEmphasis===3||a.textEmphasis===4||a.textEmphasis===5)if(g.Kk)l["font-weight"]="bold";else switch(l["text-emphasis-style"]="filled circle",l["text-emphasis-color"]="currentcolor",l["webkit-text-emphasis"]="filled circle", a.textEmphasis){case 4:case 3:l["text-emphasis-position"]="under left";l["webkit-text-emphasis-position"]="under left";break;case 5:case 2:l["text-emphasis-position"]="over right",l["webkit-text-emphasis-position"]="over right"}return l},i5=function(p){p=g.Lu(Math.round(p),0,16777215).toString(16).toUpperCase(); return"#000000".substring(0,7-p.length)+p},TP=function(p,a,l){p.loaded&&p.unload(); l!=null&&(p.Z=l,p.Z&&(g.Z0(p.Y)?zP(p,!!a):H_(p,!!a)));a!==null||W_(p,!0)||p.VT(a,!!a,p.Z?"m":"s");p.S=a;W_(p)&&(p.S=mX(p));var y;rdG(p,(y=p.S)!=null?y:void 0);p.load()},yql=function(p,a,l,y){y=Object.assign({hf:0},y); return new c_(p,a,l,"_"+Xr++,y)},Ng=function(p,a,l){g.bh.call(this,p); this.videoData=a;this.audioTrack=l;this.W=a.sI},nJB=function(){this.U=this.time=this.mode=this.S=0; this.j=new Scc(this);this.W=new Scc(this);this.L=[];this.clear()},Vcl=function(p){var a,l=!((a=p.B.F7())==null||!a.Uc()); return p.Kz&&l&&p.j!=="LIVE"&&p.j!=="SABR_LIVE"},Z7b=function(p){this.U=p; this.W=0;this.style=new wY;this.G=new b5(this.U);this.K=new b5(this.U);this.text=new b5(this.U);this.S=this.G;this.j=this.K;this.L=this.S},ZOl=function(p){if(typeof p==="string")return!1; p=new sP(p,8,0);return ftM(p)},UP=function(p){var a=mX(p); return!!a&&p.S===a},QF=function(p,a){g.D.call(this); this.B=p;this.Y=a;this.L=null;this.S=this.B.T2();this.logger=new g.iF("caps")},Adb=function(p,a,l,y){for(var S=0;S0?y.postBody=g.JZ(S,g.fA):y.postBody=(0,g.Yh)([120,0])}p.W&&(y.responseType="arraybuffer");var n=++p.Xu,V=(0,g.Ek)();p.S=g.bR(l,y,3,100,-1,function(z){z.errorCode==="net.timeout"&&p.player.jl("capnt",{rn:n++})}).then(function(z){if(p.policy.Da&&n%100===1){var d=(0,g.Ek)(); p.player.jl("caprsp",{rn:n,ms:d-V,kb:(z.xhr.responseText.length/1024).toFixed()})}a:{z=z.xhr;p.Gm();if(p.U){var G=!(p.W?z.response:z.responseText)||z.status>=400;if(d=g.Ioq(z)){z=g.sM(p.U,p.policy,{});p.U.kz(z,d);cq_(p,p.U);break a}if(G)p.player.jl("capfail",{status:z.status});else{var B;g.Pf("fcb_r",(0,g.Ek)(),((B=p.player.getVideoData())==null?void 0:B.UO)||"");B=p.U.mT[0];d=B.Rc;p.Z!=null&&p.G!==d&&(p.W?p.Z(z.response,(B.startTime+p.player.Jg())*1E3):p.Z(z.responseText,(B.startTime+p.player.Jg())* 1E3),p.G=d)}}p.U=null;p.S=null}}).Nb(function(z){p.U=null; p.S=null;var d;p.player.jl("capfail",{rn:n,status:(d=z.xhr)==null?void 0:d.status})}); p.U=a;Va_(p.j,p.U.mT[0].Rc)},wZ2=function(p,a){var l=[],y; for(y in p.L.L)if(p.L.L.hasOwnProperty(y)){var S=p.L.L[y];if(g.GQ(S,a||null)){var n=S.info.id,V=n,z="."+n,d="",G="";if(S=S.info.captionTrack)n=S.languageCode,V=S.displayName,z=S.vssId,d=S.kind,G=S.id;else{S=n;var B=g.a0W.get(S);B==null&&(B=rqM[S]||rqM[S.replace(/-/g,"_")],g.a0W.set(S,B));S=B;V=S||V}l.push(new g.uZ({id:y,languageCode:n,languageName:V,is_servable:!0,is_default:!0,is_translateable:!1,vss_id:z,kind:d,captionId:G}))}}return l},B87=function(p,a,l,y){var S=this; this.B=p;this.U=a;this.logger=l;this.ke=y;this.wq=[];this.T4=[];this.L=null;this.hg={lvO:function(){return S.L}, Vh:function(){return S.wq}}; p=g.sW(this.B.C().experiments,"html5_override_micro_discontinuities_threshold_ms");this.S=p>0?p:10},$hK=function(p){p.w7=Array.from(p.element.getElementsByClassName("caption-visual-line")); for(var a=p.S.params.sV,l=0,y=0,S=p.w7.length-1;l-1;){var n=p.w7[S];y+=p.U?n.offsetWidth:n.offsetHeight;l++;S--}p.Z=y;a=Math;l=a.max;isNaN(p.Bs)&&((y=p.L.EG)?(S=g.JI("SPAN"),g.Cp(S,"\u2013".repeat(y)),g.B8(S,l11(p,p.L.yr)),p.j.appendChild(S),p.Bs=S.offsetWidth,p.j.removeChild(S)):p.Bs=0);y=p.j;p.UO=l.call(a,p.Bs,p.yQ,(p.U?y.offsetHeight:y.offsetWidth)+1)},gZG=function(p,a,l){var y=p.S,S=!1; switch(p.style.get()){case 4:case 1:case 2:p.style.get()===4&&y.L>0||(kd(y,l),YX8(p.S),YX8(p.j),y.row=15,y.L=a,S=!0)}p.style.set(3);p.L=y;p.L.style=p.style;p.U.mode=1<a?(kd(y,l),EP(y,y.row-y.L,a)):y.row0||!a.append,G=V[z];d&&!l?(b77(p),S=zxc(p,y)):d&&l&&(l=!1);G&&(S.appendChild(n?g.kX(G):G),n||G.tagName!=="RUBY"||G.childElementCount!==4||g.Kk||!g.Z1(G.children[2],"text-emphasis")||(d=p.U?"padding-right":"padding-top",g.Z1(G.children[2],"text-emphasis-position")&&(d= p.U?"padding-left":"padding-bottom"),g.Hs?g.B8(S,d,"1em"):g.B8(S,d,"0.5em")))}p.Hs=y;p.t9=S;p.G.push(a)},RxU=function(p,a,l,y,S,n,V,z,d){switch(V.tagName){case "b":z.bold=!0; break;case "i":z.italic=!0;break;case "u":z.underline=!0}for(var G=0;G0,g.cL(z)?void 0:z),d.push(B),S.L.push(B);else{var c={};Object.assign(c,z);RxU(p,a,l,y,S,!0,B,c,d)}}},O7l=function(p,a){p.L=function(l,y){if(l.info.j){var S=l; if(p.T4.length>0){for(S=p.T4.shift();p.T4.length>0;)S=g.Ez(S,p.T4.shift());S=g.Ez(S,l)}if(S){l=S;try{var n=g.ZV(l)*1E3}catch(G){n=l.info.startTime*1E3}try{var V=g.BsA(l)*1E3}catch(G){V=l.info.duration*1E3}if(n<0||V<0)n<0&&(n=l.info.startTime*1E3),V<0&&(V=l.info.duration*1E3);l.info.startTime=n/1E3;l.info.W=n/1E3;l.info.duration=V/1E3;l.info.Z=V/1E3;n=p.Pn(S);V=n.Rc;n={formatId:n.formatId,startTimeMs:n.startTimeMs,durationMs:n.durationMs,bX:V,jD:V};V=uMM(p.wq,n.startTimeMs);var z=(l=V>=0?p.wq[V]:null)? l.startTimeMs+l.durationMs:0,d=n.startTimeMs+n.durationMs;!l||n.startTimeMs-z>p.S?p.wq.splice(V+1,0,n):(l.durationMs=Math.max(z,d)-l.startTimeMs,l.jD=Math.max(l.jD,n.jD));y(p.wq);n=g.KU(S);y=p.U;n=n.buffer.slice(n.byteOffset,n.byteLength+n.byteOffset);S=S.info.W;y.G?y.j==null?g.JK(y.logger,350058965,"Null loaded track meta data at captions data received"):a.Mt(n,y.j,S*1E3):g.JK(y.logger,350058965,"Null Representation at captions data received")}else g.JK(p.logger,350058965,"Empty slice")}else p.T4.push(l)}; p.B.addEventListener("sabrCaptionsDataLoaded",p.L)},hZG=function(p,a){var l="vertical-rl"; p.L.uv===1&&(l="vertical-lr");g.wF&&(l=l==="vertical-lr"?"tb-lr":"tb-rl");g.B8(a,"-o-writing-mode",l);g.B8(a,"-webkit-writing-mode",l);g.B8(a,"writing-mode",l);g.B8(a,"text-orientation","upright");g.uD(a,"ytp-vertical-caption");p.S.params.OU===3&&(g.B8(a,"text-orientation",""),g.B8(a,"transform","rotate(180deg)"))},FnM=function(p,a){var l=new g.uZ; l.languageCode=p.languageCode;l.languageName=p.languageName;l.name=p.name;l.displayName=p.displayName;l.kind=p.kind;l.isDefault=!1;l.L=p.L;l.isTranslateable=p.isTranslateable;l.vssId=p.vssId;l.url=p.url;l.translationLanguage=a;p.xtags&&(l.xtags=p.xtags);p.captionId&&(l.captionId=p.captionId);return l},Knc=function(p,a){var l={},y=a.getAttribute("wp"); y&&Object.assign(l,p.Z[y]);p=A7(a,"ap");p!=null&&(l.wA=p);p=D9(a,"cc");p!=null&&(l.EG=p);p=D9(a,"ah");p!=null&&(l.rh=p);p=D9(a,"rc");p!=null&&(l.sV=p);a=D9(a,"av");a!=null&&(l.Wk=a);return l},UG2=function(p){if(!kWl.test(p))throw Error("'"+p+"' is not a valid hex color"); p.length==4&&(p=p.replace(Mc2,"#$1$1$2$2$3$3"));p=p.toLowerCase();p=parseInt(p.slice(1),16);return[p>>16,p>>8&255,p&255]},b77=function(p){p.K=g.JI("SPAN"); g.B8(p.K,{display:"block"});g.uD(p.K,"caption-visual-line");p.j.appendChild(p.K)},lta=function(p,a){var l,y,S; return g.R(function(n){if(n.L==1)return l=p+"|"+a,g.u(n,g.Nb(),2);if(n.L!=3){y=n.S;if(!y)throw g.K6("gct");return g.u(n,g.Fl(y),3)}S=n.S;return n.return(S.get("captions",l))})},mhW=function(p,a,l){a&&!p.UO?(a=xGU({OU:0, lang:"es"}),p.UO=[a,new Ly(a.start,a.end-a.start,0,a.id,l!=null?l:"Los subt\u00edtulos tendr\u00e1n este aspecto")],p.player.Kh(p.UO)):!a&&p.UO&&(T8K(p,p.UO),p.UO=null)},tcB=function(p,a){$hK(p); var l=p.w7.reduce(function(n,V){return(p.U?V.offsetWidth:V.offsetHeight)+n},0); l=p.Z-l;if(l!==p.nz){var y=l>0&&p.nz===0,S=l0?p.L:1; p.S=1;EP(p,0,15)},gY=function(p,a){if(!p.L)return null; if(p.Sl&&p.Sl.j)return p.Sl.j;a=vZ8(p,a);a=g.Rv(p.L.S,a);var l=null;if(X81(p.Y)){var y=p.B.isInline()?void 0:g.zv("yt-player-caption-sticky-language");for(var S=[y,p.videoData.captionsLanguagePreference,p.Y.captionsLanguagePreference,g.WK(p.videoData,"yt:cc_default_lang")],n=!1,V=0;V=0?p:-p-2},A7=function(p,a){p=D9(p,a); return p!==void 0?p:null},WnW=function(){return g.zv("yt-player-caption-display-settings")},Yd=function(p,a){dY.call(this); this.S=p;this.j=a;this.track=this.j.languageName==="CC3"?4:0;this.L=new nJB;this.L.S=1<=p&&(p=640,y>l*1.3&&(p=480),S=l/p*16);return S},kd=function(p,a){if(p.style.type===3){for(var l=0,y=0,S=p.W.time+0,n="",V="",z=S,d=1;d<=15;++d){for(var G=!1,B=y?y:1;B<=32;++B){var c=p.U[d][B]; if(c.L!==0){l===0&&(l=d,y=B);G=String.fromCharCode(c.L);var r=c.timestamp;r1?1:0){case 1:return new Fr(a,p.U,p.G,l.width,l.height,S,y,p.Y.experiments,p.XC.bind(p),p.B);case 2:return new h7(a,p.U,p.G,l.width,l.height,S,y,p.Y.experiments,p.XC.bind(p),p.B);default:return new xd(a,p.U,p.G,l.width,l.height,S, y,p.Y.experiments,p.XC.bind(p),p.B)}}; g.bh.prototype.L3=g.vr(71,function(){return!1}); g.bh.prototype.zd=g.vr(70,function(){}); g.kT.prototype.zd=g.vr(69,function(p,a,l){var y=this;this.Gm();a=this.Jn(p,a);var S=this.Tm.C().D("html5_report_captions_ctmp_qoe"),n=(0,g.Ek)();this.gX();DGc(this,a,{format:"RAW",onSuccess:function(V){y.L=null;if(S){var z=(V.responseText.length/1024).toFixed(),d=(0,g.Ek)();y.videoData.jl("capresp",{ms:d-n,kb:z})}l.Mt(V.responseText,p)}, onError:S?function(V){var z;V=(z=V==null?void 0:V.status)!=null?z:0;y.videoData.jl("capfail",{status:V})}:void 0, withCredentials:!0})}); g.aI.prototype.zd=g.vr(68,function(p,a,l){var y=this;this.Gm();a=this.Jn(p,a);this.gX();this.L=g.lE(a,{format:"RAW",onSuccess:function(S){y.L=null;l.Mt(S.responseText,p)}, withCredentials:!0})}); g.uQ.prototype.HC=g.vr(67,function(){for(var p=g.zZ(document,"track",void 0,this.L),a=0;a=0||p<0&&(-p-1)%2===1}; OP.prototype.length=function(){return this.segments.length/2}; g.A(xha,g.D);g.L=xha.prototype;g.L.fz=function(){g.D.prototype.fz.call(this);this.S&&this.S.cancel()}; g.L.JV=function(){this.seekTo(this.player.getCurrentTime())}; g.L.seekTo=function(p){p-=this.player.Jg();var a=this.L;this.L=g.Jt(this.UO.TA(p).mT);a!==this.L&&this.Sl&&this.Sl()}; g.L.reset=function(){this.j=new OP;this.G=-1;this.S&&(this.S.cancel(),this.S=null)}; g.L.SX=function(){this.Gm();var p;if(p=this.L!=null)p=this.L,p=p.L.Vp(p);if(p&&!this.S&&!(this.L&&this.L.startTime-this.player.getCurrentTime()>30)){p=this.L;p=p.L.mw(p);var a=p.mT[0],l;if((l=this.player.getVideoData())==null?0:l.enableServerStitchedDai)if(l=this.player.T2()){var y=a.L.info.id,S=a.Rc,n=p.mT[0].W;if(this.policy.Hs){if(l=l.WV(n,S,y,3))p.j=l}else if(y=l.VV(n,S,y,3))if(l=l.Ip(S),l===0)y&&(p.L=new g.ib(y));else if(l===2){this.K.start();mGM(this)&&this.seekTo(this.player.getCurrentTime()); return}}a.L.index.iW(a.Rc)?(this.j.contains(p.mT[0].Rc)||cq_(this,p),this.L=g.Jt(p.mT)):mGM(this)&&this.seekTo(this.player.getCurrentTime())}this.K.start()}; g.A(P_,g.bh);g.L=P_.prototype;g.L.zd=function(p,a,l){var y=this;this.gX();a=kEB(this,p.getId());a||(a=p.languageCode,a=this.L.isManifestless?Jda(this,a,"386"):Jda(this,a));if(a){var S=(a.index.EP(a.index.rp())-a.index.getStartTime(a.index.rp()))*1E3,n=new g.xWf(this.B.C());this.j=new xha(n,this.B,a,function(V,z){l.Mt(V,p,z,S)},this.K||g.vA(a.info),function(){y.j&&y.j.reset(); y.G=!0})}}; g.L.L3=function(){var p=this.G;this.G=!1;return p}; g.L.lx=function(p){var a=this.B.C().D("html5_fallback_if_rawcc_missing");var l=this.L.L.rawcc!=null;if(!this.K||!l&&a)a=this.L.isManifestless?wZ2(this,"386"):wZ2(this);else{if(!l){g.JK(this.logger,386248249,"rawcc used but unavailable");return}a=[new g.uZ({id:"rawcc",languageCode:"rawcc",languageName:"CC1",is_servable:!0,is_default:!0,is_translateable:!1,vss_id:".en"}),new g.uZ({id:"rawcc",languageCode:"rawcc",languageName:"CC3",is_servable:!0,is_default:!0,is_translateable:!1,vss_id:".en"})]}a=g.t(a); for(l=a.next();!l.done;l=a.next())g.HK(this.S,l.value);p.q0()}; g.L.gX=function(){this.j&&(this.j.dispose(),this.j=null)}; g.L.Jn=function(){return""}; var v_=/^#(?:[0-9a-f]{3}){1,2}$/i;var Qg7=["left","right","center","justify"];g.A(xd,g.X);g.L=xd.prototype;g.L.D9=function(p,a){this.Kz=p;this.VY=a;var l=g.Hd(this.element,this.element.parentElement);this.Ps=p-l.x;this.Yv=a-l.y}; g.L.Qx=function(p,a){if(p!==this.Kz||a!==this.VY){g.tr(this.element,"ytp-dragging")||g.uD(this.element,"ytp-dragging");var l=g.Wd(this.element);p=p-this.Ps-.02*this.EC;var y=a-this.Yv-.02*this.O6,S=(p+l.width/2)/this.maxWidth*3;S=Math.floor(g.Lu(S,0,2));var n=(y+l.height/2)/this.maxHeight*3;n=Math.floor(g.Lu(n,0,2));a=S+n*3;p=(p+S/2*l.width)/this.maxWidth;p=g.Lu(p,0,1)*100;l=(y+n/2*l.height)/this.maxHeight;l=g.Lu(l,0,1)*100;this.S.params.wA=a;this.S.params.Wk=l;this.S.params.rh=p;this.S.params.isDefault= !1;this.L.wA=a;this.L.Wk=l;this.L.rh=p;this.L.isDefault=!1;this.Xu.wA=a;this.Xu.Wk=l;this.Xu.rh=p;this.Xu.isDefault=!1;this.eU()}}; g.L.BF=function(){g.b6(this.element,"ytp-dragging")}; g.L.eU=function(){this.Vv(this.G)}; g.L.Vv=function(p){var a=this.Sb?0:Math.min(this.lm(),this.maxWidth),l=this.DM(),y=this.Sb;if(y){var S=getComputedStyle(this.j.parentNode);S=u5(S.borderLeftWidth)+u5(S.borderRightWidth)+u5(S.paddingLeft)+u5(S.paddingRight)}else S=0;var n=S;S="";this.S.params.OU===3&&(S="rotate(180deg)");var V=y?"calc(96% - "+n+"px)":"96%";g.B8(this.element,{top:0,left:0,right:"",bottom:"",width:a?a+"px":"",height:l?l+"px":"","max-width":V,"max-height":V,margin:"",transform:""});this.XR(p);S={transform:S,top:"",left:"", width:a?a+"px":"",height:l?l+"px":"","max-width":"","max-height":""};var z=this.L.rh*.96+2;V=this.L.wA;switch(V){case 0:case 3:case 6:(y=this.L.yr.fontSizeIncrement)&&y>0&&this.L.OU!==2&&this.L.OU!==3&&(z=Math.max(z/(1+y*2),2));S.left=z+"%";break;case 1:case 4:case 7:S.left=z+"%";z=this.j.offsetWidth;a||z?(a=a||z+1,S.width=a+"px",S["margin-left"]=y?a/-2-n/2+"px":a/-2+"px"):S.transform+=" translateX(-50%)";break;case 2:case 5:case 8:S.right=100-z+"%"}y=this.L.Wk*.96+2;switch(V){case 0:case 1:case 2:S.top= y+"%";break;case 3:case 4:case 5:S.top=y+"%";(l=l||this.element.clientHeight)?(S.height=l+"px",S["margin-top"]=l/-2+"px"):S.transform+=" translateY(-50%)";break;case 6:case 7:case 8:S.bottom=100-y+"%"}g.B8(this.element,S);if(this.W){l=this.j.offsetHeight;y=1;for(a=0;aa)a=0,this.QY=!1,this.G=[],this.K=this.Hs=this.t9=null,g.Jh(this.j);for(;a10?z-1:z);p=A7(p,"hg");p!=null&&(V.gW=p);n[l]=V;break;case "ws":l=p.getAttribute("id");this.Sl[l]=oJb(this,p);break;case "wp":l=p.getAttribute("id"),this.Z[l]=Knc(this,p)}if(S){y=[];S=Array.from(S.childNodes);S=g.t(S);for(p=S.next();!p.done;p=S.next())if(p=p.value,p.nodeType===1)switch(p.tagName){case "w":this.L=ex_(this,p,a,!1);(p=this.K[this.L.id])&&p.end>this.L.start&&(p.end=this.L.start);this.K[this.L.id]=this.L;y.push(this.L);break;case "p":var d=p;z=a;l=[];n=d.getAttribute("w")|| this.W;V=!!t7(d,"a");z=(D9(d,"t")||0)+z;var G=D9(d,"d")||5E3;V||(!this.G&&this.S&&this.S.windowId===n&&this.S.end>z&&(this.S.end=z),this.S&&this.S.text==="\n"&&(this.S.text=""));var B=V?6:5,c=d.getAttribute("p");c=c?this.pens[c]:null;var r=Array.from(d.childNodes);r.length&&(this.G=d.getAttribute("d")!=null);for(d=0;d0&&(V=!0);var F=void 0;w.nodeType===1&&(F=w);if(F&&F.tagName==="s"){if((w=(w=F.getAttribute("p"))?this.pens[w]:null)&&w.Wi&&(w.Wi===1?(w=r.slice(d, d+4),w.length===4&&(P=EZU(z,G,n,V,B,w,this.pens),d+=3)):P=EZU(z,G,n,V,B,[F],this.pens)),!P){var v=F;P=z;F=G;w=n;var I=V,b=B,O=v.textContent?v.textContent:"",m=v.getAttribute("p");m=m?this.pens[m]:null;v=D9(v,"t")||0;P=new Ly(P+v,F-v,b,w,O,I,m)}}else P=new Ly(z,G,B,n,w.textContent||"",V,c);l.push(P);this.S=P}if(l.length>0)for(l[0].windowId===this.W&&(this.L=ex_(this,p,a,!0),y.push(this.L)),p=g.t(l),l=p.next();!l.done;l=p.next())l=l.value,l.windowId=this.L.id,this.L.L.push(l),y.push(l)}a=y}else a=[]; return a};var Dh_=new Map([[9,1],[10,1],[11,2],[12,3],[13,4],[14,5]]);g.A(GP,dY);GP.prototype.reset=function(){this.S.clear()}; GP.prototype.U=function(p,a){var l=JSON.parse(p);if(!l)return[];if(l.pens){p=0;for(var y=g.t(l.pens),S=y.next();!S.done;S=y.next()){S=S.value;var n={},V=S.pParentId;V&&Object.assign(n,this.L.get(V));S.bAttr&&(n.bold=!0);S.iAttr&&(n.italic=!0);S.uAttr&&(n.underline=!0);V=S.ofOffset;V!=null&&(n.offset=V);S.szPenSize!==void 0&&(n.fontSizeIncrement=S.szPenSize/100-1);V=S.etEdgeType;V!=null&&(n.charEdgeStyle=V);S.ecEdgeColor!==void 0&&(n.kK=i5(S.ecEdgeColor));V=S.fsFontStyle;V!=null&&V!==0&&(n.fontFamily= V);S.fcForeColor!==void 0&&(n.color=i5(S.fcForeColor));S.foForeAlpha!==void 0&&(n.textOpacity=S.foForeAlpha/255);S.bcBackColor!==void 0&&(n.background=i5(S.bcBackColor));S.boBackAlpha!==void 0&&(n.backgroundOpacity=S.boBackAlpha/255);(V=S.rbRuby)&&V!==10&&(n.Wi=V>10?V-1:V,n.textEmphasis=Dh_.get(n.Wi));S.hgHorizGroup&&(n.gW=S.hgHorizGroup);this.L.set(p++,n)}}if(l.wsWinStyles)for(p=0,y=g.t(l.wsWinStyles),S=y.next();!S.done;S=y.next())S=S.value,n={},(V=S.wsParentId)?Object.assign(n,this.W.get(V)):Object.assign(n, this.G),S.mhModeHint!==void 0&&(n.hf=S.mhModeHint),S.juJustifCode!==void 0&&(n.textAlign=S.juJustifCode),S.pdPrintDir!==void 0&&(n.OU=S.pdPrintDir),S.sdScrollDir!==void 0&&(n.uv=S.sdScrollDir),S.wfcWinFillColor!==void 0&&(n.windowColor=i5(S.wfcWinFillColor)),S.wfoWinFillAlpha!==void 0&&(n.windowOpacity=S.wfoWinFillAlpha/255),this.W.set(p++,n);if(l.wpWinPositions)for(p=0,y=g.t(l.wpWinPositions),S=y.next();!S.done;S=y.next())S=S.value,n={},(V=S.wpParentId)&&Object.assign(n,this.j.get(V)),S.ahHorPos!== void 0&&(n.rh=S.ahHorPos),S.apPoint!==void 0&&(n.wA=S.apPoint),S.avVerPos!==void 0&&(n.Wk=S.avVerPos),S.ccCols!==void 0&&(n.EG=S.ccCols),S.rcRows!==void 0&&(n.sV=S.rcRows),this.j.set(p++,n);if(l.events){p=[];l=g.t(l.events);for(y=l.next();!y.done;y=l.next()){var z=y.value;S=(z.tStartMs||0)+a;n=z.dDurationMs||0;if(z.id)V=String(z.id),y=iOl(this,z,S,n,V),p.push(y),this.S.set(V,y);else{z.wWinId?V=z.wWinId.toString():(V="_"+Xr++,y=iOl(this,z,S,n,V),p.push(y),this.S.set(V,y));y=p;var d=z;n===0&&(n=5E3); z=this.S.get(V);var G=!!d.aAppend,B=G?6:5,c=d.segs,r=null;d.pPenId&&(r=this.L.get(d.pPenId));for(d=0;d1?1:0)===2&&G&&P==="\n")continue;w=null;var I=[],b;if(b=v&&v.Wi===1){b=c;var O=d;if(O+3>=b.length||!b[O+1].pPenId||!b[O+2].pPenId||!b[O+3].pPenId)b=!1;else{var m=b[O+1].pPenId;(m=this.L.get(m))&&m.Wi&&m.Wi===2?(m=b[O+2].pPenId,m=this.L.get(m),!m||!m.Wi|| m.Wi<3?b=!1:(m=b[O+3].pPenId,b=(m=this.L.get(m))&&m.Wi&&m.Wi===2?!0:!1)):b=!1}}if(b)F=c[d+1].utf8,w=c[d+3].utf8,b=c[d+2].utf8,O=this.L.get(c[d+2].pPenId),P=FQa(P,F,b,w,O),w=new Ly(S,n,B,V,P,G,v),d+=3;else{if(P.indexOf("<")>-1){var H=void 0;I=v;b=r;O=S;m=n;var Y=F,N=B,yo=G,zq=[],S$=g.bM(""+P+"");if(!S$.getElementsByTagName("parsererror").length&&((H=S$.firstChild)==null?0:H.childNodes.length))for(H=g.t(S$.firstChild.childNodes),S$=H.next();!S$.done;S$=H.next()){S$=S$.value;var BE=void 0, f=void 0,xh=(f=(BE=S$.textContent)==null?void 0:BE.replace(/\n/g,""))!=null?f:"";if(S$.nodeType!==3||xh&&xh.match(/^ *$/)==null){BE={};Object.assign(BE,I||b);f=void 0;switch((f=S$)==null?void 0:f.tagName){case "b":BE.bold=!0;break;case "i":BE.italic=!0;break;case "u":BE.underline=!0}zq.push(new Ly(O+Y,m-Y,N,z.id,xh,yo,BE))}}I=zq}I.length||(I=[new Ly(S+F,n-F,B,z.id,P,G,v||r)])}if(I.length)for(G=g.t(I),v=G.next();!v.done;v=G.next())v=v.value,y.push(v),z.L.push(v);else w&&(y.push(w),z.L.push(w))}G=!0}}}a= p}else a=[];return a};g.A(Ng,g.bh);Ng.prototype.zd=function(p,a,l){yda(this.videoData.videoId,p.vssId,l.Mt)}; Ng.prototype.lx=function(p){if(this.audioTrack)for(var a=g.t(this.audioTrack.captionTracks),l=a.next();!l.done;l=a.next())g.HK(this.S,l.value);p.q0()};g.A(Fr,xd);Fr.prototype.XR=function(p){var a=this.S.L;xd.prototype.XR.call(this,p);for(p=p.length;p0;p.W--){var a=I0(p),l=I0(p),y=I0(p);a&4&&(a&3)===this.track&&(this.track===0||this.track===1)&&(a=this.L,a.L.push({time:p.U,type:this.track,UX:l,jL:y,order:a.L.length}))}dhM(this.L,p);return p.S}return[]}; Yd.prototype.reset=function(){this.L.clear()};g.A(h7,xd);g.L=h7.prototype;g.L.eU=function(){g.dr(this.eb)}; g.L.v4=function(){this.element.removeEventListener("transitionend",this.v4,!1);g.b6(this.element,"ytp-rollup-mode");this.Vv(this.va,!0)}; g.L.DM=function(){return this.U?this.UO:this.Z}; g.L.lm=function(){return this.U?this.Z:this.UO}; g.L.Vv=function(p,a){this.va=p;if(this.S.params.sV){for(var l=0,y=0;y0&&l=4){var z=w82(V[1]),d=w82(V[2])-z;z+=n;var G=(V=V[3])?V.split(" "):[];V={};var B=null;var c="";var r=null,w="";G=g.t(G);for(var P=G.next();!P.done;P=G.next())if(P=P.value.split(":"),P.length===2){var F=P[1];switch(P[0]){case "line":P=F.split(",");P[0].endsWith("%")&&(B=P[0],V.Wk=Number.parseInt(B, 10),P.length===2&&(c=P[1].trim()));break;case "position":P=F.split(",");r=P[0];V.rh=Number.parseInt(r,10);P.length===2&&(w=P[1].trim());break;case "align":switch(F){case "start":V.textAlign=0;break;case "middle":V.textAlign=2;break;case "end":V.textAlign=1}}}B||c||(c="end");if(!r)switch(V.textAlign){case 0:V.rh=0;break;case 1:V.rh=100;break;case 2:V.rh=50}if(V.textAlign!=null){B=0;switch(c){case "center":B+=3;break;case "end":B+=6;break;default:B+=0}switch(w){case "line-left":B+=0;break;case "center":B+= 1;break;case "line-right":B+=2;break;default:switch(V.textAlign){case 0:B+=0;break;case 2:B+=1;break;case 1:B+=2}}c=B<0||B>8?7:B;V.wA=c}S=S.substring(saB.lastIndex).replace(/[\x01-\x09\x0b-\x1f]/g,"");w=V;V=S;S={};if(V.indexOf("<")<0&&V.indexOf("&")<0)n=yql(z,d,5,w),d=new Ly(z,d,5,n.id,V,!1,g.cL(S)?void 0:S),l.push(n),l.push(d),n.L.push(d);else for(c=V.split(UhU),c.length===1?(V=5,w=yql(z,d,V,w)):(B=V=6,w=Object.assign({EG:32},w),w=new c_(z,d,B,"_"+Xr++,w)),l.push(w),B=z,r=0;r"+G+""),P.getElementsByTagName("parsererror").length?(F=P.createElement("span"),F.appendChild(P.createTextNode(G))):F=P.firstChild,RxU(this,B,d-(B-z),V,w,r>0,F,S,l)):B=w82(G)+n}saB.lastIndex=0}}return l}; var NA1=/^NOTE/,TAl=/(?:\r\n|\r|\n){2,}/,saB=RegExp("^((?:[\\d]{2}:)?[\\d]{2}:[\\d]{2}\\.[\\d]{3})[\\t ]+--\x3e[\\t ]+((?:[\\d]{2}:)?[\\d]{2}:[\\d]{2}\\.[\\d]{3})(?:[\\t ]*)(.*)(?:\\r\\n|\\r|\\n)","gm"),UhU=RegExp("<((?:[\\d]{2}:)?[\\d]{2}:[\\d]{2}\\.[\\d]{3})>");g.A(QF,g.D);QF.prototype.clear=function(){this.L&&this.L.dispose();this.L=null}; QF.prototype.reset=function(){this.L&&this.L.reset()}; QF.prototype.fz=function(){g.D.prototype.fz.call(this);this.clear()};var Cy={windowColor:"#080808",windowOpacity:0,textAlign:2,wA:7,rh:50,Wk:100,isDefault:!0,yr:{background:"#080808",backgroundOpacity:.75,charEdgeStyle:0,color:"#fff",fontFamily:4,fontSizeIncrement:0,textOpacity:1,offset:1}};g.A(H7U,g.N_);g.L=H7U.prototype;g.L.fz=function(){if(this.W||this.Bs){var p=this.B.F7();p&&!p.Gm()&&p.HC()}else mhW(this,!1);g.N_.prototype.fz.call(this)}; g.L.jZ=function(){return this.Y.D("html5_honor_caption_availabilities_in_audio_track")&&this.j!=="LIVE"&&this.j!=="SABR_LIVE"}; g.L.oD=function(){if(this.Kz)return this.W||this.Bs;var p=this.getAudioTrack();if(this.jZ()){if(!p.captionTracks.length)return!1;if(!this.L)return!0}p=Cn7(p,g.Z0(this.Y));return p==="CAPTIONS_INITIAL_STATE_ON_REQUIRED"?!0:p==="CAPTIONS_INITIAL_STATE_OFF_REQUIRED"?W_(this):BAb(this)||W_(this)?!0:vJ2(this)}; g.L.load=function(){g.N_.prototype.load.call(this);this.Sl=this.getAudioTrack();if(this.L)this.S&&(this.VY.clear(),this.W?a1b(this,!0):this.player.getPresentingPlayerType()!==3&&this.L.zd(this.S,"json3",this.eb),this.W||this.Bs||UP(this)||this.player.EE("captionschanged",g.Xp(this.S)));else{var p;this.j==="OFFLINE"?p=new Ng(this.player,this.videoData,this.getAudioTrack()):this.j==="SABR_LIVE"?p=new rY(this.videoData.L,this.player):this.j==="LIVE"?p=new P_(this.videoData.L,this.player):this.j==="INNERTUBE"? p=new g.kT(this.player,this.videoData,this.getAudioTrack()):p=new g.aI(this.player,this.videoData.Ae,this.videoData.videoId,g.VYF(this.videoData),this.videoData.NJ,this.videoData.eventId);this.L=p;g.E(this,this.L);this.L.lx(this.eb)}}; g.L.unload=function(){this.W&&this.S?a1b(this,!1):(this.nz&&g.Fe(this.nz),this.player.lf("captions"),this.t9=[],this.L&&this.L.gX(),this.VY.clear(),this.UO&&this.player.Kh(this.UO),this.O_());g.N_.prototype.unload.call(this);this.player.Jz();this.player.EE("captionschanged",{})}; g.L.create=function(){this.oD()&&this.load();var p;a:{var a,l,y;if(this.Y.D("web_player_nitrate_promo_tooltip")&&((a=this.videoData.getPlayerResponse())==null?0:(l=a.captions)==null?0:(y=l.playerCaptionsTracklistRenderer)==null?0:y.enableTouchCaptionsNitrate)){var S,n;if(a=(p=this.videoData.getPlayerResponse())==null?void 0:(S=p.captions)==null?void 0:(n=S.playerCaptionsTracklistRenderer)==null?void 0:n.captionTracks)for(p=g.t(a),S=p.next();!S.done;S=p.next())if(S=S.value,S.kind==="asr"&&S.languageCode=== "en"){p=!0;break a}}p=!1}p&&this.B.publish("showpromotooltip",this.K.element)}; g.L.q0=function(){var p=Cn7(this.player.getAudioTrack(),g.Z0(this.Y));var a=p==="CAPTIONS_INITIAL_STATE_ON_REQUIRED"?gY(this,this.Z):p==="CAPTIONS_INITIAL_STATE_OFF_REQUIRED"&&W_(this)?mX(this):BAb(this)||this.Z||vJ2(this)?gY(this,this.Z):W_(this)?mX(this):null;if(this.W||this.Bs){var l=g.Rv(this.L.S,!0);p=[];for(var y=0;y0&&(BE=this.S,this.VT(BE,!!BE,UP(this)?"g":this.Z?"m":"s"));this.player.Kh(a,void 0,this.j==="LIVE"||this.j==="SABR_LIVE"); !this.Z||this.Bs||UP(this)||g.g5(this.Y)||g.PD(this.Y)||g.dB(this.Y)||this.Y.QY==="shortspage"||this.player.isInline()||(g.Fe(this.nz),a=xGU({wA:0,rh:5,Wk:5,sV:2,textAlign:0,OU:0,lang:"es"}),this.r7=[a],BE=["Haz clic en "," para ir a la configuraci\u00f3n"],this.Ps||(n=new g.RC(g.JLM()),g.E(this,n),this.Ps=n.element),n=a.end-a.start,(V=g.Ln(this.S))&&this.r7.push(new Ly(a.start,n,0,a.id,V)),this.r7.push(new Ly(a.start,n,0,a.id,BE[0]),new Ly(a.start,n,0,a.id,this.Ps,!0),new Ly(a.start,n,0,a.id,BE[1], !0)),this.player.Kh(this.r7),g.sb(this.nz));!this.Z||this.Bs||UP(this)||(g.Z0(this.Y)?zP(this,!0):H_(this,!0),this.Sl&&(this.Sl.j=this.S),this.player.Jz());this.Z=!1}}; g.L.onCueRangeEnter=function(p){this.t9.push(p);B_(this.Hs)}; g.L.onCueRangeExit=function(p){g.FS(this.t9,p);this.L instanceof P_&&this.L.K&&this.player.PG([p]);B_(this.Hs)}; g.L.getCaptionWindowContainerId=function(){return this.K.element.id}; g.L.hDV=function(){T8K(this,this.r7);this.r7=null}; g.L.xa=function(){var p=this;if(!this.yQ||!this.W){this.Hs.stop();g.GiM(this.OO);this.t9.sort(g.wg);var a=this.t9;if(this.UO){var l=g.Tz(a,function(n){return this.UO.indexOf(n)===-1},this); l.length&&(a=l)}a=g.t(a);for(l=a.next();!l.done;l=a.next())XZ_(this,l.value);a=g.t(Object.entries(this.w7));var y=a.next();for(l={};!y.done;l={DT:void 0,nE:void 0},y=a.next()){var S=g.t(y.value);y=S.next().value;S=S.next().value;l.DT=y;l.nE=S;this.OO[l.DT]?(l.nE.element.parentNode||(l.nE instanceof h7||l.nE instanceof Fr||g.j$(this.w7,function(n){return function(V,z){z!==n.DT&&V.S.params.wA===n.nE.S.params.wA&&V.S.params.rh===n.nE.S.params.rh&&V.S.params.Wk===n.nE.S.params.Wk&&(V.dispose(),delete p.w7[z]); return z===n.DT}}(l),this),this.K.element.appendChild(l.nE.element)),l.nE.Vv(this.OO[l.DT])):(l.nE.dispose(),delete this.w7[l.DT])}}}; g.L.SYO=function(){MaW(this,{},!0);this.player.EE("captionssettingschanged")}; g.L.Vj=function(){var p=Cy.yr;p={background:p.background,backgroundOpacity:p.backgroundOpacity,charEdgeStyle:p.charEdgeStyle,color:p.color,fontFamily:p.fontFamily,fontSizeIncrement:p.fontSizeIncrement,fontStyle:p.bold&&p.italic?3:p.bold?1:p.italic?2:0,textOpacity:p.textOpacity,windowColor:Cy.windowColor,windowOpacity:Cy.windowOpacity};var a=WnW()||{};a.background!=null&&(p.background=a.background);a.backgroundOverride!=null&&(p.backgroundOverride=a.backgroundOverride);a.backgroundOpacity!=null&&(p.backgroundOpacity= a.backgroundOpacity);a.backgroundOpacityOverride!=null&&(p.backgroundOpacityOverride=a.backgroundOpacityOverride);a.charEdgeStyle!=null&&(p.charEdgeStyle=a.charEdgeStyle);a.charEdgeStyleOverride!=null&&(p.charEdgeStyleOverride=a.charEdgeStyleOverride);a.color!=null&&(p.color=a.color);a.colorOverride!=null&&(p.colorOverride=a.colorOverride);a.fontFamily!=null&&(p.fontFamily=a.fontFamily);a.fontFamilyOverride!=null&&(p.fontFamilyOverride=a.fontFamilyOverride);a.fontSizeIncrement!=null&&(p.fontSizeIncrement= a.fontSizeIncrement);a.fontSizeIncrementOverride!=null&&(p.fontSizeIncrementOverride=a.fontSizeIncrementOverride);a.fontStyle!=null&&(p.fontStyle=a.fontStyle);a.fontStyleOverride!=null&&(p.fontStyleOverride=a.fontStyleOverride);a.textOpacity!=null&&(p.textOpacity=a.textOpacity);a.textOpacityOverride!=null&&(p.textOpacityOverride=a.textOpacityOverride);a.windowColor!=null&&(p.windowColor=a.windowColor);a.windowColorOverride!=null&&(p.windowColorOverride=a.windowColorOverride);a.windowOpacity!=null&& (p.windowOpacity=a.windowOpacity);a.windowOpacityOverride!=null&&(p.windowOpacityOverride=a.windowOpacityOverride);return p}; g.L.Ya=function(p,a){var l={};Object.assign(l,WnW());Object.assign(l,p);MaW(this,l,a);this.player.EE("captionssettingschanged")}; g.L.O_=function(){!this.W&&this.loaded&&(g.Re(this.w7,function(p,a){p.dispose();delete this.w7[a]},this),this.xa())}; g.L.jE=function(p,a){switch(p){case "fontSize":if(isNaN(a))break;p=g.Lu(a,-2,4);this.Ya({fontSizeIncrement:p});return p;case "reload":a&&!this.W&&TP(this,this.S,!0);break;case "stickyLoading":a!==void 0&&this.Y.Z&&(g.Z0(this.Y)?zP(this,!!a):H_(this,!!a));break;case "track":return EJ8(this,a);case "tracklist":return this.L?g.lb(g.Rv(this.L.S,!(!a||!a.includeAsr)),function(l){return g.Xp(l)}):[]; case "translationLanguages":return this.L?this.L.W.map(function(l){return Object.assign({},l)}):[]; case "sampleSubtitles":this.W||a===void 0||mhW(this,!!a);break;case "sampleSubtitlesCustomized":this.W||mhW(this,!!a,a);break;case "recommendedTranslationLanguages":return g.Irq();case "defaultTranslationSourceTrackIndices":return this.L?this.L.Z:[]}}; g.L.getOptions=function(){var p="reload fontSize track tracklist translationLanguages sampleSubtitle".split(" ");this.Y.Z&&p.push("stickyLoading");return p}; g.L.M8=function(){var p=this.S;if(this.B.mC("captions")){if(this.Y.D("html5_modify_caption_vss_logging")){var a;return(p=(a=this.videoData.E3)!=null?a:null)?{cc:g.XMB(p)}:{}}if(p)return a=p.vssId,p.translationLanguage&&a&&(a="t"+a+"."+g.sG(p)),{cc:a}}return{}}; g.L.Egm=function(){this.isSubtitlesOn()?(g.Z0(this.Y)?zP(this,!1):H_(this,!1),rdG(this),TP(this,null,!0)):this.v5()}; g.L.v5=function(){var p=UP(this)||!this.S?gY(this,!0):this.S;p&&this.Cq(p.vssId,"m");this.isSubtitlesOn()||TP(this,UP(this)||!this.S?gY(this,!0):this.S,!0)}; g.L.isSubtitlesOn=function(){return!!this.loaded&&!!this.S&&!UP(this)}; g.L.WSc=function(){var p=UP(this);W_(this,p)?TP(this,this.getAudioTrack().L,!1):this.videoData.captionTracks.length&&(this.loaded&&this.unload(),this.jZ()&&(this.Z=!1,this.S=null,this.L&&(this.L.dispose(),this.L=null)),this.oD()&&(p?TP(this,gY(this,!1),!1):this.load()))}; g.L.K4=function(p){p&&(this.Xu={top:p.top,right:p.right,bottom:p.bottom,left:p.left,width:1-p.left-p.right,height:1-p.top-p.bottom},this.K.element.style.top=this.Xu.top*100+"%",this.K.element.style.left=this.Xu.left*100+"%",this.K.element.style.width=this.Xu.width*100+"%",this.K.element.style.height=this.Xu.height*100+"%",this.K.element.style.position="absolute",p=pZW(this))&&(this.K.element.style.width=p.width+"px",this.K.element.style.height=p.height+"px")}; g.L.onVideoDataChange=function(p,a){p==="newdata"&&(this.videoData=a,this.loaded&&this.unload(),this.Z=!1,this.S=null,this.L&&(this.L.dispose(),this.L=null,this.player.EE("captionschanged",{})),this.oD()&&this.load())}; g.L.getAudioTrack=function(){return this.player.getAudioTrack()}; g.L.LBl=function(){var p=this.B.F7();p&&!p.Gm()&&p.HC();this.B.isFullscreen()?(this.W=this.Kz=!0,this.loaded&&this.q0()):(this.Kz=this.Y.controlsType==="3",this.W=Vcl(this));TP(this,this.S)}; g.L.XC=function(){var p,a,l,y=(p=this.videoData.getPlayerResponse())==null?void 0:(a=p.captions)==null?void 0:(l=a.playerCaptionsTracklistRenderer)==null?void 0:l.openTranscriptCommand;y&&this.player.xv("innertubeCommand",y)}; g.L.VT=function(p,a,l){var y=/&|,|:|;|(\n)|(\s)|(\/)|(\\)/gm,S="";p&&(S=p.vssId,S=S.replace(y,""));var n="";p&&p.getId()&&(n=p.getId()||"");p&&p.getXtags()&&(p=p.getXtags(),p=p.replace(y,""),n=n.concat(";"+p));this.B.VT(a?S:"",a?n:"",l)}; g.L.Cq=function(p,a){p=(p||"").replace(/&|,|:|;|(\n)|(\s)|(\/)|(\\)/gm,"");p.length>0&&this.B.Cq(p,a)};g.Qg("captions",H7U);})(_yt_player);