(function(g){var window=this;'use strict';var Cdb=function(a,b,c){var d;g.J(function(e){switch(e.j){case 1:var f=b;a.W.L("web_player_pt_tt")?(f=g.Sq(f).exp||"",f=f.includes("xpv")||f.includes("xpe")):f=!1;if(!f){e.Ha(2);break}if(a.videoData.mw){e.Ha(3);break}g.wa(e,4);return g.G(e,a.D.promise,6);case 6:g.xa(e,3);break;case 4:return g.ya(e),e.return();case 3:d={potc:"1",pot:a.videoData.mw},b=g.Tq(b,d);case 2:a.j=g.mr(b,c),g.va(e)}})},h3=function(a){a.isActive()||a.start()},Ddb=function(a,b){return b?a.captionsInitialState:"CAPTIONS_INITIAL_STATE_UNKNOWN"}, Edb=function(a,b){var c=new g.aP; c.languageCode=a.languageCode;c.languageName=a.languageName;c.name=a.name;c.displayName=a.displayName;c.kind=a.kind;c.isDefault=!1;c.j=a.j;c.isTranslateable=a.isTranslateable;c.vssId=a.vssId;c.url=a.url;c.translationLanguage=b;a.xtags&&(c.xtags=a.xtags);a.captionId&&(c.captionId=a.captionId);return c},Fdb=function(a,b){var c,d,e; return g.J(function(f){if(f.j==1)return c=a+"|"+b,g.G(f,g.Nt(),2);if(f.j!=3){d=f.B;if(!d)throw g.it("gct");return g.G(f,g.sP(d),3)}e=f.B;return f.return(e.get("captions",c))})},Gdb=function(a,b,c){Fdb(a,b).then(function(d){d&&c(d.trackData,new g.aP(d.metadata))})},Jdb=function(a){if(!Hdb.test(a))throw Error("'"+a+"' is not a valid hex color"); a.length==4&&(a=a.replace(Idb,"#$1$1$2$2$3$3"));a=a.toLowerCase();a=parseInt(a.slice(1),16);return[a>>16,a>>8&255,a&255]},Kdb=function(){return g.vs("yt-player-caption-display-settings")},i3=function(){this.segments=[]},Ldb=function(a,b){var c=g.Yb(a.segments,b); c>=0||c<0&&(-c-1)%2===1||(c=-c-1,c>0&&b-a.segments[c-1]===1&&c0&&b-a.segments[c-1]===1?a.segments[c-1]=b:c0?d.postBody=g.kK(e,g.TK):d.postBody=(0,g.YX)([120,0])}a.G&&(d.responseType="arraybuffer");a.C=g.qr(c,d,3,100).then(function(f){a:{f=f.xhr;a.La();if(a.B){var h=!(a.G?f.response:f.responseText)||f.status>=400,l=g.MHa(f);if(l){f=g.HM(a.B,a.policy,{});a.B.Gl(f,l);Odb(a,a.B);break a}h?a.player.oa("capfail",{status:f.status}):(a.player.Yh().xg("fcb_r"), l=a.B.gb[0].Pa,a.Z!=null&&a.K!==l&&(h=a.B.gb[0],a.G?a.Z(f.response,(h.startTime+a.player.Dc())*1E3):a.Z(f.responseText,(h.startTime+a.player.Dc())*1E3),a.K=l))}a.B=null;a.C=null}}).Xk(function(f){a.B=null; a.C=null;var h;a.player.oa("capfail",{status:(h=f.xhr)==null?void 0:h.status})}); a.B=b;Ldb(a.D,a.B.gb[0].Pa)},j3=function(a,b){g.VT.call(this,b.U()); this.j=a;this.J=b;this.C=null;this.K=!1;this.N=g.gC(this.J.U())&&!this.j.isManifestless},Qdb=function(a,b){var c=[],d; for(d in a.j.j)if(a.j.j.hasOwnProperty(d)){var e=a.j.j[d];if(g.cU(e,b||null)){var f=e.info.id,h=f,l="."+f,m="",n="",p="";if(e=e.info.captionTrack)f=e.languageCode,h=e.displayName,l=e.vssId,m=e.kind,a.J.U().L("html5_expose_xtags_through_caption_track")&&(n=e.xtags),p=e.id;else{e=f;var q=g.Cbb.get(e);q==null&&(q=Pdb[e]||Pdb[e.replace(/-/g,"_")],g.Cbb.set(e,q));h=q||h}c.push(new g.aP({id:d,languageCode:f,languageName:h,is_servable:!0,is_default:!0,is_translateable:!1,vss_id:l,kind:m,xtags:n,captionId:p}))}}return c}, Rdb=function(a,b){return b!=null&&b in a.j.j?a.j.j[b]:null},Sdb=function(a,b,c){var d=[],e; for(e in a.j.j)if(a.j.j.hasOwnProperty(e)){var f=a.j.j[e];if(g.cU(f,c||null)){var h=f.info.captionTrack;h&&h.languageCode===b&&d.push(f)}}return d.length?d[0]:null},Tdb=function(){var a=void 0; a=a===void 0?{}:a;var b="suggest_correction"in g.Pbb?g.Pbb.suggest_correction:"Edit caption";b=b||"";var c={},d;for(d in a){c={WF:c.WF};c.WF=d;var e=function(f){return function(){return String(a[f.WF])}}(c); b=b.replace(new RegExp("\\$\\{"+c.WF+"\\}","gi"),e);b=b.replace(new RegExp("\\$"+c.WF,"gi"),e)}return b},k3=function(a,b,c,d,e,f,h,l,m,n){var p=n.isInline()&&!0,q={}; Object.assign(q,b);Object.assign(q,a.params);Object.assign(q,c);var r={};Object.assign(r,b.Qe);a.params.Qe&&Object.assign(r,a.params.Qe);Object.assign(r,c.Qe);p&&(q.windowOpacity=.6,r.backgroundOpacity=0);q.Qe=r;var t=q.Ri===1,u=[{I:"span",S:"captions-text",X:{style:"word-wrap: normal; display: block;"}}],y,A,D;(l=l.kb("caption_edit_on_hover")&&((y=n.getVideoData().getPlayerResponse())==null?void 0:(A=y.captions)==null?void 0:(D=A.playerCaptionsTracklistRenderer)==null?void 0:D.openTranscriptCommand))&& u.unshift({I:"button",S:"caption-edit",X:{tabindex:"0","aria-label":Tdb()},V:[{I:"svg",X:{fill:"#e3e3e3",height:"100%",viewBox:"5 5 38 38",width:"100%"},V:[{I:"path",X:{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.U.call(this,{I:"div",S:"caption-window",X:{id:"caption-window-"+a.id,dir:t?"rtl":"ltr",tabindex:"0",lang:q.lang},V:u});var F= this;this.K=[];this.Ga=!1;this.B=a;this.Ka=this.Ma=null;this.playerWidth=f;this.playerHeight=h;this.N=null;this.maxWidth=f*.96;this.maxHeight=h*.96;this.j=q;this.yc=c;this.ra=b;this.D=this.Ea("captions-text");this.Ob=this.D.style.getPropertyValue("box-decoration-break")!==""||this.D.style.getPropertyValue("-webkit-box-decoration-break")!=="";this.Va=Udb(d,e,f,h);this.wc=m;l&&(this.G=this.Ea("caption-edit"),this.T(this.G,"click",function(){F.wc()})); this.type=0;this.Ya=this.Va*Vdb(r);this.Ab=p;a=new g.fT(this.element,!0);g.P(this,a);a.subscribe("dragstart",this.I6,this);a.subscribe("dragmove",this.H6,this);a.subscribe("dragend",this.F6,this);this.fb=this.Xa=this.yb=this.ob=0;a="";this.j.windowOpacity&&(a=Jdb(this.j.windowColor),a="rgba("+a[0]+","+a[1]+","+a[2]+","+this.j.windowOpacity+")");b={"background-color":a,display:this.j.isVisible===!1?"none":"","text-align":Wdb[this.j.textAlign]};this.Ob&&(b["border-radius"]=a?this.Ya/8+"px":"");(this.C= this.B.params.Ri===2||this.B.params.Ri===3)&&Xdb(this,this.element);g.Vl(this.element,b);if(p){var H;(H=this.element.parentElement)==null||H.style.setProperty("--caption-window-color",a)}switch(this.j.Cm){case 0:case 1:case 2:g.To(this.element,"ytp-caption-window-top");break;case 6:case 7:case 8:g.To(this.element,"ytp-caption-window-bottom")}},Xdb=function(a,b){var c="vertical-rl"; a.j.gU===1&&(c="vertical-lr");g.Xl&&(c=c==="vertical-lr"?"tb-lr":"tb-rl");g.Vl(b,"-o-writing-mode",c);g.Vl(b,"-webkit-writing-mode",c);g.Vl(b,"writing-mode",c);g.Vl(b,"text-orientation","upright");g.To(b,"ytp-vertical-caption");a.B.params.Ri===3&&(g.Vl(b,"text-orientation",""),g.Vl(b,"transform","rotate(180deg)"))},Vdb=function(a){var b=1+.25*(a.fontSizeIncrement||0); if(a.offset===0||a.offset===2)b*=.8;return b},Ydb=function(a,b){var c={},d=b.background?b.background:a.j.Qe.background; if(b.backgroundOpacity!=null||b.background){var e=b.backgroundOpacity!=null?b.backgroundOpacity:a.j.Qe.backgroundOpacity;d=Jdb(d);c.background="rgba("+d[0]+","+d[1]+","+d[2]+","+e+")";a.Ob&&(c["box-decoration-break"]="clone",c["border-radius"]=a.Ya/8+"px")}if(b.fontSizeIncrement!=null||b.offset!=null)c["font-size"]=a.Va*Vdb(b)+"px";d=1;e=b.color||a.j.Qe.color;if(b.color||b.textOpacity!=null)e=Jdb(e),d=b.textOpacity==null?a.j.Qe.textOpacity:b.textOpacity,e="rgba("+e[0]+","+e[1]+","+e[2]+","+d+")", c.color=e,c.fill=e;var f=b.charEdgeStyle;f===0&&(f=void 0);if(f){e="rgba(34, 34, 34, "+d+")";var h="rgba(204, 204, 204, "+d+")";b.LO&&(h=e=b.LO);var l=a.Va/16/2,m=Math.max(l,1),n=Math.max(2*l,1),p=Math.max(3*l,1),q=Math.max(5*l,1);d=[];switch(f){case 4:for(;p<=q;p+=l)d.push(n+"px "+n+"px "+p+"px "+e);break;case 1:n=window.devicePixelRatio>=2?.5:1;for(f=m;f<=p;f+=n)d.push(f+"px "+f+"px "+e);break;case 2:d.push(m+"px "+m+"px "+h);d.push("-"+m+"px -"+m+"px "+e);break;case 3:for(p=0;p<5;p++)d.push("0 0 "+ n+"px "+e)}c["text-shadow"]=d.join(", ")}e="";switch(b.fontFamily){case 1:e='"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace';break;case 2:e='"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif';break;case 3:e='"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace';break;case 5:e='"Comic Sans MS", Impact, Handlee, fantasy';break;case 6:e='"Monotype Corsiva", "URW Chancery L", "Apple Chancery", "Dancing Script", cursive';break;case 7:e=g.Dr()? '"Carrois Gothic SC", sans-serif-smallcaps':'Arial, Helvetica, Verdana, "Marcellus SC", sans-serif';break;case 0:case 4:e='"YouTube Noto", Roboto, Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif'}e&&(c["font-family"]=e);e=b.offset;e==null&&(e=a.j.Qe.offset);switch(e){case 0:c["vertical-align"]="sub";break;case 2:c["vertical-align"]="super"}b.fontFamily===7&&(c["font-variant"]="small-caps");b.bold&&(c["font-weight"]="bold");b.italic&&(c["font-style"]="italic");b.underline&&(c["text-decoration"]= "underline");b.X9&&(c.visibility="hidden");b.nZ===1&&a.C&&(c["text-combine-upright"]="all",c["text-orientation"]="mixed",e=g.NO||g.gt,a.B.params.Ri===3?c.transform=e?"rotate(90deg)":"rotate(180deg)":e&&(c.transform="rotate(-90deg)"));if(b.Zo===1||b.Zo===2||b.Zo===3||b.Zo===4||b.Zo===5)if(g.NO)c["font-weight"]="bold";else switch(c["text-emphasis-style"]="filled circle",c["text-emphasis-color"]="currentcolor",c["webkit-text-emphasis"]="filled circle",b.Zo){case 4:case 3:c["text-emphasis-position"]= "under left";c["webkit-text-emphasis-position"]="under left";break;case 5:case 2:c["text-emphasis-position"]="over right",c["webkit-text-emphasis-position"]="over right"}return c},l3=function(a){a=a.split("px"); return a.length>0?(a=Number(a[0]))?a:0:0},Zdb=function(a){a.N=g.he("SPAN"); g.Vl(a.N,{display:"block"});g.To(a.N,"caption-visual-line");a.D.appendChild(a.N)},$db=function(a,b){var c=g.he("SPAN"); g.Vl(c,{display:"inline-block","white-space":"pre-wrap"});g.Vl(c,Ydb(a,b));c.classList.add("ytp-caption-segment");a.N.appendChild(c);c.previousElementSibling&&(g.Vl(c.previousElementSibling,{"border-top-right-radius":"0","border-bottom-right-radius":"0"}),g.Vl(c,{"border-top-left-radius":"0","border-bottom-left-radius":"0"}));return c},aeb=function(a,b,c){a.Ga=a.Ga||!!c; var d={};Object.assign(d,a.j.Qe);Object.assign(d,c||b.j);Object.assign(d,a.yc.Qe);(c=!a.N)&&Zdb(a);for(var e=a.Ma&&a.Ka&&g.Dc(d,a.Ka)?a.Ma:$db(a,d),f=typeof b.text==="string",h=f?b.text.split("\n"):[b.text],l=0;l0||!b.append,n=h[l];m&&!c?(Zdb(a),e=$db(a,d)):m&&c&&(c=!1);n&&(e.appendChild(f?g.ie(n):n),f||n.tagName!=="RUBY"||n.childElementCount!==4||g.NO||!g.Yl(n.children[2],"text-emphasis")||(m=a.C?"padding-right":"padding-top",g.Yl(n.children[2],"text-emphasis-position")&&(m= a.C?"padding-left":"padding-bottom"),g.lc?g.Vl(e,m,"1em"):g.Vl(e,m,"0.5em")))}a.Ka=d;a.Ma=e;a.K.push(b)},Udb=function(a,b,c,d){var e=b/360*16; b>=a&&(a=640,d>c*1.3&&(a=480),e=c/a*16);return e},ceb=function(){this.C=this.time=this.mode=this.B=0; this.D=new beb(this);this.G=new beb(this);this.j=[];this.clear()},eeb=function(a,b,c){if(a===255&&b===255||!a&&!b)return{Iw:a, Et:b,result:0};a=deb[a];b=deb[b];if(a&128){var d;if(d=!(b&128))d=b,d=c.ue()&&c.Et===d;if(d)return{Iw:a,Et:b,result:1}}else if(b&128&&1<=a&&a<=31)return{Iw:a,Et:b,result:2};return{Iw:a,Et:b,result:3}},geb=function(a,b,c,d){b===255&&c===255||!b&&!c?(++a.C===45&&a.reset(),a.D.B.clear(),a.G.B.clear()):(a.C=0,feb(a.D,b,c,d))},heb=function(a,b){a.j.sort(function(e,f){var h=e.time-f.time; return h===0?e.order-f.order:h}); for(var c=g.w(a.j),d=c.next();!d.done;d=c.next())d=d.value,a.time=d.time,d.type===0?geb(a,d.mX,d.nX,b):d.type===1&&a.B&496&&feb(a.G,d.mX,d.nX,b);a.j.length=0},m3=function(){this.type=0},n3=function(){this.state=this.Et=this.Iw=0},ieb=function(){this.timestamp=this.j=0},o3=function(a){this.D=a; this.B=[];this.j=this.col=this.row=0;this.style=new m3;for(a=this.C=0;a<=15;a++){this.B[a]=[];for(var b=0;b<=32;b++)this.B[a][b]=new ieb}},p3=function(a,b){if(a.style.type===3){for(var c=0,d=0,e=a.D.time+0,f="",h="",l=e,m=1;m<=15;++m){for(var n=!1,p=d?d:1;p<=32;++p){var q=a.B[m][p]; if(q.j!==0){c===0&&(c=m,d=p);n=String.fromCharCode(q.j);var r=q.timestamp;r=2&&a.col>1&&(--a.col,q3(a).j=0); var d=q3(a);d.timestamp=a.D.time+0;d.j=Eeb(b,c);a.col<32&&a.col++},Feb=function(a,b,c,d){for(var e=0;e0?a.j:1; a.col=1;s3(a,0,15)},Heb=function(a){this.C=a; this.G=0;this.style=new m3;this.K=new o3(this.C);this.N=new o3(this.C);this.text=new o3(this.C);this.B=this.K;this.D=this.N;this.j=this.B},Ieb=function(a,b,c){var d=a.B,e=!1; switch(a.style.get()){case 4:case 1:case 2:a.style.get()===4&&d.j>0||(p3(d,c),Geb(a.B),Geb(a.D),d.row=15,d.j=b,e=!0)}a.style.set(3);a.j=d;a.j.style=a.style;a.C.mode=1<b?(p3(d,c),s3(d,d.row-d.j,b)):d.row>5&1]; a=c&16?((c&14)>>1)*4:0;c=b.j;switch(b.style.get()){case 4:d=c.row;break;case 3:if(d!==c.row){if(d0&&(b+=f,e-=f)):(f=f+e-h,f>0&&(e-=f));s3(c,b,e)}}c.row=d;c.col=a+1}else switch(e&7){case 1:switch(c&112){case 32:r3(b.j,0,32);break a;case 48:c===57?(d=b.j,q3(d).j=0,d.col<32&&d.col++):r3(b.j,1,c&15)}break;case 2:c&32&&r3(b.j,2,c&31);break;case 3:c&32&&r3(b.j,3,c&31);break;case 4:case 5:if(32<=c&&c<=47)switch(c){case 32:Jeb(b); break;case 33:d=b.j;d.col>1&&(--d.col,q3(d).j=0);break;case 36:d=b.j;b=q3(d);for(a=0;a<=15;a++)for(c=0;c<=32;c++)if(d.B[a][c]===b){for(;c<=32;c++)d.B[a][c].reset();break}break;case 37:Ieb(b,2,d);break;case 38:Ieb(b,3,d);break;case 39:Ieb(b,4,d);break;case 40:r3(b.j,0,32);break;case 41:b.style.set(2);b.j=b.B;b.j.j=0;b.j.style=b.style;b.C.mode=1<32&&(d.col=32)}}},Leb=function(){},t3=function(a,b,c,d,e,f,h){f=f===void 0?!1:f; h=h===void 0?null:h;g.LC.call(this,a,a+b,{priority:c,namespace:"captions"});this.windowId=d;this.text=e;this.append=f;this.j=h},Neb=function(a,b,c,d,e,f,h){var l=f[0],m=h[l.getAttribute("p")]; if(m.gg===1){var n=f[1],p=f[2];f=f[3];l.getAttribute("t");n.getAttribute("t");p.getAttribute("t");f.getAttribute("t");l.getAttribute("p");n.getAttribute("p");f.getAttribute("p");h=h[p.getAttribute("p")];l=Meb(l.textContent,n.textContent,p.textContent,f.textContent,h);return new t3(a,b,e,c,l,d,m)}switch(m.gg){case 9:case 10:m.Zo=1;break;case 11:m.Zo=2;break;case 12:m.Zo=3;break;case 13:m.Zo=4;break;case 14:m.Zo=5}return new t3(a,b,e,c,l.textContent||"",d,m)},Meb=function(a,b,c,d,e){var f=g.Dr(),h= f?g.he("DIV"):g.he("RUBY"),l=g.he("SPAN"); l.textContent=a;h.appendChild(l);a=f?g.he("DIV"):g.he("RP");a.textContent=b;h.appendChild(a);b=f?g.he("DIV"):g.he("RT");b.textContent=c;h.appendChild(b);c=e.gg;if(c===10||c===11||c===12||c===13||c===14)if(g.Vl(b,"text-emphasis-style","filled circle"),g.Vl(b,"text-emphasis-color","currentcolor"),g.Vl(b,"webkit-text-emphasis","filled circle"),e.gg===11||e.gg===13)g.Vl(b,"webkit-text-emphasis-position","under left"),g.Vl(b,"text-emphasis-position","under left");c=!0;if(e.gg===4||e.gg===7||e.gg===12|| e.gg===14)g.Vl(h,"ruby-position","over"),g.Vl(h,"-webkit-ruby-position","before");else if(e.gg===5||e.gg===6||e.gg===11||e.gg===13)g.Vl(h,"ruby-position","under"),g.Vl(h,"-webkit-ruby-position","after"),c=!1;e=f?g.he("DIV"):g.he("RP");e.textContent=d;h.appendChild(e);f&&(d=c,g.Vl(h,{display:"inline-block",position:"relative"}),f=h.firstElementChild.nextElementSibling,g.Vl(f,"display","none"),f=f.nextElementSibling,g.Vl(f,{"font-size":"0.5em","line-height":"1.2em","text-align":"center",position:"absolute", left:"50%",transform:"translateX(-50%)",width:"400%"}),g.Vl(h.lastElementChild,"display","none"),d?(g.Vl(h,"padding-top","0.6em"),g.Vl(f,"top","0")):(g.Vl(h,"padding-bottom","0.6em"),g.Vl(f,"bottom","0")));return h},u3=function(){g.O.apply(this,arguments)},v3=function(a,b,c,d,e){g.LC.call(this,a,a+b,{priority:c, namespace:"captions"});this.id=d;this.params=e;this.j=[]},Oeb=function(a){var b="_"+w3++; return new v3(0,0x8000000000000,0,b,a)},x3=function(a){u3.call(this); this.C=a;this.pens={};this.N={};this.Z={};this.D="_"+w3++;this.K={};this.B=this.j=null;this.G=!0},y3=function(a,b){a=a.getAttribute(b); if(a!=null)return Number(a)},z3=function(a,b){a=a.getAttribute(b); if(a!=null)return a==="1"},A3=function(a,b){a=y3(a,b); return a!==void 0?a:null},C3=function(a,b){a=a.getAttribute(b); if(a!=null)return B3.test(a),a},Peb=function(a,b){var c={},d=b.getAttribute("ws"); Object.assign(c,d?a.Z[d]:a.C);a=A3(b,"mh");a!=null&&(c.sB=a);a=A3(b,"ju");a!=null&&(c.textAlign=a);a=A3(b,"pd");a!=null&&(c.Ri=a);a=A3(b,"sd");a!=null&&(c.gU=a);a=C3(b,"wfc");a!=null&&(c.windowColor=a);b=y3(b,"wfo");b!==void 0&&(c.windowOpacity=b/255);return c},Qeb=function(a,b){var c={},d=b.getAttribute("wp"); d&&Object.assign(c,a.N[d]);a=A3(b,"ap");a!=null&&(c.Cm=a);a=y3(b,"cc");a!=null&&(c.It=a);a=y3(b,"ah");a!=null&&(c.Gk=a);a=y3(b,"rc");a!=null&&(c.Hs=a);b=y3(b,"av");b!=null&&(c.gp=b);return c},Reb=function(a,b,c,d){var e={}; Object.assign(e,Qeb(a,b));Object.assign(e,Peb(a,b));d?g.Dc(e,a.C)?(d=a.D,e=a.C):d="_"+w3++:d=b.getAttribute("id")||"_"+w3++;a=y3(b,"t")+c;b=y3(b,"d")||0x8000000000000;if(e.Ri===2||e.Ri===3)c=e.Hs,e.Hs=e.It,e.It=c;return new v3(a,b,0,d,e)},D3=function(a){u3.call(this); this.G=a;this.j=new Map;this.C=new Map;this.D=new Map;this.B=new Map},E3=function(a){a=g.Bd(Math.round(a),0,16777215).toString(16).toUpperCase(); return"#000000".substr(0,7-a.length)+a},Seb=function(a,b,c,d,e){d===0&&(d=0x8000000000000); var f={};b.wpWinPosId&&Object.assign(f,a.C.get(b.wpWinPosId));b.wsWinStyleId&&Object.assign(f,a.D.get(b.wsWinStyleId));a=b.rcRowCount;a!==void 0&&(f.Hs=a);b=b.ccColCount;b!==void 0&&(f.It=b);if(f.Ri===2||f.Ri===3)b=f.Hs,f.Hs=f.It,f.It=b;return new v3(c,d,0,e,f)},F3=function(a,b,c,d){g.VT.call(this,a); this.videoData=b;this.audioTrack=c;this.Ua=d;this.G=b.hw},G3=function(a,b,c,d,e,f,h,l,m,n){k3.call(this,a,b,c,d,e,f,h,l,m,n); this.type=1},H3=function(a,b,c){this.trackData=a; this.K=c;this.version=this.G=this.C=this.byteOffset=0;this.j=new DataView(this.trackData);this.B=[]},I3=function(a){var b=a.byteOffset; a.byteOffset+=1;return a.j.getUint8(b)},J3=function(a){var b=a.byteOffset; a.byteOffset+=4;return a.j.getUint32(b)},K3=function(a,b){u3.call(this); this.B=a;this.C=b;this.track=this.C.languageName==="CC3"?4:0;this.j=new ceb;this.j.B=1<1)return!1;I3(a);I3(a);I3(a);return!0},L3=function(a,b,c,d,e,f,h,l,m,n){k3.call(this,a,b,c,d,e,f,h,l,m,n); var p=this;this.type=2;this.Aa=[];this.qa=this.Y=this.Ra=0;this.Fa=NaN;this.Kb=0;this.Tb=null;this.Wa=new g.Lo(this.Wba,433,this);this.G&&(n.createClientVe(this.G,this,167342),this.T(this.G,"click",function(){n.logClick(p.G)}),a=new g.fT(this.element,!0),g.P(this,a),a.subscribe("hoverstart",function(){n.logVisibility(p.G,!0)},this)); g.To(this.element,"ytp-caption-window-rollup");g.P(this,this.Wa);g.Vl(this.element,"overflow","hidden")},Veb=function(a,b){if(!b)return""; a.C&&a.B.params.gU!==1&&(b*=-1);return"translate"+(a.C?"X":"Y")+"("+b+"px)"},Web=function(a){a.Aa=Array.from(document.getElementsByClassName("caption-visual-line")); for(var b=a.B.params.Hs,c=0,d=0,e=a.Aa.length-1;c-1;){var f=a.Aa[e];d+=a.C?f.offsetWidth:f.offsetHeight;c++;e--}a.Y=d;b=Math;c=b.max;isNaN(a.Fa)&&((d=a.j.It)?(e=g.he("SPAN"),g.qe(e,"\u2013".repeat(d)),g.Vl(e,Ydb(a,a.j.Qe)),a.D.appendChild(e),a.Fa=e.offsetWidth,a.D.removeChild(e)):a.Fa=0);d=a.D;a.qa=c.call(b,a.Fa,a.Kb,(a.C?d.offsetHeight:d.offsetWidth)+1)},Xeb=function(a,b){Web(a); var c=a.Aa.reduce(function(f,h){return(a.C?h.offsetWidth:h.offsetHeight)+f},0); c=a.Y-c;if(c!==a.Ra){var d=c>0&&a.Ra===0,e=c0,g.Bc(l)?void 0:l),m.push(p),e.j.push(p);else{var q={};Object.assign(q,l);Yeb(a,b,c,d,e,!0,p,q,m)}}},Zeb=function(a){var b=a.split(":"); a=0;b=g.w(b);for(var c=b.next();!c.done;c=b.next())a=a*60+Number(c.value);return a*1E3},$eb=function(a,b,c,d){d=Object.assign({sB:0},d); return new v3(a,b,c,"_"+w3++,d)},N3=function(a,b){g.O.call(this); this.J=a;this.W=b;this.j=null;this.B=this.J.rA()},afb=function(a){if(typeof a==="string"||Ueb(a))return a; var b=new DataView(a);if(b.byteLength<=8||b.getUint32(4)!==1718909296)return"";b=g.ML(b,0,1835295092);if(!b||!b.size)return"";a=new Uint8Array(a,b.dataOffset,b.size-(b.dataOffset-b.offset));return g.PJ(a)},cfb=function(a,b,c){if(typeof b==="string"||Ueb(b))return[{trackData:b, aU:c}];var d=new DataView(b);if(d.byteLength<=8||d.getUint32(4)!==1718909296)return[];var e=g.JDa(d);if(a.B&&e){var f=g.BDa(e),h=g.CDa(e);e=e.nj;f&&e&&a.B.gI(e,f,h)}a=g.VL(d,1835295092);if(!a||!a.length||!a[0].size)return[];f=[];for(h=0;h1?1:0){case 1:return new G3(b,a.C,a.G,c.width,c.height,e,d,a.W.experiments,a.UN.bind(a),a.J);case 2:return new L3(b,a.C,a.G,c.width,c.height,e,d,a.W.experiments,a.UN.bind(a),a.J);default:return new k3(b,a.C,a.G,c.width,c.height,e, d,a.W.experiments,a.UN.bind(a),a.J)}},ifb=function(a,b,c){c=c===void 0?!1:c; var d=W3.Qe;a.C={};Object.assign(a.C,W3);a.C.Qe={};Object.assign(a.C.Qe,d);a.G={Qe:{}};var e=b.backgroundOverride?a.G:a.C,f=b.background||d.background;B3.test(f);e.Qe.background=f;e=b.colorOverride?a.G:a.C;f=b.color||d.color;B3.test(f);e.Qe.color=f;e=b.windowColorOverride?a.G:a.C;f=b.windowColor||W3.windowColor;B3.test(f);e.windowColor=f;e=b.backgroundOpacityOverride?a.G:a.C;f=b.backgroundOpacity;f==null&&(f=d.backgroundOpacity);e.Qe.backgroundOpacity=f;e=b.fontSizeIncrementOverride?a.G:a.C;f=b.fontSizeIncrement; f==null&&(f=d.fontSizeIncrement);e.Qe.fontSizeIncrement=f;f=b.fontStyleOverride?a.G:a.C;e=b.fontStyle;e==null&&(e=d.bold&&d.italic?3:d.bold?1:d.italic?2:0);f=f.Qe;switch(e){case 1:f.bold=!0;delete f.italic;break;case 2:delete f.bold;f.italic=!0;break;case 3:f.bold=!0;f.italic=!0;break;default:delete f.bold,delete f.italic}e=b.textOpacityOverride?a.G:a.C;f=b.textOpacity;f==null&&(f=d.textOpacity);e.Qe.textOpacity=f;e=b.windowOpacityOverride?a.G:a.C;f=b.windowOpacity;f==null&&(f=W3.windowOpacity);e.windowOpacity= f;e=b.charEdgeStyleOverride?a.G:a.C;f=b.charEdgeStyle;f==null&&(f=d.charEdgeStyle);e.Qe.charEdgeStyle=f;e=b.fontFamilyOverride?a.G:a.C;f=b.fontFamily;f==null&&(f=d.fontFamily);e.Qe.fontFamily=f;a.loaded&&a.uU();c&&g.us("yt-player-caption-display-settings",b,2592E3)},vfb=function(a,b,c){b&&!a.Y?(b=Oeb({Ri:0, lang:"en"}),a.Y=[b,new t3(b.start,b.end-b.start,0,b.id,c!=null?c:"Captions look like this")],a.player.mf(a.Y)):!b&&a.Y&&(ufb(a,a.Y),a.Y=null)},ufb=function(a,b){a.player.Xo(b); b=g.w(b);for(var c=b.next();!c.done;c=b.next())g.Qb(a.Ga,c.value);h3(a.Ma)},qfb=function(a,b){a.W.L("html5_modify_caption_vss_logging")&&(a.videoData.MD=b)},tfb=function(a){var b=a.yb.getVideoContentRect(!0).height,c=a.yb.getVideoContentRect(!0).width; if(!b||!c)return null;b*=a.ra.height;c*=a.ra.width;return{width:c,height:b}},V3=function(a,b){if(a.storage)try{a.storage.set("module-enabled",b)}catch(c){}},U3=function(a,b){a.J.isInline()||g.us("yt-player-sticky-caption",b,2592E3)},jfb=function(a){if(!a.J.isInline())return g.vs("yt-player-sticky-caption")},hfb=function(a){var b,c=!((b=a.J.Le())==null||!b.VH()); return a.Wa&&c&&!a.Xa},nfb=function(a){return a.W.L("web_deprecate_always_includes_asr_setting")&&g.KO(a.W)?!0:!!g.Cs(g.Bs(),66)}; g.RW.prototype.hF=g.da(51,function(a){var b=2;this.K.has(a)?b=0:g.lUa(this,a)&&(b=1);return b}); g.wZ.prototype.hF=g.da(50,function(a){return this.bd.hF(a)}); g.RW.prototype.gI=g.da(49,function(a,b,c){this.Ma.set(a,{Ot:b,Bz:c})}); g.wZ.prototype.gI=g.da(48,function(a,b,c){this.bd.gI(a,b,c)}); g.VT.prototype.OS=g.da(47,function(){return!1}); g.VT.prototype.Iu=g.da(46,function(){}); g.WT.prototype.Iu=g.da(45,function(a,b,c){var d=this;this.La();b=this.nx(a,b);this.Xs();Cdb(this,b,{format:"RAW",onSuccess:function(e){d.j=null;c(e.responseText,a)}, withCredentials:!0})}); g.dU.prototype.Iu=g.da(44,function(a,b,c){var d=this;this.La();b=this.nx(a,b);this.Xs();this.j=g.mr(b,{format:"RAW",onSuccess:function(e){d.j=null;c(e.responseText,a)}, withCredentials:!0})}); g.qT.prototype.Nz=g.da(43,function(){for(var a=g.ae(document,"track",void 0,this.j),b=0;b=0||a<0&&(-a-1)%2===1}; i3.prototype.length=function(){return this.segments.length/2}; g.z(Mdb,g.O);g.k=Mdb.prototype;g.k.xa=function(){g.O.prototype.xa.call(this);this.C&&this.C.cancel()}; g.k.EB=function(){this.seekTo(this.player.getCurrentTime())}; g.k.seekTo=function(a){a-=this.player.Dc();var b=this.j;this.j=g.Jb(this.qa.Nr(a).gb);b!==this.j&&this.Y&&this.Y()}; g.k.reset=function(){this.D=new i3;this.K=-1;this.C&&(this.C.cancel(),this.C=null)}; g.k.h_=function(){this.La();var a;if(a=this.j!=null)a=this.j,a=a.j.vt(a);if(a&&!this.C&&!(this.j&&this.j.startTime-this.player.getCurrentTime()>30)){a=this.j;a=a.j.wD(a);var b=a.gb[0],c;if((c=this.player.getVideoData())==null?0:c.enableServerStitchedDai)if(c=this.player.rA()){var d=b.j.info.id,e=b.Pa,f=a.gb[0].Xe;if(this.policy.Ka){if(c=c.nK(f,e,d,3))a.D=c}else if(d=c.jA(f,e,d,3))if(c=c.hF(e),c===0)d&&(a.j=new g.qL(d));else if(c===2){this.N.start();Ndb(this)&&this.seekTo(this.player.getCurrentTime()); return}}b.j.index.qo(b.Pa)?(this.D.contains(a.gb[0].Pa)||Odb(this,a),this.j=g.Jb(a.gb)):Ndb(this)&&this.seekTo(this.player.getCurrentTime())}this.N.start()}; g.z(j3,g.VT);g.k=j3.prototype;g.k.Iu=function(a,b,c){var d=this;this.Xs();b=Rdb(this,a.getId());b||(b=a.languageCode,b=this.j.isManifestless?Sdb(this,b,"386"):Sdb(this,b));if(b){var e=(b.index.kK(b.index.Wn())-b.index.getStartTime(b.index.Wn()))*1E3,f=new g.ZT(this.W),h=function(){d.C&&d.C.reset();d.K=!0}; this.W.L("html5_keep_caption_data_after_seek")&&(h=null);this.C=new Mdb(f,this.J,b,function(l,m){c(l,a,m,e)},this.N||g.wE(b.info),h)}}; g.k.OS=function(){var a=this.K;this.K=!1;return a}; g.k.fB=function(a){var b=this.N?[new g.aP({id:"rawcc",languageCode:"rawcc",languageName:"CC1",is_servable:!0,is_default:!0,is_translateable:!1,vss_id:".en"}),new g.aP({id:"rawcc",languageCode:"rawcc",languageName:"CC3",is_servable:!0,is_default:!0,is_translateable:!1,vss_id:".en"})]:this.j.isManifestless?Qdb(this,"386"):Qdb(this);b=g.w(b);for(var c=b.next();!c.done;c=b.next())g.UT(this.B,c.value);a()}; g.k.Xs=function(){this.C&&(this.C.dispose(),this.C=null)}; g.k.nx=function(){return""}; var B3=/^#(?:[0-9a-f]{3}){1,2}$/i;var Wdb=["left","right","center","justify"];g.z(k3,g.U);g.k=k3.prototype;g.k.I6=function(a,b){this.Xa=a;this.fb=b;var c=g.em(this.element,this.element.parentElement);this.ob=a-c.x;this.yb=b-c.y}; g.k.H6=function(a,b){if(a!==this.Xa||b!==this.fb){g.So(this.element,"ytp-dragging")||g.To(this.element,"ytp-dragging");var c=g.mm(this.element);a=a-this.ob-.02*this.playerWidth;var d=b-this.yb-.02*this.playerHeight,e=(a+c.width/2)/this.maxWidth*3;e=Math.floor(g.Bd(e,0,2));var f=(d+c.height/2)/this.maxHeight*3;f=Math.floor(g.Bd(f,0,2));b=e+f*3;a=(a+e/2*c.width)/this.maxWidth;a=g.Bd(a,0,1)*100;c=(d+f/2*c.height)/this.maxHeight;c=g.Bd(c,0,1)*100;this.B.params.Cm=b;this.B.params.gp=c;this.B.params.Gk= a;this.B.params.isDefault=!1;this.j.Cm=b;this.j.gp=c;this.j.Gk=a;this.j.isDefault=!1;this.ra.Cm=b;this.ra.gp=c;this.ra.Gk=a;this.ra.isDefault=!1;this.M1()}}; g.k.F6=function(){g.Vo(this.element,"ytp-dragging")}; g.k.M1=function(){this.vC(this.K)}; g.k.getType=function(){return this.type}; g.k.vC=function(a){var b=this.Ab?0:Math.min(this.rY(),this.maxWidth),c=this.qY(),d=this.Ab;if(d){var e=getComputedStyle(this.D.parentNode);e=l3(e.borderLeftWidth)+l3(e.borderRightWidth)+l3(e.paddingLeft)+l3(e.paddingRight)}else e=0;var f=e;e="";this.B.params.Ri===3&&(e="rotate(180deg)");var h=d?"calc(96% - "+f+"px)":"96%";g.Vl(this.element,{top:0,left:0,right:"",bottom:"",width:b?b+"px":"",height:c?c+"px":"","max-width":h,"max-height":h,margin:"",transform:""});this.qO(a);e={transform:e,top:"",left:"", width:b?b+"px":"",height:c?c+"px":"","max-width":"","max-height":""};var l=this.j.Gk*.96+2;h=this.j.Cm;switch(h){case 0:case 3:case 6:(d=this.j.Qe.fontSizeIncrement)&&d>0&&this.j.Ri!==2&&this.j.Ri!==3&&(l=Math.max(l/(1+d*2),2));e.left=l+"%";break;case 1:case 4:case 7:e.left=l+"%";l=this.D.offsetWidth;b||l?(b=b||l+1,e.width=b+"px",e["margin-left"]=d?b/-2-f/2+"px":b/-2+"px"):e.transform+=" translateX(-50%)";break;case 2:case 5:case 8:e.right=100-l+"%"}d=this.j.gp*.96+2;switch(h){case 0:case 1:case 2:e.top= d+"%";break;case 3:case 4:case 5:e.top=d+"%";(c=c||this.element.clientHeight)?(e.height=c+"px",e["margin-top"]=c/-2+"px"):e.transform+=" translateY(-50%)";break;case 6:case 7:case 8:e.bottom=100-d+"%"}g.Vl(this.element,e);if(this.G){c=this.D.offsetHeight;d=1;for(b=0;bb)b=0,this.Ga=!1,this.K=[],this.N=this.Ka=this.Ma=null,g.me(this.D);for(;b10?l-1:l);a=A3(a,"hg");a!=null&&(h.nZ=a);f[c]=h;break;case "ws":c=a.getAttribute("id");this.Z[c]=Peb(this,a);break;case "wp":c=a.getAttribute("id"),this.N[c]=Qeb(this,a)}if(e){d=[];e=Array.from(e.childNodes);e=g.w(e);for(a=e.next();!a.done;a=e.next())if(a=a.value,a.nodeType===1)switch(a.tagName){case "w":this.j=Reb(this,a,b,!1);(a=this.K[this.j.id])&&a.end>this.j.start&&(a.end=this.j.start);this.K[this.j.id]=this.j;d.push(this.j);break;case "p":var m=a;l=b;c=[];f=m.getAttribute("w")|| this.D;h=!!z3(m,"a");l=(y3(m,"t")||0)+l;var n=y3(m,"d")||5E3;h||(!this.G&&this.B&&this.B.windowId===f&&this.B.end>l&&(this.B.end=l),this.B&&this.B.text==="\n"&&(this.B.text=""));var p=h?6:5,q=m.getAttribute("p");q=q?this.pens[q]:null;var r=Array.from(m.childNodes);r.length&&(this.G=m.getAttribute("d")!=null);for(m=0;m0&&(h=!0);var y=void 0;t.nodeType===1&&(y=t);if(y&&y.tagName==="s"){if((t=(t=y.getAttribute("p"))?this.pens[t]:null)&&t.gg&&(t.gg===1?(t=r.slice(m, m+4),t.length===4&&(u=Neb(l,n,f,h,p,t,this.pens),m+=3)):u=Neb(l,n,f,h,p,[y],this.pens)),!u){var A=y;u=l;y=n;t=f;var D=h,F=p,H=A.textContent?A.textContent:"",M=A.getAttribute("p");M=M?this.pens[M]:null;A=y3(A,"t")||0;u=new t3(u+A,y-A,F,t,H,D,M)}}else u=new t3(l,n,p,f,t.textContent||"",h,q);c.push(u);this.B=u}if(c.length>0)for(c[0].windowId===this.D&&(this.j=Reb(this,a,b,!0),d.push(this.j)),a=g.w(c),c=a.next();!c.done;c=a.next())c=c.value,c.windowId=this.j.id,this.j.j.push(c),d.push(c)}b=d}else b=[]; return b};var wfb=new Map([[9,1],[10,1],[11,2],[12,3],[13,4],[14,5]]);g.z(D3,u3);D3.prototype.reset=function(){this.B.clear()}; D3.prototype.Qo=function(a,b){var c=JSON.parse(a);if(!c)return[];if(c.pens){a=0;for(var d=g.w(c.pens),e=d.next();!e.done;e=d.next()){e=e.value;var f={},h=e.pParentId;h&&Object.assign(f,this.j.get(h));e.bAttr&&(f.bold=!0);e.iAttr&&(f.italic=!0);e.uAttr&&(f.underline=!0);h=e.ofOffset;h!=null&&(f.offset=h);e.szPenSize!==void 0&&(f.fontSizeIncrement=e.szPenSize/100-1);h=e.etEdgeType;h!=null&&(f.charEdgeStyle=h);e.ecEdgeColor!==void 0&&(f.LO=E3(e.ecEdgeColor));h=e.fsFontStyle;h!=null&&h!==0&&(f.fontFamily= h);e.fcForeColor!==void 0&&(f.color=E3(e.fcForeColor));e.foForeAlpha!==void 0&&(f.textOpacity=e.foForeAlpha/255);e.bcBackColor!==void 0&&(f.background=E3(e.bcBackColor));e.boBackAlpha!==void 0&&(f.backgroundOpacity=e.boBackAlpha/255);(h=e.rbRuby)&&h!==10&&(f.gg=h>10?h-1:h,f.Zo=wfb.get(f.gg));e.hgHorizGroup&&(f.nZ=e.hgHorizGroup);this.j.set(a++,f)}}if(c.wsWinStyles)for(a=0,d=g.w(c.wsWinStyles),e=d.next();!e.done;e=d.next())e=e.value,f={},(h=e.wsParentId)?Object.assign(f,this.D.get(h)):Object.assign(f, this.G),e.mhModeHint!==void 0&&(f.sB=e.mhModeHint),e.juJustifCode!==void 0&&(f.textAlign=e.juJustifCode),e.pdPrintDir!==void 0&&(f.Ri=e.pdPrintDir),e.sdScrollDir!==void 0&&(f.gU=e.sdScrollDir),e.wfcWinFillColor!==void 0&&(f.windowColor=E3(e.wfcWinFillColor)),e.wfoWinFillAlpha!==void 0&&(f.windowOpacity=e.wfoWinFillAlpha/255),this.D.set(a++,f);if(c.wpWinPositions)for(a=0,d=g.w(c.wpWinPositions),e=d.next();!e.done;e=d.next())e=e.value,f={},(h=e.wpParentId)&&Object.assign(f,this.C.get(h)),e.ahHorPos!== void 0&&(f.Gk=e.ahHorPos),e.apPoint!==void 0&&(f.Cm=e.apPoint),e.avVerPos!==void 0&&(f.gp=e.avVerPos),e.ccCols!==void 0&&(f.It=e.ccCols),e.rcRows!==void 0&&(f.Hs=e.rcRows),this.C.set(a++,f);if(c.events){a=[];c=g.w(c.events);for(d=c.next();!d.done;d=c.next()){var l=d.value;e=(l.tStartMs||0)+b;f=l.dDurationMs||0;if(l.id)h=String(l.id),d=Seb(this,l,e,f,h),a.push(d),this.B.set(h,d);else{l.wWinId?h=l.wWinId.toString():(h="_"+w3++,d=Seb(this,l,e,f,h),a.push(d),this.B.set(h,d));d=a;var m=l;f===0&&(f=5E3); l=this.B.get(h);var n=!!m.aAppend,p=n?6:5,q=m.segs,r=null;m.pPenId&&(r=this.j.get(m.pPenId));for(m=0;m1?1:0)===2&&n&&u==="\n")continue;t=null;var D=[],F;if(F=A&&A.gg===1){F=q;var H=m;if(H+3>=F.length||!F[H+1].pPenId||!F[H+2].pPenId||!F[H+3].pPenId)F=!1;else{var M=F[H+1].pPenId;(M=this.j.get(M))&&M.gg&&M.gg===2?(M=F[H+2].pPenId,M=this.j.get(M),!M||!M.gg|| M.gg<3?F=!1:(M=F[H+3].pPenId,F=(M=this.j.get(M))&&M.gg&&M.gg===2?!0:!1)):F=!1}}if(F)y=q[m+1].utf8,t=q[m+3].utf8,F=q[m+2].utf8,H=this.j.get(q[m+2].pPenId),u=Meb(u,y,F,t,H),t=new t3(e,f,p,h,u,n,A),m+=3;else{if(u.indexOf("<")>-1){var N=void 0;D=A;F=r;H=e;M=f;var S=y,ba=p,ha=n,na=[],Y=g.Z0(""+u+"");if(!Y.getElementsByTagName("parsererror").length&&((N=Y.firstChild)==null?0:N.childNodes.length))for(N=g.w(Y.firstChild.childNodes),Y=N.next();!Y.done;Y=N.next()){Y=Y.value;var R=void 0,W=void 0, v=(W=(R=Y.textContent)==null?void 0:R.replace(/\n/g,""))!=null?W:"";if(Y.nodeType!==3||v&&v.match(/^ *$/)==null){R={};Object.assign(R,D||F);W=void 0;switch((W=Y)==null?void 0:W.tagName){case "b":R.bold=!0;break;case "i":R.italic=!0;break;case "u":R.underline=!0}na.push(new t3(H+S,M-S,ba,l.id,v,ha,R))}}D=na}D.length||(D=[new t3(e+y,f-y,p,l.id,u,n,A||r)])}if(D.length)for(n=g.w(D),A=n.next();!A.done;A=n.next())A=A.value,d.push(A),l.j.push(A);else t&&(d.push(t),l.j.push(t))}n=!0}}}b=a}else b=[];return b};g.z(F3,g.VT);F3.prototype.Iu=function(a,b,c){Gdb(this.videoData.videoId,a.vssId,c)}; F3.prototype.fB=function(a){if(this.audioTrack)for(var b=g.w(this.audioTrack.captionTracks),c=b.next();!c.done;c=b.next())g.UT(this.B,c.value);a()};g.z(G3,k3);G3.prototype.qO=function(a){var b=this.B.j;k3.prototype.qO.call(this,a);for(a=a.length;a0;a.G--){var b=I3(a),c=I3(a),d=I3(a);b&4&&(b&3)===this.track&&(this.track===0||this.track===1)&&(b=this.j,b.j.push({time:a.C,type:this.track,mX:c,nX:d,order:b.j.length}))}heb(this.j,a);return a.B}return[]}; K3.prototype.reset=function(){this.j.clear()};g.z(L3,k3);g.k=L3.prototype;g.k.M1=function(){g.No(this.Wa)}; g.k.Wba=function(){g.Vo(this.element,"ytp-rollup-mode");this.vC(this.Tb,!0)}; g.k.qY=function(){return this.C?this.qa:this.Y}; g.k.rY=function(){return this.C?this.Y:this.qa}; g.k.vC=function(a,b){this.Tb=a;if(this.B.params.Hs){for(var c=0,d=0;d0&&c=4){var l=Zeb(h[1]),m=Zeb(h[2])-l;l+=f;var n=(h=h[3])?h.split(" "):[];h={};var p=null;var q="";var r=null,t="";n=g.w(n);for(var u=n.next();!u.done;u=n.next())if(u=u.value.split(":"),u.length===2){var y=u[1];switch(u[0]){case "line":u=y.split(",");u[0].endsWith("%")&&(p=u[0],h.gp=Number.parseInt(p,10),u.length===2&&(q=u[1].trim()));break;case "position":u= y.split(",");r=u[0];h.Gk=Number.parseInt(r,10);u.length===2&&(t=u[1].trim());break;case "align":switch(y){case "start":h.textAlign=0;break;case "middle":h.textAlign=2;break;case "end":h.textAlign=1}}}p||q||(q="end");if(!r)switch(h.textAlign){case 0:h.Gk=0;break;case 1:h.Gk=100;break;case 2:h.Gk=50}if(h.textAlign!=null){p=0;switch(q){case "center":p+=3;break;case "end":p+=6;break;default:p+=0}switch(t){case "line-left":p+=0;break;case "center":p+=1;break;case "line-right":p+=2;break;default:switch(h.textAlign){case 0:p+= 0;break;case 2:p+=1;break;case 1:p+=2}}q=p<0||p>8?7:p;h.Cm=q}e=e.substring(Afb.lastIndex).replace(/[\x01-\x09\x0b-\x1f]/g,"");t=h;h=e;e={};if(h.indexOf("<")<0&&h.indexOf("&")<0)f=$eb(l,m,5,t),m=new t3(l,m,5,f.id,h,!1,g.Bc(e)?void 0:e),c.push(f),c.push(m),f.j.push(m);else for(q=h.split(Bfb),q.length===1?(h=5,t=$eb(l,m,h,t)):(p=h=6,t=Object.assign({It:32},t),t=new v3(l,m,p,"_"+w3++,t)),c.push(t),p=l,r=0;r"+n+""),u.getElementsByTagName("parsererror").length? (y=u.createElement("span"),y.appendChild(u.createTextNode(n))):y=u.firstChild,Yeb(this,p,m-(p-l),h,t,r>0,y,e,c)):p=Zeb(n)+f}Afb.lastIndex=0}}return c}; var zfb=/^NOTE/,yfb=/(?:\r\n|\r|\n){2,}/,Afb=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"),Bfb=RegExp("<((?:[\\d]{2}:)?[\\d]{2}:[\\d]{2}\\.[\\d]{3})>");g.wW.HK(M3,{Qo:"wvppt"});g.z(N3,g.O); N3.prototype.Qo=function(a,b,c,d){c=c||0;d=d||0;if(this.B&&a){a:{var e=d,f=cfb(this,a,c),h=[];try{for(var l=g.w(f),m=l.next();!m.done;m=l.next()){var n=m.value,p=n.trackData,q=n.aU;h=typeof p!=="string"?h.concat(dfb(this,b,p,q,e)):p.substring(0,6)==="WEBVTT"?h.concat(efb(this,p,q)):h.concat(gfb(this,b,p,q))}var r=h;break a}catch(t){g.xw(t);this.clear();r=[];break a}r=void 0}if(r.length!==0)return r}a=afb(a);if(!a)return[];try{return typeof a!=="string"?dfb(this,b,a,c,d):a.substring(0,6)==="WEBVTT"? efb(this,a,c):gfb(this,b,a,c)}catch(t){return g.xw(t),this.clear(),[]}}; N3.prototype.clear=function(){this.j&&this.j.dispose();this.j=null}; N3.prototype.reset=function(){this.j&&this.j.reset()}; N3.prototype.xa=function(){g.O.prototype.xa.call(this);this.clear()};var W3={windowColor:"#080808",windowOpacity:0,textAlign:2,Cm:7,Gk:50,gp:100,isDefault:!0,Qe:{background:"#080808",backgroundOpacity:.75,charEdgeStyle:0,color:"#fff",fontFamily:4,fontSizeIncrement:0,textOpacity:1,offset:1}};g.z(O3,g.ST);g.k=O3.prototype;g.k.xa=function(){if(this.D||this.Fa){var a=this.J.Le();a&&!a.La()&&a.Nz()}else vfb(this,!1);g.ST.prototype.xa.call(this)}; g.k.LT=function(){return this.W.L("html5_honor_caption_availabilities_in_audio_track")&&!this.Xa}; g.k.xv=function(){if(this.Wa)return this.D||this.Fa;var a=this.getAudioTrack();if(this.LT()){if(!a.captionTracks.length)return!1;if(!this.j)return!0}a=Ddb(a,g.KO(this.W));return a==="CAPTIONS_INITIAL_STATE_ON_REQUIRED"?!0:a==="CAPTIONS_INITIAL_STATE_OFF_REQUIRED"?P3(this):kfb(this)||P3(this)?!0:lfb(this)}; g.k.load=function(){var a=this;g.ST.prototype.load.call(this);this.N=this.getAudioTrack();this.j?this.B&&(this.Ya.clear(),this.D?pfb(this,!0):this.player.getPresentingPlayerType()!==3&&this.j.Iu(this.B,"json3",function(b,c,d,e){if(b){var f;qfb(a,(f=a.B)!=null?f:void 0);a.j.OS()&&(a.Ga=[],a.J.sf("captions"),h3(a.Ma),a.Ya.reset());if(a.videoData.Sf){var h;d=((h=d)!=null?h:0)+a.videoData.Sf}b=a.Ya.Qo(b,c,d,e);if(a.fb)for(c=g.w(b),e=c.next();!e.done;e=c.next())e=e.value,e.C=a.videoData.clientPlaybackNonce, e.Ol=a.videoData.Sf;c=!a.W.L("html5_keep_caption_data_after_seek")&&a.Xa;a.player.mf(b,void 0,c);!a.Z||a.Fa||S3(a)||!a.W.wm||g.iC(a.W)||g.xO(a.W)||g.yy(a.W)||a.W.Ma==="shortspage"||a.player.isInline()||(g.Oo(a.Ka),b=Oeb({Cm:0,Gk:5,gp:5,Hs:2,textAlign:0,Ri:0,lang:"en"}),a.Ra=[b],c=["Click "," for settings"],a.ob||(e=new g.ax(g.tx()),g.P(a,e),a.ob=e.element),e=b.end-b.start,(f=g.bP(a.B))&&a.Ra.push(new t3(b.start,e,0,b.id,f)),a.Ra.push(new t3(b.start,e,0,b.id,c[0]),new t3(b.start,e,0,b.id,a.ob,!0), new t3(b.start,e,0,b.id,c[1],!0)),a.player.mf(a.Ra),g.Mo(a.Ka));!a.Z||a.Fa||S3(a)||(g.KO(a.W)?U3(a,!0):V3(a,!0),a.N&&(a.N.D=a.B),a.player.mp());a.Z=!1}}),this.D||this.Fa||S3(this)||this.player.Hc("captionschanged",g.cP(this.B))):(this.j=mfb(this),g.P(this,this.j),this.j.fB(function(){ofb(a)}))}; g.k.unload=function(){this.D&&this.B?pfb(this,!1):(this.Ka&&g.Oo(this.Ka),this.player.sf("captions"),this.Ga=[],this.j&&this.j.Xs(),this.Ya.clear(),this.Y&&this.player.mf(this.Y),this.uU());g.ST.prototype.unload.call(this);this.player.mp();this.player.Hc("captionschanged",{})}; g.k.create=function(){this.xv()&&this.load();var a;a:{var b,c,d;if(this.W.L("web_player_nitrate_promo_tooltip")&&((b=this.videoData.getPlayerResponse())==null?0:(c=b.captions)==null?0:(d=c.playerCaptionsTracklistRenderer)==null?0:d.enableTouchCaptionsNitrate)){var e,f;if(b=(a=this.videoData.getPlayerResponse())==null?void 0:(e=a.captions)==null?void 0:(f=e.playerCaptionsTracklistRenderer)==null?void 0:f.captionTracks)for(a=g.w(b),e=a.next();!e.done;e=a.next())if(e=e.value,e.kind==="asr"&&e.languageCode=== "en"){a=!0;break a}}a=!1}a&&this.J.publish("showpromotooltip",this.K.element)}; g.k.Dca=function(){for(var a=this.J.Le().Ib().textTracks,b=null,c=0;c